1(function(a){if(typeof exports=="object"&&typeof module=="object")a(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],a);else a(CodeMirror)})(function(a){"use strict";var b={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,menuitem: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,caseFold:true};var c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,allowMissingTagName:false,caseFold:false};a.defineMode("xml",function(d,e){var f=d.indentUnit;var g={};var h=e.htmlMode?b:c;for(var i in h)g[i]=h[i];for(var i in e)g[i]=e[i];var j,k;function l(a,b){function c(c){b.tokenize=c;return c(a,b)}var d=a.next();if(d=="<"){if(a.eat("!")){if(a.eat("[")){if(a.match("CDATA["))return c(o("atom","]]>"));else return null}else if(a.match("--")){return c(o("comment","--\x3e"))}else if(a.match("DOCTYPE",true,true)){a.eatWhile(/[\w\._\-]/);return c(p(1))}else{return null}}else if(a.eat("?")){a.eatWhile(/[\w\._\-]/);b.tokenize=o("meta","?>");return"meta"}else{j=a.eat("/")?"closeTag":"openTag";b.tokenize=m;return"tag bracket"}}else if(d=="&"){var e;if(a.eat("#")){if(a.eat("x")){e=a.eatWhile(/[a-fA-F\d]/)&&a.eat(";")}else{e=a.eatWhile(/[\d]/)&&a.eat(";")}}else{e=a.eatWhile(/[\w\.\-:]/)&&a.eat(";")}return e?"atom":"error"}else{a.eatWhile(/[^&<]/);return null}}l.isInText=true;function m(a,b){var c=a.next();if(c==">"||c=="/"&&a.eat(">")){b.tokenize=l;j=c==">"?"endTag":"selfcloseTag";return"tag bracket"}else if(c=="="){j="equals";return null}else if(c=="<"){b.tokenize=l;b.state=t;b.tagName=b.tagStart=null;var d=b.tokenize(a,b);return d?d+" tag error":"tag error"}else if(/[\'\"]/.test(c)){b.tokenize=n(c);b.stringStartCol=a.column();return b.tokenize(a,b)}else{a.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}}function n(a){var b=function(b,c){while(!b.eol()){if(b.next()==a){c.tokenize=m;break}}return"string"};b.isInAttribute=true;return b}function o(a,b){return function(c,d){while(!c.eol()){if(c.match(b)){d.tokenize=l;break}c.next()}return a}}function p(a){return function(b,c){var d;while((d=b.next())!=null){if(d=="<"){c.tokenize=p(a+1);return c.tokenize(b,c)}else if(d==">"){if(a==1){c.tokenize=l;break}else{c.tokenize=p(a-1);return c.tokenize(b,c)}}}return"meta"}}function q(a,b,c){this.prev=a.context;this.tagName=b;this.indent=a.indented;this.startOfLine=c;if(g.doNotIndent.hasOwnProperty(b)||a.context&&a.context.noIndent)this.noIndent=true}function r(a){if(a.context)a.context=a.context.prev}function s(a,b){var c;while(true){if(!a.context){return}c=a.context.tagName;if(!g.contextGrabbers.hasOwnProperty(c)||!g.contextGrabbers[c].hasOwnProperty(b)){return}r(a)}}function t(a,b,c){if(a=="openTag"){c.tagStart=b.column();return u}else if(a=="closeTag"){return v}else{return t}}function u(a,b,c){if(a=="word"){c.tagName=b.current();k="tag";return y}else if(g.allowMissingTagName&&a=="endTag"){k="tag bracket";return y(a,b,c)}else{k="error";return u}}function v(a,b,c){if(a=="word"){var d=b.current();if(c.context&&c.context.tagName!=d&&g.implicitlyClosed.hasOwnProperty(c.context.tagName))r(c);if(c.context&&c.context.tagName==d||g.matchClosing===false){k="tag";return w}else{k="tag error";return x}}else if(g.allowMissingTagName&&a=="endTag"){k="tag bracket";return w(a,b,c)}else{k="error";return x}}function w(a,b,c){if(a!="endTag"){k="error";return w}r(c);return t}function x(a,b,c){k="error";return w(a,b,c)}function y(a,b,c){if(a=="word"){k="attribute";return z}else if(a=="endTag"||a=="selfcloseTag"){var d=c.tagName,e=c.tagStart;c.tagName=c.tagStart=null;if(a=="selfcloseTag"||g.autoSelfClosers.hasOwnProperty(d)){s(c,d)}else{s(c,d);c.context=new q(c,d,e==c.indented)}return t}k="error";return y}function z(a,b,c){if(a=="equals")return A;if(!g.allowMissing)k="error";return y(a,b,c)}function A(a,b,c){if(a=="string")return B;if(a=="word"&&g.allowUnquoted){k="string";return y}k="error";return y(a,b,c)}function B(a,b,c){if(a=="string")return B;return y(a,b,c)}return{startState:function(a){var b={tokenize:l,state:t,indented:a||0,tagName:null,tagStart:null,context:null};if(a!=null)b.baseIndent=a;return b},token:function(a,b){if(!b.tagName&&a.sol())b.indented=a.indentation();if(a.eatSpace())return null;j=null;var c=b.tokenize(a,b);if((c||j)&&c!="comment"){k=null;b.state=b.state(j||c,a,b);if(k)c=k=="error"?c+" error":k}return c},indent:function(b,c,d){var e=b.context;if(b.tokenize.isInAttribute){if(b.tagStart==b.indented)return b.stringStartCol+1;else return b.indented+f}if(e&&e.noIndent)return a.Pass;if(b.tokenize!=m&&b.tokenize!=l)return d?d.match(/^(\s*)/)[0].length:0;if(b.tagName){if(g.multilineTagIndentPastTag!==false)return b.tagStart+b.tagName.length+2;else return b.tagStart+f*(g.multilineTagIndentFactor||1)}if(g.alignCDATA&&/<!\[CDATA\[/.test(c))return 0;var h=c&&/^<(\/)?([\w_:\.-]*)/.exec(c);if(h&&h[1]){while(e){if(e.tagName==h[2]){e=e.prev;break}else if(g.implicitlyClosed.hasOwnProperty(e.tagName)){e=e.prev}else{break}}}else if(h){while(e){var i=g.contextGrabbers[e.tagName];if(i&&i.hasOwnProperty(h[2]))e=e.prev;else break}}while(e&&e.prev&&!e.startOfLine)e=e.prev;if(e)return e.indent+f;else return b.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:g.htmlMode?"html":"xml",helperType:g.htmlMode?"html":"xml",skipAttribute:function(a){if(a.state==A)a.state=y},xmlCurrentTag:function(a){return a.tagName?{name:a.tagName,close:a.type=="closeTag"}:null},xmlCurrentContext:function(a){var b=[];for(var c=a.context;c;c=c.prev)if(c.tagName)b.push(c.tagName);return b.reverse()}}});a.defineMIME("text/xml","xml");a.defineMIME("application/xml","xml");if(!a.mimeModes.hasOwnProperty("text/html"))a.defineMIME("text/html",{name:"xml",htmlMode:true})}); 2//# sourceMappingURL=xml.min.js.map