text: /**
   * Copyright (c) 2014, 2016, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   */
  "use strict";
  define(['./DvtToolkit'], function(dvt) {
    // Internal use only.  All APIs and functionality are subject to change at any time.
  
  !function(t){t.ComboBox=function(t,n,e){this.Init(t,n,e)},t.Obj.createSubclass(t.ComboBox,t.Container),t.ComboBox._HIDE_DROPDOWN_DELAY=100,t.ComboBox._DROPDOWN_OUTOFFOCUS_CHECK=100,t.ComboBox.prototype.Init=function(n,e,o){t.ComboBox.superclass.Init.call(this,n,null,e),this._styleMap=o,this._itemButtonStates=[],this._items=[],this._tooltips=[],this._selectedIndex=0,this._bStaticButtonStates=!1,this._bRemoveDropdown=!1,this._maxItemDim=new t.Rectangle(0,0,0,0),this._itemDim=new t.Rectangle(0,0,0,0),this._tooltipManager=n.getTooltipManager(),this._isTouchDevice=t.Agent.isTouchDevice(),this._button=this.createButton(e+"_cl"),this.addChild(this._button),this._contentArea=new t.Container(n),this._contentArea.setMouseEnabled(!1),this.addChild(this._contentArea),this._hideDropdownTimer=new t.Timer(n,t.ComboBox._HIDE_DROPDOWN_DELAY,this.HandleHideDropdownTimer,this,1),this._outOfFocusCheckTimer=new t.Timer(n,t.ComboBox._DROPDOWN_OUTOFFOCUS_CHECK,this.HandleOutOfFocusCheckTimer,this,1),this._dropdownItemClickEvent=!1},t.ComboBox.prototype._stopHideDropdownTimer=function(){this._hideDropdownTimer&&(this._hideDropdownTimer.stop(),this._hideDropdownTimer=null)},t.ComboBox.prototype.getSelectedIndex=function(){return this._selectedIndex},t.ComboBox.prototype.setSelectedIndex=function(t){this._selectedIndex=t,this._bStaticButtonStates||this.UpdateContentArea(),this.FireChangeEvent(t)},t.ComboBox.prototype.createButton=function(n){var e=new t.Button(this.getCtx(),this.createUpState(n),this.createDownState(n),this.createOverState(n),null,n);return e.setCallback(this.HandleExpandClick,this),this._isTouchDevice||e.addEvtListener(t.MouseEvent.MOUSEDOWN,this.HandleButtonDown,!1,this),e.setToggleEnabled(!0),e},t.ComboBox.prototype.createUpState=function(n){var e=this.getCtx(),o=new t.Rect(e,0,0,this._itemDim.w,this._itemDim.h,n+"_up");return o.setCornerRadius(t.ButtonLAFUtils.ROUND_RECT_ELLIPSE),o.setInvisibleFill(),o.addChild(t.ComboBox.DrawArrow(e,o.getWidth(),o.getHeight())),o},t.ComboBox.prototype.createOverState=function(n){var e=this.getCtx(),o=new t.Rect(e,0,0,this._itemDim.w,this._itemDim.h,n+"_up");return o.setCornerRadius(t.ButtonLAFUtils.ROUND_RECT_ELLIPSE),o.setSolidStroke(t.ButtonLAFUtils.BORDER_COLOR),o.setFill(new t.LinearGradientFill(0,[t.ButtonLAFUtils.GRADIENT_DARK,t.ButtonLAFUtils.GRADIENT_LIGHT])),o.addChild(t.ComboBox.DrawArrow(e,o.getWidth(),o.getHeight())),o},t.ComboBox.prototype.createDownState=function(n){var e=this.getCtx(),o=new t.Rect(e,0,0,this._itemDim.w,this._itemDim.h,n+"_up");return o.setSolidStroke(t.ButtonLAFUtils.BORDER_COLOR),o.setFill(new t.LinearGradientFill(0,[t.ButtonLAFUtils.GRADIENT_LIGHT,t.ButtonLAFUtils.GRADIENT_DARK])),o.setCornerRadius(t.ButtonLAFUtils.ROUND_RECT_ELLIPSE),o.addChild(t.ComboBox.DrawArrow(e,o.getWidth(),o.getHeight())),o},t.ComboBox.prototype.setStaticButtonStates=function(t,n,e){this._button.setUpState(t),this._button.setDownState(e),this._button.setOverState(n),this._bStaticButtonStates=!0},t.ComboBox.prototype.addItem=function(n,e,o,a,i){n.setMouseEnabled(!1),this._items.push(n),this._tooltips.push(e);var s=t.ButtonLAFUtils._getDimForced(this.getCtx(),o||n),l=this._getMaxItemDim();this.getCtx();s.w>l.w&&(l.w=s.w,this._itemDim.w=s.w+16),s.h>l.h&&(l.h=s.h,this._itemDim.h=s.h),this._maxItemDim=l;var r=null;o&&a&&i&&((r=[])[t.Button.STATE_ENABLED]=o,r[t.Button.STATE_OVER]=a,r[t.Button.STATE_DOWN]=i),this._itemButtonStates.push(r),this._bStaticButtonStates||(this.removeChild(this._button),this._button=this.createButton(n.getId()),this.addChildAt(this._button,0),this.UpdateContentArea())},t.ComboBox.prototype.getItem=function(t){return this._items[t]},t.ComboBox.prototype.getItemCount=function(){return this._items.length},t.ComboBox.prototype.getItemIndex=function(t){for(var n=0;n<this.getItemCount();n++)if(this.getItem(n)===t)return n;return-1},t.ComboBox.prototype.getSelectedItem=function(){var t=this.getSelectedIndex();return t<0||t>this._items.length-1?null:this._items[t]},t.ComboBox.prototype.FireChangeEvent=function(n){var e=new t.ComboBoxEvent(t.ComboBoxEvent.SUBTYPE_ITEM_CHANGE,n);return this.FireListener(e),!0},t.ComboBox.prototype.HandleExpandClick=function(n){t.EventManager.consumeEvent(n),this._bRemoveDropdown&&this.RemoveDropdown();var e=this.getCtx();this._dropdown=this.createDropdown();var o=t.ButtonLAFUtils._getDimForced(e,this._dropdown);this.addChild(this._dropdown);var a,i=this._button.getDimensions();a=t.Agent.isRightToLeft(e)?-o.w+1*i.w/4:3*i.w/4,this._dropdown.setTranslate(a,3*i.h/4),this._button.setMouseEnabled(!1),this._button.setToggled(!0),this.FireListener(new t.ComboBoxEvent(t.ComboBoxEvent.SUBTYPE_SHOW_DROPDOWN));var s=e.getStage();s&&(this._isTouchDevice?s.addEvtListener(t.TouchEvent.TOUCHSTART,this.HandleStageMouseFocusChange,!0,this):s.addEvtListener(t.MouseEvent.MOUSEUP,this.HandleStageMouseFocusChange,!0,this))},t.ComboBox.prototype.HandleHideDropdownTimer=function(t){this.HideDropdown(),this._bStaticButtonStates||this.UpdateContentArea()},t.ComboBox.prototype.HandleStageMouseFocusChange=function(t){this._dropdownItemClickEvent=!1,this._outOfFocusCheckTimer.reset(),this._outOfFocusCheckTimer.start()},t.ComboBox.prototype.HandleOutOfFocusCheckTimer=function(t){this._dropdownItemClickEvent||(this._hideDropdownTimer.reset(),this._hideDropdownTimer.start())},t.ComboBox.prototype.createDropdown=function(){var n,e,o,a=this._styleMap?this._styleMap.comboBox:null,i=t.StyleUtils.getStyle(a,t.ControlPanel.CP_PADDING_TOP,0),s=t.StyleUtils.getStyle(a,t.ControlPanel.CP_PADDING_LEFT,0),l=t.StyleUtils.getStyle(a,t.ControlPanel.CP_PADDING_BOTTOM,0),r=t.StyleUtils.getStyle(a,t.ControlPanel.CP_PADDING_RIGHT,0),_=t.StyleUtils.getStyle(a,t.ControlPanel.CP_PADDING_INNER,0),h=i,u=this.getCtx(),p=new t.Container(u,"__dd"),C=this;function P(t){var n={HandleClick:function(t){C.HandleDropdownItemClick(t)},HandleMouseDown:function(t){C.HandleButtonDown(t)},getTooltip:function(){return t}};return n}for(var m=0;m<this._items.length;m++)o=this._items[m],n=t.ButtonLAFUtils._getDimForced(u,o),(e=new t.Container(u,"__it"+m)).setTranslate(s,h),e.addChild(o),o.setMouseEnabled(!0),o.setCursor(t.SelectionEffectUtils.getSelectingCursor()),h+=n.h+_,this._eventManager&&this._eventManager.associate(o,P(this._tooltips[m])),p.addChild(e);var c=t.ButtonLAFUtils.drawDropdownShape(u,this._getMaxItemDim().w+s+r,h+l-_,a);c.addChild(p);var E=t.StyleUtils.getStyle(this._styleMap,t.CSSStyle.BORDER_COLOR,null),d=t.StyleUtils.getStyle(this._styleMap,t.ControlPanel.FRAME_ROLLOUT_ALPHA,1),T=t.StyleUtils.getStyle(this._styleMap,t.CSSStyle.BACKGROUND_COLOR,null),A=t.StyleUtils.getStyle(this._styleMap,t.ControlPanel.BG_ALPHA,1);return c.setSolidStroke(E,d),T&&c.setSolidFill(T,A),c},t.ComboBox.prototype.HandleButtonDown=function(n){t.EventManager.consumeEvent()},t.ComboBox.prototype.HandleDropdownItemClick=function(n){this._dropdownItemClickEvent=!0,this._hideDropdownTimer.stop(),t.EventManager.consumeEvent(n);var e,o=t.ComboBox.getRootDropdownItemSprite(n.target);if(this._dropdown&&o){var a=this._dropdown.getChildAt(0);a&&(e=a.getChildIndex(o))}this.HideDropdown(),this.setSelectedIndex(e)},t.ComboBox.getRootDropdownItemSprite=function(n){for(var e,o;n;){if((o=n.getId())&&n instanceof t.Container&&"__it"==o.substr(0,4)){e=n;break}n=n.getParent()}return e},t.ComboBox.prototype.HideDropdown=function(){this._dropdown&&(this._dropdown.setVisible(!1),this._button.setToggled(!1),this.FireListener(new t.ComboBoxEvent(t.ComboBoxEvent.SUBTYPE_HIDE_DROPDOWN)),this._bRemoveDropdown=!0);var n=this.getCtx().getStage();n&&(this._isTouchDevice?n.removeEvtListener(t.TouchEvent.TOUCHSTART,this.HandleStageMouseFocusChange,!0,this):n.removeEvtListener(t.MouseEvent.MOUSEUP,this.HandleStageMouseFocusChange,!0,this)),this._button.setMouseEnabled(!0)},t.ComboBox.prototype.RemoveDropdown=function(){this._bRemoveDropdown=!1,this._dropdown&&(this._dropdown.setVisible(!1),this._dropdown.getParent().removeChild(this._dropdown),this._dropdown=null)},t.ComboBox.prototype._getMaxItemDim=function(){return this._maxItemDim},t.ComboBox.prototype.getDimensions=function(){return null!=this._button?this._button.getDimensions():new t.Rectangle(0,0,0,0)},t.ComboBox.prototype.getButton=function(){return this._button},t.ComboBox.prototype.getItems=function(){return this._items},t.ComboBox.prototype.UpdateContentArea=function(){var n=!0,e=this.getSelectedIndex();if(this._itemButtonStates&&this._itemButtonStates.length>e){var o=this._itemButtonStates[e];o&&o.length>2&&(this._button.setUpState(o[t.Button.STATE_ENABLED]),this._button.setOverState(o[t.Button.STATE_OVER]),this._button.setDownState(o[t.Button.STATE_DOWN]),n=!1)}n&&(this._contentArea.getNumChildren()>0&&this._contentArea.removeChildAt(0),this._contentArea.addChild(this.getSelectedItem()))},t.ComboBox.DrawArrow=function(n,e,o){var a=[];a.push(e-12,o/2-2),a.push(e-4,o/2-2),a.push(e-8,o/2+2),a.push(e-12,o/2-2);var i=new t.Polygon(n,a,null);return i.setSolidStroke(t.ButtonLAFUtils.BORDER_COLOR),i.setSolidFill(t.ButtonLAFUtils.BORDER_COLOR),i.setMouseEnabled(!1),i},t.ComboBox.prototype.closeDropdown=function(){this.HideDropdown()},t.ComboBox.prototype.setEventManager=function(t){this._eventManager=t};var n=function(t,n,e,o,a,i){this.Init(t,n,e,o,a,i)};t.Obj.createSubclass(n,t.Rect),n.prototype.Init=function(n,e,o,a,i,s){t.Rect.superclass.Init.call(this,n)},t.ComboBoxEvent=function(t,n){this.Init(t,n)},t.ComboBoxEvent.TYPE="comboBoxEvent",t.ComboBoxEvent.SUBTYPE_ITEM_CHANGE="cbItemChange",t.ComboBoxEvent.SUBTYPE_SHOW_DROPDOWN="cbShowDropdown",t.ComboBoxEvent.SUBTYPE_HIDE_DROPDOWN="cbHideDropdown",t.Obj.createSubclass(t.ComboBoxEvent,t.Obj),t.ComboBoxEvent.prototype.Init=function(n,e){this.type=t.ComboBoxEvent.TYPE,void 0===e&&(e=-1),this.subtype=n,this._index=e},t.ComboBoxEvent.prototype.getIndex=function(){return this._index};var e=function(t,n,e,o,a,i){this.Init(t,n,e,o,a,i)};e.PAN_TIMER_ACCELERATE_COUNT=1e3/(e.PAN_TIMER_INTERVAL=50)*2,t.Obj.createSubclass(e,t.Container),e.prototype.Init=function(n,o,a,i,s,l){e.superclass.Init.call(this,n),this._panTimer=new t.Timer(n,e.PAN_TIMER_INTERVAL,this.HandlePanTimer,this),this._tooltipManager=n.getTooltipManager(),this._bPanMouseDown=!1,this._panZoomCanvas=i,this._panCenter=new t.Point(20,20),this._controls=s||t.ControlPanel.CONTROLS_ALL,o.addChild(a),a&&(this._panCenterSprite=a,this._panCenterSprite.setVisible(!1),this._panCenterSprite.addEvtListener(t.TouchEvent.TOUCHSTART,this.HandlePanCenterClick,!1,this),t.Agent.isTouchDevice()||(this._panCenterSprite.addEvtListener(t.MouseEvent.CLICK,this.HandlePanCenterClick,!1,this),this._panCenterSprite.addEvtListener(t.MouseEvent.MOUSEDOWN,this.HandlePanCenterDown,!1,this),this._panCenterSprite.addEvtListener(t.MouseEvent.MOUSEUP,this.HandlePanCenterUp,!1,this),this._panCenterSprite.addEvtListener(t.MouseEvent.MOUSEOVER,this.HandlePanCenterRollOver,!1,this),this._panCenterSprite.addEvtListener(t.MouseEvent.MOUSEOUT,this.HandlePanCenterRollOut,!1,this)),this._panCenterSprite.addEvtListener(t.MouseEvent.MOUSEMOVE,this.HandlePanCenterMouseMove,!1,this)),this._panButton=o,this._panButton.addEvtListener(t.TouchEvent.TOUCHSTART,this.HandlePanClick,!1,this),t.Agent.isTouchDevice()||(this._panButton.addEvtListener(t.MouseEvent.CLICK,this.HandlePanClick,!1,this),this._panButton.addEvtListener(t.MouseEvent.MOUSEDOWN,this.HandlePanMouseDown,!1,this),this._panButton.addEvtListener(t.MouseEvent.MOUSEUP,this.HandlePanMouseUp,!1,this),this._panButton.addEvtListener(t.MouseEvent.MOUSEOVER,this.HandlePanRollOver,!1,this),this._panButton.addEvtListener(t.MouseEvent.MOUSEOUT,this.HandlePanRollOut,!1,this),this._panButton.addEvtListener(t.MouseEvent.MOUSEMOVE,this.HandlePanMouseMove,!1,this)),this._panControl=t.ButtonLAFUtils.createPanButtonBackground(n,l),this._panControl.addChild(this._panButton),this.addChild(this._panControl)},e.prototype.HandlePanClick=function(n){t.EventManager.consumeEvent(n)},e.prototype.HandlePanMouseDown=function(n){t.EventManager.consumeEvent(n),this._bPanMouseDown=!0,this._panCenterSprite&&this._panCenterSprite.setVisible(!1);var e=this._panZoomCanvas.GetRelativeMousePosition(n),o=this._panButton.stageToLocal(e);this._rotatePanControlDirectionalArrow(o.x,o.y,this._panButton.downState),this._panMousePoint=new t.Point(o.x,o.y),this._panTimer.start(),this._panTimerCount=0},e.prototype.HandlePanMouseUp=function(n){this._bPanMouseDown&&(t.EventManager.consumeEvent(n),this._bPanMouseDown=!1,this._panCenterSprite&&this._panCenterSprite.setVisible(!0),this._panTimer.stop()),this._panButton._mouseOutHandler(n),this._tooltipManager.hideTooltip()},e.prototype.HandlePanRollOver=function(n){this._panCenterSprite&&this._panCenterSprite.setVisible(!0),this._tooltipManager.showTooltip(n.pageX,n.pageY,t.Bundle.getTranslatedString(t.Bundle.SUBCOMPONENT_PREFIX,"CONTROL_PANEL_PAN"),n.target)},e.prototype.HandlePanRollOut=function(t){this.HandlePanMouseUp(t),this._panCenterSprite&&this._panCenterSprite.setVisible(!1)},e.prototype.HandlePanMouseMove=function(n){t.EventManager.consumeEvent(n);var e=this._panZoomCanvas.GetRelativeMousePosition(n),o=this._panButton.stageToLocal(e);this._bPanMouseDown?(this._rotatePanControlDirectionalArrow(o.x,o.y,this._panButton.downState),this._panMousePoint=new t.Point(o.x,o.y)):this._rotatePanControlDirectionalArrow(o.x,o.y,this._panButton.overState)},e.prototype.HandlePanTimer=function(){if(this._bPanMouseDown){var t=this._panCenter.y-this._panMousePoint.y,n=this._panCenter.x-this._panMousePoint.x,o=Math.atan2(t,n),a=Math.cos(o),i=Math.sin(o),s=15;this._panTimerCount++,this._panTimerCount>e.PAN_TIMER_ACCELERATE_COUNT&&(s*=3),this._panZoomCanvas.panBy(s*a,s*i)}},e.prototype.HandlePanCenterClick=function(n){t.EventManager.consumeEvent(n),this._panZoomCanvas.zoomAndCenter()},e.prototype.HandlePanCenterDown=function(n){t.EventManager.consumeEvent(n)},e.prototype.HandlePanCenterUp=function(n){t.EventManager.consumeEvent(n),this._tooltipManager.hideTooltip()},e.prototype.HandlePanCenterRollOver=function(n){this._tooltipManager.showTooltip(n.pageX,n.pageY,t.Bundle.getTranslatedString(t.Bundle.SUBCOMPONENT_PREFIX,"CONTROL_PANEL_ZOOMANDCENTER"),n.target),this._panCenterSprite.setVisible(!0),t.EventManager.consumeEvent(n)},e.prototype.HandlePanCenterRollOut=function(n){this._tooltipManager.hideTooltip(),t.EventManager.consumeEvent(n)},e.prototype.HandlePanCenterMouseMove=function(n){t.EventManager.consumeEvent(n)},e.prototype._rotatePanControlDirectionalArrow=function(t,n,e){var o=t-this._panCenter.x,a=n-this._panCenter.y,i=Math.atan2(a,o);e.setRotation(i-Math.PI/4)};var o=function(t){this.Init(o.TYPE),this._subtype=t};t.Obj.createSubclass(o,t.BaseComponentEvent),o.TYPE="dvtPZCPExpand",o.SUBTYPE_SHOW="show",o.SUBTYPE_HIDE="hide",o.prototype.getSubType=function(){return this._subtype},t.ControlPanel=function(t,n,e){this.Init(t,n,e)},t.Obj.createSubclass(t.ControlPanel,t.Container),t.ControlPanel.STATE_COLLAPSED=1,t.ControlPanel.STATE_EXPANDED=2,t.ControlPanel.CONTROLS_ALL=16777215,t.ControlPanel.CONTROLS_ZOOM_SLIDER=1,t.ControlPanel.CONTROLS_CENTER_BUTTON=16,t.ControlPanel.CONTROLS_ZOOM_TO_FIT_BUTTON=256,t.ControlPanel.CONTROLS_ZOOM=4097,t.ControlPanel.DEFAULT_ZOOM_LEVELS=[0,.25,.5,.75,1],t.ControlPanel.CONTROL_PANEL_BEHAVIOR_KEY="controlPanelBehavior",t.ControlPanel.BG_ALPHA="backgroundAlpha",t.ControlPanel.BG_ROLLOVER_ALPHA="backgroundHoverAlpha",t.ControlPanel.BG_DRAG_ALPHA="backgroundDragAlpha",t.ControlPanel.FRAME_ROLLOUT_ALPHA="borderAlpha",t.ControlPanel.FRAME_ROLLOVER_ALPHA="borderHoverAlpha",t.ControlPanel.FRAME_DRAG_ALPHA="borderDragAlpha",t.ControlPanel.CP_BUTTON_WIDTH="buttonWidth",t.ControlPanel.CP_BUTTON_HEIGHT="buttonHeight",t.ControlPanel.CP_OPEN_CLOSE_BUTTON_WIDTH="openCloseButtonWidth",t.ControlPanel.CP_TAB_SIZE="tabSize",t.ControlPanel.CP_PADDING_TOP="paddingTop",t.ControlPanel.CP_PADDING_SIDE="paddingSide",t.ControlPanel.CP_PADDING_BOTTOM="paddingBottom",t.ControlPanel.CP_PADDING_LEFT="paddingLeft",t.ControlPanel.CP_PADDING_RIGHT="paddingRight",t.ControlPanel.CP_PADDING_INNER="paddingInner",t.ControlPanel.CP_PANEL_DRAWER_STYLES="panelDrawerStyles",t.ControlPanel.CP_IMAGE_WIDTH="imageWidth",t.ControlPanel.CP_IMAGE_HEIGHT="imageHeight",t.ControlPanel.CP_CENTER_BUTTON_DISPLAYED="centerButtonDisplayed",t.ControlPanel.prototype.Init=function(n,e,o){t.ControlPanel.superclass.Init.call(this,n),this._bMouseDragPanning=!1,this._bMouseOver=!1,this._panZoomCanvas=e.getPanZoomCanvas(),this._controls=e.getDisplayedControls(),this._buttonImages=e.getResourcesMap(),this._tooltipManager=n.getTooltipManager(),this._styleMap=null,this._view=e,this._view&&(this._styleMap=this._view.getSubcomponentStyles(),this._styleMap[t.ControlPanel.CP_CENTER_BUTTON_DISPLAYED]||(this._controls=this._controls&~t.ControlPanel.CONTROLS_CENTER_BUTTON,this._view.setDisplayedControls(this._controls))),this._zoomLevels=t.ControlPanel.DEFAULT_ZOOM_LEVELS,this._bTransition=!1,this._bgAlpha=this._styleMap[t.ControlPanel.BG_ALPHA],this._eventManager=new i(n,null,e),this._eventManager.addRolloverType(t.ControlPanel),this._eventManager.addListeners(this),this._eventManager.associate(this,this),this._state=o,this.tabChildren=!1,this.setPixelHinting(!0)},t.ControlPanel.prototype.getState=function(){return this._state},t.ControlPanel.prototype.setZoomLevels=function(n){n||(n=t.ControlPanel.DEFAULT_ZOOM_LEVELS),this._zoomLevels=n},t.ControlPanel.prototype.getZoomLevels=function(){return this._zoomLevels},t.ControlPanel.prototype.mouseDragPanningStarted=function(){this._bMouseDragPanning=!0,this._background.setMouseEnabled(!1),this._frame.setMouseEnabled(!1),this._background.setAlpha(this._styleMap[t.ControlPanel.BG_DRAG_ALPHA]),this._frame.setAlpha(this._styleMap[t.ControlPanel.FRAME_DRAG_ALPHA])},t.ControlPanel.prototype.mouseDragPanningEnded=function(){this._bMouseDragPanning=!1,this._background.setMouseEnabled(!0),this._frame.setMouseEnabled(!0),this._bMouseOver?this.HandleRollOver(null):this.HandleRollOut(null)},t.ControlPanel.prototype.rotateControlPanelDisplayObject=function(n){n.setRotation(Math.PI);var e=t.ButtonLAFUtils._getDimForced(this._context,n);n.setTranslate(n.getTranslateX()+e.w,n.getTranslateY()+e.h)},t.ControlPanel.prototype.isSingleHorzRow=function(){return!0},t.ControlPanel.prototype.getViewPanelHeight=function(){var n=0;n=this.isSingleHorzRow()?t.ControlPanelLAFUtils.getViewPanelHalfHeight():t.ControlPanelLAFUtils.getViewPanelHeight();var e=t.StyleUtils.getStyle(this._styleMap,t.ControlPanel.CP_TAB_SIZE,0);return Math.max(e,n)},t.ControlPanel.prototype.getViewPanelWidth=function(){return t.StyleUtils.getStyle(this._styleMap,t.ControlPanel.CP_TAB_SIZE,0)},t.ControlPanel.prototype.RenderCollapsed=function(){var n=this.getCtx(),e=new t.Container(n),o=this.getViewPanelHeight(),a=t.Agent.isRightToLeft(n);return this._background=t.ControlPanelLAFUtils.createEmptyViewClosedShape(n,o,this._styleMap,a),this._frame=t.ControlPanelLAFUtils.createEmptyViewClosedFrame(n,o,this._styleMap,a),this._collapsedDim=t.ButtonLAFUtils._getDimForced(n,this._frame),this._expandButton=t.ButtonLAFUtils.createExpandButton(this.getCtx(),this._buttonImages,this.getViewPanelHeight(),this._styleMap,a?t.ButtonLAFUtils.DIR_RIGHT:t.ButtonLAFUtils.DIR_LEFT),this._expandButton.setCallback(this.HandleExpandClick,this),this._expandButton.setTooltip(t.Bundle.getTranslatedString(t.Bundle.SUBCOMPONENT_PREFIX,"CONTROL_PANEL")),this._eventManager.associate(this._expandButton,this._expandButton),this._frame.addChild(this._expandButton),e.addChild(this._background),e.addChild(this._frame),e},t.ControlPanel.prototype._addZoomToFitButton=function(n,e){if(0!=(this._controls&t.ControlPanel.CONTROLS_ZOOM_TO_FIT_BUTTON)){var o=t.StyleUtils.getStyle(this._styleMap.vbar,t.ControlPanel.CP_PADDING_INNER,0),a=t.StyleUtils.getStyle(this._styleMap.vbar,t.ControlPanel.CP_PADDING_LEFT,0);this._zoomToFitButton=t.ButtonLAFUtils.createZoomToFitButton(this.getCtx(),this._buttonImages,this._styleMap),this._zoomToFitButton.setTranslate(a,this._zoomToFitButton.getTranslateY()+e),this._zoomToFitButton.setCallback(this.HandleZoomToFitClick,this),this._zoomToFitButton.setTooltip(t.Bundle.getTranslatedString(t.Bundle.SUBCOMPONENT_PREFIX,"CONTROL_PANEL_ZOOMTOFIT")),this._eventManager.associate(this._zoomToFitButton,this._zoomToFitButton);var i=t.ButtonLAFUtils._getDimForced(this.getCtx(),this._zoomToFitButton);n.addChild(this._zoomToFitButton),e+=i.h,e+=o}return e},t.ControlPanel.prototype._addZoomControls=function(n,e){var o=t.StyleUtils.getStyle(this._styleMap.vbar,t.ControlPanel.CP_PADDING_INNER,0),a=t.StyleUtils.getStyle(this._styleMap.vbar,t.ControlPanel.CP_PADDING_LEFT,0);if(0!=(this._controls&t.ControlPanel.CONTROLS_ZOOM)){this._zoomInButton=t.ButtonLAFUtils.createZoomInButton(this.getCtx(),this._buttonImages,this._styleMap),this._zoomInButton.setTranslate(a,this._zoomInButton.getTranslateY()+e),this._zoomInButton.setCallback(this.HandleZoomInClick,this),this._zoomInButton.setTooltip(t.Bundle.getTranslatedString(t.Bundle.SUBCOMPONENT_PREFIX,"CONTROL_PANEL_ZOOMIN")),this._eventManager.associate(this._zoomInButton,this._zoomInButton);var i=t.ButtonLAFUtils._getDimForced(this.getCtx(),this._zoomInButton);n.addChild(this._zoomInButton),e+=i.h+o,this._zoomOutButton=t.ButtonLAFUtils.createZoomOutButton(this.getCtx(),this._buttonImages,this._styleMap),this._zoomOutButton.setTranslate(a,this._zoomOutButton.getTranslateY()+e),this._zoomOutButton.setCallback(this.HandleZoomOutClick,this),this._zoomOutButton.setTooltip(t.Bundle.getTranslatedString(t.Bundle.SUBCOMPONENT_PREFIX,"CONTROL_PANEL_ZOOMOUT")),this._eventManager.associate(this._zoomOutButton,this._zoomOutButton),i=t.ButtonLAFUtils._getDimForced(this.getCtx(),this._zoomOutButton),n.addChild(this._zoomOutButton),e+=i.h,this.enableZoomControls()}return e},t.ControlPanel.prototype._createVBarBackground=function(n,e,o,a){var i=this.getCtx();if(e){var s=e.getNumChildren(),l=s>1||null==this._zoomToFitButton||o>1||o>0&&1==s,r=null;this._styleMap&&this._styleMap[t.ControlPanel.CP_PANEL_DRAWER_STYLES]&&(r=o>0?t.ControlPanelLAFUtils.OPEN_TOP:t.ControlPanelLAFUtils.OPEN_RIGHT);var _=t.ButtonLAFUtils._getDimForced(i,n);a+=4;var h=l?a:Math.max(_.h,a);h+=t.StyleUtils.getStyle(this._styleMap.vbar,t.ControlPanel.CP_PADDING_BOTTOM,0);var u=t.ControlPanelLAFUtils.renderEmptyZoomShape(i,h,this._styleMap,r,this.getViewPanelHeight()),p=t.ControlPanelLAFUtils.renderEmptyZoomFrame(i,h,l,this._styleMap,r,this.getViewPanelHeight());u.setTranslate(e.getTranslateX(),e.getTranslateY()),this._background.addChild(u),e.addChildAt(p,0)}return a},t.ControlPanel.prototype._positionVBarElements=function(n,e,o){var a=this.getCtx(),i=t.Agent.isRightToLeft(a),s=t.StyleUtils.getStyle(this._styleMap,t.ControlPanel.CP_OPEN_CLOSE_BUTTON_WIDTH,0);if(this._additionalContent||0!=(this._controls&t.ControlPanel.CONTROLS_CENTER_BUTTON)){if(i&&e){var l=t.ButtonLAFUtils._getDimForced(a,n),r=this.getViewPanelWidth();n.setTranslateX(0),e.setTranslateX(l.w+l.x-r)}}else if(i)n.setTranslateX(0-n.getTranslateX()),n.setTranslateY(0),e&&(n.setTranslateX(n.getTranslateX()-s),e.setTranslateY(0));else if(e){var _=this.getViewPanelWidth();e.setTranslate(0,0),n.setTranslate(n.getTranslateX()+_,0)}else n.setTranslate(n.getTranslateX(),0)},t.ControlPanel.prototype._createHBarPanControl=function(n,e){var o=this.getCtx(),a=this.isSingleHorzRow();return 0!=(this._controls&t.ControlPanel.CONTROLS_CENTER_BUTTON)&&(this._panControl=t.ButtonLAFUtils.createPanControl(o,this._panZoomCanvas,this._controls,this._buttonImages,this._styleMap),a&&(this._panControlUnderlay=t.ButtonLAFUtils.createPanButtonUnderlay(o,this._styleMap),this._panControlUnderlay2=t.ButtonLAFUtils.createPanButtonUnderlay(o,this._styleMap),n.addChild(this._panControlUnderlay2),n.addChild(this._panControlUnderlay)),n.addChild(this._panControl),e++),e},t.ControlPanel.prototype._createHBarAdditionalContent=function(n,e){var o=this.getCtx();return this._additionalContent=new t.Container(o),this.PopulateHorzContentBar(this._additionalContent),this._additionalContent.getNumChildren()>0?(n.addChild(this._additionalContent),e++):this._additionalContent=null,e},t.ControlPanel.prototype._createHBarCollapseButton=function(n){this._collapseButton=t.ButtonLAFUtils.createCollapseButton(this.getCtx(),this._buttonImages,this.getViewPanelHeight(),this._styleMap,t.Agent.isRightToLeft(this.getCtx())?t.ButtonLAFUtils.DIR_RIGHT:t.ButtonLAFUtils.DIR_LEFT),this._collapseButton.setCallback(this.HandleCollapseClick,this),this._collapseButton.setTooltip(t.Bundle.getTranslatedString(t.Bundle.SUBCOMPONENT_PREFIX,"CONTROL_PANEL")),this._eventManager.associate(this._collapseButton,this._collapseButton),n.addChild(this._collapseButton)},t.ControlPanel.prototype._positionHBarElements=function(n,e){var o=this._context,a=null,i=t.StyleUtils.getStyle(this._styleMap,t.ControlPanel.CP_OPEN_CLOSE_BUTTON_WIDTH,0),s=t.StyleUtils.getStyle(this._styleMap,t.ControlPanel.CP_BUTTON_WIDTH,0),l=this.getViewPanelWidth(),r=this.getViewPanelHeight(),_=t.StyleUtils.getStyle(this._styleMap.hbar,t.ControlPanel.CP_PADDING_LEFT,0),h=t.StyleUtils.getStyle(this._styleMap.hbar,t.ControlPanel.CP_PADDING_INNER,0);if(n){if(this._collapseButton.setTranslateX(0),e+=i,this._additionalContent&&(a=t.ButtonLAFUtils._getDimForced(o,this._additionalContent),e+=h,this._additionalContent.setTranslate(e,(r-a.h)/2),e+=Math.max(a.w,s)),this._panControl){e+=h;var u=3.5;this._panControl.setTranslate(e,u),this._panControlUnderlay&&this._panControlUnderlay.setTranslate(e,u),this._panControlUnderlay2&&this._panControlUnderlay2.setTranslate(e,u),e+=(a=t.ButtonLAFUtils._getDimForced(o,this._panControl)).w}e+=_}else{if(this._panControl){e+=_;var p=_;u=3.5;this._panControl.setTranslate(p,u),this._panControlUnderlay&&this._panControlUnderlay.setTranslate(p,u),this._panControlUnderlay2&&this._panControlUnderlay2.setTranslate(p,u),e+=h+(a=t.ButtonLAFUtils._getDimForced(o,this._panControl)).w,e+=1}this._additionalContent&&(a=t.ButtonLAFUtils._getDimForced(o,this._additionalContent),0==e&&(e+=_),this._additionalContent.setTranslate(e,(r-a.h)/2),e+=a.w,e+=h,e=Math.max(e,l)),this._collapseButton.setTranslateX(e),e+=i}return e},t.ControlPanel.prototype._createHBarBackground=function(n,e,o,a,i){var s=this._context,l=t.StyleUtils.getStyle(this._styleMap,t.ControlPanel.CP_OPEN_CLOSE_BUTTON_WIDTH,0),r=t.StyleUtils.getStyle(this._styleMap,t.ControlPanel.CP_TAB_SIZE,0),_=t.StyleUtils.getStyle(this._styleMap,t.ControlPanel.CP_PANEL_DRAWER_STYLES,null),h=_?i:i-l,u=this.getViewPanelHeight(),p=0,C=0;if(_?_&&0==o&&(C=a?-r:r):(p=a?l:0,C=a?l:0),o>0||_){var P=null,m=null,c=parseInt(t.StyleUtils.getStyle(this._styleMap,t.CSSStyle.BORDER_RADIUS,0));if(_){var E=o>0&&null!=e?t.ControlPanelLAFUtils.OPEN_BOTTOM:t.ControlPanelLAFUtils.OPEN_LEFT;P=t.ControlPanelLAFUtils.makeViewOpenShapeHelperOpenSide(s,c,h,u,E,r),m=t.ControlPanelLAFUtils.makeViewOpenShapeHelperOpenSide(s,c,h,u,E,r)}else P=t.ControlPanelLAFUtils.createEmptyViewOpenShape(s,h,this.getViewPanelHeight(),!a,this._styleMap),m=t.ControlPanelLAFUtils.createEmptyViewOpenShape(s,h,this.getViewPanelHeight(),!a,this._styleMap);P.setSolidStroke(t.StyleUtils.getStyle(this._styleMap,t.CSSStyle.BORDER_COLOR,null)),P.setFill(null),P.setTranslate(n.getTranslateX()+p,n.getTranslateY()),n.addChildAt(P,0),m.setSolidFill(t.StyleUtils.getStyle(this._styleMap,t.CSSStyle.BACKGROUND_COLOR,null)),m.setTranslate(n.getTranslateX()+C,n.getTranslateY()),this._background.addChild(m)}},t.ControlPanel.prototype.RenderExpanded=function(){var n=this.getCtx(),e=new t.Container(n);this._background=new t.Container(n),this._frame=new t.Container(n),e.addChild(this._background),e.addChild(this._frame);var o=t.Agent.isRightToLeft(n),a=0,i=new t.Container(n),s=0;s=this._createHBarPanControl(i,s),this._createHBarCollapseButton(i),s=this._createHBarAdditionalContent(i,s),a=this._positionHBarElements(o,a);var l=null,r=this._getVBarButtonsOffsetY(s);return this.isSingleHorzRow()&&0!=(this._controls&t.ControlPanel.CONTROLS_CENTER_BUTTON)&&(r+=t.ControlPanelLAFUtils.getViewPanelHeight()-this.getViewPanelHeight()),0==(this._controls&t.ControlPanel.CONTROLS_ZOOM_TO_FIT_BUTTON)&&0==(this._controls&t.ControlPanel.CONTROLS_ZOOM)||((l=new t.Container(n)).setTranslateY(i.getTranslateY()+this.getViewPanelHeight()),r=this._addZoomToFitButton(l,r),r=this._addZoomControls(l,r),this._frame.addChild(l)),this._createHBarBackground(i,l,s,o,a),this._frame.addChild(i),this._positionVBarElements(i,l,r),this._createVBarBackground(i,l,s,r),this._expandedDim=t.ButtonLAFUtils._getDimForced(n,e),e},t.ControlPanel.prototype.PopulateHorzContentBar=function(t){},t.ControlPanel.prototype.toggleExpandCollapse=function(){this._bTransition||(this._state===t.ControlPanel.STATE_EXPANDED?this._doCollapse():this._state===t.ControlPanel.STATE_COLLAPSED&&this._doExpand())},t.ControlPanel.prototype.getCollapsedDim=function(){return this._collapsedDim},t.ControlPanel.prototype.getExpandedDim=function(){return this._expandedDim},t.ControlPanel.prototype.HandleExpandClick=function(n){t.EventManager.consumeEvent(n),this._bTransition||(this._doExpand(),this._tooltipManager.hideTooltip())},t.ControlPanel.prototype._doExpand=function(){this._bTransition=!0,this.setMouseEnabled(!1);var t=this.RenderExpanded();this.addChild(t),this._applyAlphasForMouse(),this.transitionExpand(this.getChildAt(0),t),this.fireExpandEvent()},t.ControlPanel.prototype._applyAlphasForMouse=function(){var t=!1;this.getCtx().getStage()&&(t=!0),t?this._applyAlphasRollover():this._applyAlphasRollout()},t.ControlPanel.prototype.HandleCollapseClick=function(n){t.EventManager.consumeEvent(n),this._bTransition||this._doCollapse()},t.ControlPanel.prototype._doCollapse=function(){this._bTransition=!0;var t=this.RenderCollapsed();this.addChild(t),this._applyAlphasForMouse(),this.transitionCollapse(this.getChildAt(0),t),this.fireCollapseEvent()},t.ControlPanel.prototype.transitionExpand=function(n,e){var o=n.getDimensions(),a=t.StyleUtils.getStyle(this._styleMap,t.ControlPanel.CP_OPEN_CLOSE_BUTTON_WIDTH,0);if(o&&0!=o.w){var i=e.getDimensions(),s=new t.Animator(this.getCtx(),.25);if(n.setAlpha(1),e.setAlpha(0),s.addProp(t.Animator.TYPE_NUMBER,n,n.getAlpha,n.setAlpha,0),s.addProp(t.Animator.TYPE_NUMBER,e,e.getAlpha,e.setAlpha,1),e.setScaleX(o.w/i.w),s.addProp(t.Animator.TYPE_NUMBER,e,e.getScaleX,e.setScaleX,1),t.Agent.isRightToLeft(this.getCtx())){e.setTranslateX(n.getTranslateX());var l=i.w+i.x;s.addProp(t.Animator.TYPE_NUMBER,e,e.getTranslateX,e.setTranslateX,n.getTranslateX()+a-l)}e.setScaleY(o.h/i.h),s.addProp(t.Animator.TYPE_NUMBER,e,e.getScaleY,e.setScaleY,1),s.setOnEnd(function(){n.getParent().removeChild(n),this._bTransition=!1,this.setMouseEnabled(!0),this._state=t.ControlPanel.STATE_EXPANDED},this),s.play()}else this._state=t.ControlPanel.STATE_EXPANDED,n.getParent().removeChild(n),this.PositionExpanded(e)},t.ControlPanel.prototype.PositionExpanded=function(n){var e;if(t.Agent.isRightToLeft(this.getCtx())){var o=t.StyleUtils.getStyle(this._styleMap,t.ControlPanel.CP_OPEN_CLOSE_BUTTON_WIDTH,0),a=t.DisplayableUtils.getDimensionsForced(this.getCtx(),n);e=o-Math.floor(a.w+a.x)}else e=0;n.setTranslate(e,0)},t.ControlPanel.prototype.transitionCollapse=function(n,e){var o=new t.Animator(this.getCtx(),.25);n.setAlpha(1),e.setAlpha(0),o.addProp(t.Animator.TYPE_NUMBER,n,n.getAlpha,n.setAlpha,0),o.addProp(t.Animator.TYPE_NUMBER,e,e.getAlpha,e.setAlpha,1);var a=this.getCollapsedDim(),i=this.getExpandedDim();o.addProp(t.Animator.TYPE_NUMBER,n,n.getScaleX,n.setScaleX,a.w/i.w),t.Agent.isRightToLeft(this.getCtx())&&o.addProp(t.Animator.TYPE_NUMBER,n,n.getTranslateX,n.setTranslateX,e.getTranslateX()),o.addProp(t.Animator.TYPE_NUMBER,n,n.getScaleY,n.setScaleY,a.h/i.h),o.setOnEnd(function(){n.getParent().removeChild(n),this._bTransition=!1,this._state=t.ControlPanel.STATE_COLLAPSED},this),o.play()},t.ControlPanel.prototype.fireExpandEvent=function(){var t=new o(o.SUBTYPE_SHOW);return this.FireListener(t),!0},t.ControlPanel.prototype.fireCollapseEvent=function(){var t=new o(o.SUBTYPE_HIDE);return this.FireListener(t),!0},t.ControlPanel.prototype.HandleRollOver=function(t){this._bMouseOver=!0,this._bMouseDragPanning||this._applyAlphasRollover()},t.ControlPanel.prototype.HandleRollOut=function(t){this._bMouseOver=!1,this._bMouseDragPanning||this._applyAlphasRollout()},t.ControlPanel.prototype._applyAlphasRollover=function(){this._background.setAlpha(this._styleMap[t.ControlPanel.BG_ROLLOVER_ALPHA]),this._frame.setAlpha(this._styleMap[t.ControlPanel.FRAME_ROLLOVER_ALPHA]),this._panControlUnderlay&&this._panControlUnderlay.setAlpha(this._styleMap[t.ControlPanel.BG_ROLLOVER_ALPHA])},t.ControlPanel.prototype._applyAlphasRollout=function(){this._background.setAlpha(this._bgAlpha),this._frame.setAlpha(this._styleMap[t.ControlPanel.FRAME_ROLLOUT_ALPHA]),this._panControlUnderlay&&this._panControlUnderlay.setAlpha(this._bgAlpha)},t.ControlPanel.prototype.isPanControlShown=function(){return(this._controls&t.ControlPanel.CONTROLS_CENTER_BUTTON)>0},t.ControlPanel.prototype.getDimensions=function(){return this._dim||(this._dim=t.ControlPanel.superclass.getDimensions.call(this)),this._dim},t.ControlPanel.prototype.renderComponent=function(){var n;this._state==t.ControlPanel.STATE_COLLAPSED?n=this.RenderCollapsed():(n=this.RenderExpanded(),this.PositionExpanded(n)),this._background.setAlpha(this._bgAlpha),this._frame.setAlpha(this._styleMap[t.ControlPanel.FRAME_ROLLOUT_ALPHA]),this.addChild(n)},t.ControlPanel.prototype.getButtonImages=function(){return this._buttonImages},t.ControlPanel.prototype._getVBarButtonsOffsetY=function(n){return this._controls&t.ControlPanel.CONTROLS_CENTER_BUTTON||this._styleMap&&this._styleMap[t.ControlPanel.CP_PANEL_DRAWER_STYLES]&&0==n?t.StyleUtils.getStyle(this._styleMap.vbar,t.ControlPanel.CP_PADDING_TOP,0):0},t.ControlPanel.prototype.enableZoomControls=function(){var t=this._panZoomCanvas.getZoom(),n=this._panZoomCanvas.getNextZoomLevel(t),e=this._panZoomCanvas.getPrevZoomLevel(t);this._zoomInButton&&this._zoomInButton.setEnabled(t!=n),this._zoomOutButton&&this._zoomOutButton.setEnabled(t!=e)},t.ControlPanel.prototype.enableZoomInControl=function(t){this._zoomInButton&&this._zoomInButton.setEnabled(t)},t.ControlPanel.prototype.enableZoomOutControl=function(t){this._zoomOutButton&&this._zoomOutButton.setEnabled(t)},t.ControlPanel.prototype.HandleZoomInClick=function(n){var e=this._panZoomCanvas.getZoom(),o=this._panZoomCanvas.getNextZoomLevel(e),a=new t.Animator(this.getCtx(),this._panZoomCanvas.getAnimationDuration());this._panZoomCanvas.zoomTo(o,void 0,void 0,a),a.play()},t.ControlPanel.prototype.HandleZoomOutClick=function(n){var e=this._panZoomCanvas.getZoom(),o=this._panZoomCanvas.getPrevZoomLevel(e),a=this.getCtx(),i=new t.Animator(a,this._panZoomCanvas.getAnimationDuration());this._panZoomCanvas.zoomTo(o,void 0,void 0,i),i.play()},t.ControlPanel.prototype.HandleZoomToFitClick=function(n){var e=new t.Animator(this.getCtx(),this._panZoomCanvas.getAnimationDuration());this._panZoomCanvas.zoomToFit(e),e.play()},t.ControlPanel.prototype.getEventManager=function(){return this._eventManager},t.ControlPanel.prototype.isDisclosed=function(){return this.getState()==t.ControlPanel.STATE_EXPANDED},t.ControlPanel.prototype.getActionDisplayable=function(t,n){if("disclosure"==t)return this.isDisclosed()?this._collapseButton:this._expandButton;if(this.isDisclosed()){if("zoomToFit"==t&&this._zoomToFitButton&&this._zoomToFitButton.isEnabled())return this._zoomToFitButton;if("zoomIn"==t&&this._zoomInButton&&this._zoomInButton.isEnabled())return this._zoomInButton;if("zoomOut"==t&&this._zoomOutButton&&this._zoomOutButton.isEnabled())return this._zoomOutButton}return null};var a=new Object;t.Obj.createSubclass(a,t.Obj),a.SKIN_ALTA={"fill-type":"solid",backgroundAlpha:1,backgroundDragAlpha:1,borderDragAlpha:1,panelDrawerStyles:!0,buttonWidth:42,buttonHeight:42,buttonRadius:0,openCloseButtonWidth:42,tabSize:42,paddingTop:15,paddingSide:-1,imageWidth:24,imageHeight:24,centerButtonDisplayed:!1,scrollbarBackground:"linear-gradient(bottom, #dce2e7 0%, #f8f8f8 8%)",scrollbarBorderColor:"#dce2e7",scrollbarHandleColor:"#abb0b4",scrollbarHandleHoverColor:"#333333",scrollbarHandleActiveColor:"#333333",comboBox:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingInner:0,itemHeight:30,imagePadding:0,itemPadding:10},vbar:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingInner:0},hbar:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingInner:0}},a.SKIN_SKYROS={"fill-type":"solid"},a.DEFAULT={"fill-type":"gradient","border-color":"#ffffff","background-color":"#ffffff","border-radius":6,backgroundAlpha:.5,backgroundHoverAlpha:1,backgroundDragAlpha:.5,borderAlpha:1,borderHoverAlpha:1,borderDragAlpha:.5,tabSize:26,buttonWidth:22,buttonHeight:22,buttonRadius:3,paddingTop:5,paddingSide:5,imageWidth:22,imageHeight:20,openCloseButtonWidth:10,centerButtonDisplayed:!0,comboBox:{paddingTop:2,paddingBottom:6,paddingLeft:3,paddingRight:3,paddingInner:2,itemHeight:22,radius:4,imagePadding:2,itemPadding:7},vbar:{paddingTop:2.5,paddingBottom:2.5,paddingLeft:2,paddingRight:2,paddingInner:2},hbar:{paddingTop:2,paddingBottom:2,paddingLeft:3,paddingRight:3,paddingInner:2}},a.calcOptions=function(n){var e=a._getDefaults(n);return n?t.JsonUtils.merge(n,e):e},a._getDefaults=function(n){return n&&"skyros"===n.skin?t.JsonUtils.merge(a.SKIN_SKYROS,a.DEFAULT):n&&"alta"===n.skin?t.JsonUtils.merge(a.SKIN_ALTA,a.DEFAULT):t.JsonUtils.clone(a.DEFAULT)};var i=function(t,n,e){this.Init(t,n,e)};t.Obj.createSubclass(i,t.EventManager),i.prototype.OnMouseDown=function(t){var n=this.GetLogicalObject(this.GetCurrentTargetForEvent(t));i.superclass.OnMouseDown.call(this,t),n&&(n.HandleMouseDown&&n.HandleMouseDown(t),t.stopPropagation())},i.prototype.OnMouseUp=function(t){var n=this.GetLogicalObject(this.GetCurrentTargetForEvent(t));i.superclass.OnMouseUp.call(this,t),n&&(n.HandleMouseUp&&n.HandleMouseUp(t),t.stopPropagation())},i.prototype.OnMouseOut=function(t){var n=this.GetLogicalObject(this.GetCurrentTargetForEvent(t));i.superclass.OnMouseOut.call(this,t),n&&(n.HandleMouseOut&&n.HandleMouseOut(t),t.stopPropagation())},i.prototype.OnClick=function(t){var n=this.GetLogicalObject(this.GetCurrentTargetForEvent(t));i.superclass.OnClick.call(this,t),n&&(n.HandleClick&&n.HandleClick(t),t.stopPropagation())},i.prototype.OnRollOver=function(t){i.superclass.OnRollOver.call(this,t);var n=this.GetLogicalObject(this.GetCurrentTargetForEvent(t));n&&n.HandleRollOver&&n.HandleRollOver(t)},i.prototype.OnRollOut=function(t){i.superclass.OnRollOut.call(this,t);var n=this.GetLogicalObject(this.GetCurrentTargetForEvent(t));n&&n.HandleRollOut&&n.HandleRollOut(t)},i.prototype.OnComponentTouchClick=function(t){var n=this.GetLogicalObject(this.GetCurrentTargetForEvent(t));n&&(n.HandleClick&&n.HandleClick(t),t.stopPropagation())},i.prototype.HandleImmediateTouchStartInternal=function(n){n.blockTouchHold(),t.EventManager.consumeEvent(n)},t.ControlPanelLAFUtils={},t.Obj.createSubclass(t.ControlPanelLAFUtils,t.Obj),t.ControlPanelLAFUtils.OPEN_TOP="top",t.ControlPanelLAFUtils.OPEN_RIGHT="right",t.ControlPanelLAFUtils.OPEN_LEFT="left",t.ControlPanelLAFUtils.OPEN_BOTTOM="bottom",t.ControlPanelLAFUtils.VIEW_PANEL_HEIGHT=47,t.ControlPanelLAFUtils.VIEW_PANEL_HALF_HEIGHT=26,t.ControlPanelLAFUtils.SIN_PI_4=Math.sin(Math.PI/4),t.ControlPanelLAFUtils.TAN_PI_8=Math.tan(Math.PI/8),t.ControlPanelLAFUtils.getViewPanelHeight=function(){return t.ControlPanelLAFUtils.VIEW_PANEL_HEIGHT},t.ControlPanelLAFUtils.getViewPanelHalfHeight=function(){return t.ControlPanelLAFUtils.VIEW_PANEL_HALF_HEIGHT},t.ControlPanelLAFUtils.createEmptyViewOpenShape=function(n,e,o,a,i){e||(e=86),o||(o=47),void 0===a&&(a=!0);var s=parseInt(t.StyleUtils.getStyle(i,t.CSSStyle.BORDER_RADIUS,0)),l=e-2*s,r=o-2*s;return t.ControlPanelLAFUtils.makeViewOpenShapeHelper(n,s,l,r,0,0,a)},t.ControlPanelLAFUtils.makeViewOpenShapeHelper=function(n,e,o,a,i,s,l){var r=o+e,_=a+e,h=t.PathUtils.moveTo(r+e,_+e);return h+=t.PathUtils.lineTo(r-o,_+e),r-=o,_=_,h+=t.PathUtils.lineTo(r-e,_+e),h+=t.PathUtils.lineTo(r-e,_-a),r=r,_-=a,l?(h+=t.PathUtils.quadTo(-e+r,-t.ControlPanelLAFUtils.TAN_PI_8*e+_,-t.ControlPanelLAFUtils.SIN_PI_4*e+r,-t.ControlPanelLAFUtils.SIN_PI_4*e+_)+t.PathUtils.quadTo(-t.ControlPanelLAFUtils.TAN_PI_8*e+r,-e+_,r,-e+_)+t.PathUtils.lineTo(r,-e+_),h+=t.PathUtils.lineTo(r+o+e,-e+_),r+=o,_=_,h+=t.PathUtils.lineTo(r+e,_+a)):(h+=t.PathUtils.lineTo(r-e,-e+_),h+=t.PathUtils.lineTo(r+o,-e+_),r+=o,_=_,h+=t.PathUtils.quadTo(t.ControlPanelLAFUtils.TAN_PI_8*e+r,-e+_,t.ControlPanelLAFUtils.SIN_PI_4*e+r,-t.ControlPanelLAFUtils.SIN_PI_4*e+_)+t.PathUtils.quadTo(e+r,-t.ControlPanelLAFUtils.TAN_PI_8*e+_,e+r,_)+t.PathUtils.lineTo(r+e,_+a)),h+=t.PathUtils.closePath(),new t.Path(n,h)},t.ControlPanelLAFUtils.createEmptyViewClosedShape=function(n,e,o,a){e||(e=47);var i=parseInt(t.StyleUtils.getStyle(o,t.CSSStyle.BORDER_RADIUS,0)),s=t.StyleUtils.getStyle(o,t.ControlPanel.CP_OPEN_CLOSE_BUTTON_WIDTH,0),l=Math.max(e,t.StyleUtils.getStyle(o,t.ControlPanel.CP_BUTTON_HEIGHT,e)),r=t.ButtonLAFUtils.GetButtonPathCommands(s,l,i,a);r=r.concat("Z");var _=new t.Path(n,r,"cls_shape"),h=t.StyleUtils.getStyle(o,t.PanelDrawer.TAB_BG_COLOR_INACTIVE,null);return h||(h=t.StyleUtils.getStyle(o,t.CSSStyle.BACKGROUND_COLOR,null)),_.setSolidFill(h),_},t.ControlPanelLAFUtils.createEmptyViewClosedFrame=function(n,e,o,a){e||(e=47);var i=parseInt(t.StyleUtils.getStyle(o,t.CSSStyle.BORDER_RADIUS,0)),s=t.StyleUtils.getStyle(o,t.ControlPanel.CP_OPEN_CLOSE_BUTTON_WIDTH,0),l=Math.max(e,t.StyleUtils.getStyle(o,t.ControlPanel.CP_BUTTON_HEIGHT,e)),r=t.ButtonLAFUtils.GetButtonPathCommands(s,l,i,a);r=r.concat("Z");var _=new t.Path(n,r,"cls_shape");return _.setSolidStroke(t.StyleUtils.getStyle(o,t.CSSStyle.BORDER_COLOR,null)),_.setFill(null),_},t.ControlPanelLAFUtils.renderEmptyZoomShape=function(n,e,o,a,i){e||(e=137);var s,l=parseInt(t.StyleUtils.getStyle(o,t.CSSStyle.BORDER_RADIUS,0)),r=t.StyleUtils.getStyle(o,t.ControlPanel.CP_TAB_SIZE,0),_=r-2*l,h=e+7-2*l;return(s=a&&i?t.ControlPanelLAFUtils.makeZoomShapeHelperOpenSide(n,l,r,e,a,i):t.ControlPanelLAFUtils.makeZoomShapeHelper(n,l,_,h,0,0)).setSolidFill(t.StyleUtils.getStyle(o,t.CSSStyle.BACKGROUND_COLOR,null)),s},t.ControlPanelLAFUtils.renderEmptyZoomFrame=function(n,e,o,a,i,s){e||(e=137),o||(o=!0);var l=parseInt(t.StyleUtils.getStyle(a,t.CSSStyle.BORDER_RADIUS,0)),r=t.StyleUtils.getStyle(a,t.ControlPanel.CP_TAB_SIZE,0),_=r-2*l,h=e+7-2*l,u=null;return(u=i&&s?t.ControlPanelLAFUtils.makeZoomShapeHelperOpenSide(n,l,r,e,i,s):t.ControlPanelLAFUtils.makeZoomShapeHelper(n,l,_,h,0,0,o)).setSolidStroke(t.StyleUtils.getStyle(a,t.CSSStyle.BORDER_COLOR,null)),u.setFill(null),u},t.ControlPanelLAFUtils.makeZoomShapeHelper=function(n,e,o,a,i,s,l){l||(l=!0);var r=o+e,_=a,h=t.PathUtils.moveTo(r+e,_);return h+=l?t.PathUtils.quadTo(e+r,t.ControlPanelLAFUtils.TAN_PI_8*e+_,t.ControlPanelLAFUtils.SIN_PI_4*e+r,t.ControlPanelLAFUtils.SIN_PI_4*e+_)+t.PathUtils.quadTo(t.ControlPanelLAFUtils.TAN_PI_8*e+r,e+_,r,e+_)+t.PathUtils.lineTo(r,e+_):t.PathUtils.lineTo(r+e,_+e),h+=t.PathUtils.lineTo(r-o,e+_),r-=o,_=_,h+=t.PathUtils.quadTo(-t.ControlPanelLAFUtils.TAN_PI_8*e+r,e+_,-t.ControlPanelLAFUtils.SIN_PI_4*e+r,t.ControlPanelLAFUtils.SIN_PI_4*e+_)+t.PathUtils.quadTo(-e+r,t.ControlPanelLAFUtils.TAN_PI_8*e+_,-e+r,_)+t.PathUtils.lineTo(-e+r,_)+t.PathUtils.lineTo(-e+r,_-a),r=r,_-=a,h+=t.PathUtils.lineTo(r+o+e,_)+t.PathUtils.lineTo(r+o+e,_+a)+t.PathUtils.closePath(),new t.Path(n,h)},t.ControlPanelLAFUtils.makeZoomShapeHelperOpenSide=function(n,e,o,a,i,s){var l=t.ControlPanelLAFUtils.GetShapePathCommands(n,o,a,e,i,s);return new t.Path(n,l)},t.ControlPanelLAFUtils.makeViewOpenShapeHelperOpenSide=function(n,e,o,a,i,s){var l=t.ControlPanelLAFUtils.GetShapePathCommands(n,o,a,e,i,s);return new t.Path(n,l)},t.ControlPanelLAFUtils.GetShapePathCommands=function(n,e,o,a,i,s){var l,r=t.Agent.isRightToLeft(n);return i!=t.ControlPanelLAFUtils.OPEN_TOP||r||(l=["M",e,0,"L",e,o-a,"A",a,a,0,0,1,e-a,o,"L",0,o,"L",0,0]),i==t.ControlPanelLAFUtils.OPEN_TOP&&r?l=["M",e,0,"L",e,o,"L",a,o,"A",a,a,0,0,1,0,o-a,"L",0,0]:i!=t.ControlPanelLAFUtils.OPEN_RIGHT||r?i==t.ControlPanelLAFUtils.OPEN_RIGHT&&r?l=["M",0,0,"L",e,0,"L",e,o,"L",a,o,"A",a,a,0,0,1,0,o-a,"L",0,s]:i!=t.ControlPanelLAFUtils.OPEN_LEFT||r?i==t.ControlPanelLAFUtils.OPEN_LEFT&&r?l=["M",e,o,"L",a,o,"A",a,a,0,0,1,0,o-a,"L",0,a,"A",a,a,0,0,1,a,0,"L",e,0]:i!=t.ControlPanelLAFUtils.OPEN_BOTTOM||r?i==t.ControlPanelLAFUtils.OPEN_BOTTOM&&r&&(l=["M",e,o,"L",e,0,"L",a,0,"A",a,a,0,0,0,0,a,"L",0,o-a,"A",a,a,0,0,0,a,o,"L",e-s,o]):l=["M",0,o,"L",0,0,"L",e-a,0,"A",a,a,0,0,1,e,a,"L",e,o-a,"A",a,a,0,0,1,e-a,o,"L",s,o]:l=["M",0,0,"L",e-a,0,"A",a,a,0,0,1,e,a,"L",e,o-a,"A",a,a,0,0,1,e-a,o,"L",0,o]:l=["M",e,s,"L",e,o-a,"A",a,a,0,0,1,e-a,o,"L",0,o,"L",0,0,"L",e,0],l},t.PanZoomComponent=function(t,n,e){this.Init(t,n,e)},t.Obj.createSubclass(t.PanZoomComponent,t.BaseComponent),t.PanZoomComponent.BOX_SHADOW="box-shadow",t.PanZoomComponent.CONTROL_PANEL_BEHAVIOR_INIT_COLLAPSED="initCollapsed",t.PanZoomComponent.CONTROL_PANEL_BEHAVIOR_INIT_EXPANDED="initExpanded",t.PanZoomComponent.CONTROL_PANEL_BEHAVIOR_HIDDEN="hidden",t.PanZoomComponent.PAN_ZOOM_KEY="panZoomInfo",t.PanZoomComponent.SKIN_NAME="skin",t.PanZoomComponent._ATTR_INLINE_STYLE="inlineStyle",t.PanZoomComponent._ATTR_CTRLPANEL_BACKGROUND_COLOR="cpBackgroundColor",t.PanZoomComponent._ATTR_CTRLPANEL_BORDER_COLOR="cpBorderColor",t.PanZoomComponent._ATTR_CTRLPANEL_BOX_SHADOW="cpBoxShadow",t.PanZoomComponent._ATTR_CTRLPANEL_BORDER_RADIUS="cpBorderRadius",t.PanZoomComponent._ATTR_TAB_BG_COLOR_INACTIVE="tabBgColorInactive",t.PanZoomComponent._ATTR_TAB_BORDER_COLOR_INACTIVE="tabBorderColorInactive",t.PanZoomComponent.LEGEND_DISCLOSED_EVENT_KEY="isLegendDisclosed",t.PanZoomComponent.prototype.Init=function(n,e,o){t.PanZoomComponent.superclass.Init.call(this,n,e,o),this._controlPanelBehavior=t.PanZoomComponent.CONTROL_PANEL_BEHAVIOR_INIT_COLLAPSED,this._displayedControls=t.PanZoomCanvas.DEFAULT_DISPLAYED_CONTROLS,this._bSupportsVectorEffects=!(t.Agent.isEnvironmentBatik()||t.Agent.isPlatformIE()&&t.Agent.getVersion()<=11),this._resourcesMap=null,this._subcomponentStyles=null,this._skinName="",this._panAnimator=null,this._panningInterrupted=!1},t.PanZoomComponent.prototype.getDisplayedControls=function(){return this._displayedControls},t.PanZoomComponent.prototype.getPanZoomCanvas=function(){return this._panZoomCanvas},t.PanZoomComponent.prototype.getResourcesMap=function(){return this._resourcesMap||(this.Options?this._resourcesMap=this.Options._resources:this._resourcesMap={}),this._resourcesMap},t.PanZoomComponent.prototype.getSkinName=function(){return this._skinName},t.PanZoomComponent.prototype.getSubcomponentStyles=function(){return this._subcomponentStyles},t.PanZoomComponent.prototype.parseComponentJson=function(n){var e=new t.CSSStyle(n[t.PanZoomComponent._ATTR_INLINE_STYLE]).getStyle(t.CSSStyle.BACKGROUND_COLOR);e&&this.SetEndGradientColor(e);var o=new Object,i=n[t.PanZoomComponent.SKIN_NAME];i&&(this._setSkinName(i),o[t.PanZoomComponent.SKIN_NAME]=i,void 0!==t.PanelDrawer&&(t.StyleUtils.setStyle(o,t.CSSStyle.BACKGROUND_COLOR,n[t.PanZoomComponent._ATTR_CTRLPANEL_BACKGROUND_COLOR]),t.StyleUtils.setStyle(o,t.CSSStyle.BORDER_COLOR,n[t.PanZoomComponent._ATTR_CTRLPANEL_BORDER_COLOR]),t.StyleUtils.setStyle(o,t.CSSStyle.BORDER_RADIUS,n[t.PanZoomComponent._ATTR_CTRLPANEL_BORDER_RADIUS]),t.StyleUtils.setStyle(o,t.PanZoomComponent.BOX_SHADOW,n[t.PanZoomComponent._ATTR_CTRLPANEL_BOX_SHADOW]),t.StyleUtils.setStyle(o,t.PanelDrawer.TAB_BG_COLOR_INACTIVE,n[t.PanZoomComponent._ATTR_TAB_BG_COLOR_INACTIVE]),t.StyleUtils.setStyle(o,t.PanelDrawer.TAB_BORDER_COLOR_INACTIVE,n[t.PanZoomComponent._ATTR_TAB_BORDER_COLOR_INACTIVE])),this.setSubcomponentStyles(a.calcOptions(o)))},t.PanZoomComponent.prototype.parseComponentAttrs=function(n){var e=new t.CSSStyle(n.getAttr(t.PanZoomComponent._ATTR_INLINE_STYLE)).getStyle(t.CSSStyle.BACKGROUND_COLOR);e&&this.SetEndGradientColor(e);var o=new Object,i=n.getAttr(t.PanZoomComponent.SKIN_NAME);i&&(this._setSkinName(i),o[t.PanZoomComponent.SKIN_NAME]=i),void 0!==t.PanelDrawer&&(t.StyleUtils.setStyle(o,t.CSSStyle.BACKGROUND_COLOR,n.getAttr(t.PanZoomComponent._ATTR_CTRLPANEL_BACKGROUND_COLOR)),t.StyleUtils.setStyle(o,t.CSSStyle.BORDER_COLOR,n.getAttr(t.PanZoomComponent._ATTR_CTRLPANEL_BORDER_COLOR)),t.StyleUtils.setStyle(o,t.CSSStyle.BORDER_RADIUS,n.getAttr(t.PanZoomComponent._ATTR_CTRLPANEL_BORDER_RADIUS)),t.StyleUtils.setStyle(o,t.PanZoomComponent.BOX_SHADOW,n.getAttr(t.PanZoomComponent._ATTR_CTRLPANEL_BOX_SHADOW)),t.StyleUtils.setStyle(o,t.PanelDrawer.TAB_BG_COLOR_INACTIVE,n.getAttr(t.PanZoomComponent._ATTR_TAB_BG_COLOR_INACTIVE)),t.StyleUtils.setStyle(o,t.PanelDrawer.TAB_BORDER_COLOR_INACTIVE,n.getAttr(t.PanZoomComponent._ATTR_TAB_BORDER_COLOR_INACTIVE))),this.setSubcomponentStyles(a.calcOptions(o))},t.PanZoomComponent.prototype.render=function(t,n,e){this.Width=n,this.Height=e,this._isResize=!t,this.IsResize()&&!this.getPanZoomCanvas()||(this.PreRender(),this.IsResize()||("object"==typeof t?this.SetOptions(t):this._loadXml(t)),this.Render(t,n,e),this.UpdateAriaAttributes())},t.PanZoomComponent.prototype.setControlPanelBehavior=function(t){this._controlPanelBehavior=t},t.PanZoomComponent.prototype.setDisplayedControls=function(t){this._displayedControls=t},t.PanZoomComponent.prototype.supportsVectorEffects=function(){return this._bSupportsVectorEffects},t.PanZoomComponent.prototype.GetControlPanel=function(){var n=this.GetControlPanelBehavior();if(n!=t.PanZoomComponent.CONTROL_PANEL_BEHAVIOR_HIDDEN){var e=n==t.PanZoomComponent.CONTROL_PANEL_BEHAVIOR_INIT_COLLAPSED?t.ControlPanel.STATE_COLLAPSED:t.ControlPanel.STATE_EXPANDED;return new t.ControlPanel(this.getCtx(),this,e)}return null},t.PanZoomComponent.prototype.GetControlPanelBehavior=function(){return this._controlPanelBehavior},t.PanZoomComponent.prototype.GetXmlDomParser=function(){return null},t.PanZoomComponent.prototype.GetXmlStringParser=function(){return new t.XmlParser(this.getCtx())},t.PanZoomComponent.prototype.HandlePanEvent=function(t){},t.PanZoomComponent.prototype.HandleZoomEvent=function(t){},t.PanZoomComponent.prototype.IsResize=function(){return this._isResize},t.PanZoomComponent.prototype.PreRender=function(){},t.PanZoomComponent.prototype.Render=function(){if(!this._endGradientColor&&this.getSkinName()||(this._backgroundPane||(this._backgroundPane=new t.Rect(this.getCtx(),0,0,0,0),this.addChild(this._backgroundPane)),this._backgroundPane.setWidth(this.getWidth()),this._backgroundPane.setHeight(this.getHeight()),this._backgroundPane.setFill(this._getBackgroundGradient(this._endGradientColor))),this.IsResize())this._panZoomCanvas.setSize(this.getWidth(),this.getHeight());else{this._panZoomCanvas&&(this.removeChild(this._panZoomCanvas),this._panZoomCanvas=null),this._panZoomCanvas=new t.PanZoomCanvas(this.getCtx(),this.getWidth(),this.getHeight(),this),this._panZoomCanvas.addEvtListener(t.PanEvent.TYPE,this.HandlePanEvent,!1,this),this._panZoomCanvas.addEvtListener(t.ZoomEvent.TYPE,this.HandleZoomEvent,!1,this),this.addChild(this._panZoomCanvas);var n=this.GetControlPanel();n&&(n.addEvtListener(o.TYPE,this._handleControlPanelEvent,!1,this),this._panZoomCanvas.setControlPanel(n)),this._panZoomCanvas.renderComponent()}var e=new t.ClipPath("comp");e.addRect(this.getTranslateX(),this.getTranslateY(),this.getWidth(),this.getHeight()),this.setClipPath(e)},t.PanZoomComponent.prototype.SetEndGradientColor=function(t){this._endGradientColor=t},t.PanZoomComponent.prototype.SetOptions=function(t){this.Options=this.Defaults?this.Defaults.calcOptions(t):t},t.PanZoomComponent.prototype._getBackgroundGradient=function(n){var e,o=1;if(n&&"#7396C8"!=n){o=t.ColorUtils.getAlpha(n);var a=(t.ColorUtils.getRed("#AECDEA")-t.ColorUtils.getRed("#7396C8"))/(255-t.ColorUtils.getRed("#7396C8")),i=(t.ColorUtils.getGreen("#AECDEA")-t.ColorUtils.getGreen("#7396C8"))/(255-t.ColorUtils.getGreen("#7396C8")),s=(t.ColorUtils.getBlue("#AECDEA")-t.ColorUtils.getBlue("#7396C8"))/(255-t.ColorUtils.getBlue("#7396C8")),l=t.ColorUtils.getRed(n),r=t.ColorUtils.getGreen(n),_=t.ColorUtils.getBlue(n),h=Math.round(l+a*(255-l)),u=Math.round(r+i*(255-r)),p=Math.round(_+s*(255-_)),C=t.ColorUtils.makeRGB(h,u,p),P=t.ColorUtils.getRGB(n);e=new Array("#FFFFFF","#FFFFFF",C,P)}else e=["#FFFFFF","#FFFFFF","#AECDEA","#7396C8"];var m=[o,o,o,o],c=this.Width,E=1.7*c*1.7,d=1.7*this.Height,T=0+(c-E)/2,A=T+E/2,g=d/2-35,O=1.5*Math.min(E/2,d/2),B=[T,-35,E,d];return new t.RadialGradientFill(e,m,[0,45/255,190/255,1],A,g,O,B)},t.PanZoomComponent.prototype._handleControlPanelEvent=function(n){var e=t.EventFactory.newAdfPropertyChangeEvent(t.ControlPanel.CONTROL_PANEL_BEHAVIOR_KEY,n.getSubType()==o.SUBTYPE_SHOW?t.PanZoomComponent.CONTROL_PANEL_BEHAVIOR_INIT_EXPANDED:t.PanZoomComponent.CONTROL_PANEL_BEHAVIOR_INIT_COLLAPSED);this.dispatchEvent(e)},t.PanZoomComponent.prototype._loadXml=function(t){if(null!=t&&0!=t.length){var n=this.GetXmlStringParser();if(n){var e=n.parse(t);e&&("r"===e.getName()&&(e=e.getFirstChild()),e&&this.GetXmlDomParser().loadXmlInitial(e))}}},t.PanZoomComponent.prototype._setSkinName=function(t){this._skinName=t},t.PanZoomComponent.prototype.setSubcomponentStyles=function(t){this._subcomponentStyles=t},t.PanZoomComponent.prototype._getLegendMaxWidthValue=function(n,e){var o=e;return n?(o=t.StringUtils.trim(n),t.StringUtils.endsWith(o,"%")?(o=t.StringUtils.trim(o.replace(/\%$/,"")),isNaN(parseFloat(o))||(o=parseFloat(o)/100*e)):t.StringUtils.endsWith(o,"px")&&(o=o.replace(/px$/,"")),o=isNaN(parseFloat(o))?e:parseFloat(o),Math.min(o,e)):o},t.PanZoomComponent.prototype.destroy=function(){this._panZoomCanvas&&(this._panZoomCanvas.destroy(),this._panZoomCanvas=null),t.PanZoomComponent.superclass.destroy.call(this)},t.PanZoomComponent.prototype.ensureObjInViewport=function(n,e){if(this._panZoomCanvas.isPanningEnabled()){this._panAnimator&&(this._panningInterrupted=!0,this._panAnimator.stop());var o=this.Width,a=this.Height,i=e.getKeyboardBoundingBox(this.getCtx().getStage()),s=new t.Rectangle(0,0,o,a);if(!s.getUnion(i).equals(s)){var l=0,r=0,_=i.w,h=i.h,u=i.x,p=i.y;_<=o?u<0?l=u:u+_>o&&(l=u+_-o):l=u+.5*_-.5*o,h<=a?p<0?r=p:p+h>a&&(r=p+h-a):r=p+.5*h-.5*a;var C=new t.Animator(this.getCtx(),this.getAnimationDuration());this._panAnimator=C;var P=this;this.getPanZoomCanvas().panBy(-l,-r,C,function(){P._panAnimator=null,P.getEventManager().showFocusEffect(n,e),P._panningInterrupted=!1}),C.play()}}},t.PanZoomComponent.prototype.isPanning=function(){return null!=this._panAnimator||this._panningInterrupted},t.PanZoomCanvas=function(t,n,e,o){this.Init(t,n,e,o)},t.Obj.createSubclass(t.PanZoomCanvas,t.Container),t.PanZoomCanvas.DEFAULT_PAN_INCREMENT=15,t.PanZoomCanvas.DEFAULT_ZOOM_INCREMENT=.05,t.PanZoomCanvas.DEFAULT_ANIMATION_DURATION=.5,t.PanZoomCanvas.DEFAULT_PADDING=20,t.PanZoomCanvas.DEFAULT_DISPLAYED_CONTROLS=t.ControlPanel.CONTROLS_ALL,t.PanZoomCanvas.prototype.Init=function(n,e,o,a){t.PanZoomCanvas.superclass.Init.call(this,n),this._view=a,this._ww=e,this._hh=o,this._px=0,this._py=0,this._mx=0,this._my=0,this._minPanX=null,this._maxPanX=null,this._minPanY=null,this._maxPanY=null,this._minZoom=.1,this._maxZoom=1,this._panIncrement=t.PanZoomCanvas.DEFAULT_PAN_INCREMENT,this._zoomIncrement=t.PanZoomCanvas.DEFAULT_ZOOM_INCREMENT,this._bTiltPanningEnabled=!1,this._zoomToFitPadding=t.PanZoomCanvas.DEFAULT_PADDING,this._controlPanel=null,this._bPanningEnabled=!0,this._panDirection="auto",this._bZoomingEnabled=!0,this._bZoomToFitEnabled=!0,this._backgroundPane=new t.Rect(this.getCtx(),0,0,this._ww,this._hh),this.addChild(this._backgroundPane),this._backgroundPane.setInvisibleFill(),this._contentPane=new t.Container(this.getCtx()),this.addChild(this._contentPane),this._contentPane.setMatrix(new t.Matrix),this._animationDuration=t.PanZoomCanvas.DEFAULT_ANIMATION_DURATION,this._eventManager=new t.PanZoomCanvasEventManager(n,this.FireListener,this),this._eventManager.addListeners(this),this._clipIdSuffix=1,this.SetClipRect(e,o),this._bElasticConstraints=!1,this._elasticConstraintsAnim=null},t.PanZoomCanvas.prototype.setSize=function(t,n,e){this._ww=t,this._hh=n,e||(this._backgroundPane.setWidth(t),this._backgroundPane.setHeight(n),this._controlPanel&&this.PositionControlPanel(),this.SetClipRect(t,n))},t.PanZoomCanvas.prototype.getSize=function(){return new t.Dimension(this._ww,this._hh)},t.PanZoomCanvas.prototype.SetClipRect=function(n,e){var o=new t.ClipPath("pzc");o.addRect(this.getTranslateX(),this.getTranslateY(),n,e),this.setClipPath(o)},t.PanZoomCanvas.prototype.getContentPane=function(){return this._contentPane},t.PanZoomCanvas.prototype.setContentPane=function(t){this._contentPane=t},t.PanZoomCanvas.prototype.getBackgroundPane=function(){return this._backgroundPane},t.PanZoomCanvas.prototype.getContentPaneMatrix=function(t){if(t){var n=t.getDestVal(this._contentPane,this._contentPane.getMatrix);if(n)return n}return this._contentPane.getMatrix()},t.PanZoomCanvas.prototype.getZoom=function(t){return this.getContentPaneMatrix(t).getA()},t.PanZoomCanvas.prototype.getPanX=function(t){return this.getContentPaneMatrix(t).getTx()},t.PanZoomCanvas.prototype.getPanY=function(t){return this.getContentPaneMatrix(t).getTy()},t.PanZoomCanvas.prototype.setZoomToFitPadding=function(t){this._zoomToFitPadding=t},t.PanZoomCanvas.prototype.getZoomToFitPadding=function(){return this._zoomToFitPadding},t.PanZoomCanvas.prototype.panBy=function(n,e,o,a){if(this.isPanningEnabled()){var i=this.getPanX(o),s=this.getPanY(o),l="y"==this.getPanDirection()?i:this.ConstrainPanX(i+n),r="x"==this.getPanDirection()?s:this.ConstrainPanY(s+e),_=l-i,h=r-s,u=null;o&&(u=o.getDestVal(this._contentPane,this._contentPane.getMatrix))&&(u=u.clone()),u||(u=this._contentPane.getMatrix().clone()),u.translate(_,h);var p=this,C=function(){p.FirePanEvent(t.PanEvent.SUBTYPE_PANNING,l,r,i,s,o)},P=function(){p.FirePanEvent(t.PanEvent.SUBTYPE_PANNED,l,r,i,s,o)};o?(o.addProp(t.Animator.TYPE_MATRIX,this._contentPane,this._contentPane.getMatrix,this._contentPane.setMatrix,u),t.Playable.prependOnInit(o,C),t.Playable.appendOnEnd(o,P),a&&t.Playable.appendOnEnd(o,a)):(C(),this._contentPane.setMatrix(u),P(),a&&a())}},t.PanZoomCanvas.prototype.panTo=function(t,n,e){if(this.isPanningEnabled()){var o=t-this.getPanX(e),a=n-this.getPanY(e);this.panBy(o,a,e)}},t.PanZoomCanvas.prototype.zoomBy=function(n,e,o,a){if(this.isZoomingEnabled()){e||0===e||(e=this._ww/2),o||0===o||(o=this._hh/2);var i=this.getZoom(a),s=this.ConstrainZoom(i*n);if(this.adjustZoomControls(s),t.PanZoomCanvas.RoundFloatForCompare(i)!=t.PanZoomCanvas.RoundFloatForCompare(s)){var l=s/i,r=null;a&&(r=a.getDestVal(this._contentPane,this._contentPane.getMatrix))&&(r=r.clone()),r||(r=this._contentPane.getMatrix().clone()),r.scale(l,l,e,o);var _=this.ConstrainPanX(r.getTx())-r.getTx(),h=this.ConstrainPanY(r.getTy())-r.getTy();this.FireZoomEvent(t.ZoomEvent.SUBTYPE_ADJUST_PAN_CONSTRAINTS,s,i,a,e,o,_,h),_=this.ConstrainPanX(r.getTx())-r.getTx(),h=this.ConstrainPanY(r.getTy())-r.getTy(),r.translate(_,h);var u=this,p=function(){u.FireZoomEvent(t.ZoomEvent.SUBTYPE_ZOOMING,s,i,a,e,o,_,h)},C=function(){u.FireZoomEvent(t.ZoomEvent.SUBTYPE_ZOOMED,u.getZoom(),i,a,e,o,_,h)};a?(a.addProp(t.Animator.TYPE_MATRIX,this._contentPane,this._contentPane.getMatrix,this._contentPane.setMatrix,r),t.Playable.prependOnInit(a,p),t.Playable.appendOnEnd(a,C)):(p(),this._contentPane.setMatrix(r),C())}}},t.PanZoomCanvas.prototype.zoomTo=function(t,n,e,o){if(this.isZoomingEnabled()){var a=t/this.getZoom(o);this.zoomBy(a,n,e,o)}},t.PanZoomCanvas.prototype.center=function(t,n){var e=this.isPanningEnabled(),o=this.getPanDirection();this.setPanningEnabled(!0),this.setPanDirection("auto");var a=n;a||(a=this._contentPane.getDimensions());var i=(a.x+a.w/2)*this.getZoom(),s=(a.y+a.h/2)*this.getZoom(),l=this._ww/2-i,r=this._hh/2-s;this.panTo(l,r,t),this.setPanningEnabled(e),this.setPanDirection(o)},t.PanZoomCanvas.prototype.zoomToFit=function(n,e){if(this.isZoomToFitEnabled()){var o=this.isPanningEnabled(),a=this.getPanDirection(),i=this.isZoomingEnabled();this.setPanningEnabled(!0),this.setPanDirection("auto"),this.setZoomingEnabled(!0);try{var s=e||this._contentPane.getDimensions();if(!s)return;var l=(this._ww-2*this._zoomToFitPadding)/s.w,r=(this._hh-2*this._zoomToFitPadding)/s.h,_=Math.min(l,r);_=this.ConstrainZoom(_);var h=(s.x+s.w/2)*_,u=(s.y+s.h/2)*_,p=this._ww/2-h,C=this._hh/2-u,P=this.getZoom(n),m=this,c=function(){m.FireZoomEvent(t.ZoomEvent.SUBTYPE_ZOOM_TO_FIT_BEGIN,null,null,n)},E=function(){m.FireZoomEvent(t.ZoomEvent.SUBTYPE_ZOOM_TO_FIT_END,m.getZoom(),P,n)};n?t.Playable.prependOnInit(n,c):c(),this.zoomTo(_,0,0,n),this.panTo(p,C,n),n?t.Playable.appendOnEnd(n,E):E()}finally{this.setPanningEnabled(o),this.setPanDirection(a),this.setZoomingEnabled(i)}}},t.PanZoomCanvas.prototype.calcZoomToFitScale=function(t){t||(t=this._contentPane.getDimensions());var n=(this._ww-2*this._zoomToFitPadding)/t.w,e=(this._hh-2*this._zoomToFitPadding)/t.h,o=Math.min(n,e);return o=this.ConstrainZoom(o)},t.PanZoomCanvas.prototype.calcZoomToFitBounds=function(){var t=this._contentPane.getDimensions();return t.x-=this._zoomToFitPadding,t.y-=this._zoomToFitPadding,t.w+=2*this._zoomToFitPadding,t.h+=2*this._zoomToFitPadding,t},t.PanZoomCanvas.prototype.getViewport=function(){var n=this.localToStage(new t.Point(0,0)),e=this.localToStage(new t.Point(this._ww,this._hh)),o=this.getContentPane().stageToLocal(n),a=this.getContentPane().stageToLocal(e);return new t.Rectangle(o.x,o.y,a.x-o.x,a.y-o.y)},t.PanZoomCanvas.prototype.SetElasticConstraints=function(n){if(this._bElasticConstraints=n,n)this._elasticConstraintsAnim&&(this._elasticConstraintsAnim.isRunning()&&this._elasticConstraintsAnim.stop(),this._elasticConstraintsAnim=null);else{var e=this.getPanX(),o=this.getPanY(),a=this.getZoom();this._bElasticPan=e!=this.ConstrainPanX(e)||o!=this.ConstrainPanY(o),this._bElasticZoom=a!=this.ConstrainZoom(a),(this._bElasticPan||this._bElasticZoom)&&(this._elasticConstraintsAnim=new t.Animator(this.getCtx(),.4),this._elasticConstraintsAnim.setEasing(t.Easing.cubicOut),this._bElasticZoom&&this.zoomBy(1,.5*this._ww,.5*this._hh,this._elasticConstraintsAnim),this._bElasticPan&&this.panBy(0,0,this._elasticConstraintsAnim),t.Playable.appendOnEnd(this._elasticConstraintsAnim,this._elasticConstraintsAnimOnEnd,this),this._bElasticPan&&this.FirePanEvent(t.PanEvent.SUBTYPE_ELASTIC_ANIM_BEGIN,null,null,null,null,this._elasticConstraintsAnim),this._bElasticZoom&&this.FireZoomEvent(t.ZoomEvent.SUBTYPE_ELASTIC_ANIM_BEGIN,null,null,null,null,this._elasticConstraintsAnim),this._elasticConstraintsAnim.play())}},t.PanZoomCanvas.prototype.IsElasticConstraints=function(){return this._bElasticConstraints},t.PanZoomCanvas.prototype._elasticConstraintsAnimOnEnd=function(){this._elasticConstraintsAnim=null,this._bElasticPan&&this.FirePanEvent(t.PanEvent.SUBTYPE_ELASTIC_ANIM_END),this._bElasticZoom&&this.FireZoomEvent(t.ZoomEvent.SUBTYPE_ELASTIC_ANIM_END)},t.PanZoomCanvas.prototype._panDampingFunc=function(t,n){var e=.01*n;return Math.sqrt(4*e*t)},t.PanZoomCanvas.prototype._zoomDampingFunc=function(t,n){var e=.002*n;return Math.sqrt(4*e*t)},t.PanZoomCanvas.prototype.ConstrainPanX=function(t){var n=t;if(null!=this._minPanX&&n<this._minPanX)if(this.IsElasticConstraints()){var e=this._minPanX-n;n=this._minPanX-this._panDampingFunc(e,this._ww)}else n=this._minPanX;if(null!=this._maxPanX&&n>this._maxPanX)if(this.IsElasticConstraints()){e=n-this._maxPanX;n=this._maxPanX+this._panDampingFunc(e,this._ww)}else n=this._maxPanX;return n},t.PanZoomCanvas.prototype.ConstrainPanY=function(t){var n=t;if(null!=this._minPanY&&n<this._minPanY)if(this.IsElasticConstraints()){var e=this._minPanY-n;n=this._minPanY-this._panDampingFunc(e,this._hh)}else n=this._minPanY;if(null!=this._maxPanY&&n>this._maxPanY)if(this.IsElasticConstraints()){e=n-this._maxPanY;n=this._maxPanY+this._panDampingFunc(e,this._hh)}else n=this._maxPanY;return n},t.PanZoomCanvas.prototype.ConstrainZoom=function(t){var n=Math.max(0,t);if(this._minZoom&&n<this._minZoom)if(this.IsElasticConstraints()){var e=this._minZoom-n;n=this._minZoom-this._zoomDampingFunc(e,this._maxZoom-this._minZoom)}else n=this._minZoom;if(this._maxZoom&&n>this._maxZoom)if(this.IsElasticConstraints()){e=n-this._maxZoom;n=this._maxZoom+this._zoomDampingFunc(e,this._maxZoom-this._minZoom)}else n=this._maxZoom;return n},t.PanZoomCanvas.RoundFloatForCompare=function(t){return Math.round(1e5*t)},t.PanZoomCanvas.prototype.renderComponent=function(){var t=this.getControlPanel();t&&(this.addChild(t),this.PositionControlPanel(),t.renderComponent())},t.PanZoomCanvas.prototype.setControlPanel=function(t){this._controlPanel=t},t.PanZoomCanvas.prototype.getControlPanel=function(){return this._controlPanel},t.PanZoomCanvas.prototype.PositionControlPanel=function(){var n,e=this._view.getSubcomponentStyles(),o=t.StyleUtils.getStyle(e,t.ControlPanel.CP_PADDING_SIDE,0),a=t.StyleUtils.getStyle(e,t.ControlPanel.CP_PADDING_TOP,0),i=t.StyleUtils.getStyle(e,t.ControlPanel.CP_OPEN_CLOSE_BUTTON_WIDTH,0);n=t.Agent.isRightToLeft(this.getCtx())?this._ww-i-o:o,this._controlPanel.setTranslate(n,a)},t.PanZoomCanvas.prototype.GetRelativeMousePosition=function(t){return this.getCtx().pageToStageCoords(t.pageX,t.pageY)},t.PanZoomCanvas.prototype.FirePanEvent=function(n,e,o,a,i,s){var l=new t.PanEvent(n,e,o,a,i,s);this.FireListener(l)},t.PanZoomCanvas.prototype.FireZoomEvent=function(n,e,o,a,i,s,l,r){var _=new t.ZoomEvent(n,e,o,a,new t.Point(i,s),l,r);return this.FireListener(_),_},t.PanZoomCanvas.prototype.zoomAndCenter=function(){this.FireZoomEvent(t.ZoomEvent.SUBTYPE_ZOOM_AND_CENTER)},t.PanZoomCanvas.prototype.getNextZoomLevel=function(t){var n=t;return(n+=this.getZoomIncrement())>this.getMaxZoom()&&(n=this.getMaxZoom()),n},t.PanZoomCanvas.prototype.getPrevZoomLevel=function(t){var n=t;return(n-=this.getZoomIncrement())<this.getMinZoom()&&(n=this.getMinZoom()),n},t.PanZoomCanvas.prototype.setZoomIncrement=function(t){this._zoomIncrement=t},t.PanZoomCanvas.prototype.getZoomIncrement=function(){return this._zoomIncrement},t.PanZoomCanvas.prototype.setPanIncrement=function(t){this._panIncrement=t},t.PanZoomCanvas.prototype.getPanIncrement=function(){return this._panIncrement},t.PanZoomCanvas.prototype.setMinZoom=function(t){this._minZoom=t},t.PanZoomCanvas.prototype.getMinZoom=function(){return this._minZoom},t.PanZoomCanvas.prototype.setMaxZoom=function(t){t<0&&(t=1),this._maxZoom=t},t.PanZoomCanvas.prototype.getMaxZoom=function(){return this._maxZoom},t.PanZoomCanvas.prototype.setMinPanX=function(t){this._minPanX=t},t.PanZoomCanvas.prototype.getMinPanX=function(){return this._minPanX},t.PanZoomCanvas.prototype.setMaxPanX=function(t){this._maxPanX=t},t.PanZoomCanvas.prototype.getMaxPanX=function(){return this._maxPanX},t.PanZoomCanvas.prototype.setMinPanY=function(t){this._minPanY=t},t.PanZoomCanvas.prototype.getMinPanY=function(){return this._minPanY},t.PanZoomCanvas.prototype.setMaxPanY=function(t){this._maxPanY=t},t.PanZoomCanvas.prototype.getMaxPanY=function(){return this._maxPanY},t.PanZoomCanvas.prototype.setTiltPanningEnabled=function(t){this._bTiltPanningEnabled=t},t.PanZoomCanvas.prototype.isTiltPanningEnabled=function(t){return this._bTiltPanningEnabled},t.PanZoomCanvas.prototype.setAnimationDuration=function(t){this._animationDuration=t},t.PanZoomCanvas.prototype.getAnimationDuration=function(){return this._animationDuration},t.PanZoomCanvas.prototype.setPanningEnabled=function(t){this._bPanningEnabled=t},t.PanZoomCanvas.prototype.isPanningEnabled=function(){return this._bPanningEnabled},t.PanZoomCanvas.prototype.setPanDirection=function(t){this._panDirection=t},t.PanZoomCanvas.prototype.getPanDirection=function(){return this._panDirection},t.PanZoomCanvas.prototype.setZoomingEnabled=function(t){this._bZoomingEnabled=t},t.PanZoomCanvas.prototype.isZoomingEnabled=function(){return this._bZoomingEnabled},t.PanZoomCanvas.prototype.setZoomToFitEnabled=function(t){this._bZoomToFitEnabled=t},t.PanZoomCanvas.prototype.isZoomToFitEnabled=function(){return this._bZoomToFitEnabled},t.PanZoomCanvas.prototype.adjustZoomControls=function(t){if(this._controlPanel){var n=this.getZoom();t==this.getMinZoom()&&t==this.getMaxZoom()?(this._controlPanel.enableZoomInControl(!1),this._controlPanel.enableZoomOutControl(!1)):n<=t&&t==this.getMaxZoom()?(this._controlPanel.enableZoomInControl(!1),this._controlPanel.enableZoomOutControl(!0)):n>=t&&t==this.getMinZoom()?(this._controlPanel.enableZoomInControl(!0),this._controlPanel.enableZoomOutControl(!1)):(this._controlPanel.enableZoomInControl(!0),this._controlPanel.enableZoomOutControl(!0))}},t.PanZoomCanvas.prototype.setCurrentTouchTargets=function(t){this._currTargets=t},t.PanZoomCanvas.prototype.getCurrentTouchTargets=function(){return this._currTargets},t.PanZoomCanvas.prototype.resetTouchTargets=function(){t.Agent.isTouchDevice()&&(this._currTargets=null,this._eventManager.TouchManager.reset())},t.PanZoomCanvas.prototype.panZoomEnd=function(){this._eventManager.PanZoomEnd()},t.PanZoomCanvas.prototype.setInteractionEnabled=function(t){t?this._eventManager.addListeners(this):this._eventManager.removeListeners(this)},t.PanZoomCanvas.prototype.destroy=function(){this._elasticConstraintsAnim&&(this._elasticConstraintsAnim.stop(!0),this._elasticConstraintsAnim=null),this._eventManager&&(this._eventManager.removeListeners(this),this._eventManager.destroy(),this._eventManager=null),t.PanZoomCanvas.superclass.destroy.call(this)},t.PanZoomCanvas.prototype.setPanCursor=function(n,e){t.Agent.isPlatformIE()||(n&&(this._panUpCursor="url("+n+") 8 8, auto"),e&&(this._panDownCursor="url("+e+") 8 8, auto"))},t.PanZoomCanvas.prototype.getCursor=function(t){return this._bPanningEnabled?t?this._panDownCursor?this._panDownCursor:"move":this._panUpCursor?this._panUpCursor:"move":"inherit"},t.PanZoomCanvasEventManager=function(t,n,e){this.Init(t,n,e)},t.Obj.createSubclass(t.PanZoomCanvasEventManager,t.EventManager),t.PanZoomCanvasEventManager.EVENT_INFO_PANNED_KEY="panned",t.PanZoomCanvasEventManager.prototype.Init=function(n,e,o){t.PanZoomCanvasEventManager.superclass.Init.call(this,n,e,o),this._pzc=o,this._zoomAnimator=null,this._bPanning=!1,this._bPanned=!1,this._bZooming=!1,this._bDragging=!1,this._bMomentumPanning=!0},t.PanZoomCanvasEventManager._PAN_TOUCH_KEY="panTouch",t.PanZoomCanvasEventManager._ZOOM_TOUCH_KEY="zoomTouch",t.PanZoomCanvasEventManager._MOMENTUM_START_TIMER_INTERVAL=50,t.PanZoomCanvasEventManager.prototype.addListeners=function(n){t.PanZoomCanvasEventManager.superclass.addListeners.call(this,n),n.addEvtListener(t.MouseEvent.MOUSEWHEEL,this.OnMouseWheel,!1,this)},t.PanZoomCanvasEventManager.prototype.RemoveListeners=function(n){t.PanZoomCanvasEventManager.superclass.RemoveListeners.call(this,n),n.removeEvtListener(t.MouseEvent.MOUSEWHEEL,this.OnMouseWheel,!1,this)},t.PanZoomCanvasEventManager.prototype.OnMouseDown=function(n){if(this._bDragging=!1,this._bPanned=!1,n.button!=t.MouseEvent.RIGHT_CLICK_BUTTON){var e=this._callbackObj.GetRelativeMousePosition(n);this._mx=e.x,this._my=e.y,this._px=this._mx,this._py=this._my,this._bDown=!0,this._origPanX=this._callbackObj.getPanX(),this._origPanY=this._callbackObj.getPanY(),this._origZoom=this._callbackObj.getZoom(),this._bMomentumPanning&&(this._currTime=(new Date).getTime())}this._momentumTimer&&this._momentumTimer.isRunning()&&(this._momentumTimer.stop(),this._momentumTimer.reset())},t.PanZoomCanvasEventManager.prototype.OnMouseMove=function(n){var e=this._callbackObj.GetRelativeMousePosition(n);if(!(Math.abs(e.x-this._px)<=3&&Math.abs(e.y-this._py)<=3)){if(this._callbackObj.setCursor("grab"),this._bDown){this._callbackObj.setCursor("grabbing"),this._bDragging=!0;var o=(e=this._callbackObj.GetRelativeMousePosition(n)).x,a=e.y;if(n.ctrlKey){this._bZooming||(this._callback.call(this._callbackObj,new t.ZoomEvent(t.ZoomEvent.SUBTYPE_DRAG_ZOOM_BEGIN)),this._bZooming=!0,this._pzc.getControlPanel()&&this._pzc.getControlPanel().mouseDragPanningStarted(),this._callbackObj.SetElasticConstraints(!0));var i=this._py>=a?1:-1,s=this._origZoom*Math.pow(1+.01*i,Math.abs(this._py-a));this._callbackObj.isPanningEnabled()?this._callbackObj.zoomTo(s,this._px,this._py):this._callbackObj.zoomTo(s,null,null)}else this._handlePanMove(o,a);this._mx=o,this._my=a}this._callbackObj.setCursor(this._callbackObj.getCursor(this._bDown))}},t.PanZoomCanvasEventManager.prototype.OnMouseUp=function(n){this.PanZoomEnd(),t.PanZoomCanvasEventManager.superclass.OnMouseUp.call(this,n)},t.PanZoomCanvasEventManager.prototype.OnClick=function(n){(this._bDragging||this._bPanned)&&(this._bDragging=!1,this._bPanned=!1,t.EventManager.consumeEvent(n))},t.PanZoomCanvasEventManager.prototype.OnMouseOut=function(n){this._bDown&&(this._bPanning||this._bZooming)&&(n.relatedTarget&&null!=n.relatedTarget||this.OnMouseUp(n)),t.PanZoomCanvasEventManager.superclass.OnMouseOut.call(this,n)},t.PanZoomCanvasEventManager.prototype.OnMouseWheel=function(n){if(n.wheelDelta&&0!==n.wheelDelta&&this._callbackObj.isZoomingEnabled()){var e=this._callbackObj.getZoom();if(this._zoomAnimator){var o=this._zoomAnimator;this._zoomAnimator.stop(),e=this._callbackObj.getZoom(o),this._zoomAnimator=null,o=null}this._zoomAnimator=null;var a=n.wheelDelta,i=e*(1+this._callbackObj.getZoomIncrement()*a/Math.abs(a)),s=this._callbackObj.GetRelativeMousePosition(n);this.getCtx().getDocumentUtils().cancelDomEvent(n),this._callbackObj.isPanningEnabled()?this._callbackObj.zoomTo(i,s.x,s.y,this._zoomAnimator):this._callbackObj.zoomTo(i,null,null,this._zoomAnimator),this._zoomAnimator&&(t.Playable.appendOnEnd(this._zoomAnimator,this._clearZoomAnimator,this),this._zoomAnimator.play())}},t.PanZoomCanvasEventManager.prototype._clearZoomAnimator=function(){this._zoomAnimator=null},t.PanZoomCanvasEventManager.prototype._handleMomentumStartTimer=function(){},t.PanZoomCanvasEventManager.prototype._handleMomentumTimer=function(){var t=1-.04*this._momentumIterCount;t*=t;var n=this._momentumTimer.getInterval(),e=t*this._momentumXperMS*n,o=t*this._momentumYperMS*n;this._momentumDx+=e,this._momentumDy+=o;var a=this._origPanX+this._mx-this._px+this._momentumDx,i=this._origPanY+this._my-this._py+this._momentumDy;this._callbackObj.panTo(a,i);var s=!1;if(this._momentumIterCount>=24)s=!0;else{var l=this._callbackObj.getPanX(),r=this._callbackObj.getPanY(),_=this._pzc.getPanDirection();(Math.abs(l-a)>Math.abs(e)&&"y"!=_||Math.abs(r-i)>Math.abs(o)&&"x"!=_)&&(s=!0)}s?(this._momentumTimer.stop(),this._momentumTimer.reset(),this._callbackObj.SetElasticConstraints(!1)):this._momentumIterCount++},t.PanZoomCanvasEventManager.prototype.HandleImmediateTouchStartInternal=function(n){this._callbackObj.isZoomingEnabled()&&this.TouchManager.processAssociatedTouchAttempt(n,t.PanZoomCanvasEventManager._ZOOM_TOUCH_KEY,this.ZoomStartTouch,this),this._callbackObj.isPanningEnabled()&&this.TouchManager.processAssociatedTouchAttempt(n,t.PanZoomCanvasEventManager._PAN_TOUCH_KEY,this.PanStartTouch,this)},t.PanZoomCanvasEventManager.prototype.HandleImmediateTouchMoveInternal=function(n){this._callbackObj.isZoomingEnabled()&&this.TouchManager.processAssociatedTouchMove(n,t.PanZoomCanvasEventManager._ZOOM_TOUCH_KEY),this._callbackObj.isPanningEnabled()&&this.TouchManager.processAssociatedTouchMove(n,t.PanZoomCanvasEventManager._PAN_TOUCH_KEY),(this._callbackObj.isZoomingEnabled()||this._callbackObj.isPanningEnabled())&&n.preventDefault()},t.PanZoomCanvasEventManager.prototype.HandleImmediateTouchEndInternal=function(n){this._callbackObj.isZoomingEnabled()&&this.TouchManager.processAssociatedTouchEnd(n,t.PanZoomCanvasEventManager._ZOOM_TOUCH_KEY),this._callbackObj.isPanningEnabled()&&this.TouchManager.processAssociatedTouchEnd(n,t.PanZoomCanvasEventManager._PAN_TOUCH_KEY)},t.PanZoomCanvasEventManager.prototype.ZoomStartTouch=function(n,e){var o=this.TouchManager.getTouchIdsForObj(t.PanZoomCanvasEventManager._ZOOM_TOUCH_KEY);o.length<=1&&(this.TouchManager.saveProcessedTouch(e.identifier,t.PanZoomCanvasEventManager._ZOOM_TOUCH_KEY,null,t.PanZoomCanvasEventManager._ZOOM_TOUCH_KEY,t.PanZoomCanvasEventManager._ZOOM_TOUCH_KEY,this.ZoomMoveTouch,this.ZoomEndTouch,this),this._mx=e.pageX,this._my=e.pageY,this._px=this._mx,this._py=this._my,this._origPanX=this._callbackObj.getPanX(),this._origPanY=this._callbackObj.getPanY(),this._origZoom=this._callbackObj.getZoom(),this._origDist=null,o=this.TouchManager.getTouchIdsForObj(t.PanZoomCanvasEventManager._ZOOM_TOUCH_KEY),this._callbackObj.setCurrentTouchTargets(this.TouchManager.getStartTargetsByIds(o))),this._momentumTimer&&this._momentumTimer.isRunning()&&(this._momentumTimer.stop(),this._momentumTimer.reset())},t.PanZoomCanvasEventManager.prototype.ZoomMoveTouch=function(n,e){var o=this.TouchManager.getTouchIdsForObj(t.PanZoomCanvasEventManager._ZOOM_TOUCH_KEY);if(2==o.length){var a=this.TouchManager.getMultiTouchData(o);if(a){this._bZooming||(this._bZooming=!0,this.TouchManager.blockTouchHold(),this._callback.call(this._callbackObj,new t.ZoomEvent(t.ZoomEvent.SUBTYPE_DRAG_ZOOM_BEGIN)),this._pzc.getControlPanel()&&this._pzc.getControlPanel().mouseDragPanningStarted()),this._callbackObj.SetElasticConstraints(!0),null==this._origDist&&(this._origDist=a.dist-a.dz);var i=this._origZoom*(a.dist/this._origDist),s=this._pzc.getCtx().pageToStageCoords(a.cx,a.cy);this.hideTooltip(),this._callbackObj.setCurrentTouchTargets(this.TouchManager.getStartTargetsByIds(o)),this._callbackObj.zoomTo(i,s.x,s.y),this._callbackObj.panBy(a.dcx,a.dcy)}}},t.PanZoomCanvasEventManager.prototype.ZoomEndTouch=function(n,e){this._bZooming&&(this._origDist=null,this.TouchManager.unblockTouchHold(),this._handleZoomEnd());var o=this.TouchManager.getTouchIdsForObj(t.PanZoomCanvasEventManager._ZOOM_TOUCH_KEY);this._callbackObj.setCurrentTouchTargets(this.TouchManager.getStartTargetsByIds(o)),0==o.length&&this._callback.call(this._callbackObj,new t.ZoomEvent(t.ZoomEvent.SUBTYPE_ZOOM_END,this._callbackObj.getZoom(),this._origZoom))},t.PanZoomCanvasEventManager.prototype.PanStartTouch=function(n,e){this._bZooming||this.TouchManager.getTouchIdsForObj(t.PanZoomCanvasEventManager._PAN_TOUCH_KEY).length<=1&&(this.TouchManager.saveProcessedTouch(e.identifier,t.PanZoomCanvasEventManager._PAN_TOUCH_KEY,null,t.PanZoomCanvasEventManager._PAN_TOUCH_KEY,t.PanZoomCanvasEventManager._PAN_TOUCH_KEY,this.PanMoveTouch,this.PanEndTouch,this),this._mx=e.pageX,this._my=e.pageY,this._px=this._mx,this._py=this._my,this._origPanX=this._callbackObj.getPanX(),this._origPanY=this._callbackObj.getPanY(),this._origZoom=this._callbackObj.getZoom(),this._bMomentumPanning&&(this._currTime=(new Date).getTime()));this._momentumTimer&&this._momentumTimer.isRunning()&&(this._momentumTimer.stop(),this._momentumTimer.reset())},t.PanZoomCanvasEventManager.prototype.PanMoveTouch=function(n,e){if(!this._bZooming&&1==this.TouchManager.getTouchIdsForObj(t.PanZoomCanvasEventManager._PAN_TOUCH_KEY).length){var o=e.pageX,a=e.pageY;this._handlePanMove(o,a),this._mx=o,this._my=a}},t.PanZoomCanvasEventManager.prototype.PanEndTouch=function(t,n){!this._bZooming&&this._bPanning&&(this._handlePanEnd(),this.SetEventInfo(t,"panned",!0))},t.PanZoomCanvasEventManager.prototype._handleZoomEnd=function(){this._callback.call(this._callbackObj,new t.ZoomEvent(t.ZoomEvent.SUBTYPE_DRAG_ZOOM_END)),this._bZooming=!1,this._pzc.getControlPanel()&&this._pzc.getControlPanel().mouseDragPanningEnded(),this._callbackObj.SetElasticConstraints(!1)},t.PanZoomCanvasEventManager.prototype._handlePanMove=function(n,e){this._bPanning||(this._callback.call(this._callbackObj,new t.PanEvent(t.PanEvent.SUBTYPE_DRAG_PAN_BEGIN)),this._bPanning=!0,this._pzc.getControlPanel()&&this._pzc.getControlPanel().mouseDragPanningStarted(),this._callbackObj.SetElasticConstraints(!0),this._bMomentumPanning&&(this._arLastNMouseMoves=[])),this._callbackObj.panTo(this._origPanX+n-this._px,this._origPanY+e-this._py),this._bMomentumPanning&&(this._lastTime=this._currTime,this._currTime=(new Date).getTime(),this._momentumStartTimer?(this._momentumStartTimer.isRunning()&&this._momentumStartTimer.stop(),this._momentumStartTimer.reset()):this._momentumStartTimer=new t.Timer(this._context,t.PanZoomCanvasEventManager._MOMENTUM_START_TIMER_INTERVAL,this._handleMomentumStartTimer,this,1),this._arLastNMouseMoves.push({dt:this._currTime-this._lastTime,dx:n-this._mx,dy:e-this._my}),this._arLastNMouseMoves.length>5&&this._arLastNMouseMoves.splice(0,1),this._momentumStartTimer.start())},t.PanZoomCanvasEventManager.prototype._handlePanEnd=function(){if(this._callback.call(this._callbackObj,new t.PanEvent(t.PanEvent.SUBTYPE_DRAG_PAN_END)),this._bPanning=!1,this._bPanned=!0,this._pzc.getControlPanel()&&this._pzc.getControlPanel().mouseDragPanningEnded(),this._momentumStartTimer&&this._momentumStartTimer.isRunning()){this._momentumStartTimer.stop(),this._momentumStartTimer.reset(),this._momentumTimer?this._momentumTimer.reset():this._momentumTimer=new t.Timer(this._context,t.PanZoomCanvasEventManager._MOMENTUM_START_TIMER_INTERVAL,this._handleMomentumTimer,this);for(var n=0,e=0,o=0,a=this._arLastNMouseMoves.length;this._arLastNMouseMoves.length>0;){var i=this._arLastNMouseMoves.pop();n+=i.dt,e+=i.dx,o+=i.dy}this._arLastNMouseMoves=null,this._momentumXperMS=e/n,this._momentumYperMS=o/n,this._momentumTimer.setInterval(Math.ceil(n/a)),this._momentumIterCount=1,this._momentumDx=0,this._momentumDy=0,this._pzc.isPanningEnabled()&&this._momentumTimer.start()}else this._callbackObj.SetElasticConstraints(!1)},t.PanZoomCanvasEventManager.prototype.PanZoomEnd=function(){this._bDown=!1,this._bDragging=!1,this._bPanning&&this._handlePanEnd(),this._bZooming&&this._handleZoomEnd(),this._callbackObj.setCursor(this._callbackObj.getCursor(this._bDown))},t.PanZoomCanvasEventManager.prototype.GetTouchResponse=function(){return this._pzc.isPanningEnabled()||this._pzc.isZoomingEnabled()?t.EventManager.TOUCH_RESPONSE_TOUCH_HOLD:t.EventManager.TOUCH_RESPONSE_AUTO},t.PanZoomCanvasEventManager.prototype.StoreInfoByEventType=function(n){return n!=t.PanZoomCanvasEventManager.EVENT_INFO_PANNED_KEY&&t.PanZoomCanvasEventManager.superclass.StoreInfoByEventType.call(this,n)},t.PanZoomCanvasKeyboardHandler=function(t,n){this.Init(t,n)},t.Obj.createSubclass(t.PanZoomCanvasKeyboardHandler,t.KeyboardHandler),t.PanZoomCanvasKeyboardHandler.prototype.Init=function(n,e){t.PanZoomCanvasKeyboardHandler.superclass.Init.call(this,e),this._component=n},t.PanZoomCanvasKeyboardHandler.prototype.processKeyDown=function(n){var e=n.keyCode,o=this._component.getPanZoomCanvas();if(e==t.KeyboardEvent.PAGE_UP)n.ctrlKey||n.shiftKey?o.panBy(o.getPanIncrement(),0):o.panBy(0,o.getPanIncrement()),n.preventDefault();else if(e==t.KeyboardEvent.PAGE_DOWN)n.ctrlKey||n.shiftKey?o.panBy(-o.getPanIncrement(),0):o.panBy(0,-o.getPanIncrement()),n.preventDefault();else if(e==t.KeyboardEvent.FORWARD_SLASH){var a=o.getControlPanel();a&&a.toggleExpandCollapse()}else if(t.KeyboardEvent.isEquals(n)||t.KeyboardEvent.isPlus(n))o.zoomTo(o.getZoom()+o.getZoomIncrement());else if(t.KeyboardEvent.isMinus(n)||t.KeyboardEvent.isUnderscore(n))o.zoomTo(o.getZoom()-o.getZoomIncrement());else{if(e!=t.KeyboardEvent.ZERO&&e!=t.KeyboardEvent.NUMPAD_ZERO||n.ctrlKey||n.shiftKey)return t.PanZoomCanvasKeyboardHandler.superclass.processKeyDown.call(this,n);o.zoomToFit()}},t.CollapsiblePanel=function(t,n,e,o,a,i,s,l){this.Init(t,n,e,o,a,i,s,l)},t.CollapsiblePanel.COLLAPSE_NORTHEAST="col_northeast",t.CollapsiblePanel.COLLAPSE_SOUTHEAST="col_southeast",t.CollapsiblePanel.COLLAPSE_NORTHWEST="col_northwest",t.CollapsiblePanel.COLLAPSE_SOUTHWEST="col_southwest",t.CollapsiblePanel.ANIMATIONDURATION=.25,t.CollapsiblePanel.BODYCOLOR="#EBEFF5",t.CollapsiblePanel.TITLEBARCLOSEICON_WIDTH=10,t.CollapsiblePanel.TITLEBARCLOSEICON_HEIGHT=10,t.CollapsiblePanel.BUTTONHEIGHT=25,t.CollapsiblePanel.BUTTONWIDTH=10,t.CollapsiblePanel._CONTENT_PADDING=5,t.Obj.createSubclass(t.CollapsiblePanel,t.Container),t.CollapsiblePanel.prototype.Init=function(n,e,o,a,i,s,l,r){t.CollapsiblePanel.superclass.Init.call(this,n),this._maxWidth=e,this._maxHeight=o,this.setCollapseDirection(a),this._buttonImages=i,this._isFixed=r||t.Agent.isEnvironmentBatik(),this._expandTooltip=null,this._collapseTooltip=null,this._animation=null,this._styleMap=s,this._borderColor=t.StyleUtils.getStyle(this._styleMap,t.CSSStyle.BORDER_COLOR,null),this._borderRadius=parseInt(t.StyleUtils.getStyle(this._styleMap,t.CSSStyle.BORDER_RADIUS,null)),this._bgColor=t.StyleUtils.getStyle(this._styleMap,t.CSSStyle.BACKGROUND_COLOR,null),this._bgAlpha=t.StyleUtils.getStyle(this._styleMap,t.ControlPanel.BG_ALPHA,1),this._collapse=void 0!==l&&!l,this._contentContainer=new t.Container(n),this.addChild(this._contentContainer),this._contentContainer.setTranslate(t.CollapsiblePanel._CONTENT_PADDING,t.CollapsiblePanel._CONTENT_PADDING),this.addEvtListener(t.MouseEvent.MOUSEOVER,this.HandleMouseOver,!1,this),this.addEvtListener(t.MouseEvent.MOUSEOUT,this.HandleMouseOut,!1,this)},t.CollapsiblePanel.prototype._drawButton=function(){if(!this._isFixed){this._buttonFrame=t.ControlPanelLAFUtils.createEmptyViewClosedFrame(this.getCtx(),t.CollapsiblePanel.BUTTONHEIGHT,this._styleMap,!1),this._buttonFrame.setAlpha(this._styleMap[t.ControlPanel.FRAME_ROLLOUT_ALPHA]),this.addChild(this._buttonFrame);var n=this._collapseDir==t.CollapsiblePanel.COLLAPSE_NORTHWEST||this._collapseDir==t.CollapsiblePanel.COLLAPSE_SOUTHWEST;this.isCollapsed()?this._collapseExpandButton=t.ButtonLAFUtils.createExpandButton(this.getCtx(),this._buttonImages,t.CollapsiblePanel.BUTTONHEIGHT,this._styleMap,n?t.ButtonLAFUtils.DIR_LEFT:t.ButtonLAFUtils.DIR_RIGHT):this._collapseExpandButton=t.ButtonLAFUtils.createCollapseButton(this.getCtx(),this._buttonImages,t.CollapsiblePanel.BUTTONHEIGHT,this._styleMap,n?t.ButtonLAFUtils.DIR_LEFT:t.ButtonLAFUtils.DIR_RIGHT),this._buttonFrame.addChild(this._collapseExpandButton),this._buttonFrame.setTranslateX(n?this._width:-t.CollapsiblePanel.BUTTONWIDTH),t.Agent.isTouchDevice()?this._collapseExpandButton.addEvtListener(t.TouchEvent.TOUCHSTART,this.OnButtonClick,!1,this):(this._collapseExpandButton.addEvtListener(t.MouseEvent.CLICK,this.OnButtonClick,!1,this),this._collapseExpandButton.addEvtListener(t.MouseEvent.MOUSEOVER,this.OnButtonHoverOver,!1,this),this._collapseExpandButton.addEvtListener(t.MouseEvent.MOUSEOUT,this.OnButtonHoverOut,!1,this))}},t.CollapsiblePanel.prototype.setBackgroundFill=function(t){this._background.setFill(t)},t.CollapsiblePanel.prototype.setBackgroundStroke=function(t){this._background.setStroke(t)},t.CollapsiblePanel.prototype.setButtonTooltips=function(t,n){this._expandTooltip=t,this._collapseTooltip=n},t.CollapsiblePanel.prototype.addContent=function(n){this._contentContainer.addChild(n),n.addEvtListener(t.ResizeEvent.RESIZE_EVENT,this.HandleResize,!1,this);var e=this._contentContainer.getDimensions();if(this._width=Math.min(this._maxWidth,e.w+2*t.CollapsiblePanel._CONTENT_PADDING),this._height=Math.min(this._maxHeight,e.h+2*t.CollapsiblePanel._CONTENT_PADDING),this._background){this._background.setCmds(this._getOutlinePath(this._width,this._height));var o=this._collapseDir==t.CollapsiblePanel.COLLAPSE_NORTHWEST||this._collapseDir==t.CollapsiblePanel.COLLAPSE_SOUTHWEST;this._buttonFrame&&o&&this._buttonFrame.setTranslateX(this._width)}else this._background=this._createRoundRectangle(this._width,this._height),this.addChildAt(this._background,0),this._drawButton();this._collapse&&this._collapseExpand(!1)},t.CollapsiblePanel.prototype.HandleResize=function(n){var e=n.getWidth()+2*t.CollapsiblePanel._CONTENT_PADDING,o=n.getHeight()+2*t.CollapsiblePanel._CONTENT_PADDING;this._background.setCmds(this._getOutlinePath(e,o));var a=this._collapseDir==t.CollapsiblePanel.COLLAPSE_NORTHWEST||this._collapseDir==t.CollapsiblePanel.COLLAPSE_SOUTHWEST;this._buttonFrame&&a&&this._buttonFrame.setTranslateX(e),this.FireListener(new t.ResizeEvent(e,o,0,0))},t.CollapsiblePanel.prototype.isCollapsed=function(){return this._collapse},t.CollapsiblePanel.prototype.setCollapsed=function(n){this._collapse!=n&&(this._collapse=n,this._collapseExpand(!0),this.FireListener(new t.CollapsiblePanelEvent(n?t.CollapsiblePanelEvent.SUBTYPE_HIDE:t.CollapsiblePanelEvent.SUBTYPE_SHOW)))},t.CollapsiblePanel.prototype.setCollapseDirection=function(n){this._collapseDir=n||t.CollapsiblePanel.COLLAPSE_NORTHEAST,t.Agent.isRightToLeft(this.getCtx())&&(this._collapseDir==t.CollapsiblePanel.COLLAPSE_NORTHEAST?this._collapseDir=t.CollapsiblePanel.COLLAPSE_NORTHWEST:this._collapseDir==t.CollapsiblePanel.COLLAPSE_NORTHWEST?this._collapseDir=t.CollapsiblePanel.COLLAPSE_NORTHEAST:this._collapseDir==t.CollapsiblePanel.COLLAPSE_SOUTHEAST?this._collapseDir=t.CollapsiblePanel.COLLAPSE_SOUTHWEST:this._collapseDir==t.CollapsiblePanel.COLLAPSE_SOUTHWEST&&(this._collapseDir=t.CollapsiblePanel.COLLAPSE_SOUTHEAST))},t.CollapsiblePanel.prototype.getMaxWidth=function(){return this._maxWidth},t.CollapsiblePanel.prototype.getMaxContentWidth=function(){return this._maxWidth-2*t.CollapsiblePanel._CONTENT_PADDING},t.CollapsiblePanel.prototype.getMaxHeight=function(){return this._maxHeight},t.CollapsiblePanel.prototype.getMaxContentHeight=function(){return this._maxHeight-2*t.CollapsiblePanel._CONTENT_PADDING},t.CollapsiblePanel.prototype._getRefPoint=function(n,e){return this.isCollapsed()?n:e?new t.Point(1/n.x,1/n.y):new t.Point(-n.x,-n.y)},t.CollapsiblePanel.prototype._collapseExpand=function(n){this._animation&&(this._animationStopped=!0,this._animation.stop(!0));var e=this._collapseDir==t.CollapsiblePanel.COLLAPSE_NORTHWEST||this._collapseDir==t.CollapsiblePanel.COLLAPSE_NORTHEAST,o=this._collapseDir==t.CollapsiblePanel.COLLAPSE_NORTHWEST||this._collapseDir==t.CollapsiblePanel.COLLAPSE_SOUTHWEST,a=o?0:this._width,i=e?0:this._height,s=new t.Point(1/this._width,1/this._height),l=new t.Point(a,i),r=e?0:t.CollapsiblePanel.BUTTONHEIGHT,_=new t.Point(o?-this._width:this._width,i-r);n||(this._background.setAlpha(0),this._buttonFrame&&this._buttonFrame.setAlpha(0));var h=new t.AnimScaleBy(this.getCtx(),this._background,this._getRefPoint(s,!0),n?t.CollapsiblePanel.ANIMATIONDURATION:1e-5),u=new t.AnimMoveBy(this.getCtx(),this._buttonFrame,this._getRefPoint(_),n?t.CollapsiblePanel.ANIMATIONDURATION:1e-5),p=new t.AnimMoveBy(this.getCtx(),this._background,this._getRefPoint(l),n?t.CollapsiblePanel.ANIMATIONDURATION:1e-5);this._animation=new t.ParallelPlayable(this.getCtx(),h,u,p),this._animation&&(this.getCtx().getTooltipManager().hideTooltip(),this.removeEvtListener(t.MouseEvent.MOUSEOVER,this.HandleMouseOver,!1,this),this.removeEvtListener(t.MouseEvent.MOUSEOUT,this.HandleMouseOut,!1,this),this._collapseExpandButton&&(this._collapseExpandButton.removeEvtListener(t.TouchEvent.TOUCHSTART,this.OnButtonClick,!1,this),this._collapseExpandButton.removeEvtListener(t.MouseEvent.CLICK,this.OnButtonClick,!1,this),this._collapseExpandButton.removeEvtListener(t.MouseEvent.MOUSEOVER,this.OnButtonHoverOver,!1,this),this._collapseExpandButton.removeEvtListener(t.MouseEvent.MOUSEOUT,this.OnButtonHoverOut,!1,this)),this.isCollapsed()&&this._contentContainer.setAlpha(0),this._animation.setOnEnd(this.OnAnimationEnd,this),this._animation.play())},t.CollapsiblePanel.prototype._createRoundRectangle=function(n,e){var o=new t.Path(this.getCtx(),this._getOutlinePath(n,e)),a=this._styleMap[t.ControlPanel.FRAME_ROLLOUT_ALPHA];return o.setSolidFill(this._bgColor,this._bgAlpha),o.setSolidStroke(this._borderColor,a),o},t.CollapsiblePanel.prototype._getOutlinePath=function(n,e){var o,a=this._borderRadius,i=this._collapseDir==t.CollapsiblePanel.COLLAPSE_NORTHWEST||this._collapseDir==t.CollapsiblePanel.COLLAPSE_SOUTHWEST;return e<=t.CollapsiblePanel.BUTTONHEIGHT&&(e=t.CollapsiblePanel.BUTTONHEIGHT),o=this._isFixed||i?t.PathUtils.moveTo(a,0):t.PathUtils.moveTo(0,0),o+=t.PathUtils.lineTo(n-a,0),!this._isFixed&&i?(o+=t.PathUtils.lineTo(n,0),o+=t.PathUtils.lineTo(n,a)):o+=t.PathUtils.quadTo(n,0,n,a),!this._isFixed&&e==t.CollapsiblePanel.BUTTONHEIGHT&&i?o+=t.PathUtils.lineTo(n,e):(o+=t.PathUtils.lineTo(n,e-a),o+=t.PathUtils.quadTo(n,e,n-a,e)),o+=t.PathUtils.lineTo(a,e),this._isFixed||e!=t.CollapsiblePanel.BUTTONHEIGHT||i?o+=t.PathUtils.quadTo(0,e,0,e-a):o+=t.PathUtils.lineTo(0,e),(this._isFixed||i)&&(o+=t.PathUtils.lineTo(0,a),o+=t.PathUtils.quadTo(0,0,a,0)),o+=t.PathUtils.closePath()},t.CollapsiblePanel.prototype.OnAnimationEnd=function(){this._animationStopped=!1,this._animation=null;var n=this._background.getStroke().clone();n.setAlpha(this._styleMap[t.ControlPanel.FRAME_ROLLOUT_ALPHA]),this._background.setStroke(n);var e=this._styleMap[t.ControlPanel.BG_ROLLOUT_ALPHA],o=this._background.getFill().clone();o.setAlpha(e),this._background.setFill(o),this._buttonFrame&&this._buttonFrame.setAlpha(this._styleMap[t.ControlPanel.FRAME_ROLLOUT_ALPHA]),this.isCollapsed()||this._contentContainer.setAlpha(1);var a=this._collapseDir==t.CollapsiblePanel.COLLAPSE_NORTHWEST||this._collapseDir==t.CollapsiblePanel.COLLAPSE_SOUTHWEST;this._collapseExpandButton&&(this.isCollapsed()?this._collapseExpandButton=t.ButtonLAFUtils.createExpandButton(this.getCtx(),this._buttonImages,t.CollapsiblePanel.BUTTONHEIGHT,this._styleMap,a?t.ButtonLAFUtils.DIR_LEFT:t.ButtonLAFUtils.DIR_RIGHT):this._collapseExpandButton=t.ButtonLAFUtils.createCollapseButton(this.getCtx(),this._buttonImages,t.CollapsiblePanel.BUTTONHEIGHT,this._styleMap,a?t.ButtonLAFUtils.DIR_LEFT:t.ButtonLAFUtils.DIR_RIGHT),this._buttonFrame.addChild(this._collapseExpandButton),this._buttonFrame.removeChildAt(0),t.Agent.isTouchDevice()?this._collapseExpandButton.addEvtListener(t.TouchEvent.TOUCHSTART,this.OnButtonClick,!1,this):(this._collapseExpandButton.addEvtListener(t.MouseEvent.CLICK,this.OnButtonClick,!1,this),this._collapseExpandButton.addEvtListener(t.MouseEvent.MOUSEOVER,this.OnButtonHoverOver,!1,this),this._collapseExpandButton.addEvtListener(t.MouseEvent.MOUSEOUT,this.OnButtonHoverOut,!1,this)))},t.CollapsiblePanel.prototype.OnButtonClick=function(t){this.getCtx().getTooltipManager().hideTooltip(),this.setCollapsed(!this.isCollapsed())},t.CollapsiblePanel.prototype.OnButtonHoverOver=function(t){var n=this.isCollapsed()?this._expandTooltip:this._collapseTooltip;null!=n&&this.getCtx().getTooltipManager().showTooltip(t.pageX,t.pageY,n,this._collapseExpandButton,!0)},t.CollapsiblePanel.prototype.OnButtonHoverOut=function(t){this.getCtx().getTooltipManager().hideTooltip()},t.CollapsiblePanel.prototype.HandleMouseOver=function(n){var e=this._background.getStroke().clone();e.setAlpha(this._styleMap[t.ControlPanel.FRAME_ROLLOVER_ALPHA]),this._background.setStroke(e);var o=this._styleMap[t.ControlPanel.BG_ROLLOVER_ALPHA],a=this._background.getFill().clone();a.setAlpha(o),this._background.setFill(a),this._buttonFrame&&this._buttonFrame.setAlpha(this._styleMap[t.ControlPanel.FRAME_ROLLOVER_ALPHA])},t.CollapsiblePanel.prototype.HandleMouseOut=function(n){var e=this._background.getStroke().clone();e.setAlpha(this._styleMap[t.ControlPanel.FRAME_ROLLOUT_ALPHA]),this._background.setStroke(e);var o=this._background.getFill().clone();o.setAlpha(this._bgAlpha),this._background.setFill(o),this._buttonFrame&&this._buttonFrame.setAlpha(this._styleMap[t.ControlPanel.FRAME_ROLLOUT_ALPHA])},t.CollapsiblePanelEvent=function(n){this.Init(t.CollapsiblePanelEvent.TYPE),this._subtype=n},t.Obj.createSubclass(t.CollapsiblePanelEvent,t.BaseComponentEvent),t.CollapsiblePanelEvent.TYPE="dvtCollapsiblePanelEvent",t.CollapsiblePanelEvent.SUBTYPE_HIDE="hide",t.CollapsiblePanelEvent.SUBTYPE_SHOW="show",t.CollapsiblePanelEvent.prototype.getSubType=function(){return this._subtype},t.ImageLAFUtils={},t.Obj.createSubclass(t.ImageLAFUtils,t.Obj),t.ImageLAFUtils.loadIcon=function(n,e){var o=new t.Image(n,e);return o.setMouseEnabled(!1),t.ImageLoader.loadImage(n,e,function(t){null!=t&&t.width&&t.height&&(o.setWidth(t.width),o.setHeight(t.height))}),o},t.ButtonLAFUtils={},t.Obj.createSubclass(t.ButtonLAFUtils,t.Obj),t.ButtonLAFUtils.EXPAND_COLLAPSE_BUTTON_IMG_OFFSET=-6,t.ButtonLAFUtils.CONTROL_BUTTON_WIDTH=23,t.ButtonLAFUtils.CONTROL_BUTTON_HEIGHT=21,t.ButtonLAFUtils.ZOOM_BUTTON_HEIGHT=20,t.ButtonLAFUtils.OPEN_CLOSE_IMAGE_WIDTH=22,t.ButtonLAFUtils.OPEN_CLOSE_IMAGE_HEIGHT=20,t.ButtonLAFUtils.VIEW_PANEL_HEIGHT=47,t.ButtonLAFUtils.VIEW_PANEL_HALF_HEIGHT=26,t.ButtonLAFUtils.SIN_PI_4=Math.sin(Math.PI/4),t.ButtonLAFUtils.TAN_PI_8=Math.tan(Math.PI/8),t.ButtonLAFUtils.BORDER_COLOR="#7C8191",t.ButtonLAFUtils.GRADIENT_DARK="#E0E1E1",t.ButtonLAFUtils.GRADIENT_LIGHT="#F0F1F2",t.ButtonLAFUtils.ROUND_RECT_ELLIPSE=8,t.ButtonLAFUtils.DEFAULT_FILL_TYPE="solid",t.ButtonLAFUtils.DEFAULT_BORDER_COLOR="#7BA0D9",t.ButtonLAFUtils.DEFAULT_MID_COLOR="#3474D3",t.ButtonLAFUtils.DEFAULT_END_COLOR="#BFD8FB",t.ButtonLAFUtils._ZOOMIN_ENA="zoominUp",t.ButtonLAFUtils._ZOOMIN_OVR="zoominOver",t.ButtonLAFUtils._ZOOMIN_DWN="zoominDown",t.ButtonLAFUtils._ZOOMIN_DISABLED="zoominDisabled",t.ButtonLAFUtils._ZOOMTOFIT_ENA="zoomtofitUp",t.ButtonLAFUtils._ZOOMTOFIT_OVR="zoomtofitOver",t.ButtonLAFUtils._ZOOMTOFIT_DWN="zoomtofitDown",t.ButtonLAFUtils._ZOOMOUT_ENA="zoomoutUp",t.ButtonLAFUtils._ZOOMOUT_OVR="zoomoutOver",t.ButtonLAFUtils._ZOOMOUT_DWN="zoomoutDown",t.ButtonLAFUtils._ZOOMOUT_DISABLED="zoomoutDisabled",t.ButtonLAFUtils._PAN_ENA="pandialUp",t.ButtonLAFUtils._PAN_OVR="pandialOver",t.ButtonLAFUtils._PAN_DWN="pandialDown",t.ButtonLAFUtils._RECENTER_ENA="recenterUp",t.ButtonLAFUtils._RECENTER_OVR="recenterOver",t.ButtonLAFUtils._RECENTER_DWN="recenterDown",t.ButtonLAFUtils._RESET_ENA="resetUp",t.ButtonLAFUtils._RESET_OVR="resetOver",t.ButtonLAFUtils._RESET_DWN="resetDown",t.ButtonLAFUtils._DRILLUP_ENA="drillupUp",t.ButtonLAFUtils._DRILLUP_OVR="drillupOver",t.ButtonLAFUtils._DRILLUP_DWN="drillupDown",t.ButtonLAFUtils._DRILLDOWN_ENA="drilldownUp",t.ButtonLAFUtils._DRILLDOWN_OVR="drilldownOver",t.ButtonLAFUtils._DRILLDOWN_DWN="drilldownDown",t.ButtonLAFUtils._MAX_ENA="maxUp",t.ButtonLAFUtils._MAX_OVR="maxOver",t.ButtonLAFUtils._MAX_DWN="maxDown",t.ButtonLAFUtils._RESTORE_ENA="restoreUp",t.ButtonLAFUtils._RESTORE_OVR="restoreOver",t.ButtonLAFUtils._RESTORE_DWN="restoreDown",t.ButtonLAFUtils._COLLAPSE_ENA="collapseEna",t.ButtonLAFUtils._COLLAPSE_OVR="collapseOvr",t.ButtonLAFUtils._COLLAPSE_DWN="collapseDwn",t.ButtonLAFUtils._EXPAND_ENA="expandEna",t.ButtonLAFUtils._EXPAND_OVR="expandOvr",t.ButtonLAFUtils._EXPAND_DWN="expandDwn",t.ButtonLAFUtils._QUICKQUERY_ENA="quickQueryEna",t.ButtonLAFUtils._QUICKQUERY_OVR="quickQueryOvr",t.ButtonLAFUtils._QUICKQUERY_DWN="quickQueryDwn",t.ButtonLAFUtils._CLEARRESULTS_ENA="clearResultsEna",t.ButtonLAFUtils._CLEARRESULTS_OVR="clearResultsOvr",t.ButtonLAFUtils._CLEARRESULTS_DWN="clearResultsDwn",t.ButtonLAFUtils._UP="Up",t.ButtonLAFUtils._OVER="Over",t.ButtonLAFUtils._DOWN="Down",t.ButtonLAFUtils._SEL="Sel",t.ButtonLAFUtils._R2L="_r",t.ButtonLAFUtils._SYNC="synchronize",t.ButtonLAFUtils.DIR_RIGHT="right",t.ButtonLAFUtils.DIR_LEFT="left",t.ButtonLAFUtils.createPanControl=function(n,o,a,i,s){var l=t.ButtonLAFUtils._createPanButtonState(n,i[t.ButtonLAFUtils._PAN_ENA],s),r=new t.Container(n);r.setTranslate(20,20);var _=t.ButtonLAFUtils._createPanButtonState(n,i[t.ButtonLAFUtils._PAN_DWN],s);_.setTranslate(-20,-20),r.addChild(_);var h=new t.Container(n);h.setTranslate(20,20);var u=t.ButtonLAFUtils._createPanButtonState(n,i[t.ButtonLAFUtils._PAN_OVR],s);u.setTranslate(-20,-20),h.addChild(u);var p=new t.Button(n,l,h,r);if((a&t.ControlPanel.CONTROLS_CENTER_BUTTON)>0){var C=new t.Button(n,t.ButtonLAFUtils._createRecenterButtonState(n,i[t.ButtonLAFUtils._RECENTER_ENA],s),t.ButtonLAFUtils._createRecenterButtonState(n,i[t.ButtonLAFUtils._RECENTER_OVR],s),t.ButtonLAFUtils._createRecenterButtonState(n,i[t.ButtonLAFUtils._RECENTER_DWN],s));C.setTranslate(9,9)}return new e(n,p,C,o,a,s)},t.ButtonLAFUtils.createDrillUpButton=function(n,e,o){var a=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_ENABLED,e[t.ButtonLAFUtils._DRILLUP_ENA],o),i=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_OVER,e[t.ButtonLAFUtils._DRILLUP_OVR],o),s=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_DOWN,e[t.ButtonLAFUtils._DRILLUP_DWN],o),l=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_ENABLED,e[t.ButtonLAFUtils._DRILLUP_ENA],o,null,null,.4);return new t.Button(n,a,i,s,l)},t.ButtonLAFUtils.createDrillDownButton=function(n,e,o){var a=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_ENABLED,e[t.ButtonLAFUtils._DRILLDOWN_ENA],o),i=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_OVER,e[t.ButtonLAFUtils._DRILLDOWN_OVR],o),s=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_DOWN,e[t.ButtonLAFUtils._DRILLDOWN_DWN],o),l=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_ENABLED,e[t.ButtonLAFUtils._DRILLDOWN_ENA],o,null,null,.4);return new t.Button(n,a,i,s,l)},t.ButtonLAFUtils.createResetButton=function(n,e,o){var a=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_ENABLED,e[t.ButtonLAFUtils._RESET_ENA],o),i=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_OVER,e[t.ButtonLAFUtils._RESET_OVR],o),s=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_DOWN,e[t.ButtonLAFUtils._RESET_DWN],o),l=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_ENABLED,e[t.ButtonLAFUtils._RESET_ENA],o);return new t.Button(n,a,i,s,l)},t.ButtonLAFUtils.createZoomToFitButton=function(n,e,o){var a=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_ENABLED,e[t.ButtonLAFUtils._ZOOMTOFIT_ENA],o),i=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_OVER,e[t.ButtonLAFUtils._ZOOMTOFIT_OVR],o),s=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_DOWN,e[t.ButtonLAFUtils._ZOOMTOFIT_DWN],o);return new t.Button(n,a,i,s)},t.ButtonLAFUtils.createZoomInButton=function(n,e,o){var a=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_ENABLED,e[t.ButtonLAFUtils._ZOOMIN_ENA],o),i=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_OVER,e[t.ButtonLAFUtils._ZOOMIN_OVR],o),s=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_DOWN,e[t.ButtonLAFUtils._ZOOMIN_DWN],o),l=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_DISABLED,e[t.ButtonLAFUtils._ZOOMIN_DISABLED],o);return new t.Button(n,a,i,s,l)},t.ButtonLAFUtils.createZoomOutButton=function(n,e,o){var a=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_ENABLED,e[t.ButtonLAFUtils._ZOOMOUT_ENA],o),i=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_OVER,e[t.ButtonLAFUtils._ZOOMOUT_OVR],o),s=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_DOWN,e[t.ButtonLAFUtils._ZOOMOUT_DWN],o),l=t.ButtonLAFUtils._createButtonBaseImage(n,t.Button.STATE_DISABLED,e[t.ButtonLAFUtils._ZOOMOUT_DISABLED],o);return new t.Button(n,a,i,s,l)},t.ButtonLAFUtils.createLayoutItemButtonState=function(n,e,o,a,i,s){var l=t.StyleUtils.getStyle(s,"buttonRadius",0),r=t.StyleUtils.getStyle(s,t.ControlPanel.CP_BUTTON_WIDTH,0),_=t.StyleUtils.getStyle(s,t.ControlPanel.CP_BUTTON_WIDTH,0),h=t.ButtonLAFUtils._createBaseButtonShape(n,a,l,r,_,s);t.ButtonLAFUtils._setButtonColors(a,h,r,_+2*l,0,0,s,!0);var u=t.ButtonLAFUtils._getLayoutURI(n,a,o),p=t.ButtonLAFUtils._loadIcon(n,i[u],r,_);return p&&h.addChild(p),h},t.ButtonLAFUtils._getLayoutURI=function(n,e,o,a){var i=o,s="";return e==t.Button.STATE_ENABLED?e=t.ButtonLAFUtils._UP:e==t.Button.STATE_OVER?e=t.ButtonLAFUtils._OVER:e==t.Button.STATE_DOWN&&(e=t.ButtonLAFUtils._DOWN),a&&(i+=t.ButtonLAFUtils._SEL,t.Agent.isRightToLeft(n)&&(s=t.ButtonLAFUtils._R2L)),i+=e+s},t.ButtonLAFUtils.createPanelCardButtonState=function(n,e,o,a){var i=t.ButtonLAFUtils._getLayoutURI(n,e,t.ButtonLAFUtils._SYNC,!0);return t.ButtonLAFUtils._createButtonBaseImage(n,e,a[i],o)},t.ButtonLAFUtils.createPanelCardSyncItemState=function(n,e,o,a,i,s){var l=t.StyleUtils.getStyle(i,"buttonRadius",0),r=t.ButtonLAFUtils._createBaseButtonShape(n,e,l,o,a,i);return t.ButtonLAFUtils._setButtonColors(e,r,o,a+2*l,0,0,i,!0),r},t.ButtonLAFUtils.createControlButtonState=function(n,e,o,a,i){var s=t.ButtonLAFUtils._getLayoutURI(n,o,e);return t.ButtonLAFUtils._createButtonBaseImage(n,o,a[s],i)},t.ButtonLAFUtils.createExpandButton=function(n,e,o,a,i){var s=i==t.ButtonLAFUtils.DIR_RIGHT,l=t.ButtonLAFUtils._createCollapseExpandButtonState(n,t.Button.STATE_ENABLED,o,s?e[t.ButtonLAFUtils._COLLAPSE_ENA]:e[t.ButtonLAFUtils._EXPAND_ENA],a,s),r=t.ButtonLAFUtils._createCollapseExpandButtonState(n,t.Button.STATE_OVER,o,s?e[t.ButtonLAFUtils._COLLAPSE_OVR]:e[t.ButtonLAFUtils._EXPAND_OVR],a,s),_=t.ButtonLAFUtils._createCollapseExpandButtonState(n,t.Button.STATE_DOWN,o,s?e[t.ButtonLAFUtils._COLLAPSE_DWN]:e[t.ButtonLAFUtils._EXPAND_DWN],a,s);return new t.Button(n,l,r,_)},t.ButtonLAFUtils.createCollapseButton=function(n,e,o,a,i){var s=i==t.ButtonLAFUtils.DIR_RIGHT,l=t.ButtonLAFUtils._createCollapseExpandButtonState(n,t.Button.STATE_ENABLED,o,s?e[t.ButtonLAFUtils._EXPAND_ENA]:e[t.ButtonLAFUtils._COLLAPSE_ENA],a,s),r=t.ButtonLAFUtils._createCollapseExpandButtonState(n,t.Button.STATE_OVER,o,s?e[t.ButtonLAFUtils._EXPAND_OVR]:e[t.ButtonLAFUtils._COLLAPSE_OVR],a,s),_=t.ButtonLAFUtils._createCollapseExpandButtonState(n,t.Button.STATE_DOWN,o,s?e[t.ButtonLAFUtils._EXPAND_DWN]:e[t.ButtonLAFUtils._COLLAPSE_DWN],a,s);return new t.Button(n,l,r,_)},t.ButtonLAFUtils.createQuickQueryButton=function(n,e){var o=t.ButtonLAFUtils._createQuickQueryButtonState(n,t.Button.STATE_ENABLED,e[t.ButtonLAFUtils._QUICKQUERY_ENA]),a=t.ButtonLAFUtils._createQuickQueryButtonState(n,t.Button.STATE_OVER,e[t.ButtonLAFUtils._QUICKQUERY_OVR]),i=t.ButtonLAFUtils._createQuickQueryButtonState(n,t.Button.STATE_DOWN,e[t.ButtonLAFUtils._QUICKQUERY_DWN]);return new t.Button(n,o,a,i)},t.ButtonLAFUtils.createClearResultsButton=function(n,e){var o=t.ButtonLAFUtils._createQuickQueryButtonState(n,t.Button.STATE_ENABLED,e[t.ButtonLAFUtils._CLEARRESULTS_ENA]),a=t.ButtonLAFUtils._createQuickQueryButtonState(n,t.Button.STATE_OVER,e[t.ButtonLAFUtils._CLEARRESULTS_OVR]),i=t.ButtonLAFUtils._createQuickQueryButtonState(n,t.Button.STATE_DOWN,e[t.ButtonLAFUtils._CLEARRESULTS_DWN]);return new t.Button(n,o,a,i)},t.ButtonLAFUtils._createButtonBaseImage=function(n,e,o,a,i,s,l){var r=t.StyleUtils.getStyle(a,"buttonRadius",0);"undefined"!==i&&null!=i||(i=t.StyleUtils.getStyle(a,t.ControlPanel.CP_BUTTON_WIDTH,0)),"undefined"!==s&&null!=s||(s=t.StyleUtils.getStyle(a,t.ControlPanel.CP_BUTTON_WIDTH,0));var _=t.ButtonLAFUtils._drawBaseButton(n,e,r,i,s,a),h=t.ButtonLAFUtils._loadIcon(n,o,i,s);return h&&(null!=l&&h.setAlpha(l),_.addChild(h)),_},t.ButtonLAFUtils._loadIcon=function(n,e,o,a){var i=new t.Image(n,e);return i.setMouseEnabled(!1),t.ImageLoader.loadImage(n,e,function(t){if(null!=t&&t.width&&t.height){i.setWidth(t.width),i.setHeight(t.height);var n=a/2-t.height/2,e=o/2-t.width/2;i.setTranslate(e,n)}}),i},t.ButtonLAFUtils._createPanButtonState=function(n,e,o){var a=new t.Container(n),i=new t.Circle(n,20,20,20);i.setAlpha(0);var s=t.StyleUtils.getStyle(o,t.CSSStyle.BACKGROUND_COLOR,null);i.setSolidFill(s),a.addChild(i);var l=t.ImageLAFUtils.loadIcon(n,e);return l&&a.addChild(l),a},t.ButtonLAFUtils._createRecenterButtonState=function(n,e,o){var a=new t.Container(n),i=new t.Circle(n,11,11,8);i.setAlpha(0);var s=t.StyleUtils.getStyle(o,t.CSSStyle.BACKGROUND_COLOR,null);i.setSolidFill(s),a.addChild(i);var l=t.ImageLAFUtils.loadIcon(n,e);return l&&a.addChild(l),a},t.ButtonLAFUtils._createCollapseExpandButtonState=function(n,e,o,a,i,s){o||(o=47);var l=t.ButtonLAFUtils._drawOpenCloseButtonHelper(n,e,o,i,s),r=t.ImageLAFUtils.loadIcon(n,a);if(r){var _=t.StyleUtils.getStyle(i,t.ControlPanel.CP_IMAGE_WIDTH,0),h=t.StyleUtils.getStyle(i,t.ControlPanel.CP_IMAGE_HEIGHT,0);l.addChild(r);var u=(t.StyleUtils.getStyle(i,t.ControlPanel.CP_OPEN_CLOSE_BUTTON_WIDTH,0)-_)/2,p=(o-h)/2;r.setTranslate(u,p)}return l},t.ButtonLAFUtils._createQuickQueryButtonState=function(n,e,o){var a=t.ImageLAFUtils.loadIcon(n,o);return a.setMouseEnabled(!0),a},t.ButtonLAFUtils.createPanButtonBackground=function(n,e){var o=t.ButtonLAFUtils._drawPanButtonBase(n),a=t.StyleUtils.getStyle(e,t.CSSStyle.BACKGROUND_COLOR,null),i=t.StyleUtils.getStyle(e,t.CSSStyle.BORDER_COLOR,null);if("solid"==t.StyleUtils.getStyle(e,t.CSSStyle.FILL_TYPE,null))o.setSolidStroke(i),o.setSolidFill(a);else{var s=["#8D93A5","#E0EAEB",i];o.setStroke(new t.LinearGradientStroke(36,s,[1,1,1],[0,125/255,1],[0,0,40,40],1));var l=[a,a,"#5A83BE",a];o.setFill(new t.LinearGradientFill(90,l,[.9,.1,0,.7],[0,105/255,150/255,1],[0,0,40,40]))}return o},t.ButtonLAFUtils.createPanButtonUnderlay=function(n,e){var o=t.ButtonLAFUtils._drawPanButtonBase(n),a=t.StyleUtils.getStyle(e,t.CSSStyle.BACKGROUND_COLOR,null);return o.setSolidStroke(a),o.setSolidFill(a),o},t.ButtonLAFUtils._drawPanButtonBase=function(n){var e=20,o=e,a=e,i=t.PathUtils.moveTo(40,a)+t.PathUtils.quadTo(40,t.ButtonLAFUtils.TAN_PI_8*e+a,t.ButtonLAFUtils.SIN_PI_4*e+o,t.ButtonLAFUtils.SIN_PI_4*e+a)+t.PathUtils.quadTo(t.ButtonLAFUtils.TAN_PI_8*e+o,40,o,40)+t.PathUtils.quadTo(-t.ButtonLAFUtils.TAN_PI_8*e+o,40,-t.ButtonLAFUtils.SIN_PI_4*e+o,t.ButtonLAFUtils.SIN_PI_4*e+a)+t.PathUtils.quadTo(0,t.ButtonLAFUtils.TAN_PI_8*e+a,0,a)+t.PathUtils.quadTo(0,-t.ButtonLAFUtils.TAN_PI_8*e+a,-t.ButtonLAFUtils.SIN_PI_4*e+o,-t.ButtonLAFUtils.SIN_PI_4*e+a)+t.PathUtils.quadTo(-t.ButtonLAFUtils.TAN_PI_8*e+o,0,o,0)+t.PathUtils.quadTo(t.ButtonLAFUtils.TAN_PI_8*e+o,0,t.ButtonLAFUtils.SIN_PI_4*e+o,-t.ButtonLAFUtils.SIN_PI_4*e+a)+t.PathUtils.quadTo(40,-t.ButtonLAFUtils.TAN_PI_8*e+a,40,a)+t.PathUtils.closePath();return new t.Path(n,i,"draw_pan_button")},t.ButtonLAFUtils._setGradientBorder=function(n,e,o,a,i){n.setSolidStroke("#FFFFFF");n.setStroke(new t.LinearGradientStroke(63,["#8D93A5","#E0EAEB","#FFFFFF"],[1,1,1],[0,155/255,1],[a,i,e,o],1))},t.ButtonLAFUtils._setButtonColors=function(n,e,o,a,i,s,l,r){if(t.StyleUtils.getStyle(l,t.ControlPanel.CP_PANEL_DRAWER_STYLES,null))!r||r&&n==t.Button.STATE_ENABLED?e.setInvisibleFill():n!=t.Button.STATE_OVER&&n!=t.Button.STATE_DOWN||e.setFill(new t.SolidFill("#EBECED"));else if(l[t.PanZoomComponent.SKIN_NAME]==t.CSSStyle.SKIN_SKYROS)switch(n){case t.Button.STATE_OVER:e.setFill(new t.SolidFill("#FFFFFF",.7)),e.setStroke(new t.SolidStroke(t.StyleUtils.getStyle(l,t.CSSStyle.BORDER_COLOR,null)));break;case t.Button.STATE_DOWN:e.setFill(new t.SolidFill("#B3C6DB")),e.setStroke(new t.SolidStroke(t.StyleUtils.getStyle(l,t.CSSStyle.BORDER_COLOR,null)));break;case t.Button.STATE_DISABLED:case t.Button.STATE_ENABLED:default:e.setInvisibleFill()}else{var _,h,u;switch(n){case t.Button.STATE_DISABLED:case t.Button.STATE_ENABLED:_=["#5B868A","#FFFFFF","#FFFFFF","#5B868A"],h=[.01,0,.05,.01],u=[0,120/255,130/255,1];break;case t.Button.STATE_OVER:t.ButtonLAFUtils._setGradientBorder(e,o,a,i,s),_=["#FFFFFF","#4671B0","#4671B0","#FFFFFF"],h=[.5,.2,.1,.7],u=[0,120/255,130/255,1];break;case t.Button.STATE_DOWN:t.ButtonLAFUtils._setGradientBorder(e,o,a,i,s),_=["#E0EAEB","#5B868A","#4671B0"],h=[.1,.3,.6],u=[0,130/255,1]}e.setFill(new t.LinearGradientFill(90,_,h,u,[i,s,o,a]))}},t.ButtonLAFUtils._setCloseButtonColors=function(n,e,o,a,i,s,l,r){if(t.StyleUtils.getStyle(r,t.ControlPanel.CP_PANEL_DRAWER_STYLES,null))o.setInvisibleFill();else{var _,h,u=t.StyleUtils.getStyle(r,t.CSSStyle.FILL_TYPE,null),p=t.StyleUtils.getStyle(r,t.CSSStyle.BORDER_COLOR,null);if("solid"==u){var C,P,m=t.StyleUtils.getStyle(r,t.CSSStyle.BACKGROUND_COLOR,null);switch(e){case t.Button.STATE_ENABLED:C=t.StyleUtils.getStyle(r,t.ControlPanel.BG_ALPHA,1),P=t.StyleUtils.getStyle(r,t.ControlPanel.FRAME_ROLLOUT_ALPHA,1);break;case t.Button.STATE_DOWN:case t.Button.STATE_OVER:C=t.StyleUtils.getStyle(r,t.ControlPanel.BG_ROLLOVER_ALPHA,1),P=t.StyleUtils.getStyle(r,t.ControlPanel.FRAME_ROLLOVER_ALPHA,1)}h=new t.SolidFill(m,C),_=new t.SolidStroke(p,P)}else{var c,E,d;switch(e){case t.Button.STATE_ENABLED:c=["#FFFFFF","#5B868A","#5B868A"],E=[0,.2,.3],d=[0,130/255,1];break;case t.Button.STATE_OVER:c=["#FFFFFF","#FFFFFF","#4671B0","#4671B0"],E=[.1,.2,.1,.6],d=[0,120/255,130/255,1];break;case t.Button.STATE_DOWN:c=["#4671B0","#5B868A","#5B868A"],E=[.5,.2,.4],d=[0,130/255,1]}h=new t.LinearGradientFill(0,c,E,d,[s,l,a,i]),_=new t.SolidStroke(p,1,.8)}o.setStroke(_),o.setFill(h)}},t.ButtonLAFUtils._setSliderButtonColors=function(n,e,o,a,i,s){var l,r,_;switch(n){case t.Button.STATE_ENABLED:e.setSolidStroke("#FFFFFF",1,.25),l=["#FFFFFF","#4671B0","#E0EAEB","#FFFFFF"],r=[.6,.3,.3,.8],_=[0,125/255,130/255,1];break;case t.Button.STATE_OVER:t.ButtonLAFUtils._setGradientBorder(e,o,a,i,s),l=["#4671B0","#FFFFFF","#FFFFFF","#FFFFFF"],r=[.4,.3,.7,1],_=[0,70/255,200/255,1];break;case t.Button.STATE_DOWN:t.ButtonLAFUtils._setGradientBorder(e,o,a,i,s),l=["#FFFFFF","#4671B0","#E0EAEB"],r=[.6,.5,.8],_=[0,130/255,1]}e.setFill(new t.LinearGradientFill(90,l,r,_,[i,s,o,a]))},t.ButtonLAFUtils.GetButtonPathCommands=function(t,n,e,o){return o?["M",t,0,"L",e,0,"A",e,e,0,0,0,0,e,"L",0,n-e,"A",e,e,0,0,0,e,n,"L",t,n]:["M",0,0,"L",t-e,0,"A",e,e,0,0,1,t,e,"L",t,n-e,"A",e,e,0,0,1,t-e,n,"L",0,n]},t.ButtonLAFUtils._drawOpenCloseButtonHelper=function(n,e,o,a,i){o||(o=47);var s=parseInt(t.StyleUtils.getStyle(a,t.CSSStyle.BORDER_RADIUS,0)),l=t.StyleUtils.getStyle(a,t.ControlPanel.CP_OPEN_CLOSE_BUTTON_WIDTH,0),r=Math.max(o,t.StyleUtils.getStyle(a,t.ControlPanel.CP_BUTTON_HEIGHT,o)),_=t.ButtonLAFUtils.GetButtonPathCommands(l,r,s,i),h=new t.Path(n,_);return t.ButtonLAFUtils._setCloseButtonColors(n,e,h,l,r,0,0,a),h},t.ButtonLAFUtils._drawBaseButton=function(n,e,o,a,i,s){var l=t.ButtonLAFUtils._createBaseButtonShape(n,e,o,a,i,s);return t.ButtonLAFUtils._setButtonColors(e,l,a,i+2*o,0,0,s),l},t.ButtonLAFUtils._createBaseButtonShape=function(n,e,o,a,i,s){if(s[t.PanZoomComponent.SKIN_NAME]==t.CSSStyle.SKIN_SKYROS)return new t.Rect(n,0,0,a,i);var l=(a-=2*o)+o,r=(i-=2*o)+o,_=t.PathUtils.moveTo(l+o,r)+t.PathUtils.quadTo(o+l,t.ButtonLAFUtils.TAN_PI_8*o+r,t.ButtonLAFUtils.SIN_PI_4*o+l,t.ButtonLAFUtils.SIN_PI_4*o+r)+t.PathUtils.quadTo(t.ButtonLAFUtils.TAN_PI_8*o+l,o+r,l,o+r)+t.PathUtils.lineTo(l,r+o)+t.PathUtils.lineTo(l-a,o+r);return l-=a,r=r,_+=t.PathUtils.quadTo(-t.ButtonLAFUtils.TAN_PI_8*o+l,o+r,-t.ButtonLAFUtils.SIN_PI_4*o+l,t.ButtonLAFUtils.SIN_PI_4*o+r)+t.PathUtils.quadTo(-o+l,t.ButtonLAFUtils.TAN_PI_8*o+r,-o+l,r)+t.PathUtils.lineTo(l-o,r)+t.PathUtils.lineTo(l-o,r-i),l=l,r-=i,_+=t.PathUtils.quadTo(-o+l,-t.ButtonLAFUtils.TAN_PI_8*o+r,-t.ButtonLAFUtils.SIN_PI_4*o+l,-t.ButtonLAFUtils.SIN_PI_4*o+r)+t.PathUtils.quadTo(-t.ButtonLAFUtils.TAN_PI_8*o+l,-o+r,l,-o+r)+t.PathUtils.lineTo(l,-o+r)+t.PathUtils.lineTo(l+a,-o+r),l+=a,r=r,_+=t.PathUtils.quadTo(t.ButtonLAFUtils.TAN_PI_8*o+l,-o+r,t.ButtonLAFUtils.SIN_PI_4*o+l,-t.ButtonLAFUtils.SIN_PI_4*o+r)+t.PathUtils.quadTo(o+l,-t.ButtonLAFUtils.TAN_PI_8*o+r,o+l,r)+t.PathUtils.lineTo(l+o,r+i)+t.PathUtils.closePath(),new t.Path(n,_)},t.ButtonLAFUtils.drawDropdownShape=function(n,e,o,a){var i=t.StyleUtils.getStyle(a,"radius",0),s=(e-=2*i)+i,l=o-=i,r=t.PathUtils.moveTo(s+i,l)+t.PathUtils.quadTo(i+s,t.ButtonLAFUtils.TAN_PI_8*i+l,t.ButtonLAFUtils.SIN_PI_4*i+s,t.ButtonLAFUtils.SIN_PI_4*i+l)+t.PathUtils.quadTo(t.ButtonLAFUtils.TAN_PI_8*i+s,i+l,s,i+l)+t.PathUtils.lineTo(s,i+l)+t.PathUtils.lineTo(s-e,i+l);return s-=e,l=l,r+=t.PathUtils.quadTo(-t.ButtonLAFUtils.TAN_PI_8*i+s,i+l,-t.ButtonLAFUtils.SIN_PI_4*i+s,t.ButtonLAFUtils.SIN_PI_4*i+l)+t.PathUtils.quadTo(-i+s,t.ButtonLAFUtils.TAN_PI_8*i+l,-i+s,l)+t.PathUtils.lineTo(-i+s,l)+t.PathUtils.lineTo(-i+s,l-o),s=s,l-=o,r+=t.PathUtils.lineTo(s+e+i,l)+t.PathUtils.lineTo(s+e+i,l+o)+t.PathUtils.closePath(),new t.Path(n,r)},t.ButtonLAFUtils._getDimForced=function(n,e){return e instanceof t.Button&&(e=e.getChildAt(0)),t.DisplayableUtils.getDimForced(n,e)},t.ButtonLAFUtils.parseStyle=function(n,e){var o,a=t.ButtonLAFUtils.DEFAULT_FILL_TYPE,i=t.ButtonLAFUtils.DEFAULT_BORDER_COLOR,s=t.ButtonLAFUtils.DEFAULT_MID_COLOR;e&&(e.getStyle(t.CSSStyle.FILL_TYPE)&&(a=e.getStyle(t.CSSStyle.FILL_TYPE)),e.getStyle(t.CSSStyle.BORDER_COLOR)&&(i=e.getStyle(t.CSSStyle.BORDER_COLOR)),e.getStyle(t.CSSStyle.BACKGROUND_COLOR)&&(s=e.getStyle(t.CSSStyle.BACKGROUND_COLOR)),e.getStyle(t.CSSStyle.BACKGROUND)&&(o=e.getStyle(t.CSSStyle.BACKGROUND)));var l,r=new t.SolidStroke(i);if("solid"==a)l=new t.SolidFill(s);else{var _,h,u,p;if(o&&o.indexOf("linear-gradient")>=0){var C=t.GradientParser.parseCSSGradient(o);C&&(p=C.getAngle(),_=C.getColors(),h=C.getAlphas(),u=C.getRatios())}else{var P=s,m=t.ButtonLAFUtils.DEFAULT_END_COLOR;P!=t.ButtonLAFUtils.DEFAULT_MID_COLOR&&(m=t.ColorUtils.inferColor(t.ButtonLAFUtils.DEFAULT_MID_COLOR,t.ButtonLAFUtils.DEFAULT_END_COLOR,P)),_=[P,m],h=[.6,.8],u=[0,1],p=-270}l=new t.LinearGradientFill(p,_,h,u)}n.setFill(l),n.setStroke(r)},t.exportProperty(t.PanZoomComponent.prototype,"render",t.PanZoomComponent.prototype.render)}(dvt);
    return dvt;
  });
  