//>>built
define("dojox/dtl/filter/strings","dojo/_base/lang dojo/_base/array dojox/string/tokenize dojox/string/sprintf ../filter/htmlstrings ../_base".split(" "),function(q,t,r,u,w,v){var g=q.getObject("filter.strings",!0,v);q.mixin(g,{_urlquote:function(a,b){b||(b="/");return r(a,/([^\w-_.])/g,function(c){if(-1==b.indexOf(c)){if(" "==c)return"+";for(c=c.charCodeAt(0).toString(16).toUpperCase();2>c.length;)c="0"+c;return"%"+c}return c}).join("")},addslashes:function(a){return a.replace(/\\/g,"\\\\").replace(/"/g,
'\\"').replace(/'/g,"\\'")},capfirst:function(a){a=""+a;return a.charAt(0).toUpperCase()+a.substring(1)},center:function(a,b){b=b||a.length;a+="";var c=b-a.length;c%2&&(a+=" ",--c);for(var d=0;d<c;d+=2)a=" "+a+" ";return a},cut:function(a,b){return(a+"").replace(new RegExp(b+""||"","g"),"")},_fix_ampersands:/&(?!(\w+|#\d+);)/g,fix_ampersands:function(a){return a.replace(g._fix_ampersands,"\x26amp;")},floatformat:function(a,b){b=parseInt(b||-1,10);a=parseFloat(a);if(!(a-a.toFixed(0))&&0>b)return a.toFixed();
a=a.toFixed(Math.abs(b));return 0>b?parseFloat(a)+"":a},iriencode:function(a){return g._urlquote(a,"/#%[]\x3d:;$\x26()+,!")},linenumbers:function(a){var b=dojox.dtl.filter;a=a.split("\n");for(var c=[],d=(a.length+"").length,e=0,f;e<a.length;e++)f=a[e],c.push(b.strings.ljust(e+1,d)+". "+dojox.dtl._base.escape(f));return c.join("\n")},ljust:function(a,b){a+="";for(b=parseInt(b,10);a.length<b;)a+=" ";return a},lower:function(a){return(a+"").toLowerCase()},make_list:function(a){var b=[];"number"==typeof a&&
(a+="");if(a.charAt){for(var c=0;c<a.length;c++)b.push(a.charAt(c));return b}if("object"==typeof a){for(c in a)b.push(a[c]);return b}return[]},rjust:function(a,b){a+="";for(b=parseInt(b,10);a.length<b;)a=" "+a;return a},slugify:function(a){a=a.replace(/[^\w\s-]/g,"").toLowerCase();return a.replace(/[\-\s]+/g,"-")},_strings:{},stringformat:function(a,b){b=""+b;var c=g._strings;c[b]||(c[b]=new u.Formatter("%"+b));return c[b].format(a)},title:function(a){for(var b,c="",d=0,e;d<a.length;d++)e=a.charAt(d),
c=" "!=b&&"\n"!=b&&"\t"!=b&&b?c+e.toLowerCase():c+e.toUpperCase(),b=e;return c},_truncatewords:/[ \n\r\t]/,truncatewords:function(a,b){b=parseInt(b,10);if(!b)return a;for(var c=0,d=a.length,e=0,f,k;c<a.length;c++){f=a.charAt(c);if(g._truncatewords.test(k)){if(!g._truncatewords.test(f)&&(++e,e==b))return a.substring(0,d+1)+" ..."}else g._truncatewords.test(f)||(d=c);k=f}return a},_truncate_words:/(&.*?;|<.*?>|(\w[\w\-]*))/g,_truncate_tag:/<(\/)?([^ ]+?)(?: (\/)| .*?)?>/,_truncate_singlets:{br:!0,col:!0,
link:!0,base:!0,img:!0,param:!0,area:!0,hr:!0,input:!0},truncatewords_html:function(a,b){b=parseInt(b,10);if(0>=b)return"";var c=0,d=[],e=r(a,g._truncate_words,function(h,n){if(n){++c;if(c<b)return n;if(c==b)return n+" ..."}var l=h.match(g._truncate_tag);if(l&&!(c>=b)){var m=l[1];l=l[2].toLowerCase();m||g._truncate_singlets[l]||(m?(m=t.indexOf(d,l),-1!=m&&(d=d.slice(m+1))):d.unshift(l));return h}}).join("");e=e.replace(/\s+$/g,"");for(var f=0,k;k=d[f];f++)e+="\x3c/"+k+"\x3e";return e},upper:function(a){return a.toUpperCase()},
urlencode:function(a){return g._urlquote(a)},_urlize:/^((?:[(>]|&lt;)*)(.*?)((?:[.,)>\n]|&gt;)*)$/,_urlize2:/^\S+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+$/,urlize:function(a){return g.urlizetrunc(a)},urlizetrunc:function(a,b){b=parseInt(b);return r(a,/(\S+)/g,function(c){var d=g._urlize.exec(c);if(!d)return c;d=d[2];var e=0==d.indexOf("www."),f=-1!=d.indexOf("@"),k=-1!=d.indexOf(":"),h=0==d.indexOf("http://"),n=0==d.indexOf("https://"),l=/[a-zA-Z0-9]/.test(d.charAt(0)),m=d.substring(d.length-4),p=d;3<b&&
(p=p.substring(0,b-3)+"...");return e||!f&&!h&&d.length&&l&&(".org"==m||".net"==m||".com"==m)?'\x3ca href\x3d"http://'+d+'" rel\x3d"nofollow"\x3e'+p+"\x3c/a\x3e":h||n?'\x3ca href\x3d"'+d+'" rel\x3d"nofollow"\x3e'+p+"\x3c/a\x3e":f&&!e&&!k&&g._urlize2.test(d)?'\x3ca href\x3d"mailto:'+d+'"\x3e'+d+"\x3c/a\x3e":c}).join("")},wordcount:function(a){return(a=q.trim(a))?a.split(/\s+/g).length:0},wordwrap:function(a,b){b=parseInt(b);var c=[],d=a.split(/\s+/g);if(d.length){var e=d.shift();c.push(e);for(var f=
e.length-e.lastIndexOf("\n")-1,k=0;k<d.length;k++){e=d[k];var h=-1!=e.indexOf("\n")?e.split(/\n/g):[e];f+=h[0].length+1;b&&f>b?(c.push("\n"),f=h[h.length-1].length):(c.push(" "),1<h.length&&(f=h[h.length-1].length));c.push(e)}}return c.join("")}});return g});