//>>built
define("dojox/gfx/fx","dojo/_base/lang ./_base ./matrix dojo/_base/Color dojo/_base/array dojo/_base/fx dojo/_base/connect dojo/sniff".split(" "),function(D,r,n,t,u,p,k,x){function v(a,d){this.start=a;this.end=d}function y(a,d,b){this.start=a;this.end=d;this.units=b}function z(a,d){this.start=a;this.end=d;this.temp=new t}function m(a){this.values=a;this.length=a.length}function w(a,d){this.values=a;this.def=d?d:{}}function A(a,d){this.stack=a;this.original=d}function B(a,d,b,f){if(a.values)return new m(a.values);
var c;var e=a.start?r.normalizeColor(a.start):c=d?b?d[b]:d:f;a.end?a=r.normalizeColor(a.end):(c||(c=d?b?d[b]:d:f),a=c);return new z(e,a)}var q=r.fx={};v.prototype.getValue=function(a){return(this.end-this.start)*a+this.start};y.prototype.getValue=function(a){return(this.end-this.start)*a+this.start+this.units};z.prototype.getValue=function(a){return t.blendColors(this.start,this.end,a,this.temp)};m.prototype.getValue=function(a){return this.values[Math.min(Math.floor(a*this.length),this.length-1)]};
w.prototype.getValue=function(a){var d=D.clone(this.def),b;for(b in this.values)d[b]=this.values[b].getValue(a);return d};A.prototype.getValue=function(a){var d=[];u.forEach(this.stack,function(b){if(b instanceof n.Matrix2D)d.push(b);else if("original"==b.name&&this.original)d.push(this.original);else if("matrix"==b.name){if(b.start instanceof n.Matrix2D&&b.end instanceof n.Matrix2D){var f=new n.Matrix2D;for(c in b.start)f[c]=(b.end[c]-b.start[c])*a+b.start[c];d.push(f)}}else if(b.name in n)if(f=
n[b.name],"function"!=typeof f)d.push(f);else{var c=u.map(b.start,function(e,g){return(b.end[g]-e)*a+e});f=f.apply(n,c);f instanceof n.Matrix2D&&d.push(f)}},this);return d};var C=new t(0,0,0,0);q.animateStroke=function(a){a.easing||(a.easing=p._defaultEasing);var d=new p.Animation(a),b=a.shape,f;k.connect(d,"beforeBegin",d,function(){f=b.getStroke();var c=a.color,e={};c&&(e.color=B(c,f,"color",C));(c=a.style)&&c.values&&(e.style=new m(c.values));if(c=a.width){var g=c,l=f;if(g.values)var h=new m(g.values);
else c=g.start?g.start:h=l?l.width:1,g.end?h=g.end:"number"!=typeof h&&(h=l?l.width:1),h=new v(c,h);e.width=h}(c=a.cap)&&c.values&&(e.cap=new m(c.values));if(c=a.join)c.values?e.join=new m(c.values):(h=c.start?c.start:f&&f.join||0,c=c.end?c.end:f&&f.join||0,"number"==typeof h&&"number"==typeof c&&(e.join=new v(h,c)));this.curve=new w(e,f)});k.connect(d,"onAnimate",b,"setStroke");return d};q.animateFill=function(a){a.easing||(a.easing=p._defaultEasing);var d=new p.Animation(a),b=a.shape,f;k.connect(d,
"beforeBegin",d,function(){f=b.getFill();var c=a.color;c&&(this.curve=B(c,f,"",C))});k.connect(d,"onAnimate",b,"setFill");return d};q.animateFont=function(a){a.easing||(a.easing=p._defaultEasing);var d=new p.Animation(a),b=a.shape,f;k.connect(d,"beforeBegin",d,function(){f=b.getFont();var c=a.style,e={};c&&c.values&&(e.style=new m(c.values));(c=a.variant)&&c.values&&(e.variant=new m(c.values));(c=a.weight)&&c.values&&(e.weight=new m(c.values));(c=a.family)&&c.values&&(e.family=new m(c.values));if((c=
a.size)&&c.units){var g=parseFloat(c.start?c.start:b.font&&b.font.size||"0");var l=parseFloat(c.end?c.end:b.font&&b.font.size||"0");e.size=new y(g,l,c.units)}this.curve=new w(e,f)});k.connect(d,"onAnimate",b,"setFont");return d};q.animateTransform=function(a){a.easing||(a.easing=p._defaultEasing);var d=new p.Animation(a),b=a.shape,f;k.connect(d,"beforeBegin",d,function(){f=b.getTransform();this.curve=new A(a.transform,f)});k.connect(d,"onAnimate",b,"setTransform");if("svg"===r.renderer&&(9<=x("ie")||
x("ff")))var c=[k.connect(d,"onBegin",d,function(){for(var e=b.getParent();e&&e.getParent;)e=e.getParent();e&&(b.__svgContainer=e.rawNode.parentNode,b.__svgRoot=e.rawNode,b.__svgRoot&&b.__svgRoot.getAttribute&&(b.__svgWidth=parseInt(b.__svgRoot.getAttribute("width"),10),isNaN(b.__svgWidth)&&delete b.__svgWidth))}),k.connect(d,"onAnimate",d,function(){try{if(b.__svgContainer){var e=b.__svgContainer.style.visibility;b.__svgContainer.style.visibility="visible";b.__svgContainer.style.visibility=e;var g=
b.__svgWidth;if(!isNaN(g))try{b.__svgRoot.setAttribute("width",g-5E-6),b.__svgRoot.setAttribute("width",g)}catch(l){}}}catch(l){}}),k.connect(d,"onEnd",d,function(){u.forEach(c,k.disconnect);if(b.__svgContainer){var e=b.__svgContainer;if(null==e.getAttribute("__gotVis")){e.setAttribute("__gotVis",!0);var g=b.__svgContainer.style.visibility,l=b.__svgRoot,h=b.__svgWidth;e.style.visibility="visible";setTimeout(function(){try{e.style.visibility=g;e.removeAttribute("__gotVis");e=null;try{isNaN(h)||(l.setAttribute("width",
h-5E-6),l.setAttribute("width",h))}catch(E){}}catch(E){}},100)}}delete b.__svgContainer;delete b.__svgRoot;delete b.__svgWidth})];return d};return q});