1(function(a){if(typeof exports=="object"&&typeof module=="object")a(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],a);else a(CodeMirror)})(function(a){"use strict";var b={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function c(a,b,c){var d=a.current(),e=d.search(b);if(e>-1){a.backUp(d.length-e)}else if(d.match(/<\/?$/)){a.backUp(d.length);if(!a.match(b,false))a.match(d)}return c}var d={};function e(a){var b=d[a];if(b)return b;return d[a]=new RegExp("\\s+"+a+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function f(a,b){var c=a.match(e(b));return c?/^\s*(.*?)\s*$/.exec(c[2])[1]:""}function g(a,b){return new RegExp((b?"^":"")+"</s*"+a+"s*>","i")}function h(a,b){for(var c in a){var d=b[c]||(b[c]=[]);var e=a[c];for(var f=e.length-1;f>=0;f--)d.unshift(e[f])}}function i(a,b){for(var c=0;c<a.length;c++){var d=a[c];if(!d[0]||d[1].test(f(b,d[0])))return d[2]}}a.defineMode("htmlmixed",function(d,e){var f=a.getMode(d,{name:"xml",htmlMode:true,multilineTagIndentFactor:e.multilineTagIndentFactor,multilineTagIndentPastTag:e.multilineTagIndentPastTag});var j={};var k=e&&e.tags,l=e&&e.scriptTypes;h(b,j);if(k)h(k,j);if(l)for(var m=l.length-1;m>=0;m--)j.script.unshift(["type",l[m].matches,l[m].mode]);function n(b,e){var h=f.token(b,e.htmlState),k=/\btag\b/.test(h),l;if(k&&!/[<>\s\/]/.test(b.current())&&(l=e.htmlState.tagName&&e.htmlState.tagName.toLowerCase())&&j.hasOwnProperty(l)){e.inTag=l+" "}else if(e.inTag&&k&&/>$/.test(b.current())){var m=/^([\S]+) (.*)/.exec(e.inTag);e.inTag=null;var o=b.current()==">"&&i(j[m[1]],m[2]);var p=a.getMode(d,o);var q=g(m[1],true),r=g(m[1],false);e.token=function(a,b){if(a.match(q,false)){b.token=n;b.localState=b.localMode=null;return null}return c(a,r,b.localMode.token(a,b.localState))};e.localMode=p;e.localState=a.startState(p,f.indent(e.htmlState,"",""))}else if(e.inTag){e.inTag+=b.current();if(b.eol())e.inTag+=" "}return h}return{startState:function(){var b=a.startState(f);return{token:n,inTag:null,localMode:null,localState:null,htmlState:b}},copyState:function(b){var c;if(b.localState){c=a.copyState(b.localMode,b.localState)}return{token:b.token,inTag:b.inTag,localMode:b.localMode,localState:c,htmlState:a.copyState(f,b.htmlState)}},token:function(a,b){return b.token(a,b)},indent:function(b,c,d){if(!b.localMode||/^\s*<\//.test(c))return f.indent(b.htmlState,c,d);else if(b.localMode.indent)return b.localMode.indent(b.localState,c,d);else return a.Pass},innerMode:function(a){return{state:a.localState||a.htmlState,mode:a.localMode||f}}}},"xml","javascript","css");a.defineMIME("text/html","htmlmixed")});
2//# sourceMappingURL=htmlmixed.min.js.map