if(!window.cart_numberinput_kernel_loaded){window.ComponentArt_NumberInput=function(_1){this.element=document.getElementById(_1);if(window.ComponentArt_Atlas){ComponentArt.Web.UI.NumberInput.initializeBase(this,[this.element]);this.beginUpdate=function(){this._updating=true;};this.endUpdate=function(){this._updating=false;this.Render();};this.get_isUpdating=function(){return this._updating;};this.getDescriptor=function(){return _qF0(this.constructor);};}else{this.beginUpdate=function(){this._updating=true;};this.endUpdate=function(){this._updating=false;this.Render();};this.get_isUpdating=function(){return this._updating;};}this.ClientControlId=this.Id=this.NumberInputId=this.InputId=_1;};ComponentArt.Web.UI.NumberInputEventArgs=function(_2){if(window.ComponentArt_Atlas){ComponentArt.Web.UI.NumberInputEventArgs.initializeBase(this);}var _3=_2;this.get_event=function(){return _3;};};if(window.ComponentArt_Atlas){ComponentArt.Web.UI.NumberInputEventArgs.registerClass("ComponentArt.Web.UI.NumberInputEventArgs",Sys.EventArgs);}ComponentArt_NumberInput.prototype.PublicProperties=[["ContainerId",String,1],["CssClass",String],["DecimalDigits",Number],["DecimalSeparator",String],["DisabledCssClass",String],["DisplayInputId",String,1],["DisplayText",String,1,1],["EmptyCssClass",String],["EmptyText",String],["Enabled",Boolean],["FocusedCssClass",String],["FocusedValidCssClass",String],["GroupSeparator",String],["GroupSize",Number],["Increment",Number,,,1],["InvalidCssClass",String],["masked",Object,1,1],["MaxLength",Number],["MaxValue",Number],["MinValue",Number],["NegativePattern",String],["PositivePattern",String],["Size",Number],["Step",Number],["ToolTip",String],["unmasked",Object,1,1],["ValidationInputId",String,1],["ValidationText",String,1,1],["Value",Number],["ValueInputId",String,1]];ComponentArt_NumberInput.prototype.PublicMethods=[["decreaseValue",,,[["increment",Number]]],["Dispose"],["FormatNumber",,String,[["number",Number]]],["GetProperty",,Object,[["popertyName",String]]],["hasFocus",,Boolean],["increaseValue",,,[["increment",Number]]],["isEmpty",,Boolean],["isValid",,Boolean],["Render"],["SetProperty",true,null,[["propertyName",String],["propertyValue",Object]]]];ComponentArt_NumberInput.prototype.PublicEvents=[["Blur"],["Click"],["Cut"],["Focus"],["KeyDown"],["KeyPress"],["KeyUp"],["Load"],["Paste"],["ValueChanged"]];ComponentArt_NumberInput.prototype.get_displayText=function(){return this.masked.value;};ComponentArt_NumberInput.prototype.get_masked=function(){return this.masked;};ComponentArt_NumberInput.prototype.get_unmasked=function(){return this.unmasked;};ComponentArt_NumberInput.prototype.get_validationText=function(){return this.validatingInput.value;};window.ComponentArt.Web.UI.NumberInput=ComponentArt_NumberInput;_qEF(ComponentArt_NumberInput,"this");if(window.ComponentArt_Atlas){ComponentArt.Web.UI.NumberInput.registerClass("ComponentArt.Web.UI.NumberInput",Sys.UI.Control);if(Sys.TypeDescriptor){Sys.TypeDescriptor.addType("componentArtWebUI","numberInput",ComponentArt.Web.UI.NumberInput);}}ComponentArt_NumberInput.prototype.GetProperty=function(_4){return this[_4];};ComponentArt_NumberInput.prototype.SetProperty=function(_5,_6){this[_5]=_6;};ComponentArt_NumberInput.prototype.Dispose=function(){if(window.ComponentArt_Atlas){this.element.control=null;}ComponentArt_Dispose(this);};ComponentArt_NumberInput.prototype.LoadProperties=function(_7){if(!_7){_7=[];}this.PropertyStorageArray=_7;for(var i=0;i<_7.length;i++){this[_7[i][0]]=_7[i][1];}this.InitializeElementPointers();};ComponentArt_NumberInput.prototype.hasFocus=function(){return this.HasFocus;};ComponentArt_NumberInput.prototype.Initialize=function(){_q132(this);if(this.get_events().getHandler("load")){setTimeout(this.Id+".get_events().getHandler('load')("+this.Id+", Sys.EventArgs.Empty)",1);}};ComponentArt_NumberInput.prototype.isEmpty=function(){return this.IsEmpty;};ComponentArt_NumberInput.prototype.isValid=function(){return this.IsValid;};ComponentArt_NumberInput.prototype.InitializeElementPointers=function(){this.element=document.getElementById(this.ContainerId);this.masked=document.getElementById(this.DisplayInputId);this.unmasked=document.getElementById(this.ValueInputId);this.validatingInput=document.getElementById(this.ValidationInputId);};ComponentArt_NumberInput.prototype.Render=function(){this.InitializeElementPointers();this.masked.title=this.ToolTip==null?"":this.ToolTip;this.masked.value=this.unmasked.value=(this.Value==null)?"":this.Value;this.IsValid=this.validate(this.Value,this);this.IsEmpty=this.Value==null;this.mask(this.unmasked.value,this);ComponentArt_NumberInput_Blur(this,null,true);};ComponentArt_NumberInput.prototype.Bound=function(_9){var _a=_9;if(this.Step>0){_a=((_a<0)?-1:1)*Math.floor(Math.abs(_a/this.Step))*this.Step;}_a=Math.min(this.MaxValue,_a);_a=Math.max(this.MinValue,_a);return _a;};ComponentArt_NumberInput.prototype.FormatNumber=function(_b){if(_b==null){return "";}var _c=(this.DecimalDigits<2147483647)?Math.abs(_b).toFixed(this.DecimalDigits):Math.abs(_b)+"";var _d=_c.split(".");var _e=_d[0].split("");var _f=_d[1];var _10=[];var _11=0;while(_e.length>0){if(this.GroupSize>0){if(_11===this.GroupSize){_10.push(this.GroupSeparator);}_11%=this.GroupSize;}_10.push(_e.pop());_11++;}var _12=_10.reverse().join("");if(_f){_12+=(this.DecimalSeparator+_f);}return (_b<0)?this.NegativePattern.replace("n",_12):this.PositivePattern.replace("n",_12);};ComponentArt_NumberInput.prototype.increaseValue=ComponentArt_NumberInput.prototype.incrementValue=function(_13){var _14=this.Value;if(!this.Value){this.Value=0;}this.Value=this.Bound(this.Value+(_13==null?this.Increment:_13));this.unmasked.value=this.Value;if(this.HasFocus){this.masked.value=this.mask(this.Value,this);this.masked.select();}else{this.masked.value=this.mask(this.Value,this);}var _15=this.Value;if(_14!==_15){ComponentArt_NumberInput_FireValueChanged(this);}return true;};ComponentArt_NumberInput.prototype.decreaseValue=ComponentArt_NumberInput.prototype.decrementValue=function(_16){var _17=this.Value;if(!this.Value){this.Value=0;}this.Value=this.Bound(this.Value-(_16==null?this.Increment:_16));this.unmasked.value=this.Value;if(this.HasFocus){this.masked.value=this.mask(this.Value,this);this.masked.select();}else{this.masked.value=this.mask(this.Value,this);}var _18=this.Value;if(_17!==_18){ComponentArt_NumberInput_FireValueChanged(this);}return true;};ComponentArt_NumberInput.prototype.mask=function(_19,_1a){var _1b=_1a.Value;var _1c;if(_19==null||_19===""){_1c=_1a.Value=null;_1a.unmasked.value="";if(_1b!==_1c){ComponentArt_NumberInput_FireValueChanged(_1a);}return "";}_1c=_1a.Value=_1a.unmasked.value=_1a.Bound(_19);if(_1b!==_1c){ComponentArt_NumberInput_FireValueChanged(_1a);}return this.validate(_1a.Value)?_1a.FormatNumber(_1a.Value):"";};ComponentArt_NumberInput.prototype.unmask=function(_1d){var _1e=_1d.replace(/[^0-9.-]/g,"");var _1f=parseFloat(_1e);return (isFinite(_1f))?_1f:"";};ComponentArt_NumberInput.prototype.validate=function(_20){if(isFinite(_20)){return true;}var _21=_20.replace(/[^0-9.-]/g,"");var _22=parseFloat(_21);return isFinite(_22);};window.cart_numberinput_kernel_loaded=true;} if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();