Canevas pour un nouveau plugin d'application de styles basés sur des classes css...
[ckeditor.git] / skins / ckeditor / plugins / codemirror / js / codemirror.mode.htmlmixed.min.js
1 CodeMirror.defineMode("xml",function(B,l){var s=B.indentUnit;var A=l.multilineTagIndentFactor||1;var c=l.multilineTagIndentPastTag||true;var y=l.htmlMode?{autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false};var b=l.alignCDATA;var g,h;function p(I,H){function F(K){H.tokenize=K;return K(I,H)}var G=I.next();if(G=="<"){if(I.eat("!")){if(I.eat("[")){if(I.match("CDATA[")){return F(x("atom","]]>"))}else{return null}}else{if(I.match("--")){return F(x("comment","-->"))}else{if(I.match("DOCTYPE",true,true)){I.eatWhile(/[\w\._\-]/);return F(C(1))}else{return null}}}}else{if(I.eat("?")){I.eatWhile(/[\w\._\-]/);H.tokenize=x("meta","?>");return"meta"}else{var D=I.eat("/");g="";var J;while((J=I.eat(/[^\s\u00a0=<>\"\'\/?]/))){g+=J}if(!g){return"tag error"}h=D?"closeTag":"openTag";H.tokenize=o;return"tag"}}}else{if(G=="&"){var E;if(I.eat("#")){if(I.eat("x")){E=I.eatWhile(/[a-fA-F\d]/)&&I.eat(";")}else{E=I.eatWhile(/[\d]/)&&I.eat(";")}}else{E=I.eatWhile(/[\w\.\-:]/)&&I.eat(";")}return E?"atom":"error"}else{I.eatWhile(/[^&<]/);return null}}}function o(G,F){var E=G.next();if(E==">"||(E=="/"&&G.eat(">"))){F.tokenize=p;h=E==">"?"endTag":"selfcloseTag";return"tag"}else{if(E=="="){h="equals";return null}else{if(E=="<"){F.tokenize=p;var D=F.tokenize(G,F);return D?D+" error":"error"}else{if(/[\'\"]/.test(E)){F.tokenize=k(E);F.stringStartCol=G.column();return F.tokenize(G,F)}else{G.eatWhile(/[^\s\u00a0=<>\"\']/);return"word"}}}}}function k(D){var E=function(G,F){while(!G.eol()){if(G.next()==D){F.tokenize=o;break}}return"string"};E.isInAttribute=true;return E}function x(E,D){return function(G,F){while(!G.eol()){if(G.match(D)){F.tokenize=p;break}G.next()}return E}}function C(D){return function(G,F){var E;while((E=G.next())!=null){if(E=="<"){F.tokenize=C(D+1);return F.tokenize(G,F)}else{if(E==">"){if(D==1){F.tokenize=p;break}else{F.tokenize=C(D-1);return F.tokenize(G,F)}}}}return"meta"}}var m,z,i;function a(){for(var D=arguments.length-1;D>=0;D--){m.cc.push(arguments[D])}}function f(){a.apply(null,arguments);return true}function j(D,F){var E=y.doNotIndent.hasOwnProperty(D)||(m.context&&m.context.noIndent);m.context={prev:m.context,tagName:D,indent:m.indented,startOfLine:F,noIndent:E}}function v(){if(m.context){m.context=m.context.prev}}function e(D){if(D=="openTag"){m.tagName=g;m.tagStart=z.column();return f(n,d(m.startOfLine))}else{if(D=="closeTag"){var E=false;if(m.context){if(m.context.tagName!=g){if(y.implicitlyClosed.hasOwnProperty(m.context.tagName.toLowerCase())){v()}E=!m.context||m.context.tagName!=g}}else{E=true}if(E){i="error"}return f(t(E))}}return f()}function d(D){return function(F){var E=m.tagName;m.tagName=m.tagStart=null;if(F=="selfcloseTag"||(F=="endTag"&&y.autoSelfClosers.hasOwnProperty(E.toLowerCase()))){r(E.toLowerCase());return f()}if(F=="endTag"){r(E.toLowerCase());j(E,D);return f()}return f()}}function t(D){return function(E){if(D){i="error"}if(E=="endTag"){v();return f()}i="error";return f(arguments.callee)}}function r(E){var D;while(true){if(!m.context){return}D=m.context.tagName.toLowerCase();if(!y.contextGrabbers.hasOwnProperty(D)||!y.contextGrabbers[D].hasOwnProperty(E)){return}v()}}function n(D){if(D=="word"){i="attribute";return f(q,n)}if(D=="endTag"||D=="selfcloseTag"){return a()}i="error";return f(n)}function q(D){if(D=="equals"){return f(w,n)}if(!y.allowMissing){i="error"}else{if(D=="word"){i="attribute";return f(q,n)}}return(D=="endTag"||D=="selfcloseTag")?a():f()}function w(D){if(D=="string"){return f(u)}if(D=="word"&&y.allowUnquoted){i="string";return f()}i="error";return(D=="endTag"||D=="selfCloseTag")?a():f()}function u(D){if(D=="string"){return f(u)}else{return a()}}return{startState:function(){return{tokenize:p,cc:[],indented:0,startOfLine:true,tagName:null,tagStart:null,context:null}},token:function(G,F){if(!F.tagName&&G.sol()){F.startOfLine=true;F.indented=G.indentation()}if(G.eatSpace()){return null}i=h=g=null;var E=F.tokenize(G,F);F.type=h;if((E||h)&&E!="comment"){m=F;z=G;while(true){var D=F.cc.pop()||e;if(D(h||E)){break}}}F.startOfLine=false;if(i){E=i=="error"?E+" error":i}return E},indent:function(G,D,F){var E=G.context;if(G.tokenize.isInAttribute){return G.stringStartCol+1}if((G.tokenize!=o&&G.tokenize!=p)||E&&E.noIndent){return F?F.match(/^(\s*)/)[0].length:0}if(G.tagName){if(c){return G.tagStart+G.tagName.length+2}else{return G.tagStart+s*A}}if(b&&/<!\[CDATA\[/.test(D)){return 0}if(E&&/^<\//.test(D)){E=E.prev}while(E&&!E.startOfLine){E=E.prev}if(E){return E.indent+s}else{return 0}},electricChars:"/",blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml"}});CodeMirror.defineMIME("text/xml","xml");CodeMirror.defineMIME("application/xml","xml");if(!CodeMirror.mimeModes.hasOwnProperty("text/html")){CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:true})}CodeMirror.defineMode("javascript",function(U,af){var i=U.indentUnit;var v=af.statementIndent;var u=af.json;var e=af.typescript;var al=function(){function aH(aJ){return{type:aJ,style:"keyword"}}var aC=aH("keyword a"),aA=aH("keyword b"),az=aH("keyword c");var aB=aH("operator"),aF={type:"atom",style:"atom"};var aD={"if":aH("if"),"while":aC,"with":aC,"else":aA,"do":aA,"try":aA,"finally":aA,"return":az,"break":az,"continue":az,"new":az,"delete":az,"throw":az,"var":aH("var"),"const":aH("var"),let:aH("var"),"function":aH("function"),"catch":aH("catch"),"for":aH("for"),"switch":aH("switch"),"case":aH("case"),"default":aH("default"),"in":aB,"typeof":aB,"instanceof":aB,"true":aF,"false":aF,"null":aF,"undefined":aF,"NaN":aF,"Infinity":aF,"this":aH("this"),module:aH("module"),"class":aH("class"),"super":aH("atom"),yield:az,"export":aH("export"),"import":aH("import"),"extends":az};if(e){var aI={type:"variable",style:"variable-3"};var aE={"interface":aH("interface"),"extends":aH("extends"),constructor:aH("constructor"),"public":aH("public"),"private":aH("private"),"protected":aH("protected"),"static":aH("static"),string:aI,number:aI,bool:aI,any:aI};for(var aG in aE){aD[aG]=aE[aG]}}return aD}();var J=/[+\-*&%=<>!?|~^]/;function ab(aC,az){var aB=false,aA;while((aA=aC.next())!=null){if(aA==az&&!aB){return false}aB=!aB&&aA=="\\"}return aB}var M,A;function F(aB,aA,az){M=aB;A=az;return aA}function O(aD,aB){var az=aD.next();if(az=='"'||az=="'"){aB.tokenize=L(az);return aB.tokenize(aD,aB)}else{if(az=="."&&aD.match(/^\d+(?:[eE][+\-]?\d+)?/)){return F("number","number")}else{if(az=="."&&aD.match("..")){return F("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(az)){return F(az)}else{if(az=="="&&aD.eat(">")){return F("=>")}else{if(az=="0"&&aD.eat(/x/i)){aD.eatWhile(/[\da-f]/i);return F("number","number")}else{if(/\d/.test(az)){aD.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return F("number","number")}else{if(az=="/"){if(aD.eat("*")){aB.tokenize=aq;return aq(aD,aB)}else{if(aD.eat("/")){aD.skipToEnd();return F("comment","comment")}else{if(aB.lastType=="operator"||aB.lastType=="keyword c"||aB.lastType=="sof"||/^[\[{}\(,;:]$/.test(aB.lastType)){ab(aD,"/");aD.eatWhile(/[gimy]/);return F("regexp","string-2")}else{aD.eatWhile(J);return F("operator",null,aD.current())}}}}else{if(az=="`"){aB.tokenize=ar;return ar(aD,aB)}else{if(az=="#"){aD.skipToEnd();return F("error","error")}else{if(J.test(az)){aD.eatWhile(J);return F("operator",null,aD.current())}else{aD.eatWhile(/[\w\$_]/);var aC=aD.current(),aA=al.propertyIsEnumerable(aC)&&al[aC];return(aA&&aB.lastType!=".")?F(aA.type,aA.style,aC):F("variable","variable",aC)}}}}}}}}}}}}function L(az){return function(aB,aA){if(!ab(aB,az)){aA.tokenize=O}return F("string","string")}}function aq(aC,aB){var az=false,aA;while(aA=aC.next()){if(aA=="/"&&az){aB.tokenize=O;break}az=(aA=="*")}return F("comment","comment")}function ar(aC,aA){var aB=false,az;while((az=aC.next())!=null){if(!aB&&(az=="`"||az=="$"&&aC.eat("{"))){aA.tokenize=O;break}aB=!aB&&az=="\\"}return F("quasi","string-2",aC.current())}var j="([{}])";function ao(aF,aC){if(aC.fatArrowAt){aC.fatArrowAt=null}var aB=aF.string.indexOf("=>",aF.start);if(aB<0){return}var aE=0,aA=false;for(var aG=aB-1;aG>=0;--aG){var az=aF.string.charAt(aG);var aD=j.indexOf(az);if(aD>=0&&aD<3){if(!aE){++aG;break}if(--aE==0){break}}else{if(aD>=3&&aD<6){++aE}else{if(/[$\w]/.test(az)){aA=true}else{if(aA&&!aE){++aG;break}}}}}if(aA&&!aE){aC.fatArrowAt=aG}}var a={atom:true,number:true,variable:true,string:true,regexp:true,"this":true};function D(aE,aA,az,aD,aB,aC){this.indented=aE;this.column=aA;this.type=az;this.prev=aB;this.info=aC;if(aD!=null){this.align=aD}}function n(aC,aB){for(var aA=aC.localVars;aA;aA=aA.next){if(aA.name==aB){return true}}for(var az=aC.context;az;az=az.prev){for(var aA=az.vars;aA;aA=aA.next){if(aA.name==aB){return true}}}}function d(aD,aA,az,aC,aE){var aF=aD.cc;y.state=aD;y.stream=aE;y.marked=null,y.cc=aF;if(!aD.lexical.hasOwnProperty("align")){aD.lexical.align=true}while(true){var aB=aF.length?aF.pop():u?aj:ax;if(aB(az,aC)){while(aF.length&&aF[aF.length-1].lex){aF.pop()()}if(y.marked){return y.marked}if(az=="variable"&&n(aD,aC)){return"variable-2"}return aA}}}var y={state:null,column:null,marked:null,cc:null};function V(){for(var az=arguments.length-1;az>=0;az--){y.cc.push(arguments[az])}}function Z(){V.apply(null,arguments);return true}function an(aA){function az(aD){for(var aC=aD;aC;aC=aC.next){if(aC.name==aA){return true}}return false}var aB=y.state;if(aB.context){y.marked="def";if(az(aB.localVars)){return}aB.localVars={name:aA,next:aB.localVars}}else{if(az(aB.globalVars)){return}if(af.globalVars){aB.globalVars={name:aA,next:aB.globalVars}}}}var l={name:"this",next:{name:"arguments"}};function r(){y.state.context={prev:y.state.context,vars:y.state.localVars};y.state.localVars=l}function s(){y.state.localVars=y.state.context.vars;y.state.context=y.state.context.prev}function av(aA,aB){var az=function(){var aD=y.state,aC=aD.indented;if(aD.lexical.type=="stat"){aC=aD.lexical.indented}aD.lexical=new D(aC,y.stream.column(),aA,null,aD.lexical,aB)};az.lex=true;return az}function f(){var az=y.state;if(az.lexical.prev){if(az.lexical.type==")"){az.indented=az.lexical.indented}az.lexical=az.lexical.prev}}f.lex=true;function m(az){return function(aA){if(aA==az){return Z()}else{if(az==";"){return V()}else{return Z(arguments.callee)}}}}function ax(az,aA){if(az=="var"){return Z(av("vardef",aA.length),b,m(";"),f)}if(az=="keyword a"){return Z(av("form"),aj,ax,f)}if(az=="keyword b"){return Z(av("form"),ax,f)}if(az=="{"){return Z(av("}"),t,f)}if(az==";"){return Z()}if(az=="if"){return Z(av("form"),aj,ax,f,c)}if(az=="function"){return Z(G)}if(az=="for"){return Z(av("form"),p,f,ax,f)}if(az=="variable"){return Z(av("stat"),ay)}if(az=="switch"){return Z(av("form"),aj,av("}","switch"),m("{"),t,f,f)}if(az=="case"){return Z(aj,m(":"))}if(az=="default"){return Z(m(":"))}if(az=="catch"){return Z(av("form"),r,m("("),aa,m(")"),ax,f,s)}if(az=="module"){return Z(av("form"),r,B,s,f)}if(az=="class"){return Z(av("form"),Q,P,f)}if(az=="export"){return Z(av("form"),aw,f)}if(az=="import"){return Z(av("form"),ac,f)}return V(av("stat"),aj,m(";"),f)}function aj(az){return T(az,false)}function au(az){return T(az,true)}function T(aA,aC){if(y.state.fatArrowAt==y.stream.start){var az=aC?H:R;if(aA=="("){return Z(r,am(g,")"),m("=>"),az,s)}else{if(aA=="variable"){return V(r,g,m("=>"),az,s)}}}var aB=aC?h:W;if(a.hasOwnProperty(aA)){return Z(aB)}if(aA=="function"){return Z(G)}if(aA=="keyword c"){return Z(aC?ag:ae)}if(aA=="("){return Z(av(")"),ae,ap,m(")"),f,aB)}if(aA=="operator"||aA=="spread"){return Z(aC?au:aj)}if(aA=="["){return Z(av("]"),au,ai,f,aB)}if(aA=="{"){return Z(am(o,"}"),aB)}return Z()}function ae(az){if(az.match(/[;\}\)\],]/)){return V()}return V(aj)}function ag(az){if(az.match(/[;\}\)\],]/)){return V()}return V(au)}function W(az,aA){if(az==","){return Z(aj)}return h(az,aA,false)}function h(az,aB,aD){var aA=aD==false?W:h;var aC=aD==false?aj:au;if(aB=="=>"){return Z(r,aD?H:R,s)}if(az=="operator"){if(/\+\+|--/.test(aB)){return Z(aA)}if(aB=="?"){return Z(aj,m(":"),aC)}return Z(aC)}if(az=="quasi"){y.cc.push(aA);return K(aB)}if(az==";"){return}if(az=="("){return Z(am(au,")","call"),aA)}if(az=="."){return Z(ah,aA)}if(az=="["){return Z(av("]"),ae,m("]"),f,aA)}}function K(az){if(!az){}if(az.slice(az.length-2)!="${"){return Z()}return Z(aj,k)}function k(az){if(az=="}"){y.marked="string-2";y.state.tokenize=ar;return Z()}}function R(az){ao(y.stream,y.state);if(az=="{"){return V(ax)}return V(aj)}function H(az){ao(y.stream,y.state);if(az=="{"){return V(ax)}return V(au)}function ay(az){if(az==":"){return Z(f,ax)}return V(W,m(";"),f)}function ah(az){if(az=="variable"){y.marked="property";return Z()}}function o(az,aA){if(az=="variable"){y.marked="property";if(aA=="get"||aA=="set"){return Z(C)}}else{if(az=="number"||az=="string"){y.marked=az+" property"}else{if(az=="["){return Z(aj,m("]"),E)}}}if(a.hasOwnProperty(az)){return Z(E)}}function C(az){if(az!="variable"){return V(E)}y.marked="property";return Z(G)}function E(az){if(az==":"){return Z(au)}if(az=="("){return V(G)}}function am(aC,az,aB){function aA(aE){if(aE==","){var aD=y.state.lexical;if(aD.info=="call"){aD.pos=(aD.pos||0)+1}return Z(aC,aA)}if(aE==az){return Z()}return Z(m(az))}return function(aD){if(aD==az){return Z()}if(aB===false){return V(aC,aA)}return V(av(az,aB),aC,aA,f)}}function t(az){if(az=="}"){return Z()}return V(ax,t)}function N(az){if(e&&az==":"){return Z(Y)}}function Y(az){if(az=="variable"){y.marked="variable-3";return Z()}}function b(){return V(g,N,X,S)}function g(az,aA){if(az=="variable"){an(aA);return Z()}if(az=="["){return Z(am(g,"]"))}if(az=="{"){return Z(am(at,"}"))}}function at(az,aA){if(az=="variable"&&!y.stream.match(/^\s*:/,false)){an(aA);return Z(X)}if(az=="variable"){y.marked="property"}return Z(m(":"),g,X)}function X(az,aA){if(aA=="="){return Z(au)}}function S(az){if(az==","){return Z(b)}}function c(az,aA){if(az=="keyword b"&&aA=="else"){return Z(av("form"),ax,f)}}function p(az){if(az=="("){return Z(av(")"),z,m(")"))}}function z(az){if(az=="var"){return Z(b,m(";"),x)}if(az==";"){return Z(x)}if(az=="variable"){return Z(q)}return V(aj,m(";"),x)}function q(az,aA){if(aA=="in"||aA=="of"){y.marked="keyword";return Z(aj)}return Z(W,x)}function x(az,aA){if(az==";"){return Z(w)}if(aA=="in"||aA=="of"){y.marked="keyword";return Z(aj)}return V(aj,m(";"),w)}function w(az){if(az!=")"){Z(aj)}}function G(az,aA){if(aA=="*"){y.marked="keyword";return Z(G)}if(az=="variable"){an(aA);return Z(G)}if(az=="("){return Z(r,am(aa,")"),ax,s)}}function aa(az){if(az=="spread"){return Z(aa)}return V(g,N)}function Q(az,aA){if(az=="variable"){an(aA);return Z(I)}}function I(az,aA){if(aA=="extends"){return Z(aj)}}function P(az){if(az=="{"){return Z(am(o,"}"))}}function B(az,aA){if(az=="string"){return Z(ax)}if(az=="variable"){an(aA);return Z(ad)}}function aw(az,aA){if(aA=="*"){y.marked="keyword";return Z(ad,m(";"))}if(aA=="default"){y.marked="keyword";return Z(aj,m(";"))}return V(ax)}function ac(az){if(az=="string"){return Z()}return V(ak,ad)}function ak(az,aA){if(az=="{"){return Z(am(ak,"}"))}if(az=="variable"){an(aA)}return Z()}function ad(az,aA){if(aA=="from"){y.marked="keyword";return Z(aj)}}function ai(az){if(az=="for"){return V(ap)}if(az==","){return Z(am(au,"]",false))}return V(am(au,"]",false))}function ap(az){if(az=="for"){return Z(p,ap)}if(az=="if"){return Z(aj,ap)}}return{startState:function(aA){var az={tokenize:O,lastType:"sof",cc:[],lexical:new D((aA||0)-i,0,"block",false),localVars:af.localVars,context:af.localVars&&{vars:af.localVars},indented:0};if(af.globalVars){az.globalVars=af.globalVars}return az},token:function(aB,aA){if(aB.sol()){if(!aA.lexical.hasOwnProperty("align")){aA.lexical.align=false}aA.indented=aB.indentation();ao(aB,aA)}if(aA.tokenize!=aq&&aB.eatSpace()){return null}var az=aA.tokenize(aB,aA);if(M=="comment"){return az}aA.lastType=M=="operator"&&(A=="++"||A=="--")?"incdec":M;return d(aA,az,M,A,aB)},indent:function(aF,az){if(aF.tokenize==aq){return CodeMirror.Pass}if(aF.tokenize!=O){return 0}var aE=az&&az.charAt(0),aC=aF.lexical;for(var aB=aF.cc.length-1;aB>=0;--aB){var aG=aF.cc[aB];if(aG==f){aC=aC.prev}else{if(aG!=c){break}}}if(aC.type=="stat"&&aE=="}"){aC=aC.prev}if(v&&aC.type==")"&&aC.prev.type=="stat"){aC=aC.prev}var aD=aC.type,aA=aE==aD;if(aD=="vardef"){return aC.indented+(aF.lastType=="operator"||aF.lastType==","?aC.info+1:0)}else{if(aD=="form"&&aE=="{"){return aC.indented}else{if(aD=="form"){return aC.indented+i}else{if(aD=="stat"){return aC.indented+(aF.lastType=="operator"||aF.lastType==","?v||i:0)}else{if(aC.info=="switch"&&!aA&&af.doubleIndentSwitch!=false){return aC.indented+(/^(?:case|default)\b/.test(az)?i:2*i)}else{if(aC.align){return aC.column+(aA?0:1)}else{return aC.indented+(aA?0:i)}}}}}}},electricChars:":{}",blockCommentStart:u?null:"/*",blockCommentEnd:u?null:"*/",lineComment:u?null:"//",fold:"brace",helperType:u?"json":"javascript",jsonMode:u}});CodeMirror.defineMIME("text/javascript","javascript");CodeMirror.defineMIME("text/ecmascript","javascript");CodeMirror.defineMIME("application/javascript","javascript");CodeMirror.defineMIME("application/ecmascript","javascript");CodeMirror.defineMIME("application/json",{name:"javascript",json:true});CodeMirror.defineMIME("application/x-json",{name:"javascript",json:true});CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:true});CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:true});CodeMirror.defineMode("css",function(b,d){if(!d.propertyKeywords){d=CodeMirror.resolveMode("text/css")}var e=b.indentUnit||b.tabSize||2,o=d.hooks||{},n=d.atMediaTypes||{},k=d.atMediaFeatures||{},j=d.propertyKeywords||{},l=d.colorKeywords||{},h=d.valueKeywords||{},a=!!d.allowNested,i=null;function g(p,q){i=q;return p}function c(s,r){var q=s.next();if(o[q]){var p=o[q](s,r);if(p!==false){return p}}if(q=="@"){s.eatWhile(/[\w\\\-]/);return g("def",s.current())}else{if(q=="="){g(null,"compare")}else{if((q=="~"||q=="|")&&s.eat("=")){return g(null,"compare")}else{if(q=='"'||q=="'"){r.tokenize=m(q);return r.tokenize(s,r)}else{if(q=="#"){s.eatWhile(/[\w\\\-]/);return g("atom","hash")}else{if(q=="!"){s.match(/^\s*\w*/);return g("keyword","important")}else{if(/\d/.test(q)||q=="."&&s.eat(/\d/)){s.eatWhile(/[\w.%]/);return g("number","unit")}else{if(q==="-"){if(/\d/.test(s.peek())){s.eatWhile(/[\w.%]/);return g("number","unit")}else{if(s.match(/^[^-]+-/)){return g("meta","meta")}}}else{if(/[,+>*\/]/.test(q)){return g(null,"select-op")}else{if(q=="."&&s.match(/^-?[_a-z][_a-z0-9-]*/i)){return g("qualifier","qualifier")}else{if(q==":"){return g("operator",q)}else{if(/[;{}\[\]\(\)]/.test(q)){return g(null,q)}else{if(q=="u"&&s.match("rl(")){s.backUp(1);r.tokenize=f;return g("property","variable")}else{s.eatWhile(/[\w\\\-]/);return g("property","variable")}}}}}}}}}}}}}}function m(p,q){return function(u,s){var t=false,r;while((r=u.next())!=null){if(r==p&&!t){break}t=!t&&r=="\\"}if(!t){if(q){u.backUp(1)}s.tokenize=c}return g("string","string")}}function f(q,p){q.next();if(!q.match(/\s*[\"\']/,false)){p.tokenize=m(")",true)}else{p.tokenize=c}return g(null,"(")}return{startState:function(p){return{tokenize:c,baseIndent:p||0,stack:[],lastToken:null}},token:function(u,r){r.tokenize=r.tokenize||c;if(r.tokenize==c&&u.eatSpace()){return null}var q=r.tokenize(u,r);if(q&&typeof q!="string"){q=g(q[0],q[1])}var p=r.stack[r.stack.length-1];if(q=="variable"){if(i=="variable-definition"){r.stack.push("propertyValue")}return r.lastToken="variable-2"}else{if(q=="property"){var t=u.current().toLowerCase();if(p=="propertyValue"){if(h.hasOwnProperty(t)){q="string-2"}else{if(l.hasOwnProperty(t)){q="keyword"}else{q="variable-2"}}}else{if(p=="rule"){if(!j.hasOwnProperty(t)){q+=" error"}}else{if(p=="block"){if(j.hasOwnProperty(t)){q="property"}else{if(l.hasOwnProperty(t)){q="keyword"}else{if(h.hasOwnProperty(t)){q="string-2"}else{q="tag"}}}}else{if(!p||p=="@media{"){q="tag"}else{if(p=="@media"){if(n[u.current()]){q="attribute"}else{if(/^(only|not)$/.test(t)){q="keyword"}else{if(t=="and"){q="error"}else{if(k.hasOwnProperty(t)){q="error"}else{q="attribute error"}}}}}else{if(p=="@mediaType"){if(n.hasOwnProperty(t)){q="attribute"}else{if(t=="and"){q="operator"}else{if(/^(only|not)$/.test(t)){q="error"}else{q="error"}}}}else{if(p=="@mediaType("){if(j.hasOwnProperty(t)){}else{if(n.hasOwnProperty(t)){q="error"}else{if(t=="and"){q="operator"}else{if(/^(only|not)$/.test(t)){q="error"}else{q+=" error"}}}}}else{if(p=="@import"){q="tag"}else{q="error"}}}}}}}}}else{if(q=="atom"){if(!p||p=="@media{"||p=="block"){q="builtin"}else{if(p=="propertyValue"){if(!/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(u.current())){q+=" error"}}else{q="error"}}}else{if(p=="@media"&&i=="{"){q="error"}}}}if(i=="{"){if(p=="@media"||p=="@mediaType"){r.stack[r.stack.length-1]="@media{"}else{var v=a?"block":"rule";r.stack.push(v)}}else{if(i=="}"){if(p=="interpolation"){q="operator"}while(r.stack.length){var s=r.stack.pop();if(s.indexOf("{")>-1||s=="block"||s=="rule"){break}}}else{if(i=="interpolation"){r.stack.push("interpolation")}else{if(i=="@media"){r.stack.push("@media")}else{if(i=="@import"){r.stack.push("@import")}else{if(p=="@media"&&/\b(keyword|attribute)\b/.test(q)){r.stack[r.stack.length-1]="@mediaType"}else{if(p=="@mediaType"&&u.current()==","){r.stack[r.stack.length-1]="@media"}else{if(i=="("){if(p=="@media"||p=="@mediaType"){r.stack[r.stack.length-1]="@mediaType";r.stack.push("@mediaType(")}else{r.stack.push("(")}}else{if(i==")"){while(r.stack.length){var s=r.stack.pop();if(s.indexOf("(")>-1){break}}}else{if(i==":"&&r.lastToken=="property"){r.stack.push("propertyValue")}else{if(p=="propertyValue"&&i==";"){r.stack.pop()}else{if(p=="@import"&&i==";"){r.stack.pop()}}}}}}}}}}}}return r.lastToken=q},indent:function(q,p){var r=q.stack.length;if(/^\}/.test(p)){r-=q.stack[r-1]=="propertyValue"?2:1}return q.baseIndent+r*e},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});(function(){function b(k){var j={};for(var h=0;h<k.length;++h){j[k[h]]=true}return j}var e=b(["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"]);var g=b(["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"]);var d=b(["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","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-cell","grid-column","grid-column-align","grid-column-sizing","grid-column-span","grid-columns","grid-flow","grid-row","grid-row-align","grid-row-sizing","grid-row-span","grid-rows","grid-template","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","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-inside","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","word-break","word-spacing","word-wrap","z-index","zoom","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-profile","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","kerning","text-anchor","writing-mode"]);var c=b(["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","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"]);var f=b(["above","absolute","activeborder","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","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","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","contain","content","content-box","context-menu","continuous","copy","cover","crop","cross","crosshair","currentcolor","cursive","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","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","ew-resize","expanded","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","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-table","inset","inside","intrinsic","invert","italic","justify","kannada","katakana","katakana-iroha","keep-all","khmer","landscape","lao","large","larger","left","level","lighter","line-through","linear","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","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","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","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","single","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","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","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","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","x-large","x-small","xor","xx-large","xx-small"]);function a(k,j){var h=false,i;while((i=k.next())!=null){if(h&&i=="/"){j.tokenize=null;break}h=(i=="*")}return["comment","comment"]}CodeMirror.defineMIME("text/css",{atMediaTypes:e,atMediaFeatures:g,propertyKeywords:d,colorKeywords:c,valueKeywords:f,hooks:{"<":function(j,i){function h(n,m){var l=0,k;while((k=n.next())!=null){if(l>=2&&k==">"){m.tokenize=null;break}l=(k=="-")?l+1:0}return["comment","comment"]}if(j.eat("!")){i.tokenize=h;return h(j,i)}},"/":function(i,h){if(i.eat("*")){h.tokenize=a;return a(i,h)}return false}},name:"css"});CodeMirror.defineMIME("text/x-scss",{atMediaTypes:e,atMediaFeatures:g,propertyKeywords:d,colorKeywords:c,valueKeywords:f,allowNested:true,hooks:{":":function(h){if(h.match(/\s*{/)){return[null,"{"]}return false},"$":function(h){h.match(/^[\w-]+/);if(h.peek()==":"){return["variable","variable-definition"]}return["variable","variable"]},",":function(i,h){if(h.stack[h.stack.length-1]=="propertyValue"&&i.match(/^ *\$/,false)){return["operator",";"]}},"/":function(i,h){if(i.eat("/")){i.skipToEnd();return["comment","comment"]}else{if(i.eat("*")){h.tokenize=a;return a(i,h)}else{return["operator","operator"]}}},"#":function(h){if(h.eat("{")){return["operator","interpolation"]}else{h.eatWhile(/[\w\\\-]/);return["atom","hash"]}}},name:"css"})})();CodeMirror.defineMode("htmlmixed",function(b,c){var a=CodeMirror.getMode(b,{name:"xml",htmlMode:true});var m=CodeMirror.getMode(b,"css");var k=[],j=c&&c.scriptTypes;k.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:CodeMirror.getMode(b,"javascript")});if(j){for(var d=0;d<j.length;++d){var h=j[d];k.push({matches:h.matches,mode:h.mode&&CodeMirror.getMode(b,h.mode)})}}k.push({matches:/./,mode:CodeMirror.getMode(b,"text/plain")});function e(s,q){var o=q.htmlState.tagName;var p=a.token(s,q.htmlState);if(o=="script"&&/\btag\b/.test(p)&&s.current()==">"){var t=s.string.slice(Math.max(0,s.pos-100),s.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);t=t?t[1]:"";if(t&&/[\"\']/.test(t.charAt(0))){t=t.slice(1,t.length-1)}for(var n=0;n<k.length;++n){var r=k[n];if(typeof r.matches=="string"?t==r.matches:r.matches.test(t)){if(r.mode){q.token=l;q.localMode=r.mode;q.localState=r.mode.startState&&r.mode.startState(a.indent(q.htmlState,""))}break}}}else{if(o=="style"&&/\btag\b/.test(p)&&s.current()==">"){q.token=f;q.localMode=m;q.localState=m.startState(a.indent(q.htmlState,""))}}return p}function g(r,n,o){var q=r.current();var p=q.search(n),i;if(p>-1){r.backUp(q.length-p)}else{if(i=q.match(/<\/?$/)){r.backUp(q.length);if(!r.match(n,false)){r.match(q)}}}return o}function l(n,i){if(n.match(/^<\/\s*script\s*>/i,false)){i.token=e;i.localState=i.localMode=null;return e(n,i)}return g(n,/<\/\s*script\s*>/,i.localMode.token(n,i.localState))}function f(n,i){if(n.match(/^<\/\s*style\s*>/i,false)){i.token=e;i.localState=i.localMode=null;return e(n,i)}return g(n,/<\/\s*style\s*>/,m.token(n,i.localState))}return{startState:function(){var i=a.startState();return{token:e,localMode:null,localState:null,htmlState:i}},copyState:function(n){if(n.localState){var i=CodeMirror.copyState(n.localMode,n.localState)}return{token:n.token,localMode:n.localMode,localState:i,htmlState:CodeMirror.copyState(a,n.htmlState)}},token:function(n,i){return i.token(n,i)},indent:function(n,i){if(!n.localMode||/^\s*<\//.test(i)){return a.indent(n.htmlState,i)}else{if(n.localMode.indent){return n.localMode.indent(n.localState,i)}else{return CodeMirror.Pass}}},electricChars:"/{}:",innerMode:function(i){return{state:i.localState||i.htmlState,mode:i.localMode||a}}}},"xml","javascript","css");CodeMirror.defineMIME("text/html","htmlmixed");