/*!@license
* Infragistics.Web.ClientUI infragistics.dv_scroller.js 21.2.20212.99
*
* Copyright (c) 2011-2022 Infragistics Inc.
*
* http://www.infragistics.com/
*
* Depends:
*     jquery-1.4.4.js
*     jquery.ui.core.js
*     jquery.ui.widget.js
*     infragistics.util.js
*     infragistics.ext_core.js
*     infragistics.ext_collections.js
*     infragistics.dv_core.js
*     infragistics.dv_datasource.js
*     infragistics.dv_interactivity.js
*     infragistics.ext_ui.js
*/
(function(factory){if(typeof define==="function"&&define.amd){define(["./infragistics.util","./infragistics.ext_core","./infragistics.ext_collections","./infragistics.dv_core","./infragistics.dv_datasource","./infragistics.dv_interactivity","./infragistics.ext_ui"],factory)}else{factory(igRoot)}})(function($){$.ig=$.ig||{};var $$t={};$.ig.globalDefs=$.ig.globalDefs||{};$.ig.globalDefs.$$bq=$$t;var $$0=$.ig.globalDefs.$$0;var $$4=$.ig.globalDefs.$$4;var $$1=$.ig.globalDefs.$$1;var $$w=$.ig.globalDefs.$$w;var $$y=$.ig.globalDefs.$$y;var $$al=$.ig.globalDefs.$$al;var $$6=$.ig.globalDefs.$$6;var $$a=$.ig.globalDefs.$$a;$.ig.$currDefinitions=$$t;$.ig.util.bulkDefine(["ScrollerView:a","Scroller:c","ScrollerScrollingEventHandler:d","IScrollerView:f","IScrollerKeyboardListener:g"]);var $a=$.ig.intDivide,$b=$.ig.util.cast,$c=$.ig.util.defType,$d=$.ig.util.defEnum,$e=$.ig.util.getBoxIfEnum,$f=$.ig.util.getDefaultValue,$g=$.ig.util.getEnumValue,$h=$.ig.util.getValue,$i=$.ig.util.intSToU,$j=$.ig.util.nullableEquals,$k=$.ig.util.nullableIsNull,$l=$.ig.util.nullableNotEquals,$m=$.ig.util.toNullable,$n=$.ig.util.toString$1,$o=$.ig.util.u32BitwiseAnd,$p=$.ig.util.u32BitwiseOr,$q=$.ig.util.u32BitwiseXor,$r=$.ig.util.u32LS,$s=$.ig.util.unwrapNullable,$t=$.ig.util.wrapNullable,$u=String.fromCharCode,$v=$.ig.util.castObjTo$t,$w=$.ig.util.compareSimple,$x=$.ig.util.tryParseNumber,$y=$.ig.util.tryParseNumber1,$z=$.ig.util.numberToString,$0=$.ig.util.numberToString1,$1=$.ig.util.parseNumber;$d("ScrollbarStyle:b",false,false,{"Default:$default":0,Fading:1,Thin:2});$c("IScrollerView:f","Object",{$type:new $.ig.Type("IScrollerView",null)},true);$c("ScrollerView:a","Object",{init:function(a){this.e=false;this.d=null;this.i=false;this.h=false;this.w=0;this.t=0;this.x=-1;this.u=-1;$.ig.$op.init.call(this);this.model(a)},_model:null,model:function(a){if(arguments.length===1){this._model=a;return a}else{return this._model}},_ab:null,_af:null,_b:null,getDefaultScrollbarBrush:function(){return function(){var $ret=new $$a.at;$ret.fill("#666666");return $ret}()},_aa:null,_a:null,_rootContainer:null,rootContainer:function(a){if(arguments.length===1){this._rootContainer=a;return a}else{return this._rootContainer}},_contentContainer:null,contentContainer:function(a){if(arguments.length===1){this._contentContainer=a;return a}else{return this._contentContainer}},_hScrollbar:null,hScrollbar:function(a){if(arguments.length===1){this._hScrollbar=a;return a}else{return this._hScrollbar}},_vScrollbar:null,vScrollbar:function(a){if(arguments.length===1){this._vScrollbar=a;return a}else{return this._vScrollbar}},provideContainer:function(a){var $self=this;if(a==null){if(this._ab!=null){this._ab=null}if(this._a!=null){this._a._an=null;this._a.au()}return}this._ab=a;this.model().executionContext(new $.ig.DOMExecutionContext(this._ab));var b=Math.round(this._ab.rootWrapper().width());var c=Math.round(this._ab.rootWrapper().height());this.rootContainer(this._ab.rootWrapper());this.rootContainer().setStyleProperty("position","relative");this._af=this._ab.createElement("div");this._af.setStyleProperty("position","relative");this._af.setStyleProperty("width","100%");this._af.setStyleProperty("height","100%");this._af.setStyleProperty("overflow","hidden");this.rootContainer().append(this._af);this.hScrollbar(this._ab.createElement("div"));this.hScrollbar().setStyleProperty("position","absolute");this.hScrollbar().setStyleProperty("height",this.model().scrollbarSpan()+"px");this.hScrollbar().setStyleProperty("width",this.model().minScrollbarSize()+"px");this.hScrollbar().setStyleProperty("background-color",this.model().scrollbarBrush().__fill);this.hScrollbar().setStyleProperty("display","none");this.hScrollbar().setStyleProperty("border-radius","5px");this.hScrollbar().setStyleProperty("z-index","10000");this.hScrollbar().setStyleProperty("bottom","0px");this.rootContainer().append(this.hScrollbar());this.vScrollbar(this._ab.createElement("div"));this.vScrollbar().setStyleProperty("position","absolute");this.vScrollbar().setStyleProperty("width",this.model().scrollbarSpan()+"px");this.vScrollbar().setStyleProperty("height",this.model().minScrollbarSize()+"px");this.vScrollbar().setStyleProperty("background-color",this.model().scrollbarBrush().__fill);this.vScrollbar().setStyleProperty("display","none");this.vScrollbar().setStyleProperty("border-radius","5px");this.vScrollbar().setStyleProperty("z-index","10000");this.vScrollbar().setStyleProperty("right","0px");this.rootContainer().append(this.vScrollbar());this.updateScrollbarStatus(false);this._aa=this._af.getNativeElement();this._a=new $.ig.CanvasGestureDOMEventProxy(this._ab.rootWrapper(),this._ab,true);this._ab.rootWrapper().setProperty("tabIndex",1e3);this._ab.rootWrapper().setRawStyleProperty("outline","none");this._a._c7=true;this._a._bu=true;var d=this._a;d.onMouseWheel=$.ig.Delegate.prototype.combine(d.onMouseWheel,this.l.runOn(this));var e=this._a;e.onMouseWheelHorizontal=$.ig.Delegate.prototype.combine(e.onMouseWheelHorizontal,this.m.runOn(this));var f=this._a;f.onMouseLeave=$.ig.Delegate.prototype.combine(f.onMouseLeave,this.an.runOn(this));var g=this._a;g.onDragStarted=$.ig.Delegate.prototype.combine(g.onDragStarted,this.am.runOn(this));var h=this._a;h.onDragDelta=$.ig.Delegate.prototype.combine(h.onDragDelta,this.al.runOn(this));var i=this._a;i.onDragCompleted=$.ig.Delegate.prototype.combine(i.onDragCompleted,this.ak.runOn(this));var j=this._a;j.onFlingStarted=$.ig.Delegate.prototype.combine(j.onFlingStarted,this.j.runOn(this));var k=this._a;k.onContactStarted=$.ig.Delegate.prototype.combine(k.onContactStarted,this.aj.runOn(this));var l=this._a;l.onContactMoved=$.ig.Delegate.prototype.combine(l.onContactMoved,this.ai.runOn(this));var m=this._a;m.onContactCompleted=$.ig.Delegate.prototype.combine(m.onContactCompleted,this.ah.runOn(this));this._a._ab=true;this._a._ap=this.r.runOn(this);var n=this._a;n.onKeyDown=$.ig.Delegate.prototype.combine(n.onKeyDown,this.k.runOn(this));this._a._aq=function(o){var e_=o.originalEvent;var p=e_.type;if(p=="pointerdown"&&!$self._a.bq(o)){return false}return true};this.model().di(b,c,false);this.model().horizontalAnimation().provideRenderer(this._ab);this.model().verticalAnimation().provideRenderer(this._ab);this.attachNativeScroll()},k:function(a){return this.model().ao(a,(this._a._bh&4)!=0,(this._a._bh&2)!=0)},r:function(a,b,c){if(this.f||this.g){return true}if(c||b){return true}if(this.n(a,b)){this.model().c3();return true}else if(this.model().isHorizontalActive()){this.model().c7()}if(this.o(a,b)){this.model().c4();return true}else if(this.model().isVerticalActive()){this.model().c8()}return false},ah:function(a,b){this.f=false;this.g=false;this.model().isDraggingVBar(false);this.model().isDraggingHBar(false)},ai:function(a,b){if(this.g){var c=a.__y-this.v;this.v=a.__y;this.model().dh(c)}else if(this.f){var d=a.__x-this.s;this.s=a.__x;this.model().df(d)}},aj:function(a,b){this.e=false;this.cancelInertia();var c=this.q(a,b);var d=this.p(a,b);if(c){this.model().isDraggingVBar(true);this.g=true;this.v=a.__y;this.focus()}else if(d){this.model().isDraggingHBar(true);this.f=true;this.s=a.__x;this.focus()}},p:function(a,b){if(!this.h){return false}if(a.__y>=this.model().viewportHeight()-this.model().scrollbarSpan()&&a.__y<=this.model().viewportHeight()&&a.__x>=this.u-this.t/2&&a.__x<=this.u+this.t/2){return true}return false},q:function(a,b){if(!this.i){return false}if(a.__x>=this.model().viewportWidth()-this.model().scrollbarSpan()&&a.__x<=this.model().viewportWidth()&&a.__y>=this.x-this.w/2&&a.__y<=this.x+this.w/2){return true}return false},n:function(a,b){if(!this.h){return false}return a.__y>=this.model().viewportHeight()-this.model().scrollbarSpan()-40&&a.__y<=this.model().viewportHeight()},o:function(a,b){if(!this.i){return false}return a.__x>=this.model().viewportWidth()-this.model().scrollbarSpan()-40&&a.__x<=this.model().viewportWidth()},e:false,j:function(a,b,c){this.e=true;return true},onViewportHeightChanged:function(a){this._a._bk=new $$a.ae(0,0,0,this.model().viewportWidth(),this.model().viewportHeight())},onViewportWidthChanged:function(a){this._a._bk=new $$a.ae(0,0,0,this.model().viewportWidth(),this.model().viewportHeight())},onContentHeightChanged:function(a){if(this.contentContainer()!=null){this.contentContainer().setStyleProperty("height",a+"px")}},onContentWidthChanged:function(a){if(this.contentContainer()!=null){this.contentContainer().setStyleProperty("width",a+"px")}},cancelInertia:function(){},ak:function(a){if(this.f||this.g){return}this.e=false;this.model().dc(a)},al:function(a){if(this.f||this.g){return}this.model().dd(a)},updateScrollTop:function(a){this._aa.scrollTop=$.ig.truncate(a)},am:function(a){if(this.f||this.g){return}this.e=false;this.model().de(a)},getInitialScrollLeft:function(){return this._aa.scrollLeft},getInitialScrollTop:function(){return this._aa.scrollTop},l:function(a,b){this.e=false;this.cancelInertia();return this.model().aq(a,0,b)},m:function(a,b){this.e=false;this.cancelInertia();return this.model().aq(a,b,0)},an:function(a){if(this.model().horizontalScrollbarStatus()>0){this.model().c7()}if(this.model().verticalScrollbarStatus()>0){this.model().c8()}},updateScrollLeft:function(a){this._aa.scrollLeft=$.ig.truncate(a)},provideContent:function(a){this.contentContainer(a);this._af.append(this.contentContainer())},d:null,requestWork:function(a){if(this._ab==null){return}if(this.d==null){this.d=this._ab.getRequestAnimationFrame()}if(this.e){a()}else{this.d(function(){a()})}},i:false,h:false,w:0,t:0,x:0,u:0,g:false,f:false,v:0,s:0,hideVScrollbar:function(){if(this.i){this.i=false;this.vScrollbar().setStyleProperty("display","none")}},hideHScrollbar:function(){if(this.h){this.h=false;this.hScrollbar().setStyleProperty("display","none")}},updateVScrollbar:function(a,b){var c=false;if(!this.i){c=true;this.i=true;this.vScrollbar().setStyleProperty("display","block")}if(a!=this.x||c){this.x=a;if(this.i){this.vScrollbar().setRawYPosition(a-b/2)}}if(b!=this.w||c){this.w=b;if(this.i){this.vScrollbar().setRawSize(this.z(),b)}}},updateHScrollbar:function(a,b){var c=false;if(!this.h){c=true;this.h=true;this.hScrollbar().setStyleProperty("display","block")}if(a!=this.u||c){this.u=a;if(this.h){this.hScrollbar().setRawXPosition(a-b/2)}}if(b!=this.t||c){this.t=b;if(this.h){this.hScrollbar().setRawSize(b,this.y())}}},updateScrollbarStatus:function(a){if(this.hScrollbar()!=null&&this.vScrollbar()!=null){switch(this.model().scrollbarStyle()){case 0:if(a){this.hScrollbar().setStyleProperty("opacity","1");this.vScrollbar().setStyleProperty("opacity","1");this.hScrollbar().setRawSize(this.t,this.y());this.vScrollbar().setRawSize(this.z(),this.w)}break;case 1:if(a){this.hScrollbar().setRawSize(this.t,this.y());this.vScrollbar().setRawSize(this.z(),this.w)}this.hScrollbar().setStyleProperty("opacity",this.model().horizontalScrollbarStatus().toString());this.vScrollbar().setStyleProperty("opacity",this.model().verticalScrollbarStatus().toString());break;case 2:if(a){this.hScrollbar().setStyleProperty("opacity","1");this.vScrollbar().setStyleProperty("opacity","1")}this.hScrollbar().setRawSize(this.t,this.y());this.vScrollbar().setRawSize(this.z(),this.w);break}}},y:function(){if(this.model().scrollbarStyle()==2){return this.model().horizontalScrollbarStatus()*(this.model().scrollbarSpan()-2)+2}return this.model().scrollbarSpan()},z:function(){if(this.model().scrollbarStyle()==2){return this.model().verticalScrollbarStatus()*(this.model().scrollbarSpan()-2)+2}return this.model().scrollbarSpan()},focus:function(){this._ab.rootWrapper().focus(true)},onDetachedFromUI:function(){if(this._a!=null){this._a.bg(this._ab.rootWrapper(),"")}},onAttachedToUI:function(){if(this._a!=null){this._a.as(this._ab.rootWrapper(),"")}},attachNativeScroll:function(){var a=this._af.getNativeElement();a.addEventListener("scroll",runOn(this,this.onNativeScroll))},detachNativeScroll:function(){var a=this._af.getNativeElement();a.removeEventListener("scroll",runOn(this,this.onNativeScroll))},onNativeScroll:function(a){},$type:new $.ig.Type("ScrollerView",$.ig.$ot,[$$t.$f.$type])},true);$c("Scroller:c","Object",{init:function(){this.bh=49;this.a9=NaN;this.a3=49;this.a1=NaN;this.bg=48;this.a8=NaN;this.a2=48;this.a0=NaN;this.a6=0;this.ba=20;this.bd=8;this.bj=0;this.dx=null;this.x=false;this.a5=0;this.bl=0;this.bk=0;this.bf=0;this.be=0;this.c=null;this.v=true;this.a4=0;this.az=0;this.e=0;this.a7=0;this.bi=0;this.s=false;this.q=false;this.r=false;this.p=false;this.bb=0;this.bc=0;this.w=false;this.ay=new $$4.x($$0.$aq.$type,0);this.cb=500;this.o=false;this.z=false;this.n=false;this.y=false;this.t=true;this.u=true;$.ig.$op.init.call(this);this.dx=this.view().getDefaultScrollbarBrush();this.j=new $.ig.DoubleAnimator(0,1,400);this.k=new $.ig.DoubleAnimator(0,1,400);this.j.easingFunction($.ig.EasingFunctions.prototype.cubicEase);this.k.easingFunction($.ig.EasingFunctions.prototype.cubicEase);var a=this.j;a.propertyChanged=$.ig.Delegate.prototype.combine(a.propertyChanged,this.c1.runOn(this));var b=this.k;b.propertyChanged=$.ig.Delegate.prototype.combine(b.propertyChanged,this.c2.runOn(this))},bh:0,smallVerticalChange:function(a){if(arguments.length===1){var b=this.bh;this.bh=a;if(b!=this.bh){this.dg("SmallVerticalChange",b,this.bh)}return a}else{return this.bh}},_keyboardListener:null,keyboardListener:function(a){if(arguments.length===1){this._keyboardListener=a;return a}else{return this._keyboardListener}},a9:0,largeVerticalChange:function(a){if(arguments.length===1){var b=this.a9;this.a9=a;if(b!=this.a9){this.dg("LargeVerticalChange",b,this.a9)}return a}else{return this.a9}},a3:0,bq:function(a){if(arguments.length===1){var b=this.a3;this.a3=a;if(b!=this.a3){this.dg("ActualSmallVerticalChange",b,this.a3)}return a}else{return this.a3}},a1:0,bo:function(a){if(arguments.length===1){var b=this.a1;this.a1=a;if(b!=this.a1){this.dg("ActualLargeVerticalChange",b,this.a1)}return a}else{return this.a1}},bg:0,smallHorizontalChange:function(a){if(arguments.length===1){var b=this.bg;this.bg=a;if(b!=this.bg){this.dg("SmallHorizontalChange",b,this.bg)}return a}else{return this.bg}},a8:0,largeHorizontalChange:function(a){if(arguments.length===1){var b=this.a8;this.a8=a;if(b!=this.a8){this.dg("LargeHorizontalChange",b,this.a8)}return a}else{return this.a8}},a2:0,bp:function(a){if(arguments.length===1){var b=this.a2;this.a2=a;if(b!=this.a2){this.dg("ActualSmallHorizontalChange",b,this.a2)}return a}else{return this.a2}},a0:0,bn:function(a){if(arguments.length===1){var b=this.a0;this.a0=a;if(b!=this.a0){this.dg("ActualLargeHorizontalChange",b,this.a0)}return a}else{return this.a0}},a6:0,contentWidth:function(a){if(arguments.length===1){var b=this.a6;this.a6=a;if(b!=this.a6){this.dg("ContentWidth",b,this.a6)}return a}else{return this.a6}},ba:0,minScrollbarSize:function(a){if(arguments.length===1){var b=this.ba;this.ba=a;if(b!=this.ba){this.dg("MinScrollbarSize",b,this.ba)}return a}else{return this.ba}},bd:0,scrollbarSpan:function(a){if(arguments.length===1){var b=this.bd;this.bd=a;if(b!=this.bd){this.dg("ScrollbarSpan",b,this.bd)}return a}else{return this.bd}},ao:function(a,b,c){switch(a){case 11:return this.ar(b,c);case 10:return this.as(b,c);case 17:return this.ah(b,c);case 15:return this.aw(b,c);case 14:return this.ap(b,c);case 16:return this.at(b,c);case 13:return this.am(b,c);case 12:return this.ai(b,c);case 2:return this.av(b,c);case 3:return this.aj(b,c);case 8:return this.ak();case 57:return this.al();case 9:return this.au(b,c);default:return this.an(a,b,c)}return false},au:function(a,b){if(this.keyboardListener()!=null){if(this.keyboardListener().onSpace(a,b)){return true}}return false},al:function(){if(this.keyboardListener()!=null){if(this.keyboardListener().onF2()){return true}}return false},ak:function(){if(this.keyboardListener()!=null){if(this.keyboardListener().onEscape()){return true}}return false},av:function(a,b){if(this.keyboardListener()!=null){if(this.keyboardListener().onTab(a,b)){return true}}return false},ai:function(a,b){if(this.keyboardListener()!=null){if(this.keyboardListener().onEnd(a,b)){return true}}return false},am:function(a,b){if(this.keyboardListener()!=null){if(this.keyboardListener().onHome(a,b)){return true}}return false},at:function(a,b){if(this.keyboardListener()!=null){if(this.keyboardListener().onRightArrow(a,b)){return true}}if(this.scrollLeft()+this.viewportWidth()>=this.contentWidth()){return false}this.dn(this.bp(),0);return true},ap:function(a,b){if(this.keyboardListener()!=null){if(this.keyboardListener().onLeftArrow(a,b)){return true}}if(this.scrollLeft()<=0){return false}this.dn(this.bp()*-1,0);return true},aw:function(a,b){if(this.keyboardListener()!=null){if(this.keyboardListener().onUpArrow(a,b)){return true}}if(this.scrollTop()<=0){return false}this.dn(0,this.bq()*-1);return true},ah:function(a,b){if(this.keyboardListener()!=null){if(this.keyboardListener().onDownArrow(a,b)){return true}}if(this.scrollTop()+this.viewportHeight()>=this.contentHeight()){return false}this.dn(0,this.bq());return true},as:function(a,b){if(this.keyboardListener()!=null){if(this.keyboardListener().onPageUp(a,b)){return true}}if(this.scrollTop()<0){return false}this.dn(0,this.bo()*-1);return true},ar:function(a,b){if(this.keyboardListener()!=null){if(this.keyboardListener().onPageDown(a,b)){return true}}if(this.scrollTop()+this.viewportHeight()>=this.contentHeight()){return false}this.dn(0,this.bo());return true},aj:function(a,b){if(this.keyboardListener()!=null){if(this.keyboardListener().onEnter(a,b)){return true}}return false},an:function(a,b,c){if(this.keyboardListener()!=null){return this.keyboardListener().onKeyDown(a,b,c)}return false},bj:0,verticalTrackStartInset:function(a){if(arguments.length===1){var b=this.bj;this.bj=a;if(b!=this.bj){this.dg("VerticalTrackStartInset",b,this.bj)}return a}else{return this.bj}},dx:null,scrollbarBrush:function(a){if(arguments.length===1){var b=this.dx;this.dx=a;if(b!=this.dx){this.dg("ScrollbarBrush",b,this.dx)}return a}else{return this.dx}},dg:function(a,b,c){if(this.propertyChanged!=null){this.propertyChanged(this,new $$0.b7(a))}this.dj(a,b,c)},x:false,ax:function(a){if(arguments.length===1){this.x=a;if(!this.x){this.view().updateScrollTop(this.scrollTop());this.view().updateScrollLeft(this.scrollLeft())}return a}else{return this.x}},dj:function(a,b,c){switch(a){case"ContentWidth":this.view().onContentWidthChanged(this.contentWidth());var d=c;var e=b;if(d<e&&this.scrollLeft()+this.viewportWidth()>=d){this.dp(d-(this.scrollLeft()+this.viewportWidth()),0)}this.du();break;case"ContentHeight":this.view().onContentHeightChanged(this.contentHeight());var f=c;var g=b;if(f<g&&this.scrollTop()>0&&this.scrollTop()+this.viewportHeight()>=f){this.dp(0,f-(this.scrollTop()+this.viewportHeight()))}this.dw();break;case"ScrollTop":if(!this.ax()){this.view().updateScrollTop(this.scrollTop())}break;case"ScrollLeft":if(!this.ax()){this.view().updateScrollLeft(this.scrollLeft())}break;case"ViewportWidth":this.view().onViewportWidthChanged(this.viewportWidth());if($.ig.util.isNaN(this.largeVerticalChange())){this.bn(this.viewportWidth())}if(this.contentWidth()>0&&this.scrollLeft()+this.viewportWidth()>this.contentWidth()){this.dp(this.contentWidth()-this.viewportWidth()-this.scrollLeft(),0)}this.du();if(this.view().getInitialScrollLeft()!=this.scrollLeft()){this.view().updateScrollLeft(this.scrollLeft())}break;case"ViewportHeight":this.view().onViewportHeightChanged(this.viewportHeight());if($.ig.util.isNaN(this.largeVerticalChange())){this.bo(this.viewportHeight())}this.dw();if(this.view().getInitialScrollTop()!=this.scrollTop()){this.view().updateScrollTop(this.scrollTop())}break;case"ScrollbarBrush":case"ScrollbarSpan":case"MinScrollbarSize":case"VerticalTrackStartInset":this.dw();this.du();break;case"HorizontalScrollbarStatus":case"VerticalOpacity":this.view().updateScrollbarStatus(false);break;case"ScrollbarStyle":this.view().updateScrollbarStatus(true);break}},a5:0,contentHeight:function(a){if(arguments.length===1){var b=this.a5;this.a5=a;if(b!=this.a5){this.dg("ContentHeight",b,this.a5)}return a}else{return this.a5}},dh:function(a){var b=Math.max(this.minScrollbarSize(),this.actualVerticalScrollbarHeight());var c=this.verticalTrackStartInset()+b/2;var d=this.viewportHeight()-b/2;var e=a/(d-c);var f=e*(this.contentHeight()-this.viewportHeight());this.dn(0,f)},df:function(a){var b=Math.max(this.minScrollbarSize(),this.actualHorizontalScrollbarWidth());var c=0+b/2;var d=this.viewportWidth()-b/2;var e=a/(d-c);var f=e*(this.contentWidth()-this.viewportWidth());this.dn(f,0)},di:function(a,b,c){var d=this.bl;var e=this.bk;this.bl=a;this.bk=b;if(c&&(d!=a||e!=b)){this.dg("ViewportWidth",d,a);this.dg("ViewportHeight",e,b)}},bl:0,viewportWidth:function(a){if(arguments.length===1){var b=this.bl;this.bl=a;if(b!=this.bl){this.dg("ViewportWidth",b,this.bl)}return a}else{return this.bl}},bk:0,viewportHeight:function(a){if(arguments.length===1){var b=this.bk;this.bk=a;if(b!=this.bk){this.dg("ViewportHeight",b,this.bk)}return a}else{return this.bk}},bf:0,scrollTop:function(a){if(arguments.length===1){var b=this.bf;this.bf=a;if(b!=this.bf){this.dg("ScrollTop",b,this.bf)}return a}else{return this.bf}},be:0,scrollLeft:function(a){if(arguments.length===1){var b=this.be;this.be=a;if(b!=this.be){this.dg("ScrollLeft",b,this.be)}return a}else{return this.be}},c:null,view:function(a){if(arguments.length===1){this.c=a;return a}else{if(this.c==null){this.c=new $$t.a(this)}return this.c}},provideContainer:function(a){this.view().provideContainer(a);this.bf=this.view().getInitialScrollTop();this.be=this.view().getInitialScrollLeft();this.du();this.dw()},onDetachedFromUI:function(){this.view().onDetachedFromUI()},onAttachedToUI:function(){this.view().onAttachedToUI()},provideContent:function(a){this.view().provideContent(a)},aq:function(a,b,c){this.r=false;this.q=false;this.s=false;this.view().cancelInertia();if(this.keyboardListener()!=null){this.keyboardListener().onWheel()}this.dn(b,c);return true},v:false,lockScrollDirection:function(a){if(arguments.length===1){this.v=true;return a}else{return this.v}},_aa:false,a4:0,actualVerticalScrollbarHeight:function(a){if(arguments.length===1){var b=this.a4;this.a4=a;if(b!=this.a4){this.dg("ActualVerticalScrollbarHeight",b,this.a4)}return a}else{return this.a4}},az:0,actualHorizontalScrollbarWidth:function(a){if(arguments.length===1){var b=this.az;this.az=a;if(b!=this.az){this.dg("ActualHorizontalScrollbarWidth",b,this.az)}return a}else{return this.az}},e:0,scrollbarStyle:function(a){if(arguments.length===1){var b=this.e;this.e=a;if(b!=this.e){this.dg("ScrollbarStyle",$$t.$b.getBox(b),$$t.$b.getBox(this.e))}return a}else{return this.e}},a7:0,horizontalScrollbarStatus:function(a){if(arguments.length===1){var b=this.a7;this.a7=a;if(b!=this.a7){this.dg("HorizontalScrollbarStatus",b,this.a7)}return a}else{return this.a7}},bi:0,verticalScrollbarStatus:function(a){if(arguments.length===1){var b=this.bi;this.bi=a;if(b!=this.bi){this.dg("VerticalOpacity",b,this.bi)}return a}else{return this.bi}},j:null,horizontalAnimation:function(){return this.j},k:null,verticalAnimation:function(){return this.k},_bu:0,_b5:0,_bv:0,_b6:0,_executionContext:null,executionContext:function(a){if(arguments.length===1){this._executionContext=a;return a}else{return this._executionContext}},isVerticalActive:function(){return this.y},isHorizontalActive:function(){return this.n},_isDraggingVBar:false,isDraggingVBar:function(a){if(arguments.length===1){this._isDraggingVBar=a;return a}else{return this._isDraggingVBar}},_isDraggingHBar:false,isDraggingHBar:function(a){if(arguments.length===1){this._isDraggingHBar=a;return a}else{return this._isDraggingHBar}},s:false,q:false,r:false,dz:null,p:false,propertyChanged:null,focus:function(){this.view().focus()},de:function(a){this.view().focus();this.s=false;this.q=false;this.r=false;this.p=true;this.dz={__x:a.__x,__y:a.__y,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName}},dd:function(a){if(this.p){var b=a.__y-this.dz.__y;var c=a.__x-this.dz.__x;if(this.lockScrollDirection()&&!this.r){this.r=true;if(b>0||c>0){if(b>c){this.s=true}else{this.s=true}}}this.dz={__x:a.__x,__y:a.__y,$type:$$a.$y.$type,getType:$.ig.$op.getType,getGetHashCode:$.ig.$op.getGetHashCode,typeName:$.ig.$op.typeName};this.dn(-c,-b)}},onScrolling:null,onScrollStart:null,onScrollStop:null,_isScrolling:false,isScrolling:function(a){if(arguments.length===1){this._isScrolling=a;return a}else{return this._isScrolling}},scrollTo:function(a,b){this.view().detachNativeScroll();this.bb=a-this.scrollLeft();this.bc=b-this.scrollTop();this.dm()},bb:0,bc:0,dn:function(a,b){this.view().detachNativeScroll();this.bb+=a;this.bc+=b;this.dm()},dp:function(a,b){this.view().detachNativeScroll();this.bb+=a;this.bc+=b;this.dt()},w:false,dm:function(){if(this.w){return}this.w=true;this.view().requestWork(this.dt.runOn(this))},ay:null,dt:function(){var $self=this;this.w=false;var a=this.bb;var b=this.bc;this.bb=0;this.bc=0;if(this.r){if(this.s){a=0}if(this.q){b=0}}if(a!=0){this.t=false;this.c3();this.c7();this.t=true}if(b!=0){this.u=false;this.c4();this.c8();this.u=true}var c=Math.round(this.scrollTop()+b);var d=Math.round(this.scrollLeft()+a);if(c<0){c=0;this.view().cancelInertia()}if(d<0){d=0;this.view().cancelInertia()}if(c+this.viewportHeight()>this.contentHeight()){c=this.contentHeight()-this.viewportHeight();if(c<0){c=0}this.view().cancelInertia()}if(d+this.viewportWidth()>this.contentWidth()){d=this.contentWidth()-this.viewportWidth();if(d<0){d=0}this.view().cancelInertia()}b=c-this.scrollTop();a=d-this.scrollLeft();if(b!=0||a!=0){try{this.ax(true);this._aa=true;this.scrollTop(c);this.scrollLeft(d);this.dw();this.du();this._aa=false;if(!this.isScrolling()){this.isScrolling(true);if(this.onScrollStart!=null){this.onScrollStart(this,function(){var $ret=new $$t.e;$ret.deltaX(a);$ret.deltaY(b);return $ret}())}}if(this.onScrolling!=null){this.onScrolling(this,function(){var $ret=new $$t.e;$ret.deltaX(a);$ret.deltaY(b);return $ret}())}if(this.ay.count()>0){this.ay.__inner[this.ay.count()-1]=false}this.ay.add(true);this.executionContext().executeDelayed(function(){if($self.ay.__inner[0]){if($self.onScrollStop!=null){$self.onScrollStop($self,function(){var $ret=new $$t.e;$ret.deltaX(a);$ret.deltaY(b);return $ret}())}$self.isScrolling(false);$self.view().attachNativeScroll()}$self.ay.removeAt(0)},50)}finally{this.ax(false)}}},dw:function(){this.dv(this.contentHeight(),this.viewportHeight(),this.scrollTop(),true)},du:function(){this.dv(this.contentWidth(),this.viewportWidth(),this.scrollLeft(),false)},dv:function(a,b,c,d){var e=Math.round(b/a*b);var f=d?this.verticalTrackStartInset():0;e=e-f;if(e<this.minScrollbarSize()){e=this.minScrollbarSize()}if(e>=b-f){if(d){this.view().hideVScrollbar()}else{this.view().hideHScrollbar()}return}var g=f+e/2;var h=b-e/2;var i=c/(a-b);var j=Math.round(g+(h-g)*i);if(d){this.actualVerticalScrollbarHeight(e);this.view().updateVScrollbar(j,e)}else{this.actualHorizontalScrollbarWidth(e);this.view().updateHScrollbar(j,e)}},dc:function(a){this.r=false;this.q=false;this.s=false;this.p=false},c1:function(a,b){this.horizontalScrollbarStatus(this._bu+this.j.transitionProgress()*(this._b5-this._bu))},c2:function(a,b){this.verticalScrollbarStatus(this._bv+this.k.transitionProgress()*(this._b6-this._bv))},c3:function(){if(this.n){return}if(this.scrollbarStyle()==1||this.scrollbarStyle()==2){if(this.j.animationActive()){this.j.stop()}this.horizontalScrollbarStatus(1);if(this.o&&this.t){this.o=false}}this.n=true},c4:function(){if(this.y){return}if(this.scrollbarStyle()==1||this.scrollbarStyle()==2){if(this.k.animationActive()){this.k.stop()}this.verticalScrollbarStatus(1);if(this.z&&this.u){this.z=false}}this.y=true},c7:function(){if(!this.n||this.isDraggingHBar()){return}if(this.scrollbarStyle()==1||this.scrollbarStyle()==2){this.dr()}this.n=false},c8:function(){if(!this.y||this.isDraggingVBar()){return}if(this.scrollbarStyle()==1||this.scrollbarStyle()==2){this.ds()}this.y=false},cb:0,cc:0,cd:0,o:false,z:false,n:false,y:false,t:false,u:false,dr:function(){if(!this.o){this.o=true;this.cc=this.executionContext().getCurrentRelativeTime();this.executionContext().executeDelayed(this.c5.runOn(this),this.cb)}else{this.cc=this.executionContext().getCurrentRelativeTime()}},ds:function(){if(!this.z){this.z=true;this.cd=this.executionContext().getCurrentRelativeTime();this.executionContext().executeDelayed(this.c6.runOn(this),this.cb)}else{this.cd=this.executionContext().getCurrentRelativeTime()}},c5:function(){if(!this.o){return}var a=this.executionContext().getCurrentRelativeTime();if(a-this.cc>=this.cb){if(!this.j.animationActive()&&this.horizontalScrollbarStatus()!=0){this._bu=this.horizontalScrollbarStatus();this._b5=0;this.j.start()}this.o=false}else{this.executionContext().executeDelayed(this.c5.runOn(this),this.cb-(a-this.cc))}},c6:function(){if(!this.z){return}var a=this.executionContext().getCurrentRelativeTime();if(a-this.cd>=this.cb){if(!this.k.animationActive()&&this.verticalScrollbarStatus()!=0){this._bv=this.verticalScrollbarStatus();this._b6=0;this.k.start()}this.z=false}else{this.executionContext().executeDelayed(this.c6.runOn(this),this.cb-(a-this.cd))}},$type:new $.ig.Type("Scroller",$.ig.$ot,[$$0.$b6.$type])},true);$c("ScrollerScrollingEventArgs:e","EventArgs",{init:function(){$$0.$w.init.call(this)},_deltaX:0,deltaX:function(a){if(arguments.length===1){this._deltaX=a;return a}else{return this._deltaX}},_deltaY:0,deltaY:function(a){if(arguments.length===1){this._deltaY=a;return a}else{return this._deltaY}},$type:new $.ig.Type("ScrollerScrollingEventArgs",$$0.$w.$type)},true);$c("IScrollerKeyboardListener:g","Object",{$type:new $.ig.Type("IScrollerKeyboardListener",null)},true)});