var CSSParser=Editor.Parser=function(){function l(h,j,g){return function(e){return!h||/^\}/.test(e)?g:j?g+indentUnit*2:g+indentUnit}}var k=function(){function h(a,d){var b=a.next();if(b=="@"){a.nextWhileMatches(/\w/);return"css-at"}else if(b=="/"&&a.equals("*")){d(j);return null}else if(b=="<"&&a.equals("!")){d(g);return null}else if(b=="=")return"css-compare";else if(a.equals("=")&&(b=="~"||b=="|")){a.next();return"css-compare"}else if(b=='"'||b=="'"){d(e(b));return null}else if(b=="#"){a.nextWhileMatches(/\w/);
return"css-hash"}else if(b=="!"){a.nextWhileMatches(/[ \t]/);a.nextWhileMatches(/\w/);return"css-important"}else if(/\d/.test(b)){a.nextWhileMatches(/[\w.%]/);return"css-unit"}else if(/[,.+>*\/]/.test(b))return"css-select-op";else if(/[;{}:\[\]]/.test(b))return"css-punctuation";else{a.nextWhileMatches(/[\w\\\-_]/);return"css-identifier"}}function j(a,d){for(var b=false;!a.endOfLine();){var c=a.next();if(b&&c=="/"){d(h);break}b=c=="*"}return"css-comment"}function g(a,d){for(var b=0;!a.endOfLine();){var c=
a.next();if(b>=2&&c==">"){d(h);break}b=c=="-"?b+1:0}return"css-comment"}function e(a){return function(d,b){for(var c=false;!d.endOfLine();){var f=d.next();if(f==a&&!c)break;c=!c&&f=="\\"}c||b(h);return"css-string"}}return function(a,d){return tokenizer(a,d||h)}}();return{make:function(h,j){j=j||0;var g=k(h),e=false,a=false,d=false,b={next:function(){var c=g.next(),f=c.style,i=c.content;if(f=="css-hash")f=c.style=a?"css-colorcode":"css-identifier";if(f=="css-identifier")if(a)c.style="css-value";else if(!e&&
!d)c.style="css-selector";if(i=="\n")c.indentation=l(e,a,j);if(i=="{"&&d=="@media")d=false;else if(i=="{")e=true;else if(i=="}")e=a=d=false;else if(i==";")a=d=false;else if(e&&f!="css-comment"&&f!="whitespace")a=true;else if(!e&&f=="css-at")d=i;return c},copy:function(){var c=e,f=a,i=g.state;return function(m){g=k(m,i);e=c;a=f;return b}}};return b},electricChars:"}"}}();