/* * * GrapeCity InputMan Library 1.0.0 * http://grapecity.com/ * * Copyright(c) GrapeCity, Inc. All rights reserved. * **/ var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},GCIM;(function(n){var r=function(){function n(){this.SpecialClientEvents={},this.StandardClientEvents={}}return n}(),i,t;n.ClientEvent=r,i=function(i){function r(n,t,r){i.call(this,n,t,r)}return __extends(r,i),r.prototype._getDefaultSize=function(){return{Width:r.DefaultWidth,Height:r.DefaultHeight}},r.prototype._beginInit=function(){var t=this;i.prototype._beginInit.call(this),this._shouldFireOnLeaveEvent=!1,this._shouldFireOnEnterEvent=!1,this._entered=!1,this._uIUpdate=new n.UIUpdate(this),this._isKeyDown=!1,this._monitorSpaceKey=!1,this._compositionEventFired=!1,this._showTouchToolBar="PressAndHold",this._enableContextMenu=!0,this._touchDropDownScale=1.5,this._isMouseDown=!1,this._readOnly=!1,this._focusType=n.FocusType.None,this._touchToolBar=new n.TouchToolBar(this),this._causesValidation=!1,this._validationGroup="",this._exitOnLeftRightKey=n.ExitOnLeftRightKey.None,this._editMode=n.EditMode.Insert,this._editModeInternal=n.EditMode.Insert,this.SelectionStart=0,this.SelectionEnd=0,this._oldSelectionStart=this.SelectionStart,this._oldSelectionEnd=this.SelectionEnd,this._droppedDown=!1,this.Text="",this._jQueryMobileTheme="",this._standardEventHash={},this._IsDragEnd=!1,this._themeBorderName="",this._onPageResize=function(n){t.ResetLocation()},n.Utility.IsIE||(this._notIETouchStarted=!1,this._notIETapNumber=0),n.Utility.IsIE10OrLater&&window.MSGesture&&(this._msGesture=new MSGesture)},r.prototype._endInit=function(){i.prototype._endInit.call(this),n.Utility.RegisterResetCallBack(this,this._onFormReset),this._backupInitialFormValue()},r.prototype._setPadding=function(n,t,i,r){this._paddingTop=n,this._paddingRight=t,this._paddingBottom=i,this._paddingLeft=r,this._updateLayout()},r.prototype._updateLayout=function(){},r.prototype.ResetLocation=function(){throw"abstract method called";},r.prototype.GetThemeBorderStyle=function(){var t=n.Utility.CreateElement("div"),r,i;return n.Utility.AddClass(t,this._themeBorderName),document.body.appendChild(t),r=t.currentStyle||window.getComputedStyle(t,null),i={},i.borderWidth=r.borderWidth,i.borderColor=r.borderColor,document.body.removeChild(t),i},r.prototype._createInputElement=function(){return this._realInputElement},r.prototype._setAccessKey=function(n){this._realInputElement.setAttribute("accesskey",n)},r.prototype._setLineHeight=function(n){this._realInputElement.style.lineHeight=n},r.prototype._registEvent=function(){i.prototype._registEvent.call(this),this._registInputElemnetEvent()},r.prototype._registInputElemnetEvent=function(){var t=this;if(this.GetInputElement()==null||this._uIUpdate==null)return;this._uIUpdate.AddEventForInputElement("mousedown",function(i){n.GlobalEventHandler.OnMouseDown(t,i)},!1),this._uIUpdate.AddEventForInputElement("mouseup",function(i){n.GlobalEventHandler.OnMouseUp(t,i)},!1),this._uIUpdate.AddEventForInputElement("selectstart",function(i){n.GlobalEventHandler.OnSelectStart(t,i)},!1),this._uIUpdate.AddEventForInputElement("keydown",function(i){n.GlobalEventHandler.OnKeyDown(t,i)},!1),this._uIUpdate.AddEventForInputElement("keypress",function(i){n.GlobalEventHandler.OnKeyPress(t,i)},!1),this._uIUpdate.AddEventForInputElement("keyup",function(i){n.GlobalEventHandler.OnKeyUp(t,i)},!1),this._uIUpdate.AddEventForInputElement("dblclick",function(i){n.GlobalEventHandler.OnDblClick(t,i)},!1),this._uIUpdate.AddEventForInputElement("beforecut",function(i){n.GlobalEventHandler.OnHTML5BeforeCut(t,i)},!1),this._uIUpdate.AddEventForInputElement("beforecopy",function(i){n.GlobalEventHandler.OnHTML5BeforeCopy(t,i)},!1),this._uIUpdate.AddEventForInputElement("beforepaste",function(i){n.GlobalEventHandler.OnHTML5BeforePaste(t,i)},!1),this._uIUpdate.AddEventForInputElement("cut",function(i){n.GlobalEventHandler.OnHTML5Cut(t,i)},!1),this._uIUpdate.AddEventForInputElement("copy",function(i){n.GlobalEventHandler.OnHTML5Copy(t,i)},!1),this._uIUpdate.AddEventForInputElement("paste",function(i){n.GlobalEventHandler.OnHTML5Paste(t,i)},!1),this._uIUpdate.AddEventForInputElement("mousewheel",function(i){n.GlobalEventHandler.OnMouseWheel(t,i)},!1),this._uIUpdate.AddEventForInputElement("DOMMouseScroll",function(i){n.GlobalEventHandler.OnMouseWheel(t,i)},!1),this._uIUpdate.AddEventForInputElement("dragstart",function(i){n.GlobalEventHandler.OnDragStart(t,i)},!1),this._uIUpdate.AddEventForInputElement("dragend",function(i){n.GlobalEventHandler.OnDragEnd(t,i)},!1),this._uIUpdate.AddEventForInputElement("mouseout",function(i){n.GlobalEventHandler.OnMouseOut(t,i)},!1),this._uIUpdate.AddEventForInputElement("drop",function(i){n.GlobalEventHandler.OnDrop(t,i)},!1),this._uIUpdate.AddEventForInputElement("contextmenu",function(i){n.GlobalEventHandler.OnContextMenu(t,i)},!1),this._uIUpdate.AddEventForInputElement("select",function(i){n.GlobalEventHandler.OnSelect(t,i)},!1),n.Utility.IsIE10OrLater&&(this._uIUpdate.AddEventForInputElement(n.PointerEvents.GetPointerDownName(),function(i){n.GlobalEventHandler.OnMSPointerDown(t,i)},!1),this._uIUpdate.AddEventForInputElement("MSGestureTap",function(i){n.GlobalEventHandler.OnMSGestureTap(t,i)},!1)),n.Utility.IsIE||(this._uIUpdate.AddEventForInputElement("input",function(i){n.GlobalEventHandler.OnInput(t,i)},!1),this._uIUpdate.AddEventForInputElement("touchstart",function(i){n.GlobalEventHandler.OnTouchStart(t,i)},!1),this._uIUpdate.AddEventForInputElement("touchend",function(i){n.GlobalEventHandler.OnTouchEnd(t,i)},!1)),this._uIUpdate.AddEventForInputElement("compositionstart",function(i){n.GlobalEventHandler.OnCompositionStart(t,i)},!1),this._uIUpdate.AddEventForInputElement("compositionupdate",function(i){n.GlobalEventHandler.OnCompositionUpdate(t,i)},!1),this._uIUpdate.AddEventForInputElement("compositionend",function(i){n.GlobalEventHandler.OnCompositionEnd(t,i)},!1)},r.prototype._createElementForNoSpinAndNoDropDown=function(n){return n},r.prototype._getEditAreaHeight=function(){throw"abstract method called";},r.prototype._getEditAreaWidth=function(){throw"abstract method called";},r.prototype._getRealSpinVisible=function(){return!1},r.prototype.SpinBtnMouseUp=function(){},r.prototype._getSpinDownButtonState=function(){return n.ControlStatus.Normal},r.prototype._getSpinUpButtonState=function(){return n.ControlStatus.Normal},r.prototype.GetPressedSpinUpImageUrl=function(){return""},r.prototype.GetPressedSpinDownImageUrl=function(){return""},r.prototype.GetSpinUpImageUrl=function(){return""},r.prototype.GetSpinDownImageUrl=function(){return""},r.prototype.GetSpinPosition=function(){return n.RelativePosition.Left},r.prototype._updateSpinButtonStatus=function(){},r.prototype.GetRelativeSpinPosition=function(){return n.RelativePosition.Left},r.prototype.SetTabIndex=function(n){this._realInputElement.tabIndex=n},r.prototype.GetSpinAlignment=function(){return n.SpinButtonAlignment.Vertical},r.prototype._getDropDownButtonState=function(){throw"abstract method called";},r.prototype.DropDownBtnMouseOut=function(){},r.prototype._getRealDropDownVisible=function(){throw"abstract method called";},r.prototype.GetDropDownObj=function(){return this._dropDownObj},r.prototype.InitDropDownObj=function(){var n=this.GetDropDownObj();n&&(n.SetFontFamily(this.GetFontFamily()),n.SetFontSize(this.GetFontSize()),n.SetFontWeight(this.GetFontWeight()),n.SetFontStyle(this.GetFontStyle()),n.SetTextDecoration(this.GetTextDecoration()))},r.prototype._getInnerTouchDropDownScale=function(){return n.Utility.IsPad()?1:this.GetTouchDropDownScale()},r.prototype._getDropDownPos=function(t,i,r,u){var l=n.Utility.GetElementPosition(this._getControlContainer()),c=n.Utility.GetHtmlLayOut(),a=this._uIUpdate.GetRealSize(),f=l.Left,e=l.Top,o;t==null&&(t=this.GetDropDownObj()._getRealCSSWidth()),i==null&&(i=this.GetDropDownObj()._getRealCSSHeight()),t=parseInt(t,10),i=parseInt(i,10),n.Utility.IsTouchMouseDown?u||(u=this._getInnerTouchDropDownScale()):u=1,t*=u,i*=u;var s=this._getRealCSSWidth(),v=this._getRealCSSHeight(),h=n.Utility.GetPageZoomRate();return r==n.DropDownAlign.Right?f+=s-t/u:(f+t)*h>c.realWidth&&(f+=s-t),f<0&&(f=0),o="down",(e+v+i)*h>c.realHeight&&e>i?(e-=i,o="up"):e+=a.Height,{Top:e,Left:f,valign:o}},r.prototype.GetInputElement=function(){return null},r.prototype._getControlContainer=function(){return this._topLevelElement},r.prototype.GetBorderContainer=function(){return null},r.prototype.GetMultiLine=function(){return!1},r.prototype.GetHideElement=function(){return null},r.prototype.SetText=function(n){return this},r.prototype.GetjQueryMobileTheme=function(){return this._jQueryMobileTheme},r.prototype.SetjQueryMobileTheme=function(t){t=n.Utility.CheckString(t),this._jQueryMobileTheme=t},r.prototype._onBackColorChanged=function(t,r){i.prototype._onBackColorChanged.call(this,t,r),this._uIUpdate.SetBackColor(r),n.BaseInputControlRender.UpdateIpadBackground(this)},r.prototype._onControlEffectChanged=function(t,r){i.prototype._onControlEffectChanged.call(this,t,r),n.BaseInputControlRender.UpdateIpadBackground(this)},r.prototype._onForeColorChanged=function(n,t){i.prototype._onForeColorChanged.call(this,n,t);if(this._IsUseWatermarkText().IsUseWatermarkText){var r=this._getShownWatermarkTextForeColor(this._focused);r===""&&this._uIUpdate.SetForeColor(t)}else this._uIUpdate.SetForeColor(t)},r.prototype._onBackgroundImageUrlChanged=function(t,r){i.prototype._onBackgroundImageUrlChanged.call(this,t,r),this._uIUpdate.SetBackgroundImageUrl(r),n.BaseInputControlRender.UpdateIpadBackground(this)},r.prototype._onBorderColorChanged=function(n,t){i.prototype._onBorderColorChanged.call(this,n,t),this._uIUpdate.SetBorderColor(t)},r.prototype._onBorderStyleChanged=function(n,t){i.prototype._onBorderStyleChanged.call(this,n,t),this._uIUpdate.SetBorderStyle(t)},r.prototype._onBorderWidthChanged=function(n,t){i.prototype._onBorderWidthChanged.call(this,n,t),this._uIUpdate.SetBorderWidth(t)},r.prototype._onCursorChanged=function(n,t){i.prototype._onCursorChanged.call(this,n,t),this._uIUpdate.SetCursor(t)},r.prototype._onFontFamilyChanged=function(n,t){i.prototype._onFontFamilyChanged.call(this,n,t),this._uIUpdate.SetFontFamily(t),this._dropDownObj&&this.GetDropDownObj().SetFontFamily(t)},r.prototype._onFontSizeChanged=function(n,t){i.prototype._onFontSizeChanged.call(this,n,t),this._uIUpdate.SetFontSize(t),this._dropDownObj&&this.GetDropDownObj().SetFontSize(t)},r.prototype._onFontWeightChanged=function(n,t){i.prototype._onFontWeightChanged.call(this,n,t),this._uIUpdate.SetFontWeight(t),this._dropDownObj&&this.GetDropDownObj().SetFontWeight(t)},r.prototype._onFontStyleChanged=function(n,t){i.prototype._onFontStyleChanged.call(this,n,t),this._uIUpdate.SetFontStyle(t),this._dropDownObj&&this.GetDropDownObj().SetFontStyle(t)},r.prototype._onTextDecorationChanged=function(n,t,r){i.prototype._onTextDecorationChanged.call(this,n,t,r),this._uIUpdate.SetTextDecoration(t),this._dropDownObj&&this.GetDropDownObj().SetTextDecoration(r)},r.prototype._onVisibleChanged=function(n,t){i.prototype._onVisibleChanged.call(this,n,t),this._uIUpdate.SetVisible(t)},r.prototype._onEnabledChanged=function(t,r){i.prototype._onEnabledChanged.call(this,t,r),this._uIUpdate.SetEnabled(r),r?this._removeBorderStatus(n.ControlStatus.Disabled):this._addBorderStatus(n.ControlStatus.Disabled),this._updateDropDownButtonStatus(),n.BaseInputControlRender.UpdateIpadBackground(this)},r.prototype._onWidthChanged=function(n,t){i.prototype._onWidthChanged.call(this,n,t),this._uIUpdate.ClearTimeTicket()},r.prototype._realSetFocus=function(){return this._uIUpdate.SetFocus(),this},r.prototype.GetToolTip=function(){return this._uIUpdate.GetToolTip()},r.prototype.SetToolTip=function(t){t=n.Utility.CheckString(t),this._uIUpdate.SetToolTip(t)},r.prototype.GetTouchDropDownScale=function(){return this._touchDropDownScale},r.prototype.SetTouchDropDownScale=function(t){t=n.Utility.CheckFloat(t,1,4),this._touchDropDownScale=t},r.prototype.GetShowTouchToolBar=function(){return n.Utility.GetMultipleStringEnum(this._showTouchToolBar).toLowerCase()},r.prototype.SetShowTouchToolBar=function(t){var i=n.Utility.CheckMultipleStringEnum(n.TouchToolBarDisplayStringValue,t);this._showTouchToolBar=i},r.prototype._getInnerShowTouchToolBarValue=function(){var t=0;return this._showTouchToolBar.toLowerCase().indexOf("pressandhold")!==-1&&(t|=n.TouchToolBarDisplayOptions.PressAndHold),this._showTouchToolBar.toLowerCase().indexOf("tapselection")!==-1&&(t|=n.TouchToolBarDisplayOptions.TapSelection),n.Utility.IsChrome37OrLater()&&(t=0),t},r.prototype.GetEnableContextMenu=function(){return this._enableContextMenu},r.prototype.SetEnableContextMenu=function(t){t=n.Utility.CheckBool(t),this._enableContextMenu=t},r.prototype._getEditModeInternal=function(){return this._editModeInternal},r.prototype.FireKeyExit=function(){this._eventInfo!=null&&this._eventInfo.Type=="KeyExit"&&(this._uIProcess.FireEvent(this,this._eventInfo.Name,this._eventInfo.Args,this._eventInfo.Type),this._focusType=n.FocusType.KeyExit,this._eventInfo=null)},r.prototype.GetCurrentValuesForAjax=function(){return""},r.prototype.SetLastClientValues=function(){var n=this.GetCurrentValuesForAjax();this._uIUpdate.SetLastClientValues(n)},r.prototype.ShouldCancelMouseWheelDefaultBehavior=function(){return!0},r.prototype._initWithServerData=function(n){i.prototype._initWithServerData.call(this,n),n.LineHeight!==undefined&&this._setLineHeight(n.LineHeight),n.BackColor!==undefined&&this.SetBackColor(n.BackColor),n.ForeColor!==undefined&&this.SetForeColor(n.ForeColor),n.BackgroundImage!==undefined&&this.SetBackgroundImageUrl(n.BackgroundImage),n.BorderColor!==undefined&&this.SetBorderColor(n.BorderColor),n.BorderStyle!==undefined&&this.SetBorderStyle(n.BorderStyle),n.BorderWidth!==undefined&&this.SetBorderWidth(n.BorderWidth),n.Cursor!==undefined&&this.SetCursor(n.Cursor),n.Enabled!==undefined&&this.SetEnabled(n.Enabled),n.Width!==undefined&&this.SetWidth(n.Width),n.Height!==undefined&&this.SetHeight(n.Height),n.ToolTip!==undefined&&this.SetToolTip(n.ToolTip),n.ShowTouchToolBar!==undefined&&this.SetShowTouchToolBar(n.ShowTouchToolBar),n.EnableContextMenu!==undefined&&this.SetEnableContextMenu(n.EnableContextMenu),this._initFontWithServerData(n.Font),this._InitWatermarkWithServerData(n.Watermark),(n.PaddingTop!==undefined||n.PaddingRight!==undefined||n.PaddingBottom!==undefined||n.PaddingLeft!==undefined)&&this._setPadding(n.PaddingTop,n.PaddingRight,n.PaddingBottom,n.PaddingLeft)},r.prototype._InitWatermarkWithServerData=function(n){n!=null&&(n.Null!=null&&(n.Null.Text!=null&&this.SetWatermarkNullText(n.Null.Text),n.Null.ForeColor!=null&&this.SetWatermarkNullForeColor(n.Null.ForeColor)),n.DisplayNull!=null&&(n.DisplayNull.Text!=null&&this.SetWatermarkDisplayNullText(n.DisplayNull.Text),n.DisplayNull.ForeColor!=null&&this.SetWatermarkDisplayNullForeColor(n.DisplayNull.ForeColor)))},r.prototype._initStandardClientEvents=function(n){n.ClientEvents!==undefined&&n.ClientEvents.StandardClientEvents!==undefined&&(this._standardClientEvents=n.ClientEvents.StandardClientEvents,this._registStandardClientEvents())},r.prototype._unRegistStandardClientEvents=function(){var t;if(this._standardClientEvents){var i=this._standardClientEvents,u=this.GetInputElement(),r=this._getControlContainer();for(t in i)n.Utility.DetachEvent(u,t.substr(2),this._standardEventHash[t]),n.Utility.DetachEvent(r,t.substr(2),this._standardEventHash[t])}},r.prototype._registStandardClientEvents=function(){var t,i,r,u;if(this._standardClientEvents){var f=this._standardClientEvents,o=this.GetInputElement(),e=this._getControlContainer();for(t in f){i=t.toLowerCase();if(i=="onblur"||i=="onfocus"||i=="onchange")continue;r=f[t],u="(evt);",r.indexOf("(")>0&&r.indexOf(")")>0&&(u=""),this._standardEventHash[t]=new Function("evt",r+u);switch(i){case"onmouseenter":case"onmouseleave":case"onmouseout":case"onmouseover":case"onmspointerover":case"onmspointerout":n.Utility.AttachEvent(e,t.substr(2),this._standardEventHash[t]);break;default:n.Utility.AttachEvent(o,t.substr(2),this._standardEventHash[t]);break}}}},r.prototype._initFontWithServerData=function(t){if(t!==undefined){t.FontFamily!==undefined&&this.SetFontFamily(t.FontFamily),t.FontSize!==undefined&&this.SetFontSize(t.FontSize),t.FontWeight!==undefined&&this.SetFontWeight(t.FontWeight),t.FontStyle!==undefined&&this.SetFontStyle(t.FontStyle);if(t.TextDecoration!==undefined){var i=n.Utility.Trim(t.TextDecoration).split(" ");this.SetTextDecoration(i.join(","))}}},r.prototype._GetTemporaryControlValue=function(){var n=this._IsUseWatermarkText();return n.IsUseWatermarkText?this.GetValue():n.DisplayText},r.prototype.GetReadOnly=function(){return this._readOnly},r.prototype.SetReadOnly=function(t){return t=n.Utility.CheckBool(t),this._uIUpdate.SetReadOnly(t),this._readOnly=t,this},r.prototype.GetExitOnLeftRightKey=function(){return this._exitOnLeftRightKey},r.prototype.SetExitOnLeftRightKey=function(t){t=n.Utility.CheckEnum(n.ExitOnLeftRightKey,t),this._exitOnLeftRightKey=t},r.prototype.SetAutoDropDown=function(n){this._dropDown.SetAutoDropDown(n)},r.prototype.GetDropDownButtonImageUrl=function(){return this._dropDown.GetButtonImage()},r.prototype.SetDropDownButtonImageUrl=function(n){this._dropDown.SetButtonImage(n)},r.prototype.GetDropDownClosingAnimation=function(){return this._dropDown.ClosingAnimation},r.prototype.SetDropDownClosingAnimation=function(n){this._dropDown.SetClosingAnimation(n)},r.prototype.GetDropDownShadow=function(){return this._dropDown.DropDownShadow},r.prototype.SetDropDownShadow=function(n){this._dropDown.SetDropDownShadow(n)},r.prototype.GetDropDownType=function(){return this._dropDown.GetDropDownType()},r.prototype.SetDropDownType=function(n){(n==="calendar"||n==="calculator")&&(n="control"),this._dropDown.SetDropDownType(n)},r.prototype.GetDropDownEnabled=function(){return this._dropDown.GetEnabled()&&this.GetEnabled()},r.prototype.SetDropDownEnabled=function(n){this._dropDown.SetEnabled(n)},r.prototype.GetDropDownOpeningAnimation=function(){return this._dropDown.OpeningAnimation},r.prototype.SetDropDownOpeningAnimation=function(n){this._dropDown.SetOpeningAnimation(n)},r.prototype.GetDropDownPosition=function(){return this._dropDown.Position},r.prototype.SetDropDownPosition=function(n){this._dropDown.SetPosition(n)},r.prototype.GetAutoDropDown=function(){return this._dropDown.AutoDropDown},r.prototype.GetPressedDropDownButtonImageUrl=function(){return this._dropDown.GetPressedButtonImage()},r.prototype.SetPressedDropDownButtonImageUrl=function(n){this._dropDown.SetPressedButtonImage(n)},r.prototype.GetDropDownVisible=function(){return this._dropDown.Visible},r.prototype.SetDropDownVisible=function(n){this._dropDown.SetVisible(n)},r.prototype._initDropDownData=function(n){n.AutoDropDown!==undefined&&this.SetAutoDropDown(n.AutoDropDown),n.Visible!==undefined&&this.SetDropDownVisible(n.Visible),n.ButtonImage!==undefined&&this.SetDropDownButtonImageUrl(n.ButtonImage),n.ClosingAnimation!==undefined&&this.SetDropDownClosingAnimation(n.ClosingAnimation),n.DropDownShadow!==undefined&&this.SetDropDownShadow(n.DropDownShadow),n.Enabled!==undefined&&this.SetDropDownEnabled(n.Enabled),n.OpeningAnimation&&this.SetDropDownOpeningAnimation(n.OpeningAnimation),n.Position!==undefined&&this.SetDropDownPosition(n.Position),n.PressedButtonImage!==undefined&&this.SetPressedDropDownButtonImageUrl(n.PressedButtonImage)},r.prototype._updateDropDownButtonStatus=function(){this._render._updateDropDownButtonStatus()},r.prototype._isSupportClipBoard=function(){throw"abstract method called";},r.prototype.GetShowLiterals=function(){return n.ShowLiterals.Always},r.prototype.GetAcceptsCrlf=function(){throw"abstract mehtod called";},r.prototype.GetUseClipboard=function(){throw"abstract method called";},r.prototype.KeyDown=function(n){throw"abstract method called";},r.prototype.KeyPress=function(n,t){throw"abstract method called";},r.prototype.KeyUp=function(n){throw"abstract method called";},r.prototype.MouseDown=function(n){throw"abstract method called";},r.prototype.MouseUp=function(n){throw"abstract method called";},r.prototype.MouseWheel=function(n){throw"abstract method called";},r.prototype.MouseOut=function(){throw"abstract method called";},r.prototype._addBorderStatus=function(n){this._render._addBorderStatus(n)},r.prototype._removeBorderStatus=function(n){this._render._removeBorderStatus(n)},r.prototype.MouseMove=function(n){throw"abstract method called";},r.prototype.Focus=function(n){throw"abstract method called";},r.prototype.OnLeave=function(t){var t=n.Utility.CheckFunction(t);this._specialClientEvents._onLeave=t},r.prototype.FireOnLeaveEvent=function(){this._entered&&(n.Utility.FireEvent(this,this._specialClientEvents._onLeave,null),n.Utility.FireEvent(this,this._standardClientEvents.onblur,null),this._entered=!1)},r.prototype.OnEnter=function(t){var t=n.Utility.CheckFunction(t);this._specialClientEvents._onEnter=t},r.prototype.FireOnEnterEvent=function(){this._entered||(n.Utility.FireEvent(this,this._specialClientEvents._onEnter,null),n.Utility.FireEvent(this,this._standardClientEvents.onfocus,null),this._entered=!0)},r.prototype.Select=function(){throw"abstract method called";},r.prototype.LoseFocus=function(n){throw"abstract method called";},r.prototype.DropDownBtnMouseDown=function(n,t){throw"abstract method called";},r.prototype._setDropDownButtonStatus=function(n){this._render._setDropDownButtonStatus(n)},r.prototype.DropDownBtnMouseUp=function(){throw"abstract method called";},r.prototype._CanShowContextMenu=function(){return this.GetEnabled()&&this.GetEnableContextMenu()&&!n.Utility.IsPad()},r.prototype.ShowContextMenu=function(n,t){this._CanShowContextMenu()&&this._ShowContextMenuInternal(n,t),this._mSHoldVisualEventFired=!1},r.prototype._ShowContextMenuInternal=function(t,i){this._BeginShowContextMenuInternal(t);if(n.Utility.IsTouchMouseDown==!0&&this._getInnerShowTouchToolBarValue()!=n.TouchToolBarDisplayOptions.None){if(!n.Utility.IsIE||this._mSHoldVisualEventFired){this.SelectAll();if(this._touchToolBar!=null){this._touchToolBar.IsShow&&this._touchToolBar.Close();var r=this._getInnerShowTouchToolBarValue()&n.TouchToolBarDisplayOptions.PressAndHold;r!=0?this._touchToolBar.Show(undefined,i):this._contextMenu.Show(i)}else this._contextMenu.Show(i)}}else n.Utility.IsTouchMouseDown==!0&&this.SelectAll(),this._contextMenu.Show(i,this._GetContextMenuPasswordmode())},r.prototype._BeginShowContextMenuInternal=function(n){var t=this._uIProcess.ShowContextMenu(this.GetInputElement(),n);t.SelectionStart!=null&&(this.SelectionStart=t.SelectionStart),t.SelectionEnd!=null&&(this.SelectionEnd=t.SelectionEnd)},r.prototype._GetContextMenuPasswordmode=function(){return undefined},r.prototype.MSPointerUp=function(n){throw"abstract method called";},r.prototype.MSPointerDown=function(n){this._focused&&(n.pointerType===n.MSPOINTER_TYPE_TOUCH||n.pointerType==="touch")&&this._msGesture&&(this._msGesture.target=n.target,this._msGesture.addPointer(n.pointerId))},r.prototype.MSGestureTap=function(t){if(n.Utility.IsTouchMouseDown==!0&&this._focused)if((this._getInnerShowTouchToolBarValue()&n.TouchToolBarDisplayOptions.TapSelection)!=0&&this._touchToolBar!=null)if(n.Utility.IsClickInSelection(t))return this._contextMenu.IsShow()&&this._contextMenu.Close(),this._touchToolBar.Show(undefined,t),n.Utility.PreventDefault(t),!0;return!1},r.prototype.TouchStart=function(n){var o=this,s=n.targetTouches?n.targetTouches[0]:n,u=s.pageX,h=u,i=s.pageY,e=i,t,f;this._notIETouchStarted=!0,this._notIETapNumber++,this._notIETapTimer!=null&&clearTimeout(this._notIETapTimer),t=this,f=n,this._notIETapTimer=setTimeout(function(){uh+r.NotIETapPrecision||ie+r.NotIETapPrecision||t._notIETouchStarted||(t._notIETapNumber===2?o.OnDoubleTap(n):o.OnTap(f)),t._notIETapNumber=0},r.NotIETapTreatAsHoldTime)},r.prototype.TouchEnd=function(n){this._notIETouchStarted=!1},r.prototype.OnTap=function(t){n.Utility.IsTouchMouseDown==!0&&this._focused&&(this._getInnerShowTouchToolBarValue()&n.TouchToolBarDisplayOptions.TapSelection)!=0&&this._touchToolBar!=null&&n.Utility.IsClickInSelection(t)&&(this._contextMenu.IsShow()&&this._contextMenu.Close(),this._touchToolBar.Show(!1,t),n.Utility.PreventDefault(t))},r.prototype.OnDoubleTap=function(n){},r.prototype.CompositionStart=function(t){this._imeMode=!0,this._IsUseWatermarkText(!0).IsUseWatermarkText&&(this.Text=this.GetText(),this._uIUpdate.SetText(this.Text),n.Utility.chrome&&this.SetSelection(0,0))},r.prototype.CompositionUpdate=function(n){},r.prototype.CompositionEnd=function(n){throw"abstract method called";},r.prototype.Input=function(n){throw"abstract method called";},r.prototype.GetSpinEnabled=function(){throw"abstract method called";},r.prototype.SetInnerFocus=function(n){throw"abstract method called";},r.prototype.SpinBtnMouseDown=function(n,t){throw"abstract method called";},r.prototype._setSpinUpButtonStatus=function(n){throw"abstract method called";},r.prototype._setSpinDownButtonStatus=function(n){throw"abstract method called";},r.prototype.SelectStart=function(n){throw"abstract method called";},r.prototype.Cut=function(n){throw"abstract method called";},r.prototype.Copy=function(n){throw"abstract method called";},r.prototype.ImeInput=function(n){throw"abstract method called";},r.prototype.Paste=function(n){throw"abstract method called";},r.prototype.Click=function(){throw"abstract method called";},r.prototype.DoubleClick=function(){throw"abstract method called";},r.prototype.DragStart=function(){throw"abstract method called";},r.prototype.DragEnd=function(n){this._IsDragEnd=!0;try{n!=null&&n.dataTransfer!=null&&n.dataTransfer.dropEffect==="move"&&this.Delete()}finally{this._IsDragEnd=!1}},r.prototype.DragEnter=function(){throw"abstract method called";},r.prototype.DragLeave=function(){throw"abstract method called";},r.prototype.DragDrop=function(n,t){throw"abstract method called";},r.prototype.PropertyChange=function(n){throw"abstract method called";},r.prototype.MouseOver=function(){},r.prototype.MSHoldVisual=function(n){throw"abstract method called";},r.prototype.CanUndo=function(){throw"abstract method called";},r.prototype.Delete=function(){throw"abstract method called";},r.prototype.SelectAll=function(){return this._SelectAllInternal(),this.SetLastClientValues(),this},r.prototype._SelectAllInternal=function(n){var t=this._uIProcess.SelectAll(n);if(t==null)return;t.SelectionStart!=null&&this._setSelectionStart(t.SelectionStart),t.SelectionEnd!=null&&this._setSelectionEnd(t.SelectionEnd),this._focused&&this.SetSelection(this.SelectionStart,this.SelectionEnd)},r.prototype._setSelectionStart=function(n){this.SelectionStart=n},r.prototype._setSelectionEnd=function(n){this.SelectionEnd=n},r.prototype.DeselectAll=function(){return this.SelectionStart==this.SelectionEnd?this:(this._setSelectionStart(this.SelectionEnd),this._focused&&this.SetSelection(this.SelectionEnd,this.SelectionEnd),this.SetLastClientValues(),this)},r.prototype.SetSelection=function(t,i,r){var e=this,f,u;if(t==null||i==null||isNaN(t)||isNaN(i))return;this.SelectionStart=t,this.SelectionEnd=i;if(!this._IsDragEnd)if((n.Utility.chrome||n.Utility.IsEdge)&&r)switch(this._focusType){case n.FocusType.None:f=this,setTimeout(function(){e._DoSetSelection(f.SelectionStart,f.SelectionEnd,r)},0);break;case n.FocusType.Click:this.GetHighlightText()===n.HighlightText.Field||this.GetHighlightText()===n.HighlightText.All||this.GetHighlightText()===!0?this._DoSetSelection(t,i,r):(u=this.GetCursorPosition(),u!==null&&u!=-1&&u!=="default"&&this.IsCursorPositionExist()&&setTimeout(function(){return e._DoSetSelection(t,i,r)},50));break;default:this._DoSetSelection(t,i,r);break}else this._DoSetSelection(t,i,r);t==i&&(this._uIProcess.isMulSelected=!1)},r.prototype.IsCursorPositionExist=function(){return!0},r.prototype.GetHighlightText=function(){return n.HighlightText.None},r.prototype.GetCursorPosition=function(){return null},r.prototype._DoSetSelection=function(t,i,r){n.Utility.SetSelection(this,t,i)},r.prototype.Undo=function(){throw"abstract method called";},r.prototype._getPassWordMode=function(){return!1},r.prototype.Active=function(){this._standardEventHash!==null&&n.Utility.FireEvent(this,this._standardEventHash.onbeforeeditfocus,null)},r.prototype._onFormReset=function(){var n=this;setTimeout(function(){return n._onFormResetTrunk()},0)},r.prototype._onFormResetTrunk=function(){},r.prototype._backupInitialFormValue=function(){},r.prototype._onInitServerDataComplete=function(){i.prototype._onInitServerDataComplete.call(this),this._backupInitialFormValue()},r.prototype._saveHideControlWhenHasLayoutAttribute=function(){this._hasLayoutAttribute&&(this._oldLayoutAttribute=this._getControlContainer().style.visibility,this._getControlContainer().style.visibility="hidden")},r.prototype._setLayoutStyle=function(n){i.prototype._setLayoutStyle.call(this,this._getControlContainer())},r.prototype._setServerAttribute=function(n){i.prototype._setServerAttribute.call(this,this._realInputElement)},r.prototype._setClassAttrbute=function(n,t){i.prototype._setClassAttrbute.call(this,n,this._realInputElement)},r.prototype._getRealCSSWidth=function(){var t=n.Utility.GetPaddingRectangle(this.GetInputElement());return this._getCSSWidth()+t.Left+t.Right+this._getCSSBorderWidth()*2},r.prototype._getRealCSSHeight=function(){var t=n.Utility.GetPaddingRectangle(this.GetInputElement());return this._getCSSHeight()+t.Top+t.Bottom+this._getCSSBorderWidth()*2},r.prototype._getCSSBorderWidth=function(){return this.GetBorderWidth()===""||this.GetBorderWidth()==null?1:i.prototype._getCSSBorderWidth.call(this)},r.prototype.Clear=function(){},r.prototype.GetValue=function(){return null},r.prototype.GetText=function(){return this.Text},r.prototype._CreateWatermark=function(){return new t},r.prototype._CreateDisplayWatermark=function(){return new t},r.prototype._GetWatermark=function(){return this._watermark==null&&(this._watermark=this._CreateWatermark()),this._watermark},r.prototype._GetDisplayWatermark=function(){return this._displayWatermark==null&&(this._displayWatermark=this._CreateDisplayWatermark()),this._displayWatermark},r.prototype.GetWatermarkNullText=function(){return this._GetWatermark().NullText},r.prototype.SetWatermarkNullText=function(t){t=n.Utility.CheckString(t);if(t===this.GetWatermarkNullText())return;var i=this._GetWatermark().NullText;this._GetWatermark().NullText=t,this._OnWatermarkNullTextChanged(i,t)},r.prototype._OnWatermarkNullTextChanged=function(n,t){this._GetWatermark().NullTextReal=t,this._IsValueNull()&&this._focused&&this._updateUIForeColor2(this._focused,!1)},r.prototype.GetWatermarkNullForeColor=function(){return this._GetWatermark().NullTextForeColor},r.prototype.SetWatermarkNullForeColor=function(t){t=n.Utility.CheckColor(t);if(t===this.GetWatermarkNullForeColor())return;var i=this._GetWatermark().NullTextForeColor;this._GetWatermark().NullTextForeColor=t,this._OnWatermarkNullForeColorChanged(i,t)},r.prototype._OnWatermarkNullForeColorChanged=function(n,t){this._IsValueNull()&&this._focused&&this._updateUIForeColor2(this._focused,!1)},r.prototype.GetWatermarkDisplayNullText=function(){return this._GetDisplayWatermark().NullText},r.prototype.SetWatermarkDisplayNullText=function(t){t=n.Utility.CheckString(t);if(t===this.GetWatermarkDisplayNullText())return;var i=this._GetDisplayWatermark().NullText;this._GetDisplayWatermark().NullText=t,this._OnWatermarkDisplayNullTextChanged(i,t)},r.prototype._OnWatermarkDisplayNullTextChanged=function(n,t){this._GetDisplayWatermark().NullTextReal=t,this._IsValueNull()&&!this._focused&&this._updateUIForeColor2(this._focused,!1)},r.prototype.GetWatermarkDisplayNullForeColor=function(){return this._GetDisplayWatermark().NullTextForeColor},r.prototype.SetWatermarkDisplayNullForeColor=function(t){t=n.Utility.CheckColor(t);if(t===this.GetWatermarkDisplayNullForeColor())return;var i=this._GetDisplayWatermark().NullTextForeColor;this._GetDisplayWatermark().NullTextForeColor=t,this._OnWatermarkDisplayNullForeColorChanged(i,t)},r.prototype._OnWatermarkDisplayNullForeColorChanged=function(n,t){this._IsValueNull()&&!this._focused&&this._updateUIForeColor2(this._focused,!1)},r.prototype._IsValueNull=function(){return this.GetValue()==null},r.prototype._getShownWatermarkText=function(n){var t;return t=n?this._GetWatermark():this._GetDisplayWatermark(),this._IsValueNull()?t.NullTextReal:""},r.prototype._getShownWatermarkTextForeColor=function(n){var t;t=n?this._GetWatermark():this._GetDisplayWatermark();if(this._IsValueNull())if(t.NullTextReal!=null&&t.NullTextReal!=="")return t.NullTextForeColor;return""},r.prototype._GetRealForeColor=function(n,t){if(!t){var i=this._getShownWatermarkTextForeColor(n);if(i!=="")return i}return this._GetTextForeColor()},r.prototype._GetTextForeColor=function(){return this.GetForeColor()},r.prototype._updateUIForeColor2=function(n,t){var i=this._GetRealForeColor(n,t);this._uIUpdate.SetForeColor(i)},r.prototype._IsUseWatermarkText=function(n){n==null&&(n=this._focused);var t=this._getShownWatermarkText(n),r,i;return n!=this._focused?(r=t,i=t!==""):(r=this._uIUpdate.GetText(),i=t!==""&&t===this._uIUpdate.GetText()),{IsUseWatermarkText:i,WatermarkText:t,DisplayText:r}},r.prototype._getDefaultPadding=function(){var i=this._paddingTop===undefined?2:this._paddingTop,r=this._paddingRight==undefined?1:this._paddingRight,n=this._paddingBottom==undefined?2:this._paddingBottom,t=this._paddingLeft===undefined?1:this._paddingLeft;return{Left:t,Top:i,Right:r,Bottom:n}},r.prototype._getIsSpreadCell=function(){return this._isSpreadCell},r.prototype._setIsSpreadCell=function(n){this._isSpreadCell=n},r.NotIETapTreatAsHoldTime=200,r.NotIETapPrecision=30,r.DefaultWidth=149,r.DefaultHeight=16,r.RESIZEGRID_HEIGHT=9,r.RESIZEGRID_WIDTH=10,r}(n.Control),n.BaseControl=i,t=function(){function n(){this.NullText="",this.NullTextReal="",this.NullTextForeColor=""}return n}(),n.Watermark=t})(GCIM||(GCIM={}));var GCIM;(function(n){var t=function(){function t(t){this._control=t,this._dropDownButtonStatus=n.ControlStatus.Normal,this._spinDownButtonStatus=n.ControlStatus.Normal,this._spinUpButtonStatus=n.ControlStatus.Normal,this._borderStatus=n.ControlStatus.Normal,this.AttachedBorderEvent=!1}return t.GetSpinButtonWidth=function(){return n.Utility.IsEdge?17:18},t.GetDropDownButtonWidth=function(){return n.Utility.IsEdge?17:18},t.prototype.Render=function(){var v,w,d,k,it,i,s,ot,u,h,b,r,p,y;this.AttachedBorderEvent=!1;var tt=this._control._topLevelElement,nt=this._control._realInputElement,g=n.Utility.CreateElement("div");tt?tt.parentElement.replaceChild(g,tt):nt.parentElement.replaceChild(g,nt),v=this._control._getId(),w=this._control._createInputElement(),w.setAttribute(n.Utility.IMControlIDAttribute,v),this._control._inputElement=w,this._control._borderTd=null;var a,ut=this._control._getRealSpinVisible(),f=this._control._getRealDropDownVisible(),e=this._control.GetDropDownPosition(),o=this._control.GetSpinPosition(),st=this._control.GetSpinAlignment(),l=this._control.GetRelativeSpinPosition();if(ut||f){d=n.Utility.CreateElement("div"),n.Utility.AddClass(d,"default-inputContainer"),k=n.Utility.CreateElement("table"),d.appendChild(k),k.cellPadding=0,k.cellSpacing=0,it=n.Utility.CreateElement("tbody"),i=n.Utility.CreateElement("tr"),k.appendChild(it),it.appendChild(i),s=n.Utility.CreateElement("td"),s.appendChild(w),s.style.padding="0px",n.Utility.IsIE10OrLater&&e===n.ButtonPosition.Inside&&(s.style.position="relative"),f&&(ot=this._createDropDownButton(),u=n.Utility.CreateElement("td"),u.style.padding="0px",u.appendChild(ot),ut||(i.appendChild(s),i.appendChild(u)));if(ut){var ct=this._createSpinDownButton(),ht=this._createSpinUpButton(),c=n.Utility.CreateElement("td");c.style.padding="0px",h=n.Utility.CreateElement("td"),h.style.padding="0px",c.appendChild(ct),h.appendChild(ht),this._control._updateSpinButtonStatus(),this._control._borderTd=n.Utility.CreateElement("td"),b=n.Utility.CreateElement("table"),b.cellPadding=0,b.cellSpacing=0,this._control._borderTd.appendChild(b),r=b.insertRow(-1);switch(st){case n.SpinButtonAlignment.BothSidesDownLeft:o===n.ButtonPosition.Inside&&e===n.ButtonPosition.Inside||o===n.ButtonPosition.Outside&&e===n.ButtonPosition.Outside?(i.appendChild(c),i.appendChild(s),f&&l===n.RelativePosition.Right&&i.appendChild(u),i.appendChild(h),f&&l===n.RelativePosition.Left&&i.appendChild(u)):o===n.ButtonPosition.Inside&&e===n.ButtonPosition.Outside?(i.appendChild(this._control._borderTd),r.appendChild(c),r.appendChild(s),r.appendChild(h),f&&i.appendChild(u)):o===n.ButtonPosition.Outside&&e===n.ButtonPosition.Inside&&(i.appendChild(c),i.appendChild(this._control._borderTd),r.appendChild(s),f&&r.appendChild(u),i.appendChild(h));break;case n.SpinButtonAlignment.BothSidesUpLeft:o===n.ButtonPosition.Inside&&e===n.ButtonPosition.Inside||o===n.ButtonPosition.Outside&&e===n.ButtonPosition.Outside?(i.appendChild(h),i.appendChild(s),f&&l===n.RelativePosition.Right&&i.appendChild(u),i.appendChild(c),f&&l===n.RelativePosition.Left&&i.appendChild(u)):o===n.ButtonPosition.Inside&&e===n.ButtonPosition.Outside?(i.appendChild(this._control._borderTd),f&&i.appendChild(u),r.appendChild(h),r.appendChild(s),r.appendChild(c)):o===n.ButtonPosition.Outside&&e===n.ButtonPosition.Inside&&(i.appendChild(h),i.appendChild(this._control._borderTd),i.appendChild(c),r.appendChild(s),f&&r.appendChild(u));break;case n.SpinButtonAlignment.HorizontalDownLeft:o===n.ButtonPosition.Inside&&e===n.ButtonPosition.Inside||o===n.ButtonPosition.Outside&&e===n.ButtonPosition.Outside?(i.appendChild(s),f&&l===n.RelativePosition.Right&&i.appendChild(u),i.appendChild(c),i.appendChild(h),f&&l===n.RelativePosition.Left&&i.appendChild(u)):o===n.ButtonPosition.Inside&&e===n.ButtonPosition.Outside?(i.appendChild(this._control._borderTd),f&&i.appendChild(u),r.appendChild(s),r.appendChild(c),r.appendChild(h)):o===n.ButtonPosition.Outside&&e===n.ButtonPosition.Inside&&(i.appendChild(this._control._borderTd),i.appendChild(c),i.appendChild(h),r.appendChild(s),f&&r.appendChild(u));break;case n.SpinButtonAlignment.HorizontalUpLeft:o===n.ButtonPosition.Inside&&e===n.ButtonPosition.Inside||o===n.ButtonPosition.Outside&&e===n.ButtonPosition.Outside?(i.appendChild(s),f&&l===n.RelativePosition.Right&&i.appendChild(u),i.appendChild(h),i.appendChild(c),f&&l===n.RelativePosition.Left&&i.appendChild(u)):o===n.ButtonPosition.Inside&&e===n.ButtonPosition.Outside?(i.appendChild(this._control._borderTd),f&&i.appendChild(u),r.appendChild(s),r.appendChild(h),r.appendChild(c)):o===n.ButtonPosition.Outside&&e===n.ButtonPosition.Inside&&(i.appendChild(this._control._borderTd),i.appendChild(h),i.appendChild(c),r.appendChild(s),f&&r.appendChild(u));break;default:p=n.Utility.CreateElement("table"),p.cellPadding=0,p.cellSpacing=0;var rt=n.Utility.CreateElement("tbody"),ft=n.Utility.CreateElement("tr"),et=n.Utility.CreateElement("tr");p.appendChild(rt),rt.appendChild(ft),rt.appendChild(et),ft.appendChild(h),et.appendChild(c),y=n.Utility.CreateElement("td"),y.appendChild(p),o===n.ButtonPosition.Inside&&e===n.ButtonPosition.Inside||o===n.ButtonPosition.Outside&&e===n.ButtonPosition.Outside?(i.appendChild(s),f&&l===n.RelativePosition.Right&&i.appendChild(u),i.appendChild(y),f&&l===n.RelativePosition.Left&&i.appendChild(u)):o===n.ButtonPosition.Inside&&e===n.ButtonPosition.Outside?(i.appendChild(this._control._borderTd),f&&i.appendChild(u),r.appendChild(s),r.appendChild(y)):o===n.ButtonPosition.Outside&&e===n.ButtonPosition.Inside&&(i.appendChild(this._control._borderTd),i.appendChild(y),r.appendChild(s),f&&r.appendChild(u));break}}a=d}else a=this._control._createElementForNoSpinAndNoDropDown(w);this._syncDataToNewTopLevelElement(tt,a),g.parentElement.replaceChild(a,g),this._control._topLevelElement=a,a.setAttribute(n.Utility.IMControlIDAttribute,v),nt.id=v,nt.setAttribute(n.Utility.IMControlIDAttribute,v),this._control.GetRealControlEffect()===n.ControlEffect.Ipad&&t.UpdateIpadBackground(this._control)},t.prototype._syncDataToNewTopLevelElement=function(t,i){if(t==null||i==null)return;var r=t.getAttribute("title");n.Utility.SetToolTip(i,r)},t.UpdateIpadBackground=function(t){var i=t.GetBorderContainer(),r=t._realInputElement||t.GetInputElement(),o=t.GetEnabled(),f=t._backgroundImageUrl,u=t.GetBackColor(),e;i.style.opacity="1",i.style.backgroundColor=u,i.style.backgroundImage="",r.style.backgroundColor=u,r.style.backgroundImage=f,t.GetRealControlEffect()==n.ControlEffect.Ipad?f?(i.style.opacity=o?"1":"0.4",i.style.backgroundImage=f,r.style.backgroundImage=f):u?(i.style.opacity=o?"1":"0.4",i.style.backgroundImage="",r.style.backgroundImage="",i.style.backgroundColor=u):(i.style.opacity=o?"1":"0.4",e="-webkit-linear-gradient(top, rgb(212, 212, 212) 0px, rgb(237, 237, 237) 3px, rgb(255, 255, 255) 4px, rgb(255, 255, 255) 100%)",i.style.backgroundImage=e,r.style.backgroundImage=e):(r=t._realInputElement,f||u||(r.style.backgroundImage="",i.style.backgroundImage=""))},t.prototype._createDropDownButton=function(){var i,f,r;if(this._clonedDropDownTable!==undefined&&this._clonedDropDownTable!==null)return this._clonedDropDownTable;else if(this._dropDownButton!==undefined&&this._dropDownButton!==null)return this._dropDownButton;else{if(!t.DropDownButtonTemplate){i=n.Utility.CreateElement("table"),i.cellSpacing=0,i.cellpadding=0;var c=i.insertRow(-1),s=i.insertRow(-1),h=i.insertRow(-1),o=c.insertCell(-1),u=s.insertCell(-1),e=h.insertCell(-1);o.style.padding="0px",u.style.padding="0px",f=n.Utility.CreateElement("img"),f.style.display="block",u.align="center",u.vAlign="center",u.appendChild(f),e.style.padding="0px",o.style.height="3px",e.style.height="3px",i.style.width=t.GetDropDownButtonWidth()+"px",n.CSSHelper.SetTouchAction(i.style,"manipulation"),t.DropDownButtonTemplate=i}return r=t.DropDownButtonTemplate.cloneNode(!0),r.id=this._control._getId()+"_DropDownButton",n.Utility.DisabledHoldVisual(r),n.Utility.DisabledContextMenu(r),this._dropDownButton=r,this._addDropDownEventHandler(),r}},t.prototype._createSpinDownButton=function(){return this._clonedSpinDownTable!==undefined&&this._clonedSpinDownTable!==null?this._clonedSpinDownTable:this._spinDownButton!==undefined&&this._spinDownButton!==null?this._spinDownButton:(this._spinDownButton=this._createSpinButton(!1),this._addSpinEventHandler("down"),this._spinDownButton)},t.prototype._createSpinUpButton=function(){return this._clonedSpinUpTable!==undefined&&this._clonedSpinUpTable!==null?this._clonedSpinUpTable:this._spinUpButton!==undefined&&this._spinUpButton!==null?this._spinUpButton:(this._spinUpButton=this._createSpinButton(!0),this._addSpinEventHandler("up"),this._spinUpButton)},t.prototype._createSpinButton=function(i){var r=n.Utility.CreateElement("table"),f;r.cellSpacing=0,r.cellpadding=0,n.Utility.IsEdge&&(r.style.position="relative");var c=r.insertRow(-1),h=r.insertRow(-1),s=r.insertRow(-1),o=c.insertCell(-1),u=h.insertCell(-1),e=s.insertCell(-1);return o.style.padding="0px",u.style.padding="0px",f=n.Utility.CreateElement("img"),f.style.display="block",u.appendChild(f),u.align="center",u.vAlign="center",e.style.padding="0px",r.style.width=t.GetSpinButtonWidth()+"px",o.style.height="3px",e.style.height="3px",n.CSSHelper.SetTouchAction(r.style,"manipulation"),r.id=i?this._control._getId()+"_SpinUpButton":this._control._getId()+"_SpinDownButton",n.Utility.DisabledHoldVisual(r),n.Utility.DisabledContextMenu(r),r},t.prototype._addSpinEventHandler=function(t){var i=this;this._spinDownContextMenu===undefined&&(this._spinDownContextMenu=function(t){n.GlobalEventHandler.OnSpinContextMenu(i._control,t,!0)},this._spinDownMouseDown=function(t){n.GlobalEventHandler.OnSpinBtnMouseDown(i._control,t,!0)},this._spinDownMouseUp=function(t){n.GlobalEventHandler.OnSpinBtnMouseUp(i._control,t,!0)},this._spinDownMouseOut=function(t){n.GlobalEventHandler.OnSpinBtnMouseOut(i._control,t,!0)},this._spinDownMouseOver=function(t){n.GlobalEventHandler.OnSpinBtnMouseOver(i._control,t,!0)},this._spinDownMouseMove=function(t){n.GlobalEventHandler.OnSpinBtnMouseMove(i._control,t,!0)},this._spinUpContextMenu=function(t){n.GlobalEventHandler.OnSpinContextMenu(i._control,t,!1)},this._spinUpMouseDown=function(t){n.GlobalEventHandler.OnSpinBtnMouseDown(i._control,t,!1)},this._spinUpMouseUp=function(t){n.GlobalEventHandler.OnSpinBtnMouseUp(i._control,t,!1)},this._spinUpMouseOut=function(t){n.GlobalEventHandler.OnSpinBtnMouseOut(i._control,t,!1)},this._spinUpMouseOver=function(t){n.GlobalEventHandler.OnSpinBtnMouseOver(i._control,t,!1)},this._spinUpMouseMove=function(t){n.GlobalEventHandler.OnSpinBtnMouseMove(i._control,t,!1)}),t==="up"&&this._spinUpButton!==null&&this._spinUpButton!==undefined?(n.Utility.AttachEvent(this._spinUpButton,"contextmenu",this._spinDownContextMenu),n.Utility.AttachEvent(this._spinUpButton,"mousedown",this._spinDownMouseDown),n.Utility.AttachEvent(this._spinUpButton,"mouseup",this._spinDownMouseUp),n.Utility.AttachEvent(this._spinUpButton,"mouseout",this._spinDownMouseOut),n.Utility.AttachEvent(this._spinUpButton,"mouseover",this._spinDownMouseOver),n.Utility.AttachEvent(this._spinUpButton,"mousemove",this._spinDownMouseMove),this.PreventTouchZoom(this._spinUpButton)):t==="down"&&this._spinDownButton!==null&&this._spinDownButton!==undefined&&(n.Utility.AttachEvent(this._spinDownButton,"contextmenu",this._spinUpContextMenu),n.Utility.AttachEvent(this._spinDownButton,"mousedown",this._spinUpMouseDown),n.Utility.AttachEvent(this._spinDownButton,"mouseup",this._spinUpMouseUp),n.Utility.AttachEvent(this._spinDownButton,"mouseout",this._spinUpMouseOut),n.Utility.AttachEvent(this._spinDownButton,"mouseover",this._spinUpMouseOver),n.Utility.AttachEvent(this._spinDownButton,"mousemove",this._spinUpMouseMove),this.PreventTouchZoom(this._spinDownButton))},t.prototype.PreventTouchZoom=function(t){n.Utility.AttachEvent(t,"touchstart",function(t){n.Utility.PreventTouchZoom(t)},!1)},t.prototype._addDropDownEventHandler=function(){var t=this;this._dropDownContextMenu===undefined&&(this._dropDownContextMenu=function(i){n.GlobalEventHandler.OnDropDownBtnContextMenu(t._control,i)},this._dropDownMouseDown=function(i){n.GlobalEventHandler.OnDropDownBtnMouseDown(t._control,i)},this._dropDownMouseUp=function(i){n.GlobalEventHandler.OnDropDownBtnMouseUp(t._control,i)},this._dropDownMouseOut=function(i){n.GlobalEventHandler.OnDropDownBtnMouseOut(t._control,i)},this._dropDownMouseOver=function(i){n.GlobalEventHandler.OnDropDownBtnMouseOver(t._control,i)},this._dropDownMouseMove=function(i){n.GlobalEventHandler.OnDropDownBtnMouseMove(t._control,i)}),this._dropDownButton!==null&&this._dropDownButton!==undefined&&(n.Utility.AttachEvent(this._dropDownButton,"contextmenu",this._dropDownContextMenu),n.Utility.AttachEvent(this._dropDownButton,"mousedown",this._dropDownMouseDown),n.Utility.AttachEvent(this._dropDownButton,"mouseup",this._dropDownMouseUp),n.Utility.AttachEvent(this._dropDownButton,"mouseout",this._dropDownMouseOut),n.Utility.AttachEvent(this._dropDownButton,"mouseover",this._dropDownMouseOver),n.Utility.AttachEvent(this._dropDownButton,"mousemove",this._dropDownMouseMove),this.PreventTouchZoom(this._dropDownButton))},t.prototype.AttachBorderEvent=function(t){var i=this;n.Utility.AttachEvent(t,"mousedown",function(r){(r.srcElement||r.target)==t&&(n.Utility.PreventDefault(r),i._control._focused||i._control.SetFocus())}),this.AttachedBorderEvent=!0},t.prototype._updateBorder=function(){var t=this._control.GetBorderContainer(),r=this._control._realInputElement,e,f,o;this.AttachedBorderEvent||t.tagName.toLowerCase()=="input"||t.tagName.toLowerCase()=="textarea"||this.AttachBorderEvent(t),this._control.GetRealControlEffect()!=n.ControlEffect.Chrome&&(r.style.outline="none"),n.Utility.RemoveClass(t,"ThemeBorder",!1,!0),n.Utility.RemoveClass(t,"ui-corner-all"),n.Utility.RemoveClass(t,"ui-widget-content"),e="default-input",n.Utility.IsIE11OrLater&&(e="default-inputIE11"),n.Utility.RemoveClass(r,e),n.Utility.RemoveClass(r,"ui-corner-all"),n.Utility.RemoveClass(r,"ui-widget-content"),n.Utility.AddClass(r,e),t!==this._control._inputElement&&(r.style.borderWidth="0px",n.Utility.RemoveClass(t,"ThemeBorder",!1,!0)),f=this._control.GetBorderWidth(),f!=null&&f!=""&&(f=n.Utility.CheckCSSLength(f)),t.style.borderWidth=f,t.style.borderStyle=this._control.GetBorderStyle(),t.style.borderColor=this._control.GetBorderColor();var s=(this._borderStatus&n.ControlStatus.Focused)!=0,u=(this._borderStatus&n.ControlStatus.Disabled)!=0,h=(this._borderStatus&n.ControlStatus.Hover)!=0,i="";switch(this._control.GetRealControlEffect()){case n.ControlEffect.VistaTheme:i=!u&&h?"VistatHoverThemeBorder":"VistaThemeBorder";break;case n.ControlEffect.Windows8Theme:i=s&&!u?"Win8FocusedThemeBorder":!u&&h?"Win8HoverThemeBorder":"Win8DefaultThemeBorder";break;case n.ControlEffect.Edge:i=s&&!u?"EdgeFocusedThemeBorder":!u&&h?"EdgeHoverThemeBorder":"EdgeDefaultThemeBorder";break;case n.ControlEffect.JQueryUI:n.Utility.RemoveClass(t,"ThemeBorder",!1,!0),n.Utility.AddClass(t,"ui-corner-all"),n.Utility.AddClass(t,"ui-widget-content"),n.Utility.AddClass(r,"ui-corner-all"),n.Utility.AddClass(r,"ui-widget-content"),n.Utility.IsPad()&&(t.style.overflow="hidden",t.style.display="inline-block");break;case n.ControlEffect.Chrome:o=n.Control.GetEnableChromeThemeOutline(),t.style.outlineOffset="",s&&!u?(r!==t&&(r.style.outline="0px"),i="ChromeFocusedThemeBorder",o?(t.style.outline="solid 1px rgb(165,199,254)",t.style.outlineOffset="0px"):this._control.GetBorderContainer().style.outline="none"):(i="ChromeDefaultThemeBorder",t.style.outline=o?"":"none");break;case n.ControlEffect.Ipad:i=this._control._droppedDown?"IpadDropppedThemeBorder":"IpadDefaultThemeBorder",n.Utility.IsPad()&&(t.style.overflow="",t.style.display="");break;default:i="NormalThemeBorder";break}this._control._themeBorderName=i,n.Utility.AddClass(t,i)},t.prototype._updateSpinButtonStatus=function(n){this._spinDownButton!=null&&(n===undefined||n==="down")&&this._updateSpinDownButtonState(),this._spinUpButton!=null&&(n===undefined||n==="up")&&this._updateSpinUpButtonState()},t.prototype._updateSpinUpButtonState=function(){var tt=this._control._spin,s=this.GetRealControlEffect(),i=this._spinUpButton,it=this._spinUpButtonStatus,u=this._clonedSpinUpTable,f=this._clonedSpinUpImg,h=tt.SpinUpImage,c=tt.PressedSpinUpImage,v=this._control.GetPressedSpinUpImageUrl(),y=this._control.GetSpinUpImageUrl(),r="Normal",p,nt,g,o,d,w,st,ot,e,ut,k,b;this._control.GetEnabled()&&(it&n.ControlStatus.Disabled)==0?(it&n.ControlStatus.Pressed)!=0?r="Pressed":(it&n.ControlStatus.Hover)!=0&&(r="Hover"):r="InActive",(r==="Hover"||r==="Pressed")&&s===n.ControlEffect.Chrome&&(r="Normal"),p=tt.GetAlignment()==n.SpinButtonAlignment.Vertical,n.Utility.IsIE8OrBelow&&u&&(o=u.parentElement,c.length===0&&h.length===0?(o!=null&&(o.removeChild(u),o.appendChild(i)),delete this._clonedSpinUpTable,delete this._clonedSpinUpImg):f!=null&&(f.src=r==="Pressed"?c.length>0?v:y:h.length>0?y:v));var a=i.rows.item(0).cells.item(0),t=i.rows.item(1).cells.item(0),l=i.rows.item(2).cells.item(0);i.style.backgroundSize="100% 100%",i.style.filter="",n.Utility.ClearChildren(t.firstChild),nt=t.firstChild.tagName.toLowerCase(),nt==="img"&&s===n.ControlEffect.JQueryUI?(n.Utility.ClearChildren(t),t.appendChild(n.Utility.CreateElement("div"))):nt=="div"&&s!==n.ControlEffect.JQueryUI&&(n.Utility.ClearChildren(t),g=n.Utility.CreateElement("img"),g.style.display="block",t.appendChild(g)),t.firstChild.className="",i.className="",t.firstChild.style.visibility="",t.style.filter="";if(c.length>0||h.length>0)a.style.backgroundImage="",t.style.backgroundImage="",l.style.backgroundImage="",t.firstChild.src="",t.firstChild.style.visibility="hidden",r==="InActive"&&(i.style.filter="gray"),n.Utility.IsIE8OrBelow&&u===undefined?(u=i.cloneNode(!0),o=i.parentElement,o.removeChild(i),f=n.Utility.CreateElement("img"),f.style.width=i.style.width,f.style.height=i.style.height,u.deleteRow(2),u.deleteRow(1),u.deleteRow(0),d=u.insertRow(-1).insertCell(-1),n.Utility.IsIE8&&(d.style.padding="0px"),f.style.display="block",d.appendChild(f),n.Utility.IsIE7&&(u.style.margin="-1px"),o.appendChild(u),this._clonedSpinUpTable=u,this._clonedSpinUpImg=f,f.src=r==="Pressed"?c.length>0?v:y:h.length>0?y:v):i.style.backgroundImage=r==="Pressed"?c.length>0?c:h:h.length>0?h:c;else if(s===n.ControlEffect.JQueryUI)a.style.backgroundImage="",t.style.backgroundImage="",l.style.backgroundImage="",t.firstChild.src="",n.Utility.IsIE8OrBelow&&(t.style.filter=""),p?(t.firstChild.innerHTML="
",t.firstChild.style.width="8px",t.firstChild.style.height="3px",t.firstChild.style.backgroundSize="100% 100%"):(t.firstChild.style.width="",t.firstChild.style.height="",t.firstChild.style.backgroundSize="",t.firstChild.className="ui-icon ui-icon-plus"),this.SetJQuerySpinUpButtonBorder(r);else{var rt=this._getSpinImageUrl(!0,"Top",r),et=this._getSpinImageUrl(!0,"Middle",r),ft=this._getSpinImageUrl(p?!0:!1,"Bottom",r);i.style.backgroundImage="",a.style.backgroundImage=rt,a.style.backgroundSize="100% 100%",t.style.backgroundImage=et,n.Utility.IsEdge||(t.style.backgroundSize=n.Utility.chrome&&s===n.ControlEffect.Chrome?"":"100% 100%"),l.style.backgroundImage=ft,l.style.backgroundSize="100% 100%",n.Utility.CreateImageCache([rt,et,ft]);if(p){w=this._getSpinImageUrl(!0,"Arrow",r,!0),t.firstChild.src=w,n.Utility.CreateImageCache(w,"img");switch(s){case n.ControlEffect.VistaTheme:t.firstChild.style.width="",t.firstChild.style.height="",st=parseInt(t.style.height),ot=4,n.Utility.IsIE8OrBelow&&st>ot&&(e=t.style.backgroundImage,e=e.substring(4,e.length),e=e.substring(0,e.length-1),t.style.backgroundImage="",t.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '"+e+"', sizingMethod = 'scale')");break;case n.ControlEffect.Chrome:t.firstChild.style.width="18px",t.firstChild.style.height="4px";break;case n.ControlEffect.Ipad:t.firstChild.style.width="",t.firstChild.style.height="",t.style.overflow="hidden",a.style.height="0px",l.style.height="0px",t.style.height=window.getComputedStyle(i).height,t.style.webkitBackgroundSize="100% 100%";break;default:t.firstChild.style.width="7px",ut=this._spinDownButton.rows.item(1).cells.item(0),k=Math.max(n.Utility.GetCSSLength(t.firstChild.style.height),n.Utility.GetCSSLength(ut.firstChild.style.height)),t.firstChild.style.height=k>4?"4px":k.toString()+"px"}}else b=this._getSpinImageUrl(!0,"ArrowTouch",r,!0),t.firstChild.src=b,n.Utility.CreateImageCache(b,"img"),n.Utility.IsIE9?(t.firstChild.style.maxWidth="10px",t.firstChild.style.maxHeight="10px"):(t.firstChild.style.width="10px",t.firstChild.style.height="10px"),s===n.ControlEffect.Ipad&&(t.style.overflow="hidden",t.style.height=window.getComputedStyle(i).height,t.style.webkitBackgroundSize="100% 100%",a.style.height="0px",l.style.height="0px")}},t.prototype._updateSpinDownButtonState=function(){var tt=this._control._spin,d=this._spinDownButtonStatus,u=this._clonedSpinDownTable,f=this._clonedSpinDownImg,y=this._control.GetPressedSpinDownImageUrl(),v=this._control.GetSpinDownImageUrl(),i=this._spinDownButton,c=tt.PressedSpinDownImage,h=tt.SpinDownImage,o=this.GetRealControlEffect(),r="Normal",g,it,s,p,w,rt,ot,e,ut,b,k;this._control.GetEnabled()&&(d&n.ControlStatus.Disabled)==0?(d&n.ControlStatus.Pressed)!=0?r="Pressed":(d&n.ControlStatus.Hover)!=0&&(r="Hover"):r="InActive",(r==="Hover"||r==="Pressed")&&o===n.ControlEffect.Chrome&&(r="Normal"),n.Utility.IsIE8OrBelow&&u&&(s=u.parentElement,c.length===0&&h.length===0?(s!=null&&(s.removeChild(u),s.appendChild(i)),delete this._clonedSpinDownImg,delete this._clonedSpinDownTable):f!=null&&(f.src=r==="Pressed"?c.length>0?y:v:h.length>0?v:y));var nt=tt.GetAlignment()==n.SpinButtonAlignment.Vertical,l=i.rows.item(0).cells.item(0),t=i.rows.item(1).cells.item(0),a=i.rows.item(2).cells.item(0);i.style.backgroundSize="100% 100%",i.style.marginRight="",n.Utility.ClearChildren(t.firstChild),g=t.firstChild.tagName.toLowerCase(),g=="img"&&o==n.ControlEffect.JQueryUI?(n.Utility.ClearChildren(t),t.appendChild(n.Utility.CreateElement("div"))):g=="div"&&o!=n.ControlEffect.JQueryUI&&(n.Utility.ClearChildren(t),it=n.Utility.CreateElement("img"),it.style.display="block",t.appendChild(it)),t.firstChild.className="",i.className="",t.firstChild.style.visibility="",t.style.filter="";if(c.length>0||h.length>0)l.style.backgroundImage="",t.style.backgroundImage="",a.style.backgroundImage="",t.firstChild.style.backgroundImage="",t.firstChild.style.visibility="hidden",r==="InActive"&&(i.style.filter="gray"),n.Utility.IsIE8OrBelow&&u===undefined?(u=i.cloneNode(!0),s=i.parentElement,s.removeChild(i),f=n.Utility.CreateElement("img"),f.style.width=i.style.width,f.style.height=i.style.height,u.deleteRow(2),u.deleteRow(1),u.deleteRow(0),p=u.insertRow(-1).insertCell(-1),n.Utility.IsIE8&&(p.style.padding="0px"),f.style.display="block",p.appendChild(f),n.Utility.IsIE7&&(u.style.margin="-1px"),s.appendChild(u),this._clonedSpinDownTable=u,this._clonedSpinDownImg=f,f.src=r==="Pressed"?c.length>0?y:v:h.length>0?v:y):i.style.backgroundImage=r==="Pressed"?c.length>0?c:h:h.length>0?h:c;else if(o==n.ControlEffect.JQueryUI)l.style.backgroundImage="",t.style.backgroundImage="",a.style.backgroundImage="",t.firstChild.style.backgroundImage="",n.Utility.IsIE8OrBelow&&(t.style.filter=""),nt?(t.firstChild.innerHTML="
",t.firstChild.style.width="8px",t.firstChild.style.height="3px",t.firstChild.style.backgroundSize="100% 100%"):(t.firstChild.style.width="",t.firstChild.style.height="",t.firstChild.style.backgroundSize="",t.firstChild.className="ui-icon ui-icon-minus"),this.SetJQuerySpinDownButtonBorder(r);else{var ft=this._getSpinImageUrl(nt?!1:!0,"Top",r),et=this._getSpinImageUrl(!1,"Middle",r),st=this._getSpinImageUrl(!1,"Bottom",r);i.style.backgroundImage="",l.style.backgroundImage=ft,l.style.backgroundSize="100% 100%",t.style.backgroundImage=et,n.Utility.IsEdge||(t.style.backgroundSize=n.Utility.chrome&&o==n.ControlEffect.Chrome?"":"100% 100%"),a.style.backgroundImage=this._getSpinImageUrl(!1,"Bottom",r),a.style.backgroundSize="100% 100%",n.Utility.CreateImageCache([ft,et,st]);if(nt){w=this._getSpinImageUrl(!1,"Arrow",r,!0),t.firstChild.src=w,n.Utility.CreateImageCache(w,"img");switch(o){case n.ControlEffect.VistaTheme:t.firstChild.style.width="",t.firstChild.style.height="",rt=parseInt(t.style.height),ot=4,n.Utility.IsIE8OrBelow&&rt>ot&&(e=t.style.backgroundImage,e=e.substring(4,e.length),e=e.substring(0,e.length-1),t.style.backgroundImage="",t.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '"+e+"', sizingMethod = 'scale')");break;case n.ControlEffect.Chrome:t.firstChild.style.width="18px",t.firstChild.style.height="4px";break;case n.ControlEffect.Ipad:t.firstChild.style.width="",t.firstChild.style.height="",t.style.overflow="hidden",l.style.height="0px",a.style.height="0px",t.style.height=window.getComputedStyle(i).height,t.style.webkitBackgroundSize="100% 100%";break;case n.ControlEffect.VistaTheme:break;case n.ControlEffect.VistaTheme:break;default:t.firstChild.style.width="7px",ut=this._spinUpButton.rows.item(1).cells.item(0),b=Math.max(n.Utility.GetCSSLength(ut.firstChild.style.height),n.Utility.GetCSSLength(t.firstChild.style.height)),t.firstChild.style.height=b>4?"4px":b.toString()+"px"}}else k=this._getSpinImageUrl(!1,"ArrowTouch",r,!0),t.firstChild.src=k,n.Utility.CreateImageCache(k,"img"),n.Utility.IsIE9?(t.firstChild.style.maxWidth="10px",t.firstChild.style.maxHeight="10px"):(t.firstChild.style.width="10px",t.firstChild.style.height="10px"),o==n.ControlEffect.Ipad&&(t.style.overflow="hidden",t.style.height=window.getComputedStyle(i).height,t.style.webkitBackgroundSize="100% 100%",l.style.height="0px",a.style.height="0px")}},t.prototype._updateDropDownButtonStatus=function(){var i=this._dropDownButton,tt=this._dropDownButtonStatus,y=this.GetRealControlEffect(),st=this._control._dropDown,f=this._clonedDropDownTable,o=this._clonedDropDownImg,d=this._control.GetPressedDropDownButtonImageUrl(),g=this._control.GetDropDownButtonImageUrl(),a=st.PressedButtonImage,v=st.ButtonImage,u,w,nt,rt,e,ut,h,l,r,it,c,p,ft,ot,s;if(i===null||i===undefined)return;u="Normal",this._control.GetEnabled()&&(tt&n.ControlStatus.Disabled)==0?(tt&n.ControlStatus.Pressed)!=0?u="Pressed":(tt&n.ControlStatus.Hover)!=0&&(u="Hover"):u="InActive",(u==="Hover"||u==="Pressed")&&y===n.ControlEffect.Chrome&&(u="Normal"),n.Utility.IsIE8OrBelow&&f&&(r=f.parentElement,a.length===0&&v.length===0?(r.removeChild(f),r.appendChild(i),delete this._clonedDropDownTable,delete this._clonedDropDownImg):o!=null&&(o.src=u==="Pressed"?a.length>0?d:g:v.length>0?g:d));var k=i.rows.item(0).cells.item(0),t=i.rows.item(1).cells.item(0),b=i.rows.item(2).cells.item(0);i.style.backgroundSize="100% 100%",i.style.marginRight="",w=null,t.firstChild&&t.firstChild.firstChild&&(w=t.firstChild.firstChild),y!==n.ControlEffect.JQueryUI&&n.Utility.ClearChildren(t.firstChild),nt=t.firstChild.tagName.toLowerCase(),nt=="img"&&y==n.ControlEffect.JQueryUI?(n.Utility.ClearChildren(t),t.appendChild(n.Utility.CreateElement("div"))):nt=="div"&&y!=n.ControlEffect.JQueryUI&&(n.Utility.ClearChildren(t),rt=n.Utility.CreateElement("img"),rt.style.display="block",t.appendChild(rt)),i.className="",t.firstChild.style.visibility="",t.style.filter="",i=f||i;if(a.length>0||v.length>0)k.style.backgroundImage="",t.style.backgroundImage="",b.style.backgroundImage="",t.firstChild.src="",t.firstChild.style.visibility="hidden",u==="InActive"?(i.style.filter="gray",i.style.webkitFilter="grayscale(100%)",n.Utility.firefox&&(i.style.filter="url(#grayscale)",r=i.parentElement,r.removeChild(i),e=n.Utility.CreateElement("svg"),e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("height","0px"),h=n.Utility.CreateElement("filter"),h.id="grayscale",l=n.Utility.CreateElement("feColorMatrix"),l.setAttribute("type","saturate"),e.appendChild(h),h.appendChild(l),r.appendChild(i),r.appendChild(e)),n.Utility.IsIE10OrLater&&(r=i.parentElement,r.removeChild(i),e=n.Utility.CreateElement("svg"),e.setAttribute("xmlns","http://www.w3.org/2000/svg"),ut=n.Utility.CreateElement("defs"),h=n.Utility.CreateElement("filter"),h.id="grayscale",l=n.Utility.CreateElement("feColorMatrix"),l.setAttribute("type","saturate"),l.setAttribute("values","0"),r.appendChild(e),e.appendChild(ut),ut.appendChild(h),h.appendChild(l),e.appendChild(i))):(i.style.filter="",i.style.webkitFilter="grayscale(0)",i.parentElement.tagName.toLowerCase()==="svg"&&(r=i.parentElement.parentElement,r.removeChild(r.firstChild),r.appendChild(i))),n.Utility.IsIE8OrBelow&&f===undefined?(f=i.cloneNode(!0),this._clonedDropDownTable=f,r=i.parentElement,r.removeChild(i),o=n.Utility.CreateElement("img"),o.style.width=i.style.width,o.style.height=i.style.height,f.deleteRow(2),f.deleteRow(1),f.deleteRow(0),it=f.insertRow(-1).insertCell(-1),n.Utility.IsIE8&&(it.style.padding="0px"),o.style.display="block",it.appendChild(o),n.Utility.IsIE7&&(f.style.margin="-1px"),r.appendChild(f),o.src=u==="Pressed"?a.length>0?d:g:v.length>0?g:d):i.style.backgroundImage=u==="Pressed"?a.length>0?a:v:v.length>0?v:a;else if(y==n.ControlEffect.JQueryUI)k.style.backgroundImage="",t.style.backgroundImage="",b.style.backgroundImage="",t.firstChild.src="",n.Utility.IsIE8OrBelow&&(t.style.filter=""),w||(c=n.Utility.CreateElement("div"),c.style.position="relative",c.style.width="8px",c.style.height="6px",c.style.overflow="hidden",p=n.Utility.CreateElement("div"),p.className="ui-icon ui-icon-triangle-1-s",p.style.position="absolute",p.style.left="-5px",p.style.top="-6px",c.appendChild(p),w=c,t.firstChild.appendChild(w)),t.firstChild.style.width="8px",t.firstChild.style.height="6px",this.SetJQueryDropDownButtonBorder(u);else{var ht=this._getDropDownImageUrl("Top",u),et=this._getDropDownImageUrl("Middle",u),ct=this._getDropDownImageUrl("Bottom",u);i.style.backgroundImage="",k.style.backgroundImage=ht,k.style.backgroundSize="100% 100%",t.style.backgroundImage=et,n.Utility.IsEdge||(t.style.backgroundSize="100% 100%"),b.style.backgroundImage=ct,b.style.backgroundSize="100% 100%",n.Utility.CreateImageCache([ht,et,ct]),t.firstChild.src=this._getDropDownImageUrl("Arrow",u,!0);switch(y){case n.ControlEffect.Windows8Theme:t.firstChild.style.width="11px",t.firstChild.style.height="8px";break;case n.ControlEffect.Edge:t.firstChild.style.width="11px",t.firstChild.style.height="8px";break;case n.ControlEffect.Chrome:t.firstChild.style.width="18px",t.firstChild.style.height="8px";break;case n.ControlEffect.Ipad:t.firstChild.style.width="",t.firstChild.style.height="",t.style.overflow="hidden",k.style.height="0px",b.style.height="0px",t.style.height=window.getComputedStyle(i).height,t.style.webkitBackgroundSize="100% 100%";break;case n.ControlEffect.VistaTheme:t.firstChild.style.width="",t.firstChild.style.height="",ft=parseInt(t.style.height),ot=14,n.Utility.IsIE8OrBelow&&ft>ot&&(s=t.style.backgroundImage,s=s.substring(4,s.length),s=s.substring(0,s.length-1),t.style.backgroundImage="",t.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src = '"+s+"', sizingMethod = 'scale')");break;default:t.firstChild.style.width="7px",t.firstChild.style.height="4px"}}},t.prototype._updateButtonIpadThemeBorderRadius=function(){var u=this._dropDownButton,n=this._spinDownButton,i=this._spinUpButton,e=this._iPadThemeBorderRadius(),f,t,r;u&&(f=u.rows.item(1).cells.item(0),f.style.webkitBorderRadius="",u.style.webkitBorderRadius="",e.dropDown==="right"?(f.style.webkitBorderTopRightRadius="4px",f.style.webkitBorderBottomRightRadius="4px",u.style.webkitBorderTopRightRadius="4px",u.style.webkitBorderBottomRightRadius="4px"):e.dropDown==="allRadius"&&(f.style.webkitBorderTopRightRadius="4px",f.style.webkitBorderBottomRightRadius="4px",f.style.webkitBorderTopLeftRadius="4px",f.style.webkitBorderBottomLeftRadius="4px",u.style.webkitBorderTopRightRadius="4px",u.style.webkitBorderBottomRightRadius="4px",u.style.webkitBorderTopLeftRadius="4px",u.style.webkitBorderBottomLeftRadius="4px"));if(n){t=n.rows.item(1).cells.item(0),r=i.rows.item(1).cells.item(0),t.style.webkitBorderRadius="",r.style.webkitBorderRadius="",n.style.webkitBorderRadius="",i.style.webkitBorderRadius="";switch(e.spinUp){case"left":r.style.webkitBorderBottomLeftRadius="4px",r.style.webkitBorderTopLeftRadius="4px",i.style.webkitBorderBottomLeftRadius="4px",i.style.webkitBorderTopLeftRadius="4px";break;case"right":r.style.webkitBorderTopRightRadius="4px",r.style.webkitBorderBottomRightRadius="4px",i.style.webkitBorderTopRightRadius="4px",i.style.webkitBorderTopRightRadius="4px";break;case"rightUp":r.style.webkitBorderTopRightRadius="4px",i.style.webkitBorderTopRightRadius="4px";break;case"allRadius":r.style.webkitBorderBottomLeftRadius="4px",r.style.webkitBorderTopLeftRadius="4px",r.style.webkitBorderBottomRightRadius="4px",r.style.webkitBorderTopRightRadius="4px",i.style.webkitBorderBottomLeftRadius="4px",i.style.webkitBorderTopLeftRadius="4px",i.style.webkitBorderBottomRightRadius="4px",i.style.webkitBorderTopRightRadius="4px";break;case"top":r.style.webkitBorderTopRightRadius="4px",r.style.webkitBorderTopLeftRadius="4px",i.style.webkitBorderTopRightRadius="4px",i.style.webkitBorderTopLeftRadius="4px";break}switch(e.spinDown){case"left":t.style.webkitBorderBottomLeftRadius="4px",t.style.webkitBorderTopLeftRadius="4px",n.style.webkitBorderBottomLeftRadius="4px",n.style.webkitBorderTopLeftRadius="4px";break;case"right":t.style.webkitBorderTopRightRadius="4px",t.style.webkitBorderBottomRightRadius="4px",n.style.webkitBorderTopRightRadius="4px",n.style.webkitBorderBottomRightRadius="4px";break;case"rightDown":t.style.webkitBorderBottomRightRadius="4px",n.style.webkitBorderBottomRightRadius="4px";break;case"allRadius":t.style.webkitBorderBottomLeftRadius="4px",t.style.webkitBorderTopLeftRadius="4px",t.style.webkitBorderBottomRightRadius="4px",t.style.webkitBorderTopRightRadius="4px",n.style.webkitBorderBottomLeftRadius="4px",n.style.webkitBorderTopLeftRadius="4px",n.style.webkitBorderBottomRightRadius="4px",n.style.webkitBorderTopRightRadius="4px";break;case"bottom":t.style.webkitBorderBottomLeftRadius="4px",t.style.webkitBorderBottomRightRadius="4px",n.style.webkitBorderBottomLeftRadius="4px",n.style.webkitBorderBottomRightRadius="4px";break}}},t.prototype._iPadThemeBorderRadius=function(){var t,r,i,u=this._control.GetRelativeSpinPosition(),o=this._control.GetDropDownPosition(),e=this._control.GetSpinPosition(),f=this._control.GetSpinAlignment();o!==n.ButtonPosition.Outside&&this._dropDownButton&&this._control._getRealDropDownVisible()||(t=o===n.ButtonPosition.Outside?"allRadius":"noRadius");if(e!==n.ButtonPosition.Outside&&this._spinDownButton&&this._control._getRealSpinVisible())switch(f){case n.SpinButtonAlignment.BothSidesDownLeft:i="left",t===undefined?u===n.RelativePosition.Left?(t="right",r="noRadius"):(t="noRadius",r="right"):r="right";break;case n.SpinButtonAlignment.BothSidesUpLeft:r="left",t===undefined?u===n.RelativePosition.Left?(t="right",i="noRadius"):(t="noRadius",i="right"):i="right";break;case n.SpinButtonAlignment.HorizontalDownLeft:i="noRadius",t===undefined?u===n.RelativePosition.Left?(t="right",r="noRadius"):(t="noRadius",r="right"):r="right";break;case n.SpinButtonAlignment.HorizontalUpLeft:r="noRadius",t===undefined?u===n.RelativePosition.Left?(t="right",i="noRadius"):(t="noRadius",i="right"):i="right";break;case n.SpinButtonAlignment.Vertical:t===undefined?u===n.RelativePosition.Left?(t="right",i="noRadius",r="noRadius"):(t="noRadius",i="rightDown",r="rightUp"):(r="rightUp",i="rightDown");break}else e===n.ButtonPosition.Outside?f===n.SpinButtonAlignment.Vertical?(r="top",i="bottom"):(r="allRadius",i="allRadius"):(r="noRadius",i="noRadius"),t===undefined&&(t="right");return{dropDown:t,spinUp:r,spinDown:i}},t.prototype.GetRealControlEffect=function(){return this._control.GetRealControlEffect()},t.prototype._getSpinImageUrl=function(t,i,r,u){var e=t?"SpinUp":"SpinDown",o=this._control._typeOfImage(".gif",i),f;switch(this.GetRealControlEffect()){case n.ControlEffect.Normal:r=="Hover"&&(r="Normal"),e+="_Normal",i==="Arrow"&&(e+="_7_4");break;case n.ControlEffect.VistaTheme:e+="_Vista";break;case n.ControlEffect.JQueryUI:case n.ControlEffect.Windows8Theme:e+="_Win8",n.Utility.IsIE8OrBelow&&n.Utility.GetClientOS()=="xp"||(o=".svg");break;case n.ControlEffect.Edge:e+="_Edge",o=".svg";break;case n.ControlEffect.Chrome:e+="_Chrome";break;case n.ControlEffect.Ipad:e+="_Ipad";break}return i.indexOf("Arrow")!==-1&&r!=="InActive"&&(r="Normal"),f=n.Utility.BaseImageUrl+e+"_"+i+"_"+r+o,f.indexOf("_Vista")!==-1&&f.indexOf("Arrow")===-1&&(f.indexOf("_Normal")!==-1||f.indexOf("_InActive")!==-1)&&(f=n.Utility.BaseImageUrl+"Vista_Transparent"+this._control._typeOfImage(".gif")),i.indexOf("Arrow")!==-1&&(t?this._control.GetPressedSpinUpImageUrl()==""&&this._control.GetSpinUpImageUrl()==""||(f=""):this._control.GetPressedSpinDownImageUrl()==""&&this._control.GetSpinDownImageUrl()==""||(f="")),u?f:n.Utility.CheckCssImageUrl(f)},t.prototype._getDropDownImageUrl=function(t,i,r){var f="DropDown",e=this._control._typeOfImage(".gif",t),u;switch(this.GetRealControlEffect()){case n.ControlEffect.Normal:i=="Hover"&&(i="Normal"),f+="_Normal",t==="Arrow"&&(f+="_7_4");break;case n.ControlEffect.VistaTheme:f+="_Vista";break;case n.ControlEffect.JQueryUI:case n.ControlEffect.Windows8Theme:f+="_Win8";break;case n.ControlEffect.Edge:f+="_Edge";break;case n.ControlEffect.Chrome:f+="_Chrome";break;case n.ControlEffect.Ipad:f+="_Ipad";break}return t.indexOf("Arrow")!==-1&&i!=="InActive"&&(i="Normal"),u=n.Utility.BaseImageUrl+f+"_"+t+"_"+i+e,u.indexOf("_Vista")!==-1&&u.indexOf("Arrow")===-1&&(u.indexOf("_Normal")!==-1||u.indexOf("_InActive")!==-1)&&(u=n.Utility.BaseImageUrl+"Vista_Transparent"+this._control._typeOfImage(".gif")),t.indexOf("Arrow")!==-1&&(this._control.GetPressedDropDownButtonImageUrl()==""&&this._control.GetDropDownButtonImageUrl()==""||(u="")),r?u:n.Utility.CheckCssImageUrl(u)},t.prototype.SetJQuerySpinDownButtonBorder=function(t){var r=[];r.push(this.GetJQueryStateClassName(t)),r.push("ui-widget-content");var f=this._control._getRealDropDownVisible(),e=this._control.GetDropDownPosition(),u=this._control.GetRelativeSpinPosition(),s=this.GetSpin(),i=this._spinDownButton,o=s.GetAlignment();i.style.borderWidth="";if(s.GetPosition()==n.ButtonPosition.Inside)switch(o){case n.SpinButtonAlignment.BothSidesDownLeft:r.push("ui-corner-left"),i.style.borderTopWidth="0px",i.style.borderBottomWidth="0px",i.style.borderLeftWidth="0px";break;case n.SpinButtonAlignment.BothSidesUpLeft:u===n.RelativePosition.Left?f&&e!==n.ButtonPosition.Outside||r.push("ui-corner-right"):r.push("ui-corner-right"),i.style.borderTopWidth="0px",i.style.borderBottomWidth="0px",i.style.borderRightWidth="0px";break;case n.SpinButtonAlignment.HorizontalDownLeft:i.style.borderTopWidth="0px",i.style.borderBottomWidth="0px";break;case n.SpinButtonAlignment.HorizontalUpLeft:u===n.RelativePosition.Left?f&&e!==n.ButtonPosition.Outside||r.push("ui-corner-right"):r.push("ui-corner-right"),i.style.borderTopWidth="0px",i.style.borderBottomWidth="0px",i.style.borderRightWidth="0px";break;default:u===n.RelativePosition.Left?f&&e!==n.ButtonPosition.Outside||r.push("ui-corner-br"):r.push("ui-corner-br"),i.style.borderTopWidth="0px",i.style.borderBottomWidth="0px",i.style.borderRightWidth="0px";break}else switch(o){case n.SpinButtonAlignment.BothSidesDownLeft:case n.SpinButtonAlignment.BothSidesUpLeft:r.push("ui-corner-all");break;case n.SpinButtonAlignment.HorizontalDownLeft:r.push("ui-corner-left"),i.style.borderRightWidth="0px";break;case n.SpinButtonAlignment.HorizontalUpLeft:r.push("ui-corner-right");break;default:i.style.borderTopWidth="0px",r.push("ui-corner-bottom");break}i.className=r.join(" ")},t.prototype.SetJQuerySpinUpButtonBorder=function(t){var r=[];r.push(this.GetJQueryStateClassName(t)),r.push("ui-widget-content");var f=this._control._getRealDropDownVisible(),e=this._control.GetDropDownPosition(),u=this._control.GetRelativeSpinPosition(),s=this.GetSpin(),i=this._spinUpButton,o=s.GetAlignment();i.style.borderWidth="";if(s.GetPosition()==n.ButtonPosition.Inside)switch(o){case n.SpinButtonAlignment.BothSidesDownLeft:u===n.RelativePosition.Left?f&&e!==n.ButtonPosition.Outside||r.push("ui-corner-right"):r.push("ui-corner-right"),i.style.borderTopWidth="0px",i.style.borderBottomWidth="0px",i.style.borderRightWidth="0px";break;case n.SpinButtonAlignment.BothSidesUpLeft:r.push("ui-corner-left"),i.style.borderTopWidth="0px",i.style.borderBottomWidth="0px",i.style.borderLeftWidth="0px";break;case n.SpinButtonAlignment.HorizontalDownLeft:u===n.RelativePosition.Left?f&&e!==n.ButtonPosition.Outside||r.push("ui-corner-right"):r.push("ui-corner-right"),i.style.borderWidth="0px",i.style.borderTopWidth="0px",i.style.borderBottomWidth="0px";break;case n.SpinButtonAlignment.HorizontalUpLeft:i.style.borderTopWidth="0px",i.style.borderBottomWidth="0px",i.style.borderRightWidth="0px";break;default:u===n.RelativePosition.Left?f&&e!==n.ButtonPosition.Outside||r.push("ui-corner-tr"):r.push("ui-corner-tr"),i.style.borderTopWidth="0px",i.style.borderBottomWidth="0px",i.style.borderRightWidth="0px";break}else switch(o){case n.SpinButtonAlignment.BothSidesDownLeft:case n.SpinButtonAlignment.BothSidesUpLeft:r.push("ui-corner-all");break;case n.SpinButtonAlignment.HorizontalDownLeft:r.push("ui-corner-right");break;case n.SpinButtonAlignment.HorizontalUpLeft:r.push("ui-corner-left"),i.style.borderRightWidth="0px";break;default:i.style.borderBottomWidth="0px",r.push("ui-corner-top");break}i.className=r.join(" ")},t.prototype.SetJQueryDropDownButtonBorder=function(t){var i=[];i.push(this.GetJQueryStateClassName(t)),i.push("ui-widget-content");var u=this._control._getRealSpinVisible(),e=this._control.GetSpinPosition(),f=this._control.GetRelativeSpinPosition(),r=this._dropDownButton;this._control.GetDropDownPosition()==n.ButtonPosition.Inside?(f===n.RelativePosition.Left?i.push("ui-corner-right"):u&&e!==n.ButtonPosition.Outside||i.push("ui-corner-right"),r.style.borderTopWidth="0px",r.style.borderBottomWidth="0px",r.style.borderRightWidth="0px"):i.push("ui-corner-all"),r.className=i.join(" ")},t.prototype._setJQueryMobileEffect=function(t){var f,u,i,r;(t===undefined||t==="")&&(t="a"),f=this._control._inputElement,f&&(n.Utility.AddClass(f,"ui-input-text"),n.Utility.AddClass(f,"ui-body-"+t)),u=this._clonedDropDownTable||this._dropDownButton,u&&(n.Utility.AddClass(u,"ui-btn"),n.Utility.AddClass(u,"ui-shadow"),n.Utility.AddClass(u,"ui-btn-corner-all"),n.Utility.AddClass(u,"ui-btn-inline"),n.Utility.AddClass(u,"ui-btn-ico-right"),n.Utility.AddClass(u,"ui-btn-up-"+t)),i=this._clonedSpinUpTable||this._spinUpButton,i&&(n.Utility.AddClass(i,"ui-btn"),n.Utility.AddClass(i,"ui-shadow"),n.Utility.AddClass(i,"ui-btn-corner-all"),n.Utility.AddClass(i,"ui-btn-inline"),n.Utility.AddClass(i,"ui-btn-ico-right"),n.Utility.AddClass(i,"ui-btn-up-"+t)),r=this._clonedSpinDownTable||this._spinDownButton,r&&(n.Utility.AddClass(r,"ui-btn"),n.Utility.AddClass(r,"ui-shadow"),n.Utility.AddClass(r,"ui-btn-corner-all"),n.Utility.AddClass(r,"ui-btn-inline"),n.Utility.AddClass(r,"ui-btn-ico-right"),n.Utility.AddClass(r,"ui-btn-up-"+t))},t.prototype._addBorderStatus=function(t){this._borderStatus|=t,n.BaseInputControl&&this._control instanceof n.BaseInputControl?this._control._updateBorder():this._updateBorder()},t.prototype._removeBorderStatus=function(t){this._borderStatus&=~t,n.BaseInputControl&&this._control instanceof n.BaseInputControl?this._control._updateBorder():this._updateBorder()},t.prototype._setBorderStatus=function(n){this._borderStatus=n},t.prototype._layout=function(){var b,o,c,e;this._control._uIUpdate.ClearTimeTicket();var s=this._control._getCSSBorderWidth(),v=this._getEditAreaHeight(),h=this._getEditAreaWidth(),l=this._spinDownButton,a=this._spinUpButton,y=this._dropDownButton,r=this._control._inputElement,p=this._control.GetSpinAlignment(),w=this._control._getRealSpinVisible(),k=this._control._getRealDropDownVisible();(s==0||isNaN(s))&&(b=this._control.GetThemeBorderStyle(),s=parseInt(b.borderWidth,10)),isNaN(s)&&(s=1),o=this._control._getDefaultPadding(),r.style.paddingLeft=o.Left+"px",r.style.paddingRight=o.Right+"px",r.style.paddingTop=o.Top+"px",r.style.paddingBottom=o.Bottom+"px",n.Utility.RemoveClass(r,t._inputBlockClassName);var u=Math.max(0,v),i=Math.max(0,h),f=v+n.Utility.GetCSSLength(o.Top)+n.Utility.GetCSSLength(o.Bottom);if(w||k){n.Utility.IsIE7&&(r.style.marginTop=r.style.marginBottom="-1px"),n.Utility.AddClass(r,t._inputBlockClassName);if(w)if(this.GetSpin().GetPosition()==n.ButtonPosition.Inside)switch(p){case n.SpinButtonAlignment.BothSidesDownLeft:case n.SpinButtonAlignment.BothSidesUpLeft:case n.SpinButtonAlignment.HorizontalDownLeft:case n.SpinButtonAlignment.HorizontalUpLeft:this._adjustSpinButtonHeight(l,f),this._adjustSpinButtonHeight(a,f),i=h-2*t.GetSpinButtonWidth();break;default:c=Math.floor(f/2),this._adjustSpinButtonHeight(a,c),this._adjustSpinButtonHeight(l,f-c),i=h-t.GetSpinButtonWidth();break}else{e=f+2*s;switch(p){case n.SpinButtonAlignment.BothSidesDownLeft:case n.SpinButtonAlignment.BothSidesUpLeft:case n.SpinButtonAlignment.HorizontalDownLeft:case n.SpinButtonAlignment.HorizontalUpLeft:this._adjustSpinButtonHeight(l,e),this._adjustSpinButtonHeight(a,e),i=h-2*t.GetSpinButtonWidth();break;default:c=Math.floor(e/2),this._adjustSpinButtonHeight(a,c),this._adjustSpinButtonHeight(l,e-c),i=h-t.GetSpinButtonWidth();break}}k&&(this._control.GetDropDownPosition()==n.ButtonPosition.Inside?(this._adjustDropDownButtonHeight(y,f),i-=t.GetDropDownButtonWidth()):(e=f+2*s,this._adjustDropDownButtonHeight(y,e),i-=t.GetDropDownButtonWidth())),u=v,u=Math.max(1,u),r.style.height=u+"px",i=i,i=Math.max(1,i),r.style.width=i+"px"}else i=h,u=v,i=Math.max(i,1),u=Math.max(u,1),r.style.width=i+"px",r.style.height=u+"px",r.style.margin="0px";a&&l&&this._updateSpinButtonStatus(),y&&this._updateDropDownButtonStatus(),this.GetRealControlEffect()===n.ControlEffect.Ipad&&this._updateButtonIpadThemeBorderRadius()},t.prototype._adjustSpinButtonHeight=function(t,i){var s=this._control.GetSpinAlignment(),h=this._control.GetSpinPosition(),c,u,e,o,f,r;s!==n.SpinButtonAlignment.Vertical?this._adjustSideButtonHeight(t,i,h===n.ButtonPosition.Outside):(i!=null&&h===n.ButtonPosition.Outside&&(c=t.currentStyle||window.getComputedStyle(t,null),u=n.Utility.GetBorderRectangle(t),s===n.SpinButtonAlignment.Vertical?t===this._spinUpButton?i=i-u.Top:(u=n.Utility.GetBorderRectangle(t),i=i-u.Bottom):i=i-(u.Top+u.Bottom)),r=t.rows.item(1).cells.item(0).firstChild,s===n.SpinButtonAlignment.Vertical&&(i==null&&(i=Math.floor(this._getEditAreaHeight()/2)),i<10?(e=Math.floor(i/3),o=e,f=i-e-o,t.rows.item(0).cells.item(0).style.height=e+"px",n.Utility.IsIE9?r.tagName.toLowerCase()==="img"&&(r.style.maxHeight=f+"px"):r.style.height=f+"px",t.rows.item(2).cells.item(0).style.height=o+"px",t.rows.item(1).cells.item(0).style.height=f+"px"):(t.rows.item(0).cells.item(0).style.height="3px",n.Utility.IsIE9?r.tagName.toLowerCase()==="img"&&(r.style.maxHeight="4px"):r.style.height="4px",t.rows.item(2).cells.item(0).style.height="3px",t.rows.item(1).cells.item(0).style.height=i-6+"px")),t.style.height=i+"px")},t.prototype._adjustDropDownButtonHeight=function(t,i){this._adjustSideButtonHeight(t,i,this._control.GetDropDownPosition()===n.ButtonPosition.Outside)},t.prototype._adjustSideButtonHeight=function(t,i,r){var h,s,f,o,e,u;i!=null&&r&&(h=t.currentStyle||window.getComputedStyle(t,null),s=n.Utility.GetBorderRectangle(t),i=i-(s.Top+s.Bottom)),i==null&&(i=this._getEditAreaHeight()),u=t.rows.item(1).cells.item(0).firstChild,i<16?(i>9?(f=o=3,e=i-f-o):(f=Math.floor(i/3),o=f,e=i-f-o),t.rows.item(0).cells.item(0).style.height=f+"px",n.Utility.IsIE9?u.tagName.toLowerCase()==="img"&&(u.style.maxHeight=e+"px"):u.style.height=e+"px",t.rows.item(2).cells.item(0).style.height=o+"px",t.rows.item(1).cells.item(0).style.height=e+"px"):this.GetRealControlEffect()===n.ControlEffect.Ipad?(t.rows.item(1).cells.item(0).style.height=i+"px",t.rows.item(0).cells.item(0).style.height="0px",u.style.height="10px",t.rows.item(2).cells.item(0).style.height="0px"):(t.rows.item(0).cells.item(0).style.height="3px",n.Utility.IsIE9?u.tagName.toLowerCase()==="img"&&(u.style.maxHeight="10px"):u.style.height="10px",t.rows.item(2).cells.item(0).style.height="3px",t.rows.item(1).cells.item(0).style.height=i-6+"px"),t.style.height=i+"px"},t.prototype._setSpinDownButtonStatus=function(t){n.Utility.IsPad()&&t===n.ControlStatus.Hover&&(t=n.ControlStatus.Normal),t!==this._spinDownButtonStatus&&(this._spinDownButtonStatus=t,this._updateSpinButtonStatus("down"))},t.prototype._setSpinUpButtonStatus=function(t){n.Utility.IsPad()&&t===n.ControlStatus.Hover&&(t=n.ControlStatus.Normal),t!==this._spinUpButtonStatus&&(this._spinUpButtonStatus=t,this._updateSpinButtonStatus("up"))},t.prototype._setDropDownButtonStatus=function(t){n.Utility.IsPad()&&t===n.ControlStatus.Hover&&(t=n.ControlStatus.Normal),t!==this._dropDownButtonStatus&&(this._dropDownButtonStatus=t,this._updateDropDownButtonStatus())},t.prototype.GetSpin=function(){return this._control._spin},t.prototype.GetJQueryStateClassName=function(n){switch(n){case"InActive":return"ui-state-disabled";case"Pressed":return"ui-state-active";case"Hover":return"ui-state-hover";default:return"ui-state-default"}},t.prototype._getEditAreaHeight=function(){return this._control._getEditAreaHeight()},t.prototype._getEditAreaWidth=function(){return this._control._getEditAreaWidth()},t.prototype._updateControlStatus=function(){var t=this._control._inputElement;this._updateBorder(),this._control._getRealSpinVisible()&&this._updateSpinButtonStatus(),this._control._getRealDropDownVisible()&&this._updateDropDownButtonStatus(),this._control.GetRealControlEffect()!=n.ControlEffect.Chrome&&(this._control._realInputElement.style.outline="none"),this._control._getControlEffect()===n.ControlEffect.JQueryUI?this._control.GetEnabled()?n.Utility.RemoveClass(t,"ui-state-disabled"):n.Utility.AddClass(t,"ui-state-disabled"):n.Utility.RemoveClass(t,"ui-state-disabled")},t._inputBlockClassName="inputBlockClassName",t}();n.BaseInputControlRender=t})(GCIM||(GCIM={}));var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},GCIM;(function(n){var u=function(t){function u(n,i){var r=n.tagName.toLowerCase();if(r!="input")throw"container element must be input element";t.call(this,n,i,!0)}return __extends(u,t),u.prototype._beginInit=function(){var u=this;t.prototype._beginInit.call(this),this._onMouseOver=function(t){n.GlobalEventHandler.OnMouseOver(u,t)},this._onMouseOut=function(t){n.GlobalEventHandler.OnMouseOut(u,t)},this._spin=new r(this),this._dataFromServer&&this._dataFromServer.Spin&&this._dataFromServer.Spin.Visible&&(this._spin.Visible=this._dataFromServer.Spin.Visible),this._dropDown=new i(this),this._dropDown.Visible=this._getDefaultDropDownVisible(),this._dataFromServer&&this._dataFromServer.DropDown&&this._dataFromServer.DropDown.Visible!==undefined&&(this._dropDown.Visible=this._dataFromServer.DropDown.Visible),this._keyActionList=null,this.Value=null,this._acceptCrlf=n.CrLfMode.NoControl,this._clipContent=n.ClipContent.IncludeLiterals,this._useClipboard=!0,this._highlightText=n.HighlightText.None,this._spinPosition=n.RelativePosition.Left,this._format={Fields:null},this._displayFormat={Fields:null},this._isInUpdatePanelAndAsyncPostBack=!1,this._needResetFocus=!1,this._contextMenu=new n.ContextMenu("o"+this._getId()+"IMControl.ContextMenu",this),this._spinBtnPressed=!1,this._dropDownBtnPressed=!1,this._oldValue=this.Value,this._mouseButton=n.MouseButton.Default,this._realInputElement=this._getContainer(),this._realInputElement.value="",this._realInputElement.style.margin="0px",this._realInputElement.style.margin="0px",this._canFireClientEvent=!0,n.Utility.webkit&&(this._realInputElement.style.outline="none"),this._realInputElement.autocomplete="off"},u.prototype._getDefaultDropDownVisible=function(){return!1},u.prototype._createUIProcess=function(){this._uIProcess=new n.BaseUIProcess},u.prototype._createUIRender=function(){this._render=new n.BaseInputControlRender(this)},u.prototype._renderHtmlElement=function(){this._create()},u.prototype._endInit=function(){this._mouseButton=n.MouseButton.Default,t.prototype._endInit.call(this)},u.prototype._dispose=function(){t.prototype._dispose.call(this),this.CloseDropDown(!0),this._dropDownObj!=null&&this._dropDownObj._doDispose()},u.prototype._saveOldControlData=function(i){var r=t.prototype._saveOldControlData.call(this,i);return i!=null&&i._focusType!==n.FocusType.None&&(r.FocusType=i._focusType),r},u.prototype._loadOldControlData=function(n){if(n==null)return;t.prototype._loadOldControlData.call(this,n),n.FocusType!=null&&(this._focusType=n.FocusType)},u.prototype._updateLayout=function(){t.prototype._updateLayout.call(this),this._updateBorder(),this._layout()},u.prototype._unRegistControlContainerEvent=function(){var t=this._getControlContainer();if(t==null)return;n.Utility.IsPad()||(n.Utility.DetachEvent(t,"mouseover",this._onMouseOver),n.Utility.DetachEvent(t,"mouseout",this._onMouseOut))},u.prototype._registControlContainerEvent=function(){var t=this._getControlContainer();if(t==null)return;n.Utility.IsPad()||(n.Utility.AttachEvent(t,"mouseover",this._onMouseOver),n.Utility.AttachEvent(t,"mouseout",this._onMouseOut))},u.prototype._registInputElemnetEvent=function(){var i=this;if(this.GetInputElement()==null||this._uIUpdate==null)return;t.prototype._registInputElemnetEvent.call(this),n.Utility.IsIE10OrLater&&this._uIUpdate.AddEventForInputElement("MSHoldVisual",function(t){n.GlobalEventHandler.OnMSHoldVisual(i,t)},!1),this._uIUpdate.AddEventForInputElement("focus",function(t){n.GlobalEventHandler.OnFocus(i,t)},!1),this._uIUpdate.AddEventForInputElement("blur",function(t){n.GlobalEventHandler.OnLostFocus(i,t)},!1),n.Utility.IsIE8OrBelow&&this._uIUpdate.AddEventForInputElement("beforedeactivate",function(t){n.GlobalEventHandler.OnBeforeDeactivate(i,t)},!1)},u.prototype.GetDropDownObj=function(){return this._dropDownObj},u.prototype.Snap=function(){var n={};return n.Text=this.Text,n.Value=this.Value,n.SelectionStart=this.SelectionStart,n.SelectionEnd=this.SelectionEnd,n},u.prototype.Revert=function(n){this.Text=n.Text,this.Value=n.Value,this.SelectionStart=n.SelectionStart,this.SelectionEnd=n.SelectionEnd},u.prototype.ReLoadData=function(){},u.prototype.GetOverwrite=function(){var t=this.GetEditMode(),i=this._getEditModeInternal();return t===n.EditMode.FixedInsert||t===n.EditMode.FixedOverwrite?t===n.EditMode.FixedOverwrite:i!==n.EditMode.Insert&&i!==n.EditMode.FixedInsert},u.prototype.GetDroppedDown=function(){return this._droppedDown},u.prototype.GetSelectionStart=function(){return Math.min(this.SelectionStart,this.SelectionEnd)},u.prototype.SetSelectionStart=function(t){return t=n.Utility.CheckInt(t,0),t=Math.min(t,this.Text.GetLength()),this.SelectionStart=t,this.SelectionEnd=t,this.SetLastClientValues(),this},u.prototype.GetSelectionLength=function(){return Math.abs(this.SelectionEnd-this.SelectionStart)},u.prototype.SetSelectionLength=function(t){return t=n.Utility.CheckInt(t,0),this.SelectionStart+t>this.Text.GetLength()&&(t=this.Text.GetLength()-this.SelectionStart),this.SetInnerSelectionEnd(this.SelectionStart+t),this},u.prototype.SetInnerSelectionStart=function(n){this.SelectionStart=n,this.SetLastClientValues()},u.prototype.SetInnerSelectionEnd=function(n){this.SelectionEnd=n,this.SetLastClientValues()},u.prototype.SetDroppedDown=function(n){return!this.GetEnabled(),this},u.prototype.DoSpinUp=function(n,t){return this._DoSpinInternal("up",n,t),this},u.prototype.DoSpinDown=function(n,t){return this._DoSpinInternal("down",n,t),this},u.prototype._DoSpinInternal=function(n,t,i){var u,f,e;if(typeof t=="number"&&isNaN(t)||typeof i=="number"&&isNaN(i))return;var r=this._protectedGetRealDoSpinArgments(t,i),o=r.Start,s=r.End,h=r.Increment;if(!this._protectedCanDoSpin(o,s,h))return;u=this.Text;if(!this._protectedDoSpin(n,o,s,h))return;this._protectedDoSpinFinished(),f=this._GetRealForeColor(this._focused,!0),this._uIUpdate.SetForeColor(f),e=this.Text,this._protectedFireEventOnDoSpin(n,e!==u)},u.prototype._protectedGetRealDoSpinArgments=function(n,t){var u,i,f,r;if(t==null)f=this._IsUseWatermarkText(),f.IsUseWatermarkText?u={Start:0,End:0}:(r=this.SelectionEnd,r=this._focused?Math.min(this.SelectionEnd,f.DisplayText.length):Math.min(this.SelectionEnd,this.GetText().length),u={Start:r,End:r}),i=n;else{if(isNaN(t)||isNaN(n))return this._createSpinArguments(-1,-1,0);u=this._GetSpinPosition(n),i=t}return i==null&&(i=this._spin.Increment),isNaN(i)?this._createSpinArguments(-1,-1,0):this._createSpinArguments(u.Start,u.End,i)},u.prototype._GetSpinPosition=function(n){return{Start:n,End:n}},u.prototype._createSpinArguments=function(n,t,i){return{Start:n,End:t,Increment:i}},u.prototype._protectedCanDoSpin=function(n,t,i){return isNaN(n)||n===-1||isNaN(i)?!1:!0},u.prototype._protectedDoSpin=function(n,t,i,r){r=this.GetRealSpinIncrement(n,r);var u=this._uIProcess.PerformSpin(t,i,r,this._spin.Wrap);if(u==null)return!1;typeof u.SelectionStart!="number"||isNaN(u.SelectionStart)||(this.SelectionStart=u.SelectionStart),typeof u.SelectionEnd!="number"||isNaN(u.SelectionEnd)||(this.SelectionEnd=u.SelectionEnd);if(u.Text!=null)if(!this.UpdateText(u))return!1;return!0},u.prototype.GetRealSpinIncrement=function(n,t){return n==="down"&&(t*=-1),t},u.prototype._protectedDoSpinFinished=function(){},u.prototype._protectedFireEventOnDoSpin=function(n,t){n==="up"?this._FireClientEvent("SpinUp",null):n==="down"&&this._FireClientEvent("SpinDown",null),t&&(this._FireClientEvent("TextChanged",null),this._FireClientEvent("ValueChanged",null))},u.prototype._FireClientEvent=function(n,t){var i=this._specialClientEvents[n];return this._uIProcess.FireEvent(this,i,null,n)},u.prototype.GetCausesValidation=function(){return this._causesValidation},u.prototype.SetCausesValidation=function(t){t=n.Utility.CheckBool(t),this._causesValidation=t},u.prototype.GetValidationGroup=function(){return this._validationGroup},u.prototype.SetValidationGroup=function(t){t=n.Utility.CheckString(t),this._validationGroup=t},u.prototype.GetAcceptsCrlf=function(){return this._acceptCrlf},u.prototype.SetAcceptsCrlf=function(t){t=n.Utility.CheckEnum(n.CrLfMode,t),this._acceptCrlf=t},u.prototype.SetInnerFocus=function(t,i){this._focusType=t!=null?t:n.FocusType.ClientEvent,i?n.GlobalEventHandler.OnFocus(this,null):this.SetFocus(),this._focused||(this._focused=!0)},u.prototype.UpdateDisplayText=function(n){this._uIUpdate.SetText(n),this.SetHideValue()},u.prototype.SetHideText=function(n){this._uIUpdate.SetHideText(n)},u.prototype._DoSetSelection=function(i,r,u){var f=this;this._doSelectionInterval&&clearTimeout(this._doSelectionInterval),u&&n.Utility.IsIE&&this._focusType!=n.FocusType.DropDownClose?this._doSelectionInterval=setTimeout(function(){f._doSelectionInterval=null,n.Utility.SetSelection(f,i,r)},0):t.prototype._DoSetSelection.call(this,i,r,u)},u.prototype.GetUseClipboard=function(){if(this._contextMenu.IsShow()||this._touchToolBar.IsShow())if(!n.Utility.IsIE||n.Utility.IsEdge)return!1;return this._useClipboard},u.prototype.SetUseClipboard=function(t){t=n.Utility.CheckBool(t),this._useClipboard=t},u.prototype.GetClipContent=function(){return this._clipContent},u.prototype.SetClipContent=function(t){t=n.Utility.CheckEnum(n.ClipContent,t),this._clipContent=t},u.prototype.GetTextHAlign=function(){return this._uIUpdate.GetTextHAlign()},u.prototype.SetTextHAlign=function(t){t=n.Utility.CheckEnum(n.HorizontalAlignment,t),this._uIUpdate.SetTextHAlign(t)},u.prototype._onControlEffectChanged=function(n,i){t.prototype._onControlEffectChanged.call(this,n,i),this._updateLayout()},u.prototype._setJQueryMobileEffect=function(n){this._render._setJQueryMobileEffect(n)},u.prototype.GetEditMode=function(){return this._editMode},u.prototype.SetEditMode=function(t){t=n.Utility.CheckEnum(n.EditMode,t);if(t!==this._editMode){var i=!1;this._isinsertGroup(t)&&this._isOverwriteGroup(this._editMode)?i=!0:this._isinsertGroup(this._editMode)&&this._isOverwriteGroup(t)&&(i=!0),this._isOverwriteGroup(t)&&(this._uIProcess.isOverWrite=!0),this._editMode=t,this._editModeInternal=t,i&&this._uIProcess.FireEvent(this,this._specialClientEvents.EditStatusChanged,null,"EditStatusChanged")}},u.prototype._setEditModeInternal=function(t){t=n.Utility.CheckEnum(n.EditMode,t);if(t!==this._editModeInternal){var i=!1;this._isinsertGroup(t)&&this._isOverwriteGroup(this._editModeInternal)?i=!0:this._isinsertGroup(this._editModeInternal)&&this._isOverwriteGroup(t)&&(i=!0),this._editModeInternal=t,i&&this._uIProcess.FireEvent(this,this._specialClientEvents.EditStatusChanged,null,"EditStatusChanged")}},u.prototype._isinsertGroup=function(t){return t==n.EditMode.Insert||t==n.EditMode.FixedInsert},u.prototype._isOverwriteGroup=function(t){return t==n.EditMode.Overwrite||t==n.EditMode.FixedOverwrite},u.prototype.GetHighlightText=function(){return this._highlightText},u.prototype.SetHighlightText=function(t){t=n.Utility.CheckEnum(n.HighlightText,t),this._highlightText=t},u.prototype._onHeightChanged=function(n,i){t.prototype._onHeightChanged.call(this,n,i),this._layout()},u.prototype._onWidthChanged=function(n,i){t.prototype._onWidthChanged.call(this,n,i),this._layout()},u.prototype._onBorderWidthChanged=function(n,i){t.prototype._onBorderWidthChanged.call(this,n,i),this._layout()},u.prototype._onEnabledChanged=function(n,i){t.prototype._onEnabledChanged.call(this,n,i),this._updateSpinButtonStatus()},u.prototype._onBackColorChanged=function(n,i){t.prototype._onBackColorChanged.call(this,n,i),this._updateBorder()},u.prototype.GetTextboxValue=function(){return this._uIUpdate.GetText()},u.prototype.GetOldValue=function(){return this._oldValue},u.prototype.CanUndo=function(){return this.GetValue()==this.GetOldValue()?!1:!0},u.prototype.DragStart=function(){this._dragStartElementID=this._getId()},u.prototype.DragEnd=function(i){return t.prototype.DragEnd.call(this,i),this._dragStartElementID="",n.Utility.PreventDefault(i),!1},u.prototype.MouseOut=function(){if(!this._focused)return;if(this._isMouseDown!=!0)return;if(this._mouseUpPointerType!==undefined&&this._mouseUpPointerType!==4&&this._mouseUpPointerType!=="mouse")return;var r=Math.min(this._oldSelectionStart,this._oldSelectionEnd),i=Math.max(this._oldSelectionStart,this._oldSelectionEnd),t=this.GetText().Substring(r,i);t!=""&&n.Utility.IsIE&&(this.SetSelection(this._oldSelectionStart,this._oldSelectionEnd),n.Utility.DragDrop(this._realInputElement)),this._isMouseDown=!1},u.prototype.Focus=function(){var t=this;if(this._contextMenu.IsShow()||this._touchToolBar.IsShow())return!1;n.Utility.CurrentActiveControlId=this._getId(),this._OnFocusing(),this._IsDrop&&this._DoDragDrop(this._DropText),(n.Utility.IsEdge||n.Utility.chrome)&&(this._focusFinished=!1),(n.Utility.chrome||n.Utility.IsEdge)&&this.GetHighlightText()!=n.HighlightText.None&&this._focusType==n.FocusType.Click?setTimeout(function(){t._OnFocusInternal(),t._OnFocusDropDown(),t._IsDrop&&t._ReleaseDropCache(),t._focusFinished=!0}):(this._OnFocusInternal(),this._OnFocusDropDown(),this._IsDrop&&this._ReleaseDropCache(),n.Utility.IsEdge||n.Utility.chrome?setTimeout(function(){t._focusFinished=!0}):this._focusFinished=!0),this._OnFocused(),this._shouldFireOnEnterEvent=!0},u.prototype._OnFocusing=function(){},u.prototype._OnFocused=function(){var n=this._GetRealForeColor(!0,!1);this._uIUpdate.SetForeColor(n)},u.prototype._OnFocusInternal=function(t){var i,r;t.SelectionStart=this.SelectionStart,i=this._uIProcess.Focus(t);if(i==null)return;i.Text!=null&&(this.Text=i.Text),i.SelectionStart!=null&&(this.SelectionStart=i.SelectionStart),i.SelectionEnd!=null&&(this.SelectionEnd=i.SelectionEnd),this.GetReadOnly()&&this._focusType==n.FocusType.None&&(this.SelectionStart=0,this.SelectionEnd=this.Text.length),this.UpdateDisplayText(this.Text),this.SetSelection(this.SelectionStart,this.SelectionEnd,!0),r=this._GetRealForeColor(!0,!1),this._uIUpdate.SetForeColor(r)},u.prototype._OnFocusDropDown=function(){this._dropDown!=null&&(this._dropDown.AutoDropDown&&!this._droppedDown&&this._mouseButton!=n.MouseButton.Right&&this._focusType!=n.FocusType.SpinButton&&this._focusType!=n.FocusType.ContextMenu&&this._focusType!=n.FocusType.ClientEvent&&this._focusType!=n.FocusType.DragDrop&&this.GetDropDownEnabled()&&(this._openDropDownByAuto=!0,this.PerformDropDown()),this._openDropDownByAuto=!1)},u.prototype.LoseFocus=function(t){return this.FireKeyExit(),(this._spinBtnPressed||this._dropDownBtnPressed||this._dropDownObj!=null&&this.GetDropDownObj().IsMouseOver)&&this._focusType!=n.FocusType.KeyExit?void 0:(this._droppedDown&&(this._dropDownBtnPressed=!1,this.CloseDropDown()),this._contextMenu.IsShow()&&this._contextMenu.Close(),this._touchToolBar.IsShow()&&this._touchToolBar.Close(),this.SetLastClientValues(),this._shouldFireOnLeaveEvent=!0,this._uIProcess.LoseFocus(t))},u.prototype.MouseDown=function(t){var f=this,u=n.Utility.GetMouseButton(t),r,i;this._mouseButton=u,this._focusType=n.FocusType.Click,this._oldSelectionStart=this.SelectionStart,this._oldSelectionEnd=this.SelectionEnd,r=this.GetInputElement(),r===document.activeElement&&(this._selectionStartOnMouseDown=n.Utility.GetSelectionStartPosition(r),this._selectionEndOnMouseDown=n.Utility.GetSelectionEndPosition(r)),this._mouseDownX=t.x,this._contextMenu.IsShow()&&this._contextMenu.Close(),this._touchToolBar.IsShow()&&this._touchToolBar.Close(),this._mouseButton==n.MouseButton.Left&&(n.Utility.IsIE||n.Utility.firefox)&&n.Utility.ClearSelection(this.GetInputElement()),this._droppedDown&&this.CloseDropDown();if(this.IsNullFormat())return!0;i=this._uIProcess.MouseDown(u),u==n.MouseButton.Left&&(n.Utility.chrome||n.Utility.IsEdge)&&!this._focused&&this.GetHighlightText()!=n.HighlightText.None&&setTimeout(function(){var t=f.GetInputElement();f.SelectionStart=n.Utility.GetSelectionStartPosition(t),f.SelectionEnd=n.Utility.GetSelectionEndPosition(t)});if(i==null)return;i.SelectionStart!=null&&(this.SelectionStart=i.SelectionStart),i.SelectionEnd!=null&&(this.SelectionEnd=i.SelectionEnd,this.SetSelection(this.SelectionStart,this.SelectionEnd))},u.prototype.MouseUp=function(t){var i,r;this._mouseUpX=t.x,this.IsNullFormat(),i=this._uIProcess.MouseUp(this._realInputElement,this.SelectionStart,this.SelectionEnd,this._mouseButton);if(i==null)return;i.SelectionStart!=null&&(this.SelectionStart=i.SelectionStart),i.SelectionEnd!=null&&(this.SelectionEnd=i.SelectionEnd),n.Utility.GetMouseButton(t)==n.MouseButton.Left&&this._mouseDownX!=null&&this._mouseDownX>this._mouseUpX&&(r=this.SelectionStart,this.SelectionStart=this.SelectionEnd,this.SelectionEnd=r),this._mouseDownX=null,this._mouseButton=n.MouseButton.Default},u.prototype.MouseWheel=function(t){if(this._contextMenu.IsShow()||this._imeMode==!0)return!1;if(this.GetSpinEnabled()){var i=n.Utility.GetMouseWheelValue(0,t);return i>0?this.PerformSpin("up"):i<0&&this.PerformSpin("down"),n.Utility.PreventDefault(t),!1}},u.prototype.PreProcessContextMenu=function(t){return this._contextMenu.IsShow()?((t==n.Key.Up||t==n.Key.Down||t==n.Key.Return||t==n.Key.U||t==n.Key.T||t==n.Key.C||t==n.Key.P||t==n.Key.D||t==n.Key.A)&&this._contextMenu.KeyDown(t),(t==n.Key.Escape||t==n.Key.Alt)&&this._contextMenu.Close(),!0):this._touchToolBar.IsShow()?((t==n.Key.Escape||t==n.Key.Alt)&&this._touchToolBar.Close(),!0):!1},u.prototype.ProcessReservedKey=function(t){switch(t){case 131138:case 131140:case 131141:case 131144:case 131145:case 131148:case 131150:case 131154:case 131159:case 131188:case 262181:case 262183:case n.Key.F1:case n.Key.F3:case n.Key.F4:case n.Key.F5:case n.Key.F6:case n.Key.F10:case n.Key.F11:case n.Key.F12:case 65657:case 131081:case 196617:case 131179:case 131181:case 131120:case 131259:case 131261:case 131146:case 196680:case 196681:case 196682:case 131153:case 131156:case 196689:case 262157:return!0}return!1},u.prototype.IsNullFormat=function(){return!1},u.prototype.SetHideValue=function(){var n="";this.GetValue()!=null&&(n=this.GetValue().toString()),this.SetHideText(n)},u.prototype.KeyDown=function(t){var i={},f=t.FuncKeysPressed,r=t.KeyCode,v,k,y,p,s,l,o,u,d,w,b,h;if(!n.Utility.LoadComplete)return;if(this.PreProcessContextMenu(r))return i.System=!1,i;if(r==229)return i.System=!0,i;f.Shift&&(r|=65536),f.Ctrl&&(r|=131072);if(f.Alt){if(this._accessKey!=null&&this._accessKey.toLowerCase()==String.fromCharCode(r).toLowerCase())return this.SelectionStart=0,this.SelectionEnd=this.Text.GetLength(),i.System=!0,i;r|=262144}v=r|524288;if(r!=v){k=this._uIProcess.GetKeyActionName(v,this._shortcuts);if(k!=null)return i.System=!1,i}var e=null,c=null,a=this._getShortcutObj();a!=null&&a.GetBlockKeyMessage()&&(y={keyCode:t.KeyCode,ctrlKey:f.Ctrl,shiftKey:f.Shift,altKey:f.Alt},p=a._data.GetKeyActionsByEvent(this,y),e=p.KeyAction,c=p.ClientFunction,a._uiProcess.ProcessTriggerAll(this,y));if(this.ProcessReservedKey(r)&&e===null&&c===null)return i.System=!0,i;if(c!=null)if(this._canFireClientEvent){n.Utility.FireEvent(this,c,{},"");if(e===null)return i.System=!1,i}if(e!==null&&e!==undefined)switch(e.toLowerCase()){case n.KeyActions.DropDown:return this.GetDropDownEnabled()&&(this.PerformDropDown(),i.System=!1),i;case n.KeyActions.SpinUp:return this.GetSpinEnabled()&&this._spin.SpinOnKeys&&(this.PerformSpin("up"),i.System=!1,i.SelectionStart=this.SelectionStart),i;case n.KeyActions.SpinDown:return this.GetSpinEnabled()&&this._spin.SpinOnKeys&&(this.PerformSpin("down"),i.System=!1,i.SelectionStart=this.SelectionStart),i}s=!1;if(this._keyActionList!=null)for(l=0;li.Text.GetLength()?(i.SelectionStart=i.Text.GetLength(),i.SelectionEnd=i.Text.GetLength()):i.SelectionStart==h.GetLength()&&(i.SelectionStart=i.Text.GetLength(),i.SelectionEnd=i.Text.GetLength()),f==n.FocusType.Left&&u==n.DateCursorPosition.Default?(i.SelectionStart=0,i.SelectionEnd=0):f==n.FocusType.Right&&u==n.DateCursorPosition.Default&&(i.SelectionStart=i.Text.GetLength(),i.SelectionEnd=i.Text.GetLength()),o==n.HighlightText.None&&u==n.DateCursorPosition.Default?i:f==n.FocusType.ContextMenu?i:(e=i.SelectionStart==null?t.SelectionStart:i.SelectionStart,r=this.SetCursorPositionAndSelection(o,i.Text,u,e),r!=null&&(i.SelectionStart=r.SelectionStart,i.SelectionEnd=r.SelectionEnd,i.IsSelectionDeterminedByHighlightText=!0),i)},t.prototype.LoseFocus=function(){for(var t=[],n=0;nr?r:0;case n.Key.End:case 65571:case 65576:return t0?t-=c:t--:c==0&&e.GetFieldByIndex(o-1).fieldLabel==f?t-=e.GetFieldRange(o-1).length:t--;break;case n.Key.Right:if(t==e.GetLength())return t;if(e.GetFieldByIndex(o).fieldLabel==f){s=e.GetFieldRange(o),r=s.start,u=r+s.length;if(t=0;h--)if(e.GetFieldByIndex(h).fieldLabel!=f)return s=e.GetFieldRange(h),s.start;return 0}else t-=c;break;case 196645:if(t==0||o==0)return 0;c==0?(s=e.GetFieldRange(o-1),t=s.start):t-=c;break;case 131111:if(t==e.GetLength()||o==e.fieldCount-1)return e.GetLength();if(e.GetFieldByIndex(o).fieldLabel==f)s=e.GetFieldRange(o+1),t=s.start;else{for(h=o+1;h=0;h--)if(e.GetFieldByIndex(h).fieldLabel!=f)return s=e.GetFieldRange(h),s.start;return t}else t-=c;break;case 196643:case 131107:case 131112:return e.GetLength();case 196644:case 131108:case 131110:return 0;case 65573:return t==0?0:--t;case 65575:return t==e.GetLength()?t:++t}return t},t.prototype.CompareShortcut=function(n,t){var i,r;if(t.toString().IndexOf("|")==-1)return t==n;else{i=null;while(i!=-1){i=t.toString().IndexOf("|"),r=t.toString().GetLength();if(t.Substring(0,i==-1?r:i)==n)return!0;else t=t.Substring(i+1,r)}return!1}},t.prototype.MoveControl=function(t,i,r,u,f){var v=n.HtmlElementHelper.GetSortedElements(),e=null,s={},h,a,y,c,l,o;if(v.length<2)return null;h=n.FocusHelper.GetNextFocusableControlID(t,v,i),a=h.ID;if(r==!0)try{y=document.getElementById(a),c=y.getAttribute(n.Utility.IMControlIDAttribute),c?(l=n.Utility.FindIMControl(c),l.FocusType=i?n.FocusType.Left:n.FocusType.Right):l=n.Utility.FindIMControl(a)}catch(p){}u=="CharInput"||n.Utility.chrome?setTimeout(function(){n.FocusHelper.SetElementFocus(h)},0):n.FocusHelper.SetElementFocus(h),o={};switch(u.toLowerCase()){case"nextcontrol":o.Key=n.ExitKeys.NextControl,s.FocusType=n.FocusType.KeyExit;break;case"previouscontrol":o.Key=n.ExitKeys.PreviousControl,s.FocusType=n.FocusType.KeyExit;break;case"right":o.Key=n.ExitKeys.Right,s.FocusType=n.FocusType.KeyExit;break;case"left":o.Key=n.ExitKeys.Left,s.FocusType=n.FocusType.KeyExit;break;case"ctrlright":o.Key=n.ExitKeys.CtrlRight,s.FocusType=n.FocusType.KeyExit;break;case"ctrlleft":o.Key=n.ExitKeys.CtrlLeft,s.FocusType=n.FocusType.KeyExit;break;case"charinput":o.Key=n.ExitKeys.CharInput,s.FocusType=n.FocusType.KeyExit;break}return this._owner._specialClientEvents.KeyExit?(e={},e.Name=this._owner._specialClientEvents.KeyExit,e.Args=o,e.Type="KeyExit"):f&&f._specialClientEvents&&f._specialClientEvents.KeyExit&&(e={},e.Name=f._specialClientEvents.KeyExit,e.Args=o,e.Type="KeyExit"),e!=null&&(s.EventInfo=e),s},t.prototype.MoveField=function(n,t){var r=this._format.Fields.MoveField(n,t),i={};return r==-1||!this._isFieldVisible(r)?(i.NextPos=-1,i):(i.SelectionStart=r,i.SelectionEnd=r,i)},t.prototype._isFieldVisible=function(n){return!0},t.prototype.ProcessTabKey=function(t,i,r){var e={},f={},u;return e.Key=i?n.ExitKeys.Tab:n.ExitKeys.ShiftTab,this._owner._specialClientEvents.KeyExit&&(u={},u.Name=this._owner._specialClientEvents.KeyExit,u.Args=e,u.Type="KeyExit",f.EventInfo=u),f.FocusType=n.FocusType.KeyExit,f.System=!0,f},t.prototype.MoveFieldAndControl=function(n,t){var i=this.MoveField(n,t),u,r;return i.NextPos!=-1?i:(u=t?"NextControl":"PreviousControl",r=this.MoveControl(this.GetElementId(),t,!1,u),r!=null&&(i.EventInfo=r.EventInfo,i.FocusType=r.FocusType,i.FocusExit=!0),i)},t.prototype.DragStart=function(){},t.prototype.DragEnd=function(){},t.prototype.Drop=function(){},t.prototype.DragOver=function(){},t.prototype.GetKeyActionName=function(n,t){var r;if(t==null)return null;var i=t,u=[],f=i.IndexOf(","),e=0;if(t!=""){while(f!=-1)u[e++]=i.Substring(0,f),i=i.Substring(f+1,i.GetLength()),f=i.IndexOf(",");for(u[e++]=i,r=0;r0?u[0]:"")),r},t.FilterReturnChar=function(n){return n!=null&&(n=n.replace(new RegExp("[\r]","g"),"")),n},t}();n.BaseUIProcess=t})(GCIM||(GCIM={}));var GCIM;(function(n){var i=function(){function n(){this.OtherChar=0,this.Control=1,this.Numeric=2,this.MathSymbol=3,this.Symbol=4,this.Punctuation=5,this.Space=6,this.UpperCase=7,this.LowerCase=8,this.Katakana=9,this.Hiragana=10,this.FarEastPunctation=11,this.Hangul=12,this.FullWidth=32768}return n}(),t,u,r;n.CharType=i,t=function(){function n(){this.MinValue="\x00",this.MaxValue="\uffff",this.ANSISTART=0,this.ANSIEND=255,this.BOTHWIDTHSTART=65280,this.BOTHWIDTHEND=65519,this.FULLALPHASTART=65281,this.FULLUPPERSTART=65313,this.FULLUPPEREND=65338,this.FULLALPHAEND=65374,this.CJKHALFSYMBOLSTART=65377,this.CJKHALFSYMBOLEND=65380,this.KANAHALFSTART=65381,this.KANAHALFEND=65439,this.HANGULHALFSTART=65440,this.HANGULHALFEND=65500,this.FULLSYMBOLSTART=65504,this.FULLSYMBOLEND=65510,this.HALFPUNCTSTART=65512,this.HALFPUNCTEND=65518,this.KATAKANA_VOICED="\uff9e",this.KATAKANA_SEMIVOICED="\uff9f",this.Tab="\t",this.Space=" ",this._charstarts=["\x00","\u0080","\u0100","\u0180","\u0250","\u02b0","\u0300","\u0370","\u0400","\u0530","\u0590","\u0600","\u0700","\u0780","\u0900","\u0980","\u0a00","\u0a80","\u0b00","\u0b80","\u0c00","\u0c80","\u0d00","\u0d80","\u0e00","\u0e80","\u0f00","\u1000","\u10a0","\u1100","\u1200","\u13a0","\u1400","\u1680","\u16a0","\u1780","\u1800","\u1e00","\u1f00","\u2000","\u2070","\u20a0","\u20d0","\u2100","\u2150","\u2190","\u2200","\u2300","\u2400","\u2440","\u2460","\u2500","\u2580","\u25a0","\u2600","\u2700","\u2800","\u2e80","\u2f00","\u2ff0","\u3000","\u3040","\u30a0","\u3100","\u3130","\u3190","\u31a0","\u3200","\u3300","\u3400","\u4e00","\ua000","\ua490","\uac00","\uf900","\ufb00","\ufb50","\ufe20","\ufe30","\ufe50","\ufe70","\uff00","\ufff0"],this.Blocks=["BASIC_LATIN","LATIN_1_SUPPLEMENT","LATIN_EXTENDED_A","LATIN_EXTENDED_B","IPA_EXTENSIONS","SPACING_MODIFIER_LETTERS","COMBINING_DIACRITICAL_MARKS","GREEK","CYRILLIC","ARMENIAN","HEBREW","ARABIC","SYRIAC","THAANA","DEVANAGARI","BENGALI","GURMUKHI","GUJARATI","ORIYA","TAMIL","TELUGU","KANNADA","MALAYALAM","SINHALA","THAI","LAO","TIBETAN","MYANMAR","GEORGIAN","HANGUL_JAMO","ETHIOPIC","CHEROKEE","UNIFIED_CANADIAN_ABORIGINAL_SYLLABIC","OGHAM","RUNIC","KUMER","MONGOLIAN","LATIN_EXTENDED_ADDITIONAL","GREEK_EXTENDED","GENERAL_PUNCTUATION","SUPERSCRIPTS_AND_SUBSCRIPTS","CURRENCY_SYMBOLS","COMBINING_MARKS_FOR_SYMBOLS","LETTERLIKE_SYMBOLS","NUMBER_FORMS","ARROWS","MATHEMATICAL_OPERATORS","MISCELLANEOUS_TECHNICAL","CONTROL_PICTURES","OPTICAL_CHARACTER_RECOGNITION","ENCLOSED_ALPHANUMERICS","BOX_DRAWING","BLOCK_ELEMENTS","GEOMETRIC_SHAPES","MISCELLANEOUS_SYMBOLS","DINGBATS","BRAILLE_PATTERNS","CJK_RADICALS_SUPPLEMENT","KANGXI_RADICALS","IDEOGRAPHIC_DESCRIPTION_CHARACTERS","CJK_SYMBOLS_AND_PUNCTUATION","HIRAGANA","KATAKANA","BOPOMOFO","HANGUL_COMPATIBILITY_JAMO","KANBUN","BOPOMOFO_EXTENDED","ENCLOSED_CJK_LETTERS_AND_MONTHS","CJK_COMPATIBILITY","CJK_UNIFIED_IDEOGRAPHS_EXTENSION","CJK_UNIFIED_IDEOGRAPHS","YI_SYLLABLES","YI_RADICALS","HANGUL_SYLLABLES","CJK_COMPATIBILITY_IDEOGRAPHS","ALPHABETIC_PRESENTATION_FORMS","ARABIC_PRESENTATION_FORMS_A","COMBINING_HALF_MARKS","CJK_COMPATIBILITY_FORMS","SMALL_FORM_VARIANTS","ARABIC_PRESENTATION_FORMS_B","HALFWIDTH_AND_FULLWIDTH_FORMS","SPECIALS"],this._fullhalfblocks=["\uff01","\uff10","\uff1a","\uff21","\uff3b","\uff41","\uff5b","\uff61","\uff65","\uffa0","\uffe0","\uffe8"],this._charType=new i,this._mwtable=[this._charType.Symbol|this._charType.FullWidth,this._charType.Numeric|this._charType.FullWidth,this._charType.Symbol|this._charType.FullWidth,this._charType.UpperCase|this._charType.FullWidth,this._charType.Symbol|this._charType.FullWidth,this._charType.LowerCase|this._charType.FullWidth,this._charType.Symbol|this._charType.FullWidth,this._charType.FarEastPunctation,this._charType.Katakana,this._charType.Hangul,this._charType.Symbol|this._charType.FullWidth,this._charType.Symbol],this._halfkana=["\u30fb","\u30f2","\u30a1","\u30a3","\u30a5","\u30a7","\u30a9","\u30e3","\u30e5","\u30e7","\u30c3","\u30fc","\u30a2","\u30a4","\u30a6","\u30a8","\u30aa","\u30ab","\u30ad","\u30af","\u30b1","\u30b3","\u30b5","\u30b7","\u30b9","\u30bb","\u30bd","\u30bf","\u30c1","\u30c4","\u30c6","\u30c8","\u30ca","\u30cb","\u30cc","\u30cd","\u30ce","\u30cf","\u30d2","\u30d5","\u30d8","\u30db","\u30de","\u30df","\u30e0","\u30e1","\u30e2","\u30e4","\u30e6","\u30e8","\u30e9","\u30ea","\u30eb","\u30ec","\u30ed","\u30ef","\u30f3","\u3099","\u309a"],this._fullkana=["\uff67","\uff71","\uff68","\uff72","\uff69","\uff73","\uff6a","\uff74","\uff6b","\uff75","\uff76","\uff76","\uff77","\uff77","\uff78","\uff78","\uff79","\uff79","\uff7a","\uff7a","\uff7b","\uff7b","\uff7c","\uff7c","\uff7d","\uff7d","\uff7e","\uff7e","\uff7f","\uff7f","\uff80","\uff80","\uff81","\uff81","\uff6f","\uff82","\uff82","\uff83","\uff83","\uff84","\uff84","\uff85","\uff86","\uff87","\uff88","\uff89","\uff8a","\uff8a","\uff8a","\uff8b","\uff8b","\uff8b","\uff8c","\uff8c","\uff8c","\uff8d","\uff8d","\uff8d","\uff8e","\uff8e","\uff8e","\uff8f","\uff90","\uff91","\uff92","\uff93","\uff6c","\uff94","\uff6d","\uff95","\uff6e","\uff96","\uff97","\uff98","\uff99","\uff9a","\uff9b","\uff9c","\uff9c","\uff68","\uff6a","\uff66","\uff9d","\uff73","\uff76","\uff79","\uff9c","\uff68","\uff6a","\uff66","\uff65","\uff70"],this._fullkanaSmall=["\uff67","\uff68","\uff69","\uff6a","\uff6b","\uff6c","\uff6d","\uff6e","\uff6f"],this._accentkana=[0,0,0,0,0,0,0,0,0,0,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,0,-1,1,-1,1,-1,1,0,0,0,0,0,-3,1,2,-3,1,2,-3,1,2,-3,1,2,-3,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,0,0],this._feQuotes=["\u2018","\u2019","\u201c","\u201d"],this._jpnMixed=["\u30fc"],this._jpnSpecialFull=["\u3000","\u3001","\u3002","\u300c","\u300d","\u201c","\u201d","\u2018","\u2019","\u309b","\u309c","\uffe5"],this._jpnSpecialHalf=[" ","\uff64","\uff61","\uff62","\uff63",'"','"',"'","'","\uff9e","\uff9f","\u00a5"]}return n}(),n.CharCategory=t,u=function(){function r(){this.CharCategory=new t,this.Ctype=new i}return r.GetShiftJISCode=function(){return r.ShiftJISCode_decompressed===null&&(r.ShiftJISCode_decompressed=n.Utility.DecompressString(r.ShiftJISCode_compressed)),r.ShiftJISCode_decompressed},r.GetJISX0208Code=function(){return r.JISX0208Code_decompressed===null&&(r.JISX0208Code_decompressed=n.Utility.DecompressString(r.JISX0208Code_compressed)),r.JISX0208Code_decompressed},r.prototype.ToHalfKatakana=function(n){var f="",r,i,t,u;if(this.IsFullWidth(n)){if(this.IsKatakana(n)){r=n,t=r.charCodeAt(0)-(this.CharCategory._charstarts[62].charCodeAt(0)+1);if(t<0||t>91)return r;r=this.CharCategory._fullkana[t],u=this.CharCategory._accentkana[t],u>0&&(r=r+String.fromCharCode(u==1?this.CharCategory.KATAKANA_VOICED.charCodeAt(0):this.CharCategory.KATAKANA_SEMIVOICED.charCodeAt(0))),f=r}else if(this.IsHiragana(n)){i=String.fromCharCode(n.charCodeAt(0)-this.CharCategory._charstarts[61].charCodeAt(0)+this.CharCategory._charstarts[62].charCodeAt(0)),t=i.charCodeAt(0)-(this.CharCategory._charstarts[62].charCodeAt(0)+1);if(t<0||t>91)return i;i=this.CharCategory._fullkana[t],u=this.CharCategory._accentkana[t],u>0&&(i=i+String.fromCharCode(u==1?this.CharCategory.KATAKANA_VOICED.charCodeAt(0):this.CharCategory.KATAKANA_SEMIVOICED.charCodeAt(0))),f=i}}else this.IsKatakana(n)&&(f=n);return f},r.prototype.GetCharType=function(n){var t=this.Ctype.OtherChar,i=this.BelongTo(n);if(n==""||"\x00"<=n&&n<="\x1f"||"\u0080"<=n&&n<="\u009f")return this.Ctype.Control;if("A"<=n&&n<="Z")return this.Ctype.UpperCase;if("a"<=n&&n<="z")return this.Ctype.LowerCase;if("0"<=n&&n<="9")return this.Ctype.Numeric;(this.IsFullWidthSymbol(n)||this.IsHalfWidthSymbol(n))&&(t=this.Ctype.Symbol),(n.charCodeAt(0)==8216||n.charCodeAt(0)==8217||n.charCodeAt(0)==8220||n.charCodeAt(0)==8221)&&(t=this.Ctype.Punctuation),n.charCodeAt(0)==12288&&(t=this.Ctype.Space);switch(this.CharCategory.Blocks[i]){case"HALFWIDTH_AND_FULLWIDTH_FORMS":return this.MultiWidthDetails(n);case"KATAKANA":return this.Ctype.Katakana|this.Ctype.FullWidth;case"HIRAGANA":return this.Ctype.Hiragana|this.Ctype.FullWidth}return this.IsFarEastBlock(i,n)&&(t|=this.Ctype.FullWidth),t},r.prototype.IsCharOfType=function(n,t){return this.GetCharType(n)==t},r.prototype.IsMultiWidth=function(n){var i=this.BelongTo(n),t=this.CharCategory.Blocks[i];return t=="KATAKANA"||t=="CJK_SYMBOLS_AND_PUNCTUATION"||t=="HALFWIDTH_AND_FULLWIDTH_FORMS"||t=="BASIC_LATIN"&&n>=" "},r.prototype.IsFullWidthSymbol=function(n){for(var t=0;t="\ud800".charCodeAt(0)&&n.charCodeAt(0)<="\udbff".charCodeAt(0)&&n.charCodeAt(1)>="\udc00".charCodeAt(0)&&n.charCodeAt(1)<="\udfff".charCodeAt(0)?!0:!1},r.IsSurrogatePair2=function(n,t){var u=n.substring(t,t+2),i=r.CharEx;return i.IsSurrogatePair(u)},r.prototype.IsSurrogate=function(n){return n!=null&&n.charCodeAt(0)>="\ud800".charCodeAt(0)&&n.charCodeAt(0)<="\udfff".charCodeAt(0)},r.prototype.IsOther=function(n){return(this.GetCharType(n)&~this.Ctype.FullWidth)==this.Ctype.OtherChar},r.prototype.IsControl=function(n){return(this.GetCharType(n)&~this.Ctype.FullWidth)==this.Ctype.Control},r.prototype.IsKatakana=function(n){return(this.GetCharType(n)&~this.Ctype.FullWidth)==this.Ctype.Katakana},r.prototype.IsSmallHalfKatakana=function(n){var i=["\u30a1","\u30a3","\u30a5","\u30a7","\u30a9","\u30e3","\u30e5","\u30e7","\u30c3","\u30ee"],r=n,t;for(n.charCodeAt(0)>this.CharCategory.KANAHALFSTART&&(r=this.CharCategory._halfkana[n.charCodeAt(0)-this.CharCategory.KANAHALFSTART]),t=0;t=r.UpperKana.length-4&&t91)return n;n=this.CharCategory._fullkana[t],i=this.CharCategory._accentkana[t];if(i>0)return n=n+String.fromCharCode(i==1?this.CharCategory.KATAKANA_VOICED.charCodeAt(0):this.CharCategory.KATAKANA_SEMIVOICED.charCodeAt(0));break;case this.Ctype.Space:n=" ";break;case this.Ctype.Hangul:break}return n},r.prototype.ToKatakana=function(n){if(!this.IsCharOfType(n,this.Ctype.Hiragana|this.Ctype.FullWidth))return n;var t=this.GetFullHalfWidthSpecialChar(n,!1);return t!=!1?t:String.fromCharCode(n.charCodeAt(0)-this.CharCategory._charstarts[61].charCodeAt(0)+this.CharCategory._charstarts[62].charCodeAt(0))},r.prototype.ToHiragana=function(n){if(!this.IsKatakana(n))return n;return this.IsFullWidth(n)||(n=this.ToFullWidth(n).text),this.IsCharOfType(n,this.Ctype.Katakana|this.Ctype.FullWidth)?n>="\u30f7"&&n<="\u30ff"?n:n=="\u30f5"?"\u304b":n=="\u30f6"?"\u3051":String.fromCharCode(n.charCodeAt(0)+this.CharCategory._charstarts[61].charCodeAt(0)-this.CharCategory._charstarts[62].charCodeAt(0)):n},r.prototype.ToBigHalfKatakana=function(n){if(!this.IsSmallHalfKatakana(n))return n;var t=this.CharCategory._halfkana[n.charCodeAt(0)-this.CharCategory.KANAHALFSTART];return t=String.fromCharCode(t.charCodeAt(0)+1)},r.prototype.BelongTo=function(n){var r=0,i=83,t=i>>1;while(i-r>1)n>1;return t},r.prototype.MultiWidthDetails=function(n){var r=0,i=this.CharCategory._fullhalfblocks.length,t=i>>1;while(i-r>1)n>1;return this.CharCategory._mwtable[t]},r.prototype.IsFarEastBlock=function(n,t){switch(this.CharCategory.Blocks[n]){case"CJK_COMPATIBILITY":case"CJK_COMPATIBILITY_FORMS":case"CJK_COMPATIBILITY_IDEOGRAPHS":case"CJK_RADICALS_SUPPLEMENT":case"CJK_SYMBOLS_AND_PUNCTUATION":case"CJK_UNIFIED_IDEOGRAPHS":case"CJK_UNIFIED_IDEOGRAPHS_EXTENSION":case"HALFWIDTH_AND_FULLWIDTH_FORMS":case"BOPOMOFO":case"BOPOMOFO_EXTENDED":case"HIRAGANA":case"KATAKANA":case"KANBUN":case"HANGUL_COMPATIBILITY_JAMO":case"HANGUL_JAMO":case"HANGUL_SYLLABLES":return!0;default:for(var i=0;i255)return!0;if(t.charCodeAt(0)==8216||t.charCodeAt(0)==8217||t.charCodeAt(0)==8220||t.charCodeAt(0)==8221)return!0;break}return!1},r.prototype.GetFullHalfWidthSpecialChar=function(n,t){var r,u,f,i;t==!0?(r=this.CharCategory._jpnSpecialHalf,u=this.CharCategory._jpnSpecialFull):(r=this.CharCategory._jpnSpecialFull,u=this.CharCategory._jpnSpecialHalf),f=-1,i=0;while(i","?","@","[","]","^","_","`","{","|","}","\uff61","\uff62","\uff63","\uff64","\uff65","\u00a1","\u00a4","\u00a5"],r.LowerKana="\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308e\u30a1\u30a3\u30a5\u30a7\u30a9\u30c3\u30e3\u30e5\u30e7\u30ee\uff67\uff68\uff69\uff6a\uff6b\uff6c\uff6d\uff6e\uff6f\u30f5\u30f6\u3095\u3096",r.UpperKana="\u3042\u3044\u3046\u3048\u304a\u3064\u3084\u3086\u3088\u308f\u30a2\u30a4\u30a6\u30a8\u30aa\u30c4\u30e4\u30e6\u30e8\u30ef\uff71\uff72\uff73\uff74\uff75\uff94\uff95\uff96\uff82\u30ab\u30b1\u304b\u3051",r.ShiftJISCode_decompressed=null,r.JISX0208Code_decompressed=null,r.ShiftJISCode_compressed="AEYBAAEBAQIBAwEEAQUBAgA4ADABCQEKAQkAMQEIAEMAQQELAQoAMQERAQwBFAEWARcBGAEZARoBGwEcAR0BHgEfASABIQEZADcBAQBEAEYAQwAwASQBAAEmASgBGwA0AQoBBgEGAS8BIgE0ATUBNgE3ATgBOQE6ATsBPAE9AT4BPwFAAUEBQgFDAUQBRQFGAUcBSAFJAUoBSwFMAU0BTgFPAVABUQFSAVMBVAFVAVYBVwFYAVkBWgFbAVwBXQFWADgANABDAWIANgEJAEIAMAETAVABaAEJADIBCQEvAWoBGQEAASgBcQERAEYBHgAyAQgBGABCADEAOQAwAS8AMgA3ADgANQBGARABKAEzAWsBCgBDADMAMwERAYoBFgGGARUBIgFsAV4BNAEDAUMBdQAwADkBmQA5AEMBmwGaAZoBbAFvASABLQAwAYsAMAEoADMAMQGlAREBoQFkARwBEAEXADIANQGTAbMBtAG1AbYBtwG4AbkBugEYAEYBKgEnADABsgEWAb4BMQEGAWcARQHDAcQBBABFADEARQG7AQsBZAGPATYARgF4ASIBaAEvADgBCAGKAWgAMgFqADYANAA0AaEBEgHNAQkBqgBFAdEBCgEIAecBzgHrAewB7QHuAe8B8AHxAfIB8wH0AfUB9gH3AfgB+QH6AfsB/AH9ATQARAAxAEYANgBDAScAMgA0ADIAQQA0ADYAMgBEADkAMwHgADcBKQBDADcBkgHAAWsAQQA2AYMCAwBEAEIARQBFADkCHwAyAWwARQBCADMCEQEnADcANQEoADYAQQGoADgARAAwADYANwEoADIBowENAEEARQBDAakBKQBEADcANwHjAeAAOQA2AXsAMQAyAEIANQIsAEIBYQFnAhEBZAGpADgANgIDADkCR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wIGB04DOgOYBLAJxgLfBOoDEAlGB+IE+QHqAXsGpQGAAekBGQFdAh8E5AO7BuQGUwgDAQoC+wJeAyoCwQJ0AQkGVwJGA98IMgGYAyYC+gMmAzwBAwjLCUAB0gofCiAKIQoiCiMKJAolCiYKJwooCikKKgorCiwKLQouCi8KMAoxCjIKMwo0CjUKNgo3CjgKOQo6CjsKPAo9Cj4KPwpACkEKQgpDCkQKRQpGCkcKSApJCkoKSwpMCk0KTgpPClABPAI1AbgKVAEeAkUBOAOwAQI=",r}(),n.CharProcess=u,r=function(){function n(){}return n.IsEmoji=function(t,i,r){r.emojiCharLength=0;try{if(n.IsEmoji_Enclosed_Alphanumeric_Symbol(t,i))return r.emojiCharLength=2,!0;if(n.IsEmoji_In_SpecificRange(t,i)||n.IsEmoji_In_UnicodeStandardSymbol(t,i))return r.emojiCharLength=n.IsHighSurrogate(t,i)?2:1,!0}catch(u){}return!1},n.IsEmoji_Enclosed_Alphanumeric_Symbol=function(t,i){if(i>=t.length-1)return!1;if(n.IsHighSurrogate(t,i))return!1;if(n.Contains(n._emoji_Enclosed_Alphanumeric_Symbols,n.ConvertToUtf32(t,i)))if(n._emoji_Enclosed_Alphanumeric_Symbols_Suffix===n.ConvertToUtf32(t,i+1))return!0;return!1},n.IsEmoji_In_SpecificRange=function(t,i){for(var u=n.ConvertToUtf32(t,i),f=Math.floor(n._emoji_Range.length/2),r=0;rt?u=i-1:r=i+1}return!1},n.ConvertFromUtf32=function(n){if(n<0||n>1114111||n>=55296&&n<=57343)throw"ArgumentOutOfRangeException";return n<65536?String.fromCharCode(n):(n-=65536,String.fromCharCode((Math.floor(n/1024)+55296,n%1024+56320)))},n.ConvertToUtf32=function(n,t){var i,r;if(t<0||t>=n.Length)throw"ArgumentOutOfRangeException";i=n.charCodeAt(t)-55296;if(i<0||i>2047)return n.charCodeAt(t);if(i>1023)throw"ArgumentException";if(t>=n.length-1)throw"ArgumentException";r=n.charCodeAt(t+1)-56320;if(r<0||r>1023)throw"ArgumentException";return i*1024+r+65536},n.IsHighSurrogate=function(n,t){var i=n.charCodeAt(t);return i>=55296&&i<=56319},n.IsLowSurrogate=function(n,t){var i=n.charCodeAt(t);return i>=56320&&i<=57343},n._emoji_Enclosed_Alphanumeric_Symbols_Suffix=8419,n._emoji_Enclosed_Alphanumeric_Symbols=[35,48,49,50,51,52,53,54,55,56,57],n._emoji_Range=[9728,9983,9984,10175,10240,10495,11008,11263,19904,19967,65936,65999,118784,119039,119040,119295,119296,119375,119552,119647,126976,127023,127024,127135,127136,127231,127232,127487,127488,127743,127744,128511,128512,128591,128640,128767,128768,128895],n._emoji_UnicodeStardard_Symbols=[169,174,8194,8195,8197,8252,8265,8482,8505,8596,8597,8598,8599,8600,8601,8617,8618,8986,8987,9193,9194,9195,9196,9200,9203,9410,9642,9643,9654,9664,9723,9724,9725,9726,10548,10549,12336,12349,12951,12953],n}(),n.EmojiHelper=r})(GCIM||(GCIM={}));var GCIM;(function(n){var t=function(){function t(){}return t.GetIVSCharTable=function(){return t.IVS_CharTable_decompressed===null&&(t.IVS_CharTable_decompressed=(JSON&&JSON.parse?JSON.parse:eval)("["+n.Utility.DecompressString(t.IVS_CharTable_compressed)+"]")),t.IVS_CharTable_decompressed},t.GetISVCharCountTable=function(){return t.ISV_CharCountTable_decompressed===null&&(t.ISV_CharCountTable_decompressed=(JSON&&JSON.parse?JSON.parse:eval)("["+n.Utility.DecompressString(t.ISV_CharCountTable_compressed)+"]")),t.ISV_CharCountTable_decompressed},t.IndexFromKey=function(n){var f=0,r=t.GetIVSCharTable(),u=r.length-1,i;while(f<=u){i=Math.floor((f+u)/2);if(r[i]===n)return i;else r[i]>n?u=i-1:f=i+1}return-1},t.IsIVSElement=function(n,i,r){var f,o,s,u,e;r.length=0;try{f=n.charCodeAt(i),o=t.IndexFromKey(f);if(o!==-1){s=t.GetISVCharCountTable()[i],u=t.ConvertFromUtf32(f);if(i+u.length=t.IVS_DECORATION_MIN&&e1114111||n>=55296&&n<=57343)throw"ArgumentOutOfRangeException";return n<65536?String.fromCharCode(n):(n-=65536,String.fromCharCode(Math.floor(n/1024)+55296,n%1024+56320))},t.ConvertToUtf32=function(n,t){var i,r;if(t<0||t>=n.Length)throw"ArgumentOutOfRangeException";i=n.charCodeAt(t)-55296;if(i<0||i>2047)return n.charCodeAt(t);if(i>1023)throw"ArgumentException";if(t>=n.length-1)throw"ArgumentException";r=n.charCodeAt(t+1)-56320;if(r<0||r>1023)throw"ArgumentException";return i*1024+r+65536},t.ConvertFromNormalChar=function(n,i,r){var f,u;r.convertedCharacterNumber=0,f="";try{ithis.minLength?this.text.GetLength():this.minLength},n.prototype.GetLengthNow=function(){return this.NewText!=null?this.NewText.GetLength():0},n}(),t;n.Field=i,t=function(t){function i(n){t.call(this,"PromptField"),n!=null&&n.GetLength()>0&&(this.text=n),this.minLength=this.text.GetLength(),this.maxLength=this.text.GetLength()}return __extends(i,t),i.prototype.GetStatus=function(){return n.FieldStatus.Full},i.prototype.GetText=function(){return this.text},i.prototype.GetFillingString=function(){return this.text},i.prototype.SetText=function(n){var t={};return n==this.promptText?(t.existInvalid=!1,n=n.Substring(this.text.GetLength())):t.existInvalid=!0,t.text=n,t},i.prototype.GetLength=function(){return this.text.GetLength()},i.prototype.RollBack=function(){return!1},i}(i),n.PromptField=t})(GCIM||(GCIM={}));var GCIM;(function(n){var t=function(){function t(n){this.index=0,this.fieldArray=[],this.fieldCount=n,this.fieldsDirty=!0}return t.prototype.GetLength=function(){for(var i=0,t,n=0;n=t&&n=t)return f=this.fieldArray[this.fieldCount-1],i.index=this.fieldCount-1,i.offset=f.GetLength(),i},t.prototype.GetFieldRange=function(n){var t={},u,i,f,r;for(t.start=0,t.length=0,u=0,i=0;i256)return;if(r.keyCode==n.Key.Delete&&r.shiftKey)return;if(i._imeMode===!0&&!n.Utility.IsIE8OrBelow)return;u=i;if(!n.Utility.IsIE&&(r.charCode==0||!n.Utility.ShouldInvokeKeyPress))if(n.Utility.ShouldInvokeKeyPress&&(r.keyCode!=n.Key.Up&&r.keyCode!=n.Key.Down||n.GcTextBox&&u instanceof n.GcTextBox||n.DropDownEditControl&&u instanceof n.DropDownEditControl)){if(!(r.keyCode==n.Key.Return&&(n.GcTextBox&&u instanceof n.GcTextBox||n.DropDownEditControl&&u instanceof n.DropDownEditControl)))return}else{n.Utility.ShouldInvokeKeyPress=!0,n.Utility.PreventDefault(r),u!=null&&(n.GcTextBox&&u instanceof n.GcTextBox||n.DropDownEditControl&&u instanceof n.DropDownEditControl)&&u._dropDownObj!=null&&u._dropDownObj.IsKeyFromDropDown&&(u._dropDownObj.IsKeyFromDropDown=!1);return}e=r.keyCode||r.charCode;if(e!=n.Key.Return||n.GcTextBox&&u instanceof n.GcTextBox||n.DropDownEditControl&&u instanceof n.DropDownEditControl){f=String.fromCharCode(e);try{s=n.CharProcess.CharEx;if(s.IsSurrogate(f.charAt(0))){u._isSurrogateKeyPressing=!0;return}}catch(h){}if(f!=null){o=null;try{o=t.CallKeyPress(i,f,r)}catch(h){}}n.Utility.IsIE&&e==n.Key.Escape&&i.SetSelection(i.SelectionStart,i.SelectionEnd);if(!o){n.Utility.PreventDefault(r);return}}},t.CallKeyPress=function(t,i,r){return n.Utility.IsPad()?(t._hasInput=!0,!0):t.KeyPress(i,r)},t.OnKeyUp=function(t,i){var r;if(n.Utility.chrome&&t._monitorSpaceKey==!0){if(i.keyCode==32)if(!t._compositionEventFired){t._imeMode=!0,t.Input(i),t._monitorSpaceKey=!1,t._compositionEventFired=!1;return}t._monitorSpaceKey=!1,t._compositionEventFired=!1}if(t._imeMode===!0&&!n.Utility.IsIE8OrBelow)if(i.keyCode!=244)return;try{r=t;if(r._isSurrogateKeyPressing)try{if(r._realInputElement!=null){var e=r._realInputElement.value,u=r._realInputElement.selectionStart,f=e.substr(u-2,u);r.KeyPress(f,i)}}finally{r._isSurrogateKeyPressing=!1}n.Utility.FuncKeysPressed={Shift:i.shiftKey,Ctrl:i.ctrlKey,Alt:i.altKey},t._isKeyDown=!1,r.KeyUp(i)}catch(o){}},t.OnMouseDown=function(t,i){if(t._imeMode===!0&&!n.Utility.IsIE8OrBelow)return;try{t._isMouseDown=!0;var r=n.Utility.GetMouseButton(i);r===n.MouseButton.Right?t._focusType=n.FocusType.ContextMenu:t._focusType-n.FocusType.Click,t.MouseDown(i),n.Utility.IsIE||(n.Utility.DragStartElementID=t)}catch(u){}},t.OnMouseUp=function(i,r){var f,u;if(i._imeMode===!0&&!n.Utility.IsIE8OrBelow)return;try{i._isMouseDown=!1,n.Utility.IsPad()&&i._setFocusOnMouseUP&&(t.OnFocus(i,r),i._setFocusOnMouseUP=!1);if(i._mouseUpPointerType!=null&&i._mouseUpPointerType!==4&&i._mouseUpPointerType!=="mouse"){f={};for(u in r)f[u]=r[u];setTimeout(function(n){try{i.MouseUp(f)}catch(t){}},300)}else if(n.Utility.chrome&&n.BaseInputControl&&i instanceof n.BaseInputControl&&i.SelectionStart!=i.SelectionEnd){f={};for(u in r)f[u]=r[u];setTimeout(function(){try{i.MouseUp(f)}catch(n){}})}else i.MouseUp(r);n.Utility.IsIE||(n.Utility.DragStartElementID="")}catch(e){}},t.OnMouseWheel=function(t,i){try{if(!t._focused)return;t.MouseWheel(i),t.ShouldCancelMouseWheelDefaultBehavior()&&n.Utility.PreventDefault(i)}catch(r){}},t.OnMouseOut=function(t,i){try{t._removeBorderStatus(n.ControlStatus.Hover),t.MouseOut()}catch(r){}},t.OnMouseOver=function(t,i){try{t._addBorderStatus(n.ControlStatus.Hover),t.MouseOver&&t.MouseOver()}catch(r){}},t.OnMouseMove=function(n,t){try{n.MouseMove&&n.MouseMove(t)}catch(i){}},t.OnFocus=function(i,r){try{if(n.Utility.IsPad()&&i._isMouseDown){i._setFocusOnMouseUP=!0;return}i._focused=!0,i._shouldFireOnEnterEvent=!1,i.Focus(),i._shouldFireOnEnterEvent&&(i.FireOnEnterEvent(),i._shouldFireOnEnterEvent=!1),i._addBorderStatus(n.ControlStatus.Focused),(n.Utility.IsPad()||n.Utility.IsIE11OrLater&&n.Utility.IsTouchMouseDown==!0||n.Utility.IsChrome37OrLater()&&n.Utility.IsTouchMouseDown)&&(i._iPadSelectionRefreshTimer=setInterval(function(n){i._imeMode||t.OnSelect(i,n)},400))}catch(u){}},t.OnLostFocus=function(t,i){try{if(n.Utility.chrome&&t._isDragging){t._lostFocusEventArgs=i;return}t._removeBorderStatus(n.ControlStatus.Focused),t._shouldFireOnLeaveEvent=!1,t._isLostingFocusWhenIme=!0;try{t.LoseFocus(i)}finally{t._isLostingFocusWhenIme=!1}t._shouldFireOnLeaveEvent&&t.FireOnLeaveEvent(),t._shouldFireOnLeaveEvent=!1,t._focused=!1,(n.Utility.IsPad()||n.Utility.IsIE11OrLater&&n.Utility.IsTouchMouseDown==!0)&&clearInterval(t._iPadSelectionRefreshTimer)}catch(r){}},t.OnBeforeDeactivate=function(t,i){try{t._dropDownBtnPressed&&n.Utility.PreventDefault(i)}catch(r){}},t.OnContextMenu=function(t,i){var r="";try{r=n.Utility.GetSelectionText(t.GetInputElement())}catch(u){}try{n.Utility.CurrentActiveControlId!=t._getId()&&t.SetFocus(),t.ShowContextMenu(r,i)}catch(u){}t.GetEnabled()&&n.Utility.PreventDefault(i)},t.OnTouchStart=function(n,t){n.TouchStart(t)},t.OnTouchEnd=function(n,t){n.TouchEnd(t)},t.OnMSPointerUp=function(n,t){n.MSPointerUp(t)},t.OnMSPointerDown=function(n,t){try{n.MSPointerDown(t)}catch(i){}},t.OnMSGestureTap=function(n,t){try{n.MSGestureTap(t)}catch(i){}},t.OnCompositionStart=function(n,t){try{n.CompositionStart(t),n._compositionEventFired=!0}catch(i){}},t.OnCompositionUpdate=function(n,t){try{n.CompositionUpdate(t)}catch(i){}},t.OnCompositionEnd=function(t,i){try{n.Utility.IsIE||(t._hasInput=!0,n.Utility.chrome&&n.Utility.ChromeVersion>=53&&(t._hasInput=!1),t._imeMode=!1),t.CompositionEnd(i)}catch(r){}},t.OnInput=function(t,i){try{if(t._imeMode===!0)return;if(t._isDragging)return;if(t._hasInput!==!0)if(!n.Utility.chrome||t._isKeyDown)if(!n.Utility.chrome||!n.Utility.SpecialImeSupport||!t._monitorSpaceKey)return;t._imeMode=!0,t._hasInput=!1,t.Input(i)}catch(r){}},t.OnSpinContextMenu=function(n,t,i){},t.OnSpinBtnMouseDown=function(t,i,r){var f=n.Utility.GetMouseButton(i),u;try{u=t.GetSpinEnabled();if(!u){t.SetInnerFocus(),n.Utility.PreventDefault(i);return}n.Utility.IsIE&&(i.cancelBubble=!0),t.SpinBtnMouseDown(f,r),r?t._setSpinUpButtonStatus(n.ControlStatus.Pressed):t._setSpinDownButtonStatus(n.ControlStatus.Pressed),n.Utility.PreventDefault(i)}catch(e){}},t.OnSpinBtnMouseUp=function(t,i,r){try{var u=t.GetSpinEnabled();if(!u){t.SetInnerFocus(),n.Utility.PreventDefault(i);return}t.SpinBtnMouseUp(),r?t._setSpinUpButtonStatus(n.ControlStatus.Hover):t._setSpinDownButtonStatus(n.ControlStatus.Hover)}catch(f){}},t.OnSpinBtnMouseOut=function(t,i,r){var e,u,f;try{e=t.GetSpinEnabled();if(!e)return;t.SpinBtnMouseUp(),u=i.toElement;if(u){f=r?t._render._spinUpButton:t._render._spinDownButton;if(f.contains(u))return}r?t._setSpinUpButtonStatus(n.ControlStatus.Normal):t._setSpinDownButtonStatus(n.ControlStatus.Normal)}catch(o){}},t.OnSpinBtnMouseOver=function(t,i,r){var u=t.GetSpinEnabled();if(!u)return;r?t._setSpinUpButtonStatus(n.ControlStatus.Hover):t._setSpinDownButtonStatus(n.ControlStatus.Hover)},t.OnSpinBtnMouseMove=function(t,i,r){var u=t.GetSpinEnabled();if(!u)return;r?t._setSpinUpButtonStatus(t._getSpinUpButtonState()|n.ControlStatus.Hover):t._setSpinDownButtonStatus(t._getSpinDownButtonState()|n.ControlStatus.Hover)},t.OnDropDownBtnContextMenu=function(n,t){},t.OnDropDownBtnMouseDown=function(t,i){var u=n.Utility.GetMouseButton(i),r;try{r=t.GetDropDownEnabled();if(!r){t.SetInnerFocus(),n.Utility.PreventDefault(i);return}t.DropDownBtnMouseDown(u,i),t._setDropDownButtonStatus(n.ControlStatus.Pressed),n.Utility.PreventDefault(i)}catch(f){}},t.OnDropDownBtnMouseUp=function(t,i){var r=t.GetDropDownEnabled();if(!r){t.SetInnerFocus(),n.Utility.PreventDefault(i);return}t.DropDownBtnMouseUp(),n.Utility.IPad&&t._droppedDown?t._setDropDownButtonStatus(n.ControlStatus.Pressed):t._setDropDownButtonStatus(n.ControlStatus.Hover)},t.OnDropDownBtnMouseOut=function(t,i){var f,r,u;try{f=t.GetDropDownEnabled();if(!f)return;t.DropDownBtnMouseOut(),r=i.toElement;if(r){u=t._render._dropDownButton;if(u.contains(r))return}t._setDropDownButtonStatus(n.ControlStatus.Normal)}catch(e){}},t.OnDropDownBtnMouseOver=function(t,i){try{var r=t.GetDropDownEnabled();if(!r)return;t._setDropDownButtonStatus(n.ControlStatus.Hover)}catch(u){}},t.OnDropDownBtnMouseMove=function(n,t){},t.OnSelect=function(t,i){try{if(n.Utility.IsPad()&&t._imeMode)return;t&&t._focused&&t.Select()}catch(r){}},t.OnSelectStart=function(t,i){var r,u;try{n.Utility.InnerSelect==!0&&n.Utility.ShouldFireOnSelectStart==!1&&n.Utility.CancelBubble(i);if(n.Utility.InnerSelect)return;r=n.Utility.GetSelectionText(t.GetInputElement()),(typeof r=="undefined"||r==null)&&(r=""),u=null;try{u=t.SelectStart(r)}catch(e){}u==!1&&n.Utility.PreventDefault(i)}catch(f){}},t.OnHTML5BeforeCut=function(n,t){},t.OnHTML5Cut=function(n,t){try{var i=n.GetInputElement(),f=i.value,u=i.selectionStart,r=i.selectionEnd;setTimeout(function(){i.value=f,i.selectionStart=u,i.selectionEnd=r,n.Cut(t)},0)}catch(e){}},t.OnHTML5BeforeCopy=function(t,i){try{n.Utility.CutCopyPasteEventObject=i,t.Copy(i)}catch(r){}finally{n.Utility.CutCopyPasteEventObject=null}},t.OnHTML5Copy=function(n,t){try{}catch(i){}},t.OnHTML5BeforePaste=function(n,t){},t.OnHTML5Paste=function(t,i){try{if((n.Utility.chrome||n.Utility.IsEdge||n.Utility.IPad)&&n.Utility.GetClientOS().toLowerCase()!=="android")n.Utility.CutCopyPasteEventObject=i,t.Paste(n.Utility.GetDataFromClipboard(!0)),n.Utility.PreventDefault(i);else{var u=t.SelectionStart,r=t.SelectionEnd;setTimeout(function(){n.Utility.GetClientOS().toLowerCase()==="android"&&(t.SelectionStart=u,t.SelectionEnd=r),t._isPasting=!0,t.ImeInput("DirectInput")},0)}}catch(f){}finally{n.Utility.CutCopyPasteEventObject=null}},t.OnClick=function(n,t){try{n.Click()}catch(i){}},t.OnDblClick=function(t,i){var r=null;try{r=t.DoubleClick()}catch(u){}r||n.Utility.PreventDefault(i)},t.OnDragStart=function(n,t){try{n._isDragging=!0,n.DragStart()}catch(i){n._isDragging=!1}},t.OnDragEnd=function(i,r){try{i.DragEnd(r)}catch(u){}finally{i._isDragging=!1,n.Utility.chrome&&t.OnLostFocus(i,i._lostFocusEventArgs)}},t.OnDragEnter=function(n,t){try{n.DragEnter()}catch(i){}},t.OnDragLeave=function(n,t){try{n.DragLeave()}catch(i){}},t.OnDrop=function(n,t){try{var i=t.dataTransfer.getData("Text");n.DragDrop(i,t)}catch(r){}},t.OnPropertyChanged=function(n,t){try{n.PropertyChange(t)}catch(i){}},t.OnEditFieldFocus=function(t,i){if(n.Utility.IsFocusFromIMControl(t._getId(),i))if(n.Utility.IsIE||n.Utility.HasGetFocus)return;n.Utility.IsOnFocus=!0,n.Utility.IsIE||(n.Utility.HasGetFocus=!0),this.OnFocus(t,i)},t.OnEditFieldLoseFocus=function(t,i){try{var r=t;if(r!=null&&(n.GcTextBox&&r instanceof n.GcTextBox||n.DropDownEditControl&&r instanceof n.DropDownEditControl)&&r._isFocusToDropDownEdit){r._isFocusToDropDownEdit=!1;return}n.GcTextBox&&r instanceof n.GcTextBox&&r.GetRealControlEffect()===n.ControlEffect.Chrome&&r._restoreBorder();if(n.Utility.IsFocusToIMControl(t._getId(),i)){t._focused=!1;return}if(n.Utility.firefox){if(n.Utility.IsOnFocus&&n.Utility.IsIE&&n.Utility.IsOnActivate&&n.Utility.IsOnActivateControlID==t._getId()){n.Utility.FocusToBorder!=null&&n.Utility.FocusToBorder==!0&&(n.Utility.FocusToBorder=!1,r.SetInnerFocus());return}n.Utility.FocusToBorder=!1,n.Utility.IsIE?n.Utility.IsOnFocus=!1:n.Utility.HasGetFocus=!1}this.OnLostFocus(t,i),n.Utility.FuncKeysPressed={Shift:!1,Ctrl:!1,Alt:!1}}catch(u){}},t.OnFocusOut=function(t,i){var r,u;n.Utility.FocusToBorder=!1,n.Utility.IsIE&&(r=i.toElement||i.relatedTarget,r&&(u=r.id,u==t._getId()+"_Inside_Div_Container"&&(n.Utility.FocusToBorder=!0)));if(n.Utility.IsFocusToIMControl(t._getId(),i)){n.Utility.IsIE9OrLater&&(n.Utility.IsOnActivate=!0,n.Utility.IsOnActivateControlID=t._getId(),n.Utility.IsOnFocus=!0);return}n.Utility.IsIE&&n.Utility.IsOnActivate&&(n.Utility.IsOnActivate=!1,n.Utility.IsOnActivateControlID=""),n.Utility.IsOnFocus&&(n.Utility.IsOnFocus=!1)},t.OnActivate=function(t,i){n.Utility.IsOnActivate=!0,n.Utility.IsOnActivateControlID=t._getId();if(n.Utility.IsFocusFromIMControl(t._getId(),i))return;n.Utility.IsOnActivate=!0,n.Utility.IsOnActivateControlID=t._getId(),t.Active()},t.OnDeActivate=function(t,i){if(n.Utility.IsFocusToIMControl(t._getId(),i))return;n.Utility.IsOnActivate=!1,n.Utility.IsOnActivateControlID="",n.Utility.IsOnFocus=!1},t.OnTextInput=function(n,t){try{}catch(i){}},t.OnMSHoldVisual=function(n,t){try{n.MSHoldVisual(t)}catch(i){}},t}();n.GlobalEventHandler=t})(GCIM||(GCIM={}));var GCIM;(function(n){var t=function(){function t(n){this._control=n,this._controId=this._control._getId(),this._hideText="",this._appenddingText=null}return t.prototype._getContainer=function(){return this._control._getControlContainer()},t.prototype._getBorderContainer=function(){return this._control.GetBorderContainer()},t.prototype._getInputElement=function(){return this._control.GetInputElement()},t.prototype.SetLastClientValues=function(t){var i=document.getElementById(this._controId+n.Utility.LastClientValuesID);i!=null&&(i.value=t)},t.prototype.GetBackColor=function(){if(this._getInputElement()!==null)return this._getInputElement().style.backgroundColor;else if(this._getBorderContainer()!=null)return this._getBorderContainer().style.backgroundColor;else if(this._getContainer()!=null)return this._getContainer().style.backgroundColor;return""},t.prototype.SetBackColor=function(t){this._getInputElement()!==null?(this._getInputElement().style.backgroundColor=t,n.Utility.chrome&&this._getContainer()!=null&&(this._getContainer().style.backgroundColor=t)):this._getBorderContainer()!=null?this._getBorderContainer().style.backgroundColor=t:this._getContainer()!=null&&(this._getContainer().style.backgroundColor=t)},t.prototype.GetForeColor=function(){if(this._getInputElement()!=null)return this._getInputElement().style.color;else if(this._getBorderContainer()!=null)return this._getBorderContainer().style.color;return""},t.prototype.SetForeColor=function(n){this._getInputElement()!=null?this._getInputElement().style.color=n:this._getBorderContainer()!=null?this._getBorderContainer().style.color=n:this._getContainer()!=null&&(this._getContainer().style.color=n)},t.prototype.UpdateForeColor=function(){},t.prototype.GetBackgroundImageUrl=function(){if(this._getInputElement()!==null)return this._getInputElement().style.backgroundImage;else if(this._getBorderContainer()!=null)return this._getBorderContainer().style.backgroundImage;else if(this._getContainer()!=null)return this._getContainer().style.backgroundImage;return""},t.prototype.SetBackgroundImageUrl=function(n){if(this._getInputElement()!==null)return this._getInputElement().style.backgroundImage=n;this._getBorderContainer()!=null?this._getBorderContainer().style.backgroundImage=n:this._getContainer()!=null&&(this._getContainer().style.backgroundImage=n)},t.prototype.GetBorderColor=function(){if(this._getBorderContainer()!=null)return this._getBorderContainer().style.borderColor;else if(this._getContainer()!=null)return this._getContainer().style.borderColor;return""},t.prototype.SetBorderColor=function(n){this._getBorderContainer()!==null?this._getBorderContainer().style.borderColor=n:this._getContainer()!==null&&(this._getContainer().style.borderColor=n)},t.prototype.GetBorderStyle=function(){if(this._getBorderContainer()!=null)return this._getBorderContainer().style.borderStyle;else if(this._getContainer()!=null)return this._getContainer().style.borderColor;return""},t.prototype.SetBorderStyle=function(n){this._getBorderContainer()!=null?this._getBorderContainer().style.borderStyle=n:this._getContainer()!=null&&(this._getContainer().style.borderStyle=n)},t.prototype.GetBorderWidth=function(){if(this._getBorderContainer()!=null)return this._getBorderContainer().style.borderWidth;else if(this._getContainer()!=null)return this._getContainer().style.borderWidth;return""},t.prototype.SetBorderWidth=function(n){this._getBorderContainer()!=null?this._getBorderContainer().style.borderWidth=n:this._getContainer()!=null&&(this._getContainer().style.borderWidth=n)},t.prototype.GetCursor=function(){return this._getInputElement()!==null?this._getInputElement().style.cursor:this._getContainer()!==null?this._getContainer().style.cursor:""},t.prototype.SetCursor=function(n){this._getInputElement()!==null&&(this._getInputElement().style.cursor=n),this._getContainer()!==null&&(this._getContainer().style.cursor=n)},t.prototype.GetFontFamily=function(){if(this._getInputElement()!==null)return this._getInputElement().style.fontFamily;else if(this._getBorderContainer()!==null)return this._getBorderContainer().style.fontFamily;else if(this._getContainer()!==null)return this._getContainer().style.fontFamily;return""},t.prototype.SetFontFamily=function(n){this._getInputElement()!==null?this._getInputElement().style.fontFamily=n:this._getBorderContainer()!==null?this._getBorderContainer().style.fontFamily=n:this._getContainer()!==null&&(this._getContainer().style.fontFamily=n)},t.prototype.GetFontSize=function(){if(this._getInputElement()!==null)return this._getInputElement().style.fontSize;else if(this._getBorderContainer()!==null)return this._getBorderContainer().style.fontSize;else if(this._getContainer()!==null)return this._getContainer().style.fontSize;return""},t.prototype.SetFontSize=function(t){var r=this,i;this._getInputElement()!==null?(this._getInputElement().style.fontSize=t,(n.Utility.IsIE8||n.Utility.IsIE9||n.Utility.IsIE10)&&(i=this._getInputElement(),i.id.indexOf("DropDown_EditField")===-1&&(this._oldWidth=i.style.width,this._tempFontSizeTimeTicket&&(window.clearTimeout(this._tempFontSizeTimeTicket),this._oldWidth=this._tempFontSizeOldWidth,this._tempFontSizeTimeTicket=null),this._tempFontSizeOldWidth=this._oldWidth,isNaN(parseInt(this._oldWidth))?this._hasChangedWdith=!1:(i.style.width=parseInt(this._oldWidth)+1+"px",this._hasChangedWdith=!0),this._tempFontSizeTimeTicket=setTimeout(function(){i.style.width=r._oldWidth,r._tempFontSizeTimeTicket=null},0)))):this._getBorderContainer()!==null?this._getBorderContainer().style.fontSize=t:this._getContainer()!==null&&(this._getContainer().style.fontSize=t)},t.prototype.ClearTimeTicket=function(){this._tempFontSizeTimeTicket!==null&&(window.clearTimeout(this._tempFontSizeTimeTicket),this._tempFontSizeTimeTicket=null),this._tempTextHAlignTimeTicket!==null&&(window.clearTimeout(this._tempTextHAlignTimeTicket),this._tempTextHAlignTimeTicket=null),n.GcTextBox&&this._control instanceof n.GcTextBox&&(this._control._tempScrollBarsTimeTicket!==null&&(window.clearTimeout(this._control._tempScrollBarsTimeTicket),this._control._tempScrollBarsTimeTicket=null),this._control._tempWordWrapTimeTicket!==null&&(window.clearTimeout(this._control._tempWordWrapTimeTicket),this._control._tempWordWrapTimeTicket=null),this._control._tempScrollBarTimeTicket!==null&&(window.clearTimeout(this._control._tempScrollBarTimeTicket),this._control._tempScrollBarTimeTicket=null))},t.prototype.GetFontWeight=function(){if(this._getInputElement()!==null)return this._getInputElement().style.fontWeight;else if(this._getBorderContainer()!==null)return this._getBorderContainer().style.fontWeight;else if(this._getContainer()!==null)return this._getContainer().style.fontWeight;return""},t.prototype.SetFontWeight=function(n){this._getInputElement()!==null?this._getInputElement().style.fontWeight=n:this._getBorderContainer()!==null?this._getBorderContainer().style.fontWeight=n:this._getContainer()!==null&&(this._getContainer().style.fontWeight=n)},t.prototype.GetFontStyle=function(){if(this._getInputElement()!==null)return this._getInputElement().style.fontStyle;else if(this._getBorderContainer()!==null)return this._getBorderContainer().style.fontStyle;else if(this._getContainer()!==null)return this._getContainer().style.fontStyle;return""},t.prototype.SetFontStyle=function(n){this._getInputElement()!==null?this._getInputElement().style.fontStyle=n:this._getBorderContainer()!==null?this._getBorderContainer().style.fontStyle=n:this._getContainer()!==null&&(this._getContainer().style.fontStyle=n)},t.prototype.GetTextDecoration=function(){if(this._getInputElement()!==null)return this._getInputElement().style.textDecoration;else if(this._getBorderContainer()!==null)return this._getBorderContainer().style.textDecoration;else if(this._getContainer()!==null)return this._getContainer().style.textDecoration;return""},t.prototype.SetTextDecoration=function(n){this._getInputElement()!==null?this._getInputElement().style.textDecoration=n:this._getBorderContainer()!==null?this._getBorderContainer().style.textDecoration=n:this._getContainer()!==null&&(this._getContainer().style.textDecoration=n)},t.prototype.GetVisible=function(){return this._getContainer()!==null?this._getContainer().style.display!=="none":!1},t.prototype.SetVisible=function(n){this._getContainer()!==null&&(this._getContainer().style.display=n?"":"none"),this._getInputElement()!==null&&(this._getInputElement().style.display=n?"":"none")},t.prototype.GetImeMode=function(){return this._getInputElement()!==null?this._getInputElement().style.imeMode||"auto":""},t.prototype.SetImeMode=function(n){this._getInputElement()!==null&&(this._getInputElement().style.imeMode=n)},t.prototype.GetTextHAlign=function(){return this._getInputElement()!==null?this._getInputElement().style.textAlign:""},t.prototype.SetTextHAlign=function(t){var u=this,i,r;this._getInputElement()!==null&&(this._getInputElement().style.textAlign=t,n.Utility.IsIE&&(i=this._getInputElement().style.width,this._tempTextHAlignTimeTicket&&(i=this._tempTextHAlignOldWidth,window.clearTimeout(this._tempTextHAlignTimeTicket),this._tempTextHAlignTimeTicket=null),this._tempTextHAlignOldWidth=i,r=parseInt(i),isNaN(r)&&(r=120),this._getInputElement().style.width=r+1+"px",this._tempTextHAlignTimeTicket=setTimeout(function(){u._getInputElement().style.width=i,u._tempTextHAlignTimeTicket=null},0)))},t.prototype.GetToolTip=function(){if(this._getContainer()!==null)return this._getContainer().getAttribute("title")||"";else if(this._getBorderContainer()!==null)return this._getBorderContainer().getAttribute("title")||"";else if(this._getInputElement()!==null)return this._getInputElement().getAttribute("title")||"";return""},t.prototype.SetToolTip=function(t){var i;this._getContainer()!==null?i=this._getContainer():this._getBorderContainer()!==null?i=this._getBorderContainer():this._getInputElement()!==null&&(i=this._getInputElement()),n.Utility.SetToolTip(i,t)},t.prototype.SetImageEnabled=function(t,i){t!=null&&t.tagName.toLowerCase()=="img"&&(n.Utility.IsIE10OrLater?i?t.src=t.__oldSrc:(t.__oldSrc=t.src,t.src=n.Utility.GrayScale(t.src)):t.style.filter=i?"":"progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)")},t.prototype.GetEnabled=function(){return this._getInputElement()!==null?this._getInputElement().disabled===!1:!0},t.prototype.SetEnabled=function(t){this._getInputElement()!==null&&(this._getInputElement().disabled=!t,this._control._getControlEffect()===n.ControlEffect.JQueryUI&&(t?n.Utility.RemoveClass(this._getInputElement(),"ui-state-disabled"):n.Utility.AddClass(this._getInputElement(),"ui-state-disabled")))},t.prototype.SetReadOnly=function(n){this._getInputElement()!=null&&(this._getInputElement().readOnly=n)},t.prototype.SetFocus=function(){try{this._getInputElement()!=null?this._getInputElement().focus():this._getContainer()!=null&&this._getContainer().focus()}catch(n){}},t.prototype.GetText=function(){var t,i;if(this._appenddingText!=null)return this._appenddingText;t=this._getInputElement();if(t!=null)return t.tagName==="TEXTAREA"?n.Utility._convertCrlF(t.value):t.value;else if(this._getContainer()!=null)return i=this._getContainer(),i.tagName==="TEXTAREA"?n.Utility._convertCrlF(i.value):i.value;return""},t.prototype.SetText=function(t){if(this.GetText()==null)return;var i=this.GetText().replace(/\r\n/g,"\n")==t.replace(/\r\n/g,"\n");if(!n.Utility.IsIE)if(i)return;if(i&&t==="")return;if(this._getInputElement()!=null)if(this._control._isLostingFocusWhenIme&&n.Utility.IPad&&this._control._getIsSpreadCell()==!0){this._appenddingText=t;return}else this._getInputElement().value=t;else this._getContainer()!=null&&(this._getContainer().value=t)},t.prototype.SetHideText=function(n){n!==""&&this._control._IsUseWatermarkText().IsUseWatermarkText&&(n=this._control.GetText()),this._hideText=n},t.prototype.GetHideText=function(){return this._hideText},t.prototype.GetRealSize=function(){var i={},t;return i.Width=0,i.Height=0,t=this._getBorderContainer(),t.offsetWidth&&t.offsetHeight?(i.Width=t.offsetWidth,i.Height=t.offsetHeight):t.style&&t.style.pixelWidth&&t.style.pixelHeight&&(i.Width=t.style.pixelWidth,i.Height=t.style.pixelHeight),n.Utility.IsIE&&t.style.zoom!=""&&t.style.zoom!==null&&(i.Width=Math.round(i.Width*parseFloat(t.style.zoom)),i.Height=Math.round(i.Height*parseFloat(t.style.zoom))),i},t.prototype.AddEventForInputElement=function(t,i,r){n.Utility.AttachEvent(this._getInputElement(),t,i,r)},t}();n.UIUpdate=t})(GCIM||(GCIM={})) if(typeof(Sys)!='undefined' && typeof(Sys.Application) != 'undefined'){Sys.Application.notifyScriptLoaded();};