diff --git a/grunt-settings.yaml b/grunt-settings.yaml index c645fdfbf1678..eebc7d7a9db7f 100644 --- a/grunt-settings.yaml +++ b/grunt-settings.yaml @@ -41,7 +41,7 @@ vendors: 'version': '3.7.2' 'dependencies': '' 'codemirror': - 'version': '5.25.2' + 'version': '5.26.0' 'dependencies': '' 'cropperjs': 'version': '1.0.0-rc' diff --git a/media/vendor/codemirror/addon/comment/comment.min.js b/media/vendor/codemirror/addon/comment/comment.min.js index aeabb26aa8164..d6ccfdc64a8b1 100644 --- a/media/vendor/codemirror/addon/comment/comment.min.js +++ b/media/vendor/codemirror/addon/comment/comment.min.js @@ -1 +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 n(e){var n=e.search(o);return-1==n?0:n}function t(e,n,t){return/\bstring\b/.test(e.getTokenTypeAt(r(n.line,0)))&&!/^[\'\"\`]/.test(t)}function i(e,n){var t=e.getMode();return!1!==t.useInnerComments&&t.innerMode?e.getModeAt(n):t}var l={},o=/[^\s\u00a0]/,r=e.Pos;e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",function(e){e||(e=l);for(var n=this,t=1/0,i=this.listSelections(),o=null,a=i.length-1;a>=0;a--){var m=i[a].from(),c=i[a].to();m.line>=t||(c.line>=t&&(c=r(t,0)),t=m.line,null==o?n.uncomment(m,c,e)?o="un":(n.lineComment(m,c,e),o="line"):"un"==o?n.uncomment(m,c,e):n.lineComment(m,c,e))}}),e.defineExtension("lineComment",function(e,a,m){m||(m=l);var c=this,f=i(c,e),g=c.getLine(e.line);if(null!=g&&!t(c,e,g)){var s=m.lineComment||f.lineComment;if(s){var d=Math.min(0!=a.ch||a.line==e.line?a.line+1:a.line,c.lastLine()+1),u=null==m.padding?" ":m.padding,h=m.commentBlankLines||e.line==a.line;c.operation(function(){if(m.indent){for(var t=null,i=e.line;il.length)&&(t=l)}for(i=e.line;ig||a.operation(function(){if(0!=t.fullLines){var i=o.test(a.getLine(g));a.replaceRange(s+f,r(g)),a.replaceRange(c+s,r(e.line,0));var l=t.blockCommentLead||m.blockCommentLead;if(null!=l)for(var d=e.line+1;d<=g;++d)(d!=g||i)&&a.replaceRange(l+s,r(d,0))}else a.replaceRange(f,n),a.replaceRange(c,e)})}}else(t.lineComment||m.lineComment)&&0!=t.fullLines&&a.lineComment(e,n,t)}),e.defineExtension("uncomment",function(e,n,t){t||(t=l);var a,m=this,c=i(m,e),f=Math.min(0!=n.ch||n.line==e.line?n.line:n.line-1,m.lastLine()),g=Math.min(e.line,f),s=t.lineComment||c.lineComment,d=[],u=null==t.padding?" ":t.padding;e:if(s){for(var h=g;h<=f;++h){var v=m.getLine(h),p=v.indexOf(s);if(p>-1&&!/comment/.test(m.getTokenTypeAt(r(h,p+1)))&&(p=-1),-1==p&&o.test(v))break e;if(p>-1&&o.test(v.slice(0,p)))break e;d.push(v)}if(m.operation(function(){for(var e=g;e<=f;++e){var n=d[e-g],t=n.indexOf(s),i=t+s.length;t<0||(n.slice(i,i+u.length)==u&&(i+=u.length),a=!0,m.replaceRange("",r(e,t),r(e,i)))}}),a)return!0}var C=t.blockCommentStart||c.blockCommentStart,b=t.blockCommentEnd||c.blockCommentEnd;if(!C||!b)return!1;var k=t.blockCommentLead||c.blockCommentLead,L=m.getLine(g),x=L.indexOf(C);if(-1==x)return!1;var R=f==g?L:m.getLine(f),O=R.indexOf(b,f==g?x+C.length:0);-1==O&&g!=f&&(R=m.getLine(--f),O=R.indexOf(b));var T=r(g,x+1),y=r(f,O+1);if(-1==O||!/comment/.test(m.getTokenTypeAt(T))||!/comment/.test(m.getTokenTypeAt(y))||m.getRange(T,y,"\n").indexOf(b)>-1)return!1;var E=L.lastIndexOf(C,e.ch),M=-1==E?-1:L.slice(0,e.ch).indexOf(b,E+C.length);if(-1!=E&&-1!=M&&M+b.length!=e.ch)return!1;M=R.indexOf(b,n.ch);var S=R.slice(n.ch).lastIndexOf(C,M-n.ch);return E=-1==M||-1==S?-1:n.ch+S,(-1==M||-1==E||E==n.ch)&&(m.operation(function(){m.replaceRange("",r(f,O-(u&&R.slice(O-u.length,O)==u?u.length:0)),r(f,O+b.length));var e=x+C.length;if(u&&L.slice(e,e+u.length)==u&&(e+=u.length),m.replaceRange("",r(g,x),r(g,e)),k)for(var n=g+1;n<=f;++n){var t=m.getLine(n),i=t.indexOf(k);if(-1!=i&&!o.test(t.slice(0,i))){var l=i+k.length;u&&t.slice(l,l+u.length)==u&&(l+=u.length),m.replaceRange("",r(n,i),r(n,l))}}}),!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 n(e){var n=e.search(o);return-1==n?0:n}function t(e,n,t){return/\bstring\b/.test(e.getTokenTypeAt(r(n.line,0)))&&!/^[\'\"\`]/.test(t)}function i(e,n){var t=e.getMode();return!1!==t.useInnerComments&&t.innerMode?e.getModeAt(n):t}var l={},o=/[^\s\u00a0]/,r=e.Pos;e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",function(e){e||(e=l);for(var n=this,t=1/0,i=this.listSelections(),o=null,a=i.length-1;a>=0;a--){var m=i[a].from(),c=i[a].to();m.line>=t||(c.line>=t&&(c=r(t,0)),t=m.line,null==o?n.uncomment(m,c,e)?o="un":(n.lineComment(m,c,e),o="line"):"un"==o?n.uncomment(m,c,e):n.lineComment(m,c,e))}}),e.defineExtension("lineComment",function(e,a,m){m||(m=l);var c=this,f=i(c,e),g=c.getLine(e.line);if(null!=g&&!t(c,e,g)){var s=m.lineComment||f.lineComment;if(!s)return void((m.blockCommentStart||f.blockCommentStart)&&(m.fullLines=!0,c.blockComment(e,a,m)));var d=Math.min(0!=a.ch||a.line==e.line?a.line+1:a.line,c.lastLine()+1),u=null==m.padding?" ":m.padding,h=m.commentBlankLines||e.line==a.line;c.operation(function(){if(m.indent){for(var t=null,i=e.line;il.length)&&(t=l)}for(i=e.line;ig||a.operation(function(){if(0!=t.fullLines){var i=o.test(a.getLine(g));a.replaceRange(s+f,r(g)),a.replaceRange(c+s,r(e.line,0));var l=t.blockCommentLead||m.blockCommentLead;if(null!=l)for(var d=e.line+1;d<=g;++d)(d!=g||i)&&a.replaceRange(l+s,r(d,0))}else a.replaceRange(f,n),a.replaceRange(c,e)})}}else(t.lineComment||m.lineComment)&&0!=t.fullLines&&a.lineComment(e,n,t)}),e.defineExtension("uncomment",function(e,n,t){t||(t=l);var a,m=this,c=i(m,e),f=Math.min(0!=n.ch||n.line==e.line?n.line:n.line-1,m.lastLine()),g=Math.min(e.line,f),s=t.lineComment||c.lineComment,d=[],u=null==t.padding?" ":t.padding;e:if(s){for(var h=g;h<=f;++h){var v=m.getLine(h),p=v.indexOf(s);if(p>-1&&!/comment/.test(m.getTokenTypeAt(r(h,p+1)))&&(p=-1),-1==p&&o.test(v))break e;if(p>-1&&o.test(v.slice(0,p)))break e;d.push(v)}if(m.operation(function(){for(var e=g;e<=f;++e){var n=d[e-g],t=n.indexOf(s),i=t+s.length;t<0||(n.slice(i,i+u.length)==u&&(i+=u.length),a=!0,m.replaceRange("",r(e,t),r(e,i)))}}),a)return!0}var C=t.blockCommentStart||c.blockCommentStart,b=t.blockCommentEnd||c.blockCommentEnd;if(!C||!b)return!1;var k=t.blockCommentLead||c.blockCommentLead,L=m.getLine(g),x=L.indexOf(C);if(-1==x)return!1;var R=f==g?L:m.getLine(f),O=R.indexOf(b,f==g?x+C.length:0);-1==O&&g!=f&&(R=m.getLine(--f),O=R.indexOf(b));var T=r(g,x+1),y=r(f,O+1);if(-1==O||!/comment/.test(m.getTokenTypeAt(T))||!/comment/.test(m.getTokenTypeAt(y))||m.getRange(T,y,"\n").indexOf(b)>-1)return!1;var E=L.lastIndexOf(C,e.ch),M=-1==E?-1:L.slice(0,e.ch).indexOf(b,E+C.length);if(-1!=E&&-1!=M&&M+b.length!=e.ch)return!1;M=R.indexOf(b,n.ch);var S=R.slice(n.ch).lastIndexOf(C,M-n.ch);return E=-1==M||-1==S?-1:n.ch+S,(-1==M||-1==E||E==n.ch)&&(m.operation(function(){m.replaceRange("",r(f,O-(u&&R.slice(O-u.length,O)==u?u.length:0)),r(f,O+b.length));var e=x+C.length;if(u&&L.slice(e,e+u.length)==u&&(e+=u.length),m.replaceRange("",r(g,x),r(g,e)),k)for(var n=g+1;n<=f;++n){var t=m.getLine(n),i=t.indexOf(k);if(-1!=i&&!o.test(t.slice(0,i))){var l=i+k.length;u&&t.slice(l,l+u.length)==u&&(l+=u.length),m.replaceRange("",r(n,i),r(n,l))}}}),!0)})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){var b=a.search(f);return b==-1?0:b}function c(a,b,c){return/\bstring\b/.test(a.getTokenTypeAt(g(b.line,0)))&&!/^[\'\"\`]/.test(c)}function d(a,b){var c=a.getMode();return c.useInnerComments!==!1&&c.innerMode?a.getModeAt(b):c}var e={},f=/[^\s\u00a0]/,g=a.Pos;a.commands.toggleComment=function(a){a.toggleComment()},a.defineExtension("toggleComment",function(a){a||(a=e);for(var b=this,c=1/0,d=this.listSelections(),f=null,h=d.length-1;h>=0;h--){var i=d[h].from(),j=d[h].to();i.line>=c||(j.line>=c&&(j=g(c,0)),c=i.line,null==f?b.uncomment(i,j,a)?f="un":(b.lineComment(i,j,a),f="line"):"un"==f?b.uncomment(i,j,a):b.lineComment(i,j,a))}}),a.defineExtension("lineComment",function(a,h,i){i||(i=e);var j=this,k=d(j,a),l=j.getLine(a.line);if(null!=l&&!c(j,a,l)){var m=i.lineComment||k.lineComment;if(!m)return void((i.blockCommentStart||k.blockCommentStart)&&(i.fullLines=!0,j.blockComment(a,h,i)));var n=Math.min(0!=h.ch||h.line==a.line?h.line+1:h.line,j.lastLine()+1),o=null==i.padding?" ":i.padding,p=i.commentBlankLines||a.line==h.line;j.operation(function(){if(i.indent){for(var c=null,d=a.line;dh.length)&&(c=h)}for(var d=a.line;dl||h.operation(function(){if(0!=c.fullLines){var d=f.test(h.getLine(l));h.replaceRange(m+k,g(l)),h.replaceRange(j+m,g(a.line,0));var e=c.blockCommentLead||i.blockCommentLead;if(null!=e)for(var n=a.line+1;n<=l;++n)(n!=l||d)&&h.replaceRange(e+m,g(n,0))}else h.replaceRange(k,b),h.replaceRange(j,a)})}}),a.defineExtension("uncomment",function(a,b,c){c||(c=e);var h,i=this,j=d(i,a),k=Math.min(0!=b.ch||b.line==a.line?b.line:b.line-1,i.lastLine()),l=Math.min(a.line,k),m=c.lineComment||j.lineComment,n=[],o=null==c.padding?" ":c.padding;a:if(m){for(var p=l;p<=k;++p){var q=i.getLine(p),r=q.indexOf(m);if(r>-1&&!/comment/.test(i.getTokenTypeAt(g(p,r+1)))&&(r=-1),r==-1&&f.test(q))break a;if(r>-1&&f.test(q.slice(0,r)))break a;n.push(q)}if(i.operation(function(){for(var a=l;a<=k;++a){var b=n[a-l],c=b.indexOf(m),d=c+m.length;c<0||(b.slice(d,d+o.length)==o&&(d+=o.length),h=!0,i.replaceRange("",g(a,c),g(a,d)))}}),h)return!0}var s=c.blockCommentStart||j.blockCommentStart,t=c.blockCommentEnd||j.blockCommentEnd;if(!s||!t)return!1;var u=c.blockCommentLead||j.blockCommentLead,v=i.getLine(l),w=v.indexOf(s);if(w==-1)return!1;var x=k==l?v:i.getLine(k),y=x.indexOf(t,k==l?w+s.length:0);y==-1&&l!=k&&(x=i.getLine(--k),y=x.indexOf(t));var z=g(l,w+1),A=g(k,y+1);if(y==-1||!/comment/.test(i.getTokenTypeAt(z))||!/comment/.test(i.getTokenTypeAt(A))||i.getRange(z,A,"\n").indexOf(t)>-1)return!1;var B=v.lastIndexOf(s,a.ch),C=B==-1?-1:v.slice(0,a.ch).indexOf(t,B+s.length);if(B!=-1&&C!=-1&&C+t.length!=a.ch)return!1;C=x.indexOf(t,b.ch);var D=x.slice(b.ch).lastIndexOf(s,C-b.ch);return B=C==-1||D==-1?-1:b.ch+D,(C==-1||B==-1||B==b.ch)&&(i.operation(function(){i.replaceRange("",g(k,y-(o&&x.slice(y-o.length,y)==o?o.length:0)),g(k,y+t.length));var a=w+s.length;if(o&&v.slice(a,a+o.length)==o&&(a+=o.length),i.replaceRange("",g(l,w),g(l,a)),u)for(var b=l+1;b<=k;++b){var c=i.getLine(b),d=c.indexOf(u);if(d!=-1&&!f.test(c.slice(0,d))){var e=d+u.length;o&&c.slice(e,e+o.length)==o&&(e+=o.length),i.replaceRange("",g(b,d),g(b,e))}}}),!0)})}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/comment/continuecomment.min.js b/media/vendor/codemirror/addon/comment/continuecomment.min.js index e5043ea9a94f4..9e53cd3ba01bf 100644 --- a/media/vendor/codemirror/addon/comment/continuecomment.min.js +++ b/media/vendor/codemirror/addon/comment/continuecomment.min.js @@ -1 +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){function n(n){if(n.getOption("disableInput"))return e.Pass;for(var o,i=n.listSelections(),r=[],l=0;l=u);else if(0==s.string.indexOf(o.blockCommentStart)){if(f=d.slice(0,s.start),!/^\s*$/.test(f)){f="";for(var C=0;Cs.start&&/^\s*$/.test(d.slice(0,a))&&(f=d.slice(0,a));null!=f&&(f+=o.blockCommentContinue)}if(null==f&&o.lineComment&&t(n)){var g=n.getLine(m.line);(a=g.indexOf(o.lineComment))>-1&&(f=g.slice(0,a),/\S/.test(f)?f=null:f+=o.lineComment+g.slice(a+o.lineComment.length).match(/^\s*/)[0])}if(null==f)return e.Pass;r[l]="\n"+f}n.operation(function(){for(var e=i.length-1;e>=0;e--)n.replaceRange(r[e],i[e].from(),i[e].to(),"+insert")})}function t(e){var n=e.getOption("continueComments");return!n||"object"!=typeof n||!1!==n.continueLineComment}for(var o=["clike","css","javascript"],i=0;i=u);else if(0==s.string.indexOf(o.blockCommentStart)){if(f=d.slice(0,s.start),!/^\s*$/.test(f)){f="";for(var C=0;Cs.start&&/^\s*$/.test(d.slice(0,a))&&(f=d.slice(0,a));null!=f&&(f+=o.blockCommentContinue)}if(null==f&&o.lineComment&&t(n)){var g=n.getLine(m.line);(a=g.indexOf(o.lineComment))>-1&&(f=g.slice(0,a),/\S/.test(f)?f=null:f+=o.lineComment+g.slice(a+o.lineComment.length).match(/^\s*/)[0])}if(null==f)return e.Pass;r[l]="\n"+f}n.operation(function(){for(var e=i.length-1;e>=0;e--)n.replaceRange(r[e],i[e].from(),i[e].to(),"+insert")})}function t(e){var n=e.getOption("continueComments");return!n||"object"!=typeof n||!1!==n.continueLineComment}for(var o=["clike","css","javascript"],i=0;i=m);else if(0==i.string.indexOf(d.blockCommentStart)){if(k=n.slice(0,i.start),!/^\s*$/.test(k)){k="";for(var o=0;oi.start&&/^\s*$/.test(n.slice(0,l))&&(k=n.slice(0,l));null!=k&&(k+=d.blockCommentContinue)}if(null==k&&d.lineComment&&c(b)){var p=b.getLine(h.line),l=p.indexOf(d.lineComment);l>-1&&(k=p.slice(0,l),/\S/.test(k)?k=null:k+=d.lineComment+p.slice(l+d.lineComment.length).match(/^\s*/)[0])}if(null==k)return a.Pass;f[g]="\n"+k}b.operation(function(){for(var a=e.length-1;a>=0;a--)b.replaceRange(f[a],e[a].from(),e[a].to(),"+insert")})}function c(a){var b=a.getOption("continueComments");return!b||"object"!=typeof b||b.continueLineComment!==!1}for(var d=["clike","css","javascript"],e=0;e=0;s--){var f=o[s].head;r.replaceRange("",u(f.line,f.ch-1),u(f.line,f.ch+1),"+delete")}}function i(r){var i=n(r),a=i&&t(i,"explode");if(!a||r.getOption("disableInput"))return e.Pass;for(var o=r.listSelections(),s=0;s0;return{anchor:new u(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new u(t.head.line,t.head.ch+(n?1:-1))}}function o(r,i){var o=n(r);if(!o||r.getOption("disableInput"))return e.Pass;var c=t(o,"pairs"),h=c.indexOf(i);if(-1==h)return e.Pass;for(var d,g=t(o,"triples"),p=c.charAt(h+1)==i,v=r.listSelections(),m=h%2==0,b=0;b1&&g.indexOf(i)>=0&&r.getRange(u(k.line,k.ch-2),k)==i+i&&(k.ch<=2||r.getRange(u(k.line,k.ch-3),u(k.line,k.ch-2))!=i))x="addFour";else if(p){if(e.isWordChar(P)||!l(r,k,i))return e.Pass;x="both"}else{if(!m||r.getLine(k.line).length!=k.ch&&!s(P,c)&&!/\s/.test(P))return e.Pass;x="both"}else x=p&&f(r,k)?"both":g.indexOf(i)>=0&&r.getRange(k,u(k.line,k.ch+3))==i+i+i?"skipThree":"skip";if(d){if(d!=x)return e.Pass}else d=x}var S=h%2?c.charAt(h-1):i,y=h%2?i:c.charAt(h+1);r.operation(function(){if("skip"==d)r.execCommand("goCharRight");else if("skipThree"==d)for(t=0;t<3;t++)r.execCommand("goCharRight");else if("surround"==d){for(var e=r.getSelections(),t=0;t-1&&n%2==1}function c(e,t){var n=e.getRange(u(t.line,t.ch-1),u(t.line,t.ch+1));return 2==n.length?n:null}function l(t,n,r){var i=t.getLine(n.line),a=t.getTokenAt(n);if(/\bstring2?\b/.test(a.type)||f(t,n))return!1;var o=new e.StringStream(i.slice(0,n.ch)+r+i.slice(n.ch),4);for(o.pos=o.start=a.start;;){var s=t.getMode().token(o,a.state);if(o.pos>=n.ch+1)return/\bstring2?\b/.test(s);o.start=o.pos}}function f(e,t){var n=e.getTokenAt(u(t.line,t.ch+1));return/\bstring/.test(n.type)&&n.start==t.ch}var h={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},u=e.Pos;e.defineOption("autoCloseBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.removeKeyMap(g),t.state.closeBrackets=null),n&&(t.state.closeBrackets=n,t.addKeyMap(g))});for(var d=h.pairs+"`",g={Backspace:r,Enter:i},p=0;p=0;s--){var f=o[s].head;r.replaceRange("",u(f.line,f.ch-1),u(f.line,f.ch+1),"+delete")}}function i(r){var i=n(r),a=i&&t(i,"explode");if(!a||r.getOption("disableInput"))return e.Pass;for(var o=r.listSelections(),s=0;s0;return{anchor:new u(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new u(t.head.line,t.head.ch+(n?1:-1))}}function o(r,i){var o=n(r);if(!o||r.getOption("disableInput"))return e.Pass;var c=t(o,"pairs"),h=c.indexOf(i);if(-1==h)return e.Pass;for(var d,g=t(o,"triples"),p=c.charAt(h+1)==i,v=r.listSelections(),m=h%2==0,b=0;b1&&g.indexOf(i)>=0&&r.getRange(u(k.line,k.ch-2),k)==i+i&&(k.ch<=2||r.getRange(u(k.line,k.ch-3),u(k.line,k.ch-2))!=i))x="addFour";else if(p){if(e.isWordChar(P)||!l(r,k,i))return e.Pass;x="both"}else{if(!m||r.getLine(k.line).length!=k.ch&&!s(P,c)&&!/\s/.test(P))return e.Pass;x="both"}else x=p&&f(r,k)?"both":g.indexOf(i)>=0&&r.getRange(k,u(k.line,k.ch+3))==i+i+i?"skipThree":"skip";if(d){if(d!=x)return e.Pass}else d=x}var S=h%2?c.charAt(h-1):i,y=h%2?i:c.charAt(h+1);r.operation(function(){if("skip"==d)r.execCommand("goCharRight");else if("skipThree"==d)for(t=0;t<3;t++)r.execCommand("goCharRight");else if("surround"==d){for(var e=r.getSelections(),t=0;t-1&&n%2==1}function c(e,t){var n=e.getRange(u(t.line,t.ch-1),u(t.line,t.ch+1));return 2==n.length?n:null}function l(t,n,r){var i=t.getLine(n.line),a=t.getTokenAt(n);if(/\bstring2?\b/.test(a.type)||f(t,n))return!1;var o=new e.StringStream(i.slice(0,n.ch)+r+i.slice(n.ch),4);for(o.pos=o.start=a.start;;){var s=t.getMode().token(o,a.state);if(o.pos>=n.ch+1)return/\bstring2?\b/.test(s);o.start=o.pos}}function f(e,t){var n=e.getTokenAt(u(t.line,t.ch+1));return/\bstring/.test(n.type)&&n.start==t.ch}var h={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},u=e.Pos;e.defineOption("autoCloseBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.removeKeyMap(g),t.state.closeBrackets=null),n&&(t.state.closeBrackets=n,t.addKeyMap(g))});for(var d=h.pairs+"`",g={Backspace:r,Enter:i},p=0;p=0;h--){var k=g[h].head;d.replaceRange("",m(k.line,k.ch-1),m(k.line,k.ch+1),"+delete")}}function e(d){var e=c(d),f=e&&b(e,"explode");if(!f||d.getOption("disableInput"))return a.Pass;for(var g=d.listSelections(),h=0;h0;return{anchor:new m(b.anchor.line,b.anchor.ch+(c?-1:1)),head:new m(b.head.line,b.head.ch+(c?1:-1))}}function g(d,e){var g=c(d);if(!g||d.getOption("disableInput"))return a.Pass;var i=b(g,"pairs"),l=i.indexOf(e);if(l==-1)return a.Pass;for(var n,o=b(g,"triples"),p=i.charAt(l+1)==e,q=d.listSelections(),r=l%2==0,s=0;s1&&o.indexOf(e)>=0&&d.getRange(m(v.line,v.ch-2),v)==e+e&&(v.ch<=2||d.getRange(m(v.line,v.ch-3),m(v.line,v.ch-2))!=e))t="addFour";else if(p){if(a.isWordChar(w)||!j(d,v,e))return a.Pass;t="both"}else{if(!r||d.getLine(v.line).length!=v.ch&&!h(w,i)&&!/\s/.test(w))return a.Pass;t="both"}else t=p&&k(d,v)?"both":o.indexOf(e)>=0&&d.getRange(v,m(v.line,v.ch+3))==e+e+e?"skipThree":"skip";if(n){if(n!=t)return a.Pass}else n=t}var x=l%2?i.charAt(l-1):e,y=l%2?e:i.charAt(l+1);d.operation(function(){if("skip"==n)d.execCommand("goCharRight");else if("skipThree"==n)for(var a=0;a<3;a++)d.execCommand("goCharRight");else if("surround"==n){for(var b=d.getSelections(),a=0;a-1&&c%2==1}function i(a,b){var c=a.getRange(m(b.line,b.ch-1),m(b.line,b.ch+1));return 2==c.length?c:null}function j(b,c,d){var e=b.getLine(c.line),f=b.getTokenAt(c);if(/\bstring2?\b/.test(f.type)||k(b,c))return!1;var g=new a.StringStream(e.slice(0,c.ch)+d+e.slice(c.ch),4);for(g.pos=g.start=f.start;;){var h=b.getMode().token(g,f.state);if(g.pos>=c.ch+1)return/\bstring2?\b/.test(h);g.start=g.pos}}function k(a,b){var c=a.getTokenAt(m(b.line,b.ch+1));return/\bstring/.test(c.type)&&c.start==b.ch}var l={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},m=a.Pos;a.defineOption("autoCloseBrackets",!1,function(b,c,d){d&&d!=a.Init&&(b.removeKeyMap(o),b.state.closeBrackets=null),c&&(b.state.closeBrackets=c,b.addKeyMap(o))});for(var n=l.pairs+"`",o={Backspace:d,Enter:e},p=0;pc.ch&&(v=v.slice(0,v.length-d.end+c.ch));var b=v.toLowerCase();if(!v||"string"==d.type&&(d.end!=c.ch||!/[\"\']/.test(d.string.charAt(d.string.length-1))||1==d.string.length)||"tag"==d.type&&"closeTag"==g.type||d.string.indexOf("/")==d.string.length-1||h&&r(h,b)>-1||a(t,v,c,g,!0))return e.Pass;var y=p&&r(p,b)>-1;o[l]={indent:y,text:">"+(y?"\n\n":"")+"",newPos:y?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(l=n.length-1;l>=0;l--){var x=o[l];t.replaceRange(x.text,n[l].head,n[l].anchor,"+insert");var P=t.listSelections().slice(0);P[l]={head:x.newPos,anchor:x.newPos},t.setSelections(P),x.indent&&(t.indentLine(x.newPos.line,null,!0),t.indentLine(x.newPos.line+1,null,!0))}}function n(t,n){for(var o=t.listSelections(),r=[],i=n?"/":""!=t.getLine(l.line).charAt(c.end)&&(g+=">"),r[s]=g}t.replaceSelections(r),o=t.listSelections();for(s=0;s'"]=function(e){return t(e)}),n.addKeyMap(i)}});var i=["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"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var n=t.listSelections(),o=[],l=0;lc.ch&&(v=v.slice(0,v.length-d.end+c.ch));var b=v.toLowerCase();if(!v||"string"==d.type&&(d.end!=c.ch||!/[\"\']/.test(d.string.charAt(d.string.length-1))||1==d.string.length)||"tag"==d.type&&"closeTag"==g.type||d.string.indexOf("/")==d.string.length-1||h&&r(h,b)>-1||a(t,v,c,g,!0))return e.Pass;var y=p&&r(p,b)>-1;o[l]={indent:y,text:">"+(y?"\n\n":"")+"",newPos:y?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(l=n.length-1;l>=0;l--){var x=o[l];t.replaceRange(x.text,n[l].head,n[l].anchor,"+insert");var P=t.listSelections().slice(0);P[l]={head:x.newPos,anchor:x.newPos},t.setSelections(P),x.indent&&(t.indentLine(x.newPos.line,null,!0),t.indentLine(x.newPos.line+1,null,!0))}}function n(t,n){for(var o=t.listSelections(),r=[],i=n?"/":""!=t.getLine(l.line).charAt(c.end)&&(g+=">"),r[s]=g}t.replaceSelections(r),o=t.listSelections();for(s=0;s'"]=function(e){return t(e)}),n.addKeyMap(i)}});var i=["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)}}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],a):a(CodeMirror)}(function(a){function b(b){if(b.getOption("disableInput"))return a.Pass;for(var c=b.listSelections(),d=[],i=0;ij.ch&&(r=r.slice(0,r.length-k.end+j.ch));var s=r.toLowerCase();if(!r||"string"==k.type&&(k.end!=j.ch||!/[\"\']/.test(k.string.charAt(k.string.length-1))||1==k.string.length)||"tag"==k.type&&"closeTag"==m.type||k.string.indexOf("/")==k.string.length-1||p&&e(p,s)>-1||f(b,r,j,m,!0))return a.Pass;var t=q&&e(q,s)>-1;d[i]={indent:t,text:">"+(t?"\n\n":"")+"",newPos:t?a.Pos(j.line+1,0):a.Pos(j.line,j.ch+1)}}for(var i=c.length-1;i>=0;i--){var u=d[i];b.replaceRange(u.text,c[i].head,c[i].anchor,"+insert");var v=b.listSelections().slice(0);v[i]={head:u.newPos,anchor:u.newPos},b.setSelections(v),u.indent&&(b.indentLine(u.newPos.line,null,!0),b.indentLine(u.newPos.line+1,null,!0))}}function c(b,c){for(var d=b.listSelections(),e=[],g=c?"/":""!=b.getLine(i.line).charAt(j.end)&&(m+=">"),e[h]=m}b.replaceSelections(e),d=b.listSelections();for(var h=0;h'"]=function(a){return b(a)}),c.addKeyMap(g)}});var g=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],h=["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"];a.commands.closeTag=function(a){return c(a)}}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/edit/continuelist.min.js b/media/vendor/codemirror/addon/edit/continuelist.min.js index 040c15afe6df7..76f5da7dd6e54 100644 --- a/media/vendor/codemirror/addon/edit/continuelist.min.js +++ b/media/vendor/codemirror/addon/edit/continuelist.min.js @@ -1 +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";var n=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,i=/[*+-]\s/;e.commands.newlineAndIndentContinueMarkdownList=function(r){if(r.getOption("disableInput"))return e.Pass;for(var o=r.listSelections(),s=[],d=0;d\s*$/.test(u)||r.replaceRange("",{line:l.line,ch:0},{line:l.line,ch:l.ch+1}),s[d]="\n";else{var m=p[1],x=p[5],b=i.test(p[2])||p[2].indexOf(">")>=0?p[2].replace("x"," "):parseInt(p[3],10)+1+p[4];s[d]="\n"+m+b+x}}r.replaceSelections(s)}}),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 n=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,i=/[*+-]\s/;e.commands.newlineAndIndentContinueMarkdownList=function(r){if(r.getOption("disableInput"))return e.Pass;for(var o=r.listSelections(),s=[],d=0;d\s*$/.test(u)||r.replaceRange("",{line:l.line,ch:0},{line:l.line,ch:l.ch+1}),s[d]="\n";else{var m=p[1],x=p[5],b=i.test(p[2])||p[2].indexOf(">")>=0?p[2].replace("x"," "):parseInt(p[3],10)+1+p[4];s[d]="\n"+m+b+x}}r.replaceSelections(s)}}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";var b=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,c=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,d=/[*+-]\s/;a.commands.newlineAndIndentContinueMarkdownList=function(e){if(e.getOption("disableInput"))return a.Pass;for(var f=e.listSelections(),g=[],h=0;h\s*$/.test(m)||e.replaceRange("",{line:i.line,ch:0},{line:i.line,ch:i.ch+1}),g[h]="\n";else{var o=n[1],p=n[5],q=d.test(n[2])||n[2].indexOf(">")>=0?n[2].replace("x"," "):parseInt(n[3],10)+1+n[4];g[h]="\n"+o+q+p}}e.replaceSelections(g)}}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/edit/matchbrackets.min.js b/media/vendor/codemirror/addon/edit/matchbrackets.min.js index bcd614f8e7e6f..346150600acde 100644 --- a/media/vendor/codemirror/addon/edit/matchbrackets.min.js +++ b/media/vendor/codemirror/addon/edit/matchbrackets.min.js @@ -1 +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){function t(e,t,i,r){var o=e.getLineHandle(t.line),l=t.ch-1,f=l>=0&&c[o.text.charAt(l)]||c[o.text.charAt(++l)];if(!f)return null;var u=">"==f.charAt(1)?1:-1;if(i&&u>0!=(l==t.ch))return null;var h=e.getTokenTypeAt(a(t.line,l+1)),s=n(e,a(t.line,l+(u>0?1:0)),u,h||null,r);return null==s?null:{from:a(t.line,l),to:s&&s.pos,match:s&&s.ch==f.charAt(0),forward:u>0}}function n(e,t,n,i,r){for(var o=r&&r.maxScanLineLength||1e4,l=r&&r.maxScanLines||1e3,f=[],u=r&&r.bracketRegex?r.bracketRegex:/[(){}[\]]/,h=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),s=t.line;s!=h;s+=n){var m=e.getLine(s);if(m){var d=n>0?0:m.length-1,g=n>0?m.length:-1;if(!(m.length>o))for(s==t.line&&(d=t.ch-(n<0?1:0));d!=g;d+=n){var p=m.charAt(d);if(u.test(p)&&(void 0===i||e.getTokenTypeAt(a(s,d+1))==i))if(">"==c[p].charAt(1)==n>0)f.push(p);else{if(!f.length)return{pos:a(s,d),ch:p};f.pop()}}}}return s-n!=(n>0?e.lastLine():e.firstLine())&&null}function i(e,n,i){for(var r=e.state.matchBrackets.maxHighlightLineLength||1e3,c=[],l=e.listSelections(),f=0;f",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,i){i&&i!=e.Init&&(t.off("cursorActivity",r),l&&(l(),l=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",r))}),e.defineExtension("matchBrackets",function(){i(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,i){return t(this,e,n,i)}),e.defineExtension("scanForBracket",function(e,t,i,r){return n(this,e,t,i,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){function t(e,t,i,r){var o=e.getLineHandle(t.line),l=t.ch-1,f=l>=0&&c[o.text.charAt(l)]||c[o.text.charAt(++l)];if(!f)return null;var u=">"==f.charAt(1)?1:-1;if(i&&u>0!=(l==t.ch))return null;var h=e.getTokenTypeAt(a(t.line,l+1)),s=n(e,a(t.line,l+(u>0?1:0)),u,h||null,r);return null==s?null:{from:a(t.line,l),to:s&&s.pos,match:s&&s.ch==f.charAt(0),forward:u>0}}function n(e,t,n,i,r){for(var o=r&&r.maxScanLineLength||1e4,l=r&&r.maxScanLines||1e3,f=[],u=r&&r.bracketRegex?r.bracketRegex:/[(){}[\]]/,h=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),s=t.line;s!=h;s+=n){var m=e.getLine(s);if(m){var d=n>0?0:m.length-1,g=n>0?m.length:-1;if(!(m.length>o))for(s==t.line&&(d=t.ch-(n<0?1:0));d!=g;d+=n){var p=m.charAt(d);if(u.test(p)&&(void 0===i||e.getTokenTypeAt(a(s,d+1))==i))if(">"==c[p].charAt(1)==n>0)f.push(p);else{if(!f.length)return{pos:a(s,d),ch:p};f.pop()}}}}return s-n!=(n>0?e.lastLine():e.firstLine())&&null}function i(e,n,i){for(var r=e.state.matchBrackets.maxHighlightLineLength||1e3,c=[],l=e.listSelections(),f=0;f",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,i){i&&i!=e.Init&&(t.off("cursorActivity",r),l&&(l(),l=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",r))}),e.defineExtension("matchBrackets",function(){i(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,i){return t(this,e,n,i)}),e.defineExtension("scanForBracket",function(e,t,i,r){return n(this,e,t,i,r)})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b,d,e){var f=a.getLineHandle(b.line),i=b.ch-1,j=i>=0&&h[f.text.charAt(i)]||h[f.text.charAt(++i)];if(!j)return null;var k=">"==j.charAt(1)?1:-1;if(d&&k>0!=(i==b.ch))return null;var l=a.getTokenTypeAt(g(b.line,i+1)),m=c(a,g(b.line,i+(k>0?1:0)),k,l||null,e);return null==m?null:{from:g(b.line,i),to:m&&m.pos,match:m&&m.ch==j.charAt(0),forward:k>0}}function c(a,b,c,d,e){for(var f=e&&e.maxScanLineLength||1e4,i=e&&e.maxScanLines||1e3,j=[],k=e&&e.bracketRegex?e.bracketRegex:/[(){}[\]]/,l=c>0?Math.min(b.line+i,a.lastLine()+1):Math.max(a.firstLine()-1,b.line-i),m=b.line;m!=l;m+=c){var n=a.getLine(m);if(n){var o=c>0?0:n.length-1,p=c>0?n.length:-1;if(!(n.length>f))for(m==b.line&&(o=b.ch-(c<0?1:0));o!=p;o+=c){var q=n.charAt(o);if(k.test(q)&&(void 0===d||a.getTokenTypeAt(g(m,o+1))==d)){var r=h[q];if(">"==r.charAt(1)==c>0)j.push(q);else{if(!j.length)return{pos:g(m,o),ch:q};j.pop()}}}}}return m-c!=(c>0?a.lastLine():a.firstLine())&&null}function d(a,c,d){for(var e=a.state.matchBrackets.maxHighlightLineLength||1e3,h=[],i=a.listSelections(),j=0;j",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},i=null;a.defineOption("matchBrackets",!1,function(b,c,d){d&&d!=a.Init&&(b.off("cursorActivity",e),i&&(i(),i=null)),c&&(b.state.matchBrackets="object"==typeof c?c:{},b.on("cursorActivity",e))}),a.defineExtension("matchBrackets",function(){d(this,!0)}),a.defineExtension("findMatchingBracket",function(a,c,d){return b(this,a,c,d)}),a.defineExtension("scanForBracket",function(a,b,d,e){return c(this,a,b,d,e)})}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/edit/matchtags.min.js b/media/vendor/codemirror/addon/edit/matchtags.min.js index 9256126e5cd1a..ed9b892c62ffb 100644 --- a/media/vendor/codemirror/addon/edit/matchtags.min.js +++ b/media/vendor/codemirror/addon/edit/matchtags.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],t):t(CodeMirror)}(function(t){"use strict";function e(t){t.state.tagHit&&t.state.tagHit.clear(),t.state.tagOther&&t.state.tagOther.clear(),t.state.tagHit=t.state.tagOther=null}function a(a){a.state.failedTagMatch=!1,a.operation(function(){if(e(a),!a.somethingSelected()){var o=a.getCursor(),i=a.getViewport();i.from=Math.min(i.from,o.line),i.to=Math.max(o.line+1,i.to);var r=t.findMatchingTag(a,o,i);if(r){if(a.state.matchBothTags){var n="open"==r.at?r.open:r.close;n&&(a.state.tagHit=a.markText(n.from,n.to,{className:"CodeMirror-matchingtag"}))}var c="close"==r.at?r.open:r.close;c?a.state.tagOther=a.markText(c.from,c.to,{className:"CodeMirror-matchingtag"}):a.state.failedTagMatch=!0}}})}function o(t){t.state.failedTagMatch&&a(t)}t.defineOption("matchTags",!1,function(i,r,n){n&&n!=t.Init&&(i.off("cursorActivity",a),i.off("viewportChange",o),e(i)),r&&(i.state.matchBothTags="object"==typeof r&&r.bothTags,i.on("cursorActivity",a),i.on("viewportChange",o),a(i))}),t.commands.toMatchingTag=function(e){var a=t.findMatchingTag(e,e.getCursor());if(a){var o="close"==a.at?a.open:a.close;o&&e.extendSelection(o.to,o.from)}}}),function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],t):t(CodeMirror)}(function(t){"use strict";function e(t){t.state.tagHit&&t.state.tagHit.clear(),t.state.tagOther&&t.state.tagOther.clear(),t.state.tagHit=t.state.tagOther=null}function a(a){a.state.failedTagMatch=!1,a.operation(function(){if(e(a),!a.somethingSelected()){var o=a.getCursor(),i=a.getViewport();i.from=Math.min(i.from,o.line),i.to=Math.max(o.line+1,i.to);var r=t.findMatchingTag(a,o,i);if(r){if(a.state.matchBothTags){var n="open"==r.at?r.open:r.close;n&&(a.state.tagHit=a.markText(n.from,n.to,{className:"CodeMirror-matchingtag"}))}var c="close"==r.at?r.open:r.close;c?a.state.tagOther=a.markText(c.from,c.to,{className:"CodeMirror-matchingtag"}):a.state.failedTagMatch=!0}}})}function o(t){t.state.failedTagMatch&&a(t)}t.defineOption("matchTags",!1,function(i,r,n){n&&n!=t.Init&&(i.off("cursorActivity",a),i.off("viewportChange",o),e(i)),r&&(i.state.matchBothTags="object"==typeof r&&r.bothTags,i.on("cursorActivity",a),i.on("viewportChange",o),a(i))}),t.commands.toMatchingTag=function(e){var a=t.findMatchingTag(e,e.getCursor());if(a){var o="close"==a.at?a.open:a.close;o&&e.extendSelection(o.to,o.from)}}}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],a):a(CodeMirror)}(function(a){"use strict";function b(a){a.state.tagHit&&a.state.tagHit.clear(),a.state.tagOther&&a.state.tagOther.clear(),a.state.tagHit=a.state.tagOther=null}function c(c){c.state.failedTagMatch=!1,c.operation(function(){if(b(c),!c.somethingSelected()){var d=c.getCursor(),e=c.getViewport();e.from=Math.min(e.from,d.line),e.to=Math.max(d.line+1,e.to);var f=a.findMatchingTag(c,d,e);if(f){if(c.state.matchBothTags){var g="open"==f.at?f.open:f.close;g&&(c.state.tagHit=c.markText(g.from,g.to,{className:"CodeMirror-matchingtag"}))}var h="close"==f.at?f.open:f.close;h?c.state.tagOther=c.markText(h.from,h.to,{className:"CodeMirror-matchingtag"}):c.state.failedTagMatch=!0}}})}function d(a){a.state.failedTagMatch&&c(a)}a.defineOption("matchTags",!1,function(e,f,g){g&&g!=a.Init&&(e.off("cursorActivity",c),e.off("viewportChange",d),b(e)),f&&(e.state.matchBothTags="object"==typeof f&&f.bothTags,e.on("cursorActivity",c),e.on("viewportChange",d),c(e))}),a.commands.toMatchingTag=function(b){var c=a.findMatchingTag(b,b.getCursor());if(c){var d="close"==c.at?c.open:c.close;d&&b.extendSelection(d.to,d.from)}}}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/edit/trailingspace.min.js b/media/vendor/codemirror/addon/edit/trailingspace.min.js index cb412f2f3ec4b..3751c2cdeeaac 100644 --- a/media/vendor/codemirror/addon/edit/trailingspace.min.js +++ b/media/vendor/codemirror/addon/edit/trailingspace.min.js @@ -1 +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){e.defineOption("showTrailingSpace",!1,function(i,n,o){o==e.Init&&(o=!1),o&&!n?i.removeOverlay("trailingspace"):!o&&n&&i.addOverlay({token:function(e){for(var i=e.string.length,n=i;n&&/\s/.test(e.string.charAt(n-1));--n);return n>e.pos?(e.pos=n,null):(e.pos=i,"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){e.defineOption("showTrailingSpace",!1,function(i,n,o){o==e.Init&&(o=!1),o&&!n?i.removeOverlay("trailingspace"):!o&&n&&i.addOverlay({token:function(e){for(var i=e.string.length,n=i;n&&/\s/.test(e.string.charAt(n-1));--n);return n>e.pos?(e.pos=n,null):(e.pos=i,"trailingspace")},name:"trailingspace"})})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){a.defineOption("showTrailingSpace",!1,function(b,c,d){d==a.Init&&(d=!1),d&&!c?b.removeOverlay("trailingspace"):!d&&c&&b.addOverlay({token:function(a){for(var b=a.string.length,c=b;c&&/\s/.test(a.string.charAt(c-1));--c);return c>a.pos?(a.pos=c,null):(a.pos=b,"trailingspace")},name:"trailingspace"})})}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/fold/brace-fold.min.js b/media/vendor/codemirror/addon/fold/brace-fold.min.js index 72a226c458ace..4f6d811118968 100644 --- a/media/vendor/codemirror/addon/fold/brace-fold.min.js +++ b/media/vendor/codemirror/addon/fold/brace-fold.min.js @@ -1 +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";e.registerHelper("fold","brace",function(n,r){function t(t){for(var f=r.ch,s=0;;){var u=f<=0?-1:l.lastIndexOf(t,f-1);if(-1!=u){if(1==s&&un.lastLine())return null;var t=n.getTokenAt(e.Pos(r,1));if(/\S/.test(t.string)||(t=n.getTokenAt(e.Pos(r,t.end+1))),"keyword"!=t.type||"import"!=t.string)return null;for(var i=r,o=Math.min(n.lastLine(),r+10);i<=o;++i){var l=n.getLine(i).indexOf(";");if(-1!=l)return{startCh:t.end,end:e.Pos(i,l)}}}var i,o=r.line,l=t(o);if(!l||t(o-1)||(i=t(o-2))&&i.end.line==o-1)return null;for(var f=l.end;;){var s=t(f.line+1);if(null==s)break;f=s.end}return{from:n.clipPos(e.Pos(o,l.startCh+1)),to:f}}),e.registerHelper("fold","include",function(n,r){function t(r){if(rn.lastLine())return null;var t=n.getTokenAt(e.Pos(r,1));return/\S/.test(t.string)||(t=n.getTokenAt(e.Pos(r,t.end+1))),"meta"==t.type&&"#include"==t.string.slice(0,8)?t.start+8:void 0}var i=r.line,o=t(i);if(null==o||null!=t(i-1))return null;for(var l=i;null!=t(l+1);)++l;return{from:e.Pos(i,o+1),to:n.clipPos(e.Pos(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";e.registerHelper("fold","brace",function(n,r){function t(t){for(var f=r.ch,s=0;;){var u=f<=0?-1:l.lastIndexOf(t,f-1);if(-1!=u){if(1==s&&un.lastLine())return null;var t=n.getTokenAt(e.Pos(r,1));if(/\S/.test(t.string)||(t=n.getTokenAt(e.Pos(r,t.end+1))),"keyword"!=t.type||"import"!=t.string)return null;for(var i=r,o=Math.min(n.lastLine(),r+10);i<=o;++i){var l=n.getLine(i).indexOf(";");if(-1!=l)return{startCh:t.end,end:e.Pos(i,l)}}}var i,o=r.line,l=t(o);if(!l||t(o-1)||(i=t(o-2))&&i.end.line==o-1)return null;for(var f=l.end;;){var s=t(f.line+1);if(null==s)break;f=s.end}return{from:n.clipPos(e.Pos(o,l.startCh+1)),to:f}}),e.registerHelper("fold","include",function(n,r){function t(r){if(rn.lastLine())return null;var t=n.getTokenAt(e.Pos(r,1));return/\S/.test(t.string)||(t=n.getTokenAt(e.Pos(r,t.end+1))),"meta"==t.type&&"#include"==t.string.slice(0,8)?t.start+8:void 0}var i=r.line,o=t(i);if(null==o||null!=t(i-1))return null;for(var l=i;null!=t(l+1);)++l;return{from:e.Pos(i,o+1),to:n.clipPos(e.Pos(l))}})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.registerHelper("fold","brace",function(b,c){function d(d){for(var h=c.ch,i=0;;){var j=h<=0?-1:g.lastIndexOf(d,h-1);if(j!=-1){if(1==i&&jb.lastLine())return null;var d=b.getTokenAt(a.Pos(c,1));if(/\S/.test(d.string)||(d=b.getTokenAt(a.Pos(c,d.end+1))),"keyword"!=d.type||"import"!=d.string)return null;for(var e=c,f=Math.min(b.lastLine(),c+10);e<=f;++e){var g=b.getLine(e),h=g.indexOf(";");if(h!=-1)return{startCh:d.end,end:a.Pos(e,h)}}}var e,f=c.line,g=d(f);if(!g||d(f-1)||(e=d(f-2))&&e.end.line==f-1)return null;for(var h=g.end;;){var i=d(h.line+1);if(null==i)break;h=i.end}return{from:b.clipPos(a.Pos(f,g.startCh+1)),to:h}}),a.registerHelper("fold","include",function(b,c){function d(c){if(cb.lastLine())return null;var d=b.getTokenAt(a.Pos(c,1));return/\S/.test(d.string)||(d=b.getTokenAt(a.Pos(c,d.end+1))),"meta"==d.type&&"#include"==d.string.slice(0,8)?d.start+8:void 0}var e=c.line,f=d(e);if(null==f||null!=d(e-1))return null;for(var g=e;;){if(null==d(g+1))break;++g}return{from:a.Pos(e,f+1),to:b.clipPos(a.Pos(g))}})}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/fold/comment-fold.min.js b/media/vendor/codemirror/addon/fold/comment-fold.min.js index f66c39785963b..4dcb6eecc5297 100644 --- a/media/vendor/codemirror/addon/fold/comment-fold.min.js +++ b/media/vendor/codemirror/addon/fold/comment-fold.min.js @@ -1 +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";e.registerGlobalHelper("fold","comment",function(e){return e.blockCommentStart&&e.blockCommentEnd},function(t,n){var o=t.getModeAt(n),r=o.blockCommentStart,i=o.blockCommentEnd;if(r&&i){for(var f,l=n.line,c=t.getLine(l),m=n.ch,a=0;;){var d=m<=0?-1:c.lastIndexOf(r,m-1);if(-1!=d){if(1==a&&do.firstLine();)i=n.Pos(i.line-1,0),a=f(!1);if(a&&!a.cleared&&"unfold"!==l){var c=e(o,t);n.on(c,"mousedown",function(o){s.clear(),n.e_preventDefault(o)});var s=o.markText(a.from,a.to,{replacedWith:c,clearOnEnter:r(o,t,"clearOnEnter"),__isFold:!0});s.on("clear",function(e,r){n.signal(o,"unfold",o,e,r)}),n.signal(o,"fold",o,a.from,a.to)}}function e(n,o){var e=r(n,o,"widget");if("string"==typeof e){var i=document.createTextNode(e);(e=document.createElement("span")).appendChild(i),e.className="CodeMirror-foldmarker"}return e}function r(n,o,e){if(o&&void 0!==o[e])return o[e];var r=n.options.foldOptions;return r&&void 0!==r[e]?r[e]:i[e]}n.newFoldFunction=function(n,e){return function(r,i){o(r,i,{rangeFinder:n,widget:e})}},n.defineExtension("foldCode",function(n,e,r){o(this,n,e,r)}),n.defineExtension("isFolded",function(n){for(var o=this.findMarksAt(n),e=0;eo.firstLine();)i=n.Pos(i.line-1,0),a=f(!1);if(a&&!a.cleared&&"unfold"!==l){var c=e(o,t);n.on(c,"mousedown",function(o){s.clear(),n.e_preventDefault(o)});var s=o.markText(a.from,a.to,{replacedWith:c,clearOnEnter:r(o,t,"clearOnEnter"),__isFold:!0});s.on("clear",function(e,r){n.signal(o,"unfold",o,e,r)}),n.signal(o,"fold",o,a.from,a.to)}}function e(n,o){var e=r(n,o,"widget");if("string"==typeof e){var i=document.createTextNode(e);(e=document.createElement("span")).appendChild(i),e.className="CodeMirror-foldmarker"}return e}function r(n,o,e){if(o&&void 0!==o[e])return o[e];var r=n.options.foldOptions;return r&&void 0!==r[e]?r[e]:i[e]}n.newFoldFunction=function(n,e){return function(r,i){o(r,i,{rangeFinder:n,widget:e})}},n.defineExtension("foldCode",function(n,e,r){o(this,n,e,r)}),n.defineExtension("isFolded",function(n){for(var o=this.findMarksAt(n),e=0;eb.firstLine();)e=a.Pos(e.line-1,0),k=h(!1);if(k&&!k.cleared&&"unfold"!==g){var l=c(b,f);a.on(l,"mousedown",function(b){m.clear(),a.e_preventDefault(b)});var m=b.markText(k.from,k.to,{replacedWith:l,clearOnEnter:d(b,f,"clearOnEnter"),__isFold:!0});m.on("clear",function(c,d){a.signal(b,"unfold",b,c,d)}),a.signal(b,"fold",b,k.from,k.to)}}function c(a,b){var c=d(a,b,"widget");if("string"==typeof c){var e=document.createTextNode(c);c=document.createElement("span"),c.appendChild(e),c.className="CodeMirror-foldmarker"}return c}function d(a,b,c){if(b&&void 0!==b[c])return b[c];var d=a.options.foldOptions;return d&&void 0!==d[c]?d[c]:e[c]}a.newFoldFunction=function(a,c){return function(d,e){b(d,e,{rangeFinder:a,widget:c})}},a.defineExtension("foldCode",function(a,c,d){b(this,a,c,d)}),a.defineExtension("isFolded",function(a){for(var b=this.findMarksAt(a),c=0;c=d&&(e=n(i.indicatorOpen))}o.setGutterMarker(t,i.gutter,e),++f})}function f(o){var t=o.getViewport(),e=o.state.foldGutter;e&&(o.operation(function(){i(o,t.from,t.to)}),e.from=t.from,e.to=t.to)}function d(o,t,e){var n=o.state.foldGutter;if(n){var i=n.options;if(e==i.gutter){var f=r(o,t);f?f.clear():o.foldCode(c(t,0),i.rangeFinder)}}}function a(o){var t=o.state.foldGutter;if(t){var e=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){f(o)},e.foldOnChangeTimeSpan||600)}}function u(o){var t=o.state.foldGutter;if(t){var e=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var e=o.getViewport();t.from==t.to||e.from-t.to>20||t.from-e.to>20?f(o):o.operation(function(){e.fromt.to&&(i(o,t.to,e.to),t.to=e.to)})},e.updateViewportTimeSpan||400)}}function l(o,t){var e=o.state.foldGutter;if(e){var r=t.line;r>=e.from&&r=d&&(e=n(i.indicatorOpen))}o.setGutterMarker(t,i.gutter,e),++f})}function f(o){var t=o.getViewport(),e=o.state.foldGutter;e&&(o.operation(function(){i(o,t.from,t.to)}),e.from=t.from,e.to=t.to)}function d(o,t,e){var n=o.state.foldGutter;if(n){var i=n.options;if(e==i.gutter){var f=r(o,t);f?f.clear():o.foldCode(c(t,0),i.rangeFinder)}}}function a(o){var t=o.state.foldGutter;if(t){var e=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){f(o)},e.foldOnChangeTimeSpan||600)}}function u(o){var t=o.state.foldGutter;if(t){var e=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var e=o.getViewport();t.from==t.to||e.from-t.to>20||t.from-e.to>20?f(o):o.operation(function(){e.fromt.to&&(i(o,t.to,e.to),t.to=e.to)})},e.updateViewportTimeSpan||400)}}function l(o,t){var e=o.state.foldGutter;if(e){var r=t.line;r>=e.from&&r=h&&(c=e(f.indicatorOpen))}a.setGutterMarker(b,f.gutter,c),++g})}function g(a){var b=a.getViewport(),c=a.state.foldGutter;c&&(a.operation(function(){f(a,b.from,b.to)}),c.from=b.from,c.to=b.to)}function h(a,b,c){var e=a.state.foldGutter;if(e){var f=e.options;if(c==f.gutter){var g=d(a,b);g?g.clear():a.foldCode(l(b,0),f.rangeFinder)}}}function i(a){var b=a.state.foldGutter;if(b){var c=b.options;b.from=b.to=0,clearTimeout(b.changeUpdate),b.changeUpdate=setTimeout(function(){g(a)},c.foldOnChangeTimeSpan||600)}}function j(a){var b=a.state.foldGutter;if(b){var c=b.options;clearTimeout(b.changeUpdate),b.changeUpdate=setTimeout(function(){var c=a.getViewport();b.from==b.to||c.from-b.to>20||b.from-c.to>20?g(a):a.operation(function(){c.fromb.to&&(f(a,b.to,c.to),b.to=c.to)})},c.updateViewportTimeSpan||400)}}function k(a,b){var c=a.state.foldGutter;if(c){var d=b.line;d>=c.from&&do))break;r=l}}return r?{from:e.Pos(i.line,t.getLine(i.line).length),to:e.Pos(r,t.getLine(r).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";function n(n,t){var i=n.getLine(t),o=i.search(/\S/);return-1==o||/\bcomment\b/.test(n.getTokenTypeAt(e.Pos(t,o+1)))?-1:e.countColumn(i,null,n.getOption("tabSize"))}e.registerHelper("fold","indent",function(t,i){var o=n(t,i.line);if(!(o<0)){for(var r=null,l=i.line+1,f=t.lastLine();l<=f;++l){var u=n(t,l);if(-1==u);else{if(!(u>o))break;r=l}}return r?{from:e.Pos(i.line,t.getLine(i.line).length),to:e.Pos(r,t.getLine(r).length)}:void 0}})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(b,c){var d=b.getLine(c),e=d.search(/\S/);return e==-1||/\bcomment\b/.test(b.getTokenTypeAt(a.Pos(c,e+1)))?-1:a.countColumn(d,null,b.getOption("tabSize"))}a.registerHelper("fold","indent",function(c,d){var e=b(c,d.line);if(!(e<0)){for(var f=null,g=d.line+1,h=c.lastLine();g<=h;++g){var i=b(c,g);if(i==-1);else{if(!(i>e))break;f=g}}return f?{from:a.Pos(d.line,c.getLine(d.line).length),to:a.Pos(f,c.getLine(f).length)}:void 0}})}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/fold/markdown-fold.min.js b/media/vendor/codemirror/addon/fold/markdown-fold.min.js index ff8dc3ebdc6bf..4e3988ee84844 100644 --- a/media/vendor/codemirror/addon/fold/markdown-fold.min.js +++ b/media/vendor/codemirror/addon/fold/markdown-fold.min.js @@ -1 +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";e.registerHelper("fold","markdown",function(n,t){function r(t){var r=n.getTokenTypeAt(e.Pos(t,0));return r&&/\bheader\b/.test(r)}function i(e,n,t){var i=n&&n.match(/^#+/);return i&&r(e)?i[0].length:(i=t&&t.match(/^[=\-]+\s*$/),i&&r(e+1)?"="==t[0]?1:2:o)}var o=100,f=n.getLine(t.line),l=n.getLine(t.line+1),c=i(t.line,f,l);if(c!==o){for(var u=n.lastLine(),d=t.line,a=n.getLine(d+2);d=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function f(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function u(e){for(;;){var n=e.text.indexOf(">",e.ch);if(-1==n){if(r(e))continue;return}{if(i(e,n+1)){var t=e.text.lastIndexOf("/",n),f=t>-1&&!/\S/.test(e.text.slice(t+1,n));return e.ch=n+1,f?"selfClose":"regular"}e.ch=n+1}}}function o(e){for(;;){var n=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==n){if(f(e))continue;return}if(i(e,n+1)){F.lastIndex=n,e.ch=n;var t=F.exec(e.text);if(t&&t.index==n)return t}else e.ch=n}}function l(e){for(;;){F.lastIndex=e.ch;var n=F.exec(e.text);if(!n){if(r(e))continue;return}{if(i(e,n.index+1))return e.ch=n.index+n[0].length,n;e.ch=n.index+1}}}function c(e){for(;;){var n=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==n){if(f(e))continue;return}{if(i(e,n+1)){var t=e.text.lastIndexOf("/",n),r=t>-1&&!/\S/.test(e.text.slice(t+1,n));return e.ch=n+1,r?"selfClose":"regular"}e.ch=n}}}function a(e,n){for(var t=[];;){var i,r=l(e),f=e.line,o=e.ch-(r?r[0].length:0);if(!r||!(i=u(e)))return;if("selfClose"!=i)if(r[1]){for(var c=t.length-1;c>=0;--c)if(t[c]==r[2]){t.length=c;break}if(c<0&&(!n||n==r[2]))return{tag:r[2],from:h(f,o),to:h(e.line,e.ch)}}else t.push(r[2])}}function s(e,n){for(var t=[];;){var i=c(e);if(!i)return;if("selfClose"!=i){var r=e.line,f=e.ch,u=o(e);if(!u)return;if(u[1])t.push(u[2]);else{for(var l=t.length-1;l>=0;--l)if(t[l]==u[2]){t.length=l;break}if(l<0&&(!n||n==u[2]))return{tag:u[2],from:h(e.line,e.ch),to:h(r,f)}}}else o(e)}}var h=e.Pos,x="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",F=new RegExp("<(/?)(["+x+"][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-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");e.registerHelper("fold","xml",function(e,n){for(var i=new t(e,n.line,0);;){var r,f=l(i);if(!f||i.line!=n.line||!(r=u(i)))return;if(!f[1]&&"selfClose"!=r){var o=h(i.line,i.ch),c=a(i,f[2]);return c&&{from:o,to:c.from}}}}),e.findMatchingTag=function(e,i,r){var f=new t(e,i.line,i.ch,r);if(-1!=f.text.indexOf(">")||-1!=f.text.indexOf("<")){var l=u(f),c=l&&h(f.line,f.ch),x=l&&o(f);if(l&&x&&!(n(f,i)>0)){var F={from:h(f.line,f.ch),to:c,tag:x[2]};return"selfClose"==l?{open:F,close:null,at:"open"}:x[1]?{open:s(f,x[2]),close:F,at:"close"}:(f=new t(e,c.line,c.ch,r),{open:F,close:a(f,x[2]),at:"open"})}}},e.findEnclosingTag=function(e,n,i,r){for(var f=new t(e,n.line,n.ch,i);;){var u=s(f,r);if(!u)break;var o=a(new t(e,n.line,n.ch,i),u.tag);if(o)return{open:u,close:o}}},e.scanForClosingTag=function(e,n,i,r){return a(new t(e,n.line,n.ch,r?{from:0,to:r}:null),i)}}),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 n(e,n){return e.line-n.line||e.ch-n.ch}function t(e,n,t,i){this.line=n,this.ch=t,this.cm=e,this.text=e.getLine(n),this.min=i?Math.max(i.from,e.firstLine()):e.firstLine(),this.max=i?Math.min(i.to-1,e.lastLine()):e.lastLine()}function i(e,n){var t=e.cm.getTokenTypeAt(h(e.line,n));return t&&/\btag\b/.test(t)}function r(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function f(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function u(e){for(;;){var n=e.text.indexOf(">",e.ch);if(-1==n){if(r(e))continue;return}if(i(e,n+1)){var t=e.text.lastIndexOf("/",n),f=t>-1&&!/\S/.test(e.text.slice(t+1,n));return e.ch=n+1,f?"selfClose":"regular"}e.ch=n+1}}function o(e){for(;;){var n=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==n){if(f(e))continue;return}if(i(e,n+1)){F.lastIndex=n,e.ch=n;var t=F.exec(e.text);if(t&&t.index==n)return t}else e.ch=n}}function l(e){for(;;){F.lastIndex=e.ch;var n=F.exec(e.text);if(!n){if(r(e))continue;return}if(i(e,n.index+1))return e.ch=n.index+n[0].length,n;e.ch=n.index+1}}function c(e){for(;;){var n=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==n){if(f(e))continue;return}if(i(e,n+1)){var t=e.text.lastIndexOf("/",n),r=t>-1&&!/\S/.test(e.text.slice(t+1,n));return e.ch=n+1,r?"selfClose":"regular"}e.ch=n}}function a(e,n){for(var t=[];;){var i,r=l(e),f=e.line,o=e.ch-(r?r[0].length:0);if(!r||!(i=u(e)))return;if("selfClose"!=i)if(r[1]){for(var c=t.length-1;c>=0;--c)if(t[c]==r[2]){t.length=c;break}if(c<0&&(!n||n==r[2]))return{tag:r[2],from:h(f,o),to:h(e.line,e.ch)}}else t.push(r[2])}}function s(e,n){for(var t=[];;){var i=c(e);if(!i)return;if("selfClose"!=i){var r=e.line,f=e.ch,u=o(e);if(!u)return;if(u[1])t.push(u[2]);else{for(var l=t.length-1;l>=0;--l)if(t[l]==u[2]){t.length=l;break}if(l<0&&(!n||n==u[2]))return{tag:u[2],from:h(e.line,e.ch),to:h(r,f)}}}else o(e)}}var h=e.Pos,x="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",F=new RegExp("<(/?)(["+x+"]["+x+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");e.registerHelper("fold","xml",function(e,n){for(var i=new t(e,n.line,0);;){var r,f=l(i);if(!f||i.line!=n.line||!(r=u(i)))return;if(!f[1]&&"selfClose"!=r){var o=h(i.line,i.ch),c=a(i,f[2]);return c&&{from:o,to:c.from}}}}),e.findMatchingTag=function(e,i,r){var f=new t(e,i.line,i.ch,r);if(-1!=f.text.indexOf(">")||-1!=f.text.indexOf("<")){var l=u(f),c=l&&h(f.line,f.ch),x=l&&o(f);if(l&&x&&!(n(f,i)>0)){var F={from:h(f.line,f.ch),to:c,tag:x[2]};return"selfClose"==l?{open:F,close:null,at:"open"}:x[1]?{open:s(f,x[2]),close:F,at:"close"}:(f=new t(e,c.line,c.ch,r),{open:F,close:a(f,x[2]),at:"open"})}}},e.findEnclosingTag=function(e,n,i,r){for(var f=new t(e,n.line,n.ch,i);;){var u=s(f,r);if(!u)break;var o=a(new t(e,n.line,n.ch,i),u.tag);if(o)return{open:u,close:o}}},e.scanForClosingTag=function(e,n,i,r){return a(new t(e,n.line,n.ch,r?{from:0,to:r}:null),i)}}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){return a.line-b.line||a.ch-b.ch}function c(a,b,c,d){this.line=b,this.ch=c,this.cm=a,this.text=a.getLine(b),this.min=d?Math.max(d.from,a.firstLine()):a.firstLine(),this.max=d?Math.min(d.to-1,a.lastLine()):a.lastLine()}function d(a,b){var c=a.cm.getTokenTypeAt(m(a.line,b));return c&&/\btag\b/.test(c)}function e(a){if(!(a.line>=a.max))return a.ch=0,a.text=a.cm.getLine(++a.line),!0}function f(a){if(!(a.line<=a.min))return a.text=a.cm.getLine(--a.line),a.ch=a.text.length,!0}function g(a){for(;;){var b=a.text.indexOf(">",a.ch);if(b==-1){if(e(a))continue;return}{if(d(a,b+1)){var c=a.text.lastIndexOf("/",b),f=c>-1&&!/\S/.test(a.text.slice(c+1,b));return a.ch=b+1,f?"selfClose":"regular"}a.ch=b+1}}}function h(a){for(;;){var b=a.ch?a.text.lastIndexOf("<",a.ch-1):-1;if(b==-1){if(f(a))continue;return}if(d(a,b+1)){o.lastIndex=b,a.ch=b;var c=o.exec(a.text);if(c&&c.index==b)return c}else a.ch=b}}function i(a){for(;;){o.lastIndex=a.ch;var b=o.exec(a.text);if(!b){if(e(a))continue;return}{if(d(a,b.index+1))return a.ch=b.index+b[0].length,b;a.ch=b.index+1}}}function j(a){for(;;){var b=a.ch?a.text.lastIndexOf(">",a.ch-1):-1;if(b==-1){if(f(a))continue;return}{if(d(a,b+1)){var c=a.text.lastIndexOf("/",b),e=c>-1&&!/\S/.test(a.text.slice(c+1,b));return a.ch=b+1,e?"selfClose":"regular"}a.ch=b}}}function k(a,b){for(var c=[];;){var d,e=i(a),f=a.line,h=a.ch-(e?e[0].length:0);if(!e||!(d=g(a)))return;if("selfClose"!=d)if(e[1]){for(var j=c.length-1;j>=0;--j)if(c[j]==e[2]){c.length=j;break}if(j<0&&(!b||b==e[2]))return{tag:e[2],from:m(f,h),to:m(a.line,a.ch)}}else c.push(e[2])}}function l(a,b){for(var c=[];;){var d=j(a);if(!d)return;if("selfClose"!=d){var e=a.line,f=a.ch,g=h(a);if(!g)return;if(g[1])c.push(g[2]);else{for(var i=c.length-1;i>=0;--i)if(c[i]==g[2]){c.length=i;break}if(i<0&&(!b||b==g[2]))return{tag:g[2],from:m(a.line,a.ch),to:m(e,f)}}}else h(a)}}var m=a.Pos,n="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",o=new RegExp("<(/?)(["+n+"]["+n+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");a.registerHelper("fold","xml",function(a,b){for(var d=new c(a,b.line,0);;){var e,f=i(d);if(!f||d.line!=b.line||!(e=g(d)))return;if(!f[1]&&"selfClose"!=e){var h=m(d.line,d.ch),j=k(d,f[2]);return j&&{from:h,to:j.from}}}}),a.findMatchingTag=function(a,d,e){var f=new c(a,d.line,d.ch,e);if(f.text.indexOf(">")!=-1||f.text.indexOf("<")!=-1){var i=g(f),j=i&&m(f.line,f.ch),n=i&&h(f);if(i&&n&&!(b(f,d)>0)){var o={from:m(f.line,f.ch),to:j,tag:n[2]};return"selfClose"==i?{open:o,close:null,at:"open"}:n[1]?{open:l(f,n[2]),close:o,at:"close"}:(f=new c(a,j.line,j.ch,e),{open:o,close:k(f,n[2]),at:"open"})}}},a.findEnclosingTag=function(a,b,d,e){for(var f=new c(a,b.line,b.ch,d);;){var g=l(f,e);if(!g)break;var h=new c(a,b.line,b.ch,d),i=k(h,g.tag);if(i)return{open:g,close:i}}},a.scanForClosingTag=function(a,b,d,e){return k(new c(a,b.line,b.ch,e?{from:0,to:e}:null),d)}}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/hint/anyword-hint.min.js b/media/vendor/codemirror/addon/hint/anyword-hint.min.js index 375fe7ae71347..9bdb03f806f94 100644 --- a/media/vendor/codemirror/addon/hint/anyword-hint.min.js +++ b/media/vendor/codemirror/addon/hint/anyword-hint.min.js @@ -1 +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";var r=/[\w$]+/;e.registerHelper("hint","anyword",function(t,o){for(var i=o&&o.word||r,n=o&&o.range||500,f=t.getCursor(),s=t.getLine(f.line),c=f.ch,l=c;l&&i.test(s.charAt(l-1));)--l;for(var a=l!=c&&s.slice(l,c),d=o&&o.list||[],u={},p=new RegExp(i.source,"g"),g=-1;g<=1;g+=2)for(var h=f.line,m=Math.min(Math.max(h+g*n,t.firstLine()),t.lastLine())+g;h!=m;h+=g)for(var y,b=t.getLine(h);y=p.exec(b);)h==f.line&&y[0]===a||a&&0!=y[0].lastIndexOf(a,0)||Object.prototype.hasOwnProperty.call(u,y[0])||(u[y[0]]=!0,d.push(y[0]));return{list:d,from:e.Pos(f.line,l),to:e.Pos(f.line,c)}})}),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("hint","anyword",function(r,t){for(var o=t&&t.word||/[\w$]+/,i=t&&t.range||500,n=r.getCursor(),f=r.getLine(n.line),s=n.ch,c=s;c&&o.test(f.charAt(c-1));)--c;for(var l=c!=s&&f.slice(c,s),a=t&&t.list||[],d={},u=new RegExp(o.source,"g"),p=-1;p<=1;p+=2)for(var g=n.line,h=Math.min(Math.max(g+p*i,r.firstLine()),r.lastLine())+p;g!=h;g+=p)for(var m,y=r.getLine(g);m=u.exec(y);)g==n.line&&m[0]===l||l&&0!=m[0].lastIndexOf(l,0)||Object.prototype.hasOwnProperty.call(d,m[0])||(d[m[0]]=!0,a.push(m[0]));return{list:a,from:e.Pos(n.line,c),to:e.Pos(n.line,s)}})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.registerHelper("hint","anyword",function(b,c){for(var d=c&&c.word||/[\w$]+/,e=c&&c.range||500,f=b.getCursor(),g=b.getLine(f.line),h=f.ch,i=h;i&&d.test(g.charAt(i-1));)--i;for(var j=i!=h&&g.slice(i,h),k=c&&c.list||[],l={},m=new RegExp(d.source,"g"),n=-1;n<=1;n+=2)for(var o=f.line,p=Math.min(Math.max(o+n*e,b.firstLine()),b.lastLine())+n;o!=p;o+=n)for(var q,r=b.getLine(o);q=m.exec(r);)o==f.line&&q[0]===j||j&&0!=q[0].lastIndexOf(j,0)||Object.prototype.hasOwnProperty.call(l,q[0])||(l[q[0]]=!0,k.push(q[0]));return{list:k,from:a.Pos(f.line,i),to:a.Pos(f.line,h)}})}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/hint/css-hint.min.js b/media/vendor/codemirror/addon/hint/css-hint.min.js index f76de475c30c0..1158adcc1bcac 100644 --- a/media/vendor/codemirror/addon/hint/css-hint.min.js +++ b/media/vendor/codemirror/addon/hint/css-hint.min.js @@ -1 +1 @@ -!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 r={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(t){function o(e){for(var r in e)c&&0!=r.lastIndexOf(c,0)||l.push(r)}var s=t.getCursor(),i=t.getTokenAt(s),n=e.innerMode(t.getMode(),i.state);if("css"==n.mode.name){if("keyword"==i.type&&0=="!important".indexOf(i.string))return{list:["!important"],from:e.Pos(s.line,i.start),to:e.Pos(s.line,i.end)};var a=i.start,d=s.ch,c=i.string.slice(0,d-a);/[^\w$_-]/.test(c)&&(c="",a=d=s.ch);var f=e.resolveMode("text/css"),l=[],p=n.state.state;return"pseudo"==p||"variable-3"==i.type?o(r):"block"==p||"maybeprop"==p?o(f.propertyKeywords):"prop"==p||"parens"==p||"at"==p||"params"==p?(o(f.valueKeywords),o(f.colorKeywords)):"media"!=p&&"media_parens"!=p||(o(f.mediaTypes),o(f.mediaFeatures)),l.length?{list:l,from:e.Pos(s.line,a),to:e.Pos(s.line,d)}:void 0}})}),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 r={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(t){function o(e){for(var r in e)c&&0!=r.lastIndexOf(c,0)||l.push(r)}var s=t.getCursor(),i=t.getTokenAt(s),n=e.innerMode(t.getMode(),i.state);if("css"==n.mode.name){if("keyword"==i.type&&0=="!important".indexOf(i.string))return{list:["!important"],from:e.Pos(s.line,i.start),to:e.Pos(s.line,i.end)};var a=i.start,d=s.ch,c=i.string.slice(0,d-a);/[^\w$_-]/.test(c)&&(c="",a=d=s.ch);var f=e.resolveMode("text/css"),l=[],p=n.state.state;return"pseudo"==p||"variable-3"==i.type?o(r):"block"==p||"maybeprop"==p?o(f.propertyKeywords):"prop"==p||"parens"==p||"at"==p||"params"==p?(o(f.valueKeywords),o(f.colorKeywords)):"media"!=p&&"media_parens"!=p||(o(f.mediaTypes),o(f.mediaFeatures)),l.length?{list:l,from:e.Pos(s.line,a),to:e.Pos(s.line,d)}:void 0}})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../../mode/css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/css/css"],a):a(CodeMirror)}(function(a){"use strict";var b={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};a.registerHelper("hint","css",function(c){function d(a){for(var b in a)j&&0!=b.lastIndexOf(j,0)||l.push(b)}var e=c.getCursor(),f=c.getTokenAt(e),g=a.innerMode(c.getMode(),f.state);if("css"==g.mode.name){if("keyword"==f.type&&0=="!important".indexOf(f.string))return{list:["!important"],from:a.Pos(e.line,f.start),to:a.Pos(e.line,f.end)};var h=f.start,i=e.ch,j=f.string.slice(0,i-h);/[^\w$_-]/.test(j)&&(j="",h=i=e.ch);var k=a.resolveMode("text/css"),l=[],m=g.state.state;return"pseudo"==m||"variable-3"==f.type?d(b):"block"==m||"maybeprop"==m?d(k.propertyKeywords):"prop"==m||"parens"==m||"at"==m||"params"==m?(d(k.valueKeywords),d(k.colorKeywords)):"media"!=m&&"media_parens"!=m||(d(k.mediaTypes),d(k.mediaFeatures)),l.length?{list:l,from:a.Pos(e.line,h),to:a.Pos(e.line,i)}:void 0}})}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/hint/html-hint.min.js b/media/vendor/codemirror/addon/hint/html-hint.min.js index 631b0e5687f2d..31a7d4ac314c8 100644 --- a/media/vendor/codemirror/addon/hint/html-hint.min.js +++ b/media/vendor/codemirror/addon/hint/html-hint.min.js @@ -1 +1 @@ -!function(l){"object"==typeof exports&&"object"==typeof module?l(require("../../lib/codemirror"),require("./xml-hint")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./xml-hint"],l):l(CodeMirror)}(function(l){"use strict";function t(l){for(var t in c)c.hasOwnProperty(t)&&(l.attrs[t]=c[t])}function e(t,e){var a={schemaInfo:d};if(e)for(var n in e)a[n]=e[n];return l.hint.xml(t,a)}var a="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(" "),n=["_blank","_self","_top","_parent"],r=["ascii","utf-8","utf-16","latin1","latin1"],o=["get","post","put","delete"],s=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],u=["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]"],i={attrs:{}},d={a:{attrs:{href:null,ping:null,type:null,media:u,target:n,hreflang:a}},abbr:i,acronym:i,address:i,applet:i,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:u,hreflang:a,type:null,shape:["default","rect","circle","poly"]}},article:i,aside:i,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:i,base:{attrs:{href:null,target:n}},basefont:i,bdi:i,bdo:i,big:i,blockquote:{attrs:{cite:null}},body:i,br:i,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:s,formmethod:o,formnovalidate:["","novalidate"],formtarget:n,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:i,center:i,cite:i,code:i,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:i,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:i,dir:i,div:i,dl:i,dt:i,em:i,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:i,figure:i,font:i,footer:i,form:{attrs:{action:null,name:null,"accept-charset":r,autocomplete:["on","off"],enctype:s,method:o,novalidate:["","novalidate"],target:n}},frame:i,frameset:i,h1:i,h2:i,h3:i,h4:i,h5:i,h6:i,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:i,hgroup:i,hr:i,html:{attrs:{manifest:null},children:["head","body"]},i:i,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:o,formnovalidate:["","novalidate"],formtarget:n,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:i,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:i,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:a,media:u,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:i,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:r,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:i,noframes:i,noscript:i,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:i,param:{attrs:{name:null,value:null}},pre:i,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:i,rt:i,ruby:i,s:i,samp:i,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:r}},section:i,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:i,source:{attrs:{src:null,type:null,media:null}},span:i,strike:i,strong:i,style:{attrs:{type:["text/css"],media:u,scoped:null}},sub:i,summary:i,sup:i,table:i,tbody:i,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:i,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:i,time:{attrs:{datetime:null}},title:i,tr:i,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:a}},tt:i,u:i,ul:i,var:i,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:i},c={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(i);for(var m in d)d.hasOwnProperty(m)&&d[m]!=i&&t(d[m]);l.htmlSchema=d,l.registerHelper("hint","html",e)}),function(l){"object"==typeof exports&&"object"==typeof module?l(require("../../lib/codemirror"),require("./xml-hint")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./xml-hint"],l):l(CodeMirror)}(function(l){"use strict";function t(l){for(var t in c)c.hasOwnProperty(t)&&(l.attrs[t]=c[t])}function e(t,e){var a={schemaInfo:d};if(e)for(var n in e)a[n]=e[n];return l.hint.xml(t,a)}var a="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(" "),n=["_blank","_self","_top","_parent"],r=["ascii","utf-8","utf-16","latin1","latin1"],o=["get","post","put","delete"],s=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],u=["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]"],i={attrs:{}},d={a:{attrs:{href:null,ping:null,type:null,media:u,target:n,hreflang:a}},abbr:i,acronym:i,address:i,applet:i,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:u,hreflang:a,type:null,shape:["default","rect","circle","poly"]}},article:i,aside:i,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:i,base:{attrs:{href:null,target:n}},basefont:i,bdi:i,bdo:i,big:i,blockquote:{attrs:{cite:null}},body:i,br:i,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:s,formmethod:o,formnovalidate:["","novalidate"],formtarget:n,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:i,center:i,cite:i,code:i,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:i,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:i,dir:i,div:i,dl:i,dt:i,em:i,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:i,figure:i,font:i,footer:i,form:{attrs:{action:null,name:null,"accept-charset":r,autocomplete:["on","off"],enctype:s,method:o,novalidate:["","novalidate"],target:n}},frame:i,frameset:i,h1:i,h2:i,h3:i,h4:i,h5:i,h6:i,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:i,hgroup:i,hr:i,html:{attrs:{manifest:null},children:["head","body"]},i:i,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:o,formnovalidate:["","novalidate"],formtarget:n,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:i,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:i,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:a,media:u,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:i,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:r,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:i,noframes:i,noscript:i,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:i,param:{attrs:{name:null,value:null}},pre:i,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:i,rt:i,ruby:i,s:i,samp:i,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:r}},section:i,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:i,source:{attrs:{src:null,type:null,media:null}},span:i,strike:i,strong:i,style:{attrs:{type:["text/css"],media:u,scoped:null}},sub:i,summary:i,sup:i,table:i,tbody:i,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:i,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:i,time:{attrs:{datetime:null}},title:i,tr:i,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:a}},tt:i,u:i,ul:i,var:i,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:i},c={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(i);for(var m in d)d.hasOwnProperty(m)&&d[m]!=i&&t(d[m]);l.htmlSchema=d,l.registerHelper("hint","html",e)}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("./xml-hint")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./xml-hint"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b in l)l.hasOwnProperty(b)&&(a.attrs[b]=l[b])}function c(b,c){var d={schemaInfo:k};if(c)for(var e in c)d[e]=c[e];return a.hint.xml(b,d)}var d="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(" "),e=["_blank","_self","_top","_parent"],f=["ascii","utf-8","utf-16","latin1","latin1"],g=["get","post","put","delete"],h=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],i=["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]"],j={attrs:{}},k={a:{attrs:{href:null,ping:null,type:null,media:i,target:e,hreflang:d}},abbr:j,acronym:j,address:j,applet:j,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:i,hreflang:d,type:null,shape:["default","rect","circle","poly"]}},article:j,aside:j,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:j,base:{attrs:{href:null,target:e}},basefont:j,bdi:j,bdo:j,big:j,blockquote:{attrs:{cite:null}},body:j,br:j,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:h,formmethod:g,formnovalidate:["","novalidate"],formtarget:e,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:j,center:j,cite:j,code:j,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:j,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:j,dir:j,div:j,dl:j,dt:j,em:j,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:j,figure:j,font:j,footer:j,form:{attrs:{action:null,name:null,"accept-charset":f,autocomplete:["on","off"],enctype:h,method:g,novalidate:["","novalidate"],target:e}},frame:j,frameset:j,h1:j,h2:j,h3:j,h4:j,h5:j,h6:j,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:j,hgroup:j,hr:j,html:{attrs:{manifest:null},children:["head","body"]},i:j,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:h,formmethod:g,formnovalidate:["","novalidate"],formtarget:e,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:j,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:j,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:d,media:i,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:j,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:f,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:j,noframes:j,noscript:j,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:j,param:{attrs:{name:null,value:null}},pre:j,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:j,rt:j,ruby:j,s:j,samp:j,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:f}},section:j,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:j,source:{attrs:{src:null,type:null,media:null}},span:j,strike:j,strong:j,style:{attrs:{type:["text/css"],media:i,scoped:null}},sub:j,summary:j,sup:j,table:j,tbody:j,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:j,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:j,time:{attrs:{datetime:null}},title:j,tr:j,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:d}},tt:j,u:j,ul:j,var:j,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:j},l={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"]};b(j);for(var m in k)k.hasOwnProperty(m)&&k[m]!=j&&b(k[m]);a.htmlSchema=k,a.registerHelper("hint","html",c)}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/hint/javascript-hint.min.js b/media/vendor/codemirror/addon/hint/javascript-hint.min.js index 080fe63a328b8..166325fbbdedc 100644 --- a/media/vendor/codemirror/addon/hint/javascript-hint.min.js +++ b/media/vendor/codemirror/addon/hint/javascript-hint.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){function e(t,e){for(var r=0,n=t.length;ro.ch&&(s.end=o.ch,s.string=s.string.slice(0,o.ch-s.start)):s={start:o.ch,end:o.ch,string:"",state:s.state,type:"."==s.string?"property":null};for(var a=s;"property"==a.type;){if("."!=(a=n(e,l(o.line,a.start))).string)return;if(a=n(e,l(o.line,a.start)),!c)var c=[];c.push(a)}return{list:f(s,c,r,i),from:l(o.line,s.start),to:l(o.line,s.end)}}}function i(t,e){return n(t,g,function(t,e){return t.getTokenAt(e)},e)}function o(t,e){var r=t.getTokenAt(e);return e.ch==r.start+1&&"."==r.string.charAt(0)?(r.end=r.start,r.string=".",r.type="property"):/^\.[\w$_]*$/.test(r.string)&&(r.type="property",r.start++,r.string=r.string.replace(/\./,"")),r}function s(t,e){return n(t,d,o,e)}function a(t,e){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var r=t;r;r=Object.getPrototypeOf(r))Object.getOwnPropertyNames(r).forEach(e);else for(var n in t)e(n)}function f(t,n,i,o){function s(t){0!=t.lastIndexOf(g,0)||r(l,t)||l.push(t)}function f(t){"string"==typeof t?e(c,s):t instanceof Array?e(p,s):t instanceof Function&&e(u,s),a(t,s)}var l=[],g=t.string,d=o&&o.globalScope||window;if(n&&n.length){var y,h=n.pop();for(h.type&&0===h.type.indexOf("variable")?(o&&o.additionalContext&&(y=o.additionalContext[h.string]),o&&!1===o.useGlobalScope||(y=y||d[h.string])):"string"==h.type?y="":"atom"==h.type?y=1:"function"==h.type&&(null==d.jQuery||"$"!=h.string&&"jQuery"!=h.string||"function"!=typeof d.jQuery?null!=d._&&"_"==h.string&&"function"==typeof d._&&(y=d._()):y=d.jQuery());null!=y&&n.length;)y=y[n.pop().string];null!=y&&f(y)}else{for(b=t.state.localVars;b;b=b.next)s(b.name);for(var b=t.state.globalVars;b;b=b.next)s(b.name);o&&!1===o.useGlobalScope||f(d),e(i,s)}return l}var l=t.Pos;t.registerHelper("hint","javascript",i),t.registerHelper("hint","coffeescript",s);var c="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),p="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),u="prototype apply call bind".split(" "),g="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(" "),d="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(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){function e(t,e){for(var r=0,n=t.length;ro.ch&&(s.end=o.ch,s.string=s.string.slice(0,o.ch-s.start)):s={start:o.ch,end:o.ch,string:"",state:s.state,type:"."==s.string?"property":null};for(var a=s;"property"==a.type;){if("."!=(a=n(e,l(o.line,a.start))).string)return;if(a=n(e,l(o.line,a.start)),!c)var c=[];c.push(a)}return{list:f(s,c,r,i),from:l(o.line,s.start),to:l(o.line,s.end)}}}function i(t,e){return n(t,g,function(t,e){return t.getTokenAt(e)},e)}function o(t,e){var r=t.getTokenAt(e);return e.ch==r.start+1&&"."==r.string.charAt(0)?(r.end=r.start,r.string=".",r.type="property"):/^\.[\w$_]*$/.test(r.string)&&(r.type="property",r.start++,r.string=r.string.replace(/\./,"")),r}function s(t,e){return n(t,d,o,e)}function a(t,e){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var r=t;r;r=Object.getPrototypeOf(r))Object.getOwnPropertyNames(r).forEach(e);else for(var n in t)e(n)}function f(t,n,i,o){function s(t){0!=t.lastIndexOf(g,0)||r(l,t)||l.push(t)}function f(t){"string"==typeof t?e(c,s):t instanceof Array?e(p,s):t instanceof Function&&e(u,s),a(t,s)}var l=[],g=t.string,d=o&&o.globalScope||window;if(n&&n.length){var y,h=n.pop();for(h.type&&0===h.type.indexOf("variable")?(o&&o.additionalContext&&(y=o.additionalContext[h.string]),o&&!1===o.useGlobalScope||(y=y||d[h.string])):"string"==h.type?y="":"atom"==h.type?y=1:"function"==h.type&&(null==d.jQuery||"$"!=h.string&&"jQuery"!=h.string||"function"!=typeof d.jQuery?null!=d._&&"_"==h.string&&"function"==typeof d._&&(y=d._()):y=d.jQuery());null!=y&&n.length;)y=y[n.pop().string];null!=y&&f(y)}else{for(b=t.state.localVars;b;b=b.next)s(b.name);for(var b=t.state.globalVars;b;b=b.next)s(b.name);o&&!1===o.useGlobalScope||f(d),e(i,s)}return l}var l=t.Pos;t.registerHelper("hint","javascript",i),t.registerHelper("hint","coffeescript",s);var c="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),p="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),u="prototype apply call bind".split(" "),g="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(" "),d="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(" ")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b){for(var c=0,d=a.length;cf.ch&&(g.end=f.ch,g.string=g.string.slice(0,f.ch-g.start)):g={start:f.ch,end:f.ch,string:"",state:g.state,type:"."==g.string?"property":null};for(var h=g;"property"==h.type;){if(h=d(b,j(f.line,h.start)),"."!=h.string)return;if(h=d(b,j(f.line,h.start)),!k)var k=[];k.push(h)}return{list:i(g,k,c,e),from:j(f.line,g.start),to:j(f.line,g.end)}}}function e(a,b){return d(a,n,function(a,b){return a.getTokenAt(b)},b)}function f(a,b){var c=a.getTokenAt(b);return b.ch==c.start+1&&"."==c.string.charAt(0)?(c.end=c.start,c.string=".",c.type="property"):/^\.[\w$_]*$/.test(c.string)&&(c.type="property",c.start++,c.string=c.string.replace(/\./,"")),c}function g(a,b){return d(a,o,f,b)}function h(a,b){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var c=a;c;c=Object.getPrototypeOf(c))Object.getOwnPropertyNames(c).forEach(b);else for(var d in a)b(d)}function i(a,d,e,f){function g(a){0!=a.lastIndexOf(n,0)||c(j,a)||j.push(a)}function i(a){"string"==typeof a?b(k,g):a instanceof Array?b(l,g):a instanceof Function&&b(m,g),h(a,g)}var j=[],n=a.string,o=f&&f.globalScope||window;if(d&&d.length){var p,q=d.pop();for(q.type&&0===q.type.indexOf("variable")?(f&&f.additionalContext&&(p=f.additionalContext[q.string]),f&&f.useGlobalScope===!1||(p=p||o[q.string])):"string"==q.type?p="":"atom"==q.type?p=1:"function"==q.type&&(null==o.jQuery||"$"!=q.string&&"jQuery"!=q.string||"function"!=typeof o.jQuery?null!=o._&&"_"==q.string&&"function"==typeof o._&&(p=o._()):p=o.jQuery());null!=p&&d.length;)p=p[d.pop().string];null!=p&&i(p)}else{for(var r=a.state.localVars;r;r=r.next)g(r.name);for(var r=a.state.globalVars;r;r=r.next)g(r.name);f&&f.useGlobalScope===!1||i(o),b(e,g)}return j}var j=a.Pos;a.registerHelper("hint","javascript",e),a.registerHelper("hint","coffeescript",g);var k="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),l="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),m="prototype apply call bind".split(" "),n="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(" "),o="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(" ")}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/hint/show-hint.min.js b/media/vendor/codemirror/addon/hint/show-hint.min.js index 3764d025aeef4..7fe1cd8cc6d8c 100644 --- a/media/vendor/codemirror/addon/hint/show-hint.min.js +++ b/media/vendor/codemirror/addon/hint/show-hint.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";function i(t,i){this.cm=t,this.options=i,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 e=this;t.on("cursorActivity",this.activityFunc=function(){e.cursorActivity()})}function e(i,e){return t.cmpPos(e.from,i.from)>0&&i.to.ch-i.from.ch!=e.to.ch-e.from.ch}function n(t,i,e){var n=t.options.hintOptions,o={};for(var s in m)o[s]=m[s];if(n)for(var s in n)void 0!==n[s]&&(o[s]=n[s]);if(e)for(var s in e)void 0!==e[s]&&(o[s]=e[s]);return o.hint.resolve&&(o.hint=o.hint.resolve(t,i)),o}function o(t){return"string"==typeof t?t:t.text}function s(t,i){function e(t,e){var o;o="string"!=typeof e?function(t){return e(t,i)}:n.hasOwnProperty(e)?n[e]:e,s[t]=o}var n={Up:function(){i.moveFocus(-1)},Down:function(){i.moveFocus(1)},PageUp:function(){i.moveFocus(1-i.menuSize(),!0)},PageDown:function(){i.moveFocus(i.menuSize()-1,!0)},Home:function(){i.setFocus(0)},End:function(){i.setFocus(i.length-1)},Enter:i.pick,Tab:i.pick,Esc:i.close},o=t.options.customKeys,s=o?{}:n;if(o)for(var c in o)o.hasOwnProperty(c)&&e(c,o[c]);var r=t.options.extraKeys;if(r)for(var c in r)r.hasOwnProperty(c)&&e(c,r[c]);return s}function c(t,i){for(;i&&i!=t;){if("LI"===i.nodeName.toUpperCase()&&i.parentNode==t)return i;i=i.parentNode}}function r(i,e){this.completion=i,this.data=e,this.picked=!1;var n=this,r=i.cm,h=this.hints=document.createElement("ul");h.className="CodeMirror-hints",this.selectedHint=e.selectedHint||0;for(var l=e.list,a=0;ah.clientHeight+1,A=r.getScrollInfo();if(b>0){var S=C.bottom-C.top;if(g.top-(g.bottom-C.top)-S>0)h.style.top=(y=g.top-S)+"px",w=!1;else if(S>k){h.style.height=k-5+"px",h.style.top=(y=g.bottom-C.top)+"px";var T=r.getCursor();e.from.ch!=T.ch&&(g=r.cursorCoords(T),h.style.left=(v=g.left)+"px",C=h.getBoundingClientRect())}}var M=C.right-H;if(M>0&&(C.right-C.left>H&&(h.style.width=H-5+"px",M-=C.right-C.left-H),h.style.left=(v=g.left-M)+"px"),x)for(var F=h.firstChild;F;F=F.nextSibling)F.style.paddingRight=r.display.nativeBarWidth+"px";if(r.addKeyMap(this.keyMap=s(i,{moveFocus:function(t,i){n.changeActive(n.selectedHint+t,i)},setFocus:function(t){n.changeActive(t)},menuSize:function(){return n.screenAmount()},length:l.length,close:function(){i.close()},pick:function(){n.pick()},data:e})),i.options.closeOnUnfocus){var N;r.on("blur",this.onBlur=function(){N=setTimeout(function(){i.close()},100)}),r.on("focus",this.onFocus=function(){clearTimeout(N)})}return r.on("scroll",this.onScroll=function(){var t=r.getScrollInfo(),e=r.getWrapperElement().getBoundingClientRect(),n=y+A.top-t.top,o=n-(window.pageYOffset||(document.documentElement||document.body).scrollTop);if(w||(o+=h.offsetHeight),o<=e.top||o>=e.bottom)return i.close();h.style.top=n+"px",h.style.left=v+A.left-t.left+"px"}),t.on(h,"dblclick",function(t){var i=c(h,t.target||t.srcElement);i&&null!=i.hintId&&(n.changeActive(i.hintId),n.pick())}),t.on(h,"click",function(t){var e=c(h,t.target||t.srcElement);e&&null!=e.hintId&&(n.changeActive(e.hintId),i.options.completeOnSingleClick&&n.pick())}),t.on(h,"mousedown",function(){setTimeout(function(){r.focus()},20)}),t.signal(e,"select",l[0],h.firstChild),!0}function h(t,i){if(!t.somethingSelected())return i;for(var e=[],n=0;n0?i(t):n(o+1)})}var s=h(t,o);n(0)};return s.async=!0,s.supportsSelection=!0,s}return(n=i.getHelper(i.getCursor(),"hintWords"))?function(i){return t.hint.fromList(i,{words:n})}:t.hint.anyword?function(i,e){return t.hint.anyword(i,e)}:function(){}}var u="CodeMirror-hint",f="CodeMirror-hint-active";t.showHint=function(t,i,e){if(!i)return t.showHint(e);e&&e.async&&(i.async=!0);var n={hint:i};if(e)for(var o in e)n[o]=e[o];return t.showHint(n)},t.defineExtension("showHint",function(e){e=n(this,this.getCursor("start"),e);var o=this.listSelections();if(!(o.length>1)){if(this.somethingSelected()){if(!e.hint.supportsSelection)return;for(var s=0;s=this.data.list.length?i=e?this.data.list.length-1:0:i<0&&(i=e?0:this.data.list.length-1),this.selectedHint!=i){var n=this.hints.childNodes[this.selectedHint];n.className=n.className.replace(" "+f,""),(n=this.hints.childNodes[this.selectedHint=i]).className+=" "+f,n.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+3),t.signal(this.data,"select",this.data.list[this.selectedHint],n)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},t.registerHelper("hint","auto",{resolve:a}),t.registerHelper("hint","fromList",function(i,e){var n=i.getCursor(),o=i.getTokenAt(n),s=t.Pos(n.line,o.end);if(o.string&&/\w/.test(o.string[o.string.length-1]))var c=o.string,r=t.Pos(n.line,o.start);else var c="",r=s;for(var h=[],l=0;l,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};t.defineOption("hintOptions",null)}),function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";function i(t,i){this.cm=t,this.options=i,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 e=this;t.on("cursorActivity",this.activityFunc=function(){e.cursorActivity()})}function e(i,e){return t.cmpPos(e.from,i.from)>0&&i.to.ch-i.from.ch!=e.to.ch-e.from.ch}function n(t,i,e){var n=t.options.hintOptions,o={};for(var s in m)o[s]=m[s];if(n)for(var s in n)void 0!==n[s]&&(o[s]=n[s]);if(e)for(var s in e)void 0!==e[s]&&(o[s]=e[s]);return o.hint.resolve&&(o.hint=o.hint.resolve(t,i)),o}function o(t){return"string"==typeof t?t:t.text}function s(t,i){function e(t,e){var o;o="string"!=typeof e?function(t){return e(t,i)}:n.hasOwnProperty(e)?n[e]:e,s[t]=o}var n={Up:function(){i.moveFocus(-1)},Down:function(){i.moveFocus(1)},PageUp:function(){i.moveFocus(1-i.menuSize(),!0)},PageDown:function(){i.moveFocus(i.menuSize()-1,!0)},Home:function(){i.setFocus(0)},End:function(){i.setFocus(i.length-1)},Enter:i.pick,Tab:i.pick,Esc:i.close},o=t.options.customKeys,s=o?{}:n;if(o)for(var c in o)o.hasOwnProperty(c)&&e(c,o[c]);var r=t.options.extraKeys;if(r)for(var c in r)r.hasOwnProperty(c)&&e(c,r[c]);return s}function c(t,i){for(;i&&i!=t;){if("LI"===i.nodeName.toUpperCase()&&i.parentNode==t)return i;i=i.parentNode}}function r(i,e){this.completion=i,this.data=e,this.picked=!1;var n=this,r=i.cm,h=this.hints=document.createElement("ul");h.className="CodeMirror-hints",this.selectedHint=e.selectedHint||0;for(var l=e.list,a=0;ah.clientHeight+1,A=r.getScrollInfo();if(b>0){var S=C.bottom-C.top;if(g.top-(g.bottom-C.top)-S>0)h.style.top=(y=g.top-S)+"px",w=!1;else if(S>k){h.style.height=k-5+"px",h.style.top=(y=g.bottom-C.top)+"px";var T=r.getCursor();e.from.ch!=T.ch&&(g=r.cursorCoords(T),h.style.left=(v=g.left)+"px",C=h.getBoundingClientRect())}}var M=C.right-H;if(M>0&&(C.right-C.left>H&&(h.style.width=H-5+"px",M-=C.right-C.left-H),h.style.left=(v=g.left-M)+"px"),x)for(var F=h.firstChild;F;F=F.nextSibling)F.style.paddingRight=r.display.nativeBarWidth+"px";if(r.addKeyMap(this.keyMap=s(i,{moveFocus:function(t,i){n.changeActive(n.selectedHint+t,i)},setFocus:function(t){n.changeActive(t)},menuSize:function(){return n.screenAmount()},length:l.length,close:function(){i.close()},pick:function(){n.pick()},data:e})),i.options.closeOnUnfocus){var N;r.on("blur",this.onBlur=function(){N=setTimeout(function(){i.close()},100)}),r.on("focus",this.onFocus=function(){clearTimeout(N)})}return r.on("scroll",this.onScroll=function(){var t=r.getScrollInfo(),e=r.getWrapperElement().getBoundingClientRect(),n=y+A.top-t.top,o=n-(window.pageYOffset||(document.documentElement||document.body).scrollTop);if(w||(o+=h.offsetHeight),o<=e.top||o>=e.bottom)return i.close();h.style.top=n+"px",h.style.left=v+A.left-t.left+"px"}),t.on(h,"dblclick",function(t){var i=c(h,t.target||t.srcElement);i&&null!=i.hintId&&(n.changeActive(i.hintId),n.pick())}),t.on(h,"click",function(t){var e=c(h,t.target||t.srcElement);e&&null!=e.hintId&&(n.changeActive(e.hintId),i.options.completeOnSingleClick&&n.pick())}),t.on(h,"mousedown",function(){setTimeout(function(){r.focus()},20)}),t.signal(e,"select",l[0],h.firstChild),!0}function h(t,i){if(!t.somethingSelected())return i;for(var e=[],n=0;n0?i(t):n(o+1)})}var s=h(t,o);n(0)};return s.async=!0,s.supportsSelection=!0,s}return(n=i.getHelper(i.getCursor(),"hintWords"))?function(i){return t.hint.fromList(i,{words:n})}:t.hint.anyword?function(i,e){return t.hint.anyword(i,e)}:function(){}}var u="CodeMirror-hint",f="CodeMirror-hint-active";t.showHint=function(t,i,e){if(!i)return t.showHint(e);e&&e.async&&(i.async=!0);var n={hint:i};if(e)for(var o in e)n[o]=e[o];return t.showHint(n)},t.defineExtension("showHint",function(e){e=n(this,this.getCursor("start"),e);var o=this.listSelections();if(!(o.length>1)){if(this.somethingSelected()){if(!e.hint.supportsSelection)return;for(var s=0;s=this.data.list.length?i=e?this.data.list.length-1:0:i<0&&(i=e?0:this.data.list.length-1),this.selectedHint!=i){var n=this.hints.childNodes[this.selectedHint];n.className=n.className.replace(" "+f,""),(n=this.hints.childNodes[this.selectedHint=i]).className+=" "+f,n.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+3),t.signal(this.data,"select",this.data.list[this.selectedHint],n)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},t.registerHelper("hint","auto",{resolve:a}),t.registerHelper("hint","fromList",function(i,e){var n=i.getCursor(),o=i.getTokenAt(n),s=t.Pos(n.line,o.end);if(o.string&&/\w/.test(o.string[o.string.length-1]))var c=o.string,r=t.Pos(n.line,o.start);else var c="",r=s;for(var h=[],l=0;l,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};t.defineOption("hintOptions",null)}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){this.cm=a,this.options=b,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 c=this;a.on("cursorActivity",this.activityFunc=function(){c.cursorActivity()})}function c(b,c){return a.cmpPos(c.from,b.from)>0&&b.to.ch-b.from.ch!=c.to.ch-c.from.ch}function d(a,b,c){var d=a.options.hintOptions,e={};for(var f in p)e[f]=p[f];if(d)for(var f in d)void 0!==d[f]&&(e[f]=d[f]);if(c)for(var f in c)void 0!==c[f]&&(e[f]=c[f]);return e.hint.resolve&&(e.hint=e.hint.resolve(a,b)),e}function e(a){return"string"==typeof a?a:a.text}function f(a,b){function c(a,c){var e;e="string"!=typeof c?function(a){return c(a,b)}:d.hasOwnProperty(c)?d[c]:c,f[a]=e}var d={Up:function(){b.moveFocus(-1)},Down:function(){b.moveFocus(1)},PageUp:function(){b.moveFocus(1-b.menuSize(),!0)},PageDown:function(){b.moveFocus(b.menuSize()-1,!0)},Home:function(){b.setFocus(0)},End:function(){b.setFocus(b.length-1)},Enter:b.pick,Tab:b.pick,Esc:b.close},e=a.options.customKeys,f=e?{}:d;if(e)for(var g in e)e.hasOwnProperty(g)&&c(g,e[g]);var h=a.options.extraKeys;if(h)for(var g in h)h.hasOwnProperty(g)&&c(g,h[g]);return f}function g(a,b){for(;b&&b!=a;){if("LI"===b.nodeName.toUpperCase()&&b.parentNode==a)return b;b=b.parentNode}}function h(b,c){this.completion=b,this.data=c,this.picked=!1;var d=this,h=b.cm,i=this.hints=document.createElement("ul");i.className="CodeMirror-hints",this.selectedHint=c.selectedHint||0;for(var j=c.list,k=0;ki.clientHeight+1,z=h.getScrollInfo();if(x>0){var A=w.bottom-w.top;if(q.top-(q.bottom-w.top)-A>0)i.style.top=(s=q.top-A)+"px",t=!1;else if(A>v){i.style.height=v-5+"px",i.style.top=(s=q.bottom-w.top)+"px";var B=h.getCursor();c.from.ch!=B.ch&&(q=h.cursorCoords(B),i.style.left=(r=q.left)+"px",w=i.getBoundingClientRect())}}var C=w.right-u;if(C>0&&(w.right-w.left>u&&(i.style.width=u-5+"px",C-=w.right-w.left-u),i.style.left=(r=q.left-C)+"px"),y)for(var D=i.firstChild;D;D=D.nextSibling)D.style.paddingRight=h.display.nativeBarWidth+"px";if(h.addKeyMap(this.keyMap=f(b,{moveFocus:function(a,b){d.changeActive(d.selectedHint+a,b)},setFocus:function(a){d.changeActive(a)},menuSize:function(){return d.screenAmount()},length:j.length,close:function(){b.close()},pick:function(){d.pick()},data:c})),b.options.closeOnUnfocus){var E;h.on("blur",this.onBlur=function(){E=setTimeout(function(){b.close()},100)}),h.on("focus",this.onFocus=function(){clearTimeout(E)})}return h.on("scroll",this.onScroll=function(){var a=h.getScrollInfo(),c=h.getWrapperElement().getBoundingClientRect(),d=s+z.top-a.top,e=d-(window.pageYOffset||(document.documentElement||document.body).scrollTop);if(t||(e+=i.offsetHeight),e<=c.top||e>=c.bottom)return b.close();i.style.top=d+"px",i.style.left=r+z.left-a.left+"px"}),a.on(i,"dblclick",function(a){var b=g(i,a.target||a.srcElement);b&&null!=b.hintId&&(d.changeActive(b.hintId),d.pick())}),a.on(i,"click",function(a){var c=g(i,a.target||a.srcElement);c&&null!=c.hintId&&(d.changeActive(c.hintId),b.options.completeOnSingleClick&&d.pick())}),a.on(i,"mousedown",function(){setTimeout(function(){h.focus()},20)}),a.signal(c,"select",j[0],i.firstChild),!0}function i(a,b){if(!a.somethingSelected())return b;for(var c=[],d=0;d0?b(a):d(e+1)})}var f=i(a,e);d(0)};return f.async=!0,f.supportsSelection=!0,f}return(d=b.getHelper(b.getCursor(),"hintWords"))?function(b){return a.hint.fromList(b,{words:d})}:a.hint.anyword?function(b,c){return a.hint.anyword(b,c)}:function(){}}var l="CodeMirror-hint",m="CodeMirror-hint-active";a.showHint=function(a,b,c){if(!b)return a.showHint(c);c&&c.async&&(b.async=!0);var d={hint:b};if(c)for(var e in c)d[e]=c[e];return a.showHint(d)},a.defineExtension("showHint",function(c){c=d(this,this.getCursor("start"),c);var e=this.listSelections();if(!(e.length>1)){if(this.somethingSelected()){if(!c.hint.supportsSelection)return;for(var f=0;f=this.data.list.length?b=c?this.data.list.length-1:0:b<0&&(b=c?0:this.data.list.length-1),this.selectedHint!=b){var d=this.hints.childNodes[this.selectedHint];d.className=d.className.replace(" "+m,""),d=this.hints.childNodes[this.selectedHint=b],d.className+=" "+m,d.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=d.offsetTop+d.offsetHeight-this.hints.clientHeight+3),a.signal(this.data,"select",this.data.list[this.selectedHint],d)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},a.registerHelper("hint","auto",{resolve:k}),a.registerHelper("hint","fromList",function(b,c){var d=b.getCursor(),e=b.getTokenAt(d),f=a.Pos(d.line,e.end);if(e.string&&/\w/.test(e.string[e.string.length-1]))var g=e.string,h=a.Pos(d.line,e.start);else var g="",h=f;for(var i=[],j=0;j,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};a.defineOption("hintOptions",null)}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/hint/sql-hint.js b/media/vendor/codemirror/addon/hint/sql-hint.js index e95b6bb4e9ff2..f5ec2cac1fb04 100644 --- a/media/vendor/codemirror/addon/hint/sql-hint.js +++ b/media/vendor/codemirror/addon/hint/sql-hint.js @@ -185,12 +185,9 @@ } function eachWord(lineText, f) { - if (!lineText) return; - var excepted = /[,;]/g; - var words = lineText.split(" "); - for (var i = 0; i < words.length; i++) { - f(words[i]?words[i].replace(excepted, '') : ''); - } + var words = lineText.split(/\s+/) + for (var i = 0; i < words.length; i++) + if (words[i]) f(words[i].replace(/[,;]/g, '')) } function findTableByAlias(alias, editor) { diff --git a/media/vendor/codemirror/addon/hint/sql-hint.min.js b/media/vendor/codemirror/addon/hint/sql-hint.min.js index 0a23e42236687..5a8f5b87641ca 100644 --- a/media/vendor/codemirror/addon/hint/sql-hint.min.js +++ b/media/vendor/codemirror/addon/hint/sql-hint.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../../mode/sql/sql")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/sql/sql"],t):t(CodeMirror)}(function(t){"use strict";function e(t){return"[object Array]"==Object.prototype.toString.call(t)}function r(e){var r=e.doc.modeOption;return"sql"===r&&(r="text/x-sql"),t.resolveMode(r).keywords}function n(e){var r=e.doc.modeOption;return"sql"===r&&(r="text/x-sql"),t.resolveMode(r).identifierQuote||"`"}function o(t){return"string"==typeof t?t:t.text}function i(t,r){return e(r)&&(r={columns:r}),r.text||(r.text=t),r}function s(t){var r={};if(e(t))for(var n=t.length-1;n>=0;n--){var s=t[n];r[o(s).toUpperCase()]=i(o(s),s)}else if(t)for(var a in t)r[a.toUpperCase()]=i(a,t[a]);return r}function a(t){return h[t.toUpperCase()]}function u(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function l(t,e){var r=t.length,n=o(e).substr(0,r);return t.toUpperCase()===n.toUpperCase()}function f(t,r,n,o){if(e(n))for(var i=0;i0)&&q(p,u[g])<=0){l={start:c,end:u[g]};break}c=u[g]}for(var v=r.getRange(l.start,l.end,!1),g=0;gp.ch&&(A.end=p.ch,A.string=A.string.slice(0,p.ch-A.start)),A.string.match(/^[.`"\w@]\w*$/)?(c=A.string,u=A.start,l=A.end):(u=l=p.ch,c=""),"."==c.charAt(0)||c.charAt(0)==y?u=g(p,A,d,t):(f(d,c,h,function(t){return t}),f(d,c,x,function(t){return t}),i||f(d,c,m,function(t){return t.toUpperCase()})),{list:d,from:b(p.line,u),to:b(p.line,l)}})}),function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../../mode/sql/sql")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/sql/sql"],t):t(CodeMirror)}(function(t){"use strict";function e(t){return"[object Array]"==Object.prototype.toString.call(t)}function r(e){var r=e.doc.modeOption;return"sql"===r&&(r="text/x-sql"),t.resolveMode(r).keywords}function n(e){var r=e.doc.modeOption;return"sql"===r&&(r="text/x-sql"),t.resolveMode(r).identifierQuote||"`"}function o(t){return"string"==typeof t?t:t.text}function i(t,r){return e(r)&&(r={columns:r}),r.text||(r.text=t),r}function s(t){var r={};if(e(t))for(var n=t.length-1;n>=0;n--){var s=t[n];r[o(s).toUpperCase()]=i(o(s),s)}else if(t)for(var a in t)r[a.toUpperCase()]=i(a,t[a]);return r}function a(t){return h[t.toUpperCase()]}function u(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function l(t,e){var r=t.length,n=o(e).substr(0,r);return t.toUpperCase()===n.toUpperCase()}function f(t,r,n,o){if(e(n))for(var i=0;i0)&&q(p,u[g])<=0){l={start:c,end:u[g]};break}c=u[g]}for(var v=r.getRange(l.start,l.end,!1),g=0;gp.ch&&(A.end=p.ch,A.string=A.string.slice(0,p.ch-A.start)),A.string.match(/^[.`"\w@]\w*$/)?(c=A.string,u=A.start,l=A.end):(u=l=p.ch,c=""),"."==c.charAt(0)||c.charAt(0)==y?u=g(p,A,d,t):(f(d,c,h,function(t){return t}),f(d,c,x,function(t){return t}),i||f(d,c,m,function(t){return t.toUpperCase()})),{list:d,from:b(p.line,u),to:b(p.line,l)}})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../../mode/sql/sql")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/sql/sql"],a):a(CodeMirror)}(function(a){"use strict";function b(a){return"[object Array]"==Object.prototype.toString.call(a)}function c(b){var c=b.doc.modeOption;return"sql"===c&&(c="text/x-sql"),a.resolveMode(c).keywords}function d(b){var c=b.doc.modeOption;return"sql"===c&&(c="text/x-sql"),a.resolveMode(c).identifierQuote||"`"}function e(a){return"string"==typeof a?a:a.text}function f(a,c){return b(c)&&(c={columns:c}),c.text||(c.text=a),c}function g(a){var c={};if(b(a))for(var d=a.length-1;d>=0;d--){var g=a[d];c[e(g).toUpperCase()]=f(e(g),g)}else if(a)for(var h in a)c[h.toUpperCase()]=f(h,a[h]);return c}function h(a){return q[a.toUpperCase()]}function i(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function j(a,b){var c=a.length,d=e(b).substr(0,c);return a.toUpperCase()===d.toUpperCase()}function k(a,c,d,e){if(b(d))for(var f=0;f0)&&w(m,i[n])<=0){j={start:l,end:i[n]};break}l=i[n]}for(var p=c.getRange(j.start,j.end,!1),n=0;nm.ch&&(u.end=m.ch,u.string=u.string.slice(0,m.ch-u.start)),u.string.match(/^[.`"\w@]\w*$/)?(l=u.string,i=u.start,j=u.end):(i=j=m.ch,l=""),"."==l.charAt(0)||l.charAt(0)==t?i=n(m,u,o,a):(k(o,l,q,function(a){return a}),k(o,l,r,function(a){return a}),f||k(o,l,s,function(a){return a.toUpperCase()})),{list:o,from:v(m.line,i),to:v(m.line,j)}})}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/hint/xml-hint.min.js b/media/vendor/codemirror/addon/hint/xml-hint.min.js index b87473ba8b0c1..3ea0a6efcaba4 100644 --- a/media/vendor/codemirror/addon/hint/xml-hint.min.js +++ b/media/vendor/codemirror/addon/hint/xml-hint.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";function e(e,s){var n=s&&s.schemaInfo,a=s&&s.quoteChar||'"';if(n){var i=e.getCursor(),o=e.getTokenAt(i);o.end>i.ch&&(o.end=i.ch,o.string=o.string.slice(0,i.ch-o.start));var l=t.innerMode(e.getMode(),o.state);if("xml"==l.mode.name){var f,g,c=[],h=!1,p=/\btag\b/.test(o.type)&&!/>$/.test(o.string),u=p&&/^\w/.test(o.string);if(u){var d=e.getLine(i.line).slice(Math.max(0,o.start-2),o.start),m=/<\/$/.test(d)?"close":/<$/.test(d)?"open":null;m&&(g=o.start-("close"==m?2:1))}else p&&"<"==o.string?m="open":p&&"")}else{var b=(y=n[l.state.tagName])&&y.attrs,w=n["!attrs"];if(!b&&!w)return;if(b){if(w){var I={};for(var P in w)w.hasOwnProperty(P)&&(I[P]=w[P]);for(var P in b)b.hasOwnProperty(P)&&(I[P]=b[P]);b=I}}else b=w;if("string"==o.type||"="==o.string){var A,M=(d=e.getRange(r(i.line,Math.max(0,i.ch-60)),r(i.line,"string"==o.type?o.start:o.end))).match(/([^\s\u00a0=<>\"\']+)=$/);if(!M||!b.hasOwnProperty(M[1])||!(A=b[M[1]]))return;if("function"==typeof A&&(A=A.call(this,e)),"string"==o.type){f=o.string;var N=0;/['"]/.test(o.string.charAt(0))&&(a=o.string.charAt(0),f=o.string.slice(1),N++);var $=o.string.length;/['"]/.test(o.string.charAt($-1))&&(a=o.string.charAt($-1),f=o.string.substr(N,$-2)),h=!0}for(var C=0;Ci.ch&&(o.end=i.ch,o.string=o.string.slice(0,i.ch-o.start));var l=t.innerMode(e.getMode(),o.state);if("xml"==l.mode.name){var f,g,c=[],h=!1,p=/\btag\b/.test(o.type)&&!/>$/.test(o.string),u=p&&/^\w/.test(o.string);if(u){var d=e.getLine(i.line).slice(Math.max(0,o.start-2),o.start),m=/<\/$/.test(d)?"close":/<$/.test(d)?"open":null;m&&(g=o.start-("close"==m?2:1))}else p&&"<"==o.string?m="open":p&&"")}else{var b=(y=n[l.state.tagName])&&y.attrs,w=n["!attrs"];if(!b&&!w)return;if(b){if(w){var I={};for(var P in w)w.hasOwnProperty(P)&&(I[P]=w[P]);for(var P in b)b.hasOwnProperty(P)&&(I[P]=b[P]);b=I}}else b=w;if("string"==o.type||"="==o.string){var A,M=(d=e.getRange(r(i.line,Math.max(0,i.ch-60)),r(i.line,"string"==o.type?o.start:o.end))).match(/([^\s\u00a0=<>\"\']+)=$/);if(!M||!b.hasOwnProperty(M[1])||!(A=b[M[1]]))return;if("function"==typeof A&&(A=A.call(this,e)),"string"==o.type){f=o.string;var N=0;/['"]/.test(o.string.charAt(0))&&(a=o.string.charAt(0),f=o.string.slice(1),N++);var $=o.string.length;/['"]/.test(o.string.charAt($-1))&&(a=o.string.charAt($-1),f=o.string.substr(N,$-2)),h=!0}for(var C=0;Cg.ch&&(h.end=g.ch,h.string=h.string.slice(0,g.ch-h.start));var i=a.innerMode(b.getMode(),h.state);if("xml"==i.mode.name){var j,k,l=[],m=!1,n=/\btag\b/.test(h.type)&&!/>$/.test(h.string),o=n&&/^\w/.test(h.string);if(o){var p=b.getLine(g.line).slice(Math.max(0,h.start-2),h.start),q=/<\/$/.test(p)?"close":/<$/.test(p)?"open":null;q&&(k=h.start-("close"==q?2:1))}else n&&"<"==h.string?q="open":n&&"")}else{var s=e[i.state.tagName],w=s&&s.attrs,x=e["!attrs"];if(!w&&!x)return;if(w){if(x){var y={};for(var z in x)x.hasOwnProperty(z)&&(y[z]=x[z]);for(var z in w)w.hasOwnProperty(z)&&(y[z]=w[z]);w=y}}else w=x;if("string"==h.type||"="==h.string){var A,p=b.getRange(c(g.line,Math.max(0,g.ch-60)),c(g.line,"string"==h.type?h.start:h.end)),B=p.match(/([^\s\u00a0=<>\"\']+)=$/);if(!B||!w.hasOwnProperty(B[1])||!(A=w[B[1]]))return;if("function"==typeof A&&(A=A.call(this,b)),"string"==h.type){j=h.string;var C=0;/['"]/.test(h.string.charAt(0))&&(f=h.string.charAt(0),j=h.string.slice(1),C++);var D=h.string.length;/['"]/.test(h.string.charAt(D-1))&&(f=h.string.charAt(D-1),j=h.string.substr(C,D-2)),m=!0}for(var u=0;u0){var d=o.character;s.forEach(function(e){d>e&&(d-=1)}),o.character=d}}var u=o.character-1,l=u+1;o.evidence&&(c=o.evidence.substring(u).search(/.\b/))>-1&&(l+=c),o.description=o.reason,o.start=o.character,o.end=l,(o=n(o))&&i.push({message:o.description,severity:o.severity,from:e.Pos(o.line-1,u),to:e.Pos(o.line-1,l)})}}}var a=["Dangerous comment"],c=[["Expected '{'","Statement body should be inside '{ }' braces."]],s=["Missing semicolon","Extra comma","Missing property name","Unmatched "," and instead saw"," is not defined","Unclosed string","Stopping, unable to continue"];e.registerHelper("lint","javascript",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 r(e,r){if(!window.JSHINT)return[];JSHINT(e,r,r.globals);var n=JSHINT.data().errors,i=[];return n&&o(n,i),i}function n(e){return i(e,c,"warning",!0),i(e,s,"error"),t(e)?null:e}function i(e,r,n,i){var t,o,a,c,s;t=e.description;for(var f=0;f0){var d=o.character;s.forEach(function(e){d>e&&(d-=1)}),o.character=d}}var u=o.character-1,l=u+1;o.evidence&&(c=o.evidence.substring(u).search(/.\b/))>-1&&(l+=c),o.description=o.reason,o.start=o.character,o.end=l,(o=n(o))&&i.push({message:o.description,severity:o.severity,from:e.Pos(o.line-1,u),to:e.Pos(o.line-1,l)})}}}var a=["Dangerous comment"],c=[["Expected '{'","Statement body should be inside '{ }' braces."]],s=["Missing semicolon","Extra comma","Missing property name","Unmatched "," and instead saw"," is not defined","Unclosed string","Stopping, unable to continue"];e.registerHelper("lint","javascript",r)}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){if(!window.JSHINT)return[];JSHINT(a,b,b.globals);var c=JSHINT.data().errors,d=[];return c&&f(c,d),d}function c(a){return d(a,h,"warning",!0),d(a,i,"error"),e(a)?null:a}function d(a,b,c,d){var e,f,g,h,i;e=a.description;for(var j=0;j0){var k=f.character;i.forEach(function(a){k>a&&(k-=1)}),f.character=k}}var l=f.character-1,m=l+1;f.evidence&&(h=f.evidence.substring(l).search(/.\b/))>-1&&(m+=h),f.description=f.reason,f.start=f.character,f.end=m,f=c(f),f&&d.push({message:f.description,severity:f.severity,from:a.Pos(f.line-1,l),to:a.Pos(f.line-1,m)})}}}var g=["Dangerous comment"],h=[["Expected '{'","Statement body should be inside '{ }' braces."]],i=["Missing semicolon","Extra comma","Missing property name","Unmatched "," and instead saw"," is not defined","Unclosed string","Stopping, unable to continue"];a.registerHelper("lint","javascript",b)}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/lint/json-lint.min.js b/media/vendor/codemirror/addon/lint/json-lint.min.js index 8c8f28c3141f4..edcaddf44a4d3 100644 --- a/media/vendor/codemirror/addon/lint/json-lint.min.js +++ b/media/vendor/codemirror/addon/lint/json-lint.min.js @@ -1 +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";e.registerHelper("lint","json",function(o){var r=[];jsonlint.parseError=function(o,t){var n=t.loc;r.push({from:e.Pos(n.first_line-1,n.first_column),to:e.Pos(n.last_line-1,n.last_column),message:o})};try{jsonlint.parse(o)}catch(e){}return 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.registerHelper("lint","json",function(o){var r=[];jsonlint.parseError=function(o,t){var n=t.loc;r.push({from:e.Pos(n.first_line-1,n.first_column),to:e.Pos(n.last_line-1,n.last_column),message:o})};try{jsonlint.parse(o)}catch(e){}return r})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.registerHelper("lint","json",function(b){var c=[];jsonlint.parseError=function(b,d){var e=d.loc;c.push({from:a.Pos(e.first_line-1,e.first_column),to:a.Pos(e.last_line-1,e.last_column),message:b})};try{jsonlint.parse(b)}catch(a){}return c})}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/lint/lint.min.js b/media/vendor/codemirror/addon/lint/lint.min.js index 49c2423769153..d106e5f94adcc 100644 --- a/media/vendor/codemirror/addon/lint/lint.min.js +++ b/media/vendor/codemirror/addon/lint/lint.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";function e(e,n){function o(e){if(!r.parentNode)return t.off(document,"mousemove",o);r.style.top=Math.max(0,e.clientY-r.offsetHeight-5)+"px",r.style.left=e.clientX+5+"px"}var r=document.createElement("div");return r.className="CodeMirror-lint-tooltip",r.appendChild(n.cloneNode(!0)),document.body.appendChild(r),t.on(document,"mousemove",o),o(e),null!=r.style.opacity&&(r.style.opacity=1),r}function n(t){t.parentNode&&t.parentNode.removeChild(t)}function o(t){t.parentNode&&(null==t.style.opacity&&n(t),t.style.opacity=0,setTimeout(function(){n(t)},600))}function r(n,r,i){function a(){t.off(i,"mouseout",a),l&&(o(l),l=null)}var l=e(n,r),u=setInterval(function(){if(l)for(var t=i;;t=t.parentNode){if(t&&11==t.nodeType&&(t=t.host),t==document.body)return;if(!t){a();break}}if(!l)return clearInterval(u)},400);t.on(i,"mouseout",a)}function i(t,e,n){this.marked=[],this.options=e,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(e){g(t,e)},this.waitingFor=0}function a(t,e){return e instanceof Function?{getAnnotations:e}:(e&&!0!==e||(e={}),e)}function l(t){var e=t.state.lint;e.hasGutter&&t.clearGutter(y);for(var n=0;n1,n.options.tooltips))}}o.onUpdateLinting&&o.onUpdateLinting(e,r,t)}function h(t){var e=t.state.lint;e&&(clearTimeout(e.timeout),e.timeout=setTimeout(function(){d(t)},e.options.delay||500))}function v(t,e){for(var n=e.target||e.srcElement,o=document.createDocumentFragment(),i=0;i1,n.options.tooltips))}}o.onUpdateLinting&&o.onUpdateLinting(e,r,t)}function h(t){var e=t.state.lint;e&&(clearTimeout(e.timeout),e.timeout=setTimeout(function(){d(t)},e.options.delay||500))}function v(t,e){for(var n=e.target||e.srcElement,o=document.createDocumentFragment(),i=0;i1,c.options.tooltips))}}d.onUpdateLinting&&d.onUpdateLinting(b,e,a)}function p(a){var b=a.state.lint;b&&(clearTimeout(b.timeout),b.timeout=setTimeout(function(){n(a)},b.options.delay||500))}function q(a,b){for(var c=b.target||b.srcElement,d=document.createDocumentFragment(),f=0;fn)return!1;var o=i.getScrollInfo();if("align"==e.mv.options.connect)v=o.top;else{var a,s,c=.5*o.clientHeight,h=o.top+c,f=i.lineAtHeight(h,"local"),g=A(e.chunks,f,t),d=l(i,t?g.edit:g.orig),u=l(r,t?g.orig:g.edit),m=(h-d.top)/(d.bot-d.top),v=u.top-c+m*(u.bot-u.top);if(v>o.top&&(s=o.top/c)<1)v=v*s+o.top*(1-s);else if((a=o.height-o.clientHeight-o.top)a&&(s=a/c)<1&&(v=v*s+(p.height-p.clientHeight-a)*(1-s))}}return r.scrollTo(o.left,v),r.state.scrollSetAt=n,r.state.scrollSetBy=e,!0}function l(e,t){var i=t.after;return null==i&&(i=e.lastLine()+1),{top:e.heightAtLine(t.before||0,"local"),bot:e.heightAtLine(i,"local")}}function a(e,t,i){e.lockScroll=t,t&&0!=i&&o(e,DIFF_INSERT)&&d(e),e.lockButton.innerHTML=t?"⇛⇚":"⇛  ⇚"}function s(e,t,i){for(var r=i.classLocation,n=0;n20||i.from-o.to>20?(c(e,i.marked,n),g(e,t,r,i.marked,o.from,o.to,n),i.from=o.from,i.to=o.to):(o.fromi.to&&(g(e,t,r,i.marked,i.to,o.to,n),i.to=o.to))})}function f(e,t,i,r,n,o){for(var l=i.classLocation,a=e.getLineHandle(t),s=0;sC&&(u&&(a(d,C),u=!1),d=b)}else if(u=!0,p==i){var w=V(s,k,!0),T=P(c,s),F=H(h,w);j(T,F)||r.push(e.markText(T,F,{className:g})),s=w}}u&&a(d,s.line+1)}function d(e){if(e.showDifferences){if(e.svg){N(e.svg);var t=e.gap.offsetWidth;R(e.svg,"width",t,"height",e.gap.offsetHeight)}e.copyButtons&&N(e.copyButtons);for(var i=e.edit.getViewport(),r=e.orig.getViewport(),n=e.mv.wrap.getBoundingClientRect().top,o=n-e.edit.getScrollerElement().getBoundingClientRect().top+e.edit.getScrollInfo().top,l=n-e.orig.getScrollerElement().getBoundingClientRect().top+e.orig.getScrollInfo().top,a=0;a=i.from&&s.origFrom<=r.to&&s.origTo>=r.from&&w(e,s,l,o,t)}}}function u(e,t){for(var i=0,r=0,n=0;ne&&o.editFrom<=e)return null;if(o.editFrom>e)break;i=o.editTo,r=o.origTo}return r+(e-i)}function m(e,t,i){for(var r=e.state.trackAlignable,n=e.firstLine(),o=0,l=[],a=0;;a++){for(var s=t[a],c=s?i?s.origFrom:s.editFrom:1e9;of){o++,n--;continue e}if(g.editTo>h){if(g.editFrom<=h)continue e;break}a+=g.origTo-g.origFrom-(g.editTo-g.editFrom),l++}if(h==f-a)s[r]=f,o++;else if(h1&&i.push(b(e[o],t[o],a))}}function b(e,t,i){var r=!0;t>e.lastLine()&&(t--,r=!1);var n=document.createElement("div");return n.className="CodeMirror-merge-spacer",n.style.height=i+"px",n.style.minWidth="1px",e.addLineWidget(t,n,{height:i,above:r,mergeSpacer:!0,handleMouseEvents:!0})}function w(e,t,i,r,n){var o="left"==e.type,l=e.orig.heightAtLine(t.origFrom,"local",!0)-i;if(e.svg){var a=l,s=e.edit.heightAtLine(t.editFrom,"local",!0)-r;if(o){f=a;a=s,s=f}var c=e.orig.heightAtLine(t.origTo,"local",!0)-i,h=e.edit.heightAtLine(t.editTo,"local",!0)-r;if(o){var f=c;c=h,h=f}var g=" C "+n/2+" "+s+" "+n/2+" "+a+" "+(n+2)+" "+a,d=" C "+n/2+" "+c+" "+n/2+" "+h+" -1 "+h;R(e.svg.appendChild(document.createElementNS(G,"path")),"d","M -1 "+s+g+" L "+(n+2)+" "+c+d+" z","class",e.classes.connect)}if(e.copyButtons){var u=e.copyButtons.appendChild(I("div","left"==e.type?"⇝":"⇜","CodeMirror-merge-copy")),m=e.mv.options.allowEditingOriginals;if(u.title=m?"Push to left":"Revert chunk",u.chunk=t,u.style.top=(t.origTo>t.origFrom?l:e.edit.heightAtLine(t.editFrom,"local")-r)+"px",m){var v=e.edit.heightAtLine(t.editFrom,"local")-r,p=e.copyButtons.appendChild(I("div","right"==e.type?"⇝":"⇜","CodeMirror-merge-copy-reverse"));p.title="Push to right",p.chunk={editFrom:t.origFrom,editTo:t.origTo,origFrom:t.editFrom,origTo:t.editTo},p.style.top=v+"px","right"==e.type?p.style.left="2px":p.style.right="2px"}}}function T(e,t,i,r){if(!e.diffOutOfDate){var n=r.origTo>i.lastLine()?q(r.origFrom-1):q(r.origFrom,0),o=q(r.origTo,0),l=r.editTo>t.lastLine()?q(r.editFrom-1):q(r.editFrom,0),a=q(r.editTo,0),s=e.mv.options.revertChunk;s?s(e.mv,i,n,o,t,l,a):t.replaceRange(i.getRange(n,o),l,a)}}function F(t){var i=t.lockButton=I("div",null,"CodeMirror-merge-scrolllock");i.title="Toggle locked scrolling";var r=I("div",[i],"CodeMirror-merge-scrolllock-wrap");e.on(i,"click",function(){a(t,!t.lockScroll)});var n=[r];if(!1!==t.mv.options.revertButtons&&(t.copyButtons=I("div",null,"CodeMirror-merge-copybuttons-"+t.type),e.on(t.copyButtons,"click",function(e){var i=e.target||e.srcElement;i.chunk&&("CodeMirror-merge-copy-reverse"!=i.className?T(t,t.edit,t.orig,i.chunk):T(t,t.orig,t.edit,i.chunk))}),n.unshift(t.copyButtons)),"align"!=t.mv.options.connect){var o=document.createElementNS&&document.createElementNS(G,"svg");o&&!o.createSVGRect&&(o=null),t.svg=o,o&&n.push(o)}return t.gap=I("div",n,"CodeMirror-merge-gap")}function y(e){return"string"==typeof e?e:e.getValue()}function S(e,t,i){for(var r=X.diff_main(e,t),n=0;nh&&(l&&t.push({origFrom:r,origTo:f,editFrom:i,editTo:h}),i=d,r=u)}else V(s==DIFF_INSERT?n:o,a[1])}return(i<=n.line||r<=o.line)&&t.push({origFrom:r,origTo:o.line+1,editFrom:i,editTo:n.line+1}),t}function L(e,t){if(t==e.length-1)return!0;var i=e[t+1][1];return!(1==i.length&&t1||t==e.length-3)&&10==i.charCodeAt(0))}function D(e,t){if(0==t)return!0;var i=e[t-1][1];return 10==i.charCodeAt(i.length-1)&&(1==t||10==(i=e[t-2][1]).charCodeAt(i.length-1))}function A(e,t,i){for(var r,n,o,l,a=0;at?(n=s.editFrom,l=s.origFrom):h>t&&(n=s.editTo,l=s.origTo)),h<=t?(r=s.editTo,o=s.origTo):c<=t&&(r=s.editFrom,o=s.origFrom)}return{edit:{before:r,after:n},orig:{before:o,after:l}}}function E(t,i,r){function n(){l.clear(),t.removeLineClass(i,"wrap","CodeMirror-merge-collapsed-line")}t.addLineClass(i,"wrap","CodeMirror-merge-collapsed-line");var o=document.createElement("span");o.className="CodeMirror-merge-collapsed-widget",o.title="Identical text collapsed. Click to expand.";var l=t.markText(q(i,0),q(r-1),{inclusiveLeft:!0,inclusiveRight:!0,replacedWith:o,clearOnEnter:!0});return e.on(o,"click",n),{mark:l,clear:n}}function O(e,t){function i(){for(var e=0;e=0&&at){var h=[{line:s,cm:r}];e.left&&h.push({line:u(s,e.left.chunks),cm:e.left.orig}),e.right&&h.push({line:u(s,e.right.chunks),cm:e.right.orig});var f=O(c,h);e.options.onCollapse&&e.options.onCollapse(e,s,c,f)}}}function I(e,t,i,r){var n=document.createElement(e);if(i&&(n.className=i),r&&(n.style.cssText=r),"string"==typeof t)n.appendChild(document.createTextNode(t));else if(t)for(var o=0;o0;--t)e.removeChild(e.firstChild)}function R(e){for(var t=1;t0?e:t}function j(e,t){return e.line==t.line&&e.ch==t.ch}function U(e,t,i){for(var r=e.length-1;r>=0;r--){var n=e[r],o=(i?n.origTo:n.editTo)-1;if(ot)return o}}function Q(t,r){var n=null,o=t.state.diffViews,l=t.getCursor().line;if(o)for(var a=0;an:h0)break}this.signal(),this.alignable.splice(i,0,e,t)},find:function(e){for(var t=0;t-1){var c=this.alignable[o+1];c==Z?this.alignable.splice(o,2):this.alignable[o+1]=c&~Z}l>-1&&i&&this.set(e+i,Z)}},e.commands.goNextDiff=function(e){return Q(e,1)},e.commands.goPrevDiff=function(e){return Q(e,-1)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","diff_match_patch"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t){this.mv=e,this.type=t,this.classes="left"==t?{chunk:"CodeMirror-merge-l-chunk",start:"CodeMirror-merge-l-chunk-start",end:"CodeMirror-merge-l-chunk-end",insert:"CodeMirror-merge-l-inserted",del:"CodeMirror-merge-l-deleted",connect:"CodeMirror-merge-l-connect"}:{chunk:"CodeMirror-merge-r-chunk",start:"CodeMirror-merge-r-chunk-start",end:"CodeMirror-merge-r-chunk-end",insert:"CodeMirror-merge-r-inserted",del:"CodeMirror-merge-r-deleted",connect:"CodeMirror-merge-r-connect"}}function i(t){t.diffOutOfDate&&(t.diff=S(t.orig.getValue(),t.edit.getValue(),t.mv.options.ignoreWhitespace),t.chunks=M(t.diff),t.diffOutOfDate=!1,e.signal(t.edit,"updateDiff",t.diff))}function r(t){function r(e){J=!0,m=!1,"full"==e&&(t.svg&&N(t.svg),t.copyButtons&&N(t.copyButtons),c(t.edit,g.marked,t.classes),c(t.orig,u.marked,t.classes),g.from=g.to=u.from=u.to=0),i(t),t.showDifferences&&(h(t.edit,t.diff,g,DIFF_INSERT,t.classes),h(t.orig,t.diff,u,DIFF_DELETE,t.classes)),"align"==t.mv.options.connect&&k(t),d(t),null!=t.needsScrollSync&&o(t,t.needsScrollSync),J=!1}function n(e){J||(t.dealigned=!0,l(e))}function l(e){J||m||(clearTimeout(f),!0===e&&(m=!0),f=setTimeout(r,!0===e?20:250))}function a(e,i){t.diffOutOfDate||(t.diffOutOfDate=!0,g.from=g.to=u.from=u.to=0),n(i.text.length-1!=i.to.line-i.from.line)}function s(){t.diffOutOfDate=!0,t.dealigned=!0,r("full")}var f,g={from:0,to:0,marked:[]},u={from:0,to:0,marked:[]},m=!1;return t.edit.on("change",a),t.orig.on("change",a),t.edit.on("swapDoc",s),t.orig.on("swapDoc",s),"align"==t.mv.options.connect&&(e.on(t.edit.state.trackAlignable,"realign",n),e.on(t.orig.state.trackAlignable,"realign",n)),t.edit.on("viewportChange",function(){l(!1)}),t.orig.on("viewportChange",function(){l(!1)}),r(),r}function n(e,t){e.edit.on("scroll",function(){o(e,!0)&&d(e)}),e.orig.on("scroll",function(){o(e,!1)&&d(e),t&&o(t,!0)&&d(t)})}function o(e,t){if(e.diffOutOfDate)return e.lockScroll&&null==e.needsScrollSync&&(e.needsScrollSync=t),!1;if(e.needsScrollSync=null,!e.lockScroll)return!0;var i,r,n=+new Date;if(t?(i=e.edit,r=e.orig):(i=e.orig,r=e.edit),i.state.scrollSetBy==e&&(i.state.scrollSetAt||0)+250>n)return!1;var o=i.getScrollInfo();if("align"==e.mv.options.connect)v=o.top;else{var a,s,c=.5*o.clientHeight,h=o.top+c,f=i.lineAtHeight(h,"local"),g=A(e.chunks,f,t),d=l(i,t?g.edit:g.orig),u=l(r,t?g.orig:g.edit),m=(h-d.top)/(d.bot-d.top),v=u.top-c+m*(u.bot-u.top);if(v>o.top&&(s=o.top/c)<1)v=v*s+o.top*(1-s);else if((a=o.height-o.clientHeight-o.top)a&&(s=a/c)<1&&(v=v*s+(p.height-p.clientHeight-a)*(1-s))}}return r.scrollTo(o.left,v),r.state.scrollSetAt=n,r.state.scrollSetBy=e,!0}function l(e,t){var i=t.after;return null==i&&(i=e.lastLine()+1),{top:e.heightAtLine(t.before||0,"local"),bot:e.heightAtLine(i,"local")}}function a(e,t,i){e.lockScroll=t,t&&0!=i&&o(e,DIFF_INSERT)&&d(e),e.lockButton.innerHTML=t?"⇛⇚":"⇛  ⇚"}function s(e,t,i){for(var r=i.classLocation,n=0;n20||i.from-o.to>20?(c(e,i.marked,n),g(e,t,r,i.marked,o.from,o.to,n),i.from=o.from,i.to=o.to):(o.fromi.to&&(g(e,t,r,i.marked,i.to,o.to,n),i.to=o.to))})}function f(e,t,i,r,n,o){for(var l=i.classLocation,a=e.getLineHandle(t),s=0;sC&&(u&&(a(d,C),u=!1),d=b)}else if(u=!0,p==i){var w=V(s,k,!0),T=P(c,s),F=H(h,w);j(T,F)||r.push(e.markText(T,F,{className:g})),s=w}}u&&a(d,s.line+1)}function d(e){if(e.showDifferences){if(e.svg){N(e.svg);var t=e.gap.offsetWidth;R(e.svg,"width",t,"height",e.gap.offsetHeight)}e.copyButtons&&N(e.copyButtons);for(var i=e.edit.getViewport(),r=e.orig.getViewport(),n=e.mv.wrap.getBoundingClientRect().top,o=n-e.edit.getScrollerElement().getBoundingClientRect().top+e.edit.getScrollInfo().top,l=n-e.orig.getScrollerElement().getBoundingClientRect().top+e.orig.getScrollInfo().top,a=0;a=i.from&&s.origFrom<=r.to&&s.origTo>=r.from&&w(e,s,l,o,t)}}}function u(e,t){for(var i=0,r=0,n=0;ne&&o.editFrom<=e)return null;if(o.editFrom>e)break;i=o.editTo,r=o.origTo}return r+(e-i)}function m(e,t,i){for(var r=e.state.trackAlignable,n=e.firstLine(),o=0,l=[],a=0;;a++){for(var s=t[a],c=s?i?s.origFrom:s.editFrom:1e9;of){o++,n--;continue e}if(g.editTo>h){if(g.editFrom<=h)continue e;break}a+=g.origTo-g.origFrom-(g.editTo-g.editFrom),l++}if(h==f-a)s[r]=f,o++;else if(h1&&i.push(b(e[o],t[o],a))}}function b(e,t,i){var r=!0;t>e.lastLine()&&(t--,r=!1);var n=document.createElement("div");return n.className="CodeMirror-merge-spacer",n.style.height=i+"px",n.style.minWidth="1px",e.addLineWidget(t,n,{height:i,above:r,mergeSpacer:!0,handleMouseEvents:!0})}function w(e,t,i,r,n){var o="left"==e.type,l=e.orig.heightAtLine(t.origFrom,"local",!0)-i;if(e.svg){var a=l,s=e.edit.heightAtLine(t.editFrom,"local",!0)-r;if(o){f=a;a=s,s=f}var c=e.orig.heightAtLine(t.origTo,"local",!0)-i,h=e.edit.heightAtLine(t.editTo,"local",!0)-r;if(o){var f=c;c=h,h=f}var g=" C "+n/2+" "+s+" "+n/2+" "+a+" "+(n+2)+" "+a,d=" C "+n/2+" "+c+" "+n/2+" "+h+" -1 "+h;R(e.svg.appendChild(document.createElementNS(G,"path")),"d","M -1 "+s+g+" L "+(n+2)+" "+c+d+" z","class",e.classes.connect)}if(e.copyButtons){var u=e.copyButtons.appendChild(I("div","left"==e.type?"⇝":"⇜","CodeMirror-merge-copy")),m=e.mv.options.allowEditingOriginals;if(u.title=m?"Push to left":"Revert chunk",u.chunk=t,u.style.top=(t.origTo>t.origFrom?l:e.edit.heightAtLine(t.editFrom,"local")-r)+"px",m){var v=e.edit.heightAtLine(t.editFrom,"local")-r,p=e.copyButtons.appendChild(I("div","right"==e.type?"⇝":"⇜","CodeMirror-merge-copy-reverse"));p.title="Push to right",p.chunk={editFrom:t.origFrom,editTo:t.origTo,origFrom:t.editFrom,origTo:t.editTo},p.style.top=v+"px","right"==e.type?p.style.left="2px":p.style.right="2px"}}}function T(e,t,i,r){if(!e.diffOutOfDate){var n=r.origTo>i.lastLine()?q(r.origFrom-1):q(r.origFrom,0),o=q(r.origTo,0),l=r.editTo>t.lastLine()?q(r.editFrom-1):q(r.editFrom,0),a=q(r.editTo,0),s=e.mv.options.revertChunk;s?s(e.mv,i,n,o,t,l,a):t.replaceRange(i.getRange(n,o),l,a)}}function F(t){var i=t.lockButton=I("div",null,"CodeMirror-merge-scrolllock");i.title="Toggle locked scrolling";var r=I("div",[i],"CodeMirror-merge-scrolllock-wrap");e.on(i,"click",function(){a(t,!t.lockScroll)});var n=[r];if(!1!==t.mv.options.revertButtons&&(t.copyButtons=I("div",null,"CodeMirror-merge-copybuttons-"+t.type),e.on(t.copyButtons,"click",function(e){var i=e.target||e.srcElement;if(i.chunk)return"CodeMirror-merge-copy-reverse"==i.className?void T(t,t.orig,t.edit,i.chunk):void T(t,t.edit,t.orig,i.chunk)}),n.unshift(t.copyButtons)),"align"!=t.mv.options.connect){var o=document.createElementNS&&document.createElementNS(G,"svg");o&&!o.createSVGRect&&(o=null),t.svg=o,o&&n.push(o)}return t.gap=I("div",n,"CodeMirror-merge-gap")}function y(e){return"string"==typeof e?e:e.getValue()}function S(e,t,i){for(var r=X.diff_main(e,t),n=0;nh&&(l&&t.push({origFrom:r,origTo:f,editFrom:i,editTo:h}),i=d,r=u)}else V(s==DIFF_INSERT?n:o,a[1])}return(i<=n.line||r<=o.line)&&t.push({origFrom:r,origTo:o.line+1,editFrom:i,editTo:n.line+1}),t}function L(e,t){if(t==e.length-1)return!0;var i=e[t+1][1];return!(1==i.length&&t1||t==e.length-3)&&10==i.charCodeAt(0))}function D(e,t){if(0==t)return!0;var i=e[t-1][1];return 10==i.charCodeAt(i.length-1)&&(1==t||10==(i=e[t-2][1]).charCodeAt(i.length-1))}function A(e,t,i){for(var r,n,o,l,a=0;at?(n=s.editFrom,l=s.origFrom):h>t&&(n=s.editTo,l=s.origTo)),h<=t?(r=s.editTo,o=s.origTo):c<=t&&(r=s.editFrom,o=s.origFrom)}return{edit:{before:r,after:n},orig:{before:o,after:l}}}function E(t,i,r){function n(){l.clear(),t.removeLineClass(i,"wrap","CodeMirror-merge-collapsed-line")}t.addLineClass(i,"wrap","CodeMirror-merge-collapsed-line");var o=document.createElement("span");o.className="CodeMirror-merge-collapsed-widget",o.title="Identical text collapsed. Click to expand.";var l=t.markText(q(i,0),q(r-1),{inclusiveLeft:!0,inclusiveRight:!0,replacedWith:o,clearOnEnter:!0});return e.on(o,"click",n),{mark:l,clear:n}}function O(e,t){function i(){for(var e=0;e=0&&at){var h=[{line:s,cm:r}];e.left&&h.push({line:u(s,e.left.chunks),cm:e.left.orig}),e.right&&h.push({line:u(s,e.right.chunks),cm:e.right.orig});var f=O(c,h);e.options.onCollapse&&e.options.onCollapse(e,s,c,f)}}}function I(e,t,i,r){var n=document.createElement(e);if(i&&(n.className=i),r&&(n.style.cssText=r),"string"==typeof t)n.appendChild(document.createTextNode(t));else if(t)for(var o=0;o0;--t)e.removeChild(e.firstChild)}function R(e){for(var t=1;t0?e:t}function j(e,t){return e.line==t.line&&e.ch==t.ch}function U(e,t,i){for(var r=e.length-1;r>=0;r--){var n=e[r],o=(i?n.origTo:n.editTo)-1;if(ot)return o}}function Q(t,r){var n=null,o=t.state.diffViews,l=t.getCursor().line;if(o)for(var a=0;an:h0)break}this.signal(),this.alignable.splice(i,0,e,t)},find:function(e){for(var t=0;t-1){var c=this.alignable[o+1];c==Z?this.alignable.splice(o,2):this.alignable[o+1]=c&~Z}l>-1&&i&&this.set(e+i,Z)}},e.commands.goNextDiff=function(e){return Q(e,1)},e.commands.goPrevDiff=function(e){return Q(e,-1)}}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","diff_match_patch"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){this.mv=a,this.type=b,this.classes="left"==b?{chunk:"CodeMirror-merge-l-chunk",start:"CodeMirror-merge-l-chunk-start",end:"CodeMirror-merge-l-chunk-end",insert:"CodeMirror-merge-l-inserted",del:"CodeMirror-merge-l-deleted",connect:"CodeMirror-merge-l-connect"}:{chunk:"CodeMirror-merge-r-chunk",start:"CodeMirror-merge-r-chunk-start",end:"CodeMirror-merge-r-chunk-end",insert:"CodeMirror-merge-r-inserted",del:"CodeMirror-merge-r-deleted",connect:"CodeMirror-merge-r-connect"}}function c(b){b.diffOutOfDate&&(b.diff=z(b.orig.getValue(),b.edit.getValue(),b.mv.options.ignoreWhitespace),b.chunks=A(b.diff),b.diffOutOfDate=!1,a.signal(b.edit,"updateDiff",b.diff))}function d(b){function d(a){W=!0,p=!1,"full"==a&&(b.svg&&J(b.svg),b.copyButtons&&J(b.copyButtons),j(b.edit,m.marked,b.classes),j(b.orig,o.marked,b.classes),m.from=m.to=o.from=o.to=0),c(b),b.showDifferences&&(k(b.edit,b.diff,m,DIFF_INSERT,b.classes),k(b.orig,b.diff,o,DIFF_DELETE,b.classes)),"align"==b.mv.options.connect&&s(b),n(b),null!=b.needsScrollSync&&f(b,b.needsScrollSync),W=!1}function e(a){W||(b.dealigned=!0,g(a))}function g(a){W||p||(clearTimeout(l),a===!0&&(p=!0),l=setTimeout(d,a===!0?20:250))}function h(a,c){b.diffOutOfDate||(b.diffOutOfDate=!0,m.from=m.to=o.from=o.to=0),e(c.text.length-1!=c.to.line-c.from.line)}function i(){b.diffOutOfDate=!0,b.dealigned=!0,d("full")}var l,m={from:0,to:0,marked:[]},o={from:0,to:0,marked:[]},p=!1;return b.edit.on("change",h),b.orig.on("change",h),b.edit.on("swapDoc",i),b.orig.on("swapDoc",i),"align"==b.mv.options.connect&&(a.on(b.edit.state.trackAlignable,"realign",e),a.on(b.orig.state.trackAlignable,"realign",e)),b.edit.on("viewportChange",function(){g(!1)}),b.orig.on("viewportChange",function(){g(!1)}),d(),d}function e(a,b){a.edit.on("scroll",function(){f(a,!0)&&n(a)}),a.orig.on("scroll",function(){f(a,!1)&&n(a),b&&f(b,!0)&&n(b)})}function f(a,b){if(a.diffOutOfDate)return a.lockScroll&&null==a.needsScrollSync&&(a.needsScrollSync=b),!1;if(a.needsScrollSync=null,!a.lockScroll)return!0;var c,d,e=+new Date;if(b?(c=a.edit,d=a.orig):(c=a.orig,d=a.edit),c.state.scrollSetBy==a&&(c.state.scrollSetAt||0)+250>e)return!1;var f=c.getScrollInfo();if("align"==a.mv.options.connect)q=f.top;else{var h,i,j=.5*f.clientHeight,k=f.top+j,l=c.lineAtHeight(k,"local"),m=D(a.chunks,l,b),n=g(c,b?m.edit:m.orig),o=g(d,b?m.orig:m.edit),p=(k-n.top)/(n.bot-n.top),q=o.top-j+p*(o.bot-o.top);if(q>f.top&&(i=f.top/j)<1)q=q*i+f.top*(1-i);else if((h=f.height-f.clientHeight-f.top)h&&(i=h/j)<1&&(q=q*i+(r.height-r.clientHeight-h)*(1-i))}}return d.scrollTo(f.left,q),d.state.scrollSetAt=e,d.state.scrollSetBy=a,!0}function g(a,b){var c=b.after;return null==c&&(c=a.lastLine()+1),{top:a.heightAtLine(b.before||0,"local"),bot:a.heightAtLine(c,"local")}}function h(a,b,c){a.lockScroll=b,b&&0!=c&&f(a,DIFF_INSERT)&&n(a),a.lockButton.innerHTML=b?"⇛⇚":"⇛  ⇚"}function i(a,b,c){for(var d=c.classLocation,e=0;e20||c.from-f.to>20?(j(a,c.marked,e),m(a,b,d,c.marked,f.from,f.to,e),c.from=f.from,c.to=f.to):(f.fromc.to&&(m(a,b,d,c.marked,c.to,f.to,e),c.to=f.to))})}function l(a,b,c,d,e,f){for(var g=c.classLocation,h=a.getLineHandle(b),i=0;it&&(o&&(h(n,t),o=!1),n=u)}else if(o=!0,r==c){var v=M(i,s,!0),w=P(j,i),x=O(k,v);Q(w,x)||d.push(a.markText(w,x,{className:m})),i=v}}o&&h(n,i.line+1)}function n(a){if(a.showDifferences){if(a.svg){J(a.svg);var b=a.gap.offsetWidth;K(a.svg,"width",b,"height",a.gap.offsetHeight)}a.copyButtons&&J(a.copyButtons);for(var c=a.edit.getViewport(),d=a.orig.getViewport(),e=a.mv.wrap.getBoundingClientRect().top,f=e-a.edit.getScrollerElement().getBoundingClientRect().top+a.edit.getScrollInfo().top,g=e-a.orig.getScrollerElement().getBoundingClientRect().top+a.orig.getScrollInfo().top,h=0;h=c.from&&i.origFrom<=d.to&&i.origTo>=d.from&&v(a,i,g,f,b)}}}function o(a,b){for(var c=0,d=0,e=0;ea&&f.editFrom<=a)return null;if(f.editFrom>a)break;c=f.editTo,d=f.origTo}return d+(a-c)}function p(a,b,c){for(var d=a.state.trackAlignable,e=a.firstLine(),f=0,g=[],h=0;;h++){for(var i=b[h],j=i?c?i.origFrom:i.editFrom:1e9;fl){f++,e--;continue a}if(m.editTo>k){if(m.editFrom<=k)continue a;break}h+=m.origTo-m.origFrom-(m.editTo-m.editFrom),g++}if(k==l-h)i[d]=l,f++;else if(k1&&c.push(u(a[f],b[f],h))}}function u(a,b,c){var d=!0;b>a.lastLine()&&(b--,d=!1);var e=document.createElement("div");return e.className="CodeMirror-merge-spacer",e.style.height=c+"px",e.style.minWidth="1px",a.addLineWidget(b,e,{height:c,above:d,mergeSpacer:!0,handleMouseEvents:!0})}function v(a,b,c,d,e){var f="left"==a.type,g=a.orig.heightAtLine(b.origFrom,"local",!0)-c;if(a.svg){var h=g,i=a.edit.heightAtLine(b.editFrom,"local",!0)-d;if(f){var j=h;h=i,i=j}var k=a.orig.heightAtLine(b.origTo,"local",!0)-c,l=a.edit.heightAtLine(b.editTo,"local",!0)-d;if(f){var j=k;k=l,l=j}var m=" C "+e/2+" "+i+" "+e/2+" "+h+" "+(e+2)+" "+h,n=" C "+e/2+" "+k+" "+e/2+" "+l+" -1 "+l;K(a.svg.appendChild(document.createElementNS(V,"path")),"d","M -1 "+i+m+" L "+(e+2)+" "+k+n+" z","class",a.classes.connect)}if(a.copyButtons){var o=a.copyButtons.appendChild(I("div","left"==a.type?"⇝":"⇜","CodeMirror-merge-copy")),p=a.mv.options.allowEditingOriginals;if(o.title=p?"Push to left":"Revert chunk",o.chunk=b,o.style.top=(b.origTo>b.origFrom?g:a.edit.heightAtLine(b.editFrom,"local")-d)+"px",p){var q=a.edit.heightAtLine(b.editFrom,"local")-d,r=a.copyButtons.appendChild(I("div","right"==a.type?"⇝":"⇜","CodeMirror-merge-copy-reverse"));r.title="Push to right",r.chunk={editFrom:b.origFrom,editTo:b.origTo,origFrom:b.editFrom,origTo:b.editTo},r.style.top=q+"px","right"==a.type?r.style.left="2px":r.style.right="2px"}}}function w(a,b,c,d){if(!a.diffOutOfDate){var e=d.origTo>c.lastLine()?U(d.origFrom-1):U(d.origFrom,0),f=U(d.origTo,0),g=d.editTo>b.lastLine()?U(d.editFrom-1):U(d.editFrom,0),h=U(d.editTo,0),i=a.mv.options.revertChunk;i?i(a.mv,c,e,f,b,g,h):b.replaceRange(c.getRange(e,f),g,h)}}function x(b){var c=b.lockButton=I("div",null,"CodeMirror-merge-scrolllock");c.title="Toggle locked scrolling";var d=I("div",[c],"CodeMirror-merge-scrolllock-wrap");a.on(c,"click",function(){h(b,!b.lockScroll)});var e=[d];if(b.mv.options.revertButtons!==!1&&(b.copyButtons=I("div",null,"CodeMirror-merge-copybuttons-"+b.type),a.on(b.copyButtons,"click",function(a){var c=a.target||a.srcElement;if(c.chunk)return"CodeMirror-merge-copy-reverse"==c.className?void w(b,b.orig,b.edit,c.chunk):void w(b,b.edit,b.orig,c.chunk)}),e.unshift(b.copyButtons)),"align"!=b.mv.options.connect){var f=document.createElementNS&&document.createElementNS(V,"svg");f&&!f.createSVGRect&&(f=null),b.svg=f,f&&e.push(f)}return b.gap=I("div",e,"CodeMirror-merge-gap")}function y(a){return"string"==typeof a?a:a.getValue()}function z(a,b,c){for(var d=Y.diff_main(a,b),e=0;ek&&(g&&b.push({origFrom:d,origTo:l,editFrom:c,editTo:k}),c=n,d=o)}else M(i==DIFF_INSERT?e:f,h[1])}return(c<=e.line||d<=f.line)&&b.push({origFrom:d,origTo:f.line+1,editFrom:c,editTo:e.line+1}),b}function B(a,b){if(b==a.length-1)return!0;var c=a[b+1][1];return!(1==c.length&&b1||b==a.length-3)&&10==c.charCodeAt(0)))}function C(a,b){if(0==b)return!0;var c=a[b-1][1];return 10==c.charCodeAt(c.length-1)&&(1==b||(c=a[b-2][1],10==c.charCodeAt(c.length-1)))}function D(a,b,c){for(var d,e,f,g,h=0;hb?(e=i.editFrom,g=i.origFrom):k>b&&(e=i.editTo,g=i.origTo)),k<=b?(d=i.editTo,f=i.origTo):j<=b&&(d=i.editFrom,f=i.origFrom)}return{edit:{before:d,after:e},orig:{before:f,after:g}}}function E(b,c,d){function e(){g.clear(),b.removeLineClass(c,"wrap","CodeMirror-merge-collapsed-line")}b.addLineClass(c,"wrap","CodeMirror-merge-collapsed-line");var f=document.createElement("span");f.className="CodeMirror-merge-collapsed-widget",f.title="Identical text collapsed. Click to expand.";var g=b.markText(U(c,0),U(d-1),{inclusiveLeft:!0,inclusiveRight:!0,replacedWith:f,clearOnEnter:!0});return a.on(f,"click",e),{mark:g,clear:e}}function F(a,b){function c(){for(var a=0;a=0&&hb){var k=[{line:i,cm:d}];a.left&&k.push({line:o(i,a.left.chunks),cm:a.left.orig}),a.right&&k.push({line:o(i,a.right.chunks),cm:a.right.orig});var l=F(j,k);a.options.onCollapse&&a.options.onCollapse(a,i,j,l)}}}function I(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f0;--b)a.removeChild(a.firstChild)}function K(a){for(var b=1;b0?a:b}function Q(a,b){return a.line==b.line&&a.ch==b.ch}function R(a,b,c){for(var d=a.length-1;d>=0;d--){var e=a[d],f=(c?e.origTo:e.editTo)-1;if(fb)return f}}function T(b,d){var e=null,f=b.state.diffViews,g=b.getCursor().line;if(f)for(var h=0;he:k0)break}this.signal(),this.alignable.splice(c,0,a,b)},find:function(a){for(var b=0;b-1){var j=this.alignable[f+1];j==$?this.alignable.splice(f,2):this.alignable[f+1]=j&~$}g>-1&&c&&this.set(a+c,$)}},a.commands.goNextDiff=function(a){return T(a,1)},a.commands.goPrevDiff=function(a){return T(a,-1)}}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/mode/loadmode.min.js b/media/vendor/codemirror/addon/mode/loadmode.min.js index 6bc73b014135d..0434d34ed89c4 100644 --- a/media/vendor/codemirror/addon/mode/loadmode.min.js +++ b/media/vendor/codemirror/addon/mode/loadmode.min.js @@ -1 +1 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),"cjs"):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],function(r){e(r,"amd")}):e(CodeMirror,"plain")}(function(e,r){function o(e,r){var o=r;return function(){0==--o&&e()}}function n(r,n){var t=e.modes[r].dependencies;if(!t)return n();for(var i=[],d=0;d-1?r+n.length:r}var o=n.exec(t?e.slice(t):e);return o?o.index+t+(i?o[0].length:0):-1}var i=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(n),innerActive:null,inner:null}},copyState:function(t){return{outer:e.copyState(n,t.outer),innerActive:t.innerActive,inner:t.innerActive&&e.copyState(t.innerActive.mode,t.inner)}},token:function(r,o){if(o.innerActive){var c=o.innerActive,l=r.string;if(!c.close&&r.sol())return o.innerActive=o.inner=null,this.token(r,o);var s=c.close?t(l,c.close,r.pos,c.parseDelimiters):-1;if(s==r.pos&&!c.parseDelimiters)return r.match(c.close),o.innerActive=o.inner=null,c.delimStyle&&c.delimStyle+" "+c.delimStyle+"-close";s>-1&&(r.string=l.slice(0,s));var u=c.mode.token(r,o.inner);return s>-1&&(r.string=l),s==r.pos&&c.parseDelimiters&&(o.innerActive=o.inner=null),c.innerStyle&&(u=u?u+" "+c.innerStyle:c.innerStyle),u}for(var a=1/0,l=r.string,v=0;v-1?r+n.length:r}var o=n.exec(t?e.slice(t):e);return o?o.index+t+(i?o[0].length:0):-1}var i=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(n),innerActive:null,inner:null}},copyState:function(t){return{outer:e.copyState(n,t.outer),innerActive:t.innerActive,inner:t.innerActive&&e.copyState(t.innerActive.mode,t.inner)}},token:function(r,o){if(o.innerActive){var c=o.innerActive,l=r.string;if(!c.close&&r.sol())return o.innerActive=o.inner=null,this.token(r,o);if((d=c.close?t(l,c.close,r.pos,c.parseDelimiters):-1)==r.pos&&!c.parseDelimiters)return r.match(c.close),o.innerActive=o.inner=null,c.delimStyle&&c.delimStyle+" "+c.delimStyle+"-close";d>-1&&(r.string=l.slice(0,d));var s=c.mode.token(r,o.inner);return d>-1&&(r.string=l),d==r.pos&&c.parseDelimiters&&(o.innerActive=o.inner=null),c.innerStyle&&(s=s?s+" "+c.innerStyle:c.innerStyle),s}for(var u=1/0,l=r.string,a=0;a-1?e+b.length:e}var f=b.exec(c?a.slice(c):a);return f?f.index+c+(d?f[0].length:0):-1}var d=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:a.startState(b),innerActive:null,inner:null}},copyState:function(c){return{outer:a.copyState(b,c.outer),innerActive:c.innerActive,inner:c.innerActive&&a.copyState(c.innerActive.mode,c.inner)}},token:function(e,f){if(f.innerActive){var g=f.innerActive,h=e.string;if(!g.close&&e.sol())return f.innerActive=f.inner=null,this.token(e,f);var i=g.close?c(h,g.close,e.pos,g.parseDelimiters):-1;if(i==e.pos&&!g.parseDelimiters)return e.match(g.close),f.innerActive=f.inner=null,g.delimStyle&&g.delimStyle+" "+g.delimStyle+"-close";i>-1&&(e.string=h.slice(0,i));var j=g.mode.token(e,f.inner);return i>-1&&(e.string=h),i==e.pos&&g.parseDelimiters&&(f.innerActive=f.inner=null),g.innerStyle&&(j=j?j+" "+g.innerStyle:g.innerStyle),j}for(var k=1/0,h=e.string,l=0;l2){a.pending=[];for(var f=2;f-1)return e.Pass;var i=a.indent.length-1,l=t[a.state];e:for(;;){for(var d=0;d2){a.pending=[];for(var f=2;f-1)return e.Pass;var i=a.indent.length-1,l=t[a.state];e:for(;;){for(var d=0;d2){d.pending=[];for(var m=2;m-1)return a.Pass;var g=d.indent.length-1,h=b[d.state];a:for(;;){for(var j=0;j=this.string.length},sol:function(){return 0==this.pos},peek:function(){return this.string.charAt(this.pos)||null},next:function(){if(this.posr},eatSpace:function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},skipToEnd:function(){this.pos=this.string.length},skipTo:function(t){var r=this.string.indexOf(t,this.pos);if(r>-1)return this.pos=r,!0},backUp:function(t){this.pos-=t},column:function(){return this.start-this.lineStart},indentation:function(){return 0},match:function(t,r,e){if("string"!=typeof t){var n=this.string.slice(this.pos).match(t);return n&&n.index>0?null:(n&&!1!==r&&(this.pos+=n[0].length),n)}var i=function(t){return e?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==r&&(this.pos+=t.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(t,r){this.lineStart+=t;try{return r()}finally{this.lineStart-=t}}},CodeMirror.StringStream=r,CodeMirror.startState=function(t,r,e){return!t.startState||t.startState(r,e)};var e=CodeMirror.modes={},n=CodeMirror.mimeModes={};CodeMirror.defineMode=function(t,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),e[t]=r},CodeMirror.defineMIME=function(t,r){n[t]=r},CodeMirror.resolveMode=function(t){return"string"==typeof t&&n.hasOwnProperty(t)?t=n[t]:t&&"string"==typeof t.name&&n.hasOwnProperty(t.name)&&(t=n[t.name]),"string"==typeof t?{name:t}:t||{name:"null"}},CodeMirror.getMode=function(t,r){r=CodeMirror.resolveMode(r);var n=e[r.name];if(!n)throw new Error("Unknown mode: "+r);return n(t,r)},CodeMirror.registerHelper=CodeMirror.registerGlobalHelper=Math.min,CodeMirror.defineMode("null",function(){return{token:function(t){t.skipToEnd()}}}),CodeMirror.defineMIME("text/plain","null"),CodeMirror.runMode=function(r,e,n,i){var o=CodeMirror.getMode({indentUnit:2},e);if(1==n.nodeType){var s=i&&i.tabSize||4,a=n,h=0;a.innerHTML="",n=function(t,r){if("\n"==t)return a.appendChild(document.createElement("br")),void(h=0);for(var e="",n=0;;){var i=t.indexOf("\t",n);if(-1==i){e+=t.slice(n),h+=t.length-n;break}h+=i-n,e+=t.slice(n,i);var o=s-h%s;h+=o;for(var u=0;u=this.string.length},sol:function(){return 0==this.pos},peek:function(){return this.string.charAt(this.pos)||null},next:function(){if(this.posr},eatSpace:function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},skipToEnd:function(){this.pos=this.string.length},skipTo:function(t){var r=this.string.indexOf(t,this.pos);if(r>-1)return this.pos=r,!0},backUp:function(t){this.pos-=t},column:function(){return this.start-this.lineStart},indentation:function(){return 0},match:function(t,r,e){if("string"!=typeof t){var n=this.string.slice(this.pos).match(t);return n&&n.index>0?null:(n&&!1!==r&&(this.pos+=n[0].length),n)}var i=function(t){return e?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==r&&(this.pos+=t.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(t,r){this.lineStart+=t;try{return r()}finally{this.lineStart-=t}}},CodeMirror.StringStream=r,CodeMirror.startState=function(t,r,e){return!t.startState||t.startState(r,e)};var e=CodeMirror.modes={},n=CodeMirror.mimeModes={};CodeMirror.defineMode=function(t,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),e[t]=r},CodeMirror.defineMIME=function(t,r){n[t]=r},CodeMirror.resolveMode=function(t){return"string"==typeof t&&n.hasOwnProperty(t)?t=n[t]:t&&"string"==typeof t.name&&n.hasOwnProperty(t.name)&&(t=n[t.name]),"string"==typeof t?{name:t}:t||{name:"null"}},CodeMirror.getMode=function(t,r){r=CodeMirror.resolveMode(r);var n=e[r.name];if(!n)throw new Error("Unknown mode: "+r);return n(t,r)},CodeMirror.registerHelper=CodeMirror.registerGlobalHelper=Math.min,CodeMirror.defineMode("null",function(){return{token:function(t){t.skipToEnd()}}}),CodeMirror.defineMIME("text/plain","null"),CodeMirror.runMode=function(r,e,n,i){var o=CodeMirror.getMode({indentUnit:2},e);if(1==n.nodeType){var s=i&&i.tabSize||4,a=n,h=0;a.innerHTML="",n=function(t,r){if("\n"==t)return a.appendChild(document.createElement("br")),void(h=0);for(var e="",n=0;;){var i=t.indexOf("\t",n);if(-1==i){e+=t.slice(n),h+=t.length-n;break}h+=i-n,e+=t.slice(n,i);var o=s-h%s;h+=o;for(var u=0;u=this.string.length},sol:function(){return 0==this.pos},peek:function(){return this.string.charAt(this.pos)||null},next:function(){if(this.posb},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);if(b>-1)return this.pos=b,!0},backUp:function(a){this.pos-=a},column:function(){return this.start-this.lineStart},indentation:function(){return 0},match:function(a,b,c){if("string"!=typeof a){var d=this.string.slice(this.pos).match(a);return d&&d.index>0?null:(d&&b!==!1&&(this.pos+=d[0].length),d)}var e=function(a){return c?a.toLowerCase():a};if(e(this.string.substr(this.pos,a.length))==e(a))return b!==!1&&(this.pos+=a.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}}},CodeMirror.StringStream=b,CodeMirror.startState=function(a,b,c){return!a.startState||a.startState(b,c)};var c=CodeMirror.modes={},d=CodeMirror.mimeModes={};CodeMirror.defineMode=function(a,b){arguments.length>2&&(b.dependencies=Array.prototype.slice.call(arguments,2)),c[a]=b},CodeMirror.defineMIME=function(a,b){d[a]=b},CodeMirror.resolveMode=function(a){return"string"==typeof a&&d.hasOwnProperty(a)?a=d[a]:a&&"string"==typeof a.name&&d.hasOwnProperty(a.name)&&(a=d[a.name]),"string"==typeof a?{name:a}:a||{name:"null"}},CodeMirror.getMode=function(a,b){b=CodeMirror.resolveMode(b);var d=c[b.name];if(!d)throw new Error("Unknown mode: "+b);return d(a,b)},CodeMirror.registerHelper=CodeMirror.registerGlobalHelper=Math.min,CodeMirror.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}}),CodeMirror.defineMIME("text/plain","null"),CodeMirror.runMode=function(b,c,d,e){var f=CodeMirror.getMode({indentUnit:2},c);if(1==d.nodeType){var g=e&&e.tabSize||4,h=d,i=0;h.innerHTML="",d=function(a,b){if("\n"==a)return h.appendChild(document.createElement("br")),void(i=0);for(var c="",d=0;;){var e=a.indexOf("\t",d);if(e==-1){c+=a.slice(d),i+=a.length-d;break}i+=e-d,c+=a.slice(d,e);var f=g-i%g;i+=f;for(var j=0;j=e)return o+(e-i);o+=a-i,o+=n-o%n,i=a+1}};StringStream.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pose},eatSpace:function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},skipToEnd:function(){this.pos=this.string.length},skipTo:function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},backUp:function(t){this.pos-=t},column:function(){return this.lastColumnPos0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var s=function(t){return n?t.toLowerCase():t};if(s(this.string.substr(this.pos,t.length))==s(t))return!1!==e&&(this.pos+=t.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}}},exports.StringStream=StringStream,exports.startState=function(t,e,n){return!t.startState||t.startState(e,n)};var modes=exports.modes={},mimeModes=exports.mimeModes={};exports.defineMode=function(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),modes[t]=e},exports.defineMIME=function(t,e){mimeModes[t]=e},exports.defineMode("null",function(){return{token:function(t){t.skipToEnd()}}}),exports.defineMIME("text/plain","null"),exports.resolveMode=function(t){return"string"==typeof t&&mimeModes.hasOwnProperty(t)?t=mimeModes[t]:t&&"string"==typeof t.name&&mimeModes.hasOwnProperty(t.name)&&(t=mimeModes[t.name]),"string"==typeof t?{name:t}:t||{name:"null"}};var modeExtensions=exports.modeExtensions={};exports.extendMode=function(t,e){copyObj(e,modeExtensions.hasOwnProperty(t)?modeExtensions[t]:modeExtensions[t]={})},exports.getMode=function(t,e){var e=exports.resolveMode(e),n=modes[e.name];if(!n)return exports.getMode(t,"text/plain");var r=n(t,e);if(modeExtensions.hasOwnProperty(e.name)){var s=modeExtensions[e.name];for(var i in s)s.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=s[i])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var i in e.modeProps)r[i]=e.modeProps[i];return r},exports.registerHelper=exports.registerGlobalHelper=Math.min,exports.runMode=function(t,e,n,r){for(var s=exports.getMode({indentUnit:2},e),i=splitLines(t),o=r&&r.state||exports.startState(s),a=0,u=i.length;a=e)return o+(e-i);o+=a-i,o+=n-o%n,i=a+1}};StringStream.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pose},eatSpace:function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},skipToEnd:function(){this.pos=this.string.length},skipTo:function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},backUp:function(t){this.pos-=t},column:function(){return this.lastColumnPos0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var s=function(t){return n?t.toLowerCase():t};if(s(this.string.substr(this.pos,t.length))==s(t))return!1!==e&&(this.pos+=t.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}}},exports.StringStream=StringStream,exports.startState=function(t,e,n){return!t.startState||t.startState(e,n)};var modes=exports.modes={},mimeModes=exports.mimeModes={};exports.defineMode=function(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),modes[t]=e},exports.defineMIME=function(t,e){mimeModes[t]=e},exports.defineMode("null",function(){return{token:function(t){t.skipToEnd()}}}),exports.defineMIME("text/plain","null"),exports.resolveMode=function(t){return"string"==typeof t&&mimeModes.hasOwnProperty(t)?t=mimeModes[t]:t&&"string"==typeof t.name&&mimeModes.hasOwnProperty(t.name)&&(t=mimeModes[t.name]),"string"==typeof t?{name:t}:t||{name:"null"}};var modeExtensions=exports.modeExtensions={};exports.extendMode=function(t,e){var n=modeExtensions.hasOwnProperty(t)?modeExtensions[t]:modeExtensions[t]={};copyObj(e,n)},exports.getMode=function(t,e){var e=exports.resolveMode(e),n=modes[e.name];if(!n)return exports.getMode(t,"text/plain");var r=n(t,e);if(modeExtensions.hasOwnProperty(e.name)){var s=modeExtensions[e.name];for(var i in s)s.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=s[i])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var i in e.modeProps)r[i]=e.modeProps[i];return r},exports.registerHelper=exports.registerGlobalHelper=Math.min,exports.runMode=function(t,e,n,r){for(var s=exports.getMode({indentUnit:2},e),i=splitLines(t),o=r&&r.state||exports.startState(s),a=0,u=i.length;a=b)return g+(b-f);g+=h-f,g+=c-g%c,f=h+1}};StringStream.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.posb},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);if(b>-1)return this.pos=b,!0},backUp:function(a){this.pos-=a},column:function(){return this.lastColumnPos0?null:(d&&b!==!1&&(this.pos+=d[0].length),d)}var e=function(a){return c?a.toLowerCase():a};if(e(this.string.substr(this.pos,a.length))==e(a))return b!==!1&&(this.pos+=a.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}}},exports.StringStream=StringStream,exports.startState=function(a,b,c){return!a.startState||a.startState(b,c)};var modes=exports.modes={},mimeModes=exports.mimeModes={};exports.defineMode=function(a,b){arguments.length>2&&(b.dependencies=Array.prototype.slice.call(arguments,2)),modes[a]=b},exports.defineMIME=function(a,b){mimeModes[a]=b},exports.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}}),exports.defineMIME("text/plain","null"),exports.resolveMode=function(a){return"string"==typeof a&&mimeModes.hasOwnProperty(a)?a=mimeModes[a]:a&&"string"==typeof a.name&&mimeModes.hasOwnProperty(a.name)&&(a=mimeModes[a.name]),"string"==typeof a?{name:a}:a||{name:"null"}};var modeExtensions=exports.modeExtensions={};exports.extendMode=function(a,b){copyObj(b,modeExtensions.hasOwnProperty(a)?modeExtensions[a]:modeExtensions[a]={})},exports.getMode=function(a,b){var b=exports.resolveMode(b),c=modes[b.name];if(!c)return exports.getMode(a,"text/plain");var d=c(a,b);if(modeExtensions.hasOwnProperty(b.name)){var e=modeExtensions[b.name];for(var f in e)e.hasOwnProperty(f)&&(d.hasOwnProperty(f)&&(d["_"+f]=d[f]),d[f]=e[f])}if(d.name=b.name,b.helperType&&(d.helperType=b.helperType),b.modeProps)for(var f in b.modeProps)d[f]=b.modeProps[f];return d},exports.registerHelper=exports.registerGlobalHelper=Math.min,exports.runMode=function(a,b,c,d){for(var e=exports.getMode({indentUnit:2},b),f=splitLines(a),g=d&&d.state||exports.startState(e),h=0,i=f.length;hs?i.charCoords(t,"local")[e?"top":"bottom"]:i.heightAtLine(l,"local")+(e?0:l.height)}!1!==t&&this.computeScale();var i=this.cm,n=this.hScale,o=document.createDocumentFragment(),r=this.annotations,a=i.getOption("lineWrapping"),s=a&&1.5*i.defaultTextHeight(),h=null,l=null,d=i.lastLine();if(i.display.barWidth)for(var c,p=0;pd)){for(var f=c||e(u.from,!0)*n,m=e(u.to,!1)*n;pd)&&!((c=e(r[p+1].from,!0)*n)>m+.9);)m=e((u=r[++p]).to,!1)*n;if(m!=f){var g=Math.max(m-f,3),H=o.appendChild(document.createElement("div"));H.style.cssText="position: absolute; right: 0px; width: "+Math.max(i.display.barWidth-1,2)+"px; top: "+(f+this.buttonHeight)+"px; height: "+g+"px",H.className=this.options.className,u.id&&H.setAttribute("annotation-id",u.id)}}}this.div.textContent="",this.div.appendChild(o)},e.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(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";function e(t,e){function i(t){clearTimeout(n.doRedraw),n.doRedraw=setTimeout(function(){n.redraw()},t)}this.cm=t,this.options=e,this.buttonHeight=e.scrollButtonHeight||t.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=t.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var n=this;t.on("refresh",this.resizeHandler=function(){clearTimeout(n.doUpdate),n.doUpdate=setTimeout(function(){n.computeScale()&&i(20)},100)}),t.on("markerAdded",this.resizeHandler),t.on("markerCleared",this.resizeHandler),!1!==e.listenForChanges&&t.on("change",this.changeHandler=function(){i(250)})}t.defineExtension("annotateScrollbar",function(t){return"string"==typeof t&&(t={className:t}),new e(this,t)}),t.defineOption("scrollButtonHeight",0),e.prototype.computeScale=function(){var t=this.cm,e=(t.getWrapperElement().clientHeight-t.display.barHeight-2*this.buttonHeight)/t.getScrollerElement().scrollHeight;if(e!=this.hScale)return this.hScale=e,!0},e.prototype.update=function(t){this.annotations=t,this.redraw()},e.prototype.redraw=function(t){function e(t,e){return h!=t.line&&(h=t.line,l=i.getLineHandle(h)),l.widgets&&l.widgets.length||a&&l.height>s?i.charCoords(t,"local")[e?"top":"bottom"]:i.heightAtLine(l,"local")+(e?0:l.height)}!1!==t&&this.computeScale();var i=this.cm,n=this.hScale,o=document.createDocumentFragment(),r=this.annotations,a=i.getOption("lineWrapping"),s=a&&1.5*i.defaultTextHeight(),h=null,l=null,d=i.lastLine();if(i.display.barWidth)for(var c,p=0;pd)){for(var f=c||e(u.from,!0)*n,m=e(u.to,!1)*n;pd)&&!((c=e(r[p+1].from,!0)*n)>m+.9);)u=r[++p],m=e(u.to,!1)*n;if(m!=f){var g=Math.max(m-f,3),H=o.appendChild(document.createElement("div"));H.style.cssText="position: absolute; right: 0px; width: "+Math.max(i.display.barWidth-1,2)+"px; top: "+(f+this.buttonHeight)+"px; height: "+g+"px",H.className=this.options.className,u.id&&H.setAttribute("annotation-id",u.id)}}}this.div.textContent="",this.div.appendChild(o)},e.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)}}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){function c(a){clearTimeout(d.doRedraw),d.doRedraw=setTimeout(function(){d.redraw()},a)}this.cm=a,this.options=b,this.buttonHeight=b.scrollButtonHeight||a.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=a.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var d=this;a.on("refresh",this.resizeHandler=function(){clearTimeout(d.doUpdate),d.doUpdate=setTimeout(function(){d.computeScale()&&c(20)},100)}),a.on("markerAdded",this.resizeHandler),a.on("markerCleared",this.resizeHandler),b.listenForChanges!==!1&&a.on("change",this.changeHandler=function(){c(250)})}a.defineExtension("annotateScrollbar",function(a){return"string"==typeof a&&(a={className:a}),new b(this,a)}),a.defineOption("scrollButtonHeight",0),b.prototype.computeScale=function(){var a=this.cm,b=(a.getWrapperElement().clientHeight-a.display.barHeight-2*this.buttonHeight)/a.getScrollerElement().scrollHeight;if(b!=this.hScale)return this.hScale=b,!0},b.prototype.update=function(a){this.annotations=a,this.redraw()},b.prototype.redraw=function(a){function b(a,b){return i!=a.line&&(i=a.line,j=c.getLineHandle(i)),j.widgets&&j.widgets.length||g&&j.height>h?c.charCoords(a,"local")[b?"top":"bottom"]:c.heightAtLine(j,"local")+(b?0:j.height)}a!==!1&&this.computeScale();var c=this.cm,d=this.hScale,e=document.createDocumentFragment(),f=this.annotations,g=c.getOption("lineWrapping"),h=g&&1.5*c.defaultTextHeight(),i=null,j=null,k=c.lastLine();if(c.display.barWidth)for(var l,m=0;mk)){for(var o=l||b(n.from,!0)*d,p=b(n.to,!1)*d;mk)&&!((l=b(f[m+1].from,!0)*d)>p+.9);)n=f[++m],p=b(n.to,!1)*d;if(p!=o){var q=Math.max(p-o,3),r=e.appendChild(document.createElement("div"));r.style.cssText="position: absolute; right: 0px; width: "+Math.max(c.display.barWidth-1,2)+"px; top: "+(o+this.buttonHeight)+"px; height: "+q+"px",r.className=this.options.className,n.id&&r.setAttribute("annotation-id",n.id)}}}this.div.textContent="",this.div.appendChild(e)},b.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)}}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/scroll/scrollpastend.min.js b/media/vendor/codemirror/addon/scroll/scrollpastend.min.js index def370cc611f2..3e9ca01694e3a 100644 --- a/media/vendor/codemirror/addon/scroll/scrollpastend.min.js +++ b/media/vendor/codemirror/addon/scroll/scrollpastend.min.js @@ -1 +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 n(n,i){e.changeEnd(i).line==n.lastLine()&&t(n)}function t(e){var n="";e.lineCount()>1&&(n=e.display.scroller.clientHeight-30-e.getLineHandle(e.lastLine()).height+"px"),e.state.scrollPastEndPadding!=n&&(e.state.scrollPastEndPadding=n,e.display.lineSpace.parentNode.style.paddingBottom=n,e.off("refresh",t),e.setSize(),e.on("refresh",t))}e.defineOption("scrollPastEnd",!1,function(i,o,d){d&&d!=e.Init&&(i.off("change",n),i.off("refresh",t),i.display.lineSpace.parentNode.style.paddingBottom="",i.state.scrollPastEndPadding=null),o&&(i.on("change",n),i.on("refresh",t),t(i))})}),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 n(n,i){e.changeEnd(i).line==n.lastLine()&&t(n)}function t(e){var n="";e.lineCount()>1&&(n=e.display.scroller.clientHeight-30-e.getLineHandle(e.lastLine()).height+"px"),e.state.scrollPastEndPadding!=n&&(e.state.scrollPastEndPadding=n,e.display.lineSpace.parentNode.style.paddingBottom=n,e.off("refresh",t),e.setSize(),e.on("refresh",t))}e.defineOption("scrollPastEnd",!1,function(i,o,d){d&&d!=e.Init&&(i.off("change",n),i.off("refresh",t),i.display.lineSpace.parentNode.style.paddingBottom="",i.state.scrollPastEndPadding=null),o&&(i.on("change",n),i.on("refresh",t),t(i))})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(b,d){a.changeEnd(d).line==b.lastLine()&&c(b)}function c(a){var b="";if(a.lineCount()>1){b=a.display.scroller.clientHeight-30-a.getLineHandle(a.lastLine()).height+"px"}a.state.scrollPastEndPadding!=b&&(a.state.scrollPastEndPadding=b,a.display.lineSpace.parentNode.style.paddingBottom=b,a.off("refresh",c),a.setSize(),a.on("refresh",c))}a.defineOption("scrollPastEnd",!1,function(d,e,f){f&&f!=a.Init&&(d.off("change",b),d.off("refresh",c),d.display.lineSpace.parentNode.style.paddingBottom="",d.state.scrollPastEndPadding=null),e&&(d.on("change",b),d.on("refresh",c),c(d))})}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/scroll/simplescrollbars.min.js b/media/vendor/codemirror/addon/scroll/simplescrollbars.min.js index 6d79c008f41ee..4e0e02f58da9a 100644 --- a/media/vendor/codemirror/addon/scroll/simplescrollbars.min.js +++ b/media/vendor/codemirror/addon/scroll/simplescrollbars.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";function e(e,o,i){function n(e){var o=t.wheelEventPixels(e)["horizontal"==s.orientation?"x":"y"],i=s.pos;s.moveTo(s.pos+o),s.pos!=i&&t.e_preventDefault(e)}this.orientation=o,this.scroll=i,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=e+"-"+o,this.inner=this.node.appendChild(document.createElement("div"));var s=this;t.on(this.inner,"mousedown",function(e){function o(){t.off(document,"mousemove",i),t.off(document,"mouseup",o)}function i(t){if(1!=t.which)return o();s.moveTo(h+(t[n]-r)*(s.total/s.size))}if(1==e.which){t.e_preventDefault(e);var n="horizontal"==s.orientation?"pageX":"pageY",r=e[n],h=s.pos;t.on(document,"mousemove",i),t.on(document,"mouseup",o)}}),t.on(this.node,"click",function(e){t.e_preventDefault(e);var o,i=s.inner.getBoundingClientRect();o="horizontal"==s.orientation?e.clientXi.right?1:0:e.clientYi.bottom?1:0,s.moveTo(s.pos+o*s.screen)}),t.on(this.node,"mousewheel",n),t.on(this.node,"DOMMouseScroll",n)}function o(t,o,i){this.addClass=t,this.horiz=new e(t,"horizontal",i),o(this.horiz.node),this.vert=new e(t,"vertical",i),o(this.vert.node),this.width=null}e.prototype.setPos=function(t,e){return t<0&&(t=0),t>this.total-this.screen&&(t=this.total-this.screen),!(!e&&t==this.pos)&&(this.pos=t,this.inner.style["horizontal"==this.orientation?"left":"top"]=t*(this.size/this.total)+"px",!0)},e.prototype.moveTo=function(t){this.setPos(t)&&this.scroll(t,this.orientation)};e.prototype.update=function(t,e,o){var i=this.screen!=e||this.total!=t||this.size!=o;i&&(this.screen=e,this.total=t,this.size=o);var n=this.screen*(this.size/this.total);n<10&&(this.size-=10-n,n=10),this.inner.style["horizontal"==this.orientation?"width":"height"]=n+"px",this.setPos(this.pos,i)},o.prototype.update=function(t){if(null==this.width){var e=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;e&&(this.width=parseInt(e.height))}var o=this.width||0,i=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1;return this.vert.node.style.display=n?"block":"none",this.horiz.node.style.display=i?"block":"none",n&&(this.vert.update(t.scrollHeight,t.clientHeight,t.viewHeight-(i?o:0)),this.vert.node.style.bottom=i?o+"px":"0"),i&&(this.horiz.update(t.scrollWidth,t.clientWidth,t.viewWidth-(n?o:0)-t.barLeft),this.horiz.node.style.right=n?o+"px":"0",this.horiz.node.style.left=t.barLeft+"px"),{right:n?o:0,bottom:i?o:0}},o.prototype.setScrollTop=function(t){this.vert.setPos(t)},o.prototype.setScrollLeft=function(t){this.horiz.setPos(t)},o.prototype.clear=function(){var t=this.horiz.node.parentNode;t.removeChild(this.horiz.node),t.removeChild(this.vert.node)},t.scrollbarModel.simple=function(t,e){return new o("CodeMirror-simplescroll",t,e)},t.scrollbarModel.overlay=function(t,e){return new o("CodeMirror-overlayscroll",t,e)}}),function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";function e(e,o,i){function n(e){var o=t.wheelEventPixels(e)["horizontal"==s.orientation?"x":"y"],i=s.pos;s.moveTo(s.pos+o),s.pos!=i&&t.e_preventDefault(e)}this.orientation=o,this.scroll=i,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=e+"-"+o,this.inner=this.node.appendChild(document.createElement("div"));var s=this;t.on(this.inner,"mousedown",function(e){function o(){t.off(document,"mousemove",i),t.off(document,"mouseup",o)}function i(t){if(1!=t.which)return o();s.moveTo(h+(t[n]-r)*(s.total/s.size))}if(1==e.which){t.e_preventDefault(e);var n="horizontal"==s.orientation?"pageX":"pageY",r=e[n],h=s.pos;t.on(document,"mousemove",i),t.on(document,"mouseup",o)}}),t.on(this.node,"click",function(e){t.e_preventDefault(e);var o,i=s.inner.getBoundingClientRect();o="horizontal"==s.orientation?e.clientXi.right?1:0:e.clientYi.bottom?1:0,s.moveTo(s.pos+o*s.screen)}),t.on(this.node,"mousewheel",n),t.on(this.node,"DOMMouseScroll",n)}function o(t,o,i){this.addClass=t,this.horiz=new e(t,"horizontal",i),o(this.horiz.node),this.vert=new e(t,"vertical",i),o(this.vert.node),this.width=null}e.prototype.setPos=function(t,e){return t<0&&(t=0),t>this.total-this.screen&&(t=this.total-this.screen),!(!e&&t==this.pos||(this.pos=t,this.inner.style["horizontal"==this.orientation?"left":"top"]=t*(this.size/this.total)+"px",0))},e.prototype.moveTo=function(t){this.setPos(t)&&this.scroll(t,this.orientation)},e.prototype.update=function(t,e,o){var i=this.screen!=e||this.total!=t||this.size!=o;i&&(this.screen=e,this.total=t,this.size=o);var n=this.screen*(this.size/this.total);n<10&&(this.size-=10-n,n=10),this.inner.style["horizontal"==this.orientation?"width":"height"]=n+"px",this.setPos(this.pos,i)},o.prototype.update=function(t){if(null==this.width){var e=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;e&&(this.width=parseInt(e.height))}var o=this.width||0,i=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1;return this.vert.node.style.display=n?"block":"none",this.horiz.node.style.display=i?"block":"none",n&&(this.vert.update(t.scrollHeight,t.clientHeight,t.viewHeight-(i?o:0)),this.vert.node.style.bottom=i?o+"px":"0"),i&&(this.horiz.update(t.scrollWidth,t.clientWidth,t.viewWidth-(n?o:0)-t.barLeft),this.horiz.node.style.right=n?o+"px":"0",this.horiz.node.style.left=t.barLeft+"px"),{right:n?o:0,bottom:i?o:0}},o.prototype.setScrollTop=function(t){this.vert.setPos(t)},o.prototype.setScrollLeft=function(t){this.horiz.setPos(t)},o.prototype.clear=function(){var t=this.horiz.node.parentNode;t.removeChild(this.horiz.node),t.removeChild(this.vert.node)},t.scrollbarModel.simple=function(t,e){return new o("CodeMirror-simplescroll",t,e)},t.scrollbarModel.overlay=function(t,e){return new o("CodeMirror-overlayscroll",t,e)}}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(b,c,d){function e(b){var c=a.wheelEventPixels(b)["horizontal"==f.orientation?"x":"y"],d=f.pos;f.moveTo(f.pos+c),f.pos!=d&&a.e_preventDefault(b)}this.orientation=c,this.scroll=d,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=b+"-"+c,this.inner=this.node.appendChild(document.createElement("div"));var f=this;a.on(this.inner,"mousedown",function(b){function c(){a.off(document,"mousemove",d),a.off(document,"mouseup",c)}function d(a){if(1!=a.which)return c();f.moveTo(h+(a[e]-g)*(f.total/f.size))}if(1==b.which){a.e_preventDefault(b);var e="horizontal"==f.orientation?"pageX":"pageY",g=b[e],h=f.pos;a.on(document,"mousemove",d),a.on(document,"mouseup",c)}}),a.on(this.node,"click",function(b){a.e_preventDefault(b);var c,d=f.inner.getBoundingClientRect();c="horizontal"==f.orientation?b.clientXd.right?1:0:b.clientYd.bottom?1:0,f.moveTo(f.pos+c*f.screen)}),a.on(this.node,"mousewheel",e),a.on(this.node,"DOMMouseScroll",e)}function c(a,c,d){this.addClass=a,this.horiz=new b(a,"horizontal",d),c(this.horiz.node),this.vert=new b(a,"vertical",d),c(this.vert.node),this.width=null}b.prototype.setPos=function(a,b){return a<0&&(a=0),a>this.total-this.screen&&(a=this.total-this.screen),!(!b&&a==this.pos)&&(this.pos=a,this.inner.style["horizontal"==this.orientation?"left":"top"]=a*(this.size/this.total)+"px",!0)},b.prototype.moveTo=function(a){this.setPos(a)&&this.scroll(a,this.orientation)};b.prototype.update=function(a,b,c){var d=this.screen!=b||this.total!=a||this.size!=c;d&&(this.screen=b,this.total=a,this.size=c);var e=this.screen*(this.size/this.total);e<10&&(this.size-=10-e,e=10),this.inner.style["horizontal"==this.orientation?"width":"height"]=e+"px",this.setPos(this.pos,d)},c.prototype.update=function(a){if(null==this.width){var b=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;b&&(this.width=parseInt(b.height))}var c=this.width||0,d=a.scrollWidth>a.clientWidth+1,e=a.scrollHeight>a.clientHeight+1;return this.vert.node.style.display=e?"block":"none",this.horiz.node.style.display=d?"block":"none",e&&(this.vert.update(a.scrollHeight,a.clientHeight,a.viewHeight-(d?c:0)),this.vert.node.style.bottom=d?c+"px":"0"),d&&(this.horiz.update(a.scrollWidth,a.clientWidth,a.viewWidth-(e?c:0)-a.barLeft),this.horiz.node.style.right=e?c+"px":"0",this.horiz.node.style.left=a.barLeft+"px"),{right:e?c:0,bottom:d?c:0}},c.prototype.setScrollTop=function(a){this.vert.setPos(a)},c.prototype.setScrollLeft=function(a){this.horiz.setPos(a)},c.prototype.clear=function(){var a=this.horiz.node.parentNode;a.removeChild(this.horiz.node),a.removeChild(this.vert.node)},a.scrollbarModel.simple=function(a,b){return new c("CodeMirror-simplescroll",a,b)},a.scrollbarModel.overlay=function(a,b){return new c("CodeMirror-overlayscroll",a,b)}}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/search/jump-to-line.min.js b/media/vendor/codemirror/addon/search/jump-to-line.min.js index 1fbce2dbd0d0a..f93c2825e99a0 100644 --- a/media/vendor/codemirror/addon/search/jump-to-line.min.js +++ b/media/vendor/codemirror/addon/search/jump-to-line.min.js @@ -1 +1 @@ -!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 o(e,o,r,i,t){e.openDialog?e.openDialog(o,t,{value:i,selectValueOnOpen:!0}):t(prompt(r,i))}function r(e,o){var r=Number(o);return/^[-+]/.test(o)?e.getCursor().line+r:r-1}e.commands.jumpToLine=function(e){var i=e.getCursor();o(e,'Jump to line: (Use line:column or scroll% syntax)',"Jump to line:",i.line+1+":"+i.ch,function(o){if(o){var t;if(t=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(o))e.setCursor(r(e,t[1]),Number(t[2]));else if(t=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(o)){var n=Math.round(e.lineCount()*Number(t[1])/100);/^[-+]/.test(t[1])&&(n=i.line+n+1),e.setCursor(n-1,i.ch)}else(t=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(o))&&e.setCursor(r(e,t[1]),i.ch)}})},e.keyMap.default["Alt-G"]="jumpToLine"}),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 o(e,o,r,i,t){e.openDialog?e.openDialog(o,t,{value:i,selectValueOnOpen:!0}):t(prompt(r,i))}function r(e,o){var r=Number(o);return/^[-+]/.test(o)?e.getCursor().line+r:r-1}e.commands.jumpToLine=function(e){var i=e.getCursor();o(e,'Jump to line: (Use line:column or scroll% syntax)',"Jump to line:",i.line+1+":"+i.ch,function(o){if(o){var t;if(t=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(o))e.setCursor(r(e,t[1]),Number(t[2]));else if(t=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(o)){var n=Math.round(e.lineCount()*Number(t[1])/100);/^[-+]/.test(t[1])&&(n=i.line+n+1),e.setCursor(n-1,i.ch)}else(t=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(o))&&e.setCursor(r(e,t[1]),i.ch)}})},e.keyMap.default["Alt-G"]="jumpToLine"}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../dialog/dialog"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,c,d,e){a.openDialog?a.openDialog(b,e,{value:d,selectValueOnOpen:!0}):e(prompt(c,d))}function c(a,b){var c=Number(b);return/^[-+]/.test(b)?a.getCursor().line+c:c-1}a.commands.jumpToLine=function(a){var d=a.getCursor();b(a,'Jump to line: (Use line:column or scroll% syntax)',"Jump to line:",d.line+1+":"+d.ch,function(b){if(b){var e;if(e=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(b))a.setCursor(c(a,e[1]),Number(e[2]));else if(e=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(b)){var f=Math.round(a.lineCount()*Number(e[1])/100);/^[-+]/.test(e[1])&&(f=d.line+f+1),a.setCursor(f-1,d.ch)}else(e=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(b))&&a.setCursor(c(a,e[1]),d.ch)}})},a.keyMap.default["Alt-G"]="jumpToLine"}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/search/match-highlighter.min.js b/media/vendor/codemirror/addon/search/match-highlighter.min.js index 88ed2870bf132..a087af91a6484 100644 --- a/media/vendor/codemirror/addon/search/match-highlighter.min.js +++ b/media/vendor/codemirror/addon/search/match-highlighter.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("./matchesonscrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./matchesonscrollbar"],t):t(CodeMirror)}(function(t){"use strict";function e(t){this.options={};for(var e in u)this.options[e]=(t&&t.hasOwnProperty(e)?t:u)[e];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function o(t){var e=t.state.matchHighlighter;(e.active||t.hasFocus())&&n(t,e)}function i(t){var e=t.state.matchHighlighter;e.active||(e.active=!0,n(t,e))}function n(t,e){clearTimeout(e.timeout),e.timeout=setTimeout(function(){s(t)},e.options.delay)}function r(t,e,o,i){var n=t.state.matchHighlighter;if(t.addOverlay(n.overlay=h(e,o,i)),n.options.annotateScrollbar&&t.showMatchesOnScrollbar){var r=o?new RegExp("\\b"+e+"\\b"):e;n.matchesonscroll=t.showMatchesOnScrollbar(r,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function a(t){var e=t.state.matchHighlighter;e.overlay&&(t.removeOverlay(e.overlay),e.overlay=null,e.matchesonscroll&&(e.matchesonscroll.clear(),e.matchesonscroll=null))}function s(t){t.operation(function(){var e=t.state.matchHighlighter;if(a(t),!t.somethingSelected()&&e.options.showToken){for(var o=!0===e.options.showToken?/[\w$]/:e.options.showToken,i=t.getCursor(),n=t.getLine(i.line),s=i.ch,l=s;s&&o.test(n.charAt(s-1));)--s;for(;l=e.options.minChars&&r(t,g,!1,e.options.style)}})}function c(t,e,o){if(null!==t.getRange(e,o).match(/^\w+$/)){if(e.ch>0){i={line:e.line,ch:e.ch-1};if(null===(n=t.getRange(i,e)).match(/\W/))return!1}if(o.ch=e.options.minChars&&r(t,g,!1,e.options.style)}})}function c(t,e,o){if(null!==t.getRange(e,o).match(/^\w+$/)){if(e.ch>0){i={line:e.line,ch:e.ch-1};if(null===(n=t.getRange(i,e)).match(/\W/))return!1}if(o.ch=b.options.minChars&&f(a,m,!1,b.options.style)}})}function i(a,b,c){if(null!==a.getRange(b,c).match(/^\w+$/)){if(b.ch>0){var d={line:b.line,ch:b.ch-1},e=a.getRange(d,b);if(null===e.match(/\W/))return!1}if(c.ch=this.gap.to);e++)a.to.line>=this.gap.from&&this.matches.splice(e--,1);for(var i=this.cm.getSearchCursor(this.query,t.Pos(this.gap.from,0),this.caseFold),o=this.options&&this.options.maxMatches||1e3;i.findNext();){var a={from:i.from(),to:i.to()};if(a.from.line>=this.gap.to)break;if(this.matches.splice(e++,0,a),this.matches.length>o)break}this.gap=null}},e.prototype.onChange=function(e){var o=e.from.line,a=t.changeEnd(e).line,n=a-e.to.line;if(this.gap?(this.gap.from=Math.min(i(this.gap.from,o,n),e.from.line),this.gap.to=Math.max(i(this.gap.to,o,n),e.from.line)):this.gap={from:e.from.line,to:a+1},n)for(var s=0;s=this.gap.to);e++)a.to.line>=this.gap.from&&this.matches.splice(e--,1);for(var i=this.cm.getSearchCursor(this.query,t.Pos(this.gap.from,0),this.caseFold),o=this.options&&this.options.maxMatches||1e3;i.findNext();){var a={from:i.from(),to:i.to()};if(a.from.line>=this.gap.to)break;if(this.matches.splice(e++,0,a),this.matches.length>o)break}this.gap=null}},e.prototype.onChange=function(e){var o=e.from.line,a=t.changeEnd(e).line,n=a-e.to.line;if(this.gap?(this.gap.from=Math.min(i(this.gap.from,o,n),e.from.line),this.gap.to=Math.max(i(this.gap.to,o,n),e.from.line)):this.gap={from:e.from.line,to:a+1},n)for(var s=0;s=this.gap.to)break;c.to.line>=this.gap.from&&this.matches.splice(b--,1)}for(var d=this.cm.getSearchCursor(this.query,a.Pos(this.gap.from,0),this.caseFold),e=this.options&&this.options.maxMatches||1e3;d.findNext();){var c={from:d.from(),to:d.to()};if(c.from.line>=this.gap.to)break;if(this.matches.splice(b++,0,c),this.matches.length>e)break}this.gap=null}},b.prototype.onChange=function(b){var d=b.from.line,e=a.changeEnd(b).line,f=e-b.to.line;if(this.gap?(this.gap.from=Math.min(c(this.gap.from,d,f),b.from.line),this.gap.to=Math.max(c(this.gap.to,d,f),b.from.line)):this.gap={from:b.from.line,to:e+1},f)for(var g=0;gn.cursorCoords(o,"window").top&&((u=r).style.opacity=.4)}))};a(n,h,l,p,function(o,t){var i=e.keyName(o),a=e.keyMap[n.getOption("keyMap")][i];a||(a=n.getOption("extraKeys")[i]),"findNext"==a||"findPrev"==a||"findPersistentNext"==a||"findPersistentPrev"==a?(e.e_stop(o),f(n,r(n),t),n.execCommand(a)):"find"!=a&&"findPersistent"!=a||(e.e_stop(o),p(t,o))}),i&&l&&(f(n,c,l),d(n,o))}else s(n,h,"Search for:",l,function(e){e&&!c.query&&n.operation(function(){f(n,c,e),c.posFrom=c.posTo=n.getCursor(),d(n,o)})})}function d(n,o,t){n.operation(function(){var a=r(n),s=i(n,a.query,o?a.posFrom:a.posTo);(s.find(o)||(s=i(n,a.query,o?e.Pos(n.lastLine()):e.Pos(n.firstLine(),0))).find(o))&&(n.setSelection(s.from(),s.to()),n.scrollIntoView({from:s.from(),to:s.to()},20),a.posFrom=s.from(),a.posTo=s.to(),t&&t(s.from(),s.to()))})}function y(e){e.operation(function(){var n=r(e);n.lastQuery=n.query,n.query&&(n.query=n.queryText=null,e.removeOverlay(n.overlay),n.annotate&&(n.annotate.clear(),n.annotate=null))})}function m(e,n,o){e.operation(function(){for(var r=i(e,n);r.findNext();)if("string"!=typeof n){var t=e.getRange(r.from(),r.to()).match(n);r.replace(o.replace(/\$(\d)/g,function(e,n){return t[n]}))}else r.replace(o)})}function g(e,n){if(!e.getOption("readOnly")){var o=e.getSelection()||r(e).lastQuery,t=''+(n?"Replace all:":"Replace:")+"";s(e,t+v,t,o,function(o){o&&(o=u(o),s(e,x,"Replace with:","",function(r){if(r=l(r),n)m(e,o,r);else{y(e);var t=i(e,o,e.getCursor("from")),a=function(){var n,l=t.from();!(n=t.findNext())&&(t=i(e,o),!(n=t.findNext())||l&&t.from().line==l.line&&t.from().ch==l.ch)||(e.setSelection(t.from(),t.to()),e.scrollIntoView({from:t.from(),to:t.to()}),c(e,C,"Replace?",[function(){s(n)},a,function(){m(e,o,r)}]))},s=function(e){t.replace("string"==typeof o?r:r.replace(/\$(\d)/g,function(n,o){return e[o]})),a()};a()}}))})}}var h='Search: (Use /re/ syntax for regexp search)',v=' (Use /re/ syntax for regexp search)',x='With: ',C='Replace? ';e.commands.find=function(e){y(e),p(e)},e.commands.findPersistent=function(e){y(e),p(e,!1,!0)},e.commands.findPersistentNext=function(e){p(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){p(e,!0,!0,!0)},e.commands.findNext=p,e.commands.findPrev=function(e){p(e,!0)},e.commands.clearSearch=y,e.commands.replace=g,e.commands.replaceAll=function(e){g(e,!0)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],e):e(CodeMirror)}(function(e){"use strict";function n(e,n){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),n?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(n){e.lastIndex=n.pos;var o=e.exec(n.string);if(o&&o.index==n.pos)return n.pos+=o[0].length||1,"searching";o?n.pos=o.index:n.skipToEnd()}}}function o(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function r(e){return e.state.search||(e.state.search=new o)}function t(e){return"string"==typeof e&&e==e.toLowerCase()}function i(e,n,o){return e.getSearchCursor(n,o,t(n))}function a(e,n,o,r,t){e.openDialog(n,r,{value:o,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){y(e)},onKeyDown:t})}function s(e,n,o,r,t){e.openDialog?e.openDialog(n,t,{value:r,selectValueOnOpen:!0}):t(prompt(o,r))}function c(e,n,o,r){e.openConfirm?e.openConfirm(n,r):confirm(o)&&r[0]()}function l(e){return e.replace(/\\(.)/g,function(e,n){return"n"==n?"\n":"r"==n?"\r":n})}function u(e){var n=e.match(/^\/(.*)\/([a-z]*)$/);if(n)try{e=new RegExp(n[1],-1==n[2].indexOf("i")?"":"i")}catch(e){}else e=l(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function f(e,o,r){o.queryText=r,o.query=u(r),e.removeOverlay(o.overlay,t(o.query)),o.overlay=n(o.query,t(o.query)),e.addOverlay(o.overlay),e.showMatchesOnScrollbar&&(o.annotate&&(o.annotate.clear(),o.annotate=null),o.annotate=e.showMatchesOnScrollbar(o.query,t(o.query)))}function p(n,o,t,i){var c=r(n);if(c.query)return d(n,o);var l=n.getSelection()||c.lastQuery;if(t&&n.openDialog){var u=null,p=function(o,r){e.e_stop(r),o&&(o!=c.queryText&&(f(n,c,o),c.posFrom=c.posTo=n.getCursor()),u&&(u.style.opacity=1),d(n,r.shiftKey,function(e,o){var r;o.line<3&&document.querySelector&&(r=n.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>n.cursorCoords(o,"window").top&&((u=r).style.opacity=.4)}))};a(n,h,l,p,function(o,t){var i=e.keyName(o),a=e.keyMap[n.getOption("keyMap")][i];a||(a=n.getOption("extraKeys")[i]),"findNext"==a||"findPrev"==a||"findPersistentNext"==a||"findPersistentPrev"==a?(e.e_stop(o),f(n,r(n),t),n.execCommand(a)):"find"!=a&&"findPersistent"!=a||(e.e_stop(o),p(t,o))}),i&&l&&(f(n,c,l),d(n,o))}else s(n,h,"Search for:",l,function(e){e&&!c.query&&n.operation(function(){f(n,c,e),c.posFrom=c.posTo=n.getCursor(),d(n,o)})})}function d(n,o,t){n.operation(function(){var a=r(n),s=i(n,a.query,o?a.posFrom:a.posTo);(s.find(o)||(s=i(n,a.query,o?e.Pos(n.lastLine()):e.Pos(n.firstLine(),0))).find(o))&&(n.setSelection(s.from(),s.to()),n.scrollIntoView({from:s.from(),to:s.to()},20),a.posFrom=s.from(),a.posTo=s.to(),t&&t(s.from(),s.to()))})}function y(e){e.operation(function(){var n=r(e);n.lastQuery=n.query,n.query&&(n.query=n.queryText=null,e.removeOverlay(n.overlay),n.annotate&&(n.annotate.clear(),n.annotate=null))})}function m(e,n,o){e.operation(function(){for(var r=i(e,n);r.findNext();)if("string"!=typeof n){var t=e.getRange(r.from(),r.to()).match(n);r.replace(o.replace(/\$(\d)/g,function(e,n){return t[n]}))}else r.replace(o)})}function g(e,n){if(!e.getOption("readOnly")){var o=e.getSelection()||r(e).lastQuery,t=''+(n?"Replace all:":"Replace:")+"";s(e,t+v,t,o,function(o){o&&(o=u(o),s(e,x,"Replace with:","",function(r){if(r=l(r),n)m(e,o,r);else{y(e);var t=i(e,o,e.getCursor("from")),a=function(){var n,l=t.from();!(n=t.findNext())&&(t=i(e,o),!(n=t.findNext())||l&&t.from().line==l.line&&t.from().ch==l.ch)||(e.setSelection(t.from(),t.to()),e.scrollIntoView({from:t.from(),to:t.to()}),c(e,C,"Replace?",[function(){s(n)},a,function(){m(e,o,r)}]))},s=function(e){t.replace("string"==typeof o?r:r.replace(/\$(\d)/g,function(n,o){return e[o]})),a()};a()}}))})}}var h='Search: (Use /re/ syntax for regexp search)',v=' (Use /re/ syntax for regexp search)',x='With: ',C='Replace? ';e.commands.find=function(e){y(e),p(e)},e.commands.findPersistent=function(e){y(e),p(e,!1,!0)},e.commands.findPersistentNext=function(e){p(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){p(e,!0,!0,!0)},e.commands.findNext=p,e.commands.findPrev=function(e){p(e,!0)},e.commands.clearSearch=y,e.commands.replace=g,e.commands.replaceAll=function(e){g(e,!0)}}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){return"string"==typeof a?a=new RegExp(a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),b?"gi":"g"):a.global||(a=new RegExp(a.source,a.ignoreCase?"gi":"g")),{token:function(b){a.lastIndex=b.pos;var c=a.exec(b.string);if(c&&c.index==b.pos)return b.pos+=c[0].length||1,"searching";c?b.pos=c.index:b.skipToEnd()}}}function c(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function d(a){return a.state.search||(a.state.search=new c)}function e(a){return"string"==typeof a&&a==a.toLowerCase()}function f(a,b,c){return a.getSearchCursor(b,c,e(b))}function g(a,b,c,d,e){a.openDialog(b,d,{value:c,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){o(a)},onKeyDown:e})}function h(a,b,c,d,e){a.openDialog?a.openDialog(b,e,{value:d,selectValueOnOpen:!0}):e(prompt(c,d))}function i(a,b,c,d){a.openConfirm?a.openConfirm(b,d):confirm(c)&&d[0]()}function j(a){return a.replace(/\\(.)/g,function(a,b){return"n"==b?"\n":"r"==b?"\r":b})}function k(a){var b=a.match(/^\/(.*)\/([a-z]*)$/);if(b)try{a=new RegExp(b[1],b[2].indexOf("i")==-1?"":"i")}catch(a){}else a=j(a);return("string"==typeof a?""==a:a.test(""))&&(a=/x^/),a}function l(a,c,d){c.queryText=d,c.query=k(d),a.removeOverlay(c.overlay,e(c.query)),c.overlay=b(c.query,e(c.query)),a.addOverlay(c.overlay),a.showMatchesOnScrollbar&&(c.annotate&&(c.annotate.clear(),c.annotate=null),c.annotate=a.showMatchesOnScrollbar(c.query,e(c.query)))}function m(b,c,e,f){var i=d(b);if(i.query)return n(b,c);var j=b.getSelection()||i.lastQuery;if(e&&b.openDialog){var k=null,m=function(c,d){a.e_stop(d),c&&(c!=i.queryText&&(l(b,i,c),i.posFrom=i.posTo=b.getCursor()),k&&(k.style.opacity=1),n(b,d.shiftKey,function(a,c){var d;c.line<3&&document.querySelector&&(d=b.display.wrapper.querySelector(".CodeMirror-dialog"))&&d.getBoundingClientRect().bottom-4>b.cursorCoords(c,"window").top&&((k=d).style.opacity=.4)}))};g(b,r,j,m,function(c,e){var f=a.keyName(c),g=a.keyMap[b.getOption("keyMap")][f];g||(g=b.getOption("extraKeys")[f]),"findNext"==g||"findPrev"==g||"findPersistentNext"==g||"findPersistentPrev"==g?(a.e_stop(c),l(b,d(b),e),b.execCommand(g)):"find"!=g&&"findPersistent"!=g||(a.e_stop(c),m(e,c))}),f&&j&&(l(b,i,j),n(b,c))}else h(b,r,"Search for:",j,function(a){a&&!i.query&&b.operation(function(){l(b,i,a),i.posFrom=i.posTo=b.getCursor(),n(b,c)})})}function n(b,c,e){b.operation(function(){var g=d(b),h=f(b,g.query,c?g.posFrom:g.posTo);(h.find(c)||(h=f(b,g.query,c?a.Pos(b.lastLine()):a.Pos(b.firstLine(),0)),h.find(c)))&&(b.setSelection(h.from(),h.to()),b.scrollIntoView({from:h.from(),to:h.to()},20),g.posFrom=h.from(),g.posTo=h.to(),e&&e(h.from(),h.to()))})}function o(a){a.operation(function(){var b=d(a);b.lastQuery=b.query,b.query&&(b.query=b.queryText=null,a.removeOverlay(b.overlay),b.annotate&&(b.annotate.clear(),b.annotate=null))})}function p(a,b,c){a.operation(function(){for(var d=f(a,b);d.findNext();)if("string"!=typeof b){var e=a.getRange(d.from(),d.to()).match(b);d.replace(c.replace(/\$(\d)/g,function(a,b){return e[b]}))}else d.replace(c)})}function q(a,b){if(!a.getOption("readOnly")){var c=a.getSelection()||d(a).lastQuery,e=''+(b?"Replace all:":"Replace:")+"";h(a,e+s,e,c,function(c){c&&(c=k(c),h(a,t,"Replace with:","",function(d){if(d=j(d),b)p(a,c,d);else{o(a);var e=f(a,c,a.getCursor("from")),g=function(){var b,j=e.from();!(b=e.findNext())&&(e=f(a,c),!(b=e.findNext())||j&&e.from().line==j.line&&e.from().ch==j.ch)||(a.setSelection(e.from(),e.to()),a.scrollIntoView({from:e.from(),to:e.to()}),i(a,u,"Replace?",[function(){h(b)},g,function(){p(a,c,d)}]))},h=function(a){e.replace("string"==typeof c?d:d.replace(/\$(\d)/g,function(b,c){return a[c]})),g()};g()}}))})}}var r='Search: (Use /re/ syntax for regexp search)',s=' (Use /re/ syntax for regexp search)',t='With: ',u='Replace? ';a.commands.find=function(a){o(a),m(a)},a.commands.findPersistent=function(a){o(a),m(a,!1,!0)},a.commands.findPersistentNext=function(a){m(a,!1,!0,!0)},a.commands.findPersistentPrev=function(a){m(a,!0,!0,!0)},a.commands.findNext=m,a.commands.findPrev=function(a){m(a,!0)},a.commands.clearSearch=o,a.commands.replace=q,a.commands.replaceAll=function(a){q(a,!0)}}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/search/searchcursor.min.js b/media/vendor/codemirror/addon/search/searchcursor.min.js index fcfb3b82affa5..41884e8c39e7f 100644 --- a/media/vendor/codemirror/addon/search/searchcursor.min.js +++ b/media/vendor/codemirror/addon/search/searchcursor.min.js @@ -1 +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,t,r,o){if(this.atOccurrence=!1,this.doc=e,null==o&&"string"==typeof t&&(o=!1),r=r?e.clipPos(r):i(0,0),this.pos={from:r,to:r},"string"!=typeof t)t.global||(t=new RegExp(t.source,t.ignoreCase?"ig":"g")),this.matches=function(n,r){if(n){t.lastIndex=0;for(var o,s,l=e.getLine(r.line).slice(0,r.ch),f=0;;){t.lastIndex=f;var h=t.exec(l);if(!h)break;if(o=h,s=o.index,(f=o.index+(o[0].length||1))==l.length)break}(c=o&&o[0].length||0)||(0==s&&0==l.length?o=void 0:s!=e.getLine(r.line).length&&c++)}else{t.lastIndex=r.ch;var l=e.getLine(r.line),c=(o=t.exec(l))&&o[0].length||0;(s=o&&o.index)+c==l.length||c||(c=1)}if(o&&c)return{from:i(r.line,s),to:i(r.line,s+c),match:o}};else{var s=t;o&&(t=t.toLowerCase());var l=o?function(e){return e.toLowerCase()}:function(e){return e},f=t.split("\n");if(1==f.length)t.length?this.matches=function(r,o){if(r){f=e.getLine(o.line).slice(0,o.ch);if((c=(h=l(f)).lastIndexOf(t))>-1)return c=n(f,h,c),{from:i(o.line,c),to:i(o.line,c+s.length)}}else{var f=e.getLine(o.line).slice(o.ch),h=l(f),c=h.indexOf(t);if(c>-1)return c=n(f,h,c)+o.ch,{from:i(o.line,c),to:i(o.line,c+s.length)}}}:this.matches=function(){};else{var h=s.split("\n");this.matches=function(t,n){var r=f.length-1;if(t){if(n.line-(f.length-1)=1;--c,--s)if(f[c]!=l(e.getLine(s)))return;g=(u=e.getLine(s)).length-h[0].length;if(l(u.slice(g))!=f[0])return;return{from:i(s,g),to:o}}if(!(n.line+(f.length-1)>e.lastLine())){var u=e.getLine(n.line),g=u.length-h[0].length;if(l(u.slice(g))==f[0]){for(var a=i(n.line,g),s=n.line+1,c=1;cn))return i;--i}}}var i=e.Pos;t.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){function t(e){var t=i(e,0);return n.pos={from:t,to:t},n.atOccurrence=!1,!1}for(var n=this,r=this.doc.clipPos(e?this.pos.from:this.pos.to);;){if(this.pos=this.matches(e,r))return this.atOccurrence=!0,this.pos.match||!0;if(e){if(!r.line)return t(0);r=i(r.line-1,this.doc.getLine(r.line-1).length)}else{var o=this.doc.lineCount();if(r.line==o-1)return t(o);r=i(r.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 r=e.splitLines(t);this.doc.replaceRange(r,this.pos.from,this.pos.to,n),this.pos.to=i(this.pos.from.line+r.length-1,r[r.length-1].length+(1==r.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,n,i){return new t(this.doc,e,n,i)}),e.defineDocExtension("getSearchCursor",function(e,n,i){return new t(this,e,n,i)}),e.defineExtension("selectMatches",function(t,n){for(var i=[],r=this.getSearchCursor(t,this.getCursor("from"),n);r.findNext()&&!(e.cmpPos(r.to(),this.getCursor("to"))>0);)i.push({anchor:r.from(),head:r.to()});i.length&&this.setSelections(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){"use strict";function t(e,t,r,o){if(this.atOccurrence=!1,this.doc=e,null==o&&"string"==typeof t&&(o=!1),r=r?e.clipPos(r):i(0,0),this.pos={from:r,to:r},"string"!=typeof t)t.global||(t=new RegExp(t.source,t.ignoreCase?"ig":"g")),this.matches=function(n,r){if(n){t.lastIndex=0;for(var o,s,l=e.getLine(r.line).slice(0,r.ch),f=0;;){t.lastIndex=f;var h=t.exec(l);if(!h)break;if(o=h,s=o.index,(f=o.index+(o[0].length||1))==l.length)break}(c=o&&o[0].length||0)||(0==s&&0==l.length?o=void 0:s!=e.getLine(r.line).length&&c++)}else{t.lastIndex=r.ch;var l=e.getLine(r.line),c=(o=t.exec(l))&&o[0].length||0;(s=o&&o.index)+c==l.length||c||(c=1)}if(o&&c)return{from:i(r.line,s),to:i(r.line,s+c),match:o}};else{var s=t;o&&(t=t.toLowerCase());var l=o?function(e){return e.toLowerCase()}:function(e){return e},f=t.split("\n");if(1==f.length)t.length?this.matches=function(r,o){if(r){f=e.getLine(o.line).slice(0,o.ch);if((c=(h=l(f)).lastIndexOf(t))>-1)return c=n(f,h,c),{from:i(o.line,c),to:i(o.line,c+s.length)}}else{var f=e.getLine(o.line).slice(o.ch),h=l(f),c=h.indexOf(t);if(c>-1)return c=n(f,h,c)+o.ch,{from:i(o.line,c),to:i(o.line,c+s.length)}}}:this.matches=function(){};else{var h=s.split("\n");this.matches=function(t,n){var r=f.length-1;if(t){if(n.line-(f.length-1)=1;--c,--s)if(f[c]!=l(e.getLine(s)))return;g=(u=e.getLine(s)).length-h[0].length;if(l(u.slice(g))!=f[0])return;return{from:i(s,g),to:o}}if(!(n.line+(f.length-1)>e.lastLine())){var u=e.getLine(n.line),g=u.length-h[0].length;if(l(u.slice(g))==f[0]){for(var a=i(n.line,g),s=n.line+1,c=1;cn))return i;--i}}}var i=e.Pos;t.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){function t(e){var t=i(e,0);return n.pos={from:t,to:t},n.atOccurrence=!1,!1}for(var n=this,r=this.doc.clipPos(e?this.pos.from:this.pos.to);;){if(this.pos=this.matches(e,r))return this.atOccurrence=!0,this.pos.match||!0;if(e){if(!r.line)return t(0);r=i(r.line-1,this.doc.getLine(r.line-1).length)}else{var o=this.doc.lineCount();if(r.line==o-1)return t(o);r=i(r.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 r=e.splitLines(t);this.doc.replaceRange(r,this.pos.from,this.pos.to,n),this.pos.to=i(this.pos.from.line+r.length-1,r[r.length-1].length+(1==r.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",function(e,n,i){return new t(this.doc,e,n,i)}),e.defineDocExtension("getSearchCursor",function(e,n,i){return new t(this,e,n,i)}),e.defineExtension("selectMatches",function(t,n){for(var i=[],r=this.getSearchCursor(t,this.getCursor("from"),n);r.findNext()&&!(e.cmpPos(r.to(),this.getCursor("to"))>0);)i.push({anchor:r.from(),head:r.to()});i.length&&this.setSelections(i,0)})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,e,f){if(this.atOccurrence=!1,this.doc=a,null==f&&"string"==typeof b&&(f=!1),e=e?a.clipPos(e):d(0,0),this.pos={from:e,to:e},"string"!=typeof b)b.global||(b=new RegExp(b.source,b.ignoreCase?"ig":"g")),this.matches=function(c,e){if(c){b.lastIndex=0;for(var f,g,h=a.getLine(e.line).slice(0,e.ch),i=0;;){b.lastIndex=i;var j=b.exec(h);if(!j)break;if(f=j,g=f.index,(i=f.index+(f[0].length||1))==h.length)break}var k=f&&f[0].length||0;k||(0==g&&0==h.length?f=void 0:g!=a.getLine(e.line).length&&k++)}else{b.lastIndex=e.ch;var h=a.getLine(e.line),f=b.exec(h),k=f&&f[0].length||0,g=f&&f.index;g+k==h.length||k||(k=1)}if(f&&k)return{from:d(e.line,g),to:d(e.line,g+k),match:f}};else{var g=b;f&&(b=b.toLowerCase());var h=f?function(a){return a.toLowerCase()}:function(a){return a},i=b.split("\n");if(1==i.length)b.length?this.matches=function(e,f){if(e){var i=a.getLine(f.line).slice(0,f.ch),j=h(i),k=j.lastIndexOf(b);if(k>-1)return k=c(i,j,k),{from:d(f.line,k),to:d(f.line,k+g.length)}}else{var i=a.getLine(f.line).slice(f.ch),j=h(i),k=j.indexOf(b);if(k>-1)return k=c(i,j,k)+f.ch,{from:d(f.line,k),to:d(f.line,k+g.length)}}}:this.matches=function(){};else{var j=g.split("\n");this.matches=function(b,c){var e=i.length-1;if(b){if(c.line-(i.length-1)=1;--k,--g)if(i[k]!=h(a.getLine(g)))return;var l=a.getLine(g),m=l.length-j[0].length;if(h(l.slice(m))!=i[0])return;return{from:d(g,m),to:f}}if(!(c.line+(i.length-1)>a.lastLine())){var l=a.getLine(c.line),m=l.length-j[0].length;if(h(l.slice(m))==i[0]){for(var n=d(c.line,m),g=c.line+1,k=1;kc))return d;--d}}}var d=a.Pos;b.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(a){function b(a){var b=d(a,0);return c.pos={from:b,to:b},c.atOccurrence=!1,!1}for(var c=this,e=this.doc.clipPos(a?this.pos.from:this.pos.to);;){if(this.pos=this.matches(a,e))return this.atOccurrence=!0,this.pos.match||!0;if(a){if(!e.line)return b(0);e=d(e.line-1,this.doc.getLine(e.line-1).length)}else{var f=this.doc.lineCount();if(e.line==f-1)return b(f);e=d(e.line+1,0)}}},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(b,c){if(this.atOccurrence){var e=a.splitLines(b);this.doc.replaceRange(e,this.pos.from,this.pos.to,c),this.pos.to=d(this.pos.from.line+e.length-1,e[e.length-1].length+(1==e.length?this.pos.from.ch:0))}}},a.defineExtension("getSearchCursor",function(a,c,d){return new b(this.doc,a,c,d)}),a.defineDocExtension("getSearchCursor",function(a,c,d){return new b(this,a,c,d)}),a.defineExtension("selectMatches",function(b,c){for(var d=[],e=this.getSearchCursor(b,this.getCursor("from"),c);e.findNext()&&!(a.cmpPos(e.to(),this.getCursor("to"))>0);)d.push({anchor:e.from(),head:e.to()});d.length&&this.setSelections(d,0)})}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/selection/active-line.min.js b/media/vendor/codemirror/addon/selection/active-line.min.js index ca424995d0eb3..0cc7bed33546d 100644 --- a/media/vendor/codemirror/addon/selection/active-line.min.js +++ b/media/vendor/codemirror/addon/selection/active-line.min.js @@ -1 +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=0;t=n.line,u=m?n:c(d,0),S=e.markText(s,u,{className:i});if(null==o?r.push(S):r.splice(o++,0,S),m)break;l=d}}function r(e){for(var t=e.state.markedSelection,n=0;n1)return i(e);var t=e.getCursor("start"),n=e.getCursor("end"),l=e.state.markedSelection;if(!l.length)return o(e,t,n);var c=l[0].find(),s=l[l.length-1].find();if(!c||!s||n.line-t.line=0||a(n,c.from)<=0)return i(e);for(;a(t,c.from)>0;)l.shift().clear(),c=l[0].find();for(a(t,c.from)<0&&(c.to.line-t.line0&&(n.line-s.from.line=n.line,u=m?n:c(d,0),S=e.markText(s,u,{className:i});if(null==o?r.push(S):r.splice(o++,0,S),m)break;l=d}}function r(e){for(var t=e.state.markedSelection,n=0;n1)return i(e);var t=e.getCursor("start"),n=e.getCursor("end"),l=e.state.markedSelection;if(!l.length)return o(e,t,n);var c=l[0].find(),s=l[l.length-1].find();if(!c||!s||n.line-t.line=0||a(n,c.from)<=0)return i(e);for(;a(t,c.from)>0;)l.shift().clear(),c=l[0].find();for(a(t,c.from)<0&&(c.to.line-t.line0&&(n.line-s.from.line=c.line,n=m?c:i(l,0),o=a.markText(k,n,{className:f});if(null==d?e.push(o):e.splice(d++,0,o),m)break;g=l}}function e(a){for(var b=a.state.markedSelection,c=0;c1)return f(a);var b=a.getCursor("start"),c=a.getCursor("end"),g=a.state.markedSelection;if(!g.length)return d(a,b,c);var i=g[0].find(),k=g[g.length-1].find();if(!i||!k||c.line-b.line=0||j(c,i.from)<=0)return f(a);for(;j(b,i.from)>0;)g.shift().clear(),i=g[0].find();for(j(b,i.from)<0&&(i.to.line-b.line0&&(c.line-k.from.line=t.mouseX&&l.top<=t.mouseY&&l.bottom>=t.mouseY&&(n=!0)}var s=n?t.value:"";e.display.lineDiv.style.cursor!=s&&(e.display.lineDiv.style.cursor=s)}}e.defineOption("selectionPointer",!1,function(i,l){var s=i.state.selectionPointer;s&&(e.off(i.getWrapperElement(),"mousemove",s.mousemove),e.off(i.getWrapperElement(),"mouseout",s.mouseout),e.off(window,"scroll",s.windowScroll),i.off("cursorActivity",n),i.off("scroll",n),i.state.selectionPointer=null,i.display.lineDiv.style.cursor=""),l&&(s=i.state.selectionPointer={value:"string"==typeof l?l:"default",mousemove:function(e){t(i,e)},mouseout:function(e){o(i,e)},windowScroll:function(){n(i)},rects:null,mouseX:null,mouseY:null,willUpdate:!1},e.on(i.getWrapperElement(),"mousemove",s.mousemove),e.on(i.getWrapperElement(),"mouseout",s.mouseout),e.on(window,"scroll",s.windowScroll),i.on("cursorActivity",n),i.on("scroll",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(e,t){var o=e.state.selectionPointer;(null==t.buttons?t.which:t.buttons)?o.mouseX=o.mouseY=null:(o.mouseX=t.clientX,o.mouseY=t.clientY),i(e)}function o(e,t){if(!e.getWrapperElement().contains(t.relatedTarget)){var o=e.state.selectionPointer;o.mouseX=o.mouseY=null,i(e)}}function n(e){e.state.selectionPointer.rects=null,i(e)}function i(e){e.state.selectionPointer.willUpdate||(e.state.selectionPointer.willUpdate=!0,setTimeout(function(){l(e),e.state.selectionPointer.willUpdate=!1},50))}function l(e){var t=e.state.selectionPointer;if(t){if(null==t.rects&&null!=t.mouseX&&(t.rects=[],e.somethingSelected()))for(var o=e.display.selectionDiv.firstChild;o;o=o.nextSibling)t.rects.push(o.getBoundingClientRect());var n=!1;if(null!=t.mouseX)for(var i=0;i=t.mouseX&&l.top<=t.mouseY&&l.bottom>=t.mouseY&&(n=!0)}var s=n?t.value:"";e.display.lineDiv.style.cursor!=s&&(e.display.lineDiv.style.cursor=s)}}e.defineOption("selectionPointer",!1,function(i,l){var s=i.state.selectionPointer;s&&(e.off(i.getWrapperElement(),"mousemove",s.mousemove),e.off(i.getWrapperElement(),"mouseout",s.mouseout),e.off(window,"scroll",s.windowScroll),i.off("cursorActivity",n),i.off("scroll",n),i.state.selectionPointer=null,i.display.lineDiv.style.cursor=""),l&&(s=i.state.selectionPointer={value:"string"==typeof l?l:"default",mousemove:function(e){t(i,e)},mouseout:function(e){o(i,e)},windowScroll:function(){n(i)},rects:null,mouseX:null,mouseY:null,willUpdate:!1},e.on(i.getWrapperElement(),"mousemove",s.mousemove),e.on(i.getWrapperElement(),"mouseout",s.mouseout),e.on(window,"scroll",s.windowScroll),i.on("cursorActivity",n),i.on("scroll",n))})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){var c=a.state.selectionPointer;(null==b.buttons?b.which:b.buttons)?c.mouseX=c.mouseY=null:(c.mouseX=b.clientX,c.mouseY=b.clientY),e(a)}function c(a,b){if(!a.getWrapperElement().contains(b.relatedTarget)){var c=a.state.selectionPointer;c.mouseX=c.mouseY=null,e(a)}}function d(a){a.state.selectionPointer.rects=null,e(a)}function e(a){a.state.selectionPointer.willUpdate||(a.state.selectionPointer.willUpdate=!0,setTimeout(function(){f(a),a.state.selectionPointer.willUpdate=!1},50))}function f(a){var b=a.state.selectionPointer;if(b){if(null==b.rects&&null!=b.mouseX&&(b.rects=[],a.somethingSelected()))for(var c=a.display.selectionDiv.firstChild;c;c=c.nextSibling)b.rects.push(c.getBoundingClientRect());var d=!1;if(null!=b.mouseX)for(var e=0;e=b.mouseX&&f.top<=b.mouseY&&f.bottom>=b.mouseY&&(d=!0)}var g=d?b.value:"";a.display.lineDiv.style.cursor!=g&&(a.display.lineDiv.style.cursor=g)}}a.defineOption("selectionPointer",!1,function(e,f){var g=e.state.selectionPointer;g&&(a.off(e.getWrapperElement(),"mousemove",g.mousemove),a.off(e.getWrapperElement(),"mouseout",g.mouseout),a.off(window,"scroll",g.windowScroll),e.off("cursorActivity",d),e.off("scroll",d),e.state.selectionPointer=null,e.display.lineDiv.style.cursor=""),f&&(g=e.state.selectionPointer={value:"string"==typeof f?f:"default",mousemove:function(a){b(e,a)},mouseout:function(a){c(e,a)},windowScroll:function(){d(e)},rects:null,mouseX:null,mouseY:null,willUpdate:!1},a.on(e.getWrapperElement(),"mousemove",g.mousemove),a.on(e.getWrapperElement(),"mouseout",g.mouseout),a.on(window,"scroll",g.windowScroll),e.on("cursorActivity",d),e.on("scroll",d))})}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/tern/tern.min.js b/media/vendor/codemirror/addon/tern/tern.min.js index ef8ccb79b6d8c..eab2ea0f00e93 100644 --- a/media/vendor/codemirror/addon/tern/tern.min.js +++ b/media/vendor/codemirror/addon/tern/tern.min.js @@ -1 +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,t,n){var o=e.docs[t];o?n(S(e,o)):e.options.getFile?e.options.getFile(t,n):n(null)}function n(e,t,n){for(var o in e.docs){var i=e.docs[o];if(i.doc==t)return i}if(!n)for(var r=0;;++r)if(o="[doc"+(r||"")+"]",!e.docs[o]){n=o;break}return e.addDoc(n,t)}function o(t,o){return"string"==typeof o?t.docs[o]:(o instanceof e&&(o=o.getDoc()),o instanceof e.Doc?n(t,o):void 0)}function i(e,t,o){var i=n(e,t),s=e.cachedArgHints;s&&s.doc==t&&R(s.start,o.to)>=0&&(e.cachedArgHints=null);var a=i.changed;null==a&&(i.changed=a={from:o.from.line,to:o.from.line});var c=o.from.line+(o.text.length-1);o.from.line=a.to&&(a.to=c+1),a.from>o.from.line&&(a.from=o.from.line),t.lineCount()>L&&o.to-a.from>100&&setTimeout(function(){i.changed&&i.changed.to-i.changed.from>100&&r(e,i)},200)}function r(e,t){e.server.request({files:[{type:"full",name:t.name,text:S(e,t)}]},function(e){e?window.console.error(e):t.changed=null})}function s(t,n,o){t.request(n,{type:"completions",types:!0,docs:!0,urls:!0},function(i,r){if(i)return q(t,n,i);var s=[],c="",l=r.start,u=r.end;'["'==n.getRange(M(l.line,l.ch-2),l)&&'"]'!=n.getRange(u,M(u.line,u.ch+2))&&(c='"]');for(var f=0;f=d;--l){for(var h=n.getLine(l),g=0,m=0;;){var v=h.indexOf("\t",m);if(-1==v)break;g+=c-(v+g)%c-1,m=v+1}if(s=r.column-g,"("==h.charAt(s)){p=!0;break}}if(p){var y=M(l,s),C=t.cachedArgHints;if(C&&C.doc==n.getDoc()&&0==R(y,C.start))return u(t,n,a);t.request(n,{type:"type",preferFunction:!0,end:y},function(e,o){!e&&o.type&&/^fn\(/.test(o.type)&&(t.cachedArgHints={start:y,type:f(o.type),name:o.exprName||o.name||"fn",guess:o.guess,doc:n.getDoc()},u(t,n,a))})}}}}}function u(e,t,n){H(e);for(var o=e.cachedArgHints,i=o.type,r=b("span",o.guess?j+"fhint-guess":null,b("span",j+"fname",o.name),"("),s=0;s ":")")),i.rettype&&r.appendChild(b("span",j+"type",i.rettype));var c=t.cursorCoords(null,"page");e.activeArgHints=D(c.right+1,c.bottom,r)}function f(e){var t=[],n=3;if(")"!=e.charAt(n))for(;;){var o=e.slice(n).match(/^([^, \(\[\{]+): /);if(o&&(n+=o[0].length,o=o[1]),t.push({name:o,type:function(t){for(var o=0,i=n;;){var r=e.charAt(n);if(t.test(r)&&!o)return e.slice(i,n);/[{\[\(]/.test(r)?++o:/[}\]\)]/.test(r)&&--o,++n}}(/[\),]/)}),")"==e.charAt(n))break;n+=2}var i=e.slice(n).match(/^\) -> (.*)$/);return{args:t,rettype:i&&i[1]}}function d(e,t){function o(o){var i={type:"definition",variable:o||null},r=n(e,t.getDoc());e.server.request(x(e,r,i),function(n,o){if(n)return q(e,t,n);if(o.file||!o.url){if(o.file){var i,s=e.docs[o.file];if(s&&(i=g(s.doc,o)))return e.jumpStack.push({file:r.name,start:t.getCursor("from"),end:t.getCursor("to")}),void h(e,r,s,i.start,i.end)}q(e,t,"Could not find a definition.")}else window.open(o.url)})}m(t)?o():T(t,"Jump to variable",function(e){e&&o(e)})}function p(e,t){var o=e.jumpStack.pop(),i=o&&e.docs[o.file];i&&h(e,n(e,t.getDoc()),i,o.start,o.end)}function h(e,t,n,o,i){n.doc.setSelection(o,i),t!=n&&e.options.switchToDoc&&(H(e),e.options.switchToDoc(n.name,n.doc))}function g(e,t){for(var n=t.context.slice(0,t.contextOffset).split("\n"),o=t.start.line-(n.length-1),i=M(o,(1==n.length?t.start.ch:e.getLine(o).length)-n[0].length),r=e.getLine(o).slice(i.ch),s=o+1;s=0&&R(a,l.end)<=0&&(s=r.length-1))}t.setSelections(r,s)})}function C(e,t){for(var n=Object.create(null),o=0;oL&&!1!==s&&t.changed.to-t.changed.from<100&&t.changed.from<=a.line&&t.changed.to>n.end.line){i.push(w(t,a,n.end)),n.file="#0";r=i[0].offsetLines;null!=n.start&&(n.start=M(n.start.line- -r,n.start.ch)),n.end=M(n.end.line-r,n.end.ch)}else i.push({type:"full",name:t.name,text:S(e,t)}),n.file=t.name,t.changed=null;else n.file=t.name;for(var c in e.docs){var l=e.docs[c];l.changed&&l!=t&&(i.push({type:"full",name:l.name,text:S(e,l)}),l.changed=null)}return{query:n,files:i}}function w(t,n,o){for(var i,r=t.doc,s=null,a=null,c=n.line-1,l=Math.max(0,c-50);c>=l;--c){var u=r.getLine(c);if(!(u.search(/\bfunction\b/)<0)){var f=e.countColumn(u,null,4);null!=s&&s<=f||(s=f,a=c)}}null==a&&(a=l);var d=Math.min(r.lastLine(),o.line+20);if(null==s||s==e.countColumn(r.getLine(n.line),null,4))i=d;else for(i=o.line+1;i",n):n(prompt(t,""))}function k(t,n,o){function i(){l=!0,c||r()}function r(){t.state.ternTooltip=null,a.parentNode&&(t.off("cursorActivity",r),t.off("blur",r),t.off("scroll",r),N(a))}t.state.ternTooltip&&A(t.state.ternTooltip);var s=t.cursorCoords(),a=t.state.ternTooltip=D(s.right+1,s.bottom,n),c=!1,l=!1;e.on(a,"mousemove",function(){c=!0}),e.on(a,"mouseout",function(t){e.contains(a,t.relatedTarget||t.toElement)||(l?r():c=!1)}),setTimeout(i,o.options.hintDelay?o.options.hintDelay:1700),t.on("cursorActivity",r),t.on("blur",r),t.on("scroll",r)}function D(e,t,n){var o=b("div",j+"tooltip",n);return o.style.left=e+"px",o.style.top=t+"px",document.body.appendChild(o),o}function A(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function N(e){e.style.opacity="0",setTimeout(function(){A(e)},1100)}function q(e,t,n){e.options.showError?e.options.showError(t,n):k(t,String(n),e)}function H(e){e.activeArgHints&&(A(e.activeArgHints),e.activeArgHints=null)}function S(e,t){var n=t.doc.getValue();return e.options.fileFilter&&(n=e.options.fileFilter(n,t.name,t.doc)),n}function F(e){function n(e,t){t&&(e.id=++i,r[i]=t),o.postMessage(e)}var o=e.worker=new Worker(e.options.workerScript);o.postMessage({type:"init",defs:e.options.defs,plugins:e.options.plugins,scripts:e.options.workerDeps});var i=0,r={};o.onmessage=function(o){var i=o.data;"getFile"==i.type?t(e,i.name,function(e,t){n({type:"getFile",err:String(e),text:t,id:i.id})}):"debug"==i.type?window.console.log(i.message):i.id&&r[i.id]&&(r[i.id](i.err,i.body),delete r[i.id])},o.onerror=function(e){for(var t in r)r[t](e);r={}},this.addFile=function(e,t){n({type:"add",name:e,text:t})},this.delFile=function(e){n({type:"del",name:e})},this.request=function(e,t){n({type:"req",body:e},t)}}e.TernServer=function(e){var n=this;this.options=e||{};var o=this.options.plugins||(this.options.plugins={});o.doc_comment||(o.doc_comment=!0),this.docs=Object.create(null),this.options.useWorker?this.server=new F(this):this.server=new tern.Server({getFile:function(e,o){return t(n,e,o)},async:!0,defs:this.options.defs||[],plugins:o}),this.trackChange=function(e,t){i(n,e,t)},this.cachedArgHints=null,this.activeArgHints=null,this.jumpStack=[],this.getHint=function(e,t){return s(n,e,t)},this.getHint.async=!0},e.TernServer.prototype={addDoc:function(t,n){var o={doc:n,name:t,changed:null};return this.server.addFile(t,S(this,o)),e.on(n,"change",this.trackChange),this.docs[t]=o},delDoc:function(t){var n=o(this,t);n&&(e.off(n.doc,"change",this.trackChange),delete this.docs[n.name],this.server.delFile(n.name))},hideDoc:function(e){H(this);var t=o(this,e);t&&t.changed&&r(this,t)},complete:function(e){e.showHint({hint:this.getHint})},showType:function(e,t,n){c(this,e,t,"type",n)},showDocs:function(e,t,n){c(this,e,t,"documentation",n)},updateArgHints:function(e){l(this,e)},jumpToDef:function(e){d(this,e)},jumpBack:function(e){p(this,e)},rename:function(e){v(this,e)},selectName:function(e){y(this,e)},request:function(e,t,o,i){var r=this,s=n(this,e.getDoc()),a=x(this,s,t,i),c=a.query&&this.options.queryOptions&&this.options.queryOptions[a.query.type];if(c)for(var l in c)a.query[l]=c[l];this.server.request(a,function(e,n){!e&&r.options.responseFilter&&(n=r.options.responseFilter(s,t,a,e,n)),o(e,n)})},destroy:function(){H(this),this.worker&&(this.worker.terminate(),this.worker=null)}};var M=e.Pos,j="CodeMirror-Tern-",L=250,O=0,R=e.cmpPos}),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 o=e.docs[t];o?n(S(e,o)):e.options.getFile?e.options.getFile(t,n):n(null)}function n(e,t,n){for(var o in e.docs){var i=e.docs[o];if(i.doc==t)return i}if(!n)for(var r=0;;++r)if(o="[doc"+(r||"")+"]",!e.docs[o]){n=o;break}return e.addDoc(n,t)}function o(t,o){return"string"==typeof o?t.docs[o]:(o instanceof e&&(o=o.getDoc()),o instanceof e.Doc?n(t,o):void 0)}function i(e,t,o){var i=n(e,t),s=e.cachedArgHints;s&&s.doc==t&&R(s.start,o.to)>=0&&(e.cachedArgHints=null);var a=i.changed;null==a&&(i.changed=a={from:o.from.line,to:o.from.line});var c=o.from.line+(o.text.length-1);o.from.line=a.to&&(a.to=c+1),a.from>o.from.line&&(a.from=o.from.line),t.lineCount()>L&&o.to-a.from>100&&setTimeout(function(){i.changed&&i.changed.to-i.changed.from>100&&r(e,i)},200)}function r(e,t){e.server.request({files:[{type:"full",name:t.name,text:S(e,t)}]},function(e){e?window.console.error(e):t.changed=null})}function s(t,n,o){t.request(n,{type:"completions",types:!0,docs:!0,urls:!0},function(i,r){if(i)return q(t,n,i);var s=[],c="",l=r.start,u=r.end;'["'==n.getRange(M(l.line,l.ch-2),l)&&'"]'!=n.getRange(u,M(u.line,u.ch+2))&&(c='"]');for(var f=0;f=d;--l){for(var h=n.getLine(l),g=0,m=0;;){var v=h.indexOf("\t",m);if(-1==v)break;g+=c-(v+g)%c-1,m=v+1}if(s=r.column-g,"("==h.charAt(s)){p=!0;break}}if(p){var y=M(l,s),C=t.cachedArgHints;if(C&&C.doc==n.getDoc()&&0==R(y,C.start))return u(t,n,a);t.request(n,{type:"type",preferFunction:!0,end:y},function(e,o){!e&&o.type&&/^fn\(/.test(o.type)&&(t.cachedArgHints={start:y,type:f(o.type),name:o.exprName||o.name||"fn",guess:o.guess,doc:n.getDoc()},u(t,n,a))})}}}}}function u(e,t,n){H(e);for(var o=e.cachedArgHints,i=o.type,r=b("span",o.guess?j+"fhint-guess":null,b("span",j+"fname",o.name),"("),s=0;s ":")")),i.rettype&&r.appendChild(b("span",j+"type",i.rettype));var c=t.cursorCoords(null,"page");e.activeArgHints=D(c.right+1,c.bottom,r)}function f(e){var t=[],n=3;if(")"!=e.charAt(n))for(;;){var o=e.slice(n).match(/^([^, \(\[\{]+): /);if(o&&(n+=o[0].length,o=o[1]),t.push({name:o,type:function(t){for(var o=0,i=n;;){var r=e.charAt(n);if(t.test(r)&&!o)return e.slice(i,n);/[{\[\(]/.test(r)?++o:/[}\]\)]/.test(r)&&--o,++n}}(/[\),]/)}),")"==e.charAt(n))break;n+=2}var i=e.slice(n).match(/^\) -> (.*)$/);return{args:t,rettype:i&&i[1]}}function d(e,t){function o(o){var i={type:"definition",variable:o||null},r=n(e,t.getDoc());e.server.request(x(e,r,i),function(n,o){if(n)return q(e,t,n);if(o.file||!o.url){if(o.file){var i,s=e.docs[o.file];if(s&&(i=g(s.doc,o)))return e.jumpStack.push({file:r.name,start:t.getCursor("from"),end:t.getCursor("to")}),void h(e,r,s,i.start,i.end)}q(e,t,"Could not find a definition.")}else window.open(o.url)})}m(t)?o():T(t,"Jump to variable",function(e){e&&o(e)})}function p(e,t){var o=e.jumpStack.pop(),i=o&&e.docs[o.file];i&&h(e,n(e,t.getDoc()),i,o.start,o.end)}function h(e,t,n,o,i){n.doc.setSelection(o,i),t!=n&&e.options.switchToDoc&&(H(e),e.options.switchToDoc(n.name,n.doc))}function g(e,t){for(var n=t.context.slice(0,t.contextOffset).split("\n"),o=t.start.line-(n.length-1),i=M(o,(1==n.length?t.start.ch:e.getLine(o).length)-n[0].length),r=e.getLine(o).slice(i.ch),s=o+1;s=0&&R(a,l.end)<=0&&(s=r.length-1))}t.setSelections(r,s)})}function C(e,t){for(var n=Object.create(null),o=0;oL&&!1!==s&&t.changed.to-t.changed.from<100&&t.changed.from<=a.line&&t.changed.to>n.end.line){i.push(w(t,a,n.end)),n.file="#0";r=i[0].offsetLines;null!=n.start&&(n.start=M(n.start.line- -r,n.start.ch)),n.end=M(n.end.line-r,n.end.ch)}else i.push({type:"full",name:t.name,text:S(e,t)}),n.file=t.name,t.changed=null;else n.file=t.name;for(var c in e.docs){var l=e.docs[c];l.changed&&l!=t&&(i.push({type:"full",name:l.name,text:S(e,l)}),l.changed=null)}return{query:n,files:i}}function w(t,n,o){for(var i,r=t.doc,s=null,a=null,c=n.line-1,l=Math.max(0,c-50);c>=l;--c){var u=r.getLine(c);if(!(u.search(/\bfunction\b/)<0)){var f=e.countColumn(u,null,4);null!=s&&s<=f||(s=f,a=c)}}null==a&&(a=l);var d=Math.min(r.lastLine(),o.line+20);if(null==s||s==e.countColumn(r.getLine(n.line),null,4))i=d;else for(i=o.line+1;i",n):n(prompt(t,""))}function k(t,n,o){function i(){l=!0,c||r()}function r(){t.state.ternTooltip=null,a.parentNode&&(t.off("cursorActivity",r),t.off("blur",r),t.off("scroll",r),N(a))}t.state.ternTooltip&&A(t.state.ternTooltip);var s=t.cursorCoords(),a=t.state.ternTooltip=D(s.right+1,s.bottom,n),c=!1,l=!1;e.on(a,"mousemove",function(){c=!0}),e.on(a,"mouseout",function(t){e.contains(a,t.relatedTarget||t.toElement)||(l?r():c=!1)}),setTimeout(i,o.options.hintDelay?o.options.hintDelay:1700),t.on("cursorActivity",r),t.on("blur",r),t.on("scroll",r)}function D(e,t,n){var o=b("div",j+"tooltip",n);return o.style.left=e+"px",o.style.top=t+"px",document.body.appendChild(o),o}function A(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function N(e){e.style.opacity="0",setTimeout(function(){A(e)},1100)}function q(e,t,n){e.options.showError?e.options.showError(t,n):k(t,String(n),e)}function H(e){e.activeArgHints&&(A(e.activeArgHints),e.activeArgHints=null)}function S(e,t){var n=t.doc.getValue();return e.options.fileFilter&&(n=e.options.fileFilter(n,t.name,t.doc)),n}function F(e){function n(e,t){t&&(e.id=++i,r[i]=t),o.postMessage(e)}var o=e.worker=new Worker(e.options.workerScript);o.postMessage({type:"init",defs:e.options.defs,plugins:e.options.plugins,scripts:e.options.workerDeps});var i=0,r={};o.onmessage=function(o){var i=o.data;"getFile"==i.type?t(e,i.name,function(e,t){n({type:"getFile",err:String(e),text:t,id:i.id})}):"debug"==i.type?window.console.log(i.message):i.id&&r[i.id]&&(r[i.id](i.err,i.body),delete r[i.id])},o.onerror=function(e){for(var t in r)r[t](e);r={}},this.addFile=function(e,t){n({type:"add",name:e,text:t})},this.delFile=function(e){n({type:"del",name:e})},this.request=function(e,t){n({type:"req",body:e},t)}}e.TernServer=function(e){var n=this;this.options=e||{};var o=this.options.plugins||(this.options.plugins={});o.doc_comment||(o.doc_comment=!0),this.docs=Object.create(null),this.options.useWorker?this.server=new F(this):this.server=new tern.Server({getFile:function(e,o){return t(n,e,o)},async:!0,defs:this.options.defs||[],plugins:o}),this.trackChange=function(e,t){i(n,e,t)},this.cachedArgHints=null,this.activeArgHints=null,this.jumpStack=[],this.getHint=function(e,t){return s(n,e,t)},this.getHint.async=!0},e.TernServer.prototype={addDoc:function(t,n){var o={doc:n,name:t,changed:null};return this.server.addFile(t,S(this,o)),e.on(n,"change",this.trackChange),this.docs[t]=o},delDoc:function(t){var n=o(this,t);n&&(e.off(n.doc,"change",this.trackChange),delete this.docs[n.name],this.server.delFile(n.name))},hideDoc:function(e){H(this);var t=o(this,e);t&&t.changed&&r(this,t)},complete:function(e){e.showHint({hint:this.getHint})},showType:function(e,t,n){c(this,e,t,"type",n)},showDocs:function(e,t,n){c(this,e,t,"documentation",n)},updateArgHints:function(e){l(this,e)},jumpToDef:function(e){d(this,e)},jumpBack:function(e){p(this,e)},rename:function(e){v(this,e)},selectName:function(e){y(this,e)},request:function(e,t,o,i){var r=this,s=n(this,e.getDoc()),a=x(this,s,t,i),c=a.query&&this.options.queryOptions&&this.options.queryOptions[a.query.type];if(c)for(var l in c)a.query[l]=c[l];this.server.request(a,function(e,n){!e&&r.options.responseFilter&&(n=r.options.responseFilter(s,t,a,e,n)),o(e,n)})},destroy:function(){H(this),this.worker&&(this.worker.terminate(),this.worker=null)}};var M=e.Pos,j="CodeMirror-Tern-",L=250,O=0,R=e.cmpPos}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,c){var d=a.docs[b];d?c(E(a,d)):a.options.getFile?a.options.getFile(b,c):c(null)}function c(a,b,c){for(var d in a.docs){var e=a.docs[d];if(e.doc==b)return e}if(!c)for(var f=0;;++f)if(d="[doc"+(f||"")+"]",!a.docs[d]){c=d;break}return a.addDoc(c,b)}function d(b,d){return"string"==typeof d?b.docs[d]:(d instanceof a&&(d=d.getDoc()),d instanceof a.Doc?c(b,d):void 0)}function e(a,b,d){var e=c(a,b),g=a.cachedArgHints;g&&g.doc==b&&K(g.start,d.to)>=0&&(a.cachedArgHints=null);var h=e.changed;null==h&&(e.changed=h={from:d.from.line,to:d.from.line});var i=d.from.line+(d.text.length-1);d.from.line=h.to&&(h.to=i+1),h.from>d.from.line&&(h.from=d.from.line),b.lineCount()>I&&d.to-h.from>100&&setTimeout(function(){e.changed&&e.changed.to-e.changed.from>100&&f(a,e)},200)}function f(a,b){a.server.request({files:[{type:"full",name:b.name,text:E(a,b)}]},function(a){a?window.console.error(a):b.changed=null})}function g(b,c,d){b.request(c,{type:"completions",types:!0,docs:!0,urls:!0},function(e,f){if(e)return C(b,c,e);var g=[],i="",j=f.start,k=f.end;'["'==c.getRange(G(j.line,j.ch-2),j)&&'"]'!=c.getRange(k,G(k.line,k.ch+2))&&(i='"]');for(var l=0;l=m;--j){for(var o=c.getLine(j),p=0,q=0;;){var r=o.indexOf("\t",q);if(r==-1)break;p+=i-(r+p)%i-1,q=r+1}if(g=f.column-p,"("==o.charAt(g)){n=!0;break}}if(n){var s=G(j,g),t=b.cachedArgHints;if(t&&t.doc==c.getDoc()&&0==K(s,t.start))return k(b,c,h);b.request(c,{type:"type",preferFunction:!0,end:s},function(a,d){!a&&d.type&&/^fn\(/.test(d.type)&&(b.cachedArgHints={start:s,type:l(d.type),name:d.exprName||d.name||"fn",guess:d.guess,doc:c.getDoc()},k(b,c,h))})}}}}}function k(a,b,c){D(a);for(var d=a.cachedArgHints,e=d.type,f=w("span",d.guess?H+"fhint-guess":null,w("span",H+"fname",d.name),"("),g=0;g ":")")),e.rettype&&f.appendChild(w("span",H+"type",e.rettype));var i=b.cursorCoords(null,"page");a.activeArgHints=z(i.right+1,i.bottom,f)}function l(a){var b=[],c=3;if(")"!=a.charAt(c))for(;;){var d=a.slice(c).match(/^([^, \(\[\{]+): /);if(d&&(c+=d[0].length,d=d[1]),b.push({name:d,type:function(b){for(var d=0,e=c;;){var f=a.charAt(c);if(b.test(f)&&!d)return a.slice(e,c);/[{\[\(]/.test(f)?++d:/[}\]\)]/.test(f)&&--d,++c}}(/[\),]/)}),")"==a.charAt(c))break;c+=2}var e=a.slice(c).match(/^\) -> (.*)$/);return{args:b,rettype:e&&e[1]}}function m(a,b){function d(d){var e={type:"definition",variable:d||null},f=c(a,b.getDoc());a.server.request(u(a,f,e),function(c,d){if(c)return C(a,b,c);if(!d.file&&d.url)return void window.open(d.url);if(d.file){var e,g=a.docs[d.file];if(g&&(e=p(g.doc,d)))return a.jumpStack.push({file:f.name,start:b.getCursor("from"),end:b.getCursor("to")}),void o(a,f,g,e.start,e.end)}C(a,b,"Could not find a definition.")})}q(b)?d():x(b,"Jump to variable",function(a){a&&d(a)})}function n(a,b){var d=a.jumpStack.pop(),e=d&&a.docs[d.file];e&&o(a,c(a,b.getDoc()),e,d.start,d.end)}function o(a,b,c,d,e){c.doc.setSelection(d,e),b!=c&&a.options.switchToDoc&&(D(a),a.options.switchToDoc(c.name,c.doc))}function p(a,b){for(var c=b.context.slice(0,b.contextOffset).split("\n"),d=b.start.line-(c.length-1),e=G(d,(1==c.length?b.start.ch:a.getLine(d).length)-c[0].length),f=a.getLine(d).slice(e.ch),g=d+1;g=0&&K(h,j.end)<=0&&(g=f.length-1))}b.setSelections(f,g)})}function t(a,b){for(var c=Object.create(null),d=0;dI&&g!==!1&&b.changed.to-b.changed.from<100&&b.changed.from<=h.line&&b.changed.to>c.end.line){e.push(v(b,h,c.end)),c.file="#0";var f=e[0].offsetLines;null!=c.start&&(c.start=G(c.start.line- -f,c.start.ch)),c.end=G(c.end.line-f,c.end.ch)}else e.push({type:"full",name:b.name,text:E(a,b)}),c.file=b.name,b.changed=null;else c.file=b.name;for(var i in a.docs){var j=a.docs[i];j.changed&&j!=b&&(e.push({type:"full",name:j.name,text:E(a,j)}),j.changed=null)}return{query:c,files:e}}function v(b,c,d){for(var e,f=b.doc,g=null,h=null,i=c.line-1,j=Math.max(0,i-50);i>=j;--i){var k=f.getLine(i);if(!(k.search(/\bfunction\b/)<0)){var l=a.countColumn(k,null,4);null!=g&&g<=l||(g=l,h=i)}}null==h&&(h=j);var m=Math.min(f.lastLine(),d.line+20);if(null==g||g==a.countColumn(f.getLine(c.line),null,4))e=m;else for(e=d.line+1;e",c):c(prompt(b,""))}function y(b,c,d){function e(){j=!0,i||f()}function f(){b.state.ternTooltip=null,h.parentNode&&(b.off("cursorActivity",f),b.off("blur",f),b.off("scroll",f),B(h))}b.state.ternTooltip&&A(b.state.ternTooltip);var g=b.cursorCoords(),h=b.state.ternTooltip=z(g.right+1,g.bottom,c),i=!1,j=!1;a.on(h,"mousemove",function(){i=!0}),a.on(h,"mouseout",function(b){a.contains(h,b.relatedTarget||b.toElement)||(j?f():i=!1)}),setTimeout(e,d.options.hintDelay?d.options.hintDelay:1700),b.on("cursorActivity",f),b.on("blur",f),b.on("scroll",f)}function z(a,b,c){var d=w("div",H+"tooltip",c);return d.style.left=a+"px",d.style.top=b+"px",document.body.appendChild(d),d}function A(a){var b=a&&a.parentNode;b&&b.removeChild(a)}function B(a){a.style.opacity="0",setTimeout(function(){A(a)},1100)}function C(a,b,c){a.options.showError?a.options.showError(b,c):y(b,String(c),a)}function D(a){a.activeArgHints&&(A(a.activeArgHints),a.activeArgHints=null)}function E(a,b){var c=b.doc.getValue();return a.options.fileFilter&&(c=a.options.fileFilter(c,b.name,b.doc)),c}function F(a){function c(a,b){b&&(a.id=++e,f[e]=b),d.postMessage(a)}var d=a.worker=new Worker(a.options.workerScript);d.postMessage({type:"init",defs:a.options.defs,plugins:a.options.plugins,scripts:a.options.workerDeps});var e=0,f={};d.onmessage=function(d){var e=d.data;"getFile"==e.type?b(a,e.name,function(a,b){c({type:"getFile",err:String(a),text:b,id:e.id})}):"debug"==e.type?window.console.log(e.message):e.id&&f[e.id]&&(f[e.id](e.err,e.body),delete f[e.id])},d.onerror=function(a){for(var b in f)f[b](a);f={}},this.addFile=function(a,b){c({type:"add",name:a,text:b})},this.delFile=function(a){c({type:"del",name:a})},this.request=function(a,b){c({type:"req",body:a},b)}}a.TernServer=function(a){var c=this;this.options=a||{};var d=this.options.plugins||(this.options.plugins={});d.doc_comment||(d.doc_comment=!0),this.docs=Object.create(null),this.options.useWorker?this.server=new F(this):this.server=new tern.Server({getFile:function(a,d){return b(c,a,d)},async:!0,defs:this.options.defs||[],plugins:d}),this.trackChange=function(a,b){e(c,a,b)},this.cachedArgHints=null,this.activeArgHints=null,this.jumpStack=[],this.getHint=function(a,b){return g(c,a,b)},this.getHint.async=!0},a.TernServer.prototype={addDoc:function(b,c){var d={doc:c,name:b,changed:null};return this.server.addFile(b,E(this,d)),a.on(c,"change",this.trackChange),this.docs[b]=d},delDoc:function(b){var c=d(this,b);c&&(a.off(c.doc,"change",this.trackChange),delete this.docs[c.name],this.server.delFile(c.name))},hideDoc:function(a){D(this);var b=d(this,a);b&&b.changed&&f(this,b)},complete:function(a){a.showHint({hint:this.getHint})},showType:function(a,b,c){i(this,a,b,"type",c)},showDocs:function(a,b,c){i(this,a,b,"documentation",c)},updateArgHints:function(a){j(this,a)},jumpToDef:function(a){m(this,a)},jumpBack:function(a){n(this,a)},rename:function(a){r(this,a)},selectName:function(a){s(this,a)},request:function(a,b,d,e){var f=this,g=c(this,a.getDoc()),h=u(this,g,b,e),i=h.query&&this.options.queryOptions&&this.options.queryOptions[h.query.type];if(i)for(var j in i)h.query[j]=i[j];this.server.request(h,function(a,c){!a&&f.options.responseFilter&&(c=f.options.responseFilter(g,b,h,a,c)),d(a,c)})},destroy:function(){D(this),this.worker&&(this.worker.terminate(),this.worker=null)}};var G=a.Pos,H="CodeMirror-Tern-",I=250,J=0,K=a.cmpPos}); \ No newline at end of file diff --git a/media/vendor/codemirror/addon/tern/worker.min.js b/media/vendor/codemirror/addon/tern/worker.min.js index cf09e5949faee..12d3c4867433d 100644 --- a/media/vendor/codemirror/addon/tern/worker.min.js +++ b/media/vendor/codemirror/addon/tern/worker.min.js @@ -1 +1 @@ -function getFile(e,t){postMessage({type:"getFile",name:e,id:++nextId}),pending[nextId]=t}function startServer(e,t,r){r&&importScripts.apply(null,r),server=new tern.Server({getFile:getFile,async:!0,defs:e,plugins:t})}function getFile(e,t){postMessage({type:"getFile",name:e,id:++nextId}),pending[nextId]=t}function startServer(e,t,r){r&&importScripts.apply(null,r),server=new tern.Server({getFile:getFile,async:!0,defs:e,plugins:t})}var server;this.onmessage=function(e){var t=e.data;switch(t.type){case"init":return startServer(t.defs,t.plugins,t.scripts);case"add":return server.addFile(t.name,t.text);case"del":return server.delFile(t.name);case"req":return server.request(t.body,function(e,r){postMessage({id:t.id,body:r,err:e&&String(e)})});case"getFile":var r=pending[t.id];return delete pending[t.id],r(t.err,t.text);default:throw new Error("Unknown message type: "+t.type)}};var nextId=0,pending={};this.console={log:function(e){postMessage({type:"debug",message:e})}};var server;this.onmessage=function(e){var t=e.data;switch(t.type){case"init":return startServer(t.defs,t.plugins,t.scripts);case"add":return server.addFile(t.name,t.text);case"del":return server.delFile(t.name);case"req":return server.request(t.body,function(e,r){postMessage({id:t.id,body:r,err:e&&String(e)})});case"getFile":var r=pending[t.id];return delete pending[t.id],r(t.err,t.text);default:throw new Error("Unknown message type: "+t.type)}};var nextId=0,pending={};this.console={log:function(e){postMessage({type:"debug",message:e})}}; \ No newline at end of file +function getFile(a,b){postMessage({type:"getFile",name:a,id:++nextId}),pending[nextId]=b}function startServer(a,b,c){c&&importScripts.apply(null,c),server=new tern.Server({getFile:getFile,async:!0,defs:a,plugins:b})}var server;this.onmessage=function(a){var b=a.data;switch(b.type){case"init":return startServer(b.defs,b.plugins,b.scripts);case"add":return server.addFile(b.name,b.text);case"del":return server.delFile(b.name);case"req":return server.request(b.body,function(a,c){postMessage({id:b.id,body:c,err:a&&String(a)})});case"getFile":var c=pending[b.id];return delete pending[b.id],c(b.err,b.text);default:throw new Error("Unknown message type: "+b.type)}};var nextId=0,pending={};this.console={log:function(a){postMessage({type:"debug",message:a})}}; \ No newline at end of file diff --git a/media/vendor/codemirror/addon/wrap/hardwrap.min.js b/media/vendor/codemirror/addon/wrap/hardwrap.min.js index 42bd6b0d28eda..12883f085af0f 100644 --- a/media/vendor/codemirror/addon/wrap/hardwrap.min.js +++ b/media/vendor/codemirror/addon/wrap/hardwrap.min.js @@ -1 +1 @@ -!function(r){"object"==typeof exports&&"object"==typeof module?r(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)}(function(r){"use strict";function t(r,t,e){for(var n=e.paragraphStart||r.getHelper(t,"paragraphStart"),o=t.line,a=r.firstLine();o>a;--o){s=r.getLine(o);if(n&&n.test(s))break;if(!/\S/.test(s)){++o;break}}for(var i=e.paragraphEnd||r.getHelper(t,"paragraphEnd"),f=t.line+1,l=r.lastLine();f<=l;++f){var s=r.getLine(f);if(i&&i.test(s)){++f;break}if(!/\S/.test(s))break}return{from:o,to:f}}function e(r,t,e,n){for(var o=t;o0&&!e.test(r.slice(o-1,o+1));--o);for(var a=!0;;a=!1){var i=o;if(n)for(;" "==r.charAt(i-1);)--i;if(0!=i||!a)return{from:i,to:o};o=t}}function n(t,n,a,i){n=t.clipPos(n),a=t.clipPos(a);var f=i.column||80,l=i.wrapOn||/\s\S|-[^\.\d]/,s=!1!==i.killTrailingSpace,h=[],c="",g=n.line,p=t.getRange(n,a,!1);if(!p.length)return null;for(var u=p[0].match(/^[ \t]*/)[0],m=0;mf&&u==x&&e(c,f,l,s);S&&S.from==d&&S.to==d+b?(c=u+v,++g):h.push({text:[b?" ":""],from:o(g,d),to:o(g+1,x.length)})}for(;c.length>f;){var E=e(c,f,l,s);h.push({text:["",u],from:o(g,E.from),to:o(g,E.to)}),c=u+c.slice(E.to),++g}}return h.length&&t.operation(function(){for(var e=0;e=0;i--){var f,l=e[i];if(l.empty()){var s=t(r,l.head,{});f={from:o(s.from,0),to:o(s.to-1)}}else f={from:l.from(),to:l.to()};f.to.line>=a||(a=f.from.line,n(r,f.from,f.to,{}))}})},r.defineExtension("wrapRange",function(r,t,e){return n(this,r,t,e||{})}),r.defineExtension("wrapParagraphsInRange",function(r,e,a){a=a||{};for(var i=this,f=[],l=r.line;l<=e.line;){var s=t(i,o(l,0),a);f.push(s),l=s.to}var h=!1;return f.length&&i.operation(function(){for(var r=f.length-1;r>=0;--r)h=h||n(i,o(f[r].from,0),o(f[r].to-1),a)}),h})}),function(r){"object"==typeof exports&&"object"==typeof module?r(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)}(function(r){"use strict";function t(r,t,e){for(var n=e.paragraphStart||r.getHelper(t,"paragraphStart"),o=t.line,a=r.firstLine();o>a;--o){s=r.getLine(o);if(n&&n.test(s))break;if(!/\S/.test(s)){++o;break}}for(var i=e.paragraphEnd||r.getHelper(t,"paragraphEnd"),f=t.line+1,l=r.lastLine();f<=l;++f){var s=r.getLine(f);if(i&&i.test(s)){++f;break}if(!/\S/.test(s))break}return{from:o,to:f}}function e(r,t,e,n){for(var o=t;o0&&!e.test(r.slice(o-1,o+1));--o);for(var a=!0;;a=!1){var i=o;if(n)for(;" "==r.charAt(i-1);)--i;if(0!=i||!a)return{from:i,to:o};o=t}}function n(t,n,a,i){n=t.clipPos(n),a=t.clipPos(a);var f=i.column||80,l=i.wrapOn||/\s\S|-[^\.\d]/,s=!1!==i.killTrailingSpace,h=[],c="",g=n.line,p=t.getRange(n,a,!1);if(!p.length)return null;for(var u=p[0].match(/^[ \t]*/)[0],m=0;mf&&u==x&&e(c,f,l,s);S&&S.from==d&&S.to==d+b?(c=u+v,++g):h.push({text:[b?" ":""],from:o(g,d),to:o(g+1,x.length)})}for(;c.length>f;){var E=e(c,f,l,s);h.push({text:["",u],from:o(g,E.from),to:o(g,E.to)}),c=u+c.slice(E.to),++g}}return h.length&&t.operation(function(){for(var e=0;e=0;i--){var f,l=e[i];if(l.empty()){var s=t(r,l.head,{});f={from:o(s.from,0),to:o(s.to-1)}}else f={from:l.from(),to:l.to()};f.to.line>=a||(a=f.from.line,n(r,f.from,f.to,{}))}})},r.defineExtension("wrapRange",function(r,t,e){return n(this,r,t,e||{})}),r.defineExtension("wrapParagraphsInRange",function(r,e,a){a=a||{};for(var i=this,f=[],l=r.line;l<=e.line;){var s=t(i,o(l,0),a);f.push(s),l=s.to}var h=!1;return f.length&&i.operation(function(){for(var r=f.length-1;r>=0;--r)h=h||n(i,o(f[r].from,0),o(f[r].to-1),a)}),h})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,c){for(var d=c.paragraphStart||a.getHelper(b,"paragraphStart"),e=b.line,f=a.firstLine();e>f;--e){var g=a.getLine(e);if(d&&d.test(g))break;if(!/\S/.test(g)){++e;break}}for(var h=c.paragraphEnd||a.getHelper(b,"paragraphEnd"),i=b.line+1,j=a.lastLine();i<=j;++i){var g=a.getLine(i);if(h&&h.test(g)){++i;break}if(!/\S/.test(g))break}return{from:e,to:i}}function c(a,b,c,d){for(var e=b;e0&&!c.test(a.slice(e-1,e+1));--e);for(var f=!0;;f=!1){var g=e;if(d)for(;" "==a.charAt(g-1);)--g;if(0!=g||!f)return{from:g,to:e};e=b}}function d(b,d,f,g){d=b.clipPos(d),f=b.clipPos(f);var h=g.column||80,i=g.wrapOn||/\s\S|-[^\.\d]/,j=g.killTrailingSpace!==!1,k=[],l="",m=d.line,n=b.getRange(d,f,!1);if(!n.length)return null;for(var o=n[0].match(/^[ \t]*/)[0],p=0;ph&&o==t&&c(l,h,i,j);u&&u.from==r&&u.to==r+s?(l=o+q,++m):k.push({text:[s?" ":""],from:e(m,r),to:e(m+1,t.length)})}for(;l.length>h;){var v=c(l,h,i,j);k.push({text:["",o],from:e(m,v.from),to:e(m,v.to)}),l=o+l.slice(v.to),++m}}return k.length&&b.operation(function(){for(var c=0;c=0;g--){var h,i=c[g];if(i.empty()){var j=b(a,i.head,{});h={from:e(j.from,0),to:e(j.to-1)}}else h={from:i.from(),to:i.to()};h.to.line>=f||(f=h.from.line,d(a,h.from,h.to,{}))}})},a.defineExtension("wrapRange",function(a,b,c){return d(this,a,b,c||{})}),a.defineExtension("wrapParagraphsInRange",function(a,c,f){f=f||{};for(var g=this,h=[],i=a.line;i<=c.line;){var j=b(g,e(i,0),f);h.push(j),i=j.to}var k=!1;return h.length&&g.operation(function(){for(var a=h.length-1;a>=0;--a)k=k||d(g,e(h[a].from,0),e(h[a].to-1),f)}),k})}); \ No newline at end of file diff --git a/media/vendor/codemirror/keymap/emacs.min.js b/media/vendor/codemirror/keymap/emacs.min.js index aa70c5914156d..7684ce45e3d4c 100644 --- a/media/vendor/codemirror/keymap/emacs.min.js +++ b/media/vendor/codemirror/keymap/emacs.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../lib/codemirror")):"function"==typeof define&&define.amd?define(["../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";function e(t,e){return t.line==e.line&&t.ch==e.ch}function n(t){M.push(t),M.length>50&&M.shift()}function r(t){if(!M.length)return n(t);M[M.length-1]+=t}function o(t){return M[M.length-(t?Math.min(t,1):1)]||""}function i(){return M.length>1&&M.pop(),o()}function l(t,o,i,l,c){null==c&&(c=t.getRange(o,i)),l&&B&&B.cm==t&&e(o,B.pos)&&t.isClean(B.gen)?r(c):n(c),t.replaceRange("",o,i,"+delete"),B=l?{cm:t,pos:o,gen:t.changeGeneration()}:null}function c(t,e,n){return t.findPosH(e,n,"char",!0)}function a(t,e,n){return t.findPosH(e,n,"word",!0)}function u(t,e,n){return t.findPosV(e,n,"line",t.doc.sel.goalColumn)}function f(t,e,n){return t.findPosV(e,n,"page",t.doc.sel.goalColumn)}function s(t,e,n){for(var r=e.line,o=t.getLine(r),i=/\S/.test(n<0?o.slice(0,e.ch):o.slice(e.ch)),l=t.firstLine(),c=t.lastLine();;){if((r+=n)c)return t.clipPos(H(r-n,n<0?0:null));if(o=t.getLine(r),/\S/.test(o))i=!0;else if(i)return H(r,0)}}function C(t,e,n){for(var r=e.line,o=e.ch,i=t.getLine(e.line),l=!1;;){var c=i.charAt(o+(n<0?-1:0));if(c){if(l&&/[!?.]/.test(c))return H(r,o+(n>0?1:0));l||(l=/\w/.test(c)),o+=n}else{if(r==(n<0?t.firstLine():t.lastLine()))return H(r,o);if(i=t.getLine(r+n),!/\S/.test(i))return H(r,o);r+=n,o=n<0?i.length:0}}}function g(t,n,r){var o;if(t.findMatchingBracket&&(o=t.findMatchingBracket(n,!0))&&o.match&&(o.forward?1:-1)==r)return r>0?H(o.to.line,o.to.ch+1):o.to;for(var i=!0;;i=!1){var l=t.getTokenAt(n),c=H(n.line,r<0?l.start:l.end);if(!(i&&r>0&&l.end==n.ch)&&/\w/.test(l.string))return c;var a=t.findPosH(c,r,"char");if(e(c,a))return n;n=a}}function d(t,e){var n=t.state.emacsPrefix;return n?(x(t),"-"==n?-1:Number(n)):e?null:1}function p(t){var e="string"==typeof t?function(e){e.execCommand(t)}:t;return function(t){var n=d(t);e(t);for(var r=1;r1&&"+input"==e.origin){for(var r=e.text.join("\n"),o="",i=1;i',n,{bottom:!0}):n(prompt(e,""))}function U(t,e){var n=t.getCursor(),r=t.findPosH(n,1,"word");t.replaceRange(e(t.getRange(n,r)),n,r),t.setCursor(r)}function X(t){for(var e=t.getCursor(),n=e.line,r=e.ch,o=[];n>=t.firstLine();){for(var i=t.getLine(n),l=null==r?i.length:r;l>0;)if(")"==(r=i.charAt(--l)))o.push("(");else if("]"==r)o.push("[");else if("}"==r)o.push("{");else if(/[\(\{\[]/.test(r)&&(!o.length||o.pop()!=r))return t.extendSelection(H(n,l));--n,r=null}}function D(t){t.execCommand("clearSearch"),w(t)}function E(t){T[t]=function(e){S(e,t)},K["Ctrl-"+t]=function(e){S(e,t)},G["Ctrl-"+t]=!0}var H=t.Pos,M=[],B=null,G={"Alt-G":!0,"Ctrl-X":!0,"Ctrl-Q":!0,"Ctrl-U":!0};t.emacs={kill:l,killRegion:v,repeated:p};for(var K=t.keyMap.emacs=t.normalizeKeyMap({"Ctrl-W":function(t){l(t,t.getCursor("start"),t.getCursor("end"))},"Ctrl-K":p(function(t){var e=t.getCursor(),n=t.clipPos(H(e.line)),r=t.getRange(e,n);/\S/.test(r)||(r+="\n",n=H(e.line+1,0)),l(t,e,n,!0,r)}),"Alt-W":function(t){n(t.getSelection()),w(t)},"Ctrl-Y":function(t){var e=t.getCursor();t.replaceRange(o(d(t)),e,e,"paste"),t.setSelection(e,t.getCursor())},"Alt-Y":function(t){t.replaceSelection(i(),"around","paste")},"Ctrl-Space":k,"Ctrl-Shift-2":k,"Ctrl-F":m(c,1),"Ctrl-B":m(c,-1),Right:m(c,1),Left:m(c,-1),"Ctrl-D":function(t){A(t,c,1)},Delete:function(t){v(t)||A(t,c,1)},"Ctrl-H":function(t){A(t,c,-1)},Backspace:function(t){v(t)||A(t,c,-1)},"Alt-F":m(a,1),"Alt-B":m(a,-1),"Alt-D":function(t){A(t,a,1)},"Alt-Backspace":function(t){A(t,a,-1)},"Ctrl-N":m(u,1),"Ctrl-P":m(u,-1),Down:m(u,1),Up:m(u,-1),"Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd",End:"goLineEnd",Home:"goLineStart","Alt-V":m(f,-1),"Ctrl-V":m(f,1),PageUp:m(f,-1),PageDown:m(f,1),"Ctrl-Up":m(s,-1),"Ctrl-Down":m(s,1),"Alt-A":m(C,-1),"Alt-E":m(C,1),"Alt-K":function(t){A(t,C,1)},"Ctrl-Alt-K":function(t){A(t,g,1)},"Ctrl-Alt-Backspace":function(t){A(t,g,-1)},"Ctrl-Alt-F":m(g,1),"Ctrl-Alt-B":m(g,-1),"Shift-Ctrl-Alt-2":function(t){var e=t.getCursor();t.setSelection(h(t,e,g,1),e)},"Ctrl-Alt-T":function(t){var e=g(t,t.getCursor(),-1),n=g(t,e,1),r=g(t,n,1),o=g(t,r,-1);t.replaceRange(t.getRange(o,r)+t.getRange(n,o)+t.getRange(e,n),e,r)},"Ctrl-Alt-U":p(X),"Alt-Space":function(t){for(var e=t.getCursor(),n=e.ch,r=e.ch,o=t.getLine(e.line);n&&/\s/.test(o.charAt(n-1));)--n;for(;r0)return t.setCursor(e-1);b(t,"Goto line",function(e){var n;e&&!isNaN(n=Number(e))&&n==(0|n)&&n>0&&t.setCursor(n-1)})},"Ctrl-X Tab":function(t){t.indentSelection(d(t,!0)||t.getOption("indentUnit"))},"Ctrl-X Ctrl-X":function(t){t.setSelection(t.getCursor("head"),t.getCursor("anchor"))},"Ctrl-X Ctrl-S":"save","Ctrl-X Ctrl-W":"save","Ctrl-X S":"saveAll","Ctrl-X F":"open","Ctrl-X U":p("undo"),"Ctrl-X K":"close","Ctrl-X Delete":function(t){l(t,t.getCursor(),C(t,t.getCursor(),1),!0)},"Ctrl-X H":"selectAll","Ctrl-Q Tab":p("insertTab"),"Ctrl-U":R}),T={"Ctrl-G":x},N=0;N<10;++N)E(String(N));E("-")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../lib/codemirror")):"function"==typeof define&&define.amd?define(["../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){return a.line==b.line&&a.ch==b.ch}function c(a){I.push(a),I.length>50&&I.shift()}function d(a){if(!I.length)return c(a);I[I.length-1]+=a}function e(a){return I[I.length-(a?Math.min(a,1):1)]||""}function f(){return I.length>1&&I.pop(),e()}function g(a,e,f,g,h){null==h&&(h=a.getRange(e,f)),g&&J&&J.cm==a&&b(e,J.pos)&&a.isClean(J.gen)?d(h):c(h),a.replaceRange("",e,f,"+delete"),J=g?{cm:a,pos:e,gen:a.changeGeneration()}:null}function h(a,b,c){return a.findPosH(b,c,"char",!0)}function i(a,b,c){return a.findPosH(b,c,"word",!0)}function j(a,b,c){return a.findPosV(b,c,"line",a.doc.sel.goalColumn)}function k(a,b,c){return a.findPosV(b,c,"page",a.doc.sel.goalColumn)}function l(a,b,c){for(var d=b.line,e=a.getLine(d),f=/\S/.test(c<0?e.slice(0,b.ch):e.slice(b.ch)),g=a.firstLine(),h=a.lastLine();;){if((d+=c)h)return a.clipPos(H(d-c,c<0?0:null));e=a.getLine(d);if(/\S/.test(e))f=!0;else if(f)return H(d,0)}}function m(a,b,c){for(var d=b.line,e=b.ch,f=a.getLine(b.line),g=!1;;){var h=f.charAt(e+(c<0?-1:0));if(h){if(g&&/[!?.]/.test(h))return H(d,e+(c>0?1:0));g||(g=/\w/.test(h)),e+=c}else{if(d==(c<0?a.firstLine():a.lastLine()))return H(d,e);if(f=a.getLine(d+c),!/\S/.test(f))return H(d,e);d+=c,e=c<0?f.length:0}}}function n(a,c,d){var e;if(a.findMatchingBracket&&(e=a.findMatchingBracket(c,!0))&&e.match&&(e.forward?1:-1)==d)return d>0?H(e.to.line,e.to.ch+1):e.to;for(var f=!0;;f=!1){var g=a.getTokenAt(c),h=H(c.line,d<0?g.start:g.end);if(!(f&&d>0&&g.end==c.ch)&&/\w/.test(g.string))return h;var i=a.findPosH(h,d,"char");if(b(h,i))return c;c=i}}function o(a,b){var c=a.state.emacsPrefix;return c?(w(a),"-"==c?-1:Number(c)):b?null:1}function p(a){var b="string"==typeof a?function(b){b.execCommand(a)}:a;return function(a){var c=o(a);b(a);for(var d=1;d1&&"+input"==b.origin){for(var d=b.text.join("\n"),e="",f=1;f',c,{bottom:!0}):c(prompt(b,""))}function D(a,b){var c=a.getCursor(),d=a.findPosH(c,1,"word");a.replaceRange(b(a.getRange(c,d)),c,d),a.setCursor(d)}function E(a){for(var b=a.getCursor(),c=b.line,d=b.ch,e=[];c>=a.firstLine();){for(var f=a.getLine(c),g=null==d?f.length:d;g>0;){var d=f.charAt(--g);if(")"==d)e.push("(");else if("]"==d)e.push("[");else if("}"==d)e.push("{");else if(/[\(\{\[]/.test(d)&&(!e.length||e.pop()!=d))return a.extendSelection(H(c,g))}--c,d=null}}function F(a){a.execCommand("clearSearch"),B(a)}function G(a){M[a]=function(b){u(b,a)},L["Ctrl-"+a]=function(b){u(b,a)},K["Ctrl-"+a]=!0}var H=a.Pos,I=[],J=null,K={"Alt-G":!0,"Ctrl-X":!0,"Ctrl-Q":!0,"Ctrl-U":!0};a.emacs={kill:g,killRegion:t,repeated:p};for(var L=a.keyMap.emacs=a.normalizeKeyMap({"Ctrl-W":function(a){g(a,a.getCursor("start"),a.getCursor("end"))},"Ctrl-K":p(function(a){var b=a.getCursor(),c=a.clipPos(H(b.line)),d=a.getRange(b,c);/\S/.test(d)||(d+="\n",c=H(b.line+1,0)),g(a,b,c,!0,d)}),"Alt-W":function(a){c(a.getSelection()),B(a)},"Ctrl-Y":function(a){var b=a.getCursor();a.replaceRange(e(o(a)),b,b,"paste"),a.setSelection(b,a.getCursor())},"Alt-Y":function(a){a.replaceSelection(f(),"around","paste")},"Ctrl-Space":A,"Ctrl-Shift-2":A,"Ctrl-F":r(h,1),"Ctrl-B":r(h,-1),Right:r(h,1),Left:r(h,-1),"Ctrl-D":function(a){s(a,h,1)},Delete:function(a){t(a)||s(a,h,1)},"Ctrl-H":function(a){s(a,h,-1)},Backspace:function(a){t(a)||s(a,h,-1)},"Alt-F":r(i,1),"Alt-B":r(i,-1),"Alt-D":function(a){s(a,i,1)},"Alt-Backspace":function(a){s(a,i,-1)},"Ctrl-N":r(j,1),"Ctrl-P":r(j,-1),Down:r(j,1),Up:r(j,-1),"Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd",End:"goLineEnd",Home:"goLineStart","Alt-V":r(k,-1),"Ctrl-V":r(k,1),PageUp:r(k,-1),PageDown:r(k,1),"Ctrl-Up":r(l,-1),"Ctrl-Down":r(l,1),"Alt-A":r(m,-1),"Alt-E":r(m,1),"Alt-K":function(a){s(a,m,1)},"Ctrl-Alt-K":function(a){s(a,n,1)},"Ctrl-Alt-Backspace":function(a){s(a,n,-1)},"Ctrl-Alt-F":r(n,1),"Ctrl-Alt-B":r(n,-1),"Shift-Ctrl-Alt-2":function(a){var b=a.getCursor();a.setSelection(q(a,b,n,1),b)},"Ctrl-Alt-T":function(a){var b=n(a,a.getCursor(),-1),c=n(a,b,1),d=n(a,c,1),e=n(a,d,-1);a.replaceRange(a.getRange(e,d)+a.getRange(c,e)+a.getRange(b,c),b,d)},"Ctrl-Alt-U":p(E),"Alt-Space":function(a){for(var b=a.getCursor(),c=b.ch,d=b.ch,e=a.getLine(b.line);c&&/\s/.test(e.charAt(c-1));)--c;for(;d0)return a.setCursor(b-1);C(a,"Goto line",function(b){var c;b&&!isNaN(c=Number(b))&&c==(0|c)&&c>0&&a.setCursor(c-1)})},"Ctrl-X Tab":function(a){a.indentSelection(o(a,!0)||a.getOption("indentUnit"))},"Ctrl-X Ctrl-X":function(a){a.setSelection(a.getCursor("head"),a.getCursor("anchor"))},"Ctrl-X Ctrl-S":"save","Ctrl-X Ctrl-W":"save","Ctrl-X S":"saveAll","Ctrl-X F":"open","Ctrl-X U":p("undo"),"Ctrl-X K":"close","Ctrl-X Delete":function(a){g(a,a.getCursor(),m(a,a.getCursor(),1),!0)},"Ctrl-X H":"selectAll","Ctrl-Q Tab":p("insertTab"),"Ctrl-U":y}),M={"Ctrl-G":w},N=0;N<10;++N)G(String(N));G("-")}); \ No newline at end of file diff --git a/media/vendor/codemirror/keymap/sublime.min.js b/media/vendor/codemirror/keymap/sublime.min.js index c2e6e59cfe0b0..ffa8cb1cb5412 100644 --- a/media/vendor/codemirror/keymap/sublime.min.js +++ b/media/vendor/codemirror/keymap/sublime.min.js @@ -1 +1 @@ -!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(d(n.line-1));var o=t.getLine(n.line);if(r>0&&n.ch>=o.length)return t.clipPos(d(n.line+1,0));for(var i,a="start",l=n.ch,s=r<0?0:o.length,c=0;l!=s;l+=r,c++){var f=o.charAt(r<0?l-1:l),u="_"!=f&&e.isWordChar(f)?"w":"o";if("w"==u&&f.toUpperCase()==f&&(u="W"),"start"==a)"o"!=u&&(a="in",i=u);else if("in"==a&&i!=u){if("w"==i&&"W"==u&&r<0&&l--,"W"==i&&"w"==u&&r>0){i="w";continue}break}}return d(n.line,l)}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){if(t.isReadOnly())return e.Pass;t.operation(function(){for(var e=t.listSelections().length,r=[],o=-1,i=0;i=0;l--){var c=r[i[l]];if(!(s&&e.cmpPos(c.head,s)>0)){var f=o(t,c.head);s=f.from,t.replaceRange(n(f.word),f.from,f.to)}}})}function c(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var i=o(t,n);if(!i.word)return;n=i.from,r=i.to}return{from:n,to:r,query:t.getRange(n,r),word:i}}function f(e,t){var n=c(e);if(n){var r=n.query,o=e.getSearchCursor(r,t?n.to:n.from);(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):(o=e.getSearchCursor(r,t?d(e.firstLine(),0):e.clipPos(d(e.lastLine()))),(t?o.findNext():o.findPrevious())?e.setSelection(o.from(),o.to()):n.word&&e.setSelection(n.from,n.to))}}var u=e.keyMap.sublime={fallthrough:"default"},h=e.commands,d=e.Pos,p=e.keyMap.default==e.keyMap.macDefault,m=p?"Cmd-":"Ctrl-",g=p?"Ctrl-":"Alt-";h[u[g+"Left"]="goSubwordLeft"]=function(e){n(e,-1)},h[u[g+"Right"]="goSubwordRight"]=function(e){n(e,1)},p&&(u["Cmd-Left"]="goLineStartSmart");var v=p?"Ctrl-Alt-":"Ctrl-";h[u[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())},h[u[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())},h[u["Shift-"+m+"L"]="splitSelectionByLine"]=function(e){for(var t=e.listSelections(),n=[],r=0;ro.line&&a==i.line&&0==i.ch||n.push({anchor:a==o.line?o:d(a,0),head:a==i.line?i:d(a)});e.setSelections(n,0)},u["Shift-Tab"]="indentLess",h[u.Esc="singleSelectionTop"]=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},h[u[m+"L"]="selectLine"]=function(e){for(var t=e.listSelections(),n=[],r=0;ro?r.push(s,c):r.length&&(r[r.length-1]=c),o=c}t.operation(function(){for(var e=0;et.lastLine()?t.replaceRange("\n"+a,d(t.lastLine()),null,"+swapLine"):t.replaceRange(a+"\n",d(o,0),null,"+swapLine")}t.setSelections(i),t.scrollIntoView()})},h[u[k+"Down"]="swapLineDown"]=function(t){if(t.isReadOnly())return e.Pass;for(var n=t.listSelections(),r=[],o=t.lastLine()+1,i=n.length-1;i>=0;i--){var a=n[i],l=a.to().line+1,s=a.from().line;0!=a.to().ch||a.empty()||l--,l=0;e-=2){var n=r[e],o=r[e+1],i=t.getLine(n);n==t.lastLine()?t.replaceRange("",d(n-1),d(n),"+swapLine"):t.replaceRange("",d(n,0),d(n+1,0),"+swapLine"),t.replaceRange(i+"\n",d(o,0),null,"+swapLine")}t.scrollIntoView()})},h[u[m+"/"]="toggleCommentIndented"]=function(e){e.toggleComment({indent:!0})},h[u[m+"J"]="joinLines"]=function(e){for(var t=e.listSelections(),n=[],r=0;r=0;o--){var i=n[o].head,a=t.getRange({line:i.line,ch:0},i),l=e.countColumn(a,null,t.getOption("tabSize")),s=t.findPosH(i,-1,"char",!1);if(a&&!/\S/.test(a)&&l%r==0){var c=new d(i.line,e.findColumn(a,l-r,r));c.ch!=i.ch&&(s=c)}t.replaceRange("",s,i,"+delete")}})},h[u[L+m+"K"]="delLineRight"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange("",t[n].anchor,d(t[n].to().line),"+delete");e.scrollIntoView()})},h[u[L+m+"U"]="upcaseAtCursor"]=function(e){s(e,function(e){return e.toUpperCase()})},h[u[L+m+"L"]="downcaseAtCursor"]=function(e){s(e,function(e){return e.toLowerCase()})},h[u[L+m+"Space"]="setSublimeMark"]=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},h[u[L+m+"A"]="selectToSublimeMark"]=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},h[u[L+m+"W"]="deleteToSublimeMark"]=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),o=n;if(e.cmpPos(r,o)>0){var i=o;o=r,r=i}t.state.sublimeKilled=t.getRange(r,o),t.replaceRange("",r,o)}},h[u[L+m+"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))},h[u[L+m+"Y"]="sublimeYank"]=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},u[L+m+"G"]="clearBookmarks",h[u[L+m+"C"]="showInCenter"]=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)};var C=p?"Ctrl-Shift-":"Ctrl-Alt-";h[u[C+"Up"]="selectLinesUpward"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=0;ne.firstLine()&&e.addSelection(d(r.head.line-1,r.head.ch))}})},h[u[C+"Down"]="selectLinesDownward"]=function(e){e.operation(function(){for(var t=e.listSelections(),n=0;n0&&c.ch>=e.length)return b.clipPos(n(c.line+1,0));for(var f,g="start",h=c.ch,i=d<0?0:e.length,j=0;h!=i;h+=d,j++){var k=e.charAt(d<0?h-1:h),l="_"!=k&&a.isWordChar(k)?"w":"o";if("w"==l&&k.toUpperCase()==k&&(l="W"),"start"==g)"o"!=l&&(g="in",f=l);else if("in"==g&&f!=l){if("w"==f&&"W"==l&&d<0&&h--,"W"==f&&"w"==l&&d>0){f="w";continue}break}}return n(c.line,h)}function c(a,c){a.extendSelectionsBy(function(d){return a.display.shift||a.doc.extend||d.empty()?b(a.doc,d.head,c):c<0?d.from():d.to()})}function d(b,c){if(b.isReadOnly())return a.Pass;b.operation(function(){for(var a=b.listSelections().length,d=[],e=-1,f=0;f=0;h--){var i=d[f[h]];if(!(j&&a.cmpPos(i.head,j)>0)){var k=e(b,i.head);j=k.from,b.replaceRange(c(k.word),k.from,k.to)}}})}function j(b){var c=b.getCursor("from"),d=b.getCursor("to");if(0==a.cmpPos(c,d)){var f=e(b,c);if(!f.word)return;c=f.from,d=f.to}return{from:c,to:d,query:b.getRange(c,d),word:f}}function k(a,b){var c=j(a);if(c){var d=c.query,e=a.getSearchCursor(d,b?c.to:c.from);(b?e.findNext():e.findPrevious())?a.setSelection(e.from(),e.to()):(e=a.getSearchCursor(d,b?n(a.firstLine(),0):a.clipPos(n(a.lastLine()))),(b?e.findNext():e.findPrevious())?a.setSelection(e.from(),e.to()):c.word&&a.setSelection(c.from,c.to))}}var l=a.keyMap.sublime={fallthrough:"default"},m=a.commands,n=a.Pos,o=a.keyMap.default==a.keyMap.macDefault,p=o?"Cmd-":"Ctrl-",q=o?"Ctrl-":"Alt-";m[l[q+"Left"]="goSubwordLeft"]=function(a){c(a,-1)},m[l[q+"Right"]="goSubwordRight"]=function(a){c(a,1)},o&&(l["Cmd-Left"]="goLineStartSmart");var r=o?"Ctrl-Alt-":"Ctrl-";m[l[r+"Up"]="scrollLineUp"]=function(a){var b=a.getScrollInfo();if(!a.somethingSelected()){var c=a.lineAtHeight(b.top+b.clientHeight,"local");a.getCursor().line>=c&&a.execCommand("goLineUp")}a.scrollTo(null,b.top-a.defaultTextHeight())},m[l[r+"Down"]="scrollLineDown"]=function(a){var b=a.getScrollInfo();if(!a.somethingSelected()){var c=a.lineAtHeight(b.top,"local")+1;a.getCursor().line<=c&&a.execCommand("goLineDown")}a.scrollTo(null,b.top+a.defaultTextHeight())},m[l["Shift-"+p+"L"]="splitSelectionByLine"]=function(a){for(var b=a.listSelections(),c=[],d=0;de.line&&g==f.line&&0==f.ch||c.push({anchor:g==e.line?e:n(g,0),head:g==f.line?f:n(g)});a.setSelections(c,0)},l["Shift-Tab"]="indentLess",m[l.Esc="singleSelectionTop"]=function(a){var b=a.listSelections()[0];a.setSelection(b.anchor,b.head,{scroll:!1})},m[l[p+"L"]="selectLine"]=function(a){for(var b=a.listSelections(),c=[],d=0;de?d.push(i,j):d.length&&(d[d.length-1]=j),e=j}b.operation(function(){for(var a=0;ab.lastLine()?b.replaceRange("\n"+g,n(b.lastLine()),null,"+swapLine"):b.replaceRange(g+"\n",n(e,0),null,"+swapLine")}b.setSelections(f),b.scrollIntoView()})},m[l[t+"Down"]="swapLineDown"]=function(b){if(b.isReadOnly())return a.Pass;for(var c=b.listSelections(),d=[],e=b.lastLine()+1,f=c.length-1;f>=0;f--){var g=c[f],h=g.to().line+1,i=g.from().line;0!=g.to().ch||g.empty()||h--,h=0;a-=2){var c=d[a],e=d[a+1],f=b.getLine(c);c==b.lastLine()?b.replaceRange("",n(c-1),n(c),"+swapLine"):b.replaceRange("",n(c,0),n(c+1,0),"+swapLine"),b.replaceRange(f+"\n",n(e,0),null,"+swapLine")}b.scrollIntoView()})},m[l[p+"/"]="toggleCommentIndented"]=function(a){a.toggleComment({indent:!0})},m[l[p+"J"]="joinLines"]=function(a){for(var b=a.listSelections(),c=[],d=0;d=0;e--){var f=c[e].head,g=b.getRange({line:f.line,ch:0},f),h=a.countColumn(g,null,b.getOption("tabSize")),i=b.findPosH(f,-1,"char",!1);if(g&&!/\S/.test(g)&&h%d==0){var j=new n(f.line,a.findColumn(g,h-d,d));j.ch!=f.ch&&(i=j)}b.replaceRange("",i,f,"+delete")}})},m[l[u+p+"K"]="delLineRight"]=function(a){a.operation(function(){for(var b=a.listSelections(),c=b.length-1;c>=0;c--)a.replaceRange("",b[c].anchor,n(b[c].to().line),"+delete");a.scrollIntoView()})},m[l[u+p+"U"]="upcaseAtCursor"]=function(a){i(a,function(a){return a.toUpperCase()})},m[l[u+p+"L"]="downcaseAtCursor"]=function(a){i(a,function(a){return a.toLowerCase()})},m[l[u+p+"Space"]="setSublimeMark"]=function(a){a.state.sublimeMark&&a.state.sublimeMark.clear(),a.state.sublimeMark=a.setBookmark(a.getCursor())},m[l[u+p+"A"]="selectToSublimeMark"]=function(a){var b=a.state.sublimeMark&&a.state.sublimeMark.find();b&&a.setSelection(a.getCursor(),b)},m[l[u+p+"W"]="deleteToSublimeMark"]=function(b){var c=b.state.sublimeMark&&b.state.sublimeMark.find();if(c){var d=b.getCursor(),e=c;if(a.cmpPos(d,e)>0){var f=e;e=d,d=f}b.state.sublimeKilled=b.getRange(d,e),b.replaceRange("",d,e)}},m[l[u+p+"X"]="swapWithSublimeMark"]=function(a){var b=a.state.sublimeMark&&a.state.sublimeMark.find();b&&(a.state.sublimeMark.clear(),a.state.sublimeMark=a.setBookmark(a.getCursor()),a.setCursor(b))},m[l[u+p+"Y"]="sublimeYank"]=function(a){null!=a.state.sublimeKilled&&a.replaceSelection(a.state.sublimeKilled,null,"paste")},l[u+p+"G"]="clearBookmarks",m[l[u+p+"C"]="showInCenter"]=function(a){var b=a.cursorCoords(null,"local");a.scrollTo(null,(b.top+b.bottom)/2-a.getScrollInfo().clientHeight/2)};var v=o?"Ctrl-Shift-":"Ctrl-Alt-";m[l[v+"Up"]="selectLinesUpward"]=function(a){a.operation(function(){for(var b=a.listSelections(),c=0;ca.firstLine()&&a.addSelection(n(d.head.line-1,d.head.ch))}})},m[l[v+"Down"]="selectLinesDownward"]=function(a){a.operation(function(){for(var b=a.listSelections(),c=0;c",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:"expandToLine",motionArgs:{linewise:!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"}],r=[{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"}],n=e.Pos;e.Vim=function(){function o(t){t.setOption("disableInput",!0),t.setOption("showCursorWhenSelecting",!1),e.signal(t,"vim-mode-change",{mode:"normal"}),t.on("cursorActivity",tt),M(t),e.on(t.getInputField(),"paste",u(t))}function i(t){t.setOption("disableInput",!1),t.off("cursorActivity",tt),e.off(t.getInputField(),"paste",u(t)),t.state.vim=null}function a(t,r){this==e.keyMap.vim&&e.rmClass(t.getWrapperElement(),"cm-fat-cursor"),r&&r.attach==s||i(t,!1)}function s(t,r){this==e.keyMap.vim&&e.addClass(t.getWrapperElement(),"cm-fat-cursor"),r&&r.attach==s||o(t)}function l(t,r){if(r){if(this[t])return this[t];var n=c(t);if(!n)return!1;var o=e.Vim.findKey(r,n);return"function"==typeof o&&e.signal(r,"vim-keypress",n),o}}function c(e){if("'"==e.charAt(0))return e.charAt(1);var t=e.split(/-(?!$)/),r=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==r.length)return!1;for(var n=!1,o=0;o")}function u(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(j(e.getCursor(),0,1)),Lt.enterInsertMode(e,{},t))}),t.onPasteFn}function h(e,t){for(var r=[],n=e;n=e.firstLine()&&t<=e.lastLine()}function f(e){return/^[a-z]$/.test(e)}function d(e){return-1!="()[]{}".indexOf(e)}function m(e){return ut.test(e)}function g(e){return/^[A-Z]$/.test(e)}function v(e){return/^\s*$/.test(e)}function y(e,t){for(var r=0;r"==t.slice(-11)){var r=t.length-11,n=e.slice(0,r),o=t.slice(0,r);return n==o&&e.length>r?"full":0==o.indexOf(n)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function F(e){var t=/^.*(<[\w\-]+>)$/.exec(e),r=t?t[1]:e.slice(-1);if(r.length>1)switch(r){case"":r="\n";break;case"":r=" "}return r}function D(e,t,r){return function(){for(var n=0;n2&&(t=q.apply(void 0,Array.prototype.slice.call(arguments,1))),J(e,t)?e:t}function $(e,t){return arguments.length>2&&(t=$.apply(void 0,Array.prototype.slice.call(arguments,1))),J(e,t)?t:e}function Q(e,t,r){var n=J(e,t),o=J(t,r);return n&&o}function z(e,t){return e.getLine(t).length}function Z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function G(e){return e.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function X(e,t,r){var o=z(e,t),i=new Array(r-o+1).join(" ");e.setCursor(n(t,o)),e.replaceRange(i,e.getCursor())}function Y(e,t){var r=[],o=e.listSelections(),i=V(e.clipPos(t)),a=!U(t,i),s=te(o,e.getCursor("head")),l=U(o[s].head,o[s].anchor),c=o.length-1,u=c-s>s?c:0,h=o[u].anchor,p=Math.min(h.line,i.line),f=Math.max(h.line,i.line),d=h.ch,m=i.ch,g=o[u].head.ch-d,v=m-d;g>0&&v<=0?(d++,a||m--):g<0&&v>=0?(d--,l||m++):g<0&&-1==v&&(d--,m++);for(var y=p;y<=f;y++){var k={anchor:new n(y,d),head:new n(y,m)};r.push(k)}return s=i.line==f?r.length-1:0,e.setSelections(r),t.ch=m,h.ch=d,h}function ee(e,t,r){for(var n=[],o=0;oc&&(i.line=c),i.ch=z(e,i.line)}return{ranges:[{anchor:a,head:i}],primary:0}}if("block"==r){for(var u=Math.min(a.line,i.line),h=Math.min(a.ch,i.ch),p=Math.max(a.line,i.line),f=Math.max(a.ch,i.ch)+1,d=p-u+1,m=i.line==u?0:d-1,g=[],v=0;v0&&i&&v(i);i=o.pop())r.line--,r.ch=0;i?(r.line--,r.ch=z(e,r.line)):r.ch=0}}function ue(e,t,r){t.ch=0,r.ch=0,r.line++}function he(e){if(!e)return 0;var t=e.search(/\S/);return-1==t?e.length:t}function pe(e,t,r,o,i){for(var a=se(e),s=e.getLine(a.line),l=a.ch,c=i?ht[0]:pt[0];!c(s.charAt(l));)if(++l>=s.length)return null;o?c=pt[0]:(c=ht[0])(s.charAt(l))||(c=ht[1]);for(var u=l,h=l;c(s.charAt(u))&&u=0;)h--;if(h++,t){for(var p=u;/\s/.test(s.charAt(u))&&u0;)h--;h||(h=f)}}return{start:n(a.line,h),end:n(a.line,u)}}function fe(e,t,r){U(t,r)||wt.jumpList.add(e,t,r)}function de(e,t){wt.lastCharacterSearch.increment=e,wt.lastCharacterSearch.forward=t.forward,wt.lastCharacterSearch.selectedCharacter=t.selectedCharacter}function me(e,t,r,o){var i=V(e.getCursor()),a=r?1:-1,s=r?e.lineCount():-1,l=i.ch,c=i.line,u=e.getLine(c),h={lineText:u,nextCh:u.charAt(l),lastCh:null,index:l,symb:o,reverseSymb:(r?{")":"(","}":"{"}:{"(":")","{":"}"})[o],forward:r,depth:0,curMoveThrough:!1},p=Tt[o];if(!p)return i;var f=Rt[p].init,d=Rt[p].isComplete;for(f&&f(h);c!==s&&t;){if(h.index+=a,h.nextCh=h.lineText.charAt(h.index),!h.nextCh){if(c+=a,h.lineText=e.getLine(c)||"",a>0)h.index=0;else{var m=h.lineText.length;h.index=m>0?m-1:0}h.nextCh=h.lineText.charAt(h.index)}d(h)&&(i.line=c,i.ch=h.index,t--)}return h.nextCh||h.curMoveThrough?n(c,h.index):i}function ge(e,t,r,n,o){var i=t.line,a=t.ch,s=e.getLine(i),l=r?1:-1,c=n?pt:ht;if(o&&""==s){if(i+=l,s=e.getLine(i),!p(e,i))return null;a=r?0:s.length}for(;;){if(o&&""==s)return{from:0,to:0,line:i};for(var u=l>0?s.length:-1,h=u,f=u;a!=u;){for(var d=!1,m=0;m0?0:s.length}}function ve(e,t,r,o,i,a){var s=V(t),l=[];(o&&!i||!o&&i)&&r++;for(var c=!(o&&i),u=0;u0;)s(f,o)&&r--,f+=o;return new n(f,0)}var d=e.state.vim;if(d.visualLine&&s(u,1,!0)){var m=d.sel.anchor;s(m.line,-1,!0)&&(i&&m.line==u||(u+=1))}var g=a(u);for(f=u;f<=p&&r;f++)s(f,1,!0)&&(i&&a(f)==g||r--);for(c=new n(f,0),f>p&&!g?g=!0:i=!1,f=u;f>h&&(i&&a(f)!=g&&f!=u||!s(f,-1,!0));f--);return l=new n(f,0),{start:l,end:c}}function Me(e,t,r,o){var i,a,s=t,l={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/}[r],c={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{"}[r],u=e.getLine(s.line).charAt(s.ch)===c?1:0;if(i=e.scanForBracket(n(s.line,s.ch+u),-1,null,{bracketRegex:l}),a=e.scanForBracket(n(s.line,s.ch+u),1,null,{bracketRegex:l}),!i||!a)return{start:s,end:s};if(i=i.pos,a=a.pos,i.line==a.line&&i.ch>a.ch||i.line>a.line){var h=i;i=a,a=h}return o?a.ch+=1:i.ch+=1,{start:i,end:a}}function Se(e,t,r,o){var i,a,s,l,c=V(t),u=e.getLine(c.line).split(""),h=u.indexOf(r);if(c.ch-1&&!i;s--)u[s]==r&&(i=s+1);else i=c.ch+1;if(i&&!a)for(s=i,l=u.length;s'+t+"",{bottom:!0,duration:5e3}):alert(t)}function Ne(e,t){var r=''+(e||"")+'';return t&&(r+=' '+t+""),r}function Pe(e,t){var r=(t.prefix||"")+" "+(t.desc||"");Le(e,Ne(t.prefix,t.desc),r,t.onClose,t)}function je(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var r=["global","multiline","ignoreCase","source"],n=0;n=t&&e<=r:e==t}function Ue(e){var t=e.getScrollInfo(),r=e.coordsChar({left:0,top:6+t.top},"local"),n=t.clientHeight-10+t.top,o=e.coordsChar({left:0,top:n},"local");return{top:r.line,bottom:o.line}}function Je(e,t,r){if("'"==r){var n=e.doc.history.done,o=n[n.length-2];return o&&o.ranges&&o.ranges[0].head}var i=t.marks[r];return i&&i.find()}function qe(t,r,n,o,i,a,s,l,c){function u(){t.operation(function(){for(;!m;)h(),p();f()})}function h(){var e=t.getRange(a.from(),a.to()).replace(s,l);a.replace(e)}function p(){for(;a.findNext()&&Ve(a.from(),o,i);)if(n||!g||a.from().line!=g.line)return t.scrollIntoView(a.from(),30),t.setSelection(a.from(),a.to()),g=a.from(),void(m=!1);m=!0}function f(e){if(e&&e(),t.focus(),g){t.setCursor(g);var r=t.state.vim;r.exMode=!1,r.lastHPos=r.lastHSPos=g.ch}c&&c()}function d(r,n,o){switch(e.e_stop(r),e.keyName(r)){case"Y":h(),p();break;case"N":p();break;case"A":var i=c;c=void 0,t.operation(u),c=i;break;case"L":h();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":f(o)}return m&&f(o),!0}t.state.vim.exMode=!0;var m=!1,g=a.from();if(p(),!m)return r?void Pe(t,{prefix:"replace with "+l+" (y/n/a/q/l)",onKeyDown:d}):(u(),void(c&&c()));Ke(t,"No matches for "+s.source)}function $e(t){var r=t.state.vim,n=wt.macroModeState,o=wt.registerController.getRegister("."),i=n.isPlaying,a=n.lastInsertModeChanges,s=[];if(!i){for(var l=a.inVisualBlock?r.lastSelection.visualBlock.height:1,c=a.changes,s=[],u=0;u1&&(at(t,r,r.insertModeRepeat-1,!0),r.lastEditInputState.repeatOverride=r.insertModeRepeat),delete r.insertModeRepeat,r.insertMode=!1,t.setCursor(t.getCursor().line,t.getCursor().ch-1),t.setOption("keyMap","vim"),t.setOption("disableInput",!0),t.toggleOverwrite(!1),o.setText(a.changes.join("")),e.signal(t,"vim-mode-change",{mode:"normal"}),n.isRecording&&Xe(n)}function Qe(e){t.unshift(e)}function ze(e,t,r,n,o){var i={keys:e,type:t};i[t]=r,i[t+"Args"]=n;for(var a in o)i[a]=o[a];Qe(i)}function Ze(t,r,n,o){var i=wt.registerController.getRegister(o);if(":"==o)return i.keyBuffer[0]&&Nt.processCommand(t,i.keyBuffer[0]),void(n.isPlaying=!1);var a=i.keyBuffer,s=0;n.isPlaying=!0,n.replaySearchQueries=i.searchQueries.slice(0);for(var l=0;l|<\w+>|./.exec(h),u=c[0],h=h.substring(c.index+u.length),e.Vim.handleKey(t,u,"macro"),r.insertMode){var p=i.insertModeChanges[s++].changes;wt.macroModeState.lastInsertModeChanges.changes=p,st(t,p,1),$e(t)}n.isPlaying=!1}function Ge(e,t){if(!e.isPlaying){var r=e.latestRegister,n=wt.registerController.getRegister(r);n&&n.pushText(t)}}function Xe(e){if(!e.isPlaying){var t=e.latestRegister,r=wt.registerController.getRegister(t);r&&r.pushInsertModeChanges&&r.pushInsertModeChanges(e.lastInsertModeChanges)}}function Ye(e,t){if(!e.isPlaying){var r=e.latestRegister,n=wt.registerController.getRegister(r);n&&n.pushSearchQuery&&n.pushSearchQuery(t)}}function et(e,t){var r=wt.macroModeState,n=r.lastInsertModeChanges;if(!r.isPlaying)for(;t;){if(n.expectCursorActivityForChange=!0,"+input"==t.origin||"paste"==t.origin||void 0===t.origin){var o=t.text.join("\n");n.maybeReset&&(n.changes=[],n.maybeReset=!1),n.changes.push(o)}t=t.next}}function tt(e){var t=e.state.vim;if(t.insertMode){var r=wt.macroModeState;if(r.isPlaying)return;var n=r.lastInsertModeChanges;n.expectCursorActivityForChange?n.expectCursorActivityForChange=!1:n.maybeReset=!0}else e.curOp.isVimOp||nt(e,t);t.visualMode&&rt(e)}function rt(e){var t=e.state.vim,r=N(e,V(t.sel.head)),n=j(r,0,1);t.fakeCursor&&t.fakeCursor.clear(),t.fakeCursor=e.markText(r,n,{className:"cm-animate-fat-cursor"})}function nt(t,r){var n=t.getCursor("anchor"),o=t.getCursor("head");if(r.visualMode&&!t.somethingSelected()?le(t,!1):r.visualMode||r.insertMode||!t.somethingSelected()||(r.visualMode=!0,r.visualLine=!1,e.signal(t,"vim-mode-change",{mode:"visual"})),r.visualMode){var i=J(o,n)?0:-1,a=J(o,n)?-1:0;o=j(o,0,i),n=j(n,0,a),r.sel={anchor:n,head:o},Ce(t,r,"<",q(o,n)),Ce(t,r,">",$(o,n))}else r.insertMode||(r.lastHPos=t.getCursor().ch)}function ot(e){this.keyName=e}function it(t){function r(){return n.maybeReset&&(n.changes=[],n.maybeReset=!1),n.changes.push(new ot(o)),!0}var n=wt.macroModeState.lastInsertModeChanges,o=e.keyName(t);o&&(-1==o.indexOf("Delete")&&-1==o.indexOf("Backspace")||e.lookupKey(o,"vim-insert",r))}function at(e,t,r,n){function o(){s?St.processAction(e,t,t.lastEditActionCommand):St.evalInput(e,t)}function i(r){if(a.lastInsertModeChanges.changes.length>0){r=t.lastEditActionCommand?r:1;var n=a.lastInsertModeChanges;st(e,n.changes,r)}}var a=wt.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"]),vt=[].concat(ft,dt,mt,["-",'"',".",":","/"]),yt={};k("filetype",void 0,"string",["ft"],function(e,t){if(void 0!==t){if(void 0===e)return"null"==(r=t.getOption("mode"))?"":r;var r=""==e?"null":e;t.setOption("mode",r)}});var kt=function(){function e(e,t,s){function l(t){var o=++n%r,i=a[o];i&&i.clear(),a[o]=e.setBookmark(t)}var c=a[n%r];if(c){var u=c.find();u&&!U(u,t)&&l(t)}else l(t);l(s),o=n,(i=n-r+1)<0&&(i=0)}function t(e,t){(n+=t)>o?n=o:n0?1:-1,u=e.getCursor();do{if(n+=c,(s=a[(r+n)%r])&&(l=s.find())&&!U(u,l))break}while(ni)}return s}var r=100,n=-1,o=0,i=0,a=new Array(r);return{cachedCursor:void 0,add:e,move:t}},Ct=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};x.prototype={exitMacroRecordMode:function(){var e=wt.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var r=wt.registerController.getRegister(t);r&&(r.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog("(recording)["+t+"]",null,{bottom:!0})),this.isRecording=!0)}};var wt,xt,Mt={buildKeyMap:function(){},getRegisterController:function(){return wt.registerController},resetVimGlobalState_:S,getVimGlobalState_:function(){return wt},maybeInitVimState_:M,suppressErrorLogging:!1,InsertModeKey:ot,map:function(e,t,r){Nt.map(e,t,r)},unmap:function(e,t){Nt.unmap(e,t)},setOption:C,getOption:w,defineOption:k,defineEx:function(e,t,r){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;Kt[e]=r,Nt.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,r){var n=this.findKey(e,t,r);if("function"==typeof n)return n()},findKey:function(r,n,o){function i(){var e=wt.macroModeState;if(e.isRecording){if("q"==n)return e.exitMacroRecordMode(),b(r),!0;"mapping"!=o&&Ge(e,n)}}function a(){if(""==n)return b(r),c.visualMode?le(r):c.insertMode&&$e(r),!0}function s(t){for(var o;t;)o=/<\w+-.+?>|<\w+>|./.exec(t),n=o[0],t=t.substring(o.index+n.length),e.Vim.handleKey(r,n,"mapping")}var l,c=M(r);return l=c.insertMode?function(){if(a())return!0;for(var e=c.inputState.keyBuffer=c.inputState.keyBuffer+n,o=1==n.length,i=St.matchCommand(e,t,c.inputState,"insert");e.length>1&&"full"!=i.type;){var e=c.inputState.keyBuffer=e.slice(1),s=St.matchCommand(e,t,c.inputState,"insert");"none"!=s.type&&(i=s)}if("none"==i.type)return b(r),!1;if("partial"==i.type)return xt&&window.clearTimeout(xt),xt=window.setTimeout(function(){c.insertMode&&c.inputState.keyBuffer&&b(r)},w("insertModeEscKeysTimeout")),!o;if(xt&&window.clearTimeout(xt),o){for(var l=r.listSelections(),u=0;u0||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},L.prototype={setText:function(e,t,r){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!r},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(Ct(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("")}},R.prototype={pushText:function(e,t,r,n,o){n&&"\n"==r.charAt(0)&&(r=r.slice(1)+"\n"),n&&"\n"!==r.charAt(r.length-1)&&(r+="\n");var i=this.isValidRegister(e)?this.getRegister(e):null;if(!i){switch(t){case"yank":this.registers[0]=new L(r,n,o);break;case"delete":case"change":-1==r.indexOf("\n")?this.registers["-"]=new L(r,n):(this.shiftNumericRegisters_(),this.registers[1]=new L(r,n))}return void this.unnamedRegister.setText(r,n,o)}g(e)?i.pushText(r,n):i.setText(r,n,o),this.unnamedRegister.setText(i.toString(),n)},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new L),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&y(e,vt)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},E.prototype={nextMatch:function(e,t){var r=this.historyBuffer,n=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var o=this.iterator+n;t?o>=0:o=r.length?(this.iterator=r.length,this.initialPrefix):o<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 St={matchCommand:function(e,t,r,n){var o=W(e,t,n,r);if(!o.full&&!o.partial)return{type:"none"};if(!o.full&&o.partial)return{type:"partial"};for(var i,a=0;a"==i.keys.slice(-11)&&(r.selectedCharacter=F(e)),{type:"full",command:i}},processCommand:function(e,t,r){switch(t.inputState.repeatOverride=r.repeatOverride,r.type){case"motion":this.processMotion(e,t,r);break;case"operator":this.processOperator(e,t,r);break;case"operatorMotion":this.processOperatorMotion(e,t,r);break;case"action":this.processAction(e,t,r);break;case"search":this.processSearch(e,t,r);break;case"ex":case"keyToEx":this.processEx(e,t,r)}},processMotion:function(e,t,r){t.inputState.motion=r.motion,t.inputState.motionArgs=P(r.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,r){var n=t.inputState;if(n.operator){if(n.operator==r.operator)return n.motion="expandToLine",n.motionArgs={linewise:!0},void this.evalInput(e,t);b(e)}n.operator=r.operator,n.operatorArgs=P(r.operatorArgs),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,r){var n=t.visualMode,o=P(r.operatorMotionArgs);o&&n&&o.visualLine&&(t.visualLine=!0),this.processOperator(e,t,r),n||this.processMotion(e,t,r)},processAction:function(e,t,r){var n=t.inputState,o=n.getRepeat(),i=!!o,a=P(r.actionArgs)||{};n.selectedCharacter&&(a.selectedCharacter=n.selectedCharacter),r.operator&&this.processOperator(e,t,r),r.motion&&this.processMotion(e,t,r),(r.motion||r.operator)&&this.evalInput(e,t),a.repeat=o||1,a.repeatIsExplicit=i,a.registerName=n.registerName,b(e),t.lastMotion=null,r.isEdit&&this.recordLastEdit(t,n,r),Lt[r.action](e,a,t)},processSearch:function(t,r,n){function o(e,o,i){wt.searchHistoryController.pushInput(e),wt.searchHistoryController.reset();try{He(t,e,o,i)}catch(r){return Ke(t,"Invalid regex: "+e),void b(t)}St.processMotion(t,r,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:n.searchArgs.toJumplist}})}function i(e){t.scrollTo(p.left,p.top),o(e,!0,!0);var r=wt.macroModeState;r.isRecording&&Ye(r,e)}function a(r,n,o){var i,a,s=e.keyName(r);"Up"==s||"Down"==s?(i="Up"==s,a=r.target?r.target.selectionEnd:0,o(n=wt.searchHistoryController.nextMatch(n,i)||""),a&&r.target&&(r.target.selectionEnd=r.target.selectionStart=Math.min(a,r.target.value.length))):"Left"!=s&&"Right"!=s&&"Ctrl"!=s&&"Alt"!=s&&"Shift"!=s&&wt.searchHistoryController.reset();var c;try{c=He(t,n,!0,!0)}catch(r){}c?t.scrollIntoView(Fe(t,!l,c),30):(De(t),t.scrollTo(p.left,p.top))}function s(r,n,o){var i=e.keyName(r);"Esc"==i||"Ctrl-C"==i||"Ctrl-["==i||"Backspace"==i&&""==n?(wt.searchHistoryController.pushInput(n),wt.searchHistoryController.reset(),He(t,h),De(t),t.scrollTo(p.left,p.top),e.e_stop(r),b(t),o(),t.focus()):"Up"==i||"Down"==i?e.e_stop(r):"Ctrl-U"==i&&(e.e_stop(r),o(""))}if(t.getSearchCursor){var l=n.searchArgs.forward,c=n.searchArgs.wholeWordOnly;be(t).setReversed(!l);var u=l?"/":"?",h=be(t).getQuery(),p=t.getScrollInfo();switch(n.searchArgs.querySrc){case"prompt":var f=wt.macroModeState;f.isPlaying?o(g=f.replaySearchQueries.shift(),!0,!1):Pe(t,{onClose:i,prefix:u,desc:Bt,onKeyUp:a,onKeyDown:s});break;case"wordUnderCursor":var d=pe(t,!1,!0,!1,!0),m=!0;if(d||(d=pe(t,!1,!0,!1,!1),m=!1),!d)return;var g=t.getLine(d.start.line).substring(d.start.ch,d.end.ch);g=m&&c?"\\b"+g+"\\b":G(g),wt.jumpList.cachedCursor=t.getCursor(),t.setCursor(d.start),o(g,!0,!1)}}},processEx:function(t,r,n){function o(e){wt.exCommandHistoryController.pushInput(e),wt.exCommandHistoryController.reset(),Nt.processCommand(t,e)}function i(r,n,o){var i,a,s=e.keyName(r);("Esc"==s||"Ctrl-C"==s||"Ctrl-["==s||"Backspace"==s&&""==n)&&(wt.exCommandHistoryController.pushInput(n),wt.exCommandHistoryController.reset(),e.e_stop(r),b(t),o(),t.focus()),"Up"==s||"Down"==s?(e.e_stop(r),i="Up"==s,a=r.target?r.target.selectionEnd:0,o(n=wt.exCommandHistoryController.nextMatch(n,i)||""),a&&r.target&&(r.target.selectionEnd=r.target.selectionStart=Math.min(a,r.target.value.length))):"Ctrl-U"==s?(e.e_stop(r),o("")):"Left"!=s&&"Right"!=s&&"Ctrl"!=s&&"Alt"!=s&&"Shift"!=s&&wt.exCommandHistoryController.reset()}"keyToEx"==n.type?Nt.processCommand(t,n.exArgs.input):r.visualMode?Pe(t,{onClose:o,prefix:":",value:"'<,'>",onKeyDown:i}):Pe(t,{onClose:o,prefix:":",onKeyDown:i})},evalInput:function(e,t){var r,o,i,a=t.inputState,s=a.motion,l=a.motionArgs||{},c=a.operator,u=a.operatorArgs||{},h=a.registerName,p=t.sel,f=V(t.visualMode?N(e,p.head):e.getCursor("head")),d=V(t.visualMode?N(e,p.anchor):e.getCursor("anchor")),m=V(f),g=V(d);if(c&&this.recordLastEdit(t,a),i=void 0!==a.repeatOverride?a.repeatOverride:a.getRepeat(),i>0&&l.explicitRepeat?l.repeatIsExplicit=!0:(l.noRepeat||!l.explicitRepeat&&0===i)&&(i=1,l.repeatIsExplicit=!1),a.selectedCharacter&&(l.selectedCharacter=u.selectedCharacter=a.selectedCharacter),l.repeat=i,b(e),s){var v=At[s](e,f,l,t);if(t.lastMotion=At[s],!v)return;if(l.toJumplist){var y=wt.jumpList,k=y.cachedCursor;k?(fe(e,k,v),delete y.cachedCursor):fe(e,f,v)}v instanceof Array?(o=v[0],r=v[1]):r=v,r||(r=V(f)),t.visualMode?(t.visualBlock&&r.ch===1/0||(r=N(e,r,t.visualBlock)),o&&(o=N(e,o,!0)),o=o||g,p.anchor=o,p.head=r,ie(e),Ce(e,t,"<",J(o,r)?o:r),Ce(e,t,">",J(o,r)?r:o)):c||(r=N(e,r),e.setCursor(r.line,r.ch))}if(c){if(u.lastSel){o=g;var C=u.lastSel,w=Math.abs(C.head.line-C.anchor.line),x=Math.abs(C.head.ch-C.anchor.ch);r=C.visualLine?n(g.line+w,g.ch):C.visualBlock?n(g.line+w,g.ch+x):C.head.line==C.anchor.line?n(g.line,g.ch+x):n(g.line+w,g.ch),t.visualMode=!0,t.visualLine=C.visualLine,t.visualBlock=C.visualBlock,p=t.sel={anchor:o,head:r},ie(e)}else t.visualMode&&(u.lastSel={anchor:V(p.anchor),head:V(p.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var M,S,A,L,T;if(t.visualMode){if(M=q(p.head,p.anchor),S=$(p.head,p.anchor),A=t.visualLine||u.linewise,L=t.visualBlock?"block":A?"line":"char",T=ae(e,{anchor:M,head:S},L),A){var R=T.ranges;if("block"==L)for(var E=0;Eu&&i.line==u?this.moveToEol(e,t,r,o):(r.toFirstChar&&(a=he(e.getLine(l)),o.lastHPos=a),o.lastHSPos=e.charCoords(n(l,a),"div").left,n(l,a))},moveByDisplayLines:function(e,t,r,o){var i=t;switch(o.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:o.lastHSPos=e.charCoords(i,"div").left}var a=r.repeat;if((l=e.findPosV(i,r.forward?a:-a,"line",o.lastHSPos)).hitSide)if(r.forward)var s={top:e.charCoords(l,"div").top+8,left:o.lastHSPos},l=e.coordsChar(s,"div");else{var c=e.charCoords(n(e.firstLine(),0),"div");c.left=o.lastHSPos,l=e.coordsChar(c,"div")}return o.lastHPos=l.ch,l},moveByPage:function(e,t,r){var n=t,o=r.repeat;return e.findPosV(n,r.forward?o:-o,"page")},moveByParagraph:function(e,t,r){var n=r.forward?1:-1;return xe(e,t,r.repeat,n)},moveByScroll:function(e,t,r,n){var o=e.getScrollInfo(),i=null,a=r.repeat;a||(a=o.clientHeight/(2*e.defaultTextHeight()));var s=e.charCoords(t,"local");if(r.repeat=a,!(i=At.moveByDisplayLines(e,t,r,n)))return null;var l=e.charCoords(i,"local");return e.scrollTo(null,o.top+l.top-s.top),i},moveByWords:function(e,t,r){return ve(e,t,r.repeat,!!r.forward,!!r.wordEnd,!!r.bigWord)},moveTillCharacter:function(e,t,r){var n=ye(e,r.repeat,r.forward,r.selectedCharacter),o=r.forward?-1:1;return de(o,r),n?(n.ch+=o,n):null},moveToCharacter:function(e,t,r){var n=r.repeat;return de(0,r),ye(e,n,r.forward,r.selectedCharacter)||t},moveToSymbol:function(e,t,r){return me(e,r.repeat,r.forward,r.selectedCharacter)||t},moveToColumn:function(e,t,r,n){var o=r.repeat;return n.lastHPos=o-1,n.lastHSPos=e.charCoords(t,"div").left,ke(e,o)},moveToEol:function(e,t,r,o){var i=t;o.lastHPos=1/0;var a=n(i.line+r.repeat-1,1/0),s=e.clipPos(a);return s.ch--,o.lastHSPos=e.charCoords(s,"div").left,a},moveToFirstNonWhiteSpaceCharacter:function(e,t){var r=t;return n(r.line,he(e.getLine(r.line)))},moveToMatchedSymbol:function(e,t){var r,o=t,i=o.line,a=o.ch,s=e.getLine(i);do{if((r=s.charAt(a++))&&d(r)){var l=e.getTokenTypeAt(n(i,a));if("string"!==l&&"comment"!==l)break}}while(r);return r?e.findMatchingBracket(n(i,a)).to:o},moveToStartOfLine:function(e,t){return n(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,r){var o=r.forward?e.lastLine():e.firstLine();return r.repeatIsExplicit&&(o=r.repeat-e.getOption("firstLineNumber")),n(o,he(e.getLine(o)))},textObjectManipulation:function(e,t,r,n){var o={"(":")",")":"(","{":"}","}":"{","[":"]","]":"["},i={"'":!0,'"':!0},a=r.selectedCharacter;"b"==a?a="(":"B"==a&&(a="{");var s,l=!r.textObjectInner;if(o[a])s=Me(e,t,a,l);else if(i[a])s=Se(e,t,a,l);else if("W"===a)s=pe(e,l,!0,!0);else if("w"===a)s=pe(e,l,!0,!1);else{if("p"!==a)return null;if(s=xe(e,t,r.repeat,0,l),r.linewise=!0,n.visualMode)n.visualLine||(n.visualLine=!0);else{var c=n.inputState.operatorArgs;c&&(c.linewise=!0),s.end.line--}}return e.state.vim.visualMode?oe(e,s.start,s.end):[s.start,s.end]},repeatLastCharacterSearch:function(e,t,r){var n=wt.lastCharacterSearch,o=r.repeat,i=r.forward===n.forward,a=(n.increment?1:0)*(i?-1:1);e.moveH(-a,"char"),r.inclusive=!!i;var s=ye(e,o,i,n.selectedCharacter);return s?(s.ch+=a,s):(e.moveH(a,"char"),t)}},bt={change:function(t,r,o){var i,a,s=t.state.vim;if(wt.macroModeState.lastInsertModeChanges.inVisualBlock=s.visualBlock,s.visualMode){a=t.getSelection();var l=B("",o.length);t.replaceSelections(l),i=q(o[0].head,o[0].anchor)}else{var c=o[0].anchor,u=o[0].head;a=t.getRange(c,u);var h=s.lastEditInputState||{};if("moveByWords"==h.motion&&!v(a)){var p=/\s+$/.exec(a);p&&h.motionArgs&&h.motionArgs.forward&&(u=j(u,0,-p[0].length),a=a.slice(0,-p[0].length))}var f=new n(c.line-1,Number.MAX_VALUE),d=t.firstLine()==t.lastLine();u.line>t.lastLine()&&r.linewise&&!d?t.replaceRange("",f,u):t.replaceRange("",c,u),r.linewise&&(d||(t.setCursor(f),e.commands.newlineAndIndent(t)),c.ch=Number.MAX_VALUE),i=c}wt.registerController.pushText(r.registerName,"change",a,r.linewise,o.length>1),Lt.enterInsertMode(t,{head:i},t.state.vim)},delete:function(e,t,r){var o,i,a=e.state.vim;if(a.visualBlock){i=e.getSelection();var s=B("",r.length);e.replaceSelections(s),o=r[0].anchor}else{var l=r[0].anchor,c=r[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=n(l.line-1,z(e,l.line-1))),i=e.getRange(l,c),e.replaceRange("",l,c),o=l,t.linewise&&(o=At.moveToFirstNonWhiteSpaceCharacter(e,l))}return wt.registerController.pushText(t.registerName,"delete",i,t.linewise,a.visualBlock),N(e,o)},indent:function(e,t,r){var n=e.state.vim,o=r[0].anchor.line,i=n.visualBlock?r[r.length-1].anchor.line:r[0].head.line,a=n.visualMode?t.repeat:1;t.linewise&&i--;for(var s=o;s<=i;s++)for(var l=0;lc.top?(l.line+=(s-c.top)/o,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?j(a.head,0,1):n(a.anchor.line,0);else if("inplace"==i&&o.visualMode)return;t.setOption("disableInput",!1),r&&r.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"})),wt.macroModeState.isPlaying||(t.on("change",et),e.on(t.getInputField(),"keydown",it)),o.visualMode&&le(t),ee(t,s,l)}},toggleVisualMode:function(t,r,o){var i,a=r.repeat,s=t.getCursor();o.visualMode?o.visualLine^r.linewise||o.visualBlock^r.blockwise?(o.visualLine=!!r.linewise,o.visualBlock=!!r.blockwise,e.signal(t,"vim-mode-change",{mode:"visual",subMode:o.visualLine?"linewise":o.visualBlock?"blockwise":""}),ie(t)):le(t):(o.visualMode=!0,o.visualLine=!!r.linewise,o.visualBlock=!!r.blockwise,i=N(t,n(s.line,s.ch+a-1),!0),o.sel={anchor:s,head:i},e.signal(t,"vim-mode-change",{mode:"visual",subMode:o.visualLine?"linewise":o.visualBlock?"blockwise":""}),ie(t),Ce(t,o,"<",q(s,i)),Ce(t,o,">",$(s,i)))},reselectLastSelection:function(t,r,n){var o=n.lastSelection;if(n.visualMode&&ne(t,n),o){var i=o.anchorMark.find(),a=o.headMark.find();if(!i||!a)return;n.sel={anchor:i,head:a},n.visualMode=!0,n.visualLine=o.visualLine,n.visualBlock=o.visualBlock,ie(t),Ce(t,n,"<",q(i,a)),Ce(t,n,">",$(i,a)),e.signal(t,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""})}},joinLines:function(e,t,r){var o,i;if(r.visualMode){if(o=e.getCursor("anchor"),i=e.getCursor("head"),J(i,o)){c=i;i=o,o=c}i.ch=z(e,i.line)-1}else{var a=Math.max(t.repeat,2);o=e.getCursor(),i=N(e,n(o.line+a-1,1/0))}for(var s=0,l=o.line;l1)f=Array(t.repeat+1).join(f);var d=i.linewise,m=i.blockwise;if(d)r.visualMode?f=r.visualLine?f.slice(0,-1):"\n"+f.slice(0,f.length-1)+"\n":t.after?(f="\n"+f.slice(0,f.length-1),o.ch=z(e,o.line)):o.ch=0;else{if(m){f=f.split("\n");for(A=0;Ae.lastLine()&&e.replaceRange("\n",n(b,0)),z(e,b)u.length&&(i=u.length),a=n(l.line,i)}if("\n"==s)o.visualMode||t.replaceRange("",l,a),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(t);else{var h=t.getRange(l,a);if(h=h.replace(/[^\n]/g,s),o.visualBlock){var p=new Array(t.getOption("tabSize")+1).join(" ");h=(h=t.getSelection()).replace(/\t/g,p).replace(/[^\n]/g,s).split("\n"),t.replaceSelections(h)}else t.replaceRange(h,l,a);o.visualMode?(l=J(c[0].anchor,c[0].head)?c[0].anchor:c[0].head,t.setCursor(l),le(t,!1)):t.setCursor(j(a,0,-1))}},incrementNumberToken:function(e,t){for(var r,o,i,a,s,l=e.getCursor(),c=e.getLine(l.line),u=/-?\d+/g;null!==(r=u.exec(c))&&(s=r[0],o=r.index,i=o+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}}};k("pcre",!0,"boolean"),Ae.prototype={getQuery:function(){return wt.query},setQuery:function(e){wt.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return wt.isReversed},setReversed:function(e){wt.isReversed=e},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(e){this.annotate=e}};var Et={"\\n":"\n","\\r":"\r","\\t":"\t"},Ot={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":"\t"},Bt="(Javascript regexp)",It=function(){this.buildCommandMap_()};It.prototype={processCommand:function(e,t,r){var n=this;e.operation(function(){e.curOp.isVimOp=!0,n._processCommand(e,t,r)})},_processCommand:function(t,r,n){var o=t.state.vim,i=wt.registerController.getRegister(":"),a=i.toString();o.visualMode&&le(t);var s=new e.StringStream(r);i.setText(r);var l=n||{};l.input=r;try{this.parseInput_(t,s,l)}catch(e){throw Ke(t,e),e}var c,u;if(l.commandName){if(c=this.matchCommand_(l.commandName)){if(u=c.name,c.excludeFromCommandHistory&&i.setText(a),this.parseCommandArgs_(s,l,c),"exToKey"==c.type){for(var h=0;h0;t--){var r=e.substring(0,t);if(this.commandMap_[r]){var n=this.commandMap_[r];if(0===n.name.indexOf(e))return n}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e
";if(r){r=r.join("");for(var i=0;i")}else for(var a in n){var s=n[a].toString();s.length&&(o+='"'+a+" "+s+"
")}Ke(e,o)},sort:function(t,r){function o(e,t){if(a){var r;r=e,e=t,t=r}s&&(e=e.toLowerCase(),t=t.toLowerCase());var n=c&&v.exec(e),o=c&&v.exec(t);return n?(n=parseInt((n[1]+n[2]).toLowerCase(),y),o=parseInt((o[1]+o[2]).toLowerCase(),y),n-o):e1)return"Invalid arguments";c=o&&"decimal"||i&&"hex"||h&&"octal"}n[2]&&(u=new RegExp(n[2].substr(1,n[2].length-2),s?"i":""))}}();if(h)Ke(t,h+": "+r.argString);else{var p=r.line||t.firstLine(),f=r.lineEnd||r.line||t.lastLine();if(p!=f){var d=n(p,0),m=n(f,z(t,f)),g=t.getRange(d,m).split("\n"),v=u||("decimal"==c?/(-?)([\d]+)/:"hex"==c?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==c?/([0-7]+)/:null),y="decimal"==c?10:"hex"==c?16:"octal"==c?8:null,k=[],C=[];if(c||u)for(S=0;S");if(n){var p=0,f=function(){if(p=u)return void Ke(t,"Invalid argument: "+r.argString.substring(i));for(var h=0;h<=u-c;h++){var p=String.fromCharCode(c+h);delete n.marks[p]}}else delete n.marks[a]}else Ke(t,"Argument required")}},Nt=new It;return e.keyMap.vim={attach:s,detach:a,call:l},k("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(),Mt}()}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/dialog/dialog"),require("../addon/edit/matchbrackets.js")):"function"==typeof define&&define.amd?define(["../lib/codemirror","../addon/search/searchcursor","../addon/dialog/dialog","../addon/edit/matchbrackets"],a):a(CodeMirror)}(function(a){"use strict";var b=[{keys:"",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:"expandToLine",motionArgs:{linewise:!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"}],c=[{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"}],d=a.Pos;a.Vim=function(){function e(b){b.setOption("disableInput",!0),b.setOption("showCursorWhenSelecting",!1),a.signal(b,"vim-mode-change",{mode:"normal"}),b.on("cursorActivity",bb),x(b),a.on(b.getInputField(),"paste",k(b))}function f(b){b.setOption("disableInput",!1),b.off("cursorActivity",bb),a.off(b.getInputField(),"paste",k(b)),b.state.vim=null}function g(b,c){this==a.keyMap.vim&&a.rmClass(b.getWrapperElement(),"cm-fat-cursor"),c&&c.attach==h||f(b)}function h(b,c){this==a.keyMap.vim&&a.addClass(b.getWrapperElement(),"cm-fat-cursor"),c&&c.attach==h||e(b)}function i(b,c){if(c){if(this[b])return this[b];var d=j(b);if(!d)return!1;var e=a.Vim.findKey(c,d);return"function"==typeof e&&a.signal(c,"vim-keypress",d),e}}function j(a){if("'"==a.charAt(0))return a.charAt(1);var b=a.split(/-(?!$)/),c=b[b.length-1];if(1==b.length&&1==b[0].length)return!1;if(2==b.length&&"Shift"==b[0]&&1==c.length)return!1;for(var d=!1,e=0;e")}function k(a){var b=a.state.vim;return b.onPasteFn||(b.onPasteFn=function(){b.insertMode||(a.setCursor(L(a.getCursor(),0,1)),Bb.enterInsertMode(a,{},b))}),b.onPasteFn}function l(a,b){for(var c=[],d=a;d=a.firstLine()&&b<=a.lastLine()}function n(a){return/^[a-z]$/.test(a)}function o(a){return"()[]{}".indexOf(a)!=-1}function p(a){return kb.test(a)}function q(a){return/^[A-Z]$/.test(a)}function r(a){return/^\s*$/.test(a)}function s(a,b){for(var c=0;c"==b.slice(-11)){var c=b.length-11,d=a.slice(0,c),e=b.slice(0,c);return d==e&&a.length>c?"full":0==e.indexOf(d)&&"partial"}return a==b?"full":0==b.indexOf(a)&&"partial"}function P(a){var b=/^.*(<[\w\-]+>)$/.exec(a),c=b?b[1]:a.slice(-1);if(c.length>1)switch(c){case"":c="\n";break;case"":c=" "}return c}function Q(a,b,c){return function(){for(var d=0;d2&&(b=U.apply(void 0,Array.prototype.slice.call(arguments,1))),T(a,b)?a:b}function V(a,b){return arguments.length>2&&(b=V.apply(void 0,Array.prototype.slice.call(arguments,1))),T(a,b)?b:a}function W(a,b,c){var d=T(a,b),e=T(b,c);return d&&e}function X(a,b){return a.getLine(b).length}function Y(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function Z(a){return a.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function $(a,b,c){var e=X(a,b),f=new Array(c-e+1).join(" ");a.setCursor(d(b,e)),a.replaceRange(f,a.getCursor())}function _(a,b){var c=[],e=a.listSelections(),f=R(a.clipPos(b)),g=!S(b,f),h=a.getCursor("head"),i=ba(e,h),j=S(e[i].head,e[i].anchor),k=e.length-1,l=k-i>i?k:0,m=e[l].anchor,n=Math.min(m.line,f.line),o=Math.max(m.line,f.line),p=m.ch,q=f.ch,r=e[l].head.ch-p,s=q-p;r>0&&s<=0?(p++,g||q--):r<0&&s>=0?(p--,j||q++):r<0&&s==-1&&(p--,q++);for(var t=n;t<=o;t++){var u={anchor:new d(t,p),head:new d(t,q)};c.push(u)}return a.setSelections(c),b.ch=q,m.ch=p,m}function aa(a,b,c){for(var d=[],e=0;ej&&(f.line=j),f.ch=X(a,f.line)}return{ranges:[{anchor:g,head:f}],primary:0}}if("block"==c){for(var k=Math.min(g.line,f.line),l=Math.min(g.ch,f.ch),m=Math.max(g.line,f.line),n=Math.max(g.ch,f.ch)+1,o=m-k+1,p=f.line==k?0:o-1,q=[],r=0;r0&&f&&r(f);f=e.pop())c.line--,c.ch=0;f?(c.line--,c.ch=X(a,c.line)):c.ch=0}}function ka(a,b,c){b.ch=0,c.ch=0,c.line++}function la(a){if(!a)return 0;var b=a.search(/\S/);return b==-1?a.length:b}function ma(a,b,c,e,f){for(var g=ha(a),h=a.getLine(g.line),i=g.ch,j=f?lb[0]:mb[0];!j(h.charAt(i));)if(++i>=h.length)return null;e?j=mb[0]:(j=lb[0])(h.charAt(i))||(j=lb[1]);for(var k=i,l=i;j(h.charAt(k))&&k=0;)l--;if(l++,b){for(var m=k;/\s/.test(h.charAt(k))&&k0;)l--;l||(l=n)}}return{start:d(g.line,l),end:d(g.line,k)}}function na(a,b,c){S(b,c)||vb.jumpList.add(a,b,c)}function oa(a,b){vb.lastCharacterSearch.increment=a,vb.lastCharacterSearch.forward=b.forward,vb.lastCharacterSearch.selectedCharacter=b.selectedCharacter}function pa(a,b,c,e){var f=R(a.getCursor()),g=c?1:-1,h=c?a.lineCount():-1,i=f.ch,j=f.line,k=a.getLine(j),l={lineText:k,nextCh:k.charAt(i),lastCh:null,index:i,symb:e,reverseSymb:(c?{")":"(","}":"{"}:{"(":")","{":"}"})[e],forward:c,depth:0,curMoveThrough:!1},m=Cb[e];if(!m)return f;var n=Db[m].init,o=Db[m].isComplete;for(n&&n(l);j!==h&&b;){if(l.index+=g,l.nextCh=l.lineText.charAt(l.index),!l.nextCh){if(j+=g,l.lineText=a.getLine(j)||"",g>0)l.index=0;else{var p=l.lineText.length;l.index=p>0?p-1:0}l.nextCh=l.lineText.charAt(l.index)}o(l)&&(f.line=j,f.ch=l.index,b--)}return l.nextCh||l.curMoveThrough?d(j,l.index):f}function qa(a,b,c,d,e){var f=b.line,g=b.ch,h=a.getLine(f),i=c?1:-1,j=d?mb:lb;if(e&&""==h){if(f+=i,h=a.getLine(f),!m(a,f))return null;g=c?0:h.length}for(;;){if(e&&""==h)return{from:0,to:0,line:f};for(var k=i>0?h.length:-1,l=k,n=k;g!=k;){for(var o=!1,p=0;p0?0:h.length}}function ra(a,b,c,e,f,g){var h=R(b),i=[];(e&&!f||!e&&f)&&c++;for(var j=!(e&&f),k=0;k0;)h(n,e)&&c--,n+=e;return new d(n,0)}var o=a.state.vim;if(o.visualLine&&h(k,1,!0)){var p=o.sel.anchor;h(p.line,-1,!0)&&(f&&p.line==k||(k+=1))}var q=g(k);for(n=k;n<=m&&c;n++)h(n,1,!0)&&(f&&g(n)==q||c--);for(j=new d(n,0),n>m&&!q?q=!0:f=!1,n=k;n>l&&(f&&g(n)!=q&&n!=k||!h(n,-1,!0));n--);return i=new d(n,0),{start:i,end:j}}function xa(a,b,c,e){var f,g,h=b,i={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/}[c],j={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{"}[c],k=a.getLine(h.line).charAt(h.ch),l=k===j?1:0;if(f=a.scanForBracket(d(h.line,h.ch+l),-1,null,{bracketRegex:i}),g=a.scanForBracket(d(h.line,h.ch+l),1,null,{bracketRegex:i}),!f||!g)return{start:h,end:h};if(f=f.pos,g=g.pos,f.line==g.line&&f.ch>g.ch||f.line>g.line){var m=f;f=g,g=m}return e?g.ch+=1:f.ch+=1,{start:f,end:g}}function ya(a,b,c,e){var f,g,h,i,j=R(b),k=a.getLine(j.line),l=k.split(""),m=l.indexOf(c);if(j.ch-1&&!f;h--)l[h]==c&&(f=h+1);else f=j.ch+1;if(f&&!g)for(h=f,i=l.length;h'+b+"",{bottom:!0,duration:5e3}):alert(b)}function Ja(a,b){var c=''+(a||"")+'';return b&&(c+=' '+b+""),c}function Ka(a,b){var c=(b.prefix||"")+" "+(b.desc||"");Ba(a,Ja(b.prefix,b.desc),c,b.onClose,b)}function La(a,b){if(a instanceof RegExp&&b instanceof RegExp){for(var c=["global","multiline","ignoreCase","source"],d=0;d=b&&a<=c:a==b}function Sa(a){var b=a.getScrollInfo(),c=a.coordsChar({left:0,top:6+b.top},"local"),d=b.clientHeight-10+b.top,e=a.coordsChar({left:0,top:d},"local");return{top:c.line,bottom:e.line}}function Ta(a,b,c){if("'"==c){var d=a.doc.history.done,e=d[d.length-2];return e&&e.ranges&&e.ranges[0].head}var f=b.marks[c];return f&&f.find()}function Ua(b,c,d,e,f,g,h,i,j){function k(){b.operation(function(){for(;!p;)l(),m();n()})}function l(){var a=b.getRange(g.from(),g.to()),c=a.replace(h,i);g.replace(c)}function m(){for(;g.findNext()&&Ra(g.from(),e,f);)if(d||!q||g.from().line!=q.line)return b.scrollIntoView(g.from(),30),b.setSelection(g.from(),g.to()),q=g.from(),void(p=!1);p=!0}function n(a){if(a&&a(),b.focus(),q){b.setCursor(q);var c=b.state.vim;c.exMode=!1,c.lastHPos=c.lastHSPos=q.ch}j&&j()}function o(c,d,e){switch(a.e_stop(c),a.keyName(c)){case"Y":l(),m();break;case"N":m();break;case"A":var f=j;j=void 0,b.operation(k),j=f;break;case"L":l();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":n(e)}return p&&n(e),!0}b.state.vim.exMode=!0;var p=!1,q=g.from();return m(),p?void Ia(b,"No matches for "+h.source):c?void Ka(b,{prefix:"replace with "+i+" (y/n/a/q/l)",onKeyDown:o}):(k(),void(j&&j()))}function Va(b){var c=b.state.vim,d=vb.macroModeState,e=vb.registerController.getRegister("."),f=d.isPlaying,g=d.lastInsertModeChanges,h=[];if(!f){for(var i=g.inVisualBlock?c.lastSelection.visualBlock.height:1,j=g.changes,h=[],k=0;k1&&(gb(b,c,c.insertModeRepeat-1,!0),c.lastEditInputState.repeatOverride=c.insertModeRepeat),delete c.insertModeRepeat,c.insertMode=!1,b.setCursor(b.getCursor().line,b.getCursor().ch-1),b.setOption("keyMap","vim"),b.setOption("disableInput",!0),b.toggleOverwrite(!1),e.setText(g.changes.join("")),a.signal(b,"vim-mode-change",{mode:"normal"}),d.isRecording&&$a(d)}function Wa(a){b.unshift(a)}function Xa(a,b,c,d,e){var f={keys:a,type:b};f[b]=c,f[b+"Args"]=d;for(var g in e)f[g]=e[g];Wa(f)}function Ya(b,c,d,e){var f=vb.registerController.getRegister(e);if(":"==e)return f.keyBuffer[0]&&Jb.processCommand(b,f.keyBuffer[0]),void(d.isPlaying=!1);var g=f.keyBuffer,h=0;d.isPlaying=!0, +d.replaySearchQueries=f.searchQueries.slice(0);for(var i=0;i|<\w+>|./.exec(l),k=j[0],l=l.substring(j.index+k.length),a.Vim.handleKey(b,k,"macro"),c.insertMode){var m=f.insertModeChanges[h++].changes;vb.macroModeState.lastInsertModeChanges.changes=m,hb(b,m,1),Va(b)}d.isPlaying=!1}function Za(a,b){if(!a.isPlaying){var c=a.latestRegister,d=vb.registerController.getRegister(c);d&&d.pushText(b)}}function $a(a){if(!a.isPlaying){var b=a.latestRegister,c=vb.registerController.getRegister(b);c&&c.pushInsertModeChanges&&c.pushInsertModeChanges(a.lastInsertModeChanges)}}function _a(a,b){if(!a.isPlaying){var c=a.latestRegister,d=vb.registerController.getRegister(c);d&&d.pushSearchQuery&&d.pushSearchQuery(b)}}function ab(a,b){var c=vb.macroModeState,d=c.lastInsertModeChanges;if(!c.isPlaying)for(;b;){if(d.expectCursorActivityForChange=!0,"+input"==b.origin||"paste"==b.origin||void 0===b.origin){var e=b.text.join("\n");d.maybeReset&&(d.changes=[],d.maybeReset=!1),d.changes.push(e)}b=b.next}}function bb(a){var b=a.state.vim;if(b.insertMode){var c=vb.macroModeState;if(c.isPlaying)return;var d=c.lastInsertModeChanges;d.expectCursorActivityForChange?d.expectCursorActivityForChange=!1:d.maybeReset=!0}else a.curOp.isVimOp||db(a,b);b.visualMode&&cb(a)}function cb(a){var b=a.state.vim,c=J(a,R(b.sel.head)),d=L(c,0,1);b.fakeCursor&&b.fakeCursor.clear(),b.fakeCursor=a.markText(c,d,{className:"cm-animate-fat-cursor"})}function db(b,c){var d=b.getCursor("anchor"),e=b.getCursor("head");if(c.visualMode&&!b.somethingSelected()?ia(b,!1):c.visualMode||c.insertMode||!b.somethingSelected()||(c.visualMode=!0,c.visualLine=!1,a.signal(b,"vim-mode-change",{mode:"visual"})),c.visualMode){var f=T(e,d)?0:-1,g=T(e,d)?-1:0;e=L(e,0,f),d=L(d,0,g),c.sel={anchor:d,head:e},ua(b,c,"<",U(e,d)),ua(b,c,">",V(e,d))}else c.insertMode||(c.lastHPos=b.getCursor().ch)}function eb(a){this.keyName=a}function fb(b){function c(){return e.maybeReset&&(e.changes=[],e.maybeReset=!1),e.changes.push(new eb(f)),!0}var d=vb.macroModeState,e=d.lastInsertModeChanges,f=a.keyName(b);f&&(f.indexOf("Delete")==-1&&f.indexOf("Backspace")==-1||a.lookupKey(f,"vim-insert",c))}function gb(a,b,c,d){function e(){h?yb.processAction(a,b,b.lastEditActionCommand):yb.evalInput(a,b)}function f(c){if(g.lastInsertModeChanges.changes.length>0){c=b.lastEditActionCommand?c:1;hb(a,g.lastInsertModeChanges.changes,c)}}var g=vb.macroModeState;g.isPlaying=!0;var h=!!b.lastEditActionCommand,i=b.inputState;if(b.inputState=b.lastEditInputState,h&&b.lastEditActionCommand.interlaceInsertRepeat)for(var j=0;j"]),rb=[].concat(nb,ob,pb,["-",'"',".",":","/"]),sb={};t("filetype",void 0,"string",["ft"],function(a,b){if(void 0!==b){if(void 0===a){var c=b.getOption("mode");return"null"==c?"":c}var c=""==a?"null":a;b.setOption("mode",c)}});var tb=function(){function a(a,b,h){function i(b){var e=++d%c,f=g[e];f&&f.clear(),g[e]=a.setBookmark(b)}var j=d%c,k=g[j];if(k){var l=k.find();l&&!S(l,b)&&i(b)}else i(b);i(h),e=d,(f=d-c+1)<0&&(f=0)}function b(a,b){d+=b,d>e?d=e:d0?1:-1,k=a.getCursor();do{if(d+=j,(h=g[(c+d)%c])&&(i=h.find())&&!S(k,i))break}while(df)}return h}var c=100,d=-1,e=0,f=0,g=new Array(c);return{cachedCursor:void 0,add:a,move:b}},ub=function(a){return a?{changes:a.changes,expectCursorActivityForChange:a.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};w.prototype={exitMacroRecordMode:function(){var a=vb.macroModeState;a.onRecordingDone&&a.onRecordingDone(),a.onRecordingDone=void 0,a.isRecording=!1},enterMacroRecordMode:function(a,b){var c=vb.registerController.getRegister(b);c&&(c.clear(),this.latestRegister=b,a.openDialog&&(this.onRecordingDone=a.openDialog("(recording)["+b+"]",null,{bottom:!0})),this.isRecording=!0)}};var vb,wb,xb={buildKeyMap:function(){},getRegisterController:function(){return vb.registerController},resetVimGlobalState_:y,getVimGlobalState_:function(){return vb},maybeInitVimState_:x,suppressErrorLogging:!1,InsertModeKey:eb,map:function(a,b,c){Jb.map(a,b,c)},unmap:function(a,b){Jb.unmap(a,b)},setOption:u,getOption:v,defineOption:t,defineEx:function(a,b,c){if(b){if(0!==a.indexOf(b))throw new Error('(Vim.defineEx) "'+b+'" is not a prefix of "'+a+'", command not registered')}else b=a;Ib[a]=c,Jb.commandMap_[b]={name:a,shortName:b,type:"api"}},handleKey:function(a,b,c){var d=this.findKey(a,b,c);if("function"==typeof d)return d()},findKey:function(c,d,e){function f(){var a=vb.macroModeState;if(a.isRecording){if("q"==d)return a.exitMacroRecordMode(),A(c),!0;"mapping"!=e&&Za(a,d)}}function g(){if(""==d)return A(c),j.visualMode?ia(c):j.insertMode&&Va(c),!0}function h(b){for(var e;b;)e=/<\w+-.+?>|<\w+>|./.exec(b),d=e[0],b=b.substring(e.index+d.length),a.Vim.handleKey(c,d,"mapping")}var i,j=x(c);return i=j.insertMode?function(){if(g())return!0;for(var a=j.inputState.keyBuffer=j.inputState.keyBuffer+d,e=1==d.length,f=yb.matchCommand(a,b,j.inputState,"insert");a.length>1&&"full"!=f.type;){var a=j.inputState.keyBuffer=a.slice(1),h=yb.matchCommand(a,b,j.inputState,"insert");"none"!=h.type&&(f=h)}if("none"==f.type)return A(c),!1;if("partial"==f.type)return wb&&window.clearTimeout(wb),wb=window.setTimeout(function(){j.insertMode&&j.inputState.keyBuffer&&A(c)},v("insertModeEscKeysTimeout")),!e;if(wb&&window.clearTimeout(wb),e){for(var i=c.listSelections(),k=0;k0||this.motionRepeat.length>0)&&(a=1,this.prefixRepeat.length>0&&(a*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(a*=parseInt(this.motionRepeat.join(""),10))),a},B.prototype={setText:function(a,b,c){this.keyBuffer=[a||""],this.linewise=!!b,this.blockwise=!!c},pushText:function(a,b){b&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(a)},pushInsertModeChanges:function(a){this.insertModeChanges.push(ub(a))},pushSearchQuery:function(a){this.searchQueries.push(a)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},D.prototype={pushText:function(a,b,c,d,e){d&&"\n"==c.charAt(0)&&(c=c.slice(1)+"\n"),d&&"\n"!==c.charAt(c.length-1)&&(c+="\n");var f=this.isValidRegister(a)?this.getRegister(a):null;if(!f){switch(b){case"yank":this.registers[0]=new B(c,d,e);break;case"delete":case"change":c.indexOf("\n")==-1?this.registers["-"]=new B(c,d):(this.shiftNumericRegisters_(),this.registers[1]=new B(c,d))}return void this.unnamedRegister.setText(c,d,e)}q(a)?f.pushText(c,d):f.setText(c,d,e),this.unnamedRegister.setText(f.toString(),d)},getRegister:function(a){return this.isValidRegister(a)?(a=a.toLowerCase(),this.registers[a]||(this.registers[a]=new B),this.registers[a]):this.unnamedRegister},isValidRegister:function(a){return a&&s(a,rb)},shiftNumericRegisters_:function(){for(var a=9;a>=2;a--)this.registers[a]=this.getRegister(""+(a-1))}},E.prototype={nextMatch:function(a,b){var c=this.historyBuffer,d=b?-1:1;null===this.initialPrefix&&(this.initialPrefix=a);for(var e=this.iterator+d;b?e>=0:e=c.length?(this.iterator=c.length,this.initialPrefix):e<0?a:void 0},pushInput:function(a){var b=this.historyBuffer.indexOf(a);b>-1&&this.historyBuffer.splice(b,1),a.length&&this.historyBuffer.push(a)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var yb={matchCommand:function(a,b,c,d){var e=N(a,b,d,c);if(!e.full&&!e.partial)return{type:"none"};if(!e.full&&e.partial)return{type:"partial"};for(var f,g=0;g"==f.keys.slice(-11)&&(c.selectedCharacter=P(a)),{type:"full",command:f}},processCommand:function(a,b,c){switch(b.inputState.repeatOverride=c.repeatOverride,c.type){case"motion":this.processMotion(a,b,c);break;case"operator":this.processOperator(a,b,c);break;case"operatorMotion":this.processOperatorMotion(a,b,c);break;case"action":this.processAction(a,b,c);break;case"search":this.processSearch(a,b,c);break;case"ex":case"keyToEx":this.processEx(a,b,c)}},processMotion:function(a,b,c){b.inputState.motion=c.motion,b.inputState.motionArgs=K(c.motionArgs),this.evalInput(a,b)},processOperator:function(a,b,c){var d=b.inputState;if(d.operator){if(d.operator==c.operator)return d.motion="expandToLine",d.motionArgs={linewise:!0},void this.evalInput(a,b);A(a)}d.operator=c.operator,d.operatorArgs=K(c.operatorArgs),b.visualMode&&this.evalInput(a,b)},processOperatorMotion:function(a,b,c){var d=b.visualMode,e=K(c.operatorMotionArgs);e&&d&&e.visualLine&&(b.visualLine=!0),this.processOperator(a,b,c),d||this.processMotion(a,b,c)},processAction:function(a,b,c){var d=b.inputState,e=d.getRepeat(),f=!!e,g=K(c.actionArgs)||{};d.selectedCharacter&&(g.selectedCharacter=d.selectedCharacter),c.operator&&this.processOperator(a,b,c),c.motion&&this.processMotion(a,b,c),(c.motion||c.operator)&&this.evalInput(a,b),g.repeat=e||1,g.repeatIsExplicit=f,g.registerName=d.registerName,A(a),b.lastMotion=null,c.isEdit&&this.recordLastEdit(b,d,c),Bb[c.action](a,g,b)},processSearch:function(b,c,d){function e(a,e,f){vb.searchHistoryController.pushInput(a),vb.searchHistoryController.reset();try{Ma(b,a,e,f)}catch(c){return Ia(b,"Invalid regex: "+a),void A(b)}yb.processMotion(b,c,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:d.searchArgs.toJumplist}})}function f(a){b.scrollTo(m.left,m.top),e(a,!0,!0);var c=vb.macroModeState;c.isRecording&&_a(c,a)}function g(c,d,e){var f,g,h=a.keyName(c);"Up"==h||"Down"==h?(f="Up"==h,g=c.target?c.target.selectionEnd:0,d=vb.searchHistoryController.nextMatch(d,f)||"",e(d),g&&c.target&&(c.target.selectionEnd=c.target.selectionStart=Math.min(g,c.target.value.length))):"Left"!=h&&"Right"!=h&&"Ctrl"!=h&&"Alt"!=h&&"Shift"!=h&&vb.searchHistoryController.reset();var j;try{j=Ma(b,d,!0,!0)}catch(a){}j?b.scrollIntoView(Pa(b,!i,j),30):(Qa(b),b.scrollTo(m.left,m.top))}function h(c,d,e){var f=a.keyName(c);"Esc"==f||"Ctrl-C"==f||"Ctrl-["==f||"Backspace"==f&&""==d?(vb.searchHistoryController.pushInput(d),vb.searchHistoryController.reset(),Ma(b,l),Qa(b),b.scrollTo(m.left,m.top),a.e_stop(c),A(b),e(),b.focus()):"Up"==f||"Down"==f?a.e_stop(c):"Ctrl-U"==f&&(a.e_stop(c),e(""))}if(b.getSearchCursor){var i=d.searchArgs.forward,j=d.searchArgs.wholeWordOnly;Aa(b).setReversed(!i);var k=i?"/":"?",l=Aa(b).getQuery(),m=b.getScrollInfo();switch(d.searchArgs.querySrc){case"prompt":var n=vb.macroModeState;if(n.isPlaying){var o=n.replaySearchQueries.shift();e(o,!0,!1)}else Ka(b,{onClose:f,prefix:k,desc:Gb,onKeyUp:g,onKeyDown:h});break;case"wordUnderCursor":var p=ma(b,!1,!0,!1,!0),q=!0;if(p||(p=ma(b,!1,!0,!1,!1),q=!1),!p)return;var o=b.getLine(p.start.line).substring(p.start.ch,p.end.ch);o=q&&j?"\\b"+o+"\\b":Z(o),vb.jumpList.cachedCursor=b.getCursor(),b.setCursor(p.start),e(o,!0,!1)}}},processEx:function(b,c,d){function e(a){vb.exCommandHistoryController.pushInput(a),vb.exCommandHistoryController.reset(),Jb.processCommand(b,a)}function f(c,d,e){var f,g,h=a.keyName(c);("Esc"==h||"Ctrl-C"==h||"Ctrl-["==h||"Backspace"==h&&""==d)&&(vb.exCommandHistoryController.pushInput(d),vb.exCommandHistoryController.reset(),a.e_stop(c),A(b),e(),b.focus()),"Up"==h||"Down"==h?(a.e_stop(c),f="Up"==h,g=c.target?c.target.selectionEnd:0,d=vb.exCommandHistoryController.nextMatch(d,f)||"",e(d),g&&c.target&&(c.target.selectionEnd=c.target.selectionStart=Math.min(g,c.target.value.length))):"Ctrl-U"==h?(a.e_stop(c),e("")):"Left"!=h&&"Right"!=h&&"Ctrl"!=h&&"Alt"!=h&&"Shift"!=h&&vb.exCommandHistoryController.reset()}"keyToEx"==d.type?Jb.processCommand(b,d.exArgs.input):c.visualMode?Ka(b,{onClose:e,prefix:":",value:"'<,'>",onKeyDown:f}):Ka(b,{onClose:e,prefix:":",onKeyDown:f})},evalInput:function(a,b){var c,e,f,g=b.inputState,h=g.motion,i=g.motionArgs||{},j=g.operator,k=g.operatorArgs||{},l=g.registerName,m=b.sel,n=R(b.visualMode?J(a,m.head):a.getCursor("head")),o=R(b.visualMode?J(a,m.anchor):a.getCursor("anchor")),p=R(n),q=R(o);if(j&&this.recordLastEdit(b,g),f=void 0!==g.repeatOverride?g.repeatOverride:g.getRepeat(),f>0&&i.explicitRepeat?i.repeatIsExplicit=!0:(i.noRepeat||!i.explicitRepeat&&0===f)&&(f=1,i.repeatIsExplicit=!1),g.selectedCharacter&&(i.selectedCharacter=k.selectedCharacter=g.selectedCharacter),i.repeat=f,A(a),h){var r=zb[h](a,n,i,b);if(b.lastMotion=zb[h],!r)return;if(i.toJumplist){var s=vb.jumpList,t=s.cachedCursor;t?(na(a,t,r),delete s.cachedCursor):na(a,n,r)}r instanceof Array?(e=r[0],c=r[1]):c=r,c||(c=R(n)),b.visualMode?(b.visualBlock&&c.ch===1/0||(c=J(a,c,b.visualBlock)),e&&(e=J(a,e,!0)),e=e||q,m.anchor=e,m.head=c,fa(a),ua(a,b,"<",T(e,c)?e:c),ua(a,b,">",T(e,c)?c:e)):j||(c=J(a,c),a.setCursor(c.line,c.ch))}if(j){if(k.lastSel){e=q;var u=k.lastSel,v=Math.abs(u.head.line-u.anchor.line),w=Math.abs(u.head.ch-u.anchor.ch);c=u.visualLine?d(q.line+v,q.ch):u.visualBlock?d(q.line+v,q.ch+w):u.head.line==u.anchor.line?d(q.line,q.ch+w):d(q.line+v,q.ch),b.visualMode=!0,b.visualLine=u.visualLine,b.visualBlock=u.visualBlock,m=b.sel={anchor:e,head:c},fa(a)}else b.visualMode&&(k.lastSel={anchor:R(m.anchor),head:R(m.head),visualBlock:b.visualBlock,visualLine:b.visualLine});var x,y,z,B,C;if(b.visualMode){if(x=U(m.head,m.anchor),y=V(m.head,m.anchor),z=b.visualLine||k.linewise,B=b.visualBlock?"block":z?"line":"char",C=ga(a,{anchor:x,head:y},B),z){var D=C.ranges;if("block"==B)for(var E=0;Ek&&f.line==k?this.moveToEol(a,b,c,e):(c.toFirstChar&&(g=la(a.getLine(i)),e.lastHPos=g),e.lastHSPos=a.charCoords(d(i,g),"div").left,d(i,g))},moveByDisplayLines:function(a,b,c,e){var f=b;switch(e.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:e.lastHSPos=a.charCoords(f,"div").left}var g=c.repeat,h=a.findPosV(f,c.forward?g:-g,"line",e.lastHSPos);if(h.hitSide)if(c.forward)var i=a.charCoords(h,"div"),j={top:i.top+8,left:e.lastHSPos},h=a.coordsChar(j,"div");else{var k=a.charCoords(d(a.firstLine(),0),"div");k.left=e.lastHSPos,h=a.coordsChar(k,"div")}return e.lastHPos=h.ch,h},moveByPage:function(a,b,c){var d=b,e=c.repeat;return a.findPosV(d,c.forward?e:-e,"page")},moveByParagraph:function(a,b,c){var d=c.forward?1:-1;return wa(a,b,c.repeat,d)},moveByScroll:function(a,b,c,d){var e=a.getScrollInfo(),f=null,g=c.repeat;g||(g=e.clientHeight/(2*a.defaultTextHeight()));var h=a.charCoords(b,"local");c.repeat=g;var f=zb.moveByDisplayLines(a,b,c,d);if(!f)return null;var i=a.charCoords(f,"local");return a.scrollTo(null,e.top+i.top-h.top),f},moveByWords:function(a,b,c){return ra(a,b,c.repeat,!!c.forward,!!c.wordEnd,!!c.bigWord)},moveTillCharacter:function(a,b,c){var d=c.repeat,e=sa(a,d,c.forward,c.selectedCharacter),f=c.forward?-1:1;return oa(f,c),e?(e.ch+=f,e):null},moveToCharacter:function(a,b,c){var d=c.repeat;return oa(0,c),sa(a,d,c.forward,c.selectedCharacter)||b},moveToSymbol:function(a,b,c){return pa(a,c.repeat,c.forward,c.selectedCharacter)||b},moveToColumn:function(a,b,c,d){var e=c.repeat;return d.lastHPos=e-1,d.lastHSPos=a.charCoords(b,"div").left,ta(a,e)},moveToEol:function(a,b,c,e){var f=b;e.lastHPos=1/0;var g=d(f.line+c.repeat-1,1/0),h=a.clipPos(g);return h.ch--,e.lastHSPos=a.charCoords(h,"div").left,g},moveToFirstNonWhiteSpaceCharacter:function(a,b){var c=b;return d(c.line,la(a.getLine(c.line)))},moveToMatchedSymbol:function(a,b){var c,e=b,f=e.line,g=e.ch,h=a.getLine(f);do{if((c=h.charAt(g++))&&o(c)){var i=a.getTokenTypeAt(d(f,g));if("string"!==i&&"comment"!==i)break}}while(c);if(c){return a.findMatchingBracket(d(f,g)).to}return e},moveToStartOfLine:function(a,b){return d(b.line,0)},moveToLineOrEdgeOfDocument:function(a,b,c){var e=c.forward?a.lastLine():a.firstLine();return c.repeatIsExplicit&&(e=c.repeat-a.getOption("firstLineNumber")),d(e,la(a.getLine(e)))},textObjectManipulation:function(a,b,c,d){var e={"(":")",")":"(","{":"}","}":"{","[":"]","]":"["},f={"'":!0,'"':!0},g=c.selectedCharacter;"b"==g?g="(":"B"==g&&(g="{");var h,i=!c.textObjectInner;if(e[g])h=xa(a,b,g,i);else if(f[g])h=ya(a,b,g,i);else if("W"===g)h=ma(a,i,!0,!0);else if("w"===g)h=ma(a,i,!0,!1);else{if("p"!==g)return null;if(h=wa(a,b,c.repeat,0,i),c.linewise=!0,d.visualMode)d.visualLine||(d.visualLine=!0);else{var j=d.inputState.operatorArgs;j&&(j.linewise=!0),h.end.line--}}return a.state.vim.visualMode?ea(a,h.start,h.end):[h.start,h.end]},repeatLastCharacterSearch:function(a,b,c){var d=vb.lastCharacterSearch,e=c.repeat,f=c.forward===d.forward,g=(d.increment?1:0)*(f?-1:1);a.moveH(-g,"char"),c.inclusive=!!f;var h=sa(a,e,f,d.selectedCharacter);return h?(h.ch+=g,h):(a.moveH(g,"char"),b)}},Ab={change:function(b,c,e){var f,g,h=b.state.vim;if(vb.macroModeState.lastInsertModeChanges.inVisualBlock=h.visualBlock,h.visualMode){g=b.getSelection();var i=G("",e.length);b.replaceSelections(i),f=U(e[0].head,e[0].anchor)}else{var j=e[0].anchor,k=e[0].head;g=b.getRange(j,k);var l=h.lastEditInputState||{};if("moveByWords"==l.motion&&!r(g)){var m=/\s+$/.exec(g);m&&l.motionArgs&&l.motionArgs.forward&&(k=L(k,0,-m[0].length),g=g.slice(0,-m[0].length))}var n=new d(j.line-1,Number.MAX_VALUE),o=b.firstLine()==b.lastLine();k.line>b.lastLine()&&c.linewise&&!o?b.replaceRange("",n,k):b.replaceRange("",j,k),c.linewise&&(o||(b.setCursor(n),a.commands.newlineAndIndent(b)),j.ch=Number.MAX_VALUE),f=j}vb.registerController.pushText(c.registerName,"change",g,c.linewise,e.length>1),Bb.enterInsertMode(b,{head:f},b.state.vim)},delete:function(a,b,c){var e,f,g=a.state.vim;if(g.visualBlock){f=a.getSelection();var h=G("",c.length);a.replaceSelections(h),e=c[0].anchor}else{var i=c[0].anchor,j=c[0].head;b.linewise&&j.line!=a.firstLine()&&i.line==a.lastLine()&&i.line==j.line-1&&(i.line==a.firstLine()?i.ch=0:i=d(i.line-1,X(a,i.line-1))),f=a.getRange(i,j),a.replaceRange("",i,j),e=i,b.linewise&&(e=zb.moveToFirstNonWhiteSpaceCharacter(a,i))}return vb.registerController.pushText(b.registerName,"delete",f,b.linewise,g.visualBlock),J(a,e)},indent:function(a,b,c){var d=a.state.vim,e=c[0].anchor.line,f=d.visualBlock?c[c.length-1].anchor.line:c[0].head.line,g=d.visualMode?b.repeat:1;b.linewise&&f--;for(var h=e;h<=f;h++)for(var i=0;ij.top?(i.line+=(h-j.top)/e,i.line=Math.ceil(i.line),a.setCursor(i),j=a.charCoords(i,"local"),a.scrollTo(null,j.top)):a.scrollTo(null,h);else{var k=h+a.getScrollInfo().clientHeight;k=g.anchor.line?L(g.head,0,1):d(g.anchor.line,0);else if("inplace"==f&&e.visualMode)return;b.setOption("disableInput",!1),c&&c.replace?(b.toggleOverwrite(!0),b.setOption("keyMap","vim-replace"),a.signal(b,"vim-mode-change",{mode:"replace"})):(b.toggleOverwrite(!1),b.setOption("keyMap","vim-insert"),a.signal(b,"vim-mode-change",{mode:"insert"})),vb.macroModeState.isPlaying||(b.on("change",ab),a.on(b.getInputField(),"keydown",fb)),e.visualMode&&ia(b),aa(b,h,i)}},toggleVisualMode:function(b,c,e){var f,g=c.repeat,h=b.getCursor();e.visualMode?e.visualLine^c.linewise||e.visualBlock^c.blockwise?(e.visualLine=!!c.linewise,e.visualBlock=!!c.blockwise,a.signal(b,"vim-mode-change",{mode:"visual",subMode:e.visualLine?"linewise":e.visualBlock?"blockwise":""}),fa(b)):ia(b):(e.visualMode=!0,e.visualLine=!!c.linewise,e.visualBlock=!!c.blockwise,f=J(b,d(h.line,h.ch+g-1),!0),e.sel={anchor:h,head:f},a.signal(b,"vim-mode-change",{mode:"visual",subMode:e.visualLine?"linewise":e.visualBlock?"blockwise":""}),fa(b),ua(b,e,"<",U(h,f)),ua(b,e,">",V(h,f)))},reselectLastSelection:function(b,c,d){var e=d.lastSelection;if(d.visualMode&&da(b,d),e){var f=e.anchorMark.find(),g=e.headMark.find();if(!f||!g)return;d.sel={anchor:f,head:g},d.visualMode=!0,d.visualLine=e.visualLine,d.visualBlock=e.visualBlock,fa(b),ua(b,d,"<",U(f,g)),ua(b,d,">",V(f,g)),a.signal(b,"vim-mode-change",{mode:"visual",subMode:d.visualLine?"linewise":d.visualBlock?"blockwise":""})}},joinLines:function(a,b,c){var e,f;if(c.visualMode){if(e=a.getCursor("anchor"),f=a.getCursor("head"),T(f,e)){var g=f;f=e,e=g}f.ch=X(a,f.line)-1}else{var h=Math.max(b.repeat,2);e=a.getCursor(),f=J(a,d(e.line+h-1,1/0))}for(var i=0,j=e.line;j1)var g=Array(b.repeat+1).join(g);var o=f.linewise,p=f.blockwise;if(o)c.visualMode?g=c.visualLine?g.slice(0,-1):"\n"+g.slice(0,g.length-1)+"\n":b.after?(g="\n"+g.slice(0,g.length-1),e.ch=X(a,e.line)):e.ch=0;else{if(p){g=g.split("\n");for(var q=0;qa.lastLine()&&a.replaceRange("\n",d(A,0));var B=X(a,A);Bk.length&&(f=k.length),g=d(i.line,f)}if("\n"==h)e.visualMode||b.replaceRange("",i,g),(a.commands.newlineAndIndentContinueComment||a.commands.newlineAndIndent)(b);else{var l=b.getRange(i,g);if(l=l.replace(/[^\n]/g,h),e.visualBlock){var m=new Array(b.getOption("tabSize")+1).join(" ");l=b.getSelection(),l=l.replace(/\t/g,m).replace(/[^\n]/g,h).split("\n"),b.replaceSelections(l)}else b.replaceRange(l,i,g);e.visualMode?(i=T(j[0].anchor,j[0].head)?j[0].anchor:j[0].head,b.setCursor(i),ia(b,!1)):b.setCursor(L(g,0,-1))}},incrementNumberToken:function(a,b){for(var c,e,f,g,h,i=a.getCursor(),j=a.getLine(i.line),k=/-?\d+/g;null!==(c=k.exec(j))&&(h=c[0],e=c.index,f=e+h.length,!(i.ch=1)return!0}else a.nextCh===a.reverseSymb&&a.depth--;return!1}},section:{init:function(a){a.curMoveThrough=!0,a.symb=(a.forward?"]":"[")===a.symb?"{":"}"},isComplete:function(a){return 0===a.index&&a.nextCh===a.symb}},comment:{isComplete:function(a){var b="*"===a.lastCh&&"/"===a.nextCh +;return a.lastCh=a.nextCh,b}},method:{init:function(a){a.symb="m"===a.symb?"{":"}",a.reverseSymb="{"===a.symb?"}":"{"},isComplete:function(a){return a.nextCh===a.symb}},preprocess:{init:function(a){a.index=0},isComplete:function(a){if("#"===a.nextCh){var b=a.lineText.match(/#(\w+)/)[1];if("endif"===b){if(a.forward&&0===a.depth)return!0;a.depth++}else if("if"===b){if(!a.forward&&0===a.depth)return!0;a.depth--}if("else"===b&&0===a.depth)return!0}return!1}}};t("pcre",!0,"boolean"),za.prototype={getQuery:function(){return vb.query},setQuery:function(a){vb.query=a},getOverlay:function(){return this.searchOverlay},setOverlay:function(a){this.searchOverlay=a},isReversed:function(){return vb.isReversed},setReversed:function(a){vb.isReversed=a},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(a){this.annotate=a}};var Eb={"\\n":"\n","\\r":"\r","\\t":"\t"},Fb={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":"\t"},Gb="(Javascript regexp)",Hb=function(){this.buildCommandMap_()};Hb.prototype={processCommand:function(a,b,c){var d=this;a.operation(function(){a.curOp.isVimOp=!0,d._processCommand(a,b,c)})},_processCommand:function(b,c,d){var e=b.state.vim,f=vb.registerController.getRegister(":"),g=f.toString();e.visualMode&&ia(b);var h=new a.StringStream(c);f.setText(c);var i=d||{};i.input=c;try{this.parseInput_(b,h,i)}catch(a){throw Ia(b,a),a}var j,k;if(i.commandName){if(j=this.matchCommand_(i.commandName)){if(k=j.name,j.excludeFromCommandHistory&&f.setText(g),this.parseCommandArgs_(h,i,j),"exToKey"==j.type){for(var l=0;l0;b--){var c=a.substring(0,b);if(this.commandMap_[c]){var d=this.commandMap_[c];if(0===d.name.indexOf(a))return d}}return null},buildCommandMap_:function(){this.commandMap_={};for(var a=0;a
";if(c){var f;c=c.join("");for(var g=0;g"}}else for(var f in d){var i=d[f].toString();i.length&&(e+='"'+f+" "+i+"
")}Ia(a,e)},sort:function(b,c){function e(a,b){if(g){var c;c=a,a=b,b=c}h&&(a=a.toLowerCase(),b=b.toLowerCase());var d=j&&r.exec(a),e=j&&r.exec(b);return d?(d=parseInt((d[1]+d[2]).toLowerCase(),s),e=parseInt((e[1]+e[2]).toLowerCase(),s),d-e):a1)return"Invalid arguments";j=e&&"decimal"||f&&"hex"||l&&"octal"}d[2]&&(k=new RegExp(d[2].substr(1,d[2].length-2),h?"i":""))}}();if(l)return void Ia(b,l+": "+c.argString);var m=c.line||b.firstLine(),n=c.lineEnd||c.line||b.lastLine();if(m!=n){var o=d(m,0),p=d(n,X(b,n)),q=b.getRange(o,p).split("\n"),r=k?k:"decimal"==j?/(-?)([\d]+)/:"hex"==j?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==j?/([0-7]+)/:null,s="decimal"==j?10:"hex"==j?16:"octal"==j?8:null,t=[],u=[];if(j||k)for(var v=0;v")}if(!d)return void Ia(a,k);var m=0,n=function(){if(m=k)return void Ia(b,"Invalid argument: "+c.argString.substring(f));for(var l=0;l<=k-j;l++){var m=String.fromCharCode(j+l);delete d.marks[m]}}else delete d.marks[g]}}},Jb=new Hb;return a.keyMap.vim={attach:h,detach:g,call:i},t("insertModeEscKeysTimeout",200,"number"),a.keyMap["vim-insert"]={fallthrough:["default"],attach:h,detach:g,call:i},a.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:h,detach:g,call:i},y(),xb}()}); \ No newline at end of file diff --git a/media/vendor/codemirror/lib/addons.js b/media/vendor/codemirror/lib/addons.js index d98281bd548f3..e1fccbad8d368 100644 --- a/media/vendor/codemirror/lib/addons.js +++ b/media/vendor/codemirror/lib/addons.js @@ -1990,7 +1990,7 @@ CodeMirror.multiplexingMode = function(outer /*, others */) { CodeMirror.rmClass(cm.getWrapperElement(), "cm-fat-cursor"); if (!next || next.attach != attachVimMap) - leaveVimMode(cm, false); + leaveVimMode(cm); } function attachVimMap(cm, prev) { if (this == CodeMirror.keyMap.vim) @@ -2380,9 +2380,9 @@ CodeMirror.multiplexingMode = function(outer /*, others */) { lastCharacterSearch: {increment:0, forward:true, selectedCharacter:''}, registerController: new RegisterController({}), // search history buffer - searchHistoryController: new HistoryController({}), + searchHistoryController: new HistoryController(), // ex Command history buffer - exCommandHistoryController : new HistoryController({}) + exCommandHistoryController : new HistoryController() }; for (var optionName in options) { var option = options[optionName]; @@ -2689,7 +2689,7 @@ CodeMirror.multiplexingMode = function(outer /*, others */) { * for a reference implementation. */ function defineRegister(name, register) { - var registers = vimGlobalState.registerController.registers[name]; + var registers = vimGlobalState.registerController.registers; if (!name || name.length != 1) { throw Error('Register name must be 1 character'); } @@ -4546,7 +4546,6 @@ CodeMirror.multiplexingMode = function(outer /*, others */) { var range = {anchor: new Pos(line, baseCh), head: new Pos(line, headCh)}; selections.push(range); } - primIndex = head.line == lastLine ? selections.length - 1 : 0; cm.setSelections(selections); selectionEnd.ch = headCh; base.ch = baseCh; @@ -5814,23 +5813,42 @@ CodeMirror.multiplexingMode = function(outer /*, others */) { parseLineSpec_: function(cm, inputStream) { var numberMatch = inputStream.match(/^(\d+)/); if (numberMatch) { + // Absolute line number plus offset (N+M or N-M) is probably a typo, + // not something the user actually wanted. (NB: vim does allow this.) return parseInt(numberMatch[1], 10) - 1; } switch (inputStream.next()) { case '.': - return cm.getCursor().line; + return this.parseLineSpecOffset_(inputStream, cm.getCursor().line); case '$': - return cm.lastLine(); + return this.parseLineSpecOffset_(inputStream, cm.lastLine()); case '\'': var markName = inputStream.next(); var markPos = getMarkPos(cm, cm.state.vim, markName); if (!markPos) throw new Error('Mark not set'); - return markPos.line; + return this.parseLineSpecOffset_(inputStream, markPos.line); + case '-': + case '+': + inputStream.backUp(1); + // Offset is relative to current line if not otherwise specified. + return this.parseLineSpecOffset_(inputStream, cm.getCursor().line); default: inputStream.backUp(1); return undefined; } }, + parseLineSpecOffset_: function(inputStream, line) { + var offsetMatch = inputStream.match(/^([+-])?(\d+)/); + if (offsetMatch) { + var offset = parseInt(offsetMatch[2], 10); + if (offsetMatch[1] == "-") { + line -= offset; + } else { + line += offset; + } + } + return line; + }, parseCommandArgs_: function(inputStream, params, command) { if (inputStream.eol()) { return; diff --git a/media/vendor/codemirror/lib/addons.min.js b/media/vendor/codemirror/lib/addons.min.js index 28ec75f346653..67518dc9a9c42 100644 --- a/media/vendor/codemirror/lib/addons.min.js +++ b/media/vendor/codemirror/lib/addons.min.js @@ -1 +1,4 @@ -!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.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}function n(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width,t.style.height=n.height,window.scrollTo(n.scrollLeft,n.scrollTop),e.refresh()}e.defineOption("fullScreen",!1,function(r,o,i){i==e.Init&&(i=!1),!i!=!o&&(o?t(r):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){function t(e,t,n,r){this.cm=e,this.node=t,this.options=n,this.height=r,this.cleared=!1}function n(e){var t=e.getWrapperElement(),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r=parseInt(n.height),o=e.state.panels={setHeight:t.style.height,heightLeft:r,panels:0,wrapper:document.createElement("div")};t.parentNode.insertBefore(o.wrapper,t);var i=e.hasFocus();o.wrapper.appendChild(t),i&&e.focus(),e._setSize=e.setSize,null!=r&&(e.setSize=function(t,n){if(null==n)return this._setSize(t,n);if(o.setHeight=n,"number"!=typeof n){var i=/^(\d+\.?\d*)px$/.exec(n);i?n=Number(i[1]):(o.wrapper.style.height=n,n=o.wrapper.offsetHeight,o.wrapper.style.height="")}e._setSize(t,o.heightLeft+=n-r),r=n})}function r(e){var t=e.state.panels;e.state.panels=null;var n=e.getWrapperElement();t.wrapper.parentNode.replaceChild(n,t.wrapper),n.style.height=t.setHeight,e.setSize=e._setSize,e.setSize()}function o(e,t){for(var n=t.nextSibling;n;n=n.nextSibling)if(n==e.getWrapperElement())return!0;return!1}e.defineExtension("addPanel",function(e,r){r=r||{},this.state.panels||n(this);var i=this.state.panels,a=i.wrapper,s=this.getWrapperElement();r.after instanceof t&&!r.after.cleared?a.insertBefore(e,r.before.node.nextSibling):r.before instanceof t&&!r.before.cleared?a.insertBefore(e,r.before.node):r.replace instanceof t&&!r.replace.cleared?(a.insertBefore(e,r.replace.node),r.replace.clear()):"bottom"==r.position?a.appendChild(e):"before-bottom"==r.position?a.insertBefore(e,s.nextSibling):"after-top"==r.position?a.insertBefore(e,s):a.insertBefore(e,a.firstChild);var l=r&&r.height||e.offsetHeight;return this._setSize(null,i.heightLeft-=l),i.panels++,r.stable&&o(this,e)&&this.scrollTo(null,this.getScrollInfo().top+l),new t(this,e,r,l)}),t.prototype.clear=function(){if(!this.cleared){this.cleared=!0;var e=this.cm.state.panels;this.cm._setSize(null,e.heightLeft+=this.height),this.options.stable&&o(this.cm,this.node)&&this.cm.scrollTo(null,this.cm.getScrollInfo().top-this.height),e.wrapper.removeChild(this.node),0==--e.panels&&r(this.cm)}},t.prototype.changed=function(e){var t=null==e?this.node.offsetHeight:e,n=this.cm.state.panels;this.cm._setSize(null,n.heightLeft-=t-this.height),this.height=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){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:f[t]}function n(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function r(r){var o=n(r);if(!o||r.getOption("disableInput"))return e.Pass;for(var i=t(o,"pairs"),a=r.listSelections(),s=0;s=0;s--){var u=a[s].head;r.replaceRange("",h(u.line,u.ch-1),h(u.line,u.ch+1),"+delete")}}function o(r){var o=n(r),i=o&&t(o,"explode");if(!i||r.getOption("disableInput"))return e.Pass;for(var a=r.listSelections(),s=0;s0;return{anchor:new h(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new h(t.head.line,t.head.ch+(n?1:-1))}}function a(r,o){var a=n(r);if(!a||r.getOption("disableInput"))return e.Pass;var l=t(a,"pairs"),f=l.indexOf(o);if(-1==f)return e.Pass;for(var d,p=t(a,"triples"),m=l.charAt(f+1)==o,g=r.listSelections(),v=f%2==0,y=0;y1&&p.indexOf(o)>=0&&r.getRange(h(x.line,x.ch-2),x)==o+o&&(x.ch<=2||r.getRange(h(x.line,x.ch-3),h(x.line,x.ch-2))!=o))C="addFour";else if(m){if(e.isWordChar(w)||!c(r,x,o))return e.Pass;C="both"}else{if(!v||r.getLine(x.line).length!=x.ch&&!s(w,l)&&!/\s/.test(w))return e.Pass;C="both"}else C=m&&u(r,x)?"both":p.indexOf(o)>=0&&r.getRange(x,h(x.line,x.ch+3))==o+o+o?"skipThree":"skip";if(d){if(d!=C)return e.Pass}else d=C}var M=f%2?l.charAt(f-1):o,b=f%2?o:l.charAt(f+1);r.operation(function(){if("skip"==d)r.execCommand("goCharRight");else if("skipThree"==d)for(t=0;t<3;t++)r.execCommand("goCharRight");else if("surround"==d){for(var e=r.getSelections(),t=0;t-1&&n%2==1}function l(e,t){var n=e.getRange(h(t.line,t.ch-1),h(t.line,t.ch+1));return 2==n.length?n:null}function c(t,n,r){var o=t.getLine(n.line),i=t.getTokenAt(n);if(/\bstring2?\b/.test(i.type)||u(t,n))return!1;var a=new e.StringStream(o.slice(0,n.ch)+r+o.slice(n.ch),4);for(a.pos=a.start=i.start;;){var s=t.getMode().token(a,i.state);if(a.pos>=n.ch+1)return/\bstring2?\b/.test(s);a.start=a.pos}}function u(e,t){var n=e.getTokenAt(h(t.line,t.ch+1));return/\bstring/.test(n.type)&&n.start==t.ch}var f={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},h=e.Pos;e.defineOption("autoCloseBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.removeKeyMap(p),t.state.closeBrackets=null),n&&(t.state.closeBrackets=n,t.addKeyMap(p))});for(var d=f.pairs+"`",p={Backspace:r,Enter:o},m=0;mc.ch&&(v=v.slice(0,v.length-u.end+c.ch));var y=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"==h.type||u.string.indexOf("/")==u.string.length-1||m&&o(m,y)>-1||i(t,v,c,h,!0))return e.Pass;var C=g&&o(g,y)>-1;r[l]={indent:C,text:">"+(C?"\n\n":"")+"",newPos:C?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(l=n.length-1;l>=0;l--){var k=r[l];t.replaceRange(k.text,n[l].head,n[l].anchor,"+insert");var x=t.listSelections().slice(0);x[l]={head:k.newPos,anchor:k.newPos},t.setSelections(x),k.indent&&(t.indentLine(k.newPos.line,null,!0),t.indentLine(k.newPos.line+1,null,!0))}}function n(t,n){for(var r=t.listSelections(),o=[],a=n?"/":""!=t.getLine(l.line).charAt(c.end)&&(h+=">"),o[s]=h}t.replaceSelections(o),r=t.listSelections();for(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){function t(e,t,r,o){var i=e.getLineHandle(t.line),l=t.ch-1,c=l>=0&&s[i.text.charAt(l)]||s[i.text.charAt(++l)];if(!c)return null;var u=">"==c.charAt(1)?1:-1;if(r&&u>0!=(l==t.ch))return null;var f=e.getTokenTypeAt(a(t.line,l+1)),h=n(e,a(t.line,l+(u>0?1:0)),u,f||null,o);return null==h?null:{from:a(t.line,l),to:h&&h.pos,match:h&&h.ch==c.charAt(0),forward:u>0}}function n(e,t,n,r,o){for(var i=o&&o.maxScanLineLength||1e4,l=o&&o.maxScanLines||1e3,c=[],u=o&&o.bracketRegex?o.bracketRegex:/[(){}[\]]/,f=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),h=t.line;h!=f;h+=n){var d=e.getLine(h);if(d){var p=n>0?0:d.length-1,m=n>0?d.length:-1;if(!(d.length>i))for(h==t.line&&(p=t.ch-(n<0?1:0));p!=m;p+=n){var g=d.charAt(p);if(u.test(g)&&(void 0===r||e.getTokenTypeAt(a(h,p+1))==r))if(">"==s[g].charAt(1)==n>0)c.push(g);else{if(!c.length)return{pos:a(h,p),ch:g};c.pop()}}}}return h-n!=(n>0?e.lastLine():e.firstLine())&&null}function r(e,n,r){for(var o=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",o),l&&(l(),l=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",o))}),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,o){return n(this,e,t,r,o)})}),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(),o=n.getViewport();o.from=Math.min(o.from,r.line),o.to=Math.max(r.line+1,o.to);var i=e.findMatchingTag(n,r,o);if(i){if(n.state.matchBothTags){var a="open"==i.at?i.open:i.close;a&&(n.state.tagHit=n.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var s="close"==i.at?i.open:i.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(o,i,a){a&&a!=e.Init&&(o.off("cursorActivity",n),o.off("viewportChange",r),t(o)),i&&(o.state.matchBothTags="object"==typeof i&&i.bothTags,o.on("cursorActivity",n),o.on("viewportChange",r),n(o))}),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){"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(-1!=c){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 o=n,i=Math.min(t.lastLine(),n+10);o<=i;++o){var a=t.getLine(o).indexOf(";");if(-1!=a)return{startCh:r.end,end:e.Pos(o,a)}}}var o,i=n.line,a=r(i);if(!a||r(i-1)||(o=r(i-2))&&o.end.line==i-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(i,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 o=n.line,i=r(o);if(null==i||null!=r(o-1))return null;for(var a=o;null!=r(a+1);)++a;return{from:e.Pos(o,i+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";function t(t,o,i,a){function s(e){var n=l(t,o);if(!n||n.to.line-n.from.linet.firstLine();)o=e.Pos(o.line-1,0),u=s(!1);if(u&&!u.cleared&&"unfold"!==a){var f=n(t,i);e.on(f,"mousedown",function(t){h.clear(),e.e_preventDefault(t)});var h=t.markText(u.from,u.to,{replacedWith:f,clearOnEnter:r(t,i,"clearOnEnter"),__isFold:!0});h.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 o=document.createTextNode(n);(n=document.createElement("span")).appendChild(o),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]:o[n]}e.newFoldFunction=function(e,n){return function(r,o){t(r,o,{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=o(i.indicatorOpen))}e.setGutterMarker(t,i.gutter,n),++a})}function a(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){i(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function s(e,t,n){var o=e.state.foldGutter;if(o){var i=o.options;if(n==i.gutter){var a=r(e,t);a?a.clear():e.foldCode(f(t,0),i.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&&(i(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&&r=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function i(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(-1==t){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+1}}}function s(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(i(e))continue;return}if(r(e,t+1)){p.lastIndex=t,e.ch=t;var n=p.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function l(e){for(;;){p.lastIndex=e.ch;var t=p.exec(e.text);if(!t){if(o(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(-1==t){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}}}function u(e,t){for(var n=[];;){var r,o=l(e),i=e.line,s=e.ch-(o?o[0].length:0);if(!o||!(r=a(e)))return;if("selfClose"!=r)if(o[1]){for(var c=n.length-1;c>=0;--c)if(n[c]==o[2]){n.length=c;break}if(c<0&&(!t||t==o[2]))return{tag:o[2],from:h(i,s),to:h(e.line,e.ch)}}else n.push(o[2])}}function f(e,t){for(var n=[];;){var r=c(e);if(!r)return;if("selfClose"!=r){var o=e.line,i=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:h(e.line,e.ch),to:h(o,i)}}}else s(e)}}var h=e.Pos,d="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",p=new RegExp("<(/?)(["+d+"][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-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");e.registerHelper("fold","xml",function(e,t){for(var r=new n(e,t.line,0);;){var o,i=l(r);if(!i||r.line!=t.line||!(o=a(r)))return;if(!i[1]&&"selfClose"!=o){var s=h(r.line,r.ch),c=u(r,i[2]);return c&&{from:s,to:c.from}}}}),e.findMatchingTag=function(e,r,o){var i=new n(e,r.line,r.ch,o);if(-1!=i.text.indexOf(">")||-1!=i.text.indexOf("<")){var l=a(i),c=l&&h(i.line,i.ch),d=l&&s(i);if(l&&d&&!(t(i,r)>0)){var p={from:h(i.line,i.ch),to:c,tag:d[2]};return"selfClose"==l?{open:p,close:null,at:"open"}:d[1]?{open:f(i,d[2]),close:p,at:"close"}:(i=new n(e,c.line,c.ch,o),{open:p,close:u(i,d[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,r,o){for(var i=new n(e,t.line,t.ch,r);;){var a=f(i,o);if(!a)break;var s=u(new n(e,t.line,t.ch,r),a.tag);if(s)return{open:a,close:s}}},e.scanForClosingTag=function(e,t,r,o){return u(new n(e,t.line,t.ch,o?{from:0,to:o}:null),r)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),"cjs"):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],function(t){e(t,"amd")}):e(CodeMirror,"plain")}(function(e,t){function n(e,t){var n=t;return function(){0==--n&&e()}}function r(t,r){var o=e.modes[t].dependencies;if(!o)return r();for(var i=[],a=0;a-1?o+t.length:o}var i=t.exec(n?e.slice(n):e);return i?i.index+n+(r?i[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(o,i){if(i.innerActive){var a=i.innerActive,s=o.string;if(!a.close&&o.sol())return i.innerActive=i.inner=null,this.token(o,i);var l=a.close?n(s,a.close,o.pos,a.parseDelimiters):-1;if(l==o.pos&&!a.parseDelimiters)return o.match(a.close),i.innerActive=i.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";l>-1&&(o.string=s.slice(0,l));var c=a.mode.token(o,i.inner);return l>-1&&(o.string=s),l==o.pos&&a.parseDelimiters&&(i.innerActive=i.inner=null),a.innerStyle&&(c=c?c+" "+a.innerStyle:a.innerStyle),c}for(var u=1/0,s=o.string,f=0;fr.right?1:0:t.clientYr.bottom?1:0,i.moveTo(i.pos+n*i.screen)}),e.on(this.node,"mousewheel",o),e.on(this.node,"DOMMouseScroll",o)}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)};t.prototype.update=function(e,t,n){var r=this.screen!=t||this.total!=e||this.size!=n;r&&(this.screen=t,this.total=e,this.size=n);var o=this.screen*(this.size/this.total);o<10&&(this.size-=10-o,o=10),this.inner.style["horizontal"==this.orientation?"width":"height"]=o+"px",this.setPos(this.pos,r)},n.prototype.update=function(e){if(null==this.width){var t=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;t&&(this.width=parseInt(t.height))}var n=this.width||0,r=e.scrollWidth>e.clientWidth+1,o=e.scrollHeight>e.clientHeight+1;return this.vert.node.style.display=o?"block":"none",this.horiz.node.style.display=r?"block":"none",o&&(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-(o?n:0)-e.barLeft),this.horiz.node.style.right=o?n+"px":"0",this.horiz.node.style.left=e.barLeft+"px"),{right:o?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")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t=0;t",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:"expandToLine",motionArgs:{linewise:!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;e.Vim=function(){function o(t){t.setOption("disableInput",!0),t.setOption("showCursorWhenSelecting",!1),e.signal(t,"vim-mode-change",{mode:"normal"}),t.on("cursorActivity",tt),M(t),e.on(t.getInputField(),"paste",u(t))}function i(t){t.setOption("disableInput",!1),t.off("cursorActivity",tt),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||i(t,!1)}function s(t,n){this==e.keyMap.vim&&e.addClass(t.getWrapperElement(),"cm-fat-cursor"),n&&n.attach==s||o(t)}function l(t,n){if(n){if(this[t])return this[t];var r=c(t);if(!r)return!1;var o=e.Vim.findKey(n,r);return"function"==typeof o&&e.signal(n,"vim-keypress",r),o}}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,o=0;o")}function u(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(j(e.getCursor(),0,1)),Lt.enterInsertMode(e,{},t))}),t.onPasteFn}function f(e,t){for(var n=[],r=e;r=e.firstLine()&&t<=e.lastLine()}function d(e){return/^[a-z]$/.test(e)}function p(e){return-1!="()[]{}".indexOf(e)}function m(e){return ut.test(e)}function g(e){return/^[A-Z]$/.test(e)}function v(e){return/^\s*$/.test(e)}function y(e,t){for(var n=0;n"==t.slice(-11)){var n=t.length-11,r=e.slice(0,n),o=t.slice(0,n);return r==o&&e.length>n?"full":0==o.indexOf(r)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function _(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=U.apply(void 0,Array.prototype.slice.call(arguments,1))),V(e,t)?e:t}function J(e,t){return arguments.length>2&&(t=J.apply(void 0,Array.prototype.slice.call(arguments,1))),V(e,t)?t:e}function $(e,t,n){var r=V(e,t),o=V(t,n);return r&&o}function Q(e,t){return e.getLine(t).length}function G(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function X(e){return e.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Y(e,t,n){var o=Q(e,t),i=new Array(n-o+1).join(" ");e.setCursor(r(t,o)),e.replaceRange(i,e.getCursor())}function Z(e,t){var n=[],o=e.listSelections(),i=z(e.clipPos(t)),a=!q(t,i),s=te(o,e.getCursor("head")),l=q(o[s].head,o[s].anchor),c=o.length-1,u=c-s>s?c:0,f=o[u].anchor,h=Math.min(f.line,i.line),d=Math.max(f.line,i.line),p=f.ch,m=i.ch,g=o[u].head.ch-p,v=m-p;g>0&&v<=0?(p++,a||m--):g<0&&v>=0?(p--,l||m++):g<0&&-1==v&&(p--,m++);for(var y=h;y<=d;y++){var C={anchor:new r(y,p),head:new r(y,m)};n.push(C)}return s=i.line==d?n.length-1:0,e.setSelections(n),t.ch=m,f.ch=p,f}function ee(e,t,n){for(var r=[],o=0;oc&&(i.line=c),i.ch=Q(e,i.line)}return{ranges:[{anchor:a,head:i}],primary:0}}if("block"==n){for(var u=Math.min(a.line,i.line),f=Math.min(a.ch,i.ch),h=Math.max(a.line,i.line),d=Math.max(a.ch,i.ch)+1,p=h-u+1,m=i.line==u?0:p-1,g=[],v=0;v0&&i&&v(i);i=o.pop())n.line--,n.ch=0;i?(n.line--,n.ch=Q(e,n.line)):n.ch=0}}function ue(e,t,n){t.ch=0,n.ch=0,n.line++}function fe(e){if(!e)return 0;var t=e.search(/\S/);return-1==t?e.length:t}function he(e,t,n,o,i){for(var a=se(e),s=e.getLine(a.line),l=a.ch,c=i?ft[0]:ht[0];!c(s.charAt(l));)if(++l>=s.length)return null;o?c=ht[0]:(c=ft[0])(s.charAt(l))||(c=ft[1]);for(var u=l,f=l;c(s.charAt(u))&&u=0;)f--;if(f++,t){for(var h=u;/\s/.test(s.charAt(u))&&u0;)f--;f||(f=d)}}return{start:r(a.line,f),end:r(a.line,u)}}function de(e,t,n){q(t,n)||xt.jumpList.add(e,t,n)}function pe(e,t){xt.lastCharacterSearch.increment=e,xt.lastCharacterSearch.forward=t.forward,xt.lastCharacterSearch.selectedCharacter=t.selectedCharacter}function me(e,t,n,o){var i=z(e.getCursor()),a=n?1:-1,s=n?e.lineCount():-1,l=i.ch,c=i.line,u=e.getLine(c),f={lineText:u,nextCh:u.charAt(l),lastCh:null,index:l,symb:o,reverseSymb:(n?{")":"(","}":"{"}:{"(":")","{":"}"})[o],forward:n,depth:0,curMoveThrough:!1},h=Tt[o];if(!h)return i;var d=Ot[h].init,p=Ot[h].isComplete;for(d&&d(f);c!==s&&t;){if(f.index+=a,f.nextCh=f.lineText.charAt(f.index),!f.nextCh){if(c+=a,f.lineText=e.getLine(c)||"",a>0)f.index=0;else{var m=f.lineText.length;f.index=m>0?m-1:0}f.nextCh=f.lineText.charAt(f.index)}p(f)&&(i.line=c,i.ch=f.index,t--)}return f.nextCh||f.curMoveThrough?r(c,f.index):i}function ge(e,t,n,r,o){var i=t.line,a=t.ch,s=e.getLine(i),l=n?1:-1,c=r?ht:ft;if(o&&""==s){if(i+=l,s=e.getLine(i),!h(e,i))return null;a=n?0:s.length}for(;;){if(o&&""==s)return{from:0,to:0,line:i};for(var u=l>0?s.length:-1,f=u,d=u;a!=u;){for(var p=!1,m=0;m0?0:s.length}}function ve(e,t,n,o,i,a){var s=z(t),l=[];(o&&!i||!o&&i)&&n++;for(var c=!(o&&i),u=0;u0;)s(d,o)&&n--,d+=o;return new r(d,0)}var p=e.state.vim;if(p.visualLine&&s(u,1,!0)){var m=p.sel.anchor;s(m.line,-1,!0)&&(i&&m.line==u||(u+=1))}var g=a(u);for(d=u;d<=h&&n;d++)s(d,1,!0)&&(i&&a(d)==g||n--);for(c=new r(d,0),d>h&&!g?g=!0:i=!1,d=u;d>f&&(i&&a(d)!=g&&d!=u||!s(d,-1,!0));d--);return l=new r(d,0),{start:l,end:c}}function Me(e,t,n,o){var i,a,s=t,l={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/}[n],c={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{"}[n],u=e.getLine(s.line).charAt(s.ch)===c?1:0;if(i=e.scanForBracket(r(s.line,s.ch+u),-1,null,{bracketRegex:l}),a=e.scanForBracket(r(s.line,s.ch+u),1,null,{bracketRegex:l}),!i||!a)return{start:s,end:s};if(i=i.pos,a=a.pos,i.line==a.line&&i.ch>a.ch||i.line>a.line){var f=i;i=a,a=f}return o?a.ch+=1:i.ch+=1,{start:i,end:a}}function be(e,t,n,o){var i,a,s,l,c=z(t),u=e.getLine(c.line).split(""),f=u.indexOf(n);if(c.ch-1&&!i;s--)u[s]==n&&(i=s+1);else i=c.ch+1;if(i&&!a)for(s=i,l=u.length;s'+t+"",{bottom:!0,duration:5e3}):alert(t)}function Fe(e,t){var n=''+(e||"")+'';return t&&(n+=' '+t+""),n}function Ne(e,t){var n=(t.prefix||"")+" "+(t.desc||"");Le(e,Fe(t.prefix,t.desc),n,t.onClose,t)}function je(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 qe(e){var t=e.getScrollInfo(),n=e.coordsChar({left:0,top:6+t.top},"local"),r=t.clientHeight-10+t.top,o=e.coordsChar({left:0,top:r},"local");return{top:n.line,bottom:o.line}}function Ve(e,t,n){if("'"==n){var r=e.doc.history.done,o=r[r.length-2];return o&&o.ranges&&o.ranges[0].head}var i=t.marks[n];return i&&i.find()}function Ue(t,n,r,o,i,a,s,l,c){function u(){t.operation(function(){for(;!m;)f(),h();d()})}function f(){var e=t.getRange(a.from(),a.to()).replace(s,l);a.replace(e)}function h(){for(;a.findNext()&&ze(a.from(),o,i);)if(r||!g||a.from().line!=g.line)return t.scrollIntoView(a.from(),30),t.setSelection(a.from(),a.to()),g=a.from(),void(m=!1);m=!0}function d(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 p(n,r,o){switch(e.e_stop(n),e.keyName(n)){case"Y":f(),h();break;case"N":h();break;case"A":var i=c;c=void 0,t.operation(u),c=i;break;case"L":f();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":d(o)}return m&&d(o),!0}t.state.vim.exMode=!0;var m=!1,g=a.from();if(h(),!m)return n?void Ne(t,{prefix:"replace with "+l+" (y/n/a/q/l)",onKeyDown:p}):(u(),void(c&&c()));Pe(t,"No matches for "+s.source)}function Je(t){var n=t.state.vim,r=xt.macroModeState,o=xt.registerController.getRegister("."),i=r.isPlaying,a=r.lastInsertModeChanges,s=[];if(!i){for(var l=a.inVisualBlock?n.lastSelection.visualBlock.height:1,c=a.changes,s=[],u=0;u1&&(at(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),o.setText(a.changes.join("")),e.signal(t,"vim-mode-change",{mode:"normal"}),r.isRecording&&Ye(r)}function $e(e){t.unshift(e)}function Qe(e,t,n,r,o){var i={keys:e,type:t};i[t]=n,i[t+"Args"]=r;for(var a in o)i[a]=o[a];$e(i)}function Ge(t,n,r,o){var i=xt.registerController.getRegister(o);if(":"==o)return i.keyBuffer[0]&&Ft.processCommand(t,i.keyBuffer[0]),void(r.isPlaying=!1);var a=i.keyBuffer,s=0;r.isPlaying=!0,r.replaySearchQueries=i.searchQueries.slice(0);for(var l=0;l|<\w+>|./.exec(f),u=c[0],f=f.substring(c.index+u.length),e.Vim.handleKey(t,u,"macro"),n.insertMode){var h=i.insertModeChanges[s++].changes;xt.macroModeState.lastInsertModeChanges.changes=h,st(t,h,1),Je(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 Ze(e,t){if(!e.isPlaying){var n=e.latestRegister,r=xt.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(t)}}function et(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 o=t.text.join("\n");r.maybeReset&&(r.changes=[],r.maybeReset=!1),r.changes.push(o)}t=t.next}}function tt(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||rt(e,t);t.visualMode&&nt(e)}function nt(e){var t=e.state.vim,n=F(e,z(t.sel.head)),r=j(n,0,1);t.fakeCursor&&t.fakeCursor.clear(),t.fakeCursor=e.markText(n,r,{className:"cm-animate-fat-cursor"})}function rt(t,n){var r=t.getCursor("anchor"),o=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 i=V(o,r)?0:-1,a=V(o,r)?-1:0;o=j(o,0,i),r=j(r,0,a),n.sel={anchor:r,head:o},ke(t,n,"<",U(o,r)),ke(t,n,">",J(o,r))}else n.insertMode||(n.lastHPos=t.getCursor().ch)}function ot(e){this.keyName=e}function it(t){function n(){return r.maybeReset&&(r.changes=[],r.maybeReset=!1),r.changes.push(new ot(o)),!0}var r=xt.macroModeState.lastInsertModeChanges,o=e.keyName(t);o&&(-1==o.indexOf("Delete")&&-1==o.indexOf("Backspace")||e.lookupKey(o,"vim-insert",n))}function at(e,t,n,r){function o(){s?bt.processAction(e,t,t.lastEditActionCommand):bt.evalInput(e,t)}function i(n){if(a.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var r=a.lastInsertModeChanges;st(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"]),vt=[].concat(dt,pt,mt,["-",'"',".",":","/"]),yt={};C("filetype",void 0,"string",["ft"],function(e,t){if(void 0!==t){if(void 0===e)return"null"==(n=t.getOption("mode"))?"":n;var n=""==e?"null":e;t.setOption("mode",n)}});var Ct=function(){function e(e,t,s){function l(t){var o=++r%n,i=a[o];i&&i.clear(),a[o]=e.setBookmark(t)}var c=a[r%n];if(c){var u=c.find();u&&!q(u,t)&&l(t)}else l(t);l(s),o=r,(i=r-n+1)<0&&(i=0)}function t(e,t){(r+=t)>o?r=o:r0?1:-1,u=e.getCursor();do{if(r+=c,(s=a[(n+r)%n])&&(l=s.find())&&!q(u,l))break}while(ri)}return s}var n=100,r=-1,o=0,i=0,a=new Array(n);return{cachedCursor:void 0,add:e,move:t}},kt=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,wt,Mt={buildKeyMap:function(){},getRegisterController:function(){return xt.registerController},resetVimGlobalState_:b,getVimGlobalState_:function(){return xt},maybeInitVimState_:M,suppressErrorLogging:!1,InsertModeKey:ot,map:function(e,t,n){Ft.map(e,t,n)},unmap:function(e,t){Ft.unmap(e,t)},setOption:k,getOption:x,defineOption:C,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;Pt[e]=n,Ft.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,o){function i(){var e=xt.macroModeState;if(e.isRecording){if("q"==r)return e.exitMacroRecordMode(),A(n),!0;"mapping"!=o&&Xe(e,r)}}function a(){if(""==r)return A(n),c.visualMode?le(n):c.insertMode&&Je(n),!0}function s(t){for(var o;t;)o=/<\w+-.+?>|<\w+>|./.exec(t),r=o[0],t=t.substring(o.index+r.length),e.Vim.handleKey(n,r,"mapping")}var l,c=M(n);return l=c.insertMode?function(){if(a())return!0;for(var e=c.inputState.keyBuffer=c.inputState.keyBuffer+r,o=1==r.length,i=bt.matchCommand(e,t,c.inputState,"insert");e.length>1&&"full"!=i.type;){var e=c.inputState.keyBuffer=e.slice(1),s=bt.matchCommand(e,t,c.inputState,"insert");"none"!=s.type&&(i=s)}if("none"==i.type)return A(n),!1;if("partial"==i.type)return wt&&window.clearTimeout(wt),wt=window.setTimeout(function(){c.insertMode&&c.inputState.keyBuffer&&A(n)},x("insertModeEscKeysTimeout")),!o;if(wt&&window.clearTimeout(wt),o){for(var l=n.listSelections(),u=0;u0||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},L.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(kt(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("")}},O.prototype={pushText:function(e,t,n,r,o){r&&"\n"==n.charAt(0)&&(n=n.slice(1)+"\n"),r&&"\n"!==n.charAt(n.length-1)&&(n+="\n");var i=this.isValidRegister(e)?this.getRegister(e):null;if(!i){switch(t){case"yank":this.registers[0]=new L(n,r,o);break;case"delete":case"change":-1==n.indexOf("\n")?this.registers["-"]=new L(n,r):(this.shiftNumericRegisters_(),this.registers[1]=new L(n,r))}return void this.unnamedRegister.setText(n,r,o)}g(e)?i.pushText(n,r):i.setText(n,r,o),this.unnamedRegister.setText(i.toString(),r)},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new L),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&y(e,vt)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},E.prototype={nextMatch:function(e,t){var n=this.historyBuffer,r=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var o=this.iterator+r;t?o>=0:o=n.length?(this.iterator=n.length,this.initialPrefix):o<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 bt={matchCommand:function(e,t,n,r){var o=H(e,t,r,n);if(!o.full&&!o.partial)return{type:"none"};if(!o.full&&o.partial)return{type:"partial"};for(var i,a=0;a"==i.keys.slice(-11)&&(n.selectedCharacter=_(e)),{type:"full",command:i}},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=N(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);A(e)}r.operator=n.operator,r.operatorArgs=N(n.operatorArgs),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var r=t.visualMode,o=N(n.operatorMotionArgs);o&&r&&o.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),r||this.processMotion(e,t,n)},processAction:function(e,t,n){var r=t.inputState,o=r.getRepeat(),i=!!o,a=N(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=o||1,a.repeatIsExplicit=i,a.registerName=r.registerName,A(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,r,n),Lt[n.action](e,a,t)},processSearch:function(t,n,r){function o(e,o,i){xt.searchHistoryController.pushInput(e),xt.searchHistoryController.reset();try{Ke(t,e,o,i)}catch(n){return Pe(t,"Invalid regex: "+e),void A(t)}bt.processMotion(t,n,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:r.searchArgs.toJumplist}})}function i(e){t.scrollTo(h.left,h.top),o(e,!0,!0);var n=xt.macroModeState;n.isRecording&&Ze(n,e)}function a(n,r,o){var i,a,s=e.keyName(n);"Up"==s||"Down"==s?(i="Up"==s,a=n.target?n.target.selectionEnd:0,o(r=xt.searchHistoryController.nextMatch(r,i)||""),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=Ke(t,r,!0,!0)}catch(n){}c?t.scrollIntoView(_e(t,!l,c),30):(We(t),t.scrollTo(h.left,h.top))}function s(n,r,o){var i=e.keyName(n);"Esc"==i||"Ctrl-C"==i||"Ctrl-["==i||"Backspace"==i&&""==r?(xt.searchHistoryController.pushInput(r),xt.searchHistoryController.reset(),Ke(t,f),We(t),t.scrollTo(h.left,h.top),e.e_stop(n),A(t),o(),t.focus()):"Up"==i||"Down"==i?e.e_stop(n):"Ctrl-U"==i&&(e.e_stop(n),o(""))}if(t.getSearchCursor){var l=r.searchArgs.forward,c=r.searchArgs.wholeWordOnly;Ae(t).setReversed(!l);var u=l?"/":"?",f=Ae(t).getQuery(),h=t.getScrollInfo();switch(r.searchArgs.querySrc){case"prompt":var d=xt.macroModeState;d.isPlaying?o(g=d.replaySearchQueries.shift(),!0,!1):Ne(t,{onClose:i,prefix:u,desc:Bt,onKeyUp:a,onKeyDown:s});break;case"wordUnderCursor":var p=he(t,!1,!0,!1,!0),m=!0;if(p||(p=he(t,!1,!0,!1,!1),m=!1),!p)return;var g=t.getLine(p.start.line).substring(p.start.ch,p.end.ch);g=m&&c?"\\b"+g+"\\b":X(g),xt.jumpList.cachedCursor=t.getCursor(),t.setCursor(p.start),o(g,!0,!1)}}},processEx:function(t,n,r){function o(e){xt.exCommandHistoryController.pushInput(e),xt.exCommandHistoryController.reset(),Ft.processCommand(t,e)}function i(n,r,o){var i,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),A(t),o(),t.focus()),"Up"==s||"Down"==s?(e.e_stop(n),i="Up"==s,a=n.target?n.target.selectionEnd:0,o(r=xt.exCommandHistoryController.nextMatch(r,i)||""),a&&n.target&&(n.target.selectionEnd=n.target.selectionStart=Math.min(a,n.target.value.length))):"Ctrl-U"==s?(e.e_stop(n),o("")):"Left"!=s&&"Right"!=s&&"Ctrl"!=s&&"Alt"!=s&&"Shift"!=s&&xt.exCommandHistoryController.reset()}"keyToEx"==r.type?Ft.processCommand(t,r.exArgs.input):n.visualMode?Ne(t,{onClose:o,prefix:":",value:"'<,'>",onKeyDown:i}):Ne(t,{onClose:o,prefix:":",onKeyDown:i})},evalInput:function(e,t){var n,o,i,a=t.inputState,s=a.motion,l=a.motionArgs||{},c=a.operator,u=a.operatorArgs||{},f=a.registerName,h=t.sel,d=z(t.visualMode?F(e,h.head):e.getCursor("head")),p=z(t.visualMode?F(e,h.anchor):e.getCursor("anchor")),m=z(d),g=z(p);if(c&&this.recordLastEdit(t,a),i=void 0!==a.repeatOverride?a.repeatOverride:a.getRepeat(),i>0&&l.explicitRepeat?l.repeatIsExplicit=!0:(l.noRepeat||!l.explicitRepeat&&0===i)&&(i=1,l.repeatIsExplicit=!1),a.selectedCharacter&&(l.selectedCharacter=u.selectedCharacter=a.selectedCharacter),l.repeat=i,A(e),s){var v=St[s](e,d,l,t);if(t.lastMotion=St[s],!v)return;if(l.toJumplist){var y=xt.jumpList,C=y.cachedCursor;C?(de(e,C,v),delete y.cachedCursor):de(e,d,v)}v instanceof Array?(o=v[0],n=v[1]):n=v,n||(n=z(d)),t.visualMode?(t.visualBlock&&n.ch===1/0||(n=F(e,n,t.visualBlock)),o&&(o=F(e,o,!0)),o=o||g,h.anchor=o,h.head=n,ie(e),ke(e,t,"<",V(o,n)?o:n),ke(e,t,">",V(o,n)?n:o)):c||(n=F(e,n),e.setCursor(n.line,n.ch))}if(c){if(u.lastSel){o=g;var k=u.lastSel,x=Math.abs(k.head.line-k.anchor.line),w=Math.abs(k.head.ch-k.anchor.ch);n=k.visualLine?r(g.line+x,g.ch):k.visualBlock?r(g.line+x,g.ch+w):k.head.line==k.anchor.line?r(g.line,g.ch+w):r(g.line+x,g.ch),t.visualMode=!0,t.visualLine=k.visualLine,t.visualBlock=k.visualBlock,h=t.sel={anchor:o,head:n},ie(e)}else t.visualMode&&(u.lastSel={anchor:z(h.anchor),head:z(h.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var M,b,S,L,T;if(t.visualMode){if(M=U(h.head,h.anchor),b=J(h.head,h.anchor),S=t.visualLine||u.linewise,L=t.visualBlock?"block":S?"line":"char",T=ae(e,{anchor:M,head:b},L),S){var O=T.ranges;if("block"==L)for(var E=0;Eu&&i.line==u?this.moveToEol(e,t,n,o):(n.toFirstChar&&(a=fe(e.getLine(l)),o.lastHPos=a),o.lastHSPos=e.charCoords(r(l,a),"div").left,r(l,a))},moveByDisplayLines:function(e,t,n,o){var i=t;switch(o.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:o.lastHSPos=e.charCoords(i,"div").left}var a=n.repeat;if((l=e.findPosV(i,n.forward?a:-a,"line",o.lastHSPos)).hitSide)if(n.forward)var s={top:e.charCoords(l,"div").top+8,left:o.lastHSPos},l=e.coordsChar(s,"div");else{var c=e.charCoords(r(e.firstLine(),0),"div");c.left=o.lastHSPos,l=e.coordsChar(c,"div")}return o.lastHPos=l.ch,l},moveByPage:function(e,t,n){var r=t,o=n.repeat;return e.findPosV(r,n.forward?o:-o,"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 o=e.getScrollInfo(),i=null,a=n.repeat;a||(a=o.clientHeight/(2*e.defaultTextHeight()));var s=e.charCoords(t,"local");if(n.repeat=a,!(i=St.moveByDisplayLines(e,t,n,r)))return null;var l=e.charCoords(i,"local");return e.scrollTo(null,o.top+l.top-s.top),i},moveByWords:function(e,t,n){return ve(e,t,n.repeat,!!n.forward,!!n.wordEnd,!!n.bigWord)},moveTillCharacter:function(e,t,n){var r=ye(e,n.repeat,n.forward,n.selectedCharacter),o=n.forward?-1:1;return pe(o,n),r?(r.ch+=o,r):null},moveToCharacter:function(e,t,n){var r=n.repeat;return pe(0,n),ye(e,r,n.forward,n.selectedCharacter)||t},moveToSymbol:function(e,t,n){return me(e,n.repeat,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,r){var o=n.repeat;return r.lastHPos=o-1,r.lastHSPos=e.charCoords(t,"div").left,Ce(e,o)},moveToEol:function(e,t,n,o){var i=t;o.lastHPos=1/0;var a=r(i.line+n.repeat-1,1/0),s=e.clipPos(a);return s.ch--,o.lastHSPos=e.charCoords(s,"div").left,a},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return r(n.line,fe(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){var n,o=t,i=o.line,a=o.ch,s=e.getLine(i);do{if((n=s.charAt(a++))&&p(n)){var l=e.getTokenTypeAt(r(i,a));if("string"!==l&&"comment"!==l)break}}while(n);return n?e.findMatchingBracket(r(i,a)).to:o},moveToStartOfLine:function(e,t){return r(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,n){var o=n.forward?e.lastLine():e.firstLine();return n.repeatIsExplicit&&(o=n.repeat-e.getOption("firstLineNumber")),r(o,fe(e.getLine(o)))},textObjectManipulation:function(e,t,n,r){var o={"(":")",")":"(","{":"}","}":"{","[":"]","]":"["},i={"'":!0,'"':!0},a=n.selectedCharacter;"b"==a?a="(":"B"==a&&(a="{");var s,l=!n.textObjectInner;if(o[a])s=Me(e,t,a,l);else if(i[a])s=be(e,t,a,l);else if("W"===a)s=he(e,l,!0,!0);else if("w"===a)s=he(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?oe(e,s.start,s.end):[s.start,s.end]},repeatLastCharacterSearch:function(e,t,n){var r=xt.lastCharacterSearch,o=n.repeat,i=n.forward===r.forward,a=(r.increment?1:0)*(i?-1:1);e.moveH(-a,"char"),n.inclusive=!!i;var s=ye(e,o,i,r.selectedCharacter);return s?(s.ch+=a,s):(e.moveH(a,"char"),t)}},At={change:function(t,n,o){var i,a,s=t.state.vim;if(xt.macroModeState.lastInsertModeChanges.inVisualBlock=s.visualBlock,s.visualMode){a=t.getSelection();var l=B("",o.length);t.replaceSelections(l),i=U(o[0].head,o[0].anchor)}else{var c=o[0].anchor,u=o[0].head;a=t.getRange(c,u);var f=s.lastEditInputState||{};if("moveByWords"==f.motion&&!v(a)){var h=/\s+$/.exec(a);h&&f.motionArgs&&f.motionArgs.forward&&(u=j(u,0,-h[0].length),a=a.slice(0,-h[0].length))}var d=new r(c.line-1,Number.MAX_VALUE),p=t.firstLine()==t.lastLine();u.line>t.lastLine()&&n.linewise&&!p?t.replaceRange("",d,u):t.replaceRange("",c,u),n.linewise&&(p||(t.setCursor(d),e.commands.newlineAndIndent(t)),c.ch=Number.MAX_VALUE),i=c}xt.registerController.pushText(n.registerName,"change",a,n.linewise,o.length>1),Lt.enterInsertMode(t,{head:i},t.state.vim)},delete:function(e,t,n){var o,i,a=e.state.vim;if(a.visualBlock){i=e.getSelection();var s=B("",n.length);e.replaceSelections(s),o=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,Q(e,l.line-1))),i=e.getRange(l,c),e.replaceRange("",l,c),o=l,t.linewise&&(o=St.moveToFirstNonWhiteSpaceCharacter(e,l))}return xt.registerController.pushText(t.registerName,"delete",i,t.linewise,a.visualBlock),F(e,o)},indent:function(e,t,n){var r=e.state.vim,o=n[0].anchor.line,i=r.visualBlock?n[n.length-1].anchor.line:n[0].head.line,a=r.visualMode?t.repeat:1;t.linewise&&i--;for(var s=o;s<=i;s++)for(var l=0;lc.top?(l.line+=(s-c.top)/o,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?j(a.head,0,1):r(a.anchor.line,0);else if("inplace"==i&&o.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",et),e.on(t.getInputField(),"keydown",it)),o.visualMode&&le(t),ee(t,s,l)}},toggleVisualMode:function(t,n,o){var i,a=n.repeat,s=t.getCursor();o.visualMode?o.visualLine^n.linewise||o.visualBlock^n.blockwise?(o.visualLine=!!n.linewise,o.visualBlock=!!n.blockwise,e.signal(t,"vim-mode-change",{mode:"visual",subMode:o.visualLine?"linewise":o.visualBlock?"blockwise":""}),ie(t)):le(t):(o.visualMode=!0,o.visualLine=!!n.linewise,o.visualBlock=!!n.blockwise,i=F(t,r(s.line,s.ch+a-1),!0),o.sel={anchor:s,head:i},e.signal(t,"vim-mode-change",{mode:"visual",subMode:o.visualLine?"linewise":o.visualBlock?"blockwise":""}),ie(t),ke(t,o,"<",U(s,i)),ke(t,o,">",J(s,i)))},reselectLastSelection:function(t,n,r){var o=r.lastSelection;if(r.visualMode&&re(t,r),o){var i=o.anchorMark.find(),a=o.headMark.find();if(!i||!a)return;r.sel={anchor:i,head:a},r.visualMode=!0,r.visualLine=o.visualLine,r.visualBlock=o.visualBlock,ie(t),ke(t,r,"<",U(i,a)),ke(t,r,">",J(i,a)),e.signal(t,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var o,i;if(n.visualMode){if(o=e.getCursor("anchor"),i=e.getCursor("head"),V(i,o)){c=i;i=o,o=c}i.ch=Q(e,i.line)-1}else{var a=Math.max(t.repeat,2);o=e.getCursor(),i=F(e,r(o.line+a-1,1/0))}for(var s=0,l=o.line;l1)d=Array(t.repeat+1).join(d);var p=i.linewise,m=i.blockwise;if(p)n.visualMode?d=n.visualLine?d.slice(0,-1):"\n"+d.slice(0,d.length-1)+"\n":t.after?(d="\n"+d.slice(0,d.length-1),o.ch=Q(e,o.line)):o.ch=0;else{if(m){d=d.split("\n");for(S=0;Se.lastLine()&&e.replaceRange("\n",r(A,0)),Q(e,A)u.length&&(i=u.length),a=r(l.line,i)}if("\n"==s)o.visualMode||t.replaceRange("",l,a),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(t);else{var f=t.getRange(l,a);if(f=f.replace(/[^\n]/g,s),o.visualBlock){var h=new Array(t.getOption("tabSize")+1).join(" ");f=(f=t.getSelection()).replace(/\t/g,h).replace(/[^\n]/g,s).split("\n"),t.replaceSelections(f)}else t.replaceRange(f,l,a);o.visualMode?(l=V(c[0].anchor,c[0].head)?c[0].anchor:c[0].head,t.setCursor(l),le(t,!1)):t.setCursor(j(a,0,-1))}},incrementNumberToken:function(e,t){for(var n,o,i,a,s,l=e.getCursor(),c=e.getLine(l.line),u=/-?\d+/g;null!==(n=u.exec(c))&&(s=n[0],o=n.index,i=o+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}}};C("pcre",!0,"boolean"),Se.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 Et={"\\n":"\n","\\r":"\r","\\t":"\t"},Rt={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":"\t"},Bt="(Javascript regexp)",It=function(){this.buildCommandMap_()};It.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 o=t.state.vim,i=xt.registerController.getRegister(":"),a=i.toString();o.visualMode&&le(t);var s=new e.StringStream(n);i.setText(n);var l=r||{};l.input=n;try{this.parseInput_(t,s,l)}catch(e){throw Pe(t,e),e}var c,u;if(l.commandName){if(c=this.matchCommand_(l.commandName)){if(u=c.name,c.excludeFromCommandHistory&&i.setText(a),this.parseCommandArgs_(s,l,c),"exToKey"==c.type){for(var f=0;f0;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){n=n.join("");for(var i=0;i")}else for(var a in r){var s=r[a].toString();s.length&&(o+='"'+a+" "+s+"
")}Pe(e,o)},sort:function(t,n){function o(e,t){if(a){var n;n=e,e=t,t=n}s&&(e=e.toLowerCase(),t=t.toLowerCase());var r=c&&v.exec(e),o=c&&v.exec(t);return r?(r=parseInt((r[1]+r[2]).toLowerCase(),y),o=parseInt((o[1]+o[2]).toLowerCase(),y),r-o):e1)return"Invalid arguments";c=o&&"decimal"||i&&"hex"||f&&"octal"}r[2]&&(u=new RegExp(r[2].substr(1,r[2].length-2),s?"i":""))}}();if(f)Pe(t,f+": "+n.argString);else{var h=n.line||t.firstLine(),d=n.lineEnd||n.line||t.lastLine();if(h!=d){var p=r(h,0),m=r(d,Q(t,d)),g=t.getRange(p,m).split("\n"),v=u||("decimal"==c?/(-?)([\d]+)/:"hex"==c?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==c?/([0-7]+)/:null),y="decimal"==c?10:"hex"==c?16:"octal"==c?8:null,C=[],k=[];if(c||u)for(b=0;b");if(r){var h=0,d=function(){if(h=u)return void Pe(t,"Invalid argument: "+n.argString.substring(i));for(var f=0;f<=u-c;f++){var h=String.fromCharCode(c+f);delete r.marks[h]}}else delete r.marks[a]}else Pe(t,"Argument required")}},Ft=new It;return e.keyMap.vim={attach:s,detach:a,call:l},C("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},b(),Mt}()}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){var b=a.getWrapperElement();a.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:b.style.width,height:b.style.height},b.style.width="",b.style.height="auto",b.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",a.refresh()}function c(a){var b=a.getWrapperElement();b.className=b.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var c=a.state.fullScreenRestore;b.style.width=c.width,b.style.height=c.height,window.scrollTo(c.scrollLeft,c.scrollTop),a.refresh()}a.defineOption("fullScreen",!1,function(d,e,f){f==a.Init&&(f=!1),!f!=!e&&(e?b(d):c(d))})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b,c,d){this.cm=a,this.node=b,this.options=c,this.height=d,this.cleared=!1}function c(a){var b=a.getWrapperElement(),c=window.getComputedStyle?window.getComputedStyle(b):b.currentStyle,d=parseInt(c.height),e=a.state.panels={setHeight:b.style.height,heightLeft:d,panels:0,wrapper:document.createElement("div")};b.parentNode.insertBefore(e.wrapper,b);var f=a.hasFocus();e.wrapper.appendChild(b),f&&a.focus(),a._setSize=a.setSize,null!=d&&(a.setSize=function(b,c){if(null==c)return this._setSize(b,c);if(e.setHeight=c,"number"!=typeof c){var f=/^(\d+\.?\d*)px$/.exec(c);f?c=Number(f[1]):(e.wrapper.style.height=c,c=e.wrapper.offsetHeight,e.wrapper.style.height="")}a._setSize(b,e.heightLeft+=c-d),d=c})}function d(a){var b=a.state.panels;a.state.panels=null;var c=a.getWrapperElement();b.wrapper.parentNode.replaceChild(c,b.wrapper),c.style.height=b.setHeight,a.setSize=a._setSize,a.setSize()}function e(a,b){for(var c=b.nextSibling;c;c=c.nextSibling)if(c==a.getWrapperElement())return!0;return!1}a.defineExtension("addPanel",function(a,d){d=d||{},this.state.panels||c(this);var f=this.state.panels,g=f.wrapper,h=this.getWrapperElement();d.after instanceof b&&!d.after.cleared?g.insertBefore(a,d.before.node.nextSibling):d.before instanceof b&&!d.before.cleared?g.insertBefore(a,d.before.node):d.replace instanceof b&&!d.replace.cleared?(g.insertBefore(a,d.replace.node),d.replace.clear()):"bottom"==d.position?g.appendChild(a):"before-bottom"==d.position?g.insertBefore(a,h.nextSibling):"after-top"==d.position?g.insertBefore(a,h):g.insertBefore(a,g.firstChild);var i=d&&d.height||a.offsetHeight;return this._setSize(null,f.heightLeft-=i),f.panels++,d.stable&&e(this,a)&&this.scrollTo(null,this.getScrollInfo().top+i),new b(this,a,d,i)}),b.prototype.clear=function(){if(!this.cleared){this.cleared=!0;var a=this.cm.state.panels;this.cm._setSize(null,a.heightLeft+=this.height),this.options.stable&&e(this.cm,this.node)&&this.cm.scrollTo(null,this.cm.getScrollInfo().top-this.height),a.wrapper.removeChild(this.node),0==--a.panels&&d(this.cm)}},b.prototype.changed=function(a){var b=null==a?this.node.offsetHeight:a,c=this.cm.state.panels;this.cm._setSize(null,c.heightLeft-=b-this.height),this.height=b}}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b){return"pairs"==b&&"string"==typeof a?a:"object"==typeof a&&null!=a[b]?a[b]:l[b]}function c(a){var b=a.state.closeBrackets;return!b||b.override?b:a.getModeAt(a.getCursor()).closeBrackets||b}function d(d){var e=c(d);if(!e||d.getOption("disableInput"))return a.Pass;for(var f=b(e,"pairs"),g=d.listSelections(),h=0;h=0;h--){var k=g[h].head;d.replaceRange("",m(k.line,k.ch-1),m(k.line,k.ch+1),"+delete")}}function e(d){var e=c(d),f=e&&b(e,"explode");if(!f||d.getOption("disableInput"))return a.Pass;for(var g=d.listSelections(),h=0;h0;return{anchor:new m(b.anchor.line,b.anchor.ch+(c?-1:1)),head:new m(b.head.line,b.head.ch+(c?1:-1))}}function g(d,e){var g=c(d);if(!g||d.getOption("disableInput"))return a.Pass;var i=b(g,"pairs"),l=i.indexOf(e);if(l==-1)return a.Pass;for(var n,o=b(g,"triples"),p=i.charAt(l+1)==e,q=d.listSelections(),r=l%2==0,s=0;s1&&o.indexOf(e)>=0&&d.getRange(m(v.line,v.ch-2),v)==e+e&&(v.ch<=2||d.getRange(m(v.line,v.ch-3),m(v.line,v.ch-2))!=e))t="addFour";else if(p){if(a.isWordChar(w)||!j(d,v,e))return a.Pass;t="both"}else{if(!r||d.getLine(v.line).length!=v.ch&&!h(w,i)&&!/\s/.test(w))return a.Pass;t="both"}else t=p&&k(d,v)?"both":o.indexOf(e)>=0&&d.getRange(v,m(v.line,v.ch+3))==e+e+e?"skipThree":"skip";if(n){if(n!=t)return a.Pass}else n=t}var x=l%2?i.charAt(l-1):e,y=l%2?e:i.charAt(l+1);d.operation(function(){if("skip"==n)d.execCommand("goCharRight");else if("skipThree"==n)for(var a=0;a<3;a++)d.execCommand("goCharRight");else if("surround"==n){for(var b=d.getSelections(),a=0;a-1&&c%2==1}function i(a,b){var c=a.getRange(m(b.line,b.ch-1),m(b.line,b.ch+1));return 2==c.length?c:null}function j(b,c,d){var e=b.getLine(c.line),f=b.getTokenAt(c);if(/\bstring2?\b/.test(f.type)||k(b,c))return!1;var g=new a.StringStream(e.slice(0,c.ch)+d+e.slice(c.ch),4);for(g.pos=g.start=f.start;;){var h=b.getMode().token(g,f.state);if(g.pos>=c.ch+1)return/\bstring2?\b/.test(h);g.start=g.pos}}function k(a,b){var c=a.getTokenAt(m(b.line,b.ch+1));return/\bstring/.test(c.type)&&c.start==b.ch}var l={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},m=a.Pos;a.defineOption("autoCloseBrackets",!1,function(b,c,d){d&&d!=a.Init&&(b.removeKeyMap(o),b.state.closeBrackets=null),c&&(b.state.closeBrackets=c,b.addKeyMap(o))});for(var n=l.pairs+"`",o={Backspace:d,Enter:e},p=0;pj.ch&&(r=r.slice(0,r.length-k.end+j.ch));var s=r.toLowerCase();if(!r||"string"==k.type&&(k.end!=j.ch||!/[\"\']/.test(k.string.charAt(k.string.length-1))||1==k.string.length)||"tag"==k.type&&"closeTag"==m.type||k.string.indexOf("/")==k.string.length-1||p&&e(p,s)>-1||f(b,r,j,m,!0))return a.Pass;var t=q&&e(q,s)>-1;d[i]={indent:t,text:">"+(t?"\n\n":"")+"",newPos:t?a.Pos(j.line+1,0):a.Pos(j.line,j.ch+1)}}for(var i=c.length-1;i>=0;i--){var u=d[i];b.replaceRange(u.text,c[i].head,c[i].anchor,"+insert");var v=b.listSelections().slice(0);v[i]={head:u.newPos,anchor:u.newPos},b.setSelections(v),u.indent&&(b.indentLine(u.newPos.line,null,!0),b.indentLine(u.newPos.line+1,null,!0))}}function c(b,c){for(var d=b.listSelections(),e=[],g=c?"/":""!=b.getLine(i.line).charAt(j.end)&&(m+=">"),e[h]=m}b.replaceSelections(e),d=b.listSelections();for(var h=0;h'"]=function(a){return b(a)}),c.addKeyMap(g)}});var g=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],h=["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"];a.commands.closeTag=function(a){return c(a)}}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b,d,e){var f=a.getLineHandle(b.line),i=b.ch-1,j=i>=0&&h[f.text.charAt(i)]||h[f.text.charAt(++i)];if(!j)return null;var k=">"==j.charAt(1)?1:-1;if(d&&k>0!=(i==b.ch))return null;var l=a.getTokenTypeAt(g(b.line,i+1)),m=c(a,g(b.line,i+(k>0?1:0)),k,l||null,e);return null==m?null:{from:g(b.line,i),to:m&&m.pos,match:m&&m.ch==j.charAt(0),forward:k>0}}function c(a,b,c,d,e){for(var f=e&&e.maxScanLineLength||1e4,i=e&&e.maxScanLines||1e3,j=[],k=e&&e.bracketRegex?e.bracketRegex:/[(){}[\]]/,l=c>0?Math.min(b.line+i,a.lastLine()+1):Math.max(a.firstLine()-1,b.line-i),m=b.line;m!=l;m+=c){var n=a.getLine(m);if(n){var o=c>0?0:n.length-1,p=c>0?n.length:-1;if(!(n.length>f))for(m==b.line&&(o=b.ch-(c<0?1:0));o!=p;o+=c){var q=n.charAt(o);if(k.test(q)&&(void 0===d||a.getTokenTypeAt(g(m,o+1))==d)){var r=h[q];if(">"==r.charAt(1)==c>0)j.push(q);else{if(!j.length)return{pos:g(m,o),ch:q};j.pop()}}}}}return m-c!=(c>0?a.lastLine():a.firstLine())&&null}function d(a,c,d){for(var e=a.state.matchBrackets.maxHighlightLineLength||1e3,h=[],i=a.listSelections(),j=0;j",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},i=null;a.defineOption("matchBrackets",!1,function(b,c,d){d&&d!=a.Init&&(b.off("cursorActivity",e),i&&(i(),i=null)),c&&(b.state.matchBrackets="object"==typeof c?c:{},b.on("cursorActivity",e))}),a.defineExtension("matchBrackets",function(){d(this,!0)}),a.defineExtension("findMatchingBracket",function(a,c,d){return b(this,a,c,d)}),a.defineExtension("scanForBracket",function(a,b,d,e){return c(this,a,b,d,e)})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],a):a(CodeMirror)}(function(a){"use strict";function b(a){a.state.tagHit&&a.state.tagHit.clear(),a.state.tagOther&&a.state.tagOther.clear(),a.state.tagHit=a.state.tagOther=null}function c(c){c.state.failedTagMatch=!1,c.operation(function(){if(b(c),!c.somethingSelected()){var d=c.getCursor(),e=c.getViewport();e.from=Math.min(e.from,d.line),e.to=Math.max(d.line+1,e.to);var f=a.findMatchingTag(c,d,e);if(f){if(c.state.matchBothTags){var g="open"==f.at?f.open:f.close;g&&(c.state.tagHit=c.markText(g.from,g.to,{className:"CodeMirror-matchingtag"}))}var h="close"==f.at?f.open:f.close;h?c.state.tagOther=c.markText(h.from,h.to,{className:"CodeMirror-matchingtag"}):c.state.failedTagMatch=!0}}})}function d(a){a.state.failedTagMatch&&c(a)}a.defineOption("matchTags",!1,function(e,f,g){g&&g!=a.Init&&(e.off("cursorActivity",c),e.off("viewportChange",d),b(e)),f&&(e.state.matchBothTags="object"==typeof f&&f.bothTags,e.on("cursorActivity",c),e.on("viewportChange",d),c(e))}),a.commands.toMatchingTag=function(b){var c=a.findMatchingTag(b,b.getCursor());if(c){var d="close"==c.at?c.open:c.close;d&&b.extendSelection(d.to,d.from)}}}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.registerHelper("fold","brace",function(b,c){function d(d){for(var h=c.ch,i=0;;){var j=h<=0?-1:g.lastIndexOf(d,h-1);if(j!=-1){if(1==i&&jb.lastLine())return null;var d=b.getTokenAt(a.Pos(c,1));if(/\S/.test(d.string)||(d=b.getTokenAt(a.Pos(c,d.end+1))),"keyword"!=d.type||"import"!=d.string)return null;for(var e=c,f=Math.min(b.lastLine(),c+10);e<=f;++e){var g=b.getLine(e),h=g.indexOf(";");if(h!=-1)return{startCh:d.end,end:a.Pos(e,h)}}}var e,f=c.line,g=d(f);if(!g||d(f-1)||(e=d(f-2))&&e.end.line==f-1)return null;for(var h=g.end;;){var i=d(h.line+1);if(null==i)break;h=i.end}return{from:b.clipPos(a.Pos(f,g.startCh+1)),to:h}}),a.registerHelper("fold","include",function(b,c){function d(c){if(cb.lastLine())return null;var d=b.getTokenAt(a.Pos(c,1));return/\S/.test(d.string)||(d=b.getTokenAt(a.Pos(c,d.end+1))),"meta"==d.type&&"#include"==d.string.slice(0,8)?d.start+8:void 0}var e=c.line,f=d(e);if(null==f||null!=d(e-1))return null;for(var g=e;;){if(null==d(g+1))break;++g}return{from:a.Pos(e,f+1),to:b.clipPos(a.Pos(g))}})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(b,e,f,g){function h(a){var c=i(b,e);if(!c||c.to.line-c.from.lineb.firstLine();)e=a.Pos(e.line-1,0),k=h(!1);if(k&&!k.cleared&&"unfold"!==g){var l=c(b,f);a.on(l,"mousedown",function(b){m.clear(),a.e_preventDefault(b)});var m=b.markText(k.from,k.to,{replacedWith:l,clearOnEnter:d(b,f,"clearOnEnter"),__isFold:!0});m.on("clear",function(c,d){a.signal(b,"unfold",b,c,d)}),a.signal(b,"fold",b,k.from,k.to)}}function c(a,b){var c=d(a,b,"widget");if("string"==typeof c){var e=document.createTextNode(c);c=document.createElement("span"),c.appendChild(e),c.className="CodeMirror-foldmarker"}return c}function d(a,b,c){if(b&&void 0!==b[c])return b[c];var d=a.options.foldOptions;return d&&void 0!==d[c]?d[c]:e[c]}a.newFoldFunction=function(a,c){return function(d,e){b(d,e,{rangeFinder:a,widget:c})}},a.defineExtension("foldCode",function(a,c,d){b(this,a,c,d)}),a.defineExtension("isFolded",function(a){for(var b=this.findMarksAt(a),c=0;c=h&&(c=e(f.indicatorOpen))}a.setGutterMarker(b,f.gutter,c),++g})}function g(a){var b=a.getViewport(),c=a.state.foldGutter;c&&(a.operation(function(){f(a,b.from,b.to)}),c.from=b.from,c.to=b.to)}function h(a,b,c){var e=a.state.foldGutter;if(e){var f=e.options;if(c==f.gutter){var g=d(a,b);g?g.clear():a.foldCode(l(b,0),f.rangeFinder)}}}function i(a){var b=a.state.foldGutter;if(b){var c=b.options;b.from=b.to=0,clearTimeout(b.changeUpdate),b.changeUpdate=setTimeout(function(){g(a)},c.foldOnChangeTimeSpan||600)}}function j(a){var b=a.state.foldGutter;if(b){var c=b.options;clearTimeout(b.changeUpdate),b.changeUpdate=setTimeout(function(){var c=a.getViewport();b.from==b.to||c.from-b.to>20||b.from-c.to>20?g(a):a.operation(function(){c.fromb.to&&(f(a,b.to,c.to),b.to=c.to)})},c.updateViewportTimeSpan||400)}}function k(a,b){var c=a.state.foldGutter;if(c){var d=b.line;d>=c.from&&d=a.max))return a.ch=0,a.text=a.cm.getLine(++a.line),!0}function f(a){if(!(a.line<=a.min))return a.text=a.cm.getLine(--a.line),a.ch=a.text.length,!0}function g(a){for(;;){var b=a.text.indexOf(">",a.ch);if(b==-1){if(e(a))continue;return}{if(d(a,b+1)){var c=a.text.lastIndexOf("/",b),f=c>-1&&!/\S/.test(a.text.slice(c+1,b));return a.ch=b+1,f?"selfClose":"regular"}a.ch=b+1}}}function h(a){for(;;){var b=a.ch?a.text.lastIndexOf("<",a.ch-1):-1;if(b==-1){if(f(a))continue;return}if(d(a,b+1)){o.lastIndex=b,a.ch=b;var c=o.exec(a.text);if(c&&c.index==b)return c}else a.ch=b}}function i(a){for(;;){o.lastIndex=a.ch;var b=o.exec(a.text);if(!b){if(e(a))continue;return}{if(d(a,b.index+1))return a.ch=b.index+b[0].length,b;a.ch=b.index+1}}}function j(a){for(;;){var b=a.ch?a.text.lastIndexOf(">",a.ch-1):-1;if(b==-1){if(f(a))continue;return}{if(d(a,b+1)){var c=a.text.lastIndexOf("/",b),e=c>-1&&!/\S/.test(a.text.slice(c+1,b));return a.ch=b+1,e?"selfClose":"regular"}a.ch=b}}}function k(a,b){for(var c=[];;){var d,e=i(a),f=a.line,h=a.ch-(e?e[0].length:0);if(!e||!(d=g(a)))return;if("selfClose"!=d)if(e[1]){for(var j=c.length-1;j>=0;--j)if(c[j]==e[2]){c.length=j;break}if(j<0&&(!b||b==e[2]))return{tag:e[2],from:m(f,h),to:m(a.line,a.ch)}}else c.push(e[2])}}function l(a,b){for(var c=[];;){var d=j(a);if(!d)return;if("selfClose"!=d){var e=a.line,f=a.ch,g=h(a);if(!g)return;if(g[1])c.push(g[2]);else{for(var i=c.length-1;i>=0;--i)if(c[i]==g[2]){c.length=i;break}if(i<0&&(!b||b==g[2]))return{tag:g[2],from:m(a.line,a.ch),to:m(e,f)}}}else h(a)}}var m=a.Pos,n="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",o=new RegExp("<(/?)(["+n+"]["+n+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");a.registerHelper("fold","xml",function(a,b){for(var d=new c(a,b.line,0);;){var e,f=i(d);if(!f||d.line!=b.line||!(e=g(d)))return;if(!f[1]&&"selfClose"!=e){var h=m(d.line,d.ch),j=k(d,f[2]);return j&&{from:h,to:j.from}}}}),a.findMatchingTag=function(a,d,e){var f=new c(a,d.line,d.ch,e);if(f.text.indexOf(">")!=-1||f.text.indexOf("<")!=-1){var i=g(f),j=i&&m(f.line,f.ch),n=i&&h(f);if(i&&n&&!(b(f,d)>0)){var o={from:m(f.line,f.ch),to:j,tag:n[2]};return"selfClose"==i?{open:o,close:null,at:"open"}:n[1]?{open:l(f,n[2]),close:o,at:"close"}:(f=new c(a,j.line,j.ch,e),{open:o,close:k(f,n[2]),at:"open"})}}},a.findEnclosingTag=function(a,b,d,e){for(var f=new c(a,b.line,b.ch,d);;){var g=l(f,e);if(!g)break;var h=new c(a,b.line,b.ch,d),i=k(h,g.tag);if(i)return{open:g,close:i}}},a.scanForClosingTag=function(a,b,d,e){return k(new c(a,b.line,b.ch,e?{from:0,to:e}:null),d)}}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),"cjs"):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],function(b){a(b,"amd")}):a(CodeMirror,"plain")}(function(a,b){function c(a,b){var c=b;return function(){0==--c&&a()}}function d(b,d){var e=a.modes[b].dependencies;if(!e)return d();for(var f=[],g=0;g-1?e+b.length:e}var f=b.exec(c?a.slice(c):a);return f?f.index+c+(d?f[0].length:0):-1}var d=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:a.startState(b),innerActive:null,inner:null}},copyState:function(c){return{outer:a.copyState(b,c.outer),innerActive:c.innerActive,inner:c.innerActive&&a.copyState(c.innerActive.mode,c.inner)}},token:function(e,f){if(f.innerActive){var g=f.innerActive,h=e.string;if(!g.close&&e.sol())return f.innerActive=f.inner=null,this.token(e,f);var i=g.close?c(h,g.close,e.pos,g.parseDelimiters):-1;if(i==e.pos&&!g.parseDelimiters)return e.match(g.close),f.innerActive=f.inner=null,g.delimStyle&&g.delimStyle+" "+g.delimStyle+"-close";i>-1&&(e.string=h.slice(0,i));var j=g.mode.token(e,f.inner);return i>-1&&(e.string=h),i==e.pos&&g.parseDelimiters&&(f.innerActive=f.inner=null),g.innerStyle&&(j=j?j+" "+g.innerStyle:g.innerStyle),j}for(var k=1/0,h=e.string,l=0;ld.right?1:0:b.clientYd.bottom?1:0,f.moveTo(f.pos+c*f.screen)}),a.on(this.node,"mousewheel",e),a.on(this.node,"DOMMouseScroll",e)}function c(a,c,d){this.addClass=a,this.horiz=new b(a,"horizontal",d),c(this.horiz.node),this.vert=new b(a,"vertical",d),c(this.vert.node),this.width=null}b.prototype.setPos=function(a,b){return a<0&&(a=0),a>this.total-this.screen&&(a=this.total-this.screen),!(!b&&a==this.pos)&&(this.pos=a,this.inner.style["horizontal"==this.orientation?"left":"top"]=a*(this.size/this.total)+"px",!0)},b.prototype.moveTo=function(a){this.setPos(a)&&this.scroll(a,this.orientation)};b.prototype.update=function(a,b,c){var d=this.screen!=b||this.total!=a||this.size!=c;d&&(this.screen=b,this.total=a,this.size=c);var e=this.screen*(this.size/this.total);e<10&&(this.size-=10-e,e=10),this.inner.style["horizontal"==this.orientation?"width":"height"]=e+"px",this.setPos(this.pos,d)},c.prototype.update=function(a){if(null==this.width){var b=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;b&&(this.width=parseInt(b.height))}var c=this.width||0,d=a.scrollWidth>a.clientWidth+1,e=a.scrollHeight>a.clientHeight+1;return this.vert.node.style.display=e?"block":"none",this.horiz.node.style.display=d?"block":"none",e&&(this.vert.update(a.scrollHeight,a.clientHeight,a.viewHeight-(d?c:0)),this.vert.node.style.bottom=d?c+"px":"0"),d&&(this.horiz.update(a.scrollWidth,a.clientWidth,a.viewWidth-(e?c:0)-a.barLeft),this.horiz.node.style.right=e?c+"px":"0",this.horiz.node.style.left=a.barLeft+"px"),{right:e?c:0,bottom:d?c:0}},c.prototype.setScrollTop=function(a){this.vert.setPos(a)},c.prototype.setScrollLeft=function(a){this.horiz.setPos(a)},c.prototype.clear=function(){var a=this.horiz.node.parentNode;a.removeChild(this.horiz.node),a.removeChild(this.vert.node)},a.scrollbarModel.simple=function(a,b){return new c("CodeMirror-simplescroll",a,b)},a.scrollbarModel.overlay=function(a,b){return new c("CodeMirror-overlayscroll",a,b)}}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b=0;b",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:"expandToLine",motionArgs:{linewise:!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"}],c=[{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"}],d=a.Pos;a.Vim=function(){function e(b){b.setOption("disableInput",!0),b.setOption("showCursorWhenSelecting",!1),a.signal(b,"vim-mode-change",{mode:"normal"}),b.on("cursorActivity",bb),x(b),a.on(b.getInputField(),"paste",k(b))}function f(b){b.setOption("disableInput",!1),b.off("cursorActivity",bb),a.off(b.getInputField(),"paste",k(b)),b.state.vim=null}function g(b,c){this==a.keyMap.vim&&a.rmClass(b.getWrapperElement(),"cm-fat-cursor"),c&&c.attach==h||f(b)}function h(b,c){this==a.keyMap.vim&&a.addClass(b.getWrapperElement(),"cm-fat-cursor"),c&&c.attach==h||e(b)}function i(b,c){if(c){if(this[b])return this[b];var d=j(b);if(!d)return!1;var e=a.Vim.findKey(c,d);return"function"==typeof e&&a.signal(c,"vim-keypress",d),e}}function j(a){if("'"==a.charAt(0))return a.charAt(1);var b=a.split(/-(?!$)/),c=b[b.length-1];if(1==b.length&&1==b[0].length)return!1;if(2==b.length&&"Shift"==b[0]&&1==c.length)return!1;for(var d=!1,e=0;e")}function k(a){var b=a.state.vim;return b.onPasteFn||(b.onPasteFn=function(){b.insertMode||(a.setCursor(L(a.getCursor(),0,1)),Bb.enterInsertMode(a,{},b))}),b.onPasteFn}function l(a,b){for(var c=[],d=a;d=a.firstLine()&&b<=a.lastLine()}function n(a){return/^[a-z]$/.test(a)}function o(a){return"()[]{}".indexOf(a)!=-1}function p(a){return kb.test(a)}function q(a){return/^[A-Z]$/.test(a)}function r(a){return/^\s*$/.test(a)}function s(a,b){for(var c=0;c"==b.slice(-11)){var c=b.length-11,d=a.slice(0,c),e=b.slice(0,c);return d==e&&a.length>c?"full":0==e.indexOf(d)&&"partial"}return a==b?"full":0==b.indexOf(a)&&"partial"}function P(a){var b=/^.*(<[\w\-]+>)$/.exec(a),c=b?b[1]:a.slice(-1);if(c.length>1)switch(c){case"":c="\n";break;case"":c=" "}return c}function Q(a,b,c){return function(){for(var d=0;d2&&(b=U.apply(void 0,Array.prototype.slice.call(arguments,1))),T(a,b)?a:b}function V(a,b){return arguments.length>2&&(b=V.apply(void 0,Array.prototype.slice.call(arguments,1))),T(a,b)?b:a}function W(a,b,c){var d=T(a,b),e=T(b,c);return d&&e}function X(a,b){return a.getLine(b).length}function Y(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function Z(a){return a.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function $(a,b,c){var e=X(a,b),f=new Array(c-e+1).join(" ");a.setCursor(d(b,e)),a.replaceRange(f,a.getCursor())}function _(a,b){var c=[],e=a.listSelections(),f=R(a.clipPos(b)),g=!S(b,f),h=a.getCursor("head"),i=ba(e,h),j=S(e[i].head,e[i].anchor),k=e.length-1,l=k-i>i?k:0,m=e[l].anchor,n=Math.min(m.line,f.line),o=Math.max(m.line,f.line),p=m.ch,q=f.ch,r=e[l].head.ch-p,s=q-p;r>0&&s<=0?(p++,g||q--):r<0&&s>=0?(p--,j||q++):r<0&&s==-1&&(p--,q++);for(var t=n;t<=o;t++){var u={anchor:new d(t,p),head:new d(t,q)};c.push(u)}return a.setSelections(c),b.ch=q,m.ch=p,m}function aa(a,b,c){for(var d=[],e=0;ej&&(f.line=j),f.ch=X(a,f.line)}return{ranges:[{anchor:g,head:f}],primary:0}}if("block"==c){for(var k=Math.min(g.line,f.line),l=Math.min(g.ch,f.ch),m=Math.max(g.line,f.line),n=Math.max(g.ch,f.ch)+1,o=m-k+1,p=f.line==k?0:o-1,q=[],r=0;r0&&f&&r(f);f=e.pop())c.line--,c.ch=0;f?(c.line--,c.ch=X(a,c.line)):c.ch=0}}function ka(a,b,c){b.ch=0,c.ch=0,c.line++}function la(a){if(!a)return 0;var b=a.search(/\S/);return b==-1?a.length:b}function ma(a,b,c,e,f){for(var g=ha(a),h=a.getLine(g.line),i=g.ch,j=f?lb[0]:mb[0];!j(h.charAt(i));)if(++i>=h.length)return null;e?j=mb[0]:(j=lb[0])(h.charAt(i))||(j=lb[1]);for(var k=i,l=i;j(h.charAt(k))&&k=0;)l--;if(l++,b){for(var m=k;/\s/.test(h.charAt(k))&&k0;)l--;l||(l=n)}}return{start:d(g.line,l),end:d(g.line,k)}}function na(a,b,c){S(b,c)||vb.jumpList.add(a,b,c)}function oa(a,b){vb.lastCharacterSearch.increment=a,vb.lastCharacterSearch.forward=b.forward,vb.lastCharacterSearch.selectedCharacter=b.selectedCharacter}function pa(a,b,c,e){var f=R(a.getCursor()),g=c?1:-1,h=c?a.lineCount():-1,i=f.ch,j=f.line,k=a.getLine(j),l={lineText:k,nextCh:k.charAt(i),lastCh:null,index:i,symb:e,reverseSymb:(c?{")":"(","}":"{"}:{"(":")","{":"}"})[e],forward:c,depth:0,curMoveThrough:!1},m=Cb[e];if(!m)return f;var n=Db[m].init,o=Db[m].isComplete;for(n&&n(l);j!==h&&b;){if(l.index+=g,l.nextCh=l.lineText.charAt(l.index),!l.nextCh){if(j+=g,l.lineText=a.getLine(j)||"",g>0)l.index=0;else{var p=l.lineText.length;l.index=p>0?p-1:0}l.nextCh=l.lineText.charAt(l.index)}o(l)&&(f.line=j,f.ch=l.index,b--)}return l.nextCh||l.curMoveThrough?d(j,l.index):f}function qa(a,b,c,d,e){var f=b.line,g=b.ch,h=a.getLine(f),i=c?1:-1,j=d?mb:lb;if(e&&""==h){if(f+=i,h=a.getLine(f),!m(a,f))return null;g=c?0:h.length}for(;;){if(e&&""==h)return{from:0,to:0,line:f};for(var k=i>0?h.length:-1,l=k,n=k;g!=k;){for(var o=!1,p=0;p0?0:h.length}}function ra(a,b,c,e,f,g){var h=R(b),i=[];(e&&!f||!e&&f)&&c++;for(var j=!(e&&f),k=0;k0;)h(n,e)&&c--,n+=e;return new d(n,0)}var o=a.state.vim;if(o.visualLine&&h(k,1,!0)){var p=o.sel.anchor;h(p.line,-1,!0)&&(f&&p.line==k||(k+=1))}var q=g(k);for(n=k;n<=m&&c;n++)h(n,1,!0)&&(f&&g(n)==q||c--);for(j=new d(n,0),n>m&&!q?q=!0:f=!1,n=k;n>l&&(f&&g(n)!=q&&n!=k||!h(n,-1,!0));n--);return i=new d(n,0),{start:i,end:j}}function xa(a,b,c,e){var f,g,h=b,i={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/}[c],j={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{"}[c],k=a.getLine(h.line).charAt(h.ch),l=k===j?1:0;if(f=a.scanForBracket(d(h.line,h.ch+l),-1,null,{bracketRegex:i}),g=a.scanForBracket(d(h.line,h.ch+l),1,null,{bracketRegex:i}),!f||!g)return{start:h,end:h};if(f=f.pos,g=g.pos,f.line==g.line&&f.ch>g.ch||f.line>g.line){var m=f;f=g,g=m}return e?g.ch+=1:f.ch+=1,{start:f,end:g}}function ya(a,b,c,e){var f,g,h,i,j=R(b),k=a.getLine(j.line),l=k.split(""),m=l.indexOf(c);if(j.ch-1&&!f;h--)l[h]==c&&(f=h+1);else f=j.ch+1;if(f&&!g)for(h=f,i=l.length;h'+b+"",{bottom:!0,duration:5e3}):alert(b)}function Ja(a,b){var c=''+(a||"")+'';return b&&(c+=' '+b+""),c}function Ka(a,b){var c=(b.prefix||"")+" "+(b.desc||"");Ba(a,Ja(b.prefix,b.desc),c,b.onClose,b)}function La(a,b){if(a instanceof RegExp&&b instanceof RegExp){for(var c=["global","multiline","ignoreCase","source"],d=0;d=b&&a<=c:a==b}function Sa(a){var b=a.getScrollInfo(),c=a.coordsChar({left:0,top:6+b.top},"local"),d=b.clientHeight-10+b.top,e=a.coordsChar({left:0,top:d},"local");return{top:c.line,bottom:e.line}}function Ta(a,b,c){if("'"==c){var d=a.doc.history.done,e=d[d.length-2];return e&&e.ranges&&e.ranges[0].head}var f=b.marks[c];return f&&f.find()}function Ua(b,c,d,e,f,g,h,i,j){function k(){b.operation(function(){for(;!p;)l(),m();n()})}function l(){var a=b.getRange(g.from(),g.to()),c=a.replace(h,i);g.replace(c)}function m(){for(;g.findNext()&&Ra(g.from(),e,f);)if(d||!q||g.from().line!=q.line)return b.scrollIntoView(g.from(),30),b.setSelection(g.from(),g.to()),q=g.from(),void(p=!1);p=!0}function n(a){if(a&&a(),b.focus(),q){b.setCursor(q);var c=b.state.vim;c.exMode=!1,c.lastHPos=c.lastHSPos=q.ch}j&&j()}function o(c,d,e){switch(a.e_stop(c),a.keyName(c)){case"Y":l(),m();break;case"N":m();break;case"A":var f=j;j=void 0,b.operation(k),j=f;break;case"L":l();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":n(e)}return p&&n(e),!0}b.state.vim.exMode=!0;var p=!1,q=g.from();return m(),p?void Ia(b,"No matches for "+h.source):c?void Ka(b,{prefix:"replace with "+i+" (y/n/a/q/l)",onKeyDown:o}):(k(),void(j&&j()))}function Va(b){var c=b.state.vim,d=vb.macroModeState,e=vb.registerController.getRegister("."),f=d.isPlaying,g=d.lastInsertModeChanges,h=[];if(!f){for(var i=g.inVisualBlock?c.lastSelection.visualBlock.height:1,j=g.changes,h=[],k=0;k1&&(gb(b,c,c.insertModeRepeat-1,!0),c.lastEditInputState.repeatOverride=c.insertModeRepeat),delete c.insertModeRepeat,c.insertMode=!1,b.setCursor(b.getCursor().line,b.getCursor().ch-1),b.setOption("keyMap","vim"),b.setOption("disableInput",!0),b.toggleOverwrite(!1),e.setText(g.changes.join("")),a.signal(b,"vim-mode-change",{mode:"normal"}),d.isRecording&&$a(d)}function Wa(a){b.unshift(a)}function Xa(a,b,c,d,e){var f={keys:a,type:b};f[b]=c,f[b+"Args"]=d;for(var g in e)f[g]=e[g];Wa(f)}function Ya(b,c,d,e){var f=vb.registerController.getRegister(e);if(":"==e)return f.keyBuffer[0]&&Jb.processCommand(b,f.keyBuffer[0]),void(d.isPlaying=!1);var g=f.keyBuffer,h=0;d.isPlaying=!0, +d.replaySearchQueries=f.searchQueries.slice(0);for(var i=0;i|<\w+>|./.exec(l),k=j[0],l=l.substring(j.index+k.length),a.Vim.handleKey(b,k,"macro"),c.insertMode){var m=f.insertModeChanges[h++].changes;vb.macroModeState.lastInsertModeChanges.changes=m,hb(b,m,1),Va(b)}d.isPlaying=!1}function Za(a,b){if(!a.isPlaying){var c=a.latestRegister,d=vb.registerController.getRegister(c);d&&d.pushText(b)}}function $a(a){if(!a.isPlaying){var b=a.latestRegister,c=vb.registerController.getRegister(b);c&&c.pushInsertModeChanges&&c.pushInsertModeChanges(a.lastInsertModeChanges)}}function _a(a,b){if(!a.isPlaying){var c=a.latestRegister,d=vb.registerController.getRegister(c);d&&d.pushSearchQuery&&d.pushSearchQuery(b)}}function ab(a,b){var c=vb.macroModeState,d=c.lastInsertModeChanges;if(!c.isPlaying)for(;b;){if(d.expectCursorActivityForChange=!0,"+input"==b.origin||"paste"==b.origin||void 0===b.origin){var e=b.text.join("\n");d.maybeReset&&(d.changes=[],d.maybeReset=!1),d.changes.push(e)}b=b.next}}function bb(a){var b=a.state.vim;if(b.insertMode){var c=vb.macroModeState;if(c.isPlaying)return;var d=c.lastInsertModeChanges;d.expectCursorActivityForChange?d.expectCursorActivityForChange=!1:d.maybeReset=!0}else a.curOp.isVimOp||db(a,b);b.visualMode&&cb(a)}function cb(a){var b=a.state.vim,c=J(a,R(b.sel.head)),d=L(c,0,1);b.fakeCursor&&b.fakeCursor.clear(),b.fakeCursor=a.markText(c,d,{className:"cm-animate-fat-cursor"})}function db(b,c){var d=b.getCursor("anchor"),e=b.getCursor("head");if(c.visualMode&&!b.somethingSelected()?ia(b,!1):c.visualMode||c.insertMode||!b.somethingSelected()||(c.visualMode=!0,c.visualLine=!1,a.signal(b,"vim-mode-change",{mode:"visual"})),c.visualMode){var f=T(e,d)?0:-1,g=T(e,d)?-1:0;e=L(e,0,f),d=L(d,0,g),c.sel={anchor:d,head:e},ua(b,c,"<",U(e,d)),ua(b,c,">",V(e,d))}else c.insertMode||(c.lastHPos=b.getCursor().ch)}function eb(a){this.keyName=a}function fb(b){function c(){return e.maybeReset&&(e.changes=[],e.maybeReset=!1),e.changes.push(new eb(f)),!0}var d=vb.macroModeState,e=d.lastInsertModeChanges,f=a.keyName(b);f&&(f.indexOf("Delete")==-1&&f.indexOf("Backspace")==-1||a.lookupKey(f,"vim-insert",c))}function gb(a,b,c,d){function e(){h?yb.processAction(a,b,b.lastEditActionCommand):yb.evalInput(a,b)}function f(c){if(g.lastInsertModeChanges.changes.length>0){c=b.lastEditActionCommand?c:1;hb(a,g.lastInsertModeChanges.changes,c)}}var g=vb.macroModeState;g.isPlaying=!0;var h=!!b.lastEditActionCommand,i=b.inputState;if(b.inputState=b.lastEditInputState,h&&b.lastEditActionCommand.interlaceInsertRepeat)for(var j=0;j"]),rb=[].concat(nb,ob,pb,["-",'"',".",":","/"]),sb={};t("filetype",void 0,"string",["ft"],function(a,b){if(void 0!==b){if(void 0===a){var c=b.getOption("mode");return"null"==c?"":c}var c=""==a?"null":a;b.setOption("mode",c)}});var tb=function(){function a(a,b,h){function i(b){var e=++d%c,f=g[e];f&&f.clear(),g[e]=a.setBookmark(b)}var j=d%c,k=g[j];if(k){var l=k.find();l&&!S(l,b)&&i(b)}else i(b);i(h),e=d,(f=d-c+1)<0&&(f=0)}function b(a,b){d+=b,d>e?d=e:d0?1:-1,k=a.getCursor();do{if(d+=j,(h=g[(c+d)%c])&&(i=h.find())&&!S(k,i))break}while(df)}return h}var c=100,d=-1,e=0,f=0,g=new Array(c);return{cachedCursor:void 0,add:a,move:b}},ub=function(a){return a?{changes:a.changes,expectCursorActivityForChange:a.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};w.prototype={exitMacroRecordMode:function(){var a=vb.macroModeState;a.onRecordingDone&&a.onRecordingDone(),a.onRecordingDone=void 0,a.isRecording=!1},enterMacroRecordMode:function(a,b){var c=vb.registerController.getRegister(b);c&&(c.clear(),this.latestRegister=b,a.openDialog&&(this.onRecordingDone=a.openDialog("(recording)["+b+"]",null,{bottom:!0})),this.isRecording=!0)}};var vb,wb,xb={buildKeyMap:function(){},getRegisterController:function(){return vb.registerController},resetVimGlobalState_:y,getVimGlobalState_:function(){return vb},maybeInitVimState_:x,suppressErrorLogging:!1,InsertModeKey:eb,map:function(a,b,c){Jb.map(a,b,c)},unmap:function(a,b){Jb.unmap(a,b)},setOption:u,getOption:v,defineOption:t,defineEx:function(a,b,c){if(b){if(0!==a.indexOf(b))throw new Error('(Vim.defineEx) "'+b+'" is not a prefix of "'+a+'", command not registered')}else b=a;Ib[a]=c,Jb.commandMap_[b]={name:a,shortName:b,type:"api"}},handleKey:function(a,b,c){var d=this.findKey(a,b,c);if("function"==typeof d)return d()},findKey:function(c,d,e){function f(){var a=vb.macroModeState;if(a.isRecording){if("q"==d)return a.exitMacroRecordMode(),A(c),!0;"mapping"!=e&&Za(a,d)}}function g(){if(""==d)return A(c),j.visualMode?ia(c):j.insertMode&&Va(c),!0}function h(b){for(var e;b;)e=/<\w+-.+?>|<\w+>|./.exec(b),d=e[0],b=b.substring(e.index+d.length),a.Vim.handleKey(c,d,"mapping")}var i,j=x(c);return i=j.insertMode?function(){if(g())return!0;for(var a=j.inputState.keyBuffer=j.inputState.keyBuffer+d,e=1==d.length,f=yb.matchCommand(a,b,j.inputState,"insert");a.length>1&&"full"!=f.type;){var a=j.inputState.keyBuffer=a.slice(1),h=yb.matchCommand(a,b,j.inputState,"insert");"none"!=h.type&&(f=h)}if("none"==f.type)return A(c),!1;if("partial"==f.type)return wb&&window.clearTimeout(wb),wb=window.setTimeout(function(){j.insertMode&&j.inputState.keyBuffer&&A(c)},v("insertModeEscKeysTimeout")),!e;if(wb&&window.clearTimeout(wb),e){for(var i=c.listSelections(),k=0;k0||this.motionRepeat.length>0)&&(a=1,this.prefixRepeat.length>0&&(a*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(a*=parseInt(this.motionRepeat.join(""),10))),a},B.prototype={setText:function(a,b,c){this.keyBuffer=[a||""],this.linewise=!!b,this.blockwise=!!c},pushText:function(a,b){b&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(a)},pushInsertModeChanges:function(a){this.insertModeChanges.push(ub(a))},pushSearchQuery:function(a){this.searchQueries.push(a)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},D.prototype={pushText:function(a,b,c,d,e){d&&"\n"==c.charAt(0)&&(c=c.slice(1)+"\n"),d&&"\n"!==c.charAt(c.length-1)&&(c+="\n");var f=this.isValidRegister(a)?this.getRegister(a):null;if(!f){switch(b){case"yank":this.registers[0]=new B(c,d,e);break;case"delete":case"change":c.indexOf("\n")==-1?this.registers["-"]=new B(c,d):(this.shiftNumericRegisters_(),this.registers[1]=new B(c,d))}return void this.unnamedRegister.setText(c,d,e)}q(a)?f.pushText(c,d):f.setText(c,d,e),this.unnamedRegister.setText(f.toString(),d)},getRegister:function(a){return this.isValidRegister(a)?(a=a.toLowerCase(),this.registers[a]||(this.registers[a]=new B),this.registers[a]):this.unnamedRegister},isValidRegister:function(a){return a&&s(a,rb)},shiftNumericRegisters_:function(){for(var a=9;a>=2;a--)this.registers[a]=this.getRegister(""+(a-1))}},E.prototype={nextMatch:function(a,b){var c=this.historyBuffer,d=b?-1:1;null===this.initialPrefix&&(this.initialPrefix=a);for(var e=this.iterator+d;b?e>=0:e=c.length?(this.iterator=c.length,this.initialPrefix):e<0?a:void 0},pushInput:function(a){var b=this.historyBuffer.indexOf(a);b>-1&&this.historyBuffer.splice(b,1),a.length&&this.historyBuffer.push(a)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var yb={matchCommand:function(a,b,c,d){var e=N(a,b,d,c);if(!e.full&&!e.partial)return{type:"none"};if(!e.full&&e.partial)return{type:"partial"};for(var f,g=0;g"==f.keys.slice(-11)&&(c.selectedCharacter=P(a)),{type:"full",command:f}},processCommand:function(a,b,c){switch(b.inputState.repeatOverride=c.repeatOverride,c.type){case"motion":this.processMotion(a,b,c);break;case"operator":this.processOperator(a,b,c);break;case"operatorMotion":this.processOperatorMotion(a,b,c);break;case"action":this.processAction(a,b,c);break;case"search":this.processSearch(a,b,c);break;case"ex":case"keyToEx":this.processEx(a,b,c)}},processMotion:function(a,b,c){b.inputState.motion=c.motion,b.inputState.motionArgs=K(c.motionArgs),this.evalInput(a,b)},processOperator:function(a,b,c){var d=b.inputState;if(d.operator){if(d.operator==c.operator)return d.motion="expandToLine",d.motionArgs={linewise:!0},void this.evalInput(a,b);A(a)}d.operator=c.operator,d.operatorArgs=K(c.operatorArgs),b.visualMode&&this.evalInput(a,b)},processOperatorMotion:function(a,b,c){var d=b.visualMode,e=K(c.operatorMotionArgs);e&&d&&e.visualLine&&(b.visualLine=!0),this.processOperator(a,b,c),d||this.processMotion(a,b,c)},processAction:function(a,b,c){var d=b.inputState,e=d.getRepeat(),f=!!e,g=K(c.actionArgs)||{};d.selectedCharacter&&(g.selectedCharacter=d.selectedCharacter),c.operator&&this.processOperator(a,b,c),c.motion&&this.processMotion(a,b,c),(c.motion||c.operator)&&this.evalInput(a,b),g.repeat=e||1,g.repeatIsExplicit=f,g.registerName=d.registerName,A(a),b.lastMotion=null,c.isEdit&&this.recordLastEdit(b,d,c),Bb[c.action](a,g,b)},processSearch:function(b,c,d){function e(a,e,f){vb.searchHistoryController.pushInput(a),vb.searchHistoryController.reset();try{Ma(b,a,e,f)}catch(c){return Ia(b,"Invalid regex: "+a),void A(b)}yb.processMotion(b,c,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:d.searchArgs.toJumplist}})}function f(a){b.scrollTo(m.left,m.top),e(a,!0,!0);var c=vb.macroModeState;c.isRecording&&_a(c,a)}function g(c,d,e){var f,g,h=a.keyName(c);"Up"==h||"Down"==h?(f="Up"==h,g=c.target?c.target.selectionEnd:0,d=vb.searchHistoryController.nextMatch(d,f)||"",e(d),g&&c.target&&(c.target.selectionEnd=c.target.selectionStart=Math.min(g,c.target.value.length))):"Left"!=h&&"Right"!=h&&"Ctrl"!=h&&"Alt"!=h&&"Shift"!=h&&vb.searchHistoryController.reset();var j;try{j=Ma(b,d,!0,!0)}catch(a){}j?b.scrollIntoView(Pa(b,!i,j),30):(Qa(b),b.scrollTo(m.left,m.top))}function h(c,d,e){var f=a.keyName(c);"Esc"==f||"Ctrl-C"==f||"Ctrl-["==f||"Backspace"==f&&""==d?(vb.searchHistoryController.pushInput(d),vb.searchHistoryController.reset(),Ma(b,l),Qa(b),b.scrollTo(m.left,m.top),a.e_stop(c),A(b),e(),b.focus()):"Up"==f||"Down"==f?a.e_stop(c):"Ctrl-U"==f&&(a.e_stop(c),e(""))}if(b.getSearchCursor){var i=d.searchArgs.forward,j=d.searchArgs.wholeWordOnly;Aa(b).setReversed(!i);var k=i?"/":"?",l=Aa(b).getQuery(),m=b.getScrollInfo();switch(d.searchArgs.querySrc){case"prompt":var n=vb.macroModeState;if(n.isPlaying){var o=n.replaySearchQueries.shift();e(o,!0,!1)}else Ka(b,{onClose:f,prefix:k,desc:Gb,onKeyUp:g,onKeyDown:h});break;case"wordUnderCursor":var p=ma(b,!1,!0,!1,!0),q=!0;if(p||(p=ma(b,!1,!0,!1,!1),q=!1),!p)return;var o=b.getLine(p.start.line).substring(p.start.ch,p.end.ch);o=q&&j?"\\b"+o+"\\b":Z(o),vb.jumpList.cachedCursor=b.getCursor(),b.setCursor(p.start),e(o,!0,!1)}}},processEx:function(b,c,d){function e(a){vb.exCommandHistoryController.pushInput(a),vb.exCommandHistoryController.reset(),Jb.processCommand(b,a)}function f(c,d,e){var f,g,h=a.keyName(c);("Esc"==h||"Ctrl-C"==h||"Ctrl-["==h||"Backspace"==h&&""==d)&&(vb.exCommandHistoryController.pushInput(d),vb.exCommandHistoryController.reset(),a.e_stop(c),A(b),e(),b.focus()),"Up"==h||"Down"==h?(a.e_stop(c),f="Up"==h,g=c.target?c.target.selectionEnd:0,d=vb.exCommandHistoryController.nextMatch(d,f)||"",e(d),g&&c.target&&(c.target.selectionEnd=c.target.selectionStart=Math.min(g,c.target.value.length))):"Ctrl-U"==h?(a.e_stop(c),e("")):"Left"!=h&&"Right"!=h&&"Ctrl"!=h&&"Alt"!=h&&"Shift"!=h&&vb.exCommandHistoryController.reset()}"keyToEx"==d.type?Jb.processCommand(b,d.exArgs.input):c.visualMode?Ka(b,{onClose:e,prefix:":",value:"'<,'>",onKeyDown:f}):Ka(b,{onClose:e,prefix:":",onKeyDown:f})},evalInput:function(a,b){var c,e,f,g=b.inputState,h=g.motion,i=g.motionArgs||{},j=g.operator,k=g.operatorArgs||{},l=g.registerName,m=b.sel,n=R(b.visualMode?J(a,m.head):a.getCursor("head")),o=R(b.visualMode?J(a,m.anchor):a.getCursor("anchor")),p=R(n),q=R(o);if(j&&this.recordLastEdit(b,g),f=void 0!==g.repeatOverride?g.repeatOverride:g.getRepeat(),f>0&&i.explicitRepeat?i.repeatIsExplicit=!0:(i.noRepeat||!i.explicitRepeat&&0===f)&&(f=1,i.repeatIsExplicit=!1),g.selectedCharacter&&(i.selectedCharacter=k.selectedCharacter=g.selectedCharacter),i.repeat=f,A(a),h){var r=zb[h](a,n,i,b);if(b.lastMotion=zb[h],!r)return;if(i.toJumplist){var s=vb.jumpList,t=s.cachedCursor;t?(na(a,t,r),delete s.cachedCursor):na(a,n,r)}r instanceof Array?(e=r[0],c=r[1]):c=r,c||(c=R(n)),b.visualMode?(b.visualBlock&&c.ch===1/0||(c=J(a,c,b.visualBlock)),e&&(e=J(a,e,!0)),e=e||q,m.anchor=e,m.head=c,fa(a),ua(a,b,"<",T(e,c)?e:c),ua(a,b,">",T(e,c)?c:e)):j||(c=J(a,c),a.setCursor(c.line,c.ch))}if(j){if(k.lastSel){e=q;var u=k.lastSel,v=Math.abs(u.head.line-u.anchor.line),w=Math.abs(u.head.ch-u.anchor.ch);c=u.visualLine?d(q.line+v,q.ch):u.visualBlock?d(q.line+v,q.ch+w):u.head.line==u.anchor.line?d(q.line,q.ch+w):d(q.line+v,q.ch),b.visualMode=!0,b.visualLine=u.visualLine,b.visualBlock=u.visualBlock,m=b.sel={anchor:e,head:c},fa(a)}else b.visualMode&&(k.lastSel={anchor:R(m.anchor),head:R(m.head),visualBlock:b.visualBlock,visualLine:b.visualLine});var x,y,z,B,C;if(b.visualMode){if(x=U(m.head,m.anchor),y=V(m.head,m.anchor),z=b.visualLine||k.linewise,B=b.visualBlock?"block":z?"line":"char",C=ga(a,{anchor:x,head:y},B),z){var D=C.ranges;if("block"==B)for(var E=0;Ek&&f.line==k?this.moveToEol(a,b,c,e):(c.toFirstChar&&(g=la(a.getLine(i)),e.lastHPos=g),e.lastHSPos=a.charCoords(d(i,g),"div").left,d(i,g))},moveByDisplayLines:function(a,b,c,e){var f=b;switch(e.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:e.lastHSPos=a.charCoords(f,"div").left}var g=c.repeat,h=a.findPosV(f,c.forward?g:-g,"line",e.lastHSPos);if(h.hitSide)if(c.forward)var i=a.charCoords(h,"div"),j={top:i.top+8,left:e.lastHSPos},h=a.coordsChar(j,"div");else{var k=a.charCoords(d(a.firstLine(),0),"div");k.left=e.lastHSPos,h=a.coordsChar(k,"div")}return e.lastHPos=h.ch,h},moveByPage:function(a,b,c){var d=b,e=c.repeat;return a.findPosV(d,c.forward?e:-e,"page")},moveByParagraph:function(a,b,c){var d=c.forward?1:-1;return wa(a,b,c.repeat,d)},moveByScroll:function(a,b,c,d){var e=a.getScrollInfo(),f=null,g=c.repeat;g||(g=e.clientHeight/(2*a.defaultTextHeight()));var h=a.charCoords(b,"local");c.repeat=g;var f=zb.moveByDisplayLines(a,b,c,d);if(!f)return null;var i=a.charCoords(f,"local");return a.scrollTo(null,e.top+i.top-h.top),f},moveByWords:function(a,b,c){return ra(a,b,c.repeat,!!c.forward,!!c.wordEnd,!!c.bigWord)},moveTillCharacter:function(a,b,c){var d=c.repeat,e=sa(a,d,c.forward,c.selectedCharacter),f=c.forward?-1:1;return oa(f,c),e?(e.ch+=f,e):null},moveToCharacter:function(a,b,c){var d=c.repeat;return oa(0,c),sa(a,d,c.forward,c.selectedCharacter)||b},moveToSymbol:function(a,b,c){return pa(a,c.repeat,c.forward,c.selectedCharacter)||b},moveToColumn:function(a,b,c,d){var e=c.repeat;return d.lastHPos=e-1,d.lastHSPos=a.charCoords(b,"div").left,ta(a,e)},moveToEol:function(a,b,c,e){var f=b;e.lastHPos=1/0;var g=d(f.line+c.repeat-1,1/0),h=a.clipPos(g);return h.ch--,e.lastHSPos=a.charCoords(h,"div").left,g},moveToFirstNonWhiteSpaceCharacter:function(a,b){var c=b;return d(c.line,la(a.getLine(c.line)))},moveToMatchedSymbol:function(a,b){var c,e=b,f=e.line,g=e.ch,h=a.getLine(f);do{if((c=h.charAt(g++))&&o(c)){var i=a.getTokenTypeAt(d(f,g));if("string"!==i&&"comment"!==i)break}}while(c);if(c){return a.findMatchingBracket(d(f,g)).to}return e},moveToStartOfLine:function(a,b){return d(b.line,0)},moveToLineOrEdgeOfDocument:function(a,b,c){var e=c.forward?a.lastLine():a.firstLine();return c.repeatIsExplicit&&(e=c.repeat-a.getOption("firstLineNumber")),d(e,la(a.getLine(e)))},textObjectManipulation:function(a,b,c,d){var e={"(":")",")":"(","{":"}","}":"{","[":"]","]":"["},f={"'":!0,'"':!0},g=c.selectedCharacter;"b"==g?g="(":"B"==g&&(g="{");var h,i=!c.textObjectInner;if(e[g])h=xa(a,b,g,i);else if(f[g])h=ya(a,b,g,i);else if("W"===g)h=ma(a,i,!0,!0);else if("w"===g)h=ma(a,i,!0,!1);else{if("p"!==g)return null;if(h=wa(a,b,c.repeat,0,i),c.linewise=!0,d.visualMode)d.visualLine||(d.visualLine=!0);else{var j=d.inputState.operatorArgs;j&&(j.linewise=!0),h.end.line--}}return a.state.vim.visualMode?ea(a,h.start,h.end):[h.start,h.end]},repeatLastCharacterSearch:function(a,b,c){var d=vb.lastCharacterSearch,e=c.repeat,f=c.forward===d.forward,g=(d.increment?1:0)*(f?-1:1);a.moveH(-g,"char"),c.inclusive=!!f;var h=sa(a,e,f,d.selectedCharacter);return h?(h.ch+=g,h):(a.moveH(g,"char"),b)}},Ab={change:function(b,c,e){var f,g,h=b.state.vim;if(vb.macroModeState.lastInsertModeChanges.inVisualBlock=h.visualBlock,h.visualMode){g=b.getSelection();var i=G("",e.length);b.replaceSelections(i),f=U(e[0].head,e[0].anchor)}else{var j=e[0].anchor,k=e[0].head;g=b.getRange(j,k);var l=h.lastEditInputState||{};if("moveByWords"==l.motion&&!r(g)){var m=/\s+$/.exec(g);m&&l.motionArgs&&l.motionArgs.forward&&(k=L(k,0,-m[0].length),g=g.slice(0,-m[0].length))}var n=new d(j.line-1,Number.MAX_VALUE),o=b.firstLine()==b.lastLine();k.line>b.lastLine()&&c.linewise&&!o?b.replaceRange("",n,k):b.replaceRange("",j,k),c.linewise&&(o||(b.setCursor(n),a.commands.newlineAndIndent(b)),j.ch=Number.MAX_VALUE),f=j}vb.registerController.pushText(c.registerName,"change",g,c.linewise,e.length>1),Bb.enterInsertMode(b,{head:f},b.state.vim)},delete:function(a,b,c){var e,f,g=a.state.vim;if(g.visualBlock){f=a.getSelection();var h=G("",c.length);a.replaceSelections(h),e=c[0].anchor}else{var i=c[0].anchor,j=c[0].head;b.linewise&&j.line!=a.firstLine()&&i.line==a.lastLine()&&i.line==j.line-1&&(i.line==a.firstLine()?i.ch=0:i=d(i.line-1,X(a,i.line-1))),f=a.getRange(i,j),a.replaceRange("",i,j),e=i,b.linewise&&(e=zb.moveToFirstNonWhiteSpaceCharacter(a,i))}return vb.registerController.pushText(b.registerName,"delete",f,b.linewise,g.visualBlock),J(a,e)},indent:function(a,b,c){var d=a.state.vim,e=c[0].anchor.line,f=d.visualBlock?c[c.length-1].anchor.line:c[0].head.line,g=d.visualMode?b.repeat:1;b.linewise&&f--;for(var h=e;h<=f;h++)for(var i=0;ij.top?(i.line+=(h-j.top)/e,i.line=Math.ceil(i.line),a.setCursor(i),j=a.charCoords(i,"local"),a.scrollTo(null,j.top)):a.scrollTo(null,h);else{var k=h+a.getScrollInfo().clientHeight;k=g.anchor.line?L(g.head,0,1):d(g.anchor.line,0);else if("inplace"==f&&e.visualMode)return;b.setOption("disableInput",!1),c&&c.replace?(b.toggleOverwrite(!0),b.setOption("keyMap","vim-replace"),a.signal(b,"vim-mode-change",{mode:"replace"})):(b.toggleOverwrite(!1),b.setOption("keyMap","vim-insert"),a.signal(b,"vim-mode-change",{mode:"insert"})),vb.macroModeState.isPlaying||(b.on("change",ab),a.on(b.getInputField(),"keydown",fb)),e.visualMode&&ia(b),aa(b,h,i)}},toggleVisualMode:function(b,c,e){var f,g=c.repeat,h=b.getCursor();e.visualMode?e.visualLine^c.linewise||e.visualBlock^c.blockwise?(e.visualLine=!!c.linewise,e.visualBlock=!!c.blockwise,a.signal(b,"vim-mode-change",{mode:"visual",subMode:e.visualLine?"linewise":e.visualBlock?"blockwise":""}),fa(b)):ia(b):(e.visualMode=!0,e.visualLine=!!c.linewise,e.visualBlock=!!c.blockwise,f=J(b,d(h.line,h.ch+g-1),!0),e.sel={anchor:h,head:f},a.signal(b,"vim-mode-change",{mode:"visual",subMode:e.visualLine?"linewise":e.visualBlock?"blockwise":""}),fa(b),ua(b,e,"<",U(h,f)),ua(b,e,">",V(h,f)))},reselectLastSelection:function(b,c,d){var e=d.lastSelection;if(d.visualMode&&da(b,d),e){var f=e.anchorMark.find(),g=e.headMark.find();if(!f||!g)return;d.sel={anchor:f,head:g},d.visualMode=!0,d.visualLine=e.visualLine,d.visualBlock=e.visualBlock,fa(b),ua(b,d,"<",U(f,g)),ua(b,d,">",V(f,g)),a.signal(b,"vim-mode-change",{mode:"visual",subMode:d.visualLine?"linewise":d.visualBlock?"blockwise":""})}},joinLines:function(a,b,c){var e,f;if(c.visualMode){if(e=a.getCursor("anchor"),f=a.getCursor("head"),T(f,e)){var g=f;f=e,e=g}f.ch=X(a,f.line)-1}else{var h=Math.max(b.repeat,2);e=a.getCursor(),f=J(a,d(e.line+h-1,1/0))}for(var i=0,j=e.line;j1)var g=Array(b.repeat+1).join(g);var o=f.linewise,p=f.blockwise;if(o)c.visualMode?g=c.visualLine?g.slice(0,-1):"\n"+g.slice(0,g.length-1)+"\n":b.after?(g="\n"+g.slice(0,g.length-1),e.ch=X(a,e.line)):e.ch=0;else{if(p){g=g.split("\n");for(var q=0;qa.lastLine()&&a.replaceRange("\n",d(A,0));var B=X(a,A);Bk.length&&(f=k.length),g=d(i.line,f)}if("\n"==h)e.visualMode||b.replaceRange("",i,g),(a.commands.newlineAndIndentContinueComment||a.commands.newlineAndIndent)(b);else{var l=b.getRange(i,g);if(l=l.replace(/[^\n]/g,h),e.visualBlock){var m=new Array(b.getOption("tabSize")+1).join(" ");l=b.getSelection(),l=l.replace(/\t/g,m).replace(/[^\n]/g,h).split("\n"),b.replaceSelections(l)}else b.replaceRange(l,i,g);e.visualMode?(i=T(j[0].anchor,j[0].head)?j[0].anchor:j[0].head,b.setCursor(i),ia(b,!1)):b.setCursor(L(g,0,-1))}},incrementNumberToken:function(a,b){for(var c,e,f,g,h,i=a.getCursor(),j=a.getLine(i.line),k=/-?\d+/g;null!==(c=k.exec(j))&&(h=c[0],e=c.index,f=e+h.length,!(i.ch=1)return!0}else a.nextCh===a.reverseSymb&&a.depth--;return!1}},section:{init:function(a){a.curMoveThrough=!0,a.symb=(a.forward?"]":"[")===a.symb?"{":"}"},isComplete:function(a){return 0===a.index&&a.nextCh===a.symb}},comment:{isComplete:function(a){var b="*"===a.lastCh&&"/"===a.nextCh +;return a.lastCh=a.nextCh,b}},method:{init:function(a){a.symb="m"===a.symb?"{":"}",a.reverseSymb="{"===a.symb?"}":"{"},isComplete:function(a){return a.nextCh===a.symb}},preprocess:{init:function(a){a.index=0},isComplete:function(a){if("#"===a.nextCh){var b=a.lineText.match(/#(\w+)/)[1];if("endif"===b){if(a.forward&&0===a.depth)return!0;a.depth++}else if("if"===b){if(!a.forward&&0===a.depth)return!0;a.depth--}if("else"===b&&0===a.depth)return!0}return!1}}};t("pcre",!0,"boolean"),za.prototype={getQuery:function(){return vb.query},setQuery:function(a){vb.query=a},getOverlay:function(){return this.searchOverlay},setOverlay:function(a){this.searchOverlay=a},isReversed:function(){return vb.isReversed},setReversed:function(a){vb.isReversed=a},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(a){this.annotate=a}};var Eb={"\\n":"\n","\\r":"\r","\\t":"\t"},Fb={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":"\t"},Gb="(Javascript regexp)",Hb=function(){this.buildCommandMap_()};Hb.prototype={processCommand:function(a,b,c){var d=this;a.operation(function(){a.curOp.isVimOp=!0,d._processCommand(a,b,c)})},_processCommand:function(b,c,d){var e=b.state.vim,f=vb.registerController.getRegister(":"),g=f.toString();e.visualMode&&ia(b);var h=new a.StringStream(c);f.setText(c);var i=d||{};i.input=c;try{this.parseInput_(b,h,i)}catch(a){throw Ia(b,a),a}var j,k;if(i.commandName){if(j=this.matchCommand_(i.commandName)){if(k=j.name,j.excludeFromCommandHistory&&f.setText(g),this.parseCommandArgs_(h,i,j),"exToKey"==j.type){for(var l=0;l0;b--){var c=a.substring(0,b);if(this.commandMap_[c]){var d=this.commandMap_[c];if(0===d.name.indexOf(a))return d}}return null},buildCommandMap_:function(){this.commandMap_={};for(var a=0;a
";if(c){var f;c=c.join("");for(var g=0;g"}}else for(var f in d){var i=d[f].toString();i.length&&(e+='"'+f+" "+i+"
")}Ia(a,e)},sort:function(b,c){function e(a,b){if(g){var c;c=a,a=b,b=c}h&&(a=a.toLowerCase(),b=b.toLowerCase());var d=j&&r.exec(a),e=j&&r.exec(b);return d?(d=parseInt((d[1]+d[2]).toLowerCase(),s),e=parseInt((e[1]+e[2]).toLowerCase(),s),d-e):a1)return"Invalid arguments";j=e&&"decimal"||f&&"hex"||l&&"octal"}d[2]&&(k=new RegExp(d[2].substr(1,d[2].length-2),h?"i":""))}}();if(l)return void Ia(b,l+": "+c.argString);var m=c.line||b.firstLine(),n=c.lineEnd||c.line||b.lastLine();if(m!=n){var o=d(m,0),p=d(n,X(b,n)),q=b.getRange(o,p).split("\n"),r=k?k:"decimal"==j?/(-?)([\d]+)/:"hex"==j?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==j?/([0-7]+)/:null,s="decimal"==j?10:"hex"==j?16:"octal"==j?8:null,t=[],u=[];if(j||k)for(var v=0;v")}if(!d)return void Ia(a,k);var m=0,n=function(){if(m=k)return void Ia(b,"Invalid argument: "+c.argString.substring(f));for(var l=0;l<=k-j;l++){var m=String.fromCharCode(j+l);delete d.marks[m]}}else delete d.marks[g]}}},Jb=new Hb;return a.keyMap.vim={attach:h,detach:g,call:i},t("insertModeEscKeysTimeout",200,"number"),a.keyMap["vim-insert"]={fallthrough:["default"],attach:h,detach:g,call:i},a.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:h,detach:g,call:i},y(),xb}()}); \ No newline at end of file diff --git a/media/vendor/codemirror/lib/codemirror.js b/media/vendor/codemirror/lib/codemirror.js index a0d3be5fea603..c75ed9ca6609c 100644 --- a/media/vendor/codemirror/lib/codemirror.js +++ b/media/vendor/codemirror/lib/codemirror.js @@ -1134,7 +1134,7 @@ function endOfLine(visually, cm, lineObj, lineNo, dir) { ch = dir < 0 ? lineObj.text.length - 1 : 0; var targetTop = measureCharPrepared(cm, prep, ch).top; ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch); - if (sticky == "before") { ch = moveCharLogically(lineObj, ch, 1, true); } + if (sticky == "before") { ch = moveCharLogically(lineObj, ch, 1); } } else { ch = dir < 0 ? part.to : part.from; } return new Pos(lineNo, ch, sticky) } @@ -3148,49 +3148,6 @@ function onBlur(cm, e) { setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150); } -// Re-align line numbers and gutter marks to compensate for -// horizontal scrolling. -function alignHorizontally(cm) { - var display = cm.display, view = display.view; - if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return } - var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft; - var gutterW = display.gutters.offsetWidth, left = comp + "px"; - for (var i = 0; i < view.length; i++) { if (!view[i].hidden) { - if (cm.options.fixedGutter) { - if (view[i].gutter) - { view[i].gutter.style.left = left; } - if (view[i].gutterBackground) - { view[i].gutterBackground.style.left = left; } - } - var align = view[i].alignable; - if (align) { for (var j = 0; j < align.length; j++) - { align[j].style.left = left; } } - } } - if (cm.options.fixedGutter) - { display.gutters.style.left = (comp + gutterW) + "px"; } -} - -// Used to ensure that the line number gutter is still the right -// size for the current document size. Returns true when an update -// is needed. -function maybeUpdateLineNumberWidth(cm) { - if (!cm.options.lineNumbers) { return false } - var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display; - if (last.length != display.lineNumChars) { - var test = display.measure.appendChild(elt("div", [elt("div", last)], - "CodeMirror-linenumber CodeMirror-gutter-elt")); - var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW; - display.lineGutter.style.width = ""; - display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1; - display.lineNumWidth = display.lineNumInnerWidth + padding; - display.lineNumChars = display.lineNumInnerWidth ? last.length : -1; - display.lineGutter.style.width = display.lineNumWidth + "px"; - updateGutterSpace(cm); - return true - } - return false -} - // Read the actual heights of the rendered lines, and update their // stored heights to match. function updateHeightsInViewport(cm) { @@ -3249,139 +3206,218 @@ function visibleLines(display, doc, viewport) { return {from: from, to: Math.max(to, from + 1)} } -// Sync the scrollable area and scrollbars, ensure the viewport -// covers the visible area. -function setScrollTop(cm, val) { - if (Math.abs(cm.doc.scrollTop - val) < 2) { return } - cm.doc.scrollTop = val; - if (!gecko) { updateDisplaySimple(cm, {top: val}); } - if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; } - cm.display.scrollbars.setScrollTop(val); - if (gecko) { updateDisplaySimple(cm); } - startWorker(cm, 100); +// Re-align line numbers and gutter marks to compensate for +// horizontal scrolling. +function alignHorizontally(cm) { + var display = cm.display, view = display.view; + if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return } + var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft; + var gutterW = display.gutters.offsetWidth, left = comp + "px"; + for (var i = 0; i < view.length; i++) { if (!view[i].hidden) { + if (cm.options.fixedGutter) { + if (view[i].gutter) + { view[i].gutter.style.left = left; } + if (view[i].gutterBackground) + { view[i].gutterBackground.style.left = left; } + } + var align = view[i].alignable; + if (align) { for (var j = 0; j < align.length; j++) + { align[j].style.left = left; } } + } } + if (cm.options.fixedGutter) + { display.gutters.style.left = (comp + gutterW) + "px"; } } -// Sync scroller and scrollbar, ensure the gutter elements are -// aligned. -function setScrollLeft(cm, val, isScroller) { - if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) { return } - val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth); - cm.doc.scrollLeft = val; - alignHorizontally(cm); - if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; } - cm.display.scrollbars.setScrollLeft(val); + +// Used to ensure that the line number gutter is still the right +// size for the current document size. Returns true when an update +// is needed. +function maybeUpdateLineNumberWidth(cm) { + if (!cm.options.lineNumbers) { return false } + var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display; + if (last.length != display.lineNumChars) { + var test = display.measure.appendChild(elt("div", [elt("div", last)], + "CodeMirror-linenumber CodeMirror-gutter-elt")); + var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW; + display.lineGutter.style.width = ""; + display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1; + display.lineNumWidth = display.lineNumInnerWidth + padding; + display.lineNumChars = display.lineNumInnerWidth ? last.length : -1; + display.lineGutter.style.width = display.lineNumWidth + "px"; + updateGutterSpace(cm); + return true + } + return false } -// Since the delta values reported on mouse wheel events are -// unstandardized between browsers and even browser versions, and -// generally horribly unpredictable, this code starts by measuring -// the scroll effect that the first few mouse wheel events have, -// and, from that, detects the way it can convert deltas to pixel -// offsets afterwards. -// -// The reason we want to know the amount a wheel event will scroll -// is that it gives us a chance to update the display before the -// actual scrolling happens, reducing flickering. +// SCROLLING THINGS INTO VIEW -var wheelSamples = 0; -var wheelPixelsPerUnit = null; -// Fill in a browser-detected starting value on browsers where we -// know one. These don't have to be accurate -- the result of them -// being wrong would just be a slight flicker on the first wheel -// scroll (if it is large enough). -if (ie) { wheelPixelsPerUnit = -.53; } -else if (gecko) { wheelPixelsPerUnit = 15; } -else if (chrome) { wheelPixelsPerUnit = -.7; } -else if (safari) { wheelPixelsPerUnit = -1/3; } +// If an editor sits on the top or bottom of the window, partially +// scrolled out of view, this ensures that the cursor is visible. +function maybeScrollWindow(cm, rect) { + if (signalDOMEvent(cm, "scrollCursorIntoView")) { return } -function wheelEventDelta(e) { - var dx = e.wheelDeltaX, dy = e.wheelDeltaY; - if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; } - if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; } - else if (dy == null) { dy = e.wheelDelta; } - return {x: dx, y: dy} -} -function wheelEventPixels(e) { - var delta = wheelEventDelta(e); - delta.x *= wheelPixelsPerUnit; - delta.y *= wheelPixelsPerUnit; - return delta + var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null; + if (rect.top + box.top < 0) { doScroll = true; } + else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { doScroll = false; } + if (doScroll != null && !phantom) { + var scrollNode = elt("div", "\u200b", null, ("position: absolute;\n top: " + (rect.top - display.viewOffset - paddingTop(cm.display)) + "px;\n height: " + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + "px;\n left: " + (rect.left) + "px; width: " + (Math.max(2, rect.right - rect.left)) + "px;")); + cm.display.lineSpace.appendChild(scrollNode); + scrollNode.scrollIntoView(doScroll); + cm.display.lineSpace.removeChild(scrollNode); + } } -function onScrollWheel(cm, e) { - var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y; - - var display = cm.display, scroll = display.scroller; - // Quit if there's nothing to scroll here - var canScrollX = scroll.scrollWidth > scroll.clientWidth; - var canScrollY = scroll.scrollHeight > scroll.clientHeight; - if (!(dx && canScrollX || dy && canScrollY)) { return } - - // Webkit browsers on OS X abort momentum scrolls when the target - // of the scroll event is removed from the scrollable element. - // This hack (see related code in patchDisplay) makes sure the - // element is kept around. - if (dy && mac && webkit) { - outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) { - for (var i = 0; i < view.length; i++) { - if (view[i].node == cur) { - cm.display.currentWheelTarget = cur; - break outer - } - } +// Scroll a given position into view (immediately), verifying that +// it actually became visible (as line heights are accurately +// measured, the position of something may 'drift' during drawing). +function scrollPosIntoView(cm, pos, end, margin) { + if (margin == null) { margin = 0; } + var rect; + for (var limit = 0; limit < 5; limit++) { + var changed = false; + var coords = cursorCoords(cm, pos); + var endCoords = !end || end == pos ? coords : cursorCoords(cm, end); + rect = {left: Math.min(coords.left, endCoords.left), + top: Math.min(coords.top, endCoords.top) - margin, + right: Math.max(coords.left, endCoords.left), + bottom: Math.max(coords.bottom, endCoords.bottom) + margin}; + var scrollPos = calculateScrollPos(cm, rect); + var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft; + if (scrollPos.scrollTop != null) { + updateScrollTop(cm, scrollPos.scrollTop); + if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; } } + if (scrollPos.scrollLeft != null) { + setScrollLeft(cm, scrollPos.scrollLeft); + if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; } + } + if (!changed) { break } } + return rect +} - // On some browsers, horizontal scrolling will cause redraws to - // happen before the gutter has been realigned, causing it to - // wriggle around in a most unseemly way. When we have an - // estimated pixels/delta value, we just handle horizontal - // scrolling entirely here. It'll be slightly off from native, but - // better than glitching out. - if (dx && !gecko && !presto && wheelPixelsPerUnit != null) { - if (dy && canScrollY) - { setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight))); } - setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth))); - // Only prevent default scrolling if vertical scrolling is - // actually possible. Otherwise, it causes vertical scroll - // jitter on OSX trackpads when deltaX is small and deltaY - // is large (issue #3579) - if (!dy || (dy && canScrollY)) - { e_preventDefault(e); } - display.wheelStartX = null; // Abort measurement, if in progress - return +// Scroll a given set of coordinates into view (immediately). +function scrollIntoView(cm, rect) { + var scrollPos = calculateScrollPos(cm, rect); + if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); } + if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); } +} + +// Calculate a new scroll position needed to scroll the given +// rectangle into view. Returns an object with scrollTop and +// scrollLeft properties. When these are undefined, the +// vertical/horizontal position does not need to be adjusted. +function calculateScrollPos(cm, rect) { + var display = cm.display, snapMargin = textHeight(cm.display); + if (rect.top < 0) { rect.top = 0; } + var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop; + var screen = displayHeight(cm), result = {}; + if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; } + var docBottom = cm.doc.height + paddingVert(display); + var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin; + if (rect.top < screentop) { + result.scrollTop = atTop ? 0 : rect.top; + } else if (rect.bottom > screentop + screen) { + var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen); + if (newTop != screentop) { result.scrollTop = newTop; } } - // 'Project' the visible viewport to cover the area that is being - // scrolled into view (if we know enough to estimate it). - if (dy && wheelPixelsPerUnit != null) { - var pixels = dy * wheelPixelsPerUnit; - var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight; - if (pixels < 0) { top = Math.max(0, top + pixels - 50); } - else { bot = Math.min(cm.doc.height, bot + pixels + 50); } - updateDisplaySimple(cm, {top: top, bottom: bot}); + var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft; + var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0); + var tooWide = rect.right - rect.left > screenw; + if (tooWide) { rect.right = rect.left + screenw; } + if (rect.left < 10) + { result.scrollLeft = 0; } + else if (rect.left < screenleft) + { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); } + else if (rect.right > screenw + screenleft - 3) + { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; } + return result +} + +// Store a relative adjustment to the scroll position in the current +// operation (to be applied when the operation finishes). +function addToScrollTop(cm, top) { + if (top == null) { return } + resolveScrollToPos(cm); + cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top; +} + +// Make sure that at the end of the operation the current cursor is +// shown. +function ensureCursorVisible(cm) { + resolveScrollToPos(cm); + var cur = cm.getCursor(), from = cur, to = cur; + if (!cm.options.lineWrapping) { + from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur; + to = Pos(cur.line, cur.ch + 1); } + cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin}; +} - if (wheelSamples < 20) { - if (display.wheelStartX == null) { - display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop; - display.wheelDX = dx; display.wheelDY = dy; - setTimeout(function () { - if (display.wheelStartX == null) { return } - var movedX = scroll.scrollLeft - display.wheelStartX; - var movedY = scroll.scrollTop - display.wheelStartY; - var sample = (movedY && display.wheelDY && movedY / display.wheelDY) || - (movedX && display.wheelDX && movedX / display.wheelDX); - display.wheelStartX = display.wheelStartY = null; - if (!sample) { return } - wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1); - ++wheelSamples; - }, 200); - } else { - display.wheelDX += dx; display.wheelDY += dy; - } +function scrollToCoords(cm, x, y) { + if (x != null || y != null) { resolveScrollToPos(cm); } + if (x != null) { cm.curOp.scrollLeft = x; } + if (y != null) { cm.curOp.scrollTop = y; } +} + +function scrollToRange(cm, range$$1) { + resolveScrollToPos(cm); + cm.curOp.scrollToPos = range$$1; +} + +// When an operation has its scrollToPos property set, and another +// scroll action is applied before the end of the operation, this +// 'simulates' scrolling that position into view in a cheap way, so +// that the effect of intermediate scroll commands is not ignored. +function resolveScrollToPos(cm) { + var range$$1 = cm.curOp.scrollToPos; + if (range$$1) { + cm.curOp.scrollToPos = null; + var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to); + scrollToCoordsRange(cm, from, to, range$$1.margin); } } +function scrollToCoordsRange(cm, from, to, margin) { + var sPos = calculateScrollPos(cm, { + left: Math.min(from.left, to.left), + top: Math.min(from.top, to.top) - margin, + right: Math.max(from.right, to.right), + bottom: Math.max(from.bottom, to.bottom) + margin + }); + scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop); +} + +// Sync the scrollable area and scrollbars, ensure the viewport +// covers the visible area. +function updateScrollTop(cm, val) { + if (Math.abs(cm.doc.scrollTop - val) < 2) { return } + if (!gecko) { updateDisplaySimple(cm, {top: val}); } + setScrollTop(cm, val, true); + if (gecko) { updateDisplaySimple(cm); } + startWorker(cm, 100); +} + +function setScrollTop(cm, val, forceScroll) { + val = Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val); + if (cm.display.scroller.scrollTop == val && !forceScroll) { return } + cm.doc.scrollTop = val; + cm.display.scrollbars.setScrollTop(val); + if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; } +} + +// Sync scroller and scrollbar, ensure the gutter elements are +// aligned. +function setScrollLeft(cm, val, isScroller, forceScroll) { + val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth); + if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return } + cm.doc.scrollLeft = val; + alignHorizontally(cm); + if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; } + cm.display.scrollbars.setScrollLeft(val); +} + // SCROLLBARS // Prepare DOM reads needed to update the scrollbars. Done in one @@ -3558,139 +3594,12 @@ function initScrollbars(cm) { node.setAttribute("cm-not-content", "true"); }, function (pos, axis) { if (axis == "horizontal") { setScrollLeft(cm, pos); } - else { setScrollTop(cm, pos); } + else { updateScrollTop(cm, pos); } }, cm); if (cm.display.scrollbars.addClass) { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); } } -// SCROLLING THINGS INTO VIEW - -// If an editor sits on the top or bottom of the window, partially -// scrolled out of view, this ensures that the cursor is visible. -function maybeScrollWindow(cm, rect) { - if (signalDOMEvent(cm, "scrollCursorIntoView")) { return } - - var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null; - if (rect.top + box.top < 0) { doScroll = true; } - else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { doScroll = false; } - if (doScroll != null && !phantom) { - var scrollNode = elt("div", "\u200b", null, ("position: absolute;\n top: " + (rect.top - display.viewOffset - paddingTop(cm.display)) + "px;\n height: " + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + "px;\n left: " + (rect.left) + "px; width: " + (Math.max(2, rect.right - rect.left)) + "px;")); - cm.display.lineSpace.appendChild(scrollNode); - scrollNode.scrollIntoView(doScroll); - cm.display.lineSpace.removeChild(scrollNode); - } -} - -// Scroll a given position into view (immediately), verifying that -// it actually became visible (as line heights are accurately -// measured, the position of something may 'drift' during drawing). -function scrollPosIntoView(cm, pos, end, margin) { - if (margin == null) { margin = 0; } - var rect; - for (var limit = 0; limit < 5; limit++) { - var changed = false; - var coords = cursorCoords(cm, pos); - var endCoords = !end || end == pos ? coords : cursorCoords(cm, end); - rect = {left: Math.min(coords.left, endCoords.left), - top: Math.min(coords.top, endCoords.top) - margin, - right: Math.max(coords.left, endCoords.left), - bottom: Math.max(coords.bottom, endCoords.bottom) + margin}; - var scrollPos = calculateScrollPos(cm, rect); - var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft; - if (scrollPos.scrollTop != null) { - setScrollTop(cm, scrollPos.scrollTop); - if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; } - } - if (scrollPos.scrollLeft != null) { - setScrollLeft(cm, scrollPos.scrollLeft); - if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; } - } - if (!changed) { break } - } - return rect -} - -// Scroll a given set of coordinates into view (immediately). -function scrollIntoView(cm, rect) { - var scrollPos = calculateScrollPos(cm, rect); - if (scrollPos.scrollTop != null) { setScrollTop(cm, scrollPos.scrollTop); } - if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); } -} - -// Calculate a new scroll position needed to scroll the given -// rectangle into view. Returns an object with scrollTop and -// scrollLeft properties. When these are undefined, the -// vertical/horizontal position does not need to be adjusted. -function calculateScrollPos(cm, rect) { - var display = cm.display, snapMargin = textHeight(cm.display); - if (rect.top < 0) { rect.top = 0; } - var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop; - var screen = displayHeight(cm), result = {}; - if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; } - var docBottom = cm.doc.height + paddingVert(display); - var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin; - if (rect.top < screentop) { - result.scrollTop = atTop ? 0 : rect.top; - } else if (rect.bottom > screentop + screen) { - var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen); - if (newTop != screentop) { result.scrollTop = newTop; } - } - - var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft; - var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0); - var tooWide = rect.right - rect.left > screenw; - if (tooWide) { rect.right = rect.left + screenw; } - if (rect.left < 10) - { result.scrollLeft = 0; } - else if (rect.left < screenleft) - { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); } - else if (rect.right > screenw + screenleft - 3) - { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; } - return result -} - -// Store a relative adjustment to the scroll position in the current -// operation (to be applied when the operation finishes). -function addToScrollPos(cm, left, top) { - if (left != null || top != null) { resolveScrollToPos(cm); } - if (left != null) - { cm.curOp.scrollLeft = (cm.curOp.scrollLeft == null ? cm.doc.scrollLeft : cm.curOp.scrollLeft) + left; } - if (top != null) - { cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top; } -} - -// Make sure that at the end of the operation the current cursor is -// shown. -function ensureCursorVisible(cm) { - resolveScrollToPos(cm); - var cur = cm.getCursor(), from = cur, to = cur; - if (!cm.options.lineWrapping) { - from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur; - to = Pos(cur.line, cur.ch + 1); - } - cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin}; -} - -// When an operation has its scrollToPos property set, and another -// scroll action is applied before the end of the operation, this -// 'simulates' scrolling that position into view in a cheap way, so -// that the effect of intermediate scroll commands is not ignored. -function resolveScrollToPos(cm) { - var range$$1 = cm.curOp.scrollToPos; - if (range$$1) { - cm.curOp.scrollToPos = null; - var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to); - var sPos = calculateScrollPos(cm, { - left: Math.min(from.left, to.left), - top: Math.min(from.top, to.top) - range$$1.margin, - right: Math.max(from.right, to.right), - bottom: Math.max(from.bottom, to.bottom) + range$$1.margin - }); - cm.scrollTo(sPos.scrollLeft, sPos.scrollTop); - } -} - // Operations are used to wrap a series of changes to the editor // state in such a way that each change won't have to update the // cursor and display (which would be awkward, slow, and @@ -3819,17 +3728,9 @@ function endOperation_finish(op) { { display.wheelStartX = display.wheelStartY = null; } // Propagate the scroll position to the actual DOM scroller - if (op.scrollTop != null && (display.scroller.scrollTop != op.scrollTop || op.forceScroll)) { - doc.scrollTop = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, op.scrollTop)); - display.scrollbars.setScrollTop(doc.scrollTop); - display.scroller.scrollTop = doc.scrollTop; - } - if (op.scrollLeft != null && (display.scroller.scrollLeft != op.scrollLeft || op.forceScroll)) { - doc.scrollLeft = Math.max(0, Math.min(display.scroller.scrollWidth - display.scroller.clientWidth, op.scrollLeft)); - display.scrollbars.setScrollLeft(doc.scrollLeft); - display.scroller.scrollLeft = doc.scrollLeft; - alignHorizontally(cm); - } + if (op.scrollTop != null) { setScrollTop(cm, op.scrollTop, op.forceScroll); } + + if (op.scrollLeft != null) { setScrollLeft(cm, op.scrollLeft, true, true); } // If we need to scroll a specific position into view, do so. if (op.scrollToPos) { var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from), @@ -4123,6 +4024,36 @@ function maybeClipScrollbars(cm) { } } +function selectionSnapshot(cm) { + if (cm.hasFocus()) { return null } + var active = activeElt(); + if (!active || !contains(cm.display.lineDiv, active)) { return null } + var result = {activeElt: active}; + if (window.getSelection) { + var sel = window.getSelection(); + if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) { + result.anchorNode = sel.anchorNode; + result.anchorOffset = sel.anchorOffset; + result.focusNode = sel.focusNode; + result.focusOffset = sel.focusOffset; + } + } + return result +} + +function restoreSelection(snapshot) { + if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) { return } + snapshot.activeElt.focus(); + if (snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) { + var sel = window.getSelection(), range$$1 = document.createRange(); + range$$1.setEnd(snapshot.anchorNode, snapshot.anchorOffset); + range$$1.collapse(false); + sel.removeAllRanges(); + sel.addRange(range$$1); + sel.extend(snapshot.focusNode, snapshot.focusOffset); + } +} + // Does the actual updating of the line display. Bails out // (returning false) when there is nothing to be done and forced is // false. @@ -4172,14 +4103,14 @@ function updateDisplayIfNeeded(cm, update) { // For big changes, we hide the enclosing element during the // update, since that speeds up the operations on most browsers. - var focused = activeElt(); + var selSnapshot = selectionSnapshot(cm); if (toUpdate > 4) { display.lineDiv.style.display = "none"; } patchDisplay(cm, display.updateLineNumbers, update.dims); if (toUpdate > 4) { display.lineDiv.style.display = ""; } display.renderedView = display.view; // There might have been a widget with a focused element that got // hidden or updated, if so re-focus it. - if (focused && activeElt() != focused && focused.offsetHeight) { focused.focus(); } + restoreSelection(selSnapshot); // Prevent selection and cursors from interfering with the scroll // width and height. @@ -4327,6 +4258,117 @@ function setGuttersForLineNumbers(options) { } } +// Since the delta values reported on mouse wheel events are +// unstandardized between browsers and even browser versions, and +// generally horribly unpredictable, this code starts by measuring +// the scroll effect that the first few mouse wheel events have, +// and, from that, detects the way it can convert deltas to pixel +// offsets afterwards. +// +// The reason we want to know the amount a wheel event will scroll +// is that it gives us a chance to update the display before the +// actual scrolling happens, reducing flickering. + +var wheelSamples = 0; +var wheelPixelsPerUnit = null; +// Fill in a browser-detected starting value on browsers where we +// know one. These don't have to be accurate -- the result of them +// being wrong would just be a slight flicker on the first wheel +// scroll (if it is large enough). +if (ie) { wheelPixelsPerUnit = -.53; } +else if (gecko) { wheelPixelsPerUnit = 15; } +else if (chrome) { wheelPixelsPerUnit = -.7; } +else if (safari) { wheelPixelsPerUnit = -1/3; } + +function wheelEventDelta(e) { + var dx = e.wheelDeltaX, dy = e.wheelDeltaY; + if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; } + if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; } + else if (dy == null) { dy = e.wheelDelta; } + return {x: dx, y: dy} +} +function wheelEventPixels(e) { + var delta = wheelEventDelta(e); + delta.x *= wheelPixelsPerUnit; + delta.y *= wheelPixelsPerUnit; + return delta +} + +function onScrollWheel(cm, e) { + var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y; + + var display = cm.display, scroll = display.scroller; + // Quit if there's nothing to scroll here + var canScrollX = scroll.scrollWidth > scroll.clientWidth; + var canScrollY = scroll.scrollHeight > scroll.clientHeight; + if (!(dx && canScrollX || dy && canScrollY)) { return } + + // Webkit browsers on OS X abort momentum scrolls when the target + // of the scroll event is removed from the scrollable element. + // This hack (see related code in patchDisplay) makes sure the + // element is kept around. + if (dy && mac && webkit) { + outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) { + for (var i = 0; i < view.length; i++) { + if (view[i].node == cur) { + cm.display.currentWheelTarget = cur; + break outer + } + } + } + } + + // On some browsers, horizontal scrolling will cause redraws to + // happen before the gutter has been realigned, causing it to + // wriggle around in a most unseemly way. When we have an + // estimated pixels/delta value, we just handle horizontal + // scrolling entirely here. It'll be slightly off from native, but + // better than glitching out. + if (dx && !gecko && !presto && wheelPixelsPerUnit != null) { + if (dy && canScrollY) + { updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * wheelPixelsPerUnit)); } + setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * wheelPixelsPerUnit)); + // Only prevent default scrolling if vertical scrolling is + // actually possible. Otherwise, it causes vertical scroll + // jitter on OSX trackpads when deltaX is small and deltaY + // is large (issue #3579) + if (!dy || (dy && canScrollY)) + { e_preventDefault(e); } + display.wheelStartX = null; // Abort measurement, if in progress + return + } + + // 'Project' the visible viewport to cover the area that is being + // scrolled into view (if we know enough to estimate it). + if (dy && wheelPixelsPerUnit != null) { + var pixels = dy * wheelPixelsPerUnit; + var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight; + if (pixels < 0) { top = Math.max(0, top + pixels - 50); } + else { bot = Math.min(cm.doc.height, bot + pixels + 50); } + updateDisplaySimple(cm, {top: top, bottom: bot}); + } + + if (wheelSamples < 20) { + if (display.wheelStartX == null) { + display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop; + display.wheelDX = dx; display.wheelDY = dy; + setTimeout(function () { + if (display.wheelStartX == null) { return } + var movedX = scroll.scrollLeft - display.wheelStartX; + var movedY = scroll.scrollTop - display.wheelStartY; + var sample = (movedY && display.wheelDY && movedY / display.wheelDY) || + (movedX && display.wheelDX && movedX / display.wheelDX); + display.wheelStartX = display.wheelStartY = null; + if (!sample) { return } + wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1); + ++wheelSamples; + }, 200); + } else { + display.wheelDX += dx; display.wheelDY += dy; + } + } +} + // Selection objects are immutable. A new one is created every time // the selection changes. A selection is one or more non-overlapping // (and non-touching) ranges, sorted, and an integer that indicates @@ -4923,7 +4965,7 @@ function setSelectionInner(doc, sel) { // Verify that the selection does not partially select any atomic // marked ranges. function reCheckSelection(doc) { - setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false), sel_dontScroll); + setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false)); } // Return a selection that does not partially select any atomic @@ -5551,7 +5593,7 @@ eventMixin(LineWidget); function adjustScrollWhenAboveVisible(cm, line, diff) { if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop)) - { addToScrollPos(cm, null, diff); } + { addToScrollTop(cm, diff); } } function addLineWidget(doc, handle, node, options) { @@ -5566,7 +5608,7 @@ function addLineWidget(doc, handle, node, options) { if (cm && !lineIsHidden(doc, line)) { var aboveVisible = heightAtLine(line) < doc.scrollTop; updateLineHeight(line, line.height + widgetHeight(widget)); - if (aboveVisible) { addToScrollPos(cm, null, widget.height); } + if (aboveVisible) { addToScrollTop(cm, widget.height); } cm.curOp.forceUpdate = true; } return true @@ -5914,7 +5956,7 @@ Doc.prototype = createObj(BranchChunk.prototype, { var top = Pos(this.first, 0), last = this.first + this.size - 1; makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length), text: this.splitLines(code), origin: "setValue", full: true}, true); - if (this.cm) { this.cm.scrollTo(0, 0); } + if (this.cm) { scrollToCoords(this.cm, 0, 0); } setSelection(this, simpleSelection(top), sel_dontScroll); }), replaceRange: function(code, from, to, origin) { @@ -7559,7 +7601,7 @@ function registerEventHandlers(cm) { // area, ensure viewport is updated when scrolling. on(d.scroller, "scroll", function () { if (d.scroller.clientHeight) { - setScrollTop(cm, d.scroller.scrollTop); + updateScrollTop(cm, d.scroller.scrollTop); setScrollLeft(cm, d.scroller.scrollLeft, true); signal(cm, "scroll", cm); } @@ -8092,7 +8134,7 @@ var addEditorMethods = function(CodeMirror) { goals.push(headPos.left); var pos = findPosV(this$1, headPos, dir, unit); if (unit == "page" && range$$1 == doc.sel.primary()) - { addToScrollPos(this$1, null, charCoords(this$1, pos, "div").top - headPos.top); } + { addToScrollTop(this$1, charCoords(this$1, pos, "div").top - headPos.top); } return pos }, sel_move); if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++) @@ -8129,11 +8171,7 @@ var addEditorMethods = function(CodeMirror) { hasFocus: function() { return this.display.input.getField() == activeElt() }, isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) }, - scrollTo: methodOp(function(x, y) { - if (x != null || y != null) { resolveScrollToPos(this); } - if (x != null) { this.curOp.scrollLeft = x; } - if (y != null) { this.curOp.scrollTop = y; } - }), + scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }), getScrollInfo: function() { var scroller = this.display.scroller; return {left: scroller.scrollLeft, top: scroller.scrollTop, @@ -8155,16 +8193,9 @@ var addEditorMethods = function(CodeMirror) { range$$1.margin = margin || 0; if (range$$1.from.line != null) { - resolveScrollToPos(this); - this.curOp.scrollToPos = range$$1; + scrollToRange(this, range$$1); } else { - var sPos = calculateScrollPos(this, { - left: Math.min(range$$1.from.left, range$$1.to.left), - top: Math.min(range$$1.from.top, range$$1.to.top) - range$$1.margin, - right: Math.max(range$$1.from.right, range$$1.to.right), - bottom: Math.max(range$$1.from.bottom, range$$1.to.bottom) + range$$1.margin - }); - this.scrollTo(sPos.scrollLeft, sPos.scrollTop); + scrollToCoordsRange(this, range$$1.from, range$$1.to, range$$1.margin); } }), @@ -8192,7 +8223,7 @@ var addEditorMethods = function(CodeMirror) { regChange(this); this.curOp.forceUpdate = true; clearCaches(this); - this.scrollTo(this.doc.scrollLeft, this.doc.scrollTop); + scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop); updateGutterSpace(this); if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5) { estimateLineHeights(this); } @@ -8205,7 +8236,7 @@ var addEditorMethods = function(CodeMirror) { attachDoc(this, doc); clearCaches(this); this.display.input.reset(); - this.scrollTo(doc.scrollLeft, doc.scrollTop); + scrollToCoords(this, doc.scrollLeft, doc.scrollTop); this.curOp.forceScroll = true; signalLater(this, "swapDoc", this, old); return old @@ -8960,7 +8991,7 @@ TextareaInput.prototype.showSelection = function (drawn) { // Reset the input to correspond to the selection (or to be empty, // when not typing and nothing is selected) TextareaInput.prototype.reset = function (typing) { - if (this.contextMenuPending) { return } + if (this.contextMenuPending || this.composing) { return } var minimal, selected, cm = this.cm, doc = cm.doc; if (cm.somethingSelected()) { this.prevInput = ""; @@ -9325,7 +9356,7 @@ CodeMirror$1.fromTextArea = fromTextArea; addLegacyProps(CodeMirror$1); -CodeMirror$1.version = "5.25.2"; +CodeMirror$1.version = "5.26.0"; return CodeMirror$1; diff --git a/media/vendor/codemirror/lib/codemirror.min.js b/media/vendor/codemirror/lib/codemirror.min.js index c06c9cca49da1..1b28a4c9cc6e0 100644 --- a/media/vendor/codemirror/lib/codemirror.min.js +++ b/media/vendor/codemirror/lib/codemirror.min.js @@ -1 +1,6 @@ -!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 r(e,r){return t(e).appendChild(r)}function n(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}function h(e,t){for(var r=0;r=t)return n+Math.min(l,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}function p(e){for(;kl.length<=e;)kl.push(g(kl)+" ");return kl[e]}function g(e){return e[e.length-1]}function v(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||Ml.test(e))}function x(e,t){return t?!!(t.source.indexOf("\\w")>-1&&w(e))||t.test(e):w(e)}function C(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function S(e){return e.charCodeAt(0)>=768&&Nl.test(e)}function L(e,t,r){for(;(r<0?t>0:t=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?E(r,M(e,r).text.length):V(t,M(e,t.line).text.length)}function V(e,t){var r=e.ch;return null==r||r>t?E(e.line,t):r<0?E(e.line,0):e}function K(e,t){for(var r=[],n=0;n=t:o.to>t);(n||(n=[])).push(new Y(l,o.from,s?null:o.to))}}return n}function Q(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&s)for(var w=0;w0)){var c=[a,1],f=F(u.from,s.from),d=F(u.to,s.to);(f<0||!l.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(d>0||!l.inclusiveRight&&!d)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}function re(e){var t=e.markedSpans;if(t){for(var r=0;r=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?F(u.to,r)>=0:F(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?F(u.from,n)<=0:F(u.from,n)<0)))return!0}}}function fe(e){for(var t;t=ae(e);)e=t.find(-1,!0).line;return e}function he(e){for(var t;t=ue(e);)e=t.find(1,!0).line;return e}function de(e){for(var t,r;t=ue(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function pe(e,t){var r=M(e,t),n=fe(r);return r==n?t:A(n)}function ge(e,t){if(t>e.lastLine())return t;var r,n=M(e,t);if(!ve(e,n))return t;for(;r=ue(n);)n=r.find(1,!0).line;return A(n)+1}function ve(e,t){var r=Wl&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function xe(e,t,r,n){if(!e)return n(t,r,"ltr");for(var i=!1,o=0;ot||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr"),i=!0)}i||n(t,r,"ltr")}function Ce(e,t,r){var n;Al=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:Al=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:Al=i)}return null!=n?n:Al}function Se(e,t){var r=e.order;return null==r&&(r=e.order=Dl(e.text,t)),r}function Le(e,t,r){var n=L(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Te(e,t,r){var n=Le(e,t.ch,r);return null==n?null:new E(t.line,n,r<0?"after":"before")}function ke(e,t,r,n,i){if(e){var o=Se(r,t.doc.direction);if(o){var l,s=i<0?g(o):o[0],a=i<0==(1==s.level)?"after":"before";if(s.level>0){var u=qt(t,r);l=i<0?r.text.length-1:0;var c=Zt(t,u,l).top;l=T(function(e){return Zt(t,u,e).top==c},i<0==(1==s.level)?s.from:s.to-1,l),"before"==a&&(l=Le(r,l,1,!0))}else l=i<0?s.to:s.from;return new E(n,l,a)}}return new E(n,i<0?r.text.length:0,i<0?"before":"after")}function Me(e,t,r,n){var i=Se(t,e.doc.direction);if(!i)return Te(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=Ce(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from=l.from&&h>=c.begin)){var d=f?"before":"after";return new E(r.line,h,d)}}var p=function(e,t,n){for(var o=function(e,t){return t?new E(r.line,a(e,1),"before"):new E(r.line,e,"after")};e>=0&&e0==(1!=l.level),u=s?n.begin:a(n.end,-1);if(l.from<=u&&u0?c.end:a(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}function Ne(e,t){return e._handlers&&e._handlers[t]||Hl}function Oe(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=h(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function We(e,t){var r=Ne(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function Pe(e){e.prototype.on=function(e,t){Pl(this,e,t)},e.prototype.off=function(e,t){Oe(this,e,t)}}function Ee(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Fe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ie(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ze(e){Ee(e),Fe(e)}function Re(e){return e.target||e.srcElement}function Be(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),ul&&e.ctrlKey&&1==t&&(t=3),t}function Ge(e){if(null==bl){var t=n("span","​");r(e,n("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(bl=t.offsetWidth<=1&&t.offsetHeight>2&&!(Zo&&Qo<8))}var i=bl?n("span","​"):n("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Ue(e){if(null!=wl)return wl;var n=r(e,document.createTextNode("AخA")),i=dl(n,0,1).getBoundingClientRect(),o=dl(n,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(wl=o.right-i.right<3)}function Ve(e){if(null!=Rl)return Rl;var t=r(e,n("span","x")),i=t.getBoundingClientRect(),o=dl(t,0,1).getBoundingClientRect();return Rl=Math.abs(i.left-o.left)>1}function Ke(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Bl[e]=t}function je(e,t){Gl[e]=t}function Xe(e){if("string"==typeof e&&Gl.hasOwnProperty(e))e=Gl[e];else if(e&&"string"==typeof e.name&&Gl.hasOwnProperty(e.name)){var t=Gl[e.name];"string"==typeof t&&(t={name:t}),(e=b(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Xe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Xe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ye(e,t){t=Xe(t);var r=Bl[t.name];if(!r)return Ye(e,"text/plain");var n=r(e,t);if(Ul.hasOwnProperty(t.name)){var i=Ul[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}function _e(e,t){c(t,Ul.hasOwnProperty(e)?Ul[e]:Ul[e]={})}function $e(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function qe(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ze(e,t,r){return!e.startState||e.startState(t,r)}function Qe(e,t,r,n){var i=[e.state.modeGen],o={};lt(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var l=0;le&&i.splice(l,1,e,i[l+1],o),l+=2,s=Math.min(e,o)}if(t)if(n.opaque)i.splice(r,l-r,e,"overlay "+t),l=r+2;else for(;re.options.maxHighlightLength?$e(e.doc.mode,n):n);t.stateAfter=n,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.frontier&&e.doc.frontier++}return t.styles}function et(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return!0;var o=st(e,t,r),l=o>n.first&&M(n,o-1).stateAfter;return l=l?$e(n.mode,l):Ze(n.mode),n.iter(o,t,function(r){tt(e,r.text,l);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 it(e,t,r,n){var i,o=function(e){return{start:f.start,end:f.pos,string:f.current(),type:i||null,state:e?$e(l.mode,c):c}},l=e.doc,s=l.mode;t=U(l,t);var a,u=M(l,t.line),c=et(e,t.line,r),f=new Vl(u.text,e.options.tabSize);for(n&&(a=[]);(n||f.pose.options.maxHighlightLength?(s=!1,l&&tt(e,t,n,f.pos),f.pos=t.length,a=null):a=ot(nt(r,f,n,h),o),h){var d=h[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;ul;--s){if(s<=o.first)return o.first;var a=M(o,s-1);if(a.stateAfter&&(!r||s<=o.frontier))return s;var u=f(a.text,null,e.options.tabSize);(null==i||n>u)&&(i=s-1,n=u)}return i}function at(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),re(e),ne(e,r);var i=n?n(e):1;i!=e.height&&W(e,i)}function ut(e){e.parent=null,re(e)}function ct(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Yl:Xl;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function ft(e,t){var r=i("span",null,null,Jo?"padding-right: .1px":null),n={pre:i("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(Zo||Jo)&&e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var l=o?t.rest[o-1]:t.line,s=void 0;n.pos=0,n.addToken=dt,Ue(e.display.measure)&&(s=Se(l,e.doc.direction))&&(n.addToken=gt(n.addToken,s)),n.map=[],mt(l,n,Je(e,l,t!=e.display.externalMeasured&&A(l))),l.styleClasses&&(l.styleClasses.bgClass&&(n.bgClass=a(l.styleClasses.bgClass,n.bgClass||"")),l.styleClasses.textClass&&(n.textClass=a(l.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Ge(e.display.measure))),0==o?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(Jo){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return We(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=a(n.pre.className,n.textClass||"")),n}function ht(e){var t=n("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function dt(e,t,r,i,o,l,s){if(t){var a,u=e.splitSpaces?pt(t,e.trailingSpace):t,c=e.cm.state.specialChars,f=!1;if(c.test(t)){a=document.createDocumentFragment();for(var h=0;;){c.lastIndex=h;var d=c.exec(t),g=d?d.index-h:t.length-h;if(g){var v=document.createTextNode(u.slice(h,h+g));Zo&&Qo<9?a.appendChild(n("span",[v])):a.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!d)break;h+=g+1;var m=void 0;if("\t"==d[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(m=a.appendChild(n("span",p(b),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==d[0]||"\n"==d[0]?((m=a.appendChild(n("span","\r"==d[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",d[0]),e.col+=1):((m=e.cm.options.specialCharPlaceholder(d[0])).setAttribute("cm-text",d[0]),Zo&&Qo<9?a.appendChild(n("span",[m])):a.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,a=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,a),Zo&&Qo<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),r||i||o||f||s){var w=r||"";i&&(w+=i),o&&(w+=o);var x=n("span",[a],w,s);return l&&(x.title=l),e.content.appendChild(x)}e.content.appendChild(a)}}function pt(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&f.from<=u);h++);if(f.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,f.to-u),i,o,null,s,a),o=null,n=n.slice(f.to-u),u=f.to}}}function vt(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function mt(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,f,h,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=f=s="",h=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&!f&&(f=C.title),C.collapsed&&(!h||le(h.marker,C)<0)&&(h=x)):x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S=d)break;for(var T=Math.min(d,m);;){if(v){var k=p+v.length;if(!h){var M=k>T?v.slice(0,T-p):v;t.addToken(t,M,l?l+a:a,c,p+M.length==m?u:"",f,s)}if(k>=T){v=v.slice(T-p),p=T;break}p=k,c=""}v=i.slice(o,o=r[g++]),l=ct(r[g++],t.cm.options)}}else for(var N=1;N2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Xt(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;nr)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Yt(e,t){var n=A(t=fe(t)),i=e.display.externalMeasured=new yt(e.doc,t,n);i.lineN=n;var o=i.built=ft(e,i);return i.text=o.pre,r(e.display.lineMeasure,o.pre),i}function _t(e,t,r,n){return Zt(e,qt(e,t),r,n)}function $t(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&tt)&&(i=(o=a-s)-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function er(e,t,r,n){var i,o=Qt(t.map,r,n),l=o.node,s=o.start,a=o.end,u=o.collapse;if(3==l.nodeType){for(var c=0;c<4;c++){for(;s&&S(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+a0&&(u=n="right");var f;i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==n?f.length-1:0]:l.getBoundingClientRect()}if(Zo&&Qo<9&&!s&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+yr(e.display),top:h.top,bottom:h.bottom}:ql}for(var d=i.top-t.rect.top,p=i.bottom-t.rect.top,g=(d+p)/2,v=t.view.measure.heights,m=0;m=n.text.length?(u=n.text.length,c="before"):u<=0&&(u=0,c="after"),!a)return l("before"==c?u-1:u,"before"==c);var f=Ce(a,u,c),h=Al,d=s(u,f,"before"==c);return null!=h&&(d.other=s(u,h,"before"!=c)),d}function fr(e,t){var r=0;t=U(e.doc,t),e.options.lineWrapping||(r=yr(e.display)*t.ch);var n=M(e.doc,t.line),i=ye(n)+Rt(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function hr(e,t,r,n,i){var o=E(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function dr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return hr(n.first,0,null,!0,-1);var i=D(n,r),o=n.first+n.size-1;if(i>o)return hr(n.first+n.size-1,M(n,o).text.length,null,!0,1);t<0&&(t=0);for(var l=M(n,i);;){var s=vr(e,l,i,t,r),a=ue(l),u=a&&a.find(0,!0);if(!a||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=A(l=u.to.line)}}function pr(e,t,r,n){var i=function(n){return sr(e,t,Zt(e,r,n),"line")},o=t.text.length,l=T(function(e){return i(e-1).bottom<=n},o,0);return o=T(function(e){return i(e).top>n},l,o),{begin:l,end:o}}function gr(e,t,r,n){return pr(e,t,r,sr(e,t,Zt(e,r,n),"line").top)}function vr(e,t,r,n,i){i-=ye(t);var o,l=0,s=t.text.length,a=qt(e,t);if(Se(t,e.doc.direction)){if(e.options.lineWrapping){var u;l=(u=pr(e,t,a,i)).begin,s=u.end}o=new E(r,l);var c,f,h=cr(e,o,"line",t,a).left,d=hMath.abs(c)){if(p<0==c<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=f}}else{var g=T(function(r){var o=sr(e,t,Zt(e,a,r),"line");return o.top>i?(s=Math.min(r,s),!0):!(o.bottom<=i)&&(o.left>n||!(o.rightv.right?1:0,o}function mr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==jl){jl=n("pre");for(var i=0;i<49;++i)jl.appendChild(document.createTextNode("x")),jl.appendChild(n("br"));jl.appendChild(document.createTextNode("x"))}r(e.measure,jl);var o=jl.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function yr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=n("span","xxxxxxxxxx"),i=n("pre",[t]);r(e.measure,i);var o=t.getBoundingClientRect(),l=(o.right-o.left)/10;return l>2&&(e.cachedCharWidth=l),l||10}function br(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l)r[e.options.gutters[l]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[l]]=o.clientWidth;return{fixedPos:wr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function wr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function xr(e){var t=mr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/yr(e.display)-3);return function(i){if(ve(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n=e.display.viewTo||s.to().line3&&(i(d,g.top,null,g.bottom),d=c,g.bottoma.bottom||u.bottom==a.bottom&&u.right>a.right)&&(a=u),d0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Wr(e){e.state.focused||(e.display.input.focus(),Dr(e))}function Ar(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Hr(e))},100)}function Dr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(We(e,"focus",e,t),e.state.focused=!0,s(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()),Or(e))}function Hr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(We(e,"blur",e,t),e.state.focused=!1,vl(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Pr(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=wr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l.001||a<-.001)&&(W(i.line,o),Ir(i.line),i.rest))for(var u=0;u=l&&(o=D(t,ye(M(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function Rr(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,Yo||Tn(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),Yo&&Tn(e),wn(e,100))}function Br(e,t,r){(r?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,Pr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Gr(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function Ur(e){var t=Gr(e);return t.x*=Ql,t.y*=Ql,t}function Vr(e,t){var r=Gr(t),n=r.x,i=r.y,o=e.display,l=o.scroller,s=l.scrollWidth>l.clientWidth,a=l.scrollHeight>l.clientHeight;if(n&&s||i&&a){if(i&&ul&&Jo)e:for(var u=t.target,c=o.view;u!=l;u=u.parentNode)for(var f=0;f(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!ol){var l=n("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Rt(e.display))+"px;\n height: "+(t.bottom-t.top+Ut(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(o),e.display.lineSpace.removeChild(l)}}}function $r(e,t,r,n){null==n&&(n=0);for(var i,o=0;o<5;o++){var l=!1,s=cr(e,t),a=r&&r!=t?cr(e,r):s,u=Zr(e,i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n}),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(Rr(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(Br(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(l=!0)),!l)break}return i}function qr(e,t){var r=Zr(e,t);null!=r.scrollTop&&Rr(e,r.scrollTop),null!=r.scrollLeft&&Br(e,r.scrollLeft)}function Zr(e,t){var r=e.display,n=mr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Kt(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Bt(r),a=t.tops-n;if(t.topi+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,h=Vt(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),d=t.right-t.left>h;return d&&(t.right=t.left+h),t.left<10?l.scrollLeft=0:t.lefth+f-3&&(l.scrollLeft=t.right+(d?0:10)-h),l}function Qr(e,t,r){null==t&&null==r||en(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=r&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+r)}function Jr(e){en(e);var t=e.getCursor(),r=t,n=t;e.options.lineWrapping||(r=t.ch?E(t.line,t.ch-1):t,n=E(t.line,t.ch+1)),e.curOp.scrollToPos={from:r,to:n,margin:e.options.cursorScrollMargin}}function en(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=fr(e,t.from),n=fr(e,t.to),i=Zr(e,{left:Math.min(r.left,n.left),top:Math.min(r.top,n.top)-t.margin,right:Math.max(r.right,n.right),bottom:Math.max(r.bottom,n.bottom)+t.margin});e.scrollTo(i.scrollLeft,i.scrollTop)}}function tn(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:++rs},wt(e.curOp)}function rn(e){Ct(e.curOp,function(e){for(var t=0;t=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ns(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ln(e){e.updatedDisplay=e.mustUpdate&&Sn(e.cm,e.update)}function sn(e){var t=e.cm,r=t.display;e.updatedDisplay&&Fr(t),e.barMeasure=Kr(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=_t(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Ut(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Vt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection(e.focus))}function an(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)Wl&&pe(e.doc,t)i.viewFrom?vn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)vn(e);else if(t<=i.viewFrom){var o=mn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):vn(e)}else if(r>=i.viewTo){var l=mn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):vn(e)}else{var s=mn(e,t,t,-1),a=mn(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(bt(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):vn(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t=n.viewTo)){var o=n.view[Lr(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==h(l,r)&&l.push(r)}}}function vn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function mn(e,t,r,n){var i,o=Lr(e,t),l=e.display.view;if(!Wl||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;pe(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function yn(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=bt(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=bt(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,Lr(e,r)))),n.viewTo=r}function bn(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo)){var r=+new Date+e.options.workTime,n=$e(t.mode,et(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 l=o.styles,s=o.text.length>e.options.maxHighlightLength,a=Qe(e,o,s?$e(t.mode,n):n,!0);o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),h=0;!f&&hr)return wn(e,e.options.workDelay),!0}),i.length&&cn(e,function(){for(var t=0;t=n.viewFrom&&r.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==bn(e))return!1;Er(e)&&(vn(e),r.dims=br(e));var o=i.first+i.size,s=Math.max(r.visible.from-e.options.viewportMargin,i.first),a=Math.min(o,r.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(o,n.viewTo)),Wl&&(s=pe(e.doc,s),a=ge(e.doc,a));var u=s!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=r.wrapperHeight||n.lastWrapWidth!=r.wrapperWidth;yn(e,s,a),n.viewOffset=ye(M(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=bn(e);if(!u&&0==c&&!r.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var f=l();return c>4&&(n.lineDiv.style.display="none"),kn(e,n.updateLineNumbers,r.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,f&&l()!=f&&f.offsetHeight&&f.focus(),t(n.cursorDiv),t(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,u&&(n.lastWrapHeight=r.wrapperHeight,n.lastWrapWidth=r.wrapperWidth,wn(e,400)),n.updateLineNumbers=null,!0}function Ln(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Vt(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Bt(e.display)-Kt(e),r.top)}),t.visible=zr(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Sn(e,t);n=!1){Fr(e);var i=Kr(e);Tr(e),jr(e,i),Nn(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 Tn(e,t){var r=new ns(e,t);if(Sn(e,r)){Fr(e),Ln(e,r);var n=Kr(e);Tr(e),jr(e,n),Nn(e,n),r.finish()}}function kn(e,r,n){function i(t){var r=t.nextSibling;return Jo&&ul&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var o=e.display,l=e.options.lineNumbers,s=o.lineDiv,a=s.firstChild,u=o.view,c=o.viewFrom,f=0;f-1&&(p=!1),Tt(e,d,c,n)),p&&(t(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(P(e.options,c)))),a=d.node.nextSibling}else{var g=Ht(e,d,c,n);s.insertBefore(g,a)}c+=d.size}for(;a;)a=i(a)}function Mn(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Nn(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+Ut(e)+"px"}function On(e){var r=e.display.gutters,i=e.options.gutters;t(r);for(var o=0;o-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function An(e,t){var r=e[t];e.sort(function(e,t){return F(e.from(),t.from())}),t=h(e,r);for(var n=1;n=0){var l=B(o.from(),i.from()),s=R(o.to(),i.to()),a=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new os(a?s:l,a?l:s))}}return new is(e,t)}function Dn(e,t){return new is([new os(e,t||e)],0)}function Hn(e){return e.text?E(e.from.line+e.text.length-1,g(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Pn(e,t){if(F(e,t.from)<0)return e;if(F(e,t.to)<=0)return Hn(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Hn(t).ch-t.to.ch),E(r,n)}function En(e,t){for(var r=[],n=0;n1&&e.remove(s.line+1,p-1),e.insert(s.line+1,y)}St(e,"change",e,t)}function Un(e,t,r){function n(e,i,o){if(e.linked)for(var l=0;l1&&!e.done[e.done.length-2].ranges?(e.done.pop(),g(e.done)):void 0}function qn(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,s=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=$n(i,i.lastOp==n)))l=g(o.changes),0==F(t.from,t.to)&&0==F(t.from,l.to)?l.to=Hn(t):o.changes.push(Yn(e,t));else{var a=g(i.done);for(a&&a.ranges||Jn(e.sel,i.done),o={changes:[Yn(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(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||We(e,"historyAdded")}function Zn(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Qn(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Zn(e,o,g(i.done),t))?i.done[i.done.length-1]=t:Jn(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&_n(i.undone)}function Jn(e,t){var r=g(t);r&&r.ranges&&r.equals(e)||t.push(e)}function ei(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function ti(e){if(!e)return null;for(var t,r=0;r-1&&(g(s)[f]=u[f],delete u[f])}}}return n}function oi(e,t,r,n){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(n){var o=F(r,i)<0;o!=F(n,i)<0?(i=r,r=n):o!=F(r,n)<0&&(r=n)}return new os(i,r)}return new os(n||r,r)}function li(e,t,r,n){hi(e,new is([oi(e,e.sel.primary(),t,r)],0),n)}function si(e,t,r){for(var n=[],i=0;i=t.ch:s.to>t.ch))){if(i&&(We(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var u=a.find(n<0?1:-1),c=void 0;if((n<0?a.inclusiveRight:a.inclusiveLeft)&&(u=bi(e,u,-n,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=F(u,r))&&(n<0?c<0:c>0))return mi(e,u,t,n,i)}var f=a.find(n<0?-1:1);return(n<0?a.inclusiveLeft:a.inclusiveRight)&&(f=bi(e,f,n,f.line==t.line?o:null)),f?mi(e,f,t,n,i):null}}return t}function yi(e,t,r,n,i){var o=n||1,l=mi(e,t,r,o,i)||!i&&mi(e,t,r,o,!0)||mi(e,t,r,-o,i)||!i&&mi(e,t,r,-o,!0);return l||(e.cantEdit=!0,E(e.first,0))}function bi(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?U(e,E(t.line-1)):null:r>0&&t.ch==(n||M(e,t.line)).text.length?t.line=0;--i)Si(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text});else Si(e,t)}}function Si(e,t){if(1!=t.text.length||""!=t.text[0]||0!=F(t.from,t.to)){var r=En(e,t);qn(e,t,r,e.cm?e.cm.curOp.id:NaN),ki(e,t,r,J(e,t));var n=[];Un(e,function(e,r){r||-1!=h(n,e.history)||(Ai(e.history,t),n.push(e.history)),ki(e,t,null,J(e,t))})}}function Li(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,a=0;a=0;--f){var d=function(r){var i=n.changes[r];if(i.origin=t,c&&!xi(e,i,!1))return l.length=0,{};u.push(Yn(e,i));var o=r?En(e,i):g(l);ki(e,i,o,ni(e,i)),!r&&e.cm&&e.cm.scrollIntoView({from:i.from,to:Hn(i)});var s=[];Un(e,function(e,t){t||-1!=h(s,e.history)||(Ai(e.history,i),s.push(e.history)),ki(e,i,null,ni(e,i))})}(f);if(d)return d.v}}}}function Ti(e,t){if(0!=t&&(e.first+=t,e.sel=new is(v(e.sel.ranges,function(e){return new os(E(e.anchor.line+t,e.anchor.ch),E(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){pn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.lineo&&(t={from:t.from,to:E(o,M(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=N(e,t.from,t.to),r||(r=En(e,t)),e.cm?Mi(e.cm,t,n):Gn(e,t,n),di(e,r,Sl)}}function Mi(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=A(fe(M(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&De(e),Gn(n,t,r,xr(e)),e.options.lineWrapping||(n.iter(a,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)),n.frontier=Math.min(n.frontier,o.line),wn(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?pn(e):o.line!=l.line||1!=t.text.length||Bn(e.doc,t)?pn(e,o.line,l.line+1,u):gn(e,o.line,"text");var c=He(e,"changes"),f=He(e,"change");if(f||c){var h={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};f&&St(e,"change",e,h),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Ni(e,t,r,n,i){if(n||(n=r),F(n,r)<0){var o=n;n=r,r=o}"string"==typeof t&&(t=e.splitLines(t)),Ci(e,{from:r,to:n,text:t,origin:i})}function Oi(e,t,r,n){r0||0==s&&!1!==l.clearWhenEmpty)return l;if(l.replacedWith&&(l.collapsed=!0,l.widgetNode=i("span",[l.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||l.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(l.widgetNode.insertLeft=!0)),l.collapsed){if(ce(e,t.line,t,r,l)||t.line!=r.line&&ce(e,r.line,t,r,l))throw new Error("Inserting collapsed marker partially overlapping an existing one");X()}l.addToHistory&&qn(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var a,u=t.line,f=e.cm;if(e.iter(u,r.line+1,function(e){f&&l.collapsed&&!f.options.lineWrapping&&fe(e)==f.display.maxLine&&(a=!0),l.collapsed&&u!=t.line&&W(e,0),q(e,new Y(l,u==t.line?t.ch:null,u==r.line?r.ch:null)),++u}),l.collapsed&&e.iter(t.line,r.line+1,function(t){ve(e,t)&&W(t,0)}),l.clearOnEnter&&Pl(l,"beforeCursorEnter",function(){return l.clear()}),l.readOnly&&(j(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),l.collapsed&&(l.id=++us,l.atomic=!0),f){if(a&&(f.curOp.updateMaxLine=!0),l.collapsed)pn(f,t.line,r.line+1);else if(l.className||l.title||l.startStyle||l.endStyle||l.css)for(var h=t.line;h<=r.line;h++)gn(f,h,"text");l.atomic&&gi(f.doc),St(f,"markerAdded",f,l)}return l}function Fi(e,t,r,n,i){(n=c(n)).shared=!1;var o=[Ei(e,t,r,n,i)],l=o[0],s=n.widgetNode;return Un(e,function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(Ei(e,U(e,t),U(e,r),n,i));for(var a=0;a-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var a=e.dataTransfer.getData("Text");if(a){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),di(t.doc,Dn(r,r)),u)for(var c=0;c=0;t--)Ni(e.doc,"",n[t].from,n[t].to,"+delete");Jr(e)})}function to(e,t){var r=M(e.doc,t),n=fe(r);return n!=r&&(t=A(n)),ke(!0,e,n,t,1)}function ro(e,t){var r=M(e.doc,t),n=he(r);return n!=r&&(t=A(n)),ke(!0,e,r,t,-1)}function no(e,t){var r=to(e,t.line),n=M(e.doc,r.line),i=Se(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),l=t.line==r.line&&t.ch<=o&&t.ch;return E(r.line,l?0:o,r.sticky)}return r}function io(e,t,r){if("string"==typeof t&&!(t=Ss[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Cl}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function oo(e,t,r){for(var n=0;ni-400&&0==F(Cs.pos,r)?n="triple":xs&&xs.time>i-400&&0==F(xs.pos,r)?(n="double",Cs={time:i,pos:r}):(n="single",xs={time:i,pos:r});var o,s=e.doc.sel,a=ul?t.metaKey:t.ctrlKey;e.options.dragDrop&&El&&!e.isReadOnly()&&"single"==n&&(o=s.contains(r))>-1&&(F((o=s.ranges[o]).from(),r)<0||r.xRel>0)&&(F(o.to(),r)>0||r.xRel<0)?vo(e,t,r,a):mo(e,t,r,n,a)}function vo(e,t,r,n){var i=e.display,o=!1,l=fn(e,function(t){Jo&&(i.scroller.draggable=!1),e.state.draggingText=!1,Oe(document,"mouseup",l),Oe(document,"mousemove",s),Oe(i.scroller,"dragstart",a),Oe(i.scroller,"drop",l),o||(Ee(t),n||li(e.doc,r),Jo||Zo&&9==Qo?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())}),s=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},a=function(){return o=!0};Jo&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=ul?t.altKey:t.ctrlKey,i.scroller.dragDrop&&i.scroller.dragDrop(),Pl(document,"mouseup",l),Pl(document,"mousemove",s),Pl(i.scroller,"dragstart",a),Pl(i.scroller,"drop",l),Ar(e),setTimeout(function(){return i.input.focus()},20)}function mo(e,t,r,n,i){function o(t){if(0!=F(b,t))if(b=t,"rect"==n){for(var i=[],o=e.options.tabSize,l=f(M(c,r.line).text,r.ch,o),s=f(M(c,t.line).text,t.ch,o),a=Math.min(l,s),u=Math.max(l,s),v=Math.min(r.line,t.line),m=Math.min(e.lastLine(),Math.max(r.line,t.line));v<=m;v++){var y=M(c,v).text,w=d(y,a,o);a==u?i.push(new os(E(v,w),E(v,w))):y.length>w&&i.push(new os(E(v,w),E(v,d(y,u,o))))}i.length||i.push(new os(r,r)),hi(c,An(g.ranges.slice(0,p).concat(i),p),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x=h,C=x.anchor,S=t;if("single"!=n){var L;F((L="double"==n?e.findWordAt(t):new os(E(t.line,0),U(c,E(t.line+1,0)))).anchor,C)>0?(S=L.head,C=B(x.from(),L.anchor)):(S=L.anchor,C=R(x.to(),L.head))}var T=g.ranges.slice(0);T[p]=new os(U(c,C),S),hi(c,An(T,p),Ll)}}function s(t){var r=++x,i=Sr(e,t,!0,"rect"==n);if(i)if(0!=F(i,b)){e.curOp.focus=l(),o(i);var a=zr(u,c);(i.line>=a.to||i.linew.bottom?20:0;f&&setTimeout(fn(e,function(){x==r&&(u.scroller.scrollTop+=f,s(t))}),50)}}function a(t){e.state.selectingText=!1,x=1/0,Ee(t),u.input.focus(),Oe(document,"mousemove",C),Oe(document,"mouseup",S),c.history.lastSelOrigin=null}var u=e.display,c=e.doc;Ee(t);var h,p,g=c.sel,v=g.ranges;if(i&&!t.shiftKey?(p=c.sel.contains(r),h=p>-1?v[p]:new os(r,r)):(h=c.sel.primary(),p=c.sel.primIndex),cl?t.shiftKey&&t.metaKey:t.altKey)n="rect",i||(h=new os(r,r)),r=Sr(e,t,!0,!0),p=-1;else if("double"==n){var m=e.findWordAt(r);h=e.display.shift||c.extend?oi(c,h,m.anchor,m.head):m}else if("triple"==n){var y=new os(E(r.line,0),U(c,E(r.line+1,0)));h=e.display.shift||c.extend?oi(c,h,y.anchor,y.head):y}else h=oi(c,h,r);i?-1==p?(p=v.length,hi(c,An(v.concat([h]),p),{scroll:!1,origin:"*mouse"})):v.length>1&&v[p].empty()&&"single"==n&&!t.shiftKey?(hi(c,An(v.slice(0,p).concat(v.slice(p+1)),0),{scroll:!1,origin:"*mouse"}),g=c.sel):ai(c,p,h,Ll):(p=0,hi(c,new is([h],0),Ll),g=c.sel);var b=r,w=u.wrapper.getBoundingClientRect(),x=0,C=fn(e,function(e){Be(e)?s(e):a(e)}),S=fn(e,a);e.state.selectingText=S,Pl(document,"mousemove",C),Pl(document,"mouseup",S)}function yo(e,t,r,n){var i,o;try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Ee(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!He(e,r))return Ie(t);o-=s.top-l.viewOffset;for(var a=0;a=i)return We(e,r,e,D(e.doc,o),e.options.gutters[a],t),Ie(t)}}function bo(e,t){return yo(e,t,"gutterClick",!0)}function wo(e,t){zt(e.display,t)||xo(e,t)||Ae(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function xo(e,t){return!!He(e,"gutterContextMenu")&&yo(e,t,"gutterContextMenu",!1)}function Co(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ir(e)}function So(e){On(e),pn(e),Pr(e)}function Lo(e,t,r){if(!t!=!(r&&r!=ks)){var n=e.display.dragFunctions,i=t?Pl:Oe;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function To(e){e.options.lineWrapping?(s(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(vl(e.display.wrapper,"CodeMirror-wrap"),we(e)),Cr(e),pn(e),ir(e),setTimeout(function(){return jr(e)},100)}function ko(e,t){var r=this;if(!(this instanceof ko))return new ko(e,t);this.options=t=t?c(t):{},c(Ms,t,!1),Wn(t);var n=t.value;"string"==typeof n&&(n=new ds(n,t.mode,null,t.lineSeparator,t.direction)),this.doc=n;var i=new ko.inputStyles[t.inputStyle](this),o=this.display=new k(e,n,i);o.wrapper.CodeMirror=this,On(this),Co(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Yr(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 yl,keySeq:null,specialChars:null},t.autofocus&&!al&&o.input.focus(),Zo&&Qo<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Mo(this),ji(),tn(this),this.curOp.forceUpdate=!0,Vn(this,n),t.autofocus&&!al||this.hasFocus()?setTimeout(u(Dr,this),20):Hr(this);for(var l in Ns)Ns.hasOwnProperty(l)&&Ns[l](r,t[l],ks);Er(this),t.finishInit&&t.finishInit(this);for(var s=0;s400}var i=e.display;Pl(i.scroller,"mousedown",fn(e,po)),Zo&&Qo<11?Pl(i.scroller,"dblclick",fn(e,function(t){if(!Ae(e,t)){var r=Sr(e,t);if(r&&!bo(e,t)&&!zt(e.display,t)){Ee(t);var n=e.findWordAt(r);li(e.doc,n.anchor,n.head)}}})):Pl(i.scroller,"dblclick",function(t){return Ae(e,t)||Ee(t)}),gl||Pl(i.scroller,"contextmenu",function(t){return wo(e,t)});var o,l={end:0};Pl(i.scroller,"touchstart",function(t){if(!Ae(e,t)&&!r(t)){i.input.ensurePolled(),clearTimeout(o);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-l.end<=300?l:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Pl(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Pl(i.scroller,"touchend",function(r){var o=i.activeTouch;if(o&&!zt(i,r)&&null!=o.left&&!o.moved&&new Date-o.start<300){var l,s=e.coordsChar(i.activeTouch,"page");l=!o.prev||n(o,o.prev)?new os(s,s):!o.prev.prev||n(o,o.prev.prev)?e.findWordAt(s):new os(E(s.line,0),U(e.doc,E(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),Ee(r)}t()}),Pl(i.scroller,"touchcancel",t),Pl(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Rr(e,i.scroller.scrollTop),Br(e,i.scroller.scrollLeft,!0),We(e,"scroll",e))}),Pl(i.scroller,"mousewheel",function(t){return Vr(e,t)}),Pl(i.scroller,"DOMMouseScroll",function(t){return Vr(e,t)}),Pl(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Ae(e,t)||ze(t)},over:function(t){Ae(e,t)||(Ui(e,t),ze(t))},start:function(t){return Gi(e,t)},drop:fn(e,Bi),leave:function(t){Ae(e,t)||Vi(e)}};var s=i.input.getField();Pl(s,"keyup",function(t){return fo.call(e,t)}),Pl(s,"keydown",fn(e,uo)),Pl(s,"keypress",fn(e,ho)),Pl(s,"focus",function(t){return Dr(e,t)}),Pl(s,"blur",function(t){return Hr(e,t)})}function No(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=et(e,t):r="prev");var l=e.options.tabSize,s=M(o,t),a=f(s.text,null,l);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==Cl||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?f(M(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",d=0;if(e.options.indentWithTabs)for(var g=Math.floor(u/l);g;--g)d+=l,h+="\t";if(d1)if(Ws&&Ws.text.join("\n")==t){if(n.ranges.length%Ws.text.length==0){a=[];for(var u=0;u=0;f--){var h=n.ranges[f],d=h.from(),p=h.to();h.empty()&&(r&&r>0?d=E(d.line,d.ch-r):e.state.overwrite&&!l?p=E(p.line,Math.min(M(o,p.line).text.length,p.ch+g(s).length)):Ws&&Ws.lineWise&&Ws.text.join("\n")==t&&(d=p=E(d.line,0))),c=e.curOp.updateInput;var m={from:d,to:p,text:a?a[f%a.length]:s,origin:i||(l?"paste":e.state.cutIncoming?"cut":"+input")};Ci(e.doc,m),St(e,"inputRead",e,m)}t&&!l&&Do(e,t),Jr(e),e.curOp.updateInput=c,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Ao(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||cn(t,function(){return Wo(t,r,0,null,"paste")}),!0}function Do(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s-1){l=No(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(M(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=No(e,i.head.line,"smart"));l&&St(e,"electricInput",e,i.head.line)}}}function Ho(e){for(var t=[],r=[],n=0;n=e.first+e.size)&&(t=new E(n,t.ch,t.sticky),u=M(e,n))}function l(n){var l;if(null==(l=i?Me(e.cm,u,t,r):Te(u,t,r))){if(n||!o())return!1;t=ke(i,e.cm,u,t.line,r)}else t=l;return!0}var s=t,a=r,u=M(e,t.line);if("char"==n)l();else if("column"==n)l(!0);else if("word"==n||"group"==n)for(var c=null,f="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(r<0)||l(!d);d=!1){var p=u.text.charAt(t.ch)||"\n",g=x(p,h)?"w":f&&"\n"==p?"n":!f||/\s/.test(p)?null:"p";if(!f||d||g||(g="s"),c&&c!=g){r<0&&(r=1,l(),t.sticky="after");break}if(g&&(c=g),r>0&&!l(!d))break}var v=yi(e,t,s,a,!0);return I(s,v)&&(v.hitSide=!0),v}function Io(e,t,r,n){var i,o=e.doc,l=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),a=Math.max(s-.5*mr(e.display),3);i=(r>0?t.bottom:t.top)+r*a}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(var u;(u=dr(e,l,i)).outside;){if(r<0?i<=0:i>=o.height){u.hitSide=!0;break}i+=5*r}return u}function zo(e,t){var r=$t(e,t.line);if(!r||r.hidden)return null;var n=M(e.doc,t.line),i=Xt(r,n,t.line),o=Se(n,e.doc.direction),l="left";o&&(l=Ce(o,t.ch)%2?"right":"left");var s=Qt(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function Ro(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Bo(e,t){return t&&(e.bad=!0),e}function Go(e,t,r,n,i){function o(e){return function(t){return t.id==e}}function l(){c&&(u+=f,c=!1)}function s(e){e&&(l(),u+=e)}function a(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return void s(r||t.textContent.replace(/\u200b/g,""));var u,h=t.getAttribute("cm-marker");if(h){var d=e.findMarks(E(n,0),E(i+1,0),o(+h));return void(d.length&&(u=d[0].find())&&s(N(e.doc,u.from,u.to).join(f)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(t.nodeName);p&&l();for(var g=0;g=15&&(rl=!1,Jo=!0);var dl,pl=ul&&(el||rl&&(null==hl||hl<12.11)),gl=Yo||Zo&&Qo>=9,vl=function(t,r){var n=t.className,i=e(r).exec(n);if(i){var o=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(o?i[1]+o:"")}};dl=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var ml=function(e){e.select()};ll?ml=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:Zo&&(ml=function(e){try{e.select()}catch(e){}});var yl=function(){this.id=null};yl.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var bl,wl,xl=30,Cl={toString:function(){return"CodeMirror.Pass"}},Sl={scroll:!1},Ll={origin:"*mouse"},Tl={origin:"+move"},kl=[""],Ml=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Nl=/[\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]/,Ol=!1,Wl=!1,Al=null,Dl=function(){function e(e){return e<=247?r.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?n.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,l=/[LRr]/,s=/[Lb1n]/,a=/[1n]/;return function(r,n){var u="ltr"==n?"L":"R";if(0==r.length||"ltr"==n&&!i.test(r))return!1;for(var c=r.length,f=[],h=0;h=this.string.length},Vl.prototype.sol=function(){return this.pos==this.lineStart},Vl.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Vl.prototype.next=function(){if(this.post},Vl.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},Vl.prototype.skipToEnd=function(){this.pos=this.string.length},Vl.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Vl.prototype.backUp=function(e){this.pos-=e},Vl.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Vl.prototype.current=function(){return this.string.slice(this.start,this.pos)},Vl.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}};var Kl=function(e,t,r){this.text=e,ne(this,t),this.height=r?r(this):1};Kl.prototype.lineNo=function(){return A(this)},Pe(Kl);var jl,Xl={},Yl={},_l=null,$l=null,ql={left:0,right:0,top:0,bottom:0},Zl=0,Ql=null;Zo?Ql=-.53:Yo?Ql=15:tl?Ql=-.7:nl&&(Ql=-1/3);var Jl=function(e,t,r){this.cm=r;var i=this.vert=n("div",[n("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=n("div",[n("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(o),Pl(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),Pl(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Zo&&Qo<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Jl.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Jl.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Jl.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Jl.prototype.zeroWidthHack=function(){var e=ul&&!il?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new yl,this.disableVert=new yl},Jl.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},Jl.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var es=function(){};es.prototype.update=function(){return{bottom:0,right:0}},es.prototype.setScrollLeft=function(){},es.prototype.setScrollTop=function(){},es.prototype.clear=function(){};var ts={native:Jl,null:es},rs=0,ns=function(e,t,r){var n=e.display;this.viewport=t,this.visible=zr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Vt(e),this.force=r,this.dims=br(e),this.events=[]};ns.prototype.signal=function(e,t){He(e,t)&&this.events.push(arguments)},ns.prototype.finish=function(){for(var e=this,t=0;t=0&&F(e,i.to())<=0)return n}return-1};var os=function(e,t){this.anchor=e,this.head=t};os.prototype.from=function(){return B(this.anchor,this.head)},os.prototype.to=function(){return R(this.anchor,this.head)},os.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};var ls=function(e){var t=this;this.lines=e,this.parent=null;for(var r=0,n=0;n1||!(this.children[0]instanceof ls))){var a=[];this.collapse(a),this.children=[new ls(a)],this.children[0].parent=this}},ss.prototype.collapse=function(e){for(var t=this,r=0;r50){for(var s=o.lines.length%25+25,a=s;a10);e.parent.maybeSpill()}},ss.prototype.iterN=function(e,t,r){for(var n=this,i=0;it.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=f,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&pn(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&gi(t.doc)),t&&St(t,"markerCleared",t,this,i,o),r&&rn(t),this.parent&&this.parent.clear()}},cs.prototype.find=function(e,t){var r=this;null==e&&"bookmark"==this.type&&(e=1);for(var n,i,o=0;o=0;u--)Ci(n,i[u]);a?fi(this,a):this.cm&&Jr(this.cm)}),undo:dn(function(){Li(this,"undo")}),redo:dn(function(){Li(this,"redo")}),undoSelection:dn(function(){Li(this,"undo",!0)}),redoSelection:dn(function(){Li(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=U(this,e),t=U(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=o,++r}),U(this,E(r,t))},indexFromPos:function(e){var t=(e=U(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to0)i=new E(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),E(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=M(e.doc,i.line-1).text;l&&(i=new E(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),E(i.line-1,l.length-1),i,"+transpose"))}r.push(new os(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return cn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n=t.display.viewTo||i.line=t.display.viewFrom&&zo(t,n)||{node:s[0].measure.map[2],offset:0},u=i.linee.firstLine()&&(n=E(n.line-1,M(e.doc,n.line-1).length)),i.ch==M(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var o,l,s;n.line==t.viewFrom||0==(o=Lr(e,n.line))?(l=A(t.view[0].line),s=t.view[0].node):(l=A(t.view[o].line),s=t.view[o-1].node.nextSibling);var a,u,c=Lr(e,i.line);if(c==t.view.length-1?(a=t.viewTo-1,u=t.lineDiv.lastChild):(a=A(t.view[c+1].line)-1,u=t.view[c+1].node.previousSibling),!s)return!1;for(var f=e.doc.splitLines(Go(e,s,u,l,a)),h=N(e.doc,E(l,0),E(a,M(e.doc,a).text.length));f.length>1&&h.length>1;)if(g(f)==g(h))f.pop(),h.pop(),a--;else{if(f[0]!=h[0])break;f.shift(),h.shift(),l++}for(var d=0,p=0,v=f[0],m=h[0],y=Math.min(v.length,m.length);dn.ch&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.length-p-1);)d--,p++;f[f.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var C=E(l,d),S=E(a,h.length?g(h).length-p:0);return f.length>1||f[0]||F(C,S)?(Ni(e.doc,f,C,S,"+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.updateFromDOM(),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.updateFromDOM()},80))},As.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||cn(this.cm,function(){return pn(e.cm)})},As.prototype.setUneditable=function(e){e.contentEditable="false"},As.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||fn(this.cm,Wo)(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 Ds=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new yl,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null};Ds.prototype.init=function(e){function t(e){if(!Ae(i,e)){if(i.somethingSelected())Oo({lineWise:!1,text:i.getSelections()}),n.inaccurateSelection&&(n.prevInput="",n.inaccurateSelection=!1,l.value=Ws.text.join("\n"),ml(l));else{if(!i.options.lineWiseCopyCut)return;var t=Ho(i);Oo({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Sl):(n.prevInput="",l.value=t.text.join("\n"),ml(l))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var r=this,n=this,i=this.cm,o=this.wrapper=Eo(),l=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),ll&&(l.style.width="0px"),Pl(l,"input",function(){Zo&&Qo>=9&&r.hasSelection&&(r.hasSelection=null),n.poll()}),Pl(l,"paste",function(e){Ae(i,e)||Ao(e,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),Pl(l,"cut",t),Pl(l,"copy",t),Pl(e.scroller,"paste",function(t){zt(e,t)||Ae(i,t)||(i.state.pasteIncoming=!0,n.focus())}),Pl(e.lineSpace,"selectstart",function(t){zt(e,t)||Ee(t)}),Pl(l,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Pl(l,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Ds.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=kr(e);if(e.options.moveInputWithCursor){var i=cr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},Ds.prototype.showSelection=function(e){var t=this.cm.display;r(t.cursorDiv,e.cursors),r(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ds.prototype.reset=function(e){if(!this.contextMenuPending){var t,r,n=this.cm,i=n.doc;if(n.somethingSelected()){this.prevInput="";var o=i.sel.primary(),l=(t=zl&&(o.to().line-o.from().line>100||(r=n.getSelection()).length>1e3))?"-":r||n.getSelection();this.textarea.value=l,n.state.focused&&ml(this.textarea),Zo&&Qo>=9&&(this.hasSelection=l)}else e||(this.prevInput=this.textarea.value="",Zo&&Qo>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},Ds.prototype.getField=function(){return this.textarea},Ds.prototype.supportsTouch=function(){return!1},Ds.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!al||l()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ds.prototype.blur=function(){this.textarea.blur()},Ds.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ds.prototype.receivedFocus=function(){this.slowPoll()},Ds.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ds.prototype.fastPoll=function(){function e(){r.poll()||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},Ds.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Il(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(Zo&&Qo>=9&&this.hasSelection===i||ul&&/[\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||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,s=Math.min(n.length,i.length);l1e3||i.indexOf("\n")>-1?r.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},Ds.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ds.prototype.onKeyPress=function(){Zo&&Qo>=9&&(this.hasSelection=null),this.fastPoll()},Ds.prototype.onContextMenu=function(e){function t(){if(null!=l.selectionStart){var e=i.somethingSelected(),t="​"+(e?l.value:"");l.value="⇚",l.value=t,n.prevInput=e?"":"​",l.selectionStart=1,l.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=c,l.style.cssText=u,Zo&&Qo<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=a),null!=l.selectionStart){(!Zo||Zo&&Qo<9)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==l.selectionStart&&l.selectionEnd>0&&"​"==n.prevInput?fn(i,wi)(i):e++<10?o.detectingSelectAll=setTimeout(r,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,l=n.textarea,s=Sr(i,e),a=o.scroller.scrollTop;if(s&&!rl){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(s)&&fn(i,hi)(i.doc,Dn(s),Sl);var u=l.style.cssText,c=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var f=n.wrapper.getBoundingClientRect();l.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: "+(Zo?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var h;if(Jo&&(h=window.scrollY),o.input.focus(),Jo&&window.scrollTo(null,h),o.input.reset(),i.somethingSelected()||(l.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),Zo&&Qo>=9&&t(),gl){ze(e);var d=function(){Oe(window,"mouseup",d),setTimeout(r,20)};Pl(window,"mouseup",d)}else setTimeout(r,50)}},Ds.prototype.readOnlyChanged=function(e){e||this.reset()},Ds.prototype.setUneditable=function(){},Ds.prototype.needsContentAttribute=!1,function(e){function t(t,n,i,o){e.defaults[t]=n,i&&(r[t]=o?function(e,t,r){r!=ks&&i(e,t,r)}:i)}var r=e.optionHandlers;e.defineOption=t,e.Init=ks,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,zn(e)},!0),t("indentUnit",2,zn,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Rn(e),ir(e),pn(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(E(n,o))}n++});for(var i=r.length-1;i>=0;i--)Ni(e.doc,t,r[i],E(r[i].line,r[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=ks&&e.refresh()}),t("specialCharPlaceholder",ht,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",al?"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",!fl),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){Co(e),So(e)},!0),t("keyMap","default",function(e,t,r){var n=Ji(t),i=r!=ks&&Ji(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),t("extraKeys",null),t("lineWrapping",!1,To,!0),t("gutters",[],function(e){Wn(e.options),So(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?wr(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return jr(e)},!0),t("scrollbarStyle","native",function(e){Yr(e),jr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Wn(e.options),So(e)},!0),t("firstLineNumber",1,So,!0),t("lineNumberFormatter",function(e){return e},So,!0),t("showCursorWhenSelecting",!1,Tr,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("readOnly",!1,function(e,t){"nocursor"==t?(Hr(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,Lo),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Tr,!0),t("singleCursorHeightPerLine",!0,Tr,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Rn,!0),t("addModeClass",!1,Rn,!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,Rn,!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),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(ko),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&fn(this,t[e])(this,r,i),We(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Ji(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;rn&&(No(t,o.head.line,e,!0),n=o.head.line,i==t.doc.sel.primIndex&&Jr(t));else{var l=o.from(),s=o.to(),a=Math.max(n,l.line);n=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var u=a;u0&&ai(t.doc,i,new os(l,c[i].to()),Sl)}}}),getTokenAt:function(e,t){return it(this,e,t)},getLineTokens:function(e,t){return it(this,E(e),t,!0)},getTokenTypeAt:function(e){e=U(this.doc,e);var t,r=Je(this,M(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]o&&(e=o,i=!0),n=M(this.doc,e)}else n=e;return sr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-ye(n):0)},defaultTextHeight:function(){return mr(this.display)},defaultCharWidth:function(){return yr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display,l=(e=cr(this,U(this.doc,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"==n)l=e.top;else if("above"==n||"near"==n){var a=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>a)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=a&&(l=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=l+"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"),r&&qr(this,{left:s,top:l,right:s+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:hn(uo),triggerOnKeyPress:hn(ho),triggerOnKeyUp:fo,execCommand:function(e){if(Ss.hasOwnProperty(e))return Ss[e].call(null,this)},triggerElectric:hn(function(e){Do(this,e)}),findPosH:function(e,t,r,n){var i=this,o=1;t<0&&(o=-1,t=-t);for(var l=U(this.doc,e),s=0;s0&&l(t.charAt(r-1));)--r;for(;n.5)&&Cr(this),We(this,"refresh",this)}),swapDoc:hn(function(e){var t=this.doc;return t.cm=null,Vn(this,e),ir(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,St(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}},Pe(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(ko);var Hs="iter insert remove copy getEditor constructor".split(" ");for(var Ps in ds.prototype)ds.prototype.hasOwnProperty(Ps)&&h(Hs,Ps)<0&&(ko.prototype[Ps]=function(e){return function(){return e.apply(this.doc,arguments)}}(ds.prototype[Ps]));return Pe(ds),ko.inputStyles={textarea:Ds,contenteditable:As},ko.defineMode=function(e){ko.defaults.mode||"null"==e||(ko.defaults.mode=e),Ke.apply(this,arguments)},ko.defineMIME=je,ko.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ko.defineMIME("text/plain","null"),ko.defineExtension=function(e,t){ko.prototype[e]=t},ko.defineDocExtension=function(e,t){ds.prototype[e]=t},ko.fromTextArea=Ko,function(e){e.off=Oe,e.on=Pl,e.wheelEventPixels=Ur,e.Doc=ds,e.splitLines=Fl,e.countColumn=f,e.findColumn=d,e.isWordChar=w,e.Pass=Cl,e.signal=We,e.Line=Kl,e.changeEnd=Hn,e.scrollbarModel=ts,e.Pos=E,e.cmpPos=F,e.modes=Bl,e.mimeModes=Gl,e.resolveMode=Xe,e.getMode=Ye,e.modeExtensions=Ul,e.extendMode=_e,e.copyState=$e,e.startState=Ze,e.innerMode=qe,e.commands=Ss,e.keyMap=ws,e.keyName=Qi,e.isModifierKey=Zi,e.lookupKey=qi,e.normalizeKeyMap=$i,e.StringStream=Vl,e.SharedTextMarker=fs,e.TextMarker=cs,e.LineWidget=as,e.e_preventDefault=Ee,e.e_stopPropagation=Fe,e.e_stop=ze,e.addClass=s,e.contains=o,e.rmClass=vl,e.keyNames=vs}(ko),ko.version="5.25.2",ko}); \ No newline at end of file +!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.CodeMirror=b()}(this,function(){"use strict";function a(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}function b(a){for(var b=a.childNodes.length;b>0;--b)a.removeChild(a.firstChild);return a}function c(a,c){return b(a).appendChild(c)}function d(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f=b)return g+(b-f);g+=h-f,g+=c-g%c,f=h+1}}function m(a,b){for(var c=0;c=b)return d+Math.min(g,b-e);if(e+=f-d,e+=c-e%c,d=f+1,e>=b)return d}}function o(a){for(;Fg.length<=a;)Fg.push(p(Fg)+" ");return Fg[a]}function p(a){return a[a.length-1]}function q(a,b){for(var c=[],d=0;d"€"&&(a.toUpperCase()!=a.toLowerCase()||Gg.test(a))}function v(a,b){return b?!!(b.source.indexOf("\\w")>-1&&u(a))||b.test(a):u(a)}function w(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function x(a){return a.charCodeAt(0)>=768&&Hg.test(a)}function y(a,b,c){for(;(c<0?b>0:b=a.size)throw new Error("There is no line "+(b+a.first)+" in the document.");for(var c=a;!c.lines;)for(var d=0;;++d){var e=c.children[d],f=e.chunkSize();if(b=a.first&&bc?J(c,B(a,c).text.length):R(b,B(a,b.line).text.length)}function R(a,b){var c=a.ch;return null==c||c>b?J(a.line,b):c<0?J(a.line,0):a}function S(a,b){for(var c=[],d=0;d=b:f.to>b);(d||(d=[])).push(new V(g,f.from,i?null:f.to))}}return d}function $(a,b,c){var d;if(a)for(var e=0;e=b:f.to>b);if(h||f.from==b&&"bookmark"==g.type&&(!c||f.marker.insertLeft)){var i=null==f.from||(g.inclusiveLeft?f.from<=b:f.from0&&h)for(var v=0;v0)){var k=[i,1],l=K(j.from,h.from),n=K(j.to,h.to);(l<0||!g.inclusiveLeft&&!l)&&k.push({from:j.from,to:h.from}),(n>0||!g.inclusiveRight&&!n)&&k.push({from:h.to,to:j.to}),e.splice.apply(e,k),i+=k.length-3}}return e}function ca(a){var b=a.markedSpans;if(b){for(var c=0;c=0&&l<=0||k<=0&&l>=0)&&(k<=0&&(i.marker.inclusiveRight&&e.inclusiveLeft?K(j.to,c)>=0:K(j.to,c)>0)||k>=0&&(i.marker.inclusiveRight&&e.inclusiveLeft?K(j.from,d)<=0:K(j.from,d)<0)))return!0}}}function la(a){for(var b;b=ia(a);)a=b.find(-1,!0).line;return a}function ma(a){for(var b;b=ja(a);)a=b.find(1,!0).line;return a}function na(a){for(var b,c;b=ja(a);)a=b.find(1,!0).line,(c||(c=[])).push(a);return c}function oa(a,b){var c=B(a,b),d=la(c);return c==d?b:F(d)}function pa(a,b){if(b>a.lastLine())return b;var c,d=B(a,b);if(!qa(a,d))return b;for(;c=ja(d);)d=c.find(1,!0).line;return F(d)+1}function qa(a,b){var c=Jg&&b.markedSpans;if(c)for(var d=void 0,e=0;eb.maxLineLength&&(b.maxLineLength=c,b.maxLine=a)})}function va(a,b,c,d){if(!a)return d(b,c,"ltr");for(var e=!1,f=0;fb||b==c&&g.to==b)&&(d(Math.max(g.from,b),Math.min(g.to,c),1==g.level?"rtl":"ltr"),e=!0)}e||d(b,c,"ltr")}function wa(a,b,c){var d;Kg=null;for(var e=0;eb)return e;f.to==b&&(f.from!=f.to&&"before"==c?d=e:Kg=e),f.from==b&&(f.from!=f.to&&"before"!=c?d=e:Kg=e)}return null!=d?d:Kg}function xa(a,b){var c=a.order;return null==c&&(c=a.order=Lg(a.text,b)),c}function ya(a,b,c){var d=y(a.text,b+c,c);return d<0||d>a.text.length?null:d}function za(a,b,c){var d=ya(a,b.ch,c);return null==d?null:new J(b.line,d,c<0?"after":"before")}function Aa(a,b,c,d,e){if(a){var f=xa(c,b.doc.direction);if(f){var g,h=e<0?p(f):f[0],i=e<0==(1==h.level),j=i?"after":"before";if(h.level>0){var k=Yb(b,c);g=e<0?c.text.length-1:0;var l=Zb(b,k,g).top;g=z(function(a){return Zb(b,k,a).top==l},e<0==(1==h.level)?h.from:h.to-1,g),"before"==j&&(g=ya(c,g,1))}else g=e<0?h.to:h.from;return new J(d,g,j)}}return new J(d,e<0?c.text.length:0,e<0?"before":"after")}function Ba(a,b,c,d){var e=xa(b,a.doc.direction);if(!e)return za(b,c,d);c.ch>=b.text.length?(c.ch=b.text.length,c.sticky="before"):c.ch<=0&&(c.ch=0,c.sticky="after");var f=wa(e,c.ch,c.sticky),g=e[f];if("ltr"==a.doc.direction&&g.level%2==0&&(d>0?g.to>c.ch:g.from=g.from&&m>=k.begin)){var n=l?"before":"after";return new J(c.line,m,n)}}var o=function(a,b,d){for(var f=function(a,b){return b?new J(c.line,i(a,1),"before"):new J(c.line,a,"after")};a>=0&&a0==(1!=g.level),j=h?d.begin:i(d.end,-1);if(g.from<=j&&j0?k.end:i(k.begin,-1);return null==q||d>0&&q==b.text.length||!(p=o(d>0?0:e.length-1,d,j(q)))?null:p}function Ca(a,b){return a._handlers&&a._handlers[b]||Mg}function Da(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,!1);else if(a.detachEvent)a.detachEvent("on"+b,c);else{var d=a._handlers,e=d&&d[b];if(e){var f=m(e,c);f>-1&&(d[b]=e.slice(0,f).concat(e.slice(f+1)))}}}function Ea(a,b){var c=Ca(a,b);if(c.length)for(var d=Array.prototype.slice.call(arguments,2),e=0;e0}function Ia(a){a.prototype.on=function(a,b){Ng(this,a,b)},a.prototype.off=function(a,b){Da(this,a,b)}}function Ja(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Ka(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function La(a){return null!=a.defaultPrevented?a.defaultPrevented:0==a.returnValue}function Ma(a){Ja(a),Ka(a)}function Na(a){return a.target||a.srcElement}function Oa(a){var b=a.which;return null==b&&(1&a.button?b=1:2&a.button?b=3:4&a.button&&(b=2)),og&&a.ctrlKey&&1==b&&(b=3),b}function Pa(a){if(null==yg){var b=d("span","​");c(a,d("span",[b,document.createTextNode("x")])),0!=a.firstChild.offsetHeight&&(yg=b.offsetWidth<=1&&b.offsetHeight>2&&!(cg&&dg<8))}var e=yg?d("span","​"):d("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return e.setAttribute("cm-text",""),e}function Qa(a){if(null!=zg)return zg;var d=c(a,document.createTextNode("AخA")),e=sg(d,0,1).getBoundingClientRect(),f=sg(d,1,2).getBoundingClientRect();return b(a),!(!e||e.left==e.right)&&(zg=f.right-e.right<3)}function Ra(a){if(null!=Sg)return Sg;var b=c(a,d("span","x")),e=b.getBoundingClientRect(),f=sg(b,0,1).getBoundingClientRect();return Sg=Math.abs(e.left-f.left)>1}function Sa(a,b){arguments.length>2&&(b.dependencies=Array.prototype.slice.call(arguments,2)),Tg[a]=b}function Ta(a,b){Ug[a]=b}function Ua(a){if("string"==typeof a&&Ug.hasOwnProperty(a))a=Ug[a];else if(a&&"string"==typeof a.name&&Ug.hasOwnProperty(a.name)){var b=Ug[a.name];"string"==typeof b&&(b={name:b}),a=t(b,a),a.name=b.name}else{if("string"==typeof a&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return Ua("application/xml");if("string"==typeof a&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Ua("application/json")}return"string"==typeof a?{name:a}:a||{name:"null"}}function Va(a,b){b=Ua(b);var c=Tg[b.name];if(!c)return Va(a,"text/plain");var d=c(a,b);if(Vg.hasOwnProperty(b.name)){var e=Vg[b.name];for(var f in e)e.hasOwnProperty(f)&&(d.hasOwnProperty(f)&&(d["_"+f]=d[f]),d[f]=e[f])}if(d.name=b.name,b.helperType&&(d.helperType=b.helperType),b.modeProps)for(var g in b.modeProps)d[g]=b.modeProps[g];return d}function Wa(a,b){k(b,Vg.hasOwnProperty(a)?Vg[a]:Vg[a]={})}function Xa(a,b){if(b===!0)return b;if(a.copyState)return a.copyState(b);var c={};for(var d in b){var e=b[d];e instanceof Array&&(e=e.concat([])),c[d]=e}return c}function Ya(a,b){for(var c;a.innerMode&&((c=a.innerMode(b))&&c.mode!=a);)b=c.state,a=c.mode;return c||{mode:a,state:b}}function Za(a,b,c){return!a.startState||a.startState(b,c)}function $a(a,b,c,d){var e=[a.state.modeGen],f={};gb(a,b.text,a.doc.mode,c,function(a,b){return e.push(a,b)},f,d);for(var g=0;ga&&e.splice(g,1,a,e[g+1],f),g+=2,h=Math.min(a,f)}if(b)if(d.opaque)e.splice(c,g-c,a,"overlay "+b),g=c+2;else for(;ca.options.maxHighlightLength?Xa(a.doc.mode,d):d);b.stateAfter=d,b.styles=e.styles,e.classes?b.styleClasses=e.classes:b.styleClasses&&(b.styleClasses=null),c===a.doc.frontier&&a.doc.frontier++}return b.styles}function ab(a,b,c){var d=a.doc,e=a.display;if(!d.mode.startState)return!0;var f=hb(a,b,c),g=f>d.first&&B(d,f-1).stateAfter;return g=g?Xa(d.mode,g):Za(d.mode),d.iter(f,b,function(c){bb(a,c.text,g);var h=f==b-1||f%5==0||f>=e.viewFrom&&fb.start)return f}throw new Error("Mode "+a.name+" failed to advance stream.")}function eb(a,b,c,d){var e,f=function(a){return{start:l.start,end:l.pos,string:l.current(),type:e||null,state:a?Xa(g.mode,k):k}},g=a.doc,h=g.mode;b=Q(g,b);var i,j=B(g,b.line),k=ab(a,b.line,c),l=new Wg(j.text,a.options.tabSize);for(d&&(i=[]);(d||l.posa.options.maxHighlightLength?(h=!1,g&&bb(a,b,d,l.pos),l.pos=b.length,i=null):i=fb(db(c,l,d,m),f),m){var n=m[0].name;n&&(i="m-"+(i?n+" "+i:n))}if(!h||k!=i){for(;jg;--h){if(h<=f.first)return f.first;var i=B(f,h-1);if(i.stateAfter&&(!c||h<=f.frontier))return h;var j=l(i.text,null,a.options.tabSize);(null==e||d>j)&&(e=h-1,d=j)}return e}function ib(a,b,c,d){a.text=b,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),null!=a.order&&(a.order=null),ca(a),da(a,c);var e=d?d(a):1;e!=a.height&&E(a,e)}function jb(a){a.parent=null,ca(a)}function kb(a,b){if(!a||/^\s*$/.test(a))return null;var c=b.addModeClass?$g:Zg;return c[a]||(c[a]=a.replace(/\S+/g,"cm-$&"))}function lb(a,b){var c=e("span",null,null,eg?"padding-right: .1px":null),d={pre:e("pre",[c],"CodeMirror-line"),content:c,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:(cg||eg)&&a.getOption("lineWrapping")};b.measure={};for(var f=0;f<=(b.rest?b.rest.length:0);f++){var g=f?b.rest[f-1]:b.line,h=void 0;d.pos=0,d.addToken=nb,Qa(a.display.measure)&&(h=xa(g,a.doc.direction))&&(d.addToken=pb(d.addToken,h)),d.map=[];rb(g,d,_a(a,g,b!=a.display.externalMeasured&&F(g))),g.styleClasses&&(g.styleClasses.bgClass&&(d.bgClass=i(g.styleClasses.bgClass,d.bgClass||"")),g.styleClasses.textClass&&(d.textClass=i(g.styleClasses.textClass,d.textClass||""))),0==d.map.length&&d.map.push(0,0,d.content.appendChild(Pa(a.display.measure))),0==f?(b.measure.map=d.map,b.measure.cache={}):((b.measure.maps||(b.measure.maps=[])).push(d.map),(b.measure.caches||(b.measure.caches=[])).push({}))}if(eg){var j=d.content.lastChild;(/\bcm-tab\b/.test(j.className)||j.querySelector&&j.querySelector(".cm-tab"))&&(d.content.className="cm-tab-wrap-hack")}return Ea(a,"renderLine",a,b.line,d.pre),d.pre.className&&(d.textClass=i(d.pre.className,d.textClass||"")),d}function mb(a){var b=d("span","•","cm-invalidchar");return b.title="\\u"+a.charCodeAt(0).toString(16),b.setAttribute("aria-label",b.title),b}function nb(a,b,c,e,f,g,h){if(b){var i,j=a.splitSpaces?ob(b,a.trailingSpace):b,k=a.cm.state.specialChars,l=!1;if(k.test(b)){i=document.createDocumentFragment();for(var m=0;;){k.lastIndex=m;var n=k.exec(b),p=n?n.index-m:b.length-m;if(p){var q=document.createTextNode(j.slice(m,m+p));cg&&dg<9?i.appendChild(d("span",[q])):i.appendChild(q),a.map.push(a.pos,a.pos+p,q),a.col+=p,a.pos+=p}if(!n)break;m+=p+1;var r=void 0;if("\t"==n[0]){var s=a.cm.options.tabSize,t=s-a.col%s;r=i.appendChild(d("span",o(t),"cm-tab")),r.setAttribute("role","presentation"),r.setAttribute("cm-text","\t"),a.col+=t}else"\r"==n[0]||"\n"==n[0]?(r=i.appendChild(d("span","\r"==n[0]?"␍":"␤","cm-invalidchar")),r.setAttribute("cm-text",n[0]),a.col+=1):(r=a.cm.options.specialCharPlaceholder(n[0]),r.setAttribute("cm-text",n[0]),cg&&dg<9?i.appendChild(d("span",[r])):i.appendChild(r),a.col+=1);a.map.push(a.pos,a.pos+1,r),a.pos++}}else a.col+=b.length,i=document.createTextNode(j),a.map.push(a.pos,a.pos+b.length,i),cg&&dg<9&&(l=!0),a.pos+=b.length;if(a.trailingSpace=32==j.charCodeAt(b.length-1),c||e||f||l||h){var u=c||"";e&&(u+=e),f&&(u+=f);var v=d("span",[i],u,h);return g&&(v.title=g),a.content.appendChild(v)}a.content.appendChild(i)}}function ob(a,b){if(a.length>1&&!/ /.test(a))return a;for(var c=b,d="",e=0;ej&&l.from<=j));m++);if(l.to>=k)return a(c,d,e,f,g,h,i);a(c,d.slice(0,l.to-j),e,f,null,h,i),f=null,d=d.slice(l.to-j),j=l.to}}}function qb(a,b,c,d){var e=!d&&c.widgetNode;e&&a.map.push(a.pos,a.pos+b,e),!d&&a.cm.display.input.needsContentAttribute&&(e||(e=a.content.appendChild(document.createElement("span"))),e.setAttribute("cm-marker",c.id)),e&&(a.cm.display.input.setUneditable(e),a.content.appendChild(e)),a.pos+=b,a.trailingSpace=!1}function rb(a,b,c){var d=a.markedSpans,e=a.text,f=0;if(d)for(var g,h,i,j,k,l,m,n=e.length,o=0,p=1,q="",r=0;;){if(r==o){i=j=k=l=h="",m=null,r=1/0;for(var s=[],t=void 0,u=0;uo||w.collapsed&&v.to==o&&v.from==o)?(null!=v.to&&v.to!=o&&r>v.to&&(r=v.to,j=""),w.className&&(i+=" "+w.className),w.css&&(h=(h?h+";":"")+w.css),w.startStyle&&v.from==o&&(k+=" "+w.startStyle),w.endStyle&&v.to==r&&(t||(t=[])).push(w.endStyle,v.to),w.title&&!l&&(l=w.title),w.collapsed&&(!m||ga(m.marker,w)<0)&&(m=v)):v.from>o&&r>v.from&&(r=v.from)}if(t)for(var x=0;x=n)break;for(var z=Math.min(n,r);;){if(q){var A=o+q.length;if(!m){var B=A>z?q.slice(0,z-o):q;b.addToken(b,B,g?g+i:i,k,o+B.length==r?j:"",l,h)}if(A>=z){q=q.slice(z-o),o=z;break}o=A,k=""}q=e.slice(f,f=c[p++]),g=kb(c[p++],b.cm.options)}}else for(var C=1;C2&&f.push((i.bottom+j.top)/2-c.top)}}f.push(c.bottom-c.top)}}function Ub(a,b,c){if(a.line==b)return{map:a.measure.map,cache:a.measure.cache};for(var d=0;dc)return{map:a.measure.maps[e],cache:a.measure.caches[e],before:!0}}function Vb(a,b){b=la(b);var d=F(b),e=a.display.externalMeasured=new sb(a.doc,b,d);e.lineN=d;var f=e.built=lb(a,e);return e.text=f.pre,c(a.display.lineMeasure,f.pre),e}function Wb(a,b,c,d){return Zb(a,Yb(a,b),c,d)}function Xb(a,b){if(b>=a.display.viewFrom&&b=c.lineN&&bb)&&(f=i-h,e=f-1,b>=i&&(g="right")),null!=e){if(d=a[j+2],h==i&&c==(d.insertLeft?"left":"right")&&(g=c),"left"==c&&0==e)for(;j&&a[j-2]==a[j-3]&&a[j-1].insertLeft;)d=a[2+(j-=3)],g="left";if("right"==c&&e==i-h)for(;j=0&&(c=a[e]).left==c.right;e--);return c}function ac(a,b,c,d){var e,f=$b(b.map,c,d),g=f.node,h=f.start,i=f.end,j=f.collapse;if(3==g.nodeType){for(var k=0;k<4;k++){for(;h&&x(b.line.text.charAt(f.coverStart+h));)--h;for(;f.coverStart+i0&&(j=d="right");var l;e=a.options.lineWrapping&&(l=g.getClientRects()).length>1?l["right"==d?l.length-1:0]:g.getBoundingClientRect()}if(cg&&dg<9&&!h&&(!e||!e.left&&!e.right)){var m=g.parentNode.getClientRects()[0];e=m?{left:m.left,right:m.left+sc(a.display),top:m.top,bottom:m.bottom}:bh}for(var n=e.top-b.rect.top,o=e.bottom-b.rect.top,p=(n+o)/2,q=b.view.measure.heights,r=0;r=d.text.length?(j=d.text.length,k="before"):j<=0&&(j=0,k="after"),!i)return g("before"==k?j-1:j,"before"==k);var l=wa(i,j,k),m=Kg,n=h(j,l,"before"==k);return null!=m&&(n.other=h(j,m,"before"!=k)),n}function lc(a,b){var c=0;b=Q(a.doc,b),a.options.lineWrapping||(c=sc(a.display)*b.ch);var d=B(a.doc,b.line),e=sa(d)+Nb(a.display);return{left:c,right:c,top:e,bottom:e+d.height}}function mc(a,b,c,d,e){var f=J(a,b,c);return f.xRel=e,d&&(f.outside=!0),f}function nc(a,b,c){var d=a.doc;if((c+=a.display.viewOffset)<0)return mc(d.first,0,null,!0,-1);var e=G(d,c),f=d.first+d.size-1;if(e>f)return mc(d.first+d.size-1,B(d,f).text.length,null,!0,1);b<0&&(b=0);for(var g=B(d,e);;){var h=qc(a,g,e,b,c),i=ja(g),j=i&&i.find(0,!0);if(!i||!(h.ch>j.from.ch||h.ch==j.from.ch&&h.xRel>0))return h;e=F(g=j.to.line)}}function oc(a,b,c,d){var e=function(d){return hc(a,b,Zb(a,c,d),"line")},f=b.text.length,g=z(function(a){return e(a-1).bottom<=d},f,0);return f=z(function(a){return e(a).top>d},g,f),{begin:g,end:f}}function pc(a,b,c,d){return oc(a,b,c,hc(a,b,Zb(a,c,d),"line").top)}function qc(a,b,c,d,e){e-=sa(b);var f,g=0,h=b.text.length,i=Yb(a,b);if(xa(b,a.doc.direction)){if(a.options.lineWrapping){var j;j=oc(a,b,i,e),g=j.begin,h=j.end}f=new J(c,g);var k,l,m=kc(a,f,"line",b,i).left,n=mMath.abs(k)){if(o<0==k<0)throw new Error("Broke out of infinite loop in coordsCharInner");f=l}}else{var p=z(function(c){var f=hc(a,b,Zb(a,i,c),"line");return f.top>e?(h=Math.min(c,h),!0):!(f.bottom<=e)&&(f.left>d||!(f.rightq.right?1:0,f}function rc(a){if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==Yg){Yg=d("pre");for(var e=0;e<49;++e)Yg.appendChild(document.createTextNode("x")),Yg.appendChild(d("br"));Yg.appendChild(document.createTextNode("x"))}c(a.measure,Yg);var f=Yg.offsetHeight/50;return f>3&&(a.cachedTextHeight=f),b(a.measure),f||1}function sc(a){if(null!=a.cachedCharWidth)return a.cachedCharWidth;var b=d("span","xxxxxxxxxx"),e=d("pre",[b]);c(a.measure,e);var f=b.getBoundingClientRect(),g=(f.right-f.left)/10;return g>2&&(a.cachedCharWidth=g),g||10}function tc(a){for(var b=a.display,c={},d={},e=b.gutters.clientLeft,f=b.gutters.firstChild,g=0;f;f=f.nextSibling,++g)c[a.options.gutters[g]]=f.offsetLeft+f.clientLeft+e,d[a.options.gutters[g]]=f.clientWidth;return{fixedPos:uc(b),gutterTotalWidth:b.gutters.offsetWidth,gutterLeft:c,gutterWidth:d,wrapperWidth:b.wrapper.clientWidth}}function uc(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function vc(a){var b=rc(a.display),c=a.options.lineWrapping,d=c&&Math.max(5,a.display.scroller.clientWidth/sc(a.display)-3);return function(e){if(qa(a.doc,e))return 0;var f=0;if(e.widgets)for(var g=0;g=a.display.viewTo)return null;if((b-=a.display.viewFrom)<0)return null;for(var c=a.display.view,d=0;d=a.display.viewTo||h.to().line3&&(e(n,p.top,null,p.bottom),n=k,p.bottomi.bottom||j.bottom==i.bottom&&j.right>i.right)&&(i=j),n0?b.blinker=setInterval(function(){return b.cursorDiv.style.visibility=(c=!c)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(b.cursorDiv.style.visibility="hidden")}}function Ec(a){a.state.focused||(a.display.input.focus(),Gc(a))}function Fc(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Hc(a))},100)}function Gc(a,b){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),"nocursor"!=a.options.readOnly&&(a.state.focused||(Ea(a,"focus",a,b),a.state.focused=!0,h(a.display.wrapper,"CodeMirror-focused"),a.curOp||a.display.selForContextMenu==a.doc.sel||(a.display.input.reset(),eg&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Dc(a))}function Hc(a,b){a.state.delayingBlurEvent||(a.state.focused&&(Ea(a,"blur",a,b),a.state.focused=!1,vg(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function Ic(a){for(var b=a.display,c=b.lineDiv.offsetTop,d=0;d.001||i<-.001)&&(E(e.line,f),Jc(e.line),e.rest))for(var j=0;j=g&&(f=G(b,sa(B(b,i))-a.wrapper.clientHeight),g=i)}return{from:f,to:Math.max(g,f+1)}}function Lc(a){var b=a.display,c=b.view;if(b.alignWidgets||b.gutters.firstChild&&a.options.fixedGutter){for(var d=uc(b)-b.scroller.scrollLeft+a.doc.scrollLeft,e=b.gutters.offsetWidth,f=d+"px",g=0;g(window.innerHeight||document.documentElement.clientHeight)&&(f=!1),null!=f&&!kg){var g=d("div","​",null,"position: absolute;\n top: "+(b.top-c.viewOffset-Nb(a.display))+"px;\n height: "+(b.bottom-b.top+Qb(a)+c.barHeight)+"px;\n left: "+b.left+"px; width: "+Math.max(2,b.right-b.left)+"px;");a.display.lineSpace.appendChild(g),g.scrollIntoView(f),a.display.lineSpace.removeChild(g)}}}function Oc(a,b,c,d){null==d&&(d=0);for(var e,f=0;f<5;f++){var g=!1,h=kc(a,b),i=c&&c!=b?kc(a,c):h;e={left:Math.min(h.left,i.left),top:Math.min(h.top,i.top)-d,right:Math.max(h.left,i.left),bottom:Math.max(h.bottom,i.bottom)+d};var j=Qc(a,e),k=a.doc.scrollTop,l=a.doc.scrollLeft;if(null!=j.scrollTop&&(Xc(a,j.scrollTop),Math.abs(a.doc.scrollTop-k)>1&&(g=!0)),null!=j.scrollLeft&&(Zc(a,j.scrollLeft),Math.abs(a.doc.scrollLeft-l)>1&&(g=!0)),!g)break}return e}function Pc(a,b){var c=Qc(a,b);null!=c.scrollTop&&Xc(a,c.scrollTop),null!=c.scrollLeft&&Zc(a,c.scrollLeft)}function Qc(a,b){var c=a.display,d=rc(a.display);b.top<0&&(b.top=0);var e=a.curOp&&null!=a.curOp.scrollTop?a.curOp.scrollTop:c.scroller.scrollTop,f=Sb(a),g={};b.bottom-b.top>f&&(b.bottom=b.top+f);var h=a.doc.height+Ob(c),i=b.toph-d;if(b.tope+f){var k=Math.min(b.top,(j?h:b.bottom)-f);k!=e&&(g.scrollTop=k)}var l=a.curOp&&null!=a.curOp.scrollLeft?a.curOp.scrollLeft:c.scroller.scrollLeft,m=Rb(a)-(a.options.fixedGutter?c.gutters.offsetWidth:0),n=b.right-b.left>m;return n&&(b.right=b.left+m),b.left<10?g.scrollLeft=0:b.leftm+l-3&&(g.scrollLeft=b.right+(n?0:10)-m),g}function Rc(a,b){null!=b&&(Vc(a),a.curOp.scrollTop=(null==a.curOp.scrollTop?a.doc.scrollTop:a.curOp.scrollTop)+b)}function Sc(a){Vc(a);var b=a.getCursor(),c=b,d=b;a.options.lineWrapping||(c=b.ch?J(b.line,b.ch-1):b,d=J(b.line,b.ch+1)),a.curOp.scrollToPos={from:c,to:d,margin:a.options.cursorScrollMargin}}function Tc(a,b,c){null==b&&null==c||Vc(a),null!=b&&(a.curOp.scrollLeft=b),null!=c&&(a.curOp.scrollTop=c)}function Uc(a,b){Vc(a),a.curOp.scrollToPos=b}function Vc(a){var b=a.curOp.scrollToPos;if(b){a.curOp.scrollToPos=null;Wc(a,lc(a,b.from),lc(a,b.to),b.margin)}}function Wc(a,b,c,d){var e=Qc(a,{left:Math.min(b.left,c.left),top:Math.min(b.top,c.top)-d,right:Math.max(b.right,c.right),bottom:Math.max(b.bottom,c.bottom)+d});Tc(a,e.scrollLeft,e.scrollTop)}function Xc(a,b){Math.abs(a.doc.scrollTop-b)<2||($f||Bd(a,{top:b}),Yc(a,b,!0),$f&&Bd(a),ud(a,100))}function Yc(a,b,c){b=Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,b),(a.display.scroller.scrollTop!=b||c)&&(a.doc.scrollTop=b,a.display.scrollbars.setScrollTop(b),a.display.scroller.scrollTop!=b&&(a.display.scroller.scrollTop=b))}function Zc(a,b,c,d){b=Math.min(b,a.display.scroller.scrollWidth-a.display.scroller.clientWidth),(c?b==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-b)<2)&&!d||(a.doc.scrollLeft=b,Lc(a),a.display.scroller.scrollLeft!=b&&(a.display.scroller.scrollLeft=b),a.display.scrollbars.setScrollLeft(b))}function $c(a){var b=a.display,c=b.gutters.offsetWidth,d=Math.round(a.doc.height+Ob(a.display));return{clientHeight:b.scroller.clientHeight,viewHeight:b.wrapper.clientHeight,scrollWidth:b.scroller.scrollWidth,clientWidth:b.scroller.clientWidth,viewWidth:b.wrapper.clientWidth,barLeft:a.options.fixedGutter?c:0,docHeight:d,scrollHeight:d+Qb(a)+b.barHeight,nativeBarWidth:b.nativeBarWidth,gutterWidth:c}}function _c(a,b){b||(b=$c(a));var c=a.display.barWidth,d=a.display.barHeight;ad(a,b);for(var e=0;e<4&&c!=a.display.barWidth||d!=a.display.barHeight;e++)c!=a.display.barWidth&&a.options.lineWrapping&&Ic(a),ad(a,$c(a)),c=a.display.barWidth,d=a.display.barHeight}function ad(a,b){var c=a.display,d=c.scrollbars.update(b);c.sizer.style.paddingRight=(c.barWidth=d.right)+"px",c.sizer.style.paddingBottom=(c.barHeight=d.bottom)+"px",c.heightForcer.style.borderBottom=d.bottom+"px solid transparent",d.right&&d.bottom?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=d.bottom+"px",c.scrollbarFiller.style.width=d.right+"px"):c.scrollbarFiller.style.display="",d.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=d.bottom+"px",c.gutterFiller.style.width=b.gutterWidth+"px"):c.gutterFiller.style.display=""}function bd(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&vg(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new eh[a.options.scrollbarStyle](function(b){a.display.wrapper.insertBefore(b,a.display.scrollbarFiller),Ng(b,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),b.setAttribute("cm-not-content","true")},function(b,c){"horizontal"==c?Zc(a,b):Xc(a,b)},a),a.display.scrollbars.addClass&&h(a.display.wrapper,a.display.scrollbars.addClass)}function cd(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.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:++fh},ub(a.curOp)}function dd(a){wb(a.curOp,function(a){for(var b=0;b=c.viewTo)||c.maxLineChanged&&b.options.lineWrapping,a.update=a.mustUpdate&&new gh(b,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function gd(a){a.updatedDisplay=a.mustUpdate&&zd(a.cm,a.update)}function hd(a){var b=a.cm,c=b.display;a.updatedDisplay&&Ic(b),a.barMeasure=$c(b),c.maxLineChanged&&!b.options.lineWrapping&&(a.adjustWidthTo=Wb(b,c.maxLine,c.maxLine.text.length).left+3,b.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(c.scroller.clientWidth,c.sizer.offsetLeft+a.adjustWidthTo+Qb(b)+b.display.barWidth),a.maxScrollLeft=Math.max(0,c.sizer.offsetLeft+a.adjustWidthTo-Rb(b))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=c.input.prepareSelection(a.focus))}function id(a){var b=a.cm;null!=a.adjustWidthTo&&(b.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeftb)&&(e.updateLineNumbers=b),a.curOp.viewChanged=!0,b>=e.viewTo)Jg&&oa(a.doc,b)e.viewFrom?qd(a):(e.viewFrom+=d,e.viewTo+=d);else if(b<=e.viewFrom&&c>=e.viewTo)qd(a);else if(b<=e.viewFrom){var f=rd(a,c,c+d,1);f?(e.view=e.view.slice(f.index),e.viewFrom=f.lineN,e.viewTo+=d):qd(a)}else if(c>=e.viewTo){var g=rd(a,b,b,-1);g?(e.view=e.view.slice(0,g.index),e.viewTo=g.lineN):qd(a)}else{var h=rd(a,b,b,-1),i=rd(a,c,c+d,1);h&&i?(e.view=e.view.slice(0,h.index).concat(tb(a,h.lineN,i.lineN)).concat(e.view.slice(i.index)),e.viewTo+=d):qd(a)}var j=e.externalMeasured;j&&(c=e.lineN&&b=d.viewTo)){var f=d.view[yc(a,b)];if(null!=f.node){var g=f.changes||(f.changes=[]);m(g,c)==-1&&g.push(c)}}}function qd(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function rd(a,b,c,d){var e,f=yc(a,b),g=a.display.view;if(!Jg||c==a.doc.first+a.doc.size)return{index:f,lineN:c};for(var h=a.display.viewFrom,i=0;i0){if(f==g.length-1)return null;e=h+g[f].size-b,f++}else e=h-b;b+=e,c+=e}for(;oa(a.doc,c)!=c;){if(f==(d<0?0:g.length-1))return null;c+=d*g[f-(d<0?1:0)].size,f+=d}return{index:f,lineN:c}}function sd(a,b,c){var d=a.display;0==d.view.length||b>=d.viewTo||c<=d.viewFrom?(d.view=tb(a,b,c),d.viewFrom=b):(d.viewFrom>b?d.view=tb(a,b,d.viewFrom).concat(d.view):d.viewFromc&&(d.view=d.view.slice(0,yc(a,c)))),d.viewTo=c}function td(a){for(var b=a.display.view,c=0,d=0;d=a.display.viewTo)){var c=+new Date+a.options.workTime,d=Xa(b.mode,ab(a,b.frontier)),e=[];b.iter(b.frontier,Math.min(b.first+b.size,a.display.viewTo+500),function(f){if(b.frontier>=a.display.viewFrom){var g=f.styles,h=f.text.length>a.options.maxHighlightLength,i=$a(a,f,h?Xa(b.mode,d):d,!0);f.styles=i.styles;var j=f.styleClasses,k=i.classes;k?f.styleClasses=k:j&&(f.styleClasses=null);for(var l=!g||g.length!=f.styles.length||j!=k&&(!j||!k||j.bgClass!=k.bgClass||j.textClass!=k.textClass),m=0;!l&&mc)return ud(a,a.options.workDelay),!0}),e.length&&kd(a,function(){for(var b=0;b=d.viewFrom&&c.visible.to<=d.viewTo&&(null==d.updateLineNumbers||d.updateLineNumbers>=d.viewTo)&&d.renderedView==d.view&&0==td(a))return!1;Mc(a)&&(qd(a),c.dims=tc(a));var f=e.first+e.size,g=Math.max(c.visible.from-a.options.viewportMargin,e.first),h=Math.min(f,c.visible.to+a.options.viewportMargin);d.viewFromh&&d.viewTo-h<20&&(h=Math.min(f,d.viewTo)),Jg&&(g=oa(a.doc,g),h=pa(a.doc,h));var i=g!=d.viewFrom||h!=d.viewTo||d.lastWrapHeight!=c.wrapperHeight||d.lastWrapWidth!=c.wrapperWidth;sd(a,g,h),d.viewOffset=sa(B(a.doc,d.viewFrom)),a.display.mover.style.top=d.viewOffset+"px";var j=td(a);if(!i&&0==j&&!c.force&&d.renderedView==d.view&&(null==d.updateLineNumbers||d.updateLineNumbers>=d.viewTo))return!1;var k=xd(a);return j>4&&(d.lineDiv.style.display="none"),Cd(a,d.updateLineNumbers,c.dims),j>4&&(d.lineDiv.style.display=""),d.renderedView=d.view,yd(k),b(d.cursorDiv),b(d.selectionDiv),d.gutters.style.height=d.sizer.style.minHeight=0,i&&(d.lastWrapHeight=c.wrapperHeight,d.lastWrapWidth=c.wrapperWidth,ud(a,400)),d.updateLineNumbers=null,!0}function Ad(a,b){for(var c=b.viewport,d=!0;(d&&a.options.lineWrapping&&b.oldDisplayWidth!=Rb(a)||(c&&null!=c.top&&(c={top:Math.min(a.doc.height+Ob(a.display)-Sb(a),c.top)}),b.visible=Kc(a.display,a.doc,c),!(b.visible.from>=a.display.viewFrom&&b.visible.to<=a.display.viewTo)))&&zd(a,b);d=!1){Ic(a);var e=$c(a);zc(a),_c(a,e),Ed(a,e)}b.signal(a,"update",a),a.display.viewFrom==a.display.reportedViewFrom&&a.display.viewTo==a.display.reportedViewTo||(b.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function Bd(a,b){var c=new gh(a,b);if(zd(a,c)){Ic(a),Ad(a,c);var d=$c(a);zc(a),_c(a,d),Ed(a,d),c.finish()}}function Cd(a,c,d){function e(b){var c=b.nextSibling;return eg&&og&&a.display.currentWheelTarget==b?b.style.display="none":b.parentNode.removeChild(b),c}for(var f=a.display,g=a.options.lineNumbers,h=f.lineDiv,i=h.firstChild,j=f.view,k=f.viewFrom,l=0;l-1&&(o=!1),zb(a,n,k,d)),o&&(b(n.lineNumber),n.lineNumber.appendChild(document.createTextNode(I(a.options,k)))),i=n.node.nextSibling}else{var p=Hb(a,n,k,d);h.insertBefore(p,i)}k+=n.size}for(;i;)i=e(i)}function Dd(a){var b=a.display.gutters.offsetWidth;a.display.sizer.style.marginLeft=b+"px"}function Ed(a,b){a.display.sizer.style.minHeight=b.docHeight+"px",a.display.heightForcer.style.top=b.docHeight+"px",a.display.gutters.style.height=b.docHeight+a.display.barHeight+Qb(a)+"px"}function Fd(a){var c=a.display.gutters,e=a.options.gutters;b(c);for(var f=0;f-1&&!a.lineNumbers&&(a.gutters=a.gutters.slice(0),a.gutters.splice(b,1))}function Hd(a){var b=a.wheelDeltaX,c=a.wheelDeltaY;return null==b&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(b=a.detail),null==c&&a.detail&&a.axis==a.VERTICAL_AXIS?c=a.detail:null==c&&(c=a.wheelDelta),{x:b,y:c}}function Id(a){var b=Hd(a);return b.x*=ih,b.y*=ih,b}function Jd(a,b){var c=Hd(b),d=c.x,e=c.y,f=a.display,g=f.scroller,h=g.scrollWidth>g.clientWidth,i=g.scrollHeight>g.clientHeight;if(d&&h||e&&i){if(e&&og&&eg)a:for(var j=b.target,k=f.view;j!=g;j=j.parentNode)for(var l=0;l=0){var g=O(f.from(),e.from()),h=N(f.to(),e.to()),i=f.empty()?e.from()==e.head:f.from()==f.head;d<=b&&--b,a.splice(--d,2,new kh(i?h:g,i?g:h))}}return new jh(a,b)}function Ld(a,b){return new jh([new kh(a,b||a)],0)}function Md(a){return a.text?J(a.from.line+a.text.length-1,p(a.text).length+(1==a.text.length?a.from.ch:0)):a.to}function Nd(a,b){if(K(a,b.from)<0)return a;if(K(a,b.to)<=0)return Md(b);var c=a.line+b.text.length-(b.to.line-b.from.line)-1,d=a.ch;return a.line==b.to.line&&(d+=Md(b).ch-b.to.ch),J(c,d)}function Od(a,b){for(var c=[],d=0;d1&&a.remove(h.line+1,o-1),a.insert(h.line+1,s)}xb(a,"change",a,b)}function Vd(a,b,c){function d(a,e,f){if(a.linked)for(var g=0;g1&&!a.done[a.done.length-2].ranges?(a.done.pop(),p(a.done)):void 0}function be(a,b,c,d){var e=a.history;e.undone.length=0;var f,g,h=+new Date;if((e.lastOp==d||e.lastOrigin==b.origin&&b.origin&&("+"==b.origin.charAt(0)&&a.cm&&e.lastModTime>h-a.cm.options.historyEventDelay||"*"==b.origin.charAt(0)))&&(f=ae(e,e.lastOp==d)))g=p(f.changes),0==K(b.from,b.to)&&0==K(b.from,g.to)?g.to=Md(b):f.changes.push($d(a,b));else{var i=p(e.done);for(i&&i.ranges||ee(a.sel,e.done),f={changes:[$d(a,b)],generation:e.generation},e.done.push(f);e.done.length>e.undoDepth;)e.done.shift(),e.done[0].ranges||e.done.shift()}e.done.push(c),e.generation=++e.maxGeneration,e.lastModTime=e.lastSelTime=h,e.lastOp=e.lastSelOp=d,e.lastOrigin=e.lastSelOrigin=b.origin,g||Ea(a,"historyAdded")}function ce(a,b,c,d){var e=b.charAt(0);return"*"==e||"+"==e&&c.ranges.length==d.ranges.length&&c.somethingSelected()==d.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function de(a,b,c,d){var e=a.history,f=d&&d.origin;c==e.lastSelOp||f&&e.lastSelOrigin==f&&(e.lastModTime==e.lastSelTime&&e.lastOrigin==f||ce(a,f,p(e.done),b))?e.done[e.done.length-1]=b:ee(b,e.done),e.lastSelTime=+new Date,e.lastSelOrigin=f,e.lastSelOp=c,d&&d.clearRedo!==!1&&_d(e.undone)}function ee(a,b){var c=p(b);c&&c.ranges&&c.equals(a)||b.push(a)}function fe(a,b,c,d){var e=b["spans_"+a.id],f=0;a.iter(Math.max(a.first,c),Math.min(a.first+a.size,d),function(c){c.markedSpans&&((e||(e=b["spans_"+a.id]={}))[f]=c.markedSpans),++f})}function ge(a){if(!a)return null;for(var b,c=0;c-1&&(p(h)[l]=j[l],delete j[l])}}}return d}function ke(a,b,c,d){if(a.cm&&a.cm.display.shift||a.extend){var e=b.anchor;if(d){var f=K(c,e)<0;f!=K(d,e)<0?(e=c,c=d):f!=K(c,d)<0&&(c=d)}return new kh(e,c)}return new kh(d||c,c)}function le(a,b,c,d){re(a,new jh([ke(a,a.sel.primary(),b,c)],0),d)}function me(a,b,c){for(var d=[],e=0;e=b.ch:h.to>b.ch))){if(e&&(Ea(i,"beforeCursorEnter"),i.explicitlyCleared)){if(f.markedSpans){--g;continue}break}if(!i.atomic)continue;if(c){var j=i.find(d<0?1:-1),k=void 0;if((d<0?i.inclusiveRight:i.inclusiveLeft)&&(j=ye(a,j,-d,j&&j.line==b.line?f:null)),j&&j.line==b.line&&(k=K(j,c))&&(d<0?k<0:k>0))return we(a,j,b,d,e)}var l=i.find(d<0?-1:1);return(d<0?i.inclusiveLeft:i.inclusiveRight)&&(l=ye(a,l,d,l.line==b.line?f:null)),l?we(a,l,b,d,e):null}}return b}function xe(a,b,c,d,e){var f=d||1,g=we(a,b,c,f,e)||!e&&we(a,b,c,f,!0)||we(a,b,c,-f,e)||!e&&we(a,b,c,-f,!0);return g?g:(a.cantEdit=!0,J(a.first,0))}function ye(a,b,c,d){return c<0&&0==b.ch?b.line>a.first?Q(a,J(b.line-1)):null:c>0&&b.ch==(d||B(a,b.line)).text.length?b.line=0;--e)Ce(a,{from:d[e].from,to:d[e].to,text:e?[""]:b.text});else Ce(a,b)}}function Ce(a,b){if(1!=b.text.length||""!=b.text[0]||0!=K(b.from,b.to)){var c=Od(a,b);be(a,b,c,a.cm?a.cm.curOp.id:NaN),Fe(a,b,c,_(a,b));var d=[];Vd(a,function(a,c){c||m(d,a.history)!=-1||(Ke(a.history,b),d.push(a.history)),Fe(a,b,null,_(a,b))})}}function De(a,b,c){if(!a.cm||!a.cm.state.suppressEdits||c){for(var d,e=a.history,f=a.sel,g="undo"==b?e.done:e.undone,h="undo"==b?e.undone:e.done,i=0;i=0;--l){var n=function(c){var e=d.changes[c];if(e.origin=b,k&&!Ae(a,e,!1))return g.length=0,{};j.push($d(a,e)),Fe(a,e,c?Od(a,e):p(g),ie(a,e)),!c&&a.cm&&a.cm.scrollIntoView({from:e.from,to:Md(e)});var f=[];Vd(a,function(a,b){b||m(f,a.history)!=-1||(Ke(a.history,e),f.push(a.history)),Fe(a,e,null,ie(a,e))})}(l);if(n)return n.v}}}}function Ee(a,b){if(0!=b&&(a.first+=b,a.sel=new jh(q(a.sel.ranges,function(a){return new kh(J(a.anchor.line+b,a.anchor.ch),J(a.head.line+b,a.head.ch))}),a.sel.primIndex),a.cm)){od(a.cm,a.first,a.first-b,b);for(var c=a.cm.display,d=c.viewFrom;da.lastLine())){if(b.from.linef&&(b={from:b.from,to:J(f,B(a,f).text.length),text:[b.text[0]],origin:b.origin}),b.removed=C(a,b.from,b.to),c||(c=Od(a,b)),a.cm?Ge(a.cm,b,d):Ud(a,b,d),se(a,c,Cg)}}function Ge(a,b,c){var d=a.doc,e=a.display,f=b.from,g=b.to,h=!1,i=f.line;a.options.lineWrapping||(i=F(la(B(d,f.line))),d.iter(i,g.line+1,function(a){if(a==e.maxLine)return h=!0,!0})),d.sel.contains(b.from,b.to)>-1&&Ga(a),Ud(d,b,c,vc(a)),a.options.lineWrapping||(d.iter(i,f.line+b.text.length,function(a){var b=ta(a);b>e.maxLineLength&&(e.maxLine=a,e.maxLineLength=b,e.maxLineChanged=!0,h=!1)}),h&&(a.curOp.updateMaxLine=!0)),d.frontier=Math.min(d.frontier,f.line),ud(a,400);var j=b.text.length-(g.line-f.line)-1;b.full?od(a):f.line!=g.line||1!=b.text.length||Td(a.doc,b)?od(a,f.line,g.line+1,j):pd(a,f.line,"text");var k=Ha(a,"changes"),l=Ha(a,"change");if(l||k){var m={from:f,to:g,text:b.text,removed:b.removed,origin:b.origin};l&&xb(a,"change",a,m),k&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(m)}a.display.selForContextMenu=null}function He(a,b,c,d,e){if(d||(d=c),K(d,c)<0){var f=d;d=c,c=f}"string"==typeof b&&(b=a.splitLines(b)),Be(a,{from:c,to:d,text:b,origin:e})}function Ie(a,b,c,d){c0||0==h&&g.clearWhenEmpty!==!1)return g;if(g.replacedWith&&(g.collapsed=!0,g.widgetNode=e("span",[g.replacedWith],"CodeMirror-widget"),d.handleMouseEvents||g.widgetNode.setAttribute("cm-ignore-events","true"),d.insertLeft&&(g.widgetNode.insertLeft=!0)),g.collapsed){if(ka(a,b.line,b,c,g)||b.line!=c.line&&ka(a,c.line,b,c,g))throw new Error("Inserting collapsed marker partially overlapping an existing one");U()}g.addToHistory&&be(a,{from:b,to:c,origin:"markText"},a.sel,NaN);var i,j=b.line,l=a.cm;if(a.iter(j,c.line+1,function(a){l&&g.collapsed&&!l.options.lineWrapping&&la(a)==l.display.maxLine&&(i=!0),g.collapsed&&j!=b.line&&E(a,0),Y(a,new V(g,j==b.line?b.ch:null,j==c.line?c.ch:null)),++j}),g.collapsed&&a.iter(b.line,c.line+1,function(b){qa(a,b)&&E(b,0)}),g.clearOnEnter&&Ng(g,"beforeCursorEnter",function(){return g.clear()}),g.readOnly&&(T(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),g.collapsed&&(g.id=++oh,g.atomic=!0),l){if(i&&(l.curOp.updateMaxLine=!0),g.collapsed)od(l,b.line,c.line+1);else if(g.className||g.title||g.startStyle||g.endStyle||g.css)for(var m=b.line;m<=c.line;m++)pd(l,m,"text");g.atomic&&ue(l.doc),xb(l,"markerAdded",l,g)}return g}function Pe(a,b,c,d,e){d=k(d),d.shared=!1;var f=[Oe(a,b,c,d,e)],g=f[0],h=d.widgetNode;return Vd(a,function(a){h&&(d.widgetNode=h.cloneNode(!0)),f.push(Oe(a,Q(a,b),Q(a,c),d,e));for(var i=0;i-1)return b.state.draggingText(a),void setTimeout(function(){return b.display.input.focus()},20);try{var i=a.dataTransfer.getData("Text");if(i){var j;if(b.state.draggingText&&!b.state.draggingText.copy&&(j=b.listSelections()),se(b.doc,Ld(c,c)),j)for(var k=0;k=0;b--)He(a.doc,"",d[b].from,d[b].to,"+delete");Sc(a)})}function gf(a,b){var c=B(a.doc,b),d=la(c);return d!=c&&(b=F(d)),Aa(!0,a,d,b,1)}function hf(a,b){var c=B(a.doc,b),d=ma(c);return d!=c&&(b=F(d)),Aa(!0,a,c,b,-1)}function jf(a,b){var c=gf(a,b.line),d=B(a.doc,c.line),e=xa(d,a.doc.direction);if(!e||0==e[0].level){var f=Math.max(0,d.text.search(/\S/)),g=b.line==c.line&&b.ch<=f&&b.ch;return J(c.line,g?0:f,c.sticky)}return c}function kf(a,b,c){if("string"==typeof b&&!(b=Ch[b]))return!1;a.display.input.ensurePolled();var d=a.display.shift,e=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),c&&(a.display.shift=!1),e=b(a)!=Bg}finally{a.display.shift=d,a.state.suppressEdits=!1}return e}function lf(a,b,c){for(var d=0;de-400&&0==K(Bh.pos,c)?d="triple":Ah&&Ah.time>e-400&&0==K(Ah.pos,c)?(d="double",Bh={time:e,pos:c}):(d="single",Ah={time:e,pos:c});var f,h=a.doc.sel,i=og?b.metaKey:b.ctrlKey;a.options.dragDrop&&Og&&!a.isReadOnly()&&"single"==d&&(f=h.contains(c))>-1&&(K((f=h.ranges[f]).from(),c)<0||c.xRel>0)&&(K(f.to(),c)>0||c.xRel<0)?vf(a,b,c,i):wf(a,b,c,d,i)}function vf(a,b,c,d){var e=a.display,f=!1,g=ld(a,function(b){eg&&(e.scroller.draggable=!1),a.state.draggingText=!1,Da(document,"mouseup",g),Da(document,"mousemove",h),Da(e.scroller,"dragstart",i),Da(e.scroller,"drop",g),f||(Ja(b),d||le(a.doc,c),eg||cg&&9==dg?setTimeout(function(){document.body.focus(),e.input.focus()},20):e.input.focus())}),h=function(a){f=f||Math.abs(b.clientX-a.clientX)+Math.abs(b.clientY-a.clientY)>=10},i=function(){return f=!0};eg&&(e.scroller.draggable=!0),a.state.draggingText=g,g.copy=og?b.altKey:b.ctrlKey,e.scroller.dragDrop&&e.scroller.dragDrop(),Ng(document,"mouseup",g),Ng(document,"mousemove",h),Ng(e.scroller,"dragstart",i),Ng(e.scroller,"drop",g),Fc(a),setTimeout(function(){return e.input.focus()},20)}function wf(a,b,c,d,e){function f(b){if(0!=K(t,b))if(t=b,"rect"==d){for(var e=[],f=a.options.tabSize,g=l(B(k,c.line).text,c.ch,f),h=l(B(k,b.line).text,b.ch,f),i=Math.min(g,h),j=Math.max(g,h),q=Math.min(c.line,b.line),r=Math.min(a.lastLine(),Math.max(c.line,b.line));q<=r;q++){var s=B(k,q).text,u=n(s,i,f);i==j?e.push(new kh(J(q,u),J(q,u))):s.length>u&&e.push(new kh(J(q,u),J(q,n(s,j,f))))}e.length||e.push(new kh(c,c)),re(k,Kd(p.ranges.slice(0,o).concat(e),o),{origin:"*mouse",scroll:!1}),a.scrollIntoView(b)}else{var v=m,w=v.anchor,x=b;if("single"!=d){var y;y="double"==d?a.findWordAt(b):new kh(J(b.line,0),Q(k,J(b.line+1,0))),K(y.anchor,w)>0?(x=y.head,w=O(v.from(),y.anchor)):(x=y.anchor,w=N(v.to(),y.head))}var z=p.ranges.slice(0);z[o]=new kh(Q(k,w),x),re(k,Kd(z,o),Dg)}}function h(b){var c=++v,e=xc(a,b,!0,"rect"==d);if(e)if(0!=K(e,t)){a.curOp.focus=g(),f(e);var i=Kc(j,k);(e.line>=i.to||e.lineu.bottom?20:0;l&&setTimeout(ld(a,function(){v==c&&(j.scroller.scrollTop+=l,h(b))}),50)}}function i(b){a.state.selectingText=!1,v=1/0,Ja(b),j.input.focus(),Da(document,"mousemove",w),Da(document,"mouseup",x),k.history.lastSelOrigin=null}var j=a.display,k=a.doc;Ja(b);var m,o,p=k.sel,q=p.ranges;if(e&&!b.shiftKey?(o=k.sel.contains(c),m=o>-1?q[o]:new kh(c,c)):(m=k.sel.primary(),o=k.sel.primIndex),pg?b.shiftKey&&b.metaKey:b.altKey)d="rect",e||(m=new kh(c,c)),c=xc(a,b,!0,!0),o=-1;else if("double"==d){var r=a.findWordAt(c);m=a.display.shift||k.extend?ke(k,m,r.anchor,r.head):r}else if("triple"==d){var s=new kh(J(c.line,0),Q(k,J(c.line+1,0)));m=a.display.shift||k.extend?ke(k,m,s.anchor,s.head):s}else m=ke(k,m,c);e?o==-1?(o=q.length,re(k,Kd(q.concat([m]),o),{scroll:!1,origin:"*mouse"})):q.length>1&&q[o].empty()&&"single"==d&&!b.shiftKey?(re(k,Kd(q.slice(0,o).concat(q.slice(o+1)),0),{scroll:!1,origin:"*mouse"}),p=k.sel):ne(k,o,m,Dg):(o=0,re(k,new jh([m],0),Dg),p=k.sel);var t=c,u=j.wrapper.getBoundingClientRect(),v=0,w=ld(a,function(a){Oa(a)?h(a):i(a)}),x=ld(a,i);a.state.selectingText=x,Ng(document,"mousemove",w),Ng(document,"mouseup",x)}function xf(a,b,c,d){var e,f;try{e=b.clientX,f=b.clientY}catch(a){return!1}if(e>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;d&&Ja(b);var g=a.display,h=g.lineDiv.getBoundingClientRect();if(f>h.bottom||!Ha(a,c))return La(b);f-=h.top-g.viewOffset;for(var i=0;i=e){return Ea(a,c,a,G(a.doc,f),a.options.gutters[i],b),La(b)}}}function yf(a,b){return xf(a,b,"gutterClick",!0)}function zf(a,b){Mb(a.display,b)||Af(a,b)||Fa(a,b,"contextmenu")||a.display.input.onContextMenu(b)}function Af(a,b){return!!Ha(a,"gutterContextMenu")&&xf(a,b,"gutterContextMenu",!1)}function Bf(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ec(a)}function Cf(a){Fd(a),od(a),Lc(a)}function Df(a,b,c){if(!b!=!(c&&c!=Fh)){var d=a.display.dragFunctions,e=b?Ng:Da;e(a.display.scroller,"dragstart",d.start),e(a.display.scroller,"dragenter",d.enter),e(a.display.scroller,"dragover",d.over),e(a.display.scroller,"dragleave",d.leave),e(a.display.scroller,"drop",d.drop)}}function Ef(a){a.options.lineWrapping?(h(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(vg(a.display.wrapper,"CodeMirror-wrap"),ua(a)),wc(a),od(a),ec(a),setTimeout(function(){return _c(a)},100)}function Ff(a,b){var c=this;if(!(this instanceof Ff))return new Ff(a,b);this.options=b=b?k(b):{},k(Gh,b,!1),Gd(b);var d=b.value;"string"==typeof d&&(d=new sh(d,b.mode,null,b.lineSeparator,b.direction)),this.doc=d;var e=new Ff.inputStyles[b.inputStyle](this),f=this.display=new A(a,d,e);f.wrapper.CodeMirror=this,Fd(this),Bf(this),b.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),bd(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 xg,keySeq:null,specialChars:null},b.autofocus&&!ng&&f.input.focus(),cg&&dg<11&&setTimeout(function(){return c.display.input.reset(!0)},20),Gf(this),Ye(),cd(this),this.curOp.forceUpdate=!0,Wd(this,d),b.autofocus&&!ng||this.hasFocus()?setTimeout(j(Gc,this),20):Hc(this);for(var g in Hh)Hh.hasOwnProperty(g)&&Hh[g](c,b[g],Fh);Mc(this),b.finishInit&&b.finishInit(this);for(var h=0;h400}var e=a.display;Ng(e.scroller,"mousedown",ld(a,tf)),cg&&dg<11?Ng(e.scroller,"dblclick",ld(a,function(b){if(!Fa(a,b)){var c=xc(a,b);if(c&&!yf(a,b)&&!Mb(a.display,b)){Ja(b);var d=a.findWordAt(c);le(a.doc,d.anchor,d.head)}}})):Ng(e.scroller,"dblclick",function(b){return Fa(a,b)||Ja(b)}),ug||Ng(e.scroller,"contextmenu",function(b){return zf(a,b)});var f,g={end:0};Ng(e.scroller,"touchstart",function(b){if(!Fa(a,b)&&!c(b)){e.input.ensurePolled(),clearTimeout(f);var d=+new Date;e.activeTouch={start:d,moved:!1,prev:d-g.end<=300?g:null},1==b.touches.length&&(e.activeTouch.left=b.touches[0].pageX,e.activeTouch.top=b.touches[0].pageY)}}),Ng(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),Ng(e.scroller,"touchend",function(c){var f=e.activeTouch;if(f&&!Mb(e,c)&&null!=f.left&&!f.moved&&new Date-f.start<300){var g,h=a.coordsChar(e.activeTouch,"page");g=!f.prev||d(f,f.prev)?new kh(h,h):!f.prev.prev||d(f,f.prev.prev)?a.findWordAt(h):new kh(J(h.line,0),Q(a.doc,J(h.line+1,0))),a.setSelection(g.anchor,g.head),a.focus(),Ja(c)}b()}),Ng(e.scroller,"touchcancel",b),Ng(e.scroller,"scroll",function(){e.scroller.clientHeight&&(Xc(a,e.scroller.scrollTop),Zc(a,e.scroller.scrollLeft,!0),Ea(a,"scroll",a))}),Ng(e.scroller,"mousewheel",function(b){return Jd(a,b)}),Ng(e.scroller,"DOMMouseScroll",function(b){return Jd(a,b)}),Ng(e.wrapper,"scroll",function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={enter:function(b){Fa(a,b)||Ma(b)},over:function(b){Fa(a,b)||(Ve(a,b),Ma(b))},start:function(b){return Ue(a,b)},drop:ld(a,Te),leave:function(b){Fa(a,b)||We(a)}};var h=e.input.getField();Ng(h,"keyup",function(b){return rf.call(a,b)}),Ng(h,"keydown",ld(a,pf)),Ng(h,"keypress",ld(a,sf)),Ng(h,"focus",function(b){return Gc(a,b)}),Ng(h,"blur",function(b){return Hc(a,b)})}function Hf(a,b,c,d){var e,f=a.doc;null==c&&(c="add"),"smart"==c&&(f.mode.indent?e=ab(a,b):c="prev");var g=a.options.tabSize,h=B(f,b),i=l(h.text,null,g);h.stateAfter&&(h.stateAfter=null);var j,k=h.text.match(/^\s*/)[0];if(d||/\S/.test(h.text)){if("smart"==c&&((j=f.mode.indent(e,h.text.slice(k.length),h.text))==Bg||j>150)){if(!d)return;c="prev"}}else j=0,c="not";"prev"==c?j=b>f.first?l(B(f,b-1).text,null,g):0:"add"==c?j=i+a.options.indentUnit:"subtract"==c?j=i-a.options.indentUnit:"number"==typeof c&&(j=i+c),j=Math.max(0,j);var m="",n=0;if(a.options.indentWithTabs)for(var p=Math.floor(j/g);p;--p)n+=g,m+="\t";if(n1)if(Jh&&Jh.text.join("\n")==b){if(d.ranges.length%Jh.text.length==0){i=[];for(var j=0;j=0;l--){var m=d.ranges[l],n=m.from(),o=m.to();m.empty()&&(c&&c>0?n=J(n.line,n.ch-c):a.state.overwrite&&!g?o=J(o.line,Math.min(B(f,o.line).text.length,o.ch+p(h).length)):Jh&&Jh.lineWise&&Jh.text.join("\n")==b&&(n=o=J(n.line,0))),k=a.curOp.updateInput;var r={from:n,to:o,text:i?i[l%i.length]:h,origin:e||(g?"paste":a.state.cutIncoming?"cut":"+input")};Be(a.doc,r),xb(a,"inputRead",a,r)}b&&!g&&Lf(a,b),Sc(a),a.curOp.updateInput=k,a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=!1}function Kf(a,b){var c=a.clipboardData&&a.clipboardData.getData("Text");if(c)return a.preventDefault(),b.isReadOnly()||b.options.disableInput||kd(b,function(){return Jf(b,c,0,null,"paste")}),!0}function Lf(a,b){if(a.options.electricChars&&a.options.smartIndent)for(var c=a.doc.sel,d=c.ranges.length-1;d>=0;d--){var e=c.ranges[d];if(!(e.head.ch>100||d&&c.ranges[d-1].head.line==e.head.line)){var f=a.getModeAt(e.head),g=!1;if(f.electricChars){for(var h=0;h-1){g=Hf(a,e.head.line,"smart");break}}else f.electricInput&&f.electricInput.test(B(a.doc,e.head.line).text.slice(0,e.head.ch))&&(g=Hf(a,e.head.line,"smart")) +;g&&xb(a,"electricInput",a,e.head.line)}}}function Mf(a){for(var b=[],c=[],d=0;d=a.first+a.size)&&(b=new J(d,b.ch,b.sticky),j=B(a,d))}function g(d){var g;if(null==(g=e?Ba(a.cm,j,b,c):za(j,b,c))){if(d||!f())return!1;b=Aa(e,a.cm,j,b.line,c)}else b=g;return!0}var h=b,i=c,j=B(a,b.line);if("char"==d)g();else if("column"==d)g(!0);else if("word"==d||"group"==d)for(var k=null,l="group"==d,m=a.cm&&a.cm.getHelper(b,"wordChars"),n=!0;!(c<0)||g(!n);n=!1){var o=j.text.charAt(b.ch)||"\n",p=v(o,m)?"w":l&&"\n"==o?"n":!l||/\s/.test(o)?null:"p";if(!l||n||p||(p="s"),k&&k!=p){c<0&&(c=1,g(),b.sticky="after");break}if(p&&(k=p),c>0&&!g(!n))break}var q=xe(a,b,h,i,!0);return L(h,q)&&(q.hitSide=!0),q}function Qf(a,b,c,d){var e,f=a.doc,g=b.left;if("page"==d){var h=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),i=Math.max(h-.5*rc(a.display),3);e=(c>0?b.bottom:b.top)+c*i}else"line"==d&&(e=c>0?b.bottom+3:b.top-3);for(var j;j=nc(a,g,e),j.outside;){if(c<0?e<=0:e>=f.height){j.hitSide=!0;break}e+=5*c}return j}function Rf(a,b){var c=Xb(a,b.line);if(!c||c.hidden)return null;var d=B(a.doc,b.line),e=Ub(c,d,b.line),f=xa(d,a.doc.direction),g="left";if(f){g=wa(f,b.ch)%2?"right":"left"}var h=$b(e.map,b.ch,g);return h.offset="right"==h.collapse?h.end:h.start,h}function Sf(a){for(var b=a;b;b=b.parentNode)if(/CodeMirror-gutter-wrapper/.test(b.className))return!0;return!1}function Tf(a,b){return b&&(a.bad=!0),a}function Uf(a,b,c,d,e){function f(a){return function(b){return b.id==a}}function g(){k&&(j+=l,k=!1)}function h(a){a&&(g(),j+=a)}function i(b){if(1==b.nodeType){var c=b.getAttribute("cm-text");if(null!=c)return void h(c||b.textContent.replace(/\u200b/g,""));var j,m=b.getAttribute("cm-marker");if(m){var n=a.findMarks(J(d,0),J(e+1,0),f(+m));return void(n.length&&(j=n[0].find())&&h(C(a.doc,j.from,j.to).join(l)))}if("false"==b.getAttribute("contenteditable"))return;var o=/^(pre|div|p)$/i.test(b.nodeName);o&&g();for(var p=0;p=15&&(hg=!1,eg=!0);var sg,tg=og&&(fg||hg&&(null==rg||rg<12.11)),ug=$f||cg&&dg>=9,vg=function(b,c){var d=b.className,e=a(c).exec(d);if(e){var f=d.slice(e.index+e[0].length);b.className=d.slice(0,e.index)+(f?e[1]+f:"")}};sg=document.createRange?function(a,b,c,d){var e=document.createRange();return e.setEnd(d||a,c),e.setStart(a,b),e}:function(a,b,c){var d=document.body.createTextRange();try{d.moveToElementText(a.parentNode)}catch(a){return d}return d.collapse(!0),d.moveEnd("character",c),d.moveStart("character",b),d};var wg=function(a){a.select()};lg?wg=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:cg&&(wg=function(a){try{a.select()}catch(a){}});var xg=function(){this.id=null};xg.prototype.set=function(a,b){clearTimeout(this.id),this.id=setTimeout(b,a)};var yg,zg,Ag=30,Bg={toString:function(){return"CodeMirror.Pass"}},Cg={scroll:!1},Dg={origin:"*mouse"},Eg={origin:"+move"},Fg=[""],Gg=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Hg=/[\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]/,Ig=!1,Jg=!1,Kg=null,Lg=function(){function a(a){return a<=247?c.charAt(a):1424<=a&&a<=1524?"R":1536<=a&&a<=1785?d.charAt(a-1536):1774<=a&&a<=2220?"r":8192<=a&&a<=8203?"w":8204==a?"b":"L"}function b(a,b,c){this.level=a,this.from=b,this.to=c}var c="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",d="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,f=/[stwN]/,g=/[LRr]/,h=/[Lb1n]/,i=/[1n]/;return function(c,d){var j="ltr"==d?"L":"R";if(0==c.length||"ltr"==d&&!e.test(c))return!1;for(var k=c.length,l=[],m=0;m=this.string.length},Wg.prototype.sol=function(){return this.pos==this.lineStart},Wg.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Wg.prototype.next=function(){if(this.posb},Wg.prototype.eatSpace=function(){for(var a=this,b=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++a.pos;return this.pos>b},Wg.prototype.skipToEnd=function(){this.pos=this.string.length},Wg.prototype.skipTo=function(a){var b=this.string.indexOf(a,this.pos);if(b>-1)return this.pos=b,!0},Wg.prototype.backUp=function(a){this.pos-=a},Wg.prototype.column=function(){return this.lastColumnPos0?null:(d&&b!==!1&&(this.pos+=d[0].length),d)}var e=function(a){return c?a.toLowerCase():a};if(e(this.string.substr(this.pos,a.length))==e(a))return b!==!1&&(this.pos+=a.length),!0},Wg.prototype.current=function(){return this.string.slice(this.start,this.pos)},Wg.prototype.hideFirstChars=function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}};var Xg=function(a,b,c){this.text=a,da(this,b),this.height=c?c(this):1};Xg.prototype.lineNo=function(){return F(this)},Ia(Xg);var Yg,Zg={},$g={},_g=null,ah=null,bh={left:0,right:0,top:0,bottom:0},ch=function(a,b,c){this.cm=c;var e=this.vert=d("div",[d("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),f=this.horiz=d("div",[d("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");a(e),a(f),Ng(e,"scroll",function(){e.clientHeight&&b(e.scrollTop,"vertical")}),Ng(f,"scroll",function(){f.clientWidth&&b(f.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,cg&&dg<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ch.prototype.update=function(a){var b=a.scrollWidth>a.clientWidth+1,c=a.scrollHeight>a.clientHeight+1,d=a.nativeBarWidth;if(c){this.vert.style.display="block",this.vert.style.bottom=b?d+"px":"0";var e=a.viewHeight-(b?d:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+e)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(b){this.horiz.style.display="block",this.horiz.style.right=c?d+"px":"0",this.horiz.style.left=a.barLeft+"px";var f=a.viewWidth-a.barLeft-(c?d:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+f)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(0==d&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:c?d:0,bottom:b?d:0}},ch.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ch.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ch.prototype.zeroWidthHack=function(){var a=og&&!jg?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new xg,this.disableVert=new xg},ch.prototype.enableZeroWidthBar=function(a,b,c){function d(){var e=a.getBoundingClientRect();("vert"==c?document.elementFromPoint(e.right-1,(e.top+e.bottom)/2):document.elementFromPoint((e.right+e.left)/2,e.bottom-1))!=a?a.style.pointerEvents="none":b.set(1e3,d)}a.style.pointerEvents="auto",b.set(1e3,d)},ch.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var dh=function(){};dh.prototype.update=function(){return{bottom:0,right:0}},dh.prototype.setScrollLeft=function(){},dh.prototype.setScrollTop=function(){},dh.prototype.clear=function(){};var eh={native:ch,null:dh},fh=0,gh=function(a,b,c){var d=a.display;this.viewport=b,this.visible=Kc(d,a.doc,b),this.editorIsHidden=!d.wrapper.offsetWidth,this.wrapperHeight=d.wrapper.clientHeight,this.wrapperWidth=d.wrapper.clientWidth,this.oldDisplayWidth=Rb(a),this.force=c,this.dims=tc(a),this.events=[]};gh.prototype.signal=function(a,b){Ha(a,b)&&this.events.push(arguments)},gh.prototype.finish=function(){for(var a=this,b=0;b=0&&K(a,e.to())<=0)return d}return-1};var kh=function(a,b){this.anchor=a,this.head=b};kh.prototype.from=function(){return O(this.anchor,this.head)},kh.prototype.to=function(){return N(this.anchor,this.head)},kh.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};var lh=function(a){var b=this;this.lines=a,this.parent=null;for(var c=0,d=0;d1||!(this.children[0]instanceof lh))){var i=[];this.collapse(i),this.children=[new lh(i)],this.children[0].parent=this}},mh.prototype.collapse=function(a){for(var b=this,c=0;c50){for(var h=f.lines.length%25+25,i=h;i10);a.parent.maybeSpill()}},mh.prototype.iterN=function(a,b,c){for(var d=this,e=0;eb.display.maxLineLength&&(b.display.maxLine=k,b.display.maxLineLength=l,b.display.maxLineChanged=!0)}null!=e&&b&&this.collapsed&&od(b,e,f+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,b&&ue(b.doc)),b&&xb(b,"markerCleared",b,this,e,f),c&&dd(b),this.parent&&this.parent.clear()}},ph.prototype.find=function(a,b){var c=this;null==a&&"bookmark"==this.type&&(a=1);for(var d,e,f=0;f=0;j--)Be(d,e[j]);i?qe(this,i):this.cm&&Sc(this.cm)}),undo:nd(function(){De(this,"undo")}),redo:nd(function(){De(this,"redo")}),undoSelection:nd(function(){De(this,"undo",!0)}),redoSelection:nd(function(){De(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,b=0,c=0,d=0;d=a.ch)&&b.push(e.marker.parent||e.marker)}return b},findMarks:function(a,b,c){a=Q(this,a),b=Q(this,b);var d=[],e=a.line;return this.iter(a.line,b.line+1,function(f){var g=f.markedSpans;if(g)for(var h=0;h=i.to||null==i.from&&e!=a.line||null!=i.from&&e==b.line&&i.from>=b.ch||c&&!c(i.marker)||d.push(i.marker.parent||i.marker)}++e}),d},getAllMarks:function(){var a=[];return this.iter(function(b){var c=b.markedSpans;if(c)for(var d=0;da)return b=a,!0;a-=f,++c}),Q(this,J(c,b))},indexFromPos:function(a){a=Q(this,a);var b=a.ch;if(a.lineb&&(b=a.from),null!=a.to&&a.to0)e=new J(e.line,e.ch+1),a.replaceRange(f.charAt(e.ch-1)+f.charAt(e.ch-2),J(e.line,e.ch-2),e,"+transpose");else if(e.line>a.doc.first){var g=B(a.doc,e.line-1).text;g&&(e=new J(e.line,1),a.replaceRange(f.charAt(0)+a.doc.lineSeparator()+g.charAt(g.length-1),J(e.line-1,g.length-1),e,"+transpose"))}c.push(new kh(e,e))}a.setSelections(c)})},newlineAndIndent:function(a){return kd(a,function(){for(var b=a.listSelections(),c=b.length-1;c>=0;c--)a.replaceRange(a.doc.lineSeparator(),b[c].anchor,b[c].head,"+input");b=a.listSelections();for(var d=0;d=b.display.viewTo||e.line=b.display.viewFrom&&Rf(b,d)||{node:h[0].measure.map[2],offset:0},j=e.linea.firstLine()&&(d=J(d.line-1,B(a.doc,d.line-1).length)),e.ch==B(a.doc,e.line).text.length&&e.lineb.viewTo-1)return!1;var f,g,h;d.line==b.viewFrom||0==(f=yc(a,d.line))?(g=F(b.view[0].line),h=b.view[0].node):(g=F(b.view[f].line),h=b.view[f-1].node.nextSibling);var i,j,k=yc(a,e.line);if(k==b.view.length-1?(i=b.viewTo-1,j=b.lineDiv.lastChild):(i=F(b.view[k+1].line)-1,j=b.view[k+1].node.previousSibling),!h)return!1;for(var l=a.doc.splitLines(Uf(a,h,j,g,i)),m=C(a.doc,J(g,0),J(i,B(a.doc,i).text.length));l.length>1&&m.length>1;)if(p(l)==p(m))l.pop(),m.pop(),i--;else{if(l[0]!=m[0])break;l.shift(),m.shift(),g++}for(var n=0,o=0,q=l[0],r=m[0],s=Math.min(q.length,r.length);nd.ch&&t.charCodeAt(t.length-o-1)==u.charCodeAt(u.length-o-1);)n--,o++;l[l.length-1]=t.slice(0,t.length-o).replace(/^\u200b+/,""),l[0]=l[0].slice(n).replace(/\u200b+$/,"");var w=J(g,n),x=J(i,m.length?p(m).length-o:0);return l.length>1||l[0]||K(w,x)?(He(a.doc,l,w,x,"+input"),!0):void 0},Kh.prototype.ensurePolled=function(){this.forceCompositionEnd()},Kh.prototype.reset=function(){this.forceCompositionEnd()},Kh.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Kh.prototype.readFromDOMSoon=function(){var a=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(a.readDOMTimeout=null,a.composing){if(!a.composing.done)return;a.composing=null}a.updateFromDOM()},80))},Kh.prototype.updateFromDOM=function(){var a=this;!this.cm.isReadOnly()&&this.pollContent()||kd(this.cm,function(){return od(a.cm)})},Kh.prototype.setUneditable=function(a){a.contentEditable="false"},Kh.prototype.onKeyPress=function(a){0!=a.charCode&&(a.preventDefault(),this.cm.isReadOnly()||ld(this.cm,Jf)(this.cm,String.fromCharCode(null==a.charCode?a.keyCode:a.charCode),0))},Kh.prototype.readOnlyChanged=function(a){this.div.contentEditable=String("nocursor"!=a)},Kh.prototype.onContextMenu=function(){},Kh.prototype.resetPosition=function(){},Kh.prototype.needsContentAttribute=!0;var Lh=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new xg,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null};Lh.prototype.init=function(a){function b(a){if(!Fa(e,a)){if(e.somethingSelected())If({lineWise:!1,text:e.getSelections()}),d.inaccurateSelection&&(d.prevInput="",d.inaccurateSelection=!1,g.value=Jh.text.join("\n"),wg(g));else{if(!e.options.lineWiseCopyCut)return;var b=Mf(e);If({lineWise:!0,text:b.text}),"cut"==a.type?e.setSelections(b.ranges,null,Cg):(d.prevInput="",g.value=b.text.join("\n"),wg(g))}"cut"==a.type&&(e.state.cutIncoming=!0)}}var c=this,d=this,e=this.cm,f=this.wrapper=Of(),g=this.textarea=f.firstChild;a.wrapper.insertBefore(f,a.wrapper.firstChild),lg&&(g.style.width="0px"),Ng(g,"input",function(){cg&&dg>=9&&c.hasSelection&&(c.hasSelection=null),d.poll()}),Ng(g,"paste",function(a){Fa(e,a)||Kf(a,e)||(e.state.pasteIncoming=!0,d.fastPoll())}),Ng(g,"cut",b),Ng(g,"copy",b),Ng(a.scroller,"paste",function(b){Mb(a,b)||Fa(e,b)||(e.state.pasteIncoming=!0,d.focus())}),Ng(a.lineSpace,"selectstart",function(b){Mb(a,b)||Ja(b)}),Ng(g,"compositionstart",function(){var a=e.getCursor("from");d.composing&&d.composing.range.clear(),d.composing={start:a,range:e.markText(a,e.getCursor("to"),{className:"CodeMirror-composing"})}}),Ng(g,"compositionend",function(){d.composing&&(d.poll(),d.composing.range.clear(),d.composing=null)})},Lh.prototype.prepareSelection=function(){var a=this.cm,b=a.display,c=a.doc,d=Ac(a);if(a.options.moveInputWithCursor){var e=kc(a,c.sel.primary().head,"div"),f=b.wrapper.getBoundingClientRect(),g=b.lineDiv.getBoundingClientRect();d.teTop=Math.max(0,Math.min(b.wrapper.clientHeight-10,e.top+g.top-f.top)),d.teLeft=Math.max(0,Math.min(b.wrapper.clientWidth-10,e.left+g.left-f.left))}return d},Lh.prototype.showSelection=function(a){var b=this.cm,d=b.display;c(d.cursorDiv,a.cursors),c(d.selectionDiv,a.selection),null!=a.teTop&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Lh.prototype.reset=function(a){if(!this.contextMenuPending&&!this.composing){var b,c,d=this.cm,e=d.doc;if(d.somethingSelected()){this.prevInput="";var f=e.sel.primary();b=Rg&&(f.to().line-f.from().line>100||(c=d.getSelection()).length>1e3);var g=b?"-":c||d.getSelection();this.textarea.value=g,d.state.focused&&wg(this.textarea),cg&&dg>=9&&(this.hasSelection=g)}else a||(this.prevInput=this.textarea.value="",cg&&dg>=9&&(this.hasSelection=null));this.inaccurateSelection=b}},Lh.prototype.getField=function(){return this.textarea},Lh.prototype.supportsTouch=function(){return!1},Lh.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!ng||g()!=this.textarea))try{this.textarea.focus()}catch(a){}},Lh.prototype.blur=function(){this.textarea.blur()},Lh.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Lh.prototype.receivedFocus=function(){this.slowPoll()},Lh.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Lh.prototype.fastPoll=function(){function a(){c.poll()||b?(c.pollingFast=!1,c.slowPoll()):(b=!0,c.polling.set(60,a))}var b=!1,c=this;c.pollingFast=!0,c.polling.set(20,a)},Lh.prototype.poll=function(){var a=this,b=this.cm,c=this.textarea,d=this.prevInput;if(this.contextMenuPending||!b.state.focused||Qg(c)&&!d&&!this.composing||b.isReadOnly()||b.options.disableInput||b.state.keySeq)return!1;var e=c.value;if(e==d&&!b.somethingSelected())return!1;if(cg&&dg>=9&&this.hasSelection===e||og&&/[\uf700-\uf7ff]/.test(e))return b.display.input.reset(),!1;if(b.doc.sel==b.display.selForContextMenu){var f=e.charCodeAt(0);if(8203!=f||d||(d="​"),8666==f)return this.reset(),this.cm.execCommand("undo")}for(var g=0,h=Math.min(d.length,e.length);g1e3||e.indexOf("\n")>-1?c.value=a.prevInput="":a.prevInput=e,a.composing&&(a.composing.range.clear(),a.composing.range=b.markText(a.composing.start,b.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Lh.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Lh.prototype.onKeyPress=function(){cg&&dg>=9&&(this.hasSelection=null),this.fastPoll()},Lh.prototype.onContextMenu=function(a){function b(){if(null!=g.selectionStart){var a=e.somethingSelected(),b="​"+(a?g.value:"");g.value="⇚",g.value=b,d.prevInput=a?"":"​",g.selectionStart=1,g.selectionEnd=b.length,f.selForContextMenu=e.doc.sel}}function c(){if(d.contextMenuPending=!1,d.wrapper.style.cssText=k,g.style.cssText=j,cg&&dg<9&&f.scrollbars.setScrollTop(f.scroller.scrollTop=i),null!=g.selectionStart){(!cg||cg&&dg<9)&&b();var a=0,c=function(){f.selForContextMenu==e.doc.sel&&0==g.selectionStart&&g.selectionEnd>0&&"​"==d.prevInput?ld(e,ze)(e):a++<10?f.detectingSelectAll=setTimeout(c,500):(f.selForContextMenu=null,f.input.reset())};f.detectingSelectAll=setTimeout(c,200)}}var d=this,e=d.cm,f=e.display,g=d.textarea,h=xc(e,a),i=f.scroller.scrollTop;if(h&&!hg){e.options.resetSelectionOnContextMenu&&e.doc.sel.contains(h)==-1&&ld(e,re)(e.doc,Ld(h),Cg);var j=g.style.cssText,k=d.wrapper.style.cssText;d.wrapper.style.cssText="position: absolute";var l=d.wrapper.getBoundingClientRect();g.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(a.clientY-l.top-5)+"px; left: "+(a.clientX-l.left-5)+"px;\n z-index: 1000; background: "+(cg?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var m;if(eg&&(m=window.scrollY),f.input.focus(),eg&&window.scrollTo(null,m),f.input.reset(),e.somethingSelected()||(g.value=d.prevInput=" "),d.contextMenuPending=!0,f.selForContextMenu=e.doc.sel,clearTimeout(f.detectingSelectAll),cg&&dg>=9&&b(),ug){Ma(a);var n=function(){Da(window,"mouseup",n),setTimeout(c,20)};Ng(window,"mouseup",n)}else setTimeout(c,50)}},Lh.prototype.readOnlyChanged=function(a){a||this.reset()},Lh.prototype.setUneditable=function(){},Lh.prototype.needsContentAttribute=!1,function(a){function b(b,d,e,f){a.defaults[b]=d,e&&(c[b]=f?function(a,b,c){c!=Fh&&e(a,b,c)}:e)}var c=a.optionHandlers;a.defineOption=b,a.Init=Fh,b("value","",function(a,b){return a.setValue(b)},!0),b("mode",null,function(a,b){a.doc.modeOption=b,Rd(a)},!0),b("indentUnit",2,Rd,!0),b("indentWithTabs",!1),b("smartIndent",!0),b("tabSize",4,function(a){Sd(a),ec(a),od(a)},!0),b("lineSeparator",null,function(a,b){if(a.doc.lineSep=b,b){var c=[],d=a.doc.first;a.doc.iter(function(a){for(var e=0;;){var f=a.text.indexOf(b,e);if(f==-1)break;e=f+b.length,c.push(J(d,f))}d++});for(var e=c.length-1;e>=0;e--)He(a.doc,b,c[e],J(c[e].line,c[e].ch+b.length))}}),b("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(a,b,c){a.state.specialChars=new RegExp(b.source+(b.test("\t")?"":"|\t"),"g"),c!=Fh&&a.refresh()}),b("specialCharPlaceholder",mb,function(a){return a.refresh()},!0),b("electricChars",!0),b("inputStyle",ng?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),b("spellcheck",!1,function(a,b){return a.getInputField().spellcheck=b},!0),b("rtlMoveVisually",!qg),b("wholeLineUpdateBefore",!0),b("theme","default",function(a){Bf(a),Cf(a)},!0),b("keyMap","default",function(a,b,c){var d=ef(b),e=c!=Fh&&ef(c);e&&e.detach&&e.detach(a,d),d.attach&&d.attach(a,e||null)}),b("extraKeys",null),b("lineWrapping",!1,Ef,!0),b("gutters",[],function(a){Gd(a.options),Cf(a)},!0),b("fixedGutter",!0,function(a,b){a.display.gutters.style.left=b?uc(a.display)+"px":"0",a.refresh()},!0),b("coverGutterNextToScrollbar",!1,function(a){return _c(a)},!0),b("scrollbarStyle","native",function(a){bd(a),_c(a),a.display.scrollbars.setScrollTop(a.doc.scrollTop),a.display.scrollbars.setScrollLeft(a.doc.scrollLeft)},!0),b("lineNumbers",!1,function(a){Gd(a.options),Cf(a)},!0),b("firstLineNumber",1,Cf,!0),b("lineNumberFormatter",function(a){return a},Cf,!0),b("showCursorWhenSelecting",!1,zc,!0),b("resetSelectionOnContextMenu",!0),b("lineWiseCopyCut",!0),b("readOnly",!1,function(a,b){"nocursor"==b?(Hc(a),a.display.input.blur(),a.display.disabled=!0):a.display.disabled=!1,a.display.input.readOnlyChanged(b)}),b("disableInput",!1,function(a,b){b||a.display.input.reset()},!0),b("dragDrop",!0,Df),b("allowDropFileTypes",null),b("cursorBlinkRate",530),b("cursorScrollMargin",0),b("cursorHeight",1,zc,!0),b("singleCursorHeightPerLine",!0,zc,!0),b("workTime",100),b("workDelay",100),b("flattenSpans",!0,Sd,!0),b("addModeClass",!1,Sd,!0),b("pollInterval",100),b("undoDepth",200,function(a,b){return a.doc.history.undoDepth=b}),b("historyEventDelay",1250),b("viewportMargin",10,function(a){return a.refresh()},!0),b("maxHighlightLength",1e4,Sd,!0),b("moveInputWithCursor",!0,function(a,b){b||a.display.input.resetPosition()}),b("tabindex",null,function(a,b){return a.display.input.getField().tabIndex=b||""}),b("autofocus",null),b("direction","ltr",function(a,b){return a.doc.setDirection(b)},!0)}(Ff),function(a){var b=a.optionHandlers,c=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(a,c){var d=this.options,e=d[a];d[a]==c&&"mode"!=a||(d[a]=c,b.hasOwnProperty(a)&&ld(this,b[a])(this,c,e),Ea(this,"optionChange",this,a))},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,b){this.state.keyMaps[b?"push":"unshift"](ef(a))},removeKeyMap:function(a){for(var b=this.state.keyMaps,c=0;cd&&(Hf(b,f.head.line,a,!0),d=f.head.line,e==b.doc.sel.primIndex&&Sc(b));else{var g=f.from(),h=f.to(),i=Math.max(d,g.line);d=Math.min(b.lastLine(),h.line-(h.ch?0:1))+1;for(var j=i;j0&&ne(b.doc,e,new kh(g,k[e].to()),Cg)}}}),getTokenAt:function(a,b){return eb(this,a,b)},getLineTokens:function(a,b){return eb(this,J(a),b,!0)},getTokenTypeAt:function(a){a=Q(this.doc,a);var b,c=_a(this,B(this.doc,a.line)),d=0,e=(c.length-1)/2,f=a.ch;if(0==f)b=c[2];else for(;;){var g=d+e>>1;if((g?c[2*g-1]:0)>=f)e=g;else{if(!(c[2*g+1]f&&(a=f,e=!0),d=B(this.doc,a)}else d=a;return hc(this,d,{top:0,left:0},b||"page",c||e).top+(e?this.doc.height-sa(d):0)},defaultTextHeight:function(){return rc(this.display)},defaultCharWidth:function(){return sc(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(a,b,c,d,e){var f=this.display;a=kc(this,Q(this.doc,a));var g=a.bottom,h=a.left;if(b.style.position="absolute",b.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(b),f.sizer.appendChild(b),"over"==d)g=a.top;else if("above"==d||"near"==d){var i=Math.max(f.wrapper.clientHeight,this.doc.height),j=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);("above"==d||a.bottom+b.offsetHeight>i)&&a.top>b.offsetHeight?g=a.top-b.offsetHeight:a.bottom+b.offsetHeight<=i&&(g=a.bottom),h+b.offsetWidth>j&&(h=j-b.offsetWidth)}b.style.top=g+"px",b.style.left=b.style.right="","right"==e?(h=f.sizer.clientWidth-b.offsetWidth,b.style.right="0px"):("left"==e?h=0:"middle"==e&&(h=(f.sizer.clientWidth-b.offsetWidth)/2),b.style.left=h+"px"),c&&Pc(this,{left:h,top:g,right:h+b.offsetWidth,bottom:g+b.offsetHeight})},triggerOnKeyDown:md(pf),triggerOnKeyPress:md(sf),triggerOnKeyUp:rf,execCommand:function(a){if(Ch.hasOwnProperty(a))return Ch[a].call(null,this)},triggerElectric:md(function(a){Lf(this,a)}),findPosH:function(a,b,c,d){var e=this,f=1;b<0&&(f=-1,b=-b);for(var g=Q(this.doc,a),h=0;h0&&h(c.charAt(d-1));)--d;for(;e.5)&&wc(this),Ea(this,"refresh",this)}),swapDoc:md(function(a){var b=this.doc;return b.cm=null,Wd(this,a),ec(this),this.display.input.reset(),Tc(this,a.scrollLeft,a.scrollTop),this.curOp.forceScroll=!0,xb(this,"swapDoc",this,b),b}),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}},Ia(a),a.registerHelper=function(b,d,e){c.hasOwnProperty(b)||(c[b]=a[b]={_global:[]}),c[b][d]=e},a.registerGlobalHelper=function(b,d,e,f){a.registerHelper(b,d,f),c[b]._global.push({pred:e,val:f})}}(Ff);var Mh="iter insert remove copy getEditor constructor".split(" ");for(var Nh in sh.prototype)sh.prototype.hasOwnProperty(Nh)&&m(Mh,Nh)<0&&(Ff.prototype[Nh]=function(a){return function(){return a.apply(this.doc,arguments)}}(sh.prototype[Nh]));return Ia(sh),Ff.inputStyles={textarea:Lh,contenteditable:Kh},Ff.defineMode=function(a){Ff.defaults.mode||"null"==a||(Ff.defaults.mode=a),Sa.apply(this,arguments)},Ff.defineMIME=Ta,Ff.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Ff.defineMIME("text/plain","null"),Ff.defineExtension=function(a,b){Ff.prototype[a]=b},Ff.defineDocExtension=function(a,b){sh.prototype[a]=b},Ff.fromTextArea=Xf,function(a){a.off=Da,a.on=Ng,a.wheelEventPixels=Id,a.Doc=sh,a.splitLines=Pg,a.countColumn=l,a.findColumn=n,a.isWordChar=u,a.Pass=Bg,a.signal=Ea,a.Line=Xg,a.changeEnd=Md,a.scrollbarModel=eh,a.Pos=J,a.cmpPos=K,a.modes=Tg,a.mimeModes=Ug,a.resolveMode=Ua,a.getMode=Va,a.modeExtensions=Vg,a.extendMode=Wa,a.copyState=Xa,a.startState=Za,a.innerMode=Ya,a.commands=Ch,a.keyMap=zh,a.keyName=df,a.isModifierKey=cf,a.lookupKey=bf,a.normalizeKeyMap=af,a.StringStream=Wg,a.SharedTextMarker=qh,a.TextMarker=ph,a.LineWidget=nh,a.e_preventDefault=Ja,a.e_stopPropagation=Ka,a.e_stop=Ma,a.addClass=h,a.contains=f,a.rmClass=vg,a.keyNames=vh}(Ff),Ff.version="5.26.0",Ff}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/apl/apl.min.js b/media/vendor/codemirror/mode/apl/apl.min.js index ff5bd5cb204ba..304bb9ec6e449 100644 --- a/media/vendor/codemirror/mode/apl/apl.min.js +++ b/media/vendor/codemirror/mode/apl/apl.min.js @@ -1 +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";e.defineMode("apl",function(){var e={".":"innerProduct","\\":"scan","/":"reduce","⌿":"reduce1Axis","⍀":"scan1Axis","¨":"each","⍣":"power"},n={"+":["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"]},t=/[\.\/⌿⍀¨⍣]/,r=/⍬/,l=/[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/,a=/←/,i=/[⍝#].*$/,o=function(e){var n;return n=!1,function(t){return n=t,t!==e||"\\"===n}};return{startState:function(){return{prev:!1,func:!1,op:!1,string:!1,escape:!1}},token:function(u,s){var c,p;return u.eatSpace()?null:'"'===(c=u.next())||"'"===c?(u.eatWhile(o(c)),u.next(),s.prev=!0,"string"):/[\[{\(]/.test(c)?(s.prev=!1,null):/[\]}\)]/.test(c)?(s.prev=!0,null):r.test(c)?(s.prev=!1,"niladic"):/[¯\d]/.test(c)?(s.func?(s.func=!1,s.prev=!1):s.prev=!0,u.eatWhile(/[\w\.]/),"number"):t.test(c)?"operator apl-"+e[c]:a.test(c)?"apl-arrow":l.test(c)?(p="apl-",null!=n[c]&&(s.prev?p+=n[c][1]:p+=n[c][0]),s.func=!0,s.prev=!1,"function "+p):i.test(c)?(u.skipToEnd(),"comment"):"∘"===c&&"."===u.peek()?(u.next(),"function jot-dot"):(u.eatWhile(/[\w\$_]/),s.prev=!0,"keyword")}}}),e.defineMIME("text/apl","apl")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("apl",function(){var a={".":"innerProduct","\\":"scan","/":"reduce","⌿":"reduce1Axis","⍀":"scan1Axis","¨":"each","⍣":"power"},b={"+":["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"]},c=/[\.\/⌿⍀¨⍣]/,d=/⍬/,e=/[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/,f=/←/,g=/[⍝#].*$/,h=function(a){var b;return b=!1,function(c){return b=c,c!==a||"\\"===b}};return{startState:function(){return{prev:!1,func:!1,op:!1,string:!1,escape:!1}},token:function(i,j){var k,l;return i.eatSpace()?null:'"'===(k=i.next())||"'"===k?(i.eatWhile(h(k)),i.next(),j.prev=!0,"string"):/[\[{\(]/.test(k)?(j.prev=!1,null):/[\]}\)]/.test(k)?(j.prev=!0,null):d.test(k)?(j.prev=!1,"niladic"):/[¯\d]/.test(k)?(j.func?(j.func=!1,j.prev=!1):j.prev=!0,i.eatWhile(/[\w\.]/),"number"):c.test(k)?"operator apl-"+a[k]:f.test(k)?"apl-arrow":e.test(k)?(l="apl-",null!=b[k]&&(l+=j.prev?b[k][1]:b[k][0]),j.func=!0,j.prev=!1,"function "+l):g.test(k)?(i.skipToEnd(),"comment"):"∘"===k&&"."===i.peek()?(i.next(),"function jot-dot"):(i.eatWhile(/[\w\$_]/),j.prev=!0,"keyword")}}}),a.defineMIME("text/apl","apl")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/asciiarmor/asciiarmor.min.js b/media/vendor/codemirror/mode/asciiarmor/asciiarmor.min.js index b9a50851f133f..bbddf5df0ebeb 100644 --- a/media/vendor/codemirror/mode/asciiarmor/asciiarmor.min.js +++ b/media/vendor/codemirror/mode/asciiarmor/asciiarmor.min.js @@ -1 +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){var t=e.match(/^\s*\S/);return e.skipToEnd(),t?"error":null}e.defineMode("asciiarmor",function(){return{token:function(e,r){var a;if("top"==r.state)return e.sol()&&(a=e.match(/^-----BEGIN (.*)?-----\s*$/))?(r.state="headers",r.type=a[1],"tag"):t(e);if("headers"==r.state){if(e.sol()&&e.match(/^\w+:/))return r.state="header","atom";var i=t(e);return i&&(r.state="body"),i}return"header"==r.state?(e.skipToEnd(),r.state="headers","string"):"body"==r.state?e.sol()&&(a=e.match(/^-----END (.*)?-----\s*$/))?a[1]!=r.type?"error":(r.state="end","tag"):e.eatWhile(/[A-Za-z0-9+\/=]/)?null:(e.next(),"error"):"end"==r.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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){var b=a.match(/^\s*\S/);return a.skipToEnd(),b?"error":null}a.defineMode("asciiarmor",function(){return{token:function(a,c){var d;if("top"==c.state)return a.sol()&&(d=a.match(/^-----BEGIN (.*)?-----\s*$/))?(c.state="headers",c.type=d[1],"tag"):b(a);if("headers"==c.state){if(a.sol()&&a.match(/^\w+:/))return c.state="header","atom";var e=b(a);return e&&(c.state="body"),e}return"header"==c.state?(a.skipToEnd(),c.state="headers","string"):"body"==c.state?a.sol()&&(d=a.match(/^-----END (.*)?-----\s*$/))?d[1]!=c.type?"error":(c.state="end","tag"):a.eatWhile(/[A-Za-z0-9+\/=]/)?null:(a.next(),"error"):"end"==c.state?b(a):void 0},blankLine:function(a){"headers"==a.state&&(a.state="body")},startState:function(){return{state:"top",type:null}}}}),a.defineMIME("application/pgp","asciiarmor"),a.defineMIME("application/pgp-keys","asciiarmor"),a.defineMIME("application/pgp-signature","asciiarmor")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/asn.1/asn.min.js b/media/vendor/codemirror/mode/asn.1/asn.min.js index 66e65f8905d96..8280bb2f8140d 100644 --- a/media/vendor/codemirror/mode/asn.1/asn.min.js +++ b/media/vendor/codemirror/mode/asn.1/asn.min.js @@ -1 +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?$/.test(a)?(i.extenExten=!0,i.extenStart=!1,"strong"):(i.extenStart=!1,t.skipToEnd(),"error")):i.extenExten?(i.extenExten=!1,i.extenPriority=!0,t.eatWhile(/[^,]/),i.extenInclude&&(t.skipToEnd(),i.extenPriority=!1,i.extenInclude=!1),i.extenSame&&(i.extenPriority=!1,i.extenSame=!1,i.extenApplication=!0),"tag"):i.extenPriority?(i.extenPriority=!1,i.extenApplication=!0,t.next(),i.extenSame?null:(t.eatWhile(/[^,]/),"number")):i.extenApplication?(t.eatWhile(/,/),","===(a=t.current())?null:(t.eatWhile(/\w/),a=t.current().toLowerCase(),i.extenApplication=!1,-1!==n.indexOf(a)?"def strong":null)):e(t,i)}}}),e.defineMIME("text/x-asterisk","asterisk")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("asterisk",function(){function a(a,d){var e="",f=a.next();if(";"==f)return a.skipToEnd(),"comment";if("["==f)return a.skipTo("]"),a.eat("]"),"header";if('"'==f)return a.skipTo('"'),"string";if("'"==f)return a.skipTo("'"),"string-2";if("#"==f&&(a.eatWhile(/\w/),e=a.current(),c.indexOf(e)!==-1))return a.skipToEnd(),"strong";if("$"==f){if("{"==a.peek())return a.skipTo("}"),a.eat("}"),"variable-3"}if(a.eatWhile(/\w/),e=a.current(),b.indexOf(e)!==-1){switch(d.extenStart=!0,e){case"same":d.extenSame=!0;break;case"include":case"switch":case"ignorepat":d.extenInclude=!0}return"atom"}}var b=["exten","same","include","ignorepat","switch"],c=["#include","#exec"],d=["addqueuemember","adsiprog","aelsub","agentlogin","agentmonitoroutgoing","agi","alarmreceiver","amd","answer","authenticate","background","backgrounddetect","bridge","busy","callcompletioncancel","callcompletionrequest","celgenuserevent","changemonitor","chanisavail","channelredirect","chanspy","clearhash","confbridge","congestion","continuewhile","controlplayback","dahdiacceptr2call","dahdibarge","dahdiras","dahdiscan","dahdisendcallreroutingfacility","dahdisendkeypadfacility","datetime","dbdel","dbdeltree","deadagi","dial","dictate","directory","disa","dumpchan","eagi","echo","endwhile","exec","execif","execiftime","exitwhile","extenspy","externalivr","festival","flash","followme","forkcdr","getcpeid","gosub","gosubif","goto","gotoif","gotoiftime","hangup","iax2provision","ices","importvar","incomplete","ivrdemo","jabberjoin","jabberleave","jabbersend","jabbersendgroup","jabberstatus","jack","log","macro","macroexclusive","macroexit","macroif","mailboxexists","meetme","meetmeadmin","meetmechanneladmin","meetmecount","milliwatt","minivmaccmess","minivmdelete","minivmgreet","minivmmwi","minivmnotify","minivmrecord","mixmonitor","monitor","morsecode","mp3player","mset","musiconhold","nbscat","nocdr","noop","odbc","odbc","odbcfinish","originate","ospauth","ospfinish","osplookup","ospnext","page","park","parkandannounce","parkedcall","pausemonitor","pausequeuemember","pickup","pickupchan","playback","playtones","privacymanager","proceeding","progress","queue","queuelog","raiseexception","read","readexten","readfile","receivefax","receivefax","receivefax","record","removequeuemember","resetcdr","retrydial","return","ringing","sayalpha","saycountedadj","saycountednoun","saycountpl","saydigits","saynumber","sayphonetic","sayunixtime","senddtmf","sendfax","sendfax","sendfax","sendimage","sendtext","sendurl","set","setamaflags","setcallerpres","setmusiconhold","sipaddheader","sipdtmfmode","sipremoveheader","skel","slastation","slatrunk","sms","softhangup","speechactivategrammar","speechbackground","speechcreate","speechdeactivategrammar","speechdestroy","speechloadgrammar","speechprocessingsound","speechstart","speechunloadgrammar","stackpop","startmusiconhold","stopmixmonitor","stopmonitor","stopmusiconhold","stopplaytones","system","testclient","testserver","transfer","tryexec","trysystem","unpausemonitor","unpausequeuemember","userevent","verbose","vmauthenticate","vmsayname","voicemail","voicemailmain","wait","waitexten","waitfornoise","waitforring","waitforsilence","waitmusiconhold","waituntil","while","zapateller"];return{startState:function(){return{extenStart:!1,extenSame:!1,extenInclude:!1,extenExten:!1,extenPriority:!1,extenApplication:!1}},token:function(b,c){var e="";return b.eatSpace()?null:c.extenStart?(b.eatWhile(/[^\s]/),e=b.current(),/^=>?$/.test(e)?(c.extenExten=!0,c.extenStart=!1,"strong"):(c.extenStart=!1,b.skipToEnd(),"error")):c.extenExten?(c.extenExten=!1,c.extenPriority=!0,b.eatWhile(/[^,]/),c.extenInclude&&(b.skipToEnd(),c.extenPriority=!1,c.extenInclude=!1),c.extenSame&&(c.extenPriority=!1,c.extenSame=!1,c.extenApplication=!0),"tag"):c.extenPriority?(c.extenPriority=!1,c.extenApplication=!0,b.next(),c.extenSame?null:(b.eatWhile(/[^,]/),"number")):c.extenApplication?(b.eatWhile(/,/),","===(e=b.current())?null:(b.eatWhile(/\w/),e=b.current().toLowerCase(),c.extenApplication=!1,d.indexOf(e)!==-1?"def strong":null)):a(b,c)}}}),a.defineMIME("text/x-asterisk","asterisk")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/brainfuck/brainfuck.min.js b/media/vendor/codemirror/mode/brainfuck/brainfuck.min.js index b48a5922ab55f..85fe1f9cbc466 100644 --- a/media/vendor/codemirror/mode/brainfuck/brainfuck.min.js +++ b/media/vendor/codemirror/mode/brainfuck/brainfuck.min.js @@ -1 +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";var n="><+-.,[]".split("");e.defineMode("brainfuck",function(){return{startState:function(){return{commentLine:!1,left:0,right:0,commentLoop:!1}},token:function(e,t){if(e.eatSpace())return null;e.sol()&&(t.commentLine=!1);var o=e.next().toString();return-1===n.indexOf(o)?(t.commentLine=!0,e.eol()&&(t.commentLine=!1),"comment"):!0===t.commentLine?(e.eol()&&(t.commentLine=!1),"comment"):"]"===o||"["===o?("["===o?t.left++:t.right++,"bracket"):"+"===o||"-"===o?"keyword":"<"===o||">"===o?"atom":"."===o||","===o?"def":void(e.eol()&&(t.commentLine=!1))}}}),e.defineMIME("text/x-brainfuck","brainfuck")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";var b="><+-.,[]".split("");a.defineMode("brainfuck",function(){return{startState:function(){return{commentLine:!1,left:0,right:0,commentLoop:!1}},token:function(a,c){if(a.eatSpace())return null;a.sol()&&(c.commentLine=!1);var d=a.next().toString();return b.indexOf(d)===-1?(c.commentLine=!0,a.eol()&&(c.commentLine=!1),"comment"):c.commentLine===!0?(a.eol()&&(c.commentLine=!1),"comment"):"]"===d||"["===d?("["===d?c.left++:c.right++,"bracket"):"+"===d||"-"===d?"keyword":"<"===d||">"===d?"atom":"."===d||","===d?"def":void(a.eol()&&(c.commentLine=!1))}}}),a.defineMIME("text/x-brainfuck","brainfuck")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/clike/clike.min.js b/media/vendor/codemirror/mode/clike/clike.min.js index ac81d77b78ebb..a9f949f4ff313 100644 --- a/media/vendor/codemirror/mode/clike/clike.min.js +++ b/media/vendor/codemirror/mode/clike/clike.min.js @@ -1 +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,t,n,r,a,o){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=a,this.prev=o}function n(e,n,r,a){var o=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(o=e.context.indented),e.context=new t(o,n,r,a,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 a(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 i(e){for(var t={},n=e.split(" "),r=0;r!?|\/]/,z=s.isIdentifierChar||/[\w\$_\xa1-\uffff]/;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 i=t.context;if(e.sol()&&(null==i.align&&(i.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return f(e,t),null;p=m=null;var l=(t.tokenize||c)(e,t);if("comment"==l||"meta"==l)return l;if(null==i.align&&(i.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"==i.type;)i=r(t);for("}"==i.type&&(i=r(t));"statement"==i.type;)i=r(t)}else p==i.type?r(t):T&&(("}"==i.type||"top"==i.type)&&";"!=p||"statement"==i.type&&"newstatement"==p)&&n(t,e.column(),"statement",e.current());if("variable"==l&&("def"==t.prevToken||s.typeFirstDefinitions&&a(e,t,e.start)&&o(t.context)&&e.match(/^\s*\(/,!1))&&(l="def"),S.token){var u=S.token(e,t,l);void 0!==u&&(l=u)}return"def"==l&&!1===s.styleDefs&&(l="variable"),t.startOfLine=!1,t.prevToken=m?"def":l||p,f(e,t),l},indent:function(t,n){if(t.tokenize!=c&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var r=t.context,a=n&&n.charAt(0);if("statement"==r.type&&"}"==a&&(r=r.prev),s.dontIndentStatements)for(;"statement"==r.type&&s.dontIndentStatements.test(r.info);)r=r.prev;if(S.indent){var o=S.indent(t,r,n);if("number"==typeof o)return o}var i=a==r.type,l=r.prev&&"switch"==r.prev.info;if(s.allmanIndentation&&/[{(]/.test(a)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==a?0:g):!r.align||y&&")"==r.type?")"!=r.type||i?r.indented+(i?0:h)+(i||!l||/^(?:case|default)\b/.test(n)?0:h):r.indented+g:r.column+(i?0:1)},electricInput:M?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}});var b="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",k="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:i(b),types:i(k+" 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:i("case do else for if switch while struct"),defKeywords:i("struct"),typeFirstDefinitions:!0,atoms:i("null true false"),hooks:{"#":s,"*":c},modeProps:{fold:["brace","include"]}}),h(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:i(b+" 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:i(k+" bool wchar_t"),blockKeywords:i("catch class do else finally for if struct switch try while"),defKeywords:i("class namespace struct enum union"),typeFirstDefinitions:!0,atoms:i("true false null"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,hooks:{"#":s,"*":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:i("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:i("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:i("catch class do else finally for if switch try while"),defKeywords:i("class interface package enum @interface"),typeFirstDefinitions:!0,atoms:i("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:i("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:i("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:i("catch class do else finally for foreach if struct switch try while"),defKeywords:i("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:i("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:i("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:i("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:i("catch class do else finally for forSome if match switch try while"),defKeywords:i("class def object package trait type val var"),atoms:i("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:i("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 suspend"),types:i("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,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:i("catch class do else finally for if where try while enum"),defKeywords:i("class val var object package interface fun"),atoms:i("true false null this"),hooks:{'"':function(e,t){return t.tokenize=y(e.match('""')),t.tokenize(e,t)}},modeProps:{closeBrackets:{triples:'"'}}}),h(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:i("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:i("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:i("for while do if else struct"),builtin:i("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:i("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:{"#":s},modeProps:{fold:["brace","include"]}}),h("text/x-nesc",{name:"clike",keywords:i(b+"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:i(k),blockKeywords:i("case do else for if switch while struct"),atoms:i("null true false"),hooks:{"#":s},modeProps:{fold:["brace","include"]}}),h("text/x-objectivec",{name:"clike",keywords:i(b+"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:i(k),atoms:i("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(e){return e.eatWhile(/[\w\$]/),"keyword"},"#":s,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:i("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:i(k),blockKeywords:i("case catch class else for foreach if switch try while"),defKeywords:i("function local class"),typeFirstDefinitions:!0,atoms:i("true false null"),hooks:{"#":s},modeProps:{fold:["brace","include"]}});var w=null;h("text/x-ceylon",{name:"clike",keywords:i("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:i("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:i("class dynamic function interface module object package value"),builtin:i("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:i("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=x(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!w||!e.match("`"))&&(t.tokenize=w,w=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:'"'}}})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,c,d,e,f){this.indented=a,this.column=b,this.type=c,this.info=d,this.align=e,this.prev=f}function c(a,c,d,e){var f=a.indented;return a.context&&"statement"==a.context.type&&"statement"!=d&&(f=a.context.indented),a.context=new b(f,c,d,e,null,a.context)}function d(a){var b=a.context.type;return")"!=b&&"]"!=b&&"}"!=b||(a.indented=a.context.indented),a.context=a.context.prev}function e(a,b,c){return"variable"==b.prevToken||"variable-3"==b.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(a.string.slice(0,c))||(!(!b.typeAtEndOfLine||a.column()!=a.indentation())||void 0))}function f(a){for(;;){if(!a||"top"==a.type)return!0;if("}"==a.type&&"namespace"!=a.prev.info)return!1;a=a.prev}}function g(a){for(var b={},c=a.split(" "),d=0;d!?|\/]/,H=i.isIdentifierChar||/[\w\$_\xa1-\uffff]/;return{startState:function(a){return{tokenize:null,context:new b((a||0)-p,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(a,b){var g=b.context;if(a.sol()&&(null==g.align&&(g.align=!1),b.indented=a.indentation(),b.startOfLine=!0),a.eatSpace())return m(a,b),null;n=o=null;var h=(b.tokenize||j)(a,b);if("comment"==h||"meta"==h)return h;if(null==g.align&&(g.align=!0),";"==n||":"==n||","==n&&a.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==b.context.type;)d(b);else if("{"==n)c(b,a.column(),"}");else if("["==n)c(b,a.column(),"]");else if("("==n)c(b,a.column(),")");else if("}"==n){for(;"statement"==g.type;)g=d(b);for("}"==g.type&&(g=d(b));"statement"==g.type;)g=d(b)}else n==g.type?d(b):A&&(("}"==g.type||"top"==g.type)&&";"!=n||"statement"==g.type&&"newstatement"==n)&&c(b,a.column(),"statement",a.current());if("variable"==h&&("def"==b.prevToken||i.typeFirstDefinitions&&e(a,b,a.start)&&f(b.context)&&a.match(/^\s*\(/,!1))&&(h="def"),y.token){var k=y.token(a,b,h);void 0!==k&&(h=k)}return"def"==h&&i.styleDefs===!1&&(h="variable"),b.startOfLine=!1,b.prevToken=o?"def":h||n,m(a,b),h},indent:function(b,c){if(b.tokenize!=j&&null!=b.tokenize||b.typeAtEndOfLine)return a.Pass;var d=b.context,e=c&&c.charAt(0);if("statement"==d.type&&"}"==e&&(d=d.prev),i.dontIndentStatements)for(;"statement"==d.type&&i.dontIndentStatements.test(d.info);)d=d.prev;if(y.indent){var f=y.indent(b,d,c);if("number"==typeof f)return f}var g=e==d.type,h=d.prev&&"switch"==d.prev.info;if(i.allmanIndentation&&/[{(]/.test(e)){for(;"top"!=d.type&&"}"!=d.type;)d=d.prev;return d.indented}return"statement"==d.type?d.indented+("{"==e?0:q):!d.align||r&&")"==d.type?")"!=d.type||g?d.indented+(g?0:p)+(g||!h||/^(?:case|default)\b/.test(c)?0:p):d.indented+q:d.column+(g?0:1)},electricInput:B?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}});var t="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",u="int long char short double float unsigned signed void size_t ptrdiff_t";p(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:g(t),types:g(u+" 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:g("case do else for if switch while struct"),defKeywords:g("struct"),typeFirstDefinitions:!0,atoms:g("null true false"),hooks:{"#":i,"*":j},modeProps:{fold:["brace","include"]}}),p(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:g(t+" 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:g(u+" bool wchar_t"),blockKeywords:g("catch class do else finally for if struct switch try while"),defKeywords:g("class namespace struct enum union"),typeFirstDefinitions:!0,atoms:g("true false null"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,hooks:{"#":i,"*":j,u:l,U:l,L:l,R:l,0:k,1:k,2:k,3:k,4:k,5:k,6:k,7:k,8:k,9:k,token:function(a,b,c){if("variable"==c&&"("==a.peek()&&(";"==b.prevToken||null==b.prevToken||"}"==b.prevToken)&&m(a.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),p("text/x-java",{name:"clike",keywords:g("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:g("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:g("catch class do else finally for if switch try while"),defKeywords:g("class interface package enum @interface"),typeFirstDefinitions:!0,atoms:g("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(a){return!a.match("interface",!1)&&(a.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),p("text/x-csharp",{name:"clike",keywords:g("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:g("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:g("catch class do else finally for foreach if struct switch try while"),defKeywords:g("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:g("true false null"),hooks:{"@":function(a,b){return a.eat('"')?(b.tokenize=n,n(a,b)):(a.eatWhile(/[\w\$_]/),"meta")}}}),p("text/x-scala",{name:"clike",keywords:g("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:g("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:g("catch class do else finally for forSome if match switch try while"),defKeywords:g("class def object package trait type val var"),atoms:g("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(a){return a.eatWhile(/[\w\$_]/),"meta"},'"':function(a,b){return!!a.match('""')&&(b.tokenize=q,b.tokenize(a,b))},"'":function(a){return a.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(a,c){var d=c.context;return!("}"!=d.type||!d.align||!a.eat(">"))&&(c.context=new b(d.indented,d.column,d.type,d.info,null,d.prev),"operator")}},modeProps:{closeBrackets:{triples:'"'}}}),p("text/x-kotlin",{name:"clike",keywords:g("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 suspend"),types:g("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,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:g("catch class do else finally for if where try while enum"),defKeywords:g("class val var object package interface fun"),atoms:g("true false null this"),hooks:{'"':function(a,b){return b.tokenize=r(a.match('""')),b.tokenize(a,b)}},modeProps:{closeBrackets:{triples:'"'}}}),p(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:g("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:g("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:g("for while do if else struct"),builtin:g("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:g("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:{"#":i},modeProps:{fold:["brace","include"]}}),p("text/x-nesc",{name:"clike",keywords:g(t+"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:g(u),blockKeywords:g("case do else for if switch while struct"),atoms:g("null true false"),hooks:{"#":i},modeProps:{fold:["brace","include"]}}),p("text/x-objectivec",{name:"clike",keywords:g(t+"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:g(u),atoms:g("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(a){return a.eatWhile(/[\w\$]/),"keyword"},"#":i,indent:function(a,b,c){if("statement"==b.type&&/^@\w/.test(c))return b.indented}},modeProps:{fold:"brace"}}),p("text/x-squirrel",{name:"clike",keywords:g("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:g(u),blockKeywords:g("case catch class else for foreach if switch try while"),defKeywords:g("function local class"),typeFirstDefinitions:!0,atoms:g("true false null"),hooks:{"#":i},modeProps:{fold:["brace","include"]}});var v=null;p("text/x-ceylon",{name:"clike",keywords:g("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(a){var b=a.charAt(0);return b===b.toUpperCase()&&b!==b.toLowerCase()},blockKeywords:g("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:g("class dynamic function interface module object package value"),builtin:g("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:g("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(a){return a.eatWhile(/[\w\$_]/),"meta"},'"':function(a,b){return b.tokenize=s(a.match('""')?"triple":"single"),b.tokenize(a,b)},"`":function(a,b){return!(!v||!a.match("`"))&&(b.tokenize=v,v=null,b.tokenize(a,b))},"'":function(a){return a.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(a,b,c){if(("variable"==c||"variable-3"==c)&&"."==b.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/clojure/clojure.min.js b/media/vendor/codemirror/mode/clojure/clojure.min.js index 6cfe1aa61e675..69deb4588c60c 100644 --- a/media/vendor/codemirror/mode/clojure/clojure.min.js +++ b/media/vendor/codemirror/mode/clojure/clojure.min.js @@ -1 +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";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"),u=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->>"),f=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"),p={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 h,m=!1;null!=(h=e.next());){if('"'==h&&!m){t.mode=!1;break}m=!m&&"\\"==h}n="string";break;default:var y=e.next();if('"'==y)t.mode="string",n="string";else if("\\"==y)i(e),n="string-2";else if("'"!=y||p.digit_or_colon.test(e.peek()))if(";"==y)e.skipToEnd(),n="comment";else if(o(y,e))n="number";else if("("==y||"["==y||"{"==y){var g,b="",k=e.column();if("("==y)for(;null!=(g=e.eat(p.keyword_char));)b+=g;b.length>0&&(f.propertyIsEnumerable(b)||p.block_indent.test(b))?r(t,k+s,y):(e.eatSpace(),e.eol()||";"==e.peek()?r(t,k+d,y):r(t,k+e.current().length,y)),e.backUp(e.current().length-1),n="bracket"}else if(")"==y||"]"==y||"}"==y)n="bracket",null!=t.indentStack&&t.indentStack.type==(")"==y?"(":"]"==y?"[":"{")&&a(t);else{if(":"==y)return e.eatWhile(p.symbol),"atom";e.eatWhile(p.symbol),n=l&&l.propertyIsEnumerable(e.current())?"keyword":u&&u.propertyIsEnumerable(e.current())?"builtin":c&&c.propertyIsEnumerable(e.current())?"atom":"variable"}else n="atom"}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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("clojure",function(a){function b(a){for(var b={},c=a.split(" "),d=0;d ->> 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"),l=b("* *' *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->>"),m=b("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"),n={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(a,b){if(null==b.indentStack&&a.sol()&&(b.indentation=a.indentation()),"string"!=b.mode&&a.eatSpace())return null;var c=null;switch(b.mode){case"string":for(var o,p=!1;null!=(o=a.next());){if('"'==o&&!p){b.mode=!1;break}p=!p&&"\\"==o}c="string";break;default:var q=a.next();if('"'==q)b.mode="string",c="string";else if("\\"==q)g(a),c="string-2";else if("'"!=q||n.digit_or_colon.test(a.peek()))if(";"==q)a.skipToEnd(),c="comment";else if(f(q,a))c="number";else if("("==q||"["==q||"{"==q){var r,s="",t=a.column();if("("==q)for(;null!=(r=a.eat(n.keyword_char));)s+=r;s.length>0&&(m.propertyIsEnumerable(s)||n.block_indent.test(s))?d(b,t+h,q):(a.eatSpace(),a.eol()||";"==a.peek()?d(b,t+i,q):d(b,t+a.current().length,q)),a.backUp(a.current().length-1),c="bracket"}else if(")"==q||"]"==q||"}"==q)c="bracket",null!=b.indentStack&&b.indentStack.type==(")"==q?"(":"]"==q?"[":"{")&&e(b);else{if(":"==q)return a.eatWhile(n.symbol),"atom";a.eatWhile(n.symbol),c=k&&k.propertyIsEnumerable(a.current())?"keyword":l&&l.propertyIsEnumerable(a.current())?"builtin":j&&j.propertyIsEnumerable(a.current())?"atom":"variable"}else c="atom"}return c},indent:function(a){return null==a.indentStack?a.indentation:a.indentStack.indent},closeBrackets:{pairs:'()[]{}""'},lineComment:";;"}}),a.defineMIME("text/x-clojure","clojure"),a.defineMIME("text/x-clojurescript","clojure"),a.defineMIME("application/edn","clojure")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/cmake/cmake.min.js b/media/vendor/codemirror/mode/cmake/cmake.min.js index 58569884af966..6d08346201436 100644 --- a/media/vendor/codemirror/mode/cmake/cmake.min.js +++ b/media/vendor/codemirror/mode/cmake/cmake.min.js @@ -1 +1 @@ -!function(n){"object"==typeof exports&&"object"==typeof module?n(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}(function(n){"use strict";n.defineMode("cmake",function(){function n(n,e){for(var t,i,r=!1;!n.eol()&&(t=n.next())!=e.pending;){if("$"===t&&"\\"!=i&&'"'==e.pending){r=!0;break}i=t}return r&&n.backUp(1),t==e.pending?e.continueString=!1:e.continueString=!0,"string"}function e(e,i){var r=e.next();return"$"===r?e.match(t)?"variable-2":"variable":i.continueString?(e.backUp(1),n(e,i)):e.match(/(\s+)?\w+\(/)||e.match(/(\s+)?\w+\ \(/)?(e.backUp(1),"def"):"#"==r?(e.skipToEnd(),"comment"):"'"==r||'"'==r?(i.pending=r,n(e,i)):"("==r||")"==r?"bracket":r.match(/[0-9]/)?"number":(e.eatWhile(/[\w-]/),null)}var t=/({)?[a-zA-Z0-9_]+(})?/;return{startState:function(){var n={};return n.inDefinition=!1,n.inInclude=!1,n.continueString=!1,n.pending=!1,n},token:function(n,t){return n.eatSpace()?null:e(n,t)}}}),n.defineMIME("text/x-cmake","cmake")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("cmake",function(){function a(a,b){for(var c,d,e=!1;!a.eol()&&(c=a.next())!=b.pending;){if("$"===c&&"\\"!=d&&'"'==b.pending){e=!0;break}d=c}return e&&a.backUp(1),c==b.pending?b.continueString=!1:b.continueString=!0,"string"}function b(b,d){var e=b.next();return"$"===e?b.match(c)?"variable-2":"variable":d.continueString?(b.backUp(1),a(b,d)):b.match(/(\s+)?\w+\(/)||b.match(/(\s+)?\w+\ \(/)?(b.backUp(1),"def"):"#"==e?(b.skipToEnd(),"comment"):"'"==e||'"'==e?(d.pending=e,a(b,d)):"("==e||")"==e?"bracket":e.match(/[0-9]/)?"number":(b.eatWhile(/[\w-]/),null)}var c=/({)?[a-zA-Z0-9_]+(})?/;return{startState:function(){var a={};return a.inDefinition=!1,a.inInclude=!1,a.continueString=!1,a.pending=!1,a},token:function(a,c){return a.eatSpace()?null:b(a,c)}}}),a.defineMIME("text/x-cmake","cmake")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/cobol/cobol.min.js b/media/vendor/codemirror/mode/cobol/cobol.min.js index 91af135698d3c..d7463cc823787 100644 --- a/media/vendor/codemirror/mode/cobol/cobol.min.js +++ b/media/vendor/codemirror/mode/cobol/cobol.min.js @@ -1 +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";E.defineMode("cobol",function(){function E(E){for(var T={},I=E.split(" "),N=0;N >= "),A={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,O){if(null==O.indentStack&&E.sol()&&(O.indentation=6),E.eatSpace())return null;var C=null;switch(O.mode){case"string":for(var L=!1;null!=(L=E.next());)if('"'==L||"'"==L){O.mode=!1;break}C="string";break;default:var D=E.next(),S=E.column();if(S>=0&&S<=5)C="def";else if(S>=72&&S<=79)E.skipToEnd(),C="header";else if("*"==D&&6==S)E.skipToEnd(),C="comment";else if('"'==D||"'"==D)O.mode="string",C="string";else if("'"!=D||A.digit_or_colon.test(E.peek()))if("."==D)C="link";else if(T(D,E))C="number";else{if(E.current().match(A.symbol))for(;S<71&&void 0!==E.eat(A.symbol);)S++;C=N&&N.propertyIsEnumerable(E.current().toUpperCase())?"keyword":R&&R.propertyIsEnumerable(E.current().toUpperCase())?"builtin":I&&I.propertyIsEnumerable(E.current().toUpperCase())?"atom":null}else C="atom"}return C},indent:function(E){return null==E.indentStack?E.indentation:E.indentStack.indent}}}),E.defineMIME("text/x-cobol","cobol")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("cobol",function(){function a(a){for(var b={},c=a.split(" "),d=0;d >= "),f={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(a,g){if(null==g.indentStack&&a.sol()&&(g.indentation=6),a.eatSpace())return null;var h=null;switch(g.mode){case"string":for(var i=!1;null!=(i=a.next());)if('"'==i||"'"==i){g.mode=!1;break}h="string";break;default:var j=a.next(),k=a.column();if(k>=0&&k<=5)h="def";else if(k>=72&&k<=79)a.skipToEnd(),h="header";else if("*"==j&&6==k)a.skipToEnd(),h="comment";else if('"'==j||"'"==j)g.mode="string",h="string";else if("'"!=j||f.digit_or_colon.test(a.peek()))if("."==j)h="link";else if(b(j,a))h="number";else{if(a.current().match(f.symbol))for(;k<71&&void 0!==a.eat(f.symbol);)k++;h=d&&d.propertyIsEnumerable(a.current().toUpperCase())?"keyword":e&&e.propertyIsEnumerable(a.current().toUpperCase())?"builtin":c&&c.propertyIsEnumerable(a.current().toUpperCase())?"atom":null}else h="atom"}return h},indent:function(a){return null==a.indentStack?a.indentation:a.indentStack.indent}}}),a.defineMIME("text/x-cobol","cobol")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/coffeescript/coffeescript.min.js b/media/vendor/codemirror/mode/coffeescript/coffeescript.min.js index e45e6112a51b1..93648e2df3945 100644 --- a/media/vendor/codemirror/mode/coffeescript/coffeescript.min.js +++ b/media/vendor/codemirror/mode/coffeescript/coffeescript.min.js @@ -1 +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";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&&f(e,t)}if(e.eatSpace())return null;var c=e.peek();if(e.match("####"))return e.skipToEnd(),"comment";if(e.match("###"))return t.tokenize=i,t.tokenize(e,t);if("#"===c)return e.skipToEnd(),"comment";if(e.match(/^-?[0-9\.]/,!1)){var a=!1;if(e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(a=!0),e.match(/^-?\d+\.\d*/)&&(a=!0),e.match(/^-?\.\d+/)&&(a=!0),a)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(y))return t.tokenize=o(e.current(),!1,"string"),t.tokenize(e,t);if(e.match(g)){if("/"!=e.current()||e.match(/^.*\//,!1))return t.tokenize=o(e.current(),!0,"string-2"),t.tokenize(e,t);e.backUp(1)}return e.match(s)||e.match(m)?"operator":e.match(u)?"punctuation":e.match(b)?"atom":e.match(d)||t.prop&&e.match(l)?"property":e.match(k)?"keyword":e.match(l)?"variable":(e.next(),p)}function o(e,n,o){return function(i,c){for(;!i.eol();)if(i.eatWhile(/[^'"\/\\]/),i.eat("\\")){if(i.next(),n&&i.eol())return o}else{if(i.match(e))return c.tokenize=r,o;i.eat(/['"\/]/)}return n&&(t.singleLineStringErrors?o=p:c.tokenize=r),o}}function i(e,t){for(;!e.eol();){if(e.eatWhile(/[^#]/),e.match("###")){t.tokenize=r;break}e.eatWhile("#")}return"comment"}function c(t,n,r){r=r||"coffee";for(var o=0,i=!1,c=null,f=n.scope;f;f=f.prev)if("coffee"===f.type||"}"==f.type){o=f.offset+e.indentUnit;break}"coffee"!==r?(i=null,c=t.column()+t.current().length):n.scope.align&&(n.scope.align=!1),n.scope={offset:o,type:r,prev:n.scope,align:i,alignOffset:c}}function f(e,t){if(t.scope.prev){if("coffee"===t.scope.type){for(var n=e.indentation(),r=!1,o=t.scope;o;o=o.prev)if(n===o.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 a(e,t){var n=t.tokenize(e,t),r=e.current();"return"===r&&(t.dedent=!0),(("->"===r||"=>"===r)&&e.eol()||"indent"===n)&&c(e,t);var o="[({".indexOf(r);if(-1!==o&&c(e,t,"])}".slice(o,o+1)),h.exec(r)&&c(e,t),"then"==r&&f(e,t),"dedent"===n&&f(e,t))return p;if(-1!==(o="])}".indexOf(r))){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 p="error",s=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,u=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,l=/^[_A-Za-z$][_A-Za-z$0-9]*/,d=/^@[_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"],v=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"],k=n(h.concat(v));h=n(h);var y=/^('{3}|\"{3}|['\"])/,g=/^(\/{3}|\/)/,b=n(["Infinity","NaN","undefined","null","true","false","on","off","yes","no"]);return{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=a(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,o=t&&"])}".indexOf(t.charAt(0))>-1;if(o)for(;"coffee"==n.type&&n.prev;)n=n.prev;var i=o&&n.type===t.charAt(0);return n.align?n.alignOffset-(i?1:0):(i?n.prev:n).offset},lineComment:"#",fold:"indent"}}),e.defineMIME("text/x-coffeescript","coffeescript"),e.defineMIME("text/coffeescript","coffeescript")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("coffeescript",function(a,b){function c(a){return new RegExp("^(("+a.join(")|(")+"))\\b")}function d(a,b){if(a.sol()){null===b.scope.align&&(b.scope.align=!1);var c=b.scope.offset;if(a.eatSpace()){var d=a.indentation();return d>c&&"coffee"==b.scope.type?"indent":d0&&h(a,b)}if(a.eatSpace())return null;var g=a.peek();if(a.match("####"))return a.skipToEnd(),"comment";if(a.match("###"))return b.tokenize=f,b.tokenize(a,b);if("#"===g)return a.skipToEnd(),"comment";if(a.match(/^-?[0-9\.]/,!1)){var i=!1;if(a.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(i=!0),a.match(/^-?\d+\.\d*/)&&(i=!0),a.match(/^-?\.\d+/)&&(i=!0),i)return"."==a.peek()&&a.backUp(1),"number";var p=!1;if(a.match(/^-?0x[0-9a-f]+/i)&&(p=!0),a.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(p=!0),a.match(/^-?0(?![\dx])/i)&&(p=!0),p)return"number"}if(a.match(s))return b.tokenize=e(a.current(),!1,"string"),b.tokenize(a,b);if(a.match(t)){if("/"!=a.current()||a.match(/^.*\//,!1))return b.tokenize=e(a.current(),!0,"string-2"),b.tokenize(a,b);a.backUp(1)}return a.match(k)||a.match(o)?"operator":a.match(l)?"punctuation":a.match(v)?"atom":a.match(n)||b.prop&&a.match(m)?"property":a.match(r)?"keyword":a.match(m)?"variable":(a.next(),j)}function e(a,c,e){return function(f,g){for(;!f.eol();)if(f.eatWhile(/[^'"\/\\]/),f.eat("\\")){if(f.next(),c&&f.eol())return e}else{if(f.match(a))return g.tokenize=d,e;f.eat(/['"\/]/)}return c&&(b.singleLineStringErrors?e=j:g.tokenize=d),e}}function f(a,b){for(;!a.eol();){if(a.eatWhile(/[^#]/),a.match("###")){b.tokenize=d;break}a.eatWhile("#")}return"comment"}function g(b,c,d){d=d||"coffee";for(var e=0,f=!1,g=null,h=c.scope;h;h=h.prev)if("coffee"===h.type||"}"==h.type){e=h.offset+a.indentUnit;break}"coffee"!==d?(f=null,g=b.column()+b.current().length):c.scope.align&&(c.scope.align=!1),c.scope={offset:e,type:d,prev:c.scope,align:f,alignOffset:g}}function h(a,b){if(b.scope.prev){if("coffee"===b.scope.type){for(var c=a.indentation(),d=!1,e=b.scope;e;e=e.prev)if(c===e.offset){d=!0;break}if(!d)return!0;for(;b.scope.prev&&b.scope.offset!==c;)b.scope=b.scope.prev;return!1}return b.scope=b.scope.prev,!1}}function i(a,b){var c=b.tokenize(a,b),d=a.current();"return"===d&&(b.dedent=!0),(("->"===d||"=>"===d)&&a.eol()||"indent"===c)&&g(a,b);var e="[({".indexOf(d);if(e!==-1&&g(a,b,"])}".slice(e,e+1)),p.exec(d)&&g(a,b),"then"==d&&h(a,b),"dedent"===c&&h(a,b))return j;if((e="])}".indexOf(d))!==-1){for(;"coffee"==b.scope.type&&b.scope.prev;)b.scope=b.scope.prev;b.scope.type==d&&(b.scope=b.scope.prev)}return b.dedent&&a.eol()&&("coffee"==b.scope.type&&b.scope.prev&&(b.scope=b.scope.prev),b.dedent=!1),c}var j="error",k=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,l=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,m=/^[_A-Za-z$][_A-Za-z$0-9]*/,n=/^@[_A-Za-z$][_A-Za-z$0-9]*/,o=c(["and","or","not","is","isnt","in","instanceof","typeof"]),p=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],q=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"],r=c(p.concat(q));p=c(p);var s=/^('{3}|\"{3}|['\"])/,t=/^(\/{3}|\/)/,u=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],v=c(u);return{startState:function(a){return{tokenize:d,scope:{offset:a||0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(a,b){var c=null===b.scope.align&&b.scope;c&&a.sol()&&(c.align=!1);var d=i(a,b);return d&&"comment"!=d&&(c&&(c.align=!0),b.prop="punctuation"==d&&"."==a.current()),d},indent:function(a,b){if(a.tokenize!=d)return 0;var c=a.scope,e=b&&"])}".indexOf(b.charAt(0))>-1;if(e)for(;"coffee"==c.type&&c.prev;)c=c.prev;var f=e&&c.type===b.charAt(0);return c.align?c.alignOffset-(f?1:0):(f?c.prev:c).offset},lineComment:"#",fold:"indent"}}),a.defineMIME("text/x-coffeescript","coffeescript"),a.defineMIME("text/coffeescript","coffeescript")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/commonlisp/commonlisp.min.js b/media/vendor/codemirror/mode/commonlisp/commonlisp.min.js index 9aaf818aa56d8..13ae85c7be267 100644 --- a/media/vendor/codemirror/mode/commonlisp/commonlisp.min.js +++ b/media/vendor/codemirror/mode/commonlisp/commonlisp.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("commonlisp",function(t){function e(t){for(var e;e=t.next();)if("\\"==e)t.next();else if(!a.test(e)){t.backUp(1);break}return t.current()}function n(t,n){if(t.eatSpace())return i="ws",null;if(t.match(u))return"number";var a=t.next();if("\\"==a&&(a=t.next()),'"'==a)return(n.tokenize=r)(t,n);if("("==a)return i="open","bracket";if(")"==a||"]"==a)return i="close","bracket";if(";"==a)return t.skipToEnd(),i="ws","comment";if(/['`,@]/.test(a))return null;if("|"==a)return t.skipTo("|")?(t.next(),"symbol"):(t.skipToEnd(),"error");if("#"==a)return"("==(a=t.next())?(i="open","bracket"):/[+\-=\.']/.test(a)?null:/\d/.test(a)&&t.match(/^\d*#/)?null:"|"==a?(n.tokenize=o)(t,n):":"==a?(e(t),"meta"):"\\"==a?(t.next(),e(t),"string-2"):"error";var s=e(t);return"."==s?null:(i="symbol","nil"==s||"t"==s||":"==s.charAt(0)?"atom":"open"==n.lastType&&(l.test(s)||c.test(s))?"keyword":"&"==s.charAt(0)?"variable-2":"variable")}function r(t,e){for(var r,o=!1;r=t.next();){if('"'==r&&!o){e.tokenize=n;break}o=!o&&"\\"==r}return"string"}function o(t,e){for(var r,o;r=t.next();){if("#"==r&&"|"==o){e.tokenize=n;break}o=r}return i="ws","comment"}var i,l=/^(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)$/,c=/^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/,u=/^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/,a=/[^\s'`,@()\[\]";]/;return{startState:function(){return{ctx:{prev:null,start:0,indentTo:0},lastType:null,tokenize:n}},token:function(e,n){e.sol()&&"number"!=typeof n.ctx.indentTo&&(n.ctx.indentTo=n.ctx.start+1),i=null;var r=n.tokenize(e,n);return"ws"!=i&&(null==n.ctx.indentTo?"symbol"==i&&c.test(e.current())?n.ctx.indentTo=n.ctx.start+t.indentUnit:n.ctx.indentTo="next":"next"==n.ctx.indentTo&&(n.ctx.indentTo=e.column()),n.lastType=i),"open"==i?n.ctx={prev:n.ctx,start:e.column(),indentTo:null}:"close"==i&&(n.ctx=n.ctx.prev||n.ctx),r},indent:function(t,e){var n=t.ctx.indentTo;return"number"==typeof n?n:t.ctx.start+1},closeBrackets:{pairs:'()[]{}""'},lineComment:";;",blockCommentStart:"#|",blockCommentEnd:"|#"}}),t.defineMIME("text/x-common-lisp","commonlisp")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("commonlisp",function(a){function b(a){for(var b;b=a.next();)if("\\"==b)a.next();else if(!j.test(b)){a.backUp(1);break}return a.current()}function c(a,c){if(a.eatSpace())return f="ws",null;if(a.match(i))return"number";var j=a.next();if("\\"==j&&(j=a.next()),'"'==j)return(c.tokenize=d)(a,c);if("("==j)return f="open","bracket";if(")"==j||"]"==j)return f="close","bracket";if(";"==j)return a.skipToEnd(),f="ws","comment";if(/['`,@]/.test(j))return null;if("|"==j)return a.skipTo("|")?(a.next(),"symbol"):(a.skipToEnd(),"error");if("#"==j){var j=a.next();return"("==j?(f="open","bracket"):/[+\-=\.']/.test(j)?null:/\d/.test(j)&&a.match(/^\d*#/)?null:"|"==j?(c.tokenize=e)(a,c):":"==j?(b(a),"meta"):"\\"==j?(a.next(),b(a),"string-2"):"error"}var k=b(a);return"."==k?null:(f="symbol","nil"==k||"t"==k||":"==k.charAt(0)?"atom":"open"==c.lastType&&(g.test(k)||h.test(k))?"keyword":"&"==k.charAt(0)?"variable-2":"variable")}function d(a,b){for(var d,e=!1;d=a.next();){if('"'==d&&!e){b.tokenize=c;break}e=!e&&"\\"==d}return"string"}function e(a,b){for(var d,e;d=a.next();){if("#"==d&&"|"==e){b.tokenize=c;break}e=d}return f="ws","comment"}var f,g=/^(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)$/,h=/^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/,i=/^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/,j=/[^\s'`,@()\[\]";]/;return{startState:function(){return{ctx:{prev:null,start:0,indentTo:0},lastType:null,tokenize:c}},token:function(b,c){b.sol()&&"number"!=typeof c.ctx.indentTo&&(c.ctx.indentTo=c.ctx.start+1),f=null;var d=c.tokenize(b,c);return"ws"!=f&&(null==c.ctx.indentTo?"symbol"==f&&h.test(b.current())?c.ctx.indentTo=c.ctx.start+a.indentUnit:c.ctx.indentTo="next":"next"==c.ctx.indentTo&&(c.ctx.indentTo=b.column()),c.lastType=f),"open"==f?c.ctx={prev:c.ctx,start:b.column(),indentTo:null}:"close"==f&&(c.ctx=c.ctx.prev||c.ctx),d},indent:function(a,b){var c=a.ctx.indentTo;return"number"==typeof c?c:a.ctx.start+1},closeBrackets:{pairs:'()[]{}""'},lineComment:";;",blockCommentStart:"#|",blockCommentEnd:"|#"}}),a.defineMIME("text/x-common-lisp","commonlisp")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/crystal/crystal.min.js b/media/vendor/codemirror/mode/crystal/crystal.min.js index 882bff04e4778..57dcb47889ada 100644 --- a/media/vendor/codemirror/mode/crystal/crystal.min.js +++ b/media/vendor/codemirror/mode/crystal/crystal.min.js @@ -1 +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";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(u("%","%"),e,t);if("\\"!=t.lastToken&&e.match("{{",!1))return n(u("{","}"),e,t);if("#"==e.peek())return e.skipToEnd(),"comment";var r;if(e.match(d))return e.eat(/[?!]/),r=e.current(),e.eat(":")?"atom":"."==t.lastToken?"property":z.test(r)?(b.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||!_.test(r)?"end"==r&&(t.blocks.pop(),t.currentIndent-=1):(t.blocks.push(r),t.currentIndent+=1),v.hasOwnProperty(r)&&t.tokenize.push(v[r]),"keyword"):F.test(r)?"atom":"variable";if(e.eat("@"))return"["==e.peek()?n(a("[","]","meta"),e,t):(e.eat("@"),e.match(d)||e.match(k),"variable-2");if(e.match(k))return"tag";if(e.eat(":"))return e.eat('"')?n(s('"',"atom",!1),e,t):e.match(d)||e.match(k)||e.match(l)||e.match(m)||e.match(h)?"atom":(e.eat(":"),"operator");if(e.eat('"'))return n(s('"',"string",!0),e,t);if("%"==e.peek()){var i,o="string",c=!0;if(e.match("%r"))o="string-2",i=e.next();else if(e.match("%w"))c=!1,i=e.next();else if(e.match("%q"))c=!1,i=e.next();else{if(!(i=e.match(/^%([^\w\s=])/)))return e.match(/^%[a-zA-Z0-9_\u009F-\uFFFF]*/)?"meta":"operator";i=i[1]}return w.hasOwnProperty(i)&&(i=w[i]),n(s(i,o,c),e,t)}return(r=e.match(/^<<-('?)([A-Z]\w*)\1/))?n(f(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(l)?(e.eat("="),"operator"):e.match(m)||e.match(p)?"operator":(r=e.match(/[({[]/,!1))?(r=r[0],n(a(r,w[r],null),e,t)):e.eat("\\")?(e.next(),"meta"):(e.next(),null)}function a(e,t,n,u){return function(i,o){if(!u&&i.match(e))return o.tokenize[o.tokenize.length-1]=a(e,t,n,!0),o.currentIndent+=1,n;var c=r(i,o);return i.current()===t&&(o.tokenize.pop(),o.currentIndent-=1,c=n),c}}function u(e,t,n){return function(a,i){return!n&&a.match("{"+e)?(i.currentIndent+=1,i.tokenize[i.tokenize.length-1]=u(e,t,!0),"meta"):a.match(t+"}")?(i.currentIndent-=1,i.tokenize.pop(),"meta"):r(a,i)}}function i(e,t){if(e.eatSpace())return null;var n;if(n=e.match(d)){if("def"==n)return"keyword";e.eat(/[?!]/)}return t.tokenize.pop(),"def"}function o(e,t){return e.eatSpace()?null:(e.match(d)?e.eat(/[!?]/):e.match(l)||e.match(m)||e.match(h),t.tokenize.pop(),"def")}function c(e,t){return e.eatSpace()?null:(e.match(k),t.tokenize.pop(),"def")}function s(e,t,n){return function(r,i){for(var o=!1;r.peek();)if(o)r.next(),o=!1;else{if(r.match("{%",!1))return i.tokenize.push(u("%","%")),t;if(r.match("{{",!1))return i.tokenize.push(u("{","}")),t;if(n&&r.match("#{",!1))return i.tokenize.push(a("#{","}","meta")),t;var c=r.next();if(c==e)return i.tokenize.pop(),t;o=n&&"\\"==c}return t}}function f(e,t){return function(n,r){if(n.sol()&&(n.eatSpace(),n.match(e)))return r.tokenize.pop(),"string";for(var i=!1;n.peek();)if(i)n.next(),i=!1;else{if(n.match("{%",!1))return r.tokenize.push(u("%","%")),"string";if(n.match("{{",!1))return r.tokenize.push(u("{","}")),"string";if(t&&n.match("#{",!1))return r.tokenize.push(a("#{","}","meta")),"string";i=t&&"\\"==n.next()}return"string"}}var l=/^(?:[-+/%|&^]|\*\*?|[<>]{2})/,m=/^(?:[=!]~|===|<=>|[<>=!]=?|[|&]{2}|~)/,h=/^(?:\[\][?=]?)/,p=/^(?:\.(?:\.{2})?|->|[?:])/,d=/^[a-z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,k=/^[A-Z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,z=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__"]),F=t(["true","false","nil","self"]),b=t(["def","fun","macro","class","module","struct","lib","enum","union","do","for"]),_=t(["if","unless","case","while","until","begin","then"]),x=["end","else","elsif","rescue","ensure"],y=t(x),g=["\\)","\\}","\\]"],I=new RegExp("^(?:"+g.join("|")+")$"),v={def:o,fun:o,macro:i,class:c,module:c,struct:c,lib:c,enum:c,union:c},w={"[":"]","{":"}","(":")","<":">"};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,""),y.test(n)||I.test(n)?e.indentUnit*(t.currentIndent-1):e.indentUnit*t.currentIndent},fold:"indent",electricInput:t(g.concat(x),!0),lineComment:"#"}}),e.defineMIME("text/x-crystal","crystal")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("crystal",function(a){function b(a,b){return new RegExp((b?"":"^")+"(?:"+a.join("|")+")"+(b?"$":"\\b"))}function c(a,b,c){return c.tokenize.push(a),a(b,c)}function d(a,b){if(a.eatSpace())return null;if("\\"!=b.lastToken&&a.match("{%",!1))return c(f("%","%"),a,b);if("\\"!=b.lastToken&&a.match("{{",!1))return c(f("{","}"),a,b);if("#"==a.peek())return a.skipToEnd(),"comment";var d;if(a.match(p))return a.eat(/[?!]/),d=a.current(),a.eat(":")?"atom":"."==b.lastToken?"property":r.test(d)?(u.test(d)?"fun"==d&&b.blocks.indexOf("lib")>=0||"def"==d&&"abstract"==b.lastToken||(b.blocks.push(d),b.currentIndent+=1):"operator"!=b.lastStyle&&b.lastStyle||!w.test(d)?"end"==d&&(b.blocks.pop(),b.currentIndent-=1):(b.blocks.push(d),b.currentIndent+=1),B.hasOwnProperty(d)&&b.tokenize.push(B[d]),"keyword"):s.test(d)?"atom":"variable";if(a.eat("@"))return"["==a.peek()?c(e("[","]","meta"),a,b):(a.eat("@"),a.match(p)||a.match(q),"variable-2");if(a.match(q))return"tag";if(a.eat(":"))return a.eat('"')?c(j('"',"atom",!1),a,b):a.match(p)||a.match(q)||a.match(l)||a.match(m)||a.match(n)?"atom":(a.eat(":"),"operator");if(a.eat('"'))return c(j('"',"string",!0),a,b);if("%"==a.peek()){var g,h="string",i=!0;if(a.match("%r"))h="string-2",g=a.next();else if(a.match("%w"))i=!1,g=a.next();else if(a.match("%q"))i=!1,g=a.next();else{if(!(g=a.match(/^%([^\w\s=])/)))return a.match(/^%[a-zA-Z0-9_\u009F-\uFFFF]*/)?"meta":"operator";g=g[1]}return C.hasOwnProperty(g)&&(g=C[g]),c(j(g,h,i),a,b)}return(d=a.match(/^<<-('?)([A-Z]\w*)\1/))?c(k(d[2],!d[1]),a,b):a.eat("'")?(a.match(/^(?:[^']|\\(?:[befnrtv0'"]|[0-7]{3}|u(?:[0-9a-fA-F]{4}|\{[0-9a-fA-F]{1,6}\})))/),a.eat("'"),"atom"):a.eat("0")?(a.eat("x")?a.match(/^[0-9a-fA-F]+/):a.eat("o")?a.match(/^[0-7]+/):a.eat("b")&&a.match(/^[01]+/),"number"):a.eat(/^\d/)?(a.match(/^\d*(?:\.\d+)?(?:[eE][+-]?\d+)?/),"number"):a.match(l)?(a.eat("="),"operator"):a.match(m)||a.match(o)?"operator":(d=a.match(/[({[]/,!1))?(d=d[0],c(e(d,C[d],null),a,b)):a.eat("\\")?(a.next(),"meta"):(a.next(),null)}function e(a,b,c,f){return function(g,h){if(!f&&g.match(a))return h.tokenize[h.tokenize.length-1]=e(a,b,c,!0),h.currentIndent+=1,c;var i=d(g,h);return g.current()===b&&(h.tokenize.pop(),h.currentIndent-=1,i=c),i}}function f(a,b,c){return function(e,g){return!c&&e.match("{"+a)?(g.currentIndent+=1,g.tokenize[g.tokenize.length-1]=f(a,b,!0),"meta"):e.match(b+"}")?(g.currentIndent-=1,g.tokenize.pop(),"meta"):d(e,g)}}function g(a,b){if(a.eatSpace())return null;var c;if(c=a.match(p)){if("def"==c)return"keyword";a.eat(/[?!]/)}return b.tokenize.pop(),"def"}function h(a,b){return a.eatSpace()?null:(a.match(p)?a.eat(/[!?]/):a.match(l)||a.match(m)||a.match(n),b.tokenize.pop(),"def")}function i(a,b){return a.eatSpace()?null:(a.match(q),b.tokenize.pop(),"def")}function j(a,b,c){return function(d,g){for(var h=!1;d.peek();)if(h)d.next(),h=!1;else{if(d.match("{%",!1))return g.tokenize.push(f("%","%")),b;if(d.match("{{",!1))return g.tokenize.push(f("{","}")),b;if(c&&d.match("#{",!1))return g.tokenize.push(e("#{","}","meta")),b;var i=d.next();if(i==a)return g.tokenize.pop(),b;h=c&&"\\"==i}return b}}function k(a,b){return function(c,d){if(c.sol()&&(c.eatSpace(),c.match(a)))return d.tokenize.pop(),"string";for(var g=!1;c.peek();)if(g)c.next(),g=!1;else{if(c.match("{%",!1))return d.tokenize.push(f("%","%")),"string";if(c.match("{{",!1))return d.tokenize.push(f("{","}")),"string";if(b&&c.match("#{",!1))return d.tokenize.push(e("#{","}","meta")),"string";g=b&&"\\"==c.next()}return"string"}}var l=/^(?:[-+\/%|&^]|\*\*?|[<>]{2})/,m=/^(?:[=!]~|===|<=>|[<>=!]=?|[|&]{2}|~)/,n=/^(?:\[\][?=]?)/,o=/^(?:\.(?:\.{2})?|->|[?:])/,p=/^[a-z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,q=/^[A-Z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,r=b(["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__"]),s=b(["true","false","nil","self"]),t=["def","fun","macro","class","module","struct","lib","enum","union","do","for"],u=b(t),v=["if","unless","case","while","until","begin","then"],w=b(v),x=["end","else","elsif","rescue","ensure"],y=b(x),z=["\\)","\\}","\\]"],A=new RegExp("^(?:"+z.join("|")+")$"),B={def:h,fun:h,macro:g,class:i,module:i,struct:i,lib:i,enum:i,union:i},C={"[":"]","{":"}","(":")","<":">"};return{startState:function(){return{tokenize:[d],currentIndent:0,lastToken:null,lastStyle:null,blocks:[]}},token:function(a,b){var c=b.tokenize[b.tokenize.length-1](a,b),d=a.current();return c&&"comment"!=c&&(b.lastToken=d,b.lastStyle=c),c},indent:function(b,c){return c=c.replace(/^\s*(?:\{%)?\s*|\s*(?:%\})?\s*$/g,""),y.test(c)||A.test(c)?a.indentUnit*(b.currentIndent-1):a.indentUnit*b.currentIndent},fold:"indent",electricInput:b(z.concat(x),!0),lineComment:"#"}}),a.defineMIME("text/x-crystal","crystal")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/css/css.js b/media/vendor/codemirror/mode/css/css.js index 7f8c46ebb6c13..056c48e680948 100644 --- a/media/vendor/codemirror/mode/css/css.js +++ b/media/vendor/codemirror/mode/css/css.js @@ -401,7 +401,6 @@ CodeMirror.defineMode("css", function(config, parserConfig) { ch == "{" && (cx.type == "at" || cx.type == "atBlock")) { // Dedent relative to current context. indent = Math.max(0, cx.indent - indentUnit); - cx = cx.prev; } } return indent; @@ -472,7 +471,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) { "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", + "caption-side", "caret-color", "clear", "clip", "color", "color-profile", "column-count", "column-fill", "column-gap", "column-rule", "column-rule-color", "column-rule-style", "column-rule-width", "column-span", "column-width", "columns", "content", "counter-increment", "counter-reset", "crop", "cue", @@ -493,7 +492,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) { "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", + "inline-box-align", "justify-content", "justify-items", "justify-self", "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", @@ -508,7 +507,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) { "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", + "perspective-origin", "pitch", "pitch-range", "place-content", "place-items", "place-self", "play-during", "position", "presentation-level", "punctuation-trim", "quotes", "region-break-after", "region-break-before", "region-break-inside", "region-fragment", "rendering-intent", "resize", "rest", "rest-after", "rest-before", "richness", @@ -659,13 +658,13 @@ CodeMirror.defineMode("css", function(config, parserConfig) { "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", + "searchfield-results-button", "searchfield-results-decoration", "self-start", "self-end", "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", + "source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square", "square-button", "start", "static", "status-bar", "stretch", "stroke", "sub", "subpixel-antialiased", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table", "table-caption", "table-cell", "table-column", "table-column-group", diff --git a/media/vendor/codemirror/mode/css/css.min.js b/media/vendor/codemirror/mode/css/css.min.js index 9e3a415d3bc78..4c08db5bbc18c 100644 --- a/media/vendor/codemirror/mode/css/css.min.js +++ b/media/vendor/codemirror/mode/css/css.min.js @@ -1 +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={},r=0;r*\/]/.test(r)?o(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?o("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?o(null,r):"u"==r&&e.match(/rl(-prefix)?\(/)||"d"==r&&e.match("omain(")||"r"==r&&e.match("egexp(")?(e.backUp(1),t.tokenize=n,o("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),o("property","word")):o(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),o("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?o("variable-2","variable-definition"):o("variable-2","variable")):e.match(/^\w+-/)?o("meta","meta"):void 0}function i(e){return function(t,r){for(var a,i=!1;null!=(a=t.next());){if(a==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==a}return(a==e||!i&&")"!=e)&&(r.tokenize=null),o("string","string")}}function n(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=i(")"),o(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,o){return e.context=new l(r,t.indentation()+(!1===o?0:b),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function d(e,t,r){return _[r.context.type](e,t,r)}function p(e,t,r,o){for(var a=o||1;a>0;a--)r.context=r.context.prev;return d(e,t,r)}function u(e){var t=e.current().toLowerCase();g=K.hasOwnProperty(t)?"atom":j.hasOwnProperty(t)?"keyword":"variable"}var m=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var h,g,b=t.indentUnit,f=r.tokenHooks,y=r.documentTypes||{},w=r.mediaTypes||{},k=r.mediaFeatures||{},v=r.mediaValueKeywords||{},x=r.propertyKeywords||{},z=r.nonStandardPropertyKeywords||{},q=r.fontProperties||{},P=r.counterDescriptors||{},j=r.colorKeywords||{},K=r.valueKeywords||{},B=r.allowNested,C=r.lineComment,T=!0===r.supportsAtComponent,_={};return _.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(T&&/@component/.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)g="builtin";else if("word"==e)g="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(B&&"("==e)return s(r,t,"parens")}return r.context.type},_.block=function(e,t,r){if("word"==e){var o=t.current().toLowerCase();return x.hasOwnProperty(o)?(g="property","maybeprop"):z.hasOwnProperty(o)?(g="string-2","maybeprop"):B?(g=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==e?"block":B||"hash"!=e&&"qualifier"!=e?_.top(e,t,r):(g="error","block")},_.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):d(e,t,r)},_.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&B)return s(r,t,"propBlock");if("}"==e||"{"==e)return p(e,t,r);if("("==e)return s(r,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)u(t);else if("interpolation"==e)return s(r,t,"interpolation")}else g+=" error";return"prop"},_.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(g="property","maybeprop"):r.context.type},_.parens=function(e,t,r){return"{"==e||"}"==e?p(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&u(t),"parens")},_.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(g="variable-3",r.context.type):d(e,t,r)},_.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(g="tag",r.context.type):_.atBlock(e,t,r)},_.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return p(e,t,r);if("{"==e)return c(r)&&s(r,t,B?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var o=t.current().toLowerCase();g="only"==o||"not"==o||"and"==o||"or"==o?"keyword":w.hasOwnProperty(o)?"attribute":k.hasOwnProperty(o)?"property":v.hasOwnProperty(o)?"keyword":x.hasOwnProperty(o)?"property":z.hasOwnProperty(o)?"string-2":K.hasOwnProperty(o)?"atom":j.hasOwnProperty(o)?"keyword":"error"}return r.context.type},_.atComponentBlock=function(e,t,r){return"}"==e?p(e,t,r):"{"==e?c(r)&&s(r,t,B?"block":"top",!1):("word"==e&&(g="error"),r.context.type)},_.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?p(e,t,r,2):_.atBlock(e,t,r)},_.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(g="variable","restricted_atBlock_before"):d(e,t,r)},_.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(g="@font-face"==r.stateArg&&!q.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!P.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},_.keyframes=function(e,t,r){return"word"==e?(g="variable","keyframes"):"{"==e?s(r,t,"top"):d(e,t,r)},_.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?p(e,t,r):("word"==e?g="tag":"hash"==e&&(g="builtin"),"at")},_.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?p(e,t,r):("word"==e?g="variable":"variable"!=e&&"("!=e&&")"!=e&&(g="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:m?"block":"top",stateArg:null,context:new l(m?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||a)(e,t);return r&&"object"==typeof r&&(h=r[1],r=r[0]),g=r,t.state=_[t.state](h,e,t),g},indent:function(e,t){var r=e.context,o=t&&t.charAt(0),a=r.indent;return"prop"!=r.type||"}"!=o&&")"!=o||(r=r.prev),r.prev&&("}"!=o||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=o||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=o||"at"!=r.type&&"atBlock"!=r.type)||(a=Math.max(0,r.indent-b),r=r.prev):a=(r=r.prev).indent),a},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:C,fold:"brace"}});var o=["domain","regexp","url","url-prefix"],a=t(o),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],n=t(i),l=["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"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],d=t(c),p=["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"],u=t(p),m=["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"],h=t(m),g=t(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),b=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),f=["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"],y=t(f),w=["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","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","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"],k=t(w),v=o.concat(i).concat(l).concat(c).concat(p).concat(m).concat(f).concat(w);e.registerHelper("hintWords","css",v),e.defineMIME("text/css",{documentTypes:a,mediaTypes:n,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:u,nonStandardPropertyKeywords:h,fontProperties:g,counterDescriptors:b,colorKeywords:y,valueKeywords:k,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:n,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:u,nonStandardPropertyKeywords:h,colorKeywords:y,valueKeywords:k,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,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:n,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:u,nonStandardPropertyKeywords:h,colorKeywords:y,valueKeywords:k,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(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:a,mediaTypes:n,mediaFeatures:s,propertyKeywords:u,nonStandardPropertyKeywords:h,fontProperties:g,counterDescriptors:b,colorKeywords:y,valueKeywords:k,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b={},c=0;c*\/]/.test(c)?d(null,"select-op"):"."==c&&a.match(/^-?[_a-z][_a-z0-9-]*/i)?d("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(c)?d(null,c):"u"==c&&a.match(/rl(-prefix)?\(/)||"d"==c&&a.match("omain(")||"r"==c&&a.match("egexp(")?(a.backUp(1),b.tokenize=g,d("property","word")):/[\w\\\-]/.test(c)?(a.eatWhile(/[\w\\\-]/),d("property","word")):d(null,null):/[\d.]/.test(a.peek())?(a.eatWhile(/[\w.%]/),d("number","unit")):a.match(/^-[\w\\\-]+/)?(a.eatWhile(/[\w\\\-]/),a.match(/^\s*:/,!1)?d("variable-2","variable-definition"):d("variable-2","variable")):a.match(/^\w+-/)?d("meta","meta"):void 0}function f(a){return function(b,c){for(var e,f=!1;null!=(e=b.next());){if(e==a&&!f){")"==a&&b.backUp(1);break}f=!f&&"\\"==e}return(e==a||!f&&")"!=a)&&(c.tokenize=null),d("string","string")}}function g(a,b){return a.next(),a.match(/\s*[\"\')]/,!1)?b.tokenize=null:b.tokenize=f(")"),d(null,"(")}function h(a,b,c){this.type=a,this.indent=b,this.prev=c}function i(a,b,c,d){return a.context=new h(c,b.indentation()+(d===!1?0:q),a.context),c}function j(a){return a.context.prev&&(a.context=a.context.prev),a.context.type}function k(a,b,c){return F[c.context.type](a,b,c)}function l(a,b,c,d){for(var e=d||1;e>0;e--)c.context=c.context.prev;return k(a,b,c)}function m(a){var b=a.current().toLowerCase();p=B.hasOwnProperty(b)?"atom":A.hasOwnProperty(b)?"keyword":"variable"}var n=c.inline;c.propertyKeywords||(c=a.resolveMode("text/css"));var o,p,q=b.indentUnit,r=c.tokenHooks,s=c.documentTypes||{},t=c.mediaTypes||{},u=c.mediaFeatures||{},v=c.mediaValueKeywords||{},w=c.propertyKeywords||{},x=c.nonStandardPropertyKeywords||{},y=c.fontProperties||{},z=c.counterDescriptors||{},A=c.colorKeywords||{},B=c.valueKeywords||{},C=c.allowNested,D=c.lineComment,E=c.supportsAtComponent===!0,F={};return F.top=function(a,b,c){if("{"==a)return i(c,b,"block");if("}"==a&&c.context.prev)return j(c);if(E&&/@component/.test(a))return i(c,b,"atComponentBlock");if(/^@(-moz-)?document$/.test(a))return i(c,b,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(a))return i(c,b,"atBlock");if(/^@(font-face|counter-style)/.test(a))return c.stateArg=a,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(a))return"keyframes";if(a&&"@"==a.charAt(0))return i(c,b,"at");if("hash"==a)p="builtin";else if("word"==a)p="tag";else{if("variable-definition"==a)return"maybeprop";if("interpolation"==a)return i(c,b,"interpolation");if(":"==a)return"pseudo";if(C&&"("==a)return i(c,b,"parens")}return c.context.type},F.block=function(a,b,c){if("word"==a){var d=b.current().toLowerCase();return w.hasOwnProperty(d)?(p="property","maybeprop"):x.hasOwnProperty(d)?(p="string-2","maybeprop"):C?(p=b.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(p+=" error","maybeprop")}return"meta"==a?"block":C||"hash"!=a&&"qualifier"!=a?F.top(a,b,c):(p="error","block")},F.maybeprop=function(a,b,c){return":"==a?i(c,b,"prop"):k(a,b,c)},F.prop=function(a,b,c){if(";"==a)return j(c);if("{"==a&&C)return i(c,b,"propBlock");if("}"==a||"{"==a)return l(a,b,c);if("("==a)return i(c,b,"parens");if("hash"!=a||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(b.current())){if("word"==a)m(b);else if("interpolation"==a)return i(c,b,"interpolation")}else p+=" error";return"prop"},F.propBlock=function(a,b,c){return"}"==a?j(c):"word"==a?(p="property","maybeprop"):c.context.type},F.parens=function(a,b,c){return"{"==a||"}"==a?l(a,b,c):")"==a?j(c):"("==a?i(c,b,"parens"):"interpolation"==a?i(c,b,"interpolation"):("word"==a&&m(b),"parens")},F.pseudo=function(a,b,c){return"meta"==a?"pseudo":"word"==a?(p="variable-3",c.context.type):k(a,b,c)},F.documentTypes=function(a,b,c){return"word"==a&&s.hasOwnProperty(b.current())?(p="tag",c.context.type):F.atBlock(a,b,c)},F.atBlock=function(a,b,c){if("("==a)return i(c,b,"atBlock_parens");if("}"==a||";"==a)return l(a,b,c);if("{"==a)return j(c)&&i(c,b,C?"block":"top");if("interpolation"==a)return i(c,b,"interpolation");if("word"==a){var d=b.current().toLowerCase();p="only"==d||"not"==d||"and"==d||"or"==d?"keyword":t.hasOwnProperty(d)?"attribute":u.hasOwnProperty(d)?"property":v.hasOwnProperty(d)?"keyword":w.hasOwnProperty(d)?"property":x.hasOwnProperty(d)?"string-2":B.hasOwnProperty(d)?"atom":A.hasOwnProperty(d)?"keyword":"error"}return c.context.type},F.atComponentBlock=function(a,b,c){return"}"==a?l(a,b,c):"{"==a?j(c)&&i(c,b,C?"block":"top",!1):("word"==a&&(p="error"),c.context.type)},F.atBlock_parens=function(a,b,c){return")"==a?j(c):"{"==a||"}"==a?l(a,b,c,2):F.atBlock(a,b,c)},F.restricted_atBlock_before=function(a,b,c){return"{"==a?i(c,b,"restricted_atBlock"):"word"==a&&"@counter-style"==c.stateArg?(p="variable","restricted_atBlock_before"):k(a,b,c)},F.restricted_atBlock=function(a,b,c){return"}"==a?(c.stateArg=null,j(c)):"word"==a?(p="@font-face"==c.stateArg&&!y.hasOwnProperty(b.current().toLowerCase())||"@counter-style"==c.stateArg&&!z.hasOwnProperty(b.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},F.keyframes=function(a,b,c){return"word"==a?(p="variable","keyframes"):"{"==a?i(c,b,"top"):k(a,b,c)},F.at=function(a,b,c){return";"==a?j(c):"{"==a||"}"==a?l(a,b,c):("word"==a?p="tag":"hash"==a&&(p="builtin"),"at")},F.interpolation=function(a,b,c){return"}"==a?j(c):"{"==a||";"==a?l(a,b,c):("word"==a?p="variable":"variable"!=a&&"("!=a&&")"!=a&&(p="error"),"interpolation")},{startState:function(a){return{tokenize:null,state:n?"block":"top",stateArg:null,context:new h(n?"block":"top",a||0,null)}},token:function(a,b){if(!b.tokenize&&a.eatSpace())return null;var c=(b.tokenize||e)(a,b);return c&&"object"==typeof c&&(o=c[1],c=c[0]),p=c,b.state=F[b.state](o,a,b),p},indent:function(a,b){var c=a.context,d=b&&b.charAt(0),e=c.indent;return"prop"!=c.type||"}"!=d&&")"!=d||(c=c.prev),c.prev&&("}"!=d||"block"!=c.type&&"top"!=c.type&&"interpolation"!=c.type&&"restricted_atBlock"!=c.type?(")"!=d||"parens"!=c.type&&"atBlock_parens"!=c.type)&&("{"!=d||"at"!=c.type&&"atBlock"!=c.type)||(e=Math.max(0,c.indent-q)):(c=c.prev,e=c.indent)),e},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:D,fold:"brace"}});var d=["domain","regexp","url","url-prefix"],e=b(d),f=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],g=b(f),h=["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"],i=b(h),j=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],k=b(j),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-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","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","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","justify-items","justify-self","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","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","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"],m=b(l),n=["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"],o=b(n),p=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],q=b(p),r=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],s=b(r),t=["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"],u=b(t),v=["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","self-start","self-end","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","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","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=b(v),x=d.concat(f).concat(h).concat(j).concat(l).concat(n).concat(t).concat(v);a.registerHelper("hintWords","css",x),a.defineMIME("text/css",{documentTypes:e,mediaTypes:g,mediaFeatures:i,mediaValueKeywords:k,propertyKeywords:m,nonStandardPropertyKeywords:o,fontProperties:q,counterDescriptors:s,colorKeywords:u,valueKeywords:w,tokenHooks:{"/":function(a,b){return!!a.eat("*")&&(b.tokenize=c,c(a,b))}},name:"css"}),a.defineMIME("text/x-scss",{mediaTypes:g,mediaFeatures:i,mediaValueKeywords:k,propertyKeywords:m,nonStandardPropertyKeywords:o,colorKeywords:u,valueKeywords:w,fontProperties:q,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(a,b){return a.eat("/")?(a.skipToEnd(),["comment","comment"]):a.eat("*")?(b.tokenize=c,c(a,b)):["operator","operator"]},":":function(a){return!!a.match(/\s*\{/,!1)&&[null,null]},$:function(a){return a.match(/^[\w-]+/),a.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(a){return!!a.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),a.defineMIME("text/x-less",{mediaTypes:g,mediaFeatures:i,mediaValueKeywords:k,propertyKeywords:m,nonStandardPropertyKeywords:o,colorKeywords:u,valueKeywords:w,fontProperties:q,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(a,b){return a.eat("/")?(a.skipToEnd(),["comment","comment"]):a.eat("*")?(b.tokenize=c,c(a,b)):["operator","operator"]},"@":function(a){return a.eat("{")?[null,"interpolation"]:!a.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)&&(a.eatWhile(/[\w\\\-]/),a.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),a.defineMIME("text/x-gss",{documentTypes:e,mediaTypes:g,mediaFeatures:i,propertyKeywords:m,nonStandardPropertyKeywords:o,fontProperties:q,counterDescriptors:s,colorKeywords:u,valueKeywords:w,supportsAtComponent:!0,tokenHooks:{"/":function(a,b){return!!a.eat("*")&&(b.tokenize=c,c(a,b))}},name:"css",helperType:"gss"})}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/cypher/cypher.min.js b/media/vendor/codemirror/mode/cypher/cypher.min.js index 7eef3a3763966..df7bb0c4ab1cb 100644 --- a/media/vendor/codemirror/mode/cypher/cypher.min.js +++ b/media/vendor/codemirror/mode/cypher/cypher.min.js @@ -1 +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";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(u.test(t))return e.eatWhile(u),null;if(e.eatWhile(/[_\w\d]/),e.eat(":"))return e.eatWhile(/[\w\d_\-]/),"atom";var n=e.current();return s.test(n)?"builtin":l.test(n)?"def":d.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},c=n.indentUnit,s=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"]),l=t(["all","and","any","contains","exists","has","in","none","not","or","single","xor"]),d=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"]),u=/[*+\-<>=&|~%^]/;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:c):0}}}),e.modeExtensions.cypher={autoFormatLineBreaks:function(e){for(var t=e.split("\n"),n=/\s+\b(return|where|order by|match|with|skip|limit|create|delete|set)\b\s/g,r=0;r=&|~%^]/;return{startState:function(){return{tokenize:e,context:null,indent:0,col:0}},token:function(a,b){if(a.sol()&&(b.context&&null==b.context.align&&(b.context.align=!1),b.indent=a.indentation()),a.eatSpace())return null;var c=b.tokenize(a,b);if("comment"!==c&&b.context&&null==b.context.align&&"pattern"!==b.context.type&&(b.context.align=!0),"("===d)f(b,")",a.column());else if("["===d)f(b,"]",a.column());else if("{"===d)f(b,"}",a.column());else if(/[\]\}\)]/.test(d)){for(;b.context&&"pattern"===b.context.type;)g(b);b.context&&d===b.context.type&&g(b)}else"."===d&&b.context&&"pattern"===b.context.type?g(b):/atom|string|variable/.test(c)&&b.context&&(/[\}\]]/.test(b.context.type)?f(b,"pattern",a.column()):"pattern"!==b.context.type||b.context.align||(b.context.align=!0,b.context.col=a.column()));return c},indent:function(b,c){var d=c&&c.charAt(0),e=b.context;if(/[\]\}]/.test(d))for(;e&&"pattern"===e.type;)e=e.prev;var f=e&&d===e.type;return e?"keywords"===e.type?a.commands.newlineAndIndent:e.align?e.col+(f?0:1):e.indent+(f?0:h):0}}}),a.modeExtensions.cypher={autoFormatLineBreaks:function(a){for(var b,c,d,c=a.split("\n"),d=/\s+\b(return|where|order by|match|with|skip|limit|create|delete|set)\b\s/g,b=0;b!?|\/]/;return{startState:function(e){return{tokenize:null,context:new u((e||0)-f,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&&","!=c||"statement"!=n.type)if("{"==c)l(t,e.column(),"}");else if("["==c)l(t,e.column(),"]");else if("("==c)l(t,e.column(),")");else if("}"==c){for(;"statement"==n.type;)n=s(t);for("}"==n.type&&(n=s(t));"statement"==n.type;)n=s(t)}else c==n.type?s(t):(("}"==n.type||"top"==n.type)&&";"!=c||"statement"==n.type&&"newstatement"==c)&&l(t,e.column(),"statement");else s(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:d):i.align?i.column+(a?0:1):i.indented+(a?0:f)},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"}}})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b={},c=a.split(" "),d=0;d!?|\/]/;return{startState:function(a){return{tokenize:null,context:new h((a||0)-l,0,"top",!1),indented:0,startOfLine:!0}},token:function(a,b){var c=b.context;if(a.sol()&&(null==c.align&&(c.align=!1),b.indented=a.indentation(),b.startOfLine=!0),a.eatSpace())return null;k=null;var e=(b.tokenize||d)(a,b);if("comment"==e||"meta"==e)return e;if(null==c.align&&(c.align=!0),";"!=k&&":"!=k&&","!=k||"statement"!=c.type)if("{"==k)i(b,a.column(),"}");else if("["==k)i(b,a.column(),"]");else if("("==k)i(b,a.column(),")");else if("}"==k){for(;"statement"==c.type;)c=j(b);for("}"==c.type&&(c=j(b));"statement"==c.type;)c=j(b)}else k==c.type?j(b):(("}"==c.type||"top"==c.type)&&";"!=k||"statement"==c.type&&"newstatement"==k)&&i(b,a.column(),"statement");else j(b);return b.startOfLine=!1,e},indent:function(b,c){if(b.tokenize!=d&&null!=b.tokenize)return a.Pass;var e=b.context,f=c&&c.charAt(0);"statement"==e.type&&"}"==f&&(e=e.prev);var g=f==e.type;return"statement"==e.type?e.indented+("{"==f?0:m):e.align?e.column+(g?0:1):e.indented+(g?0:l)},electricChars:"{}"}});var c="body catch class do else enum for foreach foreach_reverse if in interface mixin out scope struct switch try union unittest version while with";a.defineMIME("text/x-d",{name:"d",keywords:b("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 "+c),blockKeywords:b(c),builtin:b("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:b("exit failure success true false null"),hooks:{"@":function(a,b){return a.eatWhile(/[\w\$_]/),"meta"}}})}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/dart/dart.js b/media/vendor/codemirror/mode/dart/dart.js index 8d383a95efb8b..398f5ef3b576f 100644 --- a/media/vendor/codemirror/mode/dart/dart.js +++ b/media/vendor/codemirror/mode/dart/dart.js @@ -13,7 +13,7 @@ var keywords = ("this super static final const abstract class extends external factory " + "implements get native operator set typedef with enum throw rethrow " + - "assert break case continue default in return new deferred async await " + + "assert break case continue default in return new deferred async await covariant " + "try catch finally do else for if switch while import library export " + "part of show hide is as").split(" "); var blockKeywords = "try catch finally do else for if switch while".split(" "); diff --git a/media/vendor/codemirror/mode/dart/dart.min.js b/media/vendor/codemirror/mode/dart/dart.min.js index 5f774e849652c..5271a7721f023 100644 --- a/media/vendor/codemirror/mode/dart/dart.min.js +++ b/media/vendor/codemirror/mode/dart/dart.min.js @@ -1 +1 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../clike/clike")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../clike/clike"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},n=0;n0&&(t.tokenize=i(t),null)},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=l(1),t.tokenize(e,t))}}}),e.registerHelper("hintWords","application/dart",u.concat(s).concat(k)),e.defineMode("dart",function(t){return e.getMode(t,"application/dart")},"clike")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../clike/clike")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../clike/clike"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b={},c=0;c0&&(b.tokenize=d(b),null)},"/":function(a,b){return!!a.eat("*")&&(b.tokenize=i(1),b.tokenize(a,b))}}}),a.registerHelper("hintWords","application/dart",j.concat(l).concat(m)),a.defineMode("dart",function(b){return a.getMode(b,"application/dart")},"clike")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/diff/diff.min.js b/media/vendor/codemirror/mode/diff/diff.min.js index b67f2cf64dca4..3d88899ae5842 100644 --- a/media/vendor/codemirror/mode/diff/diff.min.js +++ b/media/vendor/codemirror/mode/diff/diff.min.js @@ -1 +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";e.defineMode("diff",function(){var e={"+":"positive","-":"negative","@":"meta"};return{token:function(r){var i=r.string.search(/[\t ]+?$/);if(!r.sol()||0===i)return r.skipToEnd(),("error "+(e[r.string.charAt(0)]||"")).replace(/ $/,"");var o=e[r.peek()]||r.skipToEnd();return-1===i?r.skipToEnd():r.pos=i,o}}}),e.defineMIME("text/x-diff","diff")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("diff",function(){var a={"+":"positive","-":"negative","@":"meta"};return{token:function(b){var c=b.string.search(/[\t ]+?$/);if(!b.sol()||0===c)return b.skipToEnd(),("error "+(a[b.string.charAt(0)]||"")).replace(/ $/,"");var d=a[b.peek()]||b.skipToEnd();return c===-1?b.skipToEnd():b.pos=c,d}}}),a.defineMIME("text/x-diff","diff")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/django/django.min.js b/media/vendor/codemirror/mode/django/django.min.js index 36075cc36e1f0..17f417a5718f3 100644 --- a/media/vendor/codemirror/mode/django/django.min.js +++ b/media/vendor/codemirror/mode/django/django.min.js @@ -1 +1 @@ -!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=r,"tag";if(e.match("{%"))return t.tokenize=i,"tag";if(e.match("{#"))return t.tokenize=n,"comment";for(;null!=e.next()&&!e.match(/\{[{%#]/,!1););return null}function t(e,t){return function(r,i){return!i.escapeNext&&r.eat(e)?i.tokenize=t:(i.escapeNext&&(i.escapeNext=!1),"\\"==r.next()&&(i.escapeNext=!0)),"string"}}function r(r,i){if(i.waitDot){if(i.waitDot=!1,"."!=r.peek())return"null";if(r.match(/\.\W+/))return"error";if(r.eat("."))return i.waitProperty=!0,"null";throw Error("Unexpected error while waiting for property.")}if(i.waitPipe){if(i.waitPipe=!1,"|"!=r.peek())return"null";if(r.match(/\.\W+/))return"error";if(r.eat("|"))return i.waitFilter=!0,"null";throw Error("Unexpected error while waiting for filter.")}return i.waitProperty&&(i.waitProperty=!1,r.match(/\b(\w+)\b/))?(i.waitDot=!0,i.waitPipe=!0,"property"):i.waitFilter&&(i.waitFilter=!1,r.match(l))?"variable-2":r.eatSpace()?(i.waitProperty=!1,"null"):r.match(/\b\d+(\.\d+)?\b/)?"number":r.match("'")?(i.tokenize=t("'",i.tokenize),"string"):r.match('"')?(i.tokenize=t('"',i.tokenize),"string"):r.match(/\b(\w+)\b/)&&!i.foundVariable?(i.waitDot=!0,i.waitPipe=!0,"variable"):r.match("}}")?(i.waitProperty=null,i.waitFilter=null,i.waitDot=null,i.waitPipe=null,i.tokenize=e,"tag"):(r.next(),"null")}function i(r,i){if(i.waitDot){if(i.waitDot=!1,"."!=r.peek())return"null";if(r.match(/\.\W+/))return"error";if(r.eat("."))return i.waitProperty=!0,"null";throw Error("Unexpected error while waiting for property.")}if(i.waitPipe){if(i.waitPipe=!1,"|"!=r.peek())return"null";if(r.match(/\.\W+/))return"error";if(r.eat("|"))return i.waitFilter=!0,"null";throw Error("Unexpected error while waiting for filter.")}if(i.waitProperty&&(i.waitProperty=!1,r.match(/\b(\w+)\b/)))return i.waitDot=!0,i.waitPipe=!0,"property";if(i.waitFilter&&(i.waitFilter=!1,r.match(l)))return"variable-2";if(r.eatSpace())return i.waitProperty=!1,"null";if(r.match(/\b\d+(\.\d+)?\b/))return"number";if(r.match("'"))return i.tokenize=t("'",i.tokenize),"string";if(r.match('"'))return i.tokenize=t('"',i.tokenize),"string";if(r.match(u))return"operator";if(r.match(c))return"keyword";var n=r.match(a);return n?("comment"==n[0]&&(i.blockCommentTag=!0),"keyword"):r.match(/\b(\w+)\b/)?(i.waitDot=!0,i.waitPipe=!0,"variable"):r.match("%}")?(i.waitProperty=null,i.waitFilter=null,i.waitDot=null,i.waitPipe=null,i.blockCommentTag?(i.blockCommentTag=!1,i.tokenize=o):i.tokenize=e,"tag"):(r.next(),"null")}function n(t,r){return t.match(/^.*?#\}/)?r.tokenize=e:t.skipToEnd(),"comment"}function o(e,t){return e.match(/\{%\s*endcomment\s*%\}/,!1)?(t.tokenize=i,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"],l=["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"],u=["==","!=","<",">","<=",">="],c=["in","not","or","and"];return a=new RegExp("^\\b("+a.join("|")+")\\b"),l=new RegExp("^\\b("+l.join("|")+")\\b"),u=new RegExp("^\\b("+u.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 r=e.getMode(t,"text/html"),i=e.getMode(t,"django:inner");return e.overlayMode(r,i)}),e.defineMIME("text/x-django","django")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/overlay")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/overlay"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("django:inner",function(){function a(a,b){if(a.match("{{"))return b.tokenize=c,"tag";if(a.match("{%"))return b.tokenize=d,"tag";if(a.match("{#"))return b.tokenize=e,"comment";for(;null!=a.next()&&!a.match(/\{[{%#]/,!1););return null}function b(a,b){return function(c,d){if(!d.escapeNext&&c.eat(a))d.tokenize=b;else{d.escapeNext&&(d.escapeNext=!1);"\\"==c.next()&&(d.escapeNext=!0)}return"string"}}function c(c,d){if(d.waitDot){if(d.waitDot=!1,"."!=c.peek())return"null";if(c.match(/\.\W+/))return"error";if(c.eat("."))return d.waitProperty=!0,"null";throw Error("Unexpected error while waiting for property.")}if(d.waitPipe){if(d.waitPipe=!1,"|"!=c.peek())return"null";if(c.match(/\.\W+/))return"error";if(c.eat("|"))return d.waitFilter=!0,"null";throw Error("Unexpected error while waiting for filter.")}return d.waitProperty&&(d.waitProperty=!1,c.match(/\b(\w+)\b/))?(d.waitDot=!0,d.waitPipe=!0,"property"):d.waitFilter&&(d.waitFilter=!1,c.match(h))?"variable-2":c.eatSpace()?(d.waitProperty=!1,"null"):c.match(/\b\d+(\.\d+)?\b/)?"number":c.match("'")?(d.tokenize=b("'",d.tokenize),"string"):c.match('"')?(d.tokenize=b('"',d.tokenize),"string"):c.match(/\b(\w+)\b/)&&!d.foundVariable?(d.waitDot=!0,d.waitPipe=!0,"variable"):c.match("}}")?(d.waitProperty=null,d.waitFilter=null,d.waitDot=null,d.waitPipe=null,d.tokenize=a,"tag"):(c.next(),"null")}function d(c,d){if(d.waitDot){if(d.waitDot=!1,"."!=c.peek())return"null";if(c.match(/\.\W+/))return"error";if(c.eat("."))return d.waitProperty=!0,"null";throw Error("Unexpected error while waiting for property.")}if(d.waitPipe){if(d.waitPipe=!1,"|"!=c.peek())return"null";if(c.match(/\.\W+/))return"error";if(c.eat("|"))return d.waitFilter=!0,"null";throw Error("Unexpected error while waiting for filter.")}if(d.waitProperty&&(d.waitProperty=!1,c.match(/\b(\w+)\b/)))return d.waitDot=!0,d.waitPipe=!0,"property";if(d.waitFilter&&(d.waitFilter=!1,c.match(h)))return"variable-2";if(c.eatSpace())return d.waitProperty=!1,"null";if(c.match(/\b\d+(\.\d+)?\b/))return"number";if(c.match("'"))return d.tokenize=b("'",d.tokenize),"string";if(c.match('"'))return d.tokenize=b('"',d.tokenize),"string";if(c.match(i))return"operator";if(c.match(j))return"keyword";var e=c.match(g);return e?("comment"==e[0]&&(d.blockCommentTag=!0),"keyword"):c.match(/\b(\w+)\b/)?(d.waitDot=!0,d.waitPipe=!0,"variable"):c.match("%}")?(d.waitProperty=null,d.waitFilter=null,d.waitDot=null,d.waitPipe=null,d.blockCommentTag?(d.blockCommentTag=!1,d.tokenize=f):d.tokenize=a,"tag"):(c.next(),"null")}function e(b,c){return b.match(/^.*?#\}/)?c.tokenize=a:b.skipToEnd(),"comment"}function f(a,b){return a.match(/\{%\s*endcomment\s*%\}/,!1)?(b.tokenize=d,a.match("{%"),"tag"):(a.next(),"comment")}var g=["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"],h=["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"],i=["==","!=","<",">","<=",">="],j=["in","not","or","and"];return g=new RegExp("^\\b("+g.join("|")+")\\b"),h=new RegExp("^\\b("+h.join("|")+")\\b"),i=new RegExp("^\\b("+i.join("|")+")\\b"),j=new RegExp("^\\b("+j.join("|")+")\\b"),{startState:function(){return{tokenize:a}},token:function(a,b){return b.tokenize(a,b)},blockCommentStart:"{% comment %}",blockCommentEnd:"{% endcomment %}"}}),a.defineMode("django",function(b){var c=a.getMode(b,"text/html"),d=a.getMode(b,"django:inner");return a.overlayMode(c,d)}),a.defineMIME("text/x-django","django")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/dockerfile/dockerfile.min.js b/media/vendor/codemirror/mode/dockerfile/dockerfile.min.js index c10e6e7d07856..14b258af748b8 100644 --- a/media/vendor/codemirror/mode/dockerfile/dockerfile.min.js +++ b/media/vendor/codemirror/mode/dockerfile/dockerfile.min.js @@ -1 +1 @@ -!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 n="("+["from","maintainer","run","cmd","expose","env","add","copy","entrypoint","volume","user","workdir","onbuild"].join("|")+")",r=new RegExp(n+"\\s*$","i"),t=new RegExp(n+"(\\s+)","i");e.defineSimpleMode("dockerfile",{start:[{regex:/#.*$/,token:"comment"},{regex:r,token:"variable-2"},{regex:t,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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../../addon/mode/simple")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],a):a(CodeMirror)}(function(a){"use strict";var b=["from","maintainer","run","cmd","expose","env","add","copy","entrypoint","volume","user","workdir","onbuild"],c="("+b.join("|")+")",d=new RegExp(c+"\\s*$","i"),e=new RegExp(c+"(\\s+)","i");a.defineSimpleMode("dockerfile",{start:[{regex:/#.*$/,token:"comment"},{regex:d,token:"variable-2"},{regex:e,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:"#"}}),a.defineMIME("text/x-dockerfile","dockerfile")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/dtd/dtd.min.js b/media/vendor/codemirror/mode/dtd/dtd.min.js index 8c8ad4a21c511..624a9b89fb9d4 100644 --- a/media/vendor/codemirror/mode/dtd/dtd.min.js +++ b/media/vendor/codemirror/mode/dtd/dtd.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("dtd",function(t){function e(t,e){return a=e,t}function n(t,n){var a=t.next();if("<"!=a||!t.eat("!")){if("<"==a&&t.eat("?"))return n.tokenize=u("meta","?>"),e("meta",a);if("#"==a&&t.eatWhile(/[\w]/))return e("atom","tag");if("|"==a)return e("keyword","seperator");if(a.match(/[\(\)\[\]\-\.,\+\?>]/))return e(null,a);if(a.match(/[\[\]]/))return e("rule",a);if('"'==a||"'"==a)return n.tokenize=i(a),n.tokenize(t,n);if(t.eatWhile(/[a-zA-Z\?\+\d]/)){var o=t.current();return null!==o.substr(o.length-1,o.length).match(/\?|\+/)&&t.backUp(1),e("tag","tag")}return"%"==a||"*"==a?e("number","number"):(t.eatWhile(/[\w\\\-_%.{,]/),e(null,null))}return t.eatWhile(/[\-]/)?(n.tokenize=r,r(t,n)):t.eatWhile(/[\w]/)?e("keyword","doindent"):void 0}function r(t,r){for(var i,u=0;null!=(i=t.next());){if(u>=2&&">"==i){r.tokenize=n;break}u="-"==i?u+1:0}return e("comment","comment")}function i(t){return function(r,i){for(var u,a=!1;null!=(u=r.next());){if(u==t&&!a){i.tokenize=n;break}a=!a&&"\\"==u}return e("string","tag")}}function u(t,e){return function(r,i){for(;!r.eol();){if(r.match(e)){i.tokenize=n;break}r.next()}return t}}var a,o=t.indentUnit;return{startState:function(t){return{tokenize:n,baseIndent:t||0,stack:[]}},token:function(t,e){if(t.eatSpace())return null;var n=e.tokenize(t,e),r=e.stack[e.stack.length-1];return"["==t.current()||"doindent"===a||"["==a?e.stack.push("rule"):"endtag"===a?e.stack[e.stack.length-1]="endtag":"]"==t.current()||"]"==a||">"==a&&"rule"==r?e.stack.pop():"["==a&&e.stack.push("["),n},indent:function(t,e){var n=t.stack.length;return e.match(/\]\s+|\]/)?n-=1:">"===e.substr(e.length-1,e.length)&&("<"===e.substr(0,1)||"doindent"==a&&e.length>1||("doindent"==a?n--:">"==a&&e.length>1||"tag"==a&&">"!==e||("tag"==a&&"rule"==t.stack[t.stack.length-1]?n--:"tag"==a?n++:">"===e&&"rule"==t.stack[t.stack.length-1]&&">"===a?n--:">"===e&&"rule"==t.stack[t.stack.length-1]||("<"!==e.substr(0,1)&&">"===e.substr(0,1)?n-=1:">"===e||(n-=1)))),null!=a&&"]"!=a||n--),t.baseIndent+n*o},electricChars:"]>"}}),t.defineMIME("application/xml-dtd","dtd")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("dtd",function(a){function b(a,b){return g=b,a}function c(a,c){var g=a.next();if("<"!=g||!a.eat("!")){if("<"==g&&a.eat("?"))return c.tokenize=f("meta","?>"),b("meta",g);if("#"==g&&a.eatWhile(/[\w]/))return b("atom","tag");if("|"==g)return b("keyword","seperator");if(g.match(/[\(\)\[\]\-\.,\+\?>]/))return b(null,g);if(g.match(/[\[\]]/))return b("rule",g);if('"'==g||"'"==g)return c.tokenize=e(g),c.tokenize(a,c);if(a.eatWhile(/[a-zA-Z\?\+\d]/)){var h=a.current();return null!==h.substr(h.length-1,h.length).match(/\?|\+/)&&a.backUp(1),b("tag","tag")}return"%"==g||"*"==g?b("number","number"):(a.eatWhile(/[\w\\\-_%.{,]/),b(null,null))}return a.eatWhile(/[\-]/)?(c.tokenize=d,d(a,c)):a.eatWhile(/[\w]/)?b("keyword","doindent"):void 0}function d(a,d){for(var e,f=0;null!=(e=a.next());){if(f>=2&&">"==e){d.tokenize=c;break}f="-"==e?f+1:0}return b("comment","comment")}function e(a){return function(d,e){for(var f,g=!1;null!=(f=d.next());){if(f==a&&!g){e.tokenize=c;break}g=!g&&"\\"==f}return b("string","tag")}}function f(a,b){return function(d,e){for(;!d.eol();){if(d.match(b)){e.tokenize=c;break}d.next()}return a}}var g,h=a.indentUnit;return{startState:function(a){return{tokenize:c,baseIndent:a||0,stack:[]}},token:function(a,b){if(a.eatSpace())return null;var c=b.tokenize(a,b),d=b.stack[b.stack.length-1];return"["==a.current()||"doindent"===g||"["==g?b.stack.push("rule"):"endtag"===g?b.stack[b.stack.length-1]="endtag":"]"==a.current()||"]"==g||">"==g&&"rule"==d?b.stack.pop():"["==g&&b.stack.push("["),c},indent:function(a,b){var c=a.stack.length;return b.match(/\]\s+|\]/)?c-=1:">"===b.substr(b.length-1,b.length)&&("<"===b.substr(0,1)||"doindent"==g&&b.length>1||("doindent"==g?c--:">"==g&&b.length>1||"tag"==g&&">"!==b||("tag"==g&&"rule"==a.stack[a.stack.length-1]?c--:"tag"==g?c++:">"===b&&"rule"==a.stack[a.stack.length-1]&&">"===g?c--:">"===b&&"rule"==a.stack[a.stack.length-1]||("<"!==b.substr(0,1)&&">"===b.substr(0,1)?c-=1:">"===b||(c-=1)))),null!=g&&"]"!=g||c--),a.baseIndent+c*h},electricChars:"]>"}}),a.defineMIME("application/xml-dtd","dtd")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/dylan/dylan.min.js b/media/vendor/codemirror/mode/dylan/dylan.min.js index d1d9941bb7756..2518bb02531d1 100644 --- a/media/vendor/codemirror/mode/dylan/dylan.min.js +++ b/media/vendor/codemirror/mode/dylan/dylan.min.js @@ -1 +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 n(e,n){for(var t=0;t&|]/.test(r)?(e.next(),"operator"):e.match("define")?"def":(e.eatWhile(/[\w\-]/),p.hasOwnProperty(e.current())?b[e.current()]:e.current().match(c)?"variable":(e.next(),"variable-2"))}function o(e,n){for(var t,i=!1,o=!1,a=0;t=e.next();){if("/"==t&&i){if(!(a>0)){n.tokenize=r;break}a--}else"*"==t&&o&&a++;i="*"==t,o="/"==t}return"comment"}function a(e,n){return function(t,i){for(var o,a=!1,f=!1;null!=(o=t.next());){if(o==e&&!a){f=!0;break}a=!a&&"\\"==o}return!f&&a||(i.tokenize=r),n}}var f={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"]};f.otherDefinition=f.unnamedDefinition.concat(f.namedDefinition).concat(f.otherParameterizedDefinition),f.definition=f.typeParameterizedDefinition.concat(f.otherDefinition),f.parameterizedDefinition=f.typeParameterizedDefinition.concat(f.otherParameterizedDefinition),f.simpleDefinition=f.constantSimpleDefinition.concat(f.variableSimpleDefinition).concat(f.otherSimpleDefinition),f.keyword=f.statement.concat(f.separator).concat(f.other);var l="[-_a-zA-Z?!*@<>$%]+",c=new RegExp("^"+l),u={symbolKeyword:l+":",symbolClass:"<"+l+">",symbolGlobal:"\\*"+l+"\\*",symbolConstant:"\\$"+l},s={symbolKeyword:"atom",symbolClass:"tag",symbolGlobal:"variable-2",symbolConstant:"variable-3"};for(var m in u)u.hasOwnProperty(m)&&(u[m]=new RegExp("^"+u[m]));u.keyword=[/^with(?:out)?-[-_a-zA-Z?!*@<>$%]+/];var d={};d.keyword="keyword",d.definition="def",d.simpleDefinition="def",d.signalingCalls="builtin";var p={},b={};return n(["keyword","definition","simpleDefinition","signalingCalls"],function(e){n(f[e],function(n){p[n]=e,b[n]=d[e]})}),{startState:function(){return{tokenize:r,currentIndent:0}},token:function(e,n){return e.eatSpace()?null:n.tokenize(e,n)},blockCommentStart:"/*",blockCommentEnd:"*/"}}),e.defineMIME("text/x-dylan","dylan")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){for(var c=0;c&|]/.test(e)?(a.next(),"operator"):a.match("define")?"def":(a.eatWhile(/[\w\-]/),o.hasOwnProperty(a.current())?p[a.current()]:a.current().match(j)?"variable":(a.next(),"variable-2"))}function f(a,b){for(var c,d=!1,f=!1,g=0;c=a.next();){if("/"==c&&d){if(!(g>0)){b.tokenize=e;break}g--}else"*"==c&&f&&g++;d="*"==c,f="/"==c}return"comment"}function g(a,b){return function(c,d){for(var f,g=!1,h=!1;null!=(f=c.next());){if(f==a&&!g){h=!0;break}g=!g&&"\\"==f}return!h&&g||(d.tokenize=e),b}}var h={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"]};h.otherDefinition=h.unnamedDefinition.concat(h.namedDefinition).concat(h.otherParameterizedDefinition),h.definition=h.typeParameterizedDefinition.concat(h.otherDefinition),h.parameterizedDefinition=h.typeParameterizedDefinition.concat(h.otherParameterizedDefinition),h.simpleDefinition=h.constantSimpleDefinition.concat(h.variableSimpleDefinition).concat(h.otherSimpleDefinition),h.keyword=h.statement.concat(h.separator).concat(h.other);var i="[-_a-zA-Z?!*@<>$%]+",j=new RegExp("^"+i),k={symbolKeyword:i+":",symbolClass:"<"+i+">",symbolGlobal:"\\*"+i+"\\*",symbolConstant:"\\$"+i},l={symbolKeyword:"atom",symbolClass:"tag",symbolGlobal:"variable-2",symbolConstant:"variable-3"};for(var m in k)k.hasOwnProperty(m)&&(k[m]=new RegExp("^"+k[m]));k.keyword=[/^with(?:out)?-[-_a-zA-Z?!*@<>$%]+/];var n={};n.keyword="keyword",n.definition="def",n.simpleDefinition="def",n.signalingCalls="builtin";var o={},p={};return b(["keyword","definition","simpleDefinition","signalingCalls"],function(a){b(h[a],function(b){o[b]=a,p[b]=n[a]})}),{startState:function(){return{tokenize:e,currentIndent:0}},token:function(a,b){return a.eatSpace()?null:b.tokenize(a,b)},blockCommentStart:"/*",blockCommentEnd:"*/"}}),a.defineMIME("text/x-dylan","dylan")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/ebnf/ebnf.min.js b/media/vendor/codemirror/mode/ebnf/ebnf.min.js index 32dbfc1882e0d..6fd8c4a35c054 100644 --- a/media/vendor/codemirror/mode/ebnf/ebnf.min.js +++ b/media/vendor/codemirror/mode/ebnf/ebnf.min.js @@ -1 +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";e.defineMode("ebnf",function(t){var a={slash:0,parenthesis:1},r={comment:0,_string:1,characterClass:2},c=null;return t.bracesMode&&(c=e.getMode(t,t.bracesMode)),{startState:function(){return{stringType:null,commentType:null,braced:0,lhs:!0,localState:null,stack:[],inDefinition:!1}},token:function(t,n){if(t){switch(0===n.stack.length&&('"'==t.peek()||"'"==t.peek()?(n.stringType=t.peek(),t.next(),n.stack.unshift(r._string)):t.match(/^\/\*/)?(n.stack.unshift(r.comment),n.commentType=a.slash):t.match(/^\(\*/)&&(n.stack.unshift(r.comment),n.commentType=a.parenthesis)),n.stack[0]){case r._string:for(;n.stack[0]===r._string&&!t.eol();)t.peek()===n.stringType?(t.next(),n.stack.shift()):"\\"===t.peek()?(t.next(),t.next()):t.match(/^.[^\\\"\']*/);return n.lhs?"property string":"string";case r.comment:for(;n.stack[0]===r.comment&&!t.eol();)n.commentType===a.slash&&t.match(/\*\//)?(n.stack.shift(),n.commentType=null):n.commentType===a.parenthesis&&t.match(/\*\)/)?(n.stack.shift(),n.commentType=null):t.match(/^.[^\*]*/);return"comment";case r.characterClass:for(;n.stack[0]===r.characterClass&&!t.eol();)t.match(/^[^\]\\]+/)||t.match(/^\\./)||n.stack.shift();return"operator"}var s=t.peek();if(null!==c&&(n.braced||"{"===s)){null===n.localState&&(n.localState=e.startState(c));var i=c.token(t,n.localState),o=t.current();if(!i)for(var m=0;m>/))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":-1!=["[","]","(",")"].indexOf(t.peek())?(t.next(),"bracket"):(t.eatSpace()||t.next(),null)}}}}),e.defineMIME("text/x-ebnf","ebnf")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("ebnf",function(b){var c={slash:0,parenthesis:1},d={comment:0,_string:1,characterClass:2},e=null;return b.bracesMode&&(e=a.getMode(b,b.bracesMode)),{startState:function(){return{stringType:null,commentType:null,braced:0,lhs:!0,localState:null,stack:[],inDefinition:!1}},token:function(b,f){if(b){switch(0===f.stack.length&&('"'==b.peek()||"'"==b.peek()?(f.stringType=b.peek(),b.next(),f.stack.unshift(d._string)):b.match(/^\/\*/)?(f.stack.unshift(d.comment),f.commentType=c.slash):b.match(/^\(\*/)&&(f.stack.unshift(d.comment),f.commentType=c.parenthesis)),f.stack[0]){case d._string:for(;f.stack[0]===d._string&&!b.eol();)b.peek()===f.stringType?(b.next(),f.stack.shift()):"\\"===b.peek()?(b.next(),b.next()):b.match(/^.[^\\\"\']*/);return f.lhs?"property string":"string";case d.comment:for(;f.stack[0]===d.comment&&!b.eol();)f.commentType===c.slash&&b.match(/\*\//)?(f.stack.shift(),f.commentType=null):f.commentType===c.parenthesis&&b.match(/\*\)/)?(f.stack.shift(),f.commentType=null):b.match(/^.[^\*]*/);return"comment";case d.characterClass:for(;f.stack[0]===d.characterClass&&!b.eol();)b.match(/^[^\]\\]+/)||b.match(/^\\./)||f.stack.shift();return"operator"}var g=b.peek();if(null!==e&&(f.braced||"{"===g)){null===f.localState&&(f.localState=a.startState(e));var h=e.token(b,f.localState),i=b.current();if(!h)for(var j=0;j>/))return"builtin"}return b.match(/^\/\//)?(b.skipToEnd(),"comment"):b.match(/return/)?"operator":b.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)?b.match(/(?=[\(.])/)?"variable":b.match(/(?=[\s\n]*[:=])/)?"def":"variable-2":["[","]","(",")"].indexOf(b.peek())!=-1?(b.next(),"bracket"):(b.eatSpace()||b.next(),null)}}}}),a.defineMIME("text/x-ebnf","ebnf")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/ecl/ecl.min.js b/media/vendor/codemirror/mode/ecl/ecl.min.js index e6ea6f44bfe92..f8d3ec0af6fba 100644 --- a/media/vendor/codemirror/mode/ecl/ecl.min.js +++ b/media/vendor/codemirror/mode/ecl/ecl.min.js @@ -1 +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";e.defineMode("ecl",function(e){function t(e){for(var t={},n=e.split(" "),r=0;r=0&&(!isNaN(a[l])||"_"==a[l]);)--l;if(l>0){var s=a.substr(0,l+1);if(m.propertyIsEnumerable(s))return y.propertyIsEnumerable(s)&&(c="newstatement"),"variable-3"}return b.propertyIsEnumerable(a)?"atom":null}function o(e){return function(t,n){for(var o,i=!1,a=!1;null!=(o=t.next());){if(o==e&&!i){a=!0;break}i=!i&&"\\"==o}return!a&&i||(n.tokenize=r),"string"}}function i(e,t){for(var n,o=!1;n=e.next();){if("/"==n&&o){t.tokenize=r;break}o="*"==n}return"comment"}function a(e,t,n,r,o){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=o}function l(e,t,n){return e.context=new a(e.indented,t,n,null,e.context)}function s(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"),p=t("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait"),f=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"),y=t("catch class do else finally for if switch try while"),b=t("true false null"),g={"#":n},v=/[+\-*&%=<>!?|\/]/;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 o=(t.tokenize||r)(e,t);if("comment"==o||"meta"==o)return o;if(null==n.align&&(n.align=!0),";"!=c&&":"!=c||"statement"!=n.type)if("{"==c)l(t,e.column(),"}");else if("["==c)l(t,e.column(),"]");else if("("==c)l(t,e.column(),")");else if("}"==c){for(;"statement"==n.type;)n=s(t);for("}"==n.type&&(n=s(t));"statement"==n.type;)n=s(t)}else c==n.type?s(t):("}"==n.type||"top"==n.type||"statement"==n.type&&"newstatement"==c)&&l(t,e.column(),"statement");else s(t);return t.startOfLine=!1,o},indent:function(e,t){if(e.tokenize!=r&&null!=e.tokenize)return 0;var n=e.context,o=t&&t.charAt(0);"statement"==n.type&&"}"==o&&(n=n.prev);var i=o==n.type;return"statement"==n.type?n.indented+("{"==o?0:u):n.align?n.column+(i?0:1):n.indented+(i?0:u)},electricChars:"{}"}}),e.defineMIME("text/x-ecl","ecl")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("ecl",function(a){function b(a){for(var b={},c=a.split(" "),d=0;d=0&&(!isNaN(g[h])||"_"==g[h]);)--h;if(h>0){var i=g.substr(0,h+1);if(o.propertyIsEnumerable(i))return q.propertyIsEnumerable(i)&&(j="newstatement"),"variable-3"}return r.propertyIsEnumerable(g)?"atom":null}function e(a){return function(b,c){for(var e,f=!1,g=!1;null!=(e=b.next());){if(e==a&&!f){g=!0;break}f=!f&&"\\"==e}return!g&&f||(c.tokenize=d),"string"}}function f(a,b){for(var c,e=!1;c=a.next();){if("/"==c&&e){b.tokenize=d;break}e="*"==c}return"comment"}function g(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function h(a,b,c){return a.context=new g(a.indented,b,c,null,a.context)}function i(a){var b=a.context.type;return")"!=b&&"]"!=b&&"}"!=b||(a.indented=a.context.indented),a.context=a.context.prev}var j,k=a.indentUnit,l=b("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"),m=b("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait"),n=b("__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"),o=b("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode"),p=b("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when"),q=b("catch class do else finally for if switch try while"),r=b("true false null"),s={"#":c},t=/[+\-*&%=<>!?|\/]/;return{startState:function(a){return{tokenize:null,context:new g((a||0)-k,0,"top",!1),indented:0,startOfLine:!0}},token:function(a,b){var c=b.context;if(a.sol()&&(null==c.align&&(c.align=!1),b.indented=a.indentation(),b.startOfLine=!0),a.eatSpace())return null;j=null;var e=(b.tokenize||d)(a,b);if("comment"==e||"meta"==e)return e;if(null==c.align&&(c.align=!0),";"!=j&&":"!=j||"statement"!=c.type)if("{"==j)h(b,a.column(),"}");else if("["==j)h(b,a.column(),"]");else if("("==j)h(b,a.column(),")");else if("}"==j){for(;"statement"==c.type;)c=i(b);for("}"==c.type&&(c=i(b));"statement"==c.type;)c=i(b)}else j==c.type?i(b):("}"==c.type||"top"==c.type||"statement"==c.type&&"newstatement"==j)&&h(b,a.column(),"statement");else i(b);return b.startOfLine=!1,e},indent:function(a,b){if(a.tokenize!=d&&null!=a.tokenize)return 0;var c=a.context,e=b&&b.charAt(0);"statement"==c.type&&"}"==e&&(c=c.prev);var f=e==c.type;return"statement"==c.type?c.indented+("{"==e?0:k):c.align?c.column+(f?0:1):c.indented+(f?0:k)},electricChars:"{}"}}),a.defineMIME("text/x-ecl","ecl")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/eiffel/eiffel.min.js b/media/vendor/codemirror/mode/eiffel/eiffel.min.js index 1c6afd4e2fb1e..94128a9e6d317 100644 --- a/media/vendor/codemirror/mode/eiffel/eiffel.min.js +++ b/media/vendor/codemirror/mode/eiffel/eiffel.min.js @@ -1 +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";e.defineMode("eiffel",function(){function e(e){for(var t={},r=0,n=e.length;r~]/.test(i)?(e.eatWhile(/[=+\-\/*^%<>~]/),"operator"):null}function n(e,t,r){return function(n,i){for(var o,a=!1;null!=(o=n.next());){if(o==e&&(r||!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:[r]}},token:function(e,t){var r=t.tokenize[t.tokenize.length-1](e,t);if("ident"==r){var n=e.current();r=i.propertyIsEnumerable(e.current())?"keyword":o.propertyIsEnumerable(e.current())?"operator":/^[A-Z][A-Z_0-9]*$/g.test(n)?"tag":/^0[bB][0-1]+$/g.test(n)?"number":/^0[cC][0-7]+$/g.test(n)?"number":/^0[xX][a-fA-F0-9]+$/g.test(n)?"number":/^([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)$/g.test(n)?"number":/^[0-9]+$/g.test(n)?"number":"variable"}return r},lineComment:"--"}}),e.defineMIME("text/x-eiffel","eiffel")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("eiffel",function(){function a(a){for(var b={},c=0,d=a.length;c~]/.test(e)?(a.eatWhile(/[=+\-\/*^%<>~]/),"operator"):null}function d(a,b,c){return function(d,e){for(var f,g=!1;null!=(f=d.next());){if(f==a&&(c||!g)){e.tokenize.pop();break}g=!g&&"%"==f}return b}}var e=a(["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"]),f=a([":=","and then","and","or","<<",">>"]);return{startState:function(){return{tokenize:[c]}},token:function(a,b){var c=b.tokenize[b.tokenize.length-1](a,b);if("ident"==c){var d=a.current();c=e.propertyIsEnumerable(a.current())?"keyword":f.propertyIsEnumerable(a.current())?"operator":/^[A-Z][A-Z_0-9]*$/g.test(d)?"tag":/^0[bB][0-1]+$/g.test(d)?"number":/^0[cC][0-7]+$/g.test(d)?"number":/^0[xX][a-fA-F0-9]+$/g.test(d)?"number":/^([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)$/g.test(d)?"number":/^[0-9]+$/g.test(d)?"number":"variable"}return c},lineComment:"--"}}),a.defineMIME("text/x-eiffel","eiffel")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/elm/elm.min.js b/media/vendor/codemirror/mode/elm/elm.min.js index d47f02813b326..285ea3d8b69aa 100644 --- a/media/vendor/codemirror/mode/elm/elm.min.js +++ b/media/vendor/codemirror/mode/elm/elm.min.js @@ -1 +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";e.defineMode("elm",function(){function e(e,t,r){return t(r),r(e,t)}function t(){return function(t,i){if(t.eatWhile(d))return null;var h=t.next();if(m.test(h)){if("{"==h&&t.eat("-")){x="comment";return t.eat("#")&&(x="meta"),e(t,i,r(x,1))}return null}if("'"==h)return t.eat("\\"),t.next(),t.eat("'")?"string":"error";if('"'==h)return e(t,i,n);if(a.test(h))return t.eatWhile(c),t.eat(".")?"qualifier":"variable-2";if(u.test(h)){var p=1===t.pos;return t.eatWhile(c),p?"variable-3":"variable"}if(f.test(h)){if("0"==h){if(t.eat(/[xX]/))return t.eatWhile(o),"integer";if(t.eat(/[oO]/))return t.eatWhile(l),"number"}t.eatWhile(f);var x="number";return t.eat(".")&&(x="number",t.eatWhile(f)),t.eat(/[eE]/)&&(x="number",t.eat(/[-+]/),t.eatWhile(f)),x}return s.test(h)?"-"==h&&t.eat(/-/)&&(t.eatWhile(/-/),!t.eat(s))?(t.skipToEnd(),"comment"):(t.eatWhile(s),"builtin"):"error"}}function r(e,n){return 0==n?t():function(i,u){for(var a=n;!i.eol();){var f=i.next();if("{"==f&&i.eat("-"))++a;else if("-"==f&&i.eat("}")&&0==--a)return u(t()),e}return u(r(e,a)),e}}function n(e,r){for(;!e.eol();){var n=e.next();if('"'==n)return r(t()),"string";if("\\"==n){if(e.eol()||e.eat(d))return r(i),"string";e.eat("&")||e.next()}}return r(t()),"error"}function i(r,i){return r.eat("\\")?e(r,i,n):(r.next(),i(t()),"error")}var u=/[a-z_]/,a=/[A-Z]/,f=/[0-9]/,o=/[0-9A-Fa-f]/,l=/[0-7]/,c=/[a-z_A-Z0-9\']/,s=/[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]/,m=/[(),;[\]`{}]/,d=/[ \t\v\f]/,h=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","_","..","|",":","=","\\",'"',"->","<-"],r=t.length;r--;)e[t[r]]="keyword";return e}();return{startState:function(){return{f:t()}},copyState:function(e){return{f:e.f}},token:function(e,t){var r=t.f(e,function(e){t.f=e}),n=e.current();return h.hasOwnProperty(n)?h[n]:r}}}),e.defineMIME("text/x-elm","elm")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("elm",function(){function a(a,b,c){return b(c),c(a,b)}function b(){return function(b,e){if(b.eatWhile(n))return null;var o=b.next();if(m.test(o)){if("{"==o&&b.eat("-")){var p="comment";return b.eat("#")&&(p="meta"),a(b,e,c(p,1))}return null}if("'"==o)return b.eat("\\"),b.next(),b.eat("'")?"string":"error";if('"'==o)return a(b,e,d);if(g.test(o))return b.eatWhile(k),b.eat(".")?"qualifier":"variable-2";if(f.test(o)){var q=1===b.pos;return b.eatWhile(k),q?"variable-3":"variable"}if(h.test(o)){if("0"==o){if(b.eat(/[xX]/))return b.eatWhile(i),"integer";if(b.eat(/[oO]/))return b.eatWhile(j),"number"}b.eatWhile(h);var p="number";return b.eat(".")&&(p="number",b.eatWhile(h)),b.eat(/[eE]/)&&(p="number",b.eat(/[-+]/),b.eatWhile(h)),p}return l.test(o)?"-"==o&&b.eat(/-/)&&(b.eatWhile(/-/),!b.eat(l))?(b.skipToEnd(),"comment"):(b.eatWhile(l),"builtin"):"error"}}function c(a,d){return 0==d?b():function(e,f){for(var g=d;!e.eol();){var h=e.next();if("{"==h&&e.eat("-"))++g;else if("-"==h&&e.eat("}")&&0==--g)return f(b()),a}return f(c(a,g)),a}}function d(a,c){for(;!a.eol();){var d=a.next();if('"'==d)return c(b()),"string";if("\\"==d){if(a.eol()||a.eat(n))return c(e),"string";a.eat("&")||a.next()}}return c(b()),"error"}function e(c,e){return c.eat("\\")?a(c,e,d):(c.next(),e(b()),"error")}var f=/[a-z_]/,g=/[A-Z]/,h=/[0-9]/,i=/[0-9A-Fa-f]/,j=/[0-7]/,k=/[a-z_A-Z0-9\']/,l=/[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]/,m=/[(),;[\]`{}]/,n=/[ \t\v\f]/,o=function(){for(var a={},b=["case","of","as","if","then","else","let","in","infix","infixl","infixr","type","alias","input","output","foreign","loopback","module","where","import","exposing","_","..","|",":","=","\\",'"',"->","<-"],c=b.length;c--;)a[b[c]]="keyword";return a}();return{startState:function(){return{f:b()}},copyState:function(a){return{f:a.f}},token:function(a,b){var c=b.f(a,function(a){b.f=a}),d=a.current();return o.hasOwnProperty(d)?o[d]:c}}}),a.defineMIME("text/x-elm","elm")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/erlang/erlang.min.js b/media/vendor/codemirror/mode/erlang/erlang.min.js index d7749e6a3f019..0a2c441f81fde 100644 --- a/media/vendor/codemirror/mode/erlang/erlang.min.js +++ b/media/vendor/codemirror/mode/erlang/erlang.min.js @@ -1 +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";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),l(t,e,"string");if(t.in_atom)return t.in_atom=!a(e),l(t,e,"atom");if(e.eatSpace())return l(t,e,"whitespace");if(!m(t)&&e.match(/-\s*[a-zß-öø-ÿ][\wØ-ÞÀ-Öß-öø-ÿ]*/))return s(e.current(),W)?l(t,e,"type"):l(t,e,"attribute");var n=e.next();if("%"==n)return e.skipToEnd(),l(t,e,"comment");if(":"==n)return l(t,e,"colon");if("?"==n)return e.eatSpace(),e.eatWhile($),l(t,e,"macro");if("#"==n)return e.eatSpace(),e.eatWhile($),l(t,e,"record");if("$"==n)return"\\"!=e.next()||e.match(B)?l(t,e,"number"):l(t,e,"error");if("."==n)return l(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),l(t,e,"fun");if(e.match(/\s*\(/,!1)||e.match(/\s*:/,!1))return l(t,e,"function")}return l(t,e,"atom")}if('"'==n)return t.in_string=!o(e),l(t,e,"string");if(/[A-Z_Ø-ÞÀ-Ö]/.test(n))return e.eatWhile($),l(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),l(t,e,"fun");var c=e.current();return s(c,U)?l(t,e,"keyword"):s(c,Z)?l(t,e,"operator"):e.match(/\s*\(/,!1)?!s(c,T)||":"==m(t).token&&"erlang"!=m(t,2).token?s(c,O)?l(t,e,"guard"):l(t,e,"function"):l(t,e,"builtin"):":"==u(e)?"erlang"==c?l(t,e,"builtin"):l(t,e,"function"):s(c,["true","false"])?l(t,e,"boolean"):l(t,e,"atom")}var _=/[0-9]/,f=/[0-9a-zA-Z]/;return _.test(n)?(e.eatWhile(_),e.eat("#")?e.eatWhile(f)||e.backUp(1):e.eat(".")&&(e.eatWhile(_)?e.eat(/[eE]/)&&(e.eat(/[-+]/)?e.eatWhile(_)||e.backUp(2):e.eatWhile(_)||e.backUp(1)):e.backUp(1)),l(t,e,"number")):r(e,P,j)?l(t,e,"open_paren"):r(e,C,I)?l(t,e,"close_paren"):i(e,E,A)?l(t,e,"separator"):i(e,M,q)?l(t,e,"operator"):l(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(),s(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 k(e,{g:["{"]});case"]":return k(e,{i:["["]});case")":return k(e,{i:["("]});case">>":return k(e,{i:["<<"]});case"end":return k(e,{i:["begin","case","fun","if","receive","try"]});case",":return k(e,{e:["begin","try","when","->",",","(","[","{","<<"]});case"->":return k(e,{r:["when"],m:["try","if","case","receive"]});case";":return k(e,{E:["case","fun","if","receive","try","when"]});case"catch":return k(e,{e:["try"]});case"of":return k(e,{e:["case"]});case"after":return k(e,{e:["receive","try"]});default:return e}}function k(e,t){for(var n in t)for(var r=e.length-1,i=t[n],o=r-1;-1"==c.token?s(u.token,["receive","case","if","try"])?u.column+o+o:u.column+o:s(c.token,j)?c.column+c.token.length:(i=w(n),z(i)?i.column+o:0):0}function y(e){var t=e.match(/,|[a-z]+|\}|\]|\)|>>|\|+|\(/);return z(t)&&0===t.index?t[0]:""}function v(e){var t=e.tokenStack.slice(0,-1),n=S(t,"type",["open_paren"]);return!!z(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 z(n)&&z(r)&&n,;]/,A=["->",";",","],Z=["and","andalso","band","bnot","bor","bsl","bsr","bxor","div","not","or","orelse","rem","xor"],M=/[\+\-\*\/<>=\|:!]/,q=["=","+","-","*","/",">",">=","<","=<","=:=","==","=/=","/=","||","<-","!"],P=/[<\(\[\{]/,j=["<<","(","[","{"],C=/[>\)\]\}]/,I=["}","]",")",">>"],O=["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"],T=["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@Ø-ÞÀ-Öß-öø-ÿ]/,B=/[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 h(e,t)},lineComment:"%"}})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMIME("text/x-erlang","erlang"),a.defineMode("erlang",function(b){function c(a,b){if(b.in_string)return b.in_string=!f(a),k(b,a,"string");if(b.in_atom)return b.in_atom=!g(a),k(b,a,"atom");if(a.eatSpace())return k(b,a,"whitespace");if(!o(b)&&a.match(/-\s*[a-zß-öø-ÿ][\wØ-ÞÀ-Öß-öø-ÿ]*/))return j(a.current(),A)?k(b,a,"type"):k(b,a,"attribute");var c=a.next();if("%"==c)return a.skipToEnd(),k(b,a,"comment");if(":"==c)return k(b,a,"colon");if("?"==c)return a.eatSpace(),a.eatWhile(N),k(b,a,"macro");if("#"==c)return a.eatSpace(),a.eatWhile(N),k(b,a,"record");if("$"==c)return"\\"!=a.next()||a.match(O)?k(b,a,"number"):k(b,a,"error");if("."==c)return k(b,a,"dot");if("'"==c){if(!(b.in_atom=!g(a))){if(a.match(/\s*\/\s*[0-9]/,!1))return a.match(/\s*\/\s*[0-9]/,!0),k(b,a,"fun");if(a.match(/\s*\(/,!1)||a.match(/\s*:/,!1))return k(b,a,"function")}return k(b,a,"atom")}if('"'==c)return b.in_string=!f(a),k(b,a,"string");if(/[A-Z_Ø-ÞÀ-Ö]/.test(c))return a.eatWhile(N),k(b,a,"variable");if(/[a-z_ß-öø-ÿ]/.test(c)){if(a.eatWhile(N),a.match(/\s*\/\s*[0-9]/,!1))return a.match(/\s*\/\s*[0-9]/,!0),k(b,a,"fun");var h=a.current();return j(h,B)?k(b,a,"keyword"):j(h,E)?k(b,a,"operator"):a.match(/\s*\(/,!1)?!j(h,M)||":"==o(b).token&&"erlang"!=o(b,2).token?j(h,L)?k(b,a,"guard"):k(b,a,"function"):k(b,a,"builtin"):":"==i(a)?"erlang"==h?k(b,a,"builtin"):k(b,a,"function"):j(h,["true","false"])?k(b,a,"boolean"):k(b,a,"atom")}var l=/[0-9]/;return l.test(c)?(a.eatWhile(l),a.eat("#")?a.eatWhile(/[0-9a-zA-Z]/)||a.backUp(1):a.eat(".")&&(a.eatWhile(l)?a.eat(/[eE]/)&&(a.eat(/[-+]/)?a.eatWhile(l)||a.backUp(2):a.eatWhile(l)||a.backUp(1)):a.backUp(1)),k(b,a,"number")):d(a,H,I)?k(b,a,"open_paren"):d(a,J,K)?k(b,a,"close_paren"):e(a,C,D)?k(b,a,"separator"):e(a,F,G)?k(b,a,"operator"):k(b,a,null)}function d(a,b,c){if(1==a.current().length&&b.test(a.current())){for(a.backUp(1);b.test(a.peek());)if(a.next(),j(a.current(),c))return!0;a.backUp(a.current().length-1)}return!1}function e(a,b,c){if(1==a.current().length&&b.test(a.current())){for(;b.test(a.peek());)a.next();for(;01&&"fun"===a[b].type&&"fun"===a[b-1].token)return a.slice(0,b-1);switch(a[b].token){case"}":return s(a,{g:["{"]});case"]":return s(a,{i:["["]});case")":return s(a,{i:["("]});case">>":return s(a,{i:["<<"]});case"end":return s(a,{i:["begin","case","fun","if","receive","try"]});case",":return s(a,{e:["begin","try","when","->",",","(","[","{","<<"]});case"->":return s(a,{r:["when"],m:["try","if","case","receive"]});case";":return s(a,{E:["case","fun","if","receive","try","when"]});case"catch":return s(a,{e:["try"]});case"of":return s(a,{e:["case"]});case"after":return s(a,{e:["receive","try"]});default:return a}}function s(a,b){for(var c in b)for(var d=a.length-1,e=b[c],f=d-1;-1"==h.token?j(i.token,["receive","case","if","try"])?i.column+f+f:i.column+f:j(h.token,I)?h.column+h.token.length:(e=w(c),z(e)?e.column+f:0):0}function u(a){var b=a.match(/,|[a-z]+|\}|\]|\)|>>|\|+|\(/);return z(b)&&0===b.index?b[0]:""}function v(a){var b=a.tokenStack.slice(0,-1),c=y(b,"type",["open_paren"]);return!!z(b[c])&&b[c]}function w(a){var b=a.tokenStack,c=y(b,"type",["open_paren","separator","keyword"]),d=y(b,"type",["operator"]);return z(c)&&z(d)&&c,;]/,D=["->",";",","],E=["and","andalso","band","bnot","bor","bsl","bsr","bxor","div","not","or","orelse","rem","xor"],F=/[\+\-\*\/<>=\|:!]/,G=["=","+","-","*","/",">",">=","<","=<","=:=","==","=/=","/=","||","<-","!"],H=/[<\(\[\{]/,I=["<<","(","[","{"],J=/[>\)\]\}]/,K=["}","]",")",">>"],L=["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"],M=["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"],N=/[\w@Ø-ÞÀ-Öß-öø-ÿ]/,O=/[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(a,b){return c(a,b)},indent:function(a,b){return t(a,b)},lineComment:"%"}})}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/factor/factor.js b/media/vendor/codemirror/mode/factor/factor.js index 86d7adf627c5a..e238c5ea64ae0 100644 --- a/media/vendor/codemirror/mode/factor/factor.js +++ b/media/vendor/codemirror/mode/factor/factor.js @@ -22,52 +22,54 @@ {regex: /#?!.*/, token: "comment"}, // strings """, multiline --> state {regex: /"""/, token: "string", next: "string3"}, - {regex: /"/, token: "string", next: "string"}, + {regex: /(STRING:)(\s)/, token: ["keyword", null], next: "string2"}, + {regex: /\S*?"/, token: "string", next: "string"}, // numbers: dec, hex, unicode, bin, fractional, complex - {regex: /(?:[+-]?)(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\d+.?\d*)/, token: "number"}, + {regex: /(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\-?\d+.?\d*)(?=\s)/, token: "number"}, //{regex: /[+-]?/} //fractional // definition: defining word, defined word, etc - {regex: /(\:)(\s+)(\S+)(\s+)(\()/, token: ["keyword", null, "def", null, "keyword"], next: "stack"}, + {regex: /((?:GENERIC)|\:?\:)(\s+)(\S+)(\s+)(\()/, token: ["keyword", null, "def", null, "bracket"], next: "stack"}, + // method definition: defining word, type, defined word, etc + {regex: /(M\:)(\s+)(\S+)(\s+)(\S+)/, token: ["keyword", null, "def", null, "tag"]}, // vocabulary using --> state {regex: /USING\:/, token: "keyword", next: "vocabulary"}, // vocabulary definition/use - {regex: /(USE\:|IN\:)(\s+)(\S+)/, token: ["keyword", null, "variable-2"]}, - // - {regex: /<\S+>/, token: "builtin"}, + {regex: /(USE\:|IN\:)(\s+)(\S+)(?=\s|$)/, token: ["keyword", null, "tag"]}, + // definition: a defining word, defined word + {regex: /(\S+\:)(\s+)(\S+)(?=\s|$)/, token: ["keyword", null, "def"]}, // "keywords", incl. ; t f . [ ] { } defining words - {regex: /;|t|f|if|\.|\[|\]|\{|\}|MAIN:/, token: "keyword"}, + {regex: /(?:;|\\|t|f|if|loop|while|until|do|PRIVATE>| and the like + {regex: /\S+[\)>\.\*\?]+(?=\s|$)/, token: "builtin"}, + {regex: /[\)><]+\S+(?=\s|$)/, token: "builtin"}, + // operators + {regex: /(?:[\+\-\=\/\*<>])(?=\s|$)/, token: "keyword"}, // any id (?) {regex: /\S+/, token: "variable"}, - - { - regex: /./, - token: null - } + {regex: /\s+|./, token: null} ], vocabulary: [ {regex: /;/, token: "keyword", next: "start"}, - {regex: /\S+/, token: "variable-2"}, - { - regex: /./, - token: null - } + {regex: /\S+/, token: "tag"}, + {regex: /\s+|./, token: null} ], string: [ {regex: /(?:[^\\]|\\.)*?"/, token: "string", next: "start"}, {regex: /.*/, token: "string"} ], + string2: [ + {regex: /^;/, token: "keyword", 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 - } + {regex: /\)/, token: "bracket", next: "start"}, + {regex: /--/, token: "bracket"}, + {regex: /\S+/, token: "meta"}, + {regex: /\s+|./, token: null} ], // The meta property contains global information about the mode. It // can contain properties like lineComment, which are supported by diff --git a/media/vendor/codemirror/mode/factor/factor.min.js b/media/vendor/codemirror/mode/factor/factor.min.js index f9e267f63dca4..1c5fc4b589ccd 100644 --- a/media/vendor/codemirror/mode/factor/factor.min.js +++ b/media/vendor/codemirror/mode/factor/factor.min.js @@ -1 +1 @@ -!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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../../addon/mode/simple")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],a):a(CodeMirror)}(function(a){"use strict";a.defineSimpleMode("factor",{start:[{regex:/#?!.*/,token:"comment"},{regex:/"""/,token:"string",next:"string3"},{regex:/(STRING:)(\s)/,token:["keyword",null],next:"string2"},{regex:/\S*?"/,token:"string",next:"string"},{regex:/(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\-?\d+.?\d*)(?=\s)/,token:"number"},{regex:/((?:GENERIC)|\:?\:)(\s+)(\S+)(\s+)(\()/,token:["keyword",null,"def",null,"bracket"],next:"stack"},{regex:/(M\:)(\s+)(\S+)(\s+)(\S+)/,token:["keyword",null,"def",null,"tag"]},{regex:/USING\:/,token:"keyword",next:"vocabulary"},{regex:/(USE\:|IN\:)(\s+)(\S+)(?=\s|$)/,token:["keyword",null,"tag"]},{regex:/(\S+\:)(\s+)(\S+)(?=\s|$)/,token:["keyword",null,"def"]},{regex:/(?:;|\\|t|f|if|loop|while|until|do|PRIVATE>|\.\*\?]+(?=\s|$)/,token:"builtin"},{regex:/[\)><]+\S+(?=\s|$)/,token:"builtin"},{regex:/(?:[\+\-\=\/\*<>])(?=\s|$)/,token:"keyword"},{regex:/\S+/,token:"variable"},{regex:/\s+|./,token:null}],vocabulary:[{regex:/;/,token:"keyword",next:"start"},{regex:/\S+/,token:"tag"},{regex:/\s+|./,token:null}],string:[{regex:/(?:[^\\]|\\.)*?"/,token:"string",next:"start"},{regex:/.*/,token:"string"}],string2:[{regex:/^;/,token:"keyword",next:"start"},{regex:/.*/,token:"string"}],string3:[{regex:/(?:[^\\]|\\.)*?"""/,token:"string",next:"start"},{regex:/.*/,token:"string"}],stack:[{regex:/\)/,token:"bracket",next:"start"},{regex:/--/,token:"bracket"},{regex:/\S+/,token:"meta"},{regex:/\s+|./,token:null}],meta:{dontIndentStates:["start","vocabulary","string","string3","stack"],lineComment:["!","#!"]}}),a.defineMIME("text/x-factor","factor")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/fcl/fcl.min.js b/media/vendor/codemirror/mode/fcl/fcl.min.js index 36ce3adc1f27b..6fac7a1639c8a 100644 --- a/media/vendor/codemirror/mode/fcl/fcl.min.js +++ b/media/vendor/codemirror/mode/fcl/fcl.min.js @@ -1 +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";e.defineMode("fcl",function(e){function n(e,n){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 n.tokenize=t,t(e,n);if(e.eat("/"))return e.skipToEnd(),"comment"}if(d.test(r))return e.eatWhile(d),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var o=e.current().toLowerCase();return a.propertyIsEnumerable(o)||c.propertyIsEnumerable(o)||f.propertyIsEnumerable(o)?"keyword":l.propertyIsEnumerable(o)?"atom":"variable"}function t(e,t){for(var r,o=!1;r=e.next();){if(("/"==r||")"==r)&&o){t.tokenize=n;break}o="*"==r}return"comment"}function r(e,n,t,r,o){this.indented=e,this.column=n,this.type=t,this.align=r,this.prev=o}function o(e,n,t){return e.context=new r(e.indented,n,t,null,e.context)}function i(e){if(e.context.prev)return"end_block"==e.context.type&&(e.indented=e.context.indented),e.context=e.context.prev}var u=e.indentUnit,a={term:!0,method:!0,accu:!0,rule:!0,then:!0,is:!0,and:!0,or:!0,if:!0,default:!0},c={var_input:!0,var_output:!0,fuzzify:!0,defuzzify:!0,function_block:!0,ruleblock:!0},f={end_ruleblock:!0,end_defuzzify:!0,end_function_block:!0,end_fuzzify:!0,end_var:!0},l={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)-u,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;var u=(t.tokenize||n)(e,t);if("comment"==u)return u;null==r.align&&(r.align=!0);var a=e.current().toLowerCase();return c.propertyIsEnumerable(a)?o(t,e.column(),"end_block"):f.propertyIsEnumerable(a)&&i(t),t.startOfLine=!1,u},indent:function(e,t){if(e.tokenize!=n&&null!=e.tokenize)return 0;var r=e.context,o=f.propertyIsEnumerable(t);return r.align?r.column+(o?0:1):r.indented+(o?0:u)},electricChars:"ryk",fold:"brace",blockCommentStart:"(*",blockCommentEnd:"*)",lineComment:"//"}}),e.defineMIME("text/x-fcl","fcl")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("fcl",function(a){function b(a,b){var d=a.next();if(/[\d\.]/.test(d))return"."==d?a.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):"0"==d?a.match(/^[xX][0-9a-fA-F]+/)||a.match(/^0[0-7]+/):a.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if("/"==d||"("==d){if(a.eat("*"))return b.tokenize=c,c(a,b);if(a.eat("/"))return a.skipToEnd(),"comment"}if(l.test(d))return a.eatWhile(l),"operator";a.eatWhile(/[\w\$_\xa1-\uffff]/);var e=a.current().toLowerCase();return h.propertyIsEnumerable(e)||i.propertyIsEnumerable(e)||j.propertyIsEnumerable(e)?"keyword":k.propertyIsEnumerable(e)?"atom":"variable"}function c(a,c){for(var d,e=!1;d=a.next();){if(("/"==d||")"==d)&&e){c.tokenize=b;break}e="*"==d}return"comment"}function d(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function e(a,b,c){return a.context=new d(a.indented,b,c,null,a.context)}function f(a){if(a.context.prev){return"end_block"==a.context.type&&(a.indented=a.context.indented),a.context=a.context.prev}}var g=a.indentUnit,h={term:!0,method:!0,accu:!0,rule:!0,then:!0,is:!0,and:!0,or:!0,if:!0,default:!0},i={var_input:!0,var_output:!0,fuzzify:!0,defuzzify:!0,function_block:!0,ruleblock:!0},j={end_ruleblock:!0,end_defuzzify:!0,end_function_block:!0,end_fuzzify:!0,end_var:!0},k={true:!0,false:!0,nan:!0,real:!0,min:!0,max:!0,cog:!0,cogs:!0},l=/[+\-*&^%:=<>!|\/]/;return{startState:function(a){return{tokenize:null,context:new d((a||0)-g,0,"top",!1),indented:0,startOfLine:!0}},token:function(a,c){var d=c.context;if(a.sol()&&(null==d.align&&(d.align=!1),c.indented=a.indentation(),c.startOfLine=!0),a.eatSpace())return null;var g=(c.tokenize||b)(a,c);if("comment"==g)return g;null==d.align&&(d.align=!0);var h=a.current().toLowerCase();return i.propertyIsEnumerable(h)?e(c,a.column(),"end_block"):j.propertyIsEnumerable(h)&&f(c),c.startOfLine=!1,g},indent:function(a,c){if(a.tokenize!=b&&null!=a.tokenize)return 0;var d=a.context,e=j.propertyIsEnumerable(c);return d.align?d.column+(e?0:1):d.indented+(e?0:g)},electricChars:"ryk",fold:"brace",blockCommentStart:"(*",blockCommentEnd:"*)",lineComment:"//"}}),a.defineMIME("text/x-fcl","fcl")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/forth/forth.min.js b/media/vendor/codemirror/mode/forth/forth.min.js index 62e1ec097cb75..fd804ccd59a09 100644 --- a/media/vendor/codemirror/mode/forth/forth.min.js +++ b/media/vendor/codemirror/mode/forth/forth.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";function e(t){var e=[];return t.split(" ").forEach(function(t){e.push({name:t})}),e}var E=e("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"),i=e("IF ELSE THEN BEGIN WHILE REPEAT UNTIL RECURSE [IF] [ELSE] [THEN] ?DO DO LOOP +LOOP UNLOOP LEAVE EXIT AGAIN CASE OF ENDOF ENDCASE");t.defineMode("forth",function(){function t(t,e){var E;for(E=t.length-1;E>=0;E--)if(t[E].name===e.toUpperCase())return t[E]}return{startState:function(){return{state:"",base:10,coreWordList:E,immediateWordList:i,wordList:[]}},token:function(e,E){var i;if(e.eatSpace())return null;if(""===E.state){if(e.match(/^(\]|:NONAME)(\s|$)/i))return E.state=" compilation","builtin compilation";if(i=e.match(/^(\:)\s+(\S+)(\s|$)+/))return E.wordList.push({name:i[2].toUpperCase()}),E.state=" compilation","def"+E.state;if(i=e.match(/^(VARIABLE|2VARIABLE|CONSTANT|2CONSTANT|CREATE|POSTPONE|VALUE|WORD)\s+(\S+)(\s|$)+/i))return E.wordList.push({name:i[2].toUpperCase()}),"def"+E.state;if(i=e.match(/^(\'|\[\'\])\s+(\S+)(\s|$)+/))return"builtin"+E.state}else{if(e.match(/^(\;|\[)(\s)/))return E.state="",e.backUp(1),"builtin compilation";if(e.match(/^(\;|\[)($)/))return E.state="","builtin compilation";if(e.match(/^(POSTPONE)\s+\S+(\s|$)+/))return"builtin"}return i=e.match(/^(\S+)(\s+|$)/),i?void 0!==t(E.wordList,i[1])?"variable"+E.state:"\\"===i[1]?(e.skipToEnd(),"comment"+E.state):void 0!==t(E.coreWordList,i[1])?"builtin"+E.state:void 0!==t(E.immediateWordList,i[1])?"keyword"+E.state:"("===i[1]?(e.eatWhile(function(t){return")"!==t}),e.eat(")"),"comment"+E.state):".("===i[1]?(e.eatWhile(function(t){return")"!==t}),e.eat(")"),"string"+E.state):'S"'===i[1]||'."'===i[1]||'C"'===i[1]?(e.eatWhile(function(t){return'"'!==t}),e.eat('"'),"string"+E.state):i[1]-68719476735?"number"+E.state:"atom"+E.state:void 0}}}),t.defineMIME("text/x-forth","forth")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){var b=[];return a.split(" ").forEach(function(a){b.push({name:a})}),b}var c=b("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"),d=b("IF ELSE THEN BEGIN WHILE REPEAT UNTIL RECURSE [IF] [ELSE] [THEN] ?DO DO LOOP +LOOP UNLOOP LEAVE EXIT AGAIN CASE OF ENDOF ENDCASE");a.defineMode("forth",function(){function a(a,b){var c;for(c=a.length-1;c>=0;c--)if(a[c].name===b.toUpperCase())return a[c]}return{startState:function(){return{state:"",base:10,coreWordList:c,immediateWordList:d,wordList:[]}},token:function(b,c){var d;if(b.eatSpace())return null;if(""===c.state){if(b.match(/^(\]|:NONAME)(\s|$)/i))return c.state=" compilation","builtin compilation";if(d=b.match(/^(\:)\s+(\S+)(\s|$)+/))return c.wordList.push({name:d[2].toUpperCase()}),c.state=" compilation","def"+c.state;if(d=b.match(/^(VARIABLE|2VARIABLE|CONSTANT|2CONSTANT|CREATE|POSTPONE|VALUE|WORD)\s+(\S+)(\s|$)+/i))return c.wordList.push({name:d[2].toUpperCase()}),"def"+c.state;if(d=b.match(/^(\'|\[\'\])\s+(\S+)(\s|$)+/))return"builtin"+c.state}else{if(b.match(/^(\;|\[)(\s)/))return c.state="",b.backUp(1),"builtin compilation";if(b.match(/^(\;|\[)($)/))return c.state="","builtin compilation";if(b.match(/^(POSTPONE)\s+\S+(\s|$)+/))return"builtin"}return d=b.match(/^(\S+)(\s+|$)/),d?void 0!==a(c.wordList,d[1])?"variable"+c.state:"\\"===d[1]?(b.skipToEnd(),"comment"+c.state):void 0!==a(c.coreWordList,d[1])?"builtin"+c.state:void 0!==a(c.immediateWordList,d[1])?"keyword"+c.state:"("===d[1]?(b.eatWhile(function(a){return")"!==a}),b.eat(")"),"comment"+c.state):".("===d[1]?(b.eatWhile(function(a){return")"!==a}),b.eat(")"),"string"+c.state):'S"'===d[1]||'."'===d[1]||'C"'===d[1]?(b.eatWhile(function(a){return'"'!==a}),b.eat('"'),"string"+c.state):d[1]-68719476735?"number"+c.state:"atom"+c.state:void 0}}}),a.defineMIME("text/x-forth","forth")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/fortran/fortran.min.js b/media/vendor/codemirror/mode/fortran/fortran.min.js index 82012297db6a4..c1cb4336b4f15 100644 --- a/media/vendor/codemirror/mode/fortran/fortran.min.js +++ b/media/vendor/codemirror/mode/fortran/fortran.min.js @@ -1 +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";e.defineMode("fortran",function(){function e(e){for(var t={},n=0;n\/\:]/,c=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 i=(n.tokenize||t)(e,n);return i}}}),e.defineMIME("text/x-fortran","fortran")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("fortran",function(){function a(a){for(var b={},c=0;c\/\:]/,h=new RegExp("(.and.|.or.|.eq.|.lt.|.le.|.gt.|.ge.|.ne.|.not.|.eqv.|.neqv.)","i");return{startState:function(){return{tokenize:null}},token:function(a,c){if(a.eatSpace())return null;var d=(c.tokenize||b)(a,c);return d}}}),a.defineMIME("text/x-fortran","fortran")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/gas/gas.min.js b/media/vendor/codemirror/mode/gas/gas.min.js index 921e64312db94..36b3ceace8165 100644 --- a/media/vendor/codemirror/mode/gas/gas.min.js +++ b/media/vendor/codemirror/mode/gas/gas.min.js @@ -1 +1 @@ -!function(i){"object"==typeof exports&&"object"==typeof module?i(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)}(function(i){"use strict";i.defineMode("gas",function(i,t){function l(i,t){for(var l,n=!1;null!=(l=i.next());){if(l===t&&!n)return!1;n=!n&&"\\"===l}return n}function n(i,t){for(var l,n=!1;null!=(l=i.next());){if("/"===l&&n){t.tokenize=null;break}n="*"===l}return"comment"}var e=[],r="",b={".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"},u={},a=(t.architecture||"x86").toLowerCase();return"x86"===a?function(i){r="#",u.ax="variable",u.eax="variable-2",u.rax="variable-3",u.bx="variable",u.ebx="variable-2",u.rbx="variable-3",u.cx="variable",u.ecx="variable-2",u.rcx="variable-3",u.dx="variable",u.edx="variable-2",u.rdx="variable-3",u.si="variable",u.esi="variable-2",u.rsi="variable-3",u.di="variable",u.edi="variable-2",u.rdi="variable-3",u.sp="variable",u.esp="variable-2",u.rsp="variable-3",u.bp="variable",u.ebp="variable-2",u.rbp="variable-3",u.ip="variable",u.eip="variable-2",u.rip="variable-3",u.cs="keyword",u.ds="keyword",u.ss="keyword",u.es="keyword",u.fs="keyword",u.gs="keyword"}():"arm"!==a&&"armv6"!==a||function(i){r="@",b.syntax="builtin",u.r0="variable",u.r1="variable",u.r2="variable",u.r3="variable",u.r4="variable",u.r5="variable",u.r6="variable",u.r7="variable",u.r8="variable",u.r9="variable",u.r10="variable",u.r11="variable",u.r12="variable",u.sp="variable-2",u.lr="variable-2",u.pc="variable-2",u.r13=u.sp,u.r14=u.lr,u.r15=u.pc,e.push(function(i,t){if("#"===i)return t.eatWhile(/\w/),"number"})}(),{startState:function(){return{tokenize:null}},token:function(i,t){if(t.tokenize)return t.tokenize(i,t);if(i.eatSpace())return null;var a,o,c=i.next();if("/"===c&&i.eat("*"))return t.tokenize=n,n(i,t);if(c===r)return i.skipToEnd(),"comment";if('"'===c)return l(i,'"'),"string";if("."===c)return i.eatWhile(/\w/),o=i.current().toLowerCase(),(a=b[o])||null;if("="===c)return i.eatWhile(/\w/),"tag";if("{"===c)return"braket";if("}"===c)return"braket";if(/\d/.test(c))return"0"===c&&i.eat("x")?(i.eatWhile(/[0-9a-fA-F]/),"number"):(i.eatWhile(/\d/),"number");if(/\w/.test(c))return i.eatWhile(/\w/),i.eat(":")?"tag":(o=i.current().toLowerCase(),(a=u[o])||null);for(var s=0;s]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;e.defineMode("gfm",function(o,a){function n(e){return e.code=!1,null}var i=0,r={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,o){if(o.combineTokens=null,o.codeBlock)return e.match(/^```+/)?(o.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(o.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),o.codeBlock=!0,null;if("`"===e.peek()){e.next();var n=e.pos;e.eatWhile("`");var r=1+e.pos-n;return o.code?r===i&&(o.code=!1):(i=r,o.code=!0),null}if(o.code)return e.next(),null;if(e.eatSpace())return o.ateSpace=!0,null;if((e.sol()||o.ateSpace)&&(o.ateSpace=!1,!1!==a.gitHubSpice)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/))return o.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return o.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)))?(o.combineTokens=!0,"link"):(e.next(),null)},blankLine:n},s={taskLists:!0,fencedCodeBlocks:"```",strikethrough:!0};for(var c in a)s[c]=a[c];return s.name="markdown",e.overlayMode(e.getMode(o,s),r)},"markdown"),e.defineMIME("text/x-gfm","gfm")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../markdown/markdown"),require("../../addon/mode/overlay")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../markdown/markdown","../../addon/mode/overlay"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("gfm",function(b,c){function d(a){return a.code=!1,null}var e=0,f={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(a){return{code:a.code,codeBlock:a.codeBlock,ateSpace:a.ateSpace}},token:function(a,b){if(b.combineTokens=null,b.codeBlock)return a.match(/^```+/)?(b.codeBlock=!1,null):(a.skipToEnd(),null);if(a.sol()&&(b.code=!1),a.sol()&&a.match(/^```+/))return a.skipToEnd(),b.codeBlock=!0,null;if("`"===a.peek()){a.next();var d=a.pos;a.eatWhile("`");var f=1+a.pos-d;return b.code?f===e&&(b.code=!1):(e=f,b.code=!0),null}if(b.code)return a.next(),null;if(a.eatSpace())return b.ateSpace=!0,null;if((a.sol()||b.ateSpace)&&(b.ateSpace=!1,c.gitHubSpice!==!1)){if(a.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/))return b.combineTokens=!0,"link";if(a.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return b.combineTokens=!0,"link"}return a.match(/^((?:(?: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)&&"]("!=a.string.slice(a.start-2,a.start)&&(0==a.start||/\W/.test(a.string.charAt(a.start-1)))?(b.combineTokens=!0,"link"):(a.next(),null)},blankLine:d},g={taskLists:!0,fencedCodeBlocks:"```",strikethrough:!0};for(var h in c)g[h]=c[h];return g.name="markdown",a.overlayMode(a.getMode(b,g),f)},"markdown"),a.defineMIME("text/x-gfm","gfm")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/gherkin/gherkin.min.js b/media/vendor/codemirror/mode/gherkin/gherkin.min.js index 873b25c0a4148..4033dda7b6ade 100644 --- a/media/vendor/codemirror/mode/gherkin/gherkin.min.js +++ b/media/vendor/codemirror/mode/gherkin/gherkin.min.js @@ -1 +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";e.defineMode("gherkin",function(){return{startState:function(){return{lineNumber:0,tableHeaderLine:!1,allowFeature:!0,allowBackground:!1,allowScenario:!1,allowSteps:!1,allowPlaceholders:!1,allowMultilineArgument:!1,inMultilineString:!1,inMultilineTable:!1,inKeywordLine:!1}},token:function(e,a){if(e.sol()&&(a.lineNumber++,a.inKeywordLine=!1,a.inMultilineTable&&(a.tableHeaderLine=!1,e.match(/\s*\|/,!1)||(a.allowMultilineArgument=!1,a.inMultilineTable=!1))),e.eatSpace(),a.allowMultilineArgument){if(a.inMultilineString)return e.match('"""')?(a.inMultilineString=!1,a.allowMultilineArgument=!1):e.match(/.*/),"string";if(a.inMultilineTable)return e.match(/\|\s*/)?"bracket":(e.match(/[^\|]*/),a.tableHeaderLine?"header":"string");if(e.match('"""'))return a.inMultilineString=!0,"string";if(e.match("|"))return a.inMultilineTable=!0,a.tableHeaderLine=!0,"bracket"}return e.match(/#.*/)?"comment":!a.inKeywordLine&&e.match(/@\S+/)?"tag":!a.inKeywordLine&&a.allowFeature&&e.match(/(機能|功能|フィーチャ|기능|โครงหลัก|ความสามารถ|ความต้องการทางธุรกิจ|ಹೆಚ್ಚಳ|గుణము|ਮੁਹਾਂਦਰਾ|ਨਕਸ਼ ਨੁਹਾਰ|ਖਾਸੀਅਤ|रूप लेख|وِیژگی|خاصية|תכונה|Функціонал|Функция|Функционалност|Функционал|Үзенчәлеклелек|Свойство|Особина|Мөмкинлек|Могућност|Λειτουργία|Δυνατότητα|Właściwość|Vlastnosť|Trajto|Tính năng|Savybė|Pretty much|Požiadavka|Požadavek|Potrzeba biznesowa|Özellik|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Hwæt|Hwaet|Funzionalità|Funktionalitéit|Funktionalität|Funkcja|Funkcionalnost|Funkcionalitāte|Funkcia|Fungsi|Functionaliteit|Funcționalitate|Funcţionalitate|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Fīča|Feature|Eiginleiki|Egenskap|Egenskab|Característica|Caracteristica|Business Need|Aspekt|Arwedd|Ahoy matey!|Ability):/)?(a.allowScenario=!0,a.allowBackground=!0,a.allowPlaceholders=!1,a.allowSteps=!1,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):!a.inKeywordLine&&a.allowBackground&&e.match(/(背景|배경|แนวคิด|ಹಿನ್ನೆಲೆ|నేపథ్యం|ਪਿਛੋਕੜ|पृष्ठभूमि|زمینه|الخلفية|רקע|Тарих|Предыстория|Предистория|Позадина|Передумова|Основа|Контекст|Кереш|Υπόβαθρο|Założenia|Yo\-ho\-ho|Tausta|Taust|Situācija|Rerefons|Pozadina|Pozadie|Pozadí|Osnova|Latar Belakang|Kontext|Konteksts|Kontekstas|Kontekst|Háttér|Hannergrond|Grundlage|Geçmiş|Fundo|Fono|First off|Dis is what went down|Dasar|Contexto|Contexte|Context|Contesto|Cenário de Fundo|Cenario de Fundo|Cefndir|Bối cảnh|Bakgrunnur|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|Ær|Aer|Achtergrond):/)?(a.allowPlaceholders=!1,a.allowSteps=!0,a.allowBackground=!1,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):!a.inKeywordLine&&a.allowScenario&&e.match(/(場景大綱|场景大纲|劇本大綱|剧本大纲|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|시나리오 개요|สรุปเหตุการณ์|โครงสร้างของเหตุการณ์|ವಿವರಣೆ|కథనం|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਟਕਥਾ ਢਾਂਚਾ|परिदृश्य रूपरेखा|سيناريو مخطط|الگوی سناریو|תבנית תרחיש|Сценарийның төзелеше|Сценарий структураси|Структура сценарію|Структура сценария|Структура сценарија|Скица|Рамка на сценарий|Концепт|Περιγραφή Σεναρίου|Wharrimean is|Template Situai|Template Senario|Template Keadaan|Tapausaihio|Szenariogrundriss|Szablon scenariusza|Swa hwær swa|Swa hwaer swa|Struktura scenarija|Structură scenariu|Structura scenariu|Skica|Skenario konsep|Shiver me timbers|Senaryo taslağı|Schema dello scenario|Scenariomall|Scenariomal|Scenario Template|Scenario Outline|Scenario Amlinellol|Scenārijs pēc parauga|Scenarijaus šablonas|Reckon it's like|Raamstsenaarium|Plang vum Szenario|Plan du Scénario|Plan du scénario|Osnova scénáře|Osnova Scenára|Náčrt Scenáru|Náčrt Scénáře|Náčrt Scenára|MISHUN SRSLY|Menggariskan Senario|Lýsing Dæma|Lýsing Atburðarásar|Konturo de la scenaro|Koncept|Khung tình huống|Khung kịch bản|Forgatókönyv vázlat|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esbozo do escenario|Delineação do Cenário|Delineacao do Cenario|All y'all|Abstrakt Scenario|Abstract Scenario):/)?(a.allowPlaceholders=!0,a.allowSteps=!0,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):a.allowScenario&&e.match(/(例子|例|サンプル|예|ชุดของเหตุการณ์|ชุดของตัวอย่าง|ಉದಾಹರಣೆಗಳು|ఉదాహరణలు|ਉਦਾਹਰਨਾਂ|उदाहरण|نمونه ها|امثلة|דוגמאות|Үрнәкләр|Сценарији|Примеры|Примери|Приклади|Мисоллар|Мисаллар|Σενάρια|Παραδείγματα|You'll wanna|Voorbeelden|Variantai|Tapaukset|Se þe|Se the|Se ðe|Scenarios|Scenariji|Scenarijai|Przykłady|Primjeri|Primeri|Příklady|Príklady|Piemēri|Példák|Pavyzdžiai|Paraugs|Örnekler|Juhtumid|Exemplos|Exemples|Exemple|Exempel|EXAMPLZ|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|Dữ liệu|Dead men tell no tales|Dæmi|Contoh|Cenários|Cenarios|Beispiller|Beispiele|Atburðarásir):/)?(a.allowPlaceholders=!1,a.allowSteps=!0,a.allowBackground=!1,a.allowMultilineArgument=!0,"keyword"):!a.inKeywordLine&&a.allowScenario&&e.match(/(場景|场景|劇本|剧本|シナリオ|시나리오|เหตุการณ์|ಕಥಾಸಾರಾಂಶ|సన్నివేశం|ਪਟਕਥਾ|परिदृश्य|سيناريو|سناریو|תרחיש|Сценарій|Сценарио|Сценарий|Пример|Σενάριο|Tình huống|The thing of it is|Tapaus|Szenario|Swa|Stsenaarium|Skenario|Situai|Senaryo|Senario|Scenaro|Scenariusz|Scenariu|Scénario|Scenario|Scenarijus|Scenārijs|Scenarij|Scenarie|Scénář|Scenár|Primer|MISHUN|Kịch bản|Keadaan|Heave to|Forgatókönyv|Escenario|Escenari|Cenário|Cenario|Awww, look mate|Atburðarás):/)?(a.allowPlaceholders=!1,a.allowSteps=!0,a.allowBackground=!1,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):!a.inKeywordLine&&a.allowSteps&&e.match(/(那麼|那么|而且|當|当|并且|同時|同时|前提|假设|假設|假定|假如|但是|但し|並且|もし|ならば|ただし|しかし|かつ|하지만|조건|먼저|만일|만약|단|그리고|그러면|และ |เมื่อ |แต่ |ดังนั้น |กำหนดให้ |ಸ್ಥಿತಿಯನ್ನು |ಮತ್ತು |ನೀಡಿದ |ನಂತರ |ಆದರೆ |మరియు |చెప్పబడినది |కాని |ఈ పరిస్థితిలో |అప్పుడు |ਪਰ |ਤਦ |ਜੇਕਰ |ਜਿਵੇਂ ਕਿ |ਜਦੋਂ |ਅਤੇ |यदि |परन्तु |पर |तब |तदा |तथा |जब |चूंकि |किन्तु |कदा |और |अगर |و |هنگامی |متى |لكن |عندما |ثم |بفرض |با فرض |اما |اذاً |آنگاه |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Һәм |Унда |Тоді |Тогда |То |Также |Та |Пусть |Припустимо, що |Припустимо |Онда |Но |Нехай |Нәтиҗәдә |Лекин |Ләкин |Коли |Когда |Когато |Када |Кад |К тому же |І |И |Задато |Задати |Задате |Если |Допустим |Дано |Дадено |Вә |Ва |Бирок |Әмма |Әйтик |Әгәр |Аммо |Али |Але |Агар |А також |А |Τότε |Όταν |Και |Δεδομένου |Αλλά |Þurh |Þegar |Þa þe |Þá |Þa |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Za předpokladu |Za predpokladu |Youse know when youse got |Youse know like when |Yna |Yeah nah |Y'know |Y |Wun |Wtedy |When y'all |When |Wenn |WEN |wann |Ve |Và |Und |Un |ugeholl |Too right |Thurh |Thì |Then y'all |Then |Tha the |Tha |Tetapi |Tapi |Tak |Tada |Tad |Stel |Soit |Siis |Și |Şi |Si |Sed |Se |Så |Quando |Quand |Quan |Pryd |Potom |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Niin |Nhưng |När |Når |Mutta |Men |Mas |Maka |Majd |Mając |Mais |Maar |mä |Ma |Lorsque |Lorsqu'|Logo |Let go and haul |Kun |Kuid |Kui |Kiedy |Khi |Ketika |Kemudian |Keď |Když |Kaj |Kai |Kada |Kad |Jeżeli |Jeśli |Ja |It's just unbelievable |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y'all |Given |Gitt |Gegeven |Gegeben seien |Gegeben sei |Gdy |Gangway! |Fakat |Étant donnés |Etant donnés |Étant données |Etant données |Étant donnée |Etant donnée |Étant donné |Etant donné |Et |És |Entonces |Entón |Então |Entao |En |Eğer ki |Ef |Eeldades |E |Ðurh |Duota |Dun |Donitaĵo |Donat |Donada |Do |Diyelim ki |Diberi |Dengan |Den youse gotta |DEN |De |Dato |Dați fiind |Daţi fiind |Dati fiind |Dati |Date fiind |Date |Data |Dat fiind |Dar |Dann |dann |Dan |Dados |Dado |Dadas |Dada |Ða ðe |Ða |Cuando |Cho |Cando |Când |Cand |Cal |But y'all |But at the end of the day I reckon |BUT |But |Buh |Blimey! |Biết |Bet |Bagi |Aye |awer |Avast! |Atunci |Atesa |Atès |Apabila |Anrhegedig a |Angenommen |And y'all |And |AN |An |an |Amikor |Amennyiben |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Ak |Adott |Ac |Aber |A zároveň |A tiež |A taktiež |A také |A |a |7 |\* )/)?(a.inStep=!0,a.allowPlaceholders=!0,a.allowMultilineArgument=!0,a.inKeywordLine=!0,"keyword"):e.match(/"[^"]*"?/)?"string":a.allowPlaceholders&&e.match(/<[^>]*>?/)?"variable":(e.next(),e.eatWhile(/[^@"<#]/),null)}}}),e.defineMIME("text/x-feature","gherkin")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("gherkin",function(){return{startState:function(){return{lineNumber:0,tableHeaderLine:!1,allowFeature:!0,allowBackground:!1,allowScenario:!1,allowSteps:!1,allowPlaceholders:!1,allowMultilineArgument:!1,inMultilineString:!1,inMultilineTable:!1,inKeywordLine:!1}},token:function(a,b){if(a.sol()&&(b.lineNumber++,b.inKeywordLine=!1,b.inMultilineTable&&(b.tableHeaderLine=!1,a.match(/\s*\|/,!1)||(b.allowMultilineArgument=!1,b.inMultilineTable=!1))),a.eatSpace(),b.allowMultilineArgument){if(b.inMultilineString)return a.match('"""')?(b.inMultilineString=!1,b.allowMultilineArgument=!1):a.match(/.*/),"string";if(b.inMultilineTable)return a.match(/\|\s*/)?"bracket":(a.match(/[^\|]*/),b.tableHeaderLine?"header":"string");if(a.match('"""'))return b.inMultilineString=!0,"string";if(a.match("|"))return b.inMultilineTable=!0,b.tableHeaderLine=!0,"bracket"}return a.match(/#.*/)?"comment":!b.inKeywordLine&&a.match(/@\S+/)?"tag":!b.inKeywordLine&&b.allowFeature&&a.match(/(機能|功能|フィーチャ|기능|โครงหลัก|ความสามารถ|ความต้องการทางธุรกิจ|ಹೆಚ್ಚಳ|గుణము|ਮੁਹਾਂਦਰਾ|ਨਕਸ਼ ਨੁਹਾਰ|ਖਾਸੀਅਤ|रूप लेख|وِیژگی|خاصية|תכונה|Функціонал|Функция|Функционалност|Функционал|Үзенчәлеклелек|Свойство|Особина|Мөмкинлек|Могућност|Λειτουργία|Δυνατότητα|Właściwość|Vlastnosť|Trajto|Tính năng|Savybė|Pretty much|Požiadavka|Požadavek|Potrzeba biznesowa|Özellik|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Hwæt|Hwaet|Funzionalità|Funktionalitéit|Funktionalität|Funkcja|Funkcionalnost|Funkcionalitāte|Funkcia|Fungsi|Functionaliteit|Funcționalitate|Funcţionalitate|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Fīča|Feature|Eiginleiki|Egenskap|Egenskab|Característica|Caracteristica|Business Need|Aspekt|Arwedd|Ahoy matey!|Ability):/)?(b.allowScenario=!0,b.allowBackground=!0,b.allowPlaceholders=!1,b.allowSteps=!1,b.allowMultilineArgument=!1,b.inKeywordLine=!0,"keyword"):!b.inKeywordLine&&b.allowBackground&&a.match(/(背景|배경|แนวคิด|ಹಿನ್ನೆಲೆ|నేపథ్యం|ਪਿਛੋਕੜ|पृष्ठभूमि|زمینه|الخلفية|רקע|Тарих|Предыстория|Предистория|Позадина|Передумова|Основа|Контекст|Кереш|Υπόβαθρο|Założenia|Yo\-ho\-ho|Tausta|Taust|Situācija|Rerefons|Pozadina|Pozadie|Pozadí|Osnova|Latar Belakang|Kontext|Konteksts|Kontekstas|Kontekst|Háttér|Hannergrond|Grundlage|Geçmiş|Fundo|Fono|First off|Dis is what went down|Dasar|Contexto|Contexte|Context|Contesto|Cenário de Fundo|Cenario de Fundo|Cefndir|Bối cảnh|Bakgrunnur|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|Ær|Aer|Achtergrond):/)?(b.allowPlaceholders=!1,b.allowSteps=!0,b.allowBackground=!1,b.allowMultilineArgument=!1,b.inKeywordLine=!0,"keyword"):!b.inKeywordLine&&b.allowScenario&&a.match(/(場景大綱|场景大纲|劇本大綱|剧本大纲|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|시나리오 개요|สรุปเหตุการณ์|โครงสร้างของเหตุการณ์|ವಿವರಣೆ|కథనం|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਟਕਥਾ ਢਾਂਚਾ|परिदृश्य रूपरेखा|سيناريو مخطط|الگوی سناریو|תבנית תרחיש|Сценарийның төзелеше|Сценарий структураси|Структура сценарію|Структура сценария|Структура сценарија|Скица|Рамка на сценарий|Концепт|Περιγραφή Σεναρίου|Wharrimean is|Template Situai|Template Senario|Template Keadaan|Tapausaihio|Szenariogrundriss|Szablon scenariusza|Swa hwær swa|Swa hwaer swa|Struktura scenarija|Structură scenariu|Structura scenariu|Skica|Skenario konsep|Shiver me timbers|Senaryo taslağı|Schema dello scenario|Scenariomall|Scenariomal|Scenario Template|Scenario Outline|Scenario Amlinellol|Scenārijs pēc parauga|Scenarijaus šablonas|Reckon it's like|Raamstsenaarium|Plang vum Szenario|Plan du Scénario|Plan du scénario|Osnova scénáře|Osnova Scenára|Náčrt Scenáru|Náčrt Scénáře|Náčrt Scenára|MISHUN SRSLY|Menggariskan Senario|Lýsing Dæma|Lýsing Atburðarásar|Konturo de la scenaro|Koncept|Khung tình huống|Khung kịch bản|Forgatókönyv vázlat|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esbozo do escenario|Delineação do Cenário|Delineacao do Cenario|All y'all|Abstrakt Scenario|Abstract Scenario):/)?(b.allowPlaceholders=!0,b.allowSteps=!0,b.allowMultilineArgument=!1,b.inKeywordLine=!0,"keyword"):b.allowScenario&&a.match(/(例子|例|サンプル|예|ชุดของเหตุการณ์|ชุดของตัวอย่าง|ಉದಾಹರಣೆಗಳು|ఉదాహరణలు|ਉਦਾਹਰਨਾਂ|उदाहरण|نمونه ها|امثلة|דוגמאות|Үрнәкләр|Сценарији|Примеры|Примери|Приклади|Мисоллар|Мисаллар|Σενάρια|Παραδείγματα|You'll wanna|Voorbeelden|Variantai|Tapaukset|Se þe|Se the|Se ðe|Scenarios|Scenariji|Scenarijai|Przykłady|Primjeri|Primeri|Příklady|Príklady|Piemēri|Példák|Pavyzdžiai|Paraugs|Örnekler|Juhtumid|Exemplos|Exemples|Exemple|Exempel|EXAMPLZ|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|Dữ liệu|Dead men tell no tales|Dæmi|Contoh|Cenários|Cenarios|Beispiller|Beispiele|Atburðarásir):/)?(b.allowPlaceholders=!1,b.allowSteps=!0,b.allowBackground=!1,b.allowMultilineArgument=!0,"keyword"):!b.inKeywordLine&&b.allowScenario&&a.match(/(場景|场景|劇本|剧本|シナリオ|시나리오|เหตุการณ์|ಕಥಾಸಾರಾಂಶ|సన్నివేశం|ਪਟਕਥਾ|परिदृश्य|سيناريو|سناریو|תרחיש|Сценарій|Сценарио|Сценарий|Пример|Σενάριο|Tình huống|The thing of it is|Tapaus|Szenario|Swa|Stsenaarium|Skenario|Situai|Senaryo|Senario|Scenaro|Scenariusz|Scenariu|Scénario|Scenario|Scenarijus|Scenārijs|Scenarij|Scenarie|Scénář|Scenár|Primer|MISHUN|Kịch bản|Keadaan|Heave to|Forgatókönyv|Escenario|Escenari|Cenário|Cenario|Awww, look mate|Atburðarás):/)?(b.allowPlaceholders=!1,b.allowSteps=!0,b.allowBackground=!1,b.allowMultilineArgument=!1,b.inKeywordLine=!0,"keyword"):!b.inKeywordLine&&b.allowSteps&&a.match(/(那麼|那么|而且|當|当|并且|同時|同时|前提|假设|假設|假定|假如|但是|但し|並且|もし|ならば|ただし|しかし|かつ|하지만|조건|먼저|만일|만약|단|그리고|그러면|และ |เมื่อ |แต่ |ดังนั้น |กำหนดให้ |ಸ್ಥಿತಿಯನ್ನು |ಮತ್ತು |ನೀಡಿದ |ನಂತರ |ಆದರೆ |మరియు |చెప్పబడినది |కాని |ఈ పరిస్థితిలో |అప్పుడు |ਪਰ |ਤਦ |ਜੇਕਰ |ਜਿਵੇਂ ਕਿ |ਜਦੋਂ |ਅਤੇ |यदि |परन्तु |पर |तब |तदा |तथा |जब |चूंकि |किन्तु |कदा |और |अगर |و |هنگامی |متى |لكن |عندما |ثم |بفرض |با فرض |اما |اذاً |آنگاه |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Һәм |Унда |Тоді |Тогда |То |Также |Та |Пусть |Припустимо, що |Припустимо |Онда |Но |Нехай |Нәтиҗәдә |Лекин |Ләкин |Коли |Когда |Когато |Када |Кад |К тому же |І |И |Задато |Задати |Задате |Если |Допустим |Дано |Дадено |Вә |Ва |Бирок |Әмма |Әйтик |Әгәр |Аммо |Али |Але |Агар |А також |А |Τότε |Όταν |Και |Δεδομένου |Αλλά |Þurh |Þegar |Þa þe |Þá |Þa |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Za předpokladu |Za predpokladu |Youse know when youse got |Youse know like when |Yna |Yeah nah |Y'know |Y |Wun |Wtedy |When y'all |When |Wenn |WEN |wann |Ve |Và |Und |Un |ugeholl |Too right |Thurh |Thì |Then y'all |Then |Tha the |Tha |Tetapi |Tapi |Tak |Tada |Tad |Stel |Soit |Siis |Și |Şi |Si |Sed |Se |Så |Quando |Quand |Quan |Pryd |Potom |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Niin |Nhưng |När |Når |Mutta |Men |Mas |Maka |Majd |Mając |Mais |Maar |mä |Ma |Lorsque |Lorsqu'|Logo |Let go and haul |Kun |Kuid |Kui |Kiedy |Khi |Ketika |Kemudian |Keď |Když |Kaj |Kai |Kada |Kad |Jeżeli |Jeśli |Ja |It's just unbelievable |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y'all |Given |Gitt |Gegeven |Gegeben seien |Gegeben sei |Gdy |Gangway! |Fakat |Étant donnés |Etant donnés |Étant données |Etant données |Étant donnée |Etant donnée |Étant donné |Etant donné |Et |És |Entonces |Entón |Então |Entao |En |Eğer ki |Ef |Eeldades |E |Ðurh |Duota |Dun |Donitaĵo |Donat |Donada |Do |Diyelim ki |Diberi |Dengan |Den youse gotta |DEN |De |Dato |Dați fiind |Daţi fiind |Dati fiind |Dati |Date fiind |Date |Data |Dat fiind |Dar |Dann |dann |Dan |Dados |Dado |Dadas |Dada |Ða ðe |Ða |Cuando |Cho |Cando |Când |Cand |Cal |But y'all |But at the end of the day I reckon |BUT |But |Buh |Blimey! |Biết |Bet |Bagi |Aye |awer |Avast! |Atunci |Atesa |Atès |Apabila |Anrhegedig a |Angenommen |And y'all |And |AN |An |an |Amikor |Amennyiben |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Ak |Adott |Ac |Aber |A zároveň |A tiež |A taktiež |A také |A |a |7 |\* )/)?(b.inStep=!0,b.allowPlaceholders=!0,b.allowMultilineArgument=!0,b.inKeywordLine=!0,"keyword"):a.match(/"[^"]*"?/)?"string":b.allowPlaceholders&&a.match(/<[^>]*>?/)?"variable":(a.next(),a.eatWhile(/[^@"<#]/),null)}}}),a.defineMIME("text/x-feature","gherkin")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/go/go.js b/media/vendor/codemirror/mode/go/go.js index 8896b57fb99b4..36131f10fe91c 100644 --- a/media/vendor/codemirror/mode/go/go.js +++ b/media/vendor/codemirror/mode/go/go.js @@ -155,14 +155,14 @@ CodeMirror.defineMode("go", function(config) { else if (curPunc == "[") pushContext(state, stream.column(), "]"); else if (curPunc == "(") pushContext(state, stream.column(), ")"); else if (curPunc == "case") ctx.type = "case"; - else if (curPunc == "}" && ctx.type == "}") ctx = popContext(state); + else if (curPunc == "}" && ctx.type == "}") popContext(state); else if (curPunc == ctx.type) popContext(state); state.startOfLine = false; return style; }, indent: function(state, textAfter) { - if (state.tokenize != tokenBase && state.tokenize != null) return 0; + if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass; var ctx = state.context, firstChar = textAfter && textAfter.charAt(0); if (ctx.type == "case" && /^(?:case|default)\b/.test(textAfter)) { state.context.type = "}"; diff --git a/media/vendor/codemirror/mode/go/go.min.js b/media/vendor/codemirror/mode/go/go.min.js index be5f961c12018..9be43e96521fa 100644 --- a/media/vendor/codemirror/mode/go/go.min.js +++ b/media/vendor/codemirror/mode/go/go.min.js @@ -1 +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";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 c=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 l.propertyIsEnumerable(o)?("case"!=o&&"default"!=o||(c="case"),"keyword"):f.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 c,u=e.indentUnit,l={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},f={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)-u,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;c=null;var i=(n.tokenize||t)(e,n);return"comment"==i?i:(null==r.align&&(r.align=!0),"{"==c?o(n,e.column(),"}"):"["==c?o(n,e.column(),"]"):"("==c?o(n,e.column(),")"):"case"==c?r.type="case":"}"==c&&"}"==r.type?r=a(n):c==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:u)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),e.defineMIME("text/x-go","go")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("go",function(b){function c(a,b){var c=a.next();if('"'==c||"'"==c||"`"==c)return b.tokenize=d(c),b.tokenize(a,b);if(/[\d\.]/.test(c))return"."==c?a.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):"0"==c?a.match(/^[xX][0-9a-fA-F]+/)||a.match(/^0[0-7]+/):a.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(c))return i=c,null;if("/"==c){if(a.eat("*"))return b.tokenize=e,e(a,b);if(a.eat("/"))return a.skipToEnd(),"comment"}if(m.test(c))return a.eatWhile(m),"operator";a.eatWhile(/[\w\$_\xa1-\uffff]/);var f=a.current();return k.propertyIsEnumerable(f)?("case"!=f&&"default"!=f||(i="case"),"keyword"):l.propertyIsEnumerable(f)?"atom":"variable"}function d(a){return function(b,d){for(var e,f=!1,g=!1;null!=(e=b.next());){if(e==a&&!f){g=!0;break}f=!f&&"`"!=a&&"\\"==e}return(g||!f&&"`"!=a)&&(d.tokenize=c),"string"}}function e(a,b){for(var d,e=!1;d=a.next();){if("/"==d&&e){b.tokenize=c;break}e="*"==d}return"comment"}function f(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function g(a,b,c){return a.context=new f(a.indented,b,c,null,a.context)}function h(a){if(a.context.prev){var b=a.context.type;return")"!=b&&"]"!=b&&"}"!=b||(a.indented=a.context.indented),a.context=a.context.prev}}var i,j=b.indentUnit,k={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},l={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},m=/[+\-*&^%:=<>!|\/]/;return{startState:function(a){return{tokenize:null,context:new f((a||0)-j,0,"top",!1),indented:0,startOfLine:!0}},token:function(a,b){var d=b.context;if(a.sol()&&(null==d.align&&(d.align=!1),b.indented=a.indentation(),b.startOfLine=!0,"case"==d.type&&(d.type="}")),a.eatSpace())return null;i=null;var e=(b.tokenize||c)(a,b);return"comment"==e?e:(null==d.align&&(d.align=!0),"{"==i?g(b,a.column(),"}"):"["==i?g(b,a.column(),"]"):"("==i?g(b,a.column(),")"):"case"==i?d.type="case":"}"==i&&"}"==d.type?h(b):i==d.type&&h(b),b.startOfLine=!1,e)},indent:function(b,d){if(b.tokenize!=c&&null!=b.tokenize)return a.Pass;var e=b.context,f=d&&d.charAt(0);if("case"==e.type&&/^(?:case|default)\b/.test(d))return b.context.type="}",e.indented;var g=f==e.type;return e.align?e.column+(g?0:1):e.indented+(g?0:j)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),a.defineMIME("text/x-go","go")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/groovy/groovy.js b/media/vendor/codemirror/mode/groovy/groovy.js index daa798722ea6d..0df97dd0b7f4b 100644 --- a/media/vendor/codemirror/mode/groovy/groovy.js +++ b/media/vendor/codemirror/mode/groovy/groovy.js @@ -21,9 +21,9 @@ CodeMirror.defineMode("groovy", function(config) { "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 " + + "short static strictfp super switch synchronized threadsafe throw throws trait transient " + "try void volatile while"); - var blockKeywords = words("catch class do else finally for if switch try while enum interface def"); + var blockKeywords = words("catch class def do else enum finally for if interface switch trait try while"); var standaloneKeywords = words("return break continue"); var atoms = words("null true false this"); diff --git a/media/vendor/codemirror/mode/groovy/groovy.min.js b/media/vendor/codemirror/mode/groovy/groovy.min.js index 5e93237dbf8fa..a8e8a50a34296 100644 --- a/media/vendor/codemirror/mode/groovy/groovy.min.js +++ b/media/vendor/codemirror/mode/groovy/groovy.min.js @@ -1 +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";e.defineMode("groovy",function(t){function n(e){for(var t={},n=e.split(" "),r=0;r"))return c="->",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 c="proplabel","property";var r=e.current();return y.propertyIsEnumerable(r)?"atom":p.propertyIsEnumerable(r)?(d.propertyIsEnumerable(r)?c="newstatement":m.propertyIsEnumerable(r)&&(c="standalone"),"keyword"):"variable"}function i(e,t,n){function r(t,n){for(var r,a=!1,l=!i;null!=(r=t.next());){if(r==e&&!a){if(!i)break;if(t.match(e+e)){l=!0;break}}if('"'==e&&"$"==r&&!a&&t.eat("{"))return n.tokenize.push(o()),"string";a=!a&&"\\"==r}return l&&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(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 l(e,t){return!e||"operator"==e||"->"==e||/[\.\[\{\(,;:]/.test(e)||"newstatement"==e||"keyword"==e||"proplabel"==e||"standalone"==e&&!t}function s(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function u(e,t,n){return e.context=new s(e.indented,t,n,null,e.context)}function f(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}var c,p=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"),d=n("catch class do else finally for if switch try while enum interface def"),m=n("return break continue"),y=n("null true false this");return r.isBase=!0,{startState:function(e){return{tokenize:[r],context:new s((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||l(t.lastToken,!0)||(f(t),n=t.context)),e.eatSpace())return null;c=null;var r=t.tokenize[t.tokenize.length-1](e,t);if("comment"==r)return r;if(null==n.align&&(n.align=!0),";"!=c&&":"!=c||"statement"!=n.type)if("->"==c&&"statement"==n.type&&"}"==n.prev.type)f(t),t.context.align=!1;else if("{"==c)u(t,e.column(),"}");else if("["==c)u(t,e.column(),"]");else if("("==c)u(t,e.column(),")");else if("}"==c){for(;"statement"==n.type;)n=f(t);for("}"==n.type&&(n=f(t));"statement"==n.type;)n=f(t)}else c==n.type?f(t):("}"==n.type||"top"==n.type||"statement"==n.type&&"newstatement"==c)&&u(t,e.column(),"statement");else f(t);return t.startOfLine=!1,t.lastToken=c||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||l(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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("groovy",function(b){function c(a){for(var b={},c=a.split(" "),d=0;d"))return l="->",null;if(/[+\-*&%=<>!?|\/~]/.test(c))return a.eatWhile(/[+\-*&%=<>|~]/),"operator";if(a.eatWhile(/[\w\$_]/),"@"==c)return a.eatWhile(/[\w\$_\.]/),"meta";if("."==b.lastToken)return"property";if(a.eat(":"))return l="proplabel","property";var d=a.current();return p.propertyIsEnumerable(d)?"atom":m.propertyIsEnumerable(d)?(n.propertyIsEnumerable(d)?l="newstatement":o.propertyIsEnumerable(d)&&(l="standalone"),"keyword"):"variable"}function e(a,b,c){function d(b,c){for(var d,g=!1,h=!e;null!=(d=b.next());){if(d==a&&!g){if(!e)break;if(b.match(a+a)){h=!0;break}}if('"'==a&&"$"==d&&!g&&b.eat("{"))return c.tokenize.push(f()),"string";g=!g&&"\\"==d}return h&&c.tokenize.pop(),"string"}var e=!1;if("/"!=a&&b.eat(a)){if(!b.eat(a))return"string";e=!0}return c.tokenize.push(d),d(b,c)}function f(){function a(a,c){if("}"==a.peek()){if(0==--b)return c.tokenize.pop(),c.tokenize[c.tokenize.length-1](a,c)}else"{"==a.peek()&&b++;return d(a,c)}var b=1;return a.isBase=!0,a}function g(a,b){for(var c,d=!1;c=a.next();){if("/"==c&&d){b.tokenize.pop();break}d="*"==c}return"comment"}function h(a,b){return!a||"operator"==a||"->"==a||/[\.\[\{\(,;:]/.test(a)||"newstatement"==a||"keyword"==a||"proplabel"==a||"standalone"==a&&!b}function i(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function j(a,b,c){return a.context=new i(a.indented,b,c,null,a.context)}function k(a){var b=a.context.type;return")"!=b&&"]"!=b&&"}"!=b||(a.indented=a.context.indented),a.context=a.context.prev}var l,m=c("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 trait transient try void volatile while"),n=c("catch class def do else enum finally for if interface switch trait try while"),o=c("return break continue"),p=c("null true false this");return d.isBase=!0,{startState:function(a){return{tokenize:[d],context:new i((a||0)-b.indentUnit,0,"top",!1),indented:0,startOfLine:!0,lastToken:null}},token:function(a,b){var c=b.context;if(a.sol()&&(null==c.align&&(c.align=!1),b.indented=a.indentation(),b.startOfLine=!0,"statement"!=c.type||h(b.lastToken,!0)||(k(b),c=b.context)),a.eatSpace())return null;l=null;var d=b.tokenize[b.tokenize.length-1](a,b);if("comment"==d)return d;if(null==c.align&&(c.align=!0),";"!=l&&":"!=l||"statement"!=c.type)if("->"==l&&"statement"==c.type&&"}"==c.prev.type)k(b),b.context.align=!1;else if("{"==l)j(b,a.column(),"}");else if("["==l)j(b,a.column(),"]");else if("("==l)j(b,a.column(),")");else if("}"==l){for(;"statement"==c.type;)c=k(b);for("}"==c.type&&(c=k(b));"statement"==c.type;)c=k(b)}else l==c.type?k(b):("}"==c.type||"top"==c.type||"statement"==c.type&&"newstatement"==l)&&j(b,a.column(),"statement");else k(b);return b.startOfLine=!1,b.lastToken=l||d,d},indent:function(c,d){if(!c.tokenize[c.tokenize.length-1].isBase)return a.Pass;var e=d&&d.charAt(0),f=c.context;"statement"!=f.type||h(c.lastToken,!0)||(f=f.prev);var g=e==f.type;return"statement"==f.type?f.indented+("{"==e?0:b.indentUnit):f.align?f.column+(g?0:1):f.indented+(g?0:b.indentUnit)},electricChars:"{}",closeBrackets:{triples:"'\""},fold:"brace"}}),a.defineMIME("text/x-groovy","groovy")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/haml/haml.min.js b/media/vendor/codemirror/mode/haml/haml.min.js index c61ed3bd0ab4c..b04d7fb930392 100644 --- a/media/vendor/codemirror/mode/haml/haml.min.js +++ b/media/vendor/codemirror/mode/haml/haml.min.js @@ -1 +1 @@ -!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){return t.peek()==e&&1==n.rubyState.tokenize.length?(t.next(),n.tokenize=r,"closeAttributeTag"):i(t,n)}}function i(e,t){return e.match("-#")?(e.skipToEnd(),"comment"):u.token(e,t.rubyState)}function r(e,t){var r=e.peek();if("comment"==t.previousToken.style&&t.indented>t.previousToken.indented)return e.skipToEnd(),"commentLine";if(t.startOfLine){if("!"==r&&e.match("!!"))return e.skipToEnd(),"tag";if(e.match(/^%[\w:#\.]+=/))return t.tokenize=i,"hamlTag";if(e.match(/^%[\w:]+/))return"hamlTag";if("/"==r)return e.skipToEnd(),"comment"}if((t.startOfLine||"hamlTag"==t.previousToken.style)&&("#"==r||"."==r))return e.match(/[\w-#\.]*/),"hamlAttribute";if(t.startOfLine&&!e.match("--\x3e",!1)&&("="==r||"-"==r))return t.tokenize=i,t.tokenize(e,t);if("hamlTag"==t.previousToken.style||"closeAttributeTag"==t.previousToken.style||"hamlAttribute"==t.previousToken.style){if("("==r)return t.tokenize=n(")"),t.tokenize(e,t);if("{"==r&&!e.match(/^\{%.*/))return t.tokenize=n("}"),t.tokenize(e,t)}return o.token(e,t.htmlState)}var o=e.getMode(t,{name:"htmlmixed"}),u=e.getMode(t,"ruby");return{startState:function(){return{htmlState:e.startState(o),rubyState:e.startState(u),indented:0,previousToken:{style:null,indented:0},tokenize:r}},copyState:function(t){return{htmlState:e.copyState(o,t.htmlState),rubyState:e.copyState(u,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==i){e.backUp(1);var o=e.peek();e.next(),o&&","!=o&&(t.tokenize=r)}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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../ruby/ruby")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../ruby/ruby"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("haml",function(b){function c(a){return function(b,c){return b.peek()==a&&1==c.rubyState.tokenize.length?(b.next(),c.tokenize=e,"closeAttributeTag"):d(b,c)}}function d(a,b){return a.match("-#")?(a.skipToEnd(),"comment"):g.token(a,b.rubyState)}function e(a,b){var e=a.peek();if("comment"==b.previousToken.style&&b.indented>b.previousToken.indented)return a.skipToEnd(),"commentLine";if(b.startOfLine){if("!"==e&&a.match("!!"))return a.skipToEnd(),"tag";if(a.match(/^%[\w:#\.]+=/))return b.tokenize=d,"hamlTag";if(a.match(/^%[\w:]+/))return"hamlTag";if("/"==e)return a.skipToEnd(),"comment"}if((b.startOfLine||"hamlTag"==b.previousToken.style)&&("#"==e||"."==e))return a.match(/[\w-#\.]*/),"hamlAttribute";if(b.startOfLine&&!a.match("-->",!1)&&("="==e||"-"==e))return b.tokenize=d,b.tokenize(a,b);if("hamlTag"==b.previousToken.style||"closeAttributeTag"==b.previousToken.style||"hamlAttribute"==b.previousToken.style){if("("==e)return b.tokenize=c(")"),b.tokenize(a,b);if("{"==e&&!a.match(/^\{%.*/))return b.tokenize=c("}"),b.tokenize(a,b)}return f.token(a,b.htmlState)}var f=a.getMode(b,{name:"htmlmixed"}),g=a.getMode(b,"ruby");return{startState:function(){return{htmlState:a.startState(f),rubyState:a.startState(g),indented:0,previousToken:{style:null,indented:0},tokenize:e}},copyState:function(b){return{htmlState:a.copyState(f,b.htmlState),rubyState:a.copyState(g,b.rubyState),indented:b.indented,previousToken:b.previousToken,tokenize:b.tokenize}},token:function(a,b){if(a.sol()&&(b.indented=a.indentation(),b.startOfLine=!0),a.eatSpace())return null;var c=b.tokenize(a,b);if(b.startOfLine=!1,c&&"commentLine"!=c&&(b.previousToken={style:c,indented:b.indented}),a.eol()&&b.tokenize==d){a.backUp(1);var f=a.peek();a.next(),f&&","!=f&&(b.tokenize=e)}return"hamlTag"==c?c="tag":"commentLine"==c?c="comment":"hamlAttribute"==c?c="attribute":"closeAttributeTag"==c&&(c=null),c}}},"htmlmixed","ruby"),a.defineMIME("text/x-haml","haml")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/handlebars/handlebars.min.js b/media/vendor/codemirror/mode/handlebars/handlebars.min.js index 3e52d2218d5f5..0075d4ae19632 100644 --- a/media/vendor/codemirror/mode/handlebars/handlebars.min.js +++ b/media/vendor/codemirror/mode/handlebars/handlebars.min.js @@ -1 +1 @@ -!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(o,t){var n=e.getMode(o,"handlebars-tags");return t&&t.base?e.multiplexingMode(e.getMode(o,t.base),{open:"{{",close:"}}",mode:n,parseDelimiters:!0}):n}),e.defineMIME("text/x-handlebars-template","handlebars")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(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"],a):a(CodeMirror)}(function(a){"use strict";a.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"}]}),a.defineMode("handlebars",function(b,c){var d=a.getMode(b,"handlebars-tags");return c&&c.base?a.multiplexingMode(a.getMode(b,c.base),{open:"{{",close:"}}",mode:d,parseDelimiters:!0}):d}),a.defineMIME("text/x-handlebars-template","handlebars")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/haskell-literate/haskell-literate.min.js b/media/vendor/codemirror/mode/haskell-literate/haskell-literate.min.js index 7e48164c20488..dcc2fec317c80 100644 --- a/media/vendor/codemirror/mode/haskell-literate/haskell-literate.min.js +++ b/media/vendor/codemirror/mode/haskell-literate/haskell-literate.min.js @@ -1 +1 @@ -!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 o=e.getMode(t,n&&n.base||"haskell");return{startState:function(){return{inCode:!1,baseState:e.startState(o)}},token:function(e,t){return e.sol()&&(t.inCode=e.eat(">"))?"meta":t.inCode?o.token(e,t.baseState):(e.skipToEnd(),"comment")},innerMode:function(e){return e.inCode?{state:e.baseState,mode:o}:null}}},"haskell"),e.defineMIME("text/x-literate-haskell","haskell-literate")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../haskell/haskell")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../haskell/haskell"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("haskell-literate",function(b,c){var d=a.getMode(b,c&&c.base||"haskell");return{startState:function(){return{inCode:!1,baseState:a.startState(d)}},token:function(a,b){return a.sol()&&(b.inCode=a.eat(">"))?"meta":b.inCode?d.token(a,b.baseState):(a.skipToEnd(),"comment")},innerMode:function(a){return a.inCode?{state:a.baseState,mode:d}:null}}},"haskell"),a.defineMIME("text/x-literate-haskell","haskell-literate")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/haskell/haskell.min.js b/media/vendor/codemirror/mode/haskell/haskell.min.js index 3c0f502521ed7..f2bdf27c227e3 100644 --- a/media/vendor/codemirror/mode/haskell/haskell.min.js +++ b/media/vendor/codemirror/mode/haskell/haskell.min.js @@ -1 +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";e.defineMode("haskell",function(e,r){function t(e,r,t){return r(t),t(e,r)}function n(e,r){if(e.eatWhile(p))return null;var n=e.next();if(h.test(n)){if("{"==n&&e.eat("-")){o="comment";return e.eat("#")&&(o="meta"),t(e,r,i(o,1))}return null}if("'"==n)return e.eat("\\"),e.next(),e.eat("'")?"string":"string error";if('"'==n)return t(e,r,a);if(u.test(n))return e.eatWhile(d),e.eat(".")?"qualifier":"variable-2";if(l.test(n))return e.eatWhile(d),"variable";if(f.test(n)){if("0"==n){if(e.eat(/[xX]/))return e.eatWhile(s),"integer";if(e.eat(/[oO]/))return e.eatWhile(c),"number"}e.eatWhile(f);o="number";return e.match(/^\.\d+/)&&(o="number"),e.eat(/[eE]/)&&(o="number",e.eat(/[-+]/),e.eatWhile(f)),o}if("."==n&&e.eat("."))return"keyword";if(m.test(n)){if("-"==n&&e.eat(/-/)&&(e.eatWhile(/-/),!e.eat(m)))return e.skipToEnd(),"comment";var o="variable";return":"==n&&(o="variable-2"),e.eatWhile(m),o}return"error"}function i(e,r){return 0==r?n:function(t,a){for(var o=r;!t.eol();){var l=t.next();if("{"==l&&t.eat("-"))++o;else if("-"==l&&t.eat("}")&&0==--o)return a(n),e}return a(i(e,o)),e}}function a(e,r){for(;!e.eol();){var t=e.next();if('"'==t)return r(n),"string";if("\\"==t){if(e.eol()||e.eat(p))return r(o),"string";e.eat("&")||e.next()}}return r(n),"string error"}function o(e,r){return e.eat("\\")?t(e,r,a):(e.next(),r(n),"error")}var l=/[a-z_]/,u=/[A-Z]/,f=/\d/,s=/[0-9A-Fa-f]/,c=/[0-7]/,d=/[a-z_A-Z0-9'\xa1-\uffff]/,m=/[-!#$%&*+.\/<=>?@\\^|~:]/,h=/[(),;[\]`{}]/,p=/[ \t\v\f]/,g=function(){function e(e){return function(){for(var r=0;r","@","~","=>"),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 n=r.overrideKeywords;if(n)for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i]);return t}();return{startState:function(){return{f:n}},copyState:function(e){return{f:e.f}},token:function(e,r){var t=r.f(e,function(e){r.f=e}),n=e.current();return g.hasOwnProperty(n)?g[n]:t},blockCommentStart:"{-",blockCommentEnd:"-}",lineComment:"--"}}),e.defineMIME("text/x-haskell","haskell")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("haskell",function(a,b){function c(a,b,c){return b(c),c(a,b)}function d(a,b){if(a.eatWhile(p))return null;var d=a.next();if(o.test(d)){if("{"==d&&a.eat("-")){var g="comment";return a.eat("#")&&(g="meta"),c(a,b,e(g,1))}return null}if("'"==d)return a.eat("\\"),a.next(),a.eat("'")?"string":"string error";if('"'==d)return c(a,b,f);if(i.test(d))return a.eatWhile(m),a.eat(".")?"qualifier":"variable-2";if(h.test(d))return a.eatWhile(m),"variable";if(j.test(d)){if("0"==d){if(a.eat(/[xX]/))return a.eatWhile(k),"integer";if(a.eat(/[oO]/))return a.eatWhile(l),"number"}a.eatWhile(j);var g="number";return a.match(/^\.\d+/)&&(g="number"),a.eat(/[eE]/)&&(g="number",a.eat(/[-+]/),a.eatWhile(j)),g}if("."==d&&a.eat("."))return"keyword";if(n.test(d)){if("-"==d&&a.eat(/-/)&&(a.eatWhile(/-/),!a.eat(n)))return a.skipToEnd(),"comment";var g="variable";return":"==d&&(g="variable-2"),a.eatWhile(n),g}return"error"}function e(a,b){return 0==b?d:function(c,f){for(var g=b;!c.eol();){var h=c.next();if("{"==h&&c.eat("-"))++g;else if("-"==h&&c.eat("}")&&0==--g)return f(d),a}return f(e(a,g)),a}}function f(a,b){for(;!a.eol();){var c=a.next();if('"'==c)return b(d),"string";if("\\"==c){if(a.eol()||a.eat(p))return b(g),"string";a.eat("&")||a.next()}}return b(d),"string error"}function g(a,b){return a.eat("\\")?c(a,b,f):(a.next(),b(d),"error")}var h=/[a-z_]/,i=/[A-Z]/,j=/\d/,k=/[0-9A-Fa-f]/,l=/[0-7]/,m=/[a-z_A-Z0-9'\xa1-\uffff]/,n=/[-!#$%&*+.\/<=>?@\\^|~:]/,o=/[(),;[\]`{}]/,p=/[ \t\v\f]/,q=function(){function a(a){return function(){for(var b=0;b","@","~","=>"),a("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<=","=<<","==",">",">=",">>",">>=","^","^^","||","*","**"),a("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"),a("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 d=b.overrideKeywords;if(d)for(var e in d)d.hasOwnProperty(e)&&(c[e]=d[e]);return c}();return{startState:function(){return{f:d}},copyState:function(a){return{f:a.f}},token:function(a,b){var c=b.f(a,function(a){b.f=a}),d=a.current();return q.hasOwnProperty(d)?q[d]:c},blockCommentStart:"{-",blockCommentEnd:"-}",lineComment:"--"}}),a.defineMIME("text/x-haskell","haskell")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/haxe/haxe.js b/media/vendor/codemirror/mode/haxe/haxe.js index a9573dd71b598..d159d082e96b8 100644 --- a/media/vendor/codemirror/mode/haxe/haxe.js +++ b/media/vendor/codemirror/mode/haxe/haxe.js @@ -485,7 +485,7 @@ CodeMirror.defineMode("hxml", function () { if (state.inString == false && ch == "'") { state.inString = true; - ch = stream.next(); + stream.next(); } if (state.inString == true) { diff --git a/media/vendor/codemirror/mode/haxe/haxe.min.js b/media/vendor/codemirror/mode/haxe/haxe.min.js index 67a58afe31d33..fc646df570968 100644 --- a/media/vendor/codemirror/mode/haxe/haxe.min.js +++ b/media/vendor/codemirror/mode/haxe/haxe.min.js @@ -1 +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";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 a(e,t){for(var n,r=!1;null!=(n=e.next());){if(n==t&&!r)return!0;r=!r&&"\\"==n}}function i(e,t,n){return ee=e,J=n,t}function o(e,t){var n=e.next();if('"'==n||"'"==n)return r(e,t,l(n));if(/[\[\]{}\(\),;\:\.]/.test(n))return i(n);if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),i("number","number");if(/\d/.test(n)||"-"==n&&e.eat(/\d/))return e.match(/^\d*(?:\.\d*(?!\.))?(?:[eE][+\-]?\d+)?/),i("number","number");if(t.reAllowed&&"~"==n&&e.eat(/\//))return a(e,"/"),e.eatWhile(/[gimsu]/),i("regexp","string-2");if("/"==n)return e.eat("*")?r(e,t,u):e.eat("/")?(e.skipToEnd(),i("comment","comment")):(e.eatWhile(ne),i("operator",null,e.current()));if("#"==n)return e.skipToEnd(),i("conditional","meta");if("@"==n)return e.eat(/:/),e.eatWhile(/[\w_]/),i("metadata","meta");if(ne.test(n))return e.eatWhile(ne),i("operator",null,e.current());if(/[A-Z]/.test(n))return e.eatWhile(/[\w_<>]/),o=e.current(),i("type","variable-3",o);e.eatWhile(/[\w_]/);var o=e.current(),c=te.propertyIsEnumerable(o)&&te[o];return c&&t.kwAllowed?i(c.type,c.style,o):i("variable","variable",o)}function l(e){return function(t,n){return a(t,e)&&(n.tokenize=o),i("string","string")}}function u(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=o;break}r="*"==n}return i("comment","comment")}function c(e,t,n,r,a,i){this.indented=e,this.column=t,this.type=n,this.prev=a,this.info=i,null!=r&&(this.align=r)}function f(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0}function s(e,t,n,r,a){var i=e.cc;for(ae.state=e,ae.stream=a,ae.marked=null,ae.cc=i,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((i.length?i.pop():V)(n,r)){for(;i.length&&i[i.length-1].lex;)i.pop()();return ae.marked?ae.marked:"variable"==n&&f(e,r)?"variable-2":"variable"==n&&d(e,r)?"variable-3":t}}function d(e,t){if(/[a-z]/.test(t.charAt(0)))return!1;for(var n=e.importedtypes.length,r=0;r=0;e--)ae.cc.push(arguments[e])}function v(){return m.apply(null,arguments),!0}function b(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function y(e){var t=ae.state;if(t.context){if(ae.marked="def",b(e,t.localVars))return;t.localVars={name:e,next:t.localVars}}else if(t.globalVars){if(b(e,t.globalVars))return;t.globalVars={name:e,next:t.globalVars}}}function x(){ae.state.context||(ae.state.localVars=ie),ae.state.context={prev:ae.state.context,vars:ae.state.localVars}}function h(){ae.state.localVars=ae.state.context.vars,ae.state.context=ae.state.context.prev}function k(e,t){var n=function(){var n=ae.state;n.lexical=new c(n.indented,ae.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function w(){var e=ae.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function g(e){function t(n){return n==e?v():";"==e?m():v(t)}return t}function V(e){return"@"==e?v(z):"var"==e?v(k("vardef"),j,g(";"),w):"keyword a"==e?v(k("form"),A,V,w):"keyword b"==e?v(k("form"),V,w):"{"==e?v(k("}"),x,_,w,h):";"==e?v():"attribute"==e?v(W):"function"==e?v(F):"for"==e?v(k("form"),g("("),k(")"),q,g(")"),w,V,w):"variable"==e?v(k("stat"),Z):"switch"==e?v(k("form"),A,k("}","switch"),g("{"),_,w,w):"case"==e?v(A,g(":")):"default"==e?v(g(":")):"catch"==e?v(k("form"),x,g("("),H,g(")"),V,w,h):"import"==e?v(C,g(";")):"typedef"==e?v(T):m(k("stat"),A,g(";"),w)}function A(e){return re.hasOwnProperty(e)?v(E):"type"==e?v(E):"function"==e?v(F):"keyword c"==e?v(S):"("==e?v(k(")"),S,g(")"),w,E):"operator"==e?v(A):"["==e?v(k("]"),P(S,"]"),w,E):"{"==e?v(k("}"),P(O,"}"),w,E):v()}function S(e){return e.match(/[;\}\)\],]/)?m():m(A)}function E(e,t){if("operator"==e&&/\+\+|--/.test(t))return v(E);if("operator"==e||":"==e)return v(A);if(";"!=e)return"("==e?v(k(")"),P(A,")"),w,E):"."==e?v(I,E):"["==e?v(k("]"),A,g("]"),w,E):void 0}function W(e){return"attribute"==e?v(W):"function"==e?v(F):"var"==e?v(j):void 0}function z(e){return":"==e?v(z):"variable"==e?v(z):"("==e?v(k(")"),P(M,")"),w,V):void 0}function M(e){if("variable"==e)return v()}function C(e,t){return"variable"==e&&/[A-Z]/.test(t.charAt(0))?(p(t),v()):"variable"==e||"property"==e||"."==e||"*"==t?v(C):void 0}function T(e,t){return"variable"==e&&/[A-Z]/.test(t.charAt(0))?(p(t),v()):"type"==e&&/[A-Z]/.test(t.charAt(0))?v():void 0}function Z(e){return":"==e?v(w,V):m(E,g(";"),w)}function I(e){if("variable"==e)return ae.marked="property",v()}function O(e){if("variable"==e&&(ae.marked="property"),re.hasOwnProperty(e))return v(g(":"),A)}function P(e,t){function n(r){return","==r?v(e,n):r==t?v():v(g(t))}return function(r){return r==t?v():m(e,n)}}function _(e){return"}"==e?v():m(V,_)}function j(e,t){return"variable"==e?(y(t),v(U,D)):v()}function D(e,t){return"="==t?v(A,D):","==e?v(j):void 0}function q(e,t){return"variable"==e?(y(t),v(B,A)):m()}function B(e,t){if("in"==t)return v()}function F(e,t){return"variable"==e||"type"==e?(y(t),v(F)):"new"==t?v(F):"("==e?v(k(")"),x,P(H,")"),w,U,V,h):void 0}function U(e){if(":"==e)return v($)}function $(e){return"type"==e?v():"variable"==e?v():"{"==e?v(k("}"),P(G,"}"),w):void 0}function G(e){if("variable"==e)return v(U)}function H(e,t){if("variable"==e)return y(t),v(U)}var J,K=e.indentUnit,L=n("keyword a"),N=n("keyword b"),Q=n("keyword c"),R=n("operator"),X={type:"atom",style:"atom"},Y={type:"attribute",style:"attribute"},ee=n("typedef"),te={if:L,while:L,else:N,do:N,try:N,return:Q,break:Q,continue:Q,new:Q,throw:Q,var:n("var"),inline:Y,static:Y,using:n("import"),public:Y,private:Y,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:R,never:n("property_access"),trace:n("trace"),class:ee,abstract:ee,enum:ee,interface:ee,typedef:ee,extends:ee,implements:ee,dynamic:ee,true:X,false:X,null:X},ne=/[+\-*&%=<>!?|]/,re={atom:!0,number:!0,variable:!0,string:!0,regexp:!0},ae={state:null,column:null,marked:null,cc:null},ie={name:"this",next:null};return h.lex=!0,w.lex=!0,{startState:function(e){var n=["Int","Float","String","Void","Std","Bool","Dynamic","Array"],r={tokenize:o,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"==ee?n:(t.reAllowed=!("operator"!=ee&&"keyword c"!=ee&&!ee.match(/^[\[{}\(,;:]$/)),t.kwAllowed="."!=ee,s(t,n,ee,J,e))},indent:function(e,t){if(e.tokenize!=o)return 0;var n=t&&t.charAt(0),r=e.lexical;"stat"==r.type&&"}"==n&&(r=r.prev);var a=r.type,i=n==a;return"vardef"==a?r.indented+4:"form"==a&&"{"==n?r.indented:"stat"==a||"form"==a?r.indented+K:"switch"!=r.info||i?r.align?r.column+(i?0:1):r.indented+(i?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 a="variable-2";return e.eat(/-/),"-"==e.peek()&&(e.eat(/-/),a="keyword a"),"D"==e.peek()&&(e.eat(/[D]/),a="keyword c",t.define=!0),e.eatWhile(/[A-Z]/i),a}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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("haxe",function(a,b){function c(a){return{type:a,style:"keyword"}}function d(a,b,c){return b.tokenize=c,c(a,b)}function e(a,b){for(var c,d=!1;null!=(c=a.next());){if(c==b&&!d)return!0;d=!d&&"\\"==c}}function f(a,b,c){return U=a,V=c,b}function g(a,b){var c=a.next();if('"'==c||"'"==c)return d(a,b,h(c));if(/[\[\]{}\(\),;\:\.]/.test(c))return f(c);if("0"==c&&a.eat(/x/i))return a.eatWhile(/[\da-f]/i),f("number","number");if(/\d/.test(c)||"-"==c&&a.eat(/\d/))return a.match(/^\d*(?:\.\d*(?!\.))?(?:[eE][+\-]?\d+)?/),f("number","number");if(b.reAllowed&&"~"==c&&a.eat(/\//))return e(a,"/"),a.eatWhile(/[gimsu]/),f("regexp","string-2");if("/"==c)return a.eat("*")?d(a,b,i):a.eat("/")?(a.skipToEnd(),f("comment","comment")):(a.eatWhile(ca),f("operator",null,a.current()));if("#"==c)return a.skipToEnd(),f("conditional","meta");if("@"==c)return a.eat(/:/),a.eatWhile(/[\w_]/),f("metadata","meta");if(ca.test(c))return a.eatWhile(ca),f("operator",null,a.current());var g;if(/[A-Z]/.test(c))return a.eatWhile(/[\w_<>]/),g=a.current(),f("type","variable-3",g);a.eatWhile(/[\w_]/);var g=a.current(),j=ba.propertyIsEnumerable(g)&&ba[g];return j&&b.kwAllowed?f(j.type,j.style,g):f("variable","variable",g)}function h(a){return function(b,c){return e(b,a)&&(c.tokenize=g),f("string","string")}}function i(a,b){for(var c,d=!1;c=a.next();){if("/"==c&&d){b.tokenize=g;break}d="*"==c}return f("comment","comment")}function j(a,b,c,d,e,f){this.indented=a,this.column=b,this.type=c,this.prev=e,this.info=f,null!=d&&(this.align=d)}function k(a,b){for(var c=a.localVars;c;c=c.next)if(c.name==b)return!0}function l(a,b,c,d,e){var f=a.cc;for(ea.state=a,ea.stream=e,ea.marked=null,ea.cc=f,a.lexical.hasOwnProperty("align")||(a.lexical.align=!0);;){if((f.length?f.pop():x)(c,d)){for(;f.length&&f[f.length-1].lex;)f.pop()();return ea.marked?ea.marked:"variable"==c&&k(a,d)?"variable-2":"variable"==c&&m(a,d)?"variable-3":b}}}function m(a,b){if(/[a-z]/.test(b.charAt(0)))return!1;for(var c=a.importedtypes.length,d=0;d=0;a--)ea.cc.push(arguments[a])}function p(){return o.apply(null,arguments),!0}function q(a,b){for(var c=b;c;c=c.next)if(c.name==a)return!0;return!1}function r(a){var b=ea.state;if(b.context){if(ea.marked="def",q(a,b.localVars))return;b.localVars={name:a,next:b.localVars}}else if(b.globalVars){if(q(a,b.globalVars))return;b.globalVars={name:a,next:b.globalVars}}}function s(){ea.state.context||(ea.state.localVars=fa),ea.state.context={prev:ea.state.context,vars:ea.state.localVars}}function t(){ea.state.localVars=ea.state.context.vars,ea.state.context=ea.state.context.prev}function u(a,b){var c=function(){var c=ea.state;c.lexical=new j(c.indented,ea.stream.column(),a,null,c.lexical,b)};return c.lex=!0,c}function v(){var a=ea.state;a.lexical.prev&&(")"==a.lexical.type&&(a.indented=a.lexical.indented),a.lexical=a.lexical.prev)}function w(a){function b(c){return c==a?p():";"==a?o():p(b)}return b}function x(a){return"@"==a?p(C):"var"==a?p(u("vardef"),L,w(";"),v):"keyword a"==a?p(u("form"),y,x,v):"keyword b"==a?p(u("form"),x,v):"{"==a?p(u("}"),s,K,v,t):";"==a?p():"attribute"==a?p(B):"function"==a?p(P):"for"==a?p(u("form"),w("("),u(")"),N,w(")"),v,x,v):"variable"==a?p(u("stat"),G):"switch"==a?p(u("form"),y,u("}","switch"),w("{"),K,v,v):"case"==a?p(y,w(":")):"default"==a?p(w(":")):"catch"==a?p(u("form"),s,w("("),T,w(")"),x,v,t):"import"==a?p(E,w(";")):"typedef"==a?p(F):o(u("stat"),y,w(";"),v)}function y(a){return da.hasOwnProperty(a)?p(A):"type"==a?p(A):"function"==a?p(P):"keyword c"==a?p(z):"("==a?p(u(")"),z,w(")"),v,A):"operator"==a?p(y):"["==a?p(u("]"),J(z,"]"),v,A):"{"==a?p(u("}"),J(I,"}"),v,A):p()}function z(a){return a.match(/[;\}\)\],]/)?o():o(y)}function A(a,b){if("operator"==a&&/\+\+|--/.test(b))return p(A);if("operator"==a||":"==a)return p(y);if(";"!=a)return"("==a?p(u(")"),J(y,")"),v,A):"."==a?p(H,A):"["==a?p(u("]"),y,w("]"),v,A):void 0}function B(a){return"attribute"==a?p(B):"function"==a?p(P):"var"==a?p(L):void 0}function C(a){return":"==a?p(C):"variable"==a?p(C):"("==a?p(u(")"),J(D,")"),v,x):void 0}function D(a){if("variable"==a)return p()}function E(a,b){return"variable"==a&&/[A-Z]/.test(b.charAt(0))?(n(b),p()):"variable"==a||"property"==a||"."==a||"*"==b?p(E):void 0}function F(a,b){return"variable"==a&&/[A-Z]/.test(b.charAt(0))?(n(b),p()):"type"==a&&/[A-Z]/.test(b.charAt(0))?p():void 0}function G(a){return":"==a?p(v,x):o(A,w(";"),v)}function H(a){if("variable"==a)return ea.marked="property",p()}function I(a){if("variable"==a&&(ea.marked="property"),da.hasOwnProperty(a))return p(w(":"),y)}function J(a,b){function c(d){return","==d?p(a,c):d==b?p():p(w(b))}return function(d){return d==b?p():o(a,c)}}function K(a){return"}"==a?p():o(x,K)}function L(a,b){return"variable"==a?(r(b),p(Q,M)):p()}function M(a,b){return"="==b?p(y,M):","==a?p(L):void 0}function N(a,b){return"variable"==a?(r(b),p(O,y)):o()}function O(a,b){if("in"==b)return p()}function P(a,b){return"variable"==a||"type"==a?(r(b),p(P)):"new"==b?p(P):"("==a?p(u(")"),s,J(T,")"),v,Q,x,t):void 0}function Q(a){if(":"==a)return p(R)}function R(a){return"type"==a?p():"variable"==a?p():"{"==a?p(u("}"),J(S,"}"),v):void 0}function S(a){if("variable"==a)return p(Q)}function T(a,b){if("variable"==a)return r(b),p(Q)}var U,V,W=a.indentUnit,X=c("keyword a"),Y=c("keyword b"),Z=c("keyword c"),$=c("operator"),_={type:"atom",style:"atom"},aa={type:"attribute",style:"attribute"},U=c("typedef"),ba={if:X,while:X,else:Y,do:Y,try:Y,return:Z,break:Z,continue:Z,new:Z,throw:Z,var:c("var"),inline:aa,static:aa,using:c("import"),public:aa,private:aa,cast:c("cast"),import:c("import"),macro:c("macro"),function:c("function"),catch:c("catch"),untyped:c("untyped"),callback:c("cb"),for:c("for"),switch:c("switch"),case:c("case"),default:c("default"),in:$,never:c("property_access"),trace:c("trace"),class:U,abstract:U,enum:U,interface:U,typedef:U,extends:U,implements:U,dynamic:U,true:_,false:_,null:_},ca=/[+\-*&%=<>!?|]/,da={atom:!0,number:!0,variable:!0,string:!0,regexp:!0},ea={state:null,column:null,marked:null,cc:null},fa={name:"this",next:null};return t.lex=!0,v.lex=!0,{startState:function(a){var c=["Int","Float","String","Void","Std","Bool","Dynamic","Array"],d={tokenize:g,reAllowed:!0,kwAllowed:!0,cc:[],lexical:new j((a||0)-W,0,"block",!1),localVars:b.localVars,importedtypes:c,context:b.localVars&&{vars:b.localVars},indented:0};return b.globalVars&&"object"==typeof b.globalVars&&(d.globalVars=b.globalVars),d},token:function(a,b){if(a.sol()&&(b.lexical.hasOwnProperty("align")||(b.lexical.align=!1),b.indented=a.indentation()),a.eatSpace())return null;var c=b.tokenize(a,b);return"comment"==U?c:(b.reAllowed=!("operator"!=U&&"keyword c"!=U&&!U.match(/^[\[{}\(,;:]$/)),b.kwAllowed="."!=U,l(b,c,U,V,a))},indent:function(a,b){if(a.tokenize!=g)return 0;var c=b&&b.charAt(0),d=a.lexical;"stat"==d.type&&"}"==c&&(d=d.prev);var e=d.type,f=c==e;return"vardef"==e?d.indented+4:"form"==e&&"{"==c?d.indented:"stat"==e||"form"==e?d.indented+W:"switch"!=d.info||f?d.align?d.column+(f?0:1):d.indented+(f?0:W):d.indented+(/^(?:case|default)\b/.test(b)?W:2*W)},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),a.defineMIME("text/x-haxe","haxe"),a.defineMode("hxml",function(){return{startState:function(){return{define:!1,inString:!1}},token:function(a,b){var c=a.peek(),d=a.sol();if("#"==c)return a.skipToEnd(),"comment";if(d&&"-"==c){var e="variable-2";return a.eat(/-/),"-"==a.peek()&&(a.eat(/-/),e="keyword a"),"D"==a.peek()&&(a.eat(/[D]/),e="keyword c",b.define=!0),a.eatWhile(/[A-Z]/i),e}var c=a.peek();return 0==b.inString&&"'"==c&&(b.inString=!0,a.next()),1==b.inString?(a.skipTo("'")||a.skipToEnd(),"'"==a.peek()&&(a.next(),b.inString=!1),"string"):(a.next(),null)},lineComment:"#"}}),a.defineMIME("text/x-hxml","hxml")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/htmlembedded/htmlembedded.min.js b/media/vendor/codemirror/mode/htmlembedded/htmlembedded.min.js index ba91b2b7f169b..5483b7de9c56f 100644 --- a/media/vendor/codemirror/mode/htmlembedded/htmlembedded.min.js +++ b/media/vendor/codemirror/mode/htmlembedded/htmlembedded.min.js @@ -1 +1 @@ -!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(i,d){return e.multiplexingMode(e.getMode(i,"htmlmixed"),{open:d.open||d.scriptStartRegex||"<%",close:d.close||d.scriptEndRegex||"%>",mode:e.getMode(i,d.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"})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/multiplex"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("htmlembedded",function(b,c){return a.multiplexingMode(a.getMode(b,"htmlmixed"),{open:c.open||c.scriptStartRegex||"<%",close:c.close||c.scriptEndRegex||"%>",mode:a.getMode(b,c.scriptingModeSpec)})},"htmlmixed"),a.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"}),a.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"}),a.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"}),a.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"})}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/htmlmixed/htmlmixed.js b/media/vendor/codemirror/mode/htmlmixed/htmlmixed.js index 16b4f139fd400..33398ec5c0bb1 100644 --- a/media/vendor/codemirror/mode/htmlmixed/htmlmixed.js +++ b/media/vendor/codemirror/mode/htmlmixed/htmlmixed.js @@ -133,11 +133,11 @@ return state.token(stream, state); }, - indent: function (state, textAfter) { + indent: function (state, textAfter, line) { if (!state.localMode || /^\s*<\//.test(textAfter)) return htmlMode.indent(state.htmlState, textAfter); else if (state.localMode.indent) - return state.localMode.indent(state.localState, textAfter); + return state.localMode.indent(state.localState, textAfter, line); else return CodeMirror.Pass; }, diff --git a/media/vendor/codemirror/mode/htmlmixed/htmlmixed.min.js b/media/vendor/codemirror/mode/htmlmixed/htmlmixed.min.js index 47db7b57a2039..47758d6ea6d3d 100644 --- a/media/vendor/codemirror/mode/htmlmixed/htmlmixed.min.js +++ b/media/vendor/codemirror/mode/htmlmixed/htmlmixed.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(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"],t):t(CodeMirror)}(function(t){"use strict";function e(t,e,a){var n=t.current(),l=n.search(e);return l>-1?t.backUp(n.length-l):n.match(/<\/?$/)&&(t.backUp(n.length),t.match(e,!1)||t.match(n)),a}function a(t){var e=i[t];return e||(i[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function n(t,e){var n=t.match(a(e));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function l(t,e){return new RegExp((e?"^":"")+"","i")}function r(t,e){for(var a in t)for(var n=e[a]||(e[a]=[]),l=t[a],r=l.length-1;r>=0;r--)n.unshift(l[r])}function o(t,e){for(var a=0;a\s\/]/.test(n.current())&&(c=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(c))r.inTag=c+" ";else if(r.inTag&&d&&/>$/.test(n.current())){var f=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var p=">"==n.current()&&o(u[f[1]],f[2]),g=t.getMode(a,p),h=l(f[1],!0),S=l(f[1],!1);r.token=function(t,a){return t.match(h,!1)?(a.token=i,a.localState=a.localMode=null,null):e(t,S,a.localMode.token(t,a.localState))},r.localMode=g,r.localState=t.startState(g,s.indent(r.htmlState,""))}else r.inTag&&(r.inTag+=n.current(),n.eol()&&(r.inTag+=" "));return m}var s=t.getMode(a,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),u={},m=n&&n.tags,d=n&&n.scriptTypes;if(r(c,u),m&&r(m,u),d)for(var f=d.length-1;f>=0;f--)u.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:i,inTag:null,localMode:null,localState:null,htmlState:t.startState(s)}},copyState:function(e){var a;return e.localState&&(a=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:a,htmlState:t.copyState(s,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,a){return!e.localMode||/^\s*<\//.test(a)?s.indent(e.htmlState,a):e.localMode.indent?e.localMode.indent(e.localState,a):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||s}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(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"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,c){var d=a.current(),e=d.search(b);return e>-1?a.backUp(d.length-e):d.match(/<\/?$/)&&(a.backUp(d.length),a.match(b,!1)||a.match(d)),c}function c(a){var b=i[a];return b?b:i[a]=new RegExp("\\s+"+a+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function d(a,b){var d=a.match(c(b));return d?/^\s*(.*?)\s*$/.exec(d[2])[1]:""}function e(a,b){return new RegExp((b?"^":"")+"","i")}function f(a,b){for(var c in a)for(var d=b[c]||(b[c]=[]),e=a[c],f=e.length-1;f>=0;f--)d.unshift(e[f])}function g(a,b){for(var c=0;c\s\/]/.test(d.current())&&(h=f.htmlState.tagName&&f.htmlState.tagName.toLowerCase())&&k.hasOwnProperty(h))f.inTag=h+" ";else if(f.inTag&&m&&/>$/.test(d.current())){var n=/^([\S]+) (.*)/.exec(f.inTag);f.inTag=null;var o=">"==d.current()&&g(k[n[1]],n[2]),p=a.getMode(c,o),q=e(n[1],!0),r=e(n[1],!1);f.token=function(a,c){return a.match(q,!1)?(c.token=i,c.localState=c.localMode=null,null):b(a,r,c.localMode.token(a,c.localState))},f.localMode=p,f.localState=a.startState(p,j.indent(f.htmlState,""))}else f.inTag&&(f.inTag+=d.current(),d.eol()&&(f.inTag+=" "));return l}var j=a.getMode(c,{name:"xml",htmlMode:!0,multilineTagIndentFactor:d.multilineTagIndentFactor,multilineTagIndentPastTag:d.multilineTagIndentPastTag}),k={},l=d&&d.tags,m=d&&d.scriptTypes;if(f(h,k),l&&f(l,k),m)for(var n=m.length-1;n>=0;n--)k.script.unshift(["type",m[n].matches,m[n].mode]);return{startState:function(){return{token:i,inTag:null,localMode:null,localState:null,htmlState:a.startState(j)}},copyState:function(b){var c;return b.localState&&(c=a.copyState(b.localMode,b.localState)),{token:b.token,inTag:b.inTag,localMode:b.localMode,localState:c,htmlState:a.copyState(j,b.htmlState)}},token:function(a,b){return b.token(a,b)},indent:function(b,c,d){return!b.localMode||/^\s*<\//.test(c)?j.indent(b.htmlState,c):b.localMode.indent?b.localMode.indent(b.localState,c,d):a.Pass},innerMode:function(a){return{state:a.localState||a.htmlState,mode:a.localMode||j}}}},"xml","javascript","css"),a.defineMIME("text/html","htmlmixed")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/http/http.min.js b/media/vendor/codemirror/mode/http/http.min.js index 94bbaf3643ae5..5dae821c9a1ee 100644 --- a/media/vendor/codemirror/mode/http/http.min.js +++ b/media/vendor/codemirror/mode/http/http.min.js @@ -1 +1 @@ -!function(r){"object"==typeof exports&&"object"==typeof module?r(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)}(function(r){"use strict";r.defineMode("http",function(){function r(r,e){return r.skipToEnd(),e.cur=u,"error"}function e(e,n){return e.match(/^HTTP\/\d\.\d/)?(n.cur=t,"keyword"):e.match(/^[A-Z]+/)&&/[ \t]/.test(e.peek())?(n.cur=o,"keyword"):r(e,n)}function t(e,t){var o=e.match(/^\d+/);if(!o)return r(e,t);t.cur=n;var i=Number(o[0]);return i>=100&&i<200?"positive informational":i>=200&&i<300?"positive success":i>=300&&i<400?"positive redirect":i>=400&&i<500?"negative client-error":i>=500&&i<600?"negative server-error":"error"}function n(r,e){return r.skipToEnd(),e.cur=u,null}function o(r,e){return r.eatWhile(/\S/),e.cur=i,"string-2"}function i(e,t){return e.match(/^HTTP\/\d\.\d$/)?(t.cur=u,"keyword"):r(e,t)}function u(r){return r.sol()&&!r.eat(/[ \t]/)?r.match(/^.*?:/)?"atom":(r.skipToEnd(),"error"):(r.skipToEnd(),"string")}function c(r){return r.skipToEnd(),null}return{token:function(r,e){var t=e.cur;return t!=u&&t!=c&&r.eatSpace()?null:t(r,e)},blankLine:function(r){r.cur=c},startState:function(){return{cur:e}}}}),r.defineMIME("message/http","http")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("http",function(){function a(a,b){return a.skipToEnd(),b.cur=g,"error"}function b(b,d){return b.match(/^HTTP\/\d\.\d/)?(d.cur=c,"keyword"):b.match(/^[A-Z]+/)&&/[ \t]/.test(b.peek())?(d.cur=e,"keyword"):a(b,d)}function c(b,c){var e=b.match(/^\d+/);if(!e)return a(b,c);c.cur=d;var f=Number(e[0]);return f>=100&&f<200?"positive informational":f>=200&&f<300?"positive success":f>=300&&f<400?"positive redirect":f>=400&&f<500?"negative client-error":f>=500&&f<600?"negative server-error":"error"}function d(a,b){return a.skipToEnd(),b.cur=g,null}function e(a,b){return a.eatWhile(/\S/),b.cur=f,"string-2"}function f(b,c){return b.match(/^HTTP\/\d\.\d$/)?(c.cur=g,"keyword"):a(b,c)}function g(a){return a.sol()&&!a.eat(/[ \t]/)?a.match(/^.*?:/)?"atom":(a.skipToEnd(),"error"):(a.skipToEnd(),"string")}function h(a){return a.skipToEnd(),null}return{token:function(a,b){var c=b.cur;return c!=g&&c!=h&&a.eatSpace()?null:c(a,b)},blankLine:function(a){a.cur=h},startState:function(){return{cur:b}}}}),a.defineMIME("message/http","http")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/idl/idl.min.js b/media/vendor/codemirror/mode/idl/idl.min.js index 7decde6c07cf0..b332bdfc4bf33 100644 --- a/media/vendor/codemirror/mode/idl/idl.min.js +++ b/media/vendor/codemirror/mode/idl/idl.min.js @@ -1 +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){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}function r(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(o)?"keyword":e.match(a)?"builtin":e.match(l)?"variable":e.match(s)||e.match(n)?"operator":(e.next(),null)}var i=["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"],a=t(i),_=["begin","end","endcase","endfor","endwhile","endif","endrep","endforeach","break","case","continue","for","foreach","goto","if","then","else","repeat","until","switch","while","do","pro","function"],o=t(_);e.registerHelper("hintWords","idl",i.concat(_));var l=new RegExp("^[_a-z¡-￿][_a-z0-9¡-￿]*","i"),s=/[+\-*&=<>\/@#~$]/,n=new RegExp("(and|or|eq|lt|le|gt|ge|ne|not)","i");e.defineMode("idl",function(){return{token:function(e){return r(e)}}}),e.defineMIME("text/x-idl","idl")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){return new RegExp("^(("+a.join(")|(")+"))\\b","i")}function c(a){if(a.eatSpace())return null;if(a.match(";"))return a.skipToEnd(),"comment";if(a.match(/^[0-9\.+-]/,!1)){if(a.match(/^[+-]?0x[0-9a-fA-F]+/))return"number";if(a.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/))return"number";if(a.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))return"number"}return a.match(/^"([^"]|(""))*"/)?"string":a.match(/^'([^']|(''))*'/)?"string":a.match(g)?"keyword":a.match(e)?"builtin":a.match(h)?"variable":a.match(i)||a.match(j)?"operator":(a.next(),null)}var d=["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"],e=b(d),f=["begin","end","endcase","endfor","endwhile","endif","endrep","endforeach","break","case","continue","for","foreach","goto","if","then","else","repeat","until","switch","while","do","pro","function"],g=b(f);a.registerHelper("hintWords","idl",d.concat(f));var h=new RegExp("^[_a-z¡-￿][_a-z0-9¡-￿]*","i"),i=/[+\-*&=<>\/@#~$]/,j=new RegExp("(and|or|eq|lt|le|gt|ge|ne|not)","i");a.defineMode("idl",function(){return{token:function(a){return c(a)}}}),a.defineMIME("text/x-idl","idl")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/javascript/javascript.js b/media/vendor/codemirror/mode/javascript/javascript.js index 7c09476b3dead..73113c6b99270 100644 --- a/media/vendor/codemirror/mode/javascript/javascript.js +++ b/media/vendor/codemirror/mode/javascript/javascript.js @@ -54,7 +54,6 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { "namespace": C, "module": kw("module"), "enum": kw("module"), - "type": kw("type"), // scope modifiers "public": kw("modifier"), @@ -361,8 +360,15 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { } if (type == "function") return cont(functiondef); if (type == "for") return cont(pushlex("form"), forspec, statement, poplex); - if (type == "variable") return cont(pushlex("stat"), maybelabel); - if (type == "switch") return cont(pushlex("form"), parenExpr, pushlex("}", "switch"), expect("{"), + if (type == "variable") { + if (isTS && value == "type") { + cx.marked = "keyword" + return cont(typeexpr, expect("operator"), typeexpr, expect(";")); + } else { + return cont(pushlex("stat"), maybelabel); + } + } + if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), block, poplex, poplex); if (type == "case") return cont(expression, expect(":")); if (type == "default") return cont(expect(":")); @@ -371,8 +377,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { if (type == "class") return cont(pushlex("form"), className, poplex); if (type == "export") return cont(pushlex("stat"), afterExport, poplex); if (type == "import") return cont(pushlex("stat"), afterImport, poplex); - if (type == "module") return cont(pushlex("form"), pattern, pushlex("}"), expect("{"), block, poplex, poplex) - if (type == "type") return cont(typeexpr, expect("operator"), typeexpr, expect(";")); + if (type == "module") return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex) if (type == "async") return cont(statement) if (value == "@") return cont(expression, statement) return pass(pushlex("stat"), expression, expect(";"), poplex); @@ -542,7 +547,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { function typeexpr(type) { if (type == "variable") {cx.marked = "variable-3"; return cont(afterType);} if (type == "string" || type == "number" || type == "atom") return cont(afterType); - if (type == "{") return cont(pushlex("}"), commasep(typeprop, "}", ",;"), poplex) + if (type == "{") return cont(pushlex("}"), commasep(typeprop, "}", ",;"), poplex, afterType) if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType) } function maybeReturnType(type) { @@ -556,6 +561,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { return cont(typeprop) } else if (type == ":") { return cont(typeexpr) + } else if (type == "[") { + return cont(expression, maybetype, expect("]"), typeprop) } } function typearg(type) { @@ -566,6 +573,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType) if (value == "|" || type == ".") return cont(typeexpr) if (type == "[") return cont(expect("]"), afterType) + if (value == "extends") return cont(typeexpr) } function vardef() { return pass(pattern, maybetype, maybeAssign, vardefCont); diff --git a/media/vendor/codemirror/mode/javascript/javascript.min.js b/media/vendor/codemirror/mode/javascript/javascript.min.js index 0cbec3dfcc6aa..cd70570927667 100644 --- a/media/vendor/codemirror/mode/javascript/javascript.min.js +++ b/media/vendor/codemirror/mode/javascript/javascript.min.js @@ -1 +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,t,r){return/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}e.defineMode("javascript",function(r,n){function a(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function i(e,t,r){return Ve=e,Ee=r,t}function o(e,r){var n=e.next();if('"'==n||"'"==n)return r.tokenize=c(n),r.tokenize(e,r);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return i("number","number");if("."==n&&e.match(".."))return i("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return i(n);if("="==n&&e.eat(">"))return i("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),i("number","number");if("0"==n&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),i("number","number");if("0"==n&&e.eat(/b/i))return e.eatWhile(/[01]/i),i("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),i("number","number");if("/"==n)return e.eat("*")?(r.tokenize=u,u(e,r)):e.eat("/")?(e.skipToEnd(),i("comment","comment")):t(e,r,1)?(a(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),i("regexp","string-2")):(e.eatWhile(Oe),i("operator","operator",e.current()));if("`"==n)return r.tokenize=l,l(e,r);if("#"==n)return e.skipToEnd(),i("error","error");if(Oe.test(n))return">"==n&&r.lexical&&">"==r.lexical.type||e.eatWhile(Oe),i("operator","operator",e.current());if(qe.test(n)){e.eatWhile(qe);var o=e.current(),s=Ce.propertyIsEnumerable(o)&&Ce[o];return s&&"."!=r.lastType?i(s.type,s.style,o):i("variable","variable",o)}}function c(e){return function(t,r){var n,a=!1;if(Ae&&"@"==t.peek()&&t.match(We))return r.tokenize=o,i("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||a);)a=!a&&"\\"==n;return a||(r.tokenize=o),i("string","string")}}function u(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=o;break}n="*"==r}return i("comment","comment")}function l(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=o;break}n=!n&&"\\"==r}return i("quasi","string-2",e.current())}function s(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if($e){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var c=e.string.charAt(o),u=Pe.indexOf(c);if(u>=0&&u<3){if(!a){++o;break}if(0==--a){"("==c&&(i=!0);break}}else if(u>=3&&u<6)++a;else if(qe.test(c))i=!0;else{if(/["'\/]/.test(c))return;if(i&&!a){++o;break}}}i&&!a&&(t.fatArrowAt=o)}}function f(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function d(e,t){for(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,r,n,a){var i=e.cc;for(Ne.state=e,Ne.stream=a,Ne.marked=null,Ne.cc=i,Ne.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((i.length?i.pop():Te?j:g)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return Ne.marked?Ne.marked:"variable"==r&&d(e,n)?"variable-2":t}}function m(){for(var e=arguments.length-1;e>=0;e--)Ne.cc.push(arguments[e])}function v(){return m.apply(null,arguments),!0}function y(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var r=Ne.state;if(Ne.marked="def",r.context){if(t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function k(){Ne.state.context={prev:Ne.state.context,vars:Ne.state.localVars},Ne.state.localVars=Be}function b(){Ne.state.localVars=Ne.state.context.vars,Ne.state.context=Ne.state.context.prev}function x(e,t){var r=function(){var r=Ne.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new f(n,Ne.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function h(){var e=Ne.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(r){return r==e?v():";"==e?m():v(t)}return t}function g(e,t){return"var"==e?v(x("vardef",t.length),Z,w(";"),h):"keyword a"==e?v(x("form"),V,g,h):"keyword b"==e?v(x("form"),g,h):"{"==e?v(x("}"),J,h):";"==e?v():"if"==e?("else"==Ne.state.lexical.info&&Ne.state.cc[Ne.state.cc.length-1]==h&&Ne.state.cc.pop()(),v(x("form"),V,g,h,ne)):"function"==e?v(le):"for"==e?v(x("form"),ae,g,h):"variable"==e?v(x("stat"),N):"switch"==e?v(x("form"),V,x("}","switch"),w("{"),J,h,h):"case"==e?v(j,w(":")):"default"==e?v(w(":")):"catch"==e?v(x("form"),k,w("("),se,w(")"),g,h,b):"class"==e?v(x("form"),de,h):"export"==e?v(x("stat"),ye,h):"import"==e?v(x("stat"),be,h):"module"==e?v(x("form"),_,x("}"),w("{"),J,h,h):"type"==e?v(L,w("operator"),L,w(";")):"async"==e?v(g):"@"==t?v(j,g):m(x("stat"),j,w(";"),h)}function j(e){return E(e,!1)}function M(e){return E(e,!0)}function V(e){return"("!=e?m():v(x(")"),j,w(")"),h)}function E(e,t){if(Ne.state.fatArrowAt==Ne.stream.start){var r=t?O:C;if("("==e)return v(k,x(")"),F(_,")"),h,w("=>"),r,b);if("variable"==e)return m(k,_,w("=>"),r,b)}var n=t?T:A;return Se.hasOwnProperty(e)?v(n):"function"==e?v(le,n):"class"==e?v(x("form"),fe,h):"keyword c"==e||"async"==e?v(t?z:I):"("==e?v(x(")"),I,w(")"),h,n):"operator"==e||"spread"==e?v(t?M:j):"["==e?v(x("]"),je,h,n):"{"==e?G(H,"}",null,n):"quasi"==e?m($,n):"new"==e?v(W(t)):v()}function I(e){return e.match(/[;\}\)\],]/)?m():m(j)}function z(e){return e.match(/[;\}\)\],]/)?m():m(M)}function A(e,t){return","==e?v(j):T(e,t,!1)}function T(e,t,r){var n=0==r?A:T,a=0==r?j:M;return"=>"==e?v(k,r?O:C,b):"operator"==e?/\+\+|--/.test(t)?v(n):"?"==t?v(j,w(":"),a):v(a):"quasi"==e?m($,n):";"!=e?"("==e?G(M,")","call",n):"."==e?v(B,n):"["==e?v(x("]"),I,w("]"),h,n):void 0:void 0}function $(e,t){return"quasi"!=e?m():"${"!=t.slice(t.length-2)?v($):v(j,q)}function q(e){if("}"==e)return Ne.marked="string-2",Ne.state.tokenize=l,v($)}function C(e){return s(Ne.stream,Ne.state),m("{"==e?g:j)}function O(e){return s(Ne.stream,Ne.state),m("{"==e?g:M)}function W(e){return function(t){return"."==t?v(e?S:P):m(e?M:j)}}function P(e,t){if("target"==t)return Ne.marked="keyword",v(A)}function S(e,t){if("target"==t)return Ne.marked="keyword",v(T)}function N(e){return":"==e?v(h,g):m(A,w(";"),h)}function B(e){if("variable"==e)return Ne.marked="property",v()}function H(e,t){return"async"==e?(Ne.marked="property",v(H)):"variable"==e||"keyword"==Ne.style?(Ne.marked="property",v("get"==t||"set"==t?U:D)):"number"==e||"string"==e?(Ne.marked=Ae?"property":Ne.style+" property",v(D)):"jsonld-keyword"==e?v(D):"modifier"==e?v(H):"["==e?v(j,w("]"),D):"spread"==e?v(j):":"==e?m(D):void 0}function U(e){return"variable"!=e?m(D):(Ne.marked="property",v(le))}function D(e){return":"==e?v(M):"("==e?m(le):void 0}function F(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=Ne.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),v(function(r,n){return r==t||n==t?m():m(e)},n)}return a==t||i==t?v():v(w(t))}return function(r,a){return r==t||a==t?v():m(e,n)}}function G(e,t,r){for(var n=3;n"==e)return v(L)}function R(e,t){return"variable"==e||"keyword"==Ne.style?(Ne.marked="property",v(R)):"?"==t?v(R):":"==e?v(L):void 0}function X(e){return"variable"==e?v(X):":"==e?v(L):void 0}function Y(e,t){return"<"==t?v(x(">"),F(L,">"),h,Y):"|"==t||"."==e?v(L):"["==e?v(w("]"),Y):void 0}function Z(){return m(_,K,te,re)}function _(e,t){return"modifier"==e?v(_):"variable"==e?(y(t),v()):"spread"==e?v(_):"["==e?G(_,"]"):"{"==e?G(ee,"}"):void 0}function ee(e,t){return"variable"!=e||Ne.stream.match(/^\s*:/,!1)?("variable"==e&&(Ne.marked="property"),"spread"==e?v(_):"}"==e?m():v(w(":"),_,te)):(y(t),v(te))}function te(e,t){if("="==t)return v(M)}function re(e){if(","==e)return v(Z)}function ne(e,t){if("keyword b"==e&&"else"==t)return v(x("form","else"),g,h)}function ae(e){if("("==e)return v(x(")"),ie,w(")"),h)}function ie(e){return"var"==e?v(Z,w(";"),ce):";"==e?v(ce):"variable"==e?v(oe):m(j,w(";"),ce)}function oe(e,t){return"in"==t||"of"==t?(Ne.marked="keyword",v(j)):v(A,ce)}function ce(e,t){return";"==e?v(ue):"in"==t||"of"==t?(Ne.marked="keyword",v(j)):m(j,w(";"),ue)}function ue(e){")"!=e&&v(j)}function le(e,t){return"*"==t?(Ne.marked="keyword",v(le)):"variable"==e?(y(t),v(le)):"("==e?v(k,x(")"),F(se,")"),h,K,g,b):$e&&"<"==t?v(x(">"),F(L,">"),h,le):void 0}function se(e){return"spread"==e?v(se):m(_,K,te)}function fe(e,t){return"variable"==e?de(e,t):pe(e,t)}function de(e,t){if("variable"==e)return y(t),v(pe)}function pe(e,t){return"<"==t?v(x(">"),F(L,">"),h,pe):"extends"==t||"implements"==t||$e&&","==e?v($e?L:j,pe):"{"==e?v(x("}"),me,h):void 0}function me(e,t){return"variable"==e||"keyword"==Ne.style?("async"==t||"static"==t||"get"==t||"set"==t||$e&&("public"==t||"private"==t||"protected"==t||"readonly"==t||"abstract"==t))&&Ne.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Ne.marked="keyword",v(me)):(Ne.marked="property",v($e?ve:le,me)):"["==e?v(j,w("]"),$e?ve:le,me):"*"==t?(Ne.marked="keyword",v(me)):";"==e?v(me):"}"==e?v():"@"==t?v(j,me):void 0}function ve(e,t){return"?"==t?v(ve):":"==e?v(L,te):"="==t?v(M):m(le)}function ye(e,t){return"*"==t?(Ne.marked="keyword",v(ge,w(";"))):"default"==t?(Ne.marked="keyword",v(j,w(";"))):"{"==e?v(F(ke,"}"),ge,w(";")):m(g)}function ke(e,t){return"as"==t?(Ne.marked="keyword",v(w("variable"))):"variable"==e?m(M,ke):void 0}function be(e){return"string"==e?v():m(xe,he,ge)}function xe(e,t){return"{"==e?G(xe,"}"):("variable"==e&&y(t),"*"==t&&(Ne.marked="keyword"),v(we))}function he(e){if(","==e)return v(xe,he)}function we(e,t){if("as"==t)return Ne.marked="keyword",v(xe)}function ge(e,t){if("from"==t)return Ne.marked="keyword",v(j)}function je(e){return"]"==e?v():m(F(M,"]"))}function Me(e,t){return"operator"==e.lastType||","==e.lastType||Oe.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var Ve,Ee,Ie=r.indentUnit,ze=n.statementIndent,Ae=n.jsonld,Te=n.json||Ae,$e=n.typescript,qe=n.wordCharacters||/[\w$\xa1-\uffff]/,Ce=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("operator"),i={type:"atom",style:"atom"},o={if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:n,break:n,continue:n,new:e("new"),delete:n,throw:n,debugger:n,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:a,typeof:a,instanceof:a,true:i,false:i,null:i,undefined:i,NaN:i,Infinity:i,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n,async:e("async")};if($e){var c={type:"variable",style:"variable-3"},u={interface:e("class"),implements:n,namespace:n,module:e("module"),enum:e("module"),type:e("type"),public:e("modifier"),private:e("modifier"),protected:e("modifier"),abstract:e("modifier"),as:a,string:c,number:c,boolean:c,any:c};for(var l in u)o[l]=u[l]}return o}(),Oe=/[+\-*&%=<>!?|~^@]/,We=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Pe="([{}])",Se={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Ne={state:null,column:null,marked:null,cc:null},Be={name:"this",next:{name:"arguments"}};return h.lex=!0,{startState:function(e){var t={tokenize:o,lastType:"sof",cc:[],lexical:new f((e||0)-Ie,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),s(e,t)),t.tokenize!=u&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Ve?r:(t.lastType="operator"!=Ve||"++"!=Ee&&"--"!=Ee?Ve:"incdec",p(t,r,Ve,Ee,e))},indent:function(t,r){if(t.tokenize==u)return e.Pass;if(t.tokenize!=o)return 0;var a,i=r&&r.charAt(0),c=t.lexical;if(!/^\s*else\b/.test(r))for(var l=t.cc.length-1;l>=0;--l){var s=t.cc[l];if(s==h)c=c.prev;else if(s!=ne)break}for(;("stat"==c.type||"form"==c.type)&&("}"==i||(a=t.cc[t.cc.length-1])&&(a==A||a==T)&&!/^[,\.=+\-*:?[\(]/.test(r));)c=c.prev;ze&&")"==c.type&&"stat"==c.prev.type&&(c=c.prev);var f=c.type,d=i==f;return"vardef"==f?c.indented+("operator"==t.lastType||","==t.lastType?c.info+1:0):"form"==f&&"{"==i?c.indented:"form"==f?c.indented+Ie:"stat"==f?c.indented+(Me(t,r)?ze||Ie:0):"switch"!=c.info||d||0==n.doubleIndentSwitch?c.align?c.column+(d?0:1):c.indented+(d?0:Ie):c.indented+(/^(?:case|default)\b/.test(r)?Ie:2*Ie)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Te?null:"/*",blockCommentEnd:Te?null:"*/",lineComment:Te?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Te?"json":"javascript",jsonldMode:Ae,jsonMode:Te,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=j&&t!=M||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})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,c){return/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(b.lastType)||"quasi"==b.lastType&&/\{\s*$/.test(a.string.slice(0,a.pos-(c||0)))}a.defineMode("javascript",function(c,d){function e(a){for(var b,c=!1,d=!1;null!=(b=a.next());){if(!c){if("/"==b&&!d)return;"["==b?d=!0:d&&"]"==b&&(d=!1)}c=!c&&"\\"==b}}function f(a,b,c){return za=a,Aa=c,b}function g(a,c){var d=a.next();if('"'==d||"'"==d)return c.tokenize=h(d),c.tokenize(a,c);if("."==d&&a.match(/^\d+(?:[eE][+\-]?\d+)?/))return f("number","number");if("."==d&&a.match(".."))return f("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(d))return f(d);if("="==d&&a.eat(">"))return f("=>","operator");if("0"==d&&a.eat(/x/i))return a.eatWhile(/[\da-f]/i),f("number","number");if("0"==d&&a.eat(/o/i))return a.eatWhile(/[0-7]/i),f("number","number");if("0"==d&&a.eat(/b/i))return a.eatWhile(/[01]/i),f("number","number");if(/\d/.test(d))return a.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),f("number","number");if("/"==d)return a.eat("*")?(c.tokenize=i,i(a,c)):a.eat("/")?(a.skipToEnd(),f("comment","comment")):b(a,c,1)?(e(a),a.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),f("regexp","string-2")):(a.eatWhile(Ia),f("operator","operator",a.current()));if("`"==d)return c.tokenize=j,j(a,c);if("#"==d)return a.skipToEnd(),f("error","error");if(Ia.test(d))return">"==d&&c.lexical&&">"==c.lexical.type||a.eatWhile(Ia),f("operator","operator",a.current());if(Ga.test(d)){a.eatWhile(Ga);var g=a.current(),k=Ha.propertyIsEnumerable(g)&&Ha[g];return k&&"."!=c.lastType?f(k.type,k.style,g):f("variable","variable",g)}}function h(a){return function(b,c){var d,e=!1;if(Da&&"@"==b.peek()&&b.match(Ja))return c.tokenize=g,f("jsonld-keyword","meta");for(;null!=(d=b.next())&&(d!=a||e);)e=!e&&"\\"==d;return e||(c.tokenize=g),f("string","string")}}function i(a,b){for(var c,d=!1;c=a.next();){if("/"==c&&d){b.tokenize=g;break}d="*"==c}return f("comment","comment")}function j(a,b){for(var c,d=!1;null!=(c=a.next());){if(!d&&("`"==c||"$"==c&&a.eat("{"))){b.tokenize=g;break}d=!d&&"\\"==c}return f("quasi","string-2",a.current())}function k(a,b){b.fatArrowAt&&(b.fatArrowAt=null);var c=a.string.indexOf("=>",a.start);if(!(c<0)){if(Fa){var d=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(a.string.slice(a.start,c));d&&(c=d.index)}for(var e=0,f=!1,g=c-1;g>=0;--g){var h=a.string.charAt(g),i=Ka.indexOf(h);if(i>=0&&i<3){if(!e){++g;break}if(0==--e){"("==h&&(f=!0);break}}else if(i>=3&&i<6)++e;else if(Ga.test(h))f=!0;else{if(/["'\/]/.test(h))return;if(f&&!e){++g;break}}}f&&!e&&(b.fatArrowAt=g)}}function l(a,b,c,d,e,f){this.indented=a,this.column=b,this.type=c,this.prev=e,this.info=f,null!=d&&(this.align=d)}function m(a,b){for(var c=a.localVars;c;c=c.next)if(c.name==b)return!0;for(var d=a.context;d;d=d.prev)for(var c=d.vars;c;c=c.next)if(c.name==b)return!0}function n(a,b,c,d,e){var f=a.cc;for(Ma.state=a,Ma.stream=e,Ma.marked=null,Ma.cc=f,Ma.style=b,a.lexical.hasOwnProperty("align")||(a.lexical.align=!0);;){if((f.length?f.pop():Ea?x:w)(c,d)){for(;f.length&&f[f.length-1].lex;)f.pop()();return Ma.marked?Ma.marked:"variable"==c&&m(a,d)?"variable-2":b}}}function o(){for(var a=arguments.length-1;a>=0;a--)Ma.cc.push(arguments[a])}function p(){return o.apply(null,arguments),!0}function q(a){function b(b){for(var c=b;c;c=c.next)if(c.name==a)return!0;return!1}var c=Ma.state;if(Ma.marked="def",c.context){if(b(c.localVars))return;c.localVars={name:a,next:c.localVars}}else{if(b(c.globalVars))return;d.globalVars&&(c.globalVars={name:a,next:c.globalVars})}}function r(){Ma.state.context={prev:Ma.state.context,vars:Ma.state.localVars},Ma.state.localVars=Na}function s(){Ma.state.localVars=Ma.state.context.vars,Ma.state.context=Ma.state.context.prev}function t(a,b){var c=function(){var c=Ma.state,d=c.indented;if("stat"==c.lexical.type)d=c.lexical.indented;else for(var e=c.lexical;e&&")"==e.type&&e.align;e=e.prev)d=e.indented;c.lexical=new l(d,Ma.stream.column(),a,null,c.lexical,b)};return c.lex=!0,c}function u(){var a=Ma.state;a.lexical.prev&&(")"==a.lexical.type&&(a.indented=a.lexical.indented),a.lexical=a.lexical.prev)}function v(a){function b(c){return c==a?p():";"==a?o():p(b)}return b}function w(a,b){return"var"==a?p(t("vardef",b.length),$,v(";"),u):"keyword a"==a?p(t("form"),z,w,u):"keyword b"==a?p(t("form"),w,u):"{"==a?p(t("}"),T,u):";"==a?p():"if"==a?("else"==Ma.state.lexical.info&&Ma.state.cc[Ma.state.cc.length-1]==u&&Ma.state.cc.pop()(),p(t("form"),z,w,u,da)):"function"==a?p(ja):"for"==a?p(t("form"),ea,w,u):"variable"==a?Fa&&"type"==b?(Ma.marked="keyword",p(V,v("operator"),V,v(";"))):p(t("stat"),M):"switch"==a?p(t("form"),z,v("{"),t("}","switch"),T,u,u):"case"==a?p(x,v(":")):"default"==a?p(v(":")):"catch"==a?p(t("form"),r,v("("),ka,v(")"),w,u,s):"class"==a?p(t("form"),ma,u):"export"==a?p(t("stat"),qa,u):"import"==a?p(t("stat"),sa,u):"module"==a?p(t("form"),_,v("{"),t("}"),T,u,u):"async"==a?p(w):"@"==b?p(x,w):o(t("stat"),x,v(";"),u)}function x(a){return A(a,!1)}function y(a){return A(a,!0)}function z(a){return"("!=a?o():p(t(")"),x,v(")"),u)}function A(a,b){if(Ma.state.fatArrowAt==Ma.stream.start){var c=b?I:H;if("("==a)return p(r,t(")"),R(_,")"),u,v("=>"),c,s);if("variable"==a)return o(r,_,v("=>"),c,s)}var d=b?E:D;return La.hasOwnProperty(a)?p(d):"function"==a?p(ja,d):"class"==a?p(t("form"),la,u):"keyword c"==a||"async"==a?p(b?C:B):"("==a?p(t(")"),B,v(")"),u,d):"operator"==a||"spread"==a?p(b?y:x):"["==a?p(t("]"),xa,u,d):"{"==a?S(O,"}",null,d):"quasi"==a?o(F,d):"new"==a?p(J(b)):p()}function B(a){return a.match(/[;\}\)\],]/)?o():o(x)}function C(a){return a.match(/[;\}\)\],]/)?o():o(y)}function D(a,b){return","==a?p(x):E(a,b,!1)}function E(a,b,c){var d=0==c?D:E,e=0==c?x:y;return"=>"==a?p(r,c?I:H,s):"operator"==a?/\+\+|--/.test(b)?p(d):"?"==b?p(x,v(":"),e):p(e):"quasi"==a?o(F,d):";"!=a?"("==a?S(y,")","call",d):"."==a?p(N,d):"["==a?p(t("]"),B,v("]"),u,d):void 0:void 0}function F(a,b){return"quasi"!=a?o():"${"!=b.slice(b.length-2)?p(F):p(x,G)}function G(a){if("}"==a)return Ma.marked="string-2",Ma.state.tokenize=j,p(F)}function H(a){return k(Ma.stream,Ma.state),o("{"==a?w:x)}function I(a){return k(Ma.stream,Ma.state),o("{"==a?w:y)}function J(a){return function(b){return"."==b?p(a?L:K):o(a?y:x)}}function K(a,b){if("target"==b)return Ma.marked="keyword",p(D)}function L(a,b){if("target"==b)return Ma.marked="keyword",p(E)}function M(a){return":"==a?p(u,w):o(D,v(";"),u)}function N(a){if("variable"==a)return Ma.marked="property",p()}function O(a,b){return"async"==a?(Ma.marked="property",p(O)):"variable"==a||"keyword"==Ma.style?(Ma.marked="property",p("get"==b||"set"==b?P:Q)):"number"==a||"string"==a?(Ma.marked=Da?"property":Ma.style+" property",p(Q)):"jsonld-keyword"==a?p(Q):"modifier"==a?p(O):"["==a?p(x,v("]"),Q):"spread"==a?p(x):":"==a?o(Q):void 0}function P(a){return"variable"!=a?o(Q):(Ma.marked="property",p(ja))}function Q(a){return":"==a?p(y):"("==a?o(ja):void 0}function R(a,b,c){function d(e,f){if(c?c.indexOf(e)>-1:","==e){var g=Ma.state.lexical;return"call"==g.info&&(g.pos=(g.pos||0)+1),p(function(c,d){return c==b||d==b?o():o(a)},d)}return e==b||f==b?p():p(v(b))}return function(c,e){return c==b||e==b?p():o(a,d)}}function S(a,b,c){for(var d=3;d"==a)return p(V)}function X(a,b){return"variable"==a||"keyword"==Ma.style?(Ma.marked="property",p(X)):"?"==b?p(X):":"==a?p(V):"["==a?p(x,U,v("]"),X):void 0}function Y(a){return"variable"==a?p(Y):":"==a?p(V):void 0}function Z(a,b){return"<"==b?p(t(">"),R(V,">"),u,Z):"|"==b||"."==a?p(V):"["==a?p(v("]"),Z):"extends"==b?p(V):void 0}function $(){return o(_,U,ba,ca)}function _(a,b){return"modifier"==a?p(_):"variable"==a?(q(b),p()):"spread"==a?p(_):"["==a?S(_,"]"):"{"==a?S(aa,"}"):void 0}function aa(a,b){return"variable"!=a||Ma.stream.match(/^\s*:/,!1)?("variable"==a&&(Ma.marked="property"),"spread"==a?p(_):"}"==a?o():p(v(":"),_,ba)):(q(b),p(ba))}function ba(a,b){if("="==b)return p(y)}function ca(a){if(","==a)return p($)}function da(a,b){if("keyword b"==a&&"else"==b)return p(t("form","else"),w,u)}function ea(a){if("("==a)return p(t(")"),fa,v(")"),u)}function fa(a){return"var"==a?p($,v(";"),ha):";"==a?p(ha):"variable"==a?p(ga):o(x,v(";"),ha)}function ga(a,b){return"in"==b||"of"==b?(Ma.marked="keyword",p(x)):p(D,ha)}function ha(a,b){return";"==a?p(ia):"in"==b||"of"==b?(Ma.marked="keyword",p(x)):o(x,v(";"),ia)}function ia(a){")"!=a&&p(x)}function ja(a,b){return"*"==b?(Ma.marked="keyword",p(ja)):"variable"==a?(q(b),p(ja)):"("==a?p(r,t(")"),R(ka,")"),u,U,w,s):Fa&&"<"==b?p(t(">"),R(V,">"),u,ja):void 0}function ka(a){return"spread"==a?p(ka):o(_,U,ba)}function la(a,b){return"variable"==a?ma(a,b):na(a,b)}function ma(a,b){if("variable"==a)return q(b),p(na)}function na(a,b){return"<"==b?p(t(">"),R(V,">"),u,na):"extends"==b||"implements"==b||Fa&&","==a?p(Fa?V:x,na):"{"==a?p(t("}"),oa,u):void 0}function oa(a,b){return"variable"==a||"keyword"==Ma.style?("async"==b||"static"==b||"get"==b||"set"==b||Fa&&("public"==b||"private"==b||"protected"==b||"readonly"==b||"abstract"==b))&&Ma.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Ma.marked="keyword",p(oa)):(Ma.marked="property",p(Fa?pa:ja,oa)):"["==a?p(x,v("]"),Fa?pa:ja,oa):"*"==b?(Ma.marked="keyword",p(oa)):";"==a?p(oa):"}"==a?p():"@"==b?p(x,oa):void 0}function pa(a,b){return"?"==b?p(pa):":"==a?p(V,ba):"="==b?p(y):o(ja)}function qa(a,b){return"*"==b?(Ma.marked="keyword",p(wa,v(";"))):"default"==b?(Ma.marked="keyword",p(x,v(";"))):"{"==a?p(R(ra,"}"),wa,v(";")):o(w)}function ra(a,b){return"as"==b?(Ma.marked="keyword",p(v("variable"))):"variable"==a?o(y,ra):void 0}function sa(a){return"string"==a?p():o(ta,ua,wa)}function ta(a,b){return"{"==a?S(ta,"}"):("variable"==a&&q(b),"*"==b&&(Ma.marked="keyword"),p(va))}function ua(a){if(","==a)return p(ta,ua)}function va(a,b){if("as"==b)return Ma.marked="keyword",p(ta)}function wa(a,b){if("from"==b)return Ma.marked="keyword",p(x)}function xa(a){return"]"==a?p():o(R(y,"]"))}function ya(a,b){return"operator"==a.lastType||","==a.lastType||Ia.test(b.charAt(0))||/[,.]/.test(b.charAt(0))}var za,Aa,Ba=c.indentUnit,Ca=d.statementIndent,Da=d.jsonld,Ea=d.json||Da,Fa=d.typescript,Ga=d.wordCharacters||/[\w$\xa1-\uffff]/,Ha=function(){function a(a){return{type:a,style:"keyword"}}var b=a("keyword a"),c=a("keyword b"),d=a("keyword c"),e=a("operator"),f={type:"atom",style:"atom"},g={if:a("if"),while:b,with:b,else:c,do:c,try:c,finally:c,return:d,break:d,continue:d,new:a("new"),delete:d,throw:d,debugger:d,var:a("var"),const:a("var"),let:a("var"),function:a("function"),catch:a("catch"),for:a("for"),switch:a("switch"),case:a("case"),default:a("default"),in:e,typeof:e,instanceof:e,true:f,false:f,null:f,undefined:f,NaN:f,Infinity:f,this:a("this"),class:a("class"),super:a("atom"),yield:d,export:a("export"),import:a("import"),extends:d,await:d,async:a("async")};if(Fa){var h={type:"variable",style:"variable-3"},i={interface:a("class"),implements:d,namespace:d,module:a("module"),enum:a("module"),public:a("modifier"),private:a("modifier"),protected:a("modifier"),abstract:a("modifier"),as:e,string:h,number:h,boolean:h,any:h};for(var j in i)g[j]=i[j]}return g}(),Ia=/[+\-*&%=<>!?|~^@]/,Ja=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ka="([{}])",La={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Ma={state:null,column:null,marked:null,cc:null},Na={name:"this",next:{name:"arguments"}};return u.lex=!0,{startState:function(a){var b={tokenize:g,lastType:"sof",cc:[],lexical:new l((a||0)-Ba,0,"block",!1),localVars:d.localVars,context:d.localVars&&{vars:d.localVars},indented:a||0};return d.globalVars&&"object"==typeof d.globalVars&&(b.globalVars=d.globalVars),b},token:function(a,b){if(a.sol()&&(b.lexical.hasOwnProperty("align")||(b.lexical.align=!1),b.indented=a.indentation(),k(a,b)),b.tokenize!=i&&a.eatSpace())return null;var c=b.tokenize(a,b);return"comment"==za?c:(b.lastType="operator"!=za||"++"!=Aa&&"--"!=Aa?za:"incdec",n(b,c,za,Aa,a))},indent:function(b,c){if(b.tokenize==i)return a.Pass;if(b.tokenize!=g)return 0;var e,f=c&&c.charAt(0),h=b.lexical;if(!/^\s*else\b/.test(c))for(var j=b.cc.length-1;j>=0;--j){var k=b.cc[j];if(k==u)h=h.prev;else if(k!=da)break}for(;("stat"==h.type||"form"==h.type)&&("}"==f||(e=b.cc[b.cc.length-1])&&(e==D||e==E)&&!/^[,\.=+\-*:?[\(]/.test(c));)h=h.prev;Ca&&")"==h.type&&"stat"==h.prev.type&&(h=h.prev);var l=h.type,m=f==l;return"vardef"==l?h.indented+("operator"==b.lastType||","==b.lastType?h.info+1:0):"form"==l&&"{"==f?h.indented:"form"==l?h.indented+Ba:"stat"==l?h.indented+(ya(b,c)?Ca||Ba:0):"switch"!=h.info||m||0==d.doubleIndentSwitch?h.align?h.column+(m?0:1):h.indented+(m?0:Ba):h.indented+(/^(?:case|default)\b/.test(c)?Ba:2*Ba)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Ea?null:"/*",blockCommentEnd:Ea?null:"*/",lineComment:Ea?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Ea?"json":"javascript",jsonldMode:Da,jsonMode:Ea,expressionAllowed:b,skipExpression:function(a){var b=a.cc[a.cc.length-1];b!=x&&b!=y||a.cc.pop()}}}),a.registerHelper("wordChars","javascript",/[\w$]/),a.defineMIME("text/javascript","javascript"),a.defineMIME("text/ecmascript","javascript"),a.defineMIME("application/javascript","javascript"),a.defineMIME("application/x-javascript","javascript"),a.defineMIME("application/ecmascript","javascript"),a.defineMIME("application/json",{name:"javascript",json:!0}),a.defineMIME("application/x-json",{name:"javascript",json:!0}),a.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),a.defineMIME("text/typescript",{name:"javascript",typescript:!0}),a.defineMIME("application/typescript",{name:"javascript",typescript:!0})}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/jinja2/jinja2.js b/media/vendor/codemirror/mode/jinja2/jinja2.js index ed195581cfb3d..5d57d134488f7 100644 --- a/media/vendor/codemirror/mode/jinja2/jinja2.js +++ b/media/vendor/codemirror/mode/jinja2/jinja2.js @@ -107,7 +107,7 @@ } return "variable"; } else if (stream.eat("{")) { - if (ch = stream.eat("#")) { + if (stream.eat("#")) { state.incomment = true; if(!stream.skipTo("#}")) { stream.skipToEnd(); diff --git a/media/vendor/codemirror/mode/jinja2/jinja2.min.js b/media/vendor/codemirror/mode/jinja2/jinja2.min.js index 0e2246150806e..35d33f0de4465 100644 --- a/media/vendor/codemirror/mode/jinja2/jinja2.min.js +++ b/media/vendor/codemirror/mode/jinja2/jinja2.min.js @@ -1 +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";e.defineMode("jinja2",function(){function e(e,a){var c=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 c==a.instring&&(a.instring=!1),e.next(),"string";if("'"==c||'"'==c)return a.instring=c,e.next(),"string";if(e.match(a.intag+"}")||e.eat("-")&&e.match(a.intag+"}"))return a.intag=!1,"tag";if(e.match(t))return a.operator=!0,"operator";if(e.match(r))a.sign=!0;else if(e.eat(" ")||e.sol()){if(e.match(n))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(c=e.eat("#"))return a.incomment=!0,e.skipTo("#}")?(e.eatWhile(/\#|}/),a.incomment=!1):e.skipToEnd(),"comment";if(c=e.eat(/\{|%/))return a.intag=c,"{"==c&&(a.intag="}"),e.eat("-"),"tag"}e.next()}var n=["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"],t=/^[+\-*&%=<>!?|~^]/,r=/^[:\[\(\{]/,i=["true","false"],o=/^(\d[+\-\*\/])?\d+(\.\d+)?/;return n=new RegExp("(("+n.join(")|(")+"))\\b"),i=new RegExp("(("+i.join(")|(")+"))\\b"),{startState:function(){return{tokenize:e}},token:function(e,n){return n.tokenize(e,n)}}})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("jinja2",function(){function a(a,g){var h=a.peek();if(g.incomment)return a.skipTo("#}")?(a.eatWhile(/\#|}/),g.incomment=!1):a.skipToEnd(),"comment";if(g.intag){if(g.operator){if(g.operator=!1,a.match(e))return"atom";if(a.match(f))return"number"}if(g.sign){if(g.sign=!1,a.match(e))return"atom";if(a.match(f))return"number"}if(g.instring)return h==g.instring&&(g.instring=!1),a.next(),"string";if("'"==h||'"'==h)return g.instring=h,a.next(),"string";if(a.match(g.intag+"}")||a.eat("-")&&a.match(g.intag+"}"))return g.intag=!1,"tag";if(a.match(c))return g.operator=!0,"operator";if(a.match(d))g.sign=!0;else if(a.eat(" ")||a.sol()){if(a.match(b))return"keyword";if(a.match(e))return"atom";if(a.match(f))return"number";a.sol()&&a.next()}else a.next();return"variable"}if(a.eat("{")){if(a.eat("#"))return g.incomment=!0,a.skipTo("#}")?(a.eatWhile(/\#|}/),g.incomment=!1):a.skipToEnd(),"comment";if(h=a.eat(/\{|%/))return g.intag=h,"{"==h&&(g.intag="}"),a.eat("-"),"tag"}a.next()}var b=["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"],c=/^[+\-*&%=<>!?|~^]/,d=/^[:\[\(\{]/,e=["true","false"],f=/^(\d[+\-\*\/])?\d+(\.\d+)?/;return b=new RegExp("(("+b.join(")|(")+"))\\b"),e=new RegExp("(("+e.join(")|(")+"))\\b"),{startState:function(){return{tokenize:a}},token:function(a,b){return b.tokenize(a,b)}}})}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/jsx/jsx.min.js b/media/vendor/codemirror/mode/jsx/jsx.min.js index 41da4e704013e..5c440027b6af2 100644 --- a/media/vendor/codemirror/mode/jsx/jsx.min.js +++ b/media/vendor/codemirror/mode/jsx/jsx.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript"],t):t(CodeMirror)}(function(t){"use strict";function e(t,e,n,r){this.state=t,this.mode=e,this.depth=n,this.prev=r}function n(r){return new e(t.copyState(r.mode,r.state),r.mode,r.depth,r.prev&&n(r.prev))}t.defineMode("jsx",function(r,i){function a(t){var e=t.tagName;t.tagName=null;var n=p.indent(t,"");return t.tagName=e,n}function o(t,e){return e.context.mode==p?s(t,e,e.context):c(t,e,e.context)}function s(n,i,s){if(2==s.depth)return n.match(/^.*?\*\//)?s.depth=1:n.skipToEnd(),"comment";if("{"==n.peek()){p.skipAttribute(s.state);var c=a(s.state),u=s.state.context;if(u&&n.match(/^[^>]*>\s*$/,!1)){for(;u.prev&&!u.startOfLine;)u=u.prev;u.startOfLine?c-=r.indentUnit:s.prev.state.lexical&&(c=s.prev.state.lexical.indented)}else 1==s.depth&&(c+=r.indentUnit);return i.context=new e(t.startState(d,c),d,0,i.context),null}if(1==s.depth){if("<"==n.peek())return p.skipAttribute(s.state),i.context=new e(t.startState(p,a(s.state)),p,0,i.context),null;if(n.match("//"))return n.skipToEnd(),"comment";if(n.match("/*"))return s.depth=2,o(n,i)}var x,f=p.token(n,s.state),l=n.current();return/\btag\b/.test(f)?/>$/.test(l)?s.state.context?s.depth=0:i.context=i.context.prev:/^-1&&n.backUp(l.length-x),f}function c(n,r,i){if("<"==n.peek()&&d.expressionAllowed(n,i.state))return d.skipExpression(i.state),r.context=new e(t.startState(p,d.indent(i.state,"")),p,0,r.context),null;var a=d.token(n,i.state);if(!a&&null!=i.depth){var o=n.current();"{"==o?i.depth++:"}"==o&&0==--i.depth&&(r.context=r.context.prev)}return a}var p=t.getMode(r,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1}),d=t.getMode(r,i&&i.base||"javascript");return{startState:function(){return{context:new e(t.startState(d),d)}},copyState:function(t){return{context:n(t.context)}},token:o,indent:function(t,e,n){return t.context.mode.indent(t.context.state,e,n)},innerMode:function(t){return t.context}}},"xml","javascript"),t.defineMIME("text/jsx","jsx"),t.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,c,d){this.state=a,this.mode=b,this.depth=c,this.prev=d}function c(d){return new b(a.copyState(d.mode,d.state),d.mode,d.depth,d.prev&&c(d.prev))}a.defineMode("jsx",function(d,e){function f(a){var b=a.tagName;a.tagName=null;var c=j.indent(a,"");return a.tagName=b,c}function g(a,b){return b.context.mode==j?h(a,b,b.context):i(a,b,b.context)}function h(c,e,h){if(2==h.depth)return c.match(/^.*?\*\//)?h.depth=1:c.skipToEnd(),"comment";if("{"==c.peek()){j.skipAttribute(h.state);var i=f(h.state),l=h.state.context;if(l&&c.match(/^[^>]*>\s*$/,!1)){for(;l.prev&&!l.startOfLine;)l=l.prev;l.startOfLine?i-=d.indentUnit:h.prev.state.lexical&&(i=h.prev.state.lexical.indented)}else 1==h.depth&&(i+=d.indentUnit);return e.context=new b(a.startState(k,i),k,0,e.context),null}if(1==h.depth){if("<"==c.peek())return j.skipAttribute(h.state),e.context=new b(a.startState(j,f(h.state)),j,0,e.context),null;if(c.match("//"))return c.skipToEnd(),"comment";if(c.match("/*"))return h.depth=2,g(c,e)}var m,n=j.token(c,h.state),o=c.current();return/\btag\b/.test(n)?/>$/.test(o)?h.state.context?h.depth=0:e.context=e.context.prev:/^-1&&c.backUp(o.length-m),n}function i(c,d,e){if("<"==c.peek()&&k.expressionAllowed(c,e.state))return k.skipExpression(e.state),d.context=new b(a.startState(j,k.indent(e.state,"")),j,0,d.context),null;var f=k.token(c,e.state);if(!f&&null!=e.depth){var g=c.current();"{"==g?e.depth++:"}"==g&&0==--e.depth&&(d.context=d.context.prev)}return f}var j=a.getMode(d,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1}),k=a.getMode(d,e&&e.base||"javascript");return{startState:function(){return{context:new b(a.startState(k),k)}},copyState:function(a){return{context:c(a.context)}},token:g,indent:function(a,b,c){return a.context.mode.indent(a.context.state,b,c)},innerMode:function(a){return a.context}}},"xml","javascript"),a.defineMIME("text/jsx","jsx"),a.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/julia/julia.js b/media/vendor/codemirror/mode/julia/julia.js index ad11d6b945702..a8b114a7239ad 100644 --- a/media/vendor/codemirror/mode/julia/julia.js +++ b/media/vendor/codemirror/mode/julia/julia.js @@ -288,7 +288,7 @@ CodeMirror.defineMode("julia", function(config, parserConf) { state.nestedLevels--; } if (state.nestedLevels > 0) { - stream.match(/.*?(?={|})/); + stream.match(/.*?(?={|})/) || stream.next(); } else if (state.nestedLevels == 0) { state.tokenize = tokenBase; } diff --git a/media/vendor/codemirror/mode/julia/julia.min.js b/media/vendor/codemirror/mode/julia/julia.min.js index e3d91f9fce9c2..0ac103361250f 100644 --- a/media/vendor/codemirror/mode/julia/julia.min.js +++ b/media/vendor/codemirror/mode/julia/julia.min.js @@ -1 +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";e.defineMode("julia",function(e,t){function n(e,t){return void 0===t&&(t="\\b"),new RegExp("^(("+e.join(")|(")+"))"+t)}function r(e){return i(e,"[")}function i(e,t){var n=a(e),r=a(e,1);return void 0===t&&(t="("),n===t||r===t&&"for"===n}function a(e,t){return void 0===t&&(t=0),e.scopes.length<=t?null:e.scopes[e.scopes.length-(t+1)]}function o(e,t){if(e.match(/^#=/,!1))return t.tokenize=u,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 o=e.peek();if("#"===o)return e.skipToEnd(),"comment";"["===o&&t.scopes.push("["),"("===o&&t.scopes.push("(");var d=a(t);r(t)&&"]"===o&&("for"===d&&t.scopes.pop(),t.scopes.pop(),t.leavingExpr=!0),i(t)&&")"===o&&("for"===d&&t.scopes.pop(),t.scopes.pop(),t.leavingExpr=!0);var z;if((z=e.match(v,!1))&&t.scopes.push(z[0]),e.match(b,!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=s,t.tokenize(e,t);if(!n&&e.match(x)||e.match(/:\./))return"builtin";if(e.match(/^{[^}]*}(?=\()/))return"builtin";if(e.match(m))return"operator";if(e.match(/^[0-9\.]/,!1)){var E=RegExp(/^im\b/),y=!1;if(e.match(/^\d*\.(?!\.)\d*([Eef][\+\-]?\d+)?/i)&&(y=!0),e.match(/^\d+\.(?!\.)\d*/)&&(y=!0),e.match(/^\.\d+/)&&(y=!0),e.match(/^0x\.[0-9a-f]+p[\+\-]?\d+/i)&&(y=!0),e.match(/^0x[0-9a-f]+/i)&&(y=!0),e.match(/^0b[01]+/i)&&(y=!0),e.match(/^0o[0-7]+/i)&&(y=!0),e.match(/^[1-9]\d*(e[\+\-]?\d+)?/)&&(y=!0),e.match(/^0(?![\dx])/i)&&(y=!0),y)return e.match(E),t.leavingExpr=!0,"number"}if(e.match(/^'/))return t.tokenize=l,t.tokenize(e,t);if(e.match(A))return t.tokenize=f(e.current()),t.tokenize(e,t);if(e.match(g))return"meta";if(e.match(h))return null;if(e.match(k))return"keyword";if(e.match(F))return"builtin";var P=t.isDefinition||"function"==t.lastToken||"macro"==t.lastToken||"type"==t.lastToken||"immutable"==t.lastToken;return e.match(p)?P?"."===e.peek()?(t.isDefinition=!0,"variable"):(t.isDefinition=!1,"def"):e.match(/^({[^}]*})*\(/,!1)?c(e,t):(t.leavingExpr=!0,"variable"):(e.next(),"error")}function c(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),"("==a(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,c(e,t)}function s(e,t){return e.match(/.*?(?=,|;|{|}|\(|\)|=|$|\s)/),e.match(/^{/)?t.nestedLevels++:e.match(/^}/)&&t.nestedLevels--,t.nestedLevels>0?e.match(/.*?(?={|})/):0==t.nestedLevels&&(t.tokenize=o),"builtin"}function u(e,t){return e.match(/^#=/)&&t.nestedLevels++,e.match(/.*?(?=(#=|=#))/)||e.skipToEnd(),e.match(/^=#/)&&0==--t.nestedLevels&&(t.tokenize=o),"comment"}function l(e,t){var n,r=!1;if(e.match(d))r=!0;else if(n=e.match(/\\u([a-f0-9]{1,4})(?=')/i))((i=parseInt(n[1],16))<=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=o,"string"):(e.match(/^[^']+(?=')/)||e.skipToEnd(),e.match(/^'/)&&(t.tokenize=o),"error")}function f(e){function t(t,n){if(t.eat("\\"))t.next();else{if(t.match(e))return n.tokenize=o,n.leavingExpr=!0,"string";t.eat(/[`"]/)}return t.eatWhile(/[^\\`"]/),"string"}return'"""'===e.substr(-3)?e='"""':'"'===e.substr(-1)&&(e='"'),t}var m=t.operators||n(["\\.?[\\\\%*+\\-<>!=\\/^]=?","\\.?[|&\\u00F7\\u2260\\u2264\\u2265]","\\u00D7","\\u2208","\\u2209","\\u220B","\\u220C","\\u2229","\\u222A","\\u2286","\\u2288","\\u228A","\\u22c5","\\?","~",":","\\$","\\.[<>]","<<=?",">>>?=?","\\.[<>=]=","->?","\\/\\/","=>","<:","\\bin\\b(?!\\()"],""),h=t.delimiters||/^[;,()[\]{}]/,p=t.identifiers||/^[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,d=n(["\\\\[0-7]{1,3}","\\\\x[A-Fa-f0-9]{1,2}","\\\\[abefnrtv0%?'\"\\\\]","([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])"],"'"),v=n(["begin","function","type","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"]),b=n(["end","else","elseif","catch","finally"]),k=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"]),F=n(["true","false","nothing","NaN","Inf"]),g=/^@[_A-Za-z][\w]*/,x=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,A=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/;return{startState:function(){return{tokenize:o,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(p,!1)||e.match(g,!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"}}),e.defineMIME("text/x-julia","julia")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("julia",function(a,b){function c(a,b){return void 0===b&&(b="\\b"),new RegExp("^(("+a.join(")|(")+"))"+b)}function d(a){return e(a,"[")}function e(a,b){var c=f(a),d=f(a,1);return void 0===b&&(b="("),c===b||d===b&&"for"===c}function f(a,b){return void 0===b&&(b=0),a.scopes.length<=b?null:a.scopes[a.scopes.length-(b+1)]}function g(a,b){if(a.match(/^#=/,!1))return b.tokenize=j,b.tokenize(a,b);var c=b.leavingExpr;if(a.sol()&&(c=!1),b.leavingExpr=!1,c&&a.match(/^'+/))return"operator";if(a.match(/^\.{2,3}/))return"operator";if(a.eatSpace())return null;var g=a.peek();if("#"===g)return a.skipToEnd(),"comment";"["===g&&b.scopes.push("["),"("===g&&b.scopes.push("(");var p=f(b);d(b)&&"]"===g&&("for"===p&&b.scopes.pop(),b.scopes.pop(),b.leavingExpr=!0),e(b)&&")"===g&&("for"===p&&b.scopes.pop(),b.scopes.pop(),b.leavingExpr=!0);var x;if((x=a.match(q,!1))&&b.scopes.push(x[0]),a.match(r,!1)&&b.scopes.pop(),d(b)){if("end"==b.lastToken&&a.match(/^:/))return"operator";if(a.match(/^end/))return"number"}if(a.match(/^::(?![:\$])/))return b.tokenize=i,b.tokenize(a,b);if(!c&&a.match(v)||a.match(/:\./))return"builtin";if(a.match(/^{[^}]*}(?=\()/))return"builtin";if(a.match(m))return"operator";if(a.match(/^[0-9\.]/,!1)){var y=RegExp(/^im\b/),z=!1;if(a.match(/^\d*\.(?!\.)\d*([Eef][\+\-]?\d+)?/i)&&(z=!0),a.match(/^\d+\.(?!\.)\d*/)&&(z=!0),a.match(/^\.\d+/)&&(z=!0),a.match(/^0x\.[0-9a-f]+p[\+\-]?\d+/i)&&(z=!0),a.match(/^0x[0-9a-f]+/i)&&(z=!0),a.match(/^0b[01]+/i)&&(z=!0),a.match(/^0o[0-7]+/i)&&(z=!0),a.match(/^[1-9]\d*(e[\+\-]?\d+)?/)&&(z=!0),a.match(/^0(?![\dx])/i)&&(z=!0),z)return a.match(y),b.leavingExpr=!0,"number"}if(a.match(/^'/))return b.tokenize=k,b.tokenize(a,b);if(a.match(w))return b.tokenize=l(a.current()),b.tokenize(a,b);if(a.match(u))return"meta";if(a.match(n))return null;if(a.match(s))return"keyword";if(a.match(t))return"builtin";var A=b.isDefinition||"function"==b.lastToken||"macro"==b.lastToken||"type"==b.lastToken||"immutable"==b.lastToken;return a.match(o)?A?"."===a.peek()?(b.isDefinition=!0,"variable"):(b.isDefinition=!1,"def"):a.match(/^({[^}]*})*\(/,!1)?h(a,b):(b.leavingExpr=!0,"variable"):(a.next(),"error")}function h(a,b){var c=a.match(/^(\(\s*)/);if(c&&(b.firstParenPos<0&&(b.firstParenPos=b.scopes.length),b.scopes.push("("),b.charsAdvanced+=c[1].length),"("==f(b)&&a.match(/^\)/)&&(b.scopes.pop(),b.charsAdvanced+=1,b.scopes.length<=b.firstParenPos)){var d=a.match(/^\s*?=(?!=)/,!1);return a.backUp(b.charsAdvanced),b.firstParenPos=-1,b.charsAdvanced=0,d?"def":"builtin"}if(a.match(/^$/g,!1)){for(a.backUp(b.charsAdvanced);b.scopes.length>b.firstParenPos;)b.scopes.pop();return b.firstParenPos=-1,b.charsAdvanced=0,"builtin"}return b.charsAdvanced+=a.match(/^([^()]*)/)[1].length,h(a,b)}function i(a,b){return a.match(/.*?(?=,|;|{|}|\(|\)|=|$|\s)/),a.match(/^{/)?b.nestedLevels++:a.match(/^}/)&&b.nestedLevels--,b.nestedLevels>0?a.match(/.*?(?={|})/)||a.next():0==b.nestedLevels&&(b.tokenize=g),"builtin"}function j(a,b){return a.match(/^#=/)&&b.nestedLevels++,a.match(/.*?(?=(#=|=#))/)||a.skipToEnd(),a.match(/^=#/)&&0==--b.nestedLevels&&(b.tokenize=g),"comment"}function k(a,b){var c,d=!1;if(a.match(p))d=!0;else if(c=a.match(/\\u([a-f0-9]{1,4})(?=')/i)){var e=parseInt(c[1],16);(e<=55295||e>=57344)&&(d=!0,a.next())}else if(c=a.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var e=parseInt(c[1],16);e<=1114111&&(d=!0,a.next())}return d?(b.leavingExpr=!0,b.tokenize=g,"string"):(a.match(/^[^']+(?=')/)||a.skipToEnd(),a.match(/^'/)&&(b.tokenize=g),"error")}function l(a){function b(b,c){if(b.eat("\\"))b.next();else{if(b.match(a))return c.tokenize=g,c.leavingExpr=!0,"string";b.eat(/[`"]/)}return b.eatWhile(/[^\\`"]/),"string"}return'"""'===a.substr(-3)?a='"""':'"'===a.substr(-1)&&(a='"'),b}var m=b.operators||c(["\\.?[\\\\%*+\\-<>!=\\/^]=?","\\.?[|&\\u00F7\\u2260\\u2264\\u2265]","\\u00D7","\\u2208","\\u2209","\\u220B","\\u220C","\\u2229","\\u222A","\\u2286","\\u2288","\\u228A","\\u22c5","\\?","~",":","\\$","\\.[<>]","<<=?",">>>?=?","\\.[<>=]=","->?","\\/\\/","=>","<:","\\bin\\b(?!\\()"],""),n=b.delimiters||/^[;,()[\]{}]/,o=b.identifiers||/^[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,p=c(["\\\\[0-7]{1,3}","\\\\x[A-Fa-f0-9]{1,2}","\\\\[abefnrtv0%?'\"\\\\]","([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])"],"'"),q=c(["begin","function","type","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"]),r=c(["end","else","elseif","catch","finally"]),s=c(["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"]),t=c(["true","false","nothing","NaN","Inf"]),u=/^@[_A-Za-z][\w]*/,v=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,w=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/;return{startState:function(){return{tokenize:g,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedLevels:0,charsAdvanced:0,firstParenPos:-1}},token:function(a,b){var c=b.tokenize(a,b),d=a.current();return d&&c&&(b.lastToken=d),"."===d&&(c=a.match(o,!1)||a.match(u,!1)||a.match(/\(/,!1)?"operator":"error"),c},indent:function(b,c){var d=0;return"]"!==c&&")"!==c&&"end"!==c&&"else"!==c&&"catch"!==c&&"elseif"!==c&&"finally"!==c||(d=-1),(b.scopes.length+d)*a.indentUnit},electricInput:/\b(end|else|catch|finally)\b/,blockCommentStart:"#=",blockCommentEnd:"=#",lineComment:"#",fold:"indent"}}),a.defineMIME("text/x-julia","julia")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/livescript/livescript.min.js b/media/vendor/codemirror/mode/livescript/livescript.min.js index a3c0bdbd8cd9e..b4b7757af97eb 100644 --- a/media/vendor/codemirror/mode/livescript/livescript.min.js +++ b/media/vendor/codemirror/mode/livescript/livescript.min.js @@ -1 +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";e.defineMode("livescript",function(){var e=function(e,t){var r=t.next||"start";if(r){t.next=t.next;var n=g[r];if(n.splice){for(var o=0;o|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*"+t+")?))\\s*$"),n="(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))",o={token:"string",regex:".+"},g={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)"+n},{token:"constant.language",regex:"(?:true|false|yes|no|on|off|null|void|undefined)"+n},{token:"invalid.illegal",regex:"(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)"+n},{token:"language.support.class",regex:"(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)"+n},{token:"language.support.function",regex:"(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)"+n},{token:"variable.language",regex:"(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)"+n},{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"},o],qqdoc:[{token:"string",regex:'.*?"""',next:"key"},o],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",next:"key"},o],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',next:"key"},o],js:[{token:"string",regex:"[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",next:"key"},o],words:[{token:"string",regex:".*?\\]>",next:"key"},o]};for(var x in g){var i=g[x];if(i.splice)for(var a=0,s=i.length;a|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*"+b+")?))\\s*$"),d="(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))",e={token:"string",regex:".+"},f={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)"+d},{token:"constant.language",regex:"(?:true|false|yes|no|on|off|null|void|undefined)"+d},{token:"invalid.illegal",regex:"(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)"+d},{token:"language.support.class",regex:"(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)"+d},{token:"language.support.function",regex:"(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)"+d},{token:"variable.language",regex:"(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)"+d},{token:"identifier",regex:b+"\\s*:(?![:=])"},{token:"variable",regex:b},{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:b,next:"start"},{token:"text",regex:"",next:"start"}],comment:[{token:"comment.doc",regex:".*?\\*/",next:"start"},{token:"comment.doc",regex:".+"}],qdoc:[{token:"string",regex:".*?'''",next:"key"},e],qqdoc:[{token:"string",regex:'.*?"""',next:"key"},e],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",next:"key"},e],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',next:"key"},e],js:[{token:"string",regex:"[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",next:"key"},e],words:[{token:"string",regex:".*?\\]>",next:"key"},e]};for(var g in f){var h=f[g];if(h.splice)for(var i=0,j=h.length;i=0?(a.indentationDiff<4&&(a.indentation-=a.indentationDiff),a.list=null):a.indentation>0?a.list=null:a.list=!1);var m=null;if(a.indentationDiff>=4)return e.skipToEnd(),g||l(a.prevLine)?(a.indentation-=4,a.indentedCode=!0,T.code):null;if(e.eatSpace())return null;if((m=e.match(C))&&m[1].length<=6)return a.header=m[1].length,i.highlightFormatting&&(a.formatting="header"),a.f=a.inline,u(a);if(!(l(a.prevLine)||a.quote||h||g)&&(m=e.match(w)))return a.header="="==m[0].charAt(0)?1:2,i.highlightFormatting&&(a.formatting="header"),a.f=a.inline,u(a);if(e.eat(">"))return a.quote=o?1:a.quote+1,i.highlightFormatting&&(a.formatting="quote"),e.eatSpace(),u(a);if("["===e.peek())return r(e,a,p);if(e.match(M,!0))return a.hr=!0,T.hr;if(m=e.match(F)){var f=m[1]?"ol":"ul";for(a.indentation=e.column()+e.current().length,a.list=!0;a.listStack&&e.column()")>-1)&&(i.f=f,i.block=h,i.htmlState=null)}return n}function s(t,e){if(e.fencedChars&&t.match(e.fencedChars)){i.highlightFormatting&&(e.formatting="code-block");var n=u(e);return e.localMode=e.localState=null,e.block=h,e.f=f,e.fencedChars=null,e.code=0,n}return e.fencedChars&&t.skipTo(e.fencedChars)?"comment":e.localMode?e.localMode.token(t,e.localState):(t.skipToEnd(),T.code)}function u(t){var e=[];if(t.formatting){e.push(T.formatting),"string"==typeof t.formatting&&(t.formatting=[t.formatting]);for(var n=0;n=t.quote?e.push(T.formatting+"-"+t.formatting[n]+"-"+t.quote):e.push("error"))}if(t.taskOpen)return e.push("meta"),e.length?e.join(" "):null;if(t.taskClosed)return e.push("property"),e.length?e.join(" "):null;if(t.linkHref?e.push(T.linkHref,"url"):(t.strong&&e.push(T.strong),t.em&&e.push(T.em),t.strikethrough&&e.push(T.strikethrough),t.linkText&&e.push(T.linkText),t.code&&e.push(T.code),t.image&&e.push(T.image),t.imageAltText&&e.push(T.imageAltText,"link"),t.imageMarker&&e.push(T.imageMarker)),t.header&&e.push(T.header,T.header+"-"+t.header),t.quote&&(e.push(T.quote),!i.maxBlockquoteDepth||i.maxBlockquoteDepth>=t.quote?e.push(T.quote+"-"+t.quote):e.push(T.quote+"-"+i.maxBlockquoteDepth)),!1!==t.list){var r=(t.listStack.length-1)%3;r?1===r?e.push(T.list2):e.push(T.list3):e.push(T.list1)}return t.trailingSpaceNewLine?e.push("trailing-space-new-line"):t.trailingSpace&&e.push("trailing-space-"+(t.trailingSpace%2?"a":"b")),e.length?e.join(" "):null}function m(t,e){if(t.match(y,!0))return u(e)}function f(e,n){var r=n.text(e,n);if(void 0!==r)return r;if(n.list)return n.list=null,u(n);if(n.taskList)return"x"!==e.match(b,!0)[1]?n.taskOpen=!0:n.taskClosed=!0,i.highlightFormatting&&(n.formatting="task"),n.taskList=!1,u(n);if(n.taskOpen=!1,n.taskClosed=!1,n.header&&e.match(/^#+$/,!0))return i.highlightFormatting&&(n.formatting="header"),u(n);var l=e.next();if(n.linkTitle){n.linkTitle=!1;var o=l;"("===l&&(o=")");var h="^\\s*(?:[^"+(o=(o+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+o;if(e.match(new RegExp(h),!0))return T.linkHref}if("`"===l){var s=n.formatting;i.highlightFormatting&&(n.formatting="code"),e.eatWhile("`");var m=e.current().length;if(0==n.code)return n.code=m,u(n);if(m==n.code){y=u(n);return n.code=0,y}return n.formatting=s,u(n)}if(n.code)return u(n);if("\\"===l&&(e.next(),i.highlightFormatting)){var f=u(n),k=T.formatting+"-escape";return f?f+" "+k:k}if("!"===l&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return n.imageMarker=!0,n.image=!0,i.highlightFormatting&&(n.formatting="image"),u(n);if("["===l&&n.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return n.imageMarker=!1,n.imageAltText=!0,i.highlightFormatting&&(n.formatting="image"),u(n);if("]"===l&&n.imageAltText){i.highlightFormatting&&(n.formatting="image");f=u(n);return n.imageAltText=!1,n.image=!1,n.inline=n.f=d,f}if("["===l&&e.match(/[^\]]*\](\(.*\)| ?\[.*?\])/,!1)&&!n.image)return n.linkText=!0,i.highlightFormatting&&(n.formatting="link"),u(n);if("]"===l&&n.linkText&&e.match(/\(.*?\)| ?\[.*?\]/,!1)){i.highlightFormatting&&(n.formatting="link");f=u(n);return n.linkText=!1,n.inline=n.f=d,f}if("<"===l&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return n.f=n.inline=c,i.highlightFormatting&&(n.formatting="link"),(f=u(n))?f+=" ":f="",f+T.linkInline;if("<"===l&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return n.f=n.inline=c,i.highlightFormatting&&(n.formatting="link"),(f=u(n))?f+=" ":f="",f+T.linkEmail;if("<"===l&&e.match(/^(!--|[a-z]+(?:\s+[a-z_:.\-]+(?:\s*=\s*[^ >]+)?)*\s*>)/i,!1)){var p=e.string.indexOf(">",e.pos);if(-1!=p){var v=e.string.substring(e.start,p);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(v)&&(n.md_inside=!0)}return e.backUp(1),n.htmlState=t.startState(x),a(e,n,g)}if("<"===l&&e.match(/^\/\w*?>/))return n.md_inside=!1,"tag";if("*"===l||"_"===l){for(var S=1,L=1==e.pos?" ":e.string.charAt(e.pos-2);S<3&&e.eat(l);)S++;var q=e.peek()||" ",M=!/\s/.test(q)&&(!D.test(q)||/\s/.test(L)||D.test(L)),F=!/\s/.test(L)&&(!D.test(L)||/\s/.test(q)||D.test(q)),C=null,w=null;if(S%2&&(n.em||!M||"*"!==l&&F&&!D.test(L)?n.em!=l||!F||"*"!==l&&M&&!D.test(q)||(C=!1):C=!0),S>1&&(n.strong||!M||"*"!==l&&F&&!D.test(L)?n.strong!=l||!F||"*"!==l&&M&&!D.test(q)||(w=!1):w=!0),null!=w||null!=C){i.highlightFormatting&&(n.formatting=null==C?"strong":null==w?"em":"strong em"),!0===C&&(n.em=l),!0===w&&(n.strong=l);y=u(n);return!1===C&&(n.em=!1),!1===w&&(n.strong=!1),y}}else if(" "===l&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return u(n);e.backUp(1)}if(i.strikethrough)if("~"===l&&e.eatWhile(l)){if(n.strikethrough){i.highlightFormatting&&(n.formatting="strikethrough");var y=u(n);return n.strikethrough=!1,y}if(e.match(/^[^\s]/,!1))return n.strikethrough=!0,i.highlightFormatting&&(n.formatting="strikethrough"),u(n)}else if(" "===l&&e.match(/^~~/,!0)){if(" "===e.peek())return u(n);e.backUp(2)}return" "===l&&(e.match(/ +$/,!1)?n.trailingSpace++:n.trailingSpace&&(n.trailingSpaceNewLine=!0)),u(n)}function c(t,e){if(">"===t.next()){e.f=e.inline=f,i.highlightFormatting&&(e.formatting="link");var n=u(e);return n?n+=" ":n="",n+T.linkInline}return t.match(/^[^>]+/,!0),T.linkInline}function d(t,e){if(t.eatSpace())return null;var n=t.next();return"("===n||"["===n?(e.f=e.inline=k("("===n?")":"]"),i.highlightFormatting&&(e.formatting="link-string"),e.linkHref=!0,u(e)):"error"}function k(t){return function(e,n){if(e.next()===t){n.f=n.inline=f,i.highlightFormatting&&(n.formatting="link-string");var r=u(n);return n.linkHref=!1,r}return e.match(_[t]),n.linkHref=!0,u(n)}}function p(t,e){return t.match(/^([^\]\\]|\\.)*\]:/,!1)?(e.f=v,t.next(),i.highlightFormatting&&(e.formatting="link"),e.linkText=!0,u(e)):r(t,e,f)}function v(t,e){if(t.match(/^\]:/,!0)){e.f=e.inline=S,i.highlightFormatting&&(e.formatting="link");var n=u(e);return e.linkText=!1,n}return t.match(/^([^\]\\]|\\.)+/,!0),T.linkText}function S(t,e){return t.eatSpace()?null:(t.match(/^[^\s]+/,!0),void 0===t.peek()?e.linkTitle=!0:t.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),e.f=e.inline=f,T.linkHref+" url")}var x=t.getMode(e,"text/html"),L="null"==x.name;void 0===i.highlightFormatting&&(i.highlightFormatting=!1),void 0===i.maxBlockquoteDepth&&(i.maxBlockquoteDepth=0),void 0===i.taskLists&&(i.taskLists=!1),void 0===i.strikethrough&&(i.strikethrough=!1),void 0===i.tokenTypeOverrides&&(i.tokenTypeOverrides={});var T={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 q in T)T.hasOwnProperty(q)&&i.tokenTypeOverrides[q]&&(T[q]=i.tokenTypeOverrides[q]);var M=/^([*\-_])(?:\s*\1){2,}\s*$/,F=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,b=/^\[(x| )\](?=\s)/,C=i.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,w=/^ *(?:\={1,}|-{1,})\s*$/,y=/^[^#!\[\]*_\\<>` "'(~]+/,B=new RegExp("^("+(!0===i.fencedCodeBlocks?"~~~+|```+":i.fencedCodeBlocks)+")[ \\t]*([\\w+#-]*)"),D=/[!\"#$%&\'()*+,\-\.\/:;<=>?@\[\\\]^_`{|}~—]/,_={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\\]]|\\.)*\])*?(?=\])/},H={startState:function(){return{f:h,prevLine:null,thisLine:null,block:h,htmlState:null,indentation:0,inline:f,text:m,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(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&t.copyState(x,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?t.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkTitle:e.linkTitle,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,header:e.header,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedChars:e.fencedChars}},token:function(t,e){if(e.formatting=!1,t!=e.thisLine){var i=e.header||e.hr;if(e.header=0,e.hr=!1,t.match(/^\s*$/,!0)||i){if(o(e),!i)return null;e.prevLine=null}e.prevLine=e.thisLine,e.thisLine=t,e.taskList=!1,e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.f=e.block;var n=t.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(e.indentationDiff=Math.min(n-e.indentation,4),e.indentation=e.indentation+e.indentationDiff,n>0)return null}return e.f(t,e)},innerMode:function(t){return t.block==g?{state:t.htmlState,mode:x}:t.localState?{state:t.localState,mode:t.localMode}:{state:t,mode:H}},blankLine:o,getType:u,closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return H},"xml"),t.defineMIME("text/x-markdown","markdown")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../xml/xml"),require("../meta")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../meta"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("markdown",function(b,c){function d(c){if(a.findModeByName){var d=a.findModeByName(c);d&&(c=d.mime||d.mimes[0])}var e=a.getMode(b,c);return"null"==e.name?null:e}function e(a,b,c){return b.f=b.inline=c,c(a,b)}function f(a,b,c){return b.f=b.block=c,c(a,b)}function g(a){return!a||!/\S/.test(a.string)}function h(a){return a.linkTitle=!1,a.em=!1,a.strong=!1,a.strikethrough=!1,a.quote=0,a.indentedCode=!1,a.f==j&&(a.f=n,a.block=i),a.trailingSpace=0,a.trailingSpaceNewLine=!1,a.prevLine=a.thisLine,a.thisLine=null,null}function i(b,f){var h=b.sol(),i=f.list!==!1,j=f.indentedCode;f.indentedCode=!1,i&&(f.indentationDiff>=0?(f.indentationDiff<4&&(f.indentation-=f.indentationDiff),f.list=null):f.indentation>0?f.list=null:f.list=!1);var m=null;if(f.indentationDiff>=4)return b.skipToEnd(),j||g(f.prevLine)?(f.indentation-=4,f.indentedCode=!0,w.code):null;if(b.eatSpace())return null;if((m=b.match(B))&&m[1].length<=6)return f.header=m[1].length,c.highlightFormatting&&(f.formatting="header"),f.f=f.inline,l(f);if(!(g(f.prevLine)||f.quote||i||j)&&(m=b.match(C)))return f.header="="==m[0].charAt(0)?1:2,c.highlightFormatting&&(f.formatting="header"),f.f=f.inline,l(f);if(b.eat(">"))return f.quote=h?1:f.quote+1,c.highlightFormatting&&(f.formatting="quote"),b.eatSpace(),l(f);if("["===b.peek())return e(b,f,r);if(b.match(y,!0))return f.hr=!0,w.hr;if(m=b.match(z)){var n=m[1]?"ol":"ul";for(f.indentation=b.column()+b.current().length,f.list=!0;f.listStack&&b.column()")>-1)&&(c.f=n,c.block=i,c.htmlState=null)}return d}function k(a,b){if(b.fencedChars&&a.match(b.fencedChars)){c.highlightFormatting&&(b.formatting="code-block");var d=l(b);return b.localMode=b.localState=null,b.block=i,b.f=n,b.fencedChars=null,b.code=0,d}return b.fencedChars&&a.skipTo(b.fencedChars)?"comment":b.localMode?b.localMode.token(a,b.localState):(a.skipToEnd(),w.code)}function l(a){var b=[];if(a.formatting){b.push(w.formatting),"string"==typeof a.formatting&&(a.formatting=[a.formatting]);for(var d=0;d=a.quote?b.push(w.formatting+"-"+a.formatting[d]+"-"+a.quote):b.push("error"))}if(a.taskOpen)return b.push("meta"),b.length?b.join(" "):null;if(a.taskClosed)return b.push("property"),b.length?b.join(" "):null;if(a.linkHref?b.push(w.linkHref,"url"):(a.strong&&b.push(w.strong),a.em&&b.push(w.em),a.strikethrough&&b.push(w.strikethrough),a.linkText&&b.push(w.linkText),a.code&&b.push(w.code),a.image&&b.push(w.image),a.imageAltText&&b.push(w.imageAltText,"link"),a.imageMarker&&b.push(w.imageMarker)),a.header&&b.push(w.header,w.header+"-"+a.header),a.quote&&(b.push(w.quote),!c.maxBlockquoteDepth||c.maxBlockquoteDepth>=a.quote?b.push(w.quote+"-"+a.quote):b.push(w.quote+"-"+c.maxBlockquoteDepth)),a.list!==!1){var e=(a.listStack.length-1)%3;e?1===e?b.push(w.list2):b.push(w.list3):b.push(w.list1)}return a.trailingSpaceNewLine?b.push("trailing-space-new-line"):a.trailingSpace&&b.push("trailing-space-"+(a.trailingSpace%2?"a":"b")),b.length?b.join(" "):null}function m(a,b){if(a.match(D,!0))return l(b)}function n(b,d){var e=d.text(b,d);if(void 0!==e)return e;if(d.list)return d.list=null,l(d);if(d.taskList){return"x"!==b.match(A,!0)[1]?d.taskOpen=!0:d.taskClosed=!0,c.highlightFormatting&&(d.formatting="task"),d.taskList=!1,l(d)}if(d.taskOpen=!1,d.taskClosed=!1,d.header&&b.match(/^#+$/,!0))return c.highlightFormatting&&(d.formatting="header"),l(d);var g=b.next();if(d.linkTitle){d.linkTitle=!1;var h=g;"("===g&&(h=")"),h=(h+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var i="^\\s*(?:[^"+h+"\\\\]+|\\\\\\\\|\\\\.)"+h;if(b.match(new RegExp(i),!0))return w.linkHref}if("`"===g){var k=d.formatting;c.highlightFormatting&&(d.formatting="code"),b.eatWhile("`");var m=b.current().length;if(0==d.code)return d.code=m,l(d);if(m==d.code){var q=l(d);return d.code=0,q}return d.formatting=k,l(d)}if(d.code)return l(d);if("\\"===g&&(b.next(),c.highlightFormatting)){var r=l(d),s=w.formatting+"-escape";return r?r+" "+s:s}if("!"===g&&b.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return d.imageMarker=!0,d.image=!0,c.highlightFormatting&&(d.formatting="image"),l(d);if("["===g&&d.imageMarker&&b.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return d.imageMarker=!1,d.imageAltText=!0,c.highlightFormatting&&(d.formatting="image"),l(d);if("]"===g&&d.imageAltText){c.highlightFormatting&&(d.formatting="image");var r=l(d);return d.imageAltText=!1,d.image=!1,d.inline=d.f=p,r}if("["===g&&!d.image)return d.linkText=!0,c.highlightFormatting&&(d.formatting="link"),l(d);if("]"===g&&d.linkText){c.highlightFormatting&&(d.formatting="link");var r=l(d);return d.linkText=!1,d.inline=d.f=b.match(/\(.*?\)| ?\[.*?\]/,!1)?p:n,r}if("<"===g&&b.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){d.f=d.inline=o,c.highlightFormatting&&(d.formatting="link");var r=l(d);return r?r+=" ":r="",r+w.linkInline}if("<"===g&&b.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){d.f=d.inline=o,c.highlightFormatting&&(d.formatting="link");var r=l(d);return r?r+=" ":r="",r+w.linkEmail}if("<"===g&&b.match(/^(!--|[a-z]+(?:\s+[a-z_:.\-]+(?:\s*=\s*[^ >]+)?)*\s*>)/i,!1)){var t=b.string.indexOf(">",b.pos);if(t!=-1){var v=b.string.substring(b.start,t);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(v)&&(d.md_inside=!0)}return b.backUp(1),d.htmlState=a.startState(u),f(b,d,j)}if("<"===g&&b.match(/^\/\w*?>/))return d.md_inside=!1,"tag";if("*"===g||"_"===g){for(var x=1,y=1==b.pos?" ":b.string.charAt(b.pos-2);x<3&&b.eat(g);)x++;var z=b.peek()||" ",B=!/\s/.test(z)&&(!F.test(z)||/\s/.test(y)||F.test(y)),C=!/\s/.test(y)&&(!F.test(y)||/\s/.test(z)||F.test(z)),D=null,E=null;if(x%2&&(d.em||!B||"*"!==g&&C&&!F.test(y)?d.em!=g||!C||"*"!==g&&B&&!F.test(z)||(D=!1):D=!0),x>1&&(d.strong||!B||"*"!==g&&C&&!F.test(y)?d.strong!=g||!C||"*"!==g&&B&&!F.test(z)||(E=!1):E=!0),null!=E||null!=D){c.highlightFormatting&&(d.formatting=null==D?"strong":null==E?"em":"strong em"),D===!0&&(d.em=g),E===!0&&(d.strong=g);var q=l(d);return D===!1&&(d.em=!1),E===!1&&(d.strong=!1),q}}else if(" "===g&&(b.eat("*")||b.eat("_"))){if(" "===b.peek())return l(d);b.backUp(1)}if(c.strikethrough)if("~"===g&&b.eatWhile(g)){if(d.strikethrough){c.highlightFormatting&&(d.formatting="strikethrough");var q=l(d);return d.strikethrough=!1,q}if(b.match(/^[^\s]/,!1))return d.strikethrough=!0,c.highlightFormatting&&(d.formatting="strikethrough"),l(d)}else if(" "===g&&b.match(/^~~/,!0)){if(" "===b.peek())return l(d);b.backUp(2)}return" "===g&&(b.match(/ +$/,!1)?d.trailingSpace++:d.trailingSpace&&(d.trailingSpaceNewLine=!0)),l(d)}function o(a,b){if(">"===a.next()){b.f=b.inline=n,c.highlightFormatting&&(b.formatting="link");var d=l(b);return d?d+=" ":d="",d+w.linkInline}return a.match(/^[^>]+/,!0),w.linkInline}function p(a,b){if(a.eatSpace())return null;var d=a.next();return"("===d||"["===d?(b.f=b.inline=q("("===d?")":"]"),c.highlightFormatting&&(b.formatting="link-string"),b.linkHref=!0,l(b)):"error"}function q(a){return function(b,d){if(b.next()===a){d.f=d.inline=n,c.highlightFormatting&&(d.formatting="link-string");var e=l(d);return d.linkHref=!1,e}return b.match(G[a]),d.linkHref=!0,l(d)}}function r(a,b){return a.match(/^([^\]\\]|\\.)*\]:/,!1)?(b.f=s,a.next(),c.highlightFormatting&&(b.formatting="link"),b.linkText=!0,l(b)):e(a,b,n)}function s(a,b){if(a.match(/^\]:/,!0)){b.f=b.inline=t,c.highlightFormatting&&(b.formatting="link");var d=l(b);return b.linkText=!1,d}return a.match(/^([^\]\\]|\\.)+/,!0),w.linkText}function t(a,b){return a.eatSpace()?null:(a.match(/^[^\s]+/,!0),void 0===a.peek()?b.linkTitle=!0:a.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),b.f=b.inline=n,w.linkHref+" url")}var u=a.getMode(b,"text/html"),v="null"==u.name;void 0===c.highlightFormatting&&(c.highlightFormatting=!1),void 0===c.maxBlockquoteDepth&&(c.maxBlockquoteDepth=0),void 0===c.taskLists&&(c.taskLists=!1),void 0===c.strikethrough&&(c.strikethrough=!1),void 0===c.tokenTypeOverrides&&(c.tokenTypeOverrides={});var w={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 x in w)w.hasOwnProperty(x)&&c.tokenTypeOverrides[x]&&(w[x]=c.tokenTypeOverrides[x]);var y=/^([*\-_])(?:\s*\1){2,}\s*$/,z=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,A=/^\[(x| )\](?=\s)/,B=c.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,C=/^ *(?:\={1,}|-{1,})\s*$/,D=/^[^#!\[\]*_\\<>` "'(~]+/,E=new RegExp("^("+(c.fencedCodeBlocks===!0?"~~~+|```+":c.fencedCodeBlocks)+")[ \\t]*([\\w+#-]*)"),F=/[!\"#$%&\'()*+,\-\.\/:;<=>?@\[\\\]^_`{|}~—]/,G={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/},H={startState:function(){return{f:i,prevLine:null,thisLine:null,block:i,htmlState:null,indentation:0,inline:n,text:m,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(b){return{f:b.f,prevLine:b.prevLine,thisLine:b.thisLine,block:b.block,htmlState:b.htmlState&&a.copyState(u,b.htmlState),indentation:b.indentation,localMode:b.localMode,localState:b.localMode?a.copyState(b.localMode,b.localState):null,inline:b.inline,text:b.text,formatting:!1,linkText:b.linkText,linkTitle:b.linkTitle,code:b.code,em:b.em,strong:b.strong,strikethrough:b.strikethrough,header:b.header,hr:b.hr,taskList:b.taskList,list:b.list,listStack:b.listStack.slice(0),quote:b.quote,indentedCode:b.indentedCode,trailingSpace:b.trailingSpace,trailingSpaceNewLine:b.trailingSpaceNewLine,md_inside:b.md_inside,fencedChars:b.fencedChars}},token:function(a,b){if(b.formatting=!1,a!=b.thisLine){var c=b.header||b.hr;if(b.header=0,b.hr=!1,a.match(/^\s*$/,!0)||c){if(h(b),!c)return null;b.prevLine=null}b.prevLine=b.thisLine,b.thisLine=a,b.taskList=!1,b.trailingSpace=0,b.trailingSpaceNewLine=!1,b.f=b.block;var d=a.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(b.indentationDiff=Math.min(d-b.indentation,4),b.indentation=b.indentation+b.indentationDiff,d>0)return null}return b.f(a,b)},innerMode:function(a){return a.block==j?{state:a.htmlState,mode:u}:a.localState?{state:a.localState,mode:a.localMode}:{state:a,mode:H}},blankLine:h,getType:l,closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return H},"xml"),a.defineMIME("text/x-markdown","markdown")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/mathematica/mathematica.min.js b/media/vendor/codemirror/mode/mathematica/mathematica.min.js index 6c901870f5a7d..d27c371dc942f 100644 --- a/media/vendor/codemirror/mode/mathematica/mathematica.min.js +++ b/media/vendor/codemirror/mode/mathematica/mathematica.min.js @@ -1 +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";e.defineMode("mathematica",function(e,t){function a(e,t){var a;return'"'===(a=e.next())?(t.tokenize=n,t.tokenize(e,t)):"("===a&&e.eat("*")?(t.commentLevel++,t.tokenize=r,t.tokenize(e,t)):(e.backUp(1),e.match(c,!0,!1)?"number":e.match(i,!0,!1)?"number":e.match(/(?:In|Out)\[[0-9]*\]/,!0,!1)?"atom":e.match(/([a-zA-Z\$]+(?:`?[a-zA-Z0-9\$])*::usage)/,!0,!1)?"meta":e.match(/([a-zA-Z\$]+(?:`?[a-zA-Z0-9\$])*::[a-zA-Z\$][a-zA-Z0-9\$]*):?/,!0,!1)?"string-2":e.match(/([a-zA-Z\$][a-zA-Z0-9\$]*\s*:)(?:(?:[a-zA-Z\$][a-zA-Z0-9\$]*)|(?:[^:=>~@\^\&\*\)\[\]'\?,\|])).*/,!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(z,!0,!1)?"keyword":e.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%)/,!0,!1)?"operator":(e.next(),"error"))}function n(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=a),"string"}function r(e,t){for(var n,r;t.commentLevel>0&&null!=(r=e.next());)"("===n&&"*"===r&&t.commentLevel++,"*"===n&&")"===r&&t.commentLevel--,n=r;return t.commentLevel<=0&&(t.tokenize=a),"comment"}var o="(?:\\.\\d+|\\d+\\.\\d*|\\d+)",m="(?:`(?:`?"+o+")?)",c=new RegExp("(?:(?:\\d+)(?:\\^\\^(?:\\.\\w+|\\w+\\.\\w*|\\w+)"+m+"?(?:\\*\\^[+-]?\\d+)?))"),i=new RegExp("(?:"+o+m+"?(?:\\*\\^[+-]?\\d+)?)"),z=new RegExp("(?:`?)(?:[a-zA-Z\\$][a-zA-Z0-9\\$]*)(?:`(?:[a-zA-Z\\$][a-zA-Z0-9\\$]*))*(?:`?)");return{startState:function(){return{tokenize:a,commentLevel:0}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},blockCommentStart:"(*",blockCommentEnd:"*)"}}),e.defineMIME("text/x-mathematica",{name:"mathematica"})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("mathematica",function(a,b){function c(a,b){var c;return'"'===(c=a.next())?(b.tokenize=d,b.tokenize(a,b)):"("===c&&a.eat("*")?(b.commentLevel++,b.tokenize=e,b.tokenize(a,b)):(a.backUp(1),a.match(g,!0,!1)?"number":a.match(h,!0,!1)?"number":a.match(/(?:In|Out)\[[0-9]*\]/,!0,!1)?"atom":a.match(/([a-zA-Z\$]+(?:`?[a-zA-Z0-9\$])*::usage)/,!0,!1)?"meta":a.match(/([a-zA-Z\$]+(?:`?[a-zA-Z0-9\$])*::[a-zA-Z\$][a-zA-Z0-9\$]*):?/,!0,!1)?"string-2":a.match(/([a-zA-Z\$][a-zA-Z0-9\$]*\s*:)(?:(?:[a-zA-Z\$][a-zA-Z0-9\$]*)|(?:[^:=>~@\^\&\*\)\[\]'\?,\|])).*/,!0,!1)?"variable-2":a.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)?"variable-2":a.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+/,!0,!1)?"variable-2":a.match(/_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)?"variable-2":a.match(/\\\[[a-zA-Z\$][a-zA-Z0-9\$]*\]/,!0,!1)?"variable-3":a.match(/(?:\[|\]|{|}|\(|\))/,!0,!1)?"bracket":a.match(/(?:#[a-zA-Z\$][a-zA-Z0-9\$]*|#+[0-9]?)/,!0,!1)?"variable-2":a.match(i,!0,!1)?"keyword":a.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%)/,!0,!1)?"operator":(a.next(),"error"))}function d(a,b){for(var d,e=!1,f=!1;null!=(d=a.next());){if('"'===d&&!f){e=!0;break}f=!f&&"\\"===d}return e&&!f&&(b.tokenize=c),"string"}function e(a,b){for(var d,e;b.commentLevel>0&&null!=(e=a.next());)"("===d&&"*"===e&&b.commentLevel++,"*"===d&&")"===e&&b.commentLevel--,d=e;return b.commentLevel<=0&&(b.tokenize=c),"comment"}var f="(?:\\.\\d+|\\d+\\.\\d*|\\d+)",g=new RegExp("(?:(?:\\d+)(?:\\^\\^(?:\\.\\w+|\\w+\\.\\w*|\\w+)(?:`(?:`?"+f+")?)?(?:\\*\\^[+-]?\\d+)?))"),h=new RegExp("(?:"+f+"(?:`(?:`?"+f+")?)?(?:\\*\\^[+-]?\\d+)?)"),i=new RegExp("(?:`?)(?:[a-zA-Z\\$][a-zA-Z0-9\\$]*)(?:`(?:[a-zA-Z\\$][a-zA-Z0-9\\$]*))*(?:`?)");return{startState:function(){return{tokenize:c,commentLevel:0}},token:function(a,b){return a.eatSpace()?null:b.tokenize(a,b)},blockCommentStart:"(*",blockCommentEnd:"*)"}}),a.defineMIME("text/x-mathematica",{name:"mathematica"})}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/mbox/mbox.min.js b/media/vendor/codemirror/mode/mbox/mbox.min.js index 1e624476a8a05..d74c29076723a 100644 --- a/media/vendor/codemirror/mode/mbox/mbox.min.js +++ b/media/vendor/codemirror/mode/mbox/mbox.min.js @@ -1 +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 r(e){return"Subject"===e?"header":"string"}function n(e,n){if(e.sol()){if(n.inSeparator=!1,n.inHeader&&e.match(a))return null;if(n.inHeader=!1,n.header=null,e.match(o))return n.inHeaders=!0,n.inSeparator=!0,"atom";var t,i=!1;return(t=e.match(c))||(i=!0)&&(t=e.match(d))?(n.inHeaders=!0,n.inHeader=!0,n.emailPermitted=i,n.header=t[1],"atom"):n.inHeaders&&(t=e.match(m))?(n.inHeader=!0,n.emailPermitted=!0,n.header=t[1],"atom"):(n.inHeaders=!1,e.skipToEnd(),null)}if(n.inSeparator)return e.match(s)?"link":e.match(u)?"atom":(e.skipToEnd(),"atom");if(n.inHeader){var p=r(n.header);if(n.emailPermitted){if(e.match(f))return p+" link";if(e.match(l))return p}return e.skipToEnd(),p}return e.skipToEnd(),null}var t=["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",t.concat(i));var a=/^[ \t]/,o=/^From /,d=new RegExp("^("+t.join("|")+"): "),c=new RegExp("^("+i.join("|")+"): "),m=/^[^:]+:/,s=/^[^ ]+@[^ ]+/,u=/^.*?(?=[^ ]+?@[^ ]+)/,f=/^<.*?>/,l=/^.*?(?=<.*>)/;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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){return"Subject"===a?"header":"string"}function c(a,c){if(a.sol()){if(c.inSeparator=!1,c.inHeader&&a.match(f))return null;if(c.inHeader=!1,c.header=null,a.match(g))return c.inHeaders=!0,c.inSeparator=!0,"atom";var d,e=!1;return(d=a.match(i))||(e=!0)&&(d=a.match(h))?(c.inHeaders=!0,c.inHeader=!0,c.emailPermitted=e,c.header=d[1],"atom"):c.inHeaders&&(d=a.match(j))?(c.inHeader=!0,c.emailPermitted=!0,c.header=d[1],"atom"):(c.inHeaders=!1,a.skipToEnd(),null)}if(c.inSeparator)return a.match(k)?"link":a.match(l)?"atom":(a.skipToEnd(),"atom");if(c.inHeader){var o=b(c.header);if(c.emailPermitted){if(a.match(m))return o+" link";if(a.match(n))return o}return a.skipToEnd(),o}return a.skipToEnd(),null}var d=["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"],e=["Date","Subject","Comments","Keywords","Resent-Date"];a.registerHelper("hintWords","mbox",d.concat(e));var f=/^[ \t]/,g=/^From /,h=new RegExp("^("+d.join("|")+"): "),i=new RegExp("^("+e.join("|")+"): "),j=/^[^:]+:/,k=/^[^ ]+@[^ ]+/,l=/^.*?(?=[^ ]+?@[^ ]+)/,m=/^<.*?>/,n=/^.*?(?=<.*>)/;a.defineMode("mbox",function(){return{startState:function(){return{inSeparator:!1,inHeader:!1,emailPermitted:!1,header:null,inHeaders:!1}},token:c,blankLine:function(a){a.inHeaders=a.inSeparator=a.inHeader=!1}}}),a.defineMIME("application/mbox","mbox")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/mirc/mirc.js b/media/vendor/codemirror/mode/mirc/mirc.js index f0d5c6ad50e08..71ac4ddfd4356 100644 --- a/media/vendor/codemirror/mode/mirc/mirc.js +++ b/media/vendor/codemirror/mode/mirc/mirc.js @@ -130,7 +130,7 @@ CodeMirror.defineMode("mirc", function() { } } else if (ch == "%") { - stream.eatWhile(/[^,^\s^\(^\)]/); + stream.eatWhile(/[^,\s()]/); state.beforeParams = true; return "string"; } diff --git a/media/vendor/codemirror/mode/mirc/mirc.min.js b/media/vendor/codemirror/mode/mirc/mirc.min.js index 1eb6735068a5e..501689ce3a534 100644 --- a/media/vendor/codemirror/mode/mirc/mirc.min.js +++ b/media/vendor/codemirror/mode/mirc/mirc.min.js @@ -1 +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";e.defineMIME("text/mirc","mirc"),e.defineMode("mirc",function(){function e(e){for(var i={},$=e.split(" "),r=0;r<$.length;++r)i[$[r]]=!0;return i}function i(e,i,$){return i.tokenize=$,$(e,i)}function $(e,$){var l=$.beforeParams;$.beforeParams=!1;var c=e.next();if(/[\[\]{}\(\),\.]/.test(c))return"("==c&&l?$.inParams=!0:")"==c&&($.inParams=!1),null;if(/\d/.test(c))return e.eatWhile(/[\w\.]/),"number";if("\\"==c)return e.eat("\\"),e.eat(/./),"number";if("/"==c&&e.eat("*"))return i(e,$,r);if(";"==c&&e.match(/ *\( *\(/))return i(e,$,t);if(";"!=c||$.inParams){if('"'==c)return e.eat(/"/),"keyword";if("$"==c)return e.eatWhile(/[$_a-z0-9A-Z\.:]/),o&&o.propertyIsEnumerable(e.current().toLowerCase())?"keyword":($.beforeParams=!0,"builtin");if("%"==c)return e.eatWhile(/[^,^\s^\(^\)]/),$.beforeParams=!0,"string";if(s.test(c))return e.eatWhile(s),"operator";e.eatWhile(/[\w\$_{}]/);var d=e.current().toLowerCase();return n&&n.propertyIsEnumerable(d)?"keyword":a&&a.propertyIsEnumerable(d)?($.beforeParams=!0,"keyword"):null}return e.skipToEnd(),"comment"}function r(e,i){for(var r,t=!1;r=e.next();){if("/"==r&&t){i.tokenize=$;break}t="*"==r}return"comment"}function t(e,i){for(var r,t=0;r=e.next();){if(";"==r&&2==t){i.tokenize=$;break}")"==r?t++:" "!=r&&(t=0)}return"meta"}var o=e("$! $$ $& $? $+ $abook $abs $active $activecid $activewid $address $addtok $agent $agentname $agentstat $agentver $alias $and $anick $ansi2mirc $aop $appactive $appstate $asc $asctime $asin $atan $avoice $away $awaymsg $awaytime $banmask $base $bfind $binoff $biton $bnick $bvar $bytes $calc $cb $cd $ceil $chan $chanmodes $chantypes $chat $chr $cid $clevel $click $cmdbox $cmdline $cnick $color $com $comcall $comchan $comerr $compact $compress $comval $cos $count $cr $crc $creq $crlf $ctime $ctimer $ctrlenter $date $day $daylight $dbuh $dbuw $dccignore $dccport $dde $ddename $debug $decode $decompress $deltok $devent $dialog $did $didreg $didtok $didwm $disk $dlevel $dll $dllcall $dname $dns $duration $ebeeps $editbox $emailaddr $encode $error $eval $event $exist $feof $ferr $fgetc $file $filename $filtered $finddir $finddirn $findfile $findfilen $findtok $fline $floor $fopen $fread $fserve $fulladdress $fulldate $fullname $fullscreen $get $getdir $getdot $gettok $gmt $group $halted $hash $height $hfind $hget $highlight $hnick $hotline $hotlinepos $ial $ialchan $ibl $idle $iel $ifmatch $ignore $iif $iil $inelipse $ini $inmidi $inpaste $inpoly $input $inrect $inroundrect $insong $instok $int $inwave $ip $isalias $isbit $isdde $isdir $isfile $isid $islower $istok $isupper $keychar $keyrpt $keyval $knick $lactive $lactivecid $lactivewid $left $len $level $lf $line $lines $link $lock $lock $locked $log $logstamp $logstampfmt $longfn $longip $lower $ltimer $maddress $mask $matchkey $matchtok $md5 $me $menu $menubar $menucontext $menutype $mid $middir $mircdir $mircexe $mircini $mklogfn $mnick $mode $modefirst $modelast $modespl $mouse $msfile $network $newnick $nick $nofile $nopath $noqt $not $notags $notify $null $numeric $numok $oline $onpoly $opnick $or $ord $os $passivedcc $pic $play $pnick $port $portable $portfree $pos $prefix $prop $protect $puttok $qt $query $rand $r $rawmsg $read $readomo $readn $regex $regml $regsub $regsubex $remove $remtok $replace $replacex $reptok $result $rgb $right $round $scid $scon $script $scriptdir $scriptline $sdir $send $server $serverip $sfile $sha1 $shortfn $show $signal $sin $site $sline $snick $snicks $snotify $sock $sockbr $sockerr $sockname $sorttok $sound $sqrt $ssl $sreq $sslready $status $strip $str $stripped $syle $submenu $switchbar $tan $target $ticks $time $timer $timestamp $timestampfmt $timezone $tip $titlebar $toolbar $treebar $trust $ulevel $ulist $upper $uptime $url $usermode $v1 $v2 $var $vcmd $vcmdstat $vcmdver $version $vnick $vol $wid $width $wildsite $wildtok $window $wrap $xor"),n=e("abook ajinvite alias aline ame amsg anick aop auser autojoin avoice away background ban bcopy beep bread break breplace bset btrunc bunset bwrite channel clear clearall cline clipboard close cnick color comclose comopen comreg continue copy creq ctcpreply ctcps dcc dccserver dde ddeserver debug dec describe dialog did didtok disable disconnect dlevel dline dll dns dqwindow drawcopy drawdot drawfill drawline drawpic drawrect drawreplace drawrot drawsave drawscroll drawtext ebeeps echo editbox emailaddr enable events exit fclose filter findtext finger firewall flash flist flood flush flushini font fopen fseek fsend fserve fullname fwrite ghide gload gmove gopts goto gplay gpoint gqreq groups gshow gsize gstop gtalk gunload hadd halt haltdef hdec hdel help hfree hinc hload hmake hop hsave ial ialclear ialmark identd if ignore iline inc invite iuser join kick linesep links list load loadbuf localinfo log mdi me menubar mkdir mnick mode msg nick noop notice notify omsg onotice part partall pdcc perform play playctrl pop protect pvoice qme qmsg query queryn quit raw reload remini remote remove rename renwin reseterror resetidle return rlevel rline rmdir run ruser save savebuf saveini say scid scon server set showmirc signam sline sockaccept sockclose socklist socklisten sockmark sockopen sockpause sockread sockrename sockudp sockwrite sound speak splay sreq strip switchbar timer timestamp titlebar tnick tokenize toolbar topic tray treebar ulist unload unset unsetall updatenl url uwho var vcadd vcmd vcrem vol while whois window winhelp write writeint if isalnum isalpha isaop isavoice isban ischan ishop isignore isin isincs isletter islower isnotify isnum ison isop isprotect isreg isupper isvoice iswm iswmcs elseif else goto menu nicklist status title icon size option text edit button check radio box scroll list combo link tab item"),a=e("if elseif else and not or eq ne in ni for foreach while switch"),s=/[+\-*&%=<>!?^\/\|]/;return{startState:function(){return{tokenize:$,beforeParams:!1,inParams:!1}},token:function(e,i){return e.eatSpace()?null:i.tokenize(e,i)}}})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMIME("text/mirc","mirc"),a.defineMode("mirc",function(){function a(a){for(var b={},c=a.split(" "),d=0;d!?^\/\|]/;return{startState:function(){return{tokenize:c,beforeParams:!1,inParams:!1}},token:function(a,b){return a.eatSpace()?null:b.tokenize(a,b)}}})}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/mllike/mllike.min.js b/media/vendor/codemirror/mode/mllike/mllike.min.js index e50c76d935b3b..94bb0998a64f3 100644 --- a/media/vendor/codemirror/mode/mllike/mllike.min.js +++ b/media/vendor/codemirror/mode/mllike/mllike.min.js @@ -1 +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";e.defineMode("mllike",function(e,r){function t(e,t){var d=e.next();if('"'===d)return t.tokenize=o,t.tokenize(e,t);if("("===d&&e.eat("*"))return t.commentLevel++,t.tokenize=n,t.tokenize(e,t);if("~"===d)return e.eatWhile(/\w/),"variable-2";if("`"===d)return e.eatWhile(/\w/),"quote";if("/"===d&&r.slashComments&&e.eat("/"))return e.skipToEnd(),"comment";if(/\d/.test(d))return e.eatWhile(/[\d]/),e.eat(".")&&e.eatWhile(/[\d]/),"number";if(/[+\-*&%=<>!?|]/.test(d))return"operator";if(/[\w\xa1-\uffff]/.test(d)){e.eatWhile(/[\w\xa1-\uffff]/);var l=e.current();return i.hasOwnProperty(l)?i[l]:"variable"}return null}function o(e,r){for(var o,n=!1,i=!1;null!=(o=e.next());){if('"'===o&&!i){n=!0;break}i=!i&&"\\"===o}return n&&!i&&(r.tokenize=t),"string"}function n(e,r){for(var o,n;r.commentLevel>0&&null!=(n=e.next());)"("===o&&"*"===n&&r.commentLevel++,"*"===o&&")"===n&&r.commentLevel--,o=n;return r.commentLevel<=0&&(r.tokenize=t),"comment"}var i={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"},d=r.extraWords||{};for(var l in d)d.hasOwnProperty(l)&&(i[l]=r.extraWords[l]);return{startState:function(){return{tokenize:t,commentLevel:0}},token:function(e,r){return e.eatSpace()?null:r.tokenize(e,r)},blockCommentStart:"(*",blockCommentEnd:"*)",lineComment:r.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})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("mllike",function(a,b){function c(a,c){var g=a.next();if('"'===g)return c.tokenize=d,c.tokenize(a,c);if("("===g&&a.eat("*"))return c.commentLevel++,c.tokenize=e,c.tokenize(a,c);if("~"===g)return a.eatWhile(/\w/),"variable-2";if("`"===g)return a.eatWhile(/\w/),"quote";if("/"===g&&b.slashComments&&a.eat("/"))return a.skipToEnd(),"comment";if(/\d/.test(g))return a.eatWhile(/[\d]/),a.eat(".")&&a.eatWhile(/[\d]/),"number";if(/[+\-*&%=<>!?|]/.test(g))return"operator";if(/[\w\xa1-\uffff]/.test(g)){a.eatWhile(/[\w\xa1-\uffff]/);var h=a.current();return f.hasOwnProperty(h)?f[h]:"variable"}return null}function d(a,b){for(var d,e=!1,f=!1;null!=(d=a.next());){if('"'===d&&!f){e=!0;break}f=!f&&"\\"===d}return e&&!f&&(b.tokenize=c),"string"}function e(a,b){for(var d,e;b.commentLevel>0&&null!=(e=a.next());)"("===d&&"*"===e&&b.commentLevel++,"*"===d&&")"===e&&b.commentLevel--,d=e;return b.commentLevel<=0&&(b.tokenize=c),"comment"}var f={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"},g=b.extraWords||{};for(var h in g)g.hasOwnProperty(h)&&(f[h]=b.extraWords[h]);return{startState:function(){return{tokenize:c,commentLevel:0}},token:function(a,b){return a.eatSpace()?null:b.tokenize(a,b)},blockCommentStart:"(*",blockCommentEnd:"*)",lineComment:b.slashComments?"//":null}}),a.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"}}),a.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})}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/modelica/modelica.min.js b/media/vendor/codemirror/mode/modelica/modelica.min.js index 06be0d98bd0b0..c9d2731c5c107 100644 --- a/media/vendor/codemirror/mode/modelica/modelica.min.js +++ b/media/vendor/codemirror/mode/modelica/modelica.min.js @@ -1 +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;r0&&t.level--:t.level++,t.tokenize=null,t.sol=!1,c.propertyIsEnumerable(n)?"keyword":f.propertyIsEnumerable(n)?"builtin":p.propertyIsEnumerable(n)?"atom":"variable"}function a(e,t){for(;e.eat(/[^']/););return t.tokenize=null,t.sol=!1,e.eat("'")?"variable":"error"}function u(e,t){return e.eatWhile(k),e.eat(".")&&e.eatWhile(k),(e.eat("e")||e.eat("E"))&&(e.eat("-")||e.eat("+"),e.eatWhile(k)),t.tokenize=null,t.sol=!1,"number"}var s=t.indentUnit,c=n.keywords||{},f=n.builtin||{},p=n.atoms||{},d=/[;=\(:\),{}.*<>+\-\/^\[\]]/,m=/(:=|<=|>=|==|<>|\.\+|\.\-|\.\*|\.\/|\.\^)/,k=/[0-9]/,b=/[_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=o;else{if(m.test(n+e.peek()))return e.next(),t.tokenize=null,"operator";if(d.test(n))return t.tokenize=null,"operator";if(b.test(n))t.tokenize=l;else if("'"==n&&e.peek()&&"'"!=e.peek())t.tokenize=a;else if('"'==n)t.tokenize=i;else{if(!k.test(n))return t.tokenize=null,"error";t.tokenize=u}}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?s*r:0},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}});!function(t,n){function r(e){if(e)for(var t in e)e.hasOwnProperty(t)&&o.push(t)}"string"==typeof t&&(t=[t]);var o=[];r(n.keywords),r(n.builtin),r(n.atoms),o.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],o));for(var i=0;i0&&b.level--:b.level++,b.tokenize=null,b.sol=!1,k.propertyIsEnumerable(c)?"keyword":l.propertyIsEnumerable(c)?"builtin":m.propertyIsEnumerable(c)?"atom":"variable"}function h(a,b){for(;a.eat(/[^']/););return b.tokenize=null,b.sol=!1,a.eat("'")?"variable":"error"}function i(a,b){return a.eatWhile(p),a.eat(".")&&a.eatWhile(p),(a.eat("e")||a.eat("E"))&&(a.eat("-")||a.eat("+"),a.eatWhile(p)),b.tokenize=null,b.sol=!1,"number"}var j=b.indentUnit,k=c.keywords||{},l=c.builtin||{},m=c.atoms||{},n=/[;=\(:\),{}.*<>+\-\/^\[\]]/,o=/(:=|<=|>=|==|<>|\.\+|\.\-|\.\*|\.\/|\.\^)/,p=/[0-9]/,q=/[_a-zA-Z]/;return{startState:function(){return{tokenize:null,level:0,sol:!0}},token:function(a,b){if(null!=b.tokenize)return b.tokenize(a,b);if(a.sol()&&(b.sol=!0),a.eatSpace())return b.tokenize=null,null;var c=a.next();if("/"==c&&a.eat("/"))b.tokenize=d;else if("/"==c&&a.eat("*"))b.tokenize=e;else{if(o.test(c+a.peek()))return a.next(),b.tokenize=null,"operator";if(n.test(c))return b.tokenize=null,"operator";if(q.test(c))b.tokenize=g;else if("'"==c&&a.peek()&&"'"!=a.peek())b.tokenize=h;else if('"'==c)b.tokenize=f;else{if(!p.test(c))return b.tokenize=null,"error";b.tokenize=i}}return b.tokenize(a,b)},indent:function(b,c){if(null!=b.tokenize)return a.Pass;var d=b.level;return/(algorithm)/.test(c)&&d--,/(equation)/.test(c)&&d--,/(initial algorithm)/.test(c)&&d--,/(initial equation)/.test(c)&&d--,/(end)/.test(c)&&d--,d>0?j*d:0},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}});!function(b,c){function d(a){if(a)for(var b in a)a.hasOwnProperty(b)&&e.push(b)}"string"==typeof b&&(b=[b]);var e=[];d(c.keywords),d(c.builtin),d(c.atoms),e.length&&(c.helperType=b[0],a.registerHelper("hintWords",b[0],e));for(var f=0;f","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","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:["="]}};t.defineMode("mscgen",function(t,r){return{startState:n,copyState:o,token:i(c[r&&r.language||"mscgen"]),lineComment:"#",blockCommentStart:"/*",blockCommentEnd:"*/"}}),t.defineMIME("text/x-mscgen","mscgen"),t.defineMIME("text/x-xu",{name:"mscgen",language:"xu"}),t.defineMIME("text/x-msgenny",{name:"mscgen",language:"msgenny"})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){return new RegExp("\\b("+a.join("|")+")\\b","i")}function c(a){return new RegExp("("+a.join("|")+")","i")}function d(){return{inComment:!1,inString:!1,inAttributeList:!1,inScript:!1}}function e(a){return{inComment:a.inComment,inString:a.inString,inAttributeList:a.inAttributeList,inScript:a.inScript}}function f(a){return function(d,e){if(d.match(c(a.brackets),!0,!0))return"bracket";if(!e.inComment){if(d.match(/\/\*[^\*\/]*/,!0,!0))return e.inComment=!0,"comment";if(d.match(c(a.singlecomment),!0,!0))return d.skipToEnd(),"comment"}if(e.inComment)return d.match(/[^\*\/]*\*\//,!0,!0)?e.inComment=!1:d.skipToEnd(),"comment";if(!e.inString&&d.match(/\"(\\\"|[^\"])*/,!0,!0))return e.inString=!0,"string";if(e.inString)return d.match(/[^\"]*\"/,!0,!0)?e.inString=!1:d.skipToEnd(),"string";if(a.keywords&&d.match(b(a.keywords),!0,!0))return"keyword";if(d.match(b(a.options),!0,!0))return"keyword";if(d.match(b(a.arcsWords),!0,!0))return"keyword";if(d.match(c(a.arcsOthers),!0,!0))return"keyword";if(a.operators&&d.match(c(a.operators),!0,!0))return"operator";if(a.constants&&d.match(c(a.constants),!0,!0))return"variable";if(!a.inAttributeList&&a.attributes&&d.match(/\[/,!0,!0))return a.inAttributeList=!0,"bracket";if(a.inAttributeList){if(null!==a.attributes&&d.match(b(a.attributes),!0,!0))return"attribute";if(d.match(/]/,!0,!0))return a.inAttributeList=!1,"bracket"}return d.next(),"base"}}var g={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:["="]}};a.defineMode("mscgen",function(a,b){return{startState:d,copyState:e,token:f(g[b&&b.language||"mscgen"]),lineComment:"#",blockCommentStart:"/*",blockCommentEnd:"*/"}}),a.defineMIME("text/x-mscgen","mscgen"),a.defineMIME("text/x-xu",{name:"mscgen",language:"xu"}),a.defineMIME("text/x-msgenny",{name:"mscgen",language:"msgenny"})}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/mumps/mumps.min.js b/media/vendor/codemirror/mode/mumps/mumps.min.js index 4c0a660bcb420..090ae2b2a7295 100644 --- a/media/vendor/codemirror/mode/mumps/mumps.min.js +++ b/media/vendor/codemirror/mode/mumps/mumps.min.js @@ -1 +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";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 i=e.peek();return" "==i||"\t"==i?(t.label=!1,0==t.commandMode?t.commandMode=1:(t.commandMode<0||2==t.commandMode)&&(t.commandMode=0)):"."!=i&&t.commandMode>0&&(t.commandMode=":"==i?-1:2),"("!==i&&"\t"!==i||(t.label=!1),";"===i?(e.skipToEnd(),"comment"):e.match(/^[-+]?\d+(\.\d+)?([eE][-+]?\d+)?/)?"number":'"'==i?e.skipTo('"')?(e.next(),"string"):(e.skipToEnd(),"error"):e.match(o)||e.match(n)?"operator":e.match(r)?null:$.test(i)?(e.next(),"bracket"):t.commandMode>0&&e.match(m)?"variable-2":e.match(c)?"builtin":e.match(a)?"variable":"$"===i||"^"===i?(e.next(),"builtin"):"@"===i?(e.next(),"string-2"):/[\w%]/.test(i)?(e.eatWhile(/[\w%]/),"variable"):(e.next(),"error")}var n=new RegExp("^[\\+\\-\\*/&#!_?\\\\<>=\\'\\[\\]]"),o=new RegExp("^(('=)|(<=)|(>=)|('>)|('<)|([[)|(]])|(^$))"),r=new RegExp("^[\\.,:]"),$=new RegExp("[()]"),a=new RegExp("^[%A-Za-z][A-Za-z0-9]*"),i=["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"],c=e(["\\$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"]),m=e(i);return{startState:function(){return{label:!1,commandMode:0}},token:function(e,n){var o=t(e,n);return n.label?"tag":o}}}),e.defineMIME("text/x-mumps","mumps")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("mumps",function(){function a(a){return new RegExp("^(("+a.join(")|(")+"))\\b","i")}function b(a,b){a.sol()&&(b.label=!0,b.commandMode=0);var h=a.peek();return" "==h||"\t"==h?(b.label=!1,0==b.commandMode?b.commandMode=1:(b.commandMode<0||2==b.commandMode)&&(b.commandMode=0)):"."!=h&&b.commandMode>0&&(b.commandMode=":"==h?-1:2),"("!==h&&"\t"!==h||(b.label=!1),";"===h?(a.skipToEnd(),"comment"):a.match(/^[-+]?\d+(\.\d+)?([eE][-+]?\d+)?/)?"number":'"'==h?a.skipTo('"')?(a.next(),"string"):(a.skipToEnd(),"error"):a.match(d)||a.match(c)?"operator":a.match(e)?null:f.test(h)?(a.next(),"bracket"):b.commandMode>0&&a.match(k)?"variable-2":a.match(j)?"builtin":a.match(g)?"variable":"$"===h||"^"===h?(a.next(),"builtin"):"@"===h?(a.next(),"string-2"):/[\w%]/.test(h)?(a.eatWhile(/[\w%]/),"variable"):(a.next(),"error")}var c=new RegExp("^[\\+\\-\\*/&#!_?\\\\<>=\\'\\[\\]]"),d=new RegExp("^(('=)|(<=)|(>=)|('>)|('<)|([[)|(]])|(^$))"),e=new RegExp("^[\\.,:]"),f=new RegExp("[()]"),g=new RegExp("^[%A-Za-z][A-Za-z0-9]*"),h=["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"],i=["\\$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"],j=a(i),k=a(h);return{startState:function(){return{label:!1,commandMode:0}},token:function(a,c){var d=b(a,c);return c.label?"tag":d}}}),a.defineMIME("text/x-mumps","mumps")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/nginx/nginx.min.js b/media/vendor/codemirror/mode/nginx/nginx.min.js index 1b969c67d39eb..27155d68ecf71 100644 --- a/media/vendor/codemirror/mode/nginx/nginx.min.js +++ b/media/vendor/codemirror/mode/nginx/nginx.min.js @@ -1 +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";e.defineMode("nginx",function(e){function _(e){for(var _={},t=e.split(" "),i=0;i*\/]/.test(o)?t(null,"select-op"):/[;{}:\[\]]/.test(o)?t(null,o):(e.eatWhile(/[\w\\\-]/),t("variable","variable")):t(null,"compare"):void t(null,"compare")}function r(e,_){for(var r,s=!1;null!=(r=e.next());){if(s&&"/"==r){_.tokenize=i;break}s="*"==r}return t("comment","comment")}function s(e,_){for(var r,s=0;null!=(r=e.next());){if(s>=2&&">"==r){_.tokenize=i;break}s="-"==r?s+1:0}return t("comment","comment")}function a(e){return function(_,r){for(var s,a=!1;null!=(s=_.next())&&(s!=e||a);)a=!a&&"\\"==s;return a||(r.tokenize=i),t("string","string")}}var o,n=_("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=_("http mail events server types location upstream charset_map limit_except if geo map"),l=_("include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files"),p=e.indentUnit;return{startState:function(e){return{tokenize:i,baseIndent:e||0,stack:[]}},token:function(e,_){if(e.eatSpace())return null;o=null;var t=_.tokenize(e,_),i=_.stack[_.stack.length-1];return"hash"==o&&"rule"==i?t="atom":"variable"==t&&("rule"==i?t="number":i&&"@media{"!=i||(t="tag")),"rule"==i&&/^[\{\};]$/.test(o)&&_.stack.pop(),"{"==o?"@media"==i?_.stack[_.stack.length-1]="@media{":_.stack.push("{"):"}"==o?_.stack.pop():"@media"==o?_.stack.push("@media"):"{"==i&&"comment"!=o&&_.stack.push("rule"),t},indent:function(e,_){var t=e.stack.length;return/^\}/.test(_)&&(t-="rule"==e.stack[e.stack.length-1]?2:1),e.baseIndent+t*p},electricChars:"}"}}),e.defineMIME("text/x-nginx-conf","nginx")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("nginx",function(a){function b(a){for(var b={},c=a.split(" "),d=0;d*\/]/.test(h)?c(null,"select-op"):/[;{}:\[\]]/.test(h)?c(null,h):(a.eatWhile(/[\w\\\-]/),c("variable","variable")):c(null,"compare"):void c(null,"compare")}function e(a,b){for(var e,f=!1;null!=(e=a.next());){if(f&&"/"==e){b.tokenize=d;break}f="*"==e}return c("comment","comment")}function f(a,b){for(var e,f=0;null!=(e=a.next());){if(f>=2&&">"==e){b.tokenize=d;break}f="-"==e?f+1:0}return c("comment","comment")}function g(a){return function(b,e){for(var f,g=!1;null!=(f=b.next())&&(f!=a||g);)g=!g&&"\\"==f;return g||(e.tokenize=d),c("string","string")}}var h,i=b("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"),j=b("http mail events server types location upstream charset_map limit_except if geo map"),k=b("include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files"),l=a.indentUnit;return{startState:function(a){return{tokenize:d,baseIndent:a||0,stack:[]}},token:function(a,b){if(a.eatSpace())return null;h=null;var c=b.tokenize(a,b),d=b.stack[b.stack.length-1];return"hash"==h&&"rule"==d?c="atom":"variable"==c&&("rule"==d?c="number":d&&"@media{"!=d||(c="tag")),"rule"==d&&/^[\{\};]$/.test(h)&&b.stack.pop(),"{"==h?"@media"==d?b.stack[b.stack.length-1]="@media{":b.stack.push("{"):"}"==h?b.stack.pop():"@media"==h?b.stack.push("@media"):"{"==d&&"comment"!=h&&b.stack.push("rule"),c},indent:function(a,b){var c=a.stack.length;return/^\}/.test(b)&&(c-="rule"==a.stack[a.stack.length-1]?2:1),a.baseIndent+c*l},electricChars:"}"}}),a.defineMIME("text/x-nginx-conf","nginx")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/nsis/nsis.min.js b/media/vendor/codemirror/mode/nsis/nsis.min.js index 624307775cada..4f4d517e02e07 100644 --- a/media/vendor/codemirror/mode/nsis/nsis.min.js +++ b/media/vendor/codemirror/mode/nsis/nsis.min.js @@ -1 +1 @@ -!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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../../addon/mode/simple")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],a):a(CodeMirror)}(function(a){"use strict";a.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:["#",";"]}}),a.defineMIME("text/x-nsis","nsis")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/ntriples/ntriples.min.js b/media/vendor/codemirror/mode/ntriples/ntriples.min.js index 7d20a9e733469..5080f8cd93cd0 100644 --- a/media/vendor/codemirror/mode/ntriples/ntriples.min.js +++ b/media/vendor/codemirror/mode/ntriples/ntriples.min.js @@ -1 +1 @@ -!function(_){"object"==typeof exports&&"object"==typeof module?_(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],_):_(CodeMirror)}(function(_){"use strict";_.defineMode("ntriples",function(){function _(_,I){var R,n=_.location;R=n==e.PRE_SUBJECT&&"<"==I?e.WRITING_SUB_URI:n==e.PRE_SUBJECT&&"_"==I?e.WRITING_BNODE_URI:n==e.PRE_PRED&&"<"==I?e.WRITING_PRED_URI:n==e.PRE_OBJ&&"<"==I?e.WRITING_OBJ_URI:n==e.PRE_OBJ&&"_"==I?e.WRITING_OBJ_BNODE:n==e.PRE_OBJ&&'"'==I?e.WRITING_OBJ_LITERAL:n==e.WRITING_SUB_URI&&">"==I?e.PRE_PRED:n==e.WRITING_BNODE_URI&&" "==I?e.PRE_PRED:n==e.WRITING_PRED_URI&&">"==I?e.PRE_OBJ:n==e.WRITING_OBJ_URI&&">"==I?e.POST_OBJ:n==e.WRITING_OBJ_BNODE&&" "==I?e.POST_OBJ:n==e.WRITING_OBJ_LITERAL&&'"'==I?e.POST_OBJ:n==e.WRITING_LIT_LANG&&" "==I?e.POST_OBJ:n==e.WRITING_LIT_TYPE&&">"==I?e.POST_OBJ:n==e.WRITING_OBJ_LITERAL&&"@"==I?e.WRITING_LIT_LANG:n==e.WRITING_OBJ_LITERAL&&"^"==I?e.WRITING_LIT_TYPE:" "!=I||n!=e.PRE_SUBJECT&&n!=e.PRE_PRED&&n!=e.PRE_OBJ&&n!=e.POST_OBJ?n==e.POST_OBJ&&"."==I?e.PRE_SUBJECT:e.ERROR:n,_.location=R}var e={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:e.PRE_SUBJECT,uris:[],anchors:[],bnodes:[],langs:[],types:[]}},token:function(e,I){var R=e.next();if("<"==R){_(I,R);var n="";return e.eatWhile(function(_){return"#"!=_&&">"!=_&&(n+=_,!0)}),I.uris.push(n),e.match("#",!1)?"variable":(e.next(),_(I,">"),"variable")}if("#"==R){var t="";return e.eatWhile(function(_){return">"!=_&&" "!=_&&(t+=_,!0)}),I.anchors.push(t),"variable-2"}if(">"==R)return _(I,">"),"variable";if("_"==R){_(I,R);var r="";return e.eatWhile(function(_){return" "!=_&&(r+=_,!0)}),I.bnodes.push(r),e.next(),_(I," "),"builtin"}if('"'==R)return _(I,R),e.eatWhile(function(_){return'"'!=_}),e.next(),"@"!=e.peek()&&"^"!=e.peek()&&_(I,'"'),"string";if("@"==R){_(I,"@");var i="";return e.eatWhile(function(_){return" "!=_&&(i+=_,!0)}),I.langs.push(i),e.next(),_(I," "),"string-2"}if("^"==R){e.next(),_(I,"^");var T="";return e.eatWhile(function(_){return">"!=_&&(T+=_,!0)}),I.types.push(T),e.next(),_(I,">"),"variable"}" "==R&&_(I,R),"."==R&&_(I,R)}}}),_.defineMIME("text/n-triples","ntriples")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("ntriples",function(){function a(a,c){var d,e=a.location;d=e==b.PRE_SUBJECT&&"<"==c?b.WRITING_SUB_URI:e==b.PRE_SUBJECT&&"_"==c?b.WRITING_BNODE_URI:e==b.PRE_PRED&&"<"==c?b.WRITING_PRED_URI:e==b.PRE_OBJ&&"<"==c?b.WRITING_OBJ_URI:e==b.PRE_OBJ&&"_"==c?b.WRITING_OBJ_BNODE:e==b.PRE_OBJ&&'"'==c?b.WRITING_OBJ_LITERAL:e==b.WRITING_SUB_URI&&">"==c?b.PRE_PRED:e==b.WRITING_BNODE_URI&&" "==c?b.PRE_PRED:e==b.WRITING_PRED_URI&&">"==c?b.PRE_OBJ:e==b.WRITING_OBJ_URI&&">"==c?b.POST_OBJ:e==b.WRITING_OBJ_BNODE&&" "==c?b.POST_OBJ:e==b.WRITING_OBJ_LITERAL&&'"'==c?b.POST_OBJ:e==b.WRITING_LIT_LANG&&" "==c?b.POST_OBJ:e==b.WRITING_LIT_TYPE&&">"==c?b.POST_OBJ:e==b.WRITING_OBJ_LITERAL&&"@"==c?b.WRITING_LIT_LANG:e==b.WRITING_OBJ_LITERAL&&"^"==c?b.WRITING_LIT_TYPE:" "!=c||e!=b.PRE_SUBJECT&&e!=b.PRE_PRED&&e!=b.PRE_OBJ&&e!=b.POST_OBJ?e==b.POST_OBJ&&"."==c?b.PRE_SUBJECT:b.ERROR:e,a.location=d}var b={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:b.PRE_SUBJECT,uris:[],anchors:[],bnodes:[],langs:[],types:[]}},token:function(b,c){var d=b.next();if("<"==d){a(c,d);var e="";return b.eatWhile(function(a){return"#"!=a&&">"!=a&&(e+=a,!0)}),c.uris.push(e),b.match("#",!1)?"variable":(b.next(),a(c,">"),"variable")}if("#"==d){var f="";return b.eatWhile(function(a){return">"!=a&&" "!=a&&(f+=a,!0)}),c.anchors.push(f),"variable-2"}if(">"==d)return a(c,">"),"variable";if("_"==d){a(c,d);var g="";return b.eatWhile(function(a){return" "!=a&&(g+=a,!0)}),c.bnodes.push(g),b.next(),a(c," "),"builtin"}if('"'==d)return a(c,d),b.eatWhile(function(a){return'"'!=a}),b.next(),"@"!=b.peek()&&"^"!=b.peek()&&a(c,'"'),"string";if("@"==d){a(c,"@");var h="";return b.eatWhile(function(a){return" "!=a&&(h+=a,!0)}),c.langs.push(h),b.next(),a(c," "),"string-2"}if("^"==d){b.next(),a(c,"^");var i="";return b.eatWhile(function(a){return">"!=a&&(i+=a,!0)}),c.types.push(i),b.next(),a(c,">"),"variable"}" "==d&&a(c,d),"."==d&&a(c,d)}}}),a.defineMIME("text/n-triples","ntriples")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/octave/octave.min.js b/media/vendor/codemirror/mode/octave/octave.min.js index 1bba2700f7599..98661db9a2b89 100644 --- a/media/vendor/codemirror/mode/octave/octave.min.js +++ b/media/vendor/codemirror/mode/octave/octave.min.js @@ -1 +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";e.defineMode("octave",function(){function e(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}function n(e,n){return e.sol()||"'"!==e.peek()?(n.tokenize=r,r(e,n)):(e.next(),n.tokenize=r,"operator")}function t(e,n){return e.match(/^.*%}/)?(n.tokenize=r,"comment"):(e.skipToEnd(),"comment")}function r(d,p){if(d.eatSpace())return null;if(d.match("%{"))return p.tokenize=t,d.skipToEnd(),"comment";if(d.match(/^[%#]/))return d.skipToEnd(),"comment";if(d.match(/^[0-9\.+-]/,!1)){if(d.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/))return d.tokenize=r,"number";if(d.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/))return"number";if(d.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/))return"number"}if(d.match(e(["nan","NaN","inf","Inf"])))return"number";var h=d.match(/^"(?:[^"]|"")*("|$)/)||d.match(/^'(?:[^']|'')*('|$)/);return h?h[1]?"string":"string error":d.match(l)?"keyword":d.match(s)?"builtin":d.match(u)?"variable":d.match(i)||d.match(a)?"operator":d.match(o)||d.match(c)||d.match(m)?null:d.match(f)?(p.tokenize=n,null):(d.next(),"error")}var i=new RegExp("^[\\+\\-\\*/&|\\^~<>!@'\\\\]"),o=new RegExp("^[\\(\\[\\{\\},:=;]"),a=new RegExp("^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))"),c=new RegExp("^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))"),m=new RegExp("^((>>=)|(<<=))"),f=new RegExp("^[\\]\\)]"),u=new RegExp("^[_A-Za-z¡-￿][_A-Za-z0-9¡-￿]*"),s=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"]),l=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,t){var r=t.tokenize(e,t);return"number"!==r&&"variable"!==r||(t.tokenize=n),r},lineComment:"%",fold:"indent"}}),e.defineMIME("text/x-octave","octave")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("octave",function(){function a(a){return new RegExp("^(("+a.join(")|(")+"))\\b")}function b(a,b){return a.sol()||"'"!==a.peek()?(b.tokenize=d,d(a,b)):(a.next(),b.tokenize=d,"operator")}function c(a,b){return a.match(/^.*%}/)?(b.tokenize=d,"comment"):(a.skipToEnd(),"comment")}function d(n,o){if(n.eatSpace())return null;if(n.match("%{"))return o.tokenize=c,n.skipToEnd(),"comment";if(n.match(/^[%#]/))return n.skipToEnd(),"comment";if(n.match(/^[0-9\.+-]/,!1)){if(n.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/))return n.tokenize=d,"number";if(n.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/))return"number";if(n.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/))return"number"}if(n.match(a(["nan","NaN","inf","Inf"])))return"number";var p=n.match(/^"(?:[^"]|"")*("|$)/)||n.match(/^'(?:[^']|'')*('|$)/);return p?p[1]?"string":"string error":n.match(m)?"keyword":n.match(l)?"builtin":n.match(k)?"variable":n.match(e)||n.match(g)?"operator":n.match(f)||n.match(h)||n.match(i)?null:n.match(j)?(o.tokenize=b,null):(n.next(),"error")}var e=new RegExp("^[\\+\\-\\*/&|\\^~<>!@'\\\\]"),f=new RegExp("^[\\(\\[\\{\\},:=;]"),g=new RegExp("^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))"),h=new RegExp("^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))"),i=new RegExp("^((>>=)|(<<=))"),j=new RegExp("^[\\]\\)]"),k=new RegExp("^[_A-Za-z¡-￿][_A-Za-z0-9¡-￿]*"),l=a(["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"]),m=a(["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:d}},token:function(a,c){var d=c.tokenize(a,c);return"number"!==d&&"variable"!==d||(c.tokenize=b),d},lineComment:"%",fold:"indent"}}),a.defineMIME("text/x-octave","octave")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/oz/oz.min.js b/media/vendor/codemirror/mode/oz/oz.min.js index a5da1e0ffb653..96fdc3bea1f6d 100644 --- a/media/vendor/codemirror/mode/oz/oz.min.js +++ b/media/vendor/codemirror/mode/oz/oz.min.js @@ -1 +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";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(f))return"operator";if(e.match(m))return"atom";var n=e.match(k);if(n)return t.doInCurrentLine?t.doInCurrentLine=!1:t.currentIndent++,"proc"==n[0]||"fun"==n[0]?t.tokenize=i:"class"==n[0]?t.tokenize=r:"meth"==n[0]&&(t.tokenize=o),"keyword";if(e.match(p)||e.match(h))return"keyword";if(e.match(z))return t.currentIndent--,"keyword";var s=e.next();if('"'==s||"'"==s)return t.tokenize=c(s),t.tokenize(e,t);if(/[~\d]/.test(s)){if("~"==s){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"==s&&e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/)?"number":null}return"%"==s?(e.skipToEnd(),"comment"):"/"==s&&e.eat("*")?(t.tokenize=a,a(e,t)):u.test(s)?"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 o(e,t){return e.eatSpace()?null:(e.match(/([a-zA-Z][A-Za-z0-9_]*)|(`.+`)/),t.tokenize=n,"def")}function i(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,o=!1;r=e.next();){if("/"==r&&o){t.tokenize=n;break}o="*"==r}return"comment"}function c(e){return function(t,r){for(var o,i=!1,a=!1;null!=(o=t.next());){if(o==e&&!i){a=!0;break}i=!i&&"\\"==o}return!a&&i||(r.tokenize=n),"string"}}var u=/[\^@!\|<>#~\.\*\-\+\\/,=]/,f=/(<-)|(:=)|(=<)|(>=)|(<=)|(<:)|(>:)|(=:)|(\\=)|(\\=:)|(!!)|(==)|(::)/,d=/(:::)|(\.\.\.)|(=<:)|(>=:)/,s=["in","then","else","of","elseof","elsecase","elseif","catch","finally","with","require","prepare","import","export","define","do"],l=["end"],m=t(["true","false","nil","unit"]),h=t(["andthen","at","attr","declare","feat","from","lex","mod","div","mode","orelse","parser","prod","prop","scanner","self","syn","token"]),k=t(["local","proc","fun","case","class","if","cond","or","dis","choice","not","thread","try","raise","lock","for","suchthat","meth","functor"]),p=t(s),z=t(l);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(z)||r.match(p)||r.match(/(\[])/)?e.indentUnit*(t.currentIndent-1):t.currentIndent<0?0:t.currentIndent*e.indentUnit},fold:"indent",electricInput:function(){var e=s.concat(l);return new RegExp("[\\[\\]]|("+e.join("|")+")$")}(),lineComment:"%",blockCommentStart:"/*",blockCommentEnd:"*/"}}),e.defineMIME("text/x-oz","oz")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("oz",function(a){function b(a){return new RegExp("^(("+a.join(")|(")+"))\\b")}function c(a,b){if(a.eatSpace())return null;if(a.match(/[{}]/))return"bracket";if(a.match(/(\[])/))return"keyword";if(a.match(k)||a.match(j))return"operator";if(a.match(n))return"atom";var c=a.match(p);if(c)return b.doInCurrentLine?b.doInCurrentLine=!1:b.currentIndent++,"proc"==c[0]||"fun"==c[0]?b.tokenize=f:"class"==c[0]?b.tokenize=d:"meth"==c[0]&&(b.tokenize=e),"keyword";if(a.match(q)||a.match(o))return"keyword";if(a.match(r))return b.currentIndent--,"keyword";var l=a.next();if('"'==l||"'"==l)return b.tokenize=h(l),b.tokenize(a,b);if(/[~\d]/.test(l)){if("~"==l){if(!/^[0-9]/.test(a.peek()))return null;if("0"==a.next()&&a.match(/^[xX][0-9a-fA-F]+/)||a.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/))return"number"}return"0"==l&&a.match(/^[xX][0-9a-fA-F]+/)||a.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/)?"number":null}return"%"==l?(a.skipToEnd(),"comment"):"/"==l&&a.eat("*")?(b.tokenize=g,g(a,b)):i.test(l)?"operator":(a.eatWhile(/\w/),"variable")}function d(a,b){return a.eatSpace()?null:(a.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)/),b.tokenize=c,"variable-3")}function e(a,b){return a.eatSpace()?null:(a.match(/([a-zA-Z][A-Za-z0-9_]*)|(`.+`)/),b.tokenize=c,"def")}function f(a,b){return a.eatSpace()?null:!b.hasPassedFirstStage&&a.eat("{")?(b.hasPassedFirstStage=!0,"bracket"):b.hasPassedFirstStage?(a.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)|\$/),b.hasPassedFirstStage=!1,b.tokenize=c,"def"):(b.tokenize=c,null)}function g(a,b){for(var d,e=!1;d=a.next();){if("/"==d&&e){b.tokenize=c;break}e="*"==d}return"comment"}function h(a){return function(b,d){for(var e,f=!1,g=!1;null!=(e=b.next());){if(e==a&&!f){g=!0;break}f=!f&&"\\"==e}return!g&&f||(d.tokenize=c),"string"}}var i=/[\^@!\|<>#~\.\*\-\+\\/,=]/,j=/(<-)|(:=)|(=<)|(>=)|(<=)|(<:)|(>:)|(=:)|(\\=)|(\\=:)|(!!)|(==)|(::)/,k=/(:::)|(\.\.\.)|(=<:)|(>=:)/,l=["in","then","else","of","elseof","elsecase","elseif","catch","finally","with","require","prepare","import","export","define","do"],m=["end"],n=b(["true","false","nil","unit"]),o=b(["andthen","at","attr","declare","feat","from","lex","mod","div","mode","orelse","parser","prod","prop","scanner","self","syn","token"]),p=b(["local","proc","fun","case","class","if","cond","or","dis","choice","not","thread","try","raise","lock","for","suchthat","meth","functor"]),q=b(l),r=b(m);return{startState:function(){return{tokenize:c,currentIndent:0,doInCurrentLine:!1,hasPassedFirstStage:!1}},token:function(a,b){return a.sol()&&(b.doInCurrentLine=0),b.tokenize(a,b)},indent:function(b,c){var d=c.replace(/^\s+|\s+$/g,"");return d.match(r)||d.match(q)||d.match(/(\[])/)?a.indentUnit*(b.currentIndent-1):b.currentIndent<0?0:b.currentIndent*a.indentUnit},fold:"indent",electricInput:function(){var a=l.concat(m);return new RegExp("[\\[\\]]|("+a.join("|")+")$")}(),lineComment:"%",blockCommentStart:"/*",blockCommentEnd:"*/"}}),a.defineMIME("text/x-oz","oz")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/pascal/pascal.min.js b/media/vendor/codemirror/mode/pascal/pascal.min.js index fdb29a46dc4f4..ec5d221c51bb2 100644 --- a/media/vendor/codemirror/mode/pascal/pascal.min.js +++ b/media/vendor/codemirror/mode/pascal/pascal.min.js @@ -1 +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";e.defineMode("pascal",function(){function e(e,a){var u=e.next();if("#"==u&&a.startOfLine)return e.skipToEnd(),"meta";if('"'==u||"'"==u)return a.tokenize=r(u),a.tokenize(e,a);if("("==u&&e.eat("*"))return a.tokenize=t,t(e,a);if(/[\[\]{}\(\),;\:\.]/.test(u))return null;if(/\d/.test(u))return e.eatWhile(/[\w\.]/),"number";if("/"==u&&e.eat("/"))return e.skipToEnd(),"comment";if(i.test(u))return e.eatWhile(i),"operator";e.eatWhile(/[\w\$_]/);var f=e.current();return n.propertyIsEnumerable(f)?"keyword":o.propertyIsEnumerable(f)?"atom":"variable"}function r(e){return function(r,t){for(var n,o=!1,i=!1;null!=(n=r.next());){if(n==e&&!o){i=!0;break}o=!o&&"\\"==n}return!i&&o||(t.tokenize=null),"string"}}function t(e,r){for(var t,n=!1;t=e.next();){if(")"==t&&n){r.tokenize=null;break}n="*"==t}return"comment"}var n=function(e){for(var r={},t=e.split(" "),n=0;n!?|\/]/;return{startState:function(){return{tokenize:null}},token:function(r,t){if(r.eatSpace())return null;var n=(t.tokenize||e)(r,t);return n},electricChars:"{}"}}),e.defineMIME("text/x-pascal","pascal")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("pascal",function(){function a(a,g){var h=a.next();if("#"==h&&g.startOfLine)return a.skipToEnd(),"meta";if('"'==h||"'"==h)return g.tokenize=b(h),g.tokenize(a,g);if("("==h&&a.eat("*"))return g.tokenize=c,c(a,g);if(/[\[\]{}\(\),;\:\.]/.test(h))return null;if(/\d/.test(h))return a.eatWhile(/[\w\.]/),"number";if("/"==h&&a.eat("/"))return a.skipToEnd(),"comment";if(f.test(h))return a.eatWhile(f),"operator";a.eatWhile(/[\w\$_]/);var i=a.current();return d.propertyIsEnumerable(i)?"keyword":e.propertyIsEnumerable(i)?"atom":"variable"}function b(a){return function(b,c){for(var d,e=!1,f=!1;null!=(d=b.next());){if(d==a&&!e){f=!0;break}e=!e&&"\\"==d}return!f&&e||(c.tokenize=null),"string"}}function c(a,b){for(var c,d=!1;c=a.next();){if(")"==c&&d){b.tokenize=null;break}d="*"==c}return"comment"}var d=function(a){for(var b={},c=a.split(" "),d=0;d!?|\/]/;return{startState:function(){return{tokenize:null}},token:function(b,c){if(b.eatSpace())return null;var d=(c.tokenize||a)(b,c);return d},electricChars:"{}"}}),a.defineMIME("text/x-pascal","pascal")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/pegjs/pegjs.min.js b/media/vendor/codemirror/mode/pegjs/pegjs.min.js index 7796aa3e004d6..fc7774412aead 100644 --- a/media/vendor/codemirror/mode/pegjs/pegjs.min.js +++ b/media/vendor/codemirror/mode/pegjs/pegjs.min.js @@ -1 +1 @@ -!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 a=r.token(t,i.localState),o=t.current();if(!a)for(var c=0;c=0?r:0,t)}return e.string.substr(0,e.pos-1)}function n(e,t){var r=e.string.length,n=r-e.pos+1;return e.string.substr(e.pos,t&&t=(r=e.string.length-1)?e.pos=r:e.pos=n}e.defineMode("perl",function(){function e(e,t,r,n,i){return t.chain=null,t.style=null,t.tail=null,t.tokenize=function(e,t){for(var s,a=!1,u=0;s=e.next();){if(s===r[u]&&!a)return void 0!==r[++u]?(t.chain=r[u],t.style=n,t.tail=i):i&&e.eatWhile(i),t.tokenize=o,n;a=!a&&"\\"==s}return n},t.tokenize(e,t)}function s(e,t,r){return t.tokenize=function(e,t){return e.string==r&&(t.tokenize=o),e.skipToEnd(),"string"},t.tokenize(e,t)}function o(o,l){if(o.eatSpace())return null;if(l.chain)return e(o,l,l.chain,l.style,l.tail);if(o.match(/^\-?[\d\.]/,!1)&&o.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/))return"number";if(o.match(/^<<(?=\w)/))return o.eatWhile(/\w/),s(o,l,o.current().substr(2));if(o.sol()&&o.match(/^\=item(?!\w)/))return s(o,l,"=cut");var f=o.next();if('"'==f||"'"==f){if(r(o,3)=="<<"+f){p=o.pos;o.eatWhile(/\w/);var E=o.current().substr(1);if(E&&o.eat(f))return s(o,l,E);o.pos=p}return e(o,l,[f],"string")}if(!("q"!=f||(R=t(o,-2))&&/\w/.test(R)))if("x"==(R=t(o,0))){if("("==(R=t(o,1)))return i(o,2),e(o,l,[")"],u,$);if("["==R)return i(o,2),e(o,l,["]"],u,$);if("{"==R)return i(o,2),e(o,l,["}"],u,$);if("<"==R)return i(o,2),e(o,l,[">"],u,$);if(/[\^'"!~\/]/.test(R))return i(o,1),e(o,l,[o.eat(R)],u,$)}else if("q"==R){if("("==(R=t(o,1)))return i(o,2),e(o,l,[")"],"string");if("["==R)return i(o,2),e(o,l,["]"],"string");if("{"==R)return i(o,2),e(o,l,["}"],"string");if("<"==R)return i(o,2),e(o,l,[">"],"string");if(/[\^'"!~\/]/.test(R))return i(o,1),e(o,l,[o.eat(R)],"string")}else if("w"==R){if("("==(R=t(o,1)))return i(o,2),e(o,l,[")"],"bracket");if("["==R)return i(o,2),e(o,l,["]"],"bracket");if("{"==R)return i(o,2),e(o,l,["}"],"bracket");if("<"==R)return i(o,2),e(o,l,[">"],"bracket");if(/[\^'"!~\/]/.test(R))return i(o,1),e(o,l,[o.eat(R)],"bracket")}else if("r"==R){if("("==(R=t(o,1)))return i(o,2),e(o,l,[")"],u,$);if("["==R)return i(o,2),e(o,l,["]"],u,$);if("{"==R)return i(o,2),e(o,l,["}"],u,$);if("<"==R)return i(o,2),e(o,l,[">"],u,$);if(/[\^'"!~\/]/.test(R))return i(o,1),e(o,l,[o.eat(R)],u,$)}else if(/[\^'"!~\/(\[{<]/.test(R)){if("("==R)return i(o,1),e(o,l,[")"],"string");if("["==R)return i(o,1),e(o,l,["]"],"string");if("{"==R)return i(o,1),e(o,l,["}"],"string");if("<"==R)return i(o,1),e(o,l,[">"],"string");if(/[\^'"!~\/]/.test(R))return e(o,l,[o.eat(R)],"string")}if("m"==f&&(!(R=t(o,-2))||!/\w/.test(R))&&(R=o.eat(/[(\[{<\^'"!~\/]/))){if(/[\^'"!~\/]/.test(R))return e(o,l,[R],u,$);if("("==R)return e(o,l,[")"],u,$);if("["==R)return e(o,l,["]"],u,$);if("{"==R)return e(o,l,["}"],u,$);if("<"==R)return e(o,l,[">"],u,$)}if("s"==f&&!(R=/[\/>\]})\w]/.test(t(o,-2)))&&(R=o.eat(/[(\[{<\^'"!~\/]/)))return"["==R?e(o,l,["]","]"],u,$):"{"==R?e(o,l,["}","}"],u,$):"<"==R?e(o,l,[">",">"],u,$):"("==R?e(o,l,[")",")"],u,$):e(o,l,[R,R],u,$);if("y"==f&&!(R=/[\/>\]})\w]/.test(t(o,-2)))&&(R=o.eat(/[(\[{<\^'"!~\/]/)))return"["==R?e(o,l,["]","]"],u,$):"{"==R?e(o,l,["}","}"],u,$):"<"==R?e(o,l,[">",">"],u,$):"("==R?e(o,l,[")",")"],u,$):e(o,l,[R,R],u,$);if("t"==f&&!(R=/[\/>\]})\w]/.test(t(o,-2)))&&(R=o.eat("r"))&&(R=o.eat(/[(\[{<\^'"!~\/]/)))return"["==R?e(o,l,["]","]"],u,$):"{"==R?e(o,l,["}","}"],u,$):"<"==R?e(o,l,[">",">"],u,$):"("==R?e(o,l,[")",")"],u,$):e(o,l,[R,R],u,$);if("`"==f)return e(o,l,[f],"variable-2");if("/"==f)return/~\s*$/.test(r(o))?e(o,l,[f],u,$):"operator";if("$"==f){p=o.pos;if(o.eatWhile(/\d/)||o.eat("{")&&o.eatWhile(/\d/)&&o.eat("}"))return"variable-2";o.pos=p}if(/[$@%]/.test(f)){p=o.pos;if(o.eat("^")&&o.eat(/[A-Z]/)||!/[@$%&]/.test(t(o,-2))&&o.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){R=o.current();if(a[R])return"variable-2"}o.pos=p}if(/[$@%&]/.test(f)&&(o.eatWhile(/[\w$\[\]]/)||o.eat("{")&&o.eatWhile(/[\w$\[\]]/)&&o.eat("}"))){var R=o.current();return a[R]?"variable-2":"variable"}if("#"==f&&"$"!=t(o,-2))return o.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(f)){p=o.pos;if(o.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),a[o.current()])return"operator";o.pos=p}if("_"==f&&1==o.pos){if("_END__"==n(o,6))return e(o,l,["\0"],"comment");if("_DATA__"==n(o,7))return e(o,l,["\0"],"variable-2");if("_C__"==n(o,7))return e(o,l,["\0"],"string")}if(/\w/.test(f)){p=o.pos;if("{"==t(o,-2)&&("}"==t(o,0)||o.eatWhile(/\w/)&&"}"==t(o,0)))return"string";o.pos=p}if(/[A-Z]/.test(f)){var c=t(o,-2),p=o.pos;if(o.eatWhile(/[A-Z_]/),!/[\da-z]/.test(t(o,0)))return(R=a[o.current()])?(R[1]&&(R=R[0]),":"!=c?1==R?"keyword":2==R?"def":3==R?"atom":4==R?"operator":5==R?"variable-2":"meta":"meta"):"meta";o.pos=p}if(/[a-zA-Z_]/.test(f)){c=t(o,-2);return o.eatWhile(/\w/),(R=a[o.current()])?(R[1]&&(R=R[0]),":"!=c?1==R?"keyword":2==R?"def":3==R?"atom":4==R?"operator":5==R?"variable-2":"meta":"meta"):"meta"}return null}var a={"->":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},u="string-2",$=/[goseximacplud]/;return{startState:function(){return{tokenize:o,chain:null,style:null,tail:null}},token:function(e,t){return(t.tokenize||o)(e,t)},lineComment:"#"}}),e.registerHelper("wordChars","perl",/[\w$]/),e.defineMIME("text/x-perl","perl")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){return a.string.charAt(a.pos+(b||0))}function c(a,b){if(b){var c=a.pos-b;return a.string.substr(c>=0?c:0,b)}return a.string.substr(0,a.pos-1)}function d(a,b){var c=a.string.length,d=c-a.pos+1;return a.string.substr(a.pos,b&&b=(c=a.string.length-1)?a.pos=c:a.pos=d}a.defineMode("perl",function(){function a(a,b,c,d,e){return b.chain=null,b.style=null,b.tail=null,b.tokenize=function(a,b){for(var f,h=!1,i=0;f=a.next();){if(f===c[i]&&!h)return void 0!==c[++i]?(b.chain=c[i],b.style=d,b.tail=e):e&&a.eatWhile(e),b.tokenize=g,d;h=!h&&"\\"==f}return d},b.tokenize(a,b)}function f(a,b,c){return b.tokenize=function(a,b){return a.string==c&&(b.tokenize=g),a.skipToEnd(),"string"},b.tokenize(a,b)}function g(g,k){if(g.eatSpace())return null;if(k.chain)return a(g,k,k.chain,k.style,k.tail);if(g.match(/^\-?[\d\.]/,!1)&&g.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/))return"number";if(g.match(/^<<(?=\w)/))return g.eatWhile(/\w/),f(g,k,g.current().substr(2));if(g.sol()&&g.match(/^\=item(?!\w)/))return f(g,k,"=cut");var l=g.next();if('"'==l||"'"==l){if(c(g,3)=="<<"+l){var m=g.pos;g.eatWhile(/\w/);var n=g.current().substr(1);if(n&&g.eat(l))return f(g,k,n);g.pos=m}return a(g,k,[l],"string")}if("q"==l){var o=b(g,-2);if(!o||!/\w/.test(o))if("x"==(o=b(g,0))){if("("==(o=b(g,1)))return e(g,2),a(g,k,[")"],i,j);if("["==o)return e(g,2),a(g,k,["]"],i,j);if("{"==o)return e(g,2),a(g,k,["}"],i,j);if("<"==o)return e(g,2),a(g,k,[">"],i,j);if(/[\^'"!~\/]/.test(o))return e(g,1),a(g,k,[g.eat(o)],i,j)}else if("q"==o){if("("==(o=b(g,1)))return e(g,2),a(g,k,[")"],"string");if("["==o)return e(g,2),a(g,k,["]"],"string");if("{"==o)return e(g,2),a(g,k,["}"],"string");if("<"==o)return e(g,2),a(g,k,[">"],"string");if(/[\^'"!~\/]/.test(o))return e(g,1),a(g,k,[g.eat(o)],"string")}else if("w"==o){if("("==(o=b(g,1)))return e(g,2),a(g,k,[")"],"bracket");if("["==o)return e(g,2),a(g,k,["]"],"bracket");if("{"==o)return e(g,2),a(g,k,["}"],"bracket");if("<"==o)return e(g,2),a(g,k,[">"],"bracket");if(/[\^'"!~\/]/.test(o))return e(g,1),a(g,k,[g.eat(o)],"bracket")}else if("r"==o){if("("==(o=b(g,1)))return e(g,2),a(g,k,[")"],i,j);if("["==o)return e(g,2),a(g,k,["]"],i,j);if("{"==o)return e(g,2),a(g,k,["}"],i,j);if("<"==o)return e(g,2),a(g,k,[">"],i,j);if(/[\^'"!~\/]/.test(o))return e(g,1),a(g,k,[g.eat(o)],i,j)}else if(/[\^'"!~\/(\[{<]/.test(o)){if("("==o)return e(g,1),a(g,k,[")"],"string");if("["==o)return e(g,1),a(g,k,["]"],"string");if("{"==o)return e(g,1),a(g,k,["}"],"string");if("<"==o)return e(g,1),a(g,k,[">"],"string");if(/[\^'"!~\/]/.test(o))return a(g,k,[g.eat(o)],"string")}}if("m"==l){var o=b(g,-2);if((!o||!/\w/.test(o))&&(o=g.eat(/[(\[{<\^'"!~\/]/))){if(/[\^'"!~\/]/.test(o))return a(g,k,[o],i,j);if("("==o)return a(g,k,[")"],i,j);if("["==o)return a(g,k,["]"],i,j);if("{"==o)return a(g,k,["}"],i,j);if("<"==o)return a(g,k,[">"],i,j)}}if("s"==l){var o=/[\/>\]})\w]/.test(b(g,-2));if(!o&&(o=g.eat(/[(\[{<\^'"!~\/]/)))return"["==o?a(g,k,["]","]"],i,j):"{"==o?a(g,k,["}","}"],i,j):"<"==o?a(g,k,[">",">"],i,j):"("==o?a(g,k,[")",")"],i,j):a(g,k,[o,o],i,j)}if("y"==l){var o=/[\/>\]})\w]/.test(b(g,-2));if(!o&&(o=g.eat(/[(\[{<\^'"!~\/]/)))return"["==o?a(g,k,["]","]"],i,j):"{"==o?a(g,k,["}","}"],i,j):"<"==o?a(g,k,[">",">"],i,j):"("==o?a(g,k,[")",")"],i,j):a(g,k,[o,o],i,j)}if("t"==l){var o=/[\/>\]})\w]/.test(b(g,-2));if(!o&&(o=g.eat("r"))&&(o=g.eat(/[(\[{<\^'"!~\/]/)))return"["==o?a(g,k,["]","]"],i,j):"{"==o?a(g,k,["}","}"],i,j):"<"==o?a(g,k,[">",">"],i,j):"("==o?a(g,k,[")",")"],i,j):a(g,k,[o,o],i,j)}if("`"==l)return a(g,k,[l],"variable-2");if("/"==l)return/~\s*$/.test(c(g))?a(g,k,[l],i,j):"operator";if("$"==l){var m=g.pos;if(g.eatWhile(/\d/)||g.eat("{")&&g.eatWhile(/\d/)&&g.eat("}"))return"variable-2";g.pos=m}if(/[$@%]/.test(l)){var m=g.pos;if(g.eat("^")&&g.eat(/[A-Z]/)||!/[@$%&]/.test(b(g,-2))&&g.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var o=g.current();if(h[o])return"variable-2"}g.pos=m}if(/[$@%&]/.test(l)&&(g.eatWhile(/[\w$\[\]]/)||g.eat("{")&&g.eatWhile(/[\w$\[\]]/)&&g.eat("}"))){var o=g.current();return h[o]?"variable-2":"variable"}if("#"==l&&"$"!=b(g,-2))return g.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(l)){var m=g.pos;if(g.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),h[g.current()])return"operator";g.pos=m}if("_"==l&&1==g.pos){if("_END__"==d(g,6))return a(g,k,["\0"],"comment");if("_DATA__"==d(g,7))return a(g,k,["\0"],"variable-2");if("_C__"==d(g,7))return a(g,k,["\0"],"string")}if(/\w/.test(l)){var m=g.pos;if("{"==b(g,-2)&&("}"==b(g,0)||g.eatWhile(/\w/)&&"}"==b(g,0)))return"string";g.pos=m}if(/[A-Z]/.test(l)){var p=b(g,-2),m=g.pos;if(g.eatWhile(/[A-Z_]/),!/[\da-z]/.test(b(g,0))){var o=h[g.current()];return o?(o[1]&&(o=o[0]),":"!=p?1==o?"keyword":2==o?"def":3==o?"atom":4==o?"operator":5==o?"variable-2":"meta":"meta"):"meta"}g.pos=m}if(/[a-zA-Z_]/.test(l)){var p=b(g,-2);g.eatWhile(/\w/);var o=h[g.current()];return o?(o[1]&&(o=o[0]),":"!=p?1==o?"keyword":2==o?"def":3==o?"atom":4==o?"operator":5==o?"variable-2":"meta":"meta"):"meta"}return null}var h={"->":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},i="string-2",j=/[goseximacplud]/;return{startState:function(){return{tokenize:g,chain:null,style:null,tail:null}},token:function(a,b){return(b.tokenize||g)(a,b)},lineComment:"#"}}),a.registerHelper("wordChars","perl",/[\w$]/),a.defineMIME("text/x-perl","perl")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/php/php.min.js b/media/vendor/codemirror/mode/php/php.min.js index 4ef229ff91fca..b024bd28a441c 100644 --- a/media/vendor/codemirror/mode/php/php.min.js +++ b/media/vendor/codemirror/mode/php/php.min.js @@ -1 +1 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},_=e.split(" "),r=0;r<_.length;++r)t[_[r]]=!0;return t}function _(e,t,s){return 0==e.length?r(t):function(i,l){for(var n=e[0],a=0;a\w/,!1)&&(t.tokenize=_([[["->",null]],[[/[\w]+/,"variable"]]],r,s)),"variable-2";for(var i=!1;!e.eol()&&(i||!1===s||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!i&&e.match(r)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}i="\\"==e.next()&&!i}return"string"}var i="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",l="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",n="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",[i,l,n].join(" ").split(" ")),e.registerHelper("wordChars","php",/[\w$]/);var a={name:"clike",helperType:"php",keywords:t(i),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class function interface namespace trait"),atoms:t(l),builtin:t(n),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var _;if(_=e.match(/<<\s*/)){var s=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var i=e.current().slice(_[0].length+(s?2:1));if(s&&e.eat(s),i)return(t.tokStack||(t.tokStack=[])).push(i,0),t.tokenize=r(i,"'"!=s),"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,_){function r(t,_){var r=_.curMode==i;if(t.sol()&&_.pending&&'"'!=_.pending&&"'"!=_.pending&&(_.pending=null),r)return r&&null==_.php.tokenize&&t.match("?>")?(_.curMode=s,_.curState=_.html,_.php.context.prev||(_.php=null),"meta"):i.token(t,_.curState);if(t.match(/^<\?\w*/))return _.curMode=i,_.php||(_.php=e.startState(i,s.indent(_.html,""))),_.curState=_.php,"meta";if('"'==_.pending||"'"==_.pending){for(;!t.eol()&&t.next()!=_.pending;);l="string"}else if(_.pending&&t.pos<_.pending.end){t.pos=_.pending.end;l=_.pending.style}else var l=s.token(t,_.curState);_.pending&&(_.pending=null);var n,a=t.current(),o=a.search(/<\?/);return-1!=o&&("string"==l&&(n=a.match(/[\'\"]$/))&&!/\?>/.test(a)?_.pending=n[0]:_.pending={end:t.pos,style:l},t.backUp(a.length-o)),l}var s=e.getMode(t,"text/html"),i=e.getMode(t,a);return{startState:function(){var t=e.startState(s),r=_.startOpen?e.startState(i):null;return{html:t,php:r,curMode:_.startOpen?i:s,curState:_.startOpen?r:t,pending:null}},copyState:function(t){var _,r=t.html,l=e.copyState(s,r),n=t.php,a=n&&e.copyState(i,n);return _=t.curMode==s?l:a,{html:l,php:a,curMode:t.curMode,curState:_,pending:t.pending}},token:r,indent:function(e,t){return e.curMode!=i&&/^\s*<\//.test(t)||e.curMode==i&&/^\?>/.test(t)?s.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",a)}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b={},c=a.split(" "),d=0;d\w/,!1)&&(b.tokenize=c([[["->",null]],[[/[\w]+/,"variable"]]],d,e)),"variable-2";for(var f=!1;!a.eol()&&(f||e===!1||!a.match("{$",!1)&&!a.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!f&&a.match(d)){b.tokenize=null,b.tokStack.pop(),b.tokStack.pop();break}f="\\"==a.next()&&!f}return"string"}var f="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",g="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",h="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";a.registerHelper("hintWords","php",[f,g,h].join(" ").split(" ")),a.registerHelper("wordChars","php",/[\w$]/);var i={name:"clike",helperType:"php",keywords:b(f),blockKeywords:b("catch do else elseif for foreach if switch try while finally"),defKeywords:b("class function interface namespace trait"),atoms:b(g),builtin:b(h),multiLineStrings:!0,hooks:{$:function(a){return a.eatWhile(/[\w\$_]/),"variable-2"},"<":function(a,b){var c;if(c=a.match(/<<\s*/)){var e=a.eat(/['"]/);a.eatWhile(/[\w\.]/);var f=a.current().slice(c[0].length+(e?2:1));if(e&&a.eat(e),f)return(b.tokStack||(b.tokStack=[])).push(f,0),b.tokenize=d(f,"'"!=e),"string"}return!1},"#":function(a){for(;!a.eol()&&!a.match("?>",!1);)a.next();return"comment"},"/":function(a){if(a.eat("/")){for(;!a.eol()&&!a.match("?>",!1);)a.next();return"comment"}return!1},'"':function(a,b){return(b.tokStack||(b.tokStack=[])).push('"',0),b.tokenize=d('"'),"string"},"{":function(a,b){return b.tokStack&&b.tokStack.length&&b.tokStack[b.tokStack.length-1]++,!1},"}":function(a,b){return b.tokStack&&b.tokStack.length>0&&!--b.tokStack[b.tokStack.length-1]&&(b.tokenize=d(b.tokStack[b.tokStack.length-2])),!1}}};a.defineMode("php",function(b,c){function d(b,c){var d=c.curMode==f;if(b.sol()&&c.pending&&'"'!=c.pending&&"'"!=c.pending&&(c.pending=null),d)return d&&null==c.php.tokenize&&b.match("?>")?(c.curMode=e,c.curState=c.html,c.php.context.prev||(c.php=null),"meta"):f.token(b,c.curState);if(b.match(/^<\?\w*/))return c.curMode=f,c.php||(c.php=a.startState(f,e.indent(c.html,""))),c.curState=c.php,"meta";if('"'==c.pending||"'"==c.pending){for(;!b.eol()&&b.next()!=c.pending;);var g="string"}else if(c.pending&&b.pos/.test(i)?c.pending=h[0]:c.pending={end:b.pos,style:g},b.backUp(i.length-j)),g}var e=a.getMode(b,"text/html"),f=a.getMode(b,i);return{startState:function(){var b=a.startState(e),d=c.startOpen?a.startState(f):null;return{html:b,php:d,curMode:c.startOpen?f:e,curState:c.startOpen?d:b,pending:null}},copyState:function(b){var c,d=b.html,g=a.copyState(e,d),h=b.php,i=h&&a.copyState(f,h);return c=b.curMode==e?g:i,{html:g,php:i,curMode:b.curMode,curState:c,pending:b.pending}},token:d,indent:function(a,b){return a.curMode!=f&&/^\s*<\//.test(b)||a.curMode==f&&/^\?>/.test(b)?e.indent(a.html,b):a.curMode.indent(a.curState,b)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(a){return{state:a.curState,mode:a.curMode}}}},"htmlmixed","clike"),a.defineMIME("application/x-httpd-php","php"),a.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),a.defineMIME("text/x-php",i)}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/pig/pig.min.js b/media/vendor/codemirror/mode/pig/pig.min.js index 189f90d8e10ba..f62bc741c0346 100644 --- a/media/vendor/codemirror/mode/pig/pig.min.js +++ b/media/vendor/codemirror/mode/pig/pig.min.js @@ -1 +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";e.defineMode("pig",function(e,O){function T(e,O,T){return O.tokenize=T,T(e,O)}function E(e,O){for(var T,E=!1;T=e.next();){if("/"==T&&E){O.tokenize=I;break}E="*"==T}return"comment"}function t(e){return function(O,T){for(var E,t=!1,N=!1;null!=(E=O.next());){if(E==e&&!t){N=!0;break}t=!t&&"\\"==E}return(N||!t&&!R)&&(T.tokenize=I),"error"}}function I(e,O){var I=e.next();return'"'==I||"'"==I?T(e,O,t(I)):/[\[\]{}\(\),;\.]/.test(I)?null:/\d/.test(I)?(e.eatWhile(/[\w\.]/),"number"):"/"==I?e.eat("*")?T(e,O,E):(e.eatWhile(S),"operator"):"-"==I?e.eat("-")?(e.skipToEnd(),"comment"):(e.eatWhile(S),"operator"):S.test(I)?(e.eatWhile(S),"operator"):(e.eatWhile(/[\w\$_]/),N&&N.propertyIsEnumerable(e.current().toUpperCase())&&!e.eat(")")&&!e.eat(".")?"keyword":r&&r.propertyIsEnumerable(e.current().toUpperCase())?"variable-2":A&&A.propertyIsEnumerable(e.current().toUpperCase())?"variable-3":"variable")}var N=O.keywords,r=O.builtins,A=O.types,R=O.multiLineStrings,S=/[*+\-%<>=&?:\/!|]/;return{startState:function(){return{tokenize:I,startOfLine:!0}},token:function(e,O){return e.eatSpace()?null:O.tokenize(e,O)}}}),function(){function O(e){for(var O={},T=e.split(" "),E=0;E=&?:\/!|]/;return{startState:function(){return{tokenize:f,startOfLine:!0}},token:function(a,b){return a.eatSpace()?null:b.tokenize(a,b)}}}),function(){function b(a){for(var b={},c=a.split(" "),d=0;d"==n){r.tokenize=t;break}o="#"===n}return"comment"}function c(e,r){var n=e.peek();return e.eat("{")?(r.tokenize=p,p(e,r)):void 0!=n&&n.match(m)?(e.eatWhile(m),r.tokenize=t,"variable-2"):(r.tokenize=t,"error")}function p(e,r){for(var n;null!=(n=e.next());)if("}"===n){r.tokenize=t;break}return"variable-2"}function l(e,r){var n=r.startQuote;if(e.sol()&&e.match(new RegExp(n+"@")))r.tokenize=t;else if('"'===n)for(;!e.eol();){var o=e.peek();if("$"===o)return r.tokenize=a,"string";e.next(),"`"===o&&e.next()}else e.skipToEnd();return"string"}var m=/[\w\-:]/,f=/[\[\]{},;`\.]|@[({]/,S=/^[A-Za-z\_][A-Za-z\-\_\d]*\b/,d={keyword: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:"(?=[^A-Za-z\\d\\-_]|$)"}),number:/^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i,operator:e([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:"-"}),/[+\-*\/%]=|\+\+|--|\.\.|[+\-*&^%:=!|\/]|<(?!#)|(?!#)>/],{suffix:""}),builtin:e([/[A-Z]:|%|\?/i,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:""})],{suffix:"(?=[^A-Za-z\\d\\-_]|$)"}),punctuation:f,identifier:S};return{startState:function(){return{returnStack:[],bracketNesting:0,tokenize:t}},token:function(e,t){return t.tokenize(e,t)},blockCommentStart:"<#",blockCommentEnd:"#>",lineComment:"#",fold:"brace"}}),e.defineMIME("application/x-powershell","powershell")}); \ No newline at end of file +!function(a){"use strict";"object"==typeof exports&&"object"==typeof module?a(require("codemirror")):"function"==typeof define&&define.amd?define(["codemirror"],a):a(window.CodeMirror)}(function(a){"use strict";a.defineMode("powershell",function(){function a(a,b){b=b||{};for(var c=void 0!==b.prefix?b.prefix:"^",d=void 0!==b.suffix?b.suffix:"\\b",e=0;e"==d){c.tokenize=b;break}e="#"===d}return"comment"}function j(a,c){var d=a.peek();return a.eat("{")?(c.tokenize=k,k(a,c)):void 0!=d&&d.match(m)?(a.eatWhile(m),c.tokenize=b,"variable-2"):(c.tokenize=b,"error")}function k(a,c){for(var d;null!=(d=a.next());)if("}"===d){c.tokenize=b;break}return"variable-2"}function l(a,c){var d=c.startQuote;if(a.sol()&&a.match(new RegExp(d+"@")))c.tokenize=b;else if('"'===d)for(;!a.eol();){var e=a.peek();if("$"===e)return c.tokenize=g,"string";a.next(),"`"===e&&a.next()}else a.skipToEnd();return"string"}var m=/[\w\-:]/,n=a([/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:"(?=[^A-Za-z\\d\\-_]|$)"}),o=a(["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:"-"}),p=a([o,/[+\-*\/%]=|\+\+|--|\.\.|[+\-*&^%:=!|\/]|<(?!#)|(?!#)>/],{suffix:""}),q=a([/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:""}),r=a([/[$?^_]|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=a([/[A-Z]:|%|\?/i,q,r],{suffix:"(?=[^A-Za-z\\d\\-_]|$)"}),t={keyword:n,number:/^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i,operator:p,builtin:s,punctuation:/[\[\]{},;`\.]|@[({]/,identifier:/^[A-Za-z\_][A-Za-z\-\_\d]*\b/};return{startState:function(){return{returnStack:[],bracketNesting:0,tokenize:b}},token:function(a,b){return b.tokenize(a,b)},blockCommentStart:"<#",blockCommentEnd:"#>",lineComment:"#",fold:"brace"}}),a.defineMIME("application/x-powershell","powershell")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/properties/properties.min.js b/media/vendor/codemirror/mode/properties/properties.min.js index d5aad0b173599..90d0636093826 100644 --- a/media/vendor/codemirror/mode/properties/properties.min.js +++ b/media/vendor/codemirror/mode/properties/properties.min.js @@ -1 +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";e.defineMode("properties",function(){return{token:function(e,i){var t=e.sol()||i.afterSection,n=e.eol();if(i.afterSection=!1,t&&(i.nextMultiline?(i.inMultiline=!0,i.nextMultiline=!1):i.position="def"),n&&!i.nextMultiline&&(i.inMultiline=!1,i.position="def"),t)for(;e.eatSpace(););var o=e.next();return!t||"#"!==o&&"!"!==o&&";"!==o?t&&"["===o?(i.afterSection=!0,e.skipTo("]"),e.eat("]"),"header"):"="===o||":"===o?(i.position="quote",null):("\\"===o&&"quote"===i.position&&e.eol()&&(i.nextMultiline=!0),i.position):(i.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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("properties",function(){return{token:function(a,b){var c=a.sol()||b.afterSection,d=a.eol();if(b.afterSection=!1,c&&(b.nextMultiline?(b.inMultiline=!0,b.nextMultiline=!1):b.position="def"),d&&!b.nextMultiline&&(b.inMultiline=!1,b.position="def"),c)for(;a.eatSpace(););var e=a.next();return!c||"#"!==e&&"!"!==e&&";"!==e?c&&"["===e?(b.afterSection=!0,a.skipTo("]"),a.eat("]"),"header"):"="===e||":"===e?(b.position="quote",null):("\\"===e&&"quote"===b.position&&a.eol()&&(b.nextMultiline=!0),b.position):(b.position="comment",a.skipToEnd(),"comment")},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}}}),a.defineMIME("text/x-properties","properties"),a.defineMIME("text/x-ini","properties")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/protobuf/protobuf.min.js b/media/vendor/codemirror/mode/protobuf/protobuf.min.js index bf7090c627610..579cf4638460e 100644 --- a/media/vendor/codemirror/mode/protobuf/protobuf.min.js +++ b/media/vendor/codemirror/mode/protobuf/protobuf.min.js @@ -1 +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){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(n)?"keyword":e.match(i)?"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"],n=function(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}(r);e.registerHelper("hintWords","protobuf",r);var i=new RegExp("^[_A-Za-z¡-￿][_A-Za-z0-9¡-￿]*");e.defineMode("protobuf",function(){return{token:t}}),e.defineMIME("text/x-protobuf","protobuf")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){if(a.eatSpace())return null;if(a.match("//"))return a.skipToEnd(),"comment";if(a.match(/^[0-9\.+-]/,!1)){if(a.match(/^[+-]?0x[0-9a-fA-F]+/))return"number";if(a.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/))return"number";if(a.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))return"number"}return a.match(/^"([^"]|(""))*"/)?"string":a.match(/^'([^']|(''))*'/)?"string":a.match(d)?"keyword":a.match(e)?"variable":(a.next(),null)}var c=["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"],d=function(a){return new RegExp("^(("+a.join(")|(")+"))\\b","i")}(c);a.registerHelper("hintWords","protobuf",c);var e=new RegExp("^[_A-Za-z¡-￿][_A-Za-z0-9¡-￿]*");a.defineMode("protobuf",function(){return{token:b}}),a.defineMIME("text/x-protobuf","protobuf")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/pug/pug.min.js b/media/vendor/codemirror/mode/pug/pug.min.js index afcac90732950..895ba46f1e69f 100644 --- a/media/vendor/codemirror/mode/pug/pug.min.js +++ b/media/vendor/codemirror/mode/pug/pug.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(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"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("pug",function(e){function n(){this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=t.startState(X),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 i(t,e){if(t.sol()&&(e.javaScriptLine=!1,e.javaScriptLineExcludesColon=!1),e.javaScriptLine){if(e.javaScriptLineExcludesColon&&":"===t.peek())return e.javaScriptLine=!1,void(e.javaScriptLineExcludesColon=!1);var n=X.token(t,e.jsState);return t.eol()&&(e.javaScriptLine=!1),n||!0}}function r(t,e){if(e.javaScriptArguments)return 0===e.javaScriptArgumentsDepth&&"("!==t.peek()?void(e.javaScriptArguments=!1):("("===t.peek()?e.javaScriptArgumentsDepth++:")"===t.peek()&&e.javaScriptArgumentsDepth--,0===e.javaScriptArgumentsDepth?void(e.javaScriptArguments=!1):X.token(t,e.jsState)||!0)}function a(t){if(t.match(/^yield\b/))return"keyword"}function s(t){if(t.match(/^(?:doctype) *([^\n]+)?/))return P}function c(t,e){if(t.match("#{"))return e.isInterpolating=!0,e.interpolationNesting=0,"punctuation"}function u(t,e){if(e.isInterpolating){if("}"===t.peek()){if(--e.interpolationNesting<0)return t.next(),e.isInterpolating=!1,"punctuation"}else"{"===t.peek()&&e.interpolationNesting++;return X.token(t,e.jsState)||!0}}function o(t,e){if(t.match(/^case\b/))return e.javaScriptLine=!0,K}function p(t,e){if(t.match(/^when\b/))return e.javaScriptLine=!0,e.javaScriptLineExcludesColon=!0,K}function f(t){if(t.match(/^default\b/))return K}function l(t,e){if(t.match(/^extends?\b/))return e.restOfLine="string",K}function h(t,e){if(t.match(/^append\b/))return e.restOfLine="variable",K}function d(t,e){if(t.match(/^prepend\b/))return e.restOfLine="variable",K}function m(t,e){if(t.match(/^block\b *(?:(prepend|append)\b)?/))return e.restOfLine="variable",K}function v(t,e){if(t.match(/^include\b/))return e.restOfLine="string",K}function S(t,e){if(t.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&t.match("include"))return e.isIncludeFiltered=!0,K}function g(t,e){if(e.isIncludeFiltered){var n=T(t,e);return e.isIncludeFiltered=!1,e.restOfLine="string",n}}function j(t,e){if(t.match(/^mixin\b/))return e.javaScriptLine=!0,K}function b(t,e){return t.match(/^\+([-\w]+)/)?(t.match(/^\( *[-\w]+ *=/,!1)||(e.javaScriptArguments=!0,e.javaScriptArgumentsDepth=0),"variable"):t.match(/^\+#{/,!1)?(t.next(),e.mixinCallAfter=!0,c(t,e)):void 0}function L(t,e){if(e.mixinCallAfter)return e.mixinCallAfter=!1,t.match(/^\( *[-\w]+ *=/,!1)||(e.javaScriptArguments=!0,e.javaScriptArgumentsDepth=0),!0}function A(t,e){if(t.match(/^(if|unless|else if|else)\b/))return e.javaScriptLine=!0,K}function k(t,e){if(t.match(/^(- *)?(each|for)\b/))return e.isEach=!0,K}function y(t,e){if(e.isEach){if(t.match(/^ in\b/))return e.javaScriptLine=!0,e.isEach=!1,K;if(t.sol()||t.eol())e.isEach=!1;else if(t.next()){for(;!t.match(/^ in\b/,!1)&&t.next(););return"variable"}}}function x(t,e){if(t.match(/^while\b/))return e.javaScriptLine=!0,K}function M(t,e){var n;if(n=t.match(/^(\w(?:[-:\w]*\w)?)\/?/))return e.lastTag=n[1].toLowerCase(),"script"===e.lastTag&&(e.scriptType="application/javascript"),"tag"}function T(n,i){if(n.match(/^:([\w\-]+)/)){var r;return e&&e.innerModes&&(r=e.innerModes(n.current().substring(1))),r||(r=n.current().substring(1)),"string"==typeof r&&(r=t.getMode(e,r)),Z(n,i,r),"atom"}}function N(t,e){if(t.match(/^(!?=|-)/))return e.javaScriptLine=!0,"punctuation"}function O(t){if(t.match(/^#([\w-]+)/))return Q}function w(t){if(t.match(/^\.([\w-]+)/))return R}function I(t,e){if("("==t.peek())return t.next(),e.isAttrs=!0,e.attrsNest=[],e.inAttributeName=!0,e.attrValue="",e.attributeIsType=!1,"punctuation"}function E(e,n){if(n.isAttrs){if(W[e.peek()]&&n.attrsNest.push(W[e.peek()]),n.attrsNest[n.attrsNest.length-1]===e.peek())n.attrsNest.pop();else if(e.eat(")"))return n.isAttrs=!1,"punctuation";if(n.inAttributeName&&e.match(/^[^=,\)!]+/))return"="!==e.peek()&&"!"!==e.peek()||(n.inAttributeName=!1,n.jsState=t.startState(X),"script"===n.lastTag&&"type"===e.current().trim().toLowerCase()?n.attributeIsType=!0:n.attributeIsType=!1),"attribute";var i=X.token(e,n.jsState);if(n.attributeIsType&&"string"===i&&(n.scriptType=e.current().toString()),0===n.attrsNest.length&&("string"===i||"variable"===i||"keyword"===i))try{return Function("","var x "+n.attrValue.replace(/,\s*$/,"").replace(/^!/,"")),n.inAttributeName=!0,n.attrValue="",e.backUp(e.current().length),E(e,n)}catch(t){}return n.attrValue+=e.current(),i||!0}}function C(t,e){if(t.match(/^&attributes\b/))return e.javaScriptArguments=!0,e.javaScriptArgumentsDepth=0,"keyword"}function F(t){if(t.sol()&&t.eatSpace())return"indent"}function D(t,e){if(t.match(/^ *\/\/(-)?([^\n]*)/))return e.indentOf=t.indentation(),e.indentToken="comment","comment"}function V(t){if(t.match(/^: */))return"colon"}function q(t,e){return t.match(/^(?:\| ?| )([^\n]+)/)?"string":t.match(/^(<[^\n]*)/,!1)?(Z(t,e,"htmlmixed"),e.innerModeForLine=!0,$(t,e,!0)):void 0}function z(t,e){if(t.eat(".")){var n=null;return"script"===e.lastTag&&-1!=e.scriptType.toLowerCase().indexOf("javascript")?n=e.scriptType.toLowerCase().replace(/"|'/g,""):"style"===e.lastTag&&(n="css"),Z(t,e,n),"dot"}}function U(t){return t.next(),null}function Z(n,i,r){r=t.mimeModes[r]||r,r=e.innerModes?e.innerModes(r)||r:r,r=t.mimeModes[r]||r,r=t.getMode(e,r),i.indentOf=n.indentation(),r&&"null"!==r.name?i.innerMode=r:i.indentToken="string"}function $(e,n,i){if(e.indentation()>n.indentOf||n.innerModeForLine&&!e.sol()||i)return n.innerMode?(n.innerState||(n.innerState=n.innerMode.startState?t.startState(n.innerMode,e.indentation()):{}),e.hideFirstChars(n.indentOf+2,function(){return n.innerMode.token(e,n.innerState)||!0})):(e.skipToEnd(),n.indentToken);e.sol()&&(n.indentOf=1/0,n.indentToken=null,n.innerMode=null,n.innerState=null)}function B(t,e){if(t.sol()&&(e.restOfLine=""),e.restOfLine){t.skipToEnd();var n=e.restOfLine;return e.restOfLine="",n}}function G(){return new n}function H(t){return t.copy()}function J(t,e){var n=$(t,e)||B(t,e)||u(t,e)||g(t,e)||y(t,e)||E(t,e)||i(t,e)||r(t,e)||L(t,e)||a(t,e)||s(t,e)||c(t,e)||o(t,e)||p(t,e)||f(t,e)||l(t,e)||h(t,e)||d(t,e)||m(t,e)||v(t,e)||S(t,e)||j(t,e)||b(t,e)||A(t,e)||k(t,e)||x(t,e)||M(t,e)||T(t,e)||N(t,e)||O(t,e)||w(t,e)||I(t,e)||C(t,e)||F(t,e)||q(t,e)||D(t,e)||V(t,e)||z(t,e)||U(t,e);return!0===n?null:n}var K="keyword",P="meta",Q="builtin",R="qualifier",W={"{":"}","(":")","[":"]"},X=t.getMode(e,"javascript");return n.prototype.copy=function(){var e=new n;return e.javaScriptLine=this.javaScriptLine,e.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,e.javaScriptArguments=this.javaScriptArguments,e.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,e.isInterpolating=this.isInterpolating,e.interpolationNesting=this.interpolationNesting,e.jsState=t.copyState(X,this.jsState),e.innerMode=this.innerMode,this.innerMode&&this.innerState&&(e.innerState=t.copyState(this.innerMode,this.innerState)),e.restOfLine=this.restOfLine,e.isIncludeFiltered=this.isIncludeFiltered,e.isEach=this.isEach,e.lastTag=this.lastTag,e.scriptType=this.scriptType,e.isAttrs=this.isAttrs,e.attrsNest=this.attrsNest.slice(),e.inAttributeName=this.inAttributeName,e.attributeIsType=this.attributeIsType,e.attrValue=this.attrValue,e.indentOf=this.indentOf,e.indentToken=this.indentToken,e.innerModeForLine=this.innerModeForLine,e},{startState:G,copyState:H,token:J}},"javascript","css","htmlmixed"),t.defineMIME("text/x-pug","pug"),t.defineMIME("text/x-jade","pug")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(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"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("pug",function(b){function c(){this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=a.startState(Z),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 d(a,b){if(a.sol()&&(b.javaScriptLine=!1,b.javaScriptLineExcludesColon=!1),b.javaScriptLine){if(b.javaScriptLineExcludesColon&&":"===a.peek())return b.javaScriptLine=!1,void(b.javaScriptLineExcludesColon=!1);var c=Z.token(a,b.jsState);return a.eol()&&(b.javaScriptLine=!1),c||!0}}function e(a,b){if(b.javaScriptArguments){if(0===b.javaScriptArgumentsDepth&&"("!==a.peek())return void(b.javaScriptArguments=!1);if("("===a.peek()?b.javaScriptArgumentsDepth++:")"===a.peek()&&b.javaScriptArgumentsDepth--,0===b.javaScriptArgumentsDepth)return void(b.javaScriptArguments=!1);return Z.token(a,b.jsState)||!0}}function f(a){if(a.match(/^yield\b/))return"keyword"}function g(a){if(a.match(/^(?:doctype) *([^\n]+)?/))return V}function h(a,b){if(a.match("#{"))return b.isInterpolating=!0,b.interpolationNesting=0,"punctuation"}function i(a,b){if(b.isInterpolating){if("}"===a.peek()){if(--b.interpolationNesting<0)return a.next(),b.isInterpolating=!1,"punctuation"}else"{"===a.peek()&&b.interpolationNesting++;return Z.token(a,b.jsState)||!0}}function j(a,b){if(a.match(/^case\b/))return b.javaScriptLine=!0,U}function k(a,b){if(a.match(/^when\b/))return b.javaScriptLine=!0,b.javaScriptLineExcludesColon=!0,U}function l(a){if(a.match(/^default\b/))return U}function m(a,b){if(a.match(/^extends?\b/))return b.restOfLine="string",U}function n(a,b){if(a.match(/^append\b/))return b.restOfLine="variable",U}function o(a,b){if(a.match(/^prepend\b/))return b.restOfLine="variable",U}function p(a,b){if(a.match(/^block\b *(?:(prepend|append)\b)?/))return b.restOfLine="variable",U}function q(a,b){if(a.match(/^include\b/))return b.restOfLine="string",U}function r(a,b){if(a.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&a.match("include"))return b.isIncludeFiltered=!0,U}function s(a,b){if(b.isIncludeFiltered){var c=B(a,b);return b.isIncludeFiltered=!1,b.restOfLine="string",c}}function t(a,b){if(a.match(/^mixin\b/))return b.javaScriptLine=!0,U}function u(a,b){return a.match(/^\+([-\w]+)/)?(a.match(/^\( *[-\w]+ *=/,!1)||(b.javaScriptArguments=!0,b.javaScriptArgumentsDepth=0),"variable"):a.match(/^\+#{/,!1)?(a.next(),b.mixinCallAfter=!0,h(a,b)):void 0}function v(a,b){if(b.mixinCallAfter)return b.mixinCallAfter=!1,a.match(/^\( *[-\w]+ *=/,!1)||(b.javaScriptArguments=!0,b.javaScriptArgumentsDepth=0),!0}function w(a,b){if(a.match(/^(if|unless|else if|else)\b/))return b.javaScriptLine=!0,U}function x(a,b){if(a.match(/^(- *)?(each|for)\b/))return b.isEach=!0,U}function y(a,b){if(b.isEach){if(a.match(/^ in\b/))return b.javaScriptLine=!0,b.isEach=!1,U;if(a.sol()||a.eol())b.isEach=!1;else if(a.next()){for(;!a.match(/^ in\b/,!1)&&a.next(););return"variable"}}}function z(a,b){if(a.match(/^while\b/))return b.javaScriptLine=!0,U}function A(a,b){var c;if(c=a.match(/^(\w(?:[-:\w]*\w)?)\/?/))return b.lastTag=c[1].toLowerCase(),"script"===b.lastTag&&(b.scriptType="application/javascript"),"tag"}function B(c,d){if(c.match(/^:([\w\-]+)/)){var e;return b&&b.innerModes&&(e=b.innerModes(c.current().substring(1))),e||(e=c.current().substring(1)),"string"==typeof e&&(e=a.getMode(b,e)),O(c,d,e),"atom"}}function C(a,b){if(a.match(/^(!?=|-)/))return b.javaScriptLine=!0,"punctuation"}function D(a){if(a.match(/^#([\w-]+)/))return W}function E(a){if(a.match(/^\.([\w-]+)/))return X}function F(a,b){if("("==a.peek())return a.next(),b.isAttrs=!0,b.attrsNest=[],b.inAttributeName=!0,b.attrValue="",b.attributeIsType=!1,"punctuation"}function G(b,c){if(c.isAttrs){if(Y[b.peek()]&&c.attrsNest.push(Y[b.peek()]),c.attrsNest[c.attrsNest.length-1]===b.peek())c.attrsNest.pop();else if(b.eat(")"))return c.isAttrs=!1,"punctuation";if(c.inAttributeName&&b.match(/^[^=,\)!]+/))return"="!==b.peek()&&"!"!==b.peek()||(c.inAttributeName=!1,c.jsState=a.startState(Z),"script"===c.lastTag&&"type"===b.current().trim().toLowerCase()?c.attributeIsType=!0:c.attributeIsType=!1),"attribute";var d=Z.token(b,c.jsState);if(c.attributeIsType&&"string"===d&&(c.scriptType=b.current().toString()),0===c.attrsNest.length&&("string"===d||"variable"===d||"keyword"===d))try{return Function("","var x "+c.attrValue.replace(/,\s*$/,"").replace(/^!/,"")),c.inAttributeName=!0,c.attrValue="",b.backUp(b.current().length),G(b,c)}catch(a){}return c.attrValue+=b.current(),d||!0}}function H(a,b){if(a.match(/^&attributes\b/))return b.javaScriptArguments=!0,b.javaScriptArgumentsDepth=0,"keyword"}function I(a){if(a.sol()&&a.eatSpace())return"indent"}function J(a,b){if(a.match(/^ *\/\/(-)?([^\n]*)/))return b.indentOf=a.indentation(),b.indentToken="comment","comment"}function K(a){if(a.match(/^: */))return"colon"}function L(a,b){return a.match(/^(?:\| ?| )([^\n]+)/)?"string":a.match(/^(<[^\n]*)/,!1)?(O(a,b,"htmlmixed"),b.innerModeForLine=!0,P(a,b,!0)):void 0}function M(a,b){if(a.eat(".")){var c=null;return"script"===b.lastTag&&b.scriptType.toLowerCase().indexOf("javascript")!=-1?c=b.scriptType.toLowerCase().replace(/"|'/g,""):"style"===b.lastTag&&(c="css"),O(a,b,c),"dot"}}function N(a){return a.next(),null}function O(c,d,e){e=a.mimeModes[e]||e,e=b.innerModes?b.innerModes(e)||e:e,e=a.mimeModes[e]||e,e=a.getMode(b,e),d.indentOf=c.indentation(),e&&"null"!==e.name?d.innerMode=e:d.indentToken="string"}function P(b,c,d){if(b.indentation()>c.indentOf||c.innerModeForLine&&!b.sol()||d)return c.innerMode?(c.innerState||(c.innerState=c.innerMode.startState?a.startState(c.innerMode,b.indentation()):{}),b.hideFirstChars(c.indentOf+2,function(){return c.innerMode.token(b,c.innerState)||!0})):(b.skipToEnd(),c.indentToken);b.sol()&&(c.indentOf=1/0,c.indentToken=null,c.innerMode=null,c.innerState=null)}function Q(a,b){if(a.sol()&&(b.restOfLine=""),b.restOfLine){a.skipToEnd();var c=b.restOfLine;return b.restOfLine="",c}}function R(){return new c}function S(a){return a.copy()}function T(a,b){var c=P(a,b)||Q(a,b)||i(a,b)||s(a,b)||y(a,b)||G(a,b)||d(a,b)||e(a,b)||v(a,b)||f(a,b)||g(a,b)||h(a,b)||j(a,b)||k(a,b)||l(a,b)||m(a,b)||n(a,b)||o(a,b)||p(a,b)||q(a,b)||r(a,b)||t(a,b)||u(a,b)||w(a,b)||x(a,b)||z(a,b)||A(a,b)||B(a,b)||C(a,b)||D(a,b)||E(a,b)||F(a,b)||H(a,b)||I(a,b)||L(a,b)||J(a,b)||K(a,b)||M(a,b)||N(a,b);return c===!0?null:c}var U="keyword",V="meta",W="builtin",X="qualifier",Y={"{":"}","(":")","[":"]"},Z=a.getMode(b,"javascript");return c.prototype.copy=function(){var b=new c;return b.javaScriptLine=this.javaScriptLine,b.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,b.javaScriptArguments=this.javaScriptArguments,b.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,b.isInterpolating=this.isInterpolating,b.interpolationNesting=this.interpolationNesting,b.jsState=a.copyState(Z,this.jsState),b.innerMode=this.innerMode,this.innerMode&&this.innerState&&(b.innerState=a.copyState(this.innerMode,this.innerState)),b.restOfLine=this.restOfLine,b.isIncludeFiltered=this.isIncludeFiltered,b.isEach=this.isEach,b.lastTag=this.lastTag,b.scriptType=this.scriptType,b.isAttrs=this.isAttrs,b.attrsNest=this.attrsNest.slice(),b.inAttributeName=this.inAttributeName,b.attributeIsType=this.attributeIsType,b.attrValue=this.attrValue,b.indentOf=this.indentOf,b.indentToken=this.indentToken,b.innerModeForLine=this.innerModeForLine,b},{startState:R,copyState:S,token:T}},"javascript","css","htmlmixed"),a.defineMIME("text/x-pug","pug"),a.defineMIME("text/x-jade","pug")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/puppet/puppet.min.js b/media/vendor/codemirror/mode/puppet/puppet.min.js index 094941e053266..5ee0675bf5e87 100644 --- a/media/vendor/codemirror/mode/puppet/puppet.min.js +++ b/media/vendor/codemirror/mode/puppet/puppet.min.js @@ -1 +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";e.defineMode("puppet",function(){function e(e,n){for(var t=n.split(" "),o=0;o.*/,!1),s=e.match(/(\s+)?[\w:_]+(\s+)?{/,!1),c=e.match(/(\s+)?[@]{1,2}[\w:_]+(\s+)?{/,!1),u=e.next();if("$"===u)return e.match(o)?t.continueString?"variable-2":"variable":"error";if(t.continueString)return e.backUp(1),n(e,t);if(t.inDefinition){if(e.match(/(\s+)?[\w:_]+(\s+)?/))return"def";e.match(/\s+{/),t.inDefinition=!1}return t.inInclude?(e.match(/(\s+)?\S+(\s+)?/),t.inInclude=!1,"def"):e.match(/(\s+)?\w+\(/)?(e.backUp(1),"def"):r?(e.match(/(\s+)?\w+/),"tag"):a&&i.hasOwnProperty(a)?(e.backUp(1),e.match(/[\w]+/),e.match(/\s+\S+\s+{/,!1)&&(t.inDefinition=!0),"include"==a&&(t.inInclude=!0),i[a]):/(^|\s+)[A-Z][\w:_]+/.test(a)?(e.backUp(1),e.match(/(^|\s+)[A-Z][\w:_]+/),"def"):s?(e.match(/(\s+)?[\w:_]+/),"def"):c?(e.match(/(\s+)?[@]{1,2}/),"special"):"#"==u?(e.skipToEnd(),"comment"):"'"==u||'"'==u?(t.pending=u,n(e,t)):"{"==u||"}"==u?"bracket":"/"==u?(e.match(/.*?\//),"variable-3"):u.match(/[0-9]/)?(e.eatWhile(/[0-9]+/),"number"):"="==u?(">"==e.peek()&&e.next(),"operator"):(e.eatWhile(/[\w-]/),null)}var i={},o=/({)?([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,n){return e.eatSpace()?null:t(e,n)}}}),e.defineMIME("text/x-puppet","puppet")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("puppet",function(){function a(a,b){for(var c=b.split(" "),e=0;e.*/,!1),h=a.match(/(\s+)?[\w:_]+(\s+)?{/,!1),i=a.match(/(\s+)?[@]{1,2}[\w:_]+(\s+)?{/,!1),j=a.next();if("$"===j)return a.match(e)?c.continueString?"variable-2":"variable":"error";if(c.continueString)return a.backUp(1),b(a,c);if(c.inDefinition){if(a.match(/(\s+)?[\w:_]+(\s+)?/))return"def";a.match(/\s+{/),c.inDefinition=!1}return c.inInclude?(a.match(/(\s+)?\S+(\s+)?/),c.inInclude=!1,"def"):a.match(/(\s+)?\w+\(/)?(a.backUp(1),"def"):g?(a.match(/(\s+)?\w+/),"tag"):f&&d.hasOwnProperty(f)?(a.backUp(1),a.match(/[\w]+/),a.match(/\s+\S+\s+{/,!1)&&(c.inDefinition=!0),"include"==f&&(c.inInclude=!0),d[f]):/(^|\s+)[A-Z][\w:_]+/.test(f)?(a.backUp(1),a.match(/(^|\s+)[A-Z][\w:_]+/),"def"):h?(a.match(/(\s+)?[\w:_]+/),"def"):i?(a.match(/(\s+)?[@]{1,2}/),"special"):"#"==j?(a.skipToEnd(),"comment"):"'"==j||'"'==j?(c.pending=j,b(a,c)):"{"==j||"}"==j?"bracket":"/"==j?(a.match(/.*?\//),"variable-3"):j.match(/[0-9]/)?(a.eatWhile(/[0-9]+/),"number"):"="==j?(">"==a.peek()&&a.next(),"operator"):(a.eatWhile(/[\w-]/),null)}var d={},e=/({)?([a-z][a-z0-9_]*)?((::[a-z][a-z0-9_]*)*::)?[a-zA-Z0-9_]+(})?/;return a("keyword","class define site node include import inherits"),a("keyword","case if else in and elsif default or"),a("atom","false true running present absent file directory undef"),a("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 a={};return a.inDefinition=!1,a.inInclude=!1,a.continueString=!1,a.pending=!1,a},token:function(a,b){return a.eatSpace()?null:c(a,b)}}}),a.defineMIME("text/x-puppet","puppet")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/python/python.js b/media/vendor/codemirror/mode/python/python.js index b539d84aa6a92..2d2b08c810f83 100644 --- a/media/vendor/codemirror/mode/python/python.js +++ b/media/vendor/codemirror/mode/python/python.js @@ -332,8 +332,8 @@ CodeMirror.defineMIME("text/x-cython", { name: "python", - extra_keywords: words("by cdef cimport cpdef ctypedef enum except"+ - "extern gil include nogil property public"+ + extra_keywords: words("by cdef cimport cpdef ctypedef enum except "+ + "extern gil include nogil property public "+ "readonly struct union DEF IF ELIF ELSE") }); diff --git a/media/vendor/codemirror/mode/python/python.min.js b/media/vendor/codemirror/mode/python/python.min.js index 0955f0834fc4f..a7d41f60da6a2 100644 --- a/media/vendor/codemirror/mode/python/python.min.js +++ b/media/vendor/codemirror/mode/python/python.min.js @@ -1 +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){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?p(t):i0&&d(e,t)&&(o+=" "+h),o}return c(e,t)}function c(e,t){if(e.eatSpace())return null;if("#"==e.peek())return e.skipToEnd(),"comment";if(e.match(/^[0-9\.]/,!1)){var n=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(n=!0),e.match(/^[\d_]+\.\d*/)&&(n=!0),e.match(/^\.\d+/)&&(n=!0),n)return e.eat(/J/i),"number";var i=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(i=!0),e.match(/^0b[01_]+/i)&&(i=!0),e.match(/^0o[0-7_]+/i)&&(i=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),i=!0),e.match(/^0(?![\dx])/i)&&(i=!0),i)return e.eat(/L/i),"number"}return e.match(E)?(t.tokenize=u(e.current()),t.tokenize(e,t)):e.match(v)||e.match(g)?"punctuation":e.match(y)||e.match(z)?"operator":e.match(b)?"punctuation":"."==t.lastToken&&e.match(F)?"property":e.match(T)||e.match(r)?"keyword":e.match(O)?"builtin":e.match(/^(self|cls)\b/)?"variable-2":e.match(F)?"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 p(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 d(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(F,!1)?"meta":w?"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||p(t);var o=1==i.length?"[({".indexOf(i):-1;if(-1!=o&&f(e,t,"])}".slice(o,o+1)),-1!=(o="])}".indexOf(i))){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",b=s.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.]/,y=s.doubleOperators||/^([!<>]==|<>|<<|>>|\/\/|\*\*)/,g=s.doubleDelimiters||/^(\+=|\-=|\*=|%=|\/=|&=|\|=|\^=)/,v=s.tripleDelimiters||/^(\/\/=|>>=|<<=|\*\*=)/,x=s.hangingIndent||a.indentUnit,k=i,_=o;void 0!=s.extra_keywords&&(k=k.concat(s.extra_keywords)),void 0!=s.extra_builtins&&(_=_.concat(s.extra_builtins));var w=!(s.version&&Number(s.version)<3);if(w){var z=s.singleOperators||/^[\+\-\*\/%&|\^~<>!@]/,F=s.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;k=k.concat(["nonlocal","False","True","None","async","await"]),_=_.concat(["ascii","bytes","exec","print"]);E=new RegExp("^(([rbuf]|(br))?('{3}|\"{3}|['\"]))","i")}else{var z=s.singleOperators||/^[\+\-\*\/%&|\^~<>!]/,F=s.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/;k=k.concat(["exec","print"]),_=_.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),O=t(_);return{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"}}),e.defineMIME("text/x-python","python");e.defineMIME("text/x-cython",{name:"python",extra_keywords:function(e){return e.split(" ")}("by cdef cimport cpdef ctypedef enum exceptextern gil include nogil property publicreadonly struct union DEF IF ELIF ELSE")})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){return new RegExp("^(("+a.join(")|(")+"))\\b")}function c(a){return a.scopes[a.scopes.length-1]}var d=b(["and","or","not","is"]),e=["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"],f=["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__"];a.registerHelper("hintWords","python",e.concat(f)),a.defineMode("python",function(g,h){function i(a,b){if(a.sol()&&(b.indent=a.indentation()),a.sol()&&"py"==c(b).type){var d=c(b).offset;if(a.eatSpace()){var e=a.indentation();return e>d?l(b):e0&&n(a,b)&&(f+=" "+p),f}return j(a,b)}function j(a,b){if(a.eatSpace())return null;if("#"==a.peek())return a.skipToEnd(),"comment";if(a.match(/^[0-9\.]/,!1)){var c=!1;if(a.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(c=!0),a.match(/^[\d_]+\.\d*/)&&(c=!0),a.match(/^\.\d+/)&&(c=!0),c)return a.eat(/J/i),"number";var e=!1;if(a.match(/^0x[0-9a-f_]+/i)&&(e=!0),a.match(/^0b[01_]+/i)&&(e=!0),a.match(/^0o[0-7_]+/i)&&(e=!0),a.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(a.eat(/J/i),e=!0),a.match(/^0(?![\dx])/i)&&(e=!0),e)return a.eat(/L/i),"number"}return a.match(A)?(b.tokenize=k(a.current()),b.tokenize(a,b)):a.match(t)||a.match(s)?"punctuation":a.match(r)||a.match(y)?"operator":a.match(q)?"punctuation":"."==b.lastToken&&a.match(z)?"property":a.match(B)||a.match(d)?"keyword":a.match(C)?"builtin":a.match(/^(self|cls)\b/)?"variable-2":a.match(z)?"def"==b.lastToken||"class"==b.lastToken?"def":"variable":(a.next(),p)}function k(a){function b(b,e){for(;!b.eol();)if(b.eatWhile(/[^'"\\]/),b.eat("\\")){if(b.next(),c&&b.eol())return d}else{if(b.match(a))return e.tokenize=i,d;b.eat(/['"]/)}if(c){if(h.singleLineStringErrors)return p;e.tokenize=i}return d}for(;"rubf".indexOf(a.charAt(0).toLowerCase())>=0;)a=a.substr(1);var c=1==a.length,d="string";return b.isString=!0,b}function l(a){for(;"py"!=c(a).type;)a.scopes.pop();a.scopes.push({offset:c(a).offset+g.indentUnit,type:"py",align:null})}function m(a,b,c){var d=a.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:a.column()+1;b.scopes.push({offset:b.indent+u,type:c,align:d})}function n(a,b){for(var d=a.indentation();b.scopes.length>1&&c(b).offset>d;){if("py"!=c(b).type)return!0;b.scopes.pop()}return c(b).offset!=d}function o(a,b){a.sol()&&(b.beginningOfLine=!0);var d=b.tokenize(a,b),e=a.current();if(b.beginningOfLine&&"@"==e)return a.match(z,!1)?"meta":x?"operator":p;/\S/.test(e)&&(b.beginningOfLine=!1),"variable"!=d&&"builtin"!=d||"meta"!=b.lastToken||(d="meta"),"pass"!=e&&"return"!=e||(b.dedent+=1),"lambda"==e&&(b.lambda=!0),":"!=e||b.lambda||"py"!=c(b).type||l(b);var f=1==e.length?"[({".indexOf(e):-1;if(f!=-1&&m(a,b,"])}".slice(f,f+1)),(f="])}".indexOf(e))!=-1){if(c(b).type!=e)return p;b.indent=b.scopes.pop().offset-u}return b.dedent>0&&a.eol()&&"py"==c(b).type&&(b.scopes.length>1&&b.scopes.pop(),b.dedent-=1),d}var p="error",q=h.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.]/,r=h.doubleOperators||/^([!<>]==|<>|<<|>>|\/\/|\*\*)/,s=h.doubleDelimiters||/^(\+=|\-=|\*=|%=|\/=|&=|\|=|\^=)/,t=h.tripleDelimiters||/^(\/\/=|>>=|<<=|\*\*=)/,u=h.hangingIndent||g.indentUnit,v=e,w=f;void 0!=h.extra_keywords&&(v=v.concat(h.extra_keywords)),void 0!=h.extra_builtins&&(w=w.concat(h.extra_builtins));var x=!(h.version&&Number(h.version)<3);if(x){var y=h.singleOperators||/^[\+\-\*\/%&|\^~<>!@]/,z=h.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;v=v.concat(["nonlocal","False","True","None","async","await"]),w=w.concat(["ascii","bytes","exec","print"]);var A=new RegExp("^(([rbuf]|(br))?('{3}|\"{3}|['\"]))","i")}else{var y=h.singleOperators||/^[\+\-\*\/%&|\^~<>!]/,z=h.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/;v=v.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 A=new RegExp("^(([rubf]|(ur)|(br))?('{3}|\"{3}|['\"]))","i")}var B=b(v),C=b(w);return{startState:function(a){return{tokenize:i,scopes:[{offset:a||0,type:"py",align:null}],indent:a||0,lastToken:null,lambda:!1,dedent:0}},token:function(a,b){var c=b.errorToken;c&&(b.errorToken=!1);var d=o(a,b);return d&&"comment"!=d&&(b.lastToken="keyword"==d||"punctuation"==d?a.current():d),"punctuation"==d&&(d=null),a.eol()&&b.lambda&&(b.lambda=!1),c?d+" "+p:d},indent:function(b,d){if(b.tokenize!=i)return b.tokenize.isString?a.Pass:0;var e=c(b),f=e.type==d.charAt(0);return null!=e.align?e.align-(f?1:0):e.offset-(f?u:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"}}),a.defineMIME("text/x-python","python");a.defineMIME("text/x-cython",{name:"python",extra_keywords:function(a){return a.split(" ")}("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/q/q.js b/media/vendor/codemirror/mode/q/q.js index a4af9383e7b3b..9aee18ab1e912 100644 --- a/media/vendor/codemirror/mode/q/q.js +++ b/media/vendor/codemirror/mode/q/q.js @@ -25,7 +25,7 @@ CodeMirror.defineMode("q",function(config){ return(state.tokenize=tokenLineComment)(stream,state); else if(c=="\\"){ if(stream.eol()||/\s/.test(stream.peek())) - return stream.skipToEnd(),/^\\\s*$/.test(stream.current())?(state.tokenize=tokenCommentToEOF)(stream, state):state.tokenize=tokenBase,"comment"; + return stream.skipToEnd(),/^\\\s*$/.test(stream.current())?(state.tokenize=tokenCommentToEOF)(stream):state.tokenize=tokenBase,"comment"; else return state.tokenize=tokenBase,"builtin"; } @@ -34,25 +34,25 @@ CodeMirror.defineMode("q",function(config){ if(c=='"') return(state.tokenize=tokenString)(stream,state); if(c=='`') - return stream.eatWhile(/[A-Z|a-z|\d|_|:|\/|\.]/),"symbol"; + return stream.eatWhile(/[A-Za-z\d_:\/.]/),"symbol"; if(("."==c&&/\d/.test(stream.peek()))||/\d/.test(c)){ var t=null; stream.backUp(1); - if(stream.match(/^\d{4}\.\d{2}(m|\.\d{2}([D|T](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/) + if(stream.match(/^\d{4}\.\d{2}(m|\.\d{2}([DT](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/) || stream.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/) || stream.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/) || stream.match(/^\d+[ptuv]{1}/)) t="temporal"; else if(stream.match(/^0[NwW]{1}/) - || stream.match(/^0x[\d|a-f|A-F]*/) - || stream.match(/^[0|1]+[b]{1}/) + || stream.match(/^0x[\da-fA-F]*/) + || stream.match(/^[01]+[b]{1}/) || stream.match(/^\d+[chijn]{1}/) || stream.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/)) t="number"; return(t&&(!(c=stream.peek())||E.test(c)))?t:(stream.next(),"error"); } - if(/[A-Z|a-z]|\./.test(c)) - return stream.eatWhile(/[A-Z|a-z|\.|_|\d]/),keywords.test(stream.current())?"keyword":"variable"; + if(/[A-Za-z]|\./.test(c)) + return stream.eatWhile(/[A-Za-z._\d]/),keywords.test(stream.current())?"keyword":"variable"; if(/[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(c)) return null; if(/[{}\(\[\]\)]/.test(c)) diff --git a/media/vendor/codemirror/mode/q/q.min.js b/media/vendor/codemirror/mode/q/q.min.js index faa7a7fbc75c9..813cf7766b430 100644 --- a/media/vendor/codemirror/mode/q/q.min.js +++ b/media/vendor/codemirror/mode/q/q.min.js @@ -1 +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";e.defineMode("q",function(e){function t(e,o){var c=e.sol(),s=e.next();if(a=null,c){if("/"==s)return(o.tokenize=n)(e,o);if("\\"==s)return e.eol()||/\s/.test(e.peek())?(e.skipToEnd(),/^\\\s*$/.test(e.current())?(o.tokenize=r)(e,o):o.tokenize=t,"comment"):(o.tokenize=t,"builtin")}if(/\s/.test(s))return"/"==e.peek()?(e.skipToEnd(),"comment"):"whitespace";if('"'==s)return(o.tokenize=i)(e,o);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())&&!u.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 n(e,n){return e.skipToEnd(),/\/\s*$/.test(e.current())?(n.tokenize=o)(e,n):n.tokenize=t,"comment"}function o(e,n){var o=e.sol()&&"\\"==e.peek();return e.skipToEnd(),o&&/^\\\s*$/.test(e.current())&&(n.tokenize=t),"comment"}function r(e){return e.skipToEnd(),"comment"}function i(e,n){for(var o,r=!1,i=!1;o=e.next();){if('"'==o&&!r){i=!0;break}r=!r&&"\\"==o}return i&&(n.tokenize=t),"string"}function c(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}}function s(e){e.indent=e.context.indent,e.context=e.context.prev}var a,l=e.indentUnit,d=function(e){return new RegExp("^("+e.join("|")+")$")}(["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"]),u=/[|/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/;return{startState:function(){return{tokenize:t,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),"("==a)c(t,")",e.column());else if("["==a)c(t,"]",e.column());else if("{"==a)c(t,"}",e.column());else if(/[\]\}\)]/.test(a)){for(;t.context&&"pattern"==t.context.type;)s(t);t.context&&a==t.context.type&&s(t)}else"."==a&&t.context&&"pattern"==t.context.type?s(t):/atom|string|variable/.test(n)&&t.context&&(/[\}\]]/.test(t.context.type)?c(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),o=e.context;if(/[\]\}]/.test(n))for(;o&&"pattern"==o.type;)o=o.prev;var r=o&&n==o.type;return o?"pattern"==o.type?o.col:o.align?o.col+(r?0:1):o.indent+(r?0:l):0}}}),e.defineMIME("text/x-q","q")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("q",function(a){function b(a,d){var g=a.sol(),h=a.next();if(i=null,g){if("/"==h)return(d.tokenize=c)(a,d);if("\\"==h)return a.eol()||/\s/.test(a.peek())?(a.skipToEnd(),/^\\\s*$/.test(a.current())?(d.tokenize=e)(a):d.tokenize=b,"comment"):(d.tokenize=b,"builtin")}if(/\s/.test(h))return"/"==a.peek()?(a.skipToEnd(),"comment"):"whitespace";if('"'==h)return(d.tokenize=f)(a,d);if("`"==h)return a.eatWhile(/[A-Za-z\d_:\/.]/),"symbol";if("."==h&&/\d/.test(a.peek())||/\d/.test(h)){var j=null;return a.backUp(1),a.match(/^\d{4}\.\d{2}(m|\.\d{2}([DT](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/)||a.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/)||a.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/)||a.match(/^\d+[ptuv]{1}/)?j="temporal":(a.match(/^0[NwW]{1}/)||a.match(/^0x[\da-fA-F]*/)||a.match(/^[01]+[b]{1}/)||a.match(/^\d+[chijn]{1}/)||a.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/))&&(j="number"),!j||(h=a.peek())&&!l.test(h)?(a.next(),"error"):j}return/[A-Za-z]|\./.test(h)?(a.eatWhile(/[A-Za-z._\d]/),k.test(a.current())?"keyword":"variable"):/[|\/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(h)?null:/[{}\(\[\]\)]/.test(h)?null:"error"}function c(a,c){return a.skipToEnd(),/\/\s*$/.test(a.current())?(c.tokenize=d)(a,c):c.tokenize=b,"comment"}function d(a,c){var d=a.sol()&&"\\"==a.peek();return a.skipToEnd(),d&&/^\\\s*$/.test(a.current())&&(c.tokenize=b),"comment"}function e(a){return a.skipToEnd(),"comment"}function f(a,c){for(var d,e=!1,f=!1;d=a.next();){if('"'==d&&!e){f=!0;break}e=!e&&"\\"==d}return f&&(c.tokenize=b),"string"}function g(a,b,c){a.context={prev:a.context,indent:a.indent,col:c,type:b}}function h(a){a.indent=a.context.indent,a.context=a.context.prev}var i,j=a.indentUnit,k=function(a){return new RegExp("^("+a.join("|")+")$")}(["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"]),l=/[|\/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/;return{startState:function(){return{tokenize:b,context:null,indent:0,col:0}},token:function(a,b){a.sol()&&(b.context&&null==b.context.align&&(b.context.align=!1),b.indent=a.indentation());var c=b.tokenize(a,b);if("comment"!=c&&b.context&&null==b.context.align&&"pattern"!=b.context.type&&(b.context.align=!0),"("==i)g(b,")",a.column());else if("["==i)g(b,"]",a.column());else if("{"==i)g(b,"}",a.column());else if(/[\]\}\)]/.test(i)){for(;b.context&&"pattern"==b.context.type;)h(b);b.context&&i==b.context.type&&h(b)}else"."==i&&b.context&&"pattern"==b.context.type?h(b):/atom|string|variable/.test(c)&&b.context&&(/[\}\]]/.test(b.context.type)?g(b,"pattern",a.column()):"pattern"!=b.context.type||b.context.align||(b.context.align=!0,b.context.col=a.column()));return c},indent:function(a,b){var c=b&&b.charAt(0),d=a.context;if(/[\]\}]/.test(c))for(;d&&"pattern"==d.type;)d=d.prev;var e=d&&c==d.type;return d?"pattern"==d.type?d.col:d.align?d.col+(e?0:1):d.indent+(e?0:j):0}}}),a.defineMIME("text/x-q","q")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/r/r.min.js b/media/vendor/codemirror/mode/r/r.min.js index 66e09f5d9e518..1e989e91d750e 100644 --- a/media/vendor/codemirror/mode/r/r.min.js +++ b/media/vendor/codemirror/mode/r/r.min.js @@ -1 +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";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":s.test(n)?"$"==n?"operator dollar":(e.eatWhile(s),"operator"):/[\(\){}\[\];]/.test(n)?(c=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 a;null!=(a=t.next());){if(a==e){r.tokenize=n;break}if("\\"==a){t.backUp(1);break}}return"string"}}function i(e,t,n){e.ctx={type:t,indent:e.indent,flags:0,column:n.column(),prev:e.ctx}}function a(e,t){var n=e.ctx;e.ctx={type:n.type,indent:n.indent,flags:n.flags|t,column:n.column,prev:n.prev}}function o(e){e.indent=e.ctx.indent,e.ctx=e.ctx.prev}var c,l=t("NULL NA Inf NaN NA_integer_ NA_real_ NA_complex_ NA_character_"),f=t("list quote bquote eval return call parse deparse"),u=t("if else repeat while function for in next break"),d=t("if else repeat while function for"),s=/[+\-*\/^<>=!&|~$:]/;return{startState:function(){return{tokenize:n,ctx:{type:"top",indent:-e.indentUnit,flags:2},indent:0,afterIdent:!1}},token:function(e,t){if(e.sol()&&(0==(3&t.ctx.flags)&&(t.ctx.flags|=2),4&t.ctx.flags&&o(t),t.indent=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"!=n&&0==(2&t.ctx.flags)&&a(t,1),";"!=c&&"{"!=c&&"}"!=c||"block"!=t.ctx.type||o(t),"{"==c?i(t,"}",e):"("==c?(i(t,")",e),t.afterIdent&&(t.ctx.argList=!0)):"["==c?i(t,"]",e):"block"==c?i(t,"block",e):c==t.ctx.type?o(t):"block"==t.ctx.type&&"comment"!=n&&a(t,4),t.afterIdent="variable"==n||"keyword"==n,n},indent:function(t,r){if(t.tokenize!=n)return 0;var i=r&&r.charAt(0),a=t.ctx,o=i==a.type;return 4&a.flags&&(a=a.prev),"block"==a.type?a.indent+("{"==i?0:e.indentUnit):1&a.flags?a.column+(o?0:1):a.indent+(o?0:e.indentUnit)},lineComment:"#"}}),e.defineMIME("text/x-rsrc","r")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.registerHelper("wordChars","r",/[\w.]/),a.defineMode("r",function(a){function b(a){for(var b=a.split(" "),c={},d=0;d>?/)?"operator arrow":"="==c&&b.ctx.argList?"arg-is":m.test(c)?"$"==c?"operator dollar":(a.eatWhile(m),"operator"):/[\(\){}\[\];]/.test(c)?(h=c,";"==c?"semi":null):null}function d(a){return function(b,d){if(b.eat("\\")){var e=b.next();return"x"==e?b.match(/^[a-f0-9]{2}/i):("u"==e||"U"==e)&&b.eat("{")&&b.skipTo("}")?b.next():"u"==e?b.match(/^[a-f0-9]{4}/i):"U"==e?b.match(/^[a-f0-9]{8}/i):/[0-7]/.test(e)&&b.match(/^[0-7]{1,2}/),"string-2"}for(var f;null!=(f=b.next());){if(f==a){d.tokenize=c;break}if("\\"==f){b.backUp(1);break}}return"string"}}function e(a,b,c){a.ctx={type:b,indent:a.indent,flags:0,column:c.column(),prev:a.ctx}}function f(a,b){var c=a.ctx;a.ctx={type:c.type,indent:c.indent,flags:c.flags|b,column:c.column,prev:c.prev}}function g(a){a.indent=a.ctx.indent,a.ctx=a.ctx.prev}var h,i=b("NULL NA Inf NaN NA_integer_ NA_real_ NA_complex_ NA_character_"),j=b("list quote bquote eval return call parse deparse"),k=b("if else repeat while function for in next break"),l=b("if else repeat while function for"),m=/[+\-*\/^<>=!&|~$:]/;return{startState:function(){return{tokenize:c,ctx:{type:"top",indent:-a.indentUnit,flags:2},indent:0,afterIdent:!1}},token:function(a,b){if(a.sol()&&(0==(3&b.ctx.flags)&&(b.ctx.flags|=2),4&b.ctx.flags&&g(b),b.indent=a.indentation()),a.eatSpace())return null;var c=b.tokenize(a,b);return"comment"!=c&&0==(2&b.ctx.flags)&&f(b,1),";"!=h&&"{"!=h&&"}"!=h||"block"!=b.ctx.type||g(b),"{"==h?e(b,"}",a):"("==h?(e(b,")",a),b.afterIdent&&(b.ctx.argList=!0)):"["==h?e(b,"]",a):"block"==h?e(b,"block",a):h==b.ctx.type?g(b):"block"==b.ctx.type&&"comment"!=c&&f(b,4),b.afterIdent="variable"==c||"keyword"==c,c},indent:function(b,d){if(b.tokenize!=c)return 0;var e=d&&d.charAt(0),f=b.ctx,g=e==f.type;return 4&f.flags&&(f=f.prev),"block"==f.type?f.indent+("{"==e?0:a.indentUnit):1&f.flags?f.column+(g?0:1):f.indent+(g?0:a.indentUnit)},lineComment:"#"}}),a.defineMIME("text/x-rsrc","r")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/rpm/rpm.min.js b/media/vendor/codemirror/mode/rpm/rpm.min.js index 500eb340233af..029b61137f868 100644 --- a/media/vendor/codemirror/mode/rpm/rpm.min.js +++ b/media/vendor/codemirror/mode/rpm/rpm.min.js @@ -1 +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";e.defineMode("rpm-changes",function(){var e=/^-+$/,r=/^(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} - /,t=/^[\w+.-]+@[\w.-]+/;return{token:function(n){if(n.sol()){if(n.match(e))return"tag";if(n.match(r))return"tag"}return n.match(t)?"string":(n.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)/,r=/^[a-zA-Z0-9()]+:/,t=/^%(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)/,n=/^%(ifnarch|ifarch|if)/,o=/^%(else|endif)/,a=/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;return{startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(i,c){if("#"==i.peek())return i.skipToEnd(),"comment";if(i.sol()){if(i.match(r))return"header";if(i.match(t))return"atom"}if(i.match(/^\$\w+/))return"def";if(i.match(/^\$\{\w+\}/))return"def";if(i.match(o))return"keyword";if(i.match(n))return c.controlFlow=!0,"keyword";if(c.controlFlow){if(i.match(a))return"operator";if(i.match(/^(\d+)/))return"number";i.eol()&&(c.controlFlow=!1)}if(i.match(e))return i.eol()&&(c.controlFlow=!1),"number";if(i.match(/^%[\w]+/))return i.match(/^\(/)&&(c.macroParameters=!0),"keyword";if(c.macroParameters){if(i.match(/^\d+/))return"number";if(i.match(/^\)/))return c.macroParameters=!1,"keyword"}return i.match(/^%\{\??[\w \-\:\!]+\}/)?(i.eol()&&(c.controlFlow=!1),"def"):(i.next(),null)}}}),e.defineMIME("text/x-rpm-spec","rpm-spec")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("rpm-changes",function(){return{token:function(a){if(a.sol()){if(a.match(/^-+$/))return"tag";if(a.match(/^(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} - /))return"tag"}return a.match(/^[\w+.-]+@[\w.-]+/)?"string":(a.next(),null)}}}),a.defineMIME("text/x-rpm-changes","rpm-changes"),a.defineMode("rpm-spec",function(){return{startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(a,b){if("#"==a.peek())return a.skipToEnd(),"comment";if(a.sol()){if(a.match(/^[a-zA-Z0-9()]+:/))return"header";if(a.match(/^%(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)/))return"atom"}if(a.match(/^\$\w+/))return"def";if(a.match(/^\$\{\w+\}/))return"def";if(a.match(/^%(else|endif)/))return"keyword";if(a.match(/^%(ifnarch|ifarch|if)/))return b.controlFlow=!0,"keyword";if(b.controlFlow){if(a.match(/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/))return"operator";if(a.match(/^(\d+)/))return"number";a.eol()&&(b.controlFlow=!1)}if(a.match(/^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/))return a.eol()&&(b.controlFlow=!1),"number";if(a.match(/^%[\w]+/))return a.match(/^\(/)&&(b.macroParameters=!0),"keyword";if(b.macroParameters){if(a.match(/^\d+/))return"number";if(a.match(/^\)/))return b.macroParameters=!1,"keyword"}return a.match(/^%\{\??[\w \-\:\!]+\}/)?(a.eol()&&(b.controlFlow=!1),"def"):(a.next(),null)}}}),a.defineMIME("text/x-rpm-spec","rpm-spec")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/rst/rst.min.js b/media/vendor/codemirror/mode/rst/rst.min.js index 22964f8b22893..8158124eaf554 100644 --- a/media/vendor/codemirror/mode/rst/rst.min.js +++ b/media/vendor/codemirror/mode/rst/rst.min.js @@ -1 +1 @@ -!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,a){var c=/^\*\*[^\*\s](?:[^\*]*[^\*\s])?\*\*/,n=/^\*[^\*\s](?:[^\*]*[^\*\s])?\*/,r=/^``[^`\s](?:[^`]*[^`\s])``/,m=/^(?:[\d]+(?:[\.,]\d+)*)/,o=/^(?:\s\+[\d]+(?:[\.,]\d+)*)/,s=/^(?:\s\-[\d]+(?:[\.,]\d+)*)/,h=new RegExp("^[Hh][Tt][Tt][Pp][Ss]?://(?:[\\d\\w.-]+)\\.(?:\\w{2,6})(?:/[\\d\\w\\#\\%\\&\\-\\.\\,\\/\\:\\=\\?\\~]+)*"),l={token:function(e){if(e.match(c)&&e.match(/\W+|$/,!1))return"strong";if(e.match(n)&&e.match(/\W+|$/,!1))return"em";if(e.match(r)&&e.match(/\W+|$/,!1))return"string-2";if(e.match(m))return"number";if(e.match(o))return"positive";if(e.match(s))return"negative";if(e.match(h))return"link";for(;!(null==e.next()||e.match(c,!1)||e.match(n,!1)||e.match(r,!1)||e.match(m,!1)||e.match(o,!1)||e.match(s,!1)||e.match(h,!1)););return null}},i=e.getMode(t,a.backdrop||"rst-base");return e.overlayMode(i,l,!0)},"python","stex"),e.defineMode("rst-base",function(t){function a(e){var t=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,a){return void 0!==t[a]?t[a]:e})}function c(t,a){var r=null;if(t.sol()&&t.match(Q,!1))l(a,s,{mode:d,local:e.startState(d)});else if(t.sol()&&t.match(_))l(a,n),r="meta";else if(t.sol()&&t.match(y))l(a,c),r="header";else if(p(a)==C||t.match(C,!1))switch(i(a)){case 0:l(a,c,h(C,1)),t.match(/^:/),r="meta";break;case 1:l(a,c,h(C,2)),t.match(w),r="keyword",t.current().match(/^(?:math|latex)/)&&(a.tmp_stex=!0);break;case 2:l(a,c,h(C,3)),t.match(/^:`/),r="meta";break;case 3:if(a.tmp_stex&&(a.tmp_stex=void 0,a.tmp={mode:u,local:e.startState(u)}),a.tmp){if("`"==t.peek()){l(a,c,h(C,4)),a.tmp=void 0;break}r=a.tmp.mode.token(t,a.tmp.local);break}l(a,c,h(C,4)),t.match(R),r="string";break;case 4:l(a,c,h(C,5)),t.match(/^`/),r="meta";break;case 5:l(a,c,h(C,6)),t.match(f);break;default:l(a,c)}else if(p(a)==H||t.match(H,!1))switch(i(a)){case 0:l(a,c,h(H,1)),t.match(/^`/),r="meta";break;case 1:l(a,c,h(H,2)),t.match(R),r="string";break;case 2:l(a,c,h(H,3)),t.match(/^`:/),r="meta";break;case 3:l(a,c,h(H,4)),t.match(w),r="keyword";break;case 4:l(a,c,h(H,5)),t.match(/^:/),r="meta";break;case 5:l(a,c,h(H,6)),t.match(f);break;default:l(a,c)}else if(p(a)==P||t.match(P,!1))switch(i(a)){case 0:l(a,c,h(P,1)),t.match(/^:/),r="meta";break;case 1:l(a,c,h(P,2)),t.match(w),r="keyword";break;case 2:l(a,c,h(P,3)),t.match(/^:/),r="meta";break;case 3:l(a,c,h(P,4)),t.match(f);break;default:l(a,c)}else if(p(a)==q||t.match(q,!1))switch(i(a)){case 0:l(a,c,h(q,1)),t.match(D),r="variable-2";break;case 1:l(a,c,h(q,2)),t.match(/^_?_?/)&&(r="link");break;default:l(a,c)}else if(t.match(T))l(a,c),r="quote";else if(t.match(j))l(a,c),r="quote";else if(t.match(I))l(a,c),t.peek()&&!t.peek().match(/^\W$/)||(r="link");else if(p(a)==A||t.match(A,!1))switch(i(a)){case 0:!t.peek()||t.peek().match(/^\W$/)?l(a,c,h(A,1)):t.match(A);break;case 1:l(a,c,h(A,2)),t.match(/^`/),r="link";break;case 2:l(a,c,h(A,3)),t.match(R);break;case 3:l(a,c,h(A,4)),t.match(/^`_/),r="link";break;default:l(a,c)}else t.match(O)?l(a,m):t.next()&&l(a,c);return r}function n(t,a){var m=null;if(p(a)==S||t.match(S,!1))switch(i(a)){case 0:l(a,n,h(S,1)),t.match(D),m="variable-2";break;case 1:l(a,n,h(S,2)),t.match(F);break;case 2:l(a,n,h(S,3)),t.match(G),m="keyword";break;case 3:l(a,n,h(S,4)),t.match(J),m="meta";break;default:l(a,c)}else if(p(a)==$||t.match($,!1))switch(i(a)){case 0:l(a,n,h($,1)),t.match(z),m="keyword",t.current().match(/^(?:math|latex)/)?a.tmp_stex=!0:t.current().match(/^python/)&&(a.tmp_py=!0);break;case 1:l(a,n,h($,2)),t.match(B),m="meta",(t.match(/^latex\s*$/)||a.tmp_stex)&&(a.tmp_stex=void 0,l(a,s,{mode:u,local:e.startState(u)}));break;case 2:l(a,n,h($,3)),(t.match(/^python\s*$/)||a.tmp_py)&&(a.tmp_py=void 0,l(a,s,{mode:d,local:e.startState(d)}));break;default:l(a,c)}else if(p(a)==v||t.match(v,!1))switch(i(a)){case 0:l(a,n,h(v,1)),t.match(K),t.match(L),m="link";break;case 1:l(a,n,h(v,2)),t.match(N),m="meta";break;default:l(a,c)}else t.match(M)?(l(a,c),m="quote"):t.match(W)?(l(a,c),m="quote"):(t.eatSpace(),t.eol()?l(a,c):(t.skipToEnd(),l(a,r),m="comment"));return m}function r(e,t){return o(e,t,"comment")}function m(e,t){return o(e,t,"meta")}function o(e,t,a){return e.eol()||e.eatSpace()?(e.skipToEnd(),a):(l(t,c),null)}function s(e,t){return t.ctx.mode&&t.ctx.local?e.sol()?(e.eatSpace()||l(t,c),null):t.ctx.mode.token(e,t.ctx.local):(l(t,c),null)}function h(e,t,a,c){return{phase:e,stage:t,mode:a,local:c}}function l(e,t,a){e.tok=t,e.ctx=a||{}}function i(e){return e.ctx.stage||0}function p(e){return e.ctx.phase}var d=e.getMode(t,"python"),u=e.getMode(t,"stex"),x="(?:\\s*|\\W|$)",f=new RegExp(a("^{0}",x)),k="(?:[^\\W\\d_](?:[\\w!\"#$%&'()\\*\\+,\\-\\./:;<=>\\?]*[^\\W_])?)",w=new RegExp(a("^{0}",k)),b=a("(?:{0}|`{1}`)",k,"(?:[^\\W\\d_](?:[\\w\\s!\"#$%&'()\\*\\+,\\-\\./:;<=>\\?]*[^\\W_])?)"),g="(?:[^\\s\\|](?:[^\\|]*[^\\s\\|])?)",E="(?:[^\\`]+)",R=new RegExp(a("^{0}",E)),y=new RegExp("^([!'#$%&\"()*+,-./:;<=>?@\\[\\\\\\]^_`{|}~])\\1{3,}\\s*$"),_=new RegExp(a("^\\.\\.{0}","\\s+")),v=new RegExp(a("^_{0}:{1}|^__:{1}",b,x)),$=new RegExp(a("^{0}::{1}",b,x)),S=new RegExp(a("^\\|{0}\\|{1}{2}::{3}",g,"\\s+",b,x)),M=new RegExp(a("^\\[(?:\\d+|#{0}?|\\*)]{1}",b,x)),W=new RegExp(a("^\\[{0}\\]{1}",b,x)),q=new RegExp(a("^\\|{0}\\|",g)),T=new RegExp(a("^\\[(?:\\d+|#{0}?|\\*)]_",b)),j=new RegExp(a("^\\[{0}\\]_",b)),I=new RegExp(a("^{0}__?",b)),A=new RegExp(a("^`{0}`_",E)),C=new RegExp(a("^:{0}:`{1}`{2}",k,E,x)),H=new RegExp(a("^`{1}`:{0}:{2}",k,E,x)),P=new RegExp(a("^:{0}:{1}",k,x)),z=new RegExp(a("^{0}",b)),B=new RegExp(a("^::{0}",x)),D=new RegExp(a("^\\|{0}\\|",g)),F=new RegExp(a("^{0}","\\s+")),G=new RegExp(a("^{0}",b)),J=new RegExp(a("^::{0}",x)),K=new RegExp("^_"),L=new RegExp(a("^{0}|_",b)),N=new RegExp(a("^:{0}",x)),O=new RegExp("^::\\s*$"),Q=new RegExp("^\\s+(?:>>>|In \\[\\d+\\]:)\\s");return{startState:function(){return{tok:c,ctx:h(void 0,0)}},copyState:function(t){var a=t.ctx,c=t.tmp;return a.local&&(a={mode:a.mode,local:e.copyState(a.mode,a.local)}),c&&(c={mode:c.mode,local:e.copyState(c.mode,c.local)}),{tok:t.tok,ctx:a,tmp:c}},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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(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"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("rst",function(b,c){var d=/^\*\*[^\*\s](?:[^\*]*[^\*\s])?\*\*/,e=new RegExp("^[Hh][Tt][Tt][Pp][Ss]?://(?:[\\d\\w.-]+)\\.(?:\\w{2,6})(?:/[\\d\\w\\#\\%\\&\\-\\.\\,\\/\\:\\=\\?\\~]+)*"),f={token:function(a){if(a.match(d)&&a.match(/\W+|$/,!1))return"strong";if(a.match(/^\*[^\*\s](?:[^\*]*[^\*\s])?\*/)&&a.match(/\W+|$/,!1))return"em";if(a.match(/^``[^`\s](?:[^`]*[^`\s])``/)&&a.match(/\W+|$/,!1))return"string-2";if(a.match(/^(?:[\d]+(?:[\.,]\d+)*)/))return"number";if(a.match(/^(?:\s\+[\d]+(?:[\.,]\d+)*)/))return"positive";if(a.match(/^(?:\s\-[\d]+(?:[\.,]\d+)*)/))return"negative";if(a.match(e))return"link";for(;null!=a.next()&&!a.match(d,!1)&&!a.match(/^\*[^\*\s](?:[^\*]*[^\*\s])?\*/,!1)&&!a.match(/^``[^`\s](?:[^`]*[^`\s])``/,!1)&&!a.match(/^(?:[\d]+(?:[\.,]\d+)*)/,!1)&&!a.match(/^(?:\s\+[\d]+(?:[\.,]\d+)*)/,!1)&&!a.match(/^(?:\s\-[\d]+(?:[\.,]\d+)*)/,!1)&&!a.match(e,!1););return null}},g=a.getMode(b,c.backdrop||"rst-base");return a.overlayMode(g,f,!0)},"python","stex"),a.defineMode("rst-base",function(b){function c(a){var b=Array.prototype.slice.call(arguments,1);return a.replace(/{(\d+)}/g,function(a,c){return void 0!==b[c]?b[c]:a})}function d(b,c){var f=null;if(b.sol()&&b.match(W,!1))k(c,i,{mode:n,local:a.startState(n)});else if(b.sol()&&b.match(y))k(c,e),f="meta";else if(b.sol()&&b.match(x))k(c,d),f="header";else if(m(c)==J||b.match(J,!1))switch(l(c)){case 0:k(c,d,j(J,1)),b.match(/^:/),f="meta";break;case 1:k(c,d,j(J,2)),b.match(s),f="keyword",b.current().match(/^(?:math|latex)/)&&(c.tmp_stex=!0);break;case 2:k(c,d,j(J,3)),b.match(/^:`/),f="meta";break;case 3:if(c.tmp_stex&&(c.tmp_stex=void 0,c.tmp={mode:o,local:a.startState(o)}),c.tmp){if("`"==b.peek()){k(c,d,j(J,4)),c.tmp=void 0;break}f=c.tmp.mode.token(b,c.tmp.local);break}k(c,d,j(J,4)),b.match(w),f="string";break;case 4:k(c,d,j(J,5)),b.match(/^`/),f="meta";break;case 5:k(c,d,j(J,6)),b.match(q);break;default:k(c,d)}else if(m(c)==K||b.match(K,!1))switch(l(c)){case 0:k(c,d,j(K,1)),b.match(/^`/),f="meta";break;case 1:k(c,d,j(K,2)),b.match(w),f="string";break;case 2:k(c,d,j(K,3)),b.match(/^`:/),f="meta";break;case 3:k(c,d,j(K,4)),b.match(s),f="keyword";break;case 4:k(c,d,j(K,5)),b.match(/^:/),f="meta";break;case 5:k(c,d,j(K,6)),b.match(q);break;default:k(c,d)}else if(m(c)==L||b.match(L,!1))switch(l(c)){case 0:k(c,d,j(L,1)),b.match(/^:/),f="meta";break;case 1:k(c,d,j(L,2)),b.match(s),f="keyword";break;case 2:k(c,d,j(L,3)),b.match(/^:/),f="meta";break;case 3:k(c,d,j(L,4)),b.match(q);break;default:k(c,d)}else if(m(c)==E||b.match(E,!1))switch(l(c)){case 0:k(c,d,j(E,1)),b.match(O),f="variable-2";break;case 1:k(c,d,j(E,2)),b.match(/^_?_?/)&&(f="link");break;default:k(c,d)}else if(b.match(F))k(c,d),f="quote";else if(b.match(G))k(c,d),f="quote";else if(b.match(H))k(c,d),b.peek()&&!b.peek().match(/^\W$/)||(f="link");else if(m(c)==I||b.match(I,!1))switch(l(c)){case 0:!b.peek()||b.peek().match(/^\W$/)?k(c,d,j(I,1)):b.match(I);break;case 1:k(c,d,j(I,2)),b.match(/^`/),f="link";break;case 2:k(c,d,j(I,3)),b.match(w);break;case 3:k(c,d,j(I,4)),b.match(/^`_/),f="link";break;default:k(c,d)}else b.match(V)?k(c,g):b.next()&&k(c,d);return f}function e(b,c){var g=null;if(m(c)==B||b.match(B,!1))switch(l(c)){case 0:k(c,e,j(B,1)),b.match(O),g="variable-2";break;case 1:k(c,e,j(B,2)),b.match(P);break;case 2:k(c,e,j(B,3)),b.match(Q),g="keyword";break;case 3:k(c,e,j(B,4)),b.match(R),g="meta";break;default:k(c,d)}else if(m(c)==A||b.match(A,!1))switch(l(c)){case 0:k(c,e,j(A,1)),b.match(M),g="keyword",b.current().match(/^(?:math|latex)/)?c.tmp_stex=!0:b.current().match(/^python/)&&(c.tmp_py=!0);break;case 1:k(c,e,j(A,2)),b.match(N),g="meta",(b.match(/^latex\s*$/)||c.tmp_stex)&&(c.tmp_stex=void 0,k(c,i,{mode:o,local:a.startState(o)}));break;case 2:k(c,e,j(A,3)),(b.match(/^python\s*$/)||c.tmp_py)&&(c.tmp_py=void 0,k(c,i,{mode:n,local:a.startState(n)}));break;default:k(c,d)}else if(m(c)==z||b.match(z,!1))switch(l(c)){case 0:k(c,e,j(z,1)),b.match(S),b.match(T),g="link";break;case 1:k(c,e,j(z,2)),b.match(U),g="meta";break;default:k(c,d)}else b.match(C)?(k(c,d),g="quote"):b.match(D)?(k(c,d),g="quote"):(b.eatSpace(),b.eol()?k(c,d):(b.skipToEnd(),k(c,f),g="comment"));return g}function f(a,b){return h(a,b,"comment")}function g(a,b){return h(a,b,"meta")}function h(a,b,c){return a.eol()||a.eatSpace()?(a.skipToEnd(),c):(k(b,d),null)}function i(a,b){return b.ctx.mode&&b.ctx.local?a.sol()?(a.eatSpace()||k(b,d),null):b.ctx.mode.token(a,b.ctx.local):(k(b,d),null)}function j(a,b,c,d){return{phase:a,stage:b,mode:c,local:d}}function k(a,b,c){a.tok=b,a.ctx=c||{}}function l(a){return a.ctx.stage||0}function m(a){return a.ctx.phase}var n=a.getMode(b,"python"),o=a.getMode(b,"stex"),p="(?:\\s*|\\W|$)",q=new RegExp(c("^{0}",p)),r="(?:[^\\W\\d_](?:[\\w!\"#$%&'()\\*\\+,\\-\\./:;<=>\\?]*[^\\W_])?)",s=new RegExp(c("^{0}",r)),t=c("(?:{0}|`{1}`)",r,"(?:[^\\W\\d_](?:[\\w\\s!\"#$%&'()\\*\\+,\\-\\./:;<=>\\?]*[^\\W_])?)"),u="(?:[^\\s\\|](?:[^\\|]*[^\\s\\|])?)",v="(?:[^\\`]+)",w=new RegExp(c("^{0}",v)),x=new RegExp("^([!'#$%&\"()*+,-./:;<=>?@\\[\\\\\\]^_`{|}~])\\1{3,}\\s*$"),y=new RegExp(c("^\\.\\.{0}","\\s+")),z=new RegExp(c("^_{0}:{1}|^__:{1}",t,p)),A=new RegExp(c("^{0}::{1}",t,p)),B=new RegExp(c("^\\|{0}\\|{1}{2}::{3}",u,"\\s+",t,p)),C=new RegExp(c("^\\[(?:\\d+|#{0}?|\\*)]{1}",t,p)),D=new RegExp(c("^\\[{0}\\]{1}",t,p)),E=new RegExp(c("^\\|{0}\\|",u)),F=new RegExp(c("^\\[(?:\\d+|#{0}?|\\*)]_",t)),G=new RegExp(c("^\\[{0}\\]_",t)),H=new RegExp(c("^{0}__?",t)),I=new RegExp(c("^`{0}`_",v)),J=new RegExp(c("^:{0}:`{1}`{2}",r,v,p)),K=new RegExp(c("^`{1}`:{0}:{2}",r,v,p)),L=new RegExp(c("^:{0}:{1}",r,p)),M=new RegExp(c("^{0}",t)),N=new RegExp(c("^::{0}",p)),O=new RegExp(c("^\\|{0}\\|",u)),P=new RegExp(c("^{0}","\\s+")),Q=new RegExp(c("^{0}",t)),R=new RegExp(c("^::{0}",p)),S=new RegExp("^_"),T=new RegExp(c("^{0}|_",t)),U=new RegExp(c("^:{0}",p)),V=new RegExp("^::\\s*$"),W=new RegExp("^\\s+(?:>>>|In \\[\\d+\\]:)\\s");return{startState:function(){return{tok:d,ctx:j(void 0,0)}},copyState:function(b){var c=b.ctx,d=b.tmp;return c.local&&(c={mode:c.mode,local:a.copyState(c.mode,c.local)}),d&&(d={mode:d.mode,local:a.copyState(d.mode,d.local)}),{tok:b.tok,ctx:c,tmp:d}},innerMode:function(a){return a.tmp?{state:a.tmp.local,mode:a.tmp.mode}:a.ctx.mode?{state:a.ctx.local,mode:a.ctx.mode}:null},token:function(a,b){return b.tok(a,b)}}},"python","stex"),a.defineMIME("text/x-rst","rst")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/ruby/ruby.min.js b/media/vendor/codemirror/mode/ruby/ruby.min.js index d0dec3aa85826..f1ad9d737e8f6 100644 --- a/media/vendor/codemirror/mode/ruby/ruby.min.js +++ b/media/vendor/codemirror/mode/ruby/ruby.min.js @@ -1 +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";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("@"==o&&e.match(/^@?[a-zA-Z_\xa1-\uffff]/))return e.eat("@"),e.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if("$"==o)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(o))return e.eatWhile(/[\w\xa1-\uffff]/),e.eat(/[\?\!]/),e.eat(":")?"atom":"ident";if("|"!=o||!t.varList&&"{"!=t.lastTok&&"do"!=t.lastTok){if(/[\(\)\[\]{}\\;]/.test(o))return d=o,null;if("-"==o&&e.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(o)){var p=e.eatWhile(/[=+\-\/*:\.^%<>~|]/);return"."!=o||p||(d="."),"operator"}return null}return d="|",null}function i(e){for(var t,n=e.pos,r=0,i=!1,o=!1;null!=(t=e.next());)if(o)o=!1;else{if("[{(".indexOf(t)>-1)r++;else if("]})".indexOf(t)>-1){if(--r<0)break}else if("/"==t&&0==r){i=!0;break}o="\\"==t}return e.backUp(e.pos-n),i}function o(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]=o(e-1)}else"{"==t.peek()&&(n.tokenize[n.tokenize.length-1]=o(e+1));return r(t,n)}}function a(){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 u(e,t,n,r){return function(i,u){var f,l=!1;for("read-quoted-paused"===u.context.type&&(u.context=u.context.prev,i.eat("}"));null!=(f=i.next());){if(f==e&&(r||!l)){u.tokenize.pop();break}if(n&&"#"==f&&!l){if(i.eat("{")){"}"==e&&(u.context={prev:u.context,type:"read-quoted-paused"}),u.tokenize.push(o());break}if(/[@\$]/.test(i.peek())){u.tokenize.push(a());break}}l=!l&&"\\"==f}return t}}function f(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 d,s=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__"]),c=t(["def","class","case","for","while","until","module","then","catch","loop","proc","begin"]),p=t(["end","until"]),k={"[":"]","{":"}","(":")"};return{startState:function(){return{tokenize:[r],indented:0,context:{type:"top",indented:-e.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(e,t){d=null,e.sol()&&(t.indented=e.indentation());var n,r=t.tokenize[t.tokenize.length-1](e,t),i=d;if("ident"==r){var o=e.current();"keyword"==(r="."==t.lastTok?"property":s.propertyIsEnumerable(e.current())?"keyword":/^[A-Z]/.test(o)?"tag":"def"==t.lastTok||"class"==t.lastTok||t.varList?"def":"variable")&&(i=o,c.propertyIsEnumerable(o)?n="indent":p.propertyIsEnumerable(o)?n="dedent":"if"!=o&&"unless"!=o||e.column()!=e.indentation()?"do"==o&&t.context.indented]/)?(a.eat(/[\<\>]/),"atom"):a.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":a.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(a.eatWhile(/[\w$\xa1-\uffff]/),a.eat(/[\?\!\=]/),"atom"):"operator";if("@"==f&&a.match(/^@?[a-zA-Z_\xa1-\uffff]/))return a.eat("@"),a.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if("$"==f)return a.eat(/[a-zA-Z_]/)?a.eatWhile(/[\w]/):a.eat(/\d/)?a.eat(/\d/):a.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(f))return a.eatWhile(/[\w\xa1-\uffff]/),a.eat(/[\?\!]/),a.eat(":")?"atom":"ident";if("|"!=f||!b.varList&&"{"!=b.lastTok&&"do"!=b.lastTok){if(/[\(\)\[\]{}\\;]/.test(f))return k=f,null;if("-"==f&&a.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(f)){var n=a.eatWhile(/[=+\-\/*:\.^%<>~|]/);return"."!=f||n||(k="."),"operator"}return null}return k="|",null}function e(a){for(var b,c=a.pos,d=0,e=!1,f=!1;null!=(b=a.next());)if(f)f=!1;else{if("[{(".indexOf(b)>-1)d++;else if("]})".indexOf(b)>-1){if(--d<0)break}else if("/"==b&&0==d){e=!0;break}f="\\"==b}return a.backUp(a.pos-c),e}function f(a){return a||(a=1),function(b,c){if("}"==b.peek()){if(1==a)return c.tokenize.pop(),c.tokenize[c.tokenize.length-1](b,c);c.tokenize[c.tokenize.length-1]=f(a-1)}else"{"==b.peek()&&(c.tokenize[c.tokenize.length-1]=f(a+1));return d(b,c)}}function g(){var a=!1;return function(b,c){return a?(c.tokenize.pop(),c.tokenize[c.tokenize.length-1](b,c)):(a=!0,d(b,c))}}function h(a,b,c,d){return function(e,h){var i,j=!1;for("read-quoted-paused"===h.context.type&&(h.context=h.context.prev,e.eat("}"));null!=(i=e.next());){if(i==a&&(d||!j)){h.tokenize.pop();break}if(c&&"#"==i&&!j){if(e.eat("{")){"}"==a&&(h.context={prev:h.context,type:"read-quoted-paused"}),h.tokenize.push(f());break}if(/[@\$]/.test(e.peek())){h.tokenize.push(g());break}}j=!j&&"\\"==i}return b}}function i(a){return function(b,c){return b.match(a)?c.tokenize.pop():b.skipToEnd(),"string"}}function j(a,b){return a.sol()&&a.match("=end")&&a.eol()&&b.tokenize.pop(),a.skipToEnd(),"comment"}var k,l=b(["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__"]),m=b(["def","class","case","for","while","until","module","then","catch","loop","proc","begin"]),n=b(["end","until"]),o={"[":"]","{":"}","(":")"};return{startState:function(){return{tokenize:[d],indented:0,context:{type:"top",indented:-a.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(a,b){k=null,a.sol()&&(b.indented=a.indentation());var c,d=b.tokenize[b.tokenize.length-1](a,b),e=k;if("ident"==d){var f=a.current();d="."==b.lastTok?"property":l.propertyIsEnumerable(a.current())?"keyword":/^[A-Z]/.test(f)?"tag":"def"==b.lastTok||"class"==b.lastTok||b.varList?"def":"variable","keyword"==d&&(e=f,m.propertyIsEnumerable(f)?c="indent":n.propertyIsEnumerable(f)?c="dedent":"if"!=f&&"unless"!=f||a.column()!=a.indentation()?"do"==f&&b.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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../../addon/mode/simple")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],a):a(CodeMirror)}(function(a){"use strict";a.defineSimpleMode("rust",{start:[{regex:/b?"/,token:"string",next:"string"},{regex:/b?r"/,token:"string",next:"string_raw"},{regex:/b?r#+"/,token:"string",next:"string_raw_hash"},{regex:/'(?:[^'\\]|\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\}))'/,token:"string-2"},{regex:/b'(?:[^']|\\(?:['\\nrt0]|x[\da-fA-F]{2}))'/,token:"string-2"},{regex:/(?:(?:[0-9][0-9_]*)(?:(?:[Ee][+-]?[0-9_]+)|\.[0-9_]+(?:[Ee][+-]?[0-9_]+)?)(?:f32|f64)?)|(?:0(?:b[01_]+|(?:o[0-7_]+)|(?:x[0-9a-fA-F_]+))|(?:[0-9][0-9_]*))(?:u8|u16|u32|u64|i8|i16|i32|i64|isize|usize)?/,token:"number"},{regex:/(let(?:\s+mut)?|fn|enum|mod|struct|type)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/(?:abstract|alignof|as|box|break|continue|const|crate|do|else|enum|extern|fn|for|final|if|impl|in|loop|macro|match|mod|move|offsetof|override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|unsafe|unsized|use|virtual|where|while|yield)\b/,token:"keyword"},{regex:/\b(?:Self|isize|usize|char|bool|u8|u16|u32|u64|f16|f32|f64|i8|i16|i32|i64|str|Option)\b/,token:"atom"},{regex:/\b(?:true|false|Some|None|Ok|Err)\b/,token:"builtin"},{regex:/\b(fn)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/#!?\[.*\]/,token:"meta"},{regex:/\/\/.*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,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"}}),a.defineMIME("text/x-rustsrc","rust")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/sas/sas.min.js b/media/vendor/codemirror/mode/sas/sas.min.js index 03c89cb6ea9cd..b5af00e4e4f71 100644 --- a/media/vendor/codemirror/mode/sas/sas.min.js +++ b/media/vendor/codemirror/mode/sas/sas.min.js @@ -1 +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";e.defineMode("sas",function(){function e(e,t,r){if(r)for(var s=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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("sas",function(){function a(a,b,d){if(d)for(var e=b.split(" "),f=0;f=|!=|<>)/,f=/[=\(:\),{}.*<>+\-\/^\[\]]/;return a("def","stack pgm view source debug nesting nolist",["inDataStep"]),a("def","if while until for do do; end end; then else cancel",["inDataStep"]),a("def","label format _n_ _error_",["inDataStep"]),a("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"]),a("def","filevar finfo finv fipname fipnamel fipstate first firstobs floor",["inDataStep"]),a("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"]),a("def","zipfips zipname zipnamel zipstate",["inDataStep"]),a("def","put putc putn",["inDataStep"]),a("builtin","data run",["inDataStep"]),a("def","data",["inProc"]),a("def","%if %end %end; %else %else; %do %do; %then",["inMacro"]),a("builtin","proc run; quit; libname filename %macro %mend option options",["ALL"]),a("def","footnote title libname ods",["ALL"]),a("def","%let %put %global %sysfunc %eval ",["ALL"]),a("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"]),a("def","source2 nosource2 page pageno pagesize",["ALL"]),a("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"]),a("operator","and not ",["inDataStep","inProc"]),{startState:function(){return{inDataStep:!1,inProc:!1,inMacro:!1,nextword:!1,continueString:null,continueComment:!1}},token:function(a,c){return a.eatSpace()?null:b(a,c)},blockCommentStart:"/*",blockCommentEnd:"*/"}}),a.defineMIME("text/x-sas","sas")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/sass/sass.min.js b/media/vendor/codemirror/mode/sass/sass.min.js index ff830dc5c4243..19504ae1fc87c 100644 --- a/media/vendor/codemirror/mode/sass/sass.min.js +++ b/media/vendor/codemirror/mode/sass/sass.min.js @@ -1 +1 @@ -!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(r){function t(e){return!e.peek()||e.match(/\s+$/,!1)}function n(e,r){var t=e.peek();return")"===t?(e.next(),r.tokenizer=s,"operator"):"("===t?(e.next(),e.eatSpace(),"operator"):"'"===t||'"'===t?(r.tokenizer=i(e.next()),"string"):(r.tokenizer=i(")",!1),"string")}function o(e,r){return function(t,n){return t.sol()&&t.indentation()<=e?(n.tokenizer=s,s(t,n)):(r&&t.skipTo("*/")?(t.next(),t.next(),n.tokenizer=s):t.skipToEnd(),"comment")}}function i(e,r){function n(o,i){var u=o.next(),f=o.peek(),c=o.string.charAt(o.pos-2);return"\\"!==u&&f===e||u===e&&"\\"!==c?(u!==e&&r&&o.next(),t(o)&&(i.cursorHalf=0),i.tokenizer=s,"string"):"#"===u&&"{"===f?(i.tokenizer=a(n),o.next(),"operator"):"string"}return null==r&&(r=!0),n}function a(e){return function(r,t){return"}"===r.peek()?(r.next(),t.tokenizer=e,"operator"):s(r,t)}}function u(e){if(0==e.indentCount){e.indentCount++;var t=e.scopes[0].offset+r.indentUnit;e.scopes.unshift({offset:t})}}function f(e){1!=e.scopes.length&&e.scopes.shift()}function s(e,r){var c=e.peek();if(e.match("/*"))return r.tokenizer=o(e.indentation(),!0),r.tokenizer(e,r);if(e.match("//"))return r.tokenizer=o(e.indentation(),!1),r.tokenizer(e,r);if(e.match("#{"))return r.tokenizer=a(s),"operator";if('"'===c||"'"===c)return e.next(),r.tokenizer=i(c),"string";if(r.cursorHalf){if("#"===c&&(e.next(),e.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)))return t(e)&&(r.cursorHalf=0),"number";if(e.match(/^-?[0-9\.]+/))return t(e)&&(r.cursorHalf=0),"number";if(e.match(/^(px|em|in)\b/))return t(e)&&(r.cursorHalf=0),"unit";if(e.match(x))return t(e)&&(r.cursorHalf=0),"keyword";if(e.match(/^url/)&&"("===e.peek())return r.tokenizer=n,t(e)&&(r.cursorHalf=0),"atom";if("$"===c)return e.next(),e.eatWhile(/[\w-]/),t(e)&&(r.cursorHalf=0),"variable-2";if("!"===c)return e.next(),r.cursorHalf=0,e.match(/^[\w]+/)?"keyword":"operator";if(e.match(y))return t(e)&&(r.cursorHalf=0),"operator";if(e.eatWhile(/[\w-]/))return t(e)&&(r.cursorHalf=0),p=e.current().toLowerCase(),d.hasOwnProperty(p)?"atom":m.hasOwnProperty(p)?"keyword":h.hasOwnProperty(p)?(r.prevProp=e.current().toLowerCase(),"property"):"tag";if(t(e))return r.cursorHalf=0,null}else{if("-"===c&&e.match(/^-\w+-/))return"meta";if("."===c){if(e.next(),e.match(/^[\w-]+/))return u(r),"qualifier";if("#"===e.peek())return u(r),"tag"}if("#"===c){if(e.next(),e.match(/^[\w-]+/))return u(r),"builtin";if("#"===e.peek())return u(r),"tag"}if("$"===c)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(x))return"keyword";if(e.match(/^url/)&&"("===e.peek())return r.tokenizer=n,"atom";if("="===c&&e.match(/^=[\w-]+/))return u(r),"meta";if("+"===c&&e.match(/^\+[\w-]+/))return"variable-3";if("@"===c&&e.match(/@extend/)&&(e.match(/\s*[\w]/)||f(r)),e.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return u(r),"def";if("@"===c)return e.next(),e.eatWhile(/[\w-]/),"def";if(e.eatWhile(/[\w-]/)){if(e.match(/ *: *[\w-\+\$#!\("']/,!1)){p=e.current().toLowerCase();var l=r.prevProp+"-"+p;return h.hasOwnProperty(l)?"property":h.hasOwnProperty(p)?(r.prevProp=p,"property"):k.hasOwnProperty(p)?"property":"tag"}return e.match(/ *:/,!1)?(u(r),r.cursorHalf=1,r.prevProp=e.current().toLowerCase(),"property"):e.match(/ *,/,!1)?"tag":(u(r),"tag")}if(":"===c)return e.match(v)?"variable-3":(e.next(),r.cursorHalf=1,"operator")}return e.match(y)?"operator":(e.next(),null)}function c(e,t){e.sol()&&(t.indentCount=0);var n=t.tokenizer(e,t),o=e.current();if("@return"!==o&&"}"!==o||f(t),null!==n){for(var i=e.pos-o.length+r.indentUnit*t.indentCount,a=[],u=0;u","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"]),v=/^::?[a-zA-Z_][\w\-]*/;return{startState:function(){return{tokenizer:s,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(e,r){var t=c(e,r);return r.lastToken={style:t,content:e.current()},t},indent:function(e){return e.scopes[0].offset}}}),e.defineMIME("text/x-sass","sass")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../css/css"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("sass",function(b){function c(a){return!a.peek()||a.match(/\s+$/,!1)}function d(a,b){var c=a.peek();return")"===c?(a.next(),b.tokenizer=j,"operator"):"("===c?(a.next(),a.eatSpace(),"operator"):"'"===c||'"'===c?(b.tokenizer=f(a.next()),"string"):(b.tokenizer=f(")",!1),"string")}function e(a,b){return function(c,d){return c.sol()&&c.indentation()<=a?(d.tokenizer=j,j(c,d)):(b&&c.skipTo("*/")?(c.next(),c.next(),d.tokenizer=j):c.skipToEnd(),"comment")}}function f(a,b){function d(e,f){var h=e.next(),i=e.peek(),k=e.string.charAt(e.pos-2);return"\\"!==h&&i===a||h===a&&"\\"!==k?(h!==a&&b&&e.next(),c(e)&&(f.cursorHalf=0),f.tokenizer=j,"string"):"#"===h&&"{"===i?(f.tokenizer=g(d),e.next(),"operator"):"string"}return null==b&&(b=!0),d}function g(a){return function(b,c){return"}"===b.peek()?(b.next(),c.tokenizer=a,"operator"):j(b,c)}}function h(a){if(0==a.indentCount){a.indentCount++;var c=a.scopes[0].offset,d=c+b.indentUnit;a.scopes.unshift({offset:d})}}function i(a){1!=a.scopes.length&&a.scopes.shift()}function j(a,b){var k=a.peek();if(a.match("/*"))return b.tokenizer=e(a.indentation(),!0),b.tokenizer(a,b);if(a.match("//"))return b.tokenizer=e(a.indentation(),!1),b.tokenizer(a,b);if(a.match("#{"))return b.tokenizer=g(j),"operator";if('"'===k||"'"===k)return a.next(),b.tokenizer=f(k),"string";if(b.cursorHalf){if("#"===k&&(a.next(),a.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)))return c(a)&&(b.cursorHalf=0),"number";if(a.match(/^-?[0-9\.]+/))return c(a)&&(b.cursorHalf=0),"number";if(a.match(/^(px|em|in)\b/))return c(a)&&(b.cursorHalf=0),"unit";if(a.match(s))return c(a)&&(b.cursorHalf=0),"keyword";if(a.match(/^url/)&&"("===a.peek())return b.tokenizer=d,c(a)&&(b.cursorHalf=0),"atom";if("$"===k)return a.next(),a.eatWhile(/[\w-]/),c(a)&&(b.cursorHalf=0),"variable-2";if("!"===k)return a.next(),b.cursorHalf=0,a.match(/^[\w]+/)?"keyword":"operator";if(a.match(u))return c(a)&&(b.cursorHalf=0),"operator";if(a.eatWhile(/[\w-]/))return c(a)&&(b.cursorHalf=0),l=a.current().toLowerCase(),p.hasOwnProperty(l)?"atom":o.hasOwnProperty(l)?"keyword":n.hasOwnProperty(l)?(b.prevProp=a.current().toLowerCase(),"property"):"tag";if(c(a))return b.cursorHalf=0,null}else{if("-"===k&&a.match(/^-\w+-/))return"meta";if("."===k){if(a.next(),a.match(/^[\w-]+/))return h(b),"qualifier";if("#"===a.peek())return h(b),"tag"}if("#"===k){if(a.next(),a.match(/^[\w-]+/))return h(b),"builtin";if("#"===a.peek())return h(b),"tag"}if("$"===k)return a.next(),a.eatWhile(/[\w-]/),"variable-2";if(a.match(/^-?[0-9\.]+/))return"number";if(a.match(/^(px|em|in)\b/))return"unit";if(a.match(s))return"keyword";if(a.match(/^url/)&&"("===a.peek())return b.tokenizer=d,"atom";if("="===k&&a.match(/^=[\w-]+/))return h(b),"meta";if("+"===k&&a.match(/^\+[\w-]+/))return"variable-3";if("@"===k&&a.match(/@extend/)&&(a.match(/\s*[\w]/)||i(b)),a.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return h(b),"def";if("@"===k)return a.next(),a.eatWhile(/[\w-]/),"def";if(a.eatWhile(/[\w-]/)){if(a.match(/ *: *[\w-\+\$#!\("']/,!1)){l=a.current().toLowerCase();var m=b.prevProp+"-"+l;return n.hasOwnProperty(m)?"property":n.hasOwnProperty(l)?(b.prevProp=l,"property"):q.hasOwnProperty(l)?"property":"tag"}return a.match(/ *:/,!1)?(h(b),b.cursorHalf=1,b.prevProp=a.current().toLowerCase(),"property"):a.match(/ *,/,!1)?"tag":(h(b),"tag")}if(":"===k)return a.match(v)?"variable-3":(a.next(),b.cursorHalf=1,"operator")}return a.match(u)?"operator":(a.next(),null)}function k(a,c){a.sol()&&(c.indentCount=0);var d=c.tokenizer(a,c),e=a.current();if("@return"!==e&&"}"!==e||i(c),null!==d){for(var f=a.pos-e.length,g=f+b.indentUnit*c.indentCount,h=[],j=0;j","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"],u=function(a){return new RegExp("^"+a.join("|"))}(t),v=/^::?[a-zA-Z_][\w\-]*/;return{startState:function(){return{tokenizer:j,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(a,b){var c=k(a,b);return b.lastToken={style:c,content:a.current()},c},indent:function(a){return a.scopes[0].offset}}}),a.defineMIME("text/x-sass","sass")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/scheme/scheme.js b/media/vendor/codemirror/mode/scheme/scheme.js index 22346459115d0..1d8f7d17f0b89 100644 --- a/media/vendor/codemirror/mode/scheme/scheme.js +++ b/media/vendor/codemirror/mode/scheme/scheme.js @@ -224,7 +224,7 @@ CodeMirror.defineMode("scheme", function () { } } } else { - stream.eatWhile(/[\w\$_\-!$%&*+\.\/:<=>?@\^~]/); + stream.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/); if (keywords && keywords.propertyIsEnumerable(stream.current())) { returnType = BUILTIN; diff --git a/media/vendor/codemirror/mode/scheme/scheme.min.js b/media/vendor/codemirror/mode/scheme/scheme.min.js index 2485618e7566c..c930e01016f72 100644 --- a/media/vendor/codemirror/mode/scheme/scheme.min.js +++ b/media/vendor/codemirror/mode/scheme/scheme.min.js @@ -1 +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";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?"),s=e("define let letrec let* lambda"),d=new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i),m=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),u=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),p=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 d=null;switch(t.mode){case"string":for(var m=!1;null!=(u=e.next());){if('"'==u&&!m){t.mode=!1;break}m=!m&&"\\"==u}d="string";break;case"comment":for(var u,p=!1;null!=(u=e.next());){if("#"==u&&p){t.mode=!1;break}p="|"==u}d="comment";break;case"s-expr-comment":if(t.mode=!1,"("!=e.peek()&&"["!=e.peek()){e.eatWhile(/[^/s]/),d="comment";break}t.sExprComment=0;default:var f=e.next();if('"'==f)t.mode="string",d="string";else if("'"==f)d="atom";else if("#"==f)if(e.eat("|"))t.mode="comment",d="comment";else if(e.eat(/[tf]/i))d="atom";else if(e.eat(";"))t.mode="s-expr-comment",d="comment";else{var h=null,g=!1,b=!0;e.eat(/[ei]/i)?g=!0:e.backUp(1),e.match(/^#b/i)?h=i:e.match(/^#o/i)?h=a:e.match(/^#x/i)?h=o:e.match(/^#d/i)?h=c:e.match(/^[-+0-9.]/,!1)?(b=!1,h=c):g||e.eat("#"),null!=h&&(b&&!g&&e.match(/^#[ei]/i),h(e)&&(d="number"))}else if(/^[-+0-9.]/.test(f)&&c(e,!0))d="number";else if(";"==f)e.skipToEnd(),d="comment";else if("("==f||"["==f){for(var x,v="",k=e.column();null!=(x=e.eat(/[^\s\(\[\;\)\]]/));)v+=x;v.length>0&&s.propertyIsEnumerable(v)?n(t,k+2,f):(e.eatSpace(),e.eol()||";"==e.peek()?n(t,k+1,f):n(t,k+e.current().length,f)),e.backUp(e.current().length-1),"number"==typeof t.sExprComment&&t.sExprComment++,d="bracket"}else")"==f||"]"==f?(d="bracket",null!=t.indentStack&&t.indentStack.type==(")"==f?"(":"[")&&(r(t),"number"==typeof t.sExprComment&&0==--t.sExprComment&&(d="comment",t.sExprComment=!1))):(e.eatWhile(/[\w\$_\-!$%&*+\.\/:<=>?@\^~]/),d=l&&l.propertyIsEnumerable(e.current())?"builtin":"variable")}return"number"==typeof t.sExprComment?"comment":d},indent:function(e){return null==e.indentStack?e.indentation:e.indentStack.indent},closeBrackets:{pairs:'()[]{}""'},lineComment:";;"}}),e.defineMIME("text/x-scheme","scheme")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("scheme",function(){function a(a){for(var b={},c=a.split(" "),d=0;dinteger 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?"),j=a("define let letrec let* lambda"),k=new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i),l=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),m=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),n=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(a,b){if(null==b.indentStack&&a.sol()&&(b.indentation=a.indentation()),a.eatSpace())return null;var k=null;switch(b.mode){case"string":for(var l,m=!1;null!=(l=a.next());){if('"'==l&&!m){b.mode=!1;break}m=!m&&"\\"==l}k="string";break;case"comment":for(var l,n=!1;null!=(l=a.next());){if("#"==l&&n){b.mode=!1;break}n="|"==l}k="comment";break;case"s-expr-comment":if(b.mode=!1,"("!=a.peek()&&"["!=a.peek()){a.eatWhile(/[^\/s]/),k="comment";break}b.sExprComment=0;default:var o=a.next();if('"'==o)b.mode="string",k="string";else if("'"==o)k="atom";else if("#"==o)if(a.eat("|"))b.mode="comment",k="comment";else if(a.eat(/[tf]/i))k="atom";else if(a.eat(";"))b.mode="s-expr-comment",k="comment";else{var p=null,q=!1,r=!0;a.eat(/[ei]/i)?q=!0:a.backUp(1),a.match(/^#b/i)?p=e:a.match(/^#o/i)?p=f:a.match(/^#x/i)?p=h:a.match(/^#d/i)?p=g:a.match(/^[-+0-9.]/,!1)?(r=!1,p=g):q||a.eat("#"),null!=p&&(r&&!q&&a.match(/^#[ei]/i),p(a)&&(k="number"))}else if(/^[-+0-9.]/.test(o)&&g(a,!0))k="number";else if(";"==o)a.skipToEnd(),k="comment";else if("("==o||"["==o){for(var s,t="",u=a.column();null!=(s=a.eat(/[^\s\(\[\;\)\]]/));)t+=s;t.length>0&&j.propertyIsEnumerable(t)?c(b,u+2,o):(a.eatSpace(),a.eol()||";"==a.peek()?c(b,u+1,o):c(b,u+a.current().length,o)),a.backUp(a.current().length-1),"number"==typeof b.sExprComment&&b.sExprComment++,k="bracket"}else")"==o||"]"==o?(k="bracket",null!=b.indentStack&&b.indentStack.type==(")"==o?"(":"[")&&(d(b),"number"==typeof b.sExprComment&&0==--b.sExprComment&&(k="comment",b.sExprComment=!1))):(a.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/),k=i&&i.propertyIsEnumerable(a.current())?"builtin":"variable")}return"number"==typeof b.sExprComment?"comment":k},indent:function(a){return null==a.indentStack?a.indentation:a.indentStack.indent},closeBrackets:{pairs:'()[]{}""'},lineComment:";;"}}),a.defineMIME("text/x-scheme","scheme")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/shell/shell.min.js b/media/vendor/codemirror/mode/shell/shell.min.js index a5f07ef903326..4303a7941aa3f 100644 --- a/media/vendor/codemirror/mode/shell/shell.min.js +++ b/media/vendor/codemirror/mode/shell/shell.min.js @@ -1 +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";e.defineMode("shell",function(){function e(e,t){for(var n=t.split(" "),r=0;r1&&e.eat("$");var i=e.next();return/['"({]/.test(i)?(t.tokens[0]=n(i,"("==i?"quote":"{"==i?"def":"string"),r(e,t)):(/\d/.test(i)||e.eatWhile(/\w/),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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("shell",function(){function a(a,b){for(var c=b.split(" "),d=0;d1&&a.eat("$");var e=a.next();return/['"({]/.test(e)?(b.tokens[0]=c(e,"("==e?"quote":"{"==e?"def":"string"),d(a,b)):(/\d/.test(e)||a.eatWhile(/\w/),b.tokens.shift(),"def")};return{startState:function(){return{tokens:[]}},token:function(a,b){return d(a,b)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),a.defineMIME("text/x-sh","shell")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/sieve/sieve.js b/media/vendor/codemirror/mode/sieve/sieve.js index f67db2f5531b0..0920d0bab323b 100644 --- a/media/vendor/codemirror/mode/sieve/sieve.js +++ b/media/vendor/codemirror/mode/sieve/sieve.js @@ -170,7 +170,7 @@ CodeMirror.defineMode("sieve", function(config) { if (stream.eatSpace()) return null; - return (state.tokenize || tokenBase)(stream, state);; + return (state.tokenize || tokenBase)(stream, state); }, indent: function(state, _textAfter) { diff --git a/media/vendor/codemirror/mode/sieve/sieve.min.js b/media/vendor/codemirror/mode/sieve/sieve.min.js index 3346ba375e142..fd198cbe9556c 100644 --- a/media/vendor/codemirror/mode/sieve/sieve.min.js +++ b/media/vendor/codemirror/mode/sieve/sieve.min.js @@ -1 +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";e.defineMode("sieve",function(e){function n(e){for(var n={},t=e.split(" "),r=0;r-1&&(e.tokenize=n(t.pos,e.tokenize,o),t.backUp(u.length-a-r)),o}function r(t,e){t.stack={parent:t.stack,style:"continuation",indented:e,tokenize:t.line},t.line=t.tokenize}function o(t){t.line==t.tokenize&&(t.line=t.stack.tokenize,t.stack=t.stack.parent)}function u(t,e){return function(n,i){if(o(i),n.match(/^\\$/))return r(i,t),"lineContinuation";var u=e(n,i);return n.eol()&&n.current().match(/(?:^|[^\\])(?:\\\\)*\\$/)&&n.backUp(1),u}}function a(t,e){return function(n,i){o(i);var u=e(n,i);return n.eol()&&n.current().match(/,$/)&&r(i,t),u}}function c(t,e){return function(n,i){return n.peek()==t&&1==i.rubyState.tokenize.length?(n.next(),i.tokenize=e,"closeAttributeTag"):s(n,i)}}function l(e){var n,i=function(t,i){if(1==i.rubyState.tokenize.length&&!i.rubyState.context.prev){if(t.backUp(1),t.eatSpace())return i.rubyState=n,i.tokenize=e,e(t,i);t.next()}return s(t,i)};return function(e,r){return n=r.rubyState,r.rubyState=t.startState(Z),r.tokenize=i,s(e,r)}}function s(t,e){return Z.token(t,e.rubyState)}function k(t,e){return t.match(/^\\$/)?"lineContinuation":d(t,e)}function d(t,e){return t.match(/^#\{/)?(e.tokenize=c("}",e.tokenize),null):i(t,e,/[^\\]#\{/,1,P.token(t,e.htmlState))}function m(t){return function(e,n){var i=k(e,n);return e.eol()&&(n.tokenize=t),i}}function f(t,e,n){return e.stack={parent:e.stack,style:"html",indented:t.column()+n,tokenize:e.line},e.line=e.tokenize=d,null}function b(t,e){return t.skipToEnd(),e.stack.style}function z(t,e){return e.stack={parent:e.stack,style:"comment",indented:e.indented+1,tokenize:e.line},e.line=b,b(t,e)}function p(t,e){return t.eat(e.stack.endQuote)?(e.line=e.stack.line,e.tokenize=e.stack.tokenize,e.stack=e.stack.parent,null):t.match(K)?(e.tokenize=x,"slimAttribute"):(t.next(),null)}function x(t,e){return t.match(/^==?/)?(e.tokenize=h,null):p(t,e)}function h(t,e){var n=t.peek();return'"'==n||"'"==n?(e.tokenize=q(n,"string",!0,!1,p),t.next(),e.tokenize(t,e)):"["==n?l(p)(t,e):t.match(/^(true|false|nil)\b/)?(e.tokenize=p,"keyword"):l(p)(t,e)}function y(t,e,n){return t.stack={parent:t.stack,style:"wrapper",indented:t.indented+1,tokenize:n,line:t.line,endQuote:e},t.line=t.tokenize=p,null}function S(e,n){if(e.match(/^#\{/))return n.tokenize=c("}",n.tokenize),null;var i=new t.StringStream(e.string.slice(n.stack.indented),e.tabSize);i.pos=e.pos-n.stack.indented,i.start=e.start-n.stack.indented,i.lastColumnPos=e.lastColumnPos-n.stack.indented,i.lastColumnValue=e.lastColumnValue-n.stack.indented;var r=n.subMode.token(i,n.subState);return e.pos=i.pos+n.stack.indented,r}function w(t,e){return e.stack.indented=t.column(),e.line=e.tokenize=S,e.tokenize(t,e)}function g(n){var i=D[n],r=t.mimeModes[i];if(r)return t.getMode(e,r);var o=t.modes[i];return o?o(e,{name:i}):t.getMode(e,"null")}function M(t){return _.hasOwnProperty(t)?_[t]:_[t]=g(t)}function v(e,n){var i=M(e),r=t.startState(i);return n.subMode=i,n.subState=r,n.stack={parent:n.stack,style:"sub",indented:n.indented+1,tokenize:n.line},n.line=n.tokenize=w,"slimSubmode"}function C(t,e){return t.skipToEnd(),"slimDoctype"}function E(t,e){if("<"==t.peek())return(e.tokenize=m(e.tokenize))(t,e);if(t.match(/^[|']/))return f(t,e,1);if(t.match(/^\/(!|\[\w+])?/))return z(t,e);if(t.match(/^(-|==?[<>]?)/))return e.tokenize=u(t.column(),a(t.column(),s)),"slimSwitch";if(t.match(/^doctype\b/))return e.tokenize=C,"keyword";var n=t.match(Q);return n?v(n[1],e):L(t,e)}function A(t,e){return e.startOfLine?E(t,e):L(t,e)}function L(t,e){return t.eat("*")?(e.tokenize=l($),null):t.match(H)?(e.tokenize=$,"slimTag"):T(t,e)}function $(t,e){return t.match(/^(<>?|>e.indented&&"slimSubmode"!=e.last;)e.line=e.tokenize=e.stack.tokenize,e.stack=e.stack.parent,e.subMode=null,e.subState=null;if(t.eatSpace())return null;var n=e.tokenize(t,e);return e.startOfLine=!1,n&&(e.last=n),V.hasOwnProperty(n)?V[n]:n},blankLine:function(t){if(t.subMode&&t.subMode.blankLine)return t.subMode.blankLine(t.subState)},innerMode:function(t){return t.subMode?{state:t.subState,mode:t.subMode}:{state:t,mode:X}}};return X},"htmlmixed","ruby"),t.defineMIME("text/x-slim","slim"),t.defineMIME("application/x-slim","slim")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../ruby/ruby")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../ruby/ruby"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("slim",function(b){function c(a,b,c){var d=function(d,e){return e.tokenize=b,d.pos-1&&(b.tokenize=c(a.pos,b.tokenize,f),a.backUp(g.length-h-e)),f}function e(a,b){a.stack={parent:a.stack,style:"continuation",indented:b,tokenize:a.line},a.line=a.tokenize}function f(a){a.line==a.tokenize&&(a.line=a.stack.tokenize,a.stack=a.stack.parent)}function g(a,b){return function(c,d){if(f(d),c.match(/^\\$/))return e(d,a),"lineContinuation";var g=b(c,d);return c.eol()&&c.current().match(/(?:^|[^\\])(?:\\\\)*\\$/)&&c.backUp(1),g}}function h(a,b){return function(c,d){f(d);var g=b(c,d);return c.eol()&&c.current().match(/,$/)&&e(d,a),g}}function i(a,b){return function(c,d){return c.peek()==a&&1==d.rubyState.tokenize.length?(c.next(),d.tokenize=b,"closeAttributeTag"):k(c,d)}}function j(b){var c,d=function(a,d){if(1==d.rubyState.tokenize.length&&!d.rubyState.context.prev){if(a.backUp(1),a.eatSpace())return d.rubyState=c,d.tokenize=b,b(a,d);a.next()}return k(a,d)};return function(b,e){return c=e.rubyState,e.rubyState=a.startState(N),e.tokenize=d,k(b,e)}}function k(a,b){return N.token(a,b.rubyState)}function l(a,b){return a.match(/^\\$/)?"lineContinuation":m(a,b)}function m(a,b){return a.match(/^#\{/)?(b.tokenize=i("}",b.tokenize),null):d(a,b,/[^\\]#\{/,1,M.token(a,b.htmlState))}function n(a){return function(b,c){var d=l(b,c);return b.eol()&&(c.tokenize=a),d}}function o(a,b,c){return b.stack={parent:b.stack,style:"html",indented:a.column()+c,tokenize:b.line},b.line=b.tokenize=m,null}function p(a,b){return a.skipToEnd(),b.stack.style}function q(a,b){return b.stack={parent:b.stack,style:"comment",indented:b.indented+1,tokenize:b.line},b.line=p,p(a,b)}function r(a,b){return a.eat(b.stack.endQuote)?(b.line=b.stack.line,b.tokenize=b.stack.tokenize,b.stack=b.stack.parent,null):a.match(X)?(b.tokenize=s,"slimAttribute"):(a.next(),null)}function s(a,b){return a.match(/^==?/)?(b.tokenize=t,null):r(a,b)}function t(a,b){var c=a.peek();return'"'==c||"'"==c?(b.tokenize=K(c,"string",!0,!1,r),a.next(),b.tokenize(a,b)):"["==c?j(r)(a,b):a.match(/^(true|false|nil)\b/)?(b.tokenize=r,"keyword"):j(r)(a,b)}function u(a,b,c){return a.stack={parent:a.stack,style:"wrapper",indented:a.indented+1,tokenize:c,line:a.line,endQuote:b},a.line=a.tokenize=r,null}function v(b,c){if(b.match(/^#\{/))return c.tokenize=i("}",c.tokenize),null;var d=new a.StringStream(b.string.slice(c.stack.indented),b.tabSize);d.pos=b.pos-c.stack.indented,d.start=b.start-c.stack.indented,d.lastColumnPos=b.lastColumnPos-c.stack.indented,d.lastColumnValue=b.lastColumnValue-c.stack.indented;var e=c.subMode.token(d,c.subState);return b.pos=d.pos+c.stack.indented,e}function w(a,b){return b.stack.indented=a.column(),b.line=b.tokenize=v,b.tokenize(a,b)}function x(c){var d=P[c],e=a.mimeModes[d];if(e)return a.getMode(b,e);var f=a.modes[d];return f?f(b,{name:d}):a.getMode(b,"null")}function y(a){return O.hasOwnProperty(a)?O[a]:O[a]=x(a)}function z(b,c){var d=y(b),e=a.startState(d);return c.subMode=d,c.subState=e,c.stack={parent:c.stack,style:"sub",indented:c.indented+1,tokenize:c.line},c.line=c.tokenize=w,"slimSubmode"}function A(a,b){return a.skipToEnd(),"slimDoctype"}function B(a,b){if("<"==a.peek())return(b.tokenize=n(b.tokenize))(a,b);if(a.match(/^[|']/))return o(a,b,1);if(a.match(/^\/(!|\[\w+])?/))return q(a,b);if(a.match(/^(-|==?[<>]?)/))return b.tokenize=g(a.column(),h(a.column(),k)),"slimSwitch";if(a.match(/^doctype\b/))return b.tokenize=A,"keyword";var c=a.match(Q);return c?z(c[1],b):D(a,b)}function C(a,b){return b.startOfLine?B(a,b):D(a,b)}function D(a,b){return a.eat("*")?(b.tokenize=j(E),null):a.match(V)?(b.tokenize=E,"slimTag"):F(a,b)}function E(a,b){return a.match(/^(<>?|>b.indented&&"slimSubmode"!=b.last;)b.line=b.tokenize=b.stack.tokenize,b.stack=b.stack.parent,b.subMode=null,b.subState=null;if(a.eatSpace())return null;var c=b.tokenize(a,b);return b.startOfLine=!1,c&&(b.last=c),R.hasOwnProperty(c)?R[c]:c},blankLine:function(a){if(a.subMode&&a.subMode.blankLine)return a.subMode.blankLine(a.subState)},innerMode:function(a){return a.subMode?{state:a.subState,mode:a.subMode}:{state:a,mode:$}}};return $},"htmlmixed","ruby"),a.defineMIME("text/x-slim","slim"),a.defineMIME("application/x-slim","slim")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/smalltalk/smalltalk.min.js b/media/vendor/codemirror/mode/smalltalk/smalltalk.min.js index 5103a746a2436..9c1dc0a000723 100644 --- a/media/vendor/codemirror/mode/smalltalk/smalltalk.min.js +++ b/media/vendor/codemirror/mode/smalltalk/smalltalk.min.js @@ -1 +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";e.defineMode("smalltalk",function(e){var t=/[+\-\/\\*~<>=@%|&?!.,:;^]/,n=/true|false|nil|self|super|thisContext/,i=function(e,t){this.next=e,this.parent=t},a=function(e,t,n){this.name=e,this.context=t,this.eos=n},r=function(){this.context=new i(o,null),this.expectVariable=!0,this.indentation=0,this.userIndentationDelta=0};r.prototype.userIndent=function(t){this.userIndentationDelta=t>0?t/e.indentUnit-this.indentation:0};var o=function(e,r,o){var d=new a(null,r,!1),f=e.next();return'"'===f?d=s(e,new i(s,r)):"'"===f?d=u(e,new i(u,r)):"#"===f?"'"===e.peek()?(e.next(),d=c(e,new i(c,r))):e.eatWhile(/[^\s.{}\[\]()]/)?d.name="string-2":d.name="meta":"$"===f?("<"===e.next()&&(e.eatWhile(/[^\s>]/),e.next()),d.name="string-2"):"|"===f&&o.expectVariable?d.context=new i(l,r):/[\[\]{}()]/.test(f)?(d.name="bracket",d.eos=/[\[{(]/.test(f),"["===f?o.indentation++:"]"===f&&(o.indentation=Math.max(0,o.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=o.expectVariable?n.test(e.current())?"keyword":"variable":null):d.eos=o.expectVariable,d},s=function(e,t){return e.eatWhile(/[^"]/),new a("comment",e.eat('"')?t.parent:t,!0)},u=function(e,t){return e.eatWhile(/[^']/),new a("string",e.eat("'")?t.parent:t,!1)},c=function(e,t){return e.eatWhile(/[^']/),new a("string-2",e.eat("'")?t.parent:t,!1)},l=function(e,t){var n=new a(null,t,!1);return"|"===e.next()?(n.context=t.parent,n.eos=!0):(e.eatWhile(/[^|]/),n.name="variable"),n};return{startState:function(){return new r},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 i=t.context.next===o&&n&&"]"===n.charAt(0)?-1:t.userIndentationDelta;return(t.indentation+i)*e.indentUnit},electricChars:"]"}}),e.defineMIME("text/x-stsrc",{name:"smalltalk"})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("smalltalk",function(a){var b=/[+\-\/\\*~<>=@%|&?!.,:;^]/,c=/true|false|nil|self|super|thisContext/,d=function(a,b){this.next=a,this.parent=b},e=function(a,b,c){this.name=a,this.context=b,this.eos=c},f=function(){this.context=new d(g,null),this.expectVariable=!0,this.indentation=0,this.userIndentationDelta=0};f.prototype.userIndent=function(b){this.userIndentationDelta=b>0?b/a.indentUnit-this.indentation:0};var g=function(a,f,g){var l=new e(null,f,!1),m=a.next();return'"'===m?l=h(a,new d(h,f)):"'"===m?l=i(a,new d(i,f)):"#"===m?"'"===a.peek()?(a.next(),l=j(a,new d(j,f))):a.eatWhile(/[^\s.{}\[\]()]/)?l.name="string-2":l.name="meta":"$"===m?("<"===a.next()&&(a.eatWhile(/[^\s>]/),a.next()),l.name="string-2"):"|"===m&&g.expectVariable?l.context=new d(k,f):/[\[\]{}()]/.test(m)?(l.name="bracket",l.eos=/[\[{(]/.test(m),"["===m?g.indentation++:"]"===m&&(g.indentation=Math.max(0,g.indentation-1))):b.test(m)?(a.eatWhile(b),l.name="operator",l.eos=";"!==m):/\d/.test(m)?(a.eatWhile(/[\w\d]/),l.name="number"):/[\w_]/.test(m)?(a.eatWhile(/[\w\d_]/),l.name=g.expectVariable?c.test(a.current())?"keyword":"variable":null):l.eos=g.expectVariable,l},h=function(a,b){return a.eatWhile(/[^"]/),new e("comment",a.eat('"')?b.parent:b,!0)},i=function(a,b){return a.eatWhile(/[^']/),new e("string",a.eat("'")?b.parent:b,!1)},j=function(a,b){return a.eatWhile(/[^']/),new e("string-2",a.eat("'")?b.parent:b,!1)},k=function(a,b){var c=new e(null,b,!1);return"|"===a.next()?(c.context=b.parent,c.eos=!0):(a.eatWhile(/[^|]/),c.name="variable"),c};return{startState:function(){return new f},token:function(a,b){if(b.userIndent(a.indentation()),a.eatSpace())return null;var c=b.context.next(a,b.context,b);return b.context=c.context,b.expectVariable=c.eos,c.name},blankLine:function(a){a.userIndent(0)},indent:function(b,c){var d=b.context.next===g&&c&&"]"===c.charAt(0)?-1:b.userIndentationDelta;return(b.indentation+d)*a.indentUnit},electricChars:"]"}}),a.defineMIME("text/x-stsrc",{name:"smalltalk"})}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/smarty/smarty.min.js b/media/vendor/codemirror/mode/smarty/smarty.min.js index 710320d5610dd..0eb7a9caf2146 100644 --- a/media/vendor/codemirror/mode/smarty/smarty.min.js +++ b/media/vendor/codemirror/mode/smarty/smarty.min.js @@ -1 +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";e.defineMode("smarty",function(t,r){function n(e,t){return s=t,e}function i(e,t,r){return t.tokenize=r,r(e,t)}function a(e,t){return null==t&&(t=e.pos),3===p&&"{"==c&&(t==e.string.length||/\s/.test(e.string.charAt(t)))}function o(e,t){for(var r=e.string,n=e.pos;;){var o=r.indexOf(c,n);if(n=o+c.length,-1==o||!a(e,o+c.length))break}if(o==e.pos)return e.match(c),e.eat("*")?i(e,t,l("comment","*"+d)):(t.depth++,t.tokenize=u,s="startTag","tag");o>-1&&(e.string=r.slice(0,o));var f=h.token(e,t.base);return o>-1&&(e.string=r),f}function u(e,t){if(e.match(d,!0))return 3===p?--t.depth<=0&&(t.tokenize=o):t.tokenize=o,n("tag",null);if(e.match(c,!0))return t.depth++,n("tag","startTag");var r=e.next();if("$"==r)return e.eatWhile(k.validIdentifier),n("variable-2","variable");if("|"==r)return n("operator","pipe");if("."==r)return n("operator","property");if(k.stringChar.test(r))return t.tokenize=f(r),n("string","string");if(k.operatorChars.test(r))return e.eatWhile(k.operatorChars),n("operator","operator");if("["==r||"]"==r)return n("bracket","bracket");if("("==r||")"==r)return n("bracket","operator");if(/\d/.test(r))return e.eatWhile(/\d/),n("number","number");if("variable"==t.last){if("@"==r)return e.eatWhile(k.validIdentifier),n("property","property");if("|"==r)return e.eatWhile(k.validIdentifier),n("qualifier","modifier")}else{if("pipe"==t.last)return e.eatWhile(k.validIdentifier),n("qualifier","modifier");if("whitespace"==t.last)return e.eatWhile(k.validIdentifier),n("attribute","modifier")}if("property"==t.last)return e.eatWhile(k.validIdentifier),n("property",null);if(/\s/.test(r))return s="whitespace",null;var i="";"/"!=r&&(i+=r);for(var a=null;a=e.eat(k.validIdentifier);)i+=a;for(var u=0,l=b.length;u!?]/,validIdentifier:/[a-zA-Z0-9_]/,stringChar:/['"]/};return{startState:function(){return{base:e.startState(h),tokenize:o,last:null,depth:0}},copyState:function(t){return{base:e.copyState(h,t.base),tokenize:t.tokenize,last:t.last,depth:t.depth}},innerMode:function(e){if(e.tokenize==o)return{mode:h,state:e.base}},token:function(e,t){var r=t.tokenize(e,t);return t.last=s,r},indent:function(t,r){return t.tokenize==o&&h.indent?h.indent(t.base,r):e.Pass},blockCommentStart:c+"*",blockCommentEnd:"*"+d}}),e.defineMIME("text/x-smarty","smarty")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("smarty",function(b,c){function d(a,b){return k=b,a}function e(a,b,c){return b.tokenize=c,c(a,b)}function f(a,b){return null==b&&(b=a.pos),3===n&&"{"==m&&(b==a.string.length||/\s/.test(a.string.charAt(b)))}function g(a,b){for(var c=a.string,d=a.pos;;){var g=c.indexOf(m,d);if(d=g+m.length,g==-1||!f(a,g+m.length))break}if(g==a.pos)return a.match(m),a.eat("*")?e(a,b,j("comment","*"+l)):(b.depth++,b.tokenize=h,k="startTag","tag");g>-1&&(a.string=c.slice(0,g));var i=o.token(a,b.base);return g>-1&&(a.string=c),i}function h(a,b){if(a.match(l,!0))return 3===n?--b.depth<=0&&(b.tokenize=g):b.tokenize=g,d("tag",null);if(a.match(m,!0))return b.depth++,d("tag","startTag");var c=a.next();if("$"==c)return a.eatWhile(q.validIdentifier),d("variable-2","variable");if("|"==c)return d("operator","pipe");if("."==c)return d("operator","property");if(q.stringChar.test(c))return b.tokenize=i(c),d("string","string");if(q.operatorChars.test(c))return a.eatWhile(q.operatorChars),d("operator","operator");if("["==c||"]"==c)return d("bracket","bracket");if("("==c||")"==c)return d("bracket","operator");if(/\d/.test(c))return a.eatWhile(/\d/),d("number","number");if("variable"==b.last){if("@"==c)return a.eatWhile(q.validIdentifier),d("property","property");if("|"==c)return a.eatWhile(q.validIdentifier),d("qualifier","modifier")}else{if("pipe"==b.last)return a.eatWhile(q.validIdentifier),d("qualifier","modifier");if("whitespace"==b.last)return a.eatWhile(q.validIdentifier),d("attribute","modifier")}if("property"==b.last)return a.eatWhile(q.validIdentifier),d("property",null);if(/\s/.test(c))return k="whitespace",null;var e="";"/"!=c&&(e+=c);for(var f=null;f=a.eat(q.validIdentifier);)e+=f;for(var h=0,j=p.length;h!?]/,validIdentifier:/[a-zA-Z0-9_]/,stringChar:/['"]/};return{startState:function(){return{base:a.startState(o),tokenize:g,last:null,depth:0}},copyState:function(b){return{base:a.copyState(o,b.base),tokenize:b.tokenize,last:b.last,depth:b.depth}},innerMode:function(a){if(a.tokenize==g)return{mode:o,state:a.base}},token:function(a,b){var c=b.tokenize(a,b);return b.last=k,c},indent:function(b,c){return b.tokenize==g&&o.indent?o.indent(b.base,c):a.Pass},blockCommentStart:m+"*",blockCommentEnd:"*"+l}}),a.defineMIME("text/x-smarty","smarty")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/solr/solr.js b/media/vendor/codemirror/mode/solr/solr.js index f7f7087891694..dc8b82501e8bd 100644 --- a/media/vendor/codemirror/mode/solr/solr.js +++ b/media/vendor/codemirror/mode/solr/solr.js @@ -14,12 +14,12 @@ CodeMirror.defineMode("solr", function() { "use strict"; - var isStringChar = /[^\s\|\!\+\-\*\?\~\^\&\:\(\)\[\]\{\}\^\"\\]/; + var isStringChar = /[^\s\|\!\+\-\*\?\~\^\&\:\(\)\[\]\{\}\"\\]/; var isOperatorChar = /[\|\!\+\-\*\?\~\^\&]/; var isOperatorString = /^(OR|AND|NOT|TO)$/i; function isNumber(word) { - return parseFloat(word, 10).toString() === word; + return parseFloat(word).toString() === word; } function tokenString(quote) { diff --git a/media/vendor/codemirror/mode/solr/solr.min.js b/media/vendor/codemirror/mode/solr/solr.min.js index e7af1e6699d06..704a17c203f47 100644 --- a/media/vendor/codemirror/mode/solr/solr.min.js +++ b/media/vendor/codemirror/mode/solr/solr.min.js @@ -1 +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";e.defineMode("solr",function(){function e(e){return parseFloat(e,10).toString()===e}function t(e){return function(t,n){for(var r,i=!1;null!=(r=t.next())&&(r!=e||i);)i=!i&&"\\"==r;return i||(n.tokenize=o),"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=o,r}}function r(t){return function(n,r){for(var u=t;(t=n.peek())&&null!=t.match(i);)u+=n.next();return r.tokenize=o,f.test(u)?"operator":e(u)?"number":":"==n.peek()?"field":"string"}}function o(e,f){var c=e.next();return'"'==c?f.tokenize=t(c):u.test(c)?f.tokenize=n(c):i.test(c)&&(f.tokenize=r(c)),f.tokenize!=o?f.tokenize(e,f):null}var i=/[^\s\|\!\+\-\*\?\~\^\&\:\(\)\[\]\{\}\^\"\\]/,u=/[\|\!\+\-\*\?\~\^\&]/,f=/^(OR|AND|NOT|TO)$/i;return{startState:function(){return{tokenize:o}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)}}}),e.defineMIME("text/x-solr","solr")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("solr",function(){function a(a){return parseFloat(a).toString()===a}function b(a){return function(b,c){for(var d,f=!1;null!=(d=b.next())&&(d!=a||f);)f=!f&&"\\"==d;return f||(c.tokenize=e),"string"}}function c(a){return function(b,c){var d="operator";return"+"==a?d+=" positive":"-"==a?d+=" negative":"|"==a?b.eat(/\|/):"&"==a?b.eat(/\&/):"^"==a&&(d+=" boost"),c.tokenize=e,d}}function d(b){return function(c,d){for(var g=b;(b=c.peek())&&null!=b.match(f);)g+=c.next();return d.tokenize=e,h.test(g)?"operator":a(g)?"number":":"==c.peek()?"field":"string"}}function e(a,h){var i=a.next();return'"'==i?h.tokenize=b(i):g.test(i)?h.tokenize=c(i):f.test(i)&&(h.tokenize=d(i)),h.tokenize!=e?h.tokenize(a,h):null}var f=/[^\s\|\!\+\-\*\?\~\^\&\:\(\)\[\]\{\}\"\\]/,g=/[\|\!\+\-\*\?\~\^\&]/,h=/^(OR|AND|NOT|TO)$/i;return{startState:function(){return{tokenize:e}},token:function(a,b){return a.eatSpace()?null:b.tokenize(a,b)}}}),a.defineMIME("text/x-solr","solr")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/soy/soy.js b/media/vendor/codemirror/mode/soy/soy.js index c0198609e7373..ba16363638d37 100644 --- a/media/vendor/codemirror/mode/soy/soy.js +++ b/media/vendor/codemirror/mode/soy/soy.js @@ -90,6 +90,7 @@ variables: null, scopes: null, indent: 0, + quoteKind: null, localStates: [{ mode: modes.html, state: CodeMirror.startState(modes.html) @@ -107,6 +108,7 @@ variables: state.variables, scopes: state.scopes, indent: state.indent, // Indentation of the following line. + quoteKind: state.quoteKind, localStates: state.localStates.map(function(localState) { return { mode: localState.mode, @@ -211,8 +213,9 @@ }); } return "attribute"; - } else if (stream.match(/^"/)) { + } else if (match = stream.match(/^["']/)) { state.soyState.push("string"); + state.quoteKind = match; return "string"; } if (match = stream.match(/^\$([\w]+)/)) { @@ -233,10 +236,11 @@ return tokenUntil(stream, state, /\{\/literal}/); case "string": - var match = stream.match(/^.*?("|\\[\s\S])/); + var match = stream.match(/^.*?(["']|\\[\s\S])/); if (!match) { stream.skipToEnd(); - } else if (match[1] == "\"") { + } else if (match[1] == state.quoteKind) { + state.quoteKind = null; state.soyState.pop(); } return "string"; @@ -251,7 +255,9 @@ state.indent += config.indentUnit; state.soyState.push("literal"); return "keyword"; - } else if (match = stream.match(/^\{([\/@\\]?[\w?]*)/)) { + + // A tag-keyword must be followed by whitespace or a closing tag. + } else if (match = stream.match(/^\{([\/@\\]?\w+\??)(?=[\s\}])/)) { if (match[1] != "/switch") state.indent += (/^(\/|(else|elseif|ifempty|case|fallbackmsg|default)$)/.test(match[1]) && state.tag != "switch" ? 1 : 2) * config.indentUnit; state.tag = match[1]; @@ -283,6 +289,13 @@ state.soyState.push("param-def"); } return "keyword"; + + // Not a tag-keyword; it's an implicit print tag. + } else if (stream.eat('{')) { + state.tag = "print"; + state.indent += 2 * config.indentUnit; + state.soyState.push("tag"); + return "keyword"; } return tokenUntil(stream, state, /\{|\s+\/\/|\/\*/); diff --git a/media/vendor/codemirror/mode/soy/soy.min.js b/media/vendor/codemirror/mode/soy/soy.min.js index 624609e0ce8de..a3619eaae8d68 100644 --- a/media/vendor/codemirror/mode/soy/soy.min.js +++ b/media/vendor/codemirror/mode/soy/soy.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed"],t):t(CodeMirror)}(function(t){"use strict";var e=["template","literal","msg","fallbackmsg","let","if","elseif","else","switch","case","default","foreach","ifempty","for","call","param","deltemplate","delcall","log"];t.defineMode("soy",function(a){function n(t){return t[t.length-1]}function s(t,e,a){if(t.sol()){for(var s=0;s]*>?/),"atom"}function r(t){return function(e,r){for(var i,o=!1;null!=(i=e.next());){if(i==t&&!o){r.tokenize=n;break}o=!o&&"\\"==i}return"string"}}function i(t,e,n){t.context={prev:t.context,indent:t.indent,col:n,type:e}}function o(t){t.indent=t.context.indent,t.context=t.context.prev}var a,c=t.indentUnit,s=e(["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"]),u=e(["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"]),l=/[*+\-<>=&|\^\/!\?]/;return{startState:function(){return{tokenize:n,context:null,indent:0,col:0}},token:function(t,e){if(t.sol()&&(e.context&&null==e.context.align&&(e.context.align=!1),e.indent=t.indentation()),t.eatSpace())return null;var n=e.tokenize(t,e);if("comment"!=n&&e.context&&null==e.context.align&&"pattern"!=e.context.type&&(e.context.align=!0),"("==a)i(e,")",t.column());else if("["==a)i(e,"]",t.column());else if("{"==a)i(e,"}",t.column());else if(/[\]\}\)]/.test(a)){for(;e.context&&"pattern"==e.context.type;)o(e);e.context&&a==e.context.type&&(o(e),"}"==a&&e.context&&"pattern"==e.context.type&&o(e))}else"."==a&&e.context&&"pattern"==e.context.type?o(e):/atom|string|variable/.test(n)&&e.context&&(/[\}\]]/.test(e.context.type)?i(e,"pattern",t.column()):"pattern"!=e.context.type||e.context.align||(e.context.align=!0,e.context.col=t.column()));return n},indent:function(t,e){var n=e&&e.charAt(0),r=t.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:c):0},lineComment:"#"}}),t.defineMIME("application/sparql-query","sparql")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("sparql",function(a){function b(a){return new RegExp("^(?:"+a.join("|")+")$","i")}function c(a,b){var c=a.next();if(g=null,"$"==c||"?"==c)return"?"==c&&a.match(/\s/,!1)?"operator":(a.match(/^[\w\d]*/),"variable-2");if("<"!=c||a.match(/^[\s\u00a0=]/,!1)){if('"'==c||"'"==c)return b.tokenize=d(c),b.tokenize(a,b);if(/[{}\(\),\.;\[\]]/.test(c))return g=c,"bracket";if("#"==c)return a.skipToEnd(),"comment";if(k.test(c))return a.eatWhile(k),"operator";if(":"==c)return a.eatWhile(/[\w\d\._\-]/),"atom";if("@"==c)return a.eatWhile(/[a-z\d\-]/i),"meta";if(a.eatWhile(/[_\w\d]/),a.eat(":"))return a.eatWhile(/[\w\d_\-]/),"atom";var e=a.current();return i.test(e)?"builtin":j.test(e)?"keyword":"variable"}return a.match(/^[^\s\u00a0>]*>?/),"atom"}function d(a){return function(b,d){for(var e,f=!1;null!=(e=b.next());){if(e==a&&!f){d.tokenize=c;break}f=!f&&"\\"==e}return"string"}}function e(a,b,c){a.context={prev:a.context,indent:a.indent,col:c,type:b}}function f(a){a.indent=a.context.indent,a.context=a.context.prev}var g,h=a.indentUnit,i=b(["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"]),j=b(["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"]),k=/[*+\-<>=&|\^\/!\?]/;return{startState:function(){return{tokenize:c,context:null,indent:0,col:0}},token:function(a,b){if(a.sol()&&(b.context&&null==b.context.align&&(b.context.align=!1),b.indent=a.indentation()),a.eatSpace())return null;var c=b.tokenize(a,b);if("comment"!=c&&b.context&&null==b.context.align&&"pattern"!=b.context.type&&(b.context.align=!0),"("==g)e(b,")",a.column());else if("["==g)e(b,"]",a.column());else if("{"==g)e(b,"}",a.column());else if(/[\]\}\)]/.test(g)){for(;b.context&&"pattern"==b.context.type;)f(b);b.context&&g==b.context.type&&(f(b),"}"==g&&b.context&&"pattern"==b.context.type&&f(b))}else"."==g&&b.context&&"pattern"==b.context.type?f(b):/atom|string|variable/.test(c)&&b.context&&(/[\}\]]/.test(b.context.type)?e(b,"pattern",a.column()):"pattern"!=b.context.type||b.context.align||(b.context.align=!0,b.context.col=a.column()));return c},indent:function(a,b){var c=b&&b.charAt(0),d=a.context;if(/[\]\}]/.test(c))for(;d&&"pattern"==d.type;)d=d.prev;var e=d&&c==d.type;return d?"pattern"==d.type?d.col:d.align?d.col+(e?0:1):d.indent+(e?0:h):0},lineComment:"#"}}),a.defineMIME("application/sparql-query","sparql")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/spreadsheet/spreadsheet.min.js b/media/vendor/codemirror/mode/spreadsheet/spreadsheet.min.js index 187f912ae08c4..bb03c95c72ab1 100644 --- a/media/vendor/codemirror/mode/spreadsheet/spreadsheet.min.js +++ b/media/vendor/codemirror/mode/spreadsheet/spreadsheet.min.js @@ -1 +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";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 r=e.peek();switch(r){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":-1!=["[","]","(",")","{","}"].indexOf(r)?(e.next(),"bracket"):(e.eatSpace()||e.next(),null)}}}}),e.defineMIME("text/x-spreadsheet","spreadsheet")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("spreadsheet",function(){return{startState:function(){return{stringType:null,stack:[]}},token:function(a,b){if(a){switch(0===b.stack.length&&('"'!=a.peek()&&"'"!=a.peek()||(b.stringType=a.peek(),a.next(),b.stack.unshift("string"))),b.stack[0]){case"string":for(;"string"===b.stack[0]&&!a.eol();)a.peek()===b.stringType?(a.next(),b.stack.shift()):"\\"===a.peek()?(a.next(),a.next()):a.match(/^.[^\\\"\']*/);return"string";case"characterClass":for(;"characterClass"===b.stack[0]&&!a.eol();)a.match(/^[^\]\\]+/)||a.match(/^\\./)||b.stack.shift();return"operator"}var c=a.peek();switch(c){case"[":return a.next(),b.stack.unshift("characterClass"),"bracket";case":":return a.next(),"operator";case"\\":return a.match(/\\[a-z]+/)?"string-2":(a.next(),"atom");case".":case",":case";":case"*":case"-":case"+":case"^":case"<":case"/":case"=":return a.next(),"atom";case"$":return a.next(),"builtin"}return a.match(/\d+/)?a.match(/^\w+/)?"error":"number":a.match(/^[a-zA-Z_]\w*/)?a.match(/(?=[\(.])/,!1)?"keyword":"variable-2":["[","]","(",")","{","}"].indexOf(c)!=-1?(a.next(),"bracket"):(a.eatSpace()||a.next(),null)}}}}),a.defineMIME("text/x-spreadsheet","spreadsheet")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/sql/sql.min.js b/media/vendor/codemirror/mode/sql/sql.min.js index 3fc827c402568..622b8c8fd0e38 100644 --- a/media/vendor/codemirror/mode/sql/sql.min.js +++ b/media/vendor/codemirror/mode/sql/sql.min.js @@ -1 +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";e.defineMode("sql",function(t,r){function a(e,t){var r=e.next();if(g[r]){var a=g[r](e,t);if(!1!==a)return a}if(p.hexNumber&&("0"==r&&e.match(/^[xX][0-9a-fA-F]+/)||("x"==r||"X"==r)&&e.match(/^'[0-9a-fA-F]+'/)))return"number";if(p.binaryNumber&&(("b"==r||"B"==r)&&e.match(/^'[01]+'/)||"0"==r&&e.match(/^b[01]+/)))return"number";if(r.charCodeAt(0)>47&&r.charCodeAt(0)<58)return e.match(/^[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/),p.decimallessFloat&&e.eat("."),"number";if("?"==r&&(e.eatSpace()||e.eol()||e.eat(";")))return"variable-3";if("'"==r||'"'==r&&p.doubleQuote)return t.tokenize=n(r),t.tokenize(e,t);if((p.nCharCast&&("n"==r||"N"==r)||p.charsetCast&&"_"==r&&e.match(/[a-z][a-z0-9]*/i))&&("'"==e.peek()||'"'==e.peek()))return"keyword";if(/^[\(\),\;\[\]]/.test(r))return null;if(p.commentSlashSlash&&"/"==r&&e.eat("/"))return e.skipToEnd(),"comment";if(p.commentHash&&"#"==r||"-"==r&&e.eat("-")&&(!p.commentSpaceRequired||e.eat(" ")))return e.skipToEnd(),"comment";if("/"==r&&e.eat("*"))return t.tokenize=i,t.tokenize(e,t);if("."!=r){if(d.test(r))return e.eatWhile(d),null;if("{"==r&&(e.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||e.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";e.eatWhile(/^[_\w\d]/);var o=e.current().toLowerCase();return b.hasOwnProperty(o)&&(e.match(/^( )+'[^']*'/)||e.match(/^( )+"[^"]*"/))?"number":c.hasOwnProperty(o)?"atom":u.hasOwnProperty(o)?"builtin":m.hasOwnProperty(o)?"keyword":l.hasOwnProperty(o)?"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 n(e){return function(t,r){for(var n,i=!1;null!=(n=t.next());){if(n==e&&!i){r.tokenize=a;break}i=!i&&"\\"==n}return"string"}}function i(e,t){for(;;){if(!e.skipTo("*")){e.skipToEnd();break}if(e.next(),e.eat("/")){t.tokenize=a;break}}return"comment"}function o(e,t,r){t.context={prev:t.context,indent:e.indentation(),col:e.column(),type:r}}function s(e){e.indent=e.context.indent,e.context=e.context.prev}var l=r.client||{},c=r.atoms||{false:!0,true:!0,null:!0},u=r.builtin||{},m=r.keywords||{},d=r.operatorChars||/^[*+\-%<>!=&|~^]/,p=r.support||{},g=r.hooks||{},b=r.dateSQL||{date:!0,time:!0,timestamp:!0};return{startState:function(){return{tokenize:a,context:null}},token:function(e,t){if(e.sol()&&t.context&&null==t.context.align&&(t.context.align=!1),e.eatSpace())return null;var r=t.tokenize(e,t);if("comment"==r)return r;t.context&&null==t.context.align&&(t.context.align=!0);var a=e.current();return"("==a?o(e,t,")"):"["==a?o(e,t,"]"):t.context&&t.context.type==a&&s(t),r},indent:function(r,a){var n=r.context;if(!n)return e.Pass;var i=a.charAt(0)==n.type;return n.align?n.col+(i?0:1):n.indent+(i?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 r(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 a(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 n(e){return e.eat("N")?"atom":e.match(/^[a-zA-Z.#!?]/)?"variable-2":null}function i(e){for(var t={},r=e.split(" "),a=0;a!=]/,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:{"@":a}}),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:{"@":a,"`":t,"\\":n}}),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:{"@":a,"`":t,"\\":n}}),e.defineMIME("text/x-sqlite",{name:"sql",client:i("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:i(o+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:i("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:i("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:i("date time timestamp datetime"),support:i("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":a,":":a,"?":a,$:a,'"':r,"`":t}}),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:/^[*+\-%<>!=]/})}()}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("sql",function(b,c){function d(a,b){var c=a.next();if(o[c]){var d=o[c](a,b);if(d!==!1)return d}if(n.hexNumber&&("0"==c&&a.match(/^[xX][0-9a-fA-F]+/)||("x"==c||"X"==c)&&a.match(/^'[0-9a-fA-F]+'/)))return"number";if(n.binaryNumber&&(("b"==c||"B"==c)&&a.match(/^'[01]+'/)||"0"==c&&a.match(/^b[01]+/)))return"number";if(c.charCodeAt(0)>47&&c.charCodeAt(0)<58)return a.match(/^[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/),n.decimallessFloat&&a.eat("."),"number";if("?"==c&&(a.eatSpace()||a.eol()||a.eat(";")))return"variable-3";if("'"==c||'"'==c&&n.doubleQuote)return b.tokenize=e(c),b.tokenize(a,b);if((n.nCharCast&&("n"==c||"N"==c)||n.charsetCast&&"_"==c&&a.match(/[a-z][a-z0-9]*/i))&&("'"==a.peek()||'"'==a.peek()))return"keyword";if(/^[\(\),\;\[\]]/.test(c))return null;if(n.commentSlashSlash&&"/"==c&&a.eat("/"))return a.skipToEnd(),"comment";if(n.commentHash&&"#"==c||"-"==c&&a.eat("-")&&(!n.commentSpaceRequired||a.eat(" ")))return a.skipToEnd(),"comment";if("/"==c&&a.eat("*"))return b.tokenize=f,b.tokenize(a,b);if("."!=c){if(m.test(c))return a.eatWhile(m),null;if("{"==c&&(a.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||a.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";a.eatWhile(/^[_\w\d]/);var g=a.current().toLowerCase();return p.hasOwnProperty(g)&&(a.match(/^( )+'[^']*'/)||a.match(/^( )+"[^"]*"/))?"number":j.hasOwnProperty(g)?"atom":k.hasOwnProperty(g)?"builtin":l.hasOwnProperty(g)?"keyword":i.hasOwnProperty(g)?"string-2":null}return n.zerolessFloat&&a.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":n.ODBCdotTable&&a.match(/^[a-zA-Z_]+/)?"variable-2":void 0}function e(a){return function(b,c){for(var e,f=!1;null!=(e=b.next());){if(e==a&&!f){c.tokenize=d;break}f=!f&&"\\"==e}return"string"}}function f(a,b){for(;;){if(!a.skipTo("*")){a.skipToEnd();break}if(a.next(),a.eat("/")){b.tokenize=d;break}}return"comment"}function g(a,b,c){b.context={prev:b.context,indent:a.indentation(),col:a.column(),type:c}}function h(a){a.indent=a.context.indent,a.context=a.context.prev}var i=c.client||{},j=c.atoms||{false:!0,true:!0,null:!0},k=c.builtin||{},l=c.keywords||{},m=c.operatorChars||/^[*+\-%<>!=&|~^]/,n=c.support||{},o=c.hooks||{},p=c.dateSQL||{date:!0,time:!0,timestamp:!0};return{startState:function(){return{tokenize:d,context:null}},token:function(a,b){if(a.sol()&&b.context&&null==b.context.align&&(b.context.align=!1),a.eatSpace())return null;var c=b.tokenize(a,b);if("comment"==c)return c;b.context&&null==b.context.align&&(b.context.align=!0);var d=a.current();return"("==d?g(a,b,")"):"["==d?g(a,b,"]"):b.context&&b.context.type==d&&h(b),c},indent:function(c,d){var e=c.context;if(!e)return a.Pass;var f=d.charAt(0)==e.type;return e.align?e.col+(f?0:1):e.indent+(f?0:b.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:n.commentSlashSlash?"//":n.commentHash?"#":null}}),function(){function b(a){for(var b;null!=(b=a.next());)if("`"==b&&!a.eat("`"))return"variable-2";return a.backUp(a.current().length-1),a.eatWhile(/\w/)?"variable-2":null}function c(a){for(var b;null!=(b=a.next());)if('"'==b&&!a.eat('"'))return"variable-2";return a.backUp(a.current().length-1),a.eatWhile(/\w/)?"variable-2":null}function d(a){return a.eat("@")&&(a.match(/^session\./),a.match(/^local\./),a.match(/^global\./)),a.eat("'")?(a.match(/^.*'/),"variable-2"):a.eat('"')?(a.match(/^.*"/),"variable-2"):a.eat("`")?(a.match(/^.*`/),"variable-2"):a.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function e(a){return a.eat("N")?"atom":a.match(/^[a-zA-Z.#!?]/)?"variable-2":null}function f(a){for(var b={},c=a.split(" "),d=0;d!=]/,dateSQL:f("date time timestamp"),support:f("ODBCdotTable doubleQuote binaryNumber hexNumber")}),a.defineMIME("text/x-mssql",{name:"sql",client:f("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:f(g+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec"),builtin:f("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:f("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:f("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":d}}),a.defineMIME("text/x-mysql",{name:"sql",client:f("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:f(g+"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:f("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:f("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:f("date time timestamp"),support:f("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":d,"`":b,"\\":e}}),a.defineMIME("text/x-mariadb",{name:"sql",client:f("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:f(g+"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:f("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:f("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:f("date time timestamp"),support:f("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":d,"`":b,"\\":e}}),a.defineMIME("text/x-sqlite",{name:"sql",client:f("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:f(g+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:f("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:f("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|\/~]/,dateSQL:f("date time timestamp datetime"),support:f("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":d,":":d,"?":d,$:d,'"':c,"`":b}}),a.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:f("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:f("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:f("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:f("commentSlashSlash decimallessFloat"),hooks:{}}),a.defineMIME("text/x-plsql",{name:"sql",client:f("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:f("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:f("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:f("date time timestamp"),support:f("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),a.defineMIME("text/x-hive",{name:"sql",keywords:f("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:f("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype"),atoms:f("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:f("date timestamp"),support:f("ODBCdotTable doubleQuote binaryNumber hexNumber")}),a.defineMIME("text/x-pgsql",{name:"sql",client:f("source"),keywords:f(g+"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:f("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:f("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:f("date time timestamp"),support:f("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),a.defineMIME("text/x-gql",{name:"sql",keywords:f("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:f("false true"),builtin:f("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/})}()}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/stex/stex.min.js b/media/vendor/codemirror/mode/stex/stex.min.js index f76ec58b9f165..4e1cabe7de2ef 100644 --- a/media/vendor/codemirror/mode/stex/stex.min.js +++ b/media/vendor/codemirror/mode/stex/stex.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("stex",function(){function t(t,e){t.cmdState.push(e)}function e(t){return t.cmdState.length>0?t.cmdState[t.cmdState.length-1]:null}function n(t){var e=t.cmdState.pop();e&&e.closeBracket()}function r(t){for(var e=t.cmdState,n=e.length-1;n>=0;n--){var r=e[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}function i(t,e,n){return function(){this.name=t,this.bracketNo=0,this.style=e,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 a(t,e){t.f=e}function c(n,i){var c;if(n.match(/^\\[a-zA-Z@]+/)){var s=n.current().slice(1);return c=f[s]||f.DEFAULT,c=new c,t(i,c),a(i,o),c.style}if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/\\]/))return"tag";if(n.match("\\["))return a(i,function(t,e){return u(t,e,"\\]")}),"keyword";if(n.match("$$"))return a(i,function(t,e){return u(t,e,"$$")}),"keyword";if(n.match("$"))return a(i,function(t,e){return u(t,e,"$")}),"keyword";var m=n.next();return"%"==m?(n.skipToEnd(),"comment"):"}"==m||"]"==m?(c=e(i))?(c.closeBracket(m),a(i,o),"bracket"):"error":"{"==m||"["==m?(c=f.DEFAULT,c=new c,t(i,c),"bracket"):/\d/.test(m)?(n.eatWhile(/[\w.%]/),"atom"):(n.eatWhile(/[\w\-_]/),"begin"==(c=r(i)).name&&(c.argument=n.current()),c.styleIdentifier())}function u(t,e,n){if(t.eatSpace())return null;if(t.match(n))return a(e,c),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variable-2";if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/]/))return"tag";if(t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=t.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(t.skipToEnd(),"comment"):"error"}function o(t,r){var i=t.peek();return"{"==i||"["==i?(e(r).openBracket(i),t.eat(i),a(r,c),"bracket"):/[ \t\r]/.test(i)?(t.eat(i),null):(a(r,c),n(r),c(t,r))}var f={};return f.importmodule=i("importmodule","tag",["string","builtin"]),f.documentclass=i("documentclass","tag",["","atom"]),f.usepackage=i("usepackage","tag",["atom"]),f.begin=i("begin","tag",["atom"]),f.end=i("end","tag",["atom"]),f.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:c}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=c,t.cmdState.length=0},lineComment:"%"}}),t.defineMIME("text/x-stex","stex"),t.defineMIME("text/x-latex","stex")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("stex",function(){function a(a,b){a.cmdState.push(b)}function b(a){return a.cmdState.length>0?a.cmdState[a.cmdState.length-1]:null}function c(a){var b=a.cmdState.pop();b&&b.closeBracket()}function d(a){for(var b=a.cmdState,c=b.length-1;c>=0;c--){var d=b[c];if("DEFAULT"!=d.name)return d}return{styleIdentifier:function(){return null}}}function e(a,b,c){return function(){this.name=a,this.bracketNo=0,this.style=b,this.styles=c,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}function f(a,b){a.f=b}function g(c,e){var g;if(c.match(/^\\[a-zA-Z@]+/)){return g=j[c.current().slice(1)]||j.DEFAULT,g=new g,a(e,g),f(e,i),g.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return f(e,function(a,b){return h(a,b,"\\]")}),"keyword";if(c.match("$$"))return f(e,function(a,b){return h(a,b,"$$")}),"keyword";if(c.match("$"))return f(e,function(a,b){return h(a,b,"$")}),"keyword";var k=c.next();return"%"==k?(c.skipToEnd(),"comment"):"}"==k||"]"==k?(g=b(e))?(g.closeBracket(k),f(e,i),"bracket"):"error":"{"==k||"["==k?(g=j.DEFAULT,g=new g,a(e,g),"bracket"):/\d/.test(k)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),g=d(e),"begin"==g.name&&(g.argument=c.current()),g.styleIdentifier())}function h(a,b,c){if(a.eatSpace())return null;if(a.match(c))return f(b,g),"keyword";if(a.match(/^\\[a-zA-Z@]+/))return"tag";if(a.match(/^[a-zA-Z]+/))return"variable-2";if(a.match(/^\\[$&%#{}_]/))return"tag";if(a.match(/^\\[,;!\/]/))return"tag";if(a.match(/^[\^_&]/))return"tag";if(a.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(a.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var d=a.next();return"{"==d||"}"==d||"["==d||"]"==d||"("==d||")"==d?"bracket":"%"==d?(a.skipToEnd(),"comment"):"error"}function i(a,d){var e,h=a.peek();return"{"==h||"["==h?(e=b(d),e.openBracket(h),a.eat(h),f(d,g),"bracket"):/[ \t\r]/.test(h)?(a.eat(h),null):(f(d,g),c(d),g(a,d))}var j={};return j.importmodule=e("importmodule","tag",["string","builtin"]),j.documentclass=e("documentclass","tag",["","atom"]),j.usepackage=e("usepackage","tag",["atom"]),j.begin=e("begin","tag",["atom"]),j.end=e("end","tag",["atom"]),j.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:g}},copyState:function(a){return{cmdState:a.cmdState.slice(),f:a.f}},token:function(a,b){return b.f(a,b)},blankLine:function(a){a.f=g,a.cmdState.length=0},lineComment:"%"}}),a.defineMIME("text/x-stex","stex"),a.defineMIME("text/x-latex","stex")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/stylus/stylus.js b/media/vendor/codemirror/mode/stylus/stylus.js index 8d83a0180702c..b83be16f42b61 100644 --- a/media/vendor/codemirror/mode/stylus/stylus.js +++ b/media/vendor/codemirror/mode/stylus/stylus.js @@ -15,6 +15,7 @@ CodeMirror.defineMode("stylus", function(config) { var indentUnit = config.indentUnit, + indentUnitString = '', tagKeywords = keySet(tagKeywords_), tagVariablesRegexp = /^(a|b|i|s|col|em)$/i, propertyKeywords = keySet(propertyKeywords_), @@ -38,6 +39,8 @@ type, override; + while (indentUnitString.length < indentUnit) indentUnitString += ' '; + /** * Tokenizers */ @@ -313,7 +316,7 @@ return pushContext(state, stream, "block", 0); } } - if (typeIsBlock(type, stream, state)) { + if (typeIsBlock(type, stream)) { return pushContext(state, stream, "block"); } if (type == "}" && endOfLine(stream)) { @@ -513,7 +516,7 @@ */ states.atBlock = function(type, stream, state) { if (type == "(") return pushContext(state, stream, "atBlock_parens"); - if (typeIsBlock(type, stream, state)) { + if (typeIsBlock(type, stream)) { return pushContext(state, stream, "block"); } if (typeIsInterpolation(type, stream)) { @@ -672,7 +675,7 @@ ch = textAfter && textAfter.charAt(0), indent = cx.indent, lineFirstWord = firstWordOfLine(textAfter), - lineIndent = line.length - line.replace(/^\s*/, "").length, + lineIndent = line.match(/^\s*/)[0].replace(/\t/g, indentUnitString).length, prevLineFirstWord = state.context.prev ? state.context.prev.line.firstWord : "", prevLineIndent = state.context.prev ? state.context.prev.line.indent : lineIndent; @@ -681,7 +684,6 @@ ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") || ch == "{" && (cx.type == "at"))) { indent = cx.indent - indentUnit; - cx = cx.prev; } else if (!(/(\})/.test(ch))) { if (/@|\$|\d/.test(ch) || /^\{/.test(textAfter) || diff --git a/media/vendor/codemirror/mode/stylus/stylus.min.js b/media/vendor/codemirror/mode/stylus/stylus.min.js index 491b64665fd39..1a1dae8be61a3 100644 --- a/media/vendor/codemirror/mode/stylus/stylus.min.js +++ b/media/vendor/codemirror/mode/stylus/stylus.min.js @@ -1 +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){return e=e.sort(function(e,t){return t>e}),new RegExp("^(("+e.join(")|(")+"))\\b")}function r(e){for(var t={},r=0;r|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),t.context.line.firstWord=ie?ie[0].replace(/^\s*/,""):"",t.context.line.indent=e.indentation(),A=e.peek(),e.match("//"))return e.skipToEnd(),["comment","comment"];if(e.match("/*"))return t.tokenize=f,f(e,t);if('"'==A||"'"==A)return e.next(),t.tokenize=k(A),t.tokenize(e,t);if("@"==A)return e.next(),e.eatWhile(/[\w\\-]/),["def",e.current()];if("#"==A){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"]):"!"==A?(e.next(),[e.match(/^(important|optional)/i)?"keyword":"operator","important"]):"."==A&&e.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:e.match(D)?("("==e.peek()&&(t.tokenize=w),["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(V)?["operator","operator"]:e.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?e.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!j(e.current())?(e.match(/\./),["variable-2","variable-name"]):["variable-2","word"]:e.match(Q)?["operator",e.current()]:/[:;,{}\[\]\(\)]/.test(A)?(e.next(),[null,A]):(e.next(),[null,null])}function f(e,t){for(var r,i=!1;null!=(r=e.next());){if(i&&"/"==r){t.tokenize=null;break}i="*"==r}return["comment","comment"]}function k(e){return function(t,r){for(var i,a=!1;null!=(i=t.next());){if(i==e&&!a){")"==e&&t.backUp(1);break}a=!a&&"\\"==i}return(i==e||!a&&")"!=e)&&(r.tokenize=null),["string","string"]}}function w(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=k(")"),[null,"("]}function y(e,t,r,i){this.type=e,this.indent=t,this.prev=r,this.line=i||{firstWord:"",indent:0}}function v(e,t,r,i){return i=i>=0?i:S,e.context=new y(r,t.indentation()+i,e.context),r}function x(e,t){var r=e.context.indent-S;return t=t||!1,e.context=e.context.prev,t&&(e.context.indent=r),e.context.type}function z(e,t,r){return ae[r.context.type](e,t,r)}function q(e,t,r,i){for(var a=i||1;a>0;a--)r.context=r.context.prev;return z(e,t,r)}function j(e){return e.toLowerCase()in X}function $(e){return(e=e.toLowerCase())in Z||e in K}function C(e){return e.toLowerCase()in ee}function B(e){return e.toLowerCase().match(te)}function L(e){var t=e.toLowerCase(),r="variable-2";return j(e)?r="tag":C(e)?r="block-keyword":$(e)?r="property":t in H||t in re?r="atom":"return"==t||t in I?r="keyword":e.match(/^[A-Z]/)&&(r="string"),r}function P(e,t){return W(t)&&("{"==e||"]"==e||"hash"==e||"qualifier"==e)||"block-mixin"==e}function _(e,t){return"{"==e&&t.match(/^\s*\$?[\w-]+/i,!1)}function E(e,t){return":"==e&&t.match(/^[a-z-]+/,!1)}function N(e){return e.sol()||e.string.match(new RegExp("^\\s*"+i(e.current())))}function W(e){return e.eol()||e.match(/^\s*$/,!1)}function U(e){var t=/^\s*[-_]*[a-z0-9]+[\w-]*/i,r="string"==typeof e?e.match(t):e.string.match(t);return r?r[0].replace(/^\s*/,""):""}var A,M,O,R,S=e.indentUnit,X=r(a),Y=/^(a|b|i|s|col|em)$/i,Z=r(s),F=r(c),H=r(m),I=r(u),T=r(o),D=t(o),G=r(l),J=r(n),K=r(d),Q=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,V=t(p),ee=r(h),te=new RegExp(/^\-(moz|ms|o|webkit)-/i),re=r(b),ie="",ae={};return ae.block=function(e,t,r){if("comment"==e&&N(t)||","==e&&W(t)||"mixin"==e)return v(r,t,"block",0);if(_(e,t))return v(r,t,"interpolation");if(W(t)&&"]"==e&&!/^\s*(\.|#|:|\[|\*|&)/.test(t.string)&&!j(U(t)))return v(r,t,"block",0);if(P(e,t))return v(r,t,"block");if("}"==e&&W(t))return v(r,t,"block",0);if("variable-name"==e)return t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||C(U(t))?v(r,t,"variableName"):v(r,t,"variableName",0);if("="==e)return W(t)||C(U(t))?v(r,t,"block"):v(r,t,"block",0);if("*"==e&&(W(t)||t.match(/\s*(,|\.|#|\[|:|{)/,!1)))return R="tag",v(r,t,"block");if(E(e,t))return v(r,t,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test(e))return v(r,t,W(t)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return v(r,t,"keyframes");if(/@extends?/.test(e))return v(r,t,"extend",0);if(e&&"@"==e.charAt(0))return t.indentation()>0&&$(t.current().slice(1))?(R="variable-2","block"):/(@import|@require|@charset)/.test(e)?v(r,t,"block",0):v(r,t,"block");if("reference"==e&&W(t))return v(r,t,"block");if("("==e)return v(r,t,"parens");if("vendor-prefixes"==e)return v(r,t,"vendorPrefixes");if("word"==e){var i=t.current();if("property"==(R=L(i)))return N(t)?v(r,t,"block",0):(R="atom","block");if("tag"==R){if(/embed|menu|pre|progress|sub|table/.test(i)&&$(U(t)))return R="atom","block";if(t.string.match(new RegExp("\\[\\s*"+i+"|"+i+"\\s*\\]")))return R="atom","block";if(Y.test(i)&&(N(t)&&t.string.match(/=/)||!N(t)&&!t.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!j(U(t))))return R="variable-2",C(U(t))?"block":v(r,t,"block",0);if(W(t))return v(r,t,"block")}if("block-keyword"==R)return R="keyword",t.current(/(if|unless)/)&&!N(t)?"block":v(r,t,"block");if("return"==i)return v(r,t,"block",0);if("variable-2"==R&&t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return v(r,t,"block")}return r.context.type},ae.parens=function(e,t,r){if("("==e)return v(r,t,"parens");if(")"==e)return"parens"==r.context.prev.type?x(r):t.string.match(/^[a-z][\w-]*\(/i)&&W(t)||C(U(t))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(U(t))||!t.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&j(U(t))?v(r,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)?v(r,t,"block",0):W(t)?v(r,t,"block"):v(r,t,"block",0);if(e&&"@"==e.charAt(0)&&$(t.current().slice(1))&&(R="variable-2"),"word"==e){var i=t.current();"tag"==(R=L(i))&&Y.test(i)&&(R="variable-2"),"property"!=R&&"to"!=i||(R="atom")}return"variable-name"==e?v(r,t,"variableName"):E(e,t)?v(r,t,"pseudo"):r.context.type},ae.vendorPrefixes=function(e,t,r){return"word"==e?(R="property",v(r,t,"block",0)):x(r)},ae.pseudo=function(e,t,r){return $(U(t.string))?q(e,t,r):(t.match(/^[a-z-]+/),R="variable-3",W(t)?v(r,t,"block"):x(r))},ae.atBlock=function(e,t,r){if("("==e)return v(r,t,"atBlock_parens");if(P(e,t))return v(r,t,"block");if(_(e,t))return v(r,t,"interpolation");if("word"==e){var i=t.current().toLowerCase();if("tag"==(R=/^(only|not|and|or)$/.test(i)?"keyword":T.hasOwnProperty(i)?"tag":J.hasOwnProperty(i)?"attribute":G.hasOwnProperty(i)?"property":F.hasOwnProperty(i)?"string-2":L(t.current()))&&W(t))return v(r,t,"block")}return"operator"==e&&/^(not|and|or)$/.test(t.current())&&(R="keyword"),r.context.type},ae.atBlock_parens=function(e,t,r){if("{"==e||"}"==e)return r.context.type;if(")"==e)return W(t)?v(r,t,"block"):v(r,t,"atBlock");if("word"==e){var i=t.current().toLowerCase();return R=L(i),/^(max|min)/.test(i)&&(R="property"),"tag"==R&&(R=Y.test(i)?"variable-2":"atom"),r.context.type}return ae.atBlock(e,t,r)},ae.keyframes=function(e,t,r){return"0"==t.indentation()&&("}"==e&&N(t)||"]"==e||"hash"==e||"qualifier"==e||j(t.current()))?q(e,t,r):"{"==e?v(r,t,"keyframes"):"}"==e?N(t)?x(r,!0):v(r,t,"keyframes"):"unit"==e&&/^[0-9]+\%$/.test(t.current())?v(r,t,"keyframes"):"word"==e&&"block-keyword"==(R=L(t.current()))?(R="keyword",v(r,t,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test(e)?v(r,t,W(t)?"block":"atBlock"):"mixin"==e?v(r,t,"block",0):r.context.type},ae.interpolation=function(e,t,r){return"{"==e&&x(r)&&v(r,t,"block"),"}"==e?t.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||t.string.match(/^\s*[a-z]/i)&&j(U(t))?v(r,t,"block"):!t.string.match(/^(\{|\s*\&)/)||t.match(/\s*[\w-]/,!1)?v(r,t,"block",0):v(r,t,"block"):"variable-name"==e?v(r,t,"variableName",0):("word"==e&&"tag"==(R=L(t.current()))&&(R="atom"),r.context.type)},ae.extend=function(e,t,r){return"["==e||"="==e?"extend":"]"==e?x(r):"word"==e?(R=L(t.current()),"extend"):x(r)},ae.variableName=function(e,t,r){return"string"==e||"["==e||"]"==e||t.current().match(/^(\.|\$)/)?(t.current().match(/^\.[\w-]+/i)&&(R="variable-2"),"variableName"):q(e,t,r)},{startState:function(e){return{tokenize:null,state:"block",context:new y("block",e||0,null)}},token:function(e,t){return!t.tokenize&&e.eatSpace()?null:((M=(t.tokenize||g)(e,t))&&"object"==typeof M&&(O=M[1],M=M[0]),R=M,t.state=ae[t.state](O,e,t),R)},indent:function(e,t,r){var i=e.context,a=t&&t.charAt(0),o=i.indent,n=U(t),l=r.length-r.replace(/^\s*/,"").length,s=e.context.prev?e.context.prev.line.firstWord:"",c=e.context.prev?e.context.prev.line.indent:l;return i.prev&&("}"==a&&("block"==i.type||"atBlock"==i.type||"keyframes"==i.type)||")"==a&&("parens"==i.type||"atBlock_parens"==i.type)||"{"==a&&"at"==i.type)?(o=i.indent-S,i=i.prev):/(\})/.test(a)||(/@|\$|\d/.test(a)||/^\{/.test(t)||/^\s*\/(\/|\*)/.test(t)||/^\s*\/\*/.test(s)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(t)||/^(\+|-)?[a-z][\w-]*\(/i.test(t)||/^return/.test(t)||C(n)?o=l:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(a)||j(n)?o=/\,\s*$/.test(s)?c:/^\s+/.test(r)&&(/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(s)||j(s))?l<=c?c:c+S:l:/,\s*$/.test(r)||!B(n)&&!$(n)||(o=C(s)?l<=c?c:c+S:/^\{/.test(s)?l<=c?l:c+S:B(s)||$(s)?l>=c?c:l:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(s)||/=\s*$/.test(s)||j(s)||/^\$[\w-\.\[\]\'\"]/.test(s)?c+S:l)),o},electricChars:"}",lineComment:"//",fold:"indent"}});var a=["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"],n=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],l=["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"],s=["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"],d=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],u=["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"],m=["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"],h=["for","if","else","unless","from","to"],b=["null","true","false","href","title","type","not-allowed","readonly","disabled"],g=["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"],f=a.concat(o,n,l,s,c,u,m,d,p,h,b,g);e.registerHelper("hintWords","stylus",f),e.defineMIME("text/x-styl","stylus")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){return a=a.sort(function(a,b){return b>a}),new RegExp("^(("+a.join(")|(")+"))\\b")}function c(a){for(var b={},c=0;c|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),b.context.line.firstWord=ea?ea[0].replace(/^\s*/,""):"",b.context.line.indent=a.indentation(),K=a.peek(),a.match("//"))return a.skipToEnd(),["comment","comment"];if(a.match("/*"))return b.tokenize=r,r(a,b);if('"'==K||"'"==K)return a.next(),b.tokenize=s(K),b.tokenize(a,b);if("@"==K)return a.next(),a.eatWhile(/[\w\\-]/),["def",a.current()];if("#"==K){if(a.next(),a.match(/^[0-9a-f]{6}|[0-9a-f]{3}/i))return["atom","atom"];if(a.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return a.match(ca)?["meta","vendor-prefixes"]:a.match(/^-?[0-9]?\.?[0-9]/)?(a.eatWhile(/[a-z%]/i),["number","unit"]):"!"==K?(a.next(),[a.match(/^(important|optional)/i)?"keyword":"operator","important"]):"."==K&&a.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:a.match(X)?("("==a.peek()&&(b.tokenize=t),["property","word"]):a.match(/^[a-z][\w-]*\(/i)?(a.backUp(1),["keyword","mixin"]):a.match(/^(\+|-)[a-z][\w-]*\(/i)?(a.backUp(1),["keyword","block-mixin"]):a.string.match(/^\s*&/)&&a.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:a.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?(a.backUp(1),["variable-3","reference"]):a.match(/^&{1}\s*$/)?["variable-3","reference"]:a.match(aa)?["operator","operator"]:a.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?a.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!z(a.current())?(a.match(/\./),["variable-2","variable-name"]):["variable-2","word"]:a.match(_)?["operator",a.current()]:/[:;,{}\[\]\(\)]/.test(K)?(a.next(),[null,K]):(a.next(),[null,null])}function r(a,b){for(var c,d=!1;null!=(c=a.next());){if(d&&"/"==c){b.tokenize=null;break}d="*"==c}return["comment","comment"]}function s(a){return function(b,c){for(var d,e=!1;null!=(d=b.next());){if(d==a&&!e){")"==a&&b.backUp(1);break}e=!e&&"\\"==d}return(d==a||!e&&")"!=a)&&(c.tokenize=null),["string","string"]}}function t(a,b){return a.next(),a.match(/\s*[\"\')]/,!1)?b.tokenize=null:b.tokenize=s(")"),[null,"("]}function u(a,b,c,d){this.type=a,this.indent=b,this.prev=c,this.line=d||{firstWord:"",indent:0}}function v(a,b,c,d){return d=d>=0?d:O,a.context=new u(c,b.indentation()+d,a.context),c}function w(a,b){var c=a.context.indent-O;return b=b||!1,a.context=a.context.prev,b&&(a.context.indent=c),a.context.type}function x(a,b,c){return fa[c.context.type](a,b,c)}function y(a,b,c,d){for(var e=d||1;e>0;e--)c.context=c.context.prev;return x(a,b,c)}function z(a){return a.toLowerCase()in Q}function A(a){return(a=a.toLowerCase())in S||a in $}function B(a){return a.toLowerCase()in ba}function C(a){return a.toLowerCase().match(ca)}function D(a){var b=a.toLowerCase(),c="variable-2";return z(a)?c="tag":B(a)?c="block-keyword":A(a)?c="property":b in U||b in da?c="atom":"return"==b||b in V?c="keyword":a.match(/^[A-Z]/)&&(c="string"),c}function E(a,b){return I(b)&&("{"==a||"]"==a||"hash"==a||"qualifier"==a)||"block-mixin"==a}function F(a,b){return"{"==a&&b.match(/^\s*\$?[\w-]+/i,!1)}function G(a,b){return":"==a&&b.match(/^[a-z-]+/,!1)}function H(a){return a.sol()||a.string.match(new RegExp("^\\s*"+d(a.current())))}function I(a){return a.eol()||a.match(/^\s*$/,!1)}function J(a){var b=/^\s*[-_]*[a-z0-9]+[\w-]*/i,c="string"==typeof a?a.match(b):a.string.match(b);return c?c[0].replace(/^\s*/,""):""}for(var K,L,M,N,O=a.indentUnit,P="",Q=c(e),R=/^(a|b|i|s|col|em)$/i,S=c(i),T=c(j),U=c(m),V=c(l),W=c(f),X=b(f),Y=c(h),Z=c(g),$=c(k),_=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,aa=b(n),ba=c(o),ca=new RegExp(/^\-(moz|ms|o|webkit)-/i),da=c(p),ea="",fa={};P.length0&&A(b.current().slice(1))?(N="variable-2","block"):/(@import|@require|@charset)/.test(a)?v(c,b,"block",0):v(c,b,"block");if("reference"==a&&I(b))return v(c,b,"block");if("("==a)return v(c,b,"parens");if("vendor-prefixes"==a)return v(c,b,"vendorPrefixes");if("word"==a){var d=b.current();if("property"==(N=D(d)))return H(b)?v(c,b,"block",0):(N="atom","block");if("tag"==N){if(/embed|menu|pre|progress|sub|table/.test(d)&&A(J(b)))return N="atom","block";if(b.string.match(new RegExp("\\[\\s*"+d+"|"+d+"\\s*\\]")))return N="atom","block";if(R.test(d)&&(H(b)&&b.string.match(/=/)||!H(b)&&!b.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!z(J(b))))return N="variable-2",B(J(b))?"block":v(c,b,"block",0);if(I(b))return v(c,b,"block")}if("block-keyword"==N)return N="keyword",b.current(/(if|unless)/)&&!H(b)?"block":v(c,b,"block");if("return"==d)return v(c,b,"block",0);if("variable-2"==N&&b.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return v(c,b,"block")}return c.context.type},fa.parens=function(a,b,c){if("("==a)return v(c,b,"parens");if(")"==a)return"parens"==c.context.prev.type?w(c):b.string.match(/^[a-z][\w-]*\(/i)&&I(b)||B(J(b))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(J(b))||!b.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&z(J(b))?v(c,b,"block"):b.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||b.string.match(/^\s*(\(|\)|[0-9])/)||b.string.match(/^\s+[a-z][\w-]*\(/i)||b.string.match(/^\s+[\$-]?[a-z]/i)?v(c,b,"block",0):I(b)?v(c,b,"block"):v(c,b,"block",0);if(a&&"@"==a.charAt(0)&&A(b.current().slice(1))&&(N="variable-2"),"word"==a){var d=b.current();N=D(d),"tag"==N&&R.test(d)&&(N="variable-2"),"property"!=N&&"to"!=d||(N="atom")}return"variable-name"==a?v(c,b,"variableName"):G(a,b)?v(c,b,"pseudo"):c.context.type},fa.vendorPrefixes=function(a,b,c){return"word"==a?(N="property",v(c,b,"block",0)):w(c)},fa.pseudo=function(a,b,c){return A(J(b.string))?y(a,b,c):(b.match(/^[a-z-]+/),N="variable-3",I(b)?v(c,b,"block"):w(c))},fa.atBlock=function(a,b,c){if("("==a)return v(c,b,"atBlock_parens");if(E(a,b))return v(c,b,"block");if(F(a,b))return v(c,b,"interpolation");if("word"==a){var d=b.current().toLowerCase();if("tag"==(N=/^(only|not|and|or)$/.test(d)?"keyword":W.hasOwnProperty(d)?"tag":Z.hasOwnProperty(d)?"attribute":Y.hasOwnProperty(d)?"property":T.hasOwnProperty(d)?"string-2":D(b.current()))&&I(b))return v(c,b,"block")}return"operator"==a&&/^(not|and|or)$/.test(b.current())&&(N="keyword"),c.context.type},fa.atBlock_parens=function(a,b,c){if("{"==a||"}"==a)return c.context.type;if(")"==a)return I(b)?v(c,b,"block"):v(c,b,"atBlock");if("word"==a){var d=b.current().toLowerCase();return N=D(d),/^(max|min)/.test(d)&&(N="property"),"tag"==N&&(N=R.test(d)?"variable-2":"atom"),c.context.type}return fa.atBlock(a,b,c)},fa.keyframes=function(a,b,c){return"0"==b.indentation()&&("}"==a&&H(b)||"]"==a||"hash"==a||"qualifier"==a||z(b.current()))?y(a,b,c):"{"==a?v(c,b,"keyframes"):"}"==a?H(b)?w(c,!0):v(c,b,"keyframes"):"unit"==a&&/^[0-9]+\%$/.test(b.current())?v(c,b,"keyframes"):"word"==a&&"block-keyword"==(N=D(b.current()))?(N="keyword",v(c,b,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test(a)?v(c,b,I(b)?"block":"atBlock"):"mixin"==a?v(c,b,"block",0):c.context.type},fa.interpolation=function(a,b,c){return"{"==a&&w(c)&&v(c,b,"block"),"}"==a?b.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||b.string.match(/^\s*[a-z]/i)&&z(J(b))?v(c,b,"block"):!b.string.match(/^(\{|\s*\&)/)||b.match(/\s*[\w-]/,!1)?v(c,b,"block",0):v(c,b,"block"):"variable-name"==a?v(c,b,"variableName",0):("word"==a&&"tag"==(N=D(b.current()))&&(N="atom"),c.context.type)},fa.extend=function(a,b,c){return"["==a||"="==a?"extend":"]"==a?w(c):"word"==a?(N=D(b.current()),"extend"):w(c)},fa.variableName=function(a,b,c){return"string"==a||"["==a||"]"==a||b.current().match(/^(\.|\$)/)?(b.current().match(/^\.[\w-]+/i)&&(N="variable-2"),"variableName"):y(a,b,c)},{startState:function(a){return{tokenize:null,state:"block",context:new u("block",a||0,null)}},token:function(a,b){return!b.tokenize&&a.eatSpace()?null:(L=(b.tokenize||q)(a,b),L&&"object"==typeof L&&(M=L[1],L=L[0]),N=L,b.state=fa[b.state](M,a,b),N)},indent:function(a,b,c){var d=a.context,e=b&&b.charAt(0),f=d.indent,g=J(b),h=c.match(/^\s*/)[0].replace(/\t/g,P).length,i=a.context.prev?a.context.prev.line.firstWord:"",j=a.context.prev?a.context.prev.line.indent:h;return d.prev&&("}"==e&&("block"==d.type||"atBlock"==d.type||"keyframes"==d.type)||")"==e&&("parens"==d.type||"atBlock_parens"==d.type)||"{"==e&&"at"==d.type)?f=d.indent-O:/(\})/.test(e)||(/@|\$|\d/.test(e)||/^\{/.test(b)||/^\s*\/(\/|\*)/.test(b)||/^\s*\/\*/.test(i)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(b)||/^(\+|-)?[a-z][\w-]*\(/i.test(b)||/^return/.test(b)||B(g)?f=h:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(e)||z(g)?f=/\,\s*$/.test(i)?j:/^\s+/.test(c)&&(/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(i)||z(i))?h<=j?j:j+O:h:/,\s*$/.test(c)||!C(g)&&!A(g)||(f=B(i)?h<=j?j:j+O:/^\{/.test(i)?h<=j?h:j+O:C(i)||A(i)?h>=j?j:h:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(i)||/=\s*$/.test(i)||z(i)||/^\$[\w-\.\[\]\'\"]/.test(i)?j+O:h)),f},electricChars:"}",lineComment:"//",fold:"indent"}});var e=["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"],f=["domain","regexp","url","url-prefix"],g=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],h=["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"],i=["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"],j=["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"],k=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],l=["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"],m=["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"],n=["in","and","or","not","is not","is a","is","isnt","defined","if unless"],o=["for","if","else","unless","from","to"],p=["null","true","false","href","title","type","not-allowed","readonly","disabled"],q=["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"],r=e.concat(f,g,h,i,j,l,m,k,n,o,p,q);a.registerHelper("hintWords","stylus",r),a.defineMIME("text/x-styl","stylus")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/swift/swift.min.js b/media/vendor/codemirror/mode/swift/swift.min.js index 0551a0515268d..db72cc4e072c9 100644 --- a/media/vendor/codemirror/mode/swift/swift.min.js +++ b/media/vendor/codemirror/mode/swift/swift.min.js @@ -1 +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=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 u=e.current();return s.hasOwnProperty(u)?"variable-2":l.hasOwnProperty(u)?"atom":f.hasOwnProperty(u)?(d.hasOwnProperty(u)&&(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 u(e,t){var n=t.match(/^\s*($|\/[\/\*])/,!1)?null:t.column()+1;e.context=new a(e.context,n,e.indented)}function c(e){e.context&&(e.indented=e.context.indented,e.context=e.context.prev)}var f=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__"]),d=t(["var","let","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","for"]),l=t(["true","false","nil","self","super","_"]),s=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_]*/,v=/^\-?0o[0-7][0-7_]*/,_=/^\-?0x[\dA-Fa-f][\dA-Fa-f_]*(?:(?:\.[\dA-Fa-f][\dA-Fa-f_]*)?[Pp]\-?\d[\d_]*)?/,x=/^\-?\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee]\-?\d[\d_]*)?/,y=/^\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1/,b=/^\.(?:\$\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)(e,t,r);if(i&&"comment"!=i?t.prev||(t.prev=i):t.prev=r,"punctuation"==i){var o=/[\(\[\{]|([\]\)\}])/.exec(e.current());o&&(o[1]?c:u)(t,e)}return i},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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b={},c=0;c-1)return a.next(),"operator";if(o.indexOf(d)>-1)return a.next(),a.match(".."),"punctuation";if('"'==d||"'"==d){a.next();var g=e(d);return b.tokenize.push(g),g(a,b)}if(a.match(t)){var h=a.current();return m.hasOwnProperty(h)?"variable-2":l.hasOwnProperty(h)?"atom":j.hasOwnProperty(h)?(k.hasOwnProperty(h)&&(b.prev="define"),"keyword"):"define"==c?"def":"variable"}return a.next(),null}function d(){var a=0;return function(b,d,e){var f=c(b,d,e);if("punctuation"==f)if("("==b.current())++a;else if(")"==b.current()){if(0==a)return b.backUp(1),d.tokenize.pop(),d.tokenize[d.tokenize.length-1](b,d);--a}return f}}function e(a){return function(b,c){for(var e,f=!1;e=b.next();)if(f){if("("==e)return c.tokenize.push(d()),"string";f=!1}else{if(e==a)break;f="\\"==e}return c.tokenize.pop(),"string"}}function f(a,b){return a.match(/^(?:[^*]|\*(?!\/))*/),a.match("*/")&&b.tokenize.pop(),"comment"}function g(a,b,c){this.prev=a,this.align=b,this.indented=c}function h(a,b){var c=b.match(/^\s*($|\/[\/\*])/,!1)?null:b.column()+1;a.context=new g(a.context,c,a.indented)}function i(a){a.context&&(a.indented=a.context.indented,a.context=a.context.prev)}var j=b(["_","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__"]),k=b(["var","let","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","for"]),l=b(["true","false","nil","self","super","_"]),m=b(["Array","Bool","Character","Dictionary","Double","Float","Int","Int8","Int16","Int32","Int64","Never","Optional","Set","String","UInt8","UInt16","UInt32","UInt64","Void"]),n="+-/*%=|&<>~^?!",o=":;,.(){}[]",p=/^\-?0b[01][01_]*/,q=/^\-?0o[0-7][0-7_]*/,r=/^\-?0x[\dA-Fa-f][\dA-Fa-f_]*(?:(?:\.[\dA-Fa-f][\dA-Fa-f_]*)?[Pp]\-?\d[\d_]*)?/,s=/^\-?\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee]\-?\d[\d_]*)?/,t=/^\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1/,u=/^\.(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/,v=/^\#[A-Za-z]+/,w=/^@(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/;a.defineMode("swift",function(a){return{startState:function(){return{prev:null,context:null,indented:0,tokenize:[]}},token:function(a,b){var d=b.prev;b.prev=null;var e=b.tokenize[b.tokenize.length-1]||c,f=e(a,b,d);if(f&&"comment"!=f?b.prev||(b.prev=f):b.prev=d,"punctuation"==f){var g=/[\(\[\{]|([\]\)\}])/.exec(a.current());g&&(g[1]?i:h)(b,a)}return f},indent:function(b,c){var d=b.context;if(!d)return 0;var e=/^[\]\}\)]/.test(c);return null!=d.align?d.align-(e?1:0):d.indented+(e?0:a.indentUnit)},electricInput:/^\s*[\)\}\]]$/,lineComment:"//",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace",closeBrackets:"()[]{}''\"\"``"}}),a.defineMIME("text/x-swift","swift")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/tcl/tcl.min.js b/media/vendor/codemirror/mode/tcl/tcl.min.js index fd1cb75df8a98..61ef1721a8637 100644 --- a/media/vendor/codemirror/mode/tcl/tcl.min.js +++ b/media/vendor/codemirror/mode/tcl/tcl.min.js @@ -1 +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";e.defineMode("tcl",function(){function e(e){for(var r={},t=e.split(" "),n=0;n!?^\/\|]/;return{startState:function(){return{tokenize:t,beforeParams:!1,inParams:!1}},token:function(e,r){return e.eatSpace()?null:r.tokenize(e,r)}}}),e.defineMIME("text/x-tcl","tcl")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("tcl",function(){function a(a){for(var b={},c=a.split(" "),d=0;d!?^\/\|]/;return{startState:function(){return{tokenize:c,beforeParams:!1,inParams:!1}},token:function(a,b){return a.eatSpace()?null:b.tokenize(a,b)}}}),a.defineMIME("text/x-tcl","tcl")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/textile/textile.js b/media/vendor/codemirror/mode/textile/textile.js index a6f7576582e8c..bc5a2f3692f36 100644 --- a/media/vendor/codemirror/mode/textile/textile.js +++ b/media/vendor/codemirror/mode/textile/textile.js @@ -203,7 +203,7 @@ single: { bc: "bc", bq: "bq", - definitionList: /- [^(?::=)]+:=+/, + definitionList: /- .*?:=+/, definitionListEnd: /.*=:\s*$/, div: "div", drawTable: /\|.*\|/, diff --git a/media/vendor/codemirror/mode/textile/textile.min.js b/media/vendor/codemirror/mode/textile/textile.min.js index ad8b2f3e2a827..93e32d53f25a9 100644 --- a/media/vendor/codemirror/mode/textile/textile.min.js +++ b/media/vendor/codemirror/mode/textile/textile.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";function e(t,e){e.mode=f.newLayout,e.tableHeading=!1,"definitionList"===e.layoutType&&e.spanningLayout&&t.match(s("definitionListEnd"),!1)&&(e.spanningLayout=!1)}function n(t,e,n){if("_"===n)return t.eat("_")?i(t,e,"italic",/__/,2):i(t,e,"em",/_/,1);if("*"===n)return t.eat("*")?i(t,e,"bold",/\*\*/,2):i(t,e,"strong",/\*/,1);if("["===n)return t.match(/\d+\]/)&&(e.footCite=!0),a(e);if("("===n&&t.match(/^(r|tm|c)\)/))return l(e,c.specialChar);if("<"===n&&t.match(/(\w+)[^>]+>[^<]+<\/\1>/))return l(e,c.html);if("?"===n&&t.eat("?"))return i(t,e,"cite",/\?\?/,2);if("="===n&&t.eat("="))return i(t,e,"notextile",/==/,2);if("-"===n&&!t.eat("-"))return i(t,e,"deletion",/-/,1);if("+"===n)return i(t,e,"addition",/\+/,1);if("~"===n)return i(t,e,"sub",/~/,1);if("^"===n)return i(t,e,"sup",/\^/,1);if("%"===n)return i(t,e,"span",/%/,1);if("@"===n)return i(t,e,"code",/@/,1);if("!"===n){var r=i(t,e,"image",/(?:\([^\)]+\))?!/,1);return t.match(/^:\S+/),r}return a(e)}function i(t,e,n,i,r){var l=t.pos>r?t.string.charAt(t.pos-r-1):null,o=t.peek();if(e[n]){if((!o||/\W/.test(o))&&l&&/\S/.test(l)){var u=a(e);return e[n]=!1,u}}else(!l||/\W/.test(l))&&o&&/\S/.test(o)&&t.match(new RegExp("^.*\\S"+i.source+"(?:\\W|$)"),!1)&&(e[n]=!0,e.mode=f.attributes);return a(e)}function a(t){var e=r(t);if(e)return e;var n=[];return t.layoutType&&n.push(c[t.layoutType]),n=n.concat(o(t,"addition","bold","cite","code","deletion","em","footCite","image","italic","link","span","strong","sub","sup","table","tableHeading")),"header"===t.layoutType&&n.push(c.header+"-"+t.header),n.length?n.join(" "):null}function r(t){var e=t.layoutType;switch(e){case"notextile":case"code":case"pre":return c[e];default:return t.notextile?c.notextile+(e?" "+c[e]:""):null}}function l(t,e){var n=r(t);if(n)return n;var i=a(t);return e?i?i+" "+e:e:i}function o(t){for(var e=[],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(t){switch(t){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,s("allAttributes"),"*\\s+");case"tableCellAttributes":return d.makeRe("^",d.choiceRe(d.single.tableCellAttributes,s("allAttributes")),"+\\.");case"type":return d.makeRe("^",s("allTypes"));case"typeLayout":return d.makeRe("^",s("allTypes"),s("allAttributes"),"*\\.\\.?","(\\s+|$)");case"attributes":return d.makeRe("^",s("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[t])}},makeRe:function(){for(var t="",e=0;e]+>[^<]+<\/\1>/))return g(b,k.html);if("?"===c&&a.eat("?"))return d(a,b,"cite",/\?\?/,2);if("="===c&&a.eat("="))return d(a,b,"notextile",/==/,2);if("-"===c&&!a.eat("-"))return d(a,b,"deletion",/-/,1);if("+"===c)return d(a,b,"addition",/\+/,1);if("~"===c)return d(a,b,"sub",/~/,1);if("^"===c)return d(a,b,"sup",/\^/,1);if("%"===c)return d(a,b,"span",/%/,1);if("@"===c)return d(a,b,"code",/@/,1);if("!"===c){var f=d(a,b,"image",/(?:\([^\)]+\))?!/,1);return a.match(/^:\S+/),f}return e(b)}function d(a,b,c,d,f){var g=a.pos>f?a.string.charAt(a.pos-f-1):null,h=a.peek();if(b[c]){if((!h||/\W/.test(h))&&g&&/\S/.test(g)){var i=e(b);return b[c]=!1,i}}else(!g||/\W/.test(g))&&h&&/\S/.test(h)&&a.match(new RegExp("^.*\\S"+d.source+"(?:\\W|$)"),!1)&&(b[c]=!0,b.mode=m.attributes);return e(b)}function e(a){var b=f(a);if(b)return b;var c=[];return a.layoutType&&c.push(k[a.layoutType]),c=c.concat(h(a,"addition","bold","cite","code","deletion","em","footCite","image","italic","link","span","strong","sub","sup","table","tableHeading")),"header"===a.layoutType&&c.push(k.header+"-"+a.header),c.length?c.join(" "):null}function f(a){var b=a.layoutType;switch(b){case"notextile":case"code":case"pre":return k[b];default:return a.notextile?k.notextile+(b?" "+k[b]:""):null}}function g(a,b){var c=f(a);if(c)return c;var d=e(a);return b?d?d+" "+b:b:d}function h(a){for(var b=[],c=1;c]+)?>(?:[^<]+<\/\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(a){switch(a){case"drawTable":return l.makeRe("^",l.single.drawTable,"$");case"html":return l.makeRe("^",l.single.html,"(?:",l.single.html,")*","$");case"linkDefinition":return l.makeRe("^",l.single.linkDefinition,"$");case"listLayout":return l.makeRe("^",l.single.list,j("allAttributes"),"*\\s+");case"tableCellAttributes":return l.makeRe("^",l.choiceRe(l.single.tableCellAttributes,j("allAttributes")),"+\\.");case"type":return l.makeRe("^",j("allTypes"));case"typeLayout":return l.makeRe("^",j("allTypes"),j("allAttributes"),"*\\.\\.?","(\\s+|$)");case"attributes":return l.makeRe("^",j("allAttributes"),"+");case"allTypes":return l.choiceRe(l.single.div,l.single.foot,l.single.header,l.single.bc,l.single.bq,l.single.notextile,l.single.pre,l.single.table,l.single.para);case"allAttributes":return l.choiceRe(l.attributes.selector,l.attributes.css,l.attributes.lang,l.attributes.align,l.attributes.pad);default:return l.makeRe("^",l.single[a])}},makeRe:function(){for(var a="",b=0;b|]/.test(z)){if("!"==z)return t.skipToEnd(),"header";if("*"==z)return t.eatWhile("*"),"comment";if("#"==z)return t.eatWhile("#"),"comment";if(";"==z)return t.eatWhile(";"),"comment";if(":"==z)return t.eatWhile(":"),"comment";if(">"==z)return t.eatWhile(">"),"quote";if("|"==z)return"header"}if("{"==z&&t.match(/\{\{/))return e(t,m,i);if(/[hf]/i.test(z)&&/[ti]/i.test(t.peek())&&t.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))return"link";if('"'==z)return"string";if("~"==z)return"brace";if(/[\[\]]/.test(z)&&t.match(z))return"brace";if("@"==z)return t.eatWhile(l),"link";if(/\d/.test(z))return t.eatWhile(/\d/),"number";if("/"==z){if(t.eat("%"))return e(t,m,r);if(t.eat("/"))return e(t,m,o)}if("_"==z&&t.eat("_"))return e(t,m,u);if("-"==z&&t.eat("-")){if(" "!=t.peek())return e(t,m,a);if(" "==t.peek())return"brace"}return"'"==z&&t.eat("'")?e(t,m,n):"<"==z&&t.eat("<")?e(t,m,f):(t.eatWhile(/[\w\$_]/),c.propertyIsEnumerable(t.current())?"keyword":null)}function r(e,r){for(var n,i=!1;n=e.next();){if("/"==n&&i){r.tokenize=t;break}i="%"==n}return"comment"}function n(e,r){for(var n,i=!1;n=e.next();){if("'"==n&&i){r.tokenize=t;break}i="'"==n}return"strong"}function i(e,r){var n=r.block;return n&&e.current()?"comment":!n&&e.match(z)?(r.tokenize=t,"comment"):n&&e.sol()&&e.match(x)?(r.tokenize=t,"comment"):(e.next(),"comment")}function o(e,r){for(var n,i=!1;n=e.next();){if("/"==n&&i){r.tokenize=t;break}i="/"==n}return"em"}function u(e,r){for(var n,i=!1;n=e.next();){if("_"==n&&i){r.tokenize=t;break}i="_"==n}return"underlined"}function a(e,r){for(var n,i=!1;n=e.next();){if("-"==n&&i){r.tokenize=t;break}i="-"==n}return"strikethrough"}function f(e,r){if("<<"==e.current())return"macro";var n=e.next();return n?">"==n&&">"==e.peek()?(e.next(),r.tokenize=t,"macro"):(e.eatWhile(/[\w\$_]/),m.propertyIsEnumerable(e.current())?"keyword":null):(r.tokenize=t,null)}var c={},m={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},l=/[\w_\-]/i,k=/^\-\-\-\-+$/,d=/^\/\*\*\*$/,h=/^\*\*\*\/$/,s=/^<<<$/,b=/^\/\/\{\{\{$/,p=/^\/\/\}\}\}$/,$=/^$/,v=/^$/,w=/^\{\{\{$/,x=/^\}\}\}$/,z=/.*?\}\}\}/;return{startState:function(){return{tokenize:t}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)}}}),e.defineMIME("text/x-tiddlywiki","tiddlywiki")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("tiddlywiki",function(){function a(a,b,c){return b.tokenize=c,c(a,b)}function b(b,k){var v=b.sol(),w=b.peek();if(k.block=!1,v&&/[<\/\*{}\-]/.test(w)){if(b.match(u))return k.block=!0,a(b,k,e);if(b.match(p))return"quote";if(b.match(n)||b.match(o))return"comment";if(b.match(q)||b.match(r)||b.match(s)||b.match(t))return"comment";if(b.match(m))return"hr"}if(b.next(),v&&/[\/\*!#;:>|]/.test(w)){if("!"==w)return b.skipToEnd(),"header";if("*"==w)return b.eatWhile("*"),"comment";if("#"==w)return b.eatWhile("#"),"comment";if(";"==w)return b.eatWhile(";"),"comment";if(":"==w)return b.eatWhile(":"),"comment";if(">"==w)return b.eatWhile(">"),"quote";if("|"==w)return"header"}if("{"==w&&b.match(/\{\{/))return a(b,k,e);if(/[hf]/i.test(w)&&/[ti]/i.test(b.peek())&&b.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)&&b.match(w))return"brace";if("@"==w)return b.eatWhile(l),"link";if(/\d/.test(w))return b.eatWhile(/\d/),"number";if("/"==w){if(b.eat("%"))return a(b,k,c);if(b.eat("/"))return a(b,k,f)}if("_"==w&&b.eat("_"))return a(b,k,g);if("-"==w&&b.eat("-")){if(" "!=b.peek())return a(b,k,h);if(" "==b.peek())return"brace"}return"'"==w&&b.eat("'")?a(b,k,d):"<"==w&&b.eat("<")?a(b,k,i):(b.eatWhile(/[\w\$_]/),j.propertyIsEnumerable(b.current())?"keyword":null)}function c(a,c){for(var d,e=!1;d=a.next();){if("/"==d&&e){c.tokenize=b;break}e="%"==d}return"comment"}function d(a,c){for(var d,e=!1;d=a.next();){if("'"==d&&e){c.tokenize=b;break}e="'"==d}return"strong"}function e(a,c){var d=c.block;return d&&a.current()?"comment":!d&&a.match(w)?(c.tokenize=b,"comment"):d&&a.sol()&&a.match(v)?(c.tokenize=b,"comment"):(a.next(),"comment")}function f(a,c){for(var d,e=!1;d=a.next();){if("/"==d&&e){c.tokenize=b;break}e="/"==d}return"em"}function g(a,c){for(var d,e=!1;d=a.next();){if("_"==d&&e){c.tokenize=b;break}e="_"==d}return"underlined"}function h(a,c){for(var d,e=!1;d=a.next();){if("-"==d&&e){c.tokenize=b;break}e="-"==d}return"strikethrough"}function i(a,c){if("<<"==a.current())return"macro";var d=a.next();return d?">"==d&&">"==a.peek()?(a.next(),c.tokenize=b,"macro"):(a.eatWhile(/[\w\$_]/),k.propertyIsEnumerable(a.current())?"keyword":null):(c.tokenize=b,null)}var j={},k={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},l=/[\w_\-]/i,m=/^\-\-\-\-+$/,n=/^\/\*\*\*$/,o=/^\*\*\*\/$/,p=/^<<<$/,q=/^\/\/\{\{\{$/,r=/^\/\/\}\}\}$/,s=/^$/,t=/^$/,u=/^\{\{\{$/,v=/^\}\}\}$/,w=/.*?\}\}\}/;return{startState:function(){return{tokenize:b}},token:function(a,b){return a.eatSpace()?null:b.tokenize(a,b)}}}),a.defineMIME("text/x-tiddlywiki","tiddlywiki")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/tiki/tiki.js b/media/vendor/codemirror/mode/tiki/tiki.js index 5e05b1ff0149b..b4794e4334ee6 100644 --- a/media/vendor/codemirror/mode/tiki/tiki.js +++ b/media/vendor/codemirror/mode/tiki/tiki.js @@ -144,7 +144,7 @@ CodeMirror.defineMode('tiki', function(config) { type = "equals"; if (peek == ">") { - ch = stream.next(); + stream.next(); peek = stream.peek(); } @@ -298,13 +298,13 @@ return { if (context && context.noIndent) return 0; if (context && /^{\//.test(textAfter)) context = context.prev; - while (context && !context.startOfLine) - context = context.prev; - if (context) return context.indent + indentUnit; - else return 0; - }, - electricChars: "/" - }; + while (context && !context.startOfLine) + context = context.prev; + if (context) return context.indent + indentUnit; + else return 0; + }, + electricChars: "/" +}; }); CodeMirror.defineMIME("text/tiki", "tiki"); diff --git a/media/vendor/codemirror/mode/tiki/tiki.min.js b/media/vendor/codemirror/mode/tiki/tiki.min.js index 078c5d3a94da6..a2051cf7dd087 100644 --- a/media/vendor/codemirror/mode/tiki/tiki.min.js +++ b/media/vendor/codemirror/mode/tiki/tiki.min.js @@ -1 +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";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 u=e.sol(),c=e.next();switch(c){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(u)switch(c){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 u(){for(var e=arguments.length-1;e>=0;e--)h.cc.push(arguments[e])}function c(){return u.apply(null,arguments),!0}function f(e,t){var n=h.context&&h.context.noIndent;h.context={prev:h.context,pluginName:e,indent:h.indented,startOfLine:t,noIndent:n}}function s(){h.context&&(h.context=h.context.prev)}function l(e){if("openPlugin"==e)return h.pluginName=x,c(g,d(h.startOfLine));if("closePlugin"==e){var t=!1;return h.context?(t=h.context.pluginName!=x,s()):t=!0,t&&(v="error"),c(k(t))}return"string"==e?(h.context&&"!cdata"==h.context.name||f("!cdata"),h.tokenize==r&&s(),c()):c()}function d(e){return function(t){return"selfclosePlugin"==t||"endPlugin"==t?c():"endPlugin"==t?(f(h.pluginName,e),c()):c()}}function k(e){return function(t){return e&&(v="error"),"endPlugin"==t?c():u()}}function g(e){return"keyword"==e?(v="attribute",c(g)):"equals"==e?c(p,g):u()}function p(e){return"keyword"==e?(v="string",c()):"string"==e?c(m):u()}function m(e){return"string"==e?c(m):u()}var x,b,h,v,z=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;v=b=x=null;var n=t.tokenize(e,t);if((n||b)&&"comment"!=n)for(h=t;;)if((t.cc.pop()||l)(b||n))break;return t.startOfLine=!1,v||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+z:0},electricChars:"/"}}),e.defineMIME("text/tiki","tiki")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("tiki",function(a){function b(a,b,c){return function(e,f){for(;!e.eol();){if(e.match(b)){f.tokenize=d;break}e.next()}return c&&(f.tokenize=c),a}}function c(a){return function(b,c){for(;!b.eol();)b.next();return c.tokenize=d,a}}function d(a,f){function g(b){return f.tokenize=b,b(a,f)}var h=a.sol(),i=a.next();switch(i){case"{":return a.eat("/"),a.eatSpace(),a.eatWhile(/[^\s\u00a0=\"\'\/?(}]/),f.tokenize=e,"tag";case"_":if(a.eat("_"))return g(b("strong","__",d));break;case"'":if(a.eat("'"))return g(b("em","''",d));break;case"(":if(a.eat("("))return g(b("variable-2","))",d));break;case"[":return g(b("variable-3","]",d));case"|":if(a.eat("|"))return g(b("comment","||"));break;case"-":if(a.eat("="))return g(b("header string","=-",d));if(a.eat("-"))return g(b("error tw-deleted","--",d));break;case"=":if(a.match("=="))return g(b("tw-underline","===",d));break;case":":if(a.eat(":"))return g(b("comment","::"));break;case"^":return g(b("tw-box","^"));case"~":if(a.match("np~"))return g(b("meta","~/np~"))}if(h)switch(i){case"!":return g(a.match("!!!!!")?c("header string"):a.match("!!!!")?c("header string"):a.match("!!!")?c("header string"):a.match("!!")?c("header string"):c("header string"));case"*":case"#":case"+":return g(c("tw-listitem bracket"))}return null}function e(a,b){var c=a.next(),e=a.peek();return"}"==c?(b.tokenize=d,"tag"):"("==c||")"==c?"bracket":"="==c?(s="equals",">"==e&&(a.next(),e=a.peek()),/[\'\"]/.test(e)||(b.tokenize=g()),"operator"):/[\'\"]/.test(c)?(b.tokenize=f(c),b.tokenize(a,b)):(a.eatWhile(/[^\s\u00a0=\"\'\/?]/),"keyword")}function f(a){return function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=e;break}return"string"}}function g(){return function(a,b){for(;!a.eol();){var c=a.next(),d=a.peek();if(" "==c||","==c||/[ )}]/.test(d)){b.tokenize=e;break}}return"string"}}function h(){for(var a=arguments.length-1;a>=0;a--)t.cc.push(arguments[a])}function i(){return h.apply(null,arguments),!0}function j(a,b){var c=t.context&&t.context.noIndent;t.context={prev:t.context,pluginName:a,indent:t.indented,startOfLine:b,noIndent:c}}function k(){t.context&&(t.context=t.context.prev)}function l(a){if("openPlugin"==a)return t.pluginName=r,i(o,m(t.startOfLine));if("closePlugin"==a){var b=!1;return t.context?(b=t.context.pluginName!=r,k()):b=!0,b&&(u="error"),i(n(b))}return"string"==a?(t.context&&"!cdata"==t.context.name||j("!cdata"),t.tokenize==d&&k(),i()):i()}function m(a){return function(b){return"selfclosePlugin"==b||"endPlugin"==b?i():"endPlugin"==b?(j(t.pluginName,a),i()):i()}}function n(a){return function(b){return a&&(u="error"),"endPlugin"==b?i():h()}}function o(a){return"keyword"==a?(u="attribute",i(o)):"equals"==a?i(p,o):h()}function p(a){return"keyword"==a?(u="string",i()):"string"==a?i(q):h()}function q(a){return"string"==a?i(q):h()}var r,s,t,u,v=a.indentUnit;return{startState:function(){return{tokenize:d,cc:[],indented:0,startOfLine:!0,pluginName:null,context:null}},token:function(a,b){if(a.sol()&&(b.startOfLine=!0,b.indented=a.indentation()),a.eatSpace())return null;u=s=r=null;var c=b.tokenize(a,b);if((c||s)&&"comment"!=c)for(t=b;;){var d=b.cc.pop()||l;if(d(s||c))break}return b.startOfLine=!1,u||c},indent:function(a,b){var c=a.context;if(c&&c.noIndent)return 0;for(c&&/^{\//.test(b)&&(c=c.prev);c&&!c.startOfLine;)c=c.prev;return c?c.indent+v:0},electricChars:"/"}}),a.defineMIME("text/tiki","tiki")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/toml/toml.min.js b/media/vendor/codemirror/mode/toml/toml.min.js index 1b8beba3ff980..e6e3e2bce0a5d 100644 --- a/media/vendor/codemirror/mode/toml/toml.min.js +++ b/media/vendor/codemirror/mode/toml/toml.min.js @@ -1 +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";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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("toml",function(){return{startState:function(){return{inString:!1,stringType:"",lhs:!0,inArray:0}},token:function(a,b){if(b.inString||'"'!=a.peek()&&"'"!=a.peek()||(b.stringType=a.peek(),a.next(),b.inString=!0),a.sol()&&0===b.inArray&&(b.lhs=!0),b.inString){for(;b.inString&&!a.eol();)a.peek()===b.stringType?(a.next(),b.inString=!1):"\\"===a.peek()?(a.next(),a.next()):a.match(/^.[^\\\"\']*/);return b.lhs?"property string":"string"}return b.inArray&&"]"===a.peek()?(a.next(),b.inArray--,"bracket"):b.lhs&&"["===a.peek()&&a.skipTo("]")?(a.next(),"]"===a.peek()&&a.next(),"atom"):"#"===a.peek()?(a.skipToEnd(),"comment"):a.eatSpace()?null:b.lhs&&a.eatWhile(function(a){return"="!=a&&" "!=a})?"property":b.lhs&&"="===a.peek()?(a.next(),b.lhs=!1,null):!b.lhs&&a.match(/^\d\d\d\d[\d\-\:\.T]*Z/)?"atom":b.lhs||!a.match("true")&&!a.match("false")?b.lhs||"["!==a.peek()?!b.lhs&&a.match(/^\-?\d+(?:\.\d+)?/)?"number":(a.eatSpace()||a.next(),null):(b.inArray++,a.next(),"bracket"):"atom"}}}),a.defineMIME("text/x-toml","toml")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/tornado/tornado.min.js b/media/vendor/codemirror/mode/tornado/tornado.min.js index 165c977a0703d..f497987d95c00 100644 --- a/media/vendor/codemirror/mode/tornado/tornado.min.js +++ b/media/vendor/codemirror/mode/tornado/tornado.min.js @@ -1 +1 @@ -!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 o=e.next();if("{"==o&&(o=e.eat(/\{|%|#/)))return n.tokenize=t(o),"tag"}function t(t){return"{"==t&&(t="}"),function(o,r){return o.next()==t&&o.eat("}")?(r.tokenize=e,"tag"):o.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"),o=e.getMode(t,"tornado:inner");return e.overlayMode(n,o)}),e.defineMIME("text/x-tornado","tornado")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/overlay")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/overlay"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("tornado:inner",function(){function a(a,c){a.eatWhile(/[^\{]/);var d=a.next();if("{"==d&&(d=a.eat(/\{|%|#/)))return c.tokenize=b(d),"tag"}function b(b){return"{"==b&&(b="}"),function(d,e){return d.next()==b&&d.eat("}")?(e.tokenize=a,"tag"):d.match(c)?"keyword":"#"==b?"comment":"string"}}var c=["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 c=new RegExp("^(("+c.join(")|(")+"))\\b"),{startState:function(){return{tokenize:a}},token:function(a,b){return b.tokenize(a,b)}}}),a.defineMode("tornado",function(b){var c=a.getMode(b,"text/html"),d=a.getMode(b,"tornado:inner");return a.overlayMode(c,d)}),a.defineMIME("text/x-tornado","tornado")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/troff/troff.min.js b/media/vendor/codemirror/mode/troff/troff.min.js index 85ffd03e77143..ca5f9bad4deb6 100644 --- a/media/vendor/codemirror/mode/troff/troff.min.js +++ b/media/vendor/codemirror/mode/troff/troff.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("troff",function(){function t(t){if(t.eatSpace())return null;var e=t.sol(),n=t.next();if("\\"===n)return t.match("fB")||t.match("fR")||t.match("fI")||t.match("u")||t.match("d")||t.match("%")||t.match("&")?"string":t.match("m[")?(t.skipTo("]"),t.next(),"string"):t.match("s+")||t.match("s-")?(t.eatWhile(/[\d-]/),"string"):t.match("(")||t.match("*(")?(t.eatWhile(/[\w-]/),"string"):"string";if(e&&("."===n||"'"===n)&&t.eat("\\")&&t.eat('"'))return t.skipToEnd(),"comment";if(e&&"."===n){if(t.match("B ")||t.match("I ")||t.match("R "))return"attribute";if(t.match("TH ")||t.match("SH ")||t.match("SS ")||t.match("HP "))return t.skipToEnd(),"quote";if(t.match(/[A-Z]/)&&t.match(/[A-Z]/)||t.match(/[a-z]/)&&t.match(/[a-z]/))return"attribute"}t.eatWhile(/[\w-]/);var i=t.current();return r.hasOwnProperty(i)?r[i]:null}function e(e,r){return(r.tokens[0]||t)(e,r)}var r={};return{startState:function(){return{tokens:[]}},token:function(t,r){return e(t,r)}}}),t.defineMIME("text/troff","troff"),t.defineMIME("text/x-troff","troff"),t.defineMIME("application/x-troff","troff")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("troff",function(){function a(a){if(a.eatSpace())return null;var b=a.sol(),d=a.next();if("\\"===d)return a.match("fB")||a.match("fR")||a.match("fI")||a.match("u")||a.match("d")||a.match("%")||a.match("&")?"string":a.match("m[")?(a.skipTo("]"),a.next(),"string"):a.match("s+")||a.match("s-")?(a.eatWhile(/[\d-]/),"string"):a.match("(")||a.match("*(")?(a.eatWhile(/[\w-]/),"string"):"string";if(b&&("."===d||"'"===d)&&a.eat("\\")&&a.eat('"'))return a.skipToEnd(),"comment";if(b&&"."===d){if(a.match("B ")||a.match("I ")||a.match("R "))return"attribute";if(a.match("TH ")||a.match("SH ")||a.match("SS ")||a.match("HP "))return a.skipToEnd(),"quote";if(a.match(/[A-Z]/)&&a.match(/[A-Z]/)||a.match(/[a-z]/)&&a.match(/[a-z]/))return"attribute"}a.eatWhile(/[\w-]/);var e=a.current();return c.hasOwnProperty(e)?c[e]:null}function b(b,c){return(c.tokens[0]||a)(b,c)}var c={};return{startState:function(){return{tokens:[]}},token:function(a,c){return b(a,c)}}}),a.defineMIME("text/troff","troff"),a.defineMIME("text/x-troff","troff"),a.defineMIME("application/x-troff","troff")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/ttcn-cfg/ttcn-cfg.min.js b/media/vendor/codemirror/mode/ttcn-cfg/ttcn-cfg.min.js index 35e3db5ca6e24..3f10a29d4ce3b 100644 --- a/media/vendor/codemirror/mode/ttcn-cfg/ttcn-cfg.min.js +++ b/media/vendor/codemirror/mode/ttcn-cfg/ttcn-cfg.min.js @@ -1 +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={},T=e.split(" "),n=0;n!\/]/;return{startState:function(e){return{tokenize:null,context:new o((e||0)-l,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;c=null;var i=(t.tokenize||n)(e,t);if("comment"==i)return i;if(null==r.align&&(r.align=!0),";"!=c&&":"!=c&&","!=c||"statement"!=r.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"==r.type;)r=a(t);for("}"==r.type&&(r=a(t));"statement"==r.type;)r=a(t)}else c==r.type?a(t):C&&(("}"==r.type||"top"==r.type)&&";"!=c||"statement"==r.type&&"newstatement"==c)&&s(t,e.column(),"statement");else a(t);return t.startOfLine=!1,i},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),function(t,n){function r(e){if(e)for(var t in e)e.hasOwnProperty(t)&&i.push(t)}"string"==typeof t&&(t=[t]);var i=[];r(n.keywords),r(n.builtin),r(n.timerOps),r(n.portOps),i.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],i));for(var o=0;o!\/]/;return{startState:function(a){return{tokenize:null,context:new f((a||0)-j,0,"top",!1),indented:0,startOfLine:!0}},token:function(a,b){var d=b.context;if(a.sol()&&(null==d.align&&(d.align=!1),b.indented=a.indentation(),b.startOfLine=!0),a.eatSpace())return null;i=null;var e=(b.tokenize||c)(a,b);if("comment"==e)return e;if(null==d.align&&(d.align=!0),";"!=i&&":"!=i&&","!=i||"statement"!=d.type)if("{"==i)g(b,a.column(),"}");else if("["==i)g(b,a.column(),"]");else if("("==i)g(b,a.column(),")");else if("}"==i){for(;"statement"==d.type;)d=h(b);for("}"==d.type&&(d=h(b));"statement"==d.type;)d=h(b)}else i==d.type?h(b):z&&(("}"==d.type||"top"==d.type)&&";"!=i||"statement"==d.type&&"newstatement"==i)&&g(b,a.column(),"statement");else h(b);return b.startOfLine=!1,e},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),function(b,c){function d(a){if(a)for(var b in a)a.hasOwnProperty(b)&&e.push(b)}"string"==typeof b&&(b=[b]);var e=[];d(c.keywords),d(c.builtin),d(c.timerOps),d(c.portOps),e.length&&(c.helperType=b[0],a.registerHelper("hintWords",b[0],e));for(var f=0;f]*>?/),"atom";if('"'==n||"'"==n)return e.tokenize=o(n),e.tokenize(t,e);if(/[{}\(\),\.;\[\]]/.test(n))return c=n,null;if("#"==n)return t.skipToEnd(),"comment";if(a.test(n))return t.eatWhile(a),null;if(":"==n)return"operator";if(t.eatWhile(/[_\w\d]/),":"==t.peek())return"variable-3";r=t.current();return l.test(r)?"meta":n>="A"&&n<="Z"?"comment":"keyword";var r}function o(t){return function(e,o){for(var r,i=!1;null!=(r=e.next());){if(r==t&&!i){o.tokenize=n;break}i=!i&&"\\"==r}return"string"}}function r(t,e,n){t.context={prev:t.context,indent:t.indent,col:n,type:e}}function i(t){t.indent=t.context.indent,t.context=t.context.prev}var c,u=t.indentUnit,l=(e([]),e(["@prefix","@base","a"])),a=/[*+\-<>=&|]/;return{startState:function(){return{tokenize:n,context:null,indent:0,col:0}},token:function(t,e){if(t.sol()&&(e.context&&null==e.context.align&&(e.context.align=!1),e.indent=t.indentation()),t.eatSpace())return null;var n=e.tokenize(t,e);if("comment"!=n&&e.context&&null==e.context.align&&"pattern"!=e.context.type&&(e.context.align=!0),"("==c)r(e,")",t.column());else if("["==c)r(e,"]",t.column());else if("{"==c)r(e,"}",t.column());else if(/[\]\}\)]/.test(c)){for(;e.context&&"pattern"==e.context.type;)i(e);e.context&&c==e.context.type&&i(e)}else"."==c&&e.context&&"pattern"==e.context.type?i(e):/atom|string|variable/.test(n)&&e.context&&(/[\}\]]/.test(e.context.type)?r(e,"pattern",t.column()):"pattern"!=e.context.type||e.context.align||(e.context.align=!0,e.context.col=t.column()));return n},indent:function(t,e){var n=e&&e.charAt(0),o=t.context;if(/[\]\}]/.test(n))for(;o&&"pattern"==o.type;)o=o.prev;var r=o&&n==o.type;return o?"pattern"==o.type?o.col:o.align?o.col+(r?0:1):o.indent+(r?0:u):0},lineComment:"#"}}),t.defineMIME("text/turtle","turtle")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("turtle",function(a){function b(a){return new RegExp("^(?:"+a.join("|")+")$","i")}function c(a,b){var c=a.next();if(g=null,"<"==c&&!a.match(/^[\s\u00a0=]/,!1))return a.match(/^[^\s\u00a0>]*>?/),"atom";if('"'==c||"'"==c)return b.tokenize=d(c),b.tokenize(a,b);if(/[{}\(\),\.;\[\]]/.test(c))return g=c,null;if("#"==c)return a.skipToEnd(),"comment";if(j.test(c))return a.eatWhile(j),null;if(":"==c)return"operator";if(a.eatWhile(/[_\w\d]/),":"==a.peek())return"variable-3";var e=a.current();return i.test(e)?"meta":c>="A"&&c<="Z"?"comment":"keyword";var e}function d(a){return function(b,d){for(var e,f=!1;null!=(e=b.next());){if(e==a&&!f){d.tokenize=c;break}f=!f&&"\\"==e}return"string"}}function e(a,b,c){a.context={prev:a.context,indent:a.indent,col:c,type:b}}function f(a){a.indent=a.context.indent,a.context=a.context.prev}var g,h=a.indentUnit,i=(b([]),b(["@prefix","@base","a"])),j=/[*+\-<>=&|]/;return{startState:function(){return{tokenize:c,context:null,indent:0,col:0}},token:function(a,b){if(a.sol()&&(b.context&&null==b.context.align&&(b.context.align=!1),b.indent=a.indentation()),a.eatSpace())return null;var c=b.tokenize(a,b);if("comment"!=c&&b.context&&null==b.context.align&&"pattern"!=b.context.type&&(b.context.align=!0),"("==g)e(b,")",a.column());else if("["==g)e(b,"]",a.column());else if("{"==g)e(b,"}",a.column());else if(/[\]\}\)]/.test(g)){for(;b.context&&"pattern"==b.context.type;)f(b);b.context&&g==b.context.type&&f(b)}else"."==g&&b.context&&"pattern"==b.context.type?f(b):/atom|string|variable/.test(c)&&b.context&&(/[\}\]]/.test(b.context.type)?e(b,"pattern",a.column()):"pattern"!=b.context.type||b.context.align||(b.context.align=!0,b.context.col=a.column()));return c},indent:function(a,b){var c=b&&b.charAt(0),d=a.context;if(/[\]\}]/.test(c))for(;d&&"pattern"==d.type;)d=d.prev;var e=d&&c==d.type;return d?"pattern"==d.type?d.col:d.align?d.col+(e?0:1):d.indent+(e?0:h):0},lineComment:"#"}}),a.defineMIME("text/turtle","turtle")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/twig/twig.js b/media/vendor/codemirror/mode/twig/twig.js index 1f2854bef21a2..b4e98972bcf67 100644 --- a/media/vendor/codemirror/mode/twig/twig.js +++ b/media/vendor/codemirror/mode/twig/twig.js @@ -95,7 +95,7 @@ } return "variable"; } else if (stream.eat("{")) { - if (ch = stream.eat("#")) { + if (stream.eat("#")) { state.incomment = true; if (!stream.skipTo("#}")) { stream.skipToEnd(); diff --git a/media/vendor/codemirror/mode/twig/twig.min.js b/media/vendor/codemirror/mode/twig/twig.min.js index 9bbbfd8284920..c291c83f19cc5 100644 --- a/media/vendor/codemirror/mode/twig/twig.min.js +++ b/media/vendor/codemirror/mode/twig/twig.min.js @@ -1 +1 @@ -!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 d=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(r))return"atom";if(e.match(o))return"number"}if(a.sign){if(a.sign=!1,e.match(r))return"atom";if(e.match(o))return"number"}if(a.instring)return d==a.instring&&(a.instring=!1),e.next(),"string";if("'"==d||'"'==d)return a.instring=d,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(i))a.sign=!0;else if(e.eat(" ")||e.sol()){if(e.match(t))return"keyword";if(e.match(r))return"atom";if(e.match(o))return"number";e.sol()&&e.next()}else e.next();return"variable"}if(e.eat("{")){if(d=e.eat("#"))return a.incomment=!0,e.skipTo("#}")?(e.eatWhile(/\#|}/),a.incomment=!1):e.skipToEnd(),"comment";if(d=e.eat(/\{|%/))return a.intag=d,"{"==d&&(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=/^[+\-*&%=<>!?|~^]/,i=/^[:\[\(\{]/,r=["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"),r=new RegExp("(("+r.join(")|(")+"))\\b"),{startState:function(){return{}},token:function(t,n){return e(t,n)}}}),e.defineMode("twig",function(t,n){var i=e.getMode(t,"twig:inner");return n&&n.base?e.multiplexingMode(e.getMode(t,n.base),{open:/\{[{#%]/,close:/[}#%]\}/,mode:i,parseDelimiters:!0}):i}),e.defineMIME("text/x-twig","twig")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/multiplex"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("twig:inner",function(){function a(a,g){var h=a.peek();if(g.incomment)return a.skipTo("#}")?(a.eatWhile(/\#|}/),g.incomment=!1):a.skipToEnd(),"comment";if(g.intag){if(g.operator){if(g.operator=!1,a.match(e))return"atom";if(a.match(f))return"number"}if(g.sign){if(g.sign=!1,a.match(e))return"atom";if(a.match(f))return"number"}if(g.instring)return h==g.instring&&(g.instring=!1),a.next(),"string";if("'"==h||'"'==h)return g.instring=h,a.next(),"string";if(a.match(g.intag+"}")||a.eat("-")&&a.match(g.intag+"}"))return g.intag=!1,"tag";if(a.match(c))return g.operator=!0,"operator";if(a.match(d))g.sign=!0;else if(a.eat(" ")||a.sol()){if(a.match(b))return"keyword";if(a.match(e))return"atom";if(a.match(f))return"number";a.sol()&&a.next()}else a.next();return"variable"}if(a.eat("{")){if(a.eat("#"))return g.incomment=!0,a.skipTo("#}")?(a.eatWhile(/\#|}/),g.incomment=!1):a.skipToEnd(),"comment";if(h=a.eat(/\{|%/))return g.intag=h,"{"==h&&(g.intag="}"),a.eat("-"),"tag"}a.next()}var b=["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"],c=/^[+\-*&%=<>!?|~^]/,d=/^[:\[\(\{]/,e=["true","false","null","empty","defined","divisibleby","divisible by","even","odd","iterable","sameas","same as"],f=/^(\d[+\-\*\/])?\d+(\.\d+)?/;return b=new RegExp("(("+b.join(")|(")+"))\\b"),e=new RegExp("(("+e.join(")|(")+"))\\b"),{startState:function(){return{}},token:function(b,c){return a(b,c)}}}),a.defineMode("twig",function(b,c){var d=a.getMode(b,"twig:inner");return c&&c.base?a.multiplexingMode(a.getMode(b,c.base),{open:/\{[{#%]/,close:/[}#%]\}/,mode:d,parseDelimiters:!0}):d}),a.defineMIME("text/x-twig","twig")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/vb/vb.js b/media/vendor/codemirror/mode/vb/vb.js index d78f91f701c7b..735eb7f7e8142 100644 --- a/media/vendor/codemirror/mode/vb/vb.js +++ b/media/vendor/codemirror/mode/vb/vb.js @@ -202,7 +202,6 @@ CodeMirror.defineMode("vb", function(conf, parserConf) { // Handle '.' connected identifiers if (current === '.') { style = state.tokenize(stream, state); - current = stream.current(); if (style === 'variable') { return 'variable'; } else { diff --git a/media/vendor/codemirror/mode/vb/vb.min.js b/media/vendor/codemirror/mode/vb/vb.min.js index dd7cb0cea685f..25289e07790cb 100644 --- a/media/vendor/codemirror/mode/vb/vb.min.js +++ b/media/vendor/codemirror/mode/vb/vb.min.js @@ -1 +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";e.defineMode("vb",function(n,t){function r(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}function i(e,n){n.currentIndent++}function o(e,n){n.currentIndent--}function c(e,n){if(e.eatSpace())return null;if("'"===e.peek())return e.skipToEnd(),"comment";if(e.match(/^((&H)|(&O))?[0-9\.a-f]/i,!1)){var t=!1;if(e.match(/^\d*\.\d+F?/i)?t=!0:e.match(/^\d+\.\d*F?/)?t=!0:e.match(/^\.\d+F?/)&&(t=!0),t)return e.eat(/J/i),"number";var r=!1;if(e.match(/^&H[0-9a-f]+/i)?r=!0:e.match(/^&O[0-7]+/i)?r=!0:e.match(/^[1-9]\d*F?/)?(e.eat(/J/i),r=!0):e.match(/^0(?![\dx])/i)&&(r=!0),r)return e.eat(/L/i),"number"}return e.match(L)?(n.tokenize=a(e.current()),n.tokenize(e,n)):e.match(s)||e.match(h)?null:e.match(m)||e.match(l)||e.match(v)?"operator":e.match(f)?null:e.match(M)?(i(e,n),n.doInCurrentLine=!0,"keyword"):e.match(z)?(n.doInCurrentLine?n.doInCurrentLine=!1:i(e,n),"keyword"):e.match(C)?"keyword":e.match(F)?(o(e,n),o(e,n),"keyword"):e.match(R)?(o(e,n),"keyword"):e.match(E)?"keyword":e.match(I)?"keyword":e.match(p)?"variable":(e.next(),d)}function a(e){var n=1==e.length;return function(r,i){for(;!r.eol();){if(r.eatWhile(/[^'"]/),r.match(e))return i.tokenize=c,"string";r.eat(/['"]/)}if(n){if(t.singleLineStringErrors)return d;i.tokenize=c}return"string"}}function u(e,n){var t=n.tokenize(e,n),r=e.current();if("."===r)return t=n.tokenize(e,n),r=e.current(),"variable"===t?"variable":d;var c="[({".indexOf(r);return-1!==c&&i(e,n),"dedent"===O&&o(e,n)?d:(c="])}".indexOf(r),-1!==c&&o(e,n)?d:t)}var d="error",l=new RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"),f=new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),m=new RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),h=new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),s=new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),p=new RegExp("^[_A-Za-z][_A-Za-z0-9]*"),b=["class","module","sub","enum","select","while","if","function","get","set","property","try"],k=["else","elseif","case","catch"],g=["next","loop"],x=["and","or","not","xor","in"],v=r(x),w=["as","dim","break","continue","optional","then","until","goto","byval","byref","new","handles","property","return","const","private","protected","friend","public","shared","static","true","false"],y=["integer","string","double","decimal","boolean","short","char","float","single"],I=r(w),E=r(y),L='"',z=r(b),C=r(k),R=r(g),F=r(["end"]),M=r(["do"]),O=null;return e.registerHelper("hintWords","vb",b.concat(k).concat(g).concat(x).concat(w).concat(y)),{electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:c,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1}},token:function(e,n){e.sol()&&(n.currentIndent+=n.nextLineIndent,n.nextLineIndent=0,n.doInCurrentLine=0);var t=u(e,n);return n.lastToken={style:t,content:e.current()},t},indent:function(e,t){var r=t.replace(/^\s+|\s+$/g,"");return r.match(R)||r.match(F)||r.match(C)?n.indentUnit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*n.indentUnit},lineComment:"'"}}),e.defineMIME("text/x-vb","vb")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("vb",function(b,c){function d(a){return new RegExp("^(("+a.join(")|(")+"))\\b","i")}function e(a,b){b.currentIndent++}function f(a,b){b.currentIndent--}function g(a,b){if(a.eatSpace())return null;if("'"===a.peek())return a.skipToEnd(),"comment";if(a.match(/^((&H)|(&O))?[0-9\.a-f]/i,!1)){var c=!1;if(a.match(/^\d*\.\d+F?/i)?c=!0:a.match(/^\d+\.\d*F?/)?c=!0:a.match(/^\.\d+F?/)&&(c=!0),c)return a.eat(/J/i),"number";var d=!1;if(a.match(/^&H[0-9a-f]+/i)?d=!0:a.match(/^&O[0-7]+/i)?d=!0:a.match(/^[1-9]\d*F?/)?(a.eat(/J/i),d=!0):a.match(/^0(?![\dx])/i)&&(d=!0),d)return a.eat(/L/i),"number"}return a.match(z)?(b.tokenize=h(a.current()),b.tokenize(a,b)):a.match(o)||a.match(n)?null:a.match(m)||a.match(k)||a.match(u)?"operator":a.match(l)?null:a.match(E)?(e(a,b),b.doInCurrentLine=!0,"keyword"):a.match(A)?(b.doInCurrentLine?b.doInCurrentLine=!1:e(a,b),"keyword"):a.match(B)?"keyword":a.match(D)?(f(a,b),f(a,b),"keyword"):a.match(C)?(f(a,b),"keyword"):a.match(y)?"keyword":a.match(x)?"keyword":a.match(p)?"variable":(a.next(),j)}function h(a){var b=1==a.length;return function(d,e){for(;!d.eol();){if(d.eatWhile(/[^'"]/),d.match(a))return e.tokenize=g,"string";d.eat(/['"]/)}if(b){if(c.singleLineStringErrors)return j;e.tokenize=g}return"string"}}function i(a,b){var c=b.tokenize(a,b),d=a.current();if("."===d)return c=b.tokenize(a,b),"variable"===c?"variable":j;var g="[({".indexOf(d);return g!==-1&&e(a,b),"dedent"===F&&f(a,b)?j:(g="])}".indexOf(d),g!==-1&&f(a,b)?j:c)}var j="error",k=new RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"),l=new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),m=new RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),n=new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),o=new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),p=new RegExp("^[_A-Za-z][_A-Za-z0-9]*"),q=["class","module","sub","enum","select","while","if","function","get","set","property","try"],r=["else","elseif","case","catch"],s=["next","loop"],t=["and","or","not","xor","in"],u=d(t),v=["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"],x=d(v),y=d(w),z='"',A=d(q),B=d(r),C=d(s),D=d(["end"]),E=d(["do"]),F=null;return a.registerHelper("hintWords","vb",q.concat(r).concat(s).concat(t).concat(v).concat(w)),{electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:g,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1}},token:function(a,b){a.sol()&&(b.currentIndent+=b.nextLineIndent,b.nextLineIndent=0,b.doInCurrentLine=0);var c=i(a,b);return b.lastToken={style:c,content:a.current()},c},indent:function(a,c){var d=c.replace(/^\s+|\s+$/g,"");return d.match(C)||d.match(D)||d.match(B)?b.indentUnit*(a.currentIndent-1):a.currentIndent<0?0:a.currentIndent*b.indentUnit},lineComment:"'"}}),a.defineMIME("text/x-vb","vb")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/vbscript/vbscript.min.js b/media/vendor/codemirror/mode/vbscript/vbscript.min.js index 626dd04a24262..b94fa245f876c 100644 --- a/media/vendor/codemirror/mode/vbscript/vbscript.min.js +++ b/media/vendor/codemirror/mode/vbscript/vbscript.min.js @@ -1 +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";e.defineMode("vbscript",function(e,t){function n(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}function r(e,t){t.currentIndent++}function a(e,t){t.currentIndent--}function i(e,t){if(e.eatSpace())return"space";if("'"===e.peek())return e.skipToEnd(),"comment";if(e.match(W))return e.skipToEnd(),"comment";if(e.match(/^((&H)|(&O))?[0-9\.]/i,!1)&&!e.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i,!1)){var n=!1;if(e.match(/^\d*\.\d+/i)?n=!0:e.match(/^\d+\.\d*/)?n=!0:e.match(/^\.\d+/)&&(n=!0),n)return e.eat(/J/i),"number";var i=!1;if(e.match(/^&H[0-9a-f]+/i)?i=!0:e.match(/^&O[0-7]+/i)?i=!0:e.match(/^[1-9]\d*F?/)?(e.eat(/J/i),i=!0):e.match(/^0(?![\dx])/i)&&(i=!0),i)return e.eat(/L/i),"number"}return e.match(F)?(t.tokenize=o(e.current()),t.tokenize(e,t)):e.match(l)||e.match(s)||e.match(h)?"operator":e.match(u)?null:e.match(d)?"bracket":e.match(q)?(t.doInCurrentLine=!0,"keyword"):e.match(N)?(r(e,t),t.doInCurrentLine=!0,"keyword"):e.match(R)?(t.doInCurrentLine?t.doInCurrentLine=!1:r(e,t),"keyword"):e.match(B)?"keyword":e.match(A)?(a(e,t),a(e,t),"keyword"):e.match(M)?(t.doInCurrentLine?t.doInCurrentLine=!1:a(e,t),"keyword"):e.match(S)?"keyword":e.match(T)?"atom":e.match(z)?"variable-2":e.match(j)?"builtin":e.match(O)?"variable-2":e.match(v)?"variable":(e.next(),b)}function o(e){var n=1==e.length;return function(r,a){for(;!r.eol();){if(r.eatWhile(/[^'"]/),r.match(e))return a.tokenize=i,"string";r.eat(/['"]/)}if(n){if(t.singleLineStringErrors)return b;a.tokenize=i}return"string"}}function c(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?b:("builtin"!==n&&"keyword"!==n||(n="variable"),D.indexOf(r.substr(1))>-1&&(n="variable-2"),n)):n}var b="error",s=new RegExp("^[\\+\\-\\*/&\\\\\\^<>=]"),l=new RegExp("^((<>)|(<=)|(>=))"),u=new RegExp("^[\\.,]"),d=new RegExp("^[\\(\\)]"),v=new RegExp("^[A-Za-z][_A-Za-z0-9]*"),m=["class","sub","select","while","if","function","property","with","for"],p=["else","elseif","case"],f=["next","loop","wend"],h=n(["and","or","not","xor","is","mod","eqv","imp"]),y=["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"],g=["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"],I=["description","firstindex","global","helpcontext","helpfile","ignorecase","length","number","pattern","source","value","count"],C=["server","response","request","session","application"],L=["buffer","cachecontrol","charset","contenttype","expires","expiresabsolute","isclientconnected","pics","status","clientcertificate","cookies","form","querystring","servervariables","totalbytes","contents","staticobjects","codepage","lcid","sessionid","timeout","scripttimeout"],E=["addheader","appendtolog","binarywrite","end","flush","redirect","binaryread","remove","removeall","lock","unlock","abandon","getlasterror","htmlencode","mappath","transfer","urlencode"],D=["clear","execute","raise","replace","test","write","writeline","close","open","state","eof","update","addnew","end","createobject","quit"].concat(I);w=w.concat(k),e.isASP&&(w=w.concat(C),D=D.concat(E,L));var S=n(y),T=n(g),j=n(x),O=n(w),z=n(D),F='"',R=n(m),B=n(p),M=n(f),A=n(["end"]),N=n(["do"]),q=n(["on error resume next","exit"]),W=n(["rem"]);return{electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:i,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=c(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(M)||r.match(A)||r.match(B)?e.indentUnit*(t.currentIndent-1):t.currentIndent<0?0:t.currentIndent*e.indentUnit}}}),e.defineMIME("text/vbscript","vbscript")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("vbscript",function(a,b){function c(a){return new RegExp("^(("+a.join(")|(")+"))\\b","i")}function d(a,b){b.currentIndent++}function e(a,b){b.currentIndent--}function f(a,b){if(a.eatSpace())return"space";if("'"===a.peek())return a.skipToEnd(),"comment";if(a.match(P))return a.skipToEnd(),"comment";if(a.match(/^((&H)|(&O))?[0-9\.]/i,!1)&&!a.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i,!1)){var c=!1;if(a.match(/^\d*\.\d+/i)?c=!0:a.match(/^\d+\.\d*/)?c=!0:a.match(/^\.\d+/)&&(c=!0),c)return a.eat(/J/i),"number";var f=!1;if(a.match(/^&H[0-9a-f]+/i)?f=!0:a.match(/^&O[0-7]+/i)?f=!0:a.match(/^[1-9]\d*F?/)?(a.eat(/J/i),f=!0):a.match(/^0(?![\dx])/i)&&(f=!0),f)return a.eat(/L/i),"number"}return a.match(I)?(b.tokenize=g(a.current()),b.tokenize(a,b)):a.match(k)||a.match(j)||a.match(r)?"operator":a.match(l)?null:a.match(m)?"bracket":a.match(O)?(b.doInCurrentLine=!0,"keyword"):a.match(N)?(d(a,b),b.doInCurrentLine=!0,"keyword"):a.match(J)?(b.doInCurrentLine?b.doInCurrentLine=!1:d(a,b),"keyword"):a.match(K)?"keyword":a.match(M)?(e(a,b),e(a,b),"keyword"):a.match(L)?(b.doInCurrentLine?b.doInCurrentLine=!1:e(a,b),"keyword"):a.match(D)?"keyword":a.match(E)?"atom":a.match(H)?"variable-2":a.match(F)?"builtin":a.match(G)?"variable-2":a.match(n)?"variable":(a.next(),i)}function g(a){var c=1==a.length;return function(d,e){for(;!d.eol();){if(d.eatWhile(/[^'"]/),d.match(a))return e.tokenize=f,"string";d.eat(/['"]/)}if(c){if(b.singleLineStringErrors)return i;e.tokenize=f}return"string"}}function h(a,b){var c=b.tokenize(a,b),d=a.current();return"."===d?(c=b.tokenize(a,b),d=a.current(),!c||"variable"!==c.substr(0,8)&&"builtin"!==c&&"keyword"!==c?i:("builtin"!==c&&"keyword"!==c||(c="variable"),C.indexOf(d.substr(1))>-1&&(c="variable-2"),c)):c}var i="error",j=new RegExp("^[\\+\\-\\*/&\\\\\\^<>=]"),k=new RegExp("^((<>)|(<=)|(>=))"),l=new RegExp("^[\\.,]"),m=new RegExp("^[\\(\\)]"),n=new RegExp("^[A-Za-z][_A-Za-z0-9]*"),o=["class","sub","select","while","if","function","property","with","for"],p=["else","elseif","case"],q=["next","loop","wend"],r=c(["and","or","not","xor","is","mod","eqv","imp"]),s=["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"],t=["true","false","nothing","empty","null"],u=["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"],v=["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"],x=["description","firstindex","global","helpcontext","helpfile","ignorecase","length","number","pattern","source","value","count"],y=["clear","execute","raise","replace","test","write","writeline","close","open","state","eof","update","addnew","end","createobject","quit"],z=["server","response","request","session","application"],A=["buffer","cachecontrol","charset","contenttype","expires","expiresabsolute","isclientconnected","pics","status","clientcertificate","cookies","form","querystring","servervariables","totalbytes","contents","staticobjects","codepage","lcid","sessionid","timeout","scripttimeout"],B=["addheader","appendtolog","binarywrite","end","flush","redirect","binaryread","remove","removeall","lock","unlock","abandon","getlasterror","htmlencode","mappath","transfer","urlencode"],C=y.concat(x);w=w.concat(v),a.isASP&&(w=w.concat(z),C=C.concat(B,A));var D=c(s),E=c(t),F=c(u),G=c(w),H=c(C),I='"',J=c(o),K=c(p),L=c(q),M=c(["end"]),N=c(["do"]),O=c(["on error resume next","exit"]),P=c(["rem"]);return{electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:f,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1,ignoreKeyword:!1}},token:function(a,b){a.sol()&&(b.currentIndent+=b.nextLineIndent,b.nextLineIndent=0,b.doInCurrentLine=0);var c=h(a,b);return b.lastToken={style:c,content:a.current()},"space"===c&&(c=null),c},indent:function(b,c){var d=c.replace(/^\s+|\s+$/g,"");return d.match(L)||d.match(M)||d.match(K)?a.indentUnit*(b.currentIndent-1):b.currentIndent<0?0:b.currentIndent*a.indentUnit}}}),a.defineMIME("text/vbscript","vbscript")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/velocity/velocity.min.js b/media/vendor/codemirror/mode/velocity/velocity.min.js index f10bc00256069..d6d7acfe92255 100644 --- a/media/vendor/codemirror/mode/velocity/velocity.min.js +++ b/media/vendor/codemirror/mode/velocity/velocity.min.js @@ -1 +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";e.defineMode("velocity",function(){function e(e){for(var t={},n=e.split(" "),r=0;rk.length&&"."==e.string.charAt(e.pos-k.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(c)):void 0}function r(e){return function(t,r){for(var i,a=!1,o=!1;null!=(i=t.next());){if(i==e&&!a){o=!0;break}if('"'==e&&"$"==t.peek()&&!a){r.inString=!0,o=!0;break}a=!a&&"\\"==i}return o&&(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 a(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 o=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"),u=/[+\-*&%=<>!?:\/|]/;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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("velocity",function(){function a(a){for(var b={},c=a.split(" "),d=0;dm.length&&"."==a.string.charAt(a.pos-m.length-1)&&c.lastTokenWasBuiltin?"builtin":(c.lastTokenWasBuiltin=!1,null)}return c.lastTokenWasBuiltin=!1,c.inString?(c.inString=!1,"string"):c.inParams?b(a,c,d(l)):void 0}function d(a){return function(b,d){for(var e,f=!1,g=!1;null!=(e=b.next());){if(e==a&&!f){g=!0;break}if('"'==a&&"$"==b.peek()&&!f){d.inString=!0,g=!0;break}f=!f&&"\\"==e}return g&&(d.tokenize=c),"string"}}function e(a,b){for(var d,e=!1;d=a.next();){if("#"==d&&e){b.tokenize=c;break}e="*"==d}return"comment"}function f(a,b){for(var d,e=0;d=a.next();){if("#"==d&&2==e){b.tokenize=c;break}"]"==d?e++:" "!=d&&(e=0)}return"meta"}var g=a("#end #else #break #stop #[[ #]] #{end} #{else} #{break} #{stop}"),h=a("#if #elseif #foreach #set #include #parse #macro #define #evaluate #{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}"),i=a("$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"),j=/[+\-*&%=<>!?:\/|]/;return{startState:function(){return{tokenize:c,beforeParams:!1,inParams:!1,inString:!1,lastTokenWasBuiltin:!1}},token:function(a,b){return a.eatSpace()?null:b.tokenize(a,b)},blockCommentStart:"#*",blockCommentEnd:"*#",lineComment:"##",fold:"velocity"}}),a.defineMIME("text/velocity","velocity")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/verilog/verilog.js b/media/vendor/codemirror/mode/verilog/verilog.js index 460cdb3b1c36a..3404686097f1f 100644 --- a/media/vendor/codemirror/mode/verilog/verilog.js +++ b/media/vendor/codemirror/mode/verilog/verilog.js @@ -81,7 +81,7 @@ CodeMirror.defineMode("verilog", function(config, parserConfig) { // Block openings which are closed by a matching keyword in the form of ("end" + keyword) // E.g. "task" => "endtask" var blockKeywords = words( - "case checker class clocking config function generate interface module package" + + "case checker class clocking config function generate interface module package " + "primitive program property specify sequence table task" ); @@ -602,7 +602,7 @@ CodeMirror.defineMode("verilog", function(config, parserConfig) { var prefix = match[1]; var mnemonic = match[2]; if (// is identifier prefix - (prefix in tlvIdentifierStyle) && + tlvIdentifierStyle.hasOwnProperty(prefix) && // has mnemonic or we're at the end of the line (maybe it hasn't been typed yet) (mnemonic.length > 0 || stream.eol())) { style = tlvIdentifierStyle[prefix]; diff --git a/media/vendor/codemirror/mode/verilog/verilog.min.js b/media/vendor/codemirror/mode/verilog/verilog.min.js index 3ef10ca00a458..6a5eab8017043 100644 --- a/media/vendor/codemirror/mode/verilog/verilog.min.js +++ b/media/vendor/codemirror/mode/verilog/verilog.min.js @@ -1 +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,t,n){var i=t/a;return"tlv-"+e.tlvIndentationStyle[i]+"-"+n}function n(e){var t;return(t=e.match(o,!1))&&t[2].length>0}e.defineMode("verilog",function(t,n){function i(e){for(var t={},n=e.split(" "),i=0;i=0)return i}var a=t.context,o=n&&n.charAt(0);"statement"==a.type&&"}"==o&&(a=a.prev);var l=!1,s=n.match(j);return s&&(l=d(s[0],a.type)),"statement"==a.type?a.indented+("{"==o?0:p):E.test(a.type)&&a.align&&!v?a.column+(l?0:1):")"!=a.type||l?a.indented+(l?0:m):a.indented+p},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),e.defineMIME("text/x-verilog",{name:"verilog"}),e.defineMIME("text/x-systemverilog",{name:"verilog"});var i={"|":"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"},r={"/":"beh-hier",">":"beh-hier","-":"phys-hier","|":"pipe","?":"when","@":"stage","\\":"keyword"},a=3,o=/^([~!@#\$%\^&\*-\+=\?\/\\\|'"<>]+)([\d\w_]*)/,l=/^[! ] /,s=/^[! ] */,c=/^\/[\/\*]/;e.defineMIME("text/x-tlv",{name:"verilog",hooks:{electricInput:!1,token:function(e,d){var u=void 0;if(e.sol()&&!d.tlvInBlockComment){"\\"==e.peek()&&(u="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&&(y=e.match(s,!1))&&(d.indented=y[0].length);var f=d.indented,m=f/a;if(m<=d.tlvIndentationStyle.length){var p=e.string.length==f,v=m*a;if(v0||(d.tlvIndentationStyle[m]=r[h],m++))}if(!p)for(;d.tlvIndentationStyle.length>m;)d.tlvIndentationStyle.pop()}d.tlvNextIndent=f}if(d.tlvCodeActive){var y,k=!1;if(void 0!==u)u+=" "+t(d,0,"scope-ident");else if(e.pos/a0||e.eol())?(u=i[b],e.column()==d.indented&&(u+=" "+t(d,e.column(),"scope-ident"))):(e.backUp(e.current().length-1),u="tlv-default")}else e.match(/^\t+/)?u="tlv-tab":e.match(/^[\[\]{}\(\);\:]+/)?u="meta":(y=e.match(/^[mM]4([\+_])?[\w\d_]*/))?u="+"==y[1]?"tlv-m4-plus":"tlv-m4":e.match(/^ +/)?u=e.eol()?"error":"tlv-default":e.match(/^[\w\d_]+/)?u="number":(e.next(),u="tlv-default");k&&(u+=" tlv-statement")}else e.match(/^[mM]4([\w\d_]*)/)&&(u="tlv-m4");return u},indent:function(e){return 1==e.tlvCodeActive?e.tlvNextIndent:-1},startState:function(e){e.tlvIndentationStyle=[],e.tlvCodeActive=!0,e.tlvNextIndent=-1,e.tlvInBlockComment=!1}}})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,c){var d=b/f;return"tlv-"+a.tlvIndentationStyle[d]+"-"+c}function c(a){var b;return(b=a.match(g,!1))&&b[2].length>0}a.defineMode("verilog",function(b,c){function d(a){for(var b={},c=a.split(" "),d=0;d=0)return d}var f=b.context,g=c&&c.charAt(0);"statement"==f.type&&"}"==g&&(f=f.prev);var h=!1,i=c.match(/^((\w+)|[)}\]])/);return i&&(h=k(i[0],f.type)),"statement"==f.type?f.indented+("{"==g?0:o):C.test(f.type)&&f.align&&!p?f.column+(h?0:1):")"!=f.type||h?f.indented+(h?0:n):f.indented+o},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),a.defineMIME("text/x-verilog",{name:"verilog"}),a.defineMIME("text/x-systemverilog",{name:"verilog"});var d={"|":"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"},e={"/":"beh-hier",">":"beh-hier","-":"phys-hier","|":"pipe","?":"when","@":"stage","\\":"keyword"},f=3,g=/^([~!@#\$%\^&\*-\+=\?\/\\\|'"<>]+)([\d\w_]*)/;a.defineMIME("text/x-tlv",{name:"verilog",hooks:{electricInput:!1,token:function(a,h){var i,j=void 0;if(a.sol()&&!h.tlvInBlockComment){"\\"==a.peek()&&(j="def",a.skipToEnd(),a.string.match(/\\SV/)?h.tlvCodeActive=!1:a.string.match(/\\TLV/)&&(h.tlvCodeActive=!0)),h.tlvCodeActive&&0==a.pos&&0==h.indented&&(i=a.match(/^[! ] */,!1))&&(h.indented=i[0].length);var k=h.indented,l=k/f;if(l<=h.tlvIndentationStyle.length){var m=a.string.length==k,n=l*f;if(n0||(h.tlvIndentationStyle[l]=e[p],l++))}if(!m)for(;h.tlvIndentationStyle.length>l;)h.tlvIndentationStyle.pop()}h.tlvNextIndent=k}if(h.tlvCodeActive){var i,q=!1;if(void 0!==j)j+=" "+b(h,0,"scope-ident");else if(a.pos/f0||a.eol())?(j=d[r],a.column()==h.indented&&(j+=" "+b(h,a.column(),"scope-ident"))):(a.backUp(a.current().length-1),j="tlv-default")}else a.match(/^\t+/)?j="tlv-tab":a.match(/^[\[\]{}\(\);\:]+/)?j="meta":(i=a.match(/^[mM]4([\+_])?[\w\d_]*/))?j="+"==i[1]?"tlv-m4-plus":"tlv-m4":a.match(/^ +/)?j=a.eol()?"error":"tlv-default":a.match(/^[\w\d_]+/)?j="number":(a.next(),j="tlv-default");q&&(j+=" tlv-statement")}else a.match(/^[mM]4([\w\d_]*)/)&&(j="tlv-m4");return j},indent:function(a){return 1==a.tlvCodeActive?a.tlvNextIndent:-1},startState:function(a){a.tlvIndentationStyle=[],a.tlvCodeActive=!0,a.tlvNextIndent=-1,a.tlvInBlockComment=!1}}})}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/vhdl/vhdl.min.js b/media/vendor/codemirror/mode/vhdl/vhdl.min.js index 0fb03f6b74f8f..3171f07f3c65a 100644 --- a/media/vendor/codemirror/mode/vhdl/vhdl.min.js +++ b/media/vendor/codemirror/mode/vhdl/vhdl.min.js @@ -1 +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?]/,b=/^-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)/,y=/^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)/,p=/^_?[A-Za-z][0-9A-Z_a-z-]*/,h=/^_?[A-Za-z][0-9A-Z_a-z-]*(?=\s*;)/,A=/^"[^"]*"/,g=/^\/\*.*?\*\//,k=/^\/\*.*/,D=/^.*?\*\//;e.defineMode("webidl",function(){return{startState:function(){return{inComment:!1,lastToken:"",startDef:!1,endDef:!1}},token:function(e,t){var n=r(e,t);if(n){var a=e.current();t.lastToken=a,"keyword"===n?(t.startDef=u.test(a),t.endDef=t.endDef||s.test(a)):t.startDef=!1}return n}}}),e.defineMIME("text/x-webidl","webidl")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){return new RegExp("^(("+a.join(")|(")+"))\\b")}function c(a,b){if(a.eatSpace())return null;if(b.inComment)return a.match(x)?(b.inComment=!1,"comment"):(a.skipToEnd(),"comment");if(a.match("//"))return a.skipToEnd(),"comment";if(a.match(v))return"comment";if(a.match(w))return b.inComment=!0,"comment";if(a.match(/^-?[0-9\.]/,!1)&&(a.match(q)||a.match(r)))return"number";if(a.match(u))return"string";if(b.startDef&&a.match(s))return"def";if(b.endDef&&a.match(t))return b.endDef=!1,"def";if(a.match(i))return"keyword";if(a.match(g)){var c=b.lastToken,d=(a.match(/^\s*(.+?)\b/,!1)||[])[1];return":"===c||"implements"===c||"implements"===d||"="===d?"builtin":"variable-3"}return a.match(e)?"builtin":a.match(k)?"atom":a.match(s)?"variable":a.match(p)?"operator":(a.next(),null)}var d=["Clamp","Constructor","EnforceRange","Exposed","ImplicitThis","Global","PrimaryGlobal","LegacyArrayClass","LegacyUnenumerableNamedProperties","LenientThis","NamedConstructor","NewObject","NoInterfaceObject","OverrideBuiltins","PutForwards","Replaceable","SameObject","TreatNonObjectAsNull","TreatNullAs","EmptyString","Unforgeable","Unscopeable"],e=b(d),f=["unsigned","short","long","unrestricted","float","double","boolean","byte","octet","Promise","ArrayBuffer","DataView","Int8Array","Int16Array","Int32Array","Uint8Array","Uint16Array","Uint32Array","Uint8ClampedArray","Float32Array","Float64Array","ByteString","DOMString","USVString","sequence","object","RegExp","Error","DOMException","FrozenArray","any","void"],g=b(f),h=["attribute","callback","const","deleter","dictionary","enum","getter","implements","inherit","interface","iterable","legacycaller","maplike","partial","required","serializer","setlike","setter","static","stringifier","typedef","optional","readonly","or"],i=b(h),j=["true","false","Infinity","NaN","null"],k=b(j);a.registerHelper("hintWords","webidl",d.concat(f).concat(h).concat(j));var l=["callback","dictionary","enum","interface"],m=b(l),n=["typedef"],o=b(n),p=/^[:<=>?]/,q=/^-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)/,r=/^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)/,s=/^_?[A-Za-z][0-9A-Z_a-z-]*/,t=/^_?[A-Za-z][0-9A-Z_a-z-]*(?=\s*;)/,u=/^"[^"]*"/,v=/^\/\*.*?\*\//,w=/^\/\*.*/,x=/^.*?\*\//;a.defineMode("webidl",function(){return{startState:function(){return{inComment:!1,lastToken:"",startDef:!1,endDef:!1}},token:function(a,b){var d=c(a,b);if(d){var e=a.current();b.lastToken=e,"keyword"===d?(b.startDef=m.test(e),b.endDef=b.endDef||o.test(e)):b.startDef=!1}return d}}}),a.defineMIME("text/x-webidl","webidl")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/xml/xml.min.js b/media/vendor/codemirror/mode/xml/xml.min.js index 369df96ae8b4e..abd5e0ca841c7 100644 --- a/media/vendor/codemirror/mode/xml/xml.min.js +++ b/media/vendor/codemirror/mode/xml/xml.min.js @@ -1 +1 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";var e={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};t.defineMode("xml",function(r,o){function a(t,e){function n(n){return e.tokenize=n,n(t,e)}var r=t.next();if("<"==r)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(u("atom","]]>")):null:t.match("--")?n(u("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(d(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=u("meta","?>"),"meta"):(C=t.eat("/")?"closeTag":"openTag",e.tokenize=i,"tag bracket");if("&"==r){var o;return o=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),o?"atom":"error"}return t.eatWhile(/[^&<]/),null}function i(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=a,C=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return C="equals",null;if("<"==n){e.tokenize=a,e.state=m,e.tagName=e.tagStart=null;var r=e.tokenize(t,e);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=l(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=i;break}return"string"};return e.isInAttribute=!0,e}function u(t,e){return function(n,r){for(;!n.eol();){if(n.match(e)){r.tokenize=a;break}n.next()}return t}}function d(t){return function(e,n){for(var r;null!=(r=e.next());){if("<"==r)return n.tokenize=d(t+1),n.tokenize(e,n);if(">"==r){if(1==t){n.tokenize=a;break}return n.tokenize=d(t-1),n.tokenize(e,n)}}return"meta"}}function c(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(z.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function f(t){t.context&&(t.context=t.context.prev)}function s(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!z.contextGrabbers.hasOwnProperty(n)||!z.contextGrabbers[n].hasOwnProperty(e))return;f(t)}}function m(t,e,n){return"openTag"==t?(n.tagStart=e.column(),g):"closeTag"==t?p:m}function g(t,e,n){return"word"==t?(n.tagName=e.current(),I="tag",b):(I="error",g)}function p(t,e,n){if("word"==t){var r=e.current();return n.context&&n.context.tagName!=r&&z.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n),n.context&&n.context.tagName==r||!1===z.matchClosing?(I="tag",h):(I="tag error",x)}return I="error",x}function h(t,e,n){return"endTag"!=t?(I="error",h):(f(n),m)}function x(t,e,n){return I="error",h(t,e,n)}function b(t,e,n){if("word"==t)return I="attribute",k;if("endTag"==t||"selfcloseTag"==t){var r=n.tagName,o=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||z.autoSelfClosers.hasOwnProperty(r)?s(n,r):(s(n,r),n.context=new c(n,r,o==n.indented)),m}return I="error",b}function k(t,e,n){return"equals"==t?v:(z.allowMissing||(I="error"),b(t,e,n))}function v(t,e,n){return"string"==t?w:"word"==t&&z.allowUnquoted?(I="string",b):(I="error",b(t,e,n))}function w(t,e,n){return"string"==t?w:b(t,e,n)}var y=r.indentUnit,z={},N=o.htmlMode?e:n;for(var T in N)z[T]=N[T];for(var T in o)z[T]=o[T];var C,I;return a.isInText=!0,{startState:function(t){var e={tokenize:a,state:m,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;C=null;var n=e.tokenize(t,e);return(n||C)&&"comment"!=n&&(I=null,e.state=e.state(C||n,t,e),I&&(n="error"==I?n+" error":I)),n},indent:function(e,n,r){var o=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+y;if(o&&o.noIndent)return t.Pass;if(e.tokenize!=i&&e.tokenize!=a)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==z.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+y*(z.multilineTagIndentFactor||1);if(z.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:z.htmlMode?"html":"xml",helperType:z.htmlMode?"html":"xml",skipAttribute:function(t){t.state==v&&(t.state=b)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";var b={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},c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};a.defineMode("xml",function(d,e){function f(a,b){function c(c){return b.tokenize=c,c(a,b)}var d=a.next();if("<"==d)return a.eat("!")?a.eat("[")?a.match("CDATA[")?c(i("atom","]]>")):null:a.match("--")?c(i("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),c(j(1))):null:a.eat("?")?(a.eatWhile(/[\w\._\-]/),b.tokenize=i("meta","?>"),"meta"):(A=a.eat("/")?"closeTag":"openTag",b.tokenize=g,"tag bracket");if("&"==d){var e;return e=a.eat("#")?a.eat("x")?a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):a.eatWhile(/[\d]/)&&a.eat(";"):a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),e?"atom":"error"}return a.eatWhile(/[^&<]/),null}function g(a,b){var c=a.next();if(">"==c||"/"==c&&a.eat(">"))return b.tokenize=f,A=">"==c?"endTag":"selfcloseTag","tag bracket";if("="==c)return A="equals",null;if("<"==c){b.tokenize=f,b.state=n,b.tagName=b.tagStart=null;var d=b.tokenize(a,b);return d?d+" tag error":"tag error"}return/[\'\"]/.test(c)?(b.tokenize=h(c),b.stringStartCol=a.column(),b.tokenize(a,b)):(a.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(a){var b=function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=g;break}return"string"};return b.isInAttribute=!0,b}function i(a,b){return function(c,d){for(;!c.eol();){if(c.match(b)){d.tokenize=f;break}c.next()}return a}}function j(a){return function(b,c){for(var d;null!=(d=b.next());){if("<"==d)return c.tokenize=j(a+1),c.tokenize(b,c);if(">"==d){if(1==a){c.tokenize=f;break}return c.tokenize=j(a-1),c.tokenize(b,c)}}return"meta"}}function k(a,b,c){this.prev=a.context,this.tagName=b,this.indent=a.indented,this.startOfLine=c,(x.doNotIndent.hasOwnProperty(b)||a.context&&a.context.noIndent)&&(this.noIndent=!0)}function l(a){a.context&&(a.context=a.context.prev)}function m(a,b){for(var c;;){if(!a.context)return;if(c=a.context.tagName,!x.contextGrabbers.hasOwnProperty(c)||!x.contextGrabbers[c].hasOwnProperty(b))return;l(a)}}function n(a,b,c){return"openTag"==a?(c.tagStart=b.column(),o):"closeTag"==a?p:n}function o(a,b,c){return"word"==a?(c.tagName=b.current(),B="tag",s):(B="error",o)}function p(a,b,c){if("word"==a){var d=b.current();return c.context&&c.context.tagName!=d&&x.implicitlyClosed.hasOwnProperty(c.context.tagName)&&l(c),c.context&&c.context.tagName==d||x.matchClosing===!1?(B="tag",q):(B="tag error",r)}return B="error",r}function q(a,b,c){return"endTag"!=a?(B="error",q):(l(c),n)}function r(a,b,c){return B="error",q(a,b,c)}function s(a,b,c){if("word"==a)return B="attribute",t;if("endTag"==a||"selfcloseTag"==a){var d=c.tagName,e=c.tagStart;return c.tagName=c.tagStart=null,"selfcloseTag"==a||x.autoSelfClosers.hasOwnProperty(d)?m(c,d):(m(c,d),c.context=new k(c,d,e==c.indented)),n}return B="error",s}function t(a,b,c){return"equals"==a?u:(x.allowMissing||(B="error"),s(a,b,c))}function u(a,b,c){return"string"==a?v:"word"==a&&x.allowUnquoted?(B="string",s):(B="error",s(a,b,c))}function v(a,b,c){return"string"==a?v:s(a,b,c)}var w=d.indentUnit,x={},y=e.htmlMode?b:c;for(var z in y)x[z]=y[z];for(var z in e)x[z]=e[z];var A,B;return f.isInText=!0,{startState:function(a){var b={tokenize:f,state:n,indented:a||0,tagName:null,tagStart:null,context:null};return null!=a&&(b.baseIndent=a),b},token:function(a,b){if(!b.tagName&&a.sol()&&(b.indented=a.indentation()),a.eatSpace())return null;A=null;var c=b.tokenize(a,b);return(c||A)&&"comment"!=c&&(B=null,b.state=b.state(A||c,a,b),B&&(c="error"==B?c+" error":B)),c},indent:function(b,c,d){var e=b.context;if(b.tokenize.isInAttribute)return b.tagStart==b.indented?b.stringStartCol+1:b.indented+w;if(e&&e.noIndent)return a.Pass;if(b.tokenize!=g&&b.tokenize!=f)return d?d.match(/^(\s*)/)[0].length:0;if(b.tagName)return x.multilineTagIndentPastTag!==!1?b.tagStart+b.tagName.length+2:b.tagStart+w*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/$/,blockCommentStart:"",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(a){a.state==u&&(a.state=s)}}}),a.defineMIME("text/xml","xml"),a.defineMIME("application/xml","xml"),a.mimeModes.hasOwnProperty("text/html")||a.defineMIME("text/html",{name:"xml",htmlMode:!0})}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/xquery/xquery.min.js b/media/vendor/codemirror/mode/xquery/xquery.min.js index f71322f72c740..037b7409c1497 100644 --- a/media/vendor/codemirror/mode/xquery/xquery.min.js +++ b/media/vendor/codemirror/mode/xquery/xquery.min.js @@ -1 +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";e.defineMode("xquery",function(){function e(e,t,n){return t.tokenize=n,n(e,t)}function t(t,o){var l=t.next(),d=!1,y=p(t);if("<"==l){if(t.match("!--",!0))return e(t,o,c);if(t.match("![CDATA",!1))return o.tokenize=u,"tag";if(t.match("?",!1))return e(t,o,s);var k=t.eat("/");t.eatSpace();for(var b,v="";b=t.eat(/[^\s\u00a0=<>\"\'\/?]/);)v+=b;return e(t,o,a(v,k))}if("{"==l)return h(o,{type:"codeblock"}),null;if("}"==l)return x(o),null;if(f(o))return">"==l?"tag":"/"==l&&t.eat(">")?(x(o),"tag"):"variable";if(/\d/.test(l))return t.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/),"atom";if("("===l&&t.eat(":"))return h(o,{type:"comment"}),e(t,o,n);if(y||'"'!==l&&"'"!==l){if("$"===l)return e(t,o,i);if(":"===l&&t.eat("="))return"keyword";if("("===l)return h(o,{type:"paren"}),null;if(")"===l)return x(o),null;if("["===l)return h(o,{type:"bracket"}),null;if("]"===l)return x(o),null;var z=g.propertyIsEnumerable(l)&&g[l];if(y&&'"'===l)for(;'"'!==t.next(););if(y&&"'"===l)for(;"'"!==t.next(););z||t.eatWhile(/[\w\$_-]/);var w=t.eat(":");!t.eat(":")&&w&&t.eatWhile(/[\w\$_-]/),t.match(/^[ \t]*\(/,!1)&&(d=!0);var q=t.current();return z=g.propertyIsEnumerable(q)&&g[q],d&&!z&&(z={type:"function_call",style:"variable def"}),m(o)?(x(o),"variable"):("element"!=q&&"attribute"!=q&&"axis_specifier"!=z.type||h(o,{type:"xmlconstructor"}),z?z.style:"variable")}return e(t,o,r(l))}function n(e,t){for(var n,r=!1,i=!1,a=0;n=e.next();){if(")"==n&&r){if(!(a>0)){x(t);break}a--}else":"==n&&i&&a++;r=":"==n,i="("==n}return"comment"}function r(e,n){return function(i,a){var o;if(d(a)&&i.current()==e)return x(a),n&&(a.tokenize=n),"string";if(h(a,{type:"string",name:e,tokenize:r(e,n)}),i.match("{",!1)&&l(a))return a.tokenize=t,"string";for(;o=i.next();){if(o==e){x(a),n&&(a.tokenize=n);break}if(i.match("{",!1)&&l(a))return a.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 a(e,n){return function(r,i){return r.eatSpace(),n&&r.eat(">")?(x(i),i.tokenize=t,"tag"):(r.eat("/")||h(i,{type:"tag",name:e,tokenize:t}),r.eat(">")?(i.tokenize=t,"tag"):(i.tokenize=o,"tag"))}}function o(n,i){var a=n.next();return"/"==a&&n.eat(">")?(l(i)&&x(i),f(i)&&x(i),"tag"):">"==a?(l(i)&&x(i),"tag"):"="==a?null:'"'==a||"'"==a?e(n,i,r(a,o)):(l(i)||h(i,{type:"attribute",tokenize:o}),n.eat(/[a-zA-Z_:]/),n.eatWhile(/[-a-zA-Z0-9_:.]/),n.eatSpace(),(n.match(">",!1)||n.match("/",!1))&&(x(i),i.tokenize=t),"attribute")}function c(e,n){for(var r;r=e.next();)if("-"==r&&e.match("->",!0))return n.tokenize=t,"comment"}function u(e,n){for(var r;r=e.next();)if("]"==r&&e.match("]",!0))return n.tokenize=t,"comment"}function s(e,n){for(var r;r=e.next();)if("?"==r&&e.match(">",!0))return n.tokenize=t,"comment meta"}function f(e){return y(e,"tag")}function l(e){return y(e,"attribute")}function m(e){return y(e,"xmlconstructor")}function d(e){return y(e,"string")}function p(e){return'"'===e.current()?e.match(/^[^\"]+\"\:/,!1):"'"===e.current()&&e.match(/^[^\"]+\'\:/,!1)}function y(e,t){return e.stack.length&&e.stack[e.stack.length-1].type==t}function h(e,t){e.stack.push(t)}function x(e){e.stack.pop();var n=e.stack.length&&e.stack[e.stack.length-1].tokenize;e.tokenize=n||t}var g=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"),a={type:"atom",style:"atom"},o={type:"axis_specifier",style:"qualifier"},c={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,",":{type:"punctuation",style:null},null:a,"fn:false()":a,"fn:true()":a},u=["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"],s=0,f=u.length;s",">=","<","<=",".","|","?","and","or","div","idiv","mod","*","/","+","-"],s=0,f=m.length;s\"\'\/?]/);)v+=u;return a(b,g,f(v,t))}if("{"==l)return q(g,{type:"codeblock"}),null;if("}"==l)return r(g),null;if(k(g))return">"==l?"tag":"/"==l&&b.eat(">")?(r(g),"tag"):"variable";if(/\d/.test(l))return b.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/),"atom";if("("===l&&b.eat(":"))return q(g,{type:"comment"}),a(b,g,c);if(p||'"'!==l&&"'"!==l){if("$"===l)return a(b,g,e);if(":"===l&&b.eat("="))return"keyword";if("("===l)return q(g,{type:"paren"}),null;if(")"===l)return r(g),null;if("["===l)return q(g,{type:"bracket"}),null;if("]"===l)return r(g),null;var w=s.propertyIsEnumerable(l)&&s[l];if(p&&'"'===l)for(;'"'!==b.next(););if(p&&"'"===l)for(;"'"!==b.next(););w||b.eatWhile(/[\w\$_-]/);var x=b.eat(":");!b.eat(":")&&x&&b.eatWhile(/[\w\$_-]/),b.match(/^[ \t]*\(/,!1)&&(n=!0);var y=b.current();return w=s.propertyIsEnumerable(y)&&s[y],n&&!w&&(w={type:"function_call",style:"variable def"}),m(g)?(r(g),"variable"):("element"!=y&&"attribute"!=y&&"axis_specifier"!=w.type||q(g,{type:"xmlconstructor"}),w?w.style:"variable")}return a(b,g,d(l))}function c(a,b){for(var c,d=!1,e=!1,f=0;c=a.next();){if(")"==c&&d){if(!(f>0)){r(b);break}f--}else":"==c&&e&&f++;d=":"==c,e="("==c}return"comment"}function d(a,c){return function(e,f){var g;if(n(f)&&e.current()==a)return r(f),c&&(f.tokenize=c),"string";if(q(f,{type:"string",name:a,tokenize:d(a,c)}),e.match("{",!1)&&l(f))return f.tokenize=b,"string";for(;g=e.next();){if(g==a){r(f),c&&(f.tokenize=c);break}if(e.match("{",!1)&&l(f))return f.tokenize=b,"string"}return"string"}}function e(a,c){if(a.eat('"')){for(;'"'!==a.next(););a.eat(":")}else a.eatWhile(/[\w\$_-]/),a.match(":=",!1)||a.eat(":");return a.eatWhile(/[\w\$_-]/),c.tokenize=b,"variable"}function f(a,c){return function(d,e){return d.eatSpace(),c&&d.eat(">")?(r(e),e.tokenize=b,"tag"):(d.eat("/")||q(e,{type:"tag",name:a,tokenize:b}),d.eat(">")?(e.tokenize=b,"tag"):(e.tokenize=g,"tag"))}}function g(c,e){var f=c.next();return"/"==f&&c.eat(">")?(l(e)&&r(e),k(e)&&r(e),"tag"):">"==f?(l(e)&&r(e),"tag"):"="==f?null:'"'==f||"'"==f?a(c,e,d(f,g)):(l(e)||q(e,{type:"attribute",tokenize:g}),c.eat(/[a-zA-Z_:]/),c.eatWhile(/[-a-zA-Z0-9_:.]/),c.eatSpace(),(c.match(">",!1)||c.match("/",!1))&&(r(e),e.tokenize=b),"attribute")}function h(a,c){for(var d;d=a.next();)if("-"==d&&a.match("->",!0))return c.tokenize=b,"comment"}function i(a,c){for(var d;d=a.next();)if("]"==d&&a.match("]",!0))return c.tokenize=b,"comment"}function j(a,c){for(var d;d=a.next();)if("?"==d&&a.match(">",!0))return c.tokenize=b,"comment meta"}function k(a){return p(a,"tag")}function l(a){return p(a,"attribute")}function m(a){return p(a,"xmlconstructor")}function n(a){return p(a,"string")}function o(a){return'"'===a.current()?a.match(/^[^\"]+\"\:/,!1):"'"===a.current()&&a.match(/^[^\"]+\'\:/,!1)}function p(a,b){return a.stack.length&&a.stack[a.stack.length-1].type==b}function q(a,b){a.stack.push(b)}function r(a){a.stack.pop();var c=a.stack.length&&a.stack[a.stack.length-1].tokenize;a.tokenize=c||b}var s=function(){function a(a){return{type:a,style:"keyword"}}for(var b=a("keyword a"),c=a("keyword b"),d=a("keyword c"),e=a("operator"),f={type:"atom",style:"atom"},g={type:"punctuation",style:null},h={type:"axis_specifier",style:"qualifier"},i={if:b,switch:b,while:b,for:b,else:c,then:c,try:c,finally:c,catch:c,element:d,attribute:d,let:d,implements:d,import:d,module:d,namespace:d,return:d,super:d,this:d,throws:d,where:d,private:d,",":g,null:f,"fn:false()":f,"fn:true()":f},j=["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"],k=0,l=j.length;k",">=","<","<=",".","|","?","and","or","div","idiv","mod","*","/","+","-"],k=0,l=n.length;k|<|&|\||_|`|'|\^|\?|!|%)/,!0,!1)?"operator":"error"}function o(e,t){for(var n,o=!1,i=!1;null!=(n=e.next());){if('"'===n&&!i){o=!0;break}i=!i&&"\\"===n}return o&&!i&&(t.tokenize=r),"string"}function i(e,t){for(var n,o;null!=(o=e.next());){if("*"===n&&"/"===o){t.tokenize=r;break}n=o}return"comment"}function a(e){var t=null;return e.scopes.length>0&&(t=e.scopes[e.scopes.length-1]),t}var c=function(e){for(var t={},n=e.split(" "),r=0;r|<|&|\||_|`|'|\^|\?|!|%)/,!0,!1)?"operator":"error"}function e(a,b){for(var c,e=!1,f=!1;null!=(c=a.next());){if('"'===c&&!f){e=!0;break}f=!f&&"\\"===c}return e&&!f&&(b.tokenize=d),"string"}function f(a,b){for(var c,e;null!=(e=a.next());){if("*"===c&&"/"===e){b.tokenize=d;break}c=e}return"comment"}function g(a){var b=null;return a.scopes.length>0&&(b=a.scopes[a.scopes.length-1]),b}var h=function(a){for(var b={},c=a.split(" "),d=0;dt.keyCol)return e.skipToEnd(),"string";if(t.literal&&(t.literal=!1),e.sol()){if(t.keyCol=0,t.pair=!1,t.pairStart=!1,e.match(/---/))return"def";if(e.match(/\.\.\./))return"def";if(e.match(/\s*-\s+/))return"meta"}if(e.match(/^(\{|\}|\[|\])/))return"{"==r?t.inlinePairs++:"}"==r?t.inlinePairs--:"["==r?t.inlineList++:t.inlineList--,"meta";if(t.inlineList>0&&!n&&","==r)return e.next(),"meta";if(t.inlinePairs>0&&!n&&","==r)return t.keyCol=0,t.pair=!1,t.pairStart=!1,e.next(),"meta";if(t.pairStart){if(e.match(/^\s*(\||\>)\s*/))return t.literal=!0,"meta";if(e.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==t.inlinePairs&&e.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(t.inlinePairs>0&&e.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(e.match(i))return"keyword"}return!t.pair&&e.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(t.pair=!0,t.keyCol=e.indentation(),"atom"):t.pair&&e.match(/^:\s*/)?(t.pairStart=!0,"meta"):(t.pairStart=!1,t.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")}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("yaml",function(){var a=["true","false","on","off","yes","no"],b=new RegExp("\\b(("+a.join(")|(")+"))$","i");return{token:function(a,c){var d=a.peek(),e=c.escaped;if(c.escaped=!1,"#"==d&&(0==a.pos||/\s/.test(a.string.charAt(a.pos-1))))return a.skipToEnd(),"comment";if(a.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(c.literal&&a.indentation()>c.keyCol)return a.skipToEnd(),"string";if(c.literal&&(c.literal=!1),a.sol()){if(c.keyCol=0,c.pair=!1,c.pairStart=!1,a.match(/---/))return"def";if(a.match(/\.\.\./))return"def";if(a.match(/\s*-\s+/))return"meta"}if(a.match(/^(\{|\}|\[|\])/))return"{"==d?c.inlinePairs++:"}"==d?c.inlinePairs--:"["==d?c.inlineList++:c.inlineList--,"meta";if(c.inlineList>0&&!e&&","==d)return a.next(),"meta";if(c.inlinePairs>0&&!e&&","==d)return c.keyCol=0,c.pair=!1,c.pairStart=!1,a.next(),"meta";if(c.pairStart){if(a.match(/^\s*(\||\>)\s*/))return c.literal=!0,"meta";if(a.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==c.inlinePairs&&a.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(c.inlinePairs>0&&a.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(a.match(b))return"keyword"}return!c.pair&&a.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(c.pair=!0,c.keyCol=a.indentation(),"atom"):c.pair&&a.match(/^:\s*/)?(c.pairStart=!0,"meta"):(c.pairStart=!1,c.escaped="\\"==d,a.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}}}}),a.defineMIME("text/x-yaml","yaml"),a.defineMIME("text/yaml","yaml")}); \ No newline at end of file diff --git a/media/vendor/codemirror/mode/z80/z80.min.js b/media/vendor/codemirror/mode/z80/z80.min.js index 7ccdb80757724..d8eaea456d248 100644 --- a/media/vendor/codemirror/mode/z80/z80.min.js +++ b/media/vendor/codemirror/mode/z80/z80.min.js @@ -1 +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";e.defineMode("z80",function(e,t){var r,i,n=t.ez80;n?(r=/^(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,i=/^(((call|j[pr]|rst|ret[in]?)(\.([sl]?i)?[sl])?)|(rs|st)mix)\b/i):(r=/^(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,i=/^(call|j[pr]|ret[in]?|b_?(call|jump))\b/i);var l=/^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i,o=/^(n?[zc]|p[oe]?|m)\b/i,c=/^([hl][xy]|i[xy][hl]|slia|sll)\b/i,a=/^([\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 d;if(e.eatWhile(/\w/)){if(n&&e.eat(".")&&e.eatWhile(/\w/),d=e.current(),!e.indentation())return e.match(a)?"number":null;if((1==t.context||4==t.context)&&l.test(d))return t.context=4,"var2";if(2==t.context&&o.test(d))return t.context=4,"var3";if(r.test(d))return t.context=1,"keyword";if(i.test(d))return t.context=2,"keyword";if(4==t.context&&a.test(d))return"number";if(c.test(d))return"error"}else{if(e.eat(";"))return e.skipToEnd(),"comment";if(e.eat('"')){for(;(d=e.next())&&'"'!=d;)"\\"==d&&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})}); \ No newline at end of file +!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("z80",function(a,b){var c,d,e=b.ez80;e?(c=/^(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,d=/^(((call|j[pr]|rst|ret[in]?)(\.([sl]?i)?[sl])?)|(rs|st)mix)\b/i):(c=/^(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,d=/^(call|j[pr]|ret[in]?|b_?(call|jump))\b/i);var f=/^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i,g=/^(n?[zc]|p[oe]?|m)\b/i,h=/^([hl][xy]|i[xy][hl]|slia|sll)\b/i,i=/^([\da-f]+h|[0-7]+o|[01]+b|\d+d?)\b/i;return{startState:function(){return{context:0}},token:function(a,b){if(a.column()||(b.context=0),a.eatSpace())return null;var j;if(a.eatWhile(/\w/)){if(e&&a.eat(".")&&a.eatWhile(/\w/),j=a.current(),!a.indentation())return a.match(i)?"number":null;if((1==b.context||4==b.context)&&f.test(j))return b.context=4,"var2";if(2==b.context&&g.test(j))return b.context=4,"var3";if(c.test(j))return b.context=1,"keyword";if(d.test(j))return b.context=2,"keyword";if(4==b.context&&i.test(j))return"number";if(h.test(j))return"error"}else{if(a.eat(";"))return a.skipToEnd(),"comment";if(a.eat('"')){for(;(j=a.next())&&'"'!=j;)"\\"==j&&a.next();return"string"}if(a.eat("'")){if(a.match(/\\?.'/))return"number"}else if(a.eat(".")||a.sol()&&a.eat("#")){if(b.context=5,a.eatWhile(/\w/))return"def"}else if(a.eat("$")){if(a.eatWhile(/[\da-f]/i))return"number"}else if(a.eat("%")){if(a.eatWhile(/[01]/))return"number"}else a.next()}return null}}}),a.defineMIME("text/x-z80","z80"),a.defineMIME("text/x-ez80",{name:"z80",ez80:!0})}); \ No newline at end of file diff --git a/media/vendor/codemirror/theme/liquibyte.css b/media/vendor/codemirror/theme/liquibyte.css index 9db8bde739e16..ce0477fe72354 100644 --- a/media/vendor/codemirror/theme/liquibyte.css +++ b/media/vendor/codemirror/theme/liquibyte.css @@ -59,10 +59,10 @@ .CodeMirror-matchingtag { background-color: rgba(150, 255, 0, .3); } /* Scrollbars */ /* Simple */ -.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div:hover, div.CodeMirror-simplescroll-vertical div:hover { +.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div:hover, .cm-s-liquibyte div.CodeMirror-simplescroll-vertical div:hover { background-color: rgba(80, 80, 80, .7); } -.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div, div.CodeMirror-simplescroll-vertical div { +.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div, .cm-s-liquibyte div.CodeMirror-simplescroll-vertical div { background-color: rgba(80, 80, 80, .3); border: 1px solid #404040; border-radius: 5px; diff --git a/plugins/editors/codemirror/codemirror.xml b/plugins/editors/codemirror/codemirror.xml index 39a311b2c4fa4..7ff0c8d6b4340 100644 --- a/plugins/editors/codemirror/codemirror.xml +++ b/plugins/editors/codemirror/codemirror.xml @@ -1,7 +1,7 @@ plg_editors_codemirror - 5.25.2 + 5.26.0 28 March 2011 Marijn Haverbeke marijnh@gmail.com