From c239f200938fb1b4ff758a43726741e0def08996 Mon Sep 17 00:00:00 2001 From: Nikos M Date: Sat, 2 Feb 2019 13:57:25 +0200 Subject: [PATCH] v.1.2.0 contd * JS/PY: empty function now behaves exactly like PHP's function ie true also for string with value "0" --- changelog.md | 1 + src/js/Contemplate.js | 3 ++- src/js/Contemplate.min.js | 2 +- src/python/Contemplate.py | 3 ++- tests/js/Contemplate.min.js | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index 37e7d02..f928506 100644 --- a/changelog.md +++ b/changelog.md @@ -6,6 +6,7 @@ __1.2.0__ * add new template function `striptags` to strip `html tags` from string * add custom `pluralForm` callable (per context) for current locale. It specifies whether a `singular` or `plural` string is to be used based on numeric value given (eg a-la wordpress) (see manual how to set or clear) * `locale`/`xlocale` methods slightly changed signature and can accept an optional `array`/`list` of arguments which will be used to format the string to be localised a-la `sprintf` functionality (done automaticaly) (NOTE: limited `sprintf` support for python implementation) +* JS/PY: `empty` function behaves now exactly like PHP's function, ie it returns `true` also for string with value `"0"` __1.1.10__ diff --git a/src/js/Contemplate.js b/src/js/Contemplate.js index 226ceba..ae3edc1 100644 --- a/src/js/Contemplate.js +++ b/src/js/Contemplate.js @@ -2879,7 +2879,8 @@ function RE( r, f ) } function empty( o ) { - if ( !o || !Boolean(o) ) return true; + // exactly like php's empty function + if ( !o || !Boolean(o) || "0"===o ) return true; var to_string = toString.call(o); if ( (o instanceof Array || o instanceof String || '[object Array]' === to_string || '[object String]' === to_string) && !o.length ) return true; if ( (o instanceof Object || '[object Object]' === to_string) && !Keys(o).length ) return true; diff --git a/src/js/Contemplate.min.js b/src/js/Contemplate.min.js index 71acf7b..47d5d6e 100644 --- a/src/js/Contemplate.min.js +++ b/src/js/Contemplate.min.js @@ -9,4 +9,4 @@ * http://ejohn.org/blog/javascript-micro-templating/ * **/ -!function(e,t,n){"use strict";"undefined"!=typeof Components&&"object"==typeof Components.classes&&"object"==typeof Components.classesByID&&Components.utils&&"function"==typeof Components.utils.import?(e.$deps=e.$deps||{})&&(e.EXPORTED_SYMBOLS=[t])&&(e[t]=e.$deps[t]=n.call(e)):"object"==typeof module&&module.exports?(module.$deps=module.$deps||{})&&(module.exports=module.$deps[t]=n.call(e)):"undefined"!=typeof System&&"function"==typeof System.register&&"function"==typeof System.import?System.register(t,[],function(r){r(t,n.call(e))}):"function"==typeof define&&define.amd&&"function"==typeof require&&"function"==typeof require.specified&&require.specified(t)?define(t,["module"],function(t){return n.moduleUri=t.uri,n.call(e)}):t in e||(e[t]=n.call(e)||1)&&"function"==typeof define&&define.amd&&define(function(){return e[t]})}(this,"Contemplate",function(e){"use strict";function t(){Ie=0,Le=0,Fe=0,Ne=2,Te=0,Be=[],Re={},Ue=[[null,-1]],Ke=null,G={},(z={})[J="_"]=z[J]||{},G[J]=G[J]||{}}function n(){Ie=0,Le=0,Fe=0,Ne=2,Te=0,Be=null,Re=null,Ue=null,z=null,G=null,J=null,we=0,Ye=null}function r(){return[Ie,Le,Fe,Ne,Te,Be,Re,Ue,Ke,z,G,J]}function l(e){Ie=e[0],Le=e[1],Fe=e[2],Ne=e[3],Te=e[4],Be=e[5],Re=e[6],Ue=e[7],Ke=e[8],z=e[9],G=e[10],J=e[11]}function a(e,t){2>arguments.length&&(t=Te);var n,r,l,a="",o=e.length;if(o&&01&&"false"===I(e[1]));e=I(e[0]),Ye&&ce.call(Ye,e)&&(e=Ye[e]);var n=e.charAt(0);return'"'!==n&&"'"!==n||n!==e.charAt(e.length-1)||(e=e.slice(1,-1)),Be.push([e,-1,-1,0,Ue[0][1],t]),Re[e]=Re[e]?Re[e]+1:1,He=Be.length,Ue.unshift([e,He-1]),Pe=e,$e=null,J=e,z[J]=z[J]||{},G[J]=G[J]||{},"' + #BLOCK_"+e+"#"}function d(){if(10;)"("===(C=E.charAt(y++))?T++:")"===C&&T--,T>0&&(j+=C);E=E.slice(j.length+1)}if(j=I(j),ce.call(at,D)&&(D=at[D]),-1<(x=lt.indexOf(D))){switch(x){case 0:case 20:O=I((j=i(j=j.replace(rt,h),",")).shift()),v=I(j.join(",")),20!==x||s(O)||(u(O),O="var "+O),k="';"+Ee+a(O+" = ("+v+");")+Ee;break;case 1:(O=j=j.replace(rt,h))&&O.length?(O=I(O),k="';"+Ee+a('if ("undefined" !== typeof('+O+")) delete "+O+";")+Ee):k="';"+Ee;break;case 2:k='("undefined" !== typeof('+(O=j=j.replace(rt,h))+") && null !== "+O+")";break;case 3:k="';"+a(["","if ("+(j=j.replace(rt,h))+")","{",""].join(Ee)),Le++,Te++;break;case 4:j=j.replace(rt,h),Te--,k="';"+a(["","}","else if ("+j+")","{",""].join(Ee)),Te++;break;case 5:Te--,k="';"+a(["","}","else","{",""].join(Ee)),Te++;break;case 6:Le--,Te--,k="';"+a(["","}",""].join(Ee));break;case 7:var M,w,L,F=j=j.replace(rt,h),N=F.indexOf(" as "),B=F.indexOf(" in ");if(-1")),L.length>=2){var R=I(L[0]),U=I(L[1]),P="_loc_"+ ++we,$="_loc_"+ ++we,H="_loc_"+ ++we;u(R),u(U),k="';"+a(["","var "+w+" = "+M+", "+P+" = "+w+" ? Object.keys("+w+") : null,"," "+$+", "+R+", "+U+", "+H+" = "+w+" ? "+P+".length : 0;","if ("+H+")","{"," for ("+$+"=0; "+$+"<"+H+"; "+$+"++)"," {"," "+R+" = "+P+"["+$+"]; "+U+" = "+w+"["+R+"];"," ",""].join(Ee)),Ne=2,Te+=2}else{var U=I(L[0]),K="_loc_"+ ++we,Y="_loc_"+ ++we,$="_loc_"+ ++we,q="_loc_"+ ++we,H="_loc_"+ ++we;u(U),k="';"+a(["","var "+w+" = "+M+", "+Y+" = !!"+w+".forEach,"," "+K+" = "+w+" ? ("+Y+" ? "+w+" : Object.keys("+w+")) : null,"," "+$+", "+q+", "+U+", "+H+" = "+K+" ? "+K+".length : 0;","if ("+H+")","{"," for ("+$+"=0; "+$+"<"+H+"; "+$+"++)"," {"," "+q+" = "+K+"["+$+"];"," "+U+" = "+Y+" ? "+q+" : "+w+"["+q+"];"," ",""].join(Ee)),Ne=1,Te+=2}Ie++,Fe++;break;case 8:Fe--,Te+=-2,k="';"+a([""," }","}","else","{ ",""].join(Ee)),Te+=1;break;case 9:Fe===Ie?(Ie--,Fe--,Te+=-2,k="';"+a([""," }","}",""].join(Ee))):(Ie--,Te+=-1,k="';"+a(["","}",""].join(Ee)));break;case 10:var z=I(j);Ye&&ce.call(Ye,z)&&(z=Ye[z]),'"'!==(C=z.charAt(0))&&"'"!==C||C!==z.charAt(z.length-1)||(z=z.slice(1,-1)),Ke=z,k="';"+Ee;break;case 11:k=p(j);break;case 12:k=d();break;case 13:k=f(j);break;case 14:k=A+"self.sprblock("+(j=j.replace(rt,h))+", data)";break;case 15:k=A+"__i__.block("+(j=j.replace(rt,h))+", data)";break;case 16:k=A+"(("+(j=i(j.replace(rt,h),","))[0]+")?("+j[1]+"):("+j[2]+"))";break;case 17:k=A+'(("undefined" === typeof('+(j=j.replace(rt,h))+")) || (null === "+j+") || Contemplate.empty("+j+"))";break;case 18:case 19:k="';"+Ee+a(18===x?"continue;":"break;")+Ee}return k+E.replace(rt,h)}if(ce.call(V.plugins,D)||ce.call(Z.plugins,D)){var G=V.plugins[D]||Z.plugins[D];return j=j.replace(rt,h),k=G instanceof X.InlineTemplate?G.render([j].concat(i(j,","))):'Contemplate.plg_("'+D+'"'+(j.length?","+j:"")+")",A+k+E.replace(rt,h)}if(ce.call(ct,D)&&(D=ct[D]),-1<(x=ot.indexOf(D))){switch(j=j.replace(rt,h),x){case 0:case 5:k="String("+j+")";break;case 1:k="parseInt("+j+")";break;case 2:k="parseFloat("+j+")";break;case 3:k='"\'"+('+j+')+"\'"';break;case 4:k="'\"'+("+j+")+'\"'";break;case 6:k="Contemplate.time()";break;case 7:k="Contemplate.count("+j+")";break;case 8:k="("+j+").toLowerCase()";break;case 9:k="("+j+").toUpperCase()";break;case 10:k="Contemplate.ucfirst("+j+")";break;case 11:k="Contemplate.lcfirst("+j+")";break;case 12:k="Contemplate.sprintf("+j+")";break;case 21:k="String("+i(j,",").join(")+String(")+")";break;case 27:k=(j=i(j,",")).length>1?"(("+j[1]+")?'[object Array]'===Object.prototype.toString.call("+j[0]+"):'[object Array]'===Object.prototype.toString.call("+j[0]+")||'[object Object]'===Object.prototype.toString.call("+j[0]+"))":"('[object Array]'===Object.prototype.toString.call("+j[0]+")||'[object Object]'===Object.prototype.toString.call("+j[0]+"))";break;case 28:k="(-1<("+(j=i(j,","))[1]+").indexOf("+j[0]+"))";break;case 29:k="JSON.stringify("+j+")";break;case 30:k="JSON.parse("+j+")";break;default:k="Contemplate."+D+"("+j+")"}return A+k+E.replace(rt,h)}return A+D+(S?"("+j.replace(rt,h)+")":"")+E.replace(rt,h)}function g(e){for(var t,n,r,l,a,o,c,i,u,s,f=[],p=Be.length;p--;)t=(n=Be[p])[0],c=n[1],i=n[2],u=n[3],s=n[4],r="#BLOCK_"+t+"#",l=n[5]?"__i__.block('"+t+"', data);":"'';",a=r.length,o=l.length,-10))break;p--,u+=d+e.charAt(t++),s+=A+2,A=0}for(;t0))break;p--,u+=e.charAt(t++),s+=A+1,A=0}}for(;t0&&(T+=" ",P=0),M=_(m,j,S)){for(w=0,p=M.length;wF){for(P>0&&(T+=" ",P=0),B=N=k,R=!1,U=j;UF)P++;else{if(P>0&&(T+=" ",P=0),N=k,q||j>=S||!Qe.test(k=m.charAt(j))){T+=N;continue}for(j++,M=k;j0&&(T+=" ",P=0),M=k;j0&&(T+=" ",P=0),T+=k;if(b="\t"+T+"\v",Pe=null,$e=null,He=-1,Ye=C,b=b.replace(rt,h),Pe?(Pe="#BLOCK_"+Pe+"#",H=!0):$e&&($e="#/BLOCK_"+$e+"#",H=!0),K=H,9===b.charCodeAt(0)&&11===b.charCodeAt(b.length-1)&&(b="' + ("+I(b.slice(1,-1))+") + '"),O)for(w=x.length-1;w>=0;w--)D=x[w][0],A=x[w][1],b=b.split(D+"__RAW__").join(A).split(D).join((ce.call(z[J],A)?"_loc_"+A:x[w][2])+x[w][3]);if(v)for(y=Y(b,it),b="",w=0,p=y.length;w0?g(d):[d,[]]:d}function b(e,t,n){var r,l;return!fe&&!se||-1===e.indexOf("/")&&-1===e.indexOf("\\")?(r=e,l=""):(r=L(e),(l=I(F(e),"/\\")).length&&(l+="/")),n+l+r.replace(Xe,"_")+"_tpl__"+t.replace(Xe,"_")+".js"}function y(e,t){return"Contemplate_"+(!fe&&!se||-1===e.indexOf("/")&&-1===e.indexOf("\\")?e:L(e)).replace(Xe,"_")+"__"+t.replace(Xe,"_")}function C(e,t,n){var r=t.templates[e]||Z.templates[e]||null;return r?r[1]?xe&&n?(n(r[0]),""):r[0]:fe||se?xe&&n?(Mt(r[0],t.encoding,function(e,t){n(e?"":t)}),""):Tt(r[0],t.encoding):"#"===r[0].charAt(0)?xe&&n?(n(window.document.getElementById(r[0].slice(1)).innerHTML||""),""):window.document.getElementById(r[0].slice(1)).innerHTML||"":xe&&n?(Mt(r[0],t.encoding,function(e,t){n(e?"":t)}),""):Tt(r[0],t.encoding):""}function x(e,r,l){var a,o,i,u,s,f={};for(t(),a=m(c(C(e,r),l),Oe,ve),n(),s=a[0],i=(a=a[1]).length,u=ne.render({FCODE:Ke?"__p__ = '';":"__p__ = '"+s+"';"}),o=0;o0?new Array(l+1).join(n||" ")+r:r}function B(e){return encodeURIComponent(""+e).replace(_t,"%21").replace(mt,"%27").replace(bt,"%28").replace(yt,"%29").replace(Ct,"%2A").replace(xt,"+")}function R(){return dt((new Date).getTime()/1e3)}function U(e,t){var n,r,l,a,o,c,i=ut,u={},s=(o=t instanceof Date?new Date(t):"number"==typeof t?new Date(1e3*t):new Date).getTimezoneOffset(),f=gt(s),p=o.getMonth();for(u.G=o.getHours(),u.j=o.getDate(),c=u.j%10,u.n=p+1,u.Y=o.getFullYear(),u.w=o.getDay(),u.N=u.w||7,u.d=N(u.j,2,"0"),u.D=i.day_short[u.w],u.l=i.day[u.w],u.S=i.ordinal.ord[u.j]?i.ordinal.ord[u.j]:i.ordinal.ord[c]?i.ordinal.ord[c]:i.ordinal.nth,u.z=ht((new Date(u.Y,p,u.j)-new Date(u.Y,0,1))/864e5),u.W=N(1+ht((new Date(u.Y,p,u.j-u.N+3)-new Date(u.Y,0,4))/864e5/7),2,"0"),u.F=i.month[p],u.m=N(u.n,2,"0"),u.M=i.month_short[p],u.t=new Date(u.Y,p+1,0).getDate(),u.L=u.Y%4==0&u.Y%100!=0|u.Y%400==0,u.o=u.Y+(11===p&&u.W<9?1:0===p&&u.W>9?-1:0),u.y=u.Y.toString().slice(-2),u.a=u.G>11?i.meridian.pm:i.meridian.am,u.A=u.G>11?i.meridian.PM:i.meridian.AM,u.B=N(dt((3600*o.getUTCHours()+60*o.getUTCMinutes()+o.getUTCSeconds()+3600)/86.4)%1e3,3,"0"),u.g=u.G%12||12,u.h=N(u.g,2,"0"),u.H=N(u.G,2,"0"),u.i=N(o.getMinutes(),2,"0"),u.s=N(o.getSeconds(),2,"0"),u.u=N(1e3*o.getMilliseconds(),6,"0"),u.e="",u.I=new Date(u.Y,0)-Date.UTC(u.Y,0)!=new Date(u.Y,6)-Date.UTC(u.Y,6)?1:0,u.O=(s>0?"-":"+")+N(100*dt(f/60)+f%60,4,"0"),u.P=u.O.substr(0,3)+":"+u.O.substr(3,2),u.T="UTC",u.Z=60*-s,u.U=o/1e3|0,u.c=u.Y+"-"+u.m+"-"+u.d+"\\"+u.T+u.H+":"+u.i+":"+u.s+u.P,u.r=u.D+", "+u.d+" "+u.M+" "+u.Y+" "+u.H+":"+u.i+":"+u.s+" "+u.O,n="",l=0,a=e.length;l0&&(o=n||!l?$(o,r,a,n):o.slice(0,t.length)+$("",c,"0",!0)+o.slice(t.length)),o}function K(e,t,n,r,l,a,o){var c=e>>>0;return n=n&&c&&{2:"0b",8:"0",16:"0x"}[t]||"",e=n+$(c.toString(t),a||0,"0",!1),H(e,n,r,l,o)}function Y(e,t,n,r,l,a){return null!=r&&(e=e.slice(0,r)),H(e,"",t,n,l,a)}function q(){var e=1,t=arguments;return arguments[0].replace(q.format_re,function(n,r,l,a,o,c,i){var u,s,f,p,d;if("%%"==n)return"%";var h,g=!1,_="",m=!1,b=!1,y=" ",C=l.length;for(h=0;l&&h(a=a?"*"==a?+t[e++]:"*"==a.charAt(0)?+t[a.slice(1,-1)]:+a:0)&&(a=-a,g=!0),!isFinite(a))throw new Error("sprintf: (minimum-)width must be finite");switch(c=c?"*"==c?+t[e++]:"*"==c.charAt(0)?+t[c.slice(1,-1)]:+c:"fFeE".indexOf(i)>-1?6:"d"==i?0:void 0,d=r?t[r.slice(0,-1)]:t[e++],i){case"s":return Y(String(d),g,a,c,m,y);case"c":return Y(String.fromCharCode(+d),g,a,c,m);case"b":return K(d,2,b,g,a,c,m);case"o":return K(d,8,b,g,a,c,m);case"x":return K(d,16,b,g,a,c,m);case"X":return K(d,16,b,g,a,c,m).toUpperCase();case"u":return K(d,10,b,g,a,c,m);case"i":case"d":return u=+d||0,u=Math.round(u-u%1),s=u<0?"-":_,d=s+$(String(Math.abs(u)),c,"0",!1),H(d,s,g,a,m);case"e":case"E":case"f":case"F":case"g":case"G":return u=+d,s=u<0?"-":_,f=["toExponential","toFixed","toPrecision"]["efg".indexOf(i.toLowerCase())],p=["toString","toUpperCase"]["eEfFgG".indexOf(i)%2],d=s+Math.abs(u)[f](c),H(d,s,g,a,m)[p]();default:return n}})}var X,z,G,J,W,Z,V,Q,ee,te,ne,re,le="prototype",ae=Object,oe=Array,ce=ae[le].hasOwnProperty,ie=ae[le].toString,ue=function(){},se="undefined"!=typeof Components&&"object"==typeof Components.classes&&"object"==typeof Components.classesByID&&Components.utils&&"function"==typeof Components.utils.import,fe="undefined"!=typeof global&&"[object global]"===ie.call(global),pe=this,de=se?Components.utils:null,he=se?Components.classes:null,ge=se?Components.interfaces:null,_e=se?de.import:fe?require:ue,me=fe?_e("fs"):null,be=se?function(e,t){return _e(t,pe),pe[e]}:fe?function(e,t){return _e(t)}:ue,ye=function(){return window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")},Ce=!1,xe=!1,Oe="<%",ve="%>",Ae="",De="",Ee="\n",Se=!0,je="",ke=!1,Te=0,Me=" ",we=0,Ie=0,Le=0,Fe=0,Ne=2,Be=null,Re=null,Ue=null,Pe=null,$e=null,He=-1,Ke=null,Ye=null,qe=0,Xe=/[\W]+/g,ze=/\n\r|\r\n|\n|\r/g,Ge=/'/g,Je=/[\/\\]/,We=/[\/\\]?[^\/\\]+$/,Ze=/<[^<>]+>/gm,Ve=/&+/g,Qe=/^[a-zA-Z_]/,et=/^[0-9]/,tt=/^[a-zA-Z0-9_]/i,nt=/^\s/,rt=/(\t|\s?)\s*((#ID_(continue|endblock|elsefor|endfor|endif|break|else|fi)#(\s*\(\s*\))?)|(#ID_([^#]+)#\s*(\()))(.*)$/g,lt=["set","unset","isset","if","elseif","else","endif","for","elsefor","endfor","extends","block","endblock","include","super","getblock","iif","empty","continue","break","local_set"],at={elif:"elseif",fi:"endif"},ot=["s","n","f","q","qq","echo","time","count","lowercase","uppercase","ucfirst","lcfirst","sprintf","date","ldate","locale","xlocale","inline","tpl","uuid","haskey","concat","ltrim","rtrim","trim","addslashes","stripslashes","is_array","in_array","json_encode","json_decode","camelcase","snakecase","e","url","nlocale","nxlocale","join","queryvar","striptags"],ct={l:"locale",xl:"xlocale",nl:"nlocale",nxl:"nxlocale",cc:"concat",j:"join",dq:"qq",now:"time",template:"tpl"};se&&(_e("resource://gre/modules/NetUtil.jsm"),_e("resource://gre/modules/FileUtils.jsm"));var it=/#STR_\d+#/g;E.multisplit=function(e,t,n){var r,l,a,o,c,i,u,s,f,p;n=!!n,i=[[1,e]];for(r in t)if(t.hasOwnProperty(r)){for(s=[],l=n?t[r]:r,a=[0,t[r]],o=0,f=i.length;o1)for(c=0;c0?"object"==typeof t[0]?X.join(e,t[0],n):!n||null!=t[0]&&String(t[0]).length?String(t[0]):"":"";for(r=1;r0)&&(o+=e+l);return o},queryvar:function(e,t,n){var r,l,a,o,c,i,u,s;if(null!=n){for(c=(r=[].concat(n)).length,o=0;oarguments.length&&(t=Te);var n,r,l,a="",o=e.length;if(o&&01&&"false"===I(e[1]));e=I(e[0]),Ye&&ce.call(Ye,e)&&(e=Ye[e]);var n=e.charAt(0);return'"'!==n&&"'"!==n||n!==e.charAt(e.length-1)||(e=e.slice(1,-1)),Be.push([e,-1,-1,0,Ue[0][1],t]),Re[e]=Re[e]?Re[e]+1:1,He=Be.length,Ue.unshift([e,He-1]),Pe=e,$e=null,J=e,z[J]=z[J]||{},G[J]=G[J]||{},"' + #BLOCK_"+e+"#"}function d(){if(10;)"("===(C=E.charAt(y++))?T++:")"===C&&T--,T>0&&(j+=C);E=E.slice(j.length+1)}if(j=I(j),ce.call(at,D)&&(D=at[D]),-1<(x=lt.indexOf(D))){switch(x){case 0:case 20:O=I((j=i(j=j.replace(rt,h),",")).shift()),v=I(j.join(",")),20!==x||s(O)||(u(O),O="var "+O),k="';"+Ee+a(O+" = ("+v+");")+Ee;break;case 1:(O=j=j.replace(rt,h))&&O.length?(O=I(O),k="';"+Ee+a('if ("undefined" !== typeof('+O+")) delete "+O+";")+Ee):k="';"+Ee;break;case 2:k='("undefined" !== typeof('+(O=j=j.replace(rt,h))+") && null !== "+O+")";break;case 3:k="';"+a(["","if ("+(j=j.replace(rt,h))+")","{",""].join(Ee)),Le++,Te++;break;case 4:j=j.replace(rt,h),Te--,k="';"+a(["","}","else if ("+j+")","{",""].join(Ee)),Te++;break;case 5:Te--,k="';"+a(["","}","else","{",""].join(Ee)),Te++;break;case 6:Le--,Te--,k="';"+a(["","}",""].join(Ee));break;case 7:var M,w,L,F=j=j.replace(rt,h),N=F.indexOf(" as "),B=F.indexOf(" in ");if(-1")),L.length>=2){var R=I(L[0]),U=I(L[1]),P="_loc_"+ ++we,$="_loc_"+ ++we,H="_loc_"+ ++we;u(R),u(U),k="';"+a(["","var "+w+" = "+M+", "+P+" = "+w+" ? Object.keys("+w+") : null,"," "+$+", "+R+", "+U+", "+H+" = "+w+" ? "+P+".length : 0;","if ("+H+")","{"," for ("+$+"=0; "+$+"<"+H+"; "+$+"++)"," {"," "+R+" = "+P+"["+$+"]; "+U+" = "+w+"["+R+"];"," ",""].join(Ee)),Ne=2,Te+=2}else{var U=I(L[0]),K="_loc_"+ ++we,Y="_loc_"+ ++we,$="_loc_"+ ++we,q="_loc_"+ ++we,H="_loc_"+ ++we;u(U),k="';"+a(["","var "+w+" = "+M+", "+Y+" = !!"+w+".forEach,"," "+K+" = "+w+" ? ("+Y+" ? "+w+" : Object.keys("+w+")) : null,"," "+$+", "+q+", "+U+", "+H+" = "+K+" ? "+K+".length : 0;","if ("+H+")","{"," for ("+$+"=0; "+$+"<"+H+"; "+$+"++)"," {"," "+q+" = "+K+"["+$+"];"," "+U+" = "+Y+" ? "+q+" : "+w+"["+q+"];"," ",""].join(Ee)),Ne=1,Te+=2}Ie++,Fe++;break;case 8:Fe--,Te+=-2,k="';"+a([""," }","}","else","{ ",""].join(Ee)),Te+=1;break;case 9:Fe===Ie?(Ie--,Fe--,Te+=-2,k="';"+a([""," }","}",""].join(Ee))):(Ie--,Te+=-1,k="';"+a(["","}",""].join(Ee)));break;case 10:var z=I(j);Ye&&ce.call(Ye,z)&&(z=Ye[z]),'"'!==(C=z.charAt(0))&&"'"!==C||C!==z.charAt(z.length-1)||(z=z.slice(1,-1)),Ke=z,k="';"+Ee;break;case 11:k=p(j);break;case 12:k=d();break;case 13:k=f(j);break;case 14:k=A+"self.sprblock("+(j=j.replace(rt,h))+", data)";break;case 15:k=A+"__i__.block("+(j=j.replace(rt,h))+", data)";break;case 16:k=A+"(("+(j=i(j.replace(rt,h),","))[0]+")?("+j[1]+"):("+j[2]+"))";break;case 17:k=A+'(("undefined" === typeof('+(j=j.replace(rt,h))+")) || (null === "+j+") || Contemplate.empty("+j+"))";break;case 18:case 19:k="';"+Ee+a(18===x?"continue;":"break;")+Ee}return k+E.replace(rt,h)}if(ce.call(V.plugins,D)||ce.call(Z.plugins,D)){var G=V.plugins[D]||Z.plugins[D];return j=j.replace(rt,h),k=G instanceof X.InlineTemplate?G.render([j].concat(i(j,","))):'Contemplate.plg_("'+D+'"'+(j.length?","+j:"")+")",A+k+E.replace(rt,h)}if(ce.call(ct,D)&&(D=ct[D]),-1<(x=ot.indexOf(D))){switch(j=j.replace(rt,h),x){case 0:case 5:k="String("+j+")";break;case 1:k="parseInt("+j+")";break;case 2:k="parseFloat("+j+")";break;case 3:k='"\'"+('+j+')+"\'"';break;case 4:k="'\"'+("+j+")+'\"'";break;case 6:k="Contemplate.time()";break;case 7:k="Contemplate.count("+j+")";break;case 8:k="("+j+").toLowerCase()";break;case 9:k="("+j+").toUpperCase()";break;case 10:k="Contemplate.ucfirst("+j+")";break;case 11:k="Contemplate.lcfirst("+j+")";break;case 12:k="Contemplate.sprintf("+j+")";break;case 21:k="String("+i(j,",").join(")+String(")+")";break;case 27:k=(j=i(j,",")).length>1?"(("+j[1]+")?'[object Array]'===Object.prototype.toString.call("+j[0]+"):'[object Array]'===Object.prototype.toString.call("+j[0]+")||'[object Object]'===Object.prototype.toString.call("+j[0]+"))":"('[object Array]'===Object.prototype.toString.call("+j[0]+")||'[object Object]'===Object.prototype.toString.call("+j[0]+"))";break;case 28:k="(-1<("+(j=i(j,","))[1]+").indexOf("+j[0]+"))";break;case 29:k="JSON.stringify("+j+")";break;case 30:k="JSON.parse("+j+")";break;default:k="Contemplate."+D+"("+j+")"}return A+k+E.replace(rt,h)}return A+D+(S?"("+j.replace(rt,h)+")":"")+E.replace(rt,h)}function g(e){for(var t,n,r,l,a,o,c,i,u,s,f=[],p=Be.length;p--;)t=(n=Be[p])[0],c=n[1],i=n[2],u=n[3],s=n[4],r="#BLOCK_"+t+"#",l=n[5]?"__i__.block('"+t+"', data);":"'';",a=r.length,o=l.length,-10))break;p--,u+=d+e.charAt(t++),s+=A+2,A=0}for(;t0))break;p--,u+=e.charAt(t++),s+=A+1,A=0}}for(;t0&&(T+=" ",P=0),M=_(m,j,S)){for(w=0,p=M.length;wF){for(P>0&&(T+=" ",P=0),B=N=k,R=!1,U=j;UF)P++;else{if(P>0&&(T+=" ",P=0),N=k,q||j>=S||!Qe.test(k=m.charAt(j))){T+=N;continue}for(j++,M=k;j0&&(T+=" ",P=0),M=k;j0&&(T+=" ",P=0),T+=k;if(b="\t"+T+"\v",Pe=null,$e=null,He=-1,Ye=C,b=b.replace(rt,h),Pe?(Pe="#BLOCK_"+Pe+"#",H=!0):$e&&($e="#/BLOCK_"+$e+"#",H=!0),K=H,9===b.charCodeAt(0)&&11===b.charCodeAt(b.length-1)&&(b="' + ("+I(b.slice(1,-1))+") + '"),O)for(w=x.length-1;w>=0;w--)D=x[w][0],A=x[w][1],b=b.split(D+"__RAW__").join(A).split(D).join((ce.call(z[J],A)?"_loc_"+A:x[w][2])+x[w][3]);if(v)for(y=Y(b,it),b="",w=0,p=y.length;w0?g(d):[d,[]]:d}function b(e,t,n){var r,l;return!fe&&!se||-1===e.indexOf("/")&&-1===e.indexOf("\\")?(r=e,l=""):(r=L(e),(l=I(F(e),"/\\")).length&&(l+="/")),n+l+r.replace(Xe,"_")+"_tpl__"+t.replace(Xe,"_")+".js"}function y(e,t){return"Contemplate_"+(!fe&&!se||-1===e.indexOf("/")&&-1===e.indexOf("\\")?e:L(e)).replace(Xe,"_")+"__"+t.replace(Xe,"_")}function C(e,t,n){var r=t.templates[e]||Z.templates[e]||null;return r?r[1]?xe&&n?(n(r[0]),""):r[0]:fe||se?xe&&n?(Mt(r[0],t.encoding,function(e,t){n(e?"":t)}),""):Tt(r[0],t.encoding):"#"===r[0].charAt(0)?xe&&n?(n(window.document.getElementById(r[0].slice(1)).innerHTML||""),""):window.document.getElementById(r[0].slice(1)).innerHTML||"":xe&&n?(Mt(r[0],t.encoding,function(e,t){n(e?"":t)}),""):Tt(r[0],t.encoding):""}function x(e,r,l){var a,o,i,u,s,f={};for(t(),a=m(c(C(e,r),l),Oe,ve),n(),s=a[0],i=(a=a[1]).length,u=ne.render({FCODE:Ke?"__p__ = '';":"__p__ = '"+s+"';"}),o=0;o0?new Array(l+1).join(n||" ")+r:r}function B(e){return encodeURIComponent(""+e).replace(_t,"%21").replace(mt,"%27").replace(bt,"%28").replace(yt,"%29").replace(Ct,"%2A").replace(xt,"+")}function R(){return dt((new Date).getTime()/1e3)}function U(e,t){var n,r,l,a,o,c,i=ut,u={},s=(o=t instanceof Date?new Date(t):"number"==typeof t?new Date(1e3*t):new Date).getTimezoneOffset(),f=gt(s),p=o.getMonth();for(u.G=o.getHours(),u.j=o.getDate(),c=u.j%10,u.n=p+1,u.Y=o.getFullYear(),u.w=o.getDay(),u.N=u.w||7,u.d=N(u.j,2,"0"),u.D=i.day_short[u.w],u.l=i.day[u.w],u.S=i.ordinal.ord[u.j]?i.ordinal.ord[u.j]:i.ordinal.ord[c]?i.ordinal.ord[c]:i.ordinal.nth,u.z=ht((new Date(u.Y,p,u.j)-new Date(u.Y,0,1))/864e5),u.W=N(1+ht((new Date(u.Y,p,u.j-u.N+3)-new Date(u.Y,0,4))/864e5/7),2,"0"),u.F=i.month[p],u.m=N(u.n,2,"0"),u.M=i.month_short[p],u.t=new Date(u.Y,p+1,0).getDate(),u.L=u.Y%4==0&u.Y%100!=0|u.Y%400==0,u.o=u.Y+(11===p&&u.W<9?1:0===p&&u.W>9?-1:0),u.y=u.Y.toString().slice(-2),u.a=u.G>11?i.meridian.pm:i.meridian.am,u.A=u.G>11?i.meridian.PM:i.meridian.AM,u.B=N(dt((3600*o.getUTCHours()+60*o.getUTCMinutes()+o.getUTCSeconds()+3600)/86.4)%1e3,3,"0"),u.g=u.G%12||12,u.h=N(u.g,2,"0"),u.H=N(u.G,2,"0"),u.i=N(o.getMinutes(),2,"0"),u.s=N(o.getSeconds(),2,"0"),u.u=N(1e3*o.getMilliseconds(),6,"0"),u.e="",u.I=new Date(u.Y,0)-Date.UTC(u.Y,0)!=new Date(u.Y,6)-Date.UTC(u.Y,6)?1:0,u.O=(s>0?"-":"+")+N(100*dt(f/60)+f%60,4,"0"),u.P=u.O.substr(0,3)+":"+u.O.substr(3,2),u.T="UTC",u.Z=60*-s,u.U=o/1e3|0,u.c=u.Y+"-"+u.m+"-"+u.d+"\\"+u.T+u.H+":"+u.i+":"+u.s+u.P,u.r=u.D+", "+u.d+" "+u.M+" "+u.Y+" "+u.H+":"+u.i+":"+u.s+" "+u.O,n="",l=0,a=e.length;l0&&(o=n||!l?$(o,r,a,n):o.slice(0,t.length)+$("",c,"0",!0)+o.slice(t.length)),o}function K(e,t,n,r,l,a,o){var c=e>>>0;return n=n&&c&&{2:"0b",8:"0",16:"0x"}[t]||"",e=n+$(c.toString(t),a||0,"0",!1),H(e,n,r,l,o)}function Y(e,t,n,r,l,a){return null!=r&&(e=e.slice(0,r)),H(e,"",t,n,l,a)}function q(){var e=1,t=arguments;return arguments[0].replace(q.format_re,function(n,r,l,a,o,c,i){var u,s,f,p,d;if("%%"==n)return"%";var h,g=!1,_="",m=!1,b=!1,y=" ",C=l.length;for(h=0;l&&h(a=a?"*"==a?+t[e++]:"*"==a.charAt(0)?+t[a.slice(1,-1)]:+a:0)&&(a=-a,g=!0),!isFinite(a))throw new Error("sprintf: (minimum-)width must be finite");switch(c=c?"*"==c?+t[e++]:"*"==c.charAt(0)?+t[c.slice(1,-1)]:+c:"fFeE".indexOf(i)>-1?6:"d"==i?0:void 0,d=r?t[r.slice(0,-1)]:t[e++],i){case"s":return Y(String(d),g,a,c,m,y);case"c":return Y(String.fromCharCode(+d),g,a,c,m);case"b":return K(d,2,b,g,a,c,m);case"o":return K(d,8,b,g,a,c,m);case"x":return K(d,16,b,g,a,c,m);case"X":return K(d,16,b,g,a,c,m).toUpperCase();case"u":return K(d,10,b,g,a,c,m);case"i":case"d":return u=+d||0,u=Math.round(u-u%1),s=u<0?"-":_,d=s+$(String(Math.abs(u)),c,"0",!1),H(d,s,g,a,m);case"e":case"E":case"f":case"F":case"g":case"G":return u=+d,s=u<0?"-":_,f=["toExponential","toFixed","toPrecision"]["efg".indexOf(i.toLowerCase())],p=["toString","toUpperCase"]["eEfFgG".indexOf(i)%2],d=s+Math.abs(u)[f](c),H(d,s,g,a,m)[p]();default:return n}})}var X,z,G,J,W,Z,V,Q,ee,te,ne,re,le="prototype",ae=Object,oe=Array,ce=ae[le].hasOwnProperty,ie=ae[le].toString,ue=function(){},se="undefined"!=typeof Components&&"object"==typeof Components.classes&&"object"==typeof Components.classesByID&&Components.utils&&"function"==typeof Components.utils.import,fe="undefined"!=typeof global&&"[object global]"===ie.call(global),pe=this,de=se?Components.utils:null,he=se?Components.classes:null,ge=se?Components.interfaces:null,_e=se?de.import:fe?require:ue,me=fe?_e("fs"):null,be=se?function(e,t){return _e(t,pe),pe[e]}:fe?function(e,t){return _e(t)}:ue,ye=function(){return window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")},Ce=!1,xe=!1,Oe="<%",ve="%>",Ae="",De="",Ee="\n",Se=!0,je="",ke=!1,Te=0,Me=" ",we=0,Ie=0,Le=0,Fe=0,Ne=2,Be=null,Re=null,Ue=null,Pe=null,$e=null,He=-1,Ke=null,Ye=null,qe=0,Xe=/[\W]+/g,ze=/\n\r|\r\n|\n|\r/g,Ge=/'/g,Je=/[\/\\]/,We=/[\/\\]?[^\/\\]+$/,Ze=/<[^<>]+>/gm,Ve=/&+/g,Qe=/^[a-zA-Z_]/,et=/^[0-9]/,tt=/^[a-zA-Z0-9_]/i,nt=/^\s/,rt=/(\t|\s?)\s*((#ID_(continue|endblock|elsefor|endfor|endif|break|else|fi)#(\s*\(\s*\))?)|(#ID_([^#]+)#\s*(\()))(.*)$/g,lt=["set","unset","isset","if","elseif","else","endif","for","elsefor","endfor","extends","block","endblock","include","super","getblock","iif","empty","continue","break","local_set"],at={elif:"elseif",fi:"endif"},ot=["s","n","f","q","qq","echo","time","count","lowercase","uppercase","ucfirst","lcfirst","sprintf","date","ldate","locale","xlocale","inline","tpl","uuid","haskey","concat","ltrim","rtrim","trim","addslashes","stripslashes","is_array","in_array","json_encode","json_decode","camelcase","snakecase","e","url","nlocale","nxlocale","join","queryvar","striptags"],ct={l:"locale",xl:"xlocale",nl:"nlocale",nxl:"nxlocale",cc:"concat",j:"join",dq:"qq",now:"time",template:"tpl"};se&&(_e("resource://gre/modules/NetUtil.jsm"),_e("resource://gre/modules/FileUtils.jsm"));var it=/#STR_\d+#/g;E.multisplit=function(e,t,n){var r,l,a,o,c,i,u,s,f,p;n=!!n,i=[[1,e]];for(r in t)if(t.hasOwnProperty(r)){for(s=[],l=n?t[r]:r,a=[0,t[r]],o=0,f=i.length;o1)for(c=0;c0?"object"==typeof t[0]?X.join(e,t[0],n):!n||null!=t[0]&&String(t[0]).length?String(t[0]):"":"";for(r=1;r0)&&(o+=e+l);return o},queryvar:function(e,t,n){var r,l,a,o,c,i,u,s;if(null!=n){for(c=(r=[].concat(n)).length,o=0;oarguments.length&&(t=Te);var n,r,l,a="",o=e.length;if(o&&01&&"false"===I(e[1]));e=I(e[0]),Ye&&ce.call(Ye,e)&&(e=Ye[e]);var n=e.charAt(0);return'"'!==n&&"'"!==n||n!==e.charAt(e.length-1)||(e=e.slice(1,-1)),Be.push([e,-1,-1,0,Ue[0][1],t]),Re[e]=Re[e]?Re[e]+1:1,He=Be.length,Ue.unshift([e,He-1]),Pe=e,$e=null,J=e,z[J]=z[J]||{},G[J]=G[J]||{},"' + #BLOCK_"+e+"#"}function d(){if(10;)"("===(C=E.charAt(y++))?T++:")"===C&&T--,T>0&&(j+=C);E=E.slice(j.length+1)}if(j=I(j),ce.call(at,D)&&(D=at[D]),-1<(x=lt.indexOf(D))){switch(x){case 0:case 20:O=I((j=i(j=j.replace(rt,h),",")).shift()),v=I(j.join(",")),20!==x||s(O)||(u(O),O="var "+O),k="';"+Ee+a(O+" = ("+v+");")+Ee;break;case 1:(O=j=j.replace(rt,h))&&O.length?(O=I(O),k="';"+Ee+a('if ("undefined" !== typeof('+O+")) delete "+O+";")+Ee):k="';"+Ee;break;case 2:k='("undefined" !== typeof('+(O=j=j.replace(rt,h))+") && null !== "+O+")";break;case 3:k="';"+a(["","if ("+(j=j.replace(rt,h))+")","{",""].join(Ee)),Le++,Te++;break;case 4:j=j.replace(rt,h),Te--,k="';"+a(["","}","else if ("+j+")","{",""].join(Ee)),Te++;break;case 5:Te--,k="';"+a(["","}","else","{",""].join(Ee)),Te++;break;case 6:Le--,Te--,k="';"+a(["","}",""].join(Ee));break;case 7:var M,w,L,F=j=j.replace(rt,h),N=F.indexOf(" as "),B=F.indexOf(" in ");if(-1")),L.length>=2){var R=I(L[0]),U=I(L[1]),P="_loc_"+ ++we,$="_loc_"+ ++we,H="_loc_"+ ++we;u(R),u(U),k="';"+a(["","var "+w+" = "+M+", "+P+" = "+w+" ? Object.keys("+w+") : null,"," "+$+", "+R+", "+U+", "+H+" = "+w+" ? "+P+".length : 0;","if ("+H+")","{"," for ("+$+"=0; "+$+"<"+H+"; "+$+"++)"," {"," "+R+" = "+P+"["+$+"]; "+U+" = "+w+"["+R+"];"," ",""].join(Ee)),Ne=2,Te+=2}else{var U=I(L[0]),K="_loc_"+ ++we,Y="_loc_"+ ++we,$="_loc_"+ ++we,q="_loc_"+ ++we,H="_loc_"+ ++we;u(U),k="';"+a(["","var "+w+" = "+M+", "+Y+" = !!"+w+".forEach,"," "+K+" = "+w+" ? ("+Y+" ? "+w+" : Object.keys("+w+")) : null,"," "+$+", "+q+", "+U+", "+H+" = "+K+" ? "+K+".length : 0;","if ("+H+")","{"," for ("+$+"=0; "+$+"<"+H+"; "+$+"++)"," {"," "+q+" = "+K+"["+$+"];"," "+U+" = "+Y+" ? "+q+" : "+w+"["+q+"];"," ",""].join(Ee)),Ne=1,Te+=2}Ie++,Fe++;break;case 8:Fe--,Te+=-2,k="';"+a([""," }","}","else","{ ",""].join(Ee)),Te+=1;break;case 9:Fe===Ie?(Ie--,Fe--,Te+=-2,k="';"+a([""," }","}",""].join(Ee))):(Ie--,Te+=-1,k="';"+a(["","}",""].join(Ee)));break;case 10:var z=I(j);Ye&&ce.call(Ye,z)&&(z=Ye[z]),'"'!==(C=z.charAt(0))&&"'"!==C||C!==z.charAt(z.length-1)||(z=z.slice(1,-1)),Ke=z,k="';"+Ee;break;case 11:k=p(j);break;case 12:k=d();break;case 13:k=f(j);break;case 14:k=A+"self.sprblock("+(j=j.replace(rt,h))+", data)";break;case 15:k=A+"__i__.block("+(j=j.replace(rt,h))+", data)";break;case 16:k=A+"(("+(j=i(j.replace(rt,h),","))[0]+")?("+j[1]+"):("+j[2]+"))";break;case 17:k=A+'(("undefined" === typeof('+(j=j.replace(rt,h))+")) || (null === "+j+") || Contemplate.empty("+j+"))";break;case 18:case 19:k="';"+Ee+a(18===x?"continue;":"break;")+Ee}return k+E.replace(rt,h)}if(ce.call(V.plugins,D)||ce.call(Z.plugins,D)){var G=V.plugins[D]||Z.plugins[D];return j=j.replace(rt,h),k=G instanceof X.InlineTemplate?G.render([j].concat(i(j,","))):'Contemplate.plg_("'+D+'"'+(j.length?","+j:"")+")",A+k+E.replace(rt,h)}if(ce.call(ct,D)&&(D=ct[D]),-1<(x=ot.indexOf(D))){switch(j=j.replace(rt,h),x){case 0:case 5:k="String("+j+")";break;case 1:k="parseInt("+j+")";break;case 2:k="parseFloat("+j+")";break;case 3:k='"\'"+('+j+')+"\'"';break;case 4:k="'\"'+("+j+")+'\"'";break;case 6:k="Contemplate.time()";break;case 7:k="Contemplate.count("+j+")";break;case 8:k="("+j+").toLowerCase()";break;case 9:k="("+j+").toUpperCase()";break;case 10:k="Contemplate.ucfirst("+j+")";break;case 11:k="Contemplate.lcfirst("+j+")";break;case 12:k="Contemplate.sprintf("+j+")";break;case 21:k="String("+i(j,",").join(")+String(")+")";break;case 27:k=(j=i(j,",")).length>1?"(("+j[1]+")?'[object Array]'===Object.prototype.toString.call("+j[0]+"):'[object Array]'===Object.prototype.toString.call("+j[0]+")||'[object Object]'===Object.prototype.toString.call("+j[0]+"))":"('[object Array]'===Object.prototype.toString.call("+j[0]+")||'[object Object]'===Object.prototype.toString.call("+j[0]+"))";break;case 28:k="(-1<("+(j=i(j,","))[1]+").indexOf("+j[0]+"))";break;case 29:k="JSON.stringify("+j+")";break;case 30:k="JSON.parse("+j+")";break;default:k="Contemplate."+D+"("+j+")"}return A+k+E.replace(rt,h)}return A+D+(S?"("+j.replace(rt,h)+")":"")+E.replace(rt,h)}function g(e){for(var t,n,r,l,a,o,c,i,u,s,f=[],p=Be.length;p--;)t=(n=Be[p])[0],c=n[1],i=n[2],u=n[3],s=n[4],r="#BLOCK_"+t+"#",l=n[5]?"__i__.block('"+t+"', data);":"'';",a=r.length,o=l.length,-10))break;p--,u+=d+e.charAt(t++),s+=A+2,A=0}for(;t0))break;p--,u+=e.charAt(t++),s+=A+1,A=0}}for(;t0&&(T+=" ",P=0),M=_(m,j,S)){for(w=0,p=M.length;wF){for(P>0&&(T+=" ",P=0),B=N=k,R=!1,U=j;UF)P++;else{if(P>0&&(T+=" ",P=0),N=k,q||j>=S||!Qe.test(k=m.charAt(j))){T+=N;continue}for(j++,M=k;j0&&(T+=" ",P=0),M=k;j0&&(T+=" ",P=0),T+=k;if(b="\t"+T+"\v",Pe=null,$e=null,He=-1,Ye=C,b=b.replace(rt,h),Pe?(Pe="#BLOCK_"+Pe+"#",H=!0):$e&&($e="#/BLOCK_"+$e+"#",H=!0),K=H,9===b.charCodeAt(0)&&11===b.charCodeAt(b.length-1)&&(b="' + ("+I(b.slice(1,-1))+") + '"),O)for(w=x.length-1;w>=0;w--)D=x[w][0],A=x[w][1],b=b.split(D+"__RAW__").join(A).split(D).join((ce.call(z[J],A)?"_loc_"+A:x[w][2])+x[w][3]);if(v)for(y=Y(b,it),b="",w=0,p=y.length;w0?g(d):[d,[]]:d}function b(e,t,n){var r,l;return!fe&&!se||-1===e.indexOf("/")&&-1===e.indexOf("\\")?(r=e,l=""):(r=L(e),(l=I(F(e),"/\\")).length&&(l+="/")),n+l+r.replace(Xe,"_")+"_tpl__"+t.replace(Xe,"_")+".js"}function y(e,t){return"Contemplate_"+(!fe&&!se||-1===e.indexOf("/")&&-1===e.indexOf("\\")?e:L(e)).replace(Xe,"_")+"__"+t.replace(Xe,"_")}function C(e,t,n){var r=t.templates[e]||Z.templates[e]||null;return r?r[1]?xe&&n?(n(r[0]),""):r[0]:fe||se?xe&&n?(Mt(r[0],t.encoding,function(e,t){n(e?"":t)}),""):Tt(r[0],t.encoding):"#"===r[0].charAt(0)?xe&&n?(n(window.document.getElementById(r[0].slice(1)).innerHTML||""),""):window.document.getElementById(r[0].slice(1)).innerHTML||"":xe&&n?(Mt(r[0],t.encoding,function(e,t){n(e?"":t)}),""):Tt(r[0],t.encoding):""}function x(e,r,l){var a,o,i,u,s,f={};for(t(),a=m(c(C(e,r),l),Oe,ve),n(),s=a[0],i=(a=a[1]).length,u=ne.render({FCODE:Ke?"__p__ = '';":"__p__ = '"+s+"';"}),o=0;o0?new Array(l+1).join(n||" ")+r:r}function B(e){return encodeURIComponent(""+e).replace(_t,"%21").replace(mt,"%27").replace(bt,"%28").replace(yt,"%29").replace(Ct,"%2A").replace(xt,"+")}function R(){return dt((new Date).getTime()/1e3)}function U(e,t){var n,r,l,a,o,c,i=ut,u={},s=(o=t instanceof Date?new Date(t):"number"==typeof t?new Date(1e3*t):new Date).getTimezoneOffset(),f=gt(s),p=o.getMonth();for(u.G=o.getHours(),u.j=o.getDate(),c=u.j%10,u.n=p+1,u.Y=o.getFullYear(),u.w=o.getDay(),u.N=u.w||7,u.d=N(u.j,2,"0"),u.D=i.day_short[u.w],u.l=i.day[u.w],u.S=i.ordinal.ord[u.j]?i.ordinal.ord[u.j]:i.ordinal.ord[c]?i.ordinal.ord[c]:i.ordinal.nth,u.z=ht((new Date(u.Y,p,u.j)-new Date(u.Y,0,1))/864e5),u.W=N(1+ht((new Date(u.Y,p,u.j-u.N+3)-new Date(u.Y,0,4))/864e5/7),2,"0"),u.F=i.month[p],u.m=N(u.n,2,"0"),u.M=i.month_short[p],u.t=new Date(u.Y,p+1,0).getDate(),u.L=u.Y%4==0&u.Y%100!=0|u.Y%400==0,u.o=u.Y+(11===p&&u.W<9?1:0===p&&u.W>9?-1:0),u.y=u.Y.toString().slice(-2),u.a=u.G>11?i.meridian.pm:i.meridian.am,u.A=u.G>11?i.meridian.PM:i.meridian.AM,u.B=N(dt((3600*o.getUTCHours()+60*o.getUTCMinutes()+o.getUTCSeconds()+3600)/86.4)%1e3,3,"0"),u.g=u.G%12||12,u.h=N(u.g,2,"0"),u.H=N(u.G,2,"0"),u.i=N(o.getMinutes(),2,"0"),u.s=N(o.getSeconds(),2,"0"),u.u=N(1e3*o.getMilliseconds(),6,"0"),u.e="",u.I=new Date(u.Y,0)-Date.UTC(u.Y,0)!=new Date(u.Y,6)-Date.UTC(u.Y,6)?1:0,u.O=(s>0?"-":"+")+N(100*dt(f/60)+f%60,4,"0"),u.P=u.O.substr(0,3)+":"+u.O.substr(3,2),u.T="UTC",u.Z=60*-s,u.U=o/1e3|0,u.c=u.Y+"-"+u.m+"-"+u.d+"\\"+u.T+u.H+":"+u.i+":"+u.s+u.P,u.r=u.D+", "+u.d+" "+u.M+" "+u.Y+" "+u.H+":"+u.i+":"+u.s+" "+u.O,n="",l=0,a=e.length;l0&&(o=n||!l?$(o,r,a,n):o.slice(0,t.length)+$("",c,"0",!0)+o.slice(t.length)),o}function K(e,t,n,r,l,a,o){var c=e>>>0;return n=n&&c&&{2:"0b",8:"0",16:"0x"}[t]||"",e=n+$(c.toString(t),a||0,"0",!1),H(e,n,r,l,o)}function Y(e,t,n,r,l,a){return null!=r&&(e=e.slice(0,r)),H(e,"",t,n,l,a)}function q(){var e=1,t=arguments;return arguments[0].replace(q.format_re,function(n,r,l,a,o,c,i){var u,s,f,p,d;if("%%"==n)return"%";var h,g=!1,_="",m=!1,b=!1,y=" ",C=l.length;for(h=0;l&&h(a=a?"*"==a?+t[e++]:"*"==a.charAt(0)?+t[a.slice(1,-1)]:+a:0)&&(a=-a,g=!0),!isFinite(a))throw new Error("sprintf: (minimum-)width must be finite");switch(c=c?"*"==c?+t[e++]:"*"==c.charAt(0)?+t[c.slice(1,-1)]:+c:"fFeE".indexOf(i)>-1?6:"d"==i?0:void 0,d=r?t[r.slice(0,-1)]:t[e++],i){case"s":return Y(String(d),g,a,c,m,y);case"c":return Y(String.fromCharCode(+d),g,a,c,m);case"b":return K(d,2,b,g,a,c,m);case"o":return K(d,8,b,g,a,c,m);case"x":return K(d,16,b,g,a,c,m);case"X":return K(d,16,b,g,a,c,m).toUpperCase();case"u":return K(d,10,b,g,a,c,m);case"i":case"d":return u=+d||0,u=Math.round(u-u%1),s=u<0?"-":_,d=s+$(String(Math.abs(u)),c,"0",!1),H(d,s,g,a,m);case"e":case"E":case"f":case"F":case"g":case"G":return u=+d,s=u<0?"-":_,f=["toExponential","toFixed","toPrecision"]["efg".indexOf(i.toLowerCase())],p=["toString","toUpperCase"]["eEfFgG".indexOf(i)%2],d=s+Math.abs(u)[f](c),H(d,s,g,a,m)[p]();default:return n}})}var X,z,G,J,W,Z,V,Q,ee,te,ne,re,le="prototype",ae=Object,oe=Array,ce=ae[le].hasOwnProperty,ie=ae[le].toString,ue=function(){},se="undefined"!=typeof Components&&"object"==typeof Components.classes&&"object"==typeof Components.classesByID&&Components.utils&&"function"==typeof Components.utils.import,fe="undefined"!=typeof global&&"[object global]"===ie.call(global),pe=this,de=se?Components.utils:null,he=se?Components.classes:null,ge=se?Components.interfaces:null,_e=se?de.import:fe?require:ue,me=fe?_e("fs"):null,be=se?function(e,t){return _e(t,pe),pe[e]}:fe?function(e,t){return _e(t)}:ue,ye=function(){return window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")},Ce=!1,xe=!1,Oe="<%",ve="%>",Ae="",De="",Ee="\n",Se=!0,je="",ke=!1,Te=0,Me=" ",we=0,Ie=0,Le=0,Fe=0,Ne=2,Be=null,Re=null,Ue=null,Pe=null,$e=null,He=-1,Ke=null,Ye=null,qe=0,Xe=/[\W]+/g,ze=/\n\r|\r\n|\n|\r/g,Ge=/'/g,Je=/[\/\\]/,We=/[\/\\]?[^\/\\]+$/,Ze=/<[^<>]+>/gm,Ve=/&+/g,Qe=/^[a-zA-Z_]/,et=/^[0-9]/,tt=/^[a-zA-Z0-9_]/i,nt=/^\s/,rt=/(\t|\s?)\s*((#ID_(continue|endblock|elsefor|endfor|endif|break|else|fi)#(\s*\(\s*\))?)|(#ID_([^#]+)#\s*(\()))(.*)$/g,lt=["set","unset","isset","if","elseif","else","endif","for","elsefor","endfor","extends","block","endblock","include","super","getblock","iif","empty","continue","break","local_set"],at={elif:"elseif",fi:"endif"},ot=["s","n","f","q","qq","echo","time","count","lowercase","uppercase","ucfirst","lcfirst","sprintf","date","ldate","locale","xlocale","inline","tpl","uuid","haskey","concat","ltrim","rtrim","trim","addslashes","stripslashes","is_array","in_array","json_encode","json_decode","camelcase","snakecase","e","url","nlocale","nxlocale","join","queryvar","striptags"],ct={l:"locale",xl:"xlocale",nl:"nlocale",nxl:"nxlocale",cc:"concat",j:"join",dq:"qq",now:"time",template:"tpl"};se&&(_e("resource://gre/modules/NetUtil.jsm"),_e("resource://gre/modules/FileUtils.jsm"));var it=/#STR_\d+#/g;E.multisplit=function(e,t,n){var r,l,a,o,c,i,u,s,f,p;n=!!n,i=[[1,e]];for(r in t)if(t.hasOwnProperty(r)){for(s=[],l=n?t[r]:r,a=[0,t[r]],o=0,f=i.length;o1)for(c=0;c0?"object"==typeof t[0]?X.join(e,t[0],n):!n||null!=t[0]&&String(t[0]).length?String(t[0]):"":"";for(r=1;r0)&&(o+=e+l);return o},queryvar:function(e,t,n){var r,l,a,o,c,i,u,s;if(null!=n){for(c=(r=[].concat(n)).length,o=0;oarguments.length&&(t=Te);var n,r,l,a="",o=e.length;if(o&&01&&"false"===I(e[1]));e=I(e[0]),Ye&&ce.call(Ye,e)&&(e=Ye[e]);var n=e.charAt(0);return'"'!==n&&"'"!==n||n!==e.charAt(e.length-1)||(e=e.slice(1,-1)),Be.push([e,-1,-1,0,Ue[0][1],t]),Re[e]=Re[e]?Re[e]+1:1,He=Be.length,Ue.unshift([e,He-1]),Pe=e,$e=null,J=e,z[J]=z[J]||{},G[J]=G[J]||{},"' + #BLOCK_"+e+"#"}function d(){if(10;)"("===(C=E.charAt(y++))?T++:")"===C&&T--,T>0&&(j+=C);E=E.slice(j.length+1)}if(j=I(j),ce.call(at,D)&&(D=at[D]),-1<(x=lt.indexOf(D))){switch(x){case 0:case 20:O=I((j=i(j=j.replace(rt,h),",")).shift()),v=I(j.join(",")),20!==x||s(O)||(u(O),O="var "+O),k="';"+Ee+a(O+" = ("+v+");")+Ee;break;case 1:(O=j=j.replace(rt,h))&&O.length?(O=I(O),k="';"+Ee+a('if ("undefined" !== typeof('+O+")) delete "+O+";")+Ee):k="';"+Ee;break;case 2:k='("undefined" !== typeof('+(O=j=j.replace(rt,h))+") && null !== "+O+")";break;case 3:k="';"+a(["","if ("+(j=j.replace(rt,h))+")","{",""].join(Ee)),Le++,Te++;break;case 4:j=j.replace(rt,h),Te--,k="';"+a(["","}","else if ("+j+")","{",""].join(Ee)),Te++;break;case 5:Te--,k="';"+a(["","}","else","{",""].join(Ee)),Te++;break;case 6:Le--,Te--,k="';"+a(["","}",""].join(Ee));break;case 7:var M,w,L,F=j=j.replace(rt,h),N=F.indexOf(" as "),B=F.indexOf(" in ");if(-1")),L.length>=2){var R=I(L[0]),U=I(L[1]),P="_loc_"+ ++we,$="_loc_"+ ++we,H="_loc_"+ ++we;u(R),u(U),k="';"+a(["","var "+w+" = "+M+", "+P+" = "+w+" ? Object.keys("+w+") : null,"," "+$+", "+R+", "+U+", "+H+" = "+w+" ? "+P+".length : 0;","if ("+H+")","{"," for ("+$+"=0; "+$+"<"+H+"; "+$+"++)"," {"," "+R+" = "+P+"["+$+"]; "+U+" = "+w+"["+R+"];"," ",""].join(Ee)),Ne=2,Te+=2}else{var U=I(L[0]),K="_loc_"+ ++we,Y="_loc_"+ ++we,$="_loc_"+ ++we,q="_loc_"+ ++we,H="_loc_"+ ++we;u(U),k="';"+a(["","var "+w+" = "+M+", "+Y+" = !!"+w+".forEach,"," "+K+" = "+w+" ? ("+Y+" ? "+w+" : Object.keys("+w+")) : null,"," "+$+", "+q+", "+U+", "+H+" = "+K+" ? "+K+".length : 0;","if ("+H+")","{"," for ("+$+"=0; "+$+"<"+H+"; "+$+"++)"," {"," "+q+" = "+K+"["+$+"];"," "+U+" = "+Y+" ? "+q+" : "+w+"["+q+"];"," ",""].join(Ee)),Ne=1,Te+=2}Ie++,Fe++;break;case 8:Fe--,Te+=-2,k="';"+a([""," }","}","else","{ ",""].join(Ee)),Te+=1;break;case 9:Fe===Ie?(Ie--,Fe--,Te+=-2,k="';"+a([""," }","}",""].join(Ee))):(Ie--,Te+=-1,k="';"+a(["","}",""].join(Ee)));break;case 10:var z=I(j);Ye&&ce.call(Ye,z)&&(z=Ye[z]),'"'!==(C=z.charAt(0))&&"'"!==C||C!==z.charAt(z.length-1)||(z=z.slice(1,-1)),Ke=z,k="';"+Ee;break;case 11:k=p(j);break;case 12:k=d();break;case 13:k=f(j);break;case 14:k=A+"self.sprblock("+(j=j.replace(rt,h))+", data)";break;case 15:k=A+"__i__.block("+(j=j.replace(rt,h))+", data)";break;case 16:k=A+"(("+(j=i(j.replace(rt,h),","))[0]+")?("+j[1]+"):("+j[2]+"))";break;case 17:k=A+'(("undefined" === typeof('+(j=j.replace(rt,h))+")) || (null === "+j+") || Contemplate.empty("+j+"))";break;case 18:case 19:k="';"+Ee+a(18===x?"continue;":"break;")+Ee}return k+E.replace(rt,h)}if(ce.call(V.plugins,D)||ce.call(Z.plugins,D)){var G=V.plugins[D]||Z.plugins[D];return j=j.replace(rt,h),k=G instanceof X.InlineTemplate?G.render([j].concat(i(j,","))):'Contemplate.plg_("'+D+'"'+(j.length?","+j:"")+")",A+k+E.replace(rt,h)}if(ce.call(ct,D)&&(D=ct[D]),-1<(x=ot.indexOf(D))){switch(j=j.replace(rt,h),x){case 0:case 5:k="String("+j+")";break;case 1:k="parseInt("+j+")";break;case 2:k="parseFloat("+j+")";break;case 3:k='"\'"+('+j+')+"\'"';break;case 4:k="'\"'+("+j+")+'\"'";break;case 6:k="Contemplate.time()";break;case 7:k="Contemplate.count("+j+")";break;case 8:k="("+j+").toLowerCase()";break;case 9:k="("+j+").toUpperCase()";break;case 10:k="Contemplate.ucfirst("+j+")";break;case 11:k="Contemplate.lcfirst("+j+")";break;case 12:k="Contemplate.sprintf("+j+")";break;case 21:k="String("+i(j,",").join(")+String(")+")";break;case 27:k=(j=i(j,",")).length>1?"(("+j[1]+")?'[object Array]'===Object.prototype.toString.call("+j[0]+"):'[object Array]'===Object.prototype.toString.call("+j[0]+")||'[object Object]'===Object.prototype.toString.call("+j[0]+"))":"('[object Array]'===Object.prototype.toString.call("+j[0]+")||'[object Object]'===Object.prototype.toString.call("+j[0]+"))";break;case 28:k="(-1<("+(j=i(j,","))[1]+").indexOf("+j[0]+"))";break;case 29:k="JSON.stringify("+j+")";break;case 30:k="JSON.parse("+j+")";break;default:k="Contemplate."+D+"("+j+")"}return A+k+E.replace(rt,h)}return A+D+(S?"("+j.replace(rt,h)+")":"")+E.replace(rt,h)}function g(e){for(var t,n,r,l,a,o,c,i,u,s,f=[],p=Be.length;p--;)t=(n=Be[p])[0],c=n[1],i=n[2],u=n[3],s=n[4],r="#BLOCK_"+t+"#",l=n[5]?"__i__.block('"+t+"', data);":"'';",a=r.length,o=l.length,-10))break;p--,u+=d+e.charAt(t++),s+=A+2,A=0}for(;t0))break;p--,u+=e.charAt(t++),s+=A+1,A=0}}for(;t0&&(T+=" ",P=0),M=_(m,j,S)){for(w=0,p=M.length;wF){for(P>0&&(T+=" ",P=0),B=N=k,R=!1,U=j;UF)P++;else{if(P>0&&(T+=" ",P=0),N=k,q||j>=S||!Qe.test(k=m.charAt(j))){T+=N;continue}for(j++,M=k;j0&&(T+=" ",P=0),M=k;j0&&(T+=" ",P=0),T+=k;if(b="\t"+T+"\v",Pe=null,$e=null,He=-1,Ye=C,b=b.replace(rt,h),Pe?(Pe="#BLOCK_"+Pe+"#",H=!0):$e&&($e="#/BLOCK_"+$e+"#",H=!0),K=H,9===b.charCodeAt(0)&&11===b.charCodeAt(b.length-1)&&(b="' + ("+I(b.slice(1,-1))+") + '"),O)for(w=x.length-1;w>=0;w--)D=x[w][0],A=x[w][1],b=b.split(D+"__RAW__").join(A).split(D).join((ce.call(z[J],A)?"_loc_"+A:x[w][2])+x[w][3]);if(v)for(y=Y(b,it),b="",w=0,p=y.length;w0?g(d):[d,[]]:d}function b(e,t,n){var r,l;return!fe&&!se||-1===e.indexOf("/")&&-1===e.indexOf("\\")?(r=e,l=""):(r=L(e),(l=I(F(e),"/\\")).length&&(l+="/")),n+l+r.replace(Xe,"_")+"_tpl__"+t.replace(Xe,"_")+".js"}function y(e,t){return"Contemplate_"+(!fe&&!se||-1===e.indexOf("/")&&-1===e.indexOf("\\")?e:L(e)).replace(Xe,"_")+"__"+t.replace(Xe,"_")}function C(e,t,n){var r=t.templates[e]||Z.templates[e]||null;return r?r[1]?xe&&n?(n(r[0]),""):r[0]:fe||se?xe&&n?(Mt(r[0],t.encoding,function(e,t){n(e?"":t)}),""):Tt(r[0],t.encoding):"#"===r[0].charAt(0)?xe&&n?(n(window.document.getElementById(r[0].slice(1)).innerHTML||""),""):window.document.getElementById(r[0].slice(1)).innerHTML||"":xe&&n?(Mt(r[0],t.encoding,function(e,t){n(e?"":t)}),""):Tt(r[0],t.encoding):""}function x(e,r,l){var a,o,i,u,s,f={};for(t(),a=m(c(C(e,r),l),Oe,ve),n(),s=a[0],i=(a=a[1]).length,u=ne.render({FCODE:Ke?"__p__ = '';":"__p__ = '"+s+"';"}),o=0;o0?new Array(l+1).join(n||" ")+r:r}function B(e){return encodeURIComponent(""+e).replace(_t,"%21").replace(mt,"%27").replace(bt,"%28").replace(yt,"%29").replace(Ct,"%2A").replace(xt,"+")}function R(){return dt((new Date).getTime()/1e3)}function U(e,t){var n,r,l,a,o,c,i=ut,u={},s=(o=t instanceof Date?new Date(t):"number"==typeof t?new Date(1e3*t):new Date).getTimezoneOffset(),f=gt(s),p=o.getMonth();for(u.G=o.getHours(),u.j=o.getDate(),c=u.j%10,u.n=p+1,u.Y=o.getFullYear(),u.w=o.getDay(),u.N=u.w||7,u.d=N(u.j,2,"0"),u.D=i.day_short[u.w],u.l=i.day[u.w],u.S=i.ordinal.ord[u.j]?i.ordinal.ord[u.j]:i.ordinal.ord[c]?i.ordinal.ord[c]:i.ordinal.nth,u.z=ht((new Date(u.Y,p,u.j)-new Date(u.Y,0,1))/864e5),u.W=N(1+ht((new Date(u.Y,p,u.j-u.N+3)-new Date(u.Y,0,4))/864e5/7),2,"0"),u.F=i.month[p],u.m=N(u.n,2,"0"),u.M=i.month_short[p],u.t=new Date(u.Y,p+1,0).getDate(),u.L=u.Y%4==0&u.Y%100!=0|u.Y%400==0,u.o=u.Y+(11===p&&u.W<9?1:0===p&&u.W>9?-1:0),u.y=u.Y.toString().slice(-2),u.a=u.G>11?i.meridian.pm:i.meridian.am,u.A=u.G>11?i.meridian.PM:i.meridian.AM,u.B=N(dt((3600*o.getUTCHours()+60*o.getUTCMinutes()+o.getUTCSeconds()+3600)/86.4)%1e3,3,"0"),u.g=u.G%12||12,u.h=N(u.g,2,"0"),u.H=N(u.G,2,"0"),u.i=N(o.getMinutes(),2,"0"),u.s=N(o.getSeconds(),2,"0"),u.u=N(1e3*o.getMilliseconds(),6,"0"),u.e="",u.I=new Date(u.Y,0)-Date.UTC(u.Y,0)!=new Date(u.Y,6)-Date.UTC(u.Y,6)?1:0,u.O=(s>0?"-":"+")+N(100*dt(f/60)+f%60,4,"0"),u.P=u.O.substr(0,3)+":"+u.O.substr(3,2),u.T="UTC",u.Z=60*-s,u.U=o/1e3|0,u.c=u.Y+"-"+u.m+"-"+u.d+"\\"+u.T+u.H+":"+u.i+":"+u.s+u.P,u.r=u.D+", "+u.d+" "+u.M+" "+u.Y+" "+u.H+":"+u.i+":"+u.s+" "+u.O,n="",l=0,a=e.length;l0&&(o=n||!l?$(o,r,a,n):o.slice(0,t.length)+$("",c,"0",!0)+o.slice(t.length)),o}function K(e,t,n,r,l,a,o){var c=e>>>0;return n=n&&c&&{2:"0b",8:"0",16:"0x"}[t]||"",e=n+$(c.toString(t),a||0,"0",!1),H(e,n,r,l,o)}function Y(e,t,n,r,l,a){return null!=r&&(e=e.slice(0,r)),H(e,"",t,n,l,a)}function q(){var e=1,t=arguments;return arguments[0].replace(q.format_re,function(n,r,l,a,o,c,i){var u,s,f,p,d;if("%%"==n)return"%";var h,g=!1,_="",m=!1,b=!1,y=" ",C=l.length;for(h=0;l&&h(a=a?"*"==a?+t[e++]:"*"==a.charAt(0)?+t[a.slice(1,-1)]:+a:0)&&(a=-a,g=!0),!isFinite(a))throw new Error("sprintf: (minimum-)width must be finite");switch(c=c?"*"==c?+t[e++]:"*"==c.charAt(0)?+t[c.slice(1,-1)]:+c:"fFeE".indexOf(i)>-1?6:"d"==i?0:void 0,d=r?t[r.slice(0,-1)]:t[e++],i){case"s":return Y(String(d),g,a,c,m,y);case"c":return Y(String.fromCharCode(+d),g,a,c,m);case"b":return K(d,2,b,g,a,c,m);case"o":return K(d,8,b,g,a,c,m);case"x":return K(d,16,b,g,a,c,m);case"X":return K(d,16,b,g,a,c,m).toUpperCase();case"u":return K(d,10,b,g,a,c,m);case"i":case"d":return u=+d||0,u=Math.round(u-u%1),s=u<0?"-":_,d=s+$(String(Math.abs(u)),c,"0",!1),H(d,s,g,a,m);case"e":case"E":case"f":case"F":case"g":case"G":return u=+d,s=u<0?"-":_,f=["toExponential","toFixed","toPrecision"]["efg".indexOf(i.toLowerCase())],p=["toString","toUpperCase"]["eEfFgG".indexOf(i)%2],d=s+Math.abs(u)[f](c),H(d,s,g,a,m)[p]();default:return n}})}var X,z,G,J,W,Z,V,Q,ee,te,ne,re,le="prototype",ae=Object,oe=Array,ce=ae[le].hasOwnProperty,ie=ae[le].toString,ue=function(){},se="undefined"!=typeof Components&&"object"==typeof Components.classes&&"object"==typeof Components.classesByID&&Components.utils&&"function"==typeof Components.utils.import,fe="undefined"!=typeof global&&"[object global]"===ie.call(global),pe=this,de=se?Components.utils:null,he=se?Components.classes:null,ge=se?Components.interfaces:null,_e=se?de.import:fe?require:ue,me=fe?_e("fs"):null,be=se?function(e,t){return _e(t,pe),pe[e]}:fe?function(e,t){return _e(t)}:ue,ye=function(){return window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")},Ce=!1,xe=!1,Oe="<%",ve="%>",Ae="",De="",Ee="\n",Se=!0,je="",ke=!1,Te=0,Me=" ",we=0,Ie=0,Le=0,Fe=0,Ne=2,Be=null,Re=null,Ue=null,Pe=null,$e=null,He=-1,Ke=null,Ye=null,qe=0,Xe=/[\W]+/g,ze=/\n\r|\r\n|\n|\r/g,Ge=/'/g,Je=/[\/\\]/,We=/[\/\\]?[^\/\\]+$/,Ze=/<[^<>]+>/gm,Ve=/&+/g,Qe=/^[a-zA-Z_]/,et=/^[0-9]/,tt=/^[a-zA-Z0-9_]/i,nt=/^\s/,rt=/(\t|\s?)\s*((#ID_(continue|endblock|elsefor|endfor|endif|break|else|fi)#(\s*\(\s*\))?)|(#ID_([^#]+)#\s*(\()))(.*)$/g,lt=["set","unset","isset","if","elseif","else","endif","for","elsefor","endfor","extends","block","endblock","include","super","getblock","iif","empty","continue","break","local_set"],at={elif:"elseif",fi:"endif"},ot=["s","n","f","q","qq","echo","time","count","lowercase","uppercase","ucfirst","lcfirst","sprintf","date","ldate","locale","xlocale","inline","tpl","uuid","haskey","concat","ltrim","rtrim","trim","addslashes","stripslashes","is_array","in_array","json_encode","json_decode","camelcase","snakecase","e","url","nlocale","nxlocale","join","queryvar","striptags"],ct={l:"locale",xl:"xlocale",nl:"nlocale",nxl:"nxlocale",cc:"concat",j:"join",dq:"qq",now:"time",template:"tpl"};se&&(_e("resource://gre/modules/NetUtil.jsm"),_e("resource://gre/modules/FileUtils.jsm"));var it=/#STR_\d+#/g;E.multisplit=function(e,t,n){var r,l,a,o,c,i,u,s,f,p;n=!!n,i=[[1,e]];for(r in t)if(t.hasOwnProperty(r)){for(s=[],l=n?t[r]:r,a=[0,t[r]],o=0,f=i.length;o1)for(c=0;c0?"object"==typeof t[0]?X.join(e,t[0],n):!n||null!=t[0]&&String(t[0]).length?String(t[0]):"":"";for(r=1;r0)&&(o+=e+l);return o},queryvar:function(e,t,n){var r,l,a,o,c,i,u,s;if(null!=n){for(c=(r=[].concat(n)).length,o=0;o