/usr/share/javascript/dojox/dtl.js is in libjs-dojo-dojox 1.10.2+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | /*
Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
/*
This is an optimized version of Dojo, built for deployment and not for
development. To get sources and documentation, please visit:
http://dojotoolkit.org
*/
//>>built
require({cache:{"dojox/dtl/_base":function(){define(["dojo/_base/kernel","dojo/_base/lang","dojox/string/tokenize","dojo/_base/json","dojo/dom","dojo/_base/xhr","dojox/string/Builder","dojo/_base/Deferred"],function(_1,_2,_3,_4,_5,_6,_7,_8){_1.experimental("dojox.dtl");var dd=_2.getObject("dojox.dtl",true);dd._base={};dd.TOKEN_BLOCK=-1;dd.TOKEN_VAR=-2;dd.TOKEN_COMMENT=-3;dd.TOKEN_TEXT=3;dd._Context=_2.extend(function(_9){if(_9){_2._mixin(this,_9);if(_9.get){this._getter=_9.get;delete this.get;}}},{push:function(){var _a=this;var _b=_2.delegate(this);_b.pop=function(){return _a;};return _b;},pop:function(){throw new Error("pop() called on empty Context");},get:function(_c,_d){var n=this._normalize;if(this._getter){var _e=this._getter(_c);if(_e!==undefined){return n(_e);}}if(this[_c]!==undefined){return n(this[_c]);}return _d;},_normalize:function(_f){if(_f instanceof Date){_f.year=_f.getFullYear();_f.month=_f.getMonth()+1;_f.day=_f.getDate();_f.date=_f.year+"-"+("0"+_f.month).slice(-2)+"-"+("0"+_f.day).slice(-2);_f.hour=_f.getHours();_f.minute=_f.getMinutes();_f.second=_f.getSeconds();_f.microsecond=_f.getMilliseconds();}return _f;},update:function(_10){var _11=this.push();if(_10){_2._mixin(this,_10);}return _11;}});var _12=/("(?:[^"\\]*(?:\\.[^"\\]*)*)"|'(?:[^'\\]*(?:\\.[^'\\]*)*)'|[^\s]+)/g;var _13=/\s+/g;var _14=function(_15,_16){_15=_15||_13;if(!(_15 instanceof RegExp)){_15=new RegExp(_15,"g");}if(!_15.global){throw new Error("You must use a globally flagged RegExp with split "+_15);}_15.exec("");var _17,_18=[],_19=0,i=0;while((_17=_15.exec(this))){_18.push(this.slice(_19,_15.lastIndex-_17[0].length));_19=_15.lastIndex;if(_16&&(++i>_16-1)){break;}}_18.push(this.slice(_19));return _18;};dd.Token=function(_1a,_1b){this.token_type=_1a;this.contents=new String(_2.trim(_1b));this.contents.split=_14;this.split=function(){return String.prototype.split.apply(this.contents,arguments);};};dd.Token.prototype.split_contents=function(_1c){var bit,_1d=[],i=0;_1c=_1c||999;while(i++<_1c&&(bit=_12.exec(this.contents))){bit=bit[0];if(bit.charAt(0)=="\""&&bit.slice(-1)=="\""){_1d.push("\""+bit.slice(1,-1).replace("\\\"","\"").replace("\\\\","\\")+"\"");}else{if(bit.charAt(0)=="'"&&bit.slice(-1)=="'"){_1d.push("'"+bit.slice(1,-1).replace("\\'","'").replace("\\\\","\\")+"'");}else{_1d.push(bit);}}}return _1d;};var ddt=dd.text={_get:function(_1e,_1f,_20){var _21=dd.register.get(_1e,_1f.toLowerCase(),_20);if(!_21){if(!_20){throw new Error("No tag found for "+_1f);}return null;}var fn=_21[1];var _22=_21[2];var _23;if(fn.indexOf(":")!=-1){_23=fn.split(":");fn=_23.pop();}var mod=_22;if(/\./.test(_22)){_22=_22.replace(/\./g,"/");}require([_22],function(){});var _24=_2.getObject(mod);return _24[fn||_1f]||_24[_1f+"_"]||_24[fn+"_"];},getTag:function(_25,_26){return ddt._get("tag",_25,_26);},getFilter:function(_27,_28){return ddt._get("filter",_27,_28);},getTemplate:function(_29){return new dd.Template(ddt.getTemplateString(_29));},getTemplateString:function(_2a){return _6._getText(_2a.toString())||"";},_resolveLazy:function(_2b,_2c,_2d){if(_2c){if(_2d){return _2d.fromJson(_6._getText(_2b))||{};}else{return dd.text.getTemplateString(_2b);}}else{return _6.get({handleAs:_2d?"json":"text",url:_2b});}},_resolveTemplateArg:function(arg,_2e){if(ddt._isTemplate(arg)){if(!_2e){var d=new _8();d.callback(arg);return d;}return arg;}return ddt._resolveLazy(arg,_2e);},_isTemplate:function(arg){return (arg===undefined)||(typeof arg=="string"&&(arg.match(/^\s*[<{]/)||arg.indexOf(" ")!=-1));},_resolveContextArg:function(arg,_2f){if(arg.constructor==Object){if(!_2f){var d=new _8();d.callback(arg);return d;}return arg;}return ddt._resolveLazy(arg,_2f,true);},_re:/(?:\{\{\s*(.+?)\s*\}\}|\{%\s*(load\s*)?(.+?)\s*%\})/g,tokenize:function(str){return _3(str,ddt._re,ddt._parseDelims);},_parseDelims:function(_30,_31,tag){if(_30){return [dd.TOKEN_VAR,_30];}else{if(_31){var _32=_2.trim(tag).split(/\s+/g);for(var i=0,_33;_33=_32[i];i++){if(/\./.test(_33)){_33=_33.replace(/\./g,"/");}require([_33]);}}else{return [dd.TOKEN_BLOCK,tag];}}}};dd.Template=_2.extend(function(_34,_35){var str=_35?_34:ddt._resolveTemplateArg(_34,true)||"";var _36=ddt.tokenize(str);var _37=new dd._Parser(_36);this.nodelist=_37.parse();},{update:function(_38,_39){return ddt._resolveContextArg(_39).addCallback(this,function(_3a){var _3b=this.render(new dd._Context(_3a));if(_38.forEach){_38.forEach(function(_3c){_3c.innerHTML=_3b;});}else{_5.byId(_38).innerHTML=_3b;}return this;});},render:function(_3d,_3e){_3e=_3e||this.getBuffer();_3d=_3d||new dd._Context({});return this.nodelist.render(_3d,_3e)+"";},getBuffer:function(){return new _7();}});var _3f=/\{\{\s*(.+?)\s*\}\}/g;dd.quickFilter=function(str){if(!str){return new dd._NodeList();}if(str.indexOf("{%")==-1){return new dd._QuickNodeList(_3(str,_3f,function(_40){return new dd._Filter(_40);}));}};dd._QuickNodeList=_2.extend(function(_41){this.contents=_41;},{render:function(_42,_43){for(var i=0,l=this.contents.length;i<l;i++){if(this.contents[i].resolve){_43=_43.concat(this.contents[i].resolve(_42));}else{_43=_43.concat(this.contents[i]);}}return _43;},dummyRender:function(_44){return this.render(_44,dd.Template.prototype.getBuffer()).toString();},clone:function(_45){return this;}});dd._Filter=_2.extend(function(_46){if(!_46){throw new Error("Filter must be called with variable name");}this.contents=_46;var _47=this._cache[_46];if(_47){this.key=_47[0];this.filters=_47[1];}else{this.filters=[];_3(_46,this._re,this._tokenize,this);this._cache[_46]=[this.key,this.filters];}},{_cache:{},_re:/(?:^_\("([^\\"]*(?:\\.[^\\"])*)"\)|^"([^\\"]*(?:\\.[^\\"]*)*)"|^([a-zA-Z0-9_.]+)|\|(\w+)(?::(?:_\("([^\\"]*(?:\\.[^\\"])*)"\)|"([^\\"]*(?:\\.[^\\"]*)*)"|([a-zA-Z0-9_.]+)|'([^\\']*(?:\\.[^\\']*)*)'))?|^'([^\\']*(?:\\.[^\\']*)*)')/g,_values:{0:"\"",1:"\"",2:"",8:"\""},_args:{4:"\"",5:"\"",6:"",7:"'"},_tokenize:function(){var pos,arg;for(var i=0,has=[];i<arguments.length;i++){has[i]=(arguments[i]!==undefined&&typeof arguments[i]=="string"&&arguments[i]);}if(!this.key){for(pos in this._values){if(has[pos]){this.key=this._values[pos]+arguments[pos]+this._values[pos];break;}}}else{for(pos in this._args){if(has[pos]){var _48=arguments[pos];if(this._args[pos]=="'"){_48=_48.replace(/\\'/g,"'");}else{if(this._args[pos]=="\""){_48=_48.replace(/\\"/g,"\"");}}arg=[!this._args[pos],_48];break;}}var fn=ddt.getFilter(arguments[3]);if(!_2.isFunction(fn)){throw new Error(arguments[3]+" is not registered as a filter");}this.filters.push([fn,arg]);}},getExpression:function(){return this.contents;},resolve:function(_49){if(this.key===undefined){return "";}var str=this.resolvePath(this.key,_49);for(var i=0,_4a;_4a=this.filters[i];i++){if(_4a[1]){if(_4a[1][0]){str=_4a[0](str,this.resolvePath(_4a[1][1],_49));}else{str=_4a[0](str,_4a[1][1]);}}else{str=_4a[0](str);}}return str;},resolvePath:function(_4b,_4c){var _4d,_4e;var _4f=_4b.charAt(0);var _50=_4b.slice(-1);if(!isNaN(parseInt(_4f))){_4d=(_4b.indexOf(".")==-1)?parseInt(_4b):parseFloat(_4b);}else{if(_4f=="\""&&_4f==_50){_4d=_4b.slice(1,-1);}else{if(_4b=="true"){return true;}if(_4b=="false"){return false;}if(_4b=="null"||_4b=="None"){return null;}_4e=_4b.split(".");_4d=_4c.get(_4e[0]);if(_2.isFunction(_4d)){var _51=_4c.getThis&&_4c.getThis();if(_4d.alters_data){_4d="";}else{if(_51){_4d=_4d.call(_51);}else{_4d="";}}}for(var i=1;i<_4e.length;i++){var _52=_4e[i];if(_4d){var _53=_4d;if(_2.isObject(_4d)&&_52=="items"&&_4d[_52]===undefined){var _54=[];for(var key in _4d){_54.push([key,_4d[key]]);}_4d=_54;continue;}if(_4d.get&&_2.isFunction(_4d.get)&&_4d.get.safe){_4d=_4d.get(_52);}else{if(_4d[_52]===undefined){_4d=_4d[_52];break;}else{_4d=_4d[_52];}}if(_2.isFunction(_4d)){if(_4d.alters_data){_4d="";}else{_4d=_4d.call(_53);}}else{if(_4d instanceof Date){_4d=dd._Context.prototype._normalize(_4d);}}}else{return "";}}}}return _4d;}});dd._TextNode=dd._Node=_2.extend(function(obj){this.contents=obj;},{set:function(_55){this.contents=_55;return this;},render:function(_56,_57){return _57.concat(this.contents);},isEmpty:function(){return !_2.trim(this.contents);},clone:function(){return this;}});dd._NodeList=_2.extend(function(_58){this.contents=_58||[];this.last="";},{push:function(_59){this.contents.push(_59);return this;},concat:function(_5a){this.contents=this.contents.concat(_5a);return this;},render:function(_5b,_5c){for(var i=0;i<this.contents.length;i++){_5c=this.contents[i].render(_5b,_5c);if(!_5c){throw new Error("Template must return buffer");}}return _5c;},dummyRender:function(_5d){return this.render(_5d,dd.Template.prototype.getBuffer()).toString();},unrender:function(){return arguments[1];},clone:function(){return this;},rtrim:function(){while(1){i=this.contents.length-1;if(this.contents[i] instanceof dd._TextNode&&this.contents[i].isEmpty()){this.contents.pop();}else{break;}}return this;}});dd._VarNode=_2.extend(function(str){this.contents=new dd._Filter(str);},{render:function(_5e,_5f){var str=this.contents.resolve(_5e);if(!str.safe){str=dd._base.escape(""+str);}return _5f.concat(str);}});dd._noOpNode=new function(){this.render=this.unrender=function(){return arguments[1];};this.clone=function(){return this;};}();dd._Parser=_2.extend(function(_60){this.contents=_60;},{i:0,parse:function(_61){var _62={},_63;_61=_61||[];for(var i=0;i<_61.length;i++){_62[_61[i]]=true;}var _64=new dd._NodeList();while(this.i<this.contents.length){_63=this.contents[this.i++];if(typeof _63=="string"){_64.push(new dd._TextNode(_63));}else{var _65=_63[0];var _66=_63[1];if(_65==dd.TOKEN_VAR){_64.push(new dd._VarNode(_66));}else{if(_65==dd.TOKEN_BLOCK){if(_62[_66]){--this.i;return _64;}var cmd=_66.split(/\s+/g);if(cmd.length){cmd=cmd[0];var fn=ddt.getTag(cmd);if(fn){_64.push(fn(this,new dd.Token(_65,_66)));}}}}}}if(_61.length){throw new Error("Could not find closing tag(s): "+_61.toString());}this.contents.length=0;return _64;},next_token:function(){var _67=this.contents[this.i++];return new dd.Token(_67[0],_67[1]);},delete_first_token:function(){this.i++;},skip_past:function(_68){while(this.i<this.contents.length){var _69=this.contents[this.i++];if(_69[0]==dd.TOKEN_BLOCK&&_69[1]==_68){return;}}throw new Error("Unclosed tag found when looking for "+_68);},create_variable_node:function(_6a){return new dd._VarNode(_6a);},create_text_node:function(_6b){return new dd._TextNode(_6b||"");},getTemplate:function(_6c){return new dd.Template(_6c);}});dd.register={_registry:{attributes:[],tags:[],filters:[]},get:function(_6d,_6e){var _6f=dd.register._registry[_6d+"s"];for(var i=0,_70;_70=_6f[i];i++){if(typeof _70[0]=="string"){if(_70[0]==_6e){return _70;}}else{if(_6e.match(_70[0])){return _70;}}}},getAttributeTags:function(){var _71=[];var _72=dd.register._registry.attributes;for(var i=0,_73;_73=_72[i];i++){if(_73.length==3){_71.push(_73);}else{var fn=_2.getObject(_73[1]);if(fn&&_2.isFunction(fn)){_73.push(fn);_71.push(_73);}}}return _71;},_any:function(_74,_75,_76){for(var _77 in _76){for(var i=0,fn;fn=_76[_77][i];i++){var key=fn;if(_2.isArray(fn)){key=fn[0];fn=fn[1];}if(typeof key=="string"){if(key.substr(0,5)=="attr:"){var _78=fn;if(_78.substr(0,5)=="attr:"){_78=_78.slice(5);}dd.register._registry.attributes.push([_78.toLowerCase(),_75+"."+_77+"."+_78]);}key=key.toLowerCase();}dd.register._registry[_74].push([key,fn,_75+"."+_77]);}}},tags:function(_79,_7a){dd.register._any("tags",_79,_7a);},filters:function(_7b,_7c){dd.register._any("filters",_7b,_7c);}};var _7d=/&/g;var _7e=/</g;var _7f=/>/g;var _80=/'/g;var _81=/"/g;dd._base.escape=function(_82){return dd.mark_safe(_82.replace(_7d,"&").replace(_7e,"<").replace(_7f,">").replace(_81,""").replace(_80,"'"));};dd._base.safe=function(_83){if(typeof _83=="string"){_83=new String(_83);}if(typeof _83=="object"){_83.safe=true;}return _83;};dd.mark_safe=dd._base.safe;dd.register.tags("dojox.dtl.tag",{"date":["now"],"logic":["if","for","ifequal","ifnotequal"],"loader":["extends","block","include","load","ssi"],"misc":["comment","debug","filter","firstof","spaceless","templatetag","widthratio","with"],"loop":["cycle","ifchanged","regroup"]});dd.register.filters("dojox.dtl.filter",{"dates":["date","time","timesince","timeuntil"],"htmlstrings":["linebreaks","linebreaksbr","removetags","striptags"],"integers":["add","get_digit"],"lists":["dictsort","dictsortreversed","first","join","length","length_is","random","slice","unordered_list"],"logic":["default","default_if_none","divisibleby","yesno"],"misc":["filesizeformat","pluralize","phone2numeric","pprint"],"strings":["addslashes","capfirst","center","cut","fix_ampersands","floatformat","iriencode","linenumbers","ljust","lower","make_list","rjust","slugify","stringformat","title","truncatewords","truncatewords_html","upper","urlencode","urlize","urlizetrunc","wordcount","wordwrap"]});dd.register.filters("dojox.dtl",{"_base":["escape","safe"]});return dd;});},"dojox/string/tokenize":function(){define(["dojo/_base/lang","dojo/_base/sniff"],function(_84,has){var _85=_84.getObject("dojox.string",true).tokenize;_85=function(str,re,_86,_87){var _88=[];var _89,_8a,_8b=0;while(_89=re.exec(str)){_8a=str.slice(_8b,re.lastIndex-_89[0].length);if(_8a.length){_88.push(_8a);}if(_86){if(has("opera")){var _8c=_89.slice(0);while(_8c.length<_89.length){_8c.push(null);}_89=_8c;}var _8d=_86.apply(_87,_89.slice(1).concat(_88.length));if(typeof _8d!="undefined"){_88.push(_8d);}}_8b=re.lastIndex;}_8a=str.slice(_8b);if(_8a.length){_88.push(_8a);}return _88;};return _85;});},"dojox/string/Builder":function(){define(["dojo/_base/lang"],function(_8e){var _8f=_8e.getObject("string",true,dojox).Builder=function(str){var b="";this.length=0;this.append=function(s){if(arguments.length>1){var tmp="",l=arguments.length;switch(l){case 9:tmp=""+arguments[8]+tmp;case 8:tmp=""+arguments[7]+tmp;case 7:tmp=""+arguments[6]+tmp;case 6:tmp=""+arguments[5]+tmp;case 5:tmp=""+arguments[4]+tmp;case 4:tmp=""+arguments[3]+tmp;case 3:tmp=""+arguments[2]+tmp;case 2:b+=""+arguments[0]+arguments[1]+tmp;break;default:var i=0;while(i<arguments.length){tmp+=arguments[i++];}b+=tmp;}}else{b+=s;}this.length=b.length;return this;};this.concat=function(s){return this.append.apply(this,arguments);};this.appendArray=function(_90){return this.append.apply(this,_90);};this.clear=function(){b="";this.length=0;return this;};this.replace=function(_91,_92){b=b.replace(_91,_92);this.length=b.length;return this;};this.remove=function(_93,len){if(len===undefined){len=b.length;}if(len==0){return this;}b=b.substr(0,_93)+b.substr(_93+len);this.length=b.length;return this;};this.insert=function(_94,str){if(_94==0){b=str+b;}else{b=b.slice(0,_94)+str+b.slice(_94);}this.length=b.length;return this;};this.toString=function(){return b;};if(str){this.append(str);}};return _8f;});},"dojox/dtl/Context":function(){define(["dojo/_base/lang","./_base"],function(_95,dd){return dd.Context=_95.extend(function(_96){this._this={};dd._Context.call(this,_96);},dd._Context.prototype,{getKeys:function(){var _97=[];for(var key in this){if(this.hasOwnProperty(key)&&key!="_this"){_97.push(key);}}return _97;},extend:function(obj){return _95.delegate(this,obj);},filter:function(_98){var _99=new dd.Context();var _9a=[];var i,arg;if(_98 instanceof dd.Context){_9a=_98.getKeys();}else{if(typeof _98=="object"){for(var key in _98){_9a.push(key);}}else{for(i=0;arg=arguments[i];i++){if(typeof arg=="string"){_9a.push(arg);}}}}for(i=0,key;key=_9a[i];i++){_99[key]=this[key];}return _99;},setThis:function(_9b){this._this=_9b;},getThis:function(){return this._this;},hasKey:function(key){if(this._getter){var got=this._getter(key);if(typeof got!="undefined"){return true;}}if(typeof this[key]!="undefined"){return true;}return false;}});});},"dojox/dtl/tag/logic":function(){define(["dojo/_base/lang","../_base"],function(_9c,dd){var _9d=_9c.getObject("tag.logic",true,dd);var ddt=dd.text;_9d.IfNode=_9c.extend(function(_9e,_9f,_a0,_a1){this.bools=_9e;this.trues=_9f;this.falses=_a0;this.type=_a1;},{render:function(_a2,_a3){var i,_a4,_a5,_a6,_a7;if(this.type=="or"){for(i=0;_a4=this.bools[i];i++){_a5=_a4[0];_a6=_a4[1];_a7=_a6.resolve(_a2);if((_a7&&!_a5)||(_a5&&!_a7)){if(this.falses){_a3=this.falses.unrender(_a2,_a3);}return (this.trues)?this.trues.render(_a2,_a3,this):_a3;}}if(this.trues){_a3=this.trues.unrender(_a2,_a3);}return (this.falses)?this.falses.render(_a2,_a3,this):_a3;}else{for(i=0;_a4=this.bools[i];i++){_a5=_a4[0];_a6=_a4[1];_a7=_a6.resolve(_a2);if(_a7==_a5){if(this.trues){_a3=this.trues.unrender(_a2,_a3);}return (this.falses)?this.falses.render(_a2,_a3,this):_a3;}}if(this.falses){_a3=this.falses.unrender(_a2,_a3);}return (this.trues)?this.trues.render(_a2,_a3,this):_a3;}return _a3;},unrender:function(_a8,_a9){_a9=(this.trues)?this.trues.unrender(_a8,_a9):_a9;_a9=(this.falses)?this.falses.unrender(_a8,_a9):_a9;return _a9;},clone:function(_aa){var _ab=(this.trues)?this.trues.clone(_aa):null;var _ac=(this.falses)?this.falses.clone(_aa):null;return new this.constructor(this.bools,_ab,_ac,this.type);}});_9d.IfEqualNode=_9c.extend(function(_ad,_ae,_af,_b0,_b1){this.var1=new dd._Filter(_ad);this.var2=new dd._Filter(_ae);this.trues=_af;this.falses=_b0;this.negate=_b1;},{render:function(_b2,_b3){var _b4=this.var1.resolve(_b2);var _b5=this.var2.resolve(_b2);_b4=(typeof _b4!="undefined")?_b4:"";_b5=(typeof _b4!="undefined")?_b5:"";if((this.negate&&_b4!=_b5)||(!this.negate&&_b4==_b5)){if(this.falses){_b3=this.falses.unrender(_b2,_b3,this);}return (this.trues)?this.trues.render(_b2,_b3,this):_b3;}if(this.trues){_b3=this.trues.unrender(_b2,_b3,this);}return (this.falses)?this.falses.render(_b2,_b3,this):_b3;},unrender:function(_b6,_b7){return _9d.IfNode.prototype.unrender.call(this,_b6,_b7);},clone:function(_b8){var _b9=this.trues?this.trues.clone(_b8):null;var _ba=this.falses?this.falses.clone(_b8):null;return new this.constructor(this.var1.getExpression(),this.var2.getExpression(),_b9,_ba,this.negate);}});_9d.ForNode=_9c.extend(function(_bb,_bc,_bd,_be){this.assign=_bb;this.loop=new dd._Filter(_bc);this.reversed=_bd;this.nodelist=_be;this.pool=[];},{render:function(_bf,_c0){var i,j,k;var _c1=false;var _c2=this.assign;for(k=0;k<_c2.length;k++){if(typeof _bf[_c2[k]]!="undefined"){_c1=true;_bf=_bf.push();break;}}if(!_c1&&_bf.forloop){_c1=true;_bf=_bf.push();}var _c3=this.loop.resolve(_bf)||[];var _c4=_9c.isObject(_c3)&&!_9c.isArrayLike(_c3);var _c5=[];if(_c4){for(var key in _c3){_c5.push(_c3[key]);}}else{_c5=_c3;}for(i=_c5.length;i<this.pool.length;i++){this.pool[i].unrender(_bf,_c0,this);}if(this.reversed){_c5=_c5.slice(0).reverse();}var _c6=_bf.forloop={parentloop:_bf.get("forloop",{})};var j=0;for(i=0;i<_c5.length;i++){var _c7=_c5[i];_c6.counter0=j;_c6.counter=j+1;_c6.revcounter0=_c5.length-j-1;_c6.revcounter=_c5.length-j;_c6.first=!j;_c6.last=(j==_c5.length-1);if(_c2.length>1&&_9c.isArrayLike(_c7)){if(!_c1){_c1=true;_bf=_bf.push();}var _c8={};for(k=0;k<_c7.length&&k<_c2.length;k++){_c8[_c2[k]]=_c7[k];}_9c.mixin(_bf,_c8);}else{_bf[_c2[0]]=_c7;}if(j+1>this.pool.length){this.pool.push(this.nodelist.clone(_c0));}_c0=this.pool[j++].render(_bf,_c0,this);}delete _bf.forloop;if(_c1){_bf=_bf.pop();}else{for(k=0;k<_c2.length;k++){delete _bf[_c2[k]];}}return _c0;},unrender:function(_c9,_ca){for(var i=0,_cb;_cb=this.pool[i];i++){_ca=_cb.unrender(_c9,_ca);}return _ca;},clone:function(_cc){return new this.constructor(this.assign,this.loop.getExpression(),this.reversed,this.nodelist.clone(_cc));}});_9c.mixin(_9d,{if_:function(_cd,_ce){var i,_cf,_d0,_d1=[],_d2=_ce.contents.split();_d2.shift();_ce=_d2.join(" ");_d2=_ce.split(" and ");if(_d2.length==1){_d0="or";_d2=_ce.split(" or ");}else{_d0="and";for(i=0;i<_d2.length;i++){if(_d2[i].indexOf(" or ")!=-1){throw new Error("'if' tags can't mix 'and' and 'or'");}}}for(i=0;_cf=_d2[i];i++){var not=false;if(_cf.indexOf("not ")==0){_cf=_cf.slice(4);not=true;}_d1.push([not,new dd._Filter(_cf)]);}var _d3=_cd.parse(["else","endif"]);var _d4=false;var _ce=_cd.next_token();if(_ce.contents=="else"){_d4=_cd.parse(["endif"]);_cd.next_token();}return new _9d.IfNode(_d1,_d3,_d4,_d0);},_ifequal:function(_d5,_d6,_d7){var _d8=_d6.split_contents();if(_d8.length!=3){throw new Error(_d8[0]+" takes two arguments");}var end="end"+_d8[0];var _d9=_d5.parse(["else",end]);var _da=false;var _d6=_d5.next_token();if(_d6.contents=="else"){_da=_d5.parse([end]);_d5.next_token();}return new _9d.IfEqualNode(_d8[1],_d8[2],_d9,_da,_d7);},ifequal:function(_db,_dc){return _9d._ifequal(_db,_dc);},ifnotequal:function(_dd,_de){return _9d._ifequal(_dd,_de,true);},for_:function(_df,_e0){var _e1=_e0.contents.split();if(_e1.length<4){throw new Error("'for' statements should have at least four words: "+_e0.contents);}var _e2=_e1[_e1.length-1]=="reversed";var _e3=(_e2)?-3:-2;if(_e1[_e1.length+_e3]!="in"){throw new Error("'for' tag received an invalid argument: "+_e0.contents);}var _e4=_e1.slice(1,_e3).join(" ").split(/ *, */);for(var i=0;i<_e4.length;i++){if(!_e4[i]||_e4[i].indexOf(" ")!=-1){throw new Error("'for' tag received an invalid argument: "+_e0.contents);}}var _e5=_df.parse(["endfor"]);_df.next_token();return new _9d.ForNode(_e4,_e1[_e1.length+_e3+1],_e2,_e5);}});return _9d;});},"dojox/dtl/tag/loop":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/_base/json","../_base","dojox/string/tokenize"],function(_e6,_e7,_e8,dd,_e9){var _ea=_e6.getObject("tag.loop",true,dd);_ea.CycleNode=_e6.extend(function(_eb,_ec,_ed,_ee){this.cyclevars=_eb;this.name=_ec;this.contents=_ed;this.shared=_ee||{counter:-1,map:{}};},{render:function(_ef,_f0){if(_ef.forloop&&!_ef.forloop.counter0){this.shared.counter=-1;}++this.shared.counter;var _f1=this.cyclevars[this.shared.counter%this.cyclevars.length];var map=this.shared.map;if(!map[_f1]){map[_f1]=new dd._Filter(_f1);}_f1=map[_f1].resolve(_ef,_f0);if(this.name){_ef[this.name]=_f1;}this.contents.set(_f1);return this.contents.render(_ef,_f0);},unrender:function(_f2,_f3){return this.contents.unrender(_f2,_f3);},clone:function(_f4){return new this.constructor(this.cyclevars,this.name,this.contents.clone(_f4),this.shared);}});_ea.IfChangedNode=_e6.extend(function(_f5,_f6,_f7){this.nodes=_f5;this._vars=_f6;this.shared=_f7||{last:null,counter:0};this.vars=_e7.map(_f6,function(_f8){return new dojox.dtl._Filter(_f8);});},{render:function(_f9,_fa){if(_f9.forloop){if(_f9.forloop.counter<=this.shared.counter){this.shared.last=null;}this.shared.counter=_f9.forloop.counter;}var _fb;if(this.vars.length){_fb=_e8.toJson(_e7.map(this.vars,function(_fc){return _fc.resolve(_f9);}));}else{_fb=this.nodes.dummyRender(_f9,_fa);}if(_fb!=this.shared.last){var _fd=(this.shared.last===null);this.shared.last=_fb;_f9=_f9.push();_f9.ifchanged={firstloop:_fd};_fa=this.nodes.render(_f9,_fa);_f9=_f9.pop();}else{_fa=this.nodes.unrender(_f9,_fa);}return _fa;},unrender:function(_fe,_ff){return this.nodes.unrender(_fe,_ff);},clone:function(_100){return new this.constructor(this.nodes.clone(_100),this._vars,this.shared);}});_ea.RegroupNode=_e6.extend(function(_101,key,_102){this._expression=_101;this.expression=new dd._Filter(_101);this.key=key;this.alias=_102;},{_push:function(_103,_104,_105){if(_105.length){_103.push({grouper:_104,list:_105});}},render:function(_106,_107){_106[this.alias]=[];var list=this.expression.resolve(_106);if(list){var last=null;var _108=[];for(var i=0;i<list.length;i++){var id=list[i][this.key];if(last!==id){this._push(_106[this.alias],last,_108);last=id;_108=[list[i]];}else{_108.push(list[i]);}}this._push(_106[this.alias],last,_108);}return _107;},unrender:function(_109,_10a){return _10a;},clone:function(_10b,_10c){return this;}});_e6.mixin(_ea,{cycle:function(_10d,_10e){var args=_10e.split_contents();if(args.length<2){throw new Error("'cycle' tag requires at least two arguments");}if(args[1].indexOf(",")!=-1){var vars=args[1].split(",");args=[args[0]];for(var i=0;i<vars.length;i++){args.push("\""+vars[i]+"\"");}}if(args.length==2){var name=args[args.length-1];if(!_10d._namedCycleNodes){throw new Error("No named cycles in template: '"+name+"' is not defined");}if(!_10d._namedCycleNodes[name]){throw new Error("Named cycle '"+name+"' does not exist");}return _10d._namedCycleNodes[name];}if(args.length>4&&args[args.length-2]=="as"){var name=args[args.length-1];var node=new _ea.CycleNode(args.slice(1,args.length-2),name,_10d.create_text_node());if(!_10d._namedCycleNodes){_10d._namedCycleNodes={};}_10d._namedCycleNodes[name]=node;}else{node=new _ea.CycleNode(args.slice(1),null,_10d.create_text_node());}return node;},ifchanged:function(_10f,_110){var _111=_110.contents.split();var _112=_10f.parse(["endifchanged"]);_10f.delete_first_token();return new _ea.IfChangedNode(_112,_111.slice(1));},regroup:function(_113,_114){var _115=_e9(_114.contents,/(\s+)/g,function(_116){return _116;});if(_115.length<11||_115[_115.length-3]!="as"||_115[_115.length-7]!="by"){throw new Error("Expected the format: regroup list by key as newList");}var _117=_115.slice(2,-8).join("");var key=_115[_115.length-5];var _118=_115[_115.length-1];return new _ea.RegroupNode(_117,key,_118);}});return _ea;});},"dojox/dtl/tag/date":function(){define(["dojo/_base/lang","../_base","../utils/date"],function(lang,dd,ddud){var date=lang.getObject("tag.date",true,dd);date.NowNode=function(_119,node){this._format=_119;this.format=new ddud.DateFormat(_119);this.contents=node;};lang.extend(date.NowNode,{render:function(_11a,_11b){this.contents.set(this.format.format(new Date()));return this.contents.render(_11a,_11b);},unrender:function(_11c,_11d){return this.contents.unrender(_11c,_11d);},clone:function(_11e){return new this.constructor(this._format,this.contents.clone(_11e));}});date.now=function(_11f,_120){var _121=_120.split_contents();if(_121.length!=2){throw new Error("'now' statement takes one argument");}return new date.NowNode(_121[1].slice(1,-1),_11f.create_text_node());};return date;});},"dojox/dtl/utils/date":function(){define(["dojo/_base/lang","dojox/date/php","../_base"],function(lang,ddp,dd){var date=lang.getObject("utils.date",true,dd);date.DateFormat=ddp.DateFormat;lang.extend(date.DateFormat,ddp.DateFormat.prototype,{f:function(){return (!this.date.getMinutes())?this.g():this.g()+":"+this.i();},N:function(){return date._months_ap[this.date.getMonth()];},P:function(){if(!this.date.getMinutes()&&!this.date.getHours()){return "midnight";}if(!this.date.getMinutes()&&this.date.getHours()==12){return "noon";}return this.f()+" "+this.a();}});lang.mixin(dojox.dtl.utils.date,{format:function(date,_122){var df=new dojox.dtl.utils.date.DateFormat(_122);return df.format(date);},timesince:function(d,now){if(!(d instanceof Date)){d=new Date(d.year,d.month,d.day);}if(!now){now=new Date();}var _123=Math.abs(now.getTime()-d.getTime());for(var i=0,_124;_124=dojox.dtl.utils.date._chunks[i];i++){var _125=Math.floor(_123/_124[0]);if(_125){break;}}return _125+" "+_124[1](_125);},_chunks:[[60*60*24*365*1000,function(n){return (n==1)?"year":"years";}],[60*60*24*30*1000,function(n){return (n==1)?"month":"months";}],[60*60*24*7*1000,function(n){return (n==1)?"week":"weeks";}],[60*60*24*1000,function(n){return (n==1)?"day":"days";}],[60*60*1000,function(n){return (n==1)?"hour":"hours";}],[60*1000,function(n){return (n==1)?"minute":"minutes";}]],_months_ap:["Jan.","Feb.","March","April","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."]});return date;});},"dojox/date/php":function(){define(["dojo/_base/kernel","dojo/_base/lang","dojo/date","dojox/string/tokenize"],function(dojo,_126,_127,dxst){var php=dojo.getObject("date.php",true,dojox);php.format=function(date,_128){var df=new php.DateFormat(_128);return df.format(date);};php.DateFormat=function(_129){if(!this.regex){var keys=[];for(var key in this.constructor.prototype){if(dojo.isString(key)&&key.length==1&&dojo.isFunction(this[key])){keys.push(key);}}this.constructor.prototype.regex=new RegExp("(?:(\\\\.)|(["+keys.join("")+"]))","g");}var _12a=[];this.tokens=dxst(_129,this.regex,function(_12b,_12c,i){if(_12c){_12a.push([i,_12c]);return _12c;}if(_12b){return _12b.charAt(1);}});this.replacements=_12a;};dojo.extend(php.DateFormat,{weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdays_3:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],months_3:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthdays:[31,28,31,30,31,30,31,31,30,31,30,31],format:function(date){this.date=date;for(var i=0,_12d;_12d=this.replacements[i];i++){this.tokens[_12d[0]]=this[_12d[1]]();}return this.tokens.join("");},d:function(){var j=this.j();return (j.length==1)?"0"+j:j;},D:function(){return this.weekdays_3[this.date.getDay()];},j:function(){return this.date.getDate()+"";},l:function(){return this.weekdays[this.date.getDay()];},N:function(){var w=this.w();return (!w)?7:w;},S:function(){switch(this.date.getDate()){case 11:case 12:case 13:return "th";case 1:case 21:case 31:return "st";case 2:case 22:return "nd";case 3:case 23:return "rd";default:return "th";}},w:function(){return this.date.getDay()+"";},z:function(){var _12e=this.date.getTime()-new Date(this.date.getFullYear(),0,1).getTime();return Math.floor(_12e/86400000)+"";},W:function(){var week;var _12f=new Date(this.date.getFullYear(),0,1).getDay()+1;var w=this.date.getDay()+1;var z=parseInt(this.z());if(z<=(8-_12f)&&_12f>4){var _130=new Date(this.date.getFullYear()-1,this.date.getMonth(),this.date.getDate());if(_12f==5||(_12f==6&&_127.isLeapYear(_130))){week=53;}else{week=52;}}else{var i;if(Boolean(this.L())){i=366;}else{i=365;}if((i-z)<(4-w)){week=1;}else{var j=z+(7-w)+(_12f-1);week=Math.ceil(j/7);if(_12f>4){--week;}}}return week;},F:function(){return this.months[this.date.getMonth()];},m:function(){var n=this.n();return (n.length==1)?"0"+n:n;},M:function(){return this.months_3[this.date.getMonth()];},n:function(){return this.date.getMonth()+1+"";},t:function(){return (Boolean(this.L())&&this.date.getMonth()==1)?29:this.monthdays[this.getMonth()];},L:function(){return (_127.isLeapYear(this.date))?"1":"0";},o:function(){},Y:function(){return this.date.getFullYear()+"";},y:function(){return this.Y().slice(-2);},a:function(){return this.date.getHours()>=12?"pm":"am";},b:function(){return this.a().toUpperCase();},B:function(){var off=this.date.getTimezoneOffset()+60;var secs=(this.date.getHours()*3600)+(this.date.getMinutes()*60)+this.getSeconds()+(off*60);var beat=Math.abs(Math.floor(secs/86.4)%1000)+"";while(beat.length<2){beat="0"+beat;}return beat;},g:function(){return (this.date.getHours()%12||12)+"";},G:function(){return this.date.getHours()+"";},h:function(){var g=this.g();return (g.length==1)?"0"+g:g;},H:function(){var G=this.G();return (G.length==1)?"0"+G:G;},i:function(){var mins=this.date.getMinutes()+"";return (mins.length==1)?"0"+mins:mins;},s:function(){var secs=this.date.getSeconds()+"";return (secs.length==1)?"0"+secs:secs;},e:function(){return _127.getTimezoneName(this.date);},I:function(){},O:function(){var off=Math.abs(this.date.getTimezoneOffset());var _131=Math.floor(off/60)+"";var mins=(off%60)+"";if(_131.length==1){_131="0"+_131;}if(mins.length==1){_131="0"+mins;}return ((this.date.getTimezoneOffset()<0)?"+":"-")+_131+mins;},P:function(){var O=this.O();return O.substring(0,2)+":"+O.substring(2,4);},T:function(){return this.e().substring(0,3);},Z:function(){return this.date.getTimezoneOffset()*-60;},c:function(){return this.Y()+"-"+this.m()+"-"+this.d()+"T"+this.h()+":"+this.i()+":"+this.s()+this.P();},r:function(){return this.D()+", "+this.d()+" "+this.M()+" "+this.Y()+" "+this.H()+":"+this.i()+":"+this.s()+" "+this.O();},U:function(){return Math.floor(this.date.getTime()/1000);}});return php;});},"dojo/date":function(){define(["./has","./_base/lang"],function(has,lang){var date={};date.getDaysInMonth=function(_132){var _133=_132.getMonth();var days=[31,28,31,30,31,30,31,31,30,31,30,31];if(_133==1&&date.isLeapYear(_132)){return 29;}return days[_133];};date.isLeapYear=function(_134){var year=_134.getFullYear();return !(year%400)||(!(year%4)&&!!(year%100));};date.getTimezoneName=function(_135){var str=_135.toString();var tz="";var _136;var pos=str.indexOf("(");if(pos>-1){tz=str.substring(++pos,str.indexOf(")"));}else{var pat=/([A-Z\/]+) \d{4}$/;if((_136=str.match(pat))){tz=_136[1];}else{str=_135.toLocaleString();pat=/ ([A-Z\/]+)$/;if((_136=str.match(pat))){tz=_136[1];}}}return (tz=="AM"||tz=="PM")?"":tz;};date.compare=function(_137,_138,_139){_137=new Date(+_137);_138=new Date(+(_138||new Date()));if(_139=="date"){_137.setHours(0,0,0,0);_138.setHours(0,0,0,0);}else{if(_139=="time"){_137.setFullYear(0,0,0);_138.setFullYear(0,0,0);}}if(_137>_138){return 1;}if(_137<_138){return -1;}return 0;};date.add=function(date,_13a,_13b){var sum=new Date(+date);var _13c=false;var _13d="Date";switch(_13a){case "day":break;case "weekday":var days,_13e;var mod=_13b%5;if(!mod){days=(_13b>0)?5:-5;_13e=(_13b>0)?((_13b-5)/5):((_13b+5)/5);}else{days=mod;_13e=parseInt(_13b/5);}var strt=date.getDay();var adj=0;if(strt==6&&_13b>0){adj=1;}else{if(strt==0&&_13b<0){adj=-1;}}var trgt=strt+days;if(trgt==0||trgt==6){adj=(_13b>0)?2:-2;}_13b=(7*_13e)+days+adj;break;case "year":_13d="FullYear";_13c=true;break;case "week":_13b*=7;break;case "quarter":_13b*=3;case "month":_13c=true;_13d="Month";break;default:_13d="UTC"+_13a.charAt(0).toUpperCase()+_13a.substring(1)+"s";}if(_13d){sum["set"+_13d](sum["get"+_13d]()+_13b);}if(_13c&&(sum.getDate()<date.getDate())){sum.setDate(0);}return sum;};date.difference=function(_13f,_140,_141){_140=_140||new Date();_141=_141||"day";var _142=_140.getFullYear()-_13f.getFullYear();var _143=1;switch(_141){case "quarter":var m1=_13f.getMonth();var m2=_140.getMonth();var q1=Math.floor(m1/3)+1;var q2=Math.floor(m2/3)+1;q2+=(_142*4);_143=q2-q1;break;case "weekday":var days=Math.round(date.difference(_13f,_140,"day"));var _144=parseInt(date.difference(_13f,_140,"week"));var mod=days%7;if(mod==0){days=_144*5;}else{var adj=0;var aDay=_13f.getDay();var bDay=_140.getDay();_144=parseInt(days/7);mod=days%7;var _145=new Date(_13f);_145.setDate(_145.getDate()+(_144*7));var _146=_145.getDay();if(days>0){switch(true){case aDay==6:adj=-1;break;case aDay==0:adj=0;break;case bDay==6:adj=-1;break;case bDay==0:adj=-2;break;case (_146+mod)>5:adj=-2;}}else{if(days<0){switch(true){case aDay==6:adj=0;break;case aDay==0:adj=1;break;case bDay==6:adj=2;break;case bDay==0:adj=1;break;case (_146+mod)<0:adj=2;}}}days+=adj;days-=(_144*2);}_143=days;break;case "year":_143=_142;break;case "month":_143=(_140.getMonth()-_13f.getMonth())+(_142*12);break;case "week":_143=parseInt(date.difference(_13f,_140,"day")/7);break;case "day":_143/=24;case "hour":_143/=60;case "minute":_143/=60;case "second":_143/=1000;case "millisecond":_143*=_140.getTime()-_13f.getTime();}return Math.round(_143);};1&&lang.mixin(lang.getObject("dojo.date",true),date);return date;});},"dojox/dtl/tag/loader":function(){define(["dojo/_base/lang","../_base","dojo/_base/array","dojo/_base/connect"],function(lang,dd,_147,_148){var ddtl=lang.getObject("tag.loader",true,dd);ddtl.BlockNode=lang.extend(function(name,_149){this.name=name;this.nodelist=_149;},{"super":function(){if(this.parent){var html=this.parent.nodelist.dummyRender(this.context,null,true);if(typeof html=="string"){html=new String(html);}html.safe=true;return html;}return "";},render:function(_14a,_14b){var name=this.name;var _14c=this.nodelist;var _14d;if(_14b.blocks){var _14e=_14b.blocks[name];if(_14e){_14d=_14e.parent;_14c=_14e.nodelist;_14e.used=true;}}this.rendered=_14c;_14a=_14a.push();this.context=_14a;this.parent=null;if(_14c!=this.nodelist){this.parent=this;}_14a.block=this;if(_14b.getParent){var _14f=_14b.getParent();var _150=_148.connect(_14b,"onSetParent",function(node,up,root){if(up&&root){_14b.setParent(_14f);}});}_14b=_14c.render(_14a,_14b,this);_150&&_148.disconnect(_150);_14a=_14a.pop();return _14b;},unrender:function(_151,_152){return this.rendered.unrender(_151,_152);},clone:function(_153){return new this.constructor(this.name,this.nodelist.clone(_153));},toString:function(){return "dojox.dtl.tag.loader.BlockNode";}});ddtl.ExtendsNode=lang.extend(function(_154,_155,_156,_157,key){this.getTemplate=_154;this.nodelist=_155;this.shared=_156;this.parent=_157;this.key=key;},{parents:{},getParent:function(_158){var _159=this.parent;if(!_159){var _15a;_159=this.parent=_158.get(this.key,false);if(!_159){throw new Error("extends tag used a variable that did not resolve");}if(typeof _159=="object"){var url=_159.url||_159.templatePath;if(_159.shared){this.shared=true;}if(url){_159=this.parent=url.toString();}else{if(_159.templateString){_15a=_159.templateString;_159=this.parent=" ";}else{_159=this.parent=this.parent.toString();}}}if(_159&&_159.indexOf("shared:")===0){this.shared=true;_159=this.parent=_159.substring(7,_159.length);}}if(!_159){throw new Error("Invalid template name in 'extends' tag.");}if(_159.render){return _159;}if(this.parents[_159]){return this.parents[_159];}this.parent=this.getTemplate(_15a||dojox.dtl.text.getTemplateString(_159));if(this.shared){this.parents[_159]=this.parent;}return this.parent;},render:function(_15b,_15c){var _15d=this.getParent(_15b);_15d.blocks=_15d.blocks||{};_15c.blocks=_15c.blocks||{};for(var i=0,node;node=this.nodelist.contents[i];i++){if(node instanceof dojox.dtl.tag.loader.BlockNode){var old=_15d.blocks[node.name];if(old&&old.nodelist!=node.nodelist){_15c=old.nodelist.unrender(_15b,_15c);}_15d.blocks[node.name]=_15c.blocks[node.name]={shared:this.shared,nodelist:node.nodelist,used:false};}}this.rendered=_15d;return _15d.nodelist.render(_15b,_15c,this);},unrender:function(_15e,_15f){return this.rendered.unrender(_15e,_15f,this);},toString:function(){return "dojox.dtl.block.ExtendsNode";}});ddtl.IncludeNode=lang.extend(function(path,_160,_161,text,_162){this._path=path;this.constant=_160;this.path=(_160)?path:new dd._Filter(path);this.getTemplate=_161;this.text=text;this.parsed=(arguments.length==5)?_162:true;},{_cache:[{},{}],render:function(_163,_164){var _165=((this.constant)?this.path:this.path.resolve(_163)).toString();var _166=Number(this.parsed);var _167=false;if(_165!=this.last){_167=true;if(this.last){_164=this.unrender(_163,_164);}this.last=_165;}var _168=this._cache[_166];if(_166){if(!_168[_165]){_168[_165]=dd.text._resolveTemplateArg(_165,true);}if(_167){var _169=this.getTemplate(_168[_165]);this.rendered=_169.nodelist;}return this.rendered.render(_163,_164,this);}else{if(this.text instanceof dd._TextNode){if(_167){this.rendered=this.text;this.rendered.set(dd.text._resolveTemplateArg(_165,true));}return this.rendered.render(_163,_164);}else{if(!_168[_165]){var _16a=[];var div=document.createElement("div");div.innerHTML=dd.text._resolveTemplateArg(_165,true);var _16b=div.childNodes;while(_16b.length){var _16c=div.removeChild(_16b[0]);_16a.push(_16c);}_168[_165]=_16a;}if(_167){this.nodelist=[];var _16d=true;for(var i=0,_16e;_16e=_168[_165][i];i++){this.nodelist.push(_16e.cloneNode(true));}}for(var i=0,node;node=this.nodelist[i];i++){_164=_164.concat(node);}}}return _164;},unrender:function(_16f,_170){if(this.rendered){_170=this.rendered.unrender(_16f,_170);}if(this.nodelist){for(var i=0,node;node=this.nodelist[i];i++){_170=_170.remove(node);}}return _170;},clone:function(_171){return new this.constructor(this._path,this.constant,this.getTemplate,this.text.clone(_171),this.parsed);}});lang.mixin(ddtl,{block:function(_172,_173){var _174=_173.contents.split();var name=_174[1];_172._blocks=_172._blocks||{};_172._blocks[name]=_172._blocks[name]||[];_172._blocks[name].push(name);var _175=_172.parse(["endblock","endblock "+name]).rtrim();_172.next_token();return new dojox.dtl.tag.loader.BlockNode(name,_175);},extends_:function(_176,_177){var _178=_177.contents.split();var _179=false;var _17a=null;var key=null;if(_178[1].charAt(0)=="\""||_178[1].charAt(0)=="'"){_17a=_178[1].substring(1,_178[1].length-1);}else{key=_178[1];}if(_17a&&_17a.indexOf("shared:")==0){_179=true;_17a=_17a.substring(7,_17a.length);}var _17b=_176.parse();return new dojox.dtl.tag.loader.ExtendsNode(_176.getTemplate,_17b,_179,_17a,key);},include:function(_17c,_17d){var _17e=_17d.contents.split();if(_17e.length!=2){throw new Error(_17e[0]+" tag takes one argument: the name of the template to be included");}var path=_17e[1];var _17f=false;if((path.charAt(0)=="\""||path.slice(-1)=="'")&&path.charAt(0)==path.slice(-1)){path=path.slice(1,-1);_17f=true;}return new ddtl.IncludeNode(path,_17f,_17c.getTemplate,_17c.create_text_node());},ssi:function(_180,_181){var _182=_181.contents.split();var _183=false;if(_182.length==3){_183=(_182.pop()=="parsed");if(!_183){throw new Error("Second (optional) argument to ssi tag must be 'parsed'");}}var node=ddtl.include(_180,new dd.Token(_181.token_type,_182.join(" ")));node.parsed=_183;return node;}});return ddtl;});},"dojox/dtl/tag/misc":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/_base/connect","../_base"],function(lang,_184,_185,dd){var ddtm=lang.getObject("tag.misc",true,dd);ddtm.DebugNode=lang.extend(function(text){this.text=text;},{render:function(_186,_187){var keys=_186.getKeys();var _188=[];var only={};for(var i=0,key;key=keys[i];i++){only[key]=_186[key];_188+="["+key+": "+typeof _186[key]+"]\n";}return this.text.set(_188).render(_186,_187,this);},unrender:function(_189,_18a){return _18a;},clone:function(_18b){return new this.constructor(this.text.clone(_18b));},toString:function(){return "ddtm.DebugNode";}});ddtm.FilterNode=lang.extend(function(_18c,_18d){this._varnode=_18c;this._nodelist=_18d;},{render:function(_18e,_18f){var _190=this._nodelist.render(_18e,new dojox.string.Builder());_18e=_18e.update({"var":_190.toString()});var _191=this._varnode.render(_18e,_18f);_18e=_18e.pop();return _18f;},unrender:function(_192,_193){return _193;},clone:function(_194){return new this.constructor(this._expression,this._nodelist.clone(_194));}});ddtm.FirstOfNode=lang.extend(function(vars,text){this._vars=vars;this.vars=_184.map(vars,function(item){return new dojox.dtl._Filter(item);});this.contents=text;},{render:function(_195,_196){for(var i=0,item;item=this.vars[i];i++){var _197=item.resolve(_195);if(typeof _197!="undefined"){if(_197===null){_197="null";}this.contents.set(_197);return this.contents.render(_195,_196);}}return this.contents.unrender(_195,_196);},unrender:function(_198,_199){return this.contents.unrender(_198,_199);},clone:function(_19a){return new this.constructor(this._vars,this.contents.clone(_19a));}});ddtm.SpacelessNode=lang.extend(function(_19b,text){this.nodelist=_19b;this.contents=text;},{render:function(_19c,_19d){if(_19d.getParent){var _19e=[_185.connect(_19d,"onAddNodeComplete",this,"_watch"),_185.connect(_19d,"onSetParent",this,"_watchParent")];_19d=this.nodelist.render(_19c,_19d);_185.disconnect(_19e[0]);_185.disconnect(_19e[1]);}else{var _19f=this.nodelist.dummyRender(_19c);this.contents.set(_19f.replace(/>\s+</g,"><"));_19d=this.contents.render(_19c,_19d);}return _19d;},unrender:function(_1a0,_1a1){return this.nodelist.unrender(_1a0,_1a1);},clone:function(_1a2){return new this.constructor(this.nodelist.clone(_1a2),this.contents.clone(_1a2));},_isEmpty:function(node){return (node.nodeType==3&&!node.data.match(/[^\s\n]/));},_watch:function(node){if(this._isEmpty(node)){var _1a3=false;if(node.parentNode.firstChild==node){node.parentNode.removeChild(node);}}else{var _1a4=node.parentNode.childNodes;if(node.nodeType==1&&_1a4.length>2){for(var i=2,_1a5;_1a5=_1a4[i];i++){if(_1a4[i-2].nodeType==1&&this._isEmpty(_1a4[i-1])){node.parentNode.removeChild(_1a4[i-1]);return;}}}}},_watchParent:function(node){var _1a6=node.childNodes;if(_1a6.length){while(node.childNodes.length){var last=node.childNodes[node.childNodes.length-1];if(!this._isEmpty(last)){return;}node.removeChild(last);}}}});ddtm.TemplateTagNode=lang.extend(function(tag,text){this.tag=tag;this.contents=text;},{mapping:{openblock:"{%",closeblock:"%}",openvariable:"{{",closevariable:"}}",openbrace:"{",closebrace:"}",opencomment:"{#",closecomment:"#}"},render:function(_1a7,_1a8){this.contents.set(this.mapping[this.tag]);return this.contents.render(_1a7,_1a8);},unrender:function(_1a9,_1aa){return this.contents.unrender(_1a9,_1aa);},clone:function(_1ab){return new this.constructor(this.tag,this.contents.clone(_1ab));}});ddtm.WidthRatioNode=lang.extend(function(_1ac,max,_1ad,text){this.current=new dd._Filter(_1ac);this.max=new dd._Filter(max);this.width=_1ad;this.contents=text;},{render:function(_1ae,_1af){var _1b0=+this.current.resolve(_1ae);var max=+this.max.resolve(_1ae);if(typeof _1b0!="number"||typeof max!="number"||!max){this.contents.set("");}else{this.contents.set(""+Math.round((_1b0/max)*this.width));}return this.contents.render(_1ae,_1af);},unrender:function(_1b1,_1b2){return this.contents.unrender(_1b1,_1b2);},clone:function(_1b3){return new this.constructor(this.current.getExpression(),this.max.getExpression(),this.width,this.contents.clone(_1b3));}});ddtm.WithNode=lang.extend(function(_1b4,_1b5,_1b6){this.target=new dd._Filter(_1b4);this.alias=_1b5;this.nodelist=_1b6;},{render:function(_1b7,_1b8){var _1b9=this.target.resolve(_1b7);_1b7=_1b7.push();_1b7[this.alias]=_1b9;_1b8=this.nodelist.render(_1b7,_1b8);_1b7=_1b7.pop();return _1b8;},unrender:function(_1ba,_1bb){return _1bb;},clone:function(_1bc){return new this.constructor(this.target.getExpression(),this.alias,this.nodelist.clone(_1bc));}});lang.mixin(ddtm,{comment:function(_1bd,_1be){_1bd.skip_past("endcomment");return dd._noOpNode;},debug:function(_1bf,_1c0){return new ddtm.DebugNode(_1bf.create_text_node());},filter:function(_1c1,_1c2){var rest=_1c2.contents.split(null,1)[1];var _1c3=_1c1.create_variable_node("var|"+rest);var _1c4=_1c1.parse(["endfilter"]);_1c1.next_token();return new ddtm.FilterNode(_1c3,_1c4);},firstof:function(_1c5,_1c6){var _1c7=_1c6.split_contents().slice(1);if(!_1c7.length){throw new Error("'firstof' statement requires at least one argument");}return new ddtm.FirstOfNode(_1c7,_1c5.create_text_node());},spaceless:function(_1c8,_1c9){var _1ca=_1c8.parse(["endspaceless"]);_1c8.delete_first_token();return new ddtm.SpacelessNode(_1ca,_1c8.create_text_node());},templatetag:function(_1cb,_1cc){var _1cd=_1cc.contents.split();if(_1cd.length!=2){throw new Error("'templatetag' statement takes one argument");}var tag=_1cd[1];var _1ce=ddtm.TemplateTagNode.prototype.mapping;if(!_1ce[tag]){var keys=[];for(var key in _1ce){keys.push(key);}throw new Error("Invalid templatetag argument: '"+tag+"'. Must be one of: "+keys.join(", "));}return new ddtm.TemplateTagNode(tag,_1cb.create_text_node());},widthratio:function(_1cf,_1d0){var _1d1=_1d0.contents.split();if(_1d1.length!=4){throw new Error("widthratio takes three arguments");}var _1d2=+_1d1[3];if(typeof _1d2!="number"){throw new Error("widthratio final argument must be an integer");}return new ddtm.WidthRatioNode(_1d1[1],_1d1[2],_1d2,_1cf.create_text_node());},with_:function(_1d3,_1d4){var _1d5=_1d4.split_contents();if(_1d5.length!=4||_1d5[2]!="as"){throw new Error("do_width expected format as 'with value as name'");}var _1d6=_1d3.parse(["endwith"]);_1d3.next_token();return new ddtm.WithNode(_1d5[1],_1d5[3],_1d6);}});return ddtm;});},"dojox/dtl/ext-dojo/NodeList":function(){define(["dojo/_base/lang","dojo/query","../_base"],function(lang,_1d7,dd){var nl=lang.getObject("dojox.dtl.ext-dojo.NodeList",true);var _1d8=_1d7.NodeList;lang.extend(_1d8,{dtl:function(_1d9,_1da){var d=dd,self=this;var _1db=function(_1dc,_1dd){var _1de=_1dc.render(new d._Context(_1dd));self.forEach(function(node){node.innerHTML=_1de;});};d.text._resolveTemplateArg(_1d9).addCallback(function(_1df){_1d9=new d.Template(_1df);d.text._resolveContextArg(_1da).addCallback(function(_1e0){_1db(_1d9,_1e0);});});return this;}});return _1d8;});}}});define("dojox/dtl",["./dtl/_base"],function(_1e1){return _1e1;});
|