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