Index: chrome/third_party/jstemplate/jstemplate_compiled.js |
=================================================================== |
--- chrome/third_party/jstemplate/jstemplate_compiled.js (revision 87333) |
+++ chrome/third_party/jstemplate/jstemplate_compiled.js (working copy) |
@@ -1,13 +0,0 @@ |
-(function(){function j(a,b){for(var c in b)a[c]=b[c]}function l(){return Function.prototype.call.apply(Array.prototype.slice,arguments)}function m(a,b){var c=l(arguments,2);return function(){return b.apply(a,c)}}var n=9;function o(a,b){b=new p(b);for(b.f=[a];b.f.length;){a=b.f.shift();b.g(a);for(a=a.firstChild;a;a=a.nextSibling)a.nodeType==1&&b.f.push(a)}}function p(a){this.g=a}function q(a,b,c){a.setAttribute(b,c)}function r(a,b){a.removeAttribute(b)}function s(a){a.style.display=""} |
-function t(a){a.style.display="none"};var u=":",v=/\s*;\s*/;function w(){this.i.apply(this,arguments)}w.prototype.i=function(a,b){var c=this;if(!c.a)c.a={};b?j(c.a,b.a):j(c.a,x);c.a.$this=a;c.a.$context=c;c.d=typeof a!="undefined"&&a!=null?a:"";if(!b)c.a.$top=c.d};var x={};(function(a,b){x[a]=b})("$default",null);var y=[];function z(a){for(var b in a.a)delete a.a[b];a.d=null;y.push(a)}function A(a,b,c){try{return b.call(c,a.a,a.d)}catch(e){return x.$default}} |
-function B(a,b,c,e){if(y.length>0){var d=y.pop();w.call(d,b,a);a=d}else a=new w(b,a);a.a.$index=c;a.a.$count=e;return a}var C="a_",E="b_",F="with (a_) with (b_) return ",G={};function H(a){if(!G[a])try{G[a]=new Function(C,E,F+a)}catch(b){}return G[a]}function I(a){return a}function J(a){var b=[];a=a.split(v);for(var c=0,e=a.length;c<e;++c){var d=a[c].indexOf(u);if(!(d<0)){var f;f=a[c].substr(0,d).replace(/^\s+/,"").replace(/\s+$/,"");d=H(a[c].substr(d+1));b.push(f,d)}}return b} |
-function K(a){var b=[];a=a.split(v);for(var c=0,e=a.length;c<e;++c)if(a[c]){var d=H(a[c]);b.push(d)}return b};var L="jsinstance",aa="jsts",M="*",N="div",ba="id";function ca(a,b){var c=new O;P(b);c.j=b?b.nodeType==n?b:b.ownerDocument||document:document;var e=m(c,c.e,a,b);a=c.h=[];b=c.k=[];c.c=[];e();for(var d,f,g;a.length;){d=a[a.length-1];e=b[b.length-1];if(e>=d.length){e=a.pop();e.length=0;c.c.push(e);b.pop()}else{f=d[e++];g=d[e++];d=d[e++];b[b.length-1]=e;f.call(c,g,d)}}}function O(){}var da=0,Q={};Q[0]={};var R={},S={},T=[];function P(a){a.__jstcache||o(a,function(b){U(b)})} |
-var V=[["jsselect",H],["jsdisplay",H],["jsvalues",J],["jsvars",J],["jseval",K],["transclude",I],["jscontent",H],["jsskip",H]]; |
-function U(a){if(a.__jstcache)return a.__jstcache;var b=a.getAttribute("jstcache");if(b!=null)return a.__jstcache=Q[b];b=T.length=0;for(var c=V.length;b<c;++b){var e=V[b][0],d=a.getAttribute(e);S[e]=d;d!=null&&T.push(e+"="+d)}if(T.length==0){a.setAttribute("jstcache","0");return a.__jstcache=Q[0]}var f=T.join("&");if(b=R[f]){a.setAttribute("jstcache",b);return a.__jstcache=Q[b]}var g={};b=0;for(c=V.length;b<c;++b){d=V[b];e=d[0];var i=d[1];d=S[e];if(d!=null)g[e]=i(d)}b=""+ ++da;a.setAttribute("jstcache", |
-b);Q[b]=g;R[f]=b;return a.__jstcache=g}function W(a,b){a.h.push(b);a.k.push(0)}function X(a){return a.c.length?a.c.pop():[]}O.prototype.e=function(a,b){var c=this,e=Y(c,b),d=e.transclude;if(d)if(e=Z(d)){b.parentNode.replaceChild(e,b);b=X(c);b.push(c.e,a,e);W(c,b)}else b.parentNode.removeChild(b);else(e=e.jsselect)?ea(c,a,b,e):c.b(a,b)}; |
-O.prototype.b=function(a,b){var c=this,e=Y(c,b),d=e.jsdisplay;if(d){if(!A(a,d,b)){t(b);return}s(b)}(d=e.jsvars)&&fa(c,a,b,d);(d=e.jsvalues)&&ga(c,a,b,d);if(d=e.jseval)for(var f=0,g=d.length;f<g;++f)A(a,d[f],b);if(d=e.jsskip)if(A(a,d,b))return;if(e=e.jscontent){a=""+A(a,e,b);if(b.innerHTML!=a){for(;b.firstChild;)b.firstChild.parentNode.removeChild(b.firstChild);c=c.j.createTextNode(a);b.appendChild(c)}}else{e=X(c);for(b=b.firstChild;b;b=b.nextSibling)b.nodeType==1&&e.push(c.e,a,b);e.length&&W(c,e)}}; |
-function ea(a,b,c,e){e=A(b,e,c);var d=c.getAttribute(L),f=false;if(d)if(d.charAt(0)==M){var g=d.substr(1);d=parseInt(g,10);f=true}else d=parseInt(d,10);var i=e!=null&&typeof e=="object"&&typeof e.length=="number";g=i?e.length:1;var h=i&&g==0;if(i)if(h)if(d)c.parentNode.removeChild(c);else{c.setAttribute(L,"*0");t(c)}else{s(c);if(d===null||d===""||f&&d<g-1){f=X(a);d=d||0;for(i=g-1;d<i;++d){var k=c.cloneNode(true);c.parentNode.insertBefore(k,c);$(k,e,d);h=B(b,e[d],d,g);f.push(a.b,h,k,z,h,null)}$(c, |
-e,d);h=B(b,e[d],d,g);f.push(a.b,h,c,z,h,null);W(a,f)}else if(d<g){f=e[d];$(c,e,d);h=B(b,f,d,g);f=X(a);f.push(a.b,h,c,z,h,null);W(a,f)}else c.parentNode.removeChild(c)}else if(e==null)t(c);else{s(c);h=B(b,e,0,1);f=X(a);f.push(a.b,h,c,z,h,null);W(a,f)}}function fa(a,b,c,e){a=0;for(var d=e.length;a<d;a+=2){var f=e[a],g=A(b,e[a+1],c);b.a[f]=g}} |
-function ga(a,b,c,e){a=0;for(var d=e.length;a<d;a+=2){var f=e[a],g=A(b,e[a+1],c);if(f.charAt(0)=="$")b.a[f]=g;else if(f.charAt(0)=="."){f=f.substr(1).split(".");for(var i=c,h=f.length,k=0,ha=h-1;k<ha;++k){var D=f[k];i[D]||(i[D]={});i=i[D]}i[f[h-1]]=g}else if(f)if(typeof g=="boolean")g?q(c,f,f):r(c,f);else c.setAttribute(f,""+g)}}function Y(a,b){if(b.__jstcache)return b.__jstcache;if(a=b.getAttribute("jstcache"))return b.__jstcache=Q[a];return U(b)} |
-function Z(a,b){var c=document;if(a=b?ia(c,a,b):c.getElementById(a)){P(a);a=a.cloneNode(true);a.removeAttribute(ba);return a}else return null}function ia(a,b,c,e){var d=a.getElementById(b);if(d)return d;c=c();e=e||aa;if(d=a.getElementById(e))d=d;else{d=a.createElement(N);d.id=e;t(d);d.style.position="absolute";a.body.appendChild(d)}e=a.createElement(N);d.appendChild(e);e.innerHTML=c;return d=a.getElementById(b)}function $(a,b,c){c==b.length-1?q(a,L,M+c):q(a,L,""+c)};window.jstGetTemplate=Z;window.JsEvalContext=w;window.jstProcess=ca; |
-})() |