//>>built define(["dojo/_base/kernel","dojo/_base/lang","dojo/_base/sniff","./tokenize"],function(n,h,l,m){var f=h.getObject("string",!0,dojox);f.sprintf=function(a,c){for(var d=[],e=1;ec||127=arguments.length)throw Error("got "+arguments.length+" printf arguments, insufficient for '"+this._format+"'");b.arg=arguments[d++]}if(!b.compiled){b.compiled=!0;b.sign="";b.zeroPad=!1;b.rightJustify=!1;b.alternative=!1;for(var g={},f=b.flags.length;f--;){var k=b.flags.charAt(f);g[k]=!0;switch(k){case " ":b.sign=" ";break;case "+":b.sign="+";break;case "0":b.zeroPad=g["-"]?!1:!0;break;case "-":b.rightJustify=!0;b.zeroPad=!1;break; case "#":b.alternative=!0;break;default:throw Error("bad formatting flag '"+b.flags.charAt(f)+"'");}}b.minWidth=b._minWidth?parseInt(b._minWidth):0;b.maxWidth=-1;b.toUpper=!1;b.isUnsigned=!1;b.isInt=!1;b.isDouble=!1;b.precision=1;"."==b.period&&(b.precision=b._precision?parseInt(b._precision):0);g=this._specifiers[b.specifier];if("undefined"==typeof g)throw Error("unexpected specifier '"+b.specifier+"'");g.extend&&(h.mixin(g,this._specifiers[g.extend]),delete g.extend);h.mixin(b,g)}"function"==typeof b.setArg&& b.setArg(b);"function"==typeof b.setMaxWidth&&b.setMaxWidth(b);if("*"==b._minWidth){if(this._mapped)throw Error("* width not supported in mapped formats");b.minWidth=parseInt(arguments[d++]);if(isNaN(b.minWidth))throw Error("the argument for * width at position "+d+" is not a number in "+this._format);0>b.minWidth&&(b.rightJustify=!0,b.minWidth=-b.minWidth)}if("*"==b._precision&&"."==b.period){if(this._mapped)throw Error("* precision not supported in mapped formats");b.precision=parseInt(arguments[d++]); if(isNaN(b.precision))throw Error("the argument for * precision at position "+d+" is not a number in "+this._format);0>b.precision&&(b.precision=1,b.period="")}b.isInt?("."==b.period&&(b.zeroPad=!1),this.formatInt(b)):b.isDouble&&("."!=b.period&&(b.precision=6),this.formatDouble(b));this.fitField(b);c+=""+b.arg}return c},_zeros10:"0000000000",_spaces10:" ",formatInt:function(a){var c=parseInt(a.arg);if(!isFinite(c)){if("number"!=typeof a.arg)throw Error("format argument '"+a.arg+"' not an integer; parseInt returned "+ c);c=0}0>c&&(a.isUnsigned||10!=a.base)&&(c=4294967295+c+1);0>c?(a.arg=(-c).toString(a.base),this.zeroPad(a),a.arg="-"+a.arg):(a.arg=c.toString(a.base),c||a.precision?this.zeroPad(a):a.arg="",a.sign&&(a.arg=a.sign+a.arg));16==a.base&&(a.alternative&&(a.arg="0x"+a.arg),a.arg=a.toUpper?a.arg.toUpperCase():a.arg.toLowerCase());8==a.base&&a.alternative&&"0"!=a.arg.charAt(0)&&(a.arg="0"+a.arg)},formatDouble:function(a){var c=parseFloat(a.arg);if(!isFinite(c)){if("number"!=typeof a.arg)throw Error("format argument '"+ a.arg+"' not a float; parseFloat returned "+c);c=0}switch(a.doubleNotation){case "e":a.arg=c.toExponential(a.precision);break;case "f":a.arg=c.toFixed(a.precision);break;case "g":a.arg=1E-4>Math.abs(c)?c.toExponential(0a.maxWidth)return a.arg.substring(0,a.maxWidth);a.zeroPad?this.zeroPad(a,a.minWidth):this.spacePad(a)},spacePad:function(a,c){c=2==arguments.length?c:a.minWidth;"string"!=typeof a.arg&&(a.arg=""+a.arg);for(var d=c-10;a.arg.length