/* content from:
 * http://github.com/jezdez/django-dbtemplates/raw/master/dbtemplates/static/dbtemplates/js/parsedjango.js
 * closure compiled 2011-05-17 */
var XMLParser=Editor.Parser=function(){var o={autoSelfClosers:{br:!0,img:!0,hr:!0,link:!0,input:!0,meta:!0,col:!0,frame:!0,base:!0,area:!0},doNotIndent:{pre:!0,"!cdata":!0}},s={autoSelfClosers:{},doNotIndent:{"!cdata":!0}},k=o,u=!1,v=function(){function g(a,c){var b=a.next();if(b=="{"&&a.equals("{"))return c(i("}}",!1)),"django";if(b=="{"&&a.equals("%"))return c(i("%}",!0)),"django";else if(b=="<")return a.equals("!")?(a.next(),a.equals("[")?a.lookAhead("[CDATA[",!0)?(c(h("xml-cdata","]]\>")),null):
"xml-text":a.lookAhead("--",!0)?(c(h("xml-comment","--\>")),null):"xml-text"):a.equals("?")?(a.next(),a.nextWhileMatches(/[\w\._\-]/),c(h("xml-processing","?>")),"xml-processing"):(a.equals("/")&&a.next(),c(l),"xml-punctuation");else if(b=="&"){for(;!a.endOfLine();)if(a.next()==";")break;return"xml-entity"}else return a.nextWhileMatches(/[^&<\n{]/),"xml-text"}function l(a,c){var b=a.next();return b==">"?(c(g),"xml-punctuation"):/[?\/]/.test(b)&&a.equals(">")?(a.next(),c(g),"xml-punctuation"):b=="="?
"xml-punctuation":/[\'\"]/.test(b)?(c(d(b)),null):(a.nextWhileMatches(/[^\s\u00a0=<>\"\'\/?]/),"xml-name")}function d(a){return function(c,b){for(;!c.endOfLine();)if(c.next()==a){b(l);break}return"xml-attribute"}}function h(a,c){return function(b,d){for(;!b.endOfLine();){if(b.lookAhead(c,!0)){d(g);break}b.next()}return a}}function j(a,c){return function(b,d){for(b.next();!b.endOfLine();)if(b.next()==a){d(i(c,!1));break}return"django-quote"}}function k(a){return function(c,b){for(;!c.endOfLine();){if(c.equals(" ")){b(i(a,
!1));break}c.next()}return"django-tag-name"}}function i(a,c){return function(b,d){for(c&&b.next();!b.endOfLine();)if(ch=b.next(),c&&!b.equals(" ")){d(k(a));break}else if(ch=="'"||b.equals("'"))return d(j("'",a)),"django-quote";else if(ch=='"'||b.equals('"'))return d(j('"',a)),"django-quote";else if(ch==a[0]&&b.equals(a[1])){b.next();d(g);break}return"django"}}return function(a,c){return tokenizer(a,c||g)}}();return{make:function(g){function l(a){for(var b=a.length-1;b>=0;b--)p.push(a[b])}function d(){l(arguments);
q=!0}function h(){l(arguments);q=!1}function j(){e.style+=" xml-error"}function o(a){return function(b,c){c==a?d():(j(),d(arguments.callee))}}function i(a,b){var c=k.doNotIndent.hasOwnProperty(a)||f&&f.noIndent;f={prev:f,name:a,indent:m,startOfLine:b,noIndent:c}}function a(a){return function(b,c){var d=a;if(d&&d.noIndent)return c;if(u&&/<!\[CDATA\[/.test(b))return 0;if(d&&/^<\//.test(b))d=d.prev;for(;d&&!d.startOfLine;)d=d.prev;return d?d.indent+indentUnit:0}}function c(){return h(b,c)}function b(a,
b){if(b=="<")d(s,w,x(n==1));else if(b=="</")d(z,o(">"));else{if(a=="xml-cdata"){if((!f||f.name!="!cdata")&&i("!cdata"),/\]\]>$/.test(b))f=f.prev}else A.hasOwnProperty(a)||j();d()}}function s(a,b){a=="xml-name"?(r=b.toLowerCase(),e.style="xml-tagname",d()):(r=null,h())}function z(a,b){if(a=="xml-name")e.style="xml-tagname",f&&b.toLowerCase()==f.name?f=f.prev:j();d()}function x(a){return function(b,c){c=="/>"||c==">"&&k.autoSelfClosers.hasOwnProperty(r)?d():c==">"?(i(r,a),d()):(j(),d(arguments.callee))}}
function w(a){a=="xml-name"?(e.style="xml-attname",d(B,w)):h()}function B(a,b){b=="="?d(y):b==">"||b=="/>"?h(x):h()}function y(a){a=="xml-attribute"?d(y):h()}var t=v(g),e,p=[c],n=0,m=0,r=null,f=null,q,A={"xml-text":!0,"xml-entity":!0,"xml-comment":!0,"xml-processing":!0,django:!0,"django-quote":!0,"django-tag-name":!0};return{indentation:function(){return m},next:function(){e=t.next();e.style=="whitespace"&&n==0?m=e.value.length:n++;if(e.content=="\n")m=n=0,e.indentation=a(f);if(e.style=="whitespace"||
e.type=="xml-comment")return e;for(;;)if(q=!1,p.pop()(e.style,e.content),q)return e},copy:function(){var a=p.concat([]),b=t.state,c=f,d=this;return function(e){p=a.concat([]);n=m=0;f=c;t=v(e,b);return d}}}},electricChars:"/",configure:function(g){g.useHTMLKludges!=null&&(k=g.useHTMLKludges?o:s);if(g.alignCDATA)u=g.alignCDATA}}}();