//>>built
define("dojox/image/Badge","dojo dijit dojox/main dijit/_Widget dijit/_TemplatedMixin dojo/fx/easing".split(" "),function(d,p,l,m,n){d.experimental("dojox.image.Badge");d.getObject("image",!0,l);return d.declare("dojox.image.Badge",[m,n],{baseClass:"dojoxBadge",templateString:'\x3cdiv class\x3d"dojoxBadge" dojoAttachPoint\x3d"containerNode"\x3e\x3c/div\x3e',children:"div.dojoxBadgeImage",rows:4,cols:5,cellSize:50,cellMargin:1,delay:2E3,threads:1,easing:"dojo.fx.easing.backOut",startup:function(){this._started||
(d.isString(this.easing)&&(this.easing=d.getObject(this.easing)),this.inherited(arguments),this._init())},_init:function(){var a=0,b=this.cellSize;d.style(this.domNode,{width:b*this.cols+"px",height:b*this.rows+"px"});this._nl=d.query(this.children,this.containerNode).forEach(function(c,g){var f=g%this.cols,e=2*this.cellMargin;d.style(c,{top:a*b+"px",left:f*b+"px",width:b-e+"px",height:b-e+"px"});f==this.cols-1&&a++;d.addClass(c,this.baseClass+"Image")},this);for(var c=this._nl.length;this.threads--;)setTimeout(d.hitch(this,
"_enbiggen",{target:this._nl[Math.floor(Math.random()*c)]}),this.delay*this.threads)},_getCell:function(a){a=this._nl.indexOf(a);if(0<=a)return{x:a%this.cols,y:Math.floor(a/this.cols),n:this._nl[a],io:a}},_getImage:function(){return"url('')"},_enbiggen:function(a){if(a=this._getCell(a.target||a)){var b=this.cellMargin,c=2*this.cellSize-2*b,c={height:c,width:c};if(a.x==this.cols-1||0<a.x&&Math.round(Math.random()))c.left=this.cellSize*(a.x-b);if(a.y==this.rows-1||0<a.y&&Math.round(Math.random()))c.top=
this.cellSize*(a.y-b);b=this.baseClass;d.addClass(a.n,b+"Top");d.addClass(a.n,b+"Seen");d.animateProperty({node:a.n,properties:c,onEnd:d.hitch(this,"_loadUnder",a,c),easing:this.easing}).play()}},_loadUnder:function(a,b){var c=a.io,e=0<=b.left,g=0<=b.top,f=this.cols,h=c+(e?-1:1),c=c+(g?-f:f),k=this.baseClass;d.forEach([h,c,g?e?h-f:c+1:e?c-1:h+f],function(a){(a=this._nl[a])&&d.hasClass(a,k+"Seen")&&d.removeClass(a,k+"Seen")},this);setTimeout(d.hitch(this,"_disenbiggen",a,b),1.25*this.delay)},_disenbiggen:function(a,
b){0<=b.top&&(b.top+=this.cellSize);0<=b.left&&(b.left+=this.cellSize);var c=this.cellSize-2*this.cellMargin;d.animateProperty({node:a.n,properties:d.mixin(b,{width:c,height:c}),onEnd:d.hitch(this,"_cycle",a,b)}).play(5)},_cycle:function(a,b){var c=this.baseClass;d.removeClass(a.n,c+"Top");var e=this._nl.filter(function(a){return!d.hasClass(a,c+"Seen")});setTimeout(d.hitch(this,"_enbiggen",{target:e[Math.floor(Math.random()*e.length)]}),this.delay/2)}})});