﻿// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.

Type.registerNamespace("Telerik.Web.Animation");
var $TWA=Telerik.Web.Animation;
$TWA.registerAnimation=function(_1,_2){
if(_2&&((_2===$TWA.Animation)||(_2.inheritsFrom&&_2.inheritsFrom($TWA.Animation)))){
if(!$TWA.__animations){
$TWA.__animations={};
}
$TWA.__animations[_1.toLowerCase()]=_2;
_2.play=function(){
var _3=new _2();
_2.apply(_3,arguments);
_3.initialize();
var _4=Function.createDelegate(_3,function(){
_3.remove_ended(_4);
_4=null;
_3.dispose();
});
_3.add_ended(_4);
_3.play();
};
}else{
throw Error.argumentType("type",_2,$TWA.Animation,Telerik.Web.Resources.Animation_InvalidBaseType);
}
};
$TWA.buildAnimation=function(_5,_6){
if(!_5||_5===""){
return null;
}
var _7;
_5="("+_5+")";
if(!Sys.Debug.isDebug){
try{
_7=Sys.Serialization.JavaScriptSerializer.deserialize(_5);
}
catch(ex){
}
}else{
_7=Sys.Serialization.JavaScriptSerializer.deserialize(_5);
}
return $TWA.createAnimation(_7,_6);
};
$TWA.createAnimation=function(_8,_9){
if(!_8||!_8.AnimationName){
throw Error.argument("obj",Telerik.Web.Resources.Animation_MissingAnimationName);
}
var _a=$TWA.__animations[_8.AnimationName.toLowerCase()];
if(!_a){
throw Error.argument("type",String.format(Telerik.Web.Resources.Animation_UknownAnimationName,_8.AnimationName));
}
var _b=new _a();
if(_9){
_b.set_target(_9);
}
if(_8.AnimationChildren&&_8.AnimationChildren.length){
if($TWA.ParentAnimation.isInstanceOfType(_b)){
for(var i=0;i<_8.AnimationChildren.length;i++){
var _d=$TWA.createAnimation(_8.AnimationChildren[i]);
if(_d){
_b.add(_d);
}
}
}else{
throw Error.argument("obj",String.format(Telerik.Web.Resources.Animation_ChildrenNotAllowed,_a.getName()));
}
}
var _e=_a.__animationProperties;
if(!_e){
_a.__animationProperties={};
_a.resolveInheritance();
for(var _f in _a.prototype){
if(_f.startsWith("set_")){
_a.__animationProperties[_f.substr(4).toLowerCase()]=_f;
}
}
delete _a.__animationProperties["id"];
_e=_a.__animationProperties;
}
for(var _10 in _8){
var _11=_10.toLowerCase();
if(_11=="animationname"||_11=="animationchildren"){
continue;
}
var _12=_8[_10];
var _13=_e[_11];
if(_13&&String.isInstanceOfType(_13)&&_b[_13]){
if(!Sys.Debug.isDebug){
try{
_b[_13](_12);
}
catch(ex){
}
}else{
_b[_13](_12);
}
}else{
if(_11.endsWith("script")){
_13=_e[_11.substr(0,_10.length-6)];
if(_13&&String.isInstanceOfType(_13)&&_b[_13]){
_b.DynamicProperties[_13]=_12;
}else{
if(Sys.Debug.isDebug){
throw Error.argument("obj",String.format(Telerik.Web.Resources.Animation_NoDynamicPropertyFound,_10,_10.substr(0,_10.length-5)));
}
}
}else{
if(Sys.Debug.isDebug){
throw Error.argument("obj",String.format(Telerik.Web.Resources.Animation_NoPropertyFound,_10));
}
}
}
}
return _b;
};
$TWA.Animation=function(_14,_15,fps){
$TWA.Animation.initializeBase(this);
this._duration=1;
this._fps=25;
this._target=null;
this._tickHandler=null;
this._timer=null;
this._percentComplete=0;
this._percentDelta=null;
this._owner=null;
this._parentAnimation=null;
this.DynamicProperties={};
if(_14){
this.set_target(_14);
}
if(_15){
this.set_duration(_15);
}
if(fps){
this.set_fps(fps);
}
};
$TWA.Animation.prototype={dispose:function(){
if(this._timer){
this._timer.dispose();
this._timer=null;
}
this._tickHandler=null;
this._target=null;
$TWA.Animation.callBaseMethod(this,"dispose");
},play:function(){
if(!this._owner){
var _17=true;
if(!this._timer){
_17=false;
if(!this._tickHandler){
this._tickHandler=Function.createDelegate(this,this._onTimerTick);
}
this._timer=new Telerik.Web.Timer();
this._timer.add_tick(this._tickHandler);
this.onStart();
this._timer.set_interval(1000/this._fps);
this._percentDelta=100/(this._duration*this._fps);
this._updatePercentComplete(0,true);
}
this._timer.set_enabled(true);
this.raisePropertyChanged("isPlaying");
if(!_17){
this.raisePropertyChanged("isActive");
}
}
},pause:function(){
if(!this._owner){
if(this._timer){
this._timer.set_enabled(false);
this.raisePropertyChanged("isPlaying");
}
}
},stop:function(_18){
if(!this._owner){
var t=this._timer;
this._timer=null;
if(t){
t.dispose();
if(this._percentComplete!==100){
this._percentComplete=100;
this.raisePropertyChanged("percentComplete");
if(_18||_18===undefined){
this.onStep(100);
}
}
this.onEnd();
this.raisePropertyChanged("isPlaying");
this.raisePropertyChanged("isActive");
}
}
},onStart:function(){
this.raiseStarted();
for(var _1a in this.DynamicProperties){
try{
this[_1a](eval(this.DynamicProperties[_1a]));
}
catch(ex){
if(Sys.Debug.isDebug){
throw ex;
}
}
}
},onStep:function(_1b){
this.setValue(this.getAnimatedValue(_1b));
},onEnd:function(){
this.raiseEnded();
},getAnimatedValue:function(_1c){
throw Error.notImplemented();
},setValue:function(_1d){
throw Error.notImplemented();
},interpolate:function(_1e,end,_20){
return _1e+(end-_1e)*(_20/100);
},_onTimerTick:function(){
this._updatePercentComplete(this._percentComplete+this._percentDelta,true);
this.raise_onTick();
},_updatePercentComplete:function(_21,_22){
if(_21>100){
_21=100;
}
this._percentComplete=_21;
this.raisePropertyChanged("percentComplete");
if(_22){
this.onStep(_21);
}
if(_21===100){
this.stop(false);
}
},setOwner:function(_23){
this._owner=_23;
},raiseStarted:function(){
var _24=this.get_events().getHandler("started");
if(_24){
_24(this,Sys.EventArgs.Empty);
}
},add_started:function(_25){
this.get_events().addHandler("started",_25);
},remove_started:function(_26){
this.get_events().removeHandler("started",_26);
},raiseEnded:function(){
var _27=this.get_events().getHandler("ended");
if(_27){
_27(this,Sys.EventArgs.Empty);
}
},add_ended:function(_28){
this.get_events().addHandler("ended",_28);
},remove_ended:function(_29){
this.get_events().removeHandler("ended",_29);
},raise_onTick:function(){
var _2a=this.get_events().getHandler("onTick");
if(_2a){
_2a(this,Sys.EventArgs.Empty);
}
},add_onTick:function(_2b){
this.get_events().addHandler("onTick",_2b);
},remove_onTick:function(_2c){
this.get_events().removeHandler("onTick",_2c);
},get_target:function(){
if(!this._target&&this._parentAnimation){
return this._parentAnimation.get_target();
}
return this._target;
},set_target:function(_2d){
if(this._target!=_2d){
this._target=_2d;
this.raisePropertyChanged("target");
}
},set_animationTarget:function(id){
var _2f=null;
var _30=$get(id);
if(_30){
_2f=_30;
}else{
var _31=$find(id);
if(_31){
_30=_31.get_element();
if(_30){
_2f=_30;
}
}
}
if(_2f){
this.set_target(_2f);
}else{
throw Error.argument("id",String.format(Telerik.Web.Resources.Animation_TargetNotFound,id));
}
},get_duration:function(){
return this._duration;
},set_duration:function(_32){
_32=this._getFloat(_32);
if(this._duration!=_32){
this._duration=_32;
this.raisePropertyChanged("duration");
}
},get_fps:function(){
return this._fps;
},set_fps:function(_33){
_33=this._getInteger(_33);
if(this.fps!=_33){
this._fps=_33;
this.raisePropertyChanged("fps");
}
},get_isActive:function(){
return (this._timer!==null);
},get_isPlaying:function(){
return (this._timer!==null)&&this._timer.get_enabled();
},get_percentComplete:function(){
return this._percentComplete;
},_getBoolean:function(_34){
if(String.isInstanceOfType(_34)){
return Boolean.parse(_34);
}
return _34;
},_getInteger:function(_35){
if(String.isInstanceOfType(_35)){
return parseInt(_35);
}
return _35;
},_getFloat:function(_36){
if(String.isInstanceOfType(_36)){
return parseFloat(_36);
}
return _36;
},_getEnum:function(_37,_38){
if(String.isInstanceOfType(_37)&&_38&&_38.parse){
return _38.parse(_37);
}
return _37;
}};
$TWA.Animation.registerClass("Telerik.Web.Animation.Animation",Sys.Component);
$TWA.registerAnimation("animation",$TWA.Animation);
$TWA.ParentAnimation=function(_39,_3a,fps,_3c){
$TWA.ParentAnimation.initializeBase(this,[_39,_3a,fps]);
this._animations=[];
if(_3c&&_3c.length){
for(var i=0;i<_3c.length;i++){
this.add(_3c[i]);
}
}
};
$TWA.ParentAnimation.prototype={initialize:function(){
$TWA.ParentAnimation.callBaseMethod(this,"initialize");
if(this._animations){
for(var i=0;i<this._animations.length;i++){
var _3f=this._animations[i];
if(_3f&&!_3f.get_isInitialized){
_3f.initialize();
}
}
}
},dispose:function(){
this.clear();
this._animations=null;
$TWA.ParentAnimation.callBaseMethod(this,"dispose");
},get_animations:function(){
return this._animations;
},add:function(_40){
if(this._animations){
if(_40){
_40._parentAnimation=this;
}
Array.add(this._animations,_40);
this.raisePropertyChanged("animations");
}
},remove:function(_41){
if(this._animations){
if(_41){
_41.dispose();
}
Array.remove(this._animations,_41);
this.raisePropertyChanged("animations");
}
},removeAt:function(_42){
if(this._animations){
var _43=this._animations[_42];
if(_43){
_43.dispose();
}
Array.removeAt(this._animations,_42);
this.raisePropertyChanged("animations");
}
},clear:function(){
if(this._animations){
for(var i=this._animations.length-1;i>=0;i--){
this._animations[i].dispose();
this._animations[i]=null;
}
Array.clear(this._animations);
this._animations=[];
this.raisePropertyChanged("animations");
}
}};
$TWA.ParentAnimation.registerClass("Telerik.Web.Animation.ParentAnimation",$TWA.Animation);
$TWA.registerAnimation("parent",$TWA.ParentAnimation);
$TWA.ParallelAnimation=function(_45,_46,fps,_48){
$TWA.ParallelAnimation.initializeBase(this,[_45,_46,fps,_48]);
};
$TWA.ParallelAnimation.prototype={add:function(_49){
$TWA.ParallelAnimation.callBaseMethod(this,"add",[_49]);
_49.setOwner(this);
},onStart:function(){
$TWA.ParallelAnimation.callBaseMethod(this,"onStart");
var _4a=this.get_animations();
for(var i=0;i<_4a.length;i++){
_4a[i].onStart();
}
},onStep:function(_4c){
var _4d=this.get_animations();
for(var i=0;i<_4d.length;i++){
_4d[i].onStep(_4c);
}
},onEnd:function(){
var _4f=this.get_animations();
for(var i=0;i<_4f.length;i++){
_4f[i].onEnd();
}
$TWA.ParallelAnimation.callBaseMethod(this,"onEnd");
}};
$TWA.ParallelAnimation.registerClass("Telerik.Web.Animation.ParallelAnimation",$TWA.ParentAnimation);
$TWA.registerAnimation("parallel",$TWA.ParallelAnimation);
$TWA.SequenceAnimation=function(_51,_52,fps,_54,_55){
$TWA.SequenceAnimation.initializeBase(this,[_51,_52,fps,_54]);
this._handler=null;
this._paused=false;
this._playing=false;
this._index=0;
this._remainingIterations=0;
this._iterations=(_55!==undefined)?_55:1;
};
$TWA.SequenceAnimation.prototype={dispose:function(){
this._handler=null;
$TWA.SequenceAnimation.callBaseMethod(this,"dispose");
},stop:function(){
if(this._playing){
var _56=this.get_animations();
if(this._index<_56.length){
_56[this._index].remove_ended(this._handler);
for(var i=this._index;i<_56.length;i++){
_56[i].stop();
}
}
this._playing=false;
this._paused=false;
this.raisePropertyChanged("isPlaying");
this.onEnd();
}
},pause:function(){
if(this.get_isPlaying()){
var _58=this.get_animations()[this._index];
if(_58!=null){
_58.pause();
}
this._paused=true;
this.raisePropertyChanged("isPlaying");
}
},play:function(){
var _59=this.get_animations();
if(!this._playing){
this._playing=true;
if(this._paused){
this._paused=false;
var _5a=_59[this._index];
if(_5a!=null){
_5a.play();
this.raisePropertyChanged("isPlaying");
}
}else{
this.onStart();
this._index=0;
var _5b=_59[this._index];
if(_5b){
_5b.add_ended(this._handler);
_5b.play();
this.raisePropertyChanged("isPlaying");
}else{
this.stop();
}
}
}
},onStart:function(){
$TWA.SequenceAnimation.callBaseMethod(this,"onStart");
this._remainingIterations=this._iterations-1;
if(!this._handler){
this._handler=Function.createDelegate(this,this._onEndAnimation);
}
},_onEndAnimation:function(){
var _5c=this.get_animations();
var _5d=_5c[this._index++];
if(_5d){
_5d.remove_ended(this._handler);
}
if(this._index<_5c.length){
var _5e=_5c[this._index];
_5e.add_ended(this._handler);
_5e.play();
}else{
if(this._remainingIterations>=1||this._iterations<=0){
this._remainingIterations--;
this._index=0;
var _5f=_5c[0];
_5f.add_ended(this._handler);
_5f.play();
}else{
this.stop();
}
}
},onStep:function(_60){
throw Error.invalidOperation(Telerik.Web.Resources.Animation_CannotNestSequence);
},onEnd:function(){
this._remainingIterations=0;
$TWA.SequenceAnimation.callBaseMethod(this,"onEnd");
},get_isActive:function(){
return true;
},get_isPlaying:function(){
return this._playing&&!this._paused;
},get_iterations:function(){
return this._iterations;
},set_iterations:function(_61){
_61=this._getInteger(_61);
if(this._iterations!=_61){
this._iterations=_61;
this.raisePropertyChanged("iterations");
}
},get_isInfinite:function(){
return this._iterations<=0;
}};
$TWA.SequenceAnimation.registerClass("Telerik.Web.Animation.SequenceAnimation",$TWA.ParentAnimation);
$TWA.registerAnimation("sequence",$TWA.SequenceAnimation);
$TWA.SelectionAnimation=function(_62,_63,fps,_65){
$TWA.SelectionAnimation.initializeBase(this,[_62,_63,fps,_65]);
this._selectedIndex=-1;
this._selected=null;
};
$TWA.SelectionAnimation.prototype={getSelectedIndex:function(){
throw Error.notImplemented();
},onStart:function(){
$TWA.SelectionAnimation.callBaseMethod(this,"onStart");
var _66=this.get_animations();
this._selectedIndex=this.getSelectedIndex();
if(this._selectedIndex>=0&&this._selectedIndex<_66.length){
this._selected=_66[this._selectedIndex];
if(this._selected){
this._selected.setOwner(this);
this._selected.onStart();
}
}
},onStep:function(_67){
if(this._selected){
this._selected.onStep(_67);
}
},onEnd:function(){
if(this._selected){
this._selected.onEnd();
this._selected.setOwner(null);
}
this._selected=null;
this._selectedIndex=null;
$TWA.SelectionAnimation.callBaseMethod(this,"onEnd");
}};
$TWA.SelectionAnimation.registerClass("Telerik.Web.Animation.SelectionAnimation",$TWA.ParentAnimation);
$TWA.registerAnimation("selection",$TWA.SelectionAnimation);
$TWA.ConditionAnimation=function(_68,_69,fps,_6b,_6c){
$TWA.ConditionAnimation.initializeBase(this,[_68,_69,fps,_6b]);
this._conditionScript=_6c;
};
$TWA.ConditionAnimation.prototype={getSelectedIndex:function(){
var _6d=-1;
if(this._conditionScript&&this._conditionScript.length>0){
try{
_6d=eval(this._conditionScript)?0:1;
}
catch(ex){
}
}
return _6d;
},get_conditionScript:function(){
return this._conditionScript;
},set_conditionScript:function(_6e){
if(this._conditionScript!=_6e){
this._conditionScript=_6e;
this.raisePropertyChanged("conditionScript");
}
}};
$TWA.ConditionAnimation.registerClass("Telerik.Web.Animation.ConditionAnimation",$TWA.SelectionAnimation);
$TWA.registerAnimation("condition",$TWA.ConditionAnimation);
$TWA.CaseAnimation=function(_6f,_70,fps,_72,_73){
$TWA.CaseAnimation.initializeBase(this,[_6f,_70,fps,_72]);
this._selectScript=_73;
};
$TWA.CaseAnimation.prototype={getSelectedIndex:function(){
var _74=-1;
if(this._selectScript&&this._selectScript.length>0){
try{
var _75=eval(this._selectScript);
if(_75!==undefined){
_74=_75;
}
}
catch(ex){
}
}
return _74;
},get_selectScript:function(){
return this._selectScript;
},set_selectScript:function(_76){
if(this._selectScript!=_76){
this._selectScript=_76;
this.raisePropertyChanged("selectScript");
}
}};
$TWA.CaseAnimation.registerClass("Telerik.Web.Animation.CaseAnimation",$TWA.SelectionAnimation);
$TWA.registerAnimation("case",$TWA.CaseAnimation);
$TWA.FadeEffect=function(){
throw Error.invalidOperation();
};
$TWA.FadeEffect.prototype={FadeIn:0,FadeOut:1};
$TWA.FadeEffect.registerEnum("Telerik.Web.Animation.FadeEffect",false);
$TWA.FadeAnimation=function(_77,_78,fps,_7a,_7b,_7c,_7d){
$TWA.FadeAnimation.initializeBase(this,[_77,_78,fps]);
this._effect=(_7a!==undefined)?_7a:$TWA.FadeEffect.FadeIn;
this._max=(_7c!==undefined)?_7c:1;
this._min=(_7b!==undefined)?_7b:0;
this._start=this._min;
this._end=this._max;
this._layoutCreated=false;
this._forceLayoutInIE=(_7d===undefined||_7d===null)?true:_7d;
this._currentTarget=null;
this._resetOpacities();
};
$TWA.FadeAnimation.prototype={_resetOpacities:function(){
if(this._effect==$TWA.FadeEffect.FadeIn){
this._start=this._min;
this._end=this._max;
}else{
this._start=this._max;
this._end=this._min;
}
},_createLayout:function(){
var _7e=this._currentTarget;
if(_7e){
var _7f=TelerikCommonScripts.getCurrentStyle(_7e,"width");
var _80=TelerikCommonScripts.getCurrentStyle(_7e,"height");
var _81=TelerikCommonScripts.getCurrentStyle(_7e,"backgroundColor");
if((!_7f||_7f==""||_7f=="auto")&&(!_80||_80==""||_80=="auto")){
_7e.style.width=_7e.offsetWidth+"px";
}
if(!_81||_81==""||_81=="transparent"||_81=="rgba(0, 0, 0, 0)"){
_7e.style.backgroundColor=TelerikCommonScripts.getInheritedBackgroundColor(_7e);
}
this._layoutCreated=true;
}
},onStart:function(){
$TWA.FadeAnimation.callBaseMethod(this,"onStart");
this._currentTarget=this.get_target();
this.setValue(this._start);
if(this._forceLayoutInIE&&!this._layoutCreated&&Sys.Browser.agent==Sys.Browser.InternetExplorer){
this._createLayout();
}
},getAnimatedValue:function(_82){
return this.interpolate(this._start,this._end,_82);
},setValue:function(_83){
if(this._currentTarget){
TelerikCommonScripts.setElementOpacity(this._currentTarget,_83);
}
},get_effect:function(){
return this._effect;
},set_effect:function(_84){
_84=this._getEnum(_84,$TWA.FadeEffect);
if(this._effect!=_84){
this._effect=_84;
this._resetOpacities();
this.raisePropertyChanged("effect");
}
},get_minimumOpacity:function(){
return this._min;
},set_minimumOpacity:function(_85){
_85=this._getFloat(_85);
if(this._min!=_85){
this._min=_85;
this._resetOpacities();
this.raisePropertyChanged("minimumOpacity");
}
},get_maximumOpacity:function(){
return this._max;
},set_maximumOpacity:function(_86){
_86=this._getFloat(_86);
if(this._max!=_86){
this._max=_86;
this._resetOpacities();
this.raisePropertyChanged("maximumOpacity");
}
},get_forceLayoutInIE:function(){
return this._forceLayoutInIE;
},set_forceLayoutInIE:function(_87){
_87=this._getBoolean(_87);
if(this._forceLayoutInIE!=_87){
this._forceLayoutInIE=_87;
this.raisePropertyChanged("forceLayoutInIE");
}
},set_startValue:function(_88){
_88=this._getFloat(_88);
this._start=_88;
}};
$TWA.FadeAnimation.registerClass("Telerik.Web.Animation.FadeAnimation",$TWA.Animation);
$TWA.registerAnimation("fade",$TWA.FadeAnimation);
$TWA.FadeInAnimation=function(_89,_8a,fps,_8c,_8d,_8e){
$TWA.FadeInAnimation.initializeBase(this,[_89,_8a,fps,$TWA.FadeEffect.FadeIn,_8c,_8d,_8e]);
};
$TWA.FadeInAnimation.prototype={onStart:function(){
$TWA.FadeInAnimation.callBaseMethod(this,"onStart");
if(this._currentTarget){
this.set_startValue(TelerikCommonScripts.getElementOpacity(this._currentTarget));
}
}};
$TWA.FadeInAnimation.registerClass("Telerik.Web.Animation.FadeInAnimation",$TWA.FadeAnimation);
$TWA.registerAnimation("fadeIn",$TWA.FadeInAnimation);
$TWA.FadeOutAnimation=function(_8f,_90,fps,_92,_93,_94){
$TWA.FadeOutAnimation.initializeBase(this,[_8f,_90,fps,$TWA.FadeEffect.FadeOut,_92,_93,_94]);
};
$TWA.FadeOutAnimation.prototype={onStart:function(){
$TWA.FadeOutAnimation.callBaseMethod(this,"onStart");
if(this._currentTarget){
this.set_startValue(TelerikCommonScripts.getElementOpacity(this._currentTarget));
}
}};
$TWA.FadeOutAnimation.registerClass("Telerik.Web.Animation.FadeOutAnimation",$TWA.FadeAnimation);
$TWA.registerAnimation("fadeOut",$TWA.FadeOutAnimation);
$TWA.PulseAnimation=function(_95,_96,fps,_98,_99,_9a,_9b){
$TWA.PulseAnimation.initializeBase(this,[_95,_96,fps,null,((_98!==undefined)?_98:3)]);
this._out=new $TWA.FadeOutAnimation(_95,_96,fps,_99,_9a,_9b);
this.add(this._out);
this._in=new $TWA.FadeInAnimation(_95,_96,fps,_99,_9a,_9b);
this.add(this._in);
};
$TWA.PulseAnimation.prototype={get_minimumOpacity:function(){
return this._out.get_minimumOpacity();
},set_minimumOpacity:function(_9c){
_9c=this._getFloat(_9c);
this._out.set_minimumOpacity(_9c);
this._in.set_minimumOpacity(_9c);
this.raisePropertyChanged("minimumOpacity");
},get_maximumOpacity:function(){
return this._out.get_maximumOpacity();
},set_maximumOpacity:function(_9d){
_9d=this._getFloat(_9d);
this._out.set_maximumOpacity(_9d);
this._in.set_maximumOpacity(_9d);
this.raisePropertyChanged("maximumOpacity");
},get_forceLayoutInIE:function(){
return this._out.get_forceLayoutInIE();
},set_forceLayoutInIE:function(_9e){
_9e=this._getBoolean(_9e);
this._out.set_forceLayoutInIE(_9e);
this._in.set_forceLayoutInIE(_9e);
this.raisePropertyChanged("forceLayoutInIE");
},set_duration:function(_9f){
_9f=this._getFloat(_9f);
$TWA.PulseAnimation.callBaseMethod(this,"set_duration",[_9f]);
this._in.set_duration(_9f);
this._out.set_duration(_9f);
},set_fps:function(_a0){
_a0=this._getInteger(_a0);
$TWA.PulseAnimation.callBaseMethod(this,"set_fps",[_a0]);
this._in.set_fps(_a0);
this._out.set_fps(_a0);
}};
$TWA.PulseAnimation.registerClass("Telerik.Web.Animation.PulseAnimation",$TWA.SequenceAnimation);
$TWA.registerAnimation("pulse",$TWA.PulseAnimation);
$TWA.PropertyAnimation=function(_a1,_a2,fps,_a4,_a5){
$TWA.PropertyAnimation.initializeBase(this,[_a1,_a2,fps]);
this._property=_a4;
this._propertyKey=_a5;
this._currentTarget=null;
};
$TWA.PropertyAnimation.prototype={onStart:function(){
$TWA.PropertyAnimation.callBaseMethod(this,"onStart");
this._currentTarget=this.get_target();
},setValue:function(_a6){
var _a7=this._currentTarget;
if(_a7&&this._property&&this._property.length>0){
if(this._propertyKey&&this._propertyKey.length>0&&_a7[this._property]){
_a7[this._property][this._propertyKey]=_a6;
}else{
_a7[this._property]=_a6;
}
}
},getValue:function(){
var _a8=this.get_target();
if(_a8&&this._property&&this._property.length>0){
var _a9=_a8[this._property];
if(_a9){
if(this._propertyKey&&this._propertyKey.length>0){
return _a9[this._propertyKey];
}
return _a9;
}
}
return null;
},get_property:function(){
return this._property;
},set_property:function(_aa){
if(this._property!=_aa){
this._property=_aa;
this.raisePropertyChanged("property");
}
},get_propertyKey:function(){
return this._propertyKey;
},set_propertyKey:function(_ab){
if(this._propertyKey!=_ab){
this._propertyKey=_ab;
this.raisePropertyChanged("propertyKey");
}
}};
$TWA.PropertyAnimation.registerClass("Telerik.Web.Animation.PropertyAnimation",$TWA.Animation);
$TWA.registerAnimation("property",$TWA.PropertyAnimation);
$TWA.DiscreteAnimation=function(_ac,_ad,fps,_af,_b0,_b1){
$TWA.DiscreteAnimation.initializeBase(this,[_ac,_ad,fps,_af,_b0]);
this._values=(_b1&&_b1.length)?_b1:[];
};
$TWA.DiscreteAnimation.prototype={getAnimatedValue:function(_b2){
var _b3=Math.floor(this.interpolate(0,this._values.length-1,_b2));
return this._values[_b3];
},get_values:function(){
return this._values;
},set_values:function(_b4){
if(this._values!=_b4){
this._values=_b4;
this.raisePropertyChanged("values");
}
}};
$TWA.DiscreteAnimation.registerClass("Telerik.Web.Animation.DiscreteAnimation",$TWA.PropertyAnimation);
$TWA.registerAnimation("discrete",$TWA.DiscreteAnimation);
$TWA.InterpolatedAnimation=function(_b5,_b6,fps,_b8,_b9,_ba,_bb){
$TWA.InterpolatedAnimation.initializeBase(this,[_b5,_b6,fps,((_b8!==undefined)?_b8:"style"),_b9]);
this._startValue=_ba;
this._endValue=_bb;
};
$TWA.InterpolatedAnimation.prototype={get_startValue:function(){
return this._startValue;
},set_startValue:function(_bc){
_bc=this._getFloat(_bc);
if(this._startValue!=_bc){
this._startValue=_bc;
this.raisePropertyChanged("startValue");
}
},get_endValue:function(){
return this._endValue;
},set_endValue:function(_bd){
_bd=this._getFloat(_bd);
if(this._endValue!=_bd){
this._endValue=_bd;
this.raisePropertyChanged("endValue");
}
}};
$TWA.InterpolatedAnimation.registerClass("Telerik.Web.Animation.InterpolatedAnimation",$TWA.PropertyAnimation);
$TWA.registerAnimation("interpolated",$TWA.InterpolatedAnimation);
$TWA.ColorAnimation=function(_be,_bf,fps,_c1,_c2,_c3,_c4){
$TWA.ColorAnimation.initializeBase(this,[_be,_bf,fps,_c1,_c2,_c3,_c4]);
this._start=null;
this._end=null;
this._interpolateRed=false;
this._interpolateGreen=false;
this._interpolateBlue=false;
};
$TWA.ColorAnimation.prototype={onStart:function(){
$TWA.ColorAnimation.callBaseMethod(this,"onStart");
this._start=$TWA.ColorAnimation.getRGB(this.get_startValue());
this._end=$TWA.ColorAnimation.getRGB(this.get_endValue());
this._interpolateRed=(this._start.Red!=this._end.Red);
this._interpolateGreen=(this._start.Green!=this._end.Green);
this._interpolateBlue=(this._start.Blue!=this._end.Blue);
},getAnimatedValue:function(_c5){
var r=this._start.Red;
var g=this._start.Green;
var b=this._start.Blue;
if(this._interpolateRed){
r=Math.round(this.interpolate(r,this._end.Red,_c5));
}
if(this._interpolateGreen){
g=Math.round(this.interpolate(g,this._end.Green,_c5));
}
if(this._interpolateBlue){
b=Math.round(this.interpolate(b,this._end.Blue,_c5));
}
return $TWA.ColorAnimation.toColor(r,g,b);
},set_startValue:function(_c9){
if(this._startValue!=_c9){
this._startValue=_c9;
this.raisePropertyChanged("startValue");
}
},set_endValue:function(_ca){
if(this._endValue!=_ca){
this._endValue=_ca;
this.raisePropertyChanged("endValue");
}
}};
$TWA.ColorAnimation.getRGB=function(_cb){
if(!_cb||_cb.length!=7){
throw String.format(Telerik.Web.Resources.Animation_InvalidColor,_cb);
}
return {"Red":parseInt(_cb.substr(1,2),16),"Green":parseInt(_cb.substr(3,2),16),"Blue":parseInt(_cb.substr(5,2),16)};
};
$TWA.ColorAnimation.toColor=function(red,_cd,_ce){
var r=red.toString(16);
var g=_cd.toString(16);
var b=_ce.toString(16);
if(r.length==1){
r="0"+r;
}
if(g.length==1){
g="0"+g;
}
if(b.length==1){
b="0"+b;
}
return "#"+r+g+b;
};
$TWA.ColorAnimation.registerClass("Telerik.Web.Animation.ColorAnimation",$TWA.InterpolatedAnimation);
$TWA.registerAnimation("color",$TWA.ColorAnimation);
$TWA.LengthAnimation=function(_d2,_d3,fps,_d5,_d6,_d7,_d8,_d9){
$TWA.LengthAnimation.initializeBase(this,[_d2,_d3,fps,_d5,_d6,_d7,_d8]);
this._unit=(_d9!=null)?_d9:"px";
};
$TWA.LengthAnimation.prototype={getAnimatedValue:function(_da){
var _db=this.interpolate(this.get_startValue(),this.get_endValue(),_da);
return Math.round(_db)+this._unit;
},get_unit:function(){
return this._unit;
},set_unit:function(_dc){
if(this._unit!=_dc){
this._unit=_dc;
this.raisePropertyChanged("unit");
}
}};
$TWA.LengthAnimation.registerClass("Telerik.Web.Animation.LengthAnimation",$TWA.InterpolatedAnimation);
$TWA.registerAnimation("length",$TWA.LengthAnimation);
$TWA.MoveAnimation=function(_dd,_de,fps,_e0,_e1,_e2,_e3){
$TWA.MoveAnimation.initializeBase(this,[_dd,_de,fps,null]);
this._horizontal=_e0?_e0:0;
this._vertical=_e1?_e1:0;
this._relative=(_e2===undefined)?true:_e2;
this._horizontalAnimation=new $TWA.LengthAnimation(_dd,_de,fps,"style","left",null,null,_e3);
this._verticalAnimation=new $TWA.LengthAnimation(_dd,_de,fps,"style","top",null,null,_e3);
this.add(this._verticalAnimation);
this.add(this._horizontalAnimation);
};
$TWA.MoveAnimation.prototype={onStart:function(){
$TWA.MoveAnimation.callBaseMethod(this,"onStart");
var _e4=this.get_target();
this._horizontalAnimation.set_startValue(_e4.offsetLeft);
this._horizontalAnimation.set_endValue(this._relative?_e4.offsetLeft+this._horizontal:this._horizontal);
this._verticalAnimation.set_startValue(_e4.offsetTop);
this._verticalAnimation.set_endValue(this._relative?_e4.offsetTop+this._vertical:this._vertical);
},get_horizontal:function(){
return this._horizontal;
},set_horizontal:function(_e5){
_e5=this._getFloat(_e5);
if(this._horizontal!=_e5){
this._horizontal=_e5;
this.raisePropertyChanged("horizontal");
}
},get_vertical:function(){
return this._vertical;
},set_vertical:function(_e6){
_e6=this._getFloat(_e6);
if(this._vertical!=_e6){
this._vertical=_e6;
this.raisePropertyChanged("vertical");
}
},get_relative:function(){
return this._relative;
},set_relative:function(_e7){
_e7=this._getBoolean(_e7);
if(this._relative!=_e7){
this._relative=_e7;
this.raisePropertyChanged("relative");
}
},get_unit:function(){
this._horizontalAnimation.get_unit();
},set_unit:function(_e8){
var _e9=this._horizontalAnimation.get_unit();
if(_e9!=_e8){
this._horizontalAnimation.set_unit(_e8);
this._verticalAnimation.set_unit(_e8);
this.raisePropertyChanged("unit");
}
}};
$TWA.MoveAnimation.registerClass("Telerik.Web.Animation.MoveAnimation",$TWA.ParallelAnimation);
$TWA.registerAnimation("move",$TWA.MoveAnimation);
$TWA.ResizeAnimation=function(_ea,_eb,fps,_ed,_ee,_ef){
$TWA.ResizeAnimation.initializeBase(this,[_ea,_eb,fps,null]);
this._width=_ed;
this._height=_ee;
this._horizontalAnimation=new $TWA.LengthAnimation(_ea,_eb,fps,"style","width",null,null,_ef);
this._verticalAnimation=new $TWA.LengthAnimation(_ea,_eb,fps,"style","height",null,null,_ef);
this.add(this._horizontalAnimation);
this.add(this._verticalAnimation);
};
$TWA.ResizeAnimation.prototype={onStart:function(){
$TWA.ResizeAnimation.callBaseMethod(this,"onStart");
var _f0=this.get_target();
this._horizontalAnimation.set_startValue(_f0.offsetWidth);
this._verticalAnimation.set_startValue(_f0.offsetHeight);
this._horizontalAnimation.set_endValue((this._width!==null&&this._width!==undefined)?this._width:_f0.offsetWidth);
this._verticalAnimation.set_endValue((this._height!==null&&this._height!==undefined)?this._height:_f0.offsetHeight);
},get_width:function(){
return this._width;
},set_width:function(_f1){
_f1=this._getFloat(_f1);
if(this._width!=_f1){
this._width=_f1;
this.raisePropertyChanged("width");
}
},get_height:function(){
return this._height;
},set_height:function(_f2){
_f2=this._getFloat(_f2);
if(this._height!=_f2){
this._height=_f2;
this.raisePropertyChanged("height");
}
},get_unit:function(){
this._horizontalAnimation.get_unit();
},set_unit:function(_f3){
var _f4=this._horizontalAnimation.get_unit();
if(_f4!=_f3){
this._horizontalAnimation.set_unit(_f3);
this._verticalAnimation.set_unit(_f3);
this.raisePropertyChanged("unit");
}
}};
$TWA.ResizeAnimation.registerClass("Telerik.Web.Animation.ResizeAnimation",$TWA.ParallelAnimation);
$TWA.registerAnimation("resize",$TWA.ResizeAnimation);
$TWA.ScaleAnimation=function(_f5,_f6,fps,_f8,_f9,_fa,_fb,_fc){
$TWA.ScaleAnimation.initializeBase(this,[_f5,_f6,fps]);
this._scaleFactor=(_f8!==undefined)?_f8:1;
this._unit=(_f9!==undefined)?_f9:"px";
this._center=_fa;
this._scaleFont=_fb;
this._fontUnit=(_fc!==undefined)?_fc:"pt";
this._element=null;
this._initialHeight=null;
this._initialWidth=null;
this._initialTop=null;
this._initialLeft=null;
this._initialFontSize=null;
};
$TWA.ScaleAnimation.prototype={getAnimatedValue:function(_fd){
return this.interpolate(1,this._scaleFactor,_fd);
},onStart:function(){
$TWA.ScaleAnimation.callBaseMethod(this,"onStart");
this._element=this.get_target();
if(this._element){
this._initialHeight=this._element.offsetHeight;
this._initialWidth=this._element.offsetWidth;
if(this._center){
this._initialTop=this._element.offsetTop;
this._initialLeft=this._element.offsetLeft;
}
if(this._scaleFont){
this._initialFontSize=parseFloat(TelerikCommonScripts.getCurrentStyle(this._element,"fontSize"));
}
}
},setValue:function(_fe){
if(this._element){
var _ff=Math.round(this._initialWidth*_fe);
var _100=Math.round(this._initialHeight*_fe);
this._element.style.width=_ff+this._unit;
this._element.style.height=_100+this._unit;
if(this._center){
this._element.style.top=(this._initialTop+Math.round((this._initialHeight-_100)/2))+this._unit;
this._element.style.left=(this._initialLeft+Math.round((this._initialWidth-_ff)/2))+this._unit;
}
if(this._scaleFont){
var size=this._initialFontSize*_fe;
if(this._fontUnit=="px"||this._fontUnit=="pt"){
size=Math.round(size);
}
this._element.style.fontSize=size+this._fontUnit;
}
}
},onEnd:function(){
this._element=null;
this._initialHeight=null;
this._initialWidth=null;
this._initialTop=null;
this._initialLeft=null;
this._initialFontSize=null;
$TWA.ScaleAnimation.callBaseMethod(this,"onEnd");
},get_scaleFactor:function(){
return this._scaleFactor;
},set_scaleFactor:function(_102){
_102=this._getFloat(_102);
if(this._scaleFactor!=_102){
this._scaleFactor=_102;
this.raisePropertyChanged("scaleFactor");
}
},get_unit:function(){
return this._unit;
},set_unit:function(_103){
if(this._unit!=_103){
this._unit=_103;
this.raisePropertyChanged("unit");
}
},get_center:function(){
return this._center;
},set_center:function(_104){
_104=this._getBoolean(_104);
if(this._center!=_104){
this._center=_104;
this.raisePropertyChanged("center");
}
},get_scaleFont:function(){
return this._scaleFont;
},set_scaleFont:function(_105){
_105=this._getBoolean(_105);
if(this._scaleFont!=_105){
this._scaleFont=_105;
this.raisePropertyChanged("scaleFont");
}
},get_fontUnit:function(){
return this._fontUnit;
},set_fontUnit:function(_106){
if(this._fontUnit!=_106){
this._fontUnit=_106;
this.raisePropertyChanged("fontUnit");
}
}};
$TWA.ScaleAnimation.registerClass("Telerik.Web.Animation.ScaleAnimation",$TWA.Animation);
$TWA.registerAnimation("scale",$TWA.ScaleAnimation);
$TWA.Action=function(_107,_108,fps){
$TWA.Action.initializeBase(this,[_107,_108,fps]);
if(_108===undefined){
this.set_duration(0);
}
};
$TWA.Action.prototype={onEnd:function(){
this.doAction();
$TWA.Action.callBaseMethod(this,"onEnd");
},doAction:function(){
throw Error.notImplemented();
},getAnimatedValue:function(){
},setValue:function(){
}};
$TWA.Action.registerClass("Telerik.Web.Animation.Action",$TWA.Animation);
$TWA.registerAnimation("action",$TWA.Action);
$TWA.EnableAction=function(_10a,_10b,fps,_10d){
$TWA.EnableAction.initializeBase(this,[_10a,_10b,fps]);
this._enabled=(_10d!==undefined)?_10d:true;
};
$TWA.EnableAction.prototype={doAction:function(){
var _10e=this.get_target();
if(_10e){
_10e.disabled=!this._enabled;
}
},get_enabled:function(){
return this._enabled;
},set_enabled:function(_10f){
_10f=this._getBoolean(_10f);
if(this._enabled!=_10f){
this._enabled=_10f;
this.raisePropertyChanged("enabled");
}
}};
$TWA.EnableAction.registerClass("Telerik.Web.Animation.EnableAction",$TWA.Action);
$TWA.registerAnimation("enableAction",$TWA.EnableAction);
$TWA.HideAction=function(_110,_111,fps){
$TWA.HideAction.initializeBase(this,[_110,_111,fps]);
};
$TWA.HideAction.prototype={doAction:function(){
var _113=this.get_target();
if(_113){
_113.style.display="none";
}
}};
$TWA.HideAction.registerClass("Telerik.Web.Animation.HideAction",$TWA.Action);
$TWA.registerAnimation("hideAction",$TWA.HideAction);
$TWA.StyleAction=function(_114,_115,fps,_117,_118){
$TWA.StyleAction.initializeBase(this,[_114,_115,fps]);
this._attribute=_117;
this._value=_118;
};
$TWA.StyleAction.prototype={doAction:function(){
var _119=this.get_target();
if(_119){
_119.style[this._attribute]=this._value;
}
},get_attribute:function(){
return this._attribute;
},set_attribute:function(_11a){
if(this._attribute!=_11a){
this._attribute=_11a;
this.raisePropertyChanged("attribute");
}
},get_value:function(){
return this._value;
},set_value:function(_11b){
if(this._value!=_11b){
this._value=_11b;
this.raisePropertyChanged("value");
}
}};
$TWA.StyleAction.registerClass("Telerik.Web.Animation.StyleAction",$TWA.Action);
$TWA.registerAnimation("styleAction",$TWA.StyleAction);
$TWA.OpacityAction=function(_11c,_11d,fps,_11f){
$TWA.OpacityAction.initializeBase(this,[_11c,_11d,fps]);
this._opacity=_11f;
};
$TWA.OpacityAction.prototype={doAction:function(){
var _120=this.get_target();
if(_120){
TelerikCommonScripts.setElementOpacity(_120,this._opacity);
}
},get_opacity:function(){
return this._opacity;
},set_opacity:function(_121){
_121=this._getFloat(_121);
if(this._opacity!=_121){
this._opacity=_121;
this.raisePropertyChanged("opacity");
}
}};
$TWA.OpacityAction.registerClass("Telerik.Web.Animation.OpacityAction",$TWA.Action);
$TWA.registerAnimation("opacityAction",$TWA.OpacityAction);
$TWA.ScriptAction=function(_122,_123,fps,_125){
$TWA.ScriptAction.initializeBase(this,[_122,_123,fps]);
this._script=_125;
};
$TWA.ScriptAction.prototype={doAction:function(){
try{
eval(this._script);
}
catch(ex){
}
},get_script:function(){
return this._script;
},set_script:function(_126){
if(this._script!=_126){
this._script=_126;
this.raisePropertyChanged("script");
}
}};
$TWA.ScriptAction.registerClass("Telerik.Web.Animation.ScriptAction",$TWA.Action);
$TWA.registerAnimation("scriptAction",$TWA.ScriptAction);


if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();