// Function wrapper to prevent naming collisions between graph and shared toolkit code.
(function() {

var DvtObj=this.DvtObj;DvtObj||(DvtObj=function(){},"undefined"!=typeof window&&(DvtObj[DvtObj._OWNER_KEY]=window));DvtObj._GET_FUNCTION_NAME_REGEXP=/function\s+([\S^]+)\s*\(/;DvtObj._OWNER_KEY="owner";DvtObj.prototype={};DvtObj.prototype.constructor=DvtObj;DvtObj.createSubclass=function(a,b,c){if(void 0!==a&&null!==a&&(void 0===b&&(b=Object),a!=b)){var d=DvtObj._tempSubclassConstructor;d.prototype=b.prototype;a.prototype=new d;a.prototype.constructor=a;a.superclass=b.prototype;c&&(a._typeName=c)}};
DvtObj._tempSubclassConstructor=function(){};DvtObj.getTypeName=function(a){var b=a._typeName;null==b&&(b=DvtObj._GET_FUNCTION_NAME_REGEXP.exec(a.toString())[1],a._typeName=b);return b};DvtObj.prototype.getTypeName=function(){return DvtObj.getTypeName(this.constructor)};DvtObj.prototype.clone=function(){return null};DvtObj.prototype.mergeProps=function(a){};DvtObj._flashToolkit=!1;
DvtObj.createCallback=function(a,b){if(DvtObj._flashToolkit)return function(){return b.apply(a,arguments)};var c;try{c=new Function("var f\x3darguments.callee; return f._func.apply(f._owner, arguments);"),c._owner=a,c._func=b}catch(d){}return c};DvtObj.defineConstant=function(a){return a};var DvtArrayUtils={};DvtObj.createSubclass(DvtArrayUtils,DvtObj,"DvtArrayUtils");DvtArrayUtils.NONE=0;DvtArrayUtils.ADD=1;DvtArrayUtils.SUB=2;DvtArrayUtils.DIV=3;DvtArrayUtils.MULT=4;DvtArrayUtils.MOD=5;
DvtArrayUtils.argsToArray=function(a){if(a){var b=Array(a.length);if(0<a.length)for(var c=0;c<a.length;c++)b[c]=a[c];return b}return a};DvtArrayUtils.isArray=function(a){return"undefined"!=typeof a&&"[object Array]"===Object.prototype.toString.apply(a)};
DvtArrayUtils.toFloat=function(a,b,c){if(!DvtArrayUtils.isArray(a))return a;b||(c=DvtArrayUtils.NONE);c=null===c||isNaN(c)?DvtArrayUtils.NONE:c;c!==DvtArrayUtils.NONE&&("number"!==typeof b&&(b=parseFloat(b)),isNaN(b)&&(c=DvtArrayUtils.NONE));var d=a.length,e;if(c===DvtArrayUtils.NONE)for(e=0;e<d;e++)a[e]=parseFloat(a[e]);else for(e=0;e<d;e++){var f=parseFloat(a[e]);switch(c){case DvtArrayUtils.MULT:f*=b;break;case DvtArrayUtils.ADD:f+=b;break;case DvtArrayUtils.SUB:f-=b;break;case DvtArrayUtils.DIV:f/=
b;break;case DvtArrayUtils.MOD:f%=b}a[e]=f}return a};DvtArrayUtils.copy=function(a){var b;if(a){b=[];for(var c=a.length,d=0;d<c;d++)b.push(a[d])}return b};DvtArrayUtils.getIndex=function(a,b){if(a)for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1};DvtArrayUtils.getLastIndex=function(a,b){for(var c=a.length-1;0<=c;c--)if(a[c]===b)return c;return-1};DvtArrayUtils.getMinIndex=function(a){for(var b=-1,c=a.length,d=Number.MAX_VALUE,e,f=0;f<c;f++)(e=a[f])&&"number"===typeof e&&e<d&&(d=e,b=f);return b};
DvtArrayUtils.getMaxIndex=function(a){for(var b=-1,c=a.length,d=Number.MIN_VALUE,e,f=0;f<c;f++)(e=a[f])&&"number"===typeof e&&e>d&&(d=e,b=f);return b};DvtArrayUtils.equals=function(a,b){if(!a&&b||a&&!b)return!1;if(a||b){if(a.length!=b.length)return!1;for(var c=0;c<=a.length;c++)if(a[c]!==b[c])return!1}return!0};var DvtStringUtils={};DvtObj.createSubclass(DvtStringUtils,DvtObj,"DvtStringUtils");DvtStringUtils.trim=function(a){return a.replace(/^\s+|\s+$/g,"")};
DvtStringUtils.ltrim=function(a){return a.replace(/^\s+/,"")};DvtStringUtils.rtrim=function(a){return a.replace(/\s+$/,"")};DvtStringUtils.endsWith=function(a,b){return a.match(b+"$")==b};var DvtContext=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtContext,DvtObj,"DvtContext");
DvtContext.prototype.Init=function(a,b,c){this._implFactory=a;this._stage=new DvtStage(this,b,c+"_stage");this._tooltipManagers={};this._customTooltipManagers={};this._logicalEvent=this._nativeEvent=this._scheduler=null;this._clipPathMap={}};DvtContext.prototype.getImplFactory=function(){return this._implFactory};DvtContext.prototype.getStage=function(){return this._stage};DvtContext.prototype.setReadingDirection=function(a){this._readingDirection=a};DvtContext.prototype.getReadingDirection=function(){return this._readingDirection};
DvtContext.prototype.addClipPath=function(a){this._clipPathMap[a]=this._clipPathMap[a]?this._clipPathMap[a]++:1};DvtContext.prototype.removeClipPath=function(a){var b=this._clipPathMap[a];b&&(1==b?delete this._clipPathMap[a]:this._clipPathMap[a]=b--)};DvtContext.prototype.hasClipPath=function(a){return 1<=this._clipPathMap[a]};
DvtContext.prototype.getTooltipManager=function(a){a||(a="_dvtTooltip");var b=this.getStage().getId();a+=b;this._tooltipManagers[a]||(this._tooltipManagers[a]=this._implFactory.newTooltipManager(a));return this._tooltipManagers[a]};DvtContext.prototype.getScheduler=function(){this._scheduler||(this._scheduler=new DvtScheduler(this));return this._scheduler};DvtContext.prototype.getDocumentUtils=function(){return this._implFactory.getDocumentUtils()};
DvtContext.prototype.getRelativePosition=function(a,b){var c=this.getDocumentUtils();if(c){var d=this.getStage();return c.getStageRelativePosition(d,a,b)}return null};DvtContext.prototype.getStageAbsolutePosition=function(){var a=this.getDocumentUtils();if(a){var b=this.getStage();return a.getStageAbsolutePosition(b)}return null};
DvtContext.prototype.getCustomTooltipManager=function(a){a||(a="_dvtCustomTooltip");var b=this.getStage().getId();a+=b;this._customTooltipManagers[a]||(this._customTooltipManagers[a]=new DvtCustomTooltipManager(this,a));return this._customTooltipManagers[a]};DvtContext.prototype.getJsExt=function(){this._externalInterface||(this._externalInterface=this._implFactory.newJsExt());return this._externalInterface};DvtContext.prototype.supportsMeasureText=function(){return!1};
DvtContext.prototype.measureText=function(a,b,c,d){return null};var DvtImplFactory=function(a){this.Init(a)};DvtObj.createSubclass(DvtImplFactory,DvtObj,"DvtImplFactory");DvtImplFactory.prototype.Init=function(a){this._context=a};DvtImplFactory.prototype.GetContext=function(){return this._context};DvtImplFactory.prototype.newContainer=function(a){return null};DvtImplFactory.prototype.newArc=function(a,b,c,d,e,f,g,h){return null};DvtImplFactory.prototype.newCircle=function(a,b,c,d){return null};
DvtImplFactory.prototype.newImage=function(a,b,c,d,e,f){return null};DvtImplFactory.prototype.newLine=function(a,b,c,d,e){return null};DvtImplFactory.prototype.newOval=function(a,b,c,d,e){return null};DvtImplFactory.prototype.newPath=function(a,b){return null};DvtImplFactory.prototype.newPolygon=function(a,b){return null};DvtImplFactory.prototype.newRect=function(a,b,c,d,e){return null};DvtImplFactory.prototype.newText=function(a,b,c,d){return null};DvtImplFactory.prototype.newParser=function(){return null};
DvtImplFactory.prototype.newTimer=function(){return null};DvtImplFactory.prototype.newContextMenuHandler=function(){return null};DvtImplFactory.prototype.newTextArea=function(a,b,c){return null};DvtImplFactory.prototype.newTextFormatted=function(a,b,c){return null};DvtImplFactory.prototype.newMarker=function(a,b){return null};DvtImplFactory.prototype.newTooltipManager=function(a){return null};DvtImplFactory.prototype.newRichTooltipManager=function(a){return null};
DvtImplFactory.prototype.getDocumentUtils=function(){return null};var DvtIterator=function(a,b){this._Init(a,b)};DvtObj.createSubclass(DvtIterator,DvtObj,"DvtIterator");DvtIterator._NONE=0;DvtIterator._FIRST=1;DvtIterator._LAST=2;DvtIterator._NEXT=3;
DvtIterator.prototype.getNext=function(){var a=null;if(0<=this._stackPos){var b=this._arStack[this._stackPos],c=b._list;c&&(b._currentObj?a=++b._pos<c.length?c[b._pos]:null:(a=c[0],b._pos=0),b._currentObj=a);a||(this._pop(),0<=this._stackPos&&(this._bInRecurse=!0,a=this.getNext(),this._bInRecurse=!1));this._bInRecurse||0<=this._stackPos&&this._bDeep&&a&&0!==a.getNumChildren()&&this._push(a._getChildren())}this._lastObjReturnedFlags=a?DvtIterator._NEXT:DvtIterator._NONE;return this._lastObjReturned=
a};DvtIterator.prototype._Init=function(a,b){this._bDeep=b?b:!1;this._bInRecurse=!1;this._arStack=null;this._stackPos=-1;this._lastObjReturned=null;this._lastObjReturnedFlags=DvtIterator._NONE;a&&this._push(a)};DvtIterator.prototype._pop=function(){if(null!==this._arStack&&0<=this._stackPos){var a=this._arStack[this._stackPos];a._list=null;a._currentObj=null;this._arStack[this._stackPos]=null;0>--this._stackPos&&(this._arStack=null)}};
DvtIterator.prototype._push=function(a){null===this._arStack&&(this._arStack=[]);var b={};b._list=a;b._currentObj=null;b._pos=-1;this._stackPos++;this._stackPos<this._arStack.length?this._arStack[this._stackPos]=b:this._arStack.push(b)};var DvtJsExt=function(){};DvtObj.createSubclass(DvtJsExt,DvtObj,"DvtJsExt");DvtJsExt.LOG_OFF=1;DvtJsExt.LOG_SEVERE=2;DvtJsExt.LOG_WARNING=3;DvtJsExt.LOG_INFO=4;DvtJsExt.LOG_CONFIG=5;DvtJsExt.LOG_FINE=6;DvtJsExt.LOG_FINER=7;DvtJsExt.LOG_FINEST=8;DvtJsExt.LOG_ALL=9;
DvtJsExt.PERF_PROFILING=0;DvtJsExt.PERF_TIMING=1;DvtJsExt.PPR_ATTRIB_HSS="hideShowSeriesInfo";DvtJsExt.PPR_ATTRIB_HS_LAYERS="_hideShowLayersInfo";DvtJsExt.PPR_ATTRIB_SEL="selectionInfo";DvtJsExt.PPR_ATTRIB_PIE_EXPLODE="pieSliceExplodeInfo";DvtJsExt.JS_FPREQUESTREFRESH="adf_dvt_fpRefresh";DvtJsExt.JS_FPGETLOGLEVEL="adf_dvt_fpGetLogLevel";DvtJsExt.JS_FPINITNOTIFY="adf_dvt_fpInitNotify";DvtJsExt.JS_FPLOGGER="adf_dvt_fpLogger";DvtJsExt.JS_FPMSG="adf_dvt_fpMsg";DvtJsExt.JS_FP_PERF_LOGGER="adf_dvt_fpPerfLogger";
DvtJsExt.JS_FP_SET_PPR_PROPERTY="AdfPage.PAGE.findComponent('X-ID-X').getPeer().setDVTPPRAttribute";DvtJsExt.JS_FP_SEND_PPR="AdfPage.PAGE.findComponent('X-ID-X').getPeer().sendToServerPPR({source:'X-ID-X'})";DvtJsExt.JS_FP_SEND_PPR_NON_BLOCKING="AdfPage.PAGE.findComponent('X-ID-X').getPeer().sendToServerPPR3({source:'X-ID-X'})";DvtJsExt.JS_FPUPDATEPOPUPBOUNDS="adf_dvt_fpUpdatePopupHelper";DvtJsExt.JS_COMPONENT_LOADED="AdfDhtmlCommonFlashPeer.setComponentLoaded";
DvtJsExt.prototype.sendPPRProperty=function(a,b,c){};DvtJsExt.prototype.sendPPR=function(a){};DvtJsExt.prototype.sendPPRNonBlocking=function(a){};DvtJsExt.prototype.callJs=function(a){};DvtJsExt.prototype.callJsWithParam=function(a,b){};DvtJsExt.prototype.getLogLevel=function(){return adf_dvt_fpGetLogLevel()};DvtJsExt.prototype.log=function(a,b){};DvtJsExt.prototype.msg=function(a){};DvtJsExt.prototype.perf=function(a,b){};DvtJsExt.prototype.requestRefresh=function(){};var DvtLockable=function(){this._Init()};
DvtObj.createSubclass(DvtLockable,DvtObj,"DvtLockable");DvtLockable.prototype._Init=function(){this._bLocked=!1};DvtLockable.prototype.isLocked=function(){return this._bLocked};DvtLockable.prototype.__lock=function(){this._bLocked=!0};var DvtScheduled=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtScheduled,DvtObj,"DvtScheduled");DvtScheduled._STATE_INITIALIZE=0;DvtScheduled._STATE_BEGIN=1;DvtScheduled._STATE_RUN=2;
DvtScheduled.CalcProgress=function(a,b,c){c-=b;if(0==c)return.5;a=(a-b)/c;1<a&&(a=1);return a};DvtScheduled.prototype.Init=function(a,b,c,d,e){this._scheduler=b;this.setDuration(c);this.setDelay(d);this.setEasing(e);this._bRunning=!1;this._startTime=null;this._progress=0;this._state=DvtScheduled._STATE_INITIALIZE;this._onStepObj=this._onStep=this._onEndObj=this._onEnd=this._onStartObj=this._onStart=this._onInitObj=this._onInit=null};DvtScheduled.prototype.getDuration=function(){return this._duration};
DvtScheduled.prototype.setDuration=function(a){this._duration=a?a:.5};DvtScheduled.prototype.getDelay=function(){return this._delay};DvtScheduled.prototype.setDelay=function(a){this._delay=a?a:0};DvtScheduled.prototype.getEasing=function(){return this._easing};DvtScheduled.prototype.setEasing=function(a){this._easing=a?a:DvtEasing.cubicInOut};DvtScheduled.prototype.setOnInit=function(a,b){this._onInit=a;this._onInitObj=b?b:null};DvtScheduled.prototype.getOnInit=function(){return[this._onInit,this._onInitObj]};
DvtScheduled.prototype.setOnStart=function(a,b){this._onStart=a;this._onStartObj=b?b:null};DvtScheduled.prototype.getOnStart=function(){return[this._onStart,this._onStartObj]};DvtScheduled.prototype.setOnEnd=function(a,b){this._onEnd=a;this._onEndObj=b?b:null};DvtScheduled.prototype.getOnEnd=function(){return[this._onEnd,this._onEndObj]};DvtScheduled.prototype.setOnStep=function(a,b){this._onStep=a;b?this._onSepObj=b:this._onStepObj=null};
DvtScheduled.prototype.getOnStep=function(){return[this._onStep,this._onStepObj]};DvtScheduled.prototype.isRunning=function(){return this._bRunning};DvtScheduled.prototype.play=function(){this._bRunning||(this._bRunning=!0,this.ProcessPlay(),this._scheduler.addScheduled(this))};DvtScheduled.prototype.stop=function(a){this._scheduler.removeScheduled(this);a&&this.ProcessStep(1);this.ProcessEnd()};DvtScheduled.prototype.pause=function(){this._bRunning=!1};
DvtScheduled.prototype.reset=function(){this._state=DvtScheduled._STATE_INITIALIZE};DvtScheduled.prototype.processTime=function(a){if(this._bRunning){a-=this._startTime;if(0>a)return!1;var b=1E3*this.GetTotalDuration(),c=1;0!=b&&(c=a/b);1<c&&(c=1);this.ProcessStep(c);(a=1<=c)&&this.ProcessEnd();return a}};DvtScheduled.prototype.GetTotalDuration=function(){return this._delay+this._duration};
DvtScheduled.prototype.ProcessPlay=function(){this._state==DvtScheduled._STATE_INITIALIZE&&this.ProcessInitialize();if(this._state==DvtScheduled._STATE_BEGIN)this._startTime=(new Date).getTime(),this.ProcessStart();else{var a=1E3*this._progress*this.GetTotalDuration();this._startTime=(new Date).getTime()-a}this._state=DvtScheduled._STATE_RUN};DvtScheduled.prototype.ProcessInitialize=function(){this._onInit&&this._onInit.call(this._onInitObj);this.Initialize();this._state=DvtScheduled._STATE_BEGIN};
DvtScheduled.prototype.ProcessStart=function(){this._bRunning=!0;this._progress=0;this.Start();this._onStart&&this._onStart.call(this._onStartObj)};DvtScheduled.prototype.ProcessStep=function(a){var b=this._progress=a;0<this._delay&&(b=DvtScheduled.CalcProgress(a,this._delay/this.GetTotalDuration(),1));0<=b&&(this._easing&&(b=this._easing(b)),this.Step(b),this._onStep&&this._onStep.call(this._onStepObj,b))};
DvtScheduled.prototype.ProcessEnd=function(){this._bRunning&&(this._bRunning=!1,this._progress=1,this.End(),this._state=DvtScheduled._STATE_BEGIN,this._onEnd&&this._onEnd.call(this._onEndObj))};DvtScheduled.prototype.Initialize=function(){};DvtScheduled.prototype.Start=function(){};DvtScheduled.prototype.Step=function(a){};DvtScheduled.prototype.End=function(){};var DvtScheduler=function(a){this.Init(a)};DvtObj.createSubclass(DvtScheduler,DvtObj,"DvtScheduler");
DvtScheduler.prototype.Init=function(a){this._timer=new DvtTimer(a,1E3/30,this.HandleTimer,this);this._scheduledItems=[];this._bRunning=!1};DvtScheduler.prototype.setInterval=function(a){0>a&&(a=0);this.pause();this._timer.setInterval(a);this.play()};DvtScheduler.prototype.getInterval=function(){return this._timer.getInterval()};
DvtScheduler.prototype.HandleTimer=function(){for(var a=(new Date).getTime(),b=0;b<this._scheduledItems.length;b++){var c=this._scheduledItems[b];c.processTime(a)&&this.removeScheduled(c)}1>this._scheduledItems.length&&this.pause()};DvtScheduler.prototype.addScheduled=function(a){0>DvtArrayUtils.getIndex(this._scheduledItems,a)&&this._scheduledItems.push(a);this.play()};
DvtScheduler.prototype.removeScheduled=function(a){a=DvtArrayUtils.getIndex(this._scheduledItems,a);0<=a&&this._scheduledItems.splice(a,1)};DvtScheduler.prototype.play=function(){if(!this._bRunning){for(var a=0;a<this._scheduledItems.length;a++){var b=this._scheduledItems[a];b.isRunning()||b.play()}this._bRunning=!0;this._timer.start()}};
DvtScheduler.prototype.pause=function(){if(this._bRunning){this._bRunning=!1;this._timer.stop();for(var a=0;a<this._scheduledItems.length;a++){var b=this._scheduledItems[a];b.isRunning()&&b.pause()}}};var DvtAnimator=function(a,b,c,d){this.Init(a,b,c,d)};DvtObj.createSubclass(DvtAnimator,DvtScheduled,"DvtAnimator");DvtAnimator.TYPE_NUMBER="typeNumber";DvtAnimator.TYPE_MATRIX="typeMatrix";DvtAnimator.TYPE_NUMBER_ARRAY="typeNumberArray";DvtAnimator.TYPE_COLOR="typeColor";
DvtAnimator.TYPE_COLOR_ARRAY="typeColorArray";DvtAnimator.TYPE_GROW_POLYLINE="typeGrowPolyline";DvtAnimator.TYPE_RECTANGLE="typeRectangle";DvtAnimator.TYPE_POINT="typePoint";DvtAnimator.TYPE_PATH="typePath";DvtAnimator.TYPE_GROW_PATH="typeGrowPath";DvtAnimator.TYPE_FILL="typeFill";DvtAnimator.TYPE_STROKE="typeStroke";DvtAnimator.TYPE_POLYLINE="typePolyline";DvtAnimator._KEY_PREFIX="dvtAnimPropMap_";
DvtAnimator.prototype.Init=function(a,b,c,d){DvtAnimator.superclass.Init.call(this,a,a.getScheduler(),b,c,d);this._context=a;this._props={}};DvtAnimator.prototype.addProp=function(a,b,c,d,e){var f=this.GetPropItem(b,c);f?f.destVal=e:(f=new DvtAnimatorPropItem(a,b,c,d,e),a=DvtAnimator.GetKey(b),this._props[a]||(this._props[a]={}),this._props[a][DvtAnimator.GetKey(c)]=f)};
DvtAnimator.prototype.removeProp=function(a,b){var c=this.GetPropItem(a,b);return c?(c=c.destVal,delete this._props[DvtAnimator.GetKey(a)][DvtAnimator.GetKey(b)],c):null};DvtAnimator.prototype.getDestVal=function(a,b,c){var d=this.GetPropItem(a,b);return d?d.destVal:c?b.call(a):null};DvtAnimator.prototype.GetPropItem=function(a,b){var c=DvtAnimator.GetKey(a);return this._props[c]?this._props[c][DvtAnimator.GetKey(b)]:null};
DvtAnimator.GetKey=function(a){a._dvtAnimPropMapKey||(a._dvtAnimPropMapKey=DvtAnimator._KEY_PREFIX+Math.random());return a._dvtAnimPropMapKey};DvtAnimator.prototype.Initialize=function(){for(var a in this._props)for(var b in this._props[a]){var c=this._props[a][b];c.startVal=c.getter.call(c.obj)}};
DvtAnimator.prototype.Step=function(a){for(var b in this._props)for(var c in this._props[b]){var d=this._props[b][c],e=d.obj,f=d.setter,d=DvtInterpolator.interpolate(this._context,d.type,d.startVal,d.destVal,a);f.call(e,d)}};var DvtAnimatorPropItem=function(a,b,c,d,e){this.type=a;this.obj=b;this.getter=c;this.setter=d;this.destVal=e;this.startVal=null};DvtObj.createSubclass(DvtAnimatorPropItem,DvtObj,"DvtAnimatorPropItem");var DvtPlayable=function(a){this.Init(a)};
DvtObj.createSubclass(DvtPlayable,DvtObj,"DvtPlayable");DvtPlayable.appendOnEnd=function(a,b,c){if(a&&b){var d=a.getOnEnd();d&&d[0]?a.setOnEnd(function(){d[0].call(d[1]);b.call(c)}):a.setOnEnd(b,c)}};DvtPlayable.prependOnEnd=function(a,b,c){if(a&&b){var d=a.getOnEnd();d&&d[0]?a.setOnEnd(function(){b.call(c);d[0].call(d[1])}):a.setOnEnd(b,c)}};
DvtPlayable.appendOnStart=function(a,b,c){if(a&&b&&a.getOnStart&&a.setOnStart){var d=a.getOnStart();d&&d[0]?a.setOnStart(function(){d[0].call(d[1]);b.call(c)}):a.setOnStart(b,c)}};DvtPlayable.prependOnStart=function(a,b,c){if(a&&b&&a.getOnStart&&a.setOnStart){var d=a.getOnStart();d&&d[0]?a.setOnStart(function(){b.call(c);d[0].call(d[1])}):a.setOnStart(b,c)}};
DvtPlayable.appendOnInit=function(a,b,c){if(a&&b&&a.getOnInit&&a.setOnInit){var d=a.getOnInit();d&&d[0]?a.setOnInit(function(){d[0].call(d[1]);b.call(c)}):a.setOnInit(b,c)}};DvtPlayable.prependOnInit=function(a,b,c){if(a&&b&&a.getOnInit&&a.setOnInit){var d=a.getOnInit();d&&d[0]?a.setOnInit(function(){b.call(c);d[0].call(d[1])}):a.setOnInit(b,c)}};DvtPlayable.prototype.Init=function(a){this.Context=a;this._onEndObj=this._onEnd=null};
DvtPlayable.prototype.setOnEnd=function(a,b){this._onEnd=a;this._onEndObj=b?b:null;this.OnEndUpdated()};DvtPlayable.prototype.getOnEnd=function(){return[this._onEnd,this._onEndObj]};DvtPlayable.prototype.OnEndUpdated=function(){};DvtPlayable.prototype.play=function(){};DvtPlayable.prototype.stop=function(a){};DvtPlayable.prototype.pause=function(){};
var DvtParallelPlayable=function(a){var b;arguments&&1<arguments.length&&arguments[1]instanceof Array?b=arguments[1]:(b=DvtArrayUtils.argsToArray(arguments),b.splice(0,1));this.Init(a,b)};DvtObj.createSubclass(DvtParallelPlayable,DvtPlayable,"DvtParallelPlayable");DvtParallelPlayable.prototype.Init=function(a,b){DvtParallelPlayable.superclass.Init.call(this,a);this._runningCounter=0;this._arPlayables=b;this._bStarted=!1};DvtParallelPlayable.prototype.getPlayables=function(){return this._arPlayables};
DvtParallelPlayable.prototype.play=function(){if(this._arPlayables&&0<this._arPlayables.length){this._runningCounter=this._arPlayables.length;for(var a,b=0;b<this._arPlayables.length;b++)a=this._arPlayables[b],a instanceof DvtPlayable&&(this._bStarted||DvtPlayable.appendOnEnd(a,this.OnPlayableEnd,this),a.play());this._bStarted=!0}else(new DvtTimer(this.Context,0,this.DoEnd,this,1)).start()};
DvtParallelPlayable.prototype.stop=function(a){if(this._arPlayables)for(var b,c=0;c<this._arPlayables.length;c++)b=this._arPlayables[c],b instanceof DvtPlayable&&b.stop(a)};DvtParallelPlayable.prototype.pause=function(){if(this._arPlayables)for(var a,b=0;b<this._arPlayables.length;b++)a=this._arPlayables[b],a instanceof DvtPlayable&&a.pause()};DvtParallelPlayable.prototype.OnPlayableEnd=function(){this._runningCounter--;1>this._runningCounter&&this.DoEnd()};
DvtParallelPlayable.prototype.DoEnd=function(){this._onEnd&&this._onEnd.call(this._onEndObj)};var DvtSequentialPlayable=function(a){var b;arguments&&1<arguments.length&&arguments[1]instanceof Array?b=arguments[1]:(b=DvtArrayUtils.argsToArray(arguments),b.splice(0,1));this.Init(a,b)};DvtObj.createSubclass(DvtSequentialPlayable,DvtPlayable,"DvtSequentialPlayable");
DvtSequentialPlayable.prototype.Init=function(a,b){DvtSequentialPlayable.superclass.Init.call(this,a);this._arPlayables=b;this._currIndex=-1;this._bStarted=!1};DvtSequentialPlayable.prototype.getPlayables=function(){return this._arPlayables};
DvtSequentialPlayable.prototype.play=function(){if(this._arPlayables&&0<this._arPlayables.length)if(this._bStarted){var a=this._arPlayables[this._currIndex];a instanceof DvtPlayable&&a.play()}else{this._arPlayables[0]instanceof DvtPlayable&&(a=this._arPlayables[0]);var b;this._arPlayables[this._arPlayables.length-1]instanceof DvtPlayable&&(b=this._arPlayables[this._arPlayables.length-1]);for(var c,d=0;d<this._arPlayables.length-1;d++)c=this._arPlayables[d],c instanceof DvtPlayable&&DvtPlayable.appendOnEnd(c,
this.DoSequenceStep,this);b&&DvtPlayable.appendOnEnd(b,this.DoEnd,this);this._bStarted=!0;this._currIndex=0;a&&a.play()}else(new DvtTimer(this.Context,0,this.DoEnd,this,1)).start()};DvtSequentialPlayable.prototype.DoSequenceStep=function(){var a=this._arPlayables[++this._currIndex];a instanceof DvtPlayable?a.play():this.DoSequenceStep()};
DvtSequentialPlayable.prototype.stop=function(a){if(this._arPlayables)for(var b,c=this._currIndex;c<this._arPlayables.length;c++)(b=this._arPlayables[c])&&b instanceof DvtPlayable&&b.stop(a)};DvtSequentialPlayable.prototype.pause=function(){if(this._arPlayables){var a=this._arPlayables[this._currIndex];a instanceof DvtPlayable&&a.pause()}};DvtSequentialPlayable.prototype.DoEnd=function(){this._onEnd&&this._onEnd.call(this._onEndObj)};var DvtEasing=function(){this.Init()};
DvtObj.createSubclass(DvtEasing,DvtObj,"DvtEasing");DvtEasing.linear=function(a){return a};DvtEasing.quadraticIn=function(a){return DvtEasing.PolyIn(a,2)};DvtEasing.quadraticOut=function(a){return DvtEasing.PolyOut(a,2)};DvtEasing.quadraticInOut=function(a){return DvtEasing.PolyInOut(a,2)};DvtEasing.cubicIn=function(a){return DvtEasing.PolyIn(a,3)};DvtEasing.cubicOut=function(a){return DvtEasing.PolyOut(a,3)};DvtEasing.cubicInOut=function(a){return DvtEasing.PolyInOut(a,3)};
DvtEasing.backOut=function(a,b){b||(b=1.70158);a=1-a;return 1-a*a*((b+1)*a-b)};DvtEasing.backIn=function(a,b){b||(b=1.70158);return a*a*((b+1)*a-b)};DvtEasing.elasticIn=function(a,b,c){if(0>=a||1<=a)return a;c||(c=.45);var d;!b||1>b?(b=1,d=c/4):d=c/(2*Math.PI)*Math.asin(1/b);return-(b*Math.pow(2,10*--a)*Math.sin(2*(a-d)*Math.PI/c))};DvtEasing.elasticOut=function(a,b,c){return 1-DvtEasing.elasticIn(1-a,b,c)};DvtEasing.PolyIn=function(a,b){return 0>a?0:1<a?1:Math.pow(a,b)};
DvtEasing.PolyOut=function(a,b){return 0>a?0:1<a?1:1-Math.pow(1-a,b)};DvtEasing.PolyInOut=function(a,b){return 0>a?0:1<a?1:.5>a?.5*Math.pow(2*a,b):.5*(2-Math.pow(2*(1-a),b))};DvtEasing.prototype.Init=function(){};var DvtInterpolator=function(){this.Init()};DvtObj.createSubclass(DvtInterpolator,DvtObj,"DvtInterpolator");DvtInterpolator.addInterpolator=function(a,b){DvtInterpolator._map[a]=b};DvtInterpolator.removeInterpolator=function(a){delete DvtInterpolator._map[a]};
DvtInterpolator.interpolate=function(a,b,c,d,e){return(b=DvtInterpolator._getInterpolator(b))?b(a,c,d,e):d};DvtInterpolator._getInterpolator=function(a){return DvtInterpolator._map[a]};DvtInterpolator.InterpolateNumber=function(a,b,c,d){return DvtMath.interpolateNumber(b,c,d)};DvtInterpolator.InterpolateNumberArray=function(a,b,c,d){for(var e=b.length,f=c.length,g=[],h=0;h<Math.max(e,f);h++)g.push(DvtInterpolator.InterpolateNumber(a,h<e?b[h]:b[e-1],h<f?c[h]:c[f-1],d));return g};
DvtInterpolator.InterpolateMatrix=function(a,b,c,d){var e=DvtInterpolator.InterpolateNumber(a,b.getA(),c.getA(),d),f=DvtInterpolator.InterpolateNumber(a,b.getB(),c.getB(),d),g=DvtInterpolator.InterpolateNumber(a,b.getC(),c.getC(),d),h=DvtInterpolator.InterpolateNumber(a,b.getD(),c.getD(),d),k=DvtInterpolator.InterpolateNumber(a,b.getTx(),c.getTx(),d);a=DvtInterpolator.InterpolateNumber(a,b.getTy(),c.getTy(),d);return new DvtMatrix(e,f,g,h,k,a)};
DvtInterpolator.InterpolateColor=function(a,b,c,d){return DvtColorUtils.interpolateColor(b,c,d)};DvtInterpolator.InterpolateColorArray=function(a,b,c,d){for(var e=b.length,f=c.length,g=[],h=0;h<Math.max(e,f);h++)g.push(DvtInterpolator.InterpolateColor(a,h<e?b[h]:b[e-1],h<f?c[h]:c[f-1],d));return g};
DvtInterpolator.InterpolateGrowPolyline=function(a,b,c,d){if(0===d)return[c[0],c[1]];if(1===d)return c;b=c.length;a=[c[0],c[1]];for(var e=DvtInterpolator.CalcPolylineLength(c),f=d*e,g=0,h,k=2;k<b-1;k+=2){d=c[k-2];var e=c[k-1],m=c[k],n=c[k+1];h=DvtInterpolator.CalcPolylineLength([d,e,m,n]);if(g+h>f){c=(f-g)/h;b=n-e;a.push(d+c*(m-d));a.push(e+c*b);break}else g+=h,a.push(m),a.push(n)}return a};
DvtInterpolator.InterpolateGrowPath=function(a,b,c,d){if(0===d)return[c[0],c[1]];if(1===d)return c;b=c.length;a=[];for(var e=DvtInterpolator.CalcPathLength(c),e=d*e,f=0,g,h,k,m,n,p,q,r,t,v=0;v<b;v++){d=c[v];var u;switch(d){case "M":h=c[++v];k=c[++v];r=h;t=k;u=[r,t,r,t];break;case "L":h=c[++v];k=c[++v];u=[r,t,h,k];break;case "Q":m=c[++v];n=c[++v];h=c[++v];k=c[++v];u=[r,t,h,k];break;case "C":m=c[++v],n=c[++v],p=c[++v],q=c[++v],h=c[++v],k=c[++v],u=[r,t,h,k]}g=DvtInterpolator.CalcPolylineLength(u);if(f+
g>e){c=(e-f)/g;a.push(d);switch(d){case "Q":a.push(r+c*(m-r),t+c*(n-t));break;case "C":a.push(r+c*(m-r),t+c*(n-t),r+c*(p-r),t+c*(q-t))}a.push(r+c*(h-r),t+c*(k-t));break}else{f+=g;a.push(d);switch(d){case "Q":a.push(m,n);break;case "C":a.push(m,n,p,q)}a.push(h);a.push(k)}r=h;t=k}return a};
DvtInterpolator.CalcPolylineLength=function(a){for(var b=0,c,d,e,f,g=0;g<a.length;g+=2)e=a[g],f=a[g+1],0<g&&(e===c?b+=Math.abs(f-d):f===d?b+=Math.abs(e-c):(c=Math.abs(e-c),d=Math.abs(f-d),b+=Math.sqrt(c*c+d*d))),c=e,d=f;return b};
DvtInterpolator.CalcPathLength=function(a){for(var b=0,c,d,e,f,g,h=0;h<a.length;){g=a[h];switch(g){case "M":e=a[h+1];f=a[h+2];c=e;d=f;h+=3;continue;case "L":e=a[h+1];f=a[h+2];h+=3;break;case "Q":e=a[h+3];f=a[h+4];h+=5;break;case "Q":e=a[h+5],f=a[h+6],h+=7}0<h&&(e===c?b+=Math.abs(f-d):f===d?b+=Math.abs(e-c):(c=Math.abs(e-c),d=Math.abs(f-d),b+=Math.sqrt(c*c+d*d)));c=e;d=f}return b};
DvtInterpolator.InterpolateRectangle=function(a,b,c,d){var e=DvtInterpolator.InterpolateNumber(a,b.x,c.x,d),f=DvtInterpolator.InterpolateNumber(a,b.y,c.y,d),g=DvtInterpolator.InterpolateNumber(a,b.w,c.w,d);a=DvtInterpolator.InterpolateNumber(a,b.h,c.h,d);return new DvtRectangle(e,f,g,a)};DvtInterpolator.InterpolatePoint=function(a,b,c,d){var e=DvtInterpolator.InterpolateNumber(a,b.x,c.x,d);a=DvtInterpolator.InterpolateNumber(a,b.y,c.y,d);return new DvtPoint(e,a)};
DvtInterpolator.InterpolatePath=function(a,b,c,d){var e=b.length,f=c.length;if(e!=f)return c;for(var g=[],h=0,k=0;h<e&&k<f;){var m=b[h],n=c[k],p=!isNaN(m),q=!isNaN(n);p||q?p&&q&&g.push(DvtInterpolator.InterpolateNumber(a,m,n,d)):m===n&&g.push(m);h++;k++}return g};
DvtInterpolator.InterpolateFill=function(a,b,c,d){if(b instanceof DvtSolidFill&&c instanceof DvtSolidFill){var e=DvtInterpolator.InterpolateColor(a,b.getColor(),c.getColor(),d);a=DvtInterpolator.InterpolateNumber(a,b.getAlpha(),c.getAlpha(),d);e=DvtColorUtils.makeRGB(DvtColorUtils.getRed(e),DvtColorUtils.getGreen(e),DvtColorUtils.getBlue(e));return new DvtSolidFill(e,a)}return c};
DvtInterpolator.InterpolateStroke=function(a,b,c,d){if(b instanceof DvtSolidStroke&&c instanceof DvtSolidStroke){var e=DvtInterpolator.InterpolateColor(a,b.getColor(),c.getColor(),d),f=DvtInterpolator.InterpolateNumber(a,b.getAlpha(),c.getAlpha(),d);a=DvtInterpolator.InterpolateNumber(a,b.getWidth(),c.getWidth(),d);e=DvtColorUtils.makeRGB(DvtColorUtils.getRed(e),DvtColorUtils.getGreen(e),DvtColorUtils.getBlue(e));c=c.clone();c.setColor(e);c.setAlpha(f);c.setWidth(a)}return c};
DvtInterpolator.InterpolatePolyline=function(a,b,c,d){for(var e=b.length,f=c.length,g=[],h=0;h<Math.max(e,f);h++){var k=2;1==h%2&&(k=1);g.push(DvtInterpolator.InterpolateNumber(a,h<e?b[h]:b[e-k],h<f?c[h]:c[f-k],d))}if(f<e)for(h=g.length,a=g[h-2],b=g[h-1],h-=4;0<=h;h-=2)if(c=g[h+1],g[h]==a&&c==b)g.splice(h,2);else break;return g};DvtInterpolator.prototype.Init=function(){};DvtInterpolator._map={};DvtInterpolator._map[DvtAnimator.TYPE_NUMBER]=DvtInterpolator.InterpolateNumber;
DvtInterpolator._map[DvtAnimator.TYPE_MATRIX]=DvtInterpolator.InterpolateMatrix;DvtInterpolator._map[DvtAnimator.TYPE_NUMBER_ARRAY]=DvtInterpolator.InterpolateNumberArray;DvtInterpolator._map[DvtAnimator.TYPE_COLOR]=DvtInterpolator.InterpolateColor;DvtInterpolator._map[DvtAnimator.TYPE_COLOR_ARRAY]=DvtInterpolator.InterpolateColorArray;DvtInterpolator._map[DvtAnimator.TYPE_GROW_POLYLINE]=DvtInterpolator.InterpolateGrowPolyline;DvtInterpolator._map[DvtAnimator.TYPE_RECTANGLE]=DvtInterpolator.InterpolateRectangle;
DvtInterpolator._map[DvtAnimator.TYPE_POINT]=DvtInterpolator.InterpolatePoint;DvtInterpolator._map[DvtAnimator.TYPE_PATH]=DvtInterpolator.InterpolatePath;DvtInterpolator._map[DvtAnimator.TYPE_GROW_PATH]=DvtInterpolator.InterpolateGrowPath;DvtInterpolator._map[DvtAnimator.TYPE_FILL]=DvtInterpolator.InterpolateFill;DvtInterpolator._map[DvtAnimator.TYPE_STROKE]=DvtInterpolator.InterpolateStroke;DvtInterpolator._map[DvtAnimator.TYPE_POLYLINE]=DvtInterpolator.InterpolatePolyline;
var DvtTimer=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtTimer,DvtObj,"DvtTimer");DvtTimer.prototype.Init=function(a,b,c,d,e){this._impl||(this._impl=a.getImplFactory().newTimer());this._interval=b;this._callback=c;d&&(this._callbackObj=d);this._repeatCount=e;this._bRunning=!1;this._numIterations=0};DvtTimer.prototype.start=function(){this._bRunning||(this._bRunning=!0,this.StartTimer())};DvtTimer.prototype.stop=function(){this._bRunning&&(this._bRunning=!1,this.StopTimer())};
DvtTimer.prototype.reset=function(){this._bRunning&&this.stop();this._numIterations=0};DvtTimer.prototype.isRunning=function(){return this._bRunning};DvtTimer.prototype.HandleTimer=function(){this._callback&&(this._callback.call(this._callbackObj),this._repeatCount&&(this._numIterations++,this._numIterations>=this._repeatCount&&this.stop()))};DvtTimer.prototype.setInterval=function(a){0>a&&(a=0);var b=this._bRunning;b&&this.stop();this._interval=a;b&&this.start()};DvtTimer.prototype.getInterval=function(){return this._interval};
DvtTimer.prototype.StartTimer=function(){this._impl&&this._impl.startTimer&&this._impl.startTimer(this.getInterval(),this.HandleTimer,this)};DvtTimer.prototype.StopTimer=function(){this._impl&&this._impl.stopTimer&&this._impl.stopTimer()};var DvtBaseAnimation=function(a,b,c,d){this.Init(a,b,c,d)};DvtObj.createSubclass(DvtBaseAnimation,DvtPlayable,"DvtBaseAnimation");DvtBaseAnimation.EASING_LINEAR=1;DvtBaseAnimation.EASING_CUBIC_IN_OUT=2;DvtBaseAnimation.EASING_CUBIC_IN=3;
DvtBaseAnimation.EASING_CUBIC_OUT=4;DvtBaseAnimation.EASING_QUADRATIC_IN_OUT=5;DvtBaseAnimation.EASING_QUADRATIC_IN=6;DvtBaseAnimation.EASING_QUADRATIC_OUT=7;DvtBaseAnimation.EASING_BOUNCE_IN=8;DvtBaseAnimation.EASING_BOUNCE_OUT=9;DvtBaseAnimation.EASING_ELASTIC_IN=10;DvtBaseAnimation.EASING_ELASTIC_OUT=11;DvtBaseAnimation.DIR_C=1;DvtBaseAnimation.DIR_N=2;DvtBaseAnimation.DIR_NE=3;DvtBaseAnimation.DIR_E=4;DvtBaseAnimation.DIR_SE=5;DvtBaseAnimation.DIR_S=6;DvtBaseAnimation.DIR_SW=7;
DvtBaseAnimation.DIR_W=8;DvtBaseAnimation.DIR_NW=9;DvtBaseAnimation.AXIS_X=1;DvtBaseAnimation.AXIS_Y=2;DvtBaseAnimation.ROT_DIR_CLOCKWISE=1;DvtBaseAnimation.ROT_DIR_COUNTERCLOCKWISE=2;
DvtBaseAnimation.GetEasingFunction=function(a){switch(a){case DvtBaseAnimation.EASING_LINEAR:return DvtEasing.linear;case DvtBaseAnimation.EASING_CUBIC_IN:return DvtEasing.cubicIn;case DvtBaseAnimation.EASING_CUBIC_OUT:return DvtEasing.cubicOut;case DvtBaseAnimation.EASING_QUADRATIC_IN_OUT:return DvtEasing.quadraticInOut;case DvtBaseAnimation.EASING_QUADRATIC_IN:return DvtEasing.quadraticIn;case DvtBaseAnimation.EASING_QUADRATIC_OUT:return DvtEasing.quadraticOut;case DvtBaseAnimation.EASING_BOUNCE_IN:return DvtEasing.backIn;
case DvtBaseAnimation.EASING_BOUNCE_OUT:return DvtEasing.backOut;case DvtBaseAnimation.EASING_ELASTIC_IN:return DvtEasing.elasticIn;case DvtBaseAnimation.EASING_ELASTIC_OUT:return DvtEasing.elasticOut;default:return DvtEasing.cubicInOut}};
DvtBaseAnimation.GetCompassPoint=function(a,b){switch(b){case DvtBaseAnimation.DIR_N:return new DvtPoint(a.x+.5*a.w,a.y);case DvtBaseAnimation.DIR_NE:return new DvtPoint(a.x+a.w,a.y);case DvtBaseAnimation.DIR_E:return new DvtPoint(a.x+a.w,a.y+.5*a.h);case DvtBaseAnimation.DIR_SE:return new DvtPoint(a.x+a.w,a.y+a.h);case DvtBaseAnimation.DIR_S:return new DvtPoint(a.x+.5*a.w,a.y+a.h);case DvtBaseAnimation.DIR_SW:return new DvtPoint(a.x,a.y+a.h);case DvtBaseAnimation.DIR_W:return new DvtPoint(a.x,a.y+
.5*a.h);case DvtBaseAnimation.DIR_NW:return new DvtPoint(a.x,a.y);default:return new DvtPoint(a.x+.5*a.w,a.y+.5*a.h)}};
DvtBaseAnimation.GetAlignCompassPoint=function(a,b,c){b=DvtBaseAnimation.GetCompassPoint(b,c);switch(c){case DvtBaseAnimation.DIR_N:return new DvtPoint(b.x-.5*a.w,b.y);case DvtBaseAnimation.DIR_NE:return new DvtPoint(b.x-a.w,b.y);case DvtBaseAnimation.DIR_E:return new DvtPoint(b.x-a.w,b.y-.5*a.h);case DvtBaseAnimation.DIR_SE:return new DvtPoint(b.x-a.w,b.y-a.h);case DvtBaseAnimation.DIR_S:return new DvtPoint(b.x-.5*a.w,b.y-a.h);case DvtBaseAnimation.DIR_SW:return new DvtPoint(b.x,b.y-a.h);case DvtBaseAnimation.DIR_W:return new DvtPoint(b.x,
b.y-.5*a.h);case DvtBaseAnimation.DIR_NW:return new DvtPoint(b.x,b.y);default:return new DvtPoint(b.x-.5*a.w,b.y-.5*a.h)}};DvtBaseAnimation.prototype.Init=function(a,b,c,d){DvtBaseAnimation.superclass.Init.call(this,a);this._context=a;this._arObjects=b instanceof Array?b:[b];this._duration=c?c:.5;this._delay=d?d:0;this._easing=DvtBaseAnimation.EASING_CUBIC_IN_OUT;this._bSaveAndRestoreOriginalMatrices=this._bInitialized=!1;this._origMatrixArray=null;this._bHideObjectsOnEnd=!1;this.CreateAnimator(a)};
DvtBaseAnimation.prototype.GetContext=function(){return this._context};DvtBaseAnimation.prototype.isRunning=function(){return this._animator?this._animator.isRunning():!1};DvtBaseAnimation.prototype.play=function(){this._bInitialized||(this.InitializeEndStates(this._arObjects),this.InitializeStartStates(this._arObjects),this.InitializePlay(),this._bInitialized=!0);this._animator&&this._animator.play()};DvtBaseAnimation.prototype.stop=function(a){this._animator&&this._animator.stop(a)};
DvtBaseAnimation.prototype.pause=function(){this._animator&&this._animator.pause()};DvtBaseAnimation.prototype.getDuration=function(){return this._duration};DvtBaseAnimation.prototype.setDuration=function(a){this._duration=a?a:0;this._animator&&this._animator.setDuration(this._duration)};DvtBaseAnimation.prototype.getDelay=function(){return this._delay};DvtBaseAnimation.prototype.setDelay=function(a){this._delay=a?a:0;this._animator&&this._animator.setDelay(this._delay)};
DvtBaseAnimation.prototype.getEasing=function(){return this._easing};DvtBaseAnimation.prototype.setEasing=function(a){this._easing=a;this._animator&&this._animator.setEasing(DvtBaseAnimation.GetEasingFunction(this._easing))};DvtBaseAnimation.prototype.CreateAnimator=function(a){this._animator=new DvtAnimator(a,this._duration,this._delay,DvtBaseAnimation.GetEasingFunction(this._easing));this._animator.setOnEnd(this.OnAnimEnd,this)};
DvtBaseAnimation.prototype.OnAnimEnd=function(){this._bHideObjectsOnEnd&&this.HideObjects();this._bSaveAndRestoreOriginalMatrices&&this.RestoreOriginalMatrices();this._onEnd&&this._onEnd.call(this._onEndObj)};DvtBaseAnimation.prototype.InitializePlay=function(){};
DvtBaseAnimation.prototype.InitializeStartStates=function(a){if(a)for(var b,c=0;c<a.length;c++)if(b=a[c])this._bSaveAndRestoreOriginalMatrices&&(this._origMatrixArray||(this._origMatrixArray=[]),this._origMatrixArray.push(b.getMatrix())),this.InitStartState(b)};DvtBaseAnimation.prototype.InitializeEndStates=function(a){if(a)for(var b,c=0;c<a.length;c++)(b=a[c])&&this.InitEndState(b)};DvtBaseAnimation.prototype.InitStartState=function(a){};DvtBaseAnimation.prototype.InitEndState=function(a){};
DvtBaseAnimation.prototype.ShowObjects=function(){this.SetObjectsVisible(!0)};DvtBaseAnimation.prototype.HideObjects=function(){this.SetObjectsVisible(!1)};DvtBaseAnimation.prototype.SetObjectsVisible=function(a){if(this._arObjects)for(var b,c=this._arObjects.length-1;0<=c;c--)(b=this._arObjects[c])&&b.setVisible(a)};DvtBaseAnimation.prototype.RestoreOriginalMatrices=function(){if(this._arObjects)for(var a,b=this._arObjects.length-1;0<=b;b--)(a=this._arObjects[b])&&this._origMatrixArray&&a.setMatrix(this._origMatrixArray.pop())};
var DvtCustomAnimation=function(a,b,c,d){this.Init(a,b,c,d)};DvtObj.createSubclass(DvtCustomAnimation,DvtBaseAnimation,"DvtCustomAnimation");DvtCustomAnimation.prototype.getAnimator=function(){return this._animator};var DvtAnimConveyorIn=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtAnimConveyorIn,DvtBaseAnimation,"DvtAnimConveyorIn");
DvtAnimConveyorIn.prototype.Init=function(a,b,c,d,e){DvtAnimConveyorIn.superclass.Init.call(this,a,b,d,e);this._direction=c;this._SCALE=.2;this._SKEW_ANGLE=Math.PI/12;this._bSaveAndRestoreOriginalMatrices=!0};
DvtAnimConveyorIn.prototype.CreateAnimator=function(a){DvtAnimConveyorIn.superclass.CreateAnimator.call(this,a);this.setEasing(DvtBaseAnimation.EASING_CUBIC_IN);this._animator.setDuration(this.getDuration()/2);this._animator.setOnEnd(this.PlayEndAnim,this);this._endAnim=new DvtAnimator(a,this.getDuration()/2,0,DvtBaseAnimation.GetEasingFunction(DvtBaseAnimation.EASING_CUBIC_OUT));this._endAnim.setOnEnd(this.OnAnimEnd,this)};
DvtAnimConveyorIn.prototype.InitializePlay=function(){DvtAnimConveyorIn.superclass.InitializePlay.call(this);this.ShowObjects()};
DvtAnimConveyorIn.prototype.InitStartState=function(a){DvtAnimConveyorIn.superclass.InitStartState.call(this,a);a.setVisible(!1);var b=a.getDimensions(),c=this.GetConcatenatedRotationMatrix(a,b),d=new DvtMatrix;this._direction===DvtBaseAnimation.DIR_W||this._direction===DvtBaseAnimation.DIR_E?this._direction===DvtBaseAnimation.DIR_W?d.translate(b.w,0):d.translate(-b.w,0):this._direction===DvtBaseAnimation.DIR_N?d.translate(0,b.h):d.translate(0,-b.h);d.concat(c);a.setMatrix(d);a.setAlpha(0)};
DvtAnimConveyorIn.prototype.InitEndState=function(a){DvtAnimConveyorIn.superclass.InitEndState.call(this,a);var b=a.getDimensions(),b=this.GetConcatenatedRotationMatrix(a,b);this._animator.addProp(DvtAnimator.TYPE_MATRIX,a,a.getMatrix,a.setMatrix,b);this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getAlpha,a.setAlpha,1);b=a.getMatrix();this._endAnim.addProp(DvtAnimator.TYPE_MATRIX,a,a.getMatrix,a.setMatrix,b)};DvtAnimConveyorIn.prototype.PlayEndAnim=function(){this._endAnim.play()};
DvtAnimConveyorIn.prototype.GetConcatenatedRotationMatrix=function(a,b){var c=this._SCALE,d=1-c,e=b.w*d,d=b.h*d,f=this._SKEW_ANGLE;if(this._direction===DvtBaseAnimation.DIR_W||this._direction===DvtBaseAnimation.DIR_S)f=-f;var g=Math.tan(f),h=a.getMatrix(),k=new DvtMatrix;this._direction===DvtBaseAnimation.DIR_W||this._direction===DvtBaseAnimation.DIR_E?(k.skew(0,f),k.scale(c,1),this._direction===DvtBaseAnimation.DIR_W?k.translate(0,0):k.translate(e,-b.w*g)):(k.skew(f,0),k.scale(1,c),this._direction===
DvtBaseAnimation.DIR_N?k.translate(0,0):k.translate(-b.h*g,d));k.concat(h);return k};var DvtAnimConveyorOut=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtAnimConveyorOut,DvtBaseAnimation,"DvtAnimConveyorOut");DvtAnimConveyorOut.prototype.Init=function(a,b,c,d,e){DvtAnimConveyorOut.superclass.Init.call(this,a,b,d,e);this._direction=c;this._bHideObjectsOnEnd=this._bSaveAndRestoreOriginalMatrices=!0};
DvtAnimConveyorOut.prototype.CreateAnimator=function(a){DvtAnimConveyorOut.superclass.CreateAnimator.call(this,a);this.setEasing(DvtBaseAnimation.EASING_CUBIC_IN);this._animator.setDuration(this.getDuration()/2);this._animator.setOnEnd(this.PlayEndAnim,this);this._endAnim=new DvtAnimator(a,this.getDuration()/2,0,DvtBaseAnimation.GetEasingFunction(DvtBaseAnimation.EASING_CUBIC_OUT));this._endAnim.setOnEnd(this.OnAnimEnd,this)};
DvtAnimConveyorOut.prototype.InitEndState=function(a){DvtAnimConveyorOut.superclass.InitEndState.call(this,a);var b=a.getDimensions(),c=.8*b.w,d=.8*b.h,e=Math.PI/12;if(this._direction===DvtBaseAnimation.DIR_W||this._direction===DvtBaseAnimation.DIR_S)e=-e;var f=Math.tan(e),g=a.getMatrix(),h=new DvtMatrix;this._direction===DvtBaseAnimation.DIR_W||this._direction===DvtBaseAnimation.DIR_E?(h.skew(0,e),h.scale(.2,1),this._direction===DvtBaseAnimation.DIR_W?h.translate(0,0):h.translate(c,-b.w*f)):(h.skew(e,
0),h.scale(1,.2),this._direction===DvtBaseAnimation.DIR_N?h.translate(0,0):h.translate(-b.h*f,d));h.concat(g);this._animator.addProp(DvtAnimator.TYPE_MATRIX,a,a.getMatrix,a.setMatrix,h);c=new DvtMatrix;this._direction===DvtBaseAnimation.DIR_W||this._direction===DvtBaseAnimation.DIR_E?this._direction===DvtBaseAnimation.DIR_W?c.translate(b.w,0):c.translate(-b.w,0):this._direction===DvtBaseAnimation.DIR_N?c.translate(0,b.h):c.translate(0,-b.h);c.concat(h);this._endAnim.addProp(DvtAnimator.TYPE_MATRIX,
a,a.getMatrix,a.setMatrix,c);this._endAnim.addProp(DvtAnimator.TYPE_NUMBER,a,a.getAlpha,a.setAlpha,0)};DvtAnimConveyorOut.prototype.PlayEndAnim=function(){this._endAnim.play()};var DvtAnimFlipIn=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};DvtObj.createSubclass(DvtAnimFlipIn,DvtBaseAnimation,"DvtAnimFlipIn");
DvtAnimFlipIn.prototype.Init=function(a,b,c,d,e,f){DvtAnimFlipIn.superclass.Init.call(this,a,b,e,f);this._axis=c;this._rotationDir=d;this._bSaveAndRestoreOriginalMatrices=!0;this._cubeEffect=!1};
DvtAnimFlipIn.prototype.InitStartState=function(a){DvtAnimFlipIn.superclass.InitStartState.call(this,a);a.setVisible(!1);var b=a.getDimensions(),c=b.w/2,d=b.h/2,e=Math.PI/6;this._rotationDir===DvtBaseAnimation.ROT_DIR_COUNTERCLOCKWISE&&(e=-e);var f=Math.tan(e),g=a.getMatrix(),h=new DvtMatrix;this._axis===DvtBaseAnimation.AXIS_Y?(h.skew(0,e),h.scale(0,1),this._cubeEffect?this._rotationDir===DvtBaseAnimation.ROT_DIR_COUNTERCLOCKWISE?h.translate(b.w,0):h.translate(0,-b.w*f):h.translate(c,-c*f)):(h.skew(e,
0),h.scale(1,0),this._cubeEffect?this._rotationDir===DvtBaseAnimation.ROT_DIR_COUNTERCLOCKWISE?h.translate(-b.h*f,0):h.translate(0,b.h):h.translate(-d*f,d));h.concat(g);a.setMatrix(h);this._cubeEffect&&a.setAlpha(0)};
DvtAnimFlipIn.prototype.InitEndState=function(a){DvtAnimFlipIn.superclass.InitEndState.call(this,a);var b=a.getMatrix();this._animator.addProp(DvtAnimator.TYPE_MATRIX,a,a.getMatrix,a.setMatrix,b);this._cubeEffect&&this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getAlpha,a.setAlpha,1)};DvtAnimFlipIn.prototype.InitializePlay=function(){DvtAnimFlipIn.superclass.InitializePlay.call(this);this.ShowObjects()};var DvtAnimFlipOut=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};
DvtObj.createSubclass(DvtAnimFlipOut,DvtBaseAnimation,"DvtAnimFlipOut");DvtAnimFlipOut.prototype.Init=function(a,b,c,d,e,f){DvtAnimFlipOut.superclass.Init.call(this,a,b,e,f);this._axis=c;this._rotationDir=d;this._bHideObjectsOnEnd=this._bSaveAndRestoreOriginalMatrices=!0;this._cubeEffect=!1};
DvtAnimFlipOut.prototype.InitEndState=function(a){DvtAnimFlipOut.superclass.InitEndState.call(this,a);var b=a.getDimensions(),c=b.w/2,d=b.h/2,e=Math.PI/6;this._rotationDir===DvtBaseAnimation.ROT_DIR_CLOCKWISE&&(e=-e);var f=Math.tan(e),g=a.getMatrix(),h=new DvtMatrix;this._axis===DvtBaseAnimation.AXIS_Y?(h.skew(0,e),h.scale(0,1),this._cubeEffect?this._rotationDir===DvtBaseAnimation.ROT_DIR_CLOCKWISE?h.translate(b.w,0):h.translate(0,-b.w*f):h.translate(c,-c*f)):(h.skew(e,0),h.scale(1,0),this._cubeEffect?
this._rotationDir===DvtBaseAnimation.ROT_DIR_CLOCKWISE?h.translate(-b.h*f,0):h.translate(0,b.h):h.translate(-d*f,d));h.concat(g);this._animator.addProp(DvtAnimator.TYPE_MATRIX,a,a.getMatrix,a.setMatrix,h);this._cubeEffect&&this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getAlpha,a.setAlpha,0)};var DvtAnimCubeIn=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};DvtObj.createSubclass(DvtAnimCubeIn,DvtAnimFlipIn,"DvtAnimCubeIn");
DvtAnimCubeIn.prototype.Init=function(a,b,c,d,e,f){DvtAnimCubeIn.superclass.Init.call(this,a,b,c,d,e,f);this._cubeEffect=!0};var DvtAnimCubeOut=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};DvtObj.createSubclass(DvtAnimCubeOut,DvtAnimFlipOut,"DvtAnimCubeOut");DvtAnimCubeOut.prototype.Init=function(a,b,c,d,e,f){DvtAnimCubeOut.superclass.Init.call(this,a,b,c,d,e,f);this._cubeEffect=!0};var DvtAnimFadeIn=function(a,b,c,d){this.Init(a,b,c,d)};DvtObj.createSubclass(DvtAnimFadeIn,DvtBaseAnimation,"DvtAnimFadeIn");
DvtAnimFadeIn.prototype.Init=function(a,b,c,d){DvtAnimFadeIn.superclass.Init.call(this,a,b,c,d)};DvtAnimFadeIn.prototype.InitStartState=function(a){a.setAlpha(0)};DvtAnimFadeIn.prototype.InitEndState=function(a){this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getAlpha,a.setAlpha,1)};var DvtAnimFadeOut=function(a,b,c,d){this.Init(a,b,c,d)};DvtObj.createSubclass(DvtAnimFadeOut,DvtBaseAnimation,"DvtAnimFadeOut");
DvtAnimFadeOut.prototype.Init=function(a,b,c,d){DvtAnimFadeOut.superclass.Init.call(this,a,b,c,d)};DvtAnimFadeOut.prototype.InitEndState=function(a){this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getAlpha,a.setAlpha,0)};var DvtAnimMatrixTransformBy=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtAnimMatrixTransformBy,DvtBaseAnimation,"DvtAnimMatrixTransformBy");
DvtAnimMatrixTransformBy.prototype.Init=function(a,b,c,d,e){this._transformMatrix=c;DvtAnimMatrixTransformBy.superclass.Init.call(this,a,b,d,e)};DvtAnimMatrixTransformBy.prototype.InitEndState=function(a){var b=a.getMatrix();b&&(b=b.clone(),b.concat(this._transformMatrix),this._animator.addProp(DvtAnimator.TYPE_MATRIX,a,a.getMatrix,a.setMatrix,b))};var DvtAnimMoveBy=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtAnimMoveBy,DvtBaseAnimation,"DvtAnimMoveBy");
DvtAnimMoveBy.prototype.Init=function(a,b,c,d,e){this._arOffsets=c instanceof Array?c:c instanceof DvtPoint?[c]:[new DvtPoint(0,0)];this._currIndex=0;DvtAnimMoveBy.superclass.Init.call(this,a,b,d,e)};
DvtAnimMoveBy.prototype.InitEndState=function(a){var b;b=this._currIndex<this._arOffsets.length?this._arOffsets[this._currIndex]:this._arOffsets[this._arOffsets.length-1];this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getTranslateX,a.setTranslateX,a.getTranslateX()+b.x);this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getTranslateY,a.setTranslateY,a.getTranslateY()+b.y);this._currIndex++};var DvtAnimMoveTo=function(a,b,c,d,e){this.Init(a,b,c,d,e)};
DvtObj.createSubclass(DvtAnimMoveTo,DvtBaseAnimation,"DvtAnimMoveTo");DvtAnimMoveTo.prototype.Init=function(a,b,c,d,e){this._arPoints=c instanceof Array?c:c instanceof DvtPoint?[c]:[new DvtPoint(0,0)];this._currIndex=0;DvtAnimMoveTo.superclass.Init.call(this,a,b,d,e)};
DvtAnimMoveTo.prototype.InitEndState=function(a){var b;b=this._currIndex<this._arPoints.length?this._arPoints[this._currIndex]:this._arPoints[this._arPoints.length-1];this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getTranslateX,a.setTranslateX,b.x);this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getTranslateY,a.setTranslateY,b.y);this._currIndex++};var DvtAnimRotateBy=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtAnimRotateBy,DvtBaseAnimation,"DvtAnimRotateBy");
DvtAnimRotateBy.prototype.Init=function(a,b,c,d,e){this._arAngles=c instanceof Array?c:"number"==typeof c?[c]:[0];this._currIndex=0;DvtAnimRotateBy.superclass.Init.call(this,a,b,d,e)};DvtAnimRotateBy.prototype.InitEndState=function(a){var b;b=this._currIndex<this._arAngles.length?this._arAngles[this._currIndex]:this._arAngles[this._arAngles.length-1];this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getRotation,a.setRotation,a.getRotation()+b);this._currIndex++};
var DvtAnimRotateTo=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtAnimRotateTo,DvtBaseAnimation,"DvtAnimRotateTo");DvtAnimRotateTo.prototype.Init=function(a,b,c,d,e){this._arAngles=c instanceof Array?c:"number"==typeof c?[c]:[0];this._currIndex=0;DvtAnimRotateTo.superclass.Init.call(this,a,b,d,e)};
DvtAnimRotateTo.prototype.InitEndState=function(a){this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getRotation,a.setRotation,this._currIndex<this._arAngles.length?this._arAngles[this._currIndex]:this._arAngles[this._arAngles.length-1]);this._currIndex++};var DvtAnimScaleBy=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtAnimScaleBy,DvtBaseAnimation,"DvtAnimScaleBy");
DvtAnimScaleBy.prototype.Init=function(a,b,c,d,e){this._arScales=c instanceof Array?c:c instanceof DvtPoint?[c]:[new DvtPoint(1,1)];this._currIndex=0;DvtAnimScaleBy.superclass.Init.call(this,a,b,d,e)};
DvtAnimScaleBy.prototype.InitEndState=function(a){var b;b=this._currIndex<this._arScales.length?this._arScales[this._currIndex]:this._arScales[this._arScales.length-1];this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getScaleX,a.setScaleX,a.getScaleX()*b.x);this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getScaleY,a.setScaleY,a.getScaleY()*b.y);this._currIndex++};var DvtAnimScaleFadeIn=function(a,b,c,d,e,f,g){this.Init(a,b,c,d,e,f,g)};DvtObj.createSubclass(DvtAnimScaleFadeIn,DvtAnimFadeIn,"DvtAnimScaleFadeIn");
DvtAnimScaleFadeIn.prototype.Init=function(a,b,c,d,e,f,g){this._boundsRect=c;this._direction=d?d:DvtBaseAnimation.DIR_NW;this._minScale=e?e:.5;DvtAnimScaleFadeIn.superclass.Init.call(this,a,b,f,g);this._bSaveAndRestoreOriginalMatrices=!0};
DvtAnimScaleFadeIn.prototype.InitStartState=function(a){DvtAnimScaleFadeIn.superclass.InitStartState.call(this,a);var b=this._minScale*a.getScaleX(),c=this._minScale*a.getScaleY(),d=a.getDimensions(),d=new DvtRectangle(0,0,b*d.w,c*d.h),d=DvtBaseAnimation.GetAlignCompassPoint(d,this._boundsRect,this._direction);a.setTranslateX(d.x);a.setTranslateY(d.y);a.setScaleX(b);a.setScaleY(c)};
DvtAnimScaleFadeIn.prototype.InitEndState=function(a){DvtAnimScaleFadeIn.superclass.InitEndState.call(this,a);var b=a.getMatrix();this._animator.addProp(DvtAnimator.TYPE_MATRIX,a,a.getMatrix,a.setMatrix,b)};var DvtAnimScaleFadeOut=function(a,b,c,d,e,f,g){this.Init(a,b,c,d,e,f,g)};DvtObj.createSubclass(DvtAnimScaleFadeOut,DvtAnimFadeOut,"DvtAnimScaleFadeOut");
DvtAnimScaleFadeOut.prototype.Init=function(a,b,c,d,e,f,g){this._boundsRect=c;this._direction=d?d:DvtBaseAnimation.DIR_NE;this._minScale=e?e:.5;DvtAnimScaleFadeOut.superclass.Init.call(this,a,b,f,g);this._bSaveAndRestoreOriginalMatrices=!0};
DvtAnimScaleFadeOut.prototype.InitEndState=function(a){DvtAnimScaleFadeOut.superclass.InitEndState.call(this,a);var b=this._minScale*a.getScaleX(),c=this._minScale*a.getScaleY(),d=a.getDimensions(),d=new DvtRectangle(0,0,b*d.w,c*d.h),d=DvtBaseAnimation.GetAlignCompassPoint(d,this._boundsRect,this._direction);this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getScaleX,a.setScaleX,b);this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getScaleY,a.setScaleY,c);this._animator.addProp(DvtAnimator.TYPE_NUMBER,
a,a.getTranslateX,a.setTranslateX,d.x);this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getTranslateY,a.setTranslateY,d.y)};var DvtAnimScaleTo=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtAnimScaleTo,DvtBaseAnimation,"DvtAnimScaleTo");DvtAnimScaleTo.prototype.Init=function(a,b,c,d,e){this._arScales=c instanceof Array?c:c instanceof DvtPoint?[c]:[new DvtPoint(1,1)];this._currIndex=0;DvtAnimScaleTo.superclass.Init.call(this,a,b,d,e)};
DvtAnimScaleTo.prototype.InitEndState=function(a){var b;b=this._currIndex<this._arScales.length?this._arScales[this._currIndex]:this._arScales[this._arScales.length-1];this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getScaleX,a.setScaleX,b.x);this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getScaleY,a.setScaleY,b.y);this._currIndex++};var DvtAnimPopIn=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtAnimPopIn,DvtBaseAnimation,"DvtAnimPopIn");
DvtAnimPopIn.BackOut=function(a){return DvtEasing.backOut(a,2.5)};DvtAnimPopIn.prototype.Init=function(a,b,c,d,e){if(this._bCenter=c)this._tempContainers=[],this._currIndex=0;DvtAnimPopIn.superclass.Init.call(this,a,b,d,e)};DvtAnimPopIn.prototype.setEasing=function(a){};DvtAnimPopIn.prototype.CreateAnimator=function(a){DvtAnimPopIn.superclass.CreateAnimator.call(this,a);this._animator.setEasing(DvtAnimPopIn.BackOut);this._bCenter&&DvtPlayable.appendOnEnd(this._animator,this.RemoveTempContainers,this)};
DvtAnimPopIn.prototype.InitStartState=function(a){if(this._bCenter){var b=this._tempContainers[this._currIndex],c=a.getDimensions();b._dvtAnimPopInOrigTx=a.getTranslateX();b._dvtAnimPopInOrigTy=a.getTranslateY();var d=c.x+.5*c.w,c=c.y+.5*c.h;b.setTranslateX(b._dvtAnimPopInOrigTx+d);b.setTranslateY(b._dvtAnimPopInOrigTy+c);a.setTranslateX(-d);a.setTranslateY(-c);d=a.getParent().getChildIndex(a);b._dvtAnimPopInChildIndex=d;a.getParent().addChildAt(b,d);b.addChild(a);b.setScaleX(.01);b.setScaleY(.01);
this._currIndex++}else a.setScaleX(.01),a.setScaleY(.01);a.setVisible(!0)};DvtAnimPopIn.prototype.InitEndState=function(a){this._bCenter&&(a=new DvtContainer(this._context),this._tempContainers.push(a));this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getScaleX,a.setScaleX,1);this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getScaleY,a.setScaleY,1)};
DvtAnimPopIn.prototype.RemoveTempContainers=function(){if(this._tempContainers){for(var a=0;a<this._tempContainers.length;a++){var b=this._tempContainers[a];this._tempContainers[a]=null;if(0<b.getNumChildren()){var c=b.getChildAt(0);c&&(c.setTranslateX(b._dvtAnimPopInOrigTx),c.setTranslateY(b._dvtAnimPopInOrigTy),b.getParent().addChildAt(c,b._dvtAnimPopInChildIndex))}b.getParent().removeChild(b)}this._tempContainers=null}};var DvtAnimPopOut=function(a,b,c,d,e){this.Init(a,b,c,d,e)};
DvtObj.createSubclass(DvtAnimPopOut,DvtBaseAnimation,"DvtAnimPopOut");DvtAnimPopOut.BackIn=function(a){return DvtEasing.backIn(a,2.5)};DvtAnimPopOut.prototype.Init=function(a,b,c,d,e){if(this._bCenter=c)this._tempContainers=[],this._currIndex=0;DvtAnimPopOut.superclass.Init.call(this,a,b,d,e);this._bSaveAndRestoreOriginalMatrices=!this._bCenter;this._bHideObjectsOnEnd=!0};DvtAnimPopOut.prototype.setEasing=function(a){};
DvtAnimPopOut.prototype.CreateAnimator=function(a){DvtAnimPopOut.superclass.CreateAnimator.call(this,a);this._animator.setEasing(DvtAnimPopOut.BackIn);this._bCenter&&DvtPlayable.appendOnEnd(this._animator,this.RemoveTempContainers,this)};
DvtAnimPopOut.prototype.InitStartState=function(a){if(this._bCenter){var b=this._tempContainers[this._currIndex],c=a.getDimensions();b._dvtAnimPopInOrigTx=a.getTranslateX();b._dvtAnimPopInOrigTy=a.getTranslateY();var d=c.x+.5*c.w,c=c.y+.5*c.h;b.setTranslateX(b._dvtAnimPopInOrigTx+d);b.setTranslateY(b._dvtAnimPopInOrigTy+c);a.setTranslateX(-d);a.setTranslateY(-c);d=a.getParent().getChildIndex(a);b._dvtAnimPopInChildIndex=d;a.getParent().addChildAt(b,d);b.addChild(a);this._currIndex++}};
DvtAnimPopOut.prototype.InitEndState=function(a){this._bCenter&&(a=new DvtContainer(this._context),this._tempContainers.push(a));this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getScaleX,a.setScaleX,.01);this._animator.addProp(DvtAnimator.TYPE_NUMBER,a,a.getScaleY,a.setScaleY,.01)};
DvtAnimPopOut.prototype.RemoveTempContainers=function(){if(this._tempContainers){for(var a=0;a<this._tempContainers.length;a++){var b=this._tempContainers[a];this._tempContainers[a]=null;if(0<b.getNumChildren()){var c=b.getChildAt(0);c&&(c.setTranslateX(b._dvtAnimPopInOrigTx),c.setTranslateY(b._dvtAnimPopInOrigTy),b.getParent().addChildAt(c,b._dvtAnimPopInChildIndex))}b.getParent().removeChild(b)}this._tempContainers=null}};
var DvtCombinedAnimConveyor=function(a,b,c,d,e,f,g){this.Init(a,b,c,d,e,f,g)};DvtObj.createSubclass(DvtCombinedAnimConveyor,DvtParallelPlayable,"DvtCombinedAnimConveyor");DvtCombinedAnimConveyor.prototype.Init=function(a,b,c,d,e,f,g){f||(f=.5);g||(g=0);b=new DvtAnimConveyorOut(a,b,d,f,g);c=new DvtAnimConveyorIn(a,c,e,f,f/3+g);DvtCombinedAnimConveyor.superclass.Init.call(this,a,[b,c])};var DvtCombinedAnimCube=function(a,b,c,d,e,f,g){this.Init(a,b,c,d,e,f,g)};
DvtObj.createSubclass(DvtCombinedAnimCube,DvtParallelPlayable,"DvtCombinedAnimCube");DvtCombinedAnimCube.prototype.Init=function(a,b,c,d,e,f,g){f||(f=.5);g||(g=0);b=new DvtAnimCubeOut(a,b,d,e,f,g);c=new DvtAnimCubeIn(a,c,d,e,f,g);DvtCombinedAnimCube.superclass.Init.call(this,a,[b,c])};var DvtCombinedAnimFade=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtCombinedAnimFade,DvtParallelPlayable,"DvtCombinedAnimFade");
DvtCombinedAnimFade.prototype.Init=function(a,b,c,d,e){d||(d=.5);e||(e=0);b=new DvtAnimFadeOut(a,b,d,e);c=new DvtAnimFadeIn(a,c,d,.5*b.getDuration()+e);DvtCombinedAnimFade.superclass.Init.call(this,a,[b,c])};var DvtCombinedAnimFlip=function(a,b,c,d,e,f,g){this.Init(a,b,c,d,e,f,g)};DvtObj.createSubclass(DvtCombinedAnimFlip,DvtSequentialPlayable,"DvtCombinedAnimFlip");
DvtCombinedAnimFlip.prototype.Init=function(a,b,c,d,e,f,g){f||(f=.5);g||(g=0);b=new DvtAnimFlipOut(a,b,d,e,f,g);b.setEasing(DvtBaseAnimation.EASING_CUBIC_IN);c=new DvtAnimFlipIn(a,c,d,e,f,g);c.setEasing(DvtBaseAnimation.EASING_CUBIC_OUT);c.HideObjects();DvtCombinedAnimFlip.superclass.Init.call(this,a,[b,c])};var DvtCombinedAnimMoveBy=function(a,b,c,d,e,f,g){this.Init(a,b,c,d,e,f,g)};DvtObj.createSubclass(DvtCombinedAnimMoveBy,DvtParallelPlayable,"DvtCombinedAnimMoveBy");
DvtCombinedAnimMoveBy.prototype.Init=function(a,b,c,d,e,f,g){f||(f=.5);g||(g=0);b=new DvtAnimMoveBy(a,b,d,f,g);c=new DvtAnimMoveBy(a,c,e,f,g);DvtCombinedAnimMoveBy.superclass.Init.call(this,a,[b,c])};var DvtCombinedAnimScaleFade=function(a,b,c,d,e,f,g,h,k){this.Init(a,b,c,d,e,f,g,h,k)};DvtObj.createSubclass(DvtCombinedAnimScaleFade,DvtParallelPlayable,"DvtCombinedAnimScaleFade");
DvtCombinedAnimScaleFade.prototype.Init=function(a,b,c,d,e,f,g,h,k){e||(e=DvtBaseAnimation.DIR_NE);f||(f=DvtBaseAnimation.DIR_NW);g||(g=.5);h||(h=.5);k||(k=0);b=new DvtAnimScaleFadeOut(a,b,d,e,g,h,k);c=new DvtAnimScaleFadeIn(a,c,d,f,g,h,.3*b.getDuration()+k);DvtCombinedAnimScaleFade.superclass.Init.call(this,a,[b,c])};var DvtCombinedAnimPopIn=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};DvtObj.createSubclass(DvtCombinedAnimPopIn,DvtParallelPlayable,"DvtCombinedAnimPopIn");
DvtCombinedAnimPopIn.prototype.Init=function(a,b,c,d,e,f){var g=[];b=b instanceof Array?b:[b];f=null===f||isNaN(f)?0:f;for(var h=0;h<b.length;h++){var k=new DvtAnimPopIn(a,b[h],c,d,f+Math.random()*(e-d));g.push(k)}DvtCombinedAnimPopIn.superclass.Init.call(this,a,g)};var DvtCombinedAnimPopOut=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};DvtObj.createSubclass(DvtCombinedAnimPopOut,DvtParallelPlayable,"DvtCombinedAnimPopOut");
DvtCombinedAnimPopOut.prototype.Init=function(a,b,c,d,e,f){var g=[];b=b instanceof Array?b:[b];f=null===f||isNaN(f)?0:f;for(var h=0;h<b.length;h++){var k=new DvtAnimPopOut(a,b[h],c,d,f+Math.random()*(e-d));g.push(k)}DvtCombinedAnimPopOut.superclass.Init.call(this,a,g)};var DvtBaseDrawEffect=function(){this._Init()};DvtObj.createSubclass(DvtBaseDrawEffect,DvtLockable,"DvtBaseDrawEffect");DvtBaseDrawEffect.prototype._Init=function(){DvtBaseDrawEffect.superclass._Init.call(this)};
DvtBaseDrawEffect.prototype.getId=function(){return this._id};DvtBaseDrawEffect.prototype.setId=function(a){this._id=a};DvtBaseDrawEffect.prototype.mergeProps=function(a){a.setId(this._id)};var DvtColorUtils={};DvtObj.createSubclass(DvtColorUtils,DvtObj,"DvtColorUtils");DvtColorUtils._RED=0;DvtColorUtils._GREEN=1;DvtColorUtils._BLUE=2;DvtColorUtils._ALPHA=3;DvtColorUtils._RGBA="rgba(";DvtColorUtils._RGB="rgb(";DvtColorUtils._POUND="#";DvtColorUtils._FACTOR=.15;
DvtColorUtils.getColorFromName=function(a){if(!DvtColorUtils._names){var b=[];b.aqua="#00FFFF";b.black="#000000";b.blue="#0000FF";b.white="#FFFFFF";b.fuchsia="#FF00FF";b.gray="#848284";b.lime="#00FF00";b.maroon="#840000";b.green="#008200";b.navy="#000084";b.olive="#848200";b.red="#FF0000";b.silver="#C6C3C6";b.teal="#008284";b.yellow="#FFFF00";b.purple="#800080";b.cyan="#D2B48C";b.goldenrod="#DAA520";b.lightblue="#ADD8E6";b.lightyellow="#FFFFE0";b.orange="#FFA500";b.paleGoldenRod="#EEE8AA";b.paleturquoise=
"#AFEEEE";b.peachpuff="#FFDAB9";b.pink="#FFC0CB";b.tan="#D2B48C";b.thistle="#D8BFD8";b.transparent="rgba(255,255,255,0)";DvtColorUtils._names=b}return DvtColorUtils._names[a]};
DvtColorUtils.isColor=function(a,b){if(!b)return a.charAt(0)===DvtColorUtils._POUND||0===a.indexOf(DvtColorUtils._RGBA)||0===a.indexOf(DvtColorUtils._RGB);var c=!1;a=DvtStringUtils.ltrim(a);a=a.toLowerCase();if(a.charAt(0)===DvtColorUtils._POUND)7===a.length&&(c=(new RegExp(/^#[0-9a-f]{6}$/i)).test(a));else{var d=0===a.indexOf(DvtColorUtils._RGBA),e;d||(e=0===a.indexOf(DvtColorUtils._RGB));if(d||e)if(e=a.indexOf(")"),0<=e){e=a.substring(d?5:4,e).split(",");for(var f=e.length,g=!0,h=0;h<f;h++){var k=
e[h];if(0>k||255<k||3<h&&(0>k||1<k)){g=!1;break}}g&&(c=d?4===f:3===f)}}return c};DvtColorUtils.getAlpha=function(a){return DvtColorUtils._getChannel(a,DvtColorUtils._ALPHA)};DvtColorUtils.setAlpha=function(a,b){return DvtColorUtils._setChannel(a,DvtColorUtils._ALPHA,b)};DvtColorUtils.getRed=function(a){return DvtColorUtils._getChannel(a,DvtColorUtils._RED)};DvtColorUtils.setRed=function(a,b){return DvtColorUtils._setChannel(a,DvtColorUtils._RED,b)};
DvtColorUtils.getBlue=function(a){return DvtColorUtils._getChannel(a,DvtColorUtils._BLUE)};DvtColorUtils.setBlue=function(a,b){return DvtColorUtils._setChannel(a,DvtColorUtils._BLUE,b)};DvtColorUtils.getGreen=function(a){return DvtColorUtils._getChannel(a,DvtColorUtils._GREEN)};DvtColorUtils.setGreen=function(a,b){return DvtColorUtils._setChannel(a,DvtColorUtils._GREEN,b)};
DvtColorUtils._getChannel=function(a,b){var c=a,d=null;(d=DvtColorUtils.getColorFromName(c))&&(c=d);if(b===DvtColorUtils._ALPHA){if("#"===c.charAt(0))return 7<c.length?parseInt(c.substring(1,3),16)/255:1;if("none"===c)return 0}d=c.indexOf("(");if(0>d)d=[],7<c.length?(d[0]=parseInt(c.substr(3,2),16),d[1]=parseInt(c.substr(5,2),16),d[2]=parseInt(c.substr(7,2),16),d[3]=parseInt(c.substr(1,2),16)/255):(d[0]=parseInt(c.substr(1,2),16),d[1]=parseInt(c.substr(3,2),16),d[2]=parseInt(c.substr(5,2),16),d[3]=
1),d=d[b];else{var e=c.indexOf(")"),d=c.substring(d+1,e).split(",");3===d.length&&b===DvtColorUtils._ALPHA?d=1:(d=d[b],d=parseFloat(d))}return d};
DvtColorUtils.getDarker=function(a,b){var c=DvtColorUtils._getChannel(a,DvtColorUtils._RED),d=DvtColorUtils._getChannel(a,DvtColorUtils._GREEN),e=DvtColorUtils._getChannel(a,DvtColorUtils._BLUE),f=DvtColorUtils._getChannel(a,DvtColorUtils._ALPHA);b||(b=DvtColorUtils._FACTOR);c=Math.max(parseInt(c*b),0);d=Math.max(parseInt(d*b),0);e=Math.max(parseInt(e*b),0);return DvtColorUtils.makeRGBA(c,d,e,f)};
DvtColorUtils.getGrey=function(a){var b=DvtColorUtils._getChannel(a,DvtColorUtils._RED),c=DvtColorUtils._getChannel(a,DvtColorUtils._BLUE),d=DvtColorUtils._getChannel(a,DvtColorUtils._GREEN),b=Math.round(.3*b+.59*c+.11*d);return this.setRGB(a,b,b,b)};
DvtColorUtils.invert=function(a){var b=255-DvtColorUtils._getChannel(a,DvtColorUtils._RED),c=255-DvtColorUtils._getChannel(a,DvtColorUtils._BLUE),d=255-DvtColorUtils._getChannel(a,DvtColorUtils._GREEN);return"#"===a.charAt(0)?DvtColorUtils.makePound(b,c,d):a.substr(0,4)===DvtColorUtils._RGB?DvtColorUtils.makeRGB(b,c,d):DvtColorUtils.makeRGBA(b,c,d,DvtColorUtils._getChannel(a,DvtColorUtils._ALPHA))};DvtColorUtils.isRGBA=function(a){return a.substr(0,5)===DvtColorUtils._RGBA};
DvtColorUtils.makeRGB=function(a,b,c){c=null===c||isNaN(c)?0:c;b=null===b||isNaN(b)?0:b;a=null===a||isNaN(a)?0:a;return DvtColorUtils._RGB+a+","+b+","+c+")"};DvtColorUtils.makeRGBA=function(a,b,c,d){c=null===c||isNaN(c)?0:c;b=null===b||isNaN(b)?0:b;a=null===a||isNaN(a)?0:a;d=null===d||isNaN(d)?1:d;return DvtColorUtils._RGBA+a+","+b+","+c+","+d+")"};
DvtColorUtils.makePound=function(a,b,c){b=Math.round(b);c=Math.round(c);a=Math.round(a).toString(16);b=b.toString(16);c=c.toString(16);return"#"+(1===a.length?"0":"")+a+(1===b.length?"0":"")+b+(1===c.length?"0":"")+c};
DvtColorUtils.getPound=function(a){var b;if("#"===a.charAt(0)){if(7>=a.length)return a;b=DvtColorUtils._POUND;b+=a.substring(3,5)+a.substring(5,7)+a.substring(7,9)}else{b=DvtColorUtils.getRed(a);var c=DvtColorUtils.getGreen(a);a=DvtColorUtils.getBlue(a);b=DvtColorUtils.makePound(b,c,a)}return b};
DvtColorUtils.getRGB=function(a){var b;(b=DvtColorUtils.getColorFromName(a))&&(a=b);if("#"===a.charAt(0)){b=DvtColorUtils._RGB;var c=a.length;if(7<c)b+=parseInt(a.substring(3,5),16)+","+parseInt(a.substring(5,7),16)+","+parseInt(a.substring(7,9),16);else if(7===c)b+=parseInt(a.substring(1,3),16)+","+parseInt(a.substring(3,5),16)+","+parseInt(a.substr(5),16);else if(4===c){var c=a.substring(1,2),c=c+c,d=a.substring(2,3),d=d+d;a=a.substring(3);a+=a;b+=parseInt(c,16)+","+parseInt(d,16)+","+parseInt(a,
16)}else 5===c?b+=parseInt(a.substring(1,3),16)+","+parseInt(a.substring(3,5),16)+",0,1":3===c&&(b+=parseInt(a.substring(1,3),16)+",0,0,1");b+=")"}else a.substr(0,5)===DvtColorUtils._RGBA?(c=a.lastIndexOf(","),b=DvtColorUtils._RGB,b+=a.substring(5,c),b+=")"):b=a;return b};
DvtColorUtils.getRGBA=function(a){var b;(b=DvtColorUtils.getColorFromName(a))&&(a=b);if("#"===a.charAt(0)){b=DvtColorUtils._RGBA;var c=a.length;if(7<c)b+=parseInt(a.substring(3,5),16)+","+parseInt(a.substring(5,7),16)+","+parseInt(a.substring(7,9),16)+","+parseInt(a.substring(1,3),16)/255;else if(7===c)b+=parseInt(a.substring(1,3),16)+","+parseInt(a.substring(3,5),16)+","+parseInt(a.substr(5),16)+",1";else if(5===c)b+=parseInt(a.substring(1,3),16)+","+parseInt(a.substring(3,5),16)+",0,1";else if(4===
c){var c=a.substring(1,2),c=c+c,d=a.substring(2,3),d=d+d;a=a.substring(3);a+=a;b+=parseInt(c,16)+","+parseInt(d,16)+","+parseInt(a,16)+",1"}else 3===c&&(b+=parseInt(a.substring(1,3),16)+",0,0,1");b+=")"}else a.substr(0,4)===DvtColorUtils._RGB?(b=DvtColorUtils._RGBA,b+=a.substring(4,a.length-1)+",1)"):b=a;return b};
DvtColorUtils._setChannel=function(a,b,c){if(void 0===b||void 0===c||b<DvtColorUtils._RED||b>DvtColorUtils._ALPHA)return a;var d=DvtColorUtils.getColorFromName(a);d&&(a=d);var e,d="#"===a.charAt(0),f;if(d)e=[],e.push(parseInt(a.substr(1,2),16)),e.push(parseInt(a.substr(3,2),16)),e.push(parseInt(a.substr(5,2),16)),b===DvtColorUtils._ALPHA&&(e.push(c),d=!1,f=!0);else{f=a.substr(0,5)===DvtColorUtils._RGBA;e=a.indexOf("(");var g=a.indexOf(")");e=a.substring(e+1,g).split(",");f||b!==DvtColorUtils._ALPHA||
(e.push(c),f=!0)}e[b]=c;return d?DvtColorUtils.makePound(e[0],e[1],e[2]):f?DvtColorUtils.makeRGBA(e[0],e[1],e[2],e[3]):DvtColorUtils.makeRGB(e[0],e[1],e[2])};
DvtColorUtils.setRGB=function(a,b,c,d){d=null===d||isNaN(d)?0:d;c=null===c||isNaN(c)?0:c;b=null===b||isNaN(b)?0:b;if("#"===a.charAt(0))return DvtColorUtils.makePound(b,c,d);var e=a.substr(0,5)===DvtColorUtils._RGBA;b=(e?DvtColorUtils._RGBA:DvtColorUtils._RGB)+b+","+c+","+d;e&&(e=a.lastIndexOf(5,","),c=a.indexOf(")"),b+=","+a.substring(e+1,c));return b+")"};
DvtColorUtils.getBrighter=function(a,b){var c=DvtColorUtils._getChannel(a,DvtColorUtils._RED),d=DvtColorUtils._getChannel(a,DvtColorUtils._GREEN),e=DvtColorUtils._getChannel(a,DvtColorUtils._BLUE),f=DvtColorUtils._getChannel(a,DvtColorUtils._ALPHA);b||(b=DvtColorUtils._FACTOR);var g=parseInt(1/(1-b));if(0===c&&0===d&&0===e)return c=parseInt(255*b),DvtColorUtils.makeRGBA(c,c,c,f);0<c&&c<g&&(c=g);0<d&&d<g&&(d=g);0<e&&e<g&&(e=g);c=Math.min(parseInt(c/b),255);d=Math.min(parseInt(d/b),255);e=Math.min(parseInt(e/
b),255);return DvtColorUtils.makeRGBA(c,d,e,f)};DvtColorUtils.rgb2hsl=function(a,b,c){a/=255;b/=255;c/=255;var d=Math.max(a,b,c),e=Math.min(a,b,c),f=d+e,g,h=f/2;d==e?f=g=0:(e=d-e,f=.5<h?e/(2-f):e/f,d==a?g=(b-c)/e+(b<c?6:0):d==b?g=(c-a)/e+2:d==c&&(g=(a-b)/e+4),g/=6);return{h:360*g,s:f,l:h}};
DvtColorUtils.hsl2rgb=function(a,b,c){a/=360;if(0==b)c=b=a=c;else{var d=.5>c?c*(1+b):c+b-c*b,e=2*c-d;c=DvtColorUtils._hue2rgb(e,d,a+1/3);b=DvtColorUtils._hue2rgb(e,d,a);a=DvtColorUtils._hue2rgb(e,d,a-1/3)}return{r:255*c,g:255*b,b:255*a}};DvtColorUtils._hue2rgb=function(a,b,c){0>c?c+=1:1<c&&--c;return c<1/6?a+6*(b-a)*c:.5>c?b:c<2/3?a+(b-a)*(2/3-c)*6:a};
DvtColorUtils.hsv2rgb=function(a,b,c){var d,e,f,g,h,k;if(0==c)return{r:0,g:0,v:0};b/=100;c/=100;a=a%360/60;g=Math.floor(a);h=a-g;a=c*(1-b);k=c*(1-b*h);b=c*(1-b*(1-h));0==g?(d=c,e=b,f=a):1==g?(d=k,e=c,f=a):2==g?(d=a,e=c,f=b):3==g?(d=a,e=k,f=c):4==g?(d=b,e=a,f=c):5==g&&(d=c,e=a,f=k);d=Math.floor(255*d);e=Math.floor(255*e);f=Math.floor(255*f);return{r:d,g:e,b:f}};
DvtColorUtils.rgb2hsv=function(a,b,c){var d,e;a/=255;b/=255;c/=255;d=Math.min(a,b,c);e=Math.max(a,b,c);if(d==e)return{h:void 0,s:0,v:100*e};a=Math.floor(60*((a==d?3:b==d?5:1)-(a==d?b-c:b==d?c-a:a-b)/(e-d)))%360;d=Math.floor((e-d)/e*100);e=Math.floor(100*e);return{h:a,s:d,v:e}};
DvtColorUtils.getPastel=function(a,b){var c=DvtColorUtils._getChannel(a,DvtColorUtils._ALPHA),d=DvtColorUtils._getChannel(a,DvtColorUtils._RED),e=DvtColorUtils._getChannel(a,DvtColorUtils._GREEN),f=DvtColorUtils._getChannel(a,DvtColorUtils._BLUE),d=Math.min(d+parseInt((255-d)*b),255),e=Math.min(e+parseInt((255-e)*b),255),f=Math.min(f+parseInt((255-f)*b),255);return DvtColorUtils.makeRGBA(d,e,f,c)};
DvtColorUtils.adjustHSL=function(a,b,c,d){var e=DvtColorUtils._getChannel(a,DvtColorUtils._RED),f=DvtColorUtils._getChannel(a,DvtColorUtils._GREEN);a=DvtColorUtils._getChannel(a,DvtColorUtils._BLUE);e=DvtColorUtils.rgb2hsl(e,f,a);b=DvtColorUtils.hsl2rgb(Math.min(Math.max(0,e.h+b),360),Math.min(Math.max(0,e.s+c),1),Math.min(Math.max(0,e.l+d),1));return DvtColorUtils.makePound(b.r,b.g,b.b)};
DvtColorUtils.interpolateColor=function(a,b,c){var d=DvtColorUtils.getRed(a),e=DvtColorUtils.getGreen(a),f=DvtColorUtils.getBlue(a);a=DvtColorUtils.getAlpha(a);var g=DvtColorUtils.getRed(b),h=DvtColorUtils.getGreen(b),k=DvtColorUtils.getBlue(b);b=DvtColorUtils.getAlpha(b);d=Math.round(DvtMath.interpolateNumber(d,g,c));e=Math.round(DvtMath.interpolateNumber(e,h,c));f=Math.round(DvtMath.interpolateNumber(f,k,c));c=Math.round(DvtMath.interpolateNumber(a,b,c));return DvtColorUtils.makeRGBA(d,e,f,c)};
DvtColorUtils.inferColor=function(a,b,c){if(a==b)return c;if(c==a)return b;var d,e=DvtColorUtils.getRed(a),f=DvtColorUtils.getRed(b);e==f?d=DvtColorUtils.getRed(c):(0==e&&(e=1),d=f/e*DvtColorUtils.getRed(c));var g,e=DvtColorUtils.getGreen(a),f=DvtColorUtils.getGreen(b);e==f?g=DvtColorUtils.getGreen(c):(0==e&&(e=1),g=f/e*DvtColorUtils.getGreen(c));e=DvtColorUtils.getBlue(a);f=DvtColorUtils.getBlue(b);e==f?a=DvtColorUtils.getBlue(c):(0==e&&(e=1),a=f/e*DvtColorUtils.getBlue(c));return DvtColorUtils.makePound(d,
g,a)};DvtColorUtils.getContrastingTextColor=function(a){var b=DvtColorUtils.getRed(a),c=DvtColorUtils.getGreen(a);a=DvtColorUtils.getBlue(a);return 128<=(299*b+587*c+114*a)/1E3?"#000000":"#FFFFFF"};var DvtGraphClipPath=function(a){this._id=(a?a+"$":"")+"cp"+DvtGraphClipPath._uniqueSeed++;this._regions=[]};DvtObj.createSubclass(DvtGraphClipPath,DvtObj,"DvtGraphClipPath");DvtGraphClipPath._uniqueSeed=0;DvtGraphClipPath.NONE=0;DvtGraphClipPath.RECT=1;DvtGraphClipPath.PATH=2;
DvtGraphClipPath.POLYGON=3;DvtGraphClipPath.ELLIPSE=4;DvtGraphClipPath.CIRCLE=5;DvtGraphClipPath.prototype._addRegion=function(a){a&&this._regions.push(a)};DvtGraphClipPath.prototype.getId=function(){return this._id};DvtGraphClipPath.prototype.getRegions=function(a){return this._regions};DvtGraphClipPath.prototype.addRect=function(a,b,c,d,e,f){var g={};g.type=DvtGraphClipPath.RECT;g.x=a;g.y=b;g.w=c;g.h=d;g.rx=e;g.ry=f;this._addRegion(g)};
DvtGraphClipPath.prototype.addCircle=function(a,b,c){var d={};d.type=DvtGraphClipPath.CIRCLE;d.cx=a;d.cy=b;d.r=c;this._addRegion(d)};DvtGraphClipPath.prototype.addEllipse=function(a,b,c,d){var e={};e.type=DvtGraphClipPath.ELLIPSE;e.cx=a;e.cy=b;e.rx=c;e.ry=d;this._addRegion(e)};DvtGraphClipPath.prototype.addPolygon=function(a){var b={};b.type=DvtGraphClipPath.POLYGON;b.points=a;this._addRegion(b)};DvtGraphClipPath.prototype.addPath=function(a){var b={};b.type=DvtGraphClipPath.PATH;b.d=a;this._addRegion(b)};
var DvtFill=function(){this._Init()};DvtObj.createSubclass(DvtFill,DvtLockable,"DvtFill");DvtFill.NONE=0;DvtFill.COLOR=1;DvtFill.GRADIENT=2;DvtFill.PATTERN=3;DvtFill.IMAGE=4;DvtFill.prototype._Init=function(){DvtFill.superclass._Init.call(this)};DvtFill.prototype.getId=function(){return this._id};DvtFill.prototype.setId=function(a){this._id=a};var DvtFont=function(a,b,c,d,e,f,g){this._Init(a,b,c,d,e,f,g)};DvtObj.createSubclass(DvtFont,DvtObj,"DvtFont");
DvtFont.prototype._Init=function(a,b,c,d,e,f,g){this.size=null===a||isNaN(a)?12:a;this.color=b?b:"#000000";this.alpha=null===c||isNaN(c)?1:c;this.name=d;this.bold=e||!1;this.italic=f||!1;this.underline=g||!1};DvtFont.prototype.getSize=function(){return this.size};DvtFont.prototype.getAlpha=function(){return this.alpha};DvtFont.prototype.getColor=function(){return this.color};DvtFont.prototype.getName=function(){return this.name};DvtFont.prototype.isBold=function(){return this.bold};
DvtFont.prototype.isItalic=function(){return this.italic};DvtFont.prototype.isUnderline=function(){return this.underline};
DvtFont.prototype.getCSSStyle=function(){var a=new DvtCSSStyle;a.setStyle(DvtCSSStyle.FONT_FAMILY,this.getName());a.setStyle(DvtCSSStyle.COLOR,this.getColor());a.setStyle(DvtCSSStyle.FONT_SIZE,this.getSize());this.isBold()&&a.setStyle(DvtCSSStyle.FONT_WEIGHT,"bold");this.isItalic()&&a.setStyle(DvtCSSStyle.FONT_STYLE,"italic");this.isUnderline()&&a.setStyle(DvtCSSStyle.TEXT_DECORATION,"underline");return a};var DvtSolidFill=function(a,b){this._Init(a,b)};
DvtObj.createSubclass(DvtSolidFill,DvtFill,"DvtSolidFill");DvtSolidFill._INVISIBLE_FILL=null;DvtSolidFill.prototype.clone=function(){var a=new DvtSolidFill;this.mergeProps(a);return a};DvtSolidFill.prototype._Init=function(a,b){DvtSolidFill.superclass._Init.call(this);a||(a="none");if(void 0===b||null===b)b=DvtColorUtils.getAlpha(a),a=DvtColorUtils.getRGB(a);this._fc=a;this._fa=b};DvtSolidFill.prototype.getColor=function(){return this._fc};
DvtSolidFill.prototype.setColor=function(a){this.isLocked()||(this._fc=a)};DvtSolidFill.prototype.getAlpha=function(){return this._fa};DvtSolidFill.prototype.setAlpha=function(a){this.isLocked()||(this._fa=a)};DvtSolidFill.prototype.mergeProps=function(a){DvtSolidFill.superclass.mergeProps.call(this,a);a._fc=this._fc;a._fa=this._fa};DvtSolidFill.invisibleFill=function(){DvtSolidFill._INVISIBLE_FILL||(DvtSolidFill._INVISIBLE_FILL=new DvtSolidFill("#FFFFFF",0));return DvtSolidFill._INVISIBLE_FILL};
var DvtStroke=function(a,b){this._Init(a,b)};DvtObj.createSubclass(DvtStroke,DvtLockable,"DvtStroke");DvtStroke.SOLID=0;DvtStroke.DASHED=1;DvtStroke.DOTTED=2;DvtStroke.DASHED_DOTTED=3;DvtStroke.SQUARE="square";DvtStroke.ROUND="round";DvtStroke.BEVEL="bevel";DvtStroke.MITER="miter";DvtStroke.BUTT="butt";DvtStroke.convertTypeString=function(a){return"solid"==a?DvtStroke.SOLID:"dashed"==a?DvtStroke.DASHED:"dotted"==a?DvtStroke.DOTTED:DvtStroke.SOLID};
DvtStroke.prototype._Init=function(a){this._sw=null===a||isNaN(a)?1:a;DvtStroke.superclass._Init.call(this);this._bFixedWidth=!1};DvtStroke.prototype.getId=function(){return this._id};DvtStroke.prototype.setId=function(a){this._id=a};DvtStroke.prototype.mergeProps=function(a){a._sw=this._sw;a._st=this._st;a._sd=this._sd;a._sdo=this._sdo;a._sj=this._sj;a._se=this._se;a._sm=this._sm;a._bFixedWidth=this._bFixedWidth;DvtStroke.superclass.mergeProps.call(this,a)};
DvtStroke.prototype.setStyle=function(a,b,c,d,e){this.isLocked()||(a&&!b&&(b=DvtStroke.getDefaultDash(a,this._sw)),this._st=a,this._sd=b,c&&(this._sj=c),d&&(this._se=d),e&&(this._sm=e))};DvtStroke.prototype.getDash=function(){return this._sd};DvtStroke.prototype.getDashOffset=function(){return this._sdo};DvtStroke.prototype.getLineJoin=function(){return this._sj};DvtStroke.prototype.setLineJoin=function(a){this.isLocked()||(this._sj=a)};DvtStroke.prototype.getLineEnd=function(){return this._se};
DvtStroke.prototype.setLineEnd=function(a){this.isLocked()||(this._se=a)};DvtStroke.prototype.getMiterLimit=function(){return this._sm};DvtStroke.prototype.setMiterLimit=function(a){this.isLocked()||(this._sm=a)};DvtStroke.prototype.getType=function(){return this._st};DvtStroke.prototype.setType=function(a,b,c){this.isLocked()||(a===DvtStroke.SOLID?c=b=null:b||(b=DvtStroke.getDefaultDash(a,this._sw)),this._st=a,this._sd=b,this._sdo=c)};DvtStroke.prototype.getWidth=function(){return this._sw};
DvtStroke.prototype.setWidth=function(a){this.isLocked()||(this._sw=a)};DvtStroke.prototype.setFixedWidth=function(a){this._bFixedWidth=a};DvtStroke.prototype.isFixedWidth=function(){return this._bFixedWidth};DvtStroke.getDefaultDash=function(a,b){b=Math.ceil(b);var c=Math.max(6,2*b),d=Math.max(2,b),e=Math.floor((c+d)/2);return a==DvtStroke.DASHED?""+c:a==DvtStroke.DOTTED?""+d:a==DvtStroke.DASHED_DOTTED?""+c+","+e+","+d+","+e:null};
var DvtGradientStroke=function(a,b,c,d,e,f){this._Init(a,b,c,d,e,f)};DvtObj.createSubclass(DvtGradientStroke,DvtStroke,"DvtGradientStroke");DvtGradientStroke.prototype.getAlpha=function(){return 1};DvtGradientStroke.prototype.getAlphas=function(){return this._arAlphas};DvtGradientStroke.prototype.getBounds=function(){return this._arBounds};DvtGradientStroke.prototype.getColors=function(){return this._arColors};DvtGradientStroke.prototype.getStops=function(){return this._arStops};
DvtGradientStroke.prototype._Init=function(a,b,c,d,e,f){DvtGradientStroke.superclass._Init.call(this,e,f);this._arColors=a;this._arBounds=d;d=0;a&&(d=a.length-1);b||(b=DvtGradientStroke.createDefaultAlphas(d));this._arAlphas=b;c||(c=DvtGradientStroke.createDefaultStops(d));this._arStops=c};DvtGradientStroke.createDefaultAlphas=function(a){if(0>a)return null;for(var b=[],c=0;c<a;c++)b.push(1);return b};
DvtGradientStroke.createDefaultStops=function(a){var b=[],c=1/a,d=0;do b.push(d),d+=c;while(0<--a);b.push(1);return b};DvtGradientStroke.prototype.mergeProps=function(a){a._arColors=this._arColors;a._arStops=this._arStops;a._arAlphas=this._arAlphas;a._arBounds=this._arBounds;DvtGradientStroke.superclass.mergeProps.call(this,a)};var DvtLinearGradientStroke=function(a,b,c,d,e,f,g){this._Init(a,b,c,d,e,f,g)};DvtObj.createSubclass(DvtLinearGradientStroke,DvtGradientStroke,"DvtLinearGradientStroke");
DvtLinearGradientStroke.prototype.clone=function(){var a=new DvtLinearGradientStroke;this.mergeProps(a);return a};DvtLinearGradientStroke.prototype._Init=function(a,b,c,d,e,f,g){DvtLinearGradientStroke.superclass._Init.call(this,b,c,d,e,f,g);this._angle=null===a||isNaN(a)?0:a};DvtLinearGradientStroke.prototype.getAngle=function(){return this._angle};DvtLinearGradientStroke.prototype.mergeProps=function(a){DvtLinearGradientStroke.superclass.mergeProps.call(this,a);a._angle=this._angle};
DvtLinearGradientStroke.prototype.setAngle=function(a){this.isLocked()||0===a||(360<Math.abs(a)&&(a%=360),this._angle=a)};var DvtSolidStroke=function(a,b,c,d){this._Init(a,b,c,d)};DvtObj.createSubclass(DvtSolidStroke,DvtStroke,"DvtSolidStroke");DvtSolidStroke.prototype.clone=function(){var a=new DvtSolidStroke;this.mergeProps(a);return a};
DvtSolidStroke.prototype._Init=function(a,b,c,d){this._sc=a;null!==b&&void 0!==b&&(this._sa=b);this._st=DvtStroke.SOLID;DvtSolidStroke.superclass._Init.call(this,c,d)};DvtSolidStroke.prototype.getAlpha=function(){return null!==this._sa&&void 0!==this._sa?this._sa:1};DvtSolidStroke.prototype.setAlpha=function(a){this.bLocked||(this._sa=a)};DvtSolidStroke.prototype.getColor=function(){return this._sc};DvtSolidStroke.prototype.setColor=function(a){this.bLocked||(this._sc=a)};
DvtSolidStroke.prototype.mergeProps=function(a){DvtSolidStroke.superclass.mergeProps.call(this,a);a._sc=this._sc;a._sa=this._sa};var DvtBevel=function(a,b,c,d,e,f,g,h,k,m){this._Init(a,b,c,d,e,f,g,h,k,m)};DvtObj.createSubclass(DvtBevel,DvtBaseDrawEffect,"DvtBevel");DvtBevel.TYPE_INNER="inner";DvtBevel.TYPE_OUTER="outer";DvtBevel.TYPE_FULL="full";DvtBevel._uniqueId=1;
DvtBevel.prototype._Init=function(a,b,c,d,e,f,g,h,k,m){DvtBevel.superclass._Init.call(this);this.__type="bevel";this._distance=null===a||isNaN(a)?4:a;this._angle=null===b||isNaN(b)?45:b;this._hilightRgba=c?c:"rgba(255,255,255,1)";this._shadowRgba=d?d:"rgba(0,0,0,1)";this._blurX=null===e||isNaN(e)?4:e;this._blurY=null===f||isNaN(f)?4:f;this._strength=null===g||isNaN(g)?1:g;this._quality=null===h||isNaN(h)?1:h;this._type=k;this._bKnockout=!1;this._Id="bv"+DvtBevel._uniqueId++};
DvtBevel.prototype.clone=function(){var a=new DvtBevel;this.mergeProps(a);return a};DvtBevel.prototype.mergeProps=function(a){DvtBevel.superclass.mergeProps.call(this,a);a._distance=this._distance;a._angle=this._angle;a._hilightRgba=this._hilightRgba;a._shadowRgba=this._shadowRgba;a._blurX=this._blurX;a._blurY=this._blurY;a._strength=this._strength;a._quality=this._quality;a._type=this._type;a._bKnockout=this._bKnockout;a._Id=this._Id};var DvtGlow=function(a,b,c,d,e,f,g){this.Init(a,b,c,d,e,f,g)};
DvtObj.createSubclass(DvtGlow,DvtBaseDrawEffect,"DvtGlow");DvtGlow._uniqueId=1;DvtGlow.prototype.Init=function(a,b,c,d,e,f,g){DvtGlow.superclass._Init.call(this);this.__type="glow";this._rgba=a?a:"rgba(255,255,255,1)";this._blurX=null===b||isNaN(b)?4:b;this._blurY=null===c||isNaN(c)?4:c;this._strength=null===d||isNaN(d)?1:d;this._quality=null===e||isNaN(e)?1:e;this._bInner=f?!0:!1;this._bKnockout=g?!0:!1;this._Id="dg"+DvtGlow._uniqueId++};
DvtGlow.prototype.clone=function(){var a=new DvtGlow;this.mergeProps(a);return a};DvtGlow.prototype.mergeProps=function(a){DvtGlow.superclass.mergeProps.call(this,a);a._rgba=this._rgba;a._blurX=this._blurX;a._blurY=this._blurY;a._strength=this._strength;a._quality=this._quality;a._bInner=this._bInner;a._bKnockout=this._bKnockout;a._Id=this._Id};var DvtShadow=function(a,b,c,d,e,f,g,h,k,m){this._Init(a,b,c,d,e,f,g,h,k,m)};DvtObj.createSubclass(DvtShadow,DvtBaseDrawEffect,"DvtShadow");
DvtShadow._uniqueId=1;DvtShadow.prototype._Init=function(a,b,c,d,e,f,g,h,k,m){DvtShadow.superclass._Init.call(this);this.__type="shadow";this._rgba=a?a:"rgba(48,48,48,0.35)";this._distance=null===b||isNaN(b)?4:b;this._strength=null===f||isNaN(f)?1:f;this._blurX=null===c||isNaN(c)?4:c;this._blurY=null===d||isNaN(d)?4:d;this._angle=null===e||isNaN(e)?45:e;this._quality=null===g||isNaN(g)?1:g;this._bInner=h?!0:!1;this._bHide=this._bKnockout=!1;this._Id="ds"+DvtShadow._uniqueId++};
DvtShadow.prototype.clone=function(){var a=new DvtShadow;this.mergeProps(a);return a};DvtShadow.prototype.mergeProps=function(a){DvtShadow.superclass.mergeProps.call(this,a);a._rgba=this._rgba;a._distance=this._distance;a._strength=this._strength;a._blurX=this._blurX;a._blurY=this._blurY;a._angle=this._angle;a._quality=this._quality;a._bInner=this._bInner;a._bKnockout=this._bKnockout;a._bHide=this._bHide;a._Id=this._Id};var DvtGradientFill=function(a,b,c,d){this._Init(a,b,c,d)};
DvtObj.createSubclass(DvtGradientFill,DvtFill,"DvtGradientFill");DvtGradientFill.prototype.getAlphas=function(){return this._arAlphas};DvtGradientFill.prototype.getBounds=function(){return this._arBounds};DvtGradientFill.prototype.getColors=function(){return this._arColors};DvtGradientFill.prototype.getStops=function(){return this._arStops};
DvtGradientFill.prototype._Init=function(a,b,c,d){DvtGradientFill.superclass._Init.call(this);this._arColors=a;this._arBounds=d;d=0;a&&(d=a.length-1);if(!b)for(b=[],a=0;a<d;a++)b.push(1);this._arAlphas=b;if(!c){c=[];b=0<d?1/d:0;a=0;do c.push(a),a+=b;while(0<--d);c.push(1)}this._arStops=c};DvtGradientFill.prototype.mergeProps=function(a){a._arColors=this._arColors;a._arStops=this._arStops;a._arAlphas=this._arAlphas;a._arBounds=this._arBounds;DvtGradientFill.superclass.mergeProps.call(this,a)};
var DvtLinearGradientFill=function(a,b,c,d,e){this._Init(a,b,c,d,e)};DvtObj.createSubclass(DvtLinearGradientFill,DvtGradientFill,"DvtLinearGradientFill");DvtLinearGradientFill.prototype.clone=function(){var a=new DvtLinearGradientFill;this.mergeProps(a);return a};DvtLinearGradientFill.prototype._Init=function(a,b,c,d,e){DvtLinearGradientFill.superclass._Init.call(this,b,c,d,e);this._angle=null===a||isNaN(a)?0:a};DvtLinearGradientFill.prototype.getAngle=function(){return this._angle};
DvtLinearGradientFill.prototype.mergeProps=function(a){DvtLinearGradientFill.superclass.mergeProps.call(this,a);a._angle=this._angle};DvtLinearGradientFill.prototype.setAngle=function(a){this.isLocked()||0===a||(360<Math.abs(a)&&(a%=360),this._angle=a)};var DvtImageFill=function(a,b,c){this._Init(a,b,c)};DvtObj.createSubclass(DvtImageFill,DvtFill,"DvtImageFill");DvtImageFill.prototype.getBound=function(){return this._bound};DvtImageFill.prototype.getSrc=function(){return this._src};
DvtImageFill.prototype.getRepeat=function(){return this._repeat};DvtImageFill.prototype._Init=function(a,b,c){DvtImageFill.superclass._Init.call(this);this._src=a;this._bound=b;this._repeat=c};DvtImageFill.prototype.mergeProps=function(a){a._src=this._src;a._bound=this._bound;a._repeat=this._repeat;DvtImageFill.superclass.mergeProps.call(this)};var DvtPatternFill=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtPatternFill,DvtFill,"DvtPatternFill");DvtPatternFill.SM_DIAG_UP_LT="sDUL";
DvtPatternFill.LG_DIAG_UP_LT="lDUL";DvtPatternFill.SM_DIAG_UP_RT="sDUR";DvtPatternFill.LG_DIAG_UP_RT="lDUR";DvtPatternFill.SM_CROSSHATCH="sC";DvtPatternFill.LG_CROSSHATCH="lC";DvtPatternFill.SM_CHECK="sCh";DvtPatternFill.LG_CHECK="lCh";DvtPatternFill.SM_TRIANGLE_CHECK="sTCh";DvtPatternFill.LG_TRIANGLE_CHECK="lTCh";DvtPatternFill.SM_DIAMOND_CHECK="sDCh";DvtPatternFill.LG_DIAMOND_CHECK="lDCh";
DvtPatternFill.prototype.Init=function(a,b,c){DvtPatternFill.superclass._Init.call(this);this._pattern=a?DvtPatternFill._convertPatternValue(a):DvtPatternFill.SM_DIAG_UP_LT;this._fillColor=b?b:"#000000";this._backgroundColor=c?c:"#ffffff"};DvtPatternFill.prototype.getPattern=function(){return this._pattern};DvtPatternFill.prototype.getColor=function(){return this._fillColor};DvtPatternFill.prototype.getBackgroundColor=function(){return this._backgroundColor};
DvtPatternFill.prototype.mergeProps=function(a){a._pattern=this._pattern;a._fillColor=this._fillColor;a._backgroundColor=this._backgroundColor;DvtPatternFill.superclass.mergeProps.call(this)};DvtPatternFill.prototype.getMatrix=function(){return this._matrix?this._matrix:new DvtMatrix};DvtPatternFill.prototype.setMatrix=function(a){(this._matrix=a)&&!this._matrix.isLocked()&&this._matrix.__lock()};
DvtPatternFill._convertPatternValue=function(a){return"smallDiagonalLeft"==a?DvtPatternFill.SM_DIAG_UP_LT:"largeDiagonalLeft"==a?DvtPatternFill.LG_DIAG_UP_LT:"smallDiagonalRight"==a?DvtPatternFill.SM_DIAG_UP_RT:"largeDiagonalRight"==a?DvtPatternFill.LG_DIAG_UP_RT:"smallCrosshatch"==a?DvtPatternFill.SM_CROSSHATCH:"largeCrosshatch"==a?DvtPatternFill.LG_CROSSHATCH:"smallChecker"==a?DvtPatternFill.SM_CHECK:"largeChecker"==a?DvtPatternFill.LG_CHECK:"smallTriangle"==a?DvtPatternFill.SM_TRIANGLE_CHECK:"largeTriangle"==
a?DvtPatternFill.LG_TRIANGLE_CHECK:"smallDiamond"==a?DvtPatternFill.SM_DIAMOND_CHECK:"largeDiamond"==a?DvtPatternFill.LG_DIAMOND_CHECK:a};var DvtRadialGradientFill=function(a,b,c,d,e,f,g){this._Init(a,b,c,d,e,f,g)};DvtObj.createSubclass(DvtRadialGradientFill,DvtGradientFill,"DvtRadialGradientFill");DvtRadialGradientFill.prototype.clone=function(){var a=new DvtRadialGradientFill;this.mergeProps(a);return a};DvtRadialGradientFill.prototype.getRadius=function(){return this._r};
DvtRadialGradientFill.prototype.getCx=function(){return this._cx};DvtRadialGradientFill.prototype.getCy=function(){return this._cy};DvtRadialGradientFill.prototype._Init=function(a,b,c,d,e,f,g){DvtRadialGradientFill.superclass._Init.call(this,a,b,c,g);this._cx=d;this._cy=e;this._r=f};DvtRadialGradientFill.prototype.mergeProps=function(a){DvtRadialGradientFill.superclass.mergeProps.call(this,a);a._cx=this._cx;a._cy=this._cy;a._r=this._r};var DvtSelectionEffectUtils={};
DvtObj.createSubclass(DvtSelectionEffectUtils,DvtObj,"DvtSelectionEffectUtils");DvtSelectionEffectUtils.SEL_TYPE_STROKE_FILTERS=0;DvtSelectionEffectUtils.SEL_TYPE_STROKE_NO_FILTERS=1;DvtSelectionEffectUtils.DEFAULT_SEL_TYPE=DvtSelectionEffectUtils.SEL_TYPE_STROKE_FILTERS;DvtSelectionEffectUtils._getHoverBorderColor=function(a){return DvtColorUtils.adjustHSL(a,0,0,.15)};
DvtSelectionEffectUtils.createMarkerSelectionEffects=function(a,b,c,d){a=a instanceof DvtSvgContext;var e=[];if(c||d)e.push(new DvtGlow(c,3,3,10,3,!1,!1)),e.push(new DvtGlow(d,5,5,20,1,!1,!1));else{c=a?3:2;d=a?3:2;e.push(new DvtGlow(DvtColorUtils.setAlpha("#ffffff",.8),c,d,10,3,!1,!1));c=a?2*c:c;d=a?2*d:d;var f=DvtColorUtils.setAlpha(DvtColorUtils.getDarker(b,.8),.8);e.push(new DvtGlow(f,c,d,12,3,!1,!1));c=a?16:7;d=a?16:7;f=a?6:3;b=DvtColorUtils.setAlpha(DvtColorUtils.getBrighter(b,.5),.5);e.push(new DvtGlow(b,
c,d,f,3,!1,!1))}a&&e.reverse();return e};DvtSelectionEffectUtils.applyDrawEffect=function(a,b){if(0==a.getNumDrawEffects())a.addDrawEffect(b);else{var c=a.getDrawEffectIndex(b);-1<c?(a.removeDrawEffectAt(c),a.addDrawEffectAt(b,c)):a.addDrawEffect(b)}};DvtSelectionEffectUtils.createSelectingStroke=function(a){a=new DvtSolidStroke(DvtSelectionEffectUtils._getHoverBorderColor(a),1,2);a.setMiterLimit(1);return a};DvtSelectionEffectUtils.getSelectingCursor=function(){return"pointer"};
DvtSelectionEffectUtils.applySelectingState=function(a,b){if(a._bSelecting){DvtSelectionEffectUtils._saveUpStrokeFill(a);var c=DvtSelectionEffectUtils.createSelectingStroke(b);a._savedHoverStroke=c}else a._savedHoverStroke=a._savedUpStroke;a._savedHoverFill=a._savedUpFill;DvtSelectionEffectUtils._applySelectingStrokeFill(a)};
DvtSelectionEffectUtils.applySelectionState=function(a,b,c,d){var e=c||d;a._bSelected&&DvtSelectionEffectUtils._saveUpStrokeFill(a);a._bSelecting?(a._savedSelectionFill=a._savedHoverFill,a._savedSelectionStroke=a._savedHoverStroke):(a._savedSelectionFill=a._savedUpFill,a._savedSelectionStroke=a._savedUpStroke);if(a._selectionType==DvtSelectionEffectUtils.SEL_TYPE_STROKE_NO_FILTERS)a._bSelected&&(a._savedSelectionStroke=new DvtSolidStroke(b,1,2),a._savedSelectionFill=new DvtSolidFill("#ffffff",1));
else{var f=a._selectionEffects;f||(f=[],c?f.push(new DvtGlow(c,3,3,100,100,!0,!1)):(c=DvtSelectionEffectUtils._getHoverBorderColor(b),f.push(new DvtGlow(DvtColorUtils.setAlpha(c,1),4,4,10,3,!0,!1))),!d&&e?d=b:d||(d="#000000"),d?f.push(new DvtGlow(DvtColorUtils.setAlpha(d,1),2,2,7,3,!0,!1)):f.push(new DvtGlow(DvtColorUtils.setAlpha(d,1),2,2,20,3,!0,!1)),a._bSelectedShadow&&f.push(new DvtShadow(DvtColorUtils.setAlpha("#05283f",.7),2,10,7,35,1)),a._selectionEffects=f);if(a._bSelected)for(b=0;b<f.length;b++)DvtSelectionEffectUtils.applyDrawEffect(a,
f[b]);else for(b=0;b<f.length;b++)a.removeDrawEffect(f[b])}f=new DvtSelectionEffectTransferObj;c=b=null;a._bSelected?(b=a._savedSelectionStroke,c=a._savedSelectionFill):a._bSelecting?(b=a._savedHoverStroke,c=a._savedHoverFill):(b=a._savedUpStroke,c=a._savedUpFill);f._fill=c;f._stroke=b;f._applyFill=!0;DvtSelectionEffectUtils.PerformStrokeFillUpdate(a,f,!0)};
DvtSelectionEffectUtils._saveUpStrokeFill=function(a){a._savedUpStroke||a._upStrokeSaved||(a._savedUpStroke=a.getStroke(),a._upStrokeSaved=!0);a._savedUpFill||a._upFillSaved||(a._savedUpFill=a.getFill(),a._upFillSaved=!0)};
DvtSelectionEffectUtils._applySelectingStrokeFill=function(a){var b=new DvtSelectionEffectTransferObj,c=null,d=null;a._bSelecting?c=a._savedHoverStroke:a._bSelected?(c=a._savedSelectionStroke,d=a._savedSelectionFill):(c=a._savedUpStroke,d=a._savedUpFill);b._fill=d;b._stroke=c;b._applyFill=a._bSelecting?!1:!0;DvtSelectionEffectUtils.PerformStrokeFillUpdate(a,b,!0)};
DvtSelectionEffectUtils.PerformStrokeFillUpdate=function(a,b,c){b._selectable=a;c&&a.getCtx().getDocumentUtils().isStrokeTimeoutRequired()?(a._applyStrokeTimer&&(a._applyStrokeTimer.stop(),a._applyStrokeTimer=null),a._applyStrokeTimer=new DvtTimer(a.getCtx(),0,b.applyStrokeFill,b,1),b._timer=a._applyStrokeTimer,a._applyStrokeTimer.start()):b.applyStrokeFill()};var DvtSelectionEffectTransferObj=function(){};DvtObj.createSubclass(DvtSelectionEffectTransferObj,DvtObj,"DvtSelectionEffectTransferObj");
DvtSelectionEffectTransferObj.prototype.applyStrokeFill=function(){this._selectable.setStroke(this._stroke);this._applyFill&&this._selectable.setFill(this._fill);this._timer&&(this._timer.stop(),this._timer=null)};var DvtKeyboardFocusEffect=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtKeyboardFocusEffect,DvtObj,"DvtKeyboardFocusEffect");DvtKeyboardFocusEffect.FOCUS_COLOR_DEFAULT="#0645AD";DvtKeyboardFocusEffect.FOCUS_COLOR_SAFARI="#6B9ED7";
DvtKeyboardFocusEffect.FOCUS_COLOR_CHROME="#EDC67B";DvtKeyboardFocusEffect.FOCUS_COLOR_IE="#090909";DvtKeyboardFocusEffect.FOCUS_BORDER_RADIUS=1;DvtKeyboardFocusEffect.FOCUS_STROKE_WIDTH=1;DvtKeyboardFocusEffect.FOCUS_STROKE_ALPHA=1;DvtKeyboardFocusEffect.FOCUS_STROKE_TYPE=DvtStroke.DOTTED;
DvtKeyboardFocusEffect.prototype.Init=function(a,b,c,d,e){this._container=b;this._focusEffect=new DvtRect(a,c.x,c.y,c.w,c.h,e);a=this.CreateStroke();this._focusEffect.setStroke(a);this._focusEffect.setRx(DvtKeyboardFocusEffect.FOCUS_BORDER_RADIUS);this._focusEffect.setRy(DvtKeyboardFocusEffect.FOCUS_BORDER_RADIUS);d&&this._focusEffect.setMatrix(d)};
DvtKeyboardFocusEffect.prototype.CreateStroke=function(){var a=DvtKeyboardFocusEffect.FOCUS_COLOR_DEFAULT,b=DvtKeyboardFocusEffect.FOCUS_STROKE_WIDTH,c=DvtKeyboardFocusEffect.FOCUS_STROKE_ALPHA,d=DvtKeyboardFocusEffect.FOCUS_STROKE_TYPE;DvtAgent.isBrowserSafari()?(a=DvtKeyboardFocusEffect.FOCUS_COLOR_SAFARI,b=2,d=DvtStroke.SOLID):DvtAgent.isBrowserChrome()?(a=DvtKeyboardFocusEffect.FOCUS_COLOR_CHROME,b=2,d=DvtStroke.SOLID):a=DvtAgent.isPlatformIE()?DvtKeyboardFocusEffect.FOCUS_COLOR_IE:DvtKeyboardFocusEffect.FOCUS_COLOR_DEFAULT;
a=new DvtSolidStroke(a,c,b);a.setType(d,b,b);return a};DvtKeyboardFocusEffect.prototype.getEffect=function(){return this._focusEffect};DvtKeyboardFocusEffect.prototype.setEffect=function(a){this._focusEffect=a};DvtKeyboardFocusEffect.prototype.show=function(){this._focusEffect instanceof DvtShape&&this._container.addChildAt(this._focusEffect,0)};DvtKeyboardFocusEffect.prototype.hide=function(){this._focusEffect instanceof DvtShape&&this._container.removeChild(this._focusEffect)};
var DvtDimension=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtDimension,DvtObj,"DvtDimension");DvtDimension.prototype.Init=function(a,b){this.w=null===a||isNaN(a)?0:a;this.h=null===b||isNaN(b)?0:b};var DvtMatrix=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};DvtObj.createSubclass(DvtMatrix,DvtLockable,"DvtMatrix");DvtMatrix._DECOMP_TX=0;DvtMatrix._DECOMP_TY=1;DvtMatrix._DECOMP_R=2;DvtMatrix._DECOMP_SKEWX=3;DvtMatrix._DECOMP_SX=4;DvtMatrix._DECOMP_SY=5;
DvtMatrix.prototype.Init=function(a,b,c,d,e,f){this._a=null==a?1:a;this._b=null==b?0:b;this._c=null==c?0:c;this._d=null==d?1:d;this._tx=null==e?0:e;this._ty=null==f?0:f;this._v=this._u=0;this._w=1;DvtMatrix.superclass._Init.call(this)};DvtMatrix.prototype.Identity=function(){this._a=1;this._c=this._b=0;this._d=1;this._ty=this._tx=0};DvtMatrix.prototype.getA=function(){return this._a};DvtMatrix.prototype.getB=function(){return this._b};DvtMatrix.prototype.getC=function(){return this._c};
DvtMatrix.prototype.getD=function(){return this._d};DvtMatrix.prototype.getTx=function(){return this._tx};DvtMatrix.prototype.getTy=function(){return this._ty};DvtMatrix.prototype.clone=function(){return new DvtMatrix(this._a,this._b,this._c,this._d,this._tx,this._ty)};
DvtMatrix.prototype.concat=function(a){if(!this.isLocked()){var b=this._b*a._a+this._d*a._b+this._v*a._tx,c=this._tx*a._a+this._ty*a._b+this._w*a._tx,d=this._a*a._c+this._c*a._d+this._u*a._ty,e=this._b*a._c+this._d*a._d+this._v*a._ty,f=this._tx*a._c+this._ty*a._d+this._w*a._ty;this._a=this._a*a._a+this._c*a._b+this._u*a._tx;this._b=b;this._c=d;this._d=e;this._tx=c;this._ty=f}};DvtMatrix.prototype.translate=function(a,b){if(!this.isLocked()){var c=new DvtMatrix;c._tx=a;c._ty=b;this.concat(c)}};
DvtMatrix.prototype.scale=function(a,b,c,d){if(!this.isLocked()){(c||d)&&this.translate(-c,-d);var e=new DvtMatrix;e._a=a;e._d=b;this.concat(e);(c||d)&&this.translate(c,d)}};DvtMatrix.prototype.rotate=function(a){if(!this.isLocked()){var b=new DvtMatrix;b._a=Math.cos(a);b._d=b._a;b._c=Math.sin(a);b._b=-b._c;this.concat(b)}};DvtMatrix.prototype.skew=function(a,b){if(!this.isLocked()){var c=new DvtMatrix;c._b=Math.tan(a);c._c=Math.tan(b);this.concat(c)}};
DvtMatrix.prototype.Determinant=function(){return this._a*(this._d*this._w-this._ty*this._v)-this._b*(this._c*this._w-this._ty*this._u)+this._tx*(this._c*this._v-this._d*this._u)};
DvtMatrix.prototype.invert=function(){if(!this.isLocked()){var a=this.Determinant(),b=this._tx*this._v-this._b*this._w,c=this._b*this._ty-this._tx*this._d,d=this._ty*this._u-this._c*this._w,e=this._a*this._w-this._tx*this._u,f=this._tx*this._c-this._a*this._ty;this._a=(this._d*this._w-this._ty*this._v)/a;this._b=b/a;this._tx=c/a;this._c=d/a;this._d=e/a;this._ty=f/a}};
DvtMatrix.prototype._decompose=function(){var a=this._a,b=this._b,c=this._c,d=this._d,e=this._tx,f=this._ty;if(0===a*d-b*c)return null;var g=Math.sqrt(a*a+c*c),a=a/g,c=c/g,h=a*b+c*d,b=b-a*h,d=d-c*h,k=Math.sqrt(b*b+d*d),h=h/k;-1===d/k*a-b/k*c&&(h=-h,k=-k);return[e,f,Math.atan2(c,a),Math.atan(h),g,k]};DvtMatrix.prototype._recompose=function(a){if(!this.isLocked()){this.Identity();var b=a[0],c=a[1],d=a[2],e=a[3];this.scale(a[4],a[5]);this.skew(e,0);this.rotate(d);this.translate(b,c)}};
DvtMatrix.prototype.equals=function(a){return!this&&a?!1:this&&!a?!1:this||a?this._a==a._a&&this._b==a._b&&this._c==a._c&&this._d==a._d&&this._tx==a._tx&&this._ty==a._ty:!0};DvtMatrix.prototype.transformPoint=function(a){return new DvtPoint(this._a*a.x+this._b*a.y+1*this._tx,this._c*a.x+this._d*a.y+1*this._ty)};DvtMatrix.prototype.isIdentity=function(){return 1==this._a&&0==this._b&&0==this._c&&1==this._d&&0==this._tx&&0==this._ty};var DvtPoint=function(a,b){this.Init(a,b)};
DvtObj.createSubclass(DvtPoint,DvtObj,"DvtPoint");DvtPoint.prototype.Init=function(a,b){this.x=null===a||isNaN(a)?0:a;this.y=null===b||isNaN(b)?0:b};var DvtRectangle=function(a,b,c,d){this.x=null===a||isNaN(a)?0:a;this.y=null===b||isNaN(b)?0:b;this.w=null===c||isNaN(c)?0:c;this.h=null===d||isNaN(d)?0:d};DvtObj.createSubclass(DvtRectangle,DvtObj,"DvtRectangle");DvtRectangle.create=function(a){return new DvtRectangle(a[0],a[1],a[2],a[3])};
DvtRectangle.prototype.containsPoint=function(a,b){return a>=this.x&&a<=this.x+this.w&&b>=this.y&&b<=this.y+this.h};DvtRectangle.prototype.getCenter=function(){return new DvtPoint(this.x+this.w/2,this.y+this.h/2)};
DvtRectangle.prototype.getUnion=function(a){var b=new DvtRectangle;if(a&&0!==a.w&&0!==a.h)if(0!==this.w&&0!==this.h){var c=this.x+this.w,d=this.y+this.h,e=a.x+a.w,f=a.y+a.h,g=Math.min(this.x,a.x);a=Math.min(this.y,a.y);b.w=c<e?e-g:c-g;b.h=d>f?d-a:f-a;b.x=g;b.y=a}else b.x=a.x,b.y=a.y,b.w=a.w,b.h=a.h;else b.x=this.x,b.y=this.y,b.w=this.w,b.h=this.h;return b};
DvtRectangle.prototype.grow=function(a,b){var c=this.x,d=this.y,e=this.x+this.w,f=this.y+this.h;a<c&&(c=a);a>e&&(e=a);b<d&&(d=b);b>f&&(f=b);this.x=c;this.y=d;this.w=e-c;this.h=f-d};DvtRectangle.prototype.intersects=function(a){if(a&&0!==a.w&&0!==a.h&&0!==this.w&&0!==this.h){var b=this.y+this.h,c=a.x+a.w,d=a.y+a.h;return!(a.x>this.x+this.w||c<this.x||a.y>b||d<this.y)}return!1};DvtRectangle.prototype.clone=function(){return new DvtRectangle(this.x,this.y,this.w,this.h)};var DvtGeomUtils={};
DvtObj.createSubclass(DvtGeomUtils,DvtObj,"DvtGeomUtils");DvtGeomUtils.getCenterPoint=function(a){return new DvtPoint(a.x+a.w/2,a.y+a.h/2)};DvtGeomUtils.intersects=function(a,b){return a.x>b.x+b.w||a.x+a.w<b.x||a.y>b.y+b.h||a.y+a.h<b.y?!1:!0};DvtGeomUtils.getPaddedRectangle=function(a,b){return DvtGeomUtils.getSpecificPaddedRectangle(a,b,b,b,b)};DvtGeomUtils.getSpecificPaddedRectangle=function(a,b,c,d,e){return new DvtRectangle(a.x-d,a.y-b,a.w+d+e,a.h+b+c)};
DvtGeomUtils.GetOffsetValues=function(a,b,c){var d=0,e=a.y,f=a.y+a.h;e<c?d+=c-e:f>b.h-c&&(d+=b.h-c-f);e=a.x;a=a.x+a.w;f=0;e<c?f+=c-e:a>b.w-c&&(f+=b.w-c-a);return{offsetX:f,offsetY:d}};var DvtLineUtils={};DvtObj.createSubclass(DvtLineUtils,DvtObj,"DvtLineUtils");
DvtLineUtils.intersect2Lines=function(a,b,c,d,e){var f=a.x;a=a.y;var g=d.x;d=d.y;var h=b.x-f,k=c.x-g;if(0===h&&0===k)return null;b=(b.y-a)/h;c=(c.y-d)/k;if(b===c)return null;e||(e=new DvtPoint);if(0===h)return e.x=f,e.y=c*(f-g)+d,e;if(0===k)return e.x=g,e.y=b*(g-f)+a,e;c=(-c*g+d+b*f-a)/(b-c);e.x=c;e.y=b*(c-f)+a;return e};DvtLineUtils.lineLen=function(a,b,c,d){a=c-a;b=d-b;return Math.sqrt(a*a+b*b)};DvtLineUtils.midPt=function(a,b,c,d,e){e||(e=new DvtPoint);e.x=(a+c)/2;e.y=(b+d)/2;return e};
var DvtVectorUtils={};DvtObj.createSubclass(DvtVectorUtils,DvtObj,"DvtLineUtils");DvtVectorUtils.createVector=function(a,b){var c={};c.x=a;c.y=b;return c};DvtVectorUtils.addVectors=function(a,b){return DvtVectorUtils.createVector(a.x+b.x,a.y+b.y)};DvtVectorUtils.subtractVectors=function(a,b){return DvtVectorUtils.createVector(a.x-b.x,a.y-b.y)};DvtVectorUtils.scaleVector=function(a,b){return DvtVectorUtils.createVector(a.x*b,a.y*b)};
DvtVectorUtils.getMagnitude=function(a){return Math.sqrt(a.x*a.x+a.y*a.y)};var DvtLayoutUtils=function(){};DvtObj.createSubclass(DvtLayoutUtils,DvtObj,"DvtLayoutUtils");
DvtLayoutUtils.position=function(a,b,c,d,e,f){c&&(f=0<d*e?f:0,"top"==b?(c.setTranslateX(a.x+a.w/2-d/2),c.setTranslateY(a.y),a.y+=e+f,a.h-=e+f):"bottom"==b?(c.setTranslateX(a.x+a.w/2-d/2),c.setTranslateY(a.y+a.h-e),a.h-=e+f):"left"==b?(c.setTranslateX(a.x),c.setTranslateY(a.y+a.h/2-e/2),a.x+=d+f,a.w-=d+f):"right"==b&&(c.setTranslateX(a.x+a.w-d),c.setTranslateY(a.y+a.h/2-e/2),a.w-=d+f))};
DvtLayoutUtils.align=function(a,b,c,d){c&&("start"==b?b=DvtAgent.isRightToLeft(c.getCtx())?"right":"left":"end"==b&&(b=DvtAgent.isRightToLeft(c.getCtx())?"left":"right"),"left"==b?c.setX(a.x):"center"==b?c.setX(a.x+a.w/2-d/2):"right"==b&&c.setX(a.x+a.w-d))};var DvtMath={};DvtObj.createSubclass(DvtMath,DvtObj,"DvtMath");DvtMath.RADS_PER_DEGREE=Math.PI/180;DvtMath.DEGREES_PER_RAD=180/Math.PI;DvtMath.HALF_PI=Math.PI/2;DvtMath.QUARTER_PI=Math.PI/4;DvtMath.TOLERANCE=.1;
DvtMath.degreesToRads=function(a){return a*DvtMath.RADS_PER_DEGREE};DvtMath.radsToDegrees=function(a){return a*DvtMath.DEGREES_PER_RAD};DvtMath.interpolateNumber=function(a,b,c){return a+c*(b-a)};var DvtPropMap=function(){this.Init()};DvtPropMap.REGEXP=/#\{([^\}]*)\}/g;DvtObj.createSubclass(DvtPropMap,DvtObj,"DvtPropMap");DvtPropMap.prototype.Init=function(){this._props={}};DvtPropMap.prototype.getProperty=function(a){return this._props[a]};
DvtPropMap.prototype.setProperty=function(a,b){this._props[a]=b};DvtPropMap.prototype.getStringProp=function(a,b){var c=this._props[a];return c?c:b};DvtPropMap.prototype.getBooleanProp=function(a,b){var c=this._props[a],d=b;"boolean"===typeof c?d=c:0===c?d=!1:1===c?d=!0:"string"===typeof c&&(d="true"===c.toLowerCase());return d};DvtPropMap.prototype.getIntegerProp=function(a,b){var c=this._props[a],d;c&&(d=parseInt(c));return d?d:b};
DvtPropMap.prototype.getFloatProp=function(a,b){var c=this._props[a],d;c&&(d=parseFloat(c));return d?d:b};DvtPropMap.prototype.getId=function(){return this.getProperty("id")};DvtPropMap.prototype.setId=function(a){this.setProperty("id",a)};DvtPropMap.prototype.setProperties=function(a){for(var b=0;b<a.length;b++){var c=a[b];c.name&&void 0!==c.value&&this.setProperty(c.name,c.value)}};
DvtPropMap.prototype.stamp=function(a){var b=new this.constructor,c={},d;for(d in this._props)c[d]=this._props[d].replace?this._props[d].replace(DvtPropMap.REGEXP,function(b,c){return a&&void 0!==a[c]?a[c]:b}):this._props[d];b._props=c;return b};DvtPropMap.toELContext=function(a){a=a.getAttributes();for(var b,c={},d=0;d<a.length;d++)b=a[d],c[b.name]=b.value;return c};var DvtImageLoader={};DvtObj.createSubclass(DvtImageLoader,DvtObj,"DvtImageLoader");
DvtImageLoader.loadImage=function(a,b,c){return a.getImplFactory().getImageLoader().loadImage(b,c)};var DvtJSONUtils={};DvtObj.createSubclass(DvtJSONUtils,DvtObj,"DvtJSONUtils");
DvtJSONUtils.clone=function(a){var b=null;if(a instanceof Array)for(var b=[],c=0;c<a.length;c++)DvtJSONUtils._isDeepClonable(a[c])?b[c]=DvtJSONUtils.clone(a[c]):b[c]=a[c];else if(a instanceof DvtCSSStyle)b=a.clone();else if(a instanceof Object)for(c in b={},a){var d=a[c];DvtJSONUtils._isDeepClonable(d)?b[c]=DvtJSONUtils.clone(d):b[c]=d}return b};DvtJSONUtils.merge=function(a,b){var c=DvtJSONUtils.clone(a),d=DvtJSONUtils.clone(b);if(null==c)return d;if(null==d)return c;DvtJSONUtils._copy(c,d);return d};
DvtJSONUtils._copy=function(a,b){for(var c in a){var d=a[c];d&&d instanceof Array?b[c]=d:b[c]&&b[c]instanceof DvtCSSStyle?d instanceof DvtCSSStyle?b[c].merge(d):b[c].merge(new DvtCSSStyle(d)):DvtJSONUtils._isDeepClonable(d)?b[c]?DvtJSONUtils._copy(d,b[c]):b[c]=d:b[c]=d}};DvtJSONUtils._isDeepClonable=function(a){return"undefined"==typeof a?!1:a instanceof Object&&!(a instanceof Boolean)&&!(a instanceof String)&&!(a instanceof Number)&&!(a instanceof Function)};var DvtDisplayableUtils=function(){};
DvtObj.createSubclass(DvtDisplayableUtils,DvtObj,"DvtDisplayableUtils");DvtDisplayableUtils.getDimensionsForced=function(a,b){var c=b.getParent(),d;c&&(d=c.getChildIndex(b));var e=a.getStage();e.addChild(b);var f=b.getDimensions();e.removeChild(b);c&&c.addChildAt(b,d);return f};DvtDisplayableUtils._getDimForced=function(a,b){if(b._dim||!a)return b._dim;var c=DvtDisplayableUtils.getDimensionsForced(a,b);DvtDisplayableUtils._setDimForced(b,c);return c};
DvtDisplayableUtils._setDimForced=function(a,b){a._dim=b};DvtDisplayableUtils.isAncestor=function(a,b){for(var c=b;c;){if(c==a)return!0;c instanceof DvtContainer&&(c=c.getParent())}return!1};var DvtPathUtils={};DvtObj.createSubclass(DvtPathUtils,DvtObj,"DvtPathUtils");DvtPathUtils.moveTo=function(a,b){return"M"+a+","+b};DvtPathUtils.lineTo=function(a,b){return"L"+a+","+b};DvtPathUtils.quadTo=function(a,b,c,d){return"Q"+a+","+b+","+c+","+d};
DvtPathUtils.cubicTo=function(a,b,c,d,e,f){return"C"+a+","+b+","+c+","+d+","+e+","+f};DvtPathUtils.arcTo=function(a,b,c,d,e,f){a="A"+a+","+b+",0,";a=c>Math.PI?a+"1,":a+"0,";return a+(d+","+e+","+f)};DvtPathUtils.closePath=function(){return"Z"};
DvtPathUtils.roundedRectangle=function(a,b,c,d,e,f,g,h){return DvtPathUtils.moveTo(a+e,b)+DvtPathUtils.lineTo(a+c-f,b)+DvtPathUtils.arcTo(f,f,Math.PI/2,1,a+c,b+f)+DvtPathUtils.lineTo(a+c,b+d-g)+DvtPathUtils.arcTo(g,g,Math.PI/2,1,a+c-g,b+d)+DvtPathUtils.lineTo(a+h,b+d)+DvtPathUtils.arcTo(h,h,Math.PI/2,1,a,b+d-h)+DvtPathUtils.lineTo(a,b+e)+DvtPathUtils.arcTo(e,e,Math.PI/2,1,a+e,b)+DvtPathUtils.closePath()};
DvtPathUtils.createPathArray=function(a){if(!a)return null;a=a.replace(/([mlqhvzca])/gi,",$1,").split(/[ ,]/g);var b=a.length,c;for(c=0;c<b;c++){var d=a[c];d?isNaN(d)||(a[c]=parseFloat(d)):(a.splice(c,1),c--,b--)}return a};
DvtPathUtils.getDimensions=function(a){if(!a||!a.length)return new DvtRectangle;var b=a.length,c,d,e,f=!0,g,h,k=Number.MAX_VALUE,m=Number.MIN_VALUE,n=Number.MAX_VALUE,p=Number.MIN_VALUE,q=[],r,t;for(r=0;r<b;r++){g=!1;var v=0;t=0;c=a[r];switch(c){case "m":g=!0;case "M":do c=a[r+1],h=a[r+2],f?f=!1:g&&(c+=d,h+=e),d=c,e=h,q[t++]=c,q[t++]=h,v++,r+=2;while(!isNaN(a[r+1]));break;case "c":g=!0;case "C":do c=a[r+5],h=a[r+6],g&&(c+=d,h+=e),d=c,e=h,q[t++]=c,q[t++]=h,v++,r+=6;while(!isNaN(a[r+1]));break;case "q":g=
!0;case "Q":do c=a[r+3],h=a[r+4],g&&(c+=d,h+=e),d=c,e=h,q[t++]=c,q[t++]=h,v++,r+=4;while(!isNaN(a[r+1]));break;case "l":g=!0;case "L":do c=a[r+1],h=a[r+2],g&&(c+=d,h+=e),d=c,e=h,q[t++]=c,q[t++]=h,v++,r+=2;while(!isNaN(a[r+1]));break;case "h":g=!0;case "H":do c=a[r+1],g&&(c+=d),d=c,q[t++]=c,q[t++]=e,v++,r+=1;while(!isNaN(a[r+1]));break;case "v":g=!0;case "V":do h=a[r+1],g&&(h+=e),e=h,q[t++]=d,q[t++]=h,v++,r+=1;while(!isNaN(a[r+1]))}for(g=t=0;g<v;g++)c=q[t++],h=q[t++],k=Math.min(k,c),m=Math.max(m,c),
n=Math.min(n,h),p=Math.max(p,h)}return new DvtRectangle(k,n,Math.abs(m-k),Math.abs(p-n))};DvtPathUtils.getPathString=function(a){for(var b="",c=a.length,d,e=0;e<c;e++)d=a[e],void 0!==d&&null!==d&&(b+=(0<e?" ":"")+a[e]);return b};
DvtPathUtils.transformPath=function(a,b,c,d,e){var f="";if(a){a=a.match(/[a-z][^a-z]*/ig);for(var g=0;g<a.length;g++){var h=a[g],k=h.charAt(0),m=k===k.toUpperCase(),f=f+(k+" "),h=h.substring(1),h=h.replace(/,/g," "),h=h.replace(/^\s+|\s+$/g,"");if(0<h.length)if(h=h.split(/\s+/g),"A"===k.toUpperCase())for(k=0;k<h.length;k+=7)f+=parseFloat(h[k])*d+" ",f+=parseFloat(h[k+1])*e+" ",f+=h[k+2]+" ",f+=h[k+3]+" ",f+=h[k+4]+" ",f+=parseFloat(h[k+5])*d+(m?b:0)+" ",f+=parseFloat(h[k+6])*e+(m?c:0)+" ";else{var n=
[],p=[];"H"===k.toUpperCase()?(n.push(d),p.push(m?b:0)):("V"===k.toUpperCase()?n.push(e):(n.push(d),n.push(e),p.push(m?b:0)),p.push(m?c:0));for(k=0;k<h.length;k++)var m=n[k%n.length],q=p[k%p.length],f=f+(parseFloat(h[k])*m+q+" ")}}return f}};DvtPathUtils._fitsInScale=function(a,b,c){return Math.abs(a)>c||Math.abs(b)>c};
DvtPathUtils.simplifyPath=function(a,b){for(var c,d="",e=0,f=0,g,h=0;h<a.length;h++)if(isNaN(a[h])){if(c=a[h],"Z"==c||"z"==c)g=c,d+=c,f=e=0}else switch(c){case "M":f=e=0;case "m":d=d+c+a[h]+" "+a[h+1];g=c;h++;break;case "l":e+=a[h];f+=a[h+1];DvtPathUtils._fitsInScale(e,f,b)&&(g!=c?(g=c,d+=c):d+=" ",d=d+e+" "+f,f=e=0);h++;break;case "h":case "v":"h"==c?e+=a[h]:f+=a[h],DvtPathUtils._fitsInScale(e,f,b)&&(0!=e&&0!=f?("l"!=g?(g="l",d+="l"):d+=" ",d=d+e+" "+f):(g=c,d=d+c+("h"==c?e:f)),f=e=0)}return d};
function DvtMarkerDefElem(){this.Init()}DvtObj.createSubclass(DvtMarkerDefElem,DvtPropMap,"DvtMarkerDefElem");DvtMarkerDefElem.ATTR_ELEMENTS="elements";DvtMarkerDefElem.ATTR_SHAPE="shape";DvtMarkerDefElem.ATTR_BORDER_COLOR="bc";DvtMarkerDefElem.ATTR_FILL_COLOR="fc";DvtMarkerDefElem.ATTR_FILL_PATTERN="fp";DvtMarkerDefElem.ATTR_FILL_GRADIENT="fg";DvtMarkerDefElem.ATTR_DATA="d";DvtMarkerDefElem.ATTR_POINTS="p";DvtMarkerDefElem.ATTR_LINE_WIDTH="lw";DvtMarkerDefElem.ATTR_FILL_GRAD_COLORS="c";
DvtMarkerDefElem.ATTR_FILL_GRAD_STOPS="p";DvtMarkerDefElem.ATTR_FILL_GRAD_BOUNDS="b";DvtMarkerDefElem.ATTR_FILL_GRAD_DIR="dir";DvtMarkerDefElem.ATTR_FILL_GRAD_DIR_RADIAL="gdR";DvtMarkerDefElem.ATTR_FILL_GRAD_DIR_RIGHT="gdRi";DvtMarkerDefElem.ATTR_FILL_GRAD_DIR_DOWN="gdD";DvtMarkerDefElem.ATTR_FILL_GRAD_DIR_45="gdD45";DvtMarkerDefElem.ATTR_FILL_GRAD_DIR_135="gdD135";DvtMarkerDefElem.ATTR_FILL_GRAD_CX="cx";DvtMarkerDefElem.ATTR_FILL_GRAD_CY="cy";DvtMarkerDefElem.ATTR_FILL_GRAD_RADIUS="r";
DvtMarkerDefElem.ATTR_FILL_GRAD_RADIUSX="rx";DvtMarkerDefElem.ATTR_FILL_GRAD_RADIUSY="ry";DvtMarkerDefElem.ATTR_ANGLES="ang";DvtMarkerDefElem.ATTR_CLOSURE_TYPE="ct";DvtMarkerDefElem.ATTR_TRANSFORM="transform";DvtMarkerDefElem.prototype.Init=function(){DvtMarkerDefElem.superclass.Init.call(this)};DvtMarkerDefElem.prototype.getShape=function(){return this.getProperty(DvtMarkerDefElem.ATTR_SHAPE)};DvtMarkerDefElem.prototype.setShape=function(a){this.setProperty(DvtMarkerDefElem.ATTR_SHAPE,a)};
DvtMarkerDefElem.prototype.getData=function(){return this.getProperty(DvtMarkerDefElem.ATTR_DATA)};DvtMarkerDefElem.prototype.setData=function(a){return this.setProperty(DvtMarkerDefElem.ATTR_DATA,a)};DvtMarkerDefElem.prototype.getPoints=function(){return this.getProperty(DvtMarkerDefElem.ATTR_POINTS)};DvtMarkerDefElem.prototype.setPoints=function(a){this.setProperty(DvtMarkerDefElem.ATTR_POINTS,a)};DvtMarkerDefElem.prototype.getClosureType=function(){return this.getProperty(DvtMarkerDefElem.ATTR_CLOSURE_TYPE)};
DvtMarkerDefElem.prototype.setClosureType=function(a){this.setProperty(DvtMarkerDefElem.ATTR_CLOSURE_TYPE,a)};DvtMarkerDefElem.prototype.getAngles=function(){return this.getProperty(DvtMarkerDefElem.ATTR_ANGLES)};DvtMarkerDefElem.prototype.setAngles=function(a){return this.setProperty(DvtMarkerDefElem.ATTR_ANGLES,a)};DvtMarkerDefElem.prototype.getBorderColor=function(){return this.getProperty(DvtMarkerDefElem.ATTR_BORDER_COLOR)};
DvtMarkerDefElem.prototype.setBorderColor=function(a){this.setProperty(DvtMarkerDefElem.ATTR_BORDER_COLOR,a)};DvtMarkerDefElem.prototype.getLineWidth=function(){return this.getProperty(DvtMarkerDefElem.ATTR_LINE_WIDTH)};DvtMarkerDefElem.prototype.setLineWidth=function(a){this.setProperty(DvtMarkerDefElem.ATTR_LINE_WIDTH,a)};DvtMarkerDefElem.prototype.getFillColor=function(){return this.getProperty(DvtMarkerDefElem.ATTR_FILL_COLOR)};
DvtMarkerDefElem.prototype.setFillColor=function(a){this.setProperty(DvtMarkerDefElem.ATTR_FILL_COLOR,a)};DvtMarkerDefElem.prototype.getFillPattern=function(){return this.getProperty(DvtMarkerDefElem.ATTR_FILL_PATTERN)};DvtMarkerDefElem.prototype.setFillPattern=function(a){this.setProperty(DvtMarkerDefElem.ATTR_FILL_PATTERN,a)};DvtMarkerDefElem.prototype.getFillGradient=function(){return this.getProperty(DvtMarkerDefElem.ATTR_FILL_GRADIENT)};
DvtMarkerDefElem.prototype.setFillGradient=function(a){this.setProperty(DvtMarkerDefElem.ATTR_FILL_GRADIENT,a)};DvtMarkerDefElem.prototype.getGradColors=function(){return this.getProperty(DvtMarkerDefElem.ATTR_FILL_GRAD_COLORS).split(",")};DvtMarkerDefElem.prototype.getGradStops=function(){var a=this.getProperty(DvtMarkerDefElem.ATTR_FILL_GRAD_STOPS).split(",");DvtArrayUtils.toFloat(a);return a};
DvtMarkerDefElem.prototype.getGradBounds=function(){var a=this.getProperty(DvtMarkerDefElem.ATTR_FILL_GRAD_BOUNDS).split(",");DvtArrayUtils.toFloat(a);return a};DvtMarkerDefElem.prototype.getGradDir=function(){return this.getProperty(DvtMarkerDefElem.ATTR_FILL_GRAD_DIR)};DvtMarkerDefElem.prototype.getGradRadius=function(){return this.getProperty(DvtMarkerDefElem.ATTR_FILL_GRAD_RADIUS)};DvtMarkerDefElem.prototype.getGradRadiusX=function(){return this.getProperty(DvtMarkerDefElem.ATTR_FILL_GRAD_RADIUSX)};
DvtMarkerDefElem.prototype.getGradRadiusY=function(){return this.getProperty(DvtMarkerDefElem.ATTR_FILL_GRAD_RADIUSY)};DvtMarkerDefElem.prototype.getGradCx=function(){return this.getProperty(DvtMarkerDefElem.ATTR_FILL_GRAD_CX)};DvtMarkerDefElem.prototype.getGradCy=function(){return this.getProperty(DvtMarkerDefElem.ATTR_FILL_GRAD_CY)};DvtMarkerDefElem.prototype.getTransform=function(){return this.getProperty(DvtMarkerDefElem.ATTR_TRANSFORM)};
DvtMarkerDefElem.prototype.setTransform=function(a){return this.setProperty(DvtMarkerDefElem.ATTR_TRANSFORM,a)};var DvtMarkerDef=function(){this.Init()};DvtObj.createSubclass(DvtMarkerDef,DvtPropMap,"DvtMarkerDef");DvtMarkerDef.MARKER_DEF="markerDef";DvtMarkerDef.MARKER_DEF_CIRCLE="c";DvtMarkerDef.MARKER_DEF_ELLIPSE="o";DvtMarkerDef.MARKER_DEF_LINE="l";DvtMarkerDef.MARKER_DEF_PATH="p";DvtMarkerDef.MARKER_DEF_POLYGON="pg";DvtMarkerDef.MARKER_DEF_POLYLINE="pl";DvtMarkerDef.MARKER_DEF_RECT="r";
DvtMarkerDef.ATTR_ELEMENTS="elements";DvtMarkerDef.ATTR_BORDER_COLOR="bc";DvtMarkerDef.ATTR_LINE_WIDTH="lw";DvtMarkerDef.ATTR_FILL_COLOR="fc";DvtMarkerDef.ATTR_FILL_PATTERN="fp";DvtMarkerDef.ATTR_FILL_GRADIENT="fg";DvtMarkerDef.BI_DEFAULT_MARKER_SIZE=9;DvtMarkerDef.HUMAN_CMDS="M 38.07,36.467856 q 13.414,0 13.414,-13.406 l 0,-9.258 q 0,-13.4039999 -13.414,-13.4039999 -13.414,0 -13.414,13.4039999 l 0,9.258 q 0,13.406 13.414,13.406 l 0,0 z m 16.219,7.275 -32.435999,0 q -10.139552,0 -15.9400009,7.443875 Q 0.5,58.133383 0.5,69.156856 l 0,54.396004 12.746001,0 0,-51.609004 q 0,-2.824 0.793,-2.824 0.742,0 0.742,2.709 l 0,124.267994 q 0,2.82401 2.823999,2.82401 l 12.531,0 q 2.824,0 2.824,-2.824 l 0,-66.25 10.219,0 0,66.25 q 0,2.824 2.824,2.824 l 12.528,0 q 2.825,0 2.825,-2.824 l 0,-124.268004 q 0,-2.709 0.839,-2.709 0.792,0 0.792,2.824 l 0,51.609004 12.65,0 0,-54.396004 Q 75.6386,58.132927 70.227626,51.186731 64.428999,43.742856 54.289,43.742856 l 0,0 z";
DvtMarkerDef.HUMAN2_CMDS="M 306.40625 386.78125 C 304.19988 386.78125 302.40625 389.07579 302.40625 391.90625 C 302.40625 394.73671 304.19988 397.03125 306.40625 397.03125 C 308.61263 397.03125 310.40625 394.73671 310.40625 391.90625 C 310.40625 389.07579 308.61263 386.78125 306.40625 386.78125 z M 301.78125 396.0625 C 300.43025 397.2945 298.28125 400.28125 298.90625 403.15625 C 302.41725 405.79925 309.20225 406.154 314.03125 403 C 314.21825 399.828 312.68325 397.5635 310.90625 396.0625 C 308.65625 400.7185 304.28125 399.7815 301.78125 396.0625 z ";
DvtMarkerDef.prototype.Init=function(){DvtMarkerDef.superclass.Init.call(this)};DvtMarkerDef.prototype.getBorderColor=function(){return this.getProperty(DvtMarkerDef.ATTR_BORDER_COLOR)};DvtMarkerDef.prototype.setBorderColor=function(a){this.setProperty(DvtMarkerDef.ATTR_BORDER_COLOR,a)};DvtMarkerDef.prototype.getLineWidth=function(){return this.getProperty(DvtMarkerDef.ATTR_LINE_WIDTH)};DvtMarkerDef.prototype.setLineWidth=function(a){this.setProperty(DvtMarkerDef.ATTR_LINE_WIDTH,a)};
DvtMarkerDef.prototype.getFillColor=function(){return this.getProperty(DvtMarkerDef.ATTR_FILL_COLOR)};DvtMarkerDef.prototype.setFillColor=function(a){this.setProperty(DvtMarkerDef.ATTR_FILL_COLOR,a)};DvtMarkerDef.prototype.getFillPattern=function(){return this.getProperty(DvtMarkerDef.ATTR_FILL_PATTERN)};DvtMarkerDef.prototype.setFillPattern=function(a){this.setProperty(DvtMarkerDef.ATTR_FILL_PATTERN,a)};DvtMarkerDef.prototype.getFillGradient=function(){return this.getProperty(DvtMarkerDef.ATTR_FILL_GRADIENT)};
DvtMarkerDef.prototype.setFillGradient=function(a){this.setProperty(DvtMarkerDef.ATTR_FILL_GRADIENT,a)};DvtMarkerDef.prototype.getDimensions=function(){var a=this.getProperty("dx"),b=this.getProperty("dy"),c=this.getProperty("dw"),d=this.getProperty("dh");return c&&d?new DvtRectangle(a,b,c,d):null};DvtMarkerDef.prototype.getElements=function(){return this.getProperty(DvtMarkerDef.ATTR_ELEMENTS)};
DvtMarkerDef.prototype.addElement=function(a){var b=this.getElements();b||(b=[],this.setProperty(DvtMarkerDef.ATTR_ELEMENTS,b));b.push(a)};var DvtMarkerGradient=function(){};DvtObj.createSubclass(DvtMarkerGradient,DvtObj,"DvtMarkerGradient");
DvtMarkerGradient.createMarkerGradient=function(a,b,c){var d=[],e=[];c=[c,c,c,c];e=null;e=b.getType();b=DvtDisplayableUtils._getDimForced(b.getCtx(),b);d=b.getCenter();b=Math.min(b.w,b.h);if(e!=DvtMarker.HUMAN){var e=[0,.5,.75,1],f=DvtColorUtils.getPastel(a,.2),g=DvtColorUtils.getPastel(a,.1),h=DvtColorUtils.getDarker(a,.8);b/=2;var k=d.x,m=d.y,d=[DvtColorUtils.getPound(f),DvtColorUtils.getPound(g),a,DvtColorUtils.getPound(h)];a=new DvtRectangle(-b,-b,2*b,2*b);a=[a.x,a.y,a.w,a.h];e=new DvtRadialGradientFill(d,
c,e,k,m,b,a)}else e=[0,.3,.7,1],f=DvtColorUtils.getPastel(a,.2),g=DvtColorUtils.getDarker(a,.9),h=DvtColorUtils.getDarker(a,.8),d=[DvtColorUtils.getPound(f),DvtColorUtils.getPound(g),a,DvtColorUtils.getPound(h)],a=new DvtRectangle(-b/2,-b/2,b,b),a=[a.x,a.y,a.w,a.h],e=new DvtLinearGradientFill(135,d,c,e,a);return e};var DvtMarkerUtils={_cache:{}};DvtObj.createSubclass(DvtMarkerUtils,DvtObj,"DvtMarkerUtils");
DvtMarkerUtils.createMarkerDef=function(a,b){var c=new DvtMarkerDef;c.setProperties(b.getAttributes());for(var d=b.getChildNodes(),e,f=0;f<d.length;f++){var g=d[f];g&&(e=new DvtMarkerDefElem,"fillDef"==g.getName()&&g.getChildNodes()&&(g=g.getChildNodes()[0]),e.setProperties(g.getAttributes()),e.setShape(g.getName()),c.addElement(e))}c&&this._addMarkerDef(a,c);return c};
DvtMarkerUtils._addMarkerDef=function(a,b){var c=a.getStage().getId(),d=b.getId(),e=DvtMarkerUtils.getMarkerList(c);!e[d]&&(c=this.createMultiPaths(a,b,d))&&(c.setId("custom"+d),e[d]=c,(d=b.getDimensions())&&DvtDisplayableUtils._setDimForced(c,d))};DvtMarkerUtils.getMarkerList=function(a){this._cache[a]||(this._cache[a]={});return this._cache[a]};
DvtMarkerUtils.createMarkerShape=function(a,b,c,d){var e;b.getShape()==DvtMarkerDef.MARKER_DEF_PATH&&(e=this.createPathMarker(a,b,d));e&&DvtMarkerUtils.setCommonAttrs(b,c,e);return e};DvtMarkerUtils.createMultiPaths=function(a,b,c){var d=b.getElements();if(!d||0==d.length)return null;var e;if(1==d.length)e=DvtMarkerUtils.createMarkerShape(a,d[0],b,c);else{e=new DvtContainer(a,c);for(var f,g=0;g<d.length;g++)f=d[g],(f=DvtMarkerUtils.createMarkerShape(a,f,b,c+"_"+g))&&e.addChild(f)}return e};
DvtMarkerUtils.createCircleMarker=function(a,b,c,d){var e=b.getPoints(),f=e[0],g=e[1],h=e[2],k;d==DvtMarkerDef.MARKER_DEF_ELLIPSE&&(k=e[3]);if(d=b.getClosureType()){b=b.getAngles();var m,n;b&&(m=b[0],n=b[1]);a=new DvtArc(a,f,g,h,k,m,n,d,c)}else a=new DvtCircle(a,f,g,h,c);return a};DvtMarkerUtils.createRectMarker=function(a,b,c){b=b.getPoints();return new DvtRect(a,b[0],b[1],b[2],b[3],c)};DvtMarkerUtils.createLineMarker=function(a,b,c){b=b.getPoints();return new DvtLine(a,b[0],b[1],b[2],b[3],c)};
DvtMarkerUtils.createPathMarker=function(a,b,c){b=b.getData();return new DvtPath(a,b,c)};DvtMarkerUtils.createPolygoneMarker=function(a,b,c){b=b.getPoints();return new DvtPolygon(a,b,c)};DvtMarkerUtils.createPolylineMarker=function(a,b,c){b=b.getPoints();return new DvtPolyline(a,b,c)};
DvtMarkerUtils.setCommonAttrs=function(a,b,c){var d=a.getFillColor(),e=a.getFillGradient(),f=a.getFillPattern();if(f)c.setFill(new DvtPatternFill(f,d));else if(e){var d=b.getElements(),g;b=d.length;for(f=0;f<b;f++){var h=d[f];if("g"==h.getShape()&&h.getId()==e){g=h;break}}var k;g?(d=g.getGradColors(),e=g.getGradStops(),b=g.getGradBounds(),f=g.getGradDir(),f==DvtMarkerDefElem.ATTR_FILL_GRAD_DIR_RADIAL?(f=parseFloat(g.getGradCx()),h=parseFloat(g.getGradCy()),k=parseFloat(g.getGradRadius()),k||(k=parseFloat(g.getGradRadiusX()),
g=parseFloat(g.getGradRadiusY()),k=Math.max(k,g)),c.setFill(new DvtRadialGradientFill(d,null,e,f,h,k,b))):(g=0,f==DvtMarkerDefElem.ATTR_FILL_GRAD_DIR_45?g=-135:f==DvtMarkerDefElem.ATTR_FILL_GRAD_DIR_135?g=-45:f==DvtMarkerDefElem.ATTR_FILL_GRAD_DIR_DOWN&&(g=-90),c.setFill(new DvtLinearGradientFill(g,d,null,e,b)))):c.setFill(new DvtLinearGradientFill(0,["#000","#fff"]))}else d&&c.setSolidFill(d,null);g=parseFloat(a.getLineWidth());a=a.getBorderColor();if(g||a)g||(g=1),a||(a="black"),a=new DvtSolidStroke(a,
1,g),c.setStroke(a)};DvtMarkerUtils.getCustomMarkerInfo=function(a,b){var c=a.getStage().getId();if(c=DvtMarkerUtils.getMarkerList(c))return c[b]};DvtMarkerUtils.getBuiltinMarkerInfo=function(a,b,c){var d=a.getStage().getId(),d=DvtMarkerUtils.getMarkerList(d),e=c?b+"_"+c:b;!d[e]&&b&&(b=new DvtPath(a,c==DvtCSSStyle.SKIN_ALTA?DvtMarkerDef.HUMAN2_CMDS:DvtMarkerDef.HUMAN_CMDS,"dvtHuman"),DvtDisplayableUtils._getDimForced(a,b),d[e]=b);return d[e]};
DvtMarkerUtils.clearCached=function(a){a=a.getStage().getId();this._cache[a]=void 0};var DvtPolygonUtils={};DvtObj.createSubclass(DvtPolygonUtils,DvtObj,"DvtPolygonUtils");
DvtPolygonUtils.getDimensions=function(a){if(!a||0===a.length)return new DvtRectangle;for(var b=Number.MAX_VALUE,c=Number.MIN_VALUE,d=Number.MAX_VALUE,e=Number.MIN_VALUE,f=a.length,g,h,k=0;k<f;k++)g=a[k++],h=a[k],b=Math.min(b,g),c=Math.max(c,g),d=Math.min(d,h),e=Math.max(e,h);return new DvtRectangle(b,d,Math.abs(c-b),Math.abs(e-d))};var DvtTextUtils={};DvtObj.createSubclass(DvtTextUtils,DvtObj,"DvtTextUtils");DvtTextUtils._cachedTextDimensions={};
DvtTextUtils.applyFont=function(a,b){a.setSolidFill(b.color,b.alpha);a.alignBaseline();var c="";b.italic&&(c="font-style:italic; ");b.bold&&(c+="font-weight:bold; ");b.underline&&(c+="text-decoration:underline;");c+="font-size:"+b.size+";";b.name&&(c+="font-family:"+b.name+";");c&&(c=new DvtCSSStyle(c),a.setCSSStyle(c))};
DvtTextUtils.formatTextString=function(a){var b="";if(!a)return b;a=a.replace(/\n/g,"\x3cbr\x3e");if(a=a.split("\x3cbr\x3e")){for(var c=[],d=0;d<a.length;d++){var e=a[d];null!=e&&""!=e&&c.push(e)}for(d=0;d<c.length;d++)b+=c[d],d<c.length-1&&(b+=DvtTextArea.NEW_LINE)}return b};
DvtTextUtils.guessTextDimensions=function(a){var b=a.getTextString(),c=a.getCSSStyle(),c=c?c.toString():"",d=DvtTextUtils._cachedTextDimensions[c];if(null==d){a.setTextString("W");var e=a.getParent(),f;e&&(f=e.getChildIndex(a));d=a.getCtx().getStage();d=a.measureDimensions(d);d={w:1.1*d.w,h:d.h};DvtTextUtils._cachedTextDimensions[c]=d;e&&a.getParent()!=e&&e.addChildAt(a,f);a.setTextString(b)}return new DvtDimension(d.w*b.length,d.h)};
DvtTextUtils.fitText=function(a,b,c,d,e){var f=DvtTextUtils.guessTextDimensions(a);if(f.h>c)return!1;if(f.w<b)return d.addChild(a),!0;d.addChild(a);if(isNaN(e)||null==e)e=1;a.setMaxWidth(b,e);return""==a.getTextString()?(d.removeChild(a),!1):!0};var DvtDisplayable=function(a){this.Init(a)};DvtObj.createSubclass(DvtDisplayable,DvtObj,"DvtDisplayable");
DvtDisplayable.prototype.Init=function(a){this._parent=null;this._impl.setObj(this);this._context=a;this._ariaRole=this._drawEffects=this._matrix=this.ClipPathId=this._listenerObj=null;this._ariaProperties={}};DvtDisplayable.prototype.getImpl=function(){return this._impl};DvtDisplayable.prototype.getCtx=function(){return this._context};
DvtDisplayable.prototype.setClipPath=function(a){a?this.ClipPathId!=a.getId()&&(this._context.removeClipPath(this.ClipPathId),this.ClipPathId=a.getId(),this._context.addClipPath(this.ClipPathId)):(this._context.removeClipPath(this.ClipPathId),this.ClipPathId=null);this._impl.setClipPath(a)};DvtDisplayable.prototype.setImpl=function(a){this._impl=a};DvtDisplayable.prototype.getPixelHinting=function(){return this._impl.getPixelHinting()};DvtDisplayable.prototype.setPixelHinting=function(a){this._impl.setPixelHinting(a)};
DvtDisplayable.prototype.getId=function(){return this._impl.getId()};DvtDisplayable.prototype.setId=function(a){this._impl.setId(a)};DvtDisplayable.prototype.getParent=function(){return this._parent};DvtDisplayable.prototype.setParent=function(a){this._parent=a};
DvtDisplayable.prototype.ConvertCoordSpaceRect=function(a,b){var c=this.localToStage(new DvtPoint(a.x,a.y)),d=this.localToStage(new DvtPoint(a.x+a.w,a.y+a.h)),c=b.stageToLocal(c),d=b.stageToLocal(d);return new DvtRectangle(c.x,c.y,d.x-c.x,d.y-c.y)};DvtDisplayable.prototype.getDimensions=function(a){var b=this.getImpl().getDimensions();return a&&a!==this?this.ConvertCoordSpaceRect(b,a):b};
DvtDisplayable.prototype.getDimensionsWithStroke=function(a){var b=this.getImpl().getDimensionsWithStroke();return a&&a!==this?this.ConvertCoordSpaceRect(b,a):b};DvtDisplayable.prototype.getVisible=function(){return this._impl.getVisible()};DvtDisplayable.prototype.setVisible=function(a){this._impl.setVisible(a)};DvtDisplayable.prototype.addEvtListener=function(a,b,c,d){var e=this._getListeners(a,c,!0);e.push(b);e.push(d);this._impl.addListener(a,c)};
DvtDisplayable.prototype.removeEvtListener=function(a,b,c,d){var e=this._getListeners(a,c,!1);if(e)for(var f=0;f<e.length;f+=2)if(e[f]===b&&e[f+1]===d){e.splice(f,2);break}e&&0>=e.length&&this._impl.removeListener(a,c)};DvtDisplayable.prototype._getListeners=function(a,b,c){if(!this._listenerObj)if(c)this._listenerObj={};else return null;a=a+"_"+(b?!0:!1);b=this._listenerObj[a];!b&&c&&(b=[],this._listenerObj[a]=b);return b};
DvtDisplayable.prototype.FireListener=function(a,b){var c=a.getType?a.getType():a.type;if(c=this._getListeners(c,b,!1))for(var d=0;d<c.length;d+=2){var e=c[d+1];c[d]&&c[d].call(e,a)}};DvtDisplayable.prototype.getCSSStyle=function(){return this._impl.getCSSStyle()};DvtDisplayable.prototype.setCSSStyle=function(a){this._impl.setCSSStyle(a)};DvtDisplayable.prototype.setCursor=function(a){this._impl.setCursor(a)};DvtDisplayable.prototype.getCursor=function(){return this._impl.getCursor()};
DvtDisplayable.prototype.setMouseEnabled=function(a){this._impl.setMouseEnabled(a)};DvtDisplayable.prototype.isMouseEnabled=function(){return this._impl.isMouseEnabled()};DvtDisplayable.prototype.getAlpha=function(){return this._impl.getAlpha()};DvtDisplayable.prototype.setAlpha=function(a){this._impl.setAlpha(a)};DvtDisplayable.prototype.getTranslateX=function(){return this._matrix?this._matrix._decompose()[DvtMatrix._DECOMP_TX]:0};
DvtDisplayable.prototype.setTranslateX=function(a){var b=this.getMatrix().clone(),c=b._decompose();c[DvtMatrix._DECOMP_TX]=a;b._recompose(c);this.setMatrix(b)};DvtDisplayable.prototype.getTranslateY=function(){return this._matrix?this._matrix._decompose()[DvtMatrix._DECOMP_TY]:0};DvtDisplayable.prototype.setTranslateY=function(a){var b=this.getMatrix().clone(),c=b._decompose();c[DvtMatrix._DECOMP_TY]=a;b._recompose(c);this.setMatrix(b)};
DvtDisplayable.prototype.getScaleX=function(){return this._matrix?this._matrix._decompose()[DvtMatrix._DECOMP_SX]:1};DvtDisplayable.prototype.setScaleX=function(a){var b=this.getMatrix().clone(),c=b._decompose();c[DvtMatrix._DECOMP_SX]=a;b._recompose(c);this.setMatrix(b)};DvtDisplayable.prototype.getScaleY=function(){return this._matrix?this._matrix._decompose()[DvtMatrix._DECOMP_SY]:1};
DvtDisplayable.prototype.setScaleY=function(a){var b=this.getMatrix().clone(),c=b._decompose();c[DvtMatrix._DECOMP_SY]=a;b._recompose(c);this.setMatrix(b)};DvtDisplayable.prototype.getRotation=function(){return this._matrix?this._matrix._decompose()[DvtMatrix._DECOMP_R]:0};DvtDisplayable.prototype.setRotation=function(a){var b=this.getMatrix().clone(),c=b._decompose();c[DvtMatrix._DECOMP_R]=a;b._recompose(c);this.setMatrix(b)};
DvtDisplayable.prototype.getMatrix=function(){return this._matrix?this._matrix:new DvtMatrix};DvtDisplayable.prototype.setMatrix=function(a){a&&a.isIdentity()&&(a=null);this._matrix!=a&&((this._matrix=a)&&!this._matrix.isLocked()&&this._matrix.__lock(),this._impl.setMatrix(a))};DvtDisplayable.prototype.getNumDrawEffects=function(){return this._drawEffects?this._drawEffects.length:0};
DvtDisplayable.prototype.getDrawEffectAt=function(a){return!this._drawEffects||0>a||a>=this._drawEffects.length?null:this._drawEffects[a]};DvtDisplayable.prototype.addDrawEffect=function(a){this._drawEffects||(this._drawEffects=[]);a.__lock();this._drawEffects.push(a);this.getImpl().applyDrawEffects(this._drawEffects)};
DvtDisplayable.prototype.addDrawEffectAt=function(a,b){this._drawEffects||(this._drawEffects=[]);a.__lock();b>=this._drawEffects.length?this._drawEffects.push(a):this._drawEffects.splice(b,0,a);this.getImpl().applyDrawEffects(this._drawEffects)};DvtDisplayable.prototype.removeDrawEffect=function(a){a=this.getDrawEffectIndex(a);-1<a&&(this._drawEffects.splice(a,1),this.getImpl().applyDrawEffects(this._drawEffects))};
DvtDisplayable.prototype.removeDrawEffectAt=function(a){if(this._drawEffects){var b=this._drawEffects.length;0<=a&&a<b&&(this._drawEffects.splice(a,1),this.getImpl().applyDrawEffects(this._drawEffects))}};DvtDisplayable.prototype.removeAllDrawEffects=function(){this._drawEffects&&(this._drawEffects=null,this.getImpl().applyDrawEffects(this._drawEffects))};
DvtDisplayable.prototype.getDrawEffectIndex=function(a){if(this._drawEffects)for(var b=this._drawEffects.length,c=0;c<b;c++)if(a===this._drawEffects[c])return c;return-1};DvtDisplayable.prototype.applyDrawEffects=function(){this.getImpl().applyDrawEffects(this._drawEffects)};DvtDisplayable.prototype.setAriaRole=function(a){this._impl.setAriaRole&&this._impl.setAriaRole(a);this._ariaRole=a};DvtDisplayable.prototype.getAriaRole=function(){return this._ariaRole};
DvtDisplayable.prototype.setAriaProperty=function(a,b){a&&(this._impl.setAriaProperty&&("label"==a&&b&&(b=b.replace(/\n/g,"; "),b=b.replace(/\<br\/\>/gi,"; ")),this._impl.setAriaProperty(a,b)),this._ariaProperties[a]=b,"hidden"!=a&&this.setAriaProperty("hidden",null))};DvtDisplayable.prototype.getAriaProperty=function(a){return a?this._ariaProperties[a]:null};DvtDisplayable.prototype.stageToLocal=function(a){return this._impl.stageToLocal(a)};DvtDisplayable.prototype.localToStage=function(a){return this._impl.localToStage(a)};
DvtDisplayable.prototype.getPathToStage=function(){for(var a=this,b=[];a;)b.push(a),a=a.getParent();return b};DvtDisplayable.prototype.destroy=function(){this.removeAllDrawEffects();this.ClipPathId&&this.setClipPath(null)};DvtDisplayable.prototype.createCopy=function(){var a=new DvtContainer(this.getCtx(),"clonedContainer");this._impl.createCopy&&this._impl.createCopy(a);return a};DvtDisplayable.prototype.dispatchDisplayableEvent=function(a,b){this._impl.dispatchDisplayableEvent(a,b)};
DvtDisplayable.prototype.setDesc=function(a){this._impl.setDesc&&this._impl.setDesc(a)};DvtDisplayable.prototype.dispatchNativeEvent=function(a){this._impl.dispatchNativeEvent&&this._impl.dispatchNativeEvent(a)};var DvtContainer=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtContainer,DvtDisplayable,"DvtContainer");
DvtContainer.prototype.contains=function(a,b){var c=!1;void 0===b&&(b=!1);if(b)for(var d=this.getIterator(b),e;e=d.getNext();){if(e===a){c=!0;break}}else c=0<=this._findChild(a);return c};DvtContainer.prototype.Init=function(a,b){this.getImpl()||this.setImpl(a.getImplFactory().newContainer(b));DvtContainer.superclass.Init.call(this,a);this._arList=null};
DvtContainer.prototype.addChild=function(a){if(a){var b=a.getParent();b&&b.removeChild(a);this._arList||(this._arList=[]);a.setParent(this);this._impl.addChild(a.getImpl());this._arList.push(a)}};DvtContainer.prototype.addChildAt=function(a,b){this.AddChildAt(a,b)};
DvtContainer.prototype.AddChildAt=function(a,b){if(0<=b&&b<=this.getNumChildren()&&a){var c=this._findChild(a);if(!(0<=c&&c==b)){var d=a.getParent();d&&d.removeChild(a);a.setParent(this);0<=c&&b==this.getNumChildren()+1&&b--;this._impl.addChildAt(a.getImpl(),b);this._arList||(this._arList=[]);this._arList.splice(b,0,a)}}};DvtContainer.prototype._findChild=function(a){var b=-1;if(this._arList)for(var c=this._arList.length,d=0;d<c;d++)if(this._arList[d]===a){b=d;break}return b};
DvtContainer.prototype.getChildAt=function(a){var b=null;this._arList&&this._arList.length>a&&0<=a&&(b=this._arList[a]);return b};DvtContainer.prototype.getChildAfter=function(a){var b=null;a=this._findChild(a);0<=a&&++a<this._arList.length&&(b=this._arList[a]);return b};DvtContainer.prototype.getChildBefore=function(a){var b=null;a=this._findChild(a);0<a&&(b=this._arList[--a]);return b};DvtContainer.prototype._getChildren=function(){return this._arList};DvtContainer.prototype.getChildIndex=function(a){return this._findChild(a)};
DvtContainer.prototype.getIterator=function(a){return new DvtIterator(this._arList,a)};DvtContainer.prototype.getNumChildren=function(){return this._arList?this._arList.length:0};DvtContainer.prototype.removeChild=function(a){var b=this._findChild(a);-1!==b&&this._removeObj(a,b)};DvtContainer.prototype.removeChildAt=function(a){var b=this.getChildAt(a);b&&this._removeObj(b,a);return b};
DvtContainer.prototype.removeChildren=function(){if(this._arList)for(var a=this._arList;0<this.getNumChildren();)this._removeObj(a[0],0)};DvtContainer.prototype._removeObj=function(a,b){this._impl.removeChild(a.getImpl());a.setParent(null);this._arList.splice(b,1);0===this._arList.length&&(this._arList=null)};DvtContainer.prototype.swap=function(a,b){var c=this.getChildIndex(a),d=this.getChildIndex(b);this._arList[c]=b;this._arList[d]=a;this._impl.swap(a.getImpl(),b.getImpl())};
DvtContainer.prototype.destroy=function(){DvtContainer.superclass.destroy.call(this);for(var a=this.getNumChildren(),b=0;b<a;b++)this.getChildAt(b).destroy()};DvtContainer.prototype.setHyperlink=function(a){this._linkObj=a;this._impl.setHyperlink&&this._impl.setHyperlink(a)};DvtContainer.prototype.getHyperlink=function(){return this._linkObj};var DvtStage=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtStage,DvtContainer,"DvtStage");
DvtStage.prototype.Init=function(a,b,c){this.getImpl()||this.setImpl(a.getImplFactory().newStage(b,c));DvtStage.superclass.Init.call(this,a)};DvtStage.prototype.addChild=function(a){DvtStage.superclass.addChild.call(this,a)};var DvtShape=function(a){this.Init(a)};DvtObj.createSubclass(DvtShape,DvtContainer,"DvtShape");
DvtShape.prototype.Init=function(a){DvtShape.superclass.Init.call(this,a);this.IsSelected=this._bSelectable=!1;this.OriginalStroke=this.SelectedHoverOuterStroke=this.SelectedHoverInnerStroke=this.SelectedOuterStroke=this.SelectedInnerStroke=this.HoverOuterStroke=this.HoverInnerStroke=this.InnerShape=null;this.IsShowingHoverEffect=this._isOriginalStrokeSet=!1;this.setAriaProperty("hidden","true")};DvtShape.prototype.getFill=function(){return this._impl.getFill()};
DvtShape.prototype.setFill=function(a){this._impl.setFill(a);a&&a.__lock();this.UpdateSelectionEffect()};DvtShape.prototype.setSolidFill=function(a,b){this.setFill(new DvtSolidFill(a,b))};DvtShape.prototype.setInvisibleFill=function(){this.setFill(DvtSolidFill.invisibleFill())};DvtShape.prototype.getStroke=function(){return this._impl.getStroke()};DvtShape.prototype.setStroke=function(a){this._impl.setStroke(a);a&&a.__lock()};
DvtShape.prototype.setSolidStroke=function(a,b,c){this.setStroke(new DvtSolidStroke(a,b,c))};DvtShape.prototype.setHollow=function(a){this._impl.setHollow(a)};DvtShape.prototype.isHollow=function(){return this._impl.isHollow()};DvtShape.prototype.destroy=function(){DvtShape.superclass.destroy.call(this);this.setFill(null);this.setStroke(null)};DvtShape.prototype.copyShape=function(){return null};
DvtShape.prototype.UpdateSelectionEffect=function(){if(this.isSelected()||this.isHoverEffectShown()){var a;this.InnerShape&&(a=this.InnerShape.getStroke(),this.removeChild(this.InnerShape));this.InnerShape=this.copyShape();this.InnerShape.setMouseEnabled(!1);this.InnerShape.setFill(this.getFill());a&&this.InnerShape.setStroke(a);this.InnerShape.setMouseEnabled(!1);this.InnerShape.setCursor(DvtSelectionEffectUtils.getSelectingCursor());this.AddChildAt(this.InnerShape,0)}};
DvtShape.prototype.setHoverStroke=function(a,b){this.HoverInnerStroke=a;this.HoverOuterStroke=b;return this};DvtShape.prototype.setSelectedStroke=function(a,b){this.SelectedInnerStroke=a;this.SelectedOuterStroke=b;return this};DvtShape.prototype.setSelectedHoverStroke=function(a,b){this.SelectedHoverInnerStroke=a;this.SelectedHoverOuterStroke=b;return this};DvtShape.prototype.setSelectable=function(a){(this._bSelectable=a)?this.setCursor(DvtSelectionEffectUtils.getSelectingCursor()):this.setCursor(null)};
DvtShape.prototype.isSelectable=function(){return this._bSelectable};DvtShape.prototype.isSelected=function(){return this.IsSelected};
DvtShape.prototype.setSelected=function(a){this.IsSelected==a||this instanceof DvtPolyline||(this._isOriginalStrokeSet||(this._isOriginalStrokeSet=!0,this.OriginalStroke=this.getStroke()),this.IsSelected=a,this.isSelected()?(this.UpdateSelectionEffect(),this.isHoverEffectShown()?(this.CreateSelectedHoverStrokes(),this.InnerShape.setStroke(this.SelectedHoverInnerStroke),this.setStroke(this.SelectedHoverOuterStroke)):(this.InnerShape.setStroke(this.SelectedInnerStroke),this.setStroke(this.SelectedOuterStroke))):
(this.removeChild(this.InnerShape),this.setStroke(this.OriginalStroke)))};
DvtShape.prototype.showHoverEffect=function(){this.IsShowingHoverEffect=!0;this._isOriginalStrokeSet||(this._isOriginalStrokeSet=!0,this.OriginalStroke=this.getStroke());this instanceof DvtPolyline&&!this.HoverInnerStroke&&!this.HoverOuterStroke||(this.UpdateSelectionEffect(),this.isSelected()?(this.CreateSelectedHoverStrokes(),this.InnerShape.setStroke(this.SelectedHoverInnerStroke),this.setStroke(this.SelectedHoverOuterStroke)):(this.InnerShape.setStroke(this.HoverInnerStroke),this.setStroke(this.HoverOuterStroke)))};
DvtShape.prototype.CreateSelectedHoverStrokes=function(){!this.SelectedHoverInnerStroke&&this.HoverInnerStroke&&(this.SelectedHoverInnerStroke=this.HoverInnerStroke.clone());!this.SelectedHoverOuterStroke&&this.SelectedOuterStroke&&(this.SelectedHoverOuterStroke=this.SelectedOuterStroke.clone(),this.SelectedHoverOuterStroke.setWidth(this.SelectedOuterStroke.getWidth()+(this.HoverInnerStroke.getWidth()-this.SelectedInnerStroke.getWidth())))};
DvtShape.prototype.hideHoverEffect=function(){this.IsShowingHoverEffect=!1;this.isSelected()?(this.InnerShape.setStroke(this.SelectedInnerStroke),this.setStroke(this.SelectedOuterStroke)):(this.removeChild(this.InnerShape),this.setStroke(this.OriginalStroke))};DvtShape.prototype.isHoverEffectShown=function(){return this.IsShowingHoverEffect};DvtShape.prototype.addChildAt=function(a,b){DvtShape.superclass.addChildAt.call(this,a,this.isSelected()||this.isHoverEffectShown()?b+1:b)};
DvtShape.prototype.getChildAt=function(a,b){return DvtShape.superclass.getChildAt.call(this,a,this.isSelected()||this.isHoverEffectShown()?b+1:b)};DvtShape.prototype.getChildIndex=function(a){a=DvtShape.superclass.getChildIndex.call(this,a);return this.isSelected()||this.isHoverEffectShown()?a+1:a};DvtShape.prototype.removeChildAt=function(a){DvtShape.superclass.removeChildAt.call(this,this.isSelected()||this.isHoverEffectShown()?a+1:a)};
var DvtArc=function(a,b,c,d,e,f,g,h,k){this.Init(a,b,c,d,e,f,g,h,k)};DvtObj.createSubclass(DvtArc,DvtShape,"DvtArc");DvtArc.OPEN="OPEN";DvtArc.CHORD="CHORD";DvtArc.PIE="PIE";DvtArc.prototype.getAngleStart=function(){return this._impl.getAngleStart()};DvtArc.prototype.setAngleStart=function(a){this._impl.setAngleStart(a);this.UpdateSelectionEffect()};DvtArc.prototype.getAngleExtent=function(){return this._impl.getAngleExtent()};
DvtArc.prototype.setAngleExtent=function(a){this._impl.setAngleExtent(a);this.UpdateSelectionEffect()};DvtArc.prototype.getClosure=function(){return this._impl.getClosure()};DvtArc.prototype.setClosure=function(a){this._impl.setClosure(a);this.UpdateSelectionEffect()};DvtArc.prototype.getCx=function(){return this._impl.getCx()};DvtArc.prototype.setCx=function(a){this._impl.setCx(a);this.UpdateSelectionEffect()};DvtArc.prototype.getCy=function(){return this._impl.getCy()};
DvtArc.prototype.setCy=function(a){this._impl.setCy(a);this.UpdateSelectionEffect()};DvtArc.prototype.getRx=function(){return this._impl.getRx()};DvtArc.prototype.setRx=function(a){this._impl.setRx(a);this.UpdateSelectionEffect()};DvtArc.prototype.getRy=function(){return this._impl.getRy()};DvtArc.prototype.setRy=function(a){this._impl.setRy(a);this.UpdateSelectionEffect()};
DvtArc.prototype.Init=function(a,b,c,d,e,f,g,h,k){this.getImpl()||this.setImpl(a.getImplFactory().newArc(b,c,d,e,f,g,h,k));DvtArc.superclass.Init.call(this,a)};DvtArc.prototype.setArc=function(a,b){this._impl.setArc(a,b);this.UpdateSelectionEffect()};DvtArc.prototype.setRadius=function(a,b){this.setRx(a);this.setRy(b)};DvtArc.prototype.copyShape=function(){return new DvtArc(this.getCtx(),this.getCx(),this.getCy(),this.getRx(),this.getRy(),this.getAngleStart(),this.getAngleExtent(),this.getClosure())};
var DvtCircle=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtCircle,DvtShape,"DvtCircle");DvtCircle.prototype.getCx=function(){return this._impl.getCx()};DvtCircle.prototype.setCx=function(a){this._impl.setCx(a);this.UpdateSelectionEffect()};DvtCircle.prototype.getCy=function(){return this._impl.getCy()};DvtCircle.prototype.setCy=function(a){this._impl.setCy(a);this.UpdateSelectionEffect()};DvtCircle.prototype.getRadius=function(){return this._impl.getRadius()};
DvtCircle.prototype.setRadius=function(a){this._impl.setRadius(a);this.UpdateSelectionEffect()};DvtCircle.prototype.Init=function(a,b,c,d,e){this.getImpl()||this.setImpl(a.getImplFactory().newCircle(b,c,d,e));DvtCircle.superclass.Init.call(this,a)};DvtCircle.prototype.setCenter=function(a,b){this.setCx(a);this.setCy(b)};DvtCircle.prototype.copyShape=function(){return new DvtCircle(this.getCtx(),this.getCx(),this.getCy(),this.getRadius())};
var DvtImage=function(a,b,c,d,e,f,g){this.Init(a,b,c,d,e,f,g)};DvtObj.createSubclass(DvtImage,DvtShape,"DvtImage");DvtImage.prototype.getHeight=function(){return this._impl.getHeight()};DvtImage.prototype.setHeight=function(a){this._impl.setHeight(a)};DvtImage.prototype.getPos=function(){return this._impl.getPos()};DvtImage.prototype.setPos=function(a,b){this.setX(a);this.setY(b)};DvtImage.prototype.getSrc=function(){return this._impl.getSrc()};DvtImage.prototype.setSrc=function(a){this._impl.setSrc(a)};
DvtImage.prototype.getX=function(){return this._impl.getX()};DvtImage.prototype.setX=function(a){this._impl.setX(a)};DvtImage.prototype.getY=function(a){return this._impl.getY()};DvtImage.prototype.setY=function(a){this._impl.setY(a)};DvtImage.prototype.getWidth=function(){return this._impl.getWidth()};DvtImage.prototype.setWidth=function(a){this._impl.setWidth(a)};DvtImage.prototype.__setDimensions=function(a){this.setWidth(a.width);this.setHeight(a.height)};
DvtImage.prototype.Init=function(a,b,c,d,e,f,g){this.getImpl()||this.setImpl(a.getImplFactory().newImage(b,c,d,e,f,g));DvtImage.superclass.Init.call(this,a)};DvtImage.prototype.loadImage=function(){return this._impl.loadImage()};DvtImage.prototype.copyShape=function(){return new DvtImage(this.getCtx(),this.getSrc(),this.getX(),this.getY(),this.getWidth(),this.getHeight())};var DvtLine=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};DvtObj.createSubclass(DvtLine,DvtShape,"DvtLine");
DvtLine.prototype.getX1=function(){return this._impl.getX1()};DvtLine.prototype.setX1=function(a){this._impl.setX1(a);this.UpdateSelectionEffect()};DvtLine.prototype.getY1=function(){return this._impl.getY1()};DvtLine.prototype.setY1=function(a){this._impl.setY1(a);this.UpdateSelectionEffect()};DvtLine.prototype.getX2=function(){return this._impl.getX2()};DvtLine.prototype.setX2=function(a){this._impl.setX2(a);this.UpdateSelectionEffect()};DvtLine.prototype.getY2=function(){return this._impl.getY2()};
DvtLine.prototype.setY2=function(a){this._impl.setY2(a);this.UpdateSelectionEffect()};DvtLine.prototype.Init=function(a,b,c,d,e,f){this.getImpl()||this.setImpl(a.getImplFactory().newLine(b,c,d,e,f));DvtLine.superclass.Init.call(this,a)};DvtLine.prototype.copyShape=function(){return new DvtLine(this.getCtx(),this.getX1(),this.getY1(),this.getX2(),this.getY2())};var DvtMarker=function(a,b,c,d,e,f,g,h,k,m,n){this.Init(a,b,c,d,e,f,g,h,k,m,n)};DvtObj.createSubclass(DvtMarker,DvtShape,"DvtMarker");
DvtMarker.NONE="none";DvtMarker.CIRCLE="circle";DvtMarker.SQUARE="square";DvtMarker.DIAMOND="diamond";DvtMarker.TRIANGLE_UP="triangleUp";DvtMarker.TRIANGLE_DOWN="triangleDown";DvtMarker.PLUS="plus";DvtMarker.HUMAN="human";DvtMarker.ROUNDED_RECTANGLE="roundedRect";DvtMarker.CUSTOM="custom";DvtMarker.IMAGE="image";DvtMarker.IMAGE_SOURCE=0;DvtMarker.IMAGE_SOURCE_SELECTED=1;DvtMarker.IMAGE_SOURCE_HOVER=2;DvtMarker.IMAGE_SOURCE_HOVER_SELECTED=3;DvtMarker.DEFAULT_UNDERLAY_TYPE=DvtMarker.SQUARE;
DvtMarker.DEFAULT_UNDERLAY_COLOR="#8f808080";DvtMarker.SELECTION_STROKE_COLOR="#000000";DvtMarker.SELECTION_STROKE_ALPHA=1;DvtMarker.prototype.getSize=function(){return this._size};DvtMarker.prototype.getType=function(){return this._impl.getType()};DvtMarker.prototype.getInitType=function(){return this._initType};
DvtMarker.prototype.Init=function(a,b,c,d,e,f,g,h,k,m,n){this._skin=c;this._xx=d;this._yy=e;this._ww=f;this._hh=g;this._sx=k?k:1;this._sy=m?m:1;this._maintainAspect=n;this._initType=b;this._bAnimatedOnDisplay=!1;var p,q;b instanceof Array?(this._setMarkerImageStates(b),b=DvtMarker.IMAGE):DvtMarker.isBuiltInShape(b)?b=DvtMarker.convertShapeString(b):(q=DvtMarkerUtils.getCustomMarkerInfo(a,b))?(p=q instanceof DvtPath?"path":"g",f&&g||(b=DvtDisplayableUtils._getDimForced(a,q),f=f?f:b.w,g=g?g:b.h,this._ww=
f,this._hh=g),b=DvtMarker.CUSTOM):b=DvtMarker.SQUARE;this.getImpl()||this.setImpl(a.getImplFactory().newMarker(b,h,p));DvtMarker.superclass.Init.call(this,a);b===DvtMarker.HUMAN&&(q=DvtMarkerUtils.getBuiltinMarkerInfo(a,"human",this.getSkin()));a=this.getScaledWidth();f=this.getScaledHeight();this._size=Math.max(a,f);this.getImpl().setBounds(d,e,a,f,q);this._bSelecting=!1;this._selectionEffects=null;this._underlayColor=this._dataColor="#000000";this._savedFill=this._savedStroke=null;this._bSavedFill=
this._bSavedStroke=!1;this._selectionType=DvtSelectionEffectUtils.DEFAULT_SEL_TYPE;this._selStrokeAlpha=this._selStrokeColor=this._selStrokeWidth=null};DvtMarker.prototype.getSkin=function(){return this._skin};DvtMarker.prototype.getX=function(){return this._xx};DvtMarker.prototype.getY=function(){return this._yy};DvtMarker.prototype.getWidth=function(){return this._ww};DvtMarker.prototype.getHeight=function(){return this._hh};DvtMarker.prototype.getSx=function(){return this._sx};
DvtMarker.prototype.getSy=function(){return this._sy};DvtMarker.prototype.getMaintainAspect=function(){return 1==this._maintainAspect};DvtMarker.prototype.getScaledWidth=function(){return this._sx?this._ww*this._sx:this._ww};DvtMarker.prototype.getScaledHeight=function(){return this._sy?this._hh*this._sy:this._hh};
DvtMarker.convertShapeString=function(a){return a==DvtMarker.CIRCLE||"c"==a?DvtMarker.CIRCLE:a==DvtMarker.SQUARE||"s"==a?DvtMarker.SQUARE:a==DvtMarker.DIAMOND||"d"==a?DvtMarker.DIAMOND:a==DvtMarker.TRIANGLE_UP||"tu"==a||"t"==a?DvtMarker.TRIANGLE_UP:a==DvtMarker.TRIANGLE_DOWN||"td"==a?DvtMarker.TRIANGLE_DOWN:a==DvtMarker.PLUS||"p"==a?DvtMarker.PLUS:a==DvtMarker.HUMAN||"h"==a?DvtMarker.HUMAN:a==DvtMarker.ROUNDED_RECTANGLE||"rr"==a?DvtMarker.ROUNDED_RECTANGLE:DvtMarker.NONE};
DvtMarker.prototype.setSelectionType=function(a){this._selectionType=a};DvtMarker.prototype.getSelectionType=function(a){return this._selectionType};DvtMarker.prototype.ApplySelectionState=function(){switch(this._selectionType){case DvtSelectionEffectUtils.SEL_TYPE_STROKE_NO_FILTERS:this.ApplySelectingSelectedStroke(!0,!0,!0);break;default:this.ApplySelectionFilters()}};
DvtMarker.prototype.ApplySelectionFilters=function(){this._selectionEffects||this.UpdateSelectionEffects();if(this.isSelected()){if(this._selectionEffects)for(var a=0;a<this._selectionEffects.length;a++){var b=this._selectionEffects[a];b instanceof DvtShadow||DvtSelectionEffectUtils.applyDrawEffect(this,b)}}else this.ClearSelectionEffects()};DvtMarker.prototype.ClearSelectionEffects=function(){if(this._selectionEffects)for(var a=0;a<this._selectionEffects.length;a++)this.removeDrawEffect(this._selectionEffects[a])};
DvtMarker.prototype.UpdateSelectionEffects=function(){var a="#000000",a=this._impl.getUnderlay()?this._underlayColor:this._dataColor;this._selectionEffects=DvtSelectionEffectUtils.createMarkerSelectionEffects(this.getCtx(),a,this._innerColor,this._outerColor)};DvtMarker.prototype.ApplySelectingState=function(){switch(this._selectionType){case DvtSelectionEffectUtils.SEL_TYPE_STROKE_NO_FILTERS:this.ApplySelectingSelectedStroke(!0,!0,!0);break;default:this.ApplySelectingStroke()}};
DvtMarker.prototype.ApplySelectingStroke=function(a){this.ApplySelectingSelectedStroke(a,!0)};
DvtMarker.prototype.ApplySelectingSelectedStroke=function(a,b,c){var d;d=b&&this._bSelecting;var e=c&&this.isSelected(),f=this._selectionType===DvtSelectionEffectUtils.SEL_TYPE_STROKE_NO_FILTERS;if(f){var g;e?this._bSavedFill||(g=new DvtSolidFill("#ffffff",1),this._savedFill=this.getFill(),this._bSavedFill=!0,this.setFill(g)):this._bSavedFill&&(g=this._savedFill,this._savedFill=null,this._bSavedFill=!1,this.setFill(g))}d||e?(this._bSavedStroke||(d=DvtSelectionEffectUtils.createSelectingStroke(this._dataColor),
d instanceof DvtSolidStroke&&(this._selStrokeColor=d.getColor(),this._selStrokeAlpha=d.getAlpha(),e&&(f?d.setColor(this._dataColor):(d.setColor(DvtMarker.SELECTION_STROKE_COLOR),d.setAlpha(DvtMarker.SELECTION_STROKE_ALPHA)))),this._selStrokeWidth=e=d.getWidth(),d.setWidth(e),this._savedStroke=this.getStroke(),this._bSavedStroke=!0,this.setStroke(d)),b&&c&&(this.isSelected()&&this.getStroke()instanceof DvtSolidStroke?(d=this.getStroke().clone(),f?d.getColor()!==this._dataColor&&(d.setColor(this._dataColor),
this.setStroke(d)):d.getColor()!==DvtMarker.SELECTION_STROKE_COLOR&&(d.setColor(DvtMarker.SELECTION_STROKE_COLOR),d.setAlpha(DvtMarker.SELECTION_STROKE_ALPHA),this.setStroke(d))):this._bSelecting&&this.getStroke()instanceof DvtSolidStroke&&(d=this.getStroke().clone(),d.getColor()!==this._selStrokeColor&&(d.setColor(this._selStrokeColor),d.setAlpha(this._selStrokeAlpha),this.setStroke(d)))),this._impl.getUnderlay()&&(c=DvtSelectionEffectUtils.createSelectingStroke(this._underlayColor),f=c.getWidth(),
this.getType()===DvtMarker.HUMAN&&(f*=this.getImpl().getDefaultScale()),c.setWidth(f),this._impl.getUnderlay().setStroke(c)),a&&b&&(this._bSelecting?this._selectingAnimator||this.StartAnimatingStroke():(this.StopSelectingAnimator(),this.SetStrokeWidth(this._selStrokeWidth)))):(a&&this.StopSelectingAnimator(),d=this._savedStroke,this._savedStroke=null,this._bSavedStroke=!1,this.setStroke(d),this._impl.getUnderlay()&&this._impl.getUnderlay().setStroke(null))};
DvtMarker.prototype.StartAnimatingStroke=function(){if(this._bSelecting&&this.getStroke()){var a=new DvtCustomAnimation(this.getCtx(),null,1);a.getAnimator().addProp(DvtAnimator.TYPE_NUMBER,this,this.GetStrokeWidth,this.SetStrokeWidth,3*this.getStroke().getWidth());var b=new DvtCustomAnimation(this.getCtx(),null,1);b.getAnimator().addProp(DvtAnimator.TYPE_NUMBER,this,this.GetStrokeWidth,this.SetStrokeWidth,this.getStroke().getWidth());a=new DvtSequentialPlayable(this.getCtx(),a,b);a.setOnEnd(this.StartAnimatingStroke,
this);this._selectingAnimator=a;a.play()}};DvtMarker.prototype.StopSelectingAnimator=function(){this._selectingAnimator&&(this._selectingAnimator.stop(),this._selectingAnimator=null)};DvtMarker.prototype.SetStrokeWidth=function(a){var b=this.getStroke();b&&(b=b.clone(),b.setWidth(a),this.setStroke(b))};DvtMarker.prototype.GetStrokeWidth=function(){var a=this.getStroke();return a?a.getWidth():0};
DvtMarker.prototype.showHoverEffect=function(){this.getType()===DvtMarker.IMAGE?(this.IsShowingHoverEffect=!0,this.isSelected()?this.getImpl().setSource(this.GetMarkerImage(DvtMarker.IMAGE_SOURCE_HOVER_SELECTED)):this.getImpl().setSource(this.GetMarkerImage(DvtMarker.IMAGE_SOURCE_HOVER))):this.getSkin()==DvtCSSStyle.SKIN_ALTA?DvtMarker.superclass.showHoverEffect.call(this):this.SetSelectionMouseOver(!0)};
DvtMarker.prototype.hideHoverEffect=function(){this.getType()===DvtMarker.IMAGE?(this.IsShowingHoverEffect=!1,this.isSelected()?this.getImpl().setSource(this.GetMarkerImage(DvtMarker.IMAGE_SOURCE_SELECTED)):this.getImpl().setSource(this.GetMarkerImage(DvtMarker.IMAGE_SOURCE))):this.getSkin()==DvtCSSStyle.SKIN_ALTA?DvtMarker.superclass.hideHoverEffect.call(this):this.SetSelectionMouseOver(!1)};
DvtMarker.prototype.isHoverEffectShown=function(){return this.getSkin()==DvtCSSStyle.SKIN_ALTA?DvtMarker.superclass.isHoverEffectShown.call(this):this._bSelecting};DvtMarker.prototype.SetSelectionMouseOver=function(a){this._bSelecting!=a&&(this._bSelecting=a,this.ApplySelectingState())};
DvtMarker.prototype.setSelected=function(a){this.IsSelected!=a&&(this.getType()===DvtMarker.IMAGE?(this.IsSelected=a)?this.isHoverEffectShown()?this.getImpl().setSource(this.GetMarkerImage(DvtMarker.IMAGE_SOURCE_HOVER_SELECTED)):this.getImpl().setSource(this.GetMarkerImage(DvtMarker.IMAGE_SOURCE_SELECTED)):this.getImpl().setSource(this.GetMarkerImage(DvtMarker.IMAGE_SOURCE)):this.getSkin()==DvtCSSStyle.SKIN_ALTA?DvtMarker.superclass.setSelected.call(this,a):(this.IsSelected=a,this.ApplySelectionState()))};
DvtMarker.prototype.setDataColor=function(a,b,c){this._dataColor=a;this.getSkin()==DvtCSSStyle.SKIN_ALTA?(a=DvtColorUtils.adjustHSL(a,0,0,.15),b=new DvtSolidStroke("#FFFFFF",1,1.5),this.setHoverStroke(new DvtSolidStroke(a,1,2)),this.setSelectedStroke(b,new DvtSolidStroke("#5A5A5A",1,4.5)),this.setSelectedHoverStroke(b,new DvtSolidStroke(a,1,4.5)),this.HoverInnerStroke.setFixedWidth(!0),this.SelectedInnerStroke.setFixedWidth(!0),this.SelectedOuterStroke.setFixedWidth(!0),this.SelectedHoverInnerStroke.setFixedWidth(!0),
this.SelectedHoverOuterStroke.setFixedWidth(!0)):(this._innerColor=b,this._outerColor=c)};DvtMarker.prototype.getDataColor=function(){return this._dataColor};DvtMarker.prototype.setUnderlay=function(a,b,c){this._impl.setUnderlay(a,b,c);this._underlayColor=b};DvtMarker.prototype.getUnderlay=function(){return this._impl.getUnderlay()};DvtMarker.prototype.setUnderlayVisible=function(a){var b=this._impl.getUnderlay();b&&b.setVisible(a)};
DvtMarker.prototype.setHollow=function(a){var b=this.getScaleX(),c=this.getScaleY(),b=Math.min(b,c),c=this.GetStrokeWidth();this._impl.setHollow(a,(c?c:1)/b)};DvtMarker.prototype.setText=function(a){this._markerText=a};DvtMarker.prototype.setAlpha=function(a){DvtMarker.superclass.setAlpha.call(this,a);this._markerText&&this._markerText.setAlpha(a);this.UpdateSelectionEffect()};DvtMarker.prototype.setVisible=function(a){DvtMarker.superclass.setVisible.call(this,a);this._markerText&&this._markerText.setVisible(a)};
DvtMarker.prototype._setMarkerImageStates=function(a){var b=a[0];this._imageStates=[b];this._imageStates.push(a[1]?a[1]:b);this._imageStates.push(a[2]?a[2]:b);this._imageStates.push(a[3]?a[3]:this._imageStates[1])};DvtMarker.prototype.GetMarkerImage=function(a){return this._imageStates?this._imageStates[a]:null};
DvtMarker.isBuiltInShape=function(a){a=DvtMarker.convertShapeString(a);return a==DvtMarker.CIRCLE||a==DvtMarker.SQUARE||a==DvtMarker.DIAMOND||a==DvtMarker.TRIANGLE_UP||a==DvtMarker.TRIANGLE_DOWN||a==DvtMarker.PLUS||a==DvtMarker.HUMAN||a==DvtMarker.ROUNDED_RECTANGLE?!0:!1};DvtMarker.prototype.copyShape=function(){return new DvtMarker(this.getCtx(),this.getInitType(),this.getSkin(),this.getX(),this.getY(),this.getWidth(),this.getHeight(),null,this.getSx(),this.getSy(),this.getMaintainAspect())};
DvtMarker.prototype.UpdateSelectionEffect=function(){this.getSkin()==DvtCSSStyle.SKIN_ALTA&&DvtMarker.superclass.UpdateSelectionEffect.call(this)};DvtMarker.prototype.getDimensions=function(a){return this.InnerShape&&this.InnerShape.getParent()?this.InnerShape.getDimensions(a):DvtMarker.superclass.getDimensions.call(this,a)};var DvtOval=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};DvtObj.createSubclass(DvtOval,DvtCircle,"DvtOval");DvtOval.prototype.getRx=function(){return this._impl.getRx()};
DvtOval.prototype.setRx=function(a){this._impl.setRx(a);this.UpdateSelectionEffect()};DvtOval.prototype.getRy=function(){return this._impl.getRy()};DvtOval.prototype.setRy=function(a){this._impl.setRy(a);this.UpdateSelectionEffect()};DvtOval.prototype.Init=function(a,b,c,d,e,f){this.getImpl()||this.setImpl(a.getImplFactory().newOval(b,c,d,e,f));DvtOval.superclass.Init.call(this,a)};DvtOval.prototype.setRadius=function(a,b){this.setRx(a);this.setRy(b)};
DvtOval.prototype.copyShape=function(){return new DvtOval(this.getCtx(),this.getCx(),this.getCy(),this.getRx(),this.getRy())};var DvtPath=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtPath,DvtShape,"DvtPath");DvtPath.prototype.getCmds=function(){this._sCmds||(this._sCmds=this._impl.getCmds());return this._sCmds};DvtPath.prototype.setCmds=function(a){this._impl.setCmds(a);this._sCmds=a;this._aCmds=null;this.UpdateSelectionEffect()};
DvtPath.prototype.getCommands=function(){return this._aCmds?this._aCmds:this._aCmds=(this._sCmds=this.getCmds())?DvtPathUtils.createPathArray(this._sCmds):null};DvtPath.prototype.setCommands=function(a){var b=a?DvtPathUtils.getPathString(a):null;this.setCmds(b);this._aCmds=a;this._sCmds=b;this.UpdateSelectionEffect()};DvtPath.prototype.Init=function(a,b,c){this.getImpl()||this.setImpl(a.getImplFactory().newPath(b,c));DvtPath.superclass.Init.call(this,a)};
DvtPath.prototype.copyShape=function(){return new DvtPath(this.getCtx(),this.getCmds())};var DvtPolygon=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtPolygon,DvtShape,"DvtPolygon");DvtPolygon.prototype.getPoints=function(){return this._impl.getPoints()};DvtPolygon.prototype.setPoints=function(a){this._impl.setPoints(a);this.UpdateSelectionEffect()};
DvtPolygon.prototype.Init=function(a,b,c){this.getImpl()||this.setImpl(a.getImplFactory().newPolygon(b,c));DvtPolygon.superclass.Init.call(this,a)};DvtPolygon.prototype.copyShape=function(){return new DvtPolygon(this.getCtx(),this.getPoints())};var DvtPolyline=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtPolyline,DvtShape,"DvtPolyline");DvtPolyline.prototype.getPoints=function(){return this._impl.getPoints()};
DvtPolyline.prototype.setPoints=function(a){DvtAgent.isPlatformGecko()&&(a[a.length-1]+=.1);this._impl.setPoints(a);this.UpdateSelectionEffect()};DvtPolyline.prototype.Init=function(a,b,c){this.getImpl()||this.setImpl(a.getImplFactory().newPolyline(b,c));DvtPolyline.superclass.Init.call(this,a)};DvtPolyline.prototype.copyShape=function(){return new DvtPolyline(this.getCtx(),this.getPoints())};var DvtRect=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};DvtObj.createSubclass(DvtRect,DvtShape,"DvtRect");
DvtRect.prototype.getX=function(){return this._impl.getX()};DvtRect.prototype.setX=function(a){this._impl.setX(a);this.UpdateSelectionEffect()};DvtRect.prototype.getY=function(a){return this._impl.getY()};DvtRect.prototype.setY=function(a){this._impl.setY(a);this.UpdateSelectionEffect()};DvtRect.prototype.getWidth=function(){return this._impl.getWidth()};DvtRect.prototype.setWidth=function(a){this._impl.setWidth(a);this.UpdateSelectionEffect()};DvtRect.prototype.getHeight=function(){return this._impl.getHeight()};
DvtRect.prototype.setHeight=function(a){this._impl.setHeight(a);this.UpdateSelectionEffect()};DvtRect.prototype.getRx=function(){return this._impl.getRx()};DvtRect.prototype.setRx=function(a){this._impl.setRx(a);this.UpdateSelectionEffect()};DvtRect.prototype.getRy=function(){return this._impl.getRy()};DvtRect.prototype.setRy=function(a){this._impl.setRy(a);this.UpdateSelectionEffect()};
DvtRect.prototype.Init=function(a,b,c,d,e,f){this.getImpl()||this.setImpl(a.getImplFactory().newRect(b,c,d,e,f));DvtRect.superclass.Init.call(this,a)};DvtRect.prototype.setPos=function(a,b){this.setX(a);this.setY(b)};DvtRect.prototype.setCornerRadius=function(a,b){this.setRx(a);this.setRy(b)};DvtRect.prototype.setRect=function(a,b,c,d){a instanceof DvtRectangle?(this.setPos(a.x,a.y),this.setWidth(a.w),this.setHeight(a.h)):(this.setPos(a,b),this.setWidth(c),this.setHeight(d));this.UpdateSelectionEffect()};
DvtRect.prototype.copyShape=function(){var a=new DvtRect(this.getCtx(),this.getX(),this.getY(),this.getWidth(),this.getHeight());a.setRx(this.getRx());a.setRy(this.getRy());return a};var DvtText=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtText,DvtShape,"DvtText");DvtText.ELLIPSIS="...";DvtText._BULK_TRUNCATION=!0;DvtText._TRUNCATION_DONE=0;DvtText._TRUNCATION_GUESS_TOO_SHORT=1;DvtText._TRUNCATION_GUESS_TOO_LONG=2;DvtText.H_ALIGN_START="start";DvtText.H_ALIGN_CENTER="center";
DvtText.H_ALIGN_END="end";DvtText.H_ALIGN_DEFAULT=DvtText.H_ALIGN_START;DvtText.V_ALIGN_TOP="top";DvtText.V_ALIGN_MIDDLE="middle";DvtText.V_ALIGN_BOTTOM="bottom";DvtText.V_ALIGN_BASELINE="baseline";DvtText.V_ALIGN_DEFAULT=DvtText.V_ALIGN_TOP;
DvtText.prototype.Init=function(a,b,c,d,e){this.getImpl()||this.setImpl(a.getImplFactory().newText(b,c,d,e));DvtText.superclass.Init.call(this,a);this._Ctx=a;this._maxw=-1;this._minChars=null;this._inProcess=this._bTruncated=this._bHtmlText=!1;this._horizAlign=DvtText.H_ALIGN_DEFAULT;this._vertAlign=DvtText.V_ALIGN_DEFAULT;DvtText.H_ALIGN_DEFAULT!=DvtText.H_ALIGN_START&&this.setHorizAlignment(DvtText.H_ALIGN_DEFAULT);DvtText.V_ALIGN_DEFAULT!=DvtText.V_ALIGN_BASELINE&&this.setVertAlignment(DvtText.V_ALIGN_DEFAULT);
this._defTrunc=!1;this._setCachedDims(void 0);this._bHollow=!1;this._cloneCSSStyle=null};DvtText.prototype.getTextString=function(){return String(this._impl.getTextString())};DvtText.prototype.doNotUseSetAngle=function(a){this._impl.doNotUseSetAngle(a)};DvtText.prototype.getEditMode=function(){return this._impl.getEditMode()};DvtText.prototype.setEditMode=function(a,b,c){this._impl.setEditMode(a,b,c)};DvtText.prototype.setEditWidth=function(a){this._impl.setEditWidth(a)};
DvtText.prototype.setEditTooltip=function(a){this._impl.setEditTooltip(a)};DvtText.prototype.getEditBorder=function(a){return this._impl.getEditBorder()};DvtText.prototype.setEditBorder=function(a){this._impl.setEditBorder(a)};DvtText.prototype.selectEditText=function(){this._impl.selectEditText&&this._impl.selectEditText()};DvtText.prototype.focusEditText=function(){this._impl.focusEditText&&this._impl.focusEditText()};
DvtText.prototype.doNotUseSetRotatePoint=function(a,b){this._impl.doNotUseSetRotatePoint(a,b)};DvtText.prototype.setTextString=function(a){this._text=a;this._impl.setTextString(a);this._setCachedDims(void 0)};DvtText.prototype.getX=function(){return this._impl.getX()};DvtText.prototype.setX=function(a){this._impl.setX(a)};DvtText.prototype.getY=function(){return this._impl.getY()};DvtText.prototype.setY=function(a){this._impl.setY(a)};
DvtText.prototype.setFontSize=function(a){this._impl.setFontSize(a);this._setCachedDims(void 0);var b=this.getCSSStyle();b?(this._cloneCSSStyle=b.clone(),this._cloneCSSStyle.setFontSize(DvtCSSStyle.FONT_SIZE,a.toString())):(this.setCSSStyle(new DvtCSSStyle),this.getCSSStyle().setFontSize(DvtCSSStyle.FONT_SIZE,a.toString()))};DvtText.prototype.alignStart=function(){this._impl.alignStart();this._horizAlign=DvtText.H_ALIGN_START};
DvtText.prototype.alignCenter=function(){this._impl.alignCenter();this._horizAlign=DvtText.H_ALIGN_CENTER};DvtText.prototype.alignEnd=function(){this._impl.alignEnd();this._horizAlign=DvtText.H_ALIGN_END};DvtText.prototype.alignTop=function(){this._vertAlign=DvtText.V_ALIGN_TOP;this._impl.alignTop()};DvtText.prototype.alignMiddle=function(){this._vertAlign=DvtText.V_ALIGN_MIDDLE;this._impl.alignMiddle()};DvtText.prototype.alignBottom=function(){this._vertAlign=DvtText.V_ALIGN_BOTTOM;this._impl.alignBottom()};
DvtText.prototype.alignBaseline=function(){this._vertAlign=DvtText.V_ALIGN_BASELINE;this._impl.alignBaseline()};DvtText.prototype.getHorizAlignment=function(){return this._horizAlign};DvtText.prototype.getVertAlignment=function(){return this._vertAlign};DvtText.prototype.setHorizAlignment=function(a){a==DvtText.H_ALIGN_START?this.alignStart():a==DvtText.H_ALIGN_CENTER?this.alignCenter():a==DvtText.H_ALIGN_END&&this.alignEnd()};
DvtText.prototype.setVertAlignment=function(a){a==DvtText.V_ALIGN_TOP?this.alignTop():a==DvtText.V_ALIGN_MIDDLE?this.alignMiddle():a==DvtText.V_ALIGN_BOTTOM?this.alignBottom():a==DvtText.V_ALIGN_BASELINE&&this.alignBaseline()};
DvtText.prototype.truncateToCallback=function(a,b,c,d){a.addChild(this);var e=this.GetFontStyles(),f=this.getTextString(),g=this._measureText(f,e);if(b(g,c))return this;if(isNaN(d)||null==d)d=1;for(var h=Math.max(f.length-1,d),k=f.substring(0,h)+DvtText.ELLIPSIS,g=this._measureText(k,e);!b(g,c);){if(h<=d){k="";g.w=0;break}--h;k=f.substring(0,h)+DvtText.ELLIPSIS;g=this._measureText(k,e)}this.setTextString(k);return""==k?(a.removeChild(this),null):this};
DvtText.prototype.setMaxWidth=function(a,b){this._maxw=a;this._minChars=b;0<a&&this._ProcessText()};DvtText.prototype.getText=function(){return this.getEditMode()&&this._impl.getText?this._impl.getText():this._text};DvtText.prototype._setTextWithSize=function(a,b){this._impl.setText(a,b)};DvtText.prototype.setTruncateAt=function(a){this._truncateAt=a;this.DoSetText(this.getText())};DvtText.prototype.getTruncateAt=function(){return this._truncateAt};
DvtText.prototype.DoSetText=function(a){a=this.DoTruncateAt(a,this.getTruncateAt());this._setCachedDims(void 0);this._setText(a);a&&this._ProcessText()};DvtText.prototype.DoTruncateAt=function(a,b){this._bTruncated=!1;b&&a&&a.length>b&&(a=a.substr(0,Math.max(b-3,0))+"...",this._bTruncated=!0);return a};DvtText.prototype.isTruncated=function(){return this._bTruncated};DvtText.prototype.isTruncationEnabled=function(){return 0<this._maxw&&!this._bHtmlText};
DvtText.prototype.setText=function(a){this._text=a;this.DoSetText(a)};DvtText.prototype._setText=function(a){this._impl.setText(a)};DvtText.prototype._getText=function(){return this._impl.getText()};DvtText.prototype.setCSSStyle=function(a){this._cloneCSSStyle&&(this._cloneCSSStyle=null);this._setCachedDims(void 0);DvtText.superclass.setCSSStyle.call(this,a);null!==this._text&&"undefined"!==typeof this._text?this.setText(this.getText()):this._ProcessText()};
DvtText.prototype.getOptimalFontSize=function(a){var b=a.h;a=a.w;for(var c=this.getTextString(),c=Math.max(Math.min(a/c.length,b/2),9);50>c;c+=1){this.setFontSize(c);var d=this.measureDimensions();if(d.w>a||d.h>b)return c-1}return 50};DvtText.prototype.GetFontStyles=function(){return this.getImpl().getFontStyles()};DvtText.prototype._ProcessText=function(){this.isTruncationEnabled()&&!this._inProcess&&(this._inProcess=!0,this._TruncateText(),this._inProcess=!1)};
DvtText.prototype._TruncateText=function(){if(this.isTruncationEnabled()){var a=this._maxw,b=this._minChars,c=!1;if(isNaN(b)||null==b)b=0,c=!0;this._bTruncated=!1;var d;d=c?this.getCachedDims():this.measureDimensions();d.w>a&&(this._bTruncated=!0,this._defTrunc||(d=this._truncateLine(a,b,d),c&&this._setCachedDims(d)))}};DvtText.prototype._GetTempTextField=function(){if(void 0===this._ttf){var a=new DvtText(this._Ctx,null,0,0,this.getId()+"__tmp");this.getCtx().getStage().addChild(a);this._ttf=a}return this._ttf};
DvtText.prototype._RemoveTempTextField=function(){this._ttf&&(this.getCtx().getStage().removeChild(this._ttf),this._ttf=void 0)};DvtText.prototype.getCachedDims=function(){var a=this._dim;a||(a=this.GetDimsForCaching(),this._setCachedDims(a));return a};DvtText.prototype.GetDimsForCaching=function(){return DvtText.superclass.getDimensions.call(this)};DvtText.prototype._setCachedDims=function(a){DvtDisplayableUtils._setDimForced(this,a)};
DvtText.prototype.truncateText=function(a){this.setTruncationDeferred(a);a||this._ProcessText()};DvtText.prototype.setTruncationDeferred=function(a){this._defTrunc=a};DvtText.prototype.isTruncationDeferred=function(){return this._defTrunc};DvtText.truncateTexts=function(a){if(DvtText._BULK_TRUNCATION)DvtText._bulkTruncation(a);else for(var b=a.length,c=0;c<b;c++){var d=a[c].isTruncationDeferred();a[c].setTruncationDeferred(!1);try{a[c]._ProcessText()}finally{a[c].setTruncationDeferred(d)}}};
DvtText.prototype.getDimensions=function(a){if(this.isTruncated()&&this._defTrunc&&!this._dim){var b=this.getImpl().getDimensions();b.w=this._maxw;return a&&a!==this?this.ConvertCoordSpaceRect(b,a):b}return DvtText.superclass.getDimensions.call(this)};DvtText.prototype.getCSSStyle=function(){return this._cloneCSSStyle?this._cloneCSSStyle:DvtText.superclass.getCSSStyle.call(this)};
DvtText.prototype.measureDimensions=function(a,b){var c;c=this.getCtx();if(c.supportsMeasureText())return c=c.measureText(this.getTextString(),this.GetFontStyles(),this._horizAlign,this._vertAlign),c=new DvtRectangle(c.x+this.getX(),c.y+this.getY(),c.w,c.h),this.isTruncated()&&this._defTrunc&&!this._dim&&(c.w=this._maxw),b&&b!==this?this.ConvertCoordSpaceRect(c,b):c;if(!a)return this.getDimensions(b);a.addChild(this);c=this.getDimensions(b);a.removeChild(this);return c};
DvtText.prototype._measureText=function(a,b){var c=this.getCtx();if(c.supportsMeasureText())return c=c.measureText(a,b,this._horizAlign,this._vertAlign),new DvtRectangle(c.x+this.getX(),c.y+this.getY(),c.w,c.h);this.setTextString(a);return this.getDimensions()};
DvtText.prototype._truncateLine=function(a,b,c){var d=this.getTextString(),e=Math.max(Math.floor(a/(c.w/d.length))-3,b),f=this.GetFontStyles(),g=d.substring(0,e)+DvtText.ELLIPSIS;for(c=this._measureText(g,f);c.w<a&&!(e>=d.length);)e+=1,g=d.substring(0,e)+DvtText.ELLIPSIS,c=this._measureText(g,f);for(;c.w>a;){if(e<=b){g="";c.w=0;break}--e;g=d.substring(0,e)+DvtText.ELLIPSIS;c=this._measureText(g,f)}this.setTextString(g);return c};
DvtText._bulkSetDimensions=function(a){for(var b,c=0;c<a.length;c++)b=a[c],b._setCachedDims(b.GetDimsForCaching())};DvtText.prototype._initTruncation=function(){var a=this.getCachedDims(),b=this._minChars;if(isNaN(b)||null==b)b=0;var c=this._maxw,d=this.getTextString(),a=Math.max(Math.floor(c/(a.w/d.length))-3,b);this.setTextString(d.substring(0,a)+DvtText.ELLIPSIS);this._maxNumChars=a;this._setCachedDims(void 0);this._originalText=d;this._minChars2=b;this._state=DvtText._TRUNCATION_GUESS_TOO_SHORT};
DvtText.prototype._doTruncation=function(){var a=this._state,b=this._originalText,c=this.getCachedDims(),d=this._maxNumChars,e=this._maxw;a==DvtText._TRUNCATION_GUESS_TOO_SHORT&&(c.w<e?d>=b.length?a=DvtText._TRUNCATION_GUESS_TOO_LONG:(d+=1,this.setTextString(b.substring(0,d)+DvtText.ELLIPSIS),this._maxNumChars=d,this._setCachedDims(void 0)):a=DvtText._TRUNCATION_GUESS_TOO_LONG);a==DvtText._TRUNCATION_GUESS_TOO_LONG&&(c.w>e?d<=this._minChars2?(this.setTextString(""),c.w=0,a=DvtText._TRUNCATION_DONE):
(--d,this.setTextString(b.substring(0,d)+DvtText.ELLIPSIS),0==d?(c.w=0,a=DvtText._TRUNCATION_DONE):(this._maxNumChars=d,this._setCachedDims(void 0))):a=DvtText._TRUNCATION_DONE);if(a==DvtText._TRUNCATION_DONE)return this._state=this._minChars2=this._originalText=this._maxNumChars=void 0,!0;this._state=a;return!1};
DvtText._bulkTruncation=function(a){for(var b,c=[],d,e=0;e<a.length;e++)b=a[e],b._bTruncated=!1,d=b.getCachedDims(),d.w>b._maxw&&(b._bTruncated=!0,b._initTruncation(),c.push(b));a=c;DvtText._bulkSetDimensions(a);d=!1;for(c=[];!d;){for(e=0;e<a.length;e++)b=a[e],b._doTruncation()||c.push(b);0<c.length?(a=c,DvtText._bulkSetDimensions(a),c=[]):d=!0}};DvtText.prototype.copyShape=function(){return new DvtText(this.getCtx(),this.getText(),this.getX(),this.getY())};
DvtText.prototype.destroy=function(){DvtText.superclass.destroy.call(this);this._impl.destroy&&this._impl.destroy()};var DvtTextArea=function(a,b,c,d){this.Init(a,b,c,d)};DvtObj.createSubclass(DvtTextArea,DvtText,"DvtTextArea");DvtTextArea.NEW_LINE="\n";DvtTextArea.TRIM_TRAILING_REGEXP=/\s+$/;
DvtTextArea.prototype.Init=function(a,b,c,d){this.getImpl()||this.setImpl(a.getImplFactory().newTextArea(b,c,d));DvtTextArea.superclass.Init.call(this,a);this._bWordWrap=!0;this._maxHeight=this._maxLines=-1;this._numLines=1;this._bTruncated=!1};DvtTextArea.prototype.getNumLines=function(){return this.isWrappingEnabled()?this._numLines:1};DvtTextArea.prototype.getLeading=function(){return this._impl.getLeading()};DvtTextArea.prototype.setLeading=function(a){this._impl.setLeading(a)};
DvtTextArea.prototype.getMaxLines=function(){return this._maxLines};DvtTextArea.prototype.setMaxLines=function(a){this._maxLines=a};DvtTextArea.prototype.setMaxHeight=function(a){this._maxHeight=a};DvtTextArea.prototype.DoSetText=function(a){a=this.DoTruncateAt(a,this.getTruncateAt());var b;if(a=a?a:"")this._setText(a),b=a.split(DvtTextArea.NEW_LINE);this._lines=b;this._ProcessText()};DvtTextArea.prototype.setWordWrap=function(a){this._bWordWrap=a};DvtTextArea.prototype.isWordWrap=function(){return this._bWordWrap};
DvtTextArea.prototype.isWrappingEnabled=function(){return this.isWordWrap()&&0<this._maxw&&!this._bHtmlText&&this._lines};DvtTextArea.prototype._ProcessText=function(){this._inProcess||(this._inProcess=!0,this.isWrappingEnabled()?this._wrapText():this.isTruncationEnabled()&&this._TruncateText(),this._inProcess=!1)};
DvtTextArea.prototype._wrapText=function(){var a=this._maxw,b=DvtArrayUtils.copy(this._lines),c=b.length,d=this._GetTempTextField();d.setCSSStyle(this.getCSSStyle());for(var e=[],f,g,h=0,k=0,m,n=!1,p=!1,q=[],r=0,t=0;t<c;t++){d._setText(b[t]);g=d.getDimensions();g.w>a&&(m=d._getText(),f=DvtTextArea._wrapLine(a,d))&&(m==f?(n=!0,f=DvtTextArea._breakWords(m),1<f.length&&(f=m.substring(f[1].index),b.splice(t+1,0,f),c++)):(b.splice(t+1,0,f),c++));if((g=-1<this._maxHeight&&t<c-1&&r+2*g.h>this._maxHeight+
DvtMath.TOLERANCE)||-1!=this._maxLines&&t==this._maxLines-1||n){if(g||this._maxLines<c||n)g=d._getText(),g=g.replace(DvtTextArea.TRIM_TRAILING_REGEXP,""),d.setMaxWidth(0),d.setText(g+DvtText.ELLIPSIS),d.setMaxWidth(a,this._minChars),this._bTruncated=!0;n?n=!1:p=!0}g=d.getDimensions();g.w>this._maxw&&(d._TruncateText(),g=d.getDimensions());e.push(d._getText());q.push(new DvtRectangle(g.x,g.y,g.w,g.h));h=Math.max(g.h,h);k=Math.max(g.w,k);r+=g.h;if(p)break}this._maxh=h;this._maxw=k;this._RemoveTempTextField();
this._setTextWithSize(e,0===q.length?void 0:q);this._numLines=e.length};DvtTextArea._wrapLine=function(a,b){var c=b._getText(),d,e=DvtTextArea._breakWords(c);if(1<e.length){var f;for(f=0;f<e.length-1&&!(d=f<e.length?c.substring(0,e[f+1].index):c.substring(0,e[f].length),b._setText(d),d=b.getDimensions().w,d>a);f++);0<f&&(d=c.substring(0,e[f].index),d=d.replace(DvtTextArea.TRIM_TRAILING_REGEXP,""),b._setText(d));c=c.substring(e[f].index)}return c};
DvtTextArea._breakWords=function(a){void 0===DvtTextArea._word_regexp&&(DvtTextArea._word_regexp=/\S+/g);for(var b=[],c;null!==(c=DvtTextArea._word_regexp.exec(a));)b.push({index:c.index,length:c[0].length});return b};DvtTextArea.prototype._getMaxTextHeight=function(){return this._maxh};DvtTextArea.prototype._getMaxTextWidth=function(){return this._maxw};DvtTextArea.prototype.isTruncated=function(){return this._bTruncated||DvtTextArea.superclass.isTruncated.call(this)};
DvtTextArea.prototype.copyShape=function(){var a=new DvtTextArea(this.getCtx(),this.getX(),this.getY());a.setText(this.getText());return a};var DvtTextFormatted=function(a,b,c,d){this.Init(a,b,c,d)};DvtObj.createSubclass(DvtTextFormatted,DvtText,"DvtTextFormatted");DvtTextFormatted.prototype.Init=function(a,b,c,d){this.getImpl()||this.setImpl(a.getImplFactory().newTextFormatted(b,c,d));DvtTextFormatted.superclass.Init.call(this,a);this._bHtmlText=!0};DvtTextFormatted.prototype.getText=function(){return this._impl.getText()};
DvtTextFormatted.prototype.setText=function(a){this._impl.setText(a)};DvtTextFormatted.prototype.GetDimsForCaching=function(){var a=this.getDimensions(),b=this.getX();a.x>b&&(a.w+=a.x-b,a.x=b);return a};DvtTextFormatted.prototype.copyShape=function(){var a=new DvtTextFormatted(this.getCtx(),this.getX(),this.getY());a.setText(this.getText());return a};var DvtStyleUtils=function(){};DvtObj.createSubclass(DvtStyleUtils,DvtObj,"DvtStyleUtils");DvtStyleUtils.DEFAULT_FONT_FAMILY="Tahoma,Verdana,Helvetica,sans-serif";
DvtStyleUtils.DEFAULT_FONT_SIZE="11px";DvtStyleUtils.DEFAULT_FONT_COLOR="black";DvtStyleUtils.getStyle=function(a,b,c){return a&&null!==a[b]&&"undefined"!==typeof a[b]?a[b]:c};DvtStyleUtils.setStyle=function(a,b,c){a&&null!==c&&"undefined"!==typeof c&&(a[b]=c)};
DvtStyleUtils.getShadow=function(a){var b=null;if(null!=a&&"none"!=a){var c,d=b=0,e=0,f=a.replace(/, /g,",").split(" ");null==a.match(/rgb/i)&&(f[f.length]="rgba(0, 0, 0, 0.2)");if(3>f.length)return null;for(i=0;i<f.length;i++)0==i?b=parseInt(f[0]):1==i?d=parseInt(f[1]):2==i&&null==f[i].match(/rgb/i)?e=parseInt(f[i]):f[i].match(/rgb/i)&&(c=f[i]);b=new DvtShadow(c,Math.sqrt(b*b+d*d),e,e,180*Math.atan2(d,b)/Math.PI,1,3,!1,!1,!1)}return b};var DvtCSSGradient=function(a){this.Init(a)};
DvtObj.createSubclass(DvtCSSGradient,DvtObj,"DvtCSSGradient");DvtCSSGradient.LINEAR=0;DvtCSSGradient.RADIAL=1;DvtCSSGradient.prototype.Init=function(a){this._type=a};DvtCSSGradient.prototype.getGradientType=function(){return this._type};DvtCSSGradient.prototype.getAlphas=function(){return this._arAlphas};DvtCSSGradient.prototype.setAlphas=function(a){this._arAlphas=a};DvtCSSGradient.prototype.getColors=function(){return this._arColors};
DvtCSSGradient.prototype.setColors=function(a){this._arColors=a};DvtCSSGradient.prototype.getRatios=function(){return this._arRatios};DvtCSSGradient.prototype.setRatios=function(a){this._arRatios=a};var DvtLinearGradient=function(){this.Init()};DvtObj.createSubclass(DvtLinearGradient,DvtCSSGradient,"DvtLinearGradient");DvtLinearGradient.LEFT=0;DvtLinearGradient.BOTTOM_LEFT=45;DvtLinearGradient.BOTTOM=90;DvtLinearGradient.BOTTOM_RIGHT=135;DvtLinearGradient.RIGHT=180;DvtLinearGradient.TOP_RIGHT=225;
DvtLinearGradient.TOP=270;DvtLinearGradient.TOP_LEFT=315;DvtLinearGradient.prototype.Init=function(){DvtLinearGradient.superclass.Init.call(this,DvtCSSGradient.LINEAR)};DvtLinearGradient.prototype.getAngle=function(){return this._angle};DvtLinearGradient.prototype.setAngle=function(a){this._angle=a};var DvtGradientParser=function(){};DvtObj.createSubclass(DvtGradientParser,DvtObj,"DvtGradientParser");DvtGradientParser.WEBKIT_GD_LINEAR="-webkit-linear-gradient";
DvtGradientParser.FIREFOX_GD_LINEAR="-moz-linear-gradient";DvtGradientParser.IE_GD_LINEAR="progid:DXImageTransform.Microsoft.gradient";DvtGradientParser.IE_GD_LINEAR2="progid:DXImageTransform.Microsoft.Gradient";DvtGradientParser.IE7_GD_FILTER="filter";DvtGradientParser.IE8_GD_FILTER="-ms-filter";DvtGradientParser.IE10_GD_LINEAR="-ms-linear-gradient";DvtGradientParser.IE_GD_START_COLOR_STR="startColorstr";DvtGradientParser.IE_GD_END_COLOR_STR="endColorstr";DvtGradientParser.IE_GD_GRADIENT_TYPE="GradientType";
DvtGradientParser.OLD_WEBKIT_GD_LINEAR="-webkit-gradient";DvtGradientParser.GD_LINEAR="linear-gradient";DvtGradientParser.GD_RADIAL="radial-gradient";DvtGradientParser.GD_TOP="top";DvtGradientParser.GD_BOTTOM="bottom";DvtGradientParser.GD_LEFT="left";DvtGradientParser.GD_RIGHT="right";DvtGradientParser.GD_CENTER="center";DvtGradientParser.GD_TO="to";
DvtGradientParser.parseCSSGradient=function(a){if(null!=a){a=DvtStringUtils.trim(a);if(DvtGradientParser._startsWith(a,DvtGradientParser.WEBKIT_GD_LINEAR))return a=DvtGradientParser._removeParenthesis(a,DvtGradientParser.WEBKIT_GD_LINEAR),DvtGradientParser._parseLinearGradient(a);if(DvtGradientParser._startsWith(a,DvtGradientParser.FIREFOX_GD_LINEAR))return a=DvtGradientParser._removeParenthesis(a,DvtGradientParser.FIREFOX_GD_LINEAR),DvtGradientParser._parseLinearGradient(a);if(DvtGradientParser._startsWith(a,
DvtGradientParser.IE_GD_LINEAR))return a=DvtGradientParser._removeParenthesis(a,DvtGradientParser.IE_GD_LINEAR),DvtGradientParser._parseIELinearGradient(a);if(DvtGradientParser._startsWith(a,DvtGradientParser.IE_GD_LINEAR2))return a=DvtGradientParser._removeParenthesis(a,DvtGradientParser.IE_GD_LINEAR2),DvtGradientParser._parseIELinearGradient(a);if(DvtGradientParser._startsWith(a,DvtGradientParser.IE10_GD_LINEAR))return a=DvtGradientParser._removeParenthesis(a,DvtGradientParser.IE10_GD_LINEAR),DvtGradientParser._parseLinearGradient(a);
if(DvtGradientParser._startsWith(a,DvtGradientParser.GD_LINEAR))return a=DvtGradientParser._removeParenthesis(a,DvtGradientParser.GD_LINEAR),DvtGradientParser._parseLinearGradient(a)}return null};
DvtGradientParser._parseLinearGradient=function(a){var b=/(left|right)/,c=/(top|bottom)/,d=new RegExp("(?:"+/(-?(?:\d*\.)?\d+)/.source+/(deg|rad|grad|turn)/.source+")"),b=a.match(new RegExp("(?:\\s*"+(new RegExp("(?:"+d.source+"|(?:"+/(?:(to)\s+)/.source+"?"+(new RegExp("(?:"+(new RegExp("(?:"+b.source+"(?:\\s+"+c.source+")?)")).source+"|"+(new RegExp("(?:"+c.source+"(?:\\s+"+b.source+")?)")).source+")")).source+"))")).source+"\\s*,\\s*)","i"));if(null==b||0==b.length)return null;var c=new DvtLinearGradient,
d=b[5]==DvtGradientParser.GD_TOP||b[6]==DvtGradientParser.GD_TOP,e=b[5]==DvtGradientParser.GD_BOTTOM||b[6]==DvtGradientParser.GD_BOTTOM,f=b[4]==DvtGradientParser.GD_LEFT||b[7]==DvtGradientParser.GD_LEFT,g=b[4]==DvtGradientParser.GD_RIGHT||b[7]==DvtGradientParser.GD_RIGHT;if(b[3]==DvtGradientParser.GD_TO){if(d||e)d=!d,e=!e;if(f||g)f=!f,g=!g}d?f?c.setAngle(DvtLinearGradient.TOP_LEFT):g?c.setAngle(DvtLinearGradient.TOP_RIGHT):c.setAngle(DvtLinearGradient.TOP):e?f?c.setAngle(DvtLinearGradient.BOTTOM_LEFT):
g?c.setAngle(DvtLinearGradient.BOTTOM_RIGHT):c.setAngle(DvtLinearGradient.BOTTOM):f?c.setAngle(DvtLinearGradient.LEFT):g?c.setAngle(DvtLinearGradient.RIGHT):b[2]&&(d=parseFloat(b[1]),isNaN(d)||("grad"==b[2]?d=d/200*180:"rad"==b[2]?d=d/Math.PI*180:"turn"==b[2]&&(d=d/.5*180),c.setAngle(d)));a=a.substring(b[0].length);DvtGradientParser._parseCSSColorStops(a,c);return c};
DvtGradientParser._parseIELinearGradient=function(a){a=a.split(",");var b=a.length,c,d=[],e=new DvtLinearGradient;e.setAngle(DvtLinearGradient.TOP);for(var f=0;f<b;f++)c=DvtStringUtils.trim(a[f]).split("\x3d"),2==c.length&&(c[0]=DvtStringUtils.trim(c[0]),c[0]==DvtGradientParser.IE_GD_START_COLOR_STR?d[0]=DvtGradientParser.removeQuotes(c[1],DvtCSSStyle.SINGLE_QUOTE):c[0]==DvtGradientParser.IE_GD_END_COLOR_STR?d[1]=DvtGradientParser.removeQuotes(c[1],DvtCSSStyle.SINGLE_QUOTE):c[0]==DvtGradientParser.IE_GD_GRADIENT_TYPE&&
"1"==c[1]&&e.setAngle(DvtLinearGradient.LEFT));DvtGradientParser._parseColorStops(d,e);return e};DvtGradientParser._parseCSSColorStops=function(a,b){var c=a.match(/(#[0-9a-f]+|rgb\(\s*(\d+),\s*(\d+),\s*(\d+)\s*\)|rgba\(\s*(\d+),\s*(\d+),\s*(\d+),\s*(\d?)(\.\d+)?\s*\)|[a-z]+)(\s+\d+%)?/gi);null!=c&&0<c.length&&DvtGradientParser._parseColorStops(c,b)};
DvtGradientParser._parseColorStops=function(a,b){for(var c=a.length,d=[],e=[],f=[],g,h=!0,k,m=[],n=0;n<a.length;n++)k=DvtCSSStyle.parseBorderColor(a[n],m),g=m.pop(),e[n]=g,d[n]=DvtColorUtils.getAlpha(g),k=DvtStringUtils.trim(k),0<k.length&&(g=parseFloat(k),!isNaN(g)&&DvtStringUtils.endsWith(k,"%")&&(f[n]=g/100,h=!1));if(1<c&&h)for(h=0;h<c;h++)f[h]=h/(c-1);else h&&(f[0]=0);b.setColors(e);b.setAlphas(d);b.setRatios(f)};
DvtGradientParser._removeParenthesis=function(a,b){if(")"!=a.charAt(a.length-1))return null;a=a.substring(b.length);return DvtGradientParser.removeQuotes(a,"(",")")};DvtGradientParser.removeQuotes=function(a,b,c){a=DvtStringUtils.trim(a);if(a.charAt(0)!=b)return a;null==c&&(c=b);b=a.lastIndexOf(c);return 0>b?a.substring(1):a.substring(1,b)};DvtGradientParser._startsWith=function(a,b){return 0==a.indexOf(b)};var DvtCSSStyle=function(a){this.Init(a)};DvtObj.createSubclass(DvtCSSStyle,DvtObj,"DvtCSSStyle");
DvtCSSStyle._attrs="background background-color background-image background-repeat background-position border border-top border-bottom border-left border-right border-color border-top-color border-bottom-color border-left-color border-right-color border-width border-top-width border-bottom-width border-left-width border-right-width border-style border-top-style border-bottom-style border-left-style border-right-style border-radius border-top-left-radius border-top-right-radius border-bottom-right-radius border-bottom-left-radius box-sizing padding padding-top padding-bottom padding-left padding-right margin margin-top margin-bottom margin-left margin-right color font-family font-size font-style font-weight text-align text-decoration height width -tr-outer-color -tr-inner-color fill-type border-type content".split(" ");
DvtCSSStyle.SKIN_SKYROS="skyros";DvtCSSStyle.SKIN_ALTA="alta";DvtCSSStyle.BACKGROUND="background";DvtCSSStyle.BACKGROUND_COLOR="background-color";DvtCSSStyle.BACKGROUND_IMAGE="background-image";DvtCSSStyle.BACKGROUND_REPEAT="background-repeat";DvtCSSStyle.BACKGROUND_POSITION="background-position";DvtCSSStyle.BORDER="border";DvtCSSStyle.BORDER_TOP="border-top";DvtCSSStyle.BORDER_BOTTOM="border-bottom";DvtCSSStyle.BORDER_LEFT="border-left";DvtCSSStyle.BORDER_RIGHT="border-right";
DvtCSSStyle.BORDER_WIDTH="border-width";DvtCSSStyle.BORDER_TOP_WIDTH="border-top-width";DvtCSSStyle.BORDER_BOTTOM_WIDTH="border-bottom-width";DvtCSSStyle.BORDER_LEFT_WIDTH="border-left-width";DvtCSSStyle.BORDER_RIGHT_WIDTH="border-right-width";DvtCSSStyle.BORDER_COLOR="border-color";DvtCSSStyle.BORDER_TOP_COLOR="border-top-color";DvtCSSStyle.BORDER_BOTTOM_COLOR="border-bottom-color";DvtCSSStyle.BORDER_LEFT_COLOR="border-left-color";DvtCSSStyle.BORDER_RIGHT_COLOR="border-right-color";
DvtCSSStyle.BORDER_RADIUS="border-radius";DvtCSSStyle.BORDER_TOP_LEFT_RADIUS="border-top-left-radius";DvtCSSStyle.BORDER_TOP_RIGHT_RADIUS="border-top-right-radius";DvtCSSStyle.BORDER_BOTTOM_RIGHT_RADIUS="border-bottom-right-radius";DvtCSSStyle.BORDER_BOTTOM_LEFT_RADIUS="border-bottom-left-radius";DvtCSSStyle.MARGIN="margin";DvtCSSStyle.MARGIN_TOP="margin-top";DvtCSSStyle.MARGIN_BOTTOM="margin-bottom";DvtCSSStyle.MARGIN_LEFT="margin-left";DvtCSSStyle.MARGIN_RIGHT="margin-right";
DvtCSSStyle.PADDING="padding";DvtCSSStyle.PADDING_TOP="padding-top";DvtCSSStyle.PADDING_BOTTOM="padding-bottom";DvtCSSStyle.PADDING_LEFT="padding-left";DvtCSSStyle.PADDING_RIGHT="padding-right";DvtCSSStyle.COLOR="color";DvtCSSStyle.FONT_FAMILY="font-family";DvtCSSStyle.FONT_SIZE="font-size";DvtCSSStyle.FONT_STYLE="font-style";DvtCSSStyle.FONT_WEIGHT="font-weight";DvtCSSStyle.TEXT_DECORATION="text-decoration";DvtCSSStyle.TEXT_ALIGN="text-align";DvtCSSStyle.BORDER_BOX="border-box";
DvtCSSStyle.CONTENT_BOX="content-box";DvtCSSStyle.HEIGHT="height";DvtCSSStyle.WIDTH="width";DvtCSSStyle.NONE="none";DvtCSSStyle.NO_REPEAT="no-repeat";DvtCSSStyle.REPEAT="repeat";DvtCSSStyle.REPEAT_X="repeat-x";DvtCSSStyle.REPEAT_Y="repeat-y";DvtCSSStyle.AUTO="auto";DvtCSSStyle.AUTO_MARGIN="8";DvtCSSStyle.BORDER_TYPE="border-type";DvtCSSStyle.FILL_TYPE="fill-type";DvtCSSStyle.CONTENT="content";DvtCSSStyle.INNER_COLOR="-tr-inner-color";DvtCSSStyle.OUTER_COLOR="-tr-outer-color";
DvtCSSStyle.SpFontSizeMap={"xx-small":"9","x-small":"10",small:"13",medium:"16",large:"18","x-large":"24","xx-large":"32"};DvtCSSStyle.SpWidthMap={thin:"2",medium:"4",thick:"6"};
DvtCSSStyle.SpColorMap={aqua:"#00FFFF",black:"#000000",blue:"#0000FF",white:"#FFFFFF",fuchsia:"#FF00FF",gray:"#848284",lime:"#00FF00",maroon:"#840000",green:"#008200",navy:"#000084",olive:"#848200",red:"#FF0000",silver:"#C6C3C6",teal:"#008284",yellow:"#FFFF00",purple:"#800080",cyan:"#D2B48C",goldenrod:"#DAA520",lightblue:"#ADD8E6",lightyellow:"#FFFFE0",orange:"#FFA500",paleGoldenRod:"#EEE8AA",paleturquoise:"#AFEEEE",peachpuff:"#FFDAB9",pink:"#FFC0CB",tan:"#D2B48C",thistle:"#D8BFD8",transparent:"transparent"};
DvtCSSStyle._numericAttrsList=[DvtCSSStyle.WIDTH,DvtCSSStyle.HEIGHT,DvtCSSStyle.BORDER_WIDTH,DvtCSSStyle.BORDER_TOP_WIDTH,DvtCSSStyle.BORDER_BOTTOM_WIDTH,DvtCSSStyle.BORDER_LEFT_WIDTH,DvtCSSStyle.BORDER_RIGHT_WIDTH,DvtCSSStyle.MARGIN,DvtCSSStyle.MARGIN_TOP,DvtCSSStyle.MARGIN_BOTTOM,DvtCSSStyle.MARGIN_LEFT,DvtCSSStyle.MARGIN_RIGHT,DvtCSSStyle.PADDING,DvtCSSStyle.PADDING_TOP,DvtCSSStyle.PADDING_BOTTOM,DvtCSSStyle.PADDING_LEFT,DvtCSSStyle.PADDING_RIGHT];DvtCSSStyle.DOUBLE_QUOTE='"';
DvtCSSStyle.SINGLE_QUOTE="'";DvtCSSStyle.COLORS_SKYROS="#003366 #CC3300 #666699 #006666 #FF9900 #993366 #99CC33 #624390 #669933 #FFCC33 #006699 #EBEA79".split(" ");DvtCSSStyle.COLORS_ALTA="#267db3 #68c182 #fad55c #ed6647 #8561c8 #6ddbdb #ffb54d #e371b2 #47bdef #a2bf39 #a75dba #f7f37b".split(" ");DvtCSSStyle.prototype.Init=function(a){this.parseInlineStyle(a)};
DvtCSSStyle.prototype.parseInlineStyle=function(a){if(a&&0<a.length){a=a.split(";");for(var b,c,d,e=0;e<a.length;e++)(b=a[e])&&0<b.length&&(c=b.indexOf(":"),-1<c&&(d=DvtStringUtils.trim(b.substring(0,c)),b=DvtStringUtils.trim(b.substring(c+1)),d&&0<d.length&&b&&0<b.length&&(d==DvtCSSStyle.BACKGROUND_IMAGE&&0<=b.indexOf("data:image/")&&(b=b+";"+a[e+1],e++),this.setCSSStyle(d,b))))}};
DvtCSSStyle.prototype.setCSSStyle=function(a,b){switch(a){case "background-repeat":this.setBackgroundRepeat(a,b);break;case "color":case "background-color":case "border-top-color":case "border-bottom-color":case "border-left-color":case "border-right-color":this.setColorString(a,b);break;case "border-top":case "border-bottom":case "border-left":case "border-right":this.setBorderSide(a,b);break;case "border":this.setBorderShorthand(a,b);break;case "border-color":this.setBorderColorShorthand(a,b);break;
case "border-width":this.setBorderWidthShorthand(a,b);break;case "border-radius":this.setBorderRadius(a,b);break;case "padding":this.setPaddingShorthand(a,b);break;case "margin":this.setMarginShorthand(a,b);break;case "font-family":this._setFontFamily(a,b);break;case "font-size":this.setFontSize(a,b);break;case "background-image":var c=DvtGradientParser.parseCSSGradient(b);c&&(b=c);this.setStyle(a,b);break;case DvtGradientParser.IE7_GD_FILTER:case DvtGradientParser.IE8_GD_FILTER:c=DvtGradientParser.removeQuotes(b,
DvtCSSStyle.DOUBLE_QUOTE);if(c=DvtGradientParser.parseCSSGradient(c))a=DvtCSSStyle.BACKGROUND_IMAGE,b=c;this.setStyle(a,b);break;default:this.setStyle(a,b)}};DvtCSSStyle.prototype._setFontFamily=function(a,b){this[a]=b};DvtCSSStyle.prototype.setFontSize=function(a,b){var c=DvtStringUtils.trim(b),d=DvtCSSStyle.SpFontSizeMap[c];this[a]=d?String(d)+"px":isNaN(parseFloat(c))?DvtStyleUtils.DEFAULT_FONT_SIZE:c};
DvtCSSStyle.prototype.setBorderWidthShorthand=function(a,b){var c=b.split(" "),d=null;switch(c.length){case 1:this[a]=DvtCSSStyle._getBorderWidth(c[0]);delete this[DvtCSSStyle.BORDER_TOP_WIDTH];delete this[DvtCSSStyle.BORDER_BOTTOM_WIDTH];delete this[DvtCSSStyle.BORDER_RIGHT_WIDTH];delete this[DvtCSSStyle.BORDER_LEFT_WIDTH];break;case 2:d=DvtCSSStyle._getBorderWidth(c[0]);this.setStyle(DvtCSSStyle.BORDER_TOP_WIDTH,d);this.setStyle(DvtCSSStyle.BORDER_BOTTOM_WIDTH,d);d=DvtCSSStyle._getBorderWidth(c[1]);
this.setStyle(DvtCSSStyle.BORDER_LEFT_WIDTH,d);this.setStyle(DvtCSSStyle.BORDER_RIGHT_WIDTH,d);break;case 3:this.setStyle(DvtCSSStyle.BORDER_TOP_WIDTH,DvtCSSStyle._getBorderWidth(c[0]));d=DvtCSSStyle._getBorderWidth(c[1]);this.setStyle(DvtCSSStyle.BORDER_LEFT_WIDTH,d);this.setStyle(DvtCSSStyle.BORDER_RIGHT_WIDTH,d);this.setStyle(DvtCSSStyle.BORDER_BOTTOM_WIDTH,DvtCSSStyle._getBorderWidth(c[2]));break;case 4:this.setStyle(DvtCSSStyle.BORDER_TOP_WIDTH,DvtCSSStyle._getBorderWidth(c[0])),this.setStyle(DvtCSSStyle.BORDER_RIGHT_WIDTH,
DvtCSSStyle._getBorderWidth(c[1])),this.setStyle(DvtCSSStyle.BORDER_BOTTOM_WIDTH,DvtCSSStyle._getBorderWidth(c[2])),this.setStyle(DvtCSSStyle.BORDER_LEFT_WIDTH,DvtCSSStyle._getBorderWidth(c[3]))}};DvtCSSStyle._getBorderWidth=function(a){a=DvtStringUtils.trim(a);var b=DvtCSSStyle.SpWidthMap[a];b||(b=isNaN(parseFloat(a))?"0px":a);return b};
DvtCSSStyle.prototype.setBorderSide=function(a,b){for(var c=b.split(" "),d=null,e=!1,f,g=0;g<c.length;g++)if(d=c[g],f=a,0==d.indexOf("rgb")){for(var h=g+1;h<c.length&&(d+=c[h],g++,-1==c[h].indexOf(")"));h++);DvtStringUtils.endsWith(a,"-"+DvtCSSStyle.COLOR)||(f=a+"-"+DvtCSSStyle.COLOR);this.setStyle(f,d)}else DvtCSSStyle.isColorVal(d)?(DvtStringUtils.endsWith(a,"-"+DvtCSSStyle.COLOR)||(f=a+"-"+DvtCSSStyle.COLOR),this.setStyle(f,DvtCSSStyle.parseHexColor(d))):DvtCSSStyle.isBorderWidthVal(d)?(DvtStringUtils.endsWith(a,
"-"+DvtCSSStyle.WIDTH)||(f=a+"-"+DvtCSSStyle.WIDTH),this.setStyle(f,d)):"none"==b&&(e=!0);e&&this.setStyle(a+"-"+DvtCSSStyle.WIDTH,"0")};DvtCSSStyle.prototype.getMarginTop=function(){return this._getSideWidth(DvtCSSStyle.MARGIN_TOP,DvtCSSStyle.MARGIN)};DvtCSSStyle.prototype.getMarginRight=function(){return this._getSideWidth(DvtCSSStyle.MARGIN_RIGHT,DvtCSSStyle.MARGIN)};DvtCSSStyle.prototype.getMarginBottom=function(){return this._getSideWidth(DvtCSSStyle.MARGIN_BOTTOM,DvtCSSStyle.MARGIN)};
DvtCSSStyle.prototype.getMarginLeft=function(){return this._getSideWidth(DvtCSSStyle.MARGIN_LEFT,DvtCSSStyle.MARGIN)};DvtCSSStyle.prototype.getBorderTopWidth=function(){return this._getSideWidth(DvtCSSStyle.BORDER_TOP_WIDTH,DvtCSSStyle.BORDER_WIDTH)};DvtCSSStyle.prototype.getBorderRightWidth=function(){return this._getSideWidth(DvtCSSStyle.BORDER_RIGHT_WIDTH,DvtCSSStyle.BORDER_WIDTH)};DvtCSSStyle.prototype.getBorderBottomWidth=function(){return this._getSideWidth(DvtCSSStyle.BORDER_BOTTOM_WIDTH,DvtCSSStyle.BORDER_WIDTH)};
DvtCSSStyle.prototype.getBorderLeftWidth=function(){return this._getSideWidth(DvtCSSStyle.BORDER_LEFT_WIDTH,DvtCSSStyle.BORDER_WIDTH)};DvtCSSStyle.prototype.getBorderWidth=function(){var a=this.getStyle(DvtCSSStyle.BORDER_WIDTH);return a||(a=this.getStyle(DvtCSSStyle.BORDER_TOP_WIDTH))||(a=this.getStyle(DvtCSSStyle.BORDER_RIGHT_WIDTH))||(a=this.getStyle(DvtCSSStyle.BORDER_BOTTOM_WIDTH))?DvtCSSStyle.toNumber(a):(a=this.getStyle(DvtCSSStyle.BORDER_LEFT_WIDTH))?DvtCSSStyle.toNumber(a):0};
DvtCSSStyle.prototype.getPaddingTop=function(){return this._getSideWidth(DvtCSSStyle.PADDING_TOP,DvtCSSStyle.PADDING)};DvtCSSStyle.prototype.getPaddingRight=function(){return this._getSideWidth(DvtCSSStyle.PADDING_RIGHT,DvtCSSStyle.PADDING)};DvtCSSStyle.prototype.getPaddingBottom=function(){return this._getSideWidth(DvtCSSStyle.PADDING_BOTTOM,DvtCSSStyle.PADDING)};DvtCSSStyle.prototype.getPaddingLeft=function(){return this._getSideWidth(DvtCSSStyle.PADDING_LEFT,DvtCSSStyle.PADDING)};
DvtCSSStyle.prototype.getWidth=function(){return this.width};DvtCSSStyle.prototype.getHeight=function(){return this.height};DvtCSSStyle.toNumber=function(a){return a?(a=parseFloat(a),isNaN(a)?0:a):0};DvtCSSStyle.isInheritable=function(a){switch(a){case DvtCSSStyle.COLOR:case DvtCSSStyle.FONT_FAMILY:case DvtCSSStyle.FONT_SIZE:case DvtCSSStyle.FONT_STYLE:case DvtCSSStyle.FONT_WEIGHT:case DvtCSSStyle.TEXT_ALIGN:return!0;default:return!1}};
DvtCSSStyle.prototype.setBorderColorShorthand=function(a,b){var c=DvtCSSStyle.parseBorderColorString(a,b),d;switch(c.length){case 1:this.setColor(a,c[0]);delete this[DvtCSSStyle.BORDER_TOP_COLOR];delete this[DvtCSSStyle.BORDER_BOTTOM_COLOR];delete this[DvtCSSStyle.BORDER_RIGHT_COLOR];delete this[DvtCSSStyle.BORDER_LEFT_COLOR];break;case 2:d=c[0];this.setColor(DvtCSSStyle.BORDER_TOP_COLOR,d);this.setColor(DvtCSSStyle.BORDER_BOTTOM_COLOR,d);d=c[1];this.setColor(DvtCSSStyle.BORDER_LEFT_COLOR,d);this.setColor(DvtCSSStyle.BORDER_RIGHT_COLOR,
d);break;case 3:this.setColor(DvtCSSStyle.BORDER_TOP_COLOR,c[0]);d=c[1];this.setColor(DvtCSSStyle.BORDER_LEFT_COLOR,d);this.setColor(DvtCSSStyle.BORDER_RIGHT_COLOR,d);this.setColor(DvtCSSStyle.BORDER_BOTTOM_COLOR,c[2]);break;case 4:this.setColor(DvtCSSStyle.BORDER_TOP_COLOR,c[0]),this.setColor(DvtCSSStyle.BORDER_RIGHT_COLOR,c[1]),this.setColor(DvtCSSStyle.BORDER_BOTTOM_COLOR,c[2]),this.setColor(DvtCSSStyle.BORDER_LEFT_COLOR,c[3])}};
DvtCSSStyle.prototype.setPaddingShorthand=function(a,b){var c=b.split(" "),d=null;switch(c.length){case 1:this.setStyle(a,this._getPercent(c[0]));delete this[DvtCSSStyle.PADDING_TOP];delete this[DvtCSSStyle.PADDING_BOTTOM];delete this[DvtCSSStyle.PADDING_RIGHT];delete this[DvtCSSStyle.PADDING_LEFT];break;case 2:d=this._getPercent(c[0]);this.setStyle(DvtCSSStyle.PADDING_TOP,d);this.setStyle(DvtCSSStyle.PADDING_BOTTOM,d);d=this._getPercent(c[1]);this.setStyle(DvtCSSStyle.PADDING_LEFT,d);this.setStyle(DvtCSSStyle.PADDING_RIGHT,
d);break;case 3:this.setStyle(DvtCSSStyle.PADDING_TOP,this._getPercent(c[0]));d=this._getPercent(c[1]);this.setStyle(DvtCSSStyle.PADDING_LEFT,d);this.setStyle(DvtCSSStyle.PADDING_RIGHT,d);this.setStyle(DvtCSSStyle.PADDING_BOTTOM,this._getPercent(c[2]));break;case 4:this.setStyle(DvtCSSStyle.PADDING_TOP,this._getPercent(c[0])),this.setStyle(DvtCSSStyle.PADDING_RIGHT,this._getPercent(c[1])),this.setStyle(DvtCSSStyle.PADDING_BOTTOM,this._getPercent(c[2])),this.setStyle(DvtCSSStyle.PADDING_LEFT,this._getPercent(c[3]))}};
DvtCSSStyle.prototype.setMarginShorthand=function(a,b){var c=b.split(" "),d=null;switch(c.length){case 1:this.setStyle(a,this._getMargin(c[0]));delete this[DvtCSSStyle.MARGIN_TOP];delete this[DvtCSSStyle.MARGIN_BOTTOM];delete this[DvtCSSStyle.MARGIN_RIGHT];delete this[DvtCSSStyle.MARGIN_LEFT];break;case 2:d=this._getMargin(c[0]);this.setStyle(DvtCSSStyle.MARGIN_TOP,d);this.setStyle(DvtCSSStyle.MARGIN_BOTTOM,d);d=this._getMargin(c[1]);this.setStyle(DvtCSSStyle.MARGIN_LEFT,d);this.setStyle(DvtCSSStyle.MARGIN_RIGHT,
d);break;case 3:this.setStyle(DvtCSSStyle.MARGIN_TOP,this._getMargin(c[0]));d=this._getMargin(c[1]);this.setStyle(DvtCSSStyle.MARGIN_LEFT,d);this.setStyle(DvtCSSStyle.MARGIN_RIGHT,d);this.setStyle(DvtCSSStyle.MARGIN_BOTTOM,this._getMargin(c[2]));break;case 4:this.setStyle(DvtCSSStyle.MARGIN_TOP,this._getMargin(c[0])),this.setStyle(DvtCSSStyle.MARGIN_RIGHT,this._getMargin(c[1])),this.setStyle(DvtCSSStyle.MARGIN_BOTTOM,this._getMargin(c[2])),this.setStyle(DvtCSSStyle.MARGIN_LEFT,this._getMargin(c[3]))}};
DvtCSSStyle.prototype._getMargin=function(a){a=DvtStringUtils.trim(a);return DvtCSSStyle.AUTO==a?DvtCSSStyle.AUTO_MARGIN:this._getPercent(a)};DvtCSSStyle.prototype._getPercent=function(a){return DvtStringUtils.trim(a)};
DvtCSSStyle.prototype.setBorderShorthand=function(a,b){for(var c=b.split(" "),d=null,e=!1,f=0;f<c.length;f++)if(d=c[f],0==d.indexOf("rgb")){for(var g=f+1;g<c.length&&(d+=c[g],f++,-1==c[g].indexOf(")"));g++);this.setBorderColorShorthand(DvtCSSStyle.BORDER_COLOR,d)}else DvtCSSStyle.isColorVal(d)?this.setBorderColorShorthand(DvtCSSStyle.BORDER_COLOR,d):DvtCSSStyle.isBorderWidthVal(d)?this.setBorderWidthShorthand(DvtCSSStyle.BORDER_WIDTH,d):"none"==b&&(e=!0);e&&this.setBorderWidthShorthand(DvtCSSStyle.BORDER_WIDTH,
"0")};DvtCSSStyle._getBorderRadius=function(a){a=DvtStringUtils.trim(a);return isNaN(parseFloat(a))?"0px":a};
DvtCSSStyle.prototype.setBorderRadius=function(a,b){var c=b.split("/");if(null==c[0])this[a]="0px";else{var d=DvtStringUtils.trim(c[0]).split(" ");switch(d.length){default:this[a]=DvtCSSStyle._getBorderRadius(d[0]),delete this[DvtCSSStyle.BORDER_TOP_LEFT_RADIUS],delete this[DvtCSSStyle.BORDER_TOP_RIGHT_RADIUS],delete this[DvtCSSStyle.BORDER_BOTTOM_RIGHT_RADIUS],delete this[DvtCSSStyle.BORDER_BOTTOM_LEFT_RADIUS]}if(2==c.length&&null!=c[1])switch(c=DvtStringUtils.trim(c[1]).split(" "),c.length){case 1:this[a]=
this[a]?this[a]+(" "+DvtCSSStyle._getBorderRadius(c[0])):DvtCSSStyle._getBorderRadius(c[0])}}};DvtCSSStyle.prototype.getBorderRadius=function(){return"undefined"!==this[DvtCSSStyle.BORDER_RADIUS]&&null!==this[DvtCSSStyle.BORDER_RADIUS]?DvtCSSStyle.toNumber(this[DvtCSSStyle.BORDER_RADIUS]):0};
DvtCSSStyle.prototype.setBackgroundRepeat=function(a,b){b.toLowerCase();var c=b.split(" ");2==c.length&&(c[0]==c[1]?b=c[0]:c[0]==DvtCSSStyle.REPEAT&&c[1]==DvtCSSStyle.NO_REPEAT&&(b=DvtCSSStyle.REPEAT_X),c[0]==DvtCSSStyle.NO_REPEAT&&c[1]==DvtCSSStyle.REPEAT&&(b=DvtCSSStyle.REPEAT_Y));this[a]=b};DvtCSSStyle.prototype.setColorString=function(a,b){var c=DvtCSSStyle._toColorVal(b);c?this[a]=c:DvtCSSStyle.isColorVal(b)&&(this[a]=b)};
DvtCSSStyle._toColorVal=function(a){a=DvtStringUtils.trim(a);return(a=DvtCSSStyle.SpColorMap[a.toLowerCase()])?a:null};DvtCSSStyle.prototype.getStyle=function(a){return this[a]};DvtCSSStyle.prototype.setStyle=function(a,b){this[a]=b};DvtCSSStyle.prototype.setColor=function(a,b){this[a]=b};DvtCSSStyle.isValueInEM=function(a){return 0<=a.toLowerCase().indexOf("em")};
DvtCSSStyle.prototype._resolveEMx=function(a,b){var c=this.getStyle(a);return c&&DvtCSSStyle.isValueInEM(c)?b?(this.setStyle(a,String(Math.round(parseFloat(c)*parseFloat(b)))+"px"),!0):!1:!0};DvtCSSStyle.prototype.getAbsoluteFontSize=function(){var a=this.getFontSize();return a&&!DvtCSSStyle.isValueInEM(a)?a:null};
DvtCSSStyle.prototype.resolveEM=function(a){var b=this.getFontSize();b&&(DvtCSSStyle.isValueInEM(b)?this._resolveEMx(DvtCSSStyle.FONT_SIZE,a):a=b);for(var b=DvtCSSStyle._numericAttrsList,c=0;c<b.length;c++)if(!this._resolveEMx(b[c],a))return!1;return!0};DvtCSSStyle.prototype.clone=function(){for(var a=new DvtCSSStyle,b=0;b<DvtCSSStyle._attrs.length;b++){var c=DvtCSSStyle._attrs[b];this[c]&&(a[c]=this[c])}return a};
DvtCSSStyle.prototype.merge=function(a){if(a)for(var b=0;b<DvtCSSStyle._attrs.length;b++){var c=DvtCSSStyle._attrs[b];a[c]&&(this[c]=a[c])}return this};DvtCSSStyle.prototype.mergeUnder=function(a){if(a)for(var b=0;b<DvtCSSStyle._attrs.length;b++){var c=DvtCSSStyle._attrs[b];!this[c]&&a[c]&&(this[c]=a[c])}return this};DvtCSSStyle.prototype.toInlineStyle=function(a){for(var b="",c=0;c<a.length;c++){var d=a[c];void 0!==this[d]&&(b+=d+":"+this[d]+"; ")}return b};DvtCSSStyle.prototype.toString=function(){return this.toInlineStyle(DvtCSSStyle._attrs)};
DvtCSSStyle.prototype.getBackgroundImage=function(){var a=this[DvtCSSStyle.BACKGROUND_IMAGE],b,c;if(a&&a instanceof DvtCSSGradient)return a;a&&(b=a.indexOf("url("),c=a.lastIndexOf(")"),0==b&&c==a.length-1&&(a=a.substring(4,c)));a&&(b=a.indexOf(DvtCSSStyle.SINGLE_QUOTE),c=a.lastIndexOf(DvtCSSStyle.SINGLE_QUOTE),0==b&&c==a.length-1?a=a.substring(1,c):(b=a.indexOf(DvtCSSStyle.DOUBLE_QUOTE),c=a.lastIndexOf(DvtCSSStyle.DOUBLE_QUOTE),0==b&&c==a.length-1&&(a=a.substring(1,c))));return a};
DvtCSSStyle.isColorVal=function(a){a=DvtStringUtils.trim(a);return 0==a.indexOf("rgb")||0==a.indexOf("#")||DvtCSSStyle.SpColorMap[a.toLowerCase()]?!0:!1};DvtCSSStyle.isBorderWidthVal=function(a){a=DvtStringUtils.trim(a);return DvtCSSStyle.SpWidthMap[a]?!0:!isNaN(parseFloat(a))};DvtCSSStyle.parseBorderColorString=function(a,b){b=DvtStringUtils.trim(b);for(var c=[];null!=b&&0<b.length;)b=DvtCSSStyle.parseBorderColor(b,c);return c};
DvtCSSStyle.parseBorderColor=function(a,b){a=DvtStringUtils.ltrim(a);var c=a.length,d=-1;if(!a)return a;if(0==a.indexOf("rgb"))d=a.indexOf(")")+1,c=a.slice(0,d);else{d=a.indexOf(" ");-1==d&&(d=c);var e=a.slice(0,d);(c=DvtCSSStyle._toColorVal(e))||(c=DvtCSSStyle.parseHexColor(e))}c&&(b.push(c),a=a.slice(d));return a};DvtCSSStyle.parseHexColor=function(a){var b;if(a&&0<a.length){var c=7<a.length;b=Number("0x"+a.substring(1));isNaN(b);b=c?"#"+a.substring(3):a}return b};
DvtCSSStyle.prototype._getSideWidth=function(a,b){var c=this.getStyle(a);c||(c=this.getStyle(b));return DvtCSSStyle.toNumber(c)};DvtCSSStyle.prototype.getFontSize=function(){return this.getStyle(DvtCSSStyle.FONT_SIZE)};DvtCSSStyle.mergeStyles=function(a){var b=new DvtCSSStyle;if(a)for(var c=0;c<a.length;c++)b.merge(a[c]);return b};DvtCSSStyle.prototype.isEmpty=function(){for(var a in this)if(this.hasOwnProperty(a))return!1;return!0};
DvtCSSStyle.prototype.isTextAlignEnd=function(a){var b=this.getStyle(DvtCSSStyle.TEXT_ALIGN);return"end"==b?!0:DvtAgent.isRightToLeft(a)?"left"==b:"right"==b};
DvtCSSStyle.prototype.parseBackgroundPosition=function(){var a=this.getStyle(DvtCSSStyle.BACKGROUND_POSITION);if(!a)return null;a=a.split(" ");if(0==a.length)return["0%","0%"];var b=["50%","50%"],c;0<a.length&&(c=DvtStringUtils.trim(a[0]),"left"==c?b[0]="0%":"right"==c?b[0]="100%":"top"==c?b[1]="0%":"bottom"==c?b[1]="100%":"center"!=c&&(b[0]=c));1<a.length&&(c=DvtStringUtils.trim(a[1]),"left"==c?b[0]="0%":"right"==c?b[0]="100%":"top"==c?b[1]="0%":"bottom"==c?b[1]="100%":"center"!=c&&(b[1]=c));return b};
DvtCSSStyle.prototype.getIconUrl=function(){return this.getStyle(DvtCSSStyle.CONTENT)};DvtCSSStyle.prototype.setIconUrl=function(a){this.setStyle(DvtCSSStyle.CONTENT,a)};var DvtBaseComponent=function(){};DvtObj.createSubclass(DvtBaseComponent,DvtContainer,"DvtBaseComponent");DvtBaseComponent.prototype.Init=function(a,b,c){DvtBaseComponent.superclass.Init.call(this,a);this._callback=b;this._callbackObj=c;this.Options=this.Defaults=null};
DvtBaseComponent.prototype.GetDefaults=function(a){return this.Defaults?this.Defaults.getDefaults(a):{}};DvtBaseComponent.prototype.SetOptions=function(a){};DvtBaseComponent.prototype.applyOptions=function(a){this.Options&&a&&this.SetOptions(DvtJSONUtils.merge(a,this.Options))};DvtBaseComponent.prototype.render=function(a,b,c){};DvtBaseComponent.prototype.__dispatchEvent=function(a){this.getCtx().getJsExt().dispatchEvent(this._callback,this._callbackObj,this,a)};var DvtBaseComponentDefaults=function(){this.Init()};
DvtObj.createSubclass(DvtBaseComponentDefaults,DvtObj,"DvtBaseComponentDefaults");DvtBaseComponentDefaults.prototype.Init=function(a){this._defaults=a?a:{}};DvtBaseComponentDefaults.prototype.getBaseSkinName=function(){return"alta"};DvtBaseComponentDefaults.prototype.calcOptions=function(a){var b=this.getDefaults(a?a.skin:null);return a?DvtJSONUtils.merge(a,b):b};
DvtBaseComponentDefaults.prototype.getDefaults=function(a){a||(a=this.getBaseSkinName());return"alta"==a?DvtJSONUtils.merge(this._defaults.alta,DvtJSONUtils.merge(this._defaults.skyros,this._defaults.fusion)):"skyros"==a?DvtJSONUtils.merge(this._defaults.skyros,this._defaults.fusion):DvtJSONUtils.clone(this._defaults.fusion)};var DvtContextMenuItem=function(a,b,c,d){this._event=a;this._text=b;this._disabled=c;this._sepBefore=d};DvtObj.createSubclass(DvtContextMenuItem,DvtObj,"DvtContextMenuItem");
DvtContextMenuItem.prototype.getEvent=function(){return this._event};DvtContextMenuItem.prototype.getText=function(){return this._text};DvtContextMenuItem.prototype.isDisabled=function(){return this._disabled};DvtContextMenuItem.prototype.hasSeparatorBefore=function(){return this._sepBefore};var DvtGraphShowPopupBehavior=function(a,b,c,d){this._popupId=a;this._triggerType=b;this._alignId=c;this._align=d};DvtObj.createSubclass(DvtGraphShowPopupBehavior,DvtObj,"DvtGraphShowPopupBehavior");
DvtGraphShowPopupBehavior.TRIGGER_TYPE_ACTION="action";DvtGraphShowPopupBehavior.TRIGGER_TYPE_CLICK="click";DvtGraphShowPopupBehavior.TRIGGER_TYPE_CONTEXT_MENU="contextMenu";DvtGraphShowPopupBehavior.TRIGGER_TYPE_MOUSE_HOVER="mouseHover";DvtGraphShowPopupBehavior.ALIGN_AFTER_START="afterStart";DvtGraphShowPopupBehavior.ALIGN_AFTER_END="afterEnd";DvtGraphShowPopupBehavior.ALIGN_BEFORE_START="beforeStart";DvtGraphShowPopupBehavior.ALIGN_BEFORE_END="beforeEnd";
DvtGraphShowPopupBehavior.ALIGN_END_AFTER="endAfter";DvtGraphShowPopupBehavior.ALIGN_END_BEFORE="endBefore";DvtGraphShowPopupBehavior.ALIGN_START_AFTER="startAfter";DvtGraphShowPopupBehavior.ALIGN_START_BEFORE="startBefore";DvtGraphShowPopupBehavior.ALIGN_OVERLAP="overlap";DvtGraphShowPopupBehavior.newInstance=function(a){var b=a.getAttr("popupId"),c=a.getAttr("triggerType"),d=a.getAttr("alignId");a=a.getAttr("align");return new DvtGraphShowPopupBehavior(b,c,d,a)};
DvtGraphShowPopupBehavior.prototype.getPopupId=function(){return this._popupId};DvtGraphShowPopupBehavior.prototype.getTriggerType=function(){return this._triggerType};DvtGraphShowPopupBehavior.prototype.getAlignId=function(){return this._alignId};DvtGraphShowPopupBehavior.prototype.getAlign=function(){return this._align};var DvtClientBehavior=function(a,b){this._type=a;this._triggerType=b;this._props={}};DvtObj.createSubclass(DvtClientBehavior,DvtObj,"DvtClientBehavior");
DvtClientBehavior.TRIGGER_TYPE_ACTION="action";DvtClientBehavior.TRIGGER_TYPE_CLICK="click";DvtClientBehavior.TYPE_ROW_DISCLOSURE="DvtRowDisclosureBehavior";DvtClientBehavior.TYPE_DRILL="DvtDrillBehavior";DvtClientBehavior.TYPE_ISOLATE_LEVELS="DvtIsolateLevelsBehavior";DvtClientBehavior.TYPE_RESTORE="DvtRestoreBehavior";DvtClientBehavior.prototype.getType=function(){return this._type};DvtClientBehavior.prototype.getTriggerType=function(){return this._triggerType};
DvtClientBehavior.prototype.setProperty=function(a,b){this._props[a]=b};DvtClientBehavior.prototype.getProperty=function(a){return this._props[a]};DvtClientBehavior.prototype.getProperties=function(){return this._props};var DvtMagnifyLens=function(a){this.Init(a)};DvtObj.createSubclass(DvtMagnifyLens,DvtContainer,"DvtMagnifyLens");DvtMagnifyLens.DEFAULT_BACKGROUND_COLOR="#ffffff";
DvtMagnifyLens.prototype.Init=function(a){this._context=a;this._lensBorderWidth=2;this._backgroundFill=new DvtSolidFill(DvtMagnifyLens.DEFAULT_BACKGROUND_COLOR,1);this._rimFillColor="black";this.getImpl()||this.setImpl(a.getImplFactory().newContainer("maglens"));DvtMagnifyLens.superclass.Init.call(this,a);this._zoomFactor=3;this._zoomSize=91;this._shiftValue=.5;this.setMouseEnabled(!1);this.setTranslateX(this._lensBorderWidth);this.setTranslateY(this._lensBorderWidth);this._dirty=!0};
DvtMagnifyLens.prototype.isDirty=function(){return this._dirty};DvtMagnifyLens.prototype.setDirty=function(a){this._dirty=a};DvtMagnifyLens.prototype.setZoomFactor=function(a){this._zoomFactor=a};DvtMagnifyLens.prototype.setSize=function(a){this._zoomSize=a};DvtMagnifyLens.prototype.setBackgroundFill=function(a){this._backgroundFill=a};DvtMagnifyLens.prototype.setRimFillColor=function(a){this._rimFillColor=a};DvtMagnifyLens.prototype.getSize=function(){return this._zoomSize+2*this._lensBorderWidth};
DvtMagnifyLens.prototype.initialize=function(){if(!this._initialized){this._initialized=!0;var a=this._zoomSize,b=this._context,c=new DvtContainer(b,"clipContainer"),d=new DvtGraphClipPath("maglens"),e=a/2;d.addEllipse(e,e,e,e);this._magClipPath=d;this._magClipContainer=c;this._magClipContainer.setClipPath(this._magClipPath);b=new DvtCircle(b,a/2,a/2,a/2-this._lensBorderWidth/2);b.setMouseEnabled(!1);c.addChild(b);c.setAlpha(1);this._view=c;this.addChild(c);a=new DvtCircle(this.getCtx(),a/2,a/2,a/
2+this._lensBorderWidth);a.setSolidFill(this._rimFillColor);a.setMouseEnabled(!1);this.addChildAt(a,0)}};DvtMagnifyLens.prototype.UpdatePosition=function(a,b){var c=this._zoomSize,d=this._content;if(d){var e=this._zoomFactor;d.setTranslateX(-a*e+c/2);d.setTranslateY(-b*e+c*this._shiftValue)}};DvtMagnifyLens.prototype.getRootDisplayable=function(){return this};DvtMagnifyLens.prototype.GetMagnifyContent=function(a){return a.createCopy()};
DvtMagnifyLens.prototype.getDisplayWidth=function(){return this._zoomSize+2*this._lensBorderWidth};DvtMagnifyLens.prototype.getDisplayHeight=function(){return this._zoomSize+2*this._lensBorderWidth};DvtMagnifyLens.prototype.clearContent=function(){var a=this._content;a&&this._view.removeChild(a)};
DvtMagnifyLens.prototype.updateMagnifyContent=function(a){this.clearContent();var b=this.GetMagnifyContent(a);b.setScaleX(this._zoomFactor);b.setScaleY(this._zoomFactor);this._content=b;a=a.getDimensions();a=new DvtRect(this.getCtx(),a.x,a.y,a.w,a.h);a.setSolidFill("white");b.addChildAt(a,0);a.setMouseEnabled(!1);this._view.addChildAt(b,0);this._view.setMouseEnabled(!1);b.setMouseEnabled(!1)};var DvtScrollbar=function(a,b,c,d,e,f,g,h,k,m){this.Init(a,b,c,d,e,f,g,h,k,m)};
DvtObj.createSubclass(DvtScrollbar,DvtContainer,"DvtScrollbar");DvtScrollbar.ID_NONE=0;DvtScrollbar.ID_X1RS=1;DvtScrollbar.ID_Y1RS=2;DvtScrollbar.ID_Y2RS=3;DvtScrollbar.ID_O1RS=4;DvtScrollbar.DEFAULT_TEXT_COLOR="rgb(69,69,69)";DvtScrollbar.LABEL_MASK_FILL_COLOR="rgb(122,143,175)";DvtScrollbar.SMALL_SCROLL_AMOUNT=.2;DvtScrollbar.LARGE_SCROLL_AMOUNT=1;DvtScrollbar.MIN_THUMB_SIZE=30;DvtScrollbar.SCROLL_TIMER_DELAY=50;DvtScrollbar.SCROLL_TIMER_INITIAL_DELAY=400;DvtScrollbar.THUMB_TYPE="thumb";
DvtScrollbar.GRIPPER_START_TYPE="gripperStart";DvtScrollbar.GRIPPER_END_TYPE="gripperEnd";DvtScrollbar._TEST_ID_THIS=0;DvtScrollbar._TEST_ID_SCROLL_THUMB=1;DvtScrollbar._TEST_ID_SCROLL_BUTTON_DOWN=2;DvtScrollbar._TEST_ID_SCROLL_BUTTON_UP=3;DvtScrollbar.BACKGROUND="scrollbarBackground";DvtScrollbar.BORDER_COLOR="scrollbarBorderColor";DvtScrollbar.HANDLE_COLOR="scrollbarHandleColor";DvtScrollbar.HANDLE_ACTIVE_COLOR="scrollbarHandleActiveColor";DvtScrollbar.HANDLE_HOVER_COLOR="scrollbarHandleHoverColor";
DvtScrollbar.prototype.Init=function(a,b,c,d,e,f,g,h,k,m){DvtScrollbar.superclass.Init.call(this,a);this._isHoriz=f;this._styleMap=k;this._skinName=h;this._clickDiff={};this._clickStartPos={};this._clickEndPos={};this._lastMovePos=-1;this._container=new DvtRect(a,b,c,d,e,m);this._container.setPixelHinting(!0);this.addChild(this._container);this._background=new DvtScrollbarBackground(this);this._container.addChild(this._background);this.IsSkinAlta()?this._arrowWidth=0:(this._arrowWidth=DvtScrollbarArrow.WIDTH,
this._isHoriz?(this._arrowDown=new DvtScrollbarArrow(this,DvtScrollbarArrow.ORIENT_LEFT),this._arrowUp=new DvtScrollbarArrow(this,DvtScrollbarArrow.ORIENT_RIGHT)):(this._arrowDown=new DvtScrollbarArrow(this,DvtScrollbarArrow.ORIENT_DOWN),this._arrowUp=new DvtScrollbarArrow(this,DvtScrollbarArrow.ORIENT_UP)),this._container.addChild(this._arrowDown),this._container.addChild(this._arrowUp),this._container.setSolidStroke("black"));this._thumbStartPos=this._thumbStartMin=this._arrowWidth;this._thumbLength=
this._thumbLengthMax=this._isHoriz?d-2*this._arrowWidth:e-2*this._arrowWidth;this._thumb=new DvtScrollbarThumb(this,g,this.getSkinName());this._container.addChild(this._thumb);this._scrollTimer=new DvtTimer(a,DvtScrollbar.SCROLL_TIMER_DELAY,this.repeatScroll,this);this._initScrollTimer=new DvtTimer(a,DvtScrollbar.SCROLL_TIMER_INITIAL_DELAY,this.initRepeatScroll,this);this._bScrolled=!1;this._isLiveScroll=!0};DvtScrollbar.prototype.getStyleMap=function(){return this._styleMap};
DvtScrollbar.prototype.getSkinName=function(){return this._skinName};DvtScrollbar.prototype.IsSkinAlta=function(){return"alta"==this._skinName};DvtScrollbar.prototype.isHorizontal=function(){return this._isHoriz};DvtScrollbar.prototype.getThumbStart=function(){return this._thumbStartPos};DvtScrollbar.prototype.getThumbLength=function(){return this._thumbLength};
DvtScrollbar.prototype.setThumbStartAndLength=function(a,b){var c=0,c=this._isHoriz?(this.getWidth()-2*this._arrowWidth)/this.getWidth():(this.getHeight()-2*this._arrowWidth)/this.getHeight();this._thumbStartPos=this._arrowWidth+Math.round(a*c);this._thumbLength=Math.round(b*c);this._thumb.updateSize()};DvtScrollbar.prototype.getScrollAreaStart=function(){return this._thumbStartMin};DvtScrollbar.prototype.getScrollAreaLength=function(){return this._thumbLengthMax};
DvtScrollbar.prototype.initRepeatScroll=function(){this._initScrollTimer.stop();this._scrollTimer.stop();this._scrollTimer.start()};DvtScrollbar.prototype.repeatScroll=function(){this._arrow&&!this._arrow.isDisabled()&&this.arrowScroll()};
DvtScrollbar.prototype.arrowScroll=function(){var a=DvtScrollbar.SMALL_SCROLL_AMOUNT;this._lastMovePos=this._thumbStartPos;switch(this._arrow.getOrientation()){case DvtScrollbarArrow.ORIENT_RIGHT:case DvtScrollbarArrow.ORIENT_DOWN:this.doScroll(a);break;case DvtScrollbarArrow.ORIENT_LEFT:case DvtScrollbarArrow.ORIENT_UP:this.doScroll(-a)}this._bScrolled=!0;this._fireMoveEvent(!this._isLiveScroll)};
DvtScrollbar.prototype.doScroll=function(a){this.moveTo(this._thumbStartPos+Math.round(this._thumbLength*a))};DvtScrollbar.prototype.moveTo=function(a){a<this._thumbStartMin&&(a=this._thumbStartMin);a+this._thumbLength>this._thumbStartMin+this._thumbLengthMax&&(a=this._thumbStartMin+this._thumbLengthMax-this._thumbLength);this._thumbStartPos=a;this._thumb.updateSize();this._thumb.updateTooltipText()};
DvtScrollbar.prototype.moveStart=function(a){var b=this._thumbStartPos+this._thumbLength;a<this._thumbStartMin&&(a=this._thumbStartMin);a>b-DvtScrollbar.MIN_THUMB_SIZE&&(a=b-DvtScrollbar.MIN_THUMB_SIZE);this._thumbStartPos=a;this._thumbLength=b-a;this._thumb.updateSize();this._thumb.updateTooltipText()};
DvtScrollbar.prototype.moveEnd=function(a){a<this._thumbStartPos+DvtScrollbar.MIN_THUMB_SIZE&&(a=this._thumbStartPos+DvtScrollbar.MIN_THUMB_SIZE);a>this._thumbStartMin+this._thumbLengthMax&&(a=this._thumbStartMin+this._thumbLengthMax);this._thumbLength=a-this._thumbStartPos;this._thumb.updateSize();this._thumb.updateTooltipText()};
DvtScrollbar.prototype.processBackgroundClick=function(a){var b=0;a=this._isHoriz?a.x-this.getX():a.y-this.getY();a<this._thumbStartPos?b=-DvtScrollbar.LARGE_SCROLL_AMOUNT:a>this._thumbStartPos+this._thumbLength&&(b=DvtScrollbar.LARGE_SCROLL_AMOUNT);0!=b&&(this._lastMovePos=this._thumbStartPos,this.doScroll(b),this._isLiveScroll&&this._fireMoveEvent(!1),this._fireMoveEvent(!0))};DvtScrollbar.prototype.processArrowDown=function(a){this._arrow=a;this.arrowScroll();this._initScrollTimer.stop();this._initScrollTimer.start()};
DvtScrollbar.prototype.handleArrowDown=function(a,b){this.processArrowDown(a)};DvtScrollbar.prototype.processArrowUp=function(a){this._clearTimers();this._bScrolled&&this._isLiveScroll&&this._fireMoveEvent(!0);this._bScrolled=!1};DvtScrollbar.prototype._clearTimers=function(){this._initScrollTimer.stop();this._scrollTimer.stop()};DvtScrollbar.prototype.handleArrowUp=function(a,b){this.processArrowUp()};
DvtScrollbar.prototype.processThumbDragStart=function(a){this.isHorizontal()?this._clickDiff[DvtScrollbar.THUMB_TYPE]=a.x:this._clickDiff[DvtScrollbar.THUMB_TYPE]=a.y;this._lastMovePos=this._clickStartPos[DvtScrollbar.THUMB_TYPE]=this._thumbStartPos};
DvtScrollbar.prototype.processThumbDragMove=function(a){a=this.isHorizontal()?this._clickStartPos[DvtScrollbar.THUMB_TYPE]+(a.x-this._clickDiff[DvtScrollbar.THUMB_TYPE]):this._clickStartPos[DvtScrollbar.THUMB_TYPE]+(a.y-this._clickDiff[DvtScrollbar.THUMB_TYPE]);this.moveTo(a);this._fireMoveEvent(!1)};DvtScrollbar.prototype.processThumbDragEnd=function(a){var b=0,b=this.isHorizontal()?this._clickDiff[DvtScrollbar.THUMB_TYPE]-a.x:this._clickDiff[DvtScrollbar.THUMB_TYPE]-a.y;0!=b&&this._fireMoveEvent(!0)};
DvtScrollbar.prototype.handleGripDragStart=function(a,b){var c=new DvtPoint(b.pageX,b.pageY);this.processGripDragStart(a,c)};DvtScrollbar.prototype.processGripDragStart=function(a,b){var c=this.getGripperItemType(a);this.isHorizontal()?this._clickDiff[c]=b.x:this._clickDiff[c]=b.y;this._clickStartPos[c]=this._thumbStartPos;this._clickEndPos[c]=this._thumbStartPos+this._thumbLength;this._fireResizeEvent(!1)};
DvtScrollbar.prototype.getGripperItemType=function(a){var b=DvtScrollbar.GRIPPER_START_TYPE;a=a.getType();if(a==DvtScrollbarGripper.TYPE_RIGHT||a==DvtScrollbarGripper.TYPE_BOTTOM)b=DvtScrollbar.GRIPPER_END_TYPE;return b};DvtScrollbar.prototype.handleGripDragMove=function(a,b){var c=new DvtPoint(b.pageX,b.pageY);this.processGripDragMove(a,c)};
DvtScrollbar.prototype.processGripDragMove=function(a,b){var c=this.getGripperItemType(a);switch(a.getType()){case DvtScrollbarGripper.TYPE_LEFT:c=this._clickStartPos[c]+(b.x-this._clickDiff[c]);this.moveStart(c);break;case DvtScrollbarGripper.TYPE_RIGHT:c=this._clickEndPos[c]+(b.x-this._clickDiff[c]);this.moveEnd(c);break;case DvtScrollbarGripper.TYPE_BOTTOM:c=this._clickEndPos[c]+(b.y-this._clickDiff[c]);this.moveEnd(c);break;case DvtScrollbarGripper.TYPE_TOP:c=this._clickStartPos[c]+(b.y-this._clickDiff[c]),
this.moveStart(c)}this._fireResizeEvent(!1)};DvtScrollbar.prototype.handleGripDragEnd=function(a,b){var c=new DvtPoint(b.pageX,b.pageY),d=0,e=this.getGripperItemType(a);switch(a.getType()){case DvtScrollbarGripper.TYPE_LEFT:d=this._clickDiff[e]-c.x;break;case DvtScrollbarGripper.TYPE_RIGHT:d=this._clickDiff[e]-c.x;break;case DvtScrollbarGripper.TYPE_BOTTOM:d=this._clickDiff[e]-c.y;break;case DvtScrollbarGripper.TYPE_TOP:d=this._clickDiff[e]-c.y}0!==d&&this.processGripDragEnd()};
DvtScrollbar.prototype.processGripDragEnd=function(){this._fireResizeEvent(!0)};
DvtScrollbar.prototype._fireMoveEvent=function(a){var b;if(a)b=DvtScrollbarEvent.SB_MOVE_COMPLETE;else if(this._isLiveScroll)b=DvtScrollbarEvent.SB_MOVE;else return;var c=this._thumbStartPos-this._thumbStartMin,d=c+this._thumbLength,e,f,g=null;e=this._thumbStartPos-this._lastMovePos;this._lastMovePos=this._thumbStartPos;f=e/this._thumbLengthMax;if(0!=e||a)g=new DvtScrollbarEvent(b,this,c,d,e,f);g&&this.FireListener(g,!1)};
DvtScrollbar.prototype._fireResizeEvent=function(a){var b=this._thumbStartPos-this._thumbStartMin;a=new DvtScrollbarEvent(a?DvtScrollbarEvent.SB_RESIZE_COMPLETE:DvtScrollbarEvent.SB_RESIZE,this,b,b+this._thumbLength);this.FireListener(a,!1)};DvtScrollbar.prototype.move=function(a,b,c){this.moveSliderPercent(a);b&&this._fireMoveEvent(c)};DvtScrollbar.prototype.moveSliderPercent=function(a){-100>a||100<a||this.moveSlider(a/100*this._thumbLengthMax)};
DvtScrollbar.prototype.moveSlider=function(a){this.isHorizontal();this.moveTo(this._thumbStartPos+a)};DvtScrollbar.prototype.processGlobalMouseUp=function(){this._clearTimers()};DvtScrollbar.prototype.getX=function(){return this._container.getX()};DvtScrollbar.prototype.getY=function(){return this._container.getY()};DvtScrollbar.prototype.getWidth=function(){return this._container.getWidth()};DvtScrollbar.prototype.getHeight=function(){return this._container.getHeight()};
DvtScrollbar.prototype.dispatchTestEvent=function(a,b,c){var d;a<=DvtScrollbar._TEST_ID_THIS?d=this:a==DvtScrollbar._TEST_ID_SCROLL_THUMB?d=this._thumb:a==DvtScrollbar._TEST_ID_SCROLL_BUTTON_DOWN?subcomponent=this._arrowDown:a==DvtScrollbar._TEST_ID_SCROLL_BUTTON_UP&&(d=this._arrowUp);d&&d instanceof DvtDisplayable&&d.dispatchDisplayableEvent(b,c)};DvtScrollbar.prototype.getScrollbarThumb=function(){return this._thumb};
DvtScrollbar.prototype.setLogicalThumbStartAndLength=function(a,b){this._thumbStartPos=this._arrowWidth+a;this._thumbLength=b;this._thumb.updateSize()};DvtScrollbar.prototype.getLogicalThumbStart=function(){return this._thumbStartPos-this._arrowWidth};
DvtScrollbar.prototype.destroy=function(){this._container&&(this._thumb&&(this._thumb.destroy(),this._container.removeChild(this._thumb),this._thumb=null),this._arrowDown&&(this._arrowDown.destroy(),this._container.removeChild(this._arrowDown),this._arrowDown=null),this._arrowUp&&(this._arrowUp.destroy(),this._container.removeChild(this._arrowUp),this._arrowUp=null),this._background&&(this._background.destroy(),this._container.removeChild(this._background),this._background=null));DvtScrollbar.superclass.destroy.call(this);
this._container=null};var DvtScrollbarArrow=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtScrollbarArrow,DvtContainer,"DvtScrollbarArrow");DvtScrollbarArrow.WIDTH=15;DvtScrollbarArrow.ORIENT_RIGHT=0;DvtScrollbarArrow.ORIENT_UP=1;DvtScrollbarArrow.ORIENT_LEFT=2;DvtScrollbarArrow.ORIENT_DOWN=3;DvtScrollbarArrow.ARROW_UP_BORDER="#000000";DvtScrollbarArrow.ARROW_UP_BORDER_ALPHA=0;DvtScrollbarArrow.ARROW_UP_FILL="#000000";DvtScrollbarArrow.BG_UP_FILL_COLORS=["#ffffff","#ffffff"];
DvtScrollbarArrow.BG_UP_FILL_ALPHAS=[0,0];DvtScrollbarArrow.BG_UP_FILL_RATIOS=[0,255];DvtScrollbarArrow.ARROW_OVER_BORDER="#000000";DvtScrollbarArrow.ARROW_OVER_BORDER_ALPHA=0;DvtScrollbarArrow.ARROW_OVER_FILL="#000000";DvtScrollbarArrow.BG_OVER_FILL_COLORS=["#0d8cf9","#4ab5fc"];DvtScrollbarArrow.BG_OVER_FILL_ALPHAS=[1,1];DvtScrollbarArrow.BG_OVER_FILL_RATIOS=[0,255];DvtScrollbarArrow.ARROW_DOWN_BORDER="#4e555e";DvtScrollbarArrow.ARROW_DOWN_BORDER_ALPHA=1;DvtScrollbarArrow.ARROW_DOWN_FILL="#ffffff";
DvtScrollbarArrow.BG_DOWN_FILL_COLORS=["#4e555e","#a7b7d4"];DvtScrollbarArrow.BG_DOWN_FILL_ALPHAS=[1,1];DvtScrollbarArrow.BG_DOWN_FILL_RATIOS=[0,255];
DvtScrollbarArrow.prototype.Init=function(a,b){var c,d,e,f;this._sb=a;this._orientation=b;this._arrow=null;this._disabled=!1;a.isHorizontal()?(b==DvtScrollbarArrow.ORIENT_LEFT?(c=a.getX(),d=a.getY()):b==DvtScrollbarArrow.ORIENT_RIGHT&&(c=a.getX()+a.getWidth()-DvtScrollbarArrow.WIDTH,d=a.getY()),e=DvtScrollbarArrow.WIDTH,f=a.getHeight()):(b==DvtScrollbarArrow.ORIENT_DOWN?(c=a.getX(),d=a.getY()+a.getHeight()-DvtScrollbarArrow.WIDTH):b==DvtScrollbarArrow.ORIENT_UP&&(c=a.getX(),d=a.getY()),e=a.getWidth(),
f=DvtScrollbarArrow.WIDTH);var g=a.getCtx();DvtScrollbarArrow.superclass.Init.call(this,g);this._container=new DvtRect(g,c,d,e,f,null);this._arrowUpBorderColor=DvtScrollbarArrow.ARROW_UP_BORDER;this._arBGUpFillColors=DvtScrollbarArrow.BG_UP_FILL_COLORS;this._arrowOverBorderColor=DvtScrollbarArrow.ARROW_OVER_BORDER;this._arBGOverFillColors=DvtScrollbarArrow.BG_OVER_FILL_COLORS;this._arrowDownBorderColor=DvtScrollbarArrow.ARROW_DOWN_BORDER;this._arBGDownFillColors=DvtScrollbarArrow.BG_DOWN_FILL_COLORS;
this._upFill=new DvtLinearGradientFill(0,this._arBGUpFillColors,DvtScrollbarArrow.BG_UP_FILL_ALPHAS);this._overFill=new DvtLinearGradientFill(0,this._arBGOverFillColors,DvtScrollbarArrow.BG_OVER_FILL_ALPHAS);this._downFill=new DvtLinearGradientFill(0,this._arBGDownFillColors,DvtScrollbarArrow.BG_DOWN_FILL_ALPHAS);this._arrowUpFill=new DvtSolidFill(DvtScrollbarArrow.ARROW_UP_FILL,null);this._arrowOverFill=new DvtSolidFill(DvtScrollbarArrow.ARROW_OVER_FILL,null);this._arrowDownFill=new DvtSolidFill(DvtScrollbarArrow.ARROW_DOWN_FILL,
null);this._arrowUpBorder=new DvtSolidStroke(DvtScrollbarArrow.ARROW_UP_BORDER,null,DvtScrollbarArrow.ARROW_UP_BORDER_ALPHA);this._arrowOverBorder=new DvtSolidStroke(DvtScrollbarArrow.ARROW_OVER_BORDER,null,DvtScrollbarArrow.ARROW_OVER_BORDER_ALPHA);this._arrowDownBorder=new DvtSolidStroke(DvtScrollbarArrow.ARROW_DOWN_BORDER,null,DvtScrollbarArrow.ARROW_DOWN_BORDER_ALPHA);this._arrow=this._createArrow();this._container.setPixelHinting(!0);DvtAgent.isTouchDevice()?(this.addEvtListener(DvtTouchEvent.TOUCHSTART,
this._touchHandler,!1,this),this.addEvtListener(DvtTouchEvent.TOUCHMOVE,this._touchHandler,!1,this),this.addEvtListener(DvtTouchEvent.TOUCHEND,this._touchHandler,!1,this)):(this.addEvtListener(DvtMouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this),this.addEvtListener(DvtMouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this),this.addEvtListener(DvtMouseEvent.MOUSEDOWN,this._mouseDownHandler,!1,this),this.addEvtListener(DvtMouseEvent.MOUSEUP,this._mouseUpHandler,!1,this));this._container.addChild(this._arrow);
this.addChild(this._container);this._drawOutState()};DvtScrollbarArrow.prototype.getOrientation=function(){return this._orientation};
DvtScrollbarArrow.prototype._createArrow=function(){var a=this._container._impl.getX()+this._container._impl.getWidth()/2,b=this._container._impl.getY()+this._container._impl.getHeight()/2,c=[];this._orientation==DvtScrollbarArrow.ORIENT_RIGHT?(c.push(a-2,b-3),c.push(a+2,b),c.push(a-2,b+3),c.push(c[0],c[1])):this._orientation==DvtScrollbarArrow.ORIENT_UP?(c.push(a-3,b+2),c.push(a,b-2),c.push(a+3,b+2),c.push(c[0],c[1])):this._orientation==DvtScrollbarArrow.ORIENT_LEFT?(c.push(a+2,b-3),c.push(a-2,b),
c.push(a+2,b+3),c.push(c[0],c[1])):this._orientation==DvtScrollbarArrow.ORIENT_DOWN&&(c.push(a-3,b-2),c.push(a,b+2),c.push(a+3,b-2),c.push(c[0],c[1]));a=new DvtPolygon(this.getCtx(),c,null);a.setFill(this._arrowUpFill);a.setStroke(this._arrowUpBorder);a.setMouseEnabled(!1);return a};DvtScrollbarArrow.prototype._mouseOverHandler=function(a){this._drawOverState();this._disabled=!1;a&&a.preventDefault()};
DvtScrollbarArrow.prototype._mouseOutHandler=function(a){this._drawOutState();this._disabled=!0;a&&a.preventDefault()};DvtScrollbarArrow.prototype._mouseDownHandler=function(a){this._drawDownState();this._sb.handleArrowDown(this,a);a&&a.preventDefault()};DvtScrollbarArrow.prototype._mouseUpHandler=function(a){this._drawOverState();this._sb.handleArrowUp(this,a);a&&a.preventDefault()};
DvtScrollbarArrow.prototype._touchHandler=function(a){var b=a.type;b==DvtTouchEvent.TOUCHSTART?!this._dragStarted&&(b=a.targetTouches[0])&&(this._sb.processArrowDown(this),this._dragStarted=!0,this._touchId=b.identifier):b==DvtTouchEvent.TOUCHMOVE?this._dragStarted&&DvtTouchManager.getTouchById(this._touchId,a.touches):b==DvtTouchEvent.TOUCHEND&&this._dragStarted&&(b=DvtTouchManager.getTouchById(this._touchId,a.changedTouches))&&(this._sb.processArrowUp(this),this._dragStarted=!1,this._touchId=null);
a.blockTouchHold();a.preventDefault()};DvtScrollbarArrow.prototype._drawOutState=function(){this._container.setFill(this._upFill);this._arrow.setStroke(this._arrowUpBorder);this._arrow.setFill(this._arrowUpFill)};DvtScrollbarArrow.prototype._drawOverState=function(){this._container.setFill(this._overFill);this._arrow.setStroke(this._arrowOverBorder);this._arrow.setFill(this._arrowOverFill)};
DvtScrollbarArrow.prototype._drawDownState=function(){this._container.setFill(this._downFill);this._arrow.setStroke(this._arrowDownBorder);this._arrow.setFill(this._arrowDownFill)};DvtScrollbarArrow.prototype.isDisabled=function(){return this._disabled};
DvtScrollbarArrow.prototype.destroy=function(){DvtAgent.isTouchDevice()?(this.removeEvtListener(DvtTouchEvent.TOUCHSTART,this._touchHandler,!1,this),this.removeEvtListener(DvtTouchEvent.TOUCHMOVE,this._touchHandler,!1,this),this.removeEvtListener(DvtTouchEvent.TOUCHEND,this._touchHandler,!1,this)):(this.removeEvtListener(DvtMouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this),this.removeEvtListener(DvtMouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this),this.removeEvtListener(DvtMouseEvent.MOUSEDOWN,
this._mouseDownHandler,!1,this),this.removeEvtListener(DvtMouseEvent.MOUSEUP,this._mouseUpHandler,!1,this));this._container&&this._arrow&&(this._container.removeChild(this._arrow),this._arrow=null);DvtScrollbarArrow.superclass.destroy.call(this);this._container=null};var DvtScrollbarBackground=function(a){this.Init(a)};DvtObj.createSubclass(DvtScrollbarBackground,DvtContainer,"DvtScrollbarBackground");DvtScrollbarBackground.BORDER_COLOR="rgb(206,211,226)";
DvtScrollbarBackground.FILL_COLORS=["#fafafb","#e7e9ef"];
DvtScrollbarBackground.prototype.Init=function(a){var b,c,d,e;this._sb=a;b=a.getX();c=a.getY();d=a.getWidth();e=a.getHeight();var f=a.getCtx();DvtScrollbarBackground.superclass.Init.call(this,f);this._container=new DvtRect(f,b,c,d,e,null);this.addChild(this._container);var g;b=a.getStyleMap();var h;b&&(c=b[DvtScrollbar.BACKGROUND],h=b[DvtScrollbar.BORDER_COLOR],c?DvtColorUtils.isColor(c)&&(g=new DvtSolidFill(c)):(b=DvtGradientParser.parseCSSGradient(c))&&(g=new DvtLinearGradientFill(b.getAngle(),
b.getColors(),b.getAlphas(),b.getRatios())));g||(a=a.isHorizontal()?90:180,g=new DvtLinearGradientFill(a,DvtScrollbarBackground.FILL_COLORS));this._container.setSolidStroke(h?h:DvtScrollbarBackground.BORDER_COLOR);this._container.setFill(g);this._container.setPixelHinting(!0);DvtAgent.isTouchDevice()?(this.addEvtListener(DvtTouchEvent.TOUCHSTART,this._touchHandler,!1,this),this.addEvtListener(DvtTouchEvent.TOUCHMOVE,this._touchHandler,!1,this),this.addEvtListener(DvtTouchEvent.TOUCHEND,this._touchHandler,
!1,this)):this.addEvtListener(DvtMouseEvent.CLICK,this._mouseClickHandler,!1,this)};
DvtScrollbarBackground.prototype._touchHandler=function(a){var b=a.type;b==DvtTouchEvent.TOUCHSTART?!this._backgroundClickStarted&&(b=a.targetTouches[0])&&(this._backgroundClickStarted=!0,this._touchId=b.identifier):b!=DvtTouchEvent.TOUCHMOVE&&b==DvtTouchEvent.TOUCHEND&&this._backgroundClickStarted&&(b=DvtTouchManager.getTouchById(this._touchId,a.changedTouches))&&(b=this.getCtx().getRelativePosition(b.pageX,b.pageY),b=new DvtPoint(b.x,b.y),this._sb.processBackgroundClick(b),this._backgroundClickStarted=
!1,this._touchId=null);a.blockTouchHold();a.preventDefault()};DvtScrollbarBackground.prototype._mouseClickHandler=function(a){var b=this.getCtx().getRelativePosition(a._event.pageX,a._event.pageY),b=new DvtPoint(b.x,b.y);this._sb.processBackgroundClick(b);a&&a.preventDefault()};
DvtScrollbarBackground.prototype.destroy=function(){DvtAgent.isTouchDevice()?(this.removeEvtListener(DvtTouchEvent.TOUCHSTART,this._touchHandler,!1,this),this.removeEvtListener(DvtTouchEvent.TOUCHMOVE,this._touchHandler,!1,this),this.removeEvtListener(DvtTouchEvent.TOUCHEND,this._touchHandler,!1,this)):this.removeEvtListener(DvtMouseEvent.CLICK,this._mouseClickHandler,!1,this);DvtScrollbarBackground.superclass.destroy.call(this);this._container=null};
var DvtScrollbarGripper=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtScrollbarGripper,DvtContainer,"DvtScrollbarGripper");DvtScrollbarGripper.TYPE_LEFT=0;DvtScrollbarGripper.TYPE_RIGHT=1;DvtScrollbarGripper.TYPE_TOP=2;DvtScrollbarGripper.TYPE_BOTTOM=3;DvtScrollbarGripper.SIZE_GRIPPY=6;DvtScrollbarGripper.SIZE_NAIL=2;DvtScrollbarGripper.GRIPPY_UP_BORDER_COLOR="#097bf8";DvtScrollbarGripper.GRIPPY_UP_FILL_COLORS=["#0477f8","#68befe"];DvtScrollbarGripper.GRIPPY_UP_FILL_ALPHAS=[1,1];
DvtScrollbarGripper.GRIPPY_UP_FILL_RATIOS=[0,255];DvtScrollbarGripper.NAIL_UP_BORDER_COLOR="#097bf8";DvtScrollbarGripper.NAIL_UP_FILL_COLORS=["#1280f8","#c1ddfc"];DvtScrollbarGripper.NAIL_UP_FILL_ALPHAS=[1,1];DvtScrollbarGripper.NAIL_UP_FILL_RATIOS=[0,255];DvtScrollbarGripper.GRIPPY_OVER_BORDER_COLOR=DvtScrollbarGripper.GRIPPY_UP_BORDER_COLOR;DvtScrollbarGripper.GRIPPY_OVER_FILL_COLORS=DvtScrollbarGripper.GRIPPY_UP_FILL_COLORS;DvtScrollbarGripper.GRIPPY_OVER_FILL_ALPHAS=DvtScrollbarGripper.GRIPPY_UP_FILL_ALPHAS;
DvtScrollbarGripper.GRIPPY_OVER_FILL_RATIOS=DvtScrollbarGripper.GRIPPY_UP_FILL_RATIOS;DvtScrollbarGripper.NAIL_OVER_BORDER_COLOR=DvtScrollbarGripper.NAIL_UP_BORDER_COLOR;DvtScrollbarGripper.NAIL_OVER_FILL_COLORS=DvtScrollbarGripper.NAIL_UP_FILL_COLORS;DvtScrollbarGripper.NAIL_OVER_FILL_ALPHAS=DvtScrollbarGripper.NAIL_UP_FILL_ALPHAS;DvtScrollbarGripper.NAIL_OVER_FILL_RATIOS=DvtScrollbarGripper.NAIL_UP_FILL_RATIOS;DvtScrollbarGripper.GRIPPY_TOUCH_BORDER_COLOR="c2cadb";
DvtScrollbarGripper.GRIPPY_TOUCH_FILL_COLORS=["#ffffff","#c2cadb"];DvtScrollbarGripper.GRIPPY_TOUCH_FILL_ALPHAS=DvtScrollbarGripper.GRIPPY_UP_FILL_ALPHAS;DvtScrollbarGripper.GRIPPY_TOUCH_FILL_RATIOS=DvtScrollbarGripper.GRIPPY_UP_FILL_RATIOS;DvtScrollbarGripper.NAIL_TOUCH_BORDER_COLOR="c2cadb";DvtScrollbarGripper.NAIL_TOUCH_FILL_COLORS=["#ffffff","#c2cadb"];DvtScrollbarGripper.NAIL_TOUCH_FILL_ALPHAS=DvtScrollbarGripper.NAIL_UP_FILL_ALPHAS;DvtScrollbarGripper.NAIL_TOUCH_FILL_RATIOS=DvtScrollbarGripper.NAIL_UP_FILL_RATIOS;
DvtScrollbarGripper.GRIPPY_DOWN_BORDER_COLOR="#097bf8";DvtScrollbarGripper.GRIPPY_DOWN_FILL_COLORS=["#3595fe","#034ea0"];DvtScrollbarGripper.GRIPPY_DOWN_FILL_ALPHAS=[1,1];DvtScrollbarGripper.GRIPPY_DOWN_FILL_RATIOS=[0,255];DvtScrollbarGripper.NAIL_DOWN_BORDER_COLOR="#097bf8";DvtScrollbarGripper.NAIL_DOWN_FILL_COLORS=["#ffffff","#bfdefd"];DvtScrollbarGripper.NAIL_DOWN_FILL_ALPHAS=[1,1];DvtScrollbarGripper.NAIL_DOWN_FILL_RATIOS=[0,255];DvtScrollbarGripper.TOUCH_WIDTH=28;
DvtScrollbarGripper.TOUCH_HEIGHT=25;
DvtScrollbarGripper.prototype.Init=function(a,b){var c,d,e,f;this._thumb=a;this._type=b;var g=0,h=0;a.isHorizontal()?(d=a.getY(),e=DvtScrollbarGripper.SIZE_GRIPPY+DvtScrollbarGripper.SIZE_NAIL,f=a.getHeight(),b==DvtScrollbarGripper.TYPE_LEFT?c=a.getX():b==DvtScrollbarGripper.TYPE_RIGHT&&(c=a.getX()+a.getWidth()-e),g=270,h=90):(c=a.getX(),e=a.getWidth(),f=DvtScrollbarGripper.SIZE_GRIPPY+DvtScrollbarGripper.SIZE_NAIL,b==DvtScrollbarGripper.TYPE_TOP?d=a.getY():b==DvtScrollbarGripper.TYPE_BOTTOM&&(d=
a.getY()+a.getHeight()-f),h=180);var k=a.getCtx();DvtScrollbarGripper.superclass.Init.call(this,k);this._container=new DvtRect(k,c,d,e,f,null);this._grippyUpBorderColor=DvtScrollbarGripper.GRIPPY_UP_BORDER_COLOR;this._grippyUpFillColors=DvtScrollbarGripper.GRIPPY_UP_FILL_COLORS;this._nailUpBorderColor=DvtScrollbarGripper.NAIL_UP_BORDER_COLOR;this._nailUpFillColors=DvtScrollbarGripper.NAIL_UP_FILL_COLORS;this._grippyOverBorderColor=DvtScrollbarGripper.GRIPPY_OVER_BORDER_COLOR;this._grippyOverFillColors=
DvtScrollbarGripper.GRIPPY_OVER_FILL_COLORS;this._grippyTouchBorderColor=DvtScrollbarGripper.GRIPPY_TOUCH_BORDER_COLOR;this._grippyTouchFillColors=DvtScrollbarGripper.GRIPPY_TOUCH_FILL_COLORS;this._nailOverBorderColor=DvtScrollbarGripper.NAIL_OVER_BORDER_COLOR;this._nailOverFillColors=DvtScrollbarGripper.NAIL_OVER_FILL_COLORS;this._nailTouchBorderColor=DvtScrollbarGripper.NAIL_TOUCH_BORDER_COLOR;this._nailTouchFillColors=DvtScrollbarGripper.NAIL_TOUCH_FILL_COLORS;this._grippyDownBorderColor=DvtScrollbarGripper.GRIPPY_DOWN_BORDER_COLOR;
this._grippyDownFillColors=DvtScrollbarGripper.GRIPPY_DOWN_FILL_COLORS;this._nailDownBorderColor=DvtScrollbarGripper.NAIL_DOWN_BORDER_COLOR;this._nailDownFillColors=DvtScrollbarGripper.NAIL_DOWN_FILL_COLORS;this._upStroke=new DvtSolidStroke(this._grippyUpBorderColor,null,1);this._upFill=new DvtLinearGradientFill(g,this._grippyUpFillColors,DvtScrollbarGripper.GRIPPY_UP_FILL_ALPHAS);this._nailUpStroke=new DvtSolidStroke(this._nailUpBorderColor,null,1);this._nailUpFill=new DvtLinearGradientFill(h,this._nailUpFillColors,
DvtScrollbarGripper.NAIL_UP_FILL_ALPHAS);this._overStroke=new DvtSolidStroke(this._grippyOverBorderColor,null,1);this._overFill=new DvtLinearGradientFill(g,this._grippyOverFillColors,DvtScrollbarGripper.GRIPPY_OVER_FILL_ALPHAS);this._touchStroke=new DvtSolidStroke(this._grippyTouchBorderColor,null,1);this._touchFill=new DvtLinearGradientFill(g,this._grippyTouchFillColors,DvtScrollbarGripper.GRIPPY_TOUCH_FILL_ALPHAS);this._nailOverStroke=new DvtSolidStroke(this._nailOverBorderColor,null,1);this._nailOverFill=
new DvtLinearGradientFill(h,this._nailOverFillColors,DvtScrollbarGripper.NAIL_OVER_FILL_ALPHAS);this._touchStroke=new DvtSolidStroke(this._grippyTouchBorderColor,null,1);this._touchFill=new DvtLinearGradientFill(g,this._grippyTouchFillColors,DvtScrollbarGripper.GRIPPY_OVER_FILL_ALPHAS);this._nailTouchStroke=new DvtSolidStroke(this._nailTouchBorderColor,null,1);this._nailTouchFill=new DvtLinearGradientFill(h,this._nailTouchFillColors,DvtScrollbarGripper.NAIL_TOUCH_FILL_ALPHAS);this._downStroke=new DvtSolidStroke(this._grippyDownBorderColor,
null,1);this._downFill=new DvtLinearGradientFill(g,this._grippyDownFillColors,DvtScrollbarGripper.GRIPPY_DOWN_FILL_ALPHAS);this._nailDownStroke=new DvtSolidStroke(this._nailDownBorderColor,null,1);this._nailDownFill=new DvtLinearGradientFill(h,this._nailDownFillColors,DvtScrollbarGripper.NAIL_DOWN_FILL_ALPHAS);DvtAgent.isTouchDevice()?(this.addEvtListener(DvtTouchEvent.TOUCHSTART,this._touchHandler,!1,this),this.addEvtListener(DvtTouchEvent.TOUCHMOVE,this._touchHandler,!1,this),this.addEvtListener(DvtTouchEvent.TOUCHEND,
this._touchHandler,!1,this)):(this.addEvtListener(DvtMouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this),this.addEvtListener(DvtMouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this),this.addEvtListener(DvtMouseEvent.MOUSEDOWN,this._mouseDownHandler,!1,this));this._grippy=this._createGrippy();c=new DvtRectangle(this._grippy.getX(),this._grippy.getY(),this._grippy.getWidth(),this._grippy.getHeight());DvtAgent.isTouchDevice()&&(this._touchArea=new DvtRect(this.getCtx(),c.x-(DvtScrollbarGripper.TOUCH_WIDTH-
c.w)/2,c.y-(DvtScrollbarGripper.TOUCH_HEIGHT-c.h)/2,DvtScrollbarGripper.TOUCH_WIDTH,DvtScrollbarGripper.TOUCH_HEIGHT,null),this._touchArea.setInvisibleFill(),this._container.addChild(this._touchArea));this._container.addChild(this._grippy);this.addChild(this._container);DvtAgent.isTouchDevice()?this._drawOverState():this._drawOutState();this._container.setPixelHinting(!0);this._grippy.setPixelHinting(!0);this._grippy.setMouseEnabled(!1);DvtGraphSysUtils.makeDetObject(this._container);this._thumb.isHorizontal()?
this._container.getImpl().getElem().setAttributeNS(null,"cursor","e-resize"):this._container.getImpl().getElem().setAttributeNS(null,"cursor","n-resize")};DvtScrollbarGripper.prototype.immediateTouchAttempted=function(a,b){var c=this._thumb._sb,d=this.getTouchManager(),e=this.getCtx().getRelativePosition(b.pageX,b.pageY);this._thumb.processGripDragStart(this,e);d.saveProcessedTouchDefault(b.identifier,this,this._container,c,"gripper",this);this._thumb.drawFullHighlightState();a.blockTouchHold()};
DvtScrollbarGripper.prototype.immediateTouchMoved=function(a,b){var c=this.getCtx().getRelativePosition(b.pageX,b.pageY);this._thumb.processGripDragMove(this,c);a.preventDefault()};DvtScrollbarGripper.prototype.immediateTouchEnded=function(a,b){this.getTouchManager().containsGrouping(this._thumb._sb)||this._thumb.drawFullPlainState();this._thumb.processGripDragEnd()};
DvtScrollbarGripper.prototype._touchHandler=function(a){this.getTouchManager().preEventBubble(a);this.getTouchManager().processAssociatedTouchDefault(a,this);this.getTouchManager().postEventBubble(a)};DvtScrollbarGripper.prototype.getType=function(){return this._type};
DvtScrollbarGripper.prototype._createGrippy=function(){var a,b,c,d;switch(this._type){case DvtScrollbarGripper.TYPE_LEFT:a=this.getX()+DvtScrollbarGripper.SIZE_NAIL;b=this.getY();c=DvtScrollbarGripper.SIZE_GRIPPY;d=this.getHeight();break;case DvtScrollbarGripper.TYPE_RIGHT:a=this.getX();b=this.getY();c=DvtScrollbarGripper.SIZE_GRIPPY;d=this.getHeight();break;case DvtScrollbarGripper.TYPE_TOP:a=this.getX();b=this.getY()+DvtScrollbarGripper.SIZE_NAIL;c=this.getWidth();d=DvtScrollbarGripper.SIZE_GRIPPY;
break;case DvtScrollbarGripper.TYPE_BOTTOM:a=this.getX(),b=this.getY(),c=this.getWidth(),d=DvtScrollbarGripper.SIZE_GRIPPY}return new DvtRect(this.getCtx(),a,b,c,d,null)};
DvtScrollbarGripper.prototype.updatePosition=function(){this._type==DvtScrollbarGripper.TYPE_LEFT?(this.setX(this._thumb.getX()),this._grippy.setX(this.getX()+DvtScrollbarGripper.SIZE_NAIL),this._touchArea&&this._touchArea.setX(this._grippy.getX()-(DvtScrollbarGripper.TOUCH_WIDTH-this._grippy.getWidth())/2)):this._type==DvtScrollbarGripper.TYPE_RIGHT?(this.setX(this._thumb.getX()+this._thumb.getWidth()-DvtScrollbarGripper.SIZE_GRIPPY-DvtScrollbarGripper.SIZE_NAIL),this._grippy.setX(this.getX()),this._touchArea&&
this._touchArea.setX(this._grippy.getX()-(DvtScrollbarGripper.TOUCH_WIDTH-this._grippy.getWidth())/2)):this._type==DvtScrollbarGripper.TYPE_TOP?(this.setY(this._thumb.getY()),this._grippy.setY(this.getY()+DvtScrollbarGripper.SIZE_NAIL),this._touchArea&&this._touchArea.setY(this._grippy.getY()-(DvtScrollbarGripper.TOUCH_HEIGHT-this._grippy.getHeight())/2)):this._type==DvtScrollbarGripper.TYPE_BOTTOM&&(this.setY(this._thumb.getY()+this._thumb.getHeight()-DvtScrollbarGripper.SIZE_GRIPPY-DvtScrollbarGripper.SIZE_NAIL),
this._grippy.setY(this.getY()),this._touchArea&&this._touchArea.setY(this._grippy.getY()-(DvtScrollbarGripper.TOUCH_HEIGHT-this._grippy.getHeight())/2))};DvtScrollbarGripper.prototype.setAlpha=function(a){this._container.setAlpha(a);.001>=a?this._grippy.setVisible(!1):this._grippy.setVisible(!0)};DvtScrollbarGripper.prototype._mouseOverHandler=function(a){this._drawOverState();a&&a.preventDefault()};DvtScrollbarGripper.prototype._mouseOutHandler=function(a){this._drawOutState();a&&a.preventDefault()};
DvtScrollbarGripper.prototype._mouseDownHandler=function(a){this.removeEvtListener(DvtMouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this);this.removeEvtListener(DvtMouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this);this._thumb.handleGripDragStart(this,a);this._drawDownState();this.getCtx().getStage().addEvtListener(DvtMouseEvent.MOUSEMOVE,this._mouseMoveHandler,!1,this);this.getCtx().getStage().addEvtListener(DvtMouseEvent.MOUSEUP,this._mouseUpHandler,!1,this);a&&(a.preventDefault(),a.stopPropagation())};
DvtScrollbarGripper.prototype._mouseMoveHandler=function(a){this._thumb.handleGripDragMove(this,a);a&&a.preventDefault()};
DvtScrollbarGripper.prototype._mouseUpHandler=function(a){this.getCtx().getStage().removeEvtListener(DvtMouseEvent.MOUSEMOVE,this._mouseMoveHandler,!1,this);this.getCtx().getStage().removeEvtListener(DvtMouseEvent.MOUSEUP,this._mouseUpHandler,!1,this);this.addEvtListener(DvtMouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this);this.addEvtListener(DvtMouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this);this._drawUpState();this._thumb.handleGripDragEnd(this,a);a&&a.preventDefault()};
DvtScrollbarGripper.prototype.drawHighlightState=function(){this.setStroke(this._nailOverStroke);this.setFill(this._nailOverFill);this._grippy.setStroke(this._overStroke);this._grippy.setFill(this._overFill)};DvtScrollbarGripper.prototype.drawPlainState=function(){this.setStroke(this._nailTouchStroke);this.setFill(this._nailTouchFill);this._grippy.setStroke(this._touchStroke);this._grippy.setFill(this._touchFill)};
DvtScrollbarGripper.prototype._drawOverState=function(){this.setAlpha(1);DvtAgent.isTouchDevice()?this.drawPlainState():this.drawHighlightState()};DvtScrollbarGripper.prototype._drawUpState=function(){this.setStroke(this._nailUpStroke);this.setFill(this._nailUpFill);this._grippy.setStroke(this._upStroke);this._grippy.setFill(this._upFill)};
DvtScrollbarGripper.prototype._drawDownState=function(){this.setStroke(this._nailDownStroke);this.setFill(this._nailDownFill);this._grippy.setStroke(this._downStroke);this._grippy.setFill(this._downFill)};DvtScrollbarGripper.prototype._drawOutState=function(){this.setAlpha(.001);this.setStroke(this._nailUpStroke);this.setFill(this._nailUpFill);this._grippy.setStroke(this._upStroke);this._grippy.setFill(this._upFill)};DvtScrollbarGripper.prototype.getContainer=function(){return this._container};
DvtScrollbarGripper.prototype.getX=function(){return this._container.getX()};DvtScrollbarGripper.prototype.getY=function(){return this._container.getY()};DvtScrollbarGripper.prototype.getWidth=function(){return this._container.getWidth()};DvtScrollbarGripper.prototype.getHeight=function(){return this._container.getHeight()};DvtScrollbarGripper.prototype.setX=function(a){this._container.setX(a)};DvtScrollbarGripper.prototype.setY=function(a){this._container.setY(a)};
DvtScrollbarGripper.prototype.setStroke=function(a){this._container.setStroke(a)};DvtScrollbarGripper.prototype.setSolidStroke=function(a,b,c){this._container.setSolidStroke(a,b,c)};DvtScrollbarGripper.prototype.setFill=function(a){this._container.setFill(a)};DvtScrollbarGripper.prototype.setSolidFill=function(a,b){this._container.setSolidFill(a,b)};
DvtScrollbarGripper.prototype.destroy=function(){DvtAgent.isTouchDevice()?(this.removeEvtListener(DvtTouchEvent.TOUCHSTART,this._touchHandler,!1,this),this.removeEvtListener(DvtTouchEvent.TOUCHMOVE,this._touchHandler,!1,this),this.removeEvtListener(DvtTouchEvent.TOUCHEND,this._touchHandler,!1,this)):(this.removeEvtListener(DvtMouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this),this.removeEvtListener(DvtMouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this),this.removeEvtListener(DvtMouseEvent.MOUSEDOWN,
this._mouseDownHandler,!1,this),this.getCtx().getStage().removeEvtListener(DvtMouseEvent.MOUSEMOVE,this._mouseMoveHandler,!1,this),this.getCtx().getStage().removeEvtListener(DvtMouseEvent.MOUSEUP,this._mouseUpHandler,!1,this));this._container&&this._grippy&&(this._container.removeChild(this._grippy),this._grippy=null);DvtScrollbarGripper.superclass.destroy.call(this);this._container=null};
DvtScrollbarGripper.prototype.getTouchManager=function(){!this._touchManager&&DvtAgent.isTouchDevice()&&(this._touchManager=this._thumb.getTouchManager());return this._touchManager};var DvtScrollbarThumb=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtScrollbarThumb,DvtContainer,"DvtScrollbarThumb");DvtScrollbarThumb.UP_BORDER_COLOR="#c2cadb";DvtScrollbarThumb.UP_FILL_COLORS=["#ffffff","#e4eef8"];DvtScrollbarThumb.UP_FILL_ALPHAS=[1,1];DvtScrollbarThumb.UP_FILL_RATIOS=[70,255];
DvtScrollbarThumb.OVER_BORDER_COLOR="#097bf8";DvtScrollbarThumb.OVER_FILL_COLORS=["#ffffff","#bfdefd"];DvtScrollbarThumb.OVER_FILL_ALPHAS=[1,1];DvtScrollbarThumb.OVER_FILL_RATIOS=[70,255];DvtScrollbarThumb.DOWN_BORDER_COLOR="#c2cadb";DvtScrollbarThumb.DOWN_FILL_COLORS=["#ffffff","#e4eef8"];DvtScrollbarThumb.DOWN_FILL_ALPHAS=[1,1];DvtScrollbarThumb.DOWN_FILL_RATIOS=[70,255];DvtScrollbarThumb.GRIP_ZONE_COLOR="#b6bbca";
DvtScrollbarThumb.prototype.Init=function(a,b,c){var d,e;this._sb=a;this._drawGrippers=b;this._skinName=c;a.isHorizontal()?(b=a.getX()+a.getThumbStart(),c=a.getY(),d=a.getThumbLength(),e=a.getHeight()):(b=a.getX(),c=a.getY()+a.getHeight()-a.getThumbStart()-a.getThumbLength(),d=a.getWidth(),e=a.getThumbLength());var f=a.getCtx();DvtScrollbarThumb.superclass.Init.call(this,f);this._container=new DvtRect(f,b,c,d,e,null);b=this._sb.isHorizontal()?270:0;a=a.getStyleMap();this.IsSkinAlta()&&a?(this._upFill=
new DvtSolidFill(a[DvtScrollbar.HANDLE_COLOR]),this._overFill=new DvtSolidFill(a[DvtScrollbar.HANDLE_HOVER_COLOR]),this._downFill=new DvtSolidFill(a[DvtScrollbar.HANDLE_ACTIVE_COLOR]),this._downStroke=this._overStroke=this._upStroke=null):(this._upFill=new DvtLinearGradientFill(b,DvtScrollbarThumb.UP_FILL_COLORS,DvtScrollbarThumb.UP_FILL_ALPHAS),this._overFill=new DvtLinearGradientFill(b,DvtScrollbarThumb.OVER_FILL_COLORS,DvtScrollbarThumb.OVER_FILL_ALPHAS),this._downFill=new DvtLinearGradientFill(b,
DvtScrollbarThumb.DOWN_FILL_COLORS,DvtScrollbarThumb.DOWN_FILL_ALPHAS),this._upStroke=new DvtSolidStroke(DvtScrollbarThumb.UP_BORDER_COLOR,null,1),this._overStroke=new DvtSolidStroke(DvtScrollbarThumb.OVER_BORDER_COLOR,null,1),this._downStroke=new DvtSolidStroke(DvtScrollbarThumb.DOWN_BORDER_COLOR,null,1),this._grip=this._createGrip(),this._container.addChild(this._grip),this._drawGrippers&&(this._startGripper=this._createStartGripper(),this._endGripper=this._createEndGripper(),this._container.addChild(this._startGripper),
this._container.addChild(this._endGripper)));DvtAgent.isTouchDevice()?(this.addEvtListener(DvtTouchEvent.TOUCHSTART,this._touchHandler,!1,this),this.addEvtListener(DvtTouchEvent.TOUCHMOVE,this._touchHandler,!1,this),this.addEvtListener(DvtTouchEvent.TOUCHEND,this._touchHandler,!1,this)):(this.addEvtListener(DvtMouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this),this.addEvtListener(DvtMouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this),this.addEvtListener(DvtMouseEvent.MOUSEDOWN,this._mouseDownHandler,
!1,this));this._container.setPixelHinting(!0);DvtGraphSysUtils.makeDetObject(this._container);this.addChild(this._container);a=this._makeTooltipText();this._container._Dlo.setUseTooltip(!0);this._container._Dlo.setTooltip(a);this._drawGrippers&&(this._startGripper.getContainer()._Dlo.setUseTooltip(!0),this._startGripper.getContainer()._Dlo.setTooltip(a),this._endGripper.getContainer()._Dlo.setUseTooltip(!0),this._endGripper.getContainer()._Dlo.setTooltip(a));DvtAgent.isTouchDevice()?this._drawOverState():
this._drawUpState()};DvtScrollbarThumb.prototype.setChart=function(a){this._Dlo._Chart=a;this._startGripper._Dlo._Chart=a;this._endGripper._Dlo._Chart=a};
DvtScrollbarThumb.prototype._makeTooltipText=function(){var a=this._sb.getAxis();if(null==a)return"";var b,c,d=b="",e=this._Dlo._Chart.getType(),f=0<=e.indexOf("BAR_HORIZ");this._sb.isHorizontal()?(b=this.getX()-this._sb.getX(),c=b+this.getWidth()):f?(b=this.getY()-this._sb.getY(),c=b+this.getHeight()):(c=this.getY()-this._sb.getY(),b=c+this.getHeight());if(a instanceof DvtDataAxis)b=a.getLabelAt(b),d=a.getLabelAt(c);else if(a instanceof DvtTimeAxis)b=a.getLabelAt(b),d=a.getLabelAt(c);else if(a instanceof
DvtCustomAxis){var d=a.getNumLabels(),e=0<=e.indexOf("LINE")||0<=e.indexOf("AREA"),g=b-DvtScrollbarArrow.WIDTH;b=c-DvtScrollbarArrow.WIDTH;e||f?(f=this._sb.getScrollAreaLength()/(d-1),c=Math.round(g/f),f=Math.round(b/f)):(f=this._sb.getScrollAreaLength()/d,e=g/f,c=Math.floor(e),b/=f,f=Math.floor(b),.02>b-f&&0<f&&f--,b=Math.ceil(e)-e,0<b&&.02>b&&0<c&&c++);DvtAgent.isRightToLeft(this._context)&&a instanceof DvtCustomAxis==this._sb.isHorizontal()?(b=a.getLabelAt(d-c-1),d=a.getLabelAt(d-f-1)):(b=a.getLabelAt(c),
d=a.getLabelAt(f))}else return"";return b==d?b:DvtAgent.isRightToLeft(this._context)&&this._sb.isHorizontal()?d+" - "+b:b+" - "+d};DvtScrollbarThumb.prototype.updateTooltipText=function(){var a=this._makeTooltipText();this._container._Dlo.setTooltip(a);this._drawGrippers&&(this._startGripper.getContainer()._Dlo.setTooltip(a),this._endGripper.getContainer()._Dlo.setTooltip(a))};DvtScrollbarThumb.prototype.IsSkinAlta=function(){return"alta"==this._skinName};
DvtScrollbarThumb.prototype.immediateTouchAttempted=function(a,b){if(!this.getTouchManager().containsTouchId(b.identifier)){var c=this.getCtx().getRelativePosition(b.pageX,b.pageY);this.processThumbDragStart(c);this.getTouchManager().saveProcessedTouchDefault(b.identifier,this,this._container,this._sb,"thumb",this);this.drawFullHighlightState();a.blockTouchHold()}};
DvtScrollbarThumb.prototype.immediateTouchMoved=function(a,b){var c=this.getCtx().getRelativePosition(b.pageX,b.pageY);this.processThumbDragMove(c);a.preventDefault()};DvtScrollbarThumb.prototype.immediateTouchEnded=function(a,b){this.getTouchManager().containsGrouping(this._sb)||this.drawFullPlainState();var c=this.getCtx().getRelativePosition(b.pageX,b.pageY);this.processThumbDragEnd(c)};
DvtScrollbarThumb.prototype._touchHandler=function(a){this.getTouchManager().preEventBubble(a);this.getTouchManager().processAssociatedTouchDefault(a,this);this.getTouchManager().postEventBubble(a)};
DvtScrollbarThumb.prototype.updateSize=function(){var a=this._sb;a.isHorizontal()?(this.setX(a.getX()+a.getThumbStart()),this.setWidth(a.getThumbLength())):(this.setY(a.getY()+a.getThumbStart()),this.setHeight(a.getThumbLength()));this._drawGrippers&&(this._startGripper.updatePosition(),this._endGripper.updatePosition());null!=this._grip&&-1!=this._container._findChild(this._grip)?(this._container.removeChild(this._grip),this._grip=this._createGrip(),this._container.addChild(this._grip)):this._grip=
this._createGrip()};DvtScrollbarThumb.prototype.isHorizontal=function(){return this._sb.isHorizontal()};
DvtScrollbarThumb.prototype._createGrip=function(){var a=this.getX()+this.getWidth()/2,b=this.getY()+this.getHeight()/2,c="";this._sb.isHorizontal()?(c+=DvtPathUtils.moveTo(a-4.5,b-3),c+=DvtPathUtils.lineTo(a-4.5,b+3),c+=DvtPathUtils.moveTo(a-1.5,b-3),c+=DvtPathUtils.lineTo(a-1.5,b+3),c+=DvtPathUtils.moveTo(a+1.5,b-3),c+=DvtPathUtils.lineTo(a+1.5,b+3),c+=DvtPathUtils.moveTo(a+4.5,b-3),c+=DvtPathUtils.lineTo(a+4.5,b+3)):(c+=DvtPathUtils.moveTo(a-3,b-4.5),c+=DvtPathUtils.lineTo(a+3,b-4.5),c+=DvtPathUtils.moveTo(a-
3,b-1.5),c+=DvtPathUtils.lineTo(a+3,b-1.5),c+=DvtPathUtils.moveTo(a-3,b+1.5),c+=DvtPathUtils.lineTo(a+3,b+1.5),c+=DvtPathUtils.moveTo(a-3,b+4.5),c+=DvtPathUtils.lineTo(a+3,b+4.5));DvtPathUtils.closePath();a=new DvtPath(this.getCtx(),c);a.setSolidStroke(DvtScrollbarThumb.GRIP_ZONE_COLOR);a.setMouseEnabled(!1);return a};
DvtScrollbarThumb.prototype._createStartGripper=function(){var a;a=this.isHorizontal()?new DvtScrollbarGripper(this,DvtScrollbarGripper.TYPE_LEFT):new DvtScrollbarGripper(this,DvtScrollbarGripper.TYPE_TOP);DvtGraphSysUtils.makeDetObject(a);return a};DvtScrollbarThumb.prototype._createEndGripper=function(){var a;a=this.isHorizontal()?new DvtScrollbarGripper(this,DvtScrollbarGripper.TYPE_RIGHT):new DvtScrollbarGripper(this,DvtScrollbarGripper.TYPE_BOTTOM);DvtGraphSysUtils.makeDetObject(a);return a};
DvtScrollbarThumb.prototype._mouseOverHandler=function(a){this._drawOverState();a&&a.preventDefault()};DvtScrollbarThumb.prototype._mouseOutHandler=function(a){this._drawUpState();a&&a.preventDefault()};
DvtScrollbarThumb.prototype._mouseDownHandler=function(a){this.removeEvtListener(DvtMouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this);this.removeEvtListener(DvtMouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this);var b=new DvtPoint(a.pageX,a.pageY);this.processThumbDragStart(b);this._drawDownState();this.getCtx().getStage().addEvtListener(DvtMouseEvent.MOUSEMOVE,this._mouseMoveHandler,!1,this);this.getCtx().getStage().addEvtListener(DvtMouseEvent.MOUSEUP,this._mouseUpHandler,!1,this);a&&a.preventDefault()};
DvtScrollbarThumb.prototype.processThumbDragStart=function(a){this._sb.processThumbDragStart(a)};
DvtScrollbarThumb.prototype._mouseUpHandler=function(a){this.getCtx().getStage().removeEvtListener(DvtMouseEvent.MOUSEMOVE,this._mouseMoveHandler,!1,this);this.getCtx().getStage().removeEvtListener(DvtMouseEvent.MOUSEUP,this._mouseUpHandler,!1,this);var b=new DvtPoint(a.pageX,a.pageY);this.processThumbDragEnd(b);this._drawUpState();this.addEvtListener(DvtMouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this);this.addEvtListener(DvtMouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this);a&&a.preventDefault()};
DvtScrollbarThumb.prototype.processThumbDragEnd=function(a){this._sb.processThumbDragEnd(a)};DvtScrollbarThumb.prototype._mouseMoveHandler=function(a){var b=new DvtPoint(a.pageX,a.pageY);this.processThumbDragMove(b);a&&a.preventDefault()};DvtScrollbarThumb.prototype.processThumbDragMove=function(a){this._sb.processThumbDragMove(a)};DvtScrollbarThumb.prototype.handleGripDragStart=function(a,b){this._sb.handleGripDragStart(a,b)};
DvtScrollbarThumb.prototype.processGripDragStart=function(a,b){this._sb.processGripDragStart(a,b)};DvtScrollbarThumb.prototype.handleGripDragMove=function(a,b){this._sb.handleGripDragMove(a,b)};DvtScrollbarThumb.prototype.processGripDragMove=function(a,b){this._sb.processGripDragMove(a,b)};DvtScrollbarThumb.prototype.handleGripDragEnd=function(a,b){this._sb.handleGripDragEnd(a,b)};DvtScrollbarThumb.prototype.processGripDragEnd=function(a,b){this._sb.processGripDragEnd(a,b)};
DvtScrollbarThumb.prototype._drawUpState=function(){this.drawPlainState();this._drawGrippers&&(this._startGripper.setAlpha(.001),this._endGripper.setAlpha(.001))};DvtScrollbarThumb.prototype.drawFullHighlightState=function(){this.drawHighlightState();this._drawGrippers&&(this._startGripper.drawHighlightState(),this._endGripper.drawHighlightState())};
DvtScrollbarThumb.prototype.drawFullPlainState=function(){this._drawGrippers&&(this._startGripper.drawPlainState(),this._endGripper.drawPlainState());this.drawPlainState()};DvtScrollbarThumb.prototype.drawHighlightState=function(){this._overStroke&&this.setStroke(this._overStroke);this.setFill(this._overFill)};DvtScrollbarThumb.prototype.drawPlainState=function(){this._upStroke&&this.setStroke(this._upStroke);this.setFill(this._upFill)};
DvtScrollbarThumb.prototype._drawOverState=function(){DvtAgent.isTouchDevice()?this.drawPlainState():this.drawHighlightState();this._drawGrippers&&(this._startGripper.setAlpha(1),this._endGripper.setAlpha(1))};DvtScrollbarThumb.prototype._drawDownState=function(){this._downStroke&&this.setStroke(this._downStroke);this.setFill(this._downFill);this._drawGrippers&&(this._startGripper.setAlpha(.001),this._endGripper.setAlpha(.001))};DvtScrollbarThumb.prototype.getX=function(){return this._container.getX()};
DvtScrollbarThumb.prototype.getY=function(){return this._container.getY()};DvtScrollbarThumb.prototype.getWidth=function(){return this._container.getWidth()};DvtScrollbarThumb.prototype.getHeight=function(){return this._container.getHeight()};DvtScrollbarThumb.prototype.setX=function(a){this._container.setX(a)};DvtScrollbarThumb.prototype.setY=function(a){this._container.setY(a)};DvtScrollbarThumb.prototype.setWidth=function(a){this._container.setWidth(a)};DvtScrollbarThumb.prototype.setHeight=function(a){this._container.setHeight(a)};
DvtScrollbarThumb.prototype.setStroke=function(a){this._container.setStroke(a)};DvtScrollbarThumb.prototype.setSolidStroke=function(a,b,c){this._container.setSolidStroke(a,b,c)};DvtScrollbarThumb.prototype.setFill=function(a){this._container.setFill(a)};DvtScrollbarThumb.prototype.setSolidFill=function(a,b){this._container.setSolidFill(a,b)};
DvtScrollbarThumb.prototype.destroy=function(){DvtAgent.isTouchDevice()?(this.removeEvtListener(DvtTouchEvent.TOUCHSTART,this._touchHandler,!1,this),this.removeEvtListener(DvtTouchEvent.TOUCHMOVE,this._touchHandler,!1,this),this.removeEvtListener(DvtTouchEvent.TOUCHEND,this._touchHandler,!1,this)):(this.removeEvtListener(DvtMouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this),this.removeEvtListener(DvtMouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this),this.removeEvtListener(DvtMouseEvent.MOUSEDOWN,
this._mouseDownHandler,!1,this),this.getCtx().getStage().removeEvtListener(DvtMouseEvent.MOUSEMOVE,this._mouseMoveHandler,!1,this),this.getCtx().getStage().removeEvtListener(DvtMouseEvent.MOUSEUP,this._mouseUpHandler,!1,this));this._container&&(this._grip&&(this._container.removeChild(this._grip),this._grip=null),this._startGripper&&(this._startGripper.destroy(),this._startGripper=null),this._endGripper&&(this._endGripper.destroy(),this._endGripper=null));DvtScrollbarThumb.superclass.destroy.call(this);
this._container=null};DvtScrollbarThumb.prototype.getTouchManager=function(){!this._touchManager&&DvtAgent.isTouchDevice()&&(this._touchManager=new DvtTouchManager("_touchManager_sb",this._context));return this._touchManager};var DvtScrollableContainer=function(a,b,c,d,e,f,g){this.Init(a,b,c,d,e,f,g)};DvtObj.createSubclass(DvtScrollableContainer,DvtContainer,"DvtScrollableContainer");DvtScrollableContainer.DEFAULT_SCROLLBAR_WIDTH=14;DvtScrollableContainer.DEFAULT_ALTA_SCROLLBAR_WIDTH=11;
DvtScrollableContainer.prototype.Init=function(a,b,c,d,e,f,g){DvtScrollableContainer.superclass.Init.call(this,a,g);this._scrollbarContentGap=f;this._sbWidth=DvtScrollableContainer.DEFAULT_SCROLLBAR_WIDTH;this._skinName=null;this._vertScrollEnabled=this._horizScrollEnabled=!0;d?(this._maxW=d,this._maxContentW=d-this._sbWidth-this._scrollbarContentGap):this._maxContentW=this._maxW=Number.MAX_VALUE;e?(this._maxH=e,this._maxContentH=e-this._sbWidth-this._scrollbarContentGap):this._maxContentH=this._maxH=
Number.MAX_VALUE;this._minW=b;this._fullW=0;this._minH=c;this._fullH=0;this._hsb=null;this._hsbStart=this._hsbScale=0;this._vsb=null;this._translateX=this._translateY=this._vsbStart=this._vsbScale=0;this._contentPane=new DvtContainer(a);DvtScrollableContainer.superclass.addChild.call(this,this._contentPane);this._isBiDi=DvtAgent.isRightToLeft(a)};DvtScrollableContainer.prototype.setHorizontalScrollingEnabled=function(a){this._horizScrollEnabled=a};
DvtScrollableContainer.prototype.setVerticalScrollingEnabled=function(a){this._vertScrollEnabled=a};DvtScrollableContainer.prototype.getSkinName=function(){return this._skinName};DvtScrollableContainer.prototype.setSkinName=function(a){this._skinName=a;this.IsSkinAlta()&&(this._sbWidth=DvtScrollableContainer.DEFAULT_ALTA_SCROLLBAR_WIDTH)};DvtScrollableContainer.prototype.IsSkinAlta=function(){return"alta"==this._skinName};DvtScrollableContainer.prototype.setStyleMap=function(a){this._styleMap=a};
DvtScrollableContainer.prototype.getScrollbarWidth=function(){return this._sbWidth};DvtScrollableContainer.prototype.setScrollbarWidth=function(a){this._maxH=this._maxH+this._sbWidth-a;this._maxContentW=this._maxContentW+this._sbWidth-a;this._sbWidth=a};DvtScrollableContainer.prototype.addChild=function(a){this._contentPane.addChild(a);this.refresh()};DvtScrollableContainer.prototype.addChildAt=function(a,b){this._contentPane.addChildAt(a,b);this.refresh()};
DvtScrollableContainer.prototype.removeChild=function(a){this._contentPane.removeChild(a);this.refresh()};DvtScrollableContainer.prototype.removeChildAt=function(a){this._contentPane.removeChildAt(a);this.refresh()};DvtScrollableContainer.prototype.getNumChildren=function(){return this._contentPane.getNumChildren()};DvtScrollableContainer.prototype.contains=function(a,b){return this._contentPane.contains(a,b)};DvtScrollableContainer.prototype.getChildAfter=function(a){return this._contentPane.getChildAfter(a)};
DvtScrollableContainer.prototype.getChildBefore=function(a){return this._contentPane.getChildBefore(a)};DvtScrollableContainer.prototype.getChildIndex=function(a){return this._contentPane.getChildIndex(a)};DvtScrollableContainer.prototype.getIterator=function(a){return this._contentPane.getIterator(a)};DvtScrollableContainer.prototype.removeChildren=function(){this._contentPane.removeChildren()};
DvtScrollableContainer.prototype.destroy=function(){DvtScrollableContainer.superclass.destroy.call(this);this._contentPane.setClipPath(null);this._contentPane.removeAllDrawEffects(null);this._removeHSB();this._removeVSB()};DvtScrollableContainer.prototype.swap=function(a,b){this._contentPane.swap(a,b)};
DvtScrollableContainer.prototype.getDimensions=function(a){var b=this._getDimensionsForContentPane(this);b&&(this.hasHorizontalScrollbar()&&(b.h=Math.min(this._maxContentH,b.h)+this._scrollbarContentGap+this._sbWidth),this.hasVerticalScrollbar()&&(b.w=Math.min(this._maxContentW,b.w)+this._scrollbarContentGap+this._sbWidth),b.x=0,b.y=0,b.w=Math.min(this._maxW,b.w),b.h=Math.min(this._maxH,b.h));return a&&b?this.ConvertCoordSpaceRect(b,a):b};
DvtScrollableContainer.prototype.setVerticalThumbPosition=function(a){this._vsb&&(this._vsbStart=a,this._contentPane.setTranslateY(-a),this._vsb.moveSlider(a-this._vsb.getThumbStart()))};DvtScrollableContainer.prototype.getVerticalThumbPosition=function(){return this._vsb.getThumbStart()};DvtScrollableContainer.prototype.hasHorizontalScrollbar=function(){return null!=this._hsb};
DvtScrollableContainer.prototype.refresh=function(){this._removeVSB();this._removeHSB();var a=!1,b=!1,c=this._getDimensionsForContentPane();c?(this._horizScrollEnabled&&c.x+c.w>this._maxW&&(b=!0),this._vertScrollEnabled&&c.y+c.h>(b?this._maxContentH:this._maxH)&&(a=!0),this._fullH=Math.max(c.y+c.h,this._minH),this._fullW=Math.max(c.x+c.w,this._minW)):(this._fullH=this._minH,this._fullW=this._minW);c=new DvtGraphClipPath(this.getId());a&&b?c.addRect(this._isBiDi?this._scrollbarContentGap+this._sbWidth:
0,0,this._maxContentW,this._maxContentH):a?c.addRect(this._isBiDi?this._scrollbarContentGap+this._sbWidth:0,0,this._maxContentW,this._maxH):b?c.addRect(0,0,this._maxW,this._maxContentH):c=null;this._contentPane.setClipPath(c);a&&this._addVSB(b);b&&this._addHSB(a);this._translateX=this._isBiDi&&a?b?-(this._fullW-this._maxW):this._sbWidth+this._scrollbarContentGap:0;this._contentPane.setTranslateX(this._translateX)};DvtScrollableContainer.prototype.hasVerticalScrollbar=function(){return null!=this._vsb};
DvtScrollableContainer.prototype._removeHSB=function(){this._hsb&&(this._hsb.removeEvtListener(DvtScrollbarEvent.SB_MOVE,this._onHorizontalScroll,!1,this),this._hsb.destroy(),DvtScrollableContainer.superclass.removeChild.call(this,this._hsb),this._hsb=null)};
DvtScrollableContainer.prototype._removeVSB=function(){this._vsb&&(this._vsb.removeEvtListener(DvtScrollbarEvent.SB_MOVE,this._onVerticalScroll,!1,this),this._vsb.destroy(),DvtScrollableContainer.superclass.removeChild.call(this,this._vsb),this._vsb=null)};
DvtScrollableContainer.prototype._addVSB=function(a){if(!this._vsb){var b=a?this._maxH-this._sbWidth:this._maxH;this._vsbLength=b;var c=this._isBiDi?0:a?this._maxW-this._sbWidth:this._fullW+this._scrollbarContentGap,d=this._sbWidth,e=0,f;this.IsSkinAlta()&&!a&&(d+=1,b+=2,--e,f=new DvtGraphClipPath(this.getId()+"vsb"),f.addRect(c,0,d-1,b-2));this._vsb=new DvtScrollbar(this.getCtx(),c,e,d,b,!1,!1,this.getSkinName(),this._styleMap);f&&this._vsb.setClipPath(f);DvtScrollableContainer.superclass.addChild.call(this,
this._vsb)}a=a?this._maxContentH:this._maxH;c=a/this._fullH*this._vsb.getScrollAreaLength();c=Math.min(this._vsb.getScrollAreaLength(),Math.max(c,DvtScrollbar.MIN_THUMB_SIZE));this._vsbScale=(this._fullH-a)/(this._vsb.getScrollAreaLength()-c);this._vsb.setLogicalThumbStartAndLength(this._vsbStart,c);this._vsb.addEvtListener(DvtScrollbarEvent.SB_MOVE,this._onVerticalScroll,!1,this)};
DvtScrollableContainer.prototype._addHSB=function(a){if(!this._hsb){var b=a?this._maxW-this._sbWidth:this._maxW;this._hsbLength=b;var c=this._isBiDi&&a?this._sbWidth:0,d=a?this._maxH-this._sbWidth:this._fullH+this._scrollbarContentGap,e=this._sbWidth,f;this.IsSkinAlta()&&!a&&(e+=1,b+=2,f=new DvtGraphClipPath(this.getId()+"hsb"),f.addRect(c,d,b-2,e-1));this._hsb=new DvtScrollbar(this.getCtx(),c,d,b,e,!0,!1,this.getSkinName(),this._styleMap);f&&this._hsb.setClipPath(f);DvtScrollableContainer.superclass.addChild.call(this,
this._hsb)}a=a?this._maxContentW:this._maxW;c=a/this._fullW*this._hsb.getScrollAreaLength();c=Math.min(this._hsb.getScrollAreaLength(),Math.max(c,DvtScrollbar.MIN_THUMB_SIZE));this._hsbScale=(this._fullW-a)/(this._hsb.getScrollAreaLength()-c);this._isBiDi&&(this._hsbStart=this._hsb.getScrollAreaLength()-c);this._hsb.setLogicalThumbStartAndLength(this._hsbStart,c);this._hsb.addEvtListener(DvtScrollbarEvent.SB_MOVE,this._onHorizontalScroll,!1,this)};
DvtScrollableContainer.prototype._onVerticalScroll=function(a){a=a.getMovedDelta();0!=a&&(this._translateY-=a*this._vsbScale,this._contentPane.setTranslateY(this._translateY),this._fireScrollEvent(null,this._vsbLength*this._vsbScale+this._translateY))};DvtScrollableContainer.prototype._onHorizontalScroll=function(a){a=a.getMovedDelta();0!=a&&(this._translateX-=a*this._hsbScale,this._contentPane.setTranslateX(this._translateX),this._fireScrollEvent(this._hsbLength*this._hsbScale+this._translateX,null))};
DvtScrollableContainer.prototype._fireScrollEvent=function(a,b){this.FireListener(new DvtScrollEvent(a,b))};DvtScrollableContainer.prototype._getDimensionsForContentPane=function(a){for(var b=null,c,d=0;d<this.getNumChildren();d++)(c=this._contentPane.getChildAt(d))&&(c=c.getDimensions(this._contentPane))&&(b=null==b?new DvtRectangle(c.x,c.y,c.w,c.h):b.getUnion(c));return a&&b?this.ConvertCoordSpaceRect(b,a):b};
var DvtSimpleScrollbar=function(a,b,c){DvtSimpleScrollbar.superclass.Init.call(this,a);this._callback=b;this._callbackObj=c};DvtObj.createSubclass(DvtSimpleScrollbar,DvtContainer,"DvtSimpleScrollbar");
DvtSimpleScrollbar.prototype.render=function(a,b,c){this._options=DvtJSONUtils.clone(a);this._width=b;this._height=c;this._globalMin=a.min;this._globalMax=a.max;this._isHoriz=a.isHorizontal;this._isReversed=a.isReversed;var d=new DvtRect(this.getCtx(),0,0,b,c);d.setSolidFill(a.backgroundColor);d.setPixelHinting(!0);this.addChild(d);this._thumb=new DvtRect(this.getCtx(),0,0,b,c);this._thumb.setSolidFill(a.color);this._thumb.setPixelHinting(!0);this.addChild(this._thumb);this._thumbMin=this._globalMin;
this._thumbMax=this._globalMax;this.addEvtListener(DvtMouseEvent.CLICK,this._onClick,!1,this);DvtAgent.isTouchDevice()?(this.addEvtListener(DvtTouchEvent.TOUCHSTART,this._onDragStart,!1,this),this.addEvtListener(DvtTouchEvent.TOUCHMOVE,this._onDragMove,!1,this),this.addEvtListener(DvtTouchEvent.TOUCHEND,this._onDragEnd,!1,this)):(this.addEvtListener(DvtMouseEvent.MOUSEDOWN,this._onDragStart,!1,this),this.addEvtListener(DvtMouseEvent.MOUSEMOVE,this._onDragMove,!1,this),this.addEvtListener(DvtMouseEvent.MOUSEUP,
this._onDragEnd,!1,this));this._dragged=!1};DvtSimpleScrollbar.prototype.setViewportRange=function(a,b){var c=this._getCoord(a),d=this._getCoord(b);this._isHoriz?(this._thumb.setX(Math.min(c,d)),this._thumb.setWidth(Math.abs(d-c))):(this._thumb.setY(Math.min(c,d)),this._thumb.setHeight(Math.abs(d-c)));this._thumbMin=a;this._thumbMax=b};
DvtSimpleScrollbar.prototype._getCoord=function(a){a=(a-this._globalMin)/(this._globalMax-this._globalMin);this._isReversed&&(a=1-a);return this._isHoriz?a*this._width:a*this._height};DvtSimpleScrollbar.prototype._getValue=function(a,b){var c=this.stageToLocal(this.getCtx().getRelativePosition(a,b)),c=this._isHoriz?c.x/this._width:c.y/this._height;this._isReversed&&(c=1-c);return this._globalMin+c*(this._globalMax-this._globalMin)};
DvtSimpleScrollbar.prototype._onClick=function(a){a=this._getValue(a.pageX,a.pageY);if(!(a>=this._thumbMin&&a<=this._thumbMax)){var b=this._thumbMax-this._thumbMin;this._setViewportRange(a-b/2,a+b/2,DvtOverviewEvent.SUBTYPE_SCROLL_TIME)}};
DvtSimpleScrollbar.prototype._onDragStart=function(a){var b;if(a.touches){if(1!=a.touches.length)return;b=this._getValue(a.touches[0].pageX,a.touches[0].pageY)}else b=this._getValue(a.pageX,a.pageY);b>=this._thumbMin&&b<=this._thumbMax&&(this._dragged=!0,this._prevVal=b,a.stopPropagation())};
DvtSimpleScrollbar.prototype._onDragMove=function(a){if(this._dragged){if(a.touches){if(1!=a.touches.length)return;a=this._getValue(a.touches[0].pageX,a.touches[0].pageY)}else a=this._getValue(a.pageX,a.pageY);var b=a-this._prevVal;this._setViewportRange(this._thumbMin+b,this._thumbMax+b,DvtOverviewEvent.SUBTYPE_SCROLL_POS);this._prevVal=a}};
DvtSimpleScrollbar.prototype._onDragEnd=function(a){this._dragged&&(a.touches?this._setViewportRange(this._thumbMin,this._thumbMax,DvtOverviewEvent.SUBTYPE_SCROLL_END):(a=this._getValue(a.pageX,a.pageY)-this._prevVal,this._setViewportRange(this._thumbMin+a,this._thumbMax+a,DvtOverviewEvent.SUBTYPE_SCROLL_END)),this._dragged=!1)};
DvtSimpleScrollbar.prototype._setViewportRange=function(a,b,c){var d=b-a;a<this._globalMin&&(a=this._globalMin,b=this._globalMin+d);b>this._globalMax&&(b=this._globalMax,a=this._globalMax-d);this.setViewportRange(a,b);this._callback&&(c=new DvtOverviewEvent(c),c.setNewStartTime(a),c.setNewEndTime(b),this._callback.call(this._callbackObj,c,this))};var DvtDragRecognizer=function(){};DvtObj.createSubclass(DvtDragRecognizer,DvtObj,"DvtDragRecognizer");DvtDragRecognizer.prototype.prepDrag=function(){};
DvtDragRecognizer.prototype.abortPrep=function(){};DvtDragRecognizer.prototype.recognizeDrag=function(){return!0};var DvtDragSource=function(a){this.Init(a)};DvtObj.createSubclass(DvtDragSource,DvtObj,"DvtDragSource");DvtDragSource.DRAG_FEEDBACK_MARGIN=2;DvtDragSource.prototype.Init=function(a){this._context=a;this._dragCoords=this._dragObj=this._dragCandidate=null};DvtDragSource.prototype.getDragCandidate=function(){return this._dragCandidate};
DvtDragSource.prototype.setDragCandidate=function(a){this._dragCandidate=a&&a.isDragAvailable&&a.getDragTransferable?a:null};DvtDragSource.prototype.isDragAvailable=function(a){return null!=this._dragCandidate?this._dragCandidate.isDragAvailable(a):null};DvtDragSource.prototype.getDragTransferable=function(a,b){return this._dragCandidate?(this._dragObj=this._dragCandidate,this._dragCoords={x:a,y:b},this._dragCandidate.getDragTransferable(a,b)):null};
DvtDragSource.prototype.getDragOverFeedback=function(a,b){this._context.getTooltipManager().hideTooltip();var c=this.getDragObject();return c&&c.getDragFeedback?c.getDragFeedback(a,b):null};DvtDragSource.prototype.getDragContext=function(a,b){return this._dragObj&&this._dragObj.getDragContext?this._dragObj.getDragContext(a,b):null};DvtDragSource.prototype.getDragObject=function(){return this._dragObj};DvtDragSource.prototype.getDragCoords=function(){return this._dragCoords};
DvtDragSource.prototype.getDragOffset=function(a,b){var c=null,d=this.getDragOverFeedback(a,b);if(d){var e=DvtDnDUtils.getDragFeedbackBounds(d,this._context.getStage()),f=this.getDragObject();f&&f.afterDragOverFeedback&&f.afterDragOverFeedback(d);e&&(c={},c.x=a-e.x,c.y=b-e.y,c.x+=DvtDragSource.DRAG_FEEDBACK_MARGIN,c.y+=DvtDragSource.DRAG_FEEDBACK_MARGIN)}return c};DvtDragSource.prototype.getPointerOffset=function(a,b){return{x:0,y:0}};
DvtDragSource.prototype.initiateDrag=function(){var a=this.getTouchManager();DvtAgent.isTouchDevice()&&a&&a.cancelTouchHold()};DvtDragSource.prototype.dragDropEnd=function(){this._dragCoords=this._dragObj=this._dragCandidate=null};DvtDragSource.prototype.setTouchManager=function(a){this._touchManager=a};DvtDragSource.prototype.getTouchManager=function(){return this._touchManager};var DvtDropTarget=function(){};DvtObj.createSubclass(DvtDropTarget,DvtObj,"DvtDropTarget");
DvtDropTarget.prototype.acceptDrag=function(a,b,c){return null};DvtDropTarget.prototype.dragEnter=function(){};DvtDropTarget.prototype.dragExit=function(){};DvtDropTarget.prototype.getDropSite=function(a,b){return null};var DvtButton=function(a,b,c,d,e,f,g,h){this.Init(a,b,c,d,e,f,g,h)};DvtObj.createSubclass(DvtButton,DvtContainer,"DvtButton");DvtButton.STATE_ENABLED=0;DvtButton.STATE_OVER=1;DvtButton.STATE_DOWN=2;DvtButton.STATE_DISABLED=3;DvtButton.NO_EVENT_LISTENERS=!0;
DvtButton.prototype.Init=function(a,b,c,d,e,f,g,h){DvtButton.superclass.Init.call(this,a,f);this.setCallback(g,h);this._bDuringInit=!0;this.setUpState(b);this.setOverState(c);this.setDownState(d);e&&this.setDisabledState(e);this.setEnabled(!0);this._drawUpState();this._tooltip=null;this._bDuringInit=this._bToggled=this._bToggleEnabled=!1};DvtButton.prototype.isEnabled=function(){return this._enabled};
DvtButton.prototype.setEnabled=function(a){if(this._enabled!=a){this._enabled=a;var b=DvtAgent.isTouchDevice()?DvtTouchEvent.TOUCHSTART:DvtMouseEvent.CLICK;a?(this.addEvtListener(DvtMouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this),this.addEvtListener(DvtMouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this),this.addEvtListener(DvtMouseEvent.MOUSEDOWN,this._mouseDownHandler,!1,this),this.addEvtListener(DvtMouseEvent.MOUSEUP,this._mouseUpHandler,!1,this),this.addEvtListener(b,this._clickHandler,!1,
this)):(this.removeEvtListener(DvtMouseEvent.MOUSEOVER,this._mouseOverHandler,!1,this),this.removeEvtListener(DvtMouseEvent.MOUSEOUT,this._mouseOutHandler,!1,this),this.removeEvtListener(DvtMouseEvent.MOUSEDOWN,this._mouseDownHandler,!1,this),this.removeEvtListener(DvtMouseEvent.MOUSEUP,this._mouseUpHandler,!1,this),this.removeEvtListener(b,this._clickHandler,!1,this))}};DvtButton.prototype._mouseOverHandler=function(a){this._logEvent(a);this._bToggled?this._drawOverDownState():this._drawOverState()};
DvtButton.prototype._mouseOutHandler=function(a){this._logEvent(a);this._bToggled?this._drawDownState():this._drawUpState()};DvtButton.prototype._mouseDownHandler=function(a){this._logEvent(a);this._drawDownState()};DvtButton.prototype._mouseUpHandler=function(a){this._logEvent(a);this._bToggled?DvtAgent.isTouchDevice()?this._drawDownState():this._drawOverDownState():DvtAgent.isTouchDevice()?this._drawUpState():this._drawOverState()};
DvtButton.prototype._clickHandler=function(a){this._logEvent(a);this._bToggleEnabled&&((this._bToggled=!this._bToggled)?DvtAgent.isTouchDevice()?this._drawDownState():this._drawOverDownState():DvtAgent.isTouchDevice()?this._drawUpState():this._drawOverState());this._callback&&(this._callback.call(this._callbackObj,a),a.stopPropagation(),a.preventDefault())};
DvtButton.prototype._drawUpState=function(){this._enableButton(this.upState,!0);this._enableButton(this.downState,!1);this._enableButton(this.overState,!1);this._enableButton(this.disabledState,!1);this._enableButton(this.overDownState,!1)};DvtButton.prototype._drawOverState=function(){this._enableButton(this.upState,!1);this._enableButton(this.downState,!1);this._enableButton(this.overState,!0);this._enableButton(this.disabledState,!1);this._enableButton(this.overDownState,!1)};
DvtButton.prototype._drawDownState=function(){this._enableButton(this.upState,!1);this._enableButton(this.downState,!0);this._enableButton(this.overState,!1);this._enableButton(this.disabledState,!1);this._enableButton(this.overDownState,!1)};DvtButton.prototype._drawDisabledState=function(){this._enableButton(this.upState,!1);this._enableButton(this.overState,!1);this._enableButton(this.downState,!1);this._enableButton(this.disabledState,!0);this._enableButton(this.overDownState,!1)};
DvtButton.prototype._drawOverDownState=function(){this.overDownState?(this._enableButton(this.upState,!1),this._enableButton(this.overState,!1),this._enableButton(this.downState,!1),this._enableButton(this.disabledState,!1),this._enableButton(this.overDownState,!0)):this._drawDownState()};DvtButton.prototype._enableButton=function(a,b){a&&a.setAlpha(b?1:0)};
DvtButton.prototype._enableMouseEvents=function(a,b){a.setMouseEnabled&&a.setMouseEnabled(b);for(var c=a.firstChild;null!=c;)this._enableMouseEvents(c,b),c=c.nextSibling};
DvtButton.prototype.setUpState=function(a){if(!this.upState||this.upState!=a){var b=!1;if(this.upState)b=this._isButtonEnabled(this.upState),this.removeChild(this.upState);else if(!this._bDuringInit){var c=!1,d=!1,e=!1;this.downState&&(c=this._isButtonEnabled(this.downState));this.overState&&(d=this._isButtonEnabled(this.overState));this.disabledState&&(e=this._isButtonEnabled(this.disabledState));c||d||e||(b=!0)}a&&this.addChild(a);this.upState=a;this._enableButton(this.upState,b)}};
DvtButton.prototype.setDownState=function(a){if(!this.downState||this.downState!=a){var b=!1;this.downState&&(b=this._isButtonEnabled(this.downState),this.removeChild(this.downState));a&&this.addChild(a);this.downState=a;this._enableButton(this.downState,b)}};
DvtButton.prototype.setOverState=function(a){if(!this.overState||this.overState!=a){var b=!1;this.overState&&(b=this._isButtonEnabled(this.overState),this.removeChild(this.overState));a&&this.addChild(a);this.overState=a;this._enableButton(this.overState,b)}};
DvtButton.prototype.setDisabledState=function(a){if(!this.disabledState||this.disabledState==a){var b=!1;this.disabledState&&(b=this._isButtonEnabled(this.disabledState),this.removeChild(this.disabledState));a&&this.addChild(a);this.disabledState=a;this._enableButton(this.disabledState,b)}};
DvtButton.prototype.setOverDownState=function(a){if(!this.overDownState||this.overDownState==a){var b=!1;this.overDownState&&(b=this._isButtonEnabled(this.overDownState),this.removeChild(this.overDownState));a&&this.addChild(a);this.overDownState=a;this._enableButton(this.overDownState,b)}};DvtButton.prototype.setCallback=function(a,b){this._callback=a;this._callbackObj=b};DvtButton.prototype._logEvent=function(a){};DvtButton.prototype.setTooltip=function(a){this._tooltip=a};
DvtButton.prototype.getTooltip=function(){return this._tooltip};DvtButton.prototype.isClickEventPropagationStopped=function(){return!0};DvtButton.prototype.initState=function(){this.isEnabled()?this._drawUpState():this._drawDisabledState()};
DvtButton.prototype.setSize=function(a,b){var c=this.upState;c&&(c.setWidth&&a&&c.setWidth(a),c.setHeight&&b&&c.setHeight(b));if(c=this.downState)c.setWidth&&a&&c.setWidth(a),c.setHeight&&b&&c.setHeight(b);if(c=this.overState)c.setWidth&&a&&c.setWidth(a),c.setHeight&&b&&c.setHeight(b);if(c=this.disabledState)c.setWidth&&a&&c.setWidth(a),c.setHeight&&b&&c.setHeight(b)};
DvtButton.prototype.rightAlign=function(a,b,c){b=a-b;var d=this.upState;d&&a&&(c?d.setTranslateX(b):this._setChildX(d,b));(d=this.downState)&&a&&(c?d.setTranslateX(b):this._setChildX(d,b));(d=this.overState)&&a&&(c?d.setTranslateX(b):this._setChildX(d,b));(a=this.disabledState)&&(c?a.setTranslateX(b):this._setChildX(a,b))};DvtButton.prototype._setChildX=function(a,b){for(var c=0;c<a.getNumChildren();c++){var d=a.getChildAt(c);d instanceof DvtDisplayable&&d.setTranslateX(b)}};
DvtButton.prototype.setToggleEnabled=function(a){this._bToggleEnabled=a};DvtButton.prototype.isToggleEnabled=function(){return this._bToggleEnabled};DvtButton.prototype.setToggled=function(a){this._bToggleEnabled&&((this._bToggled=a)?this._drawDownState():this._drawUpState())};DvtButton.prototype.isToggled=function(){return this._bToggled};DvtButton.prototype._isButtonEnabled=function(a){var b=!1;a&&(b=0<a.getAlpha()?!0:!1);return b};DvtButton.prototype.getUpState=function(){return this.upState};
DvtButton.prototype.getDownState=function(){return this.downState};DvtButton.prototype.getOverState=function(){return this.overState};var DvtLogicalObject=function(){};DvtObj.createSubclass(DvtLogicalObject,DvtObj,"DvtLogicalObject");DvtLogicalObject.prototype.getDisplayables=function(){};var DvtTooltipSource=function(){};DvtObj.createSubclass(DvtTooltipSource,DvtObj,"DvtTooltipSource");DvtTooltipSource.prototype.getTooltip=function(a,b,c){};DvtTooltipSource.prototype.getDatatip=function(a,b,c){};
DvtTooltipSource.prototype.getDatatipColor=function(){};var DvtSelectable=function(){};DvtObj.createSubclass(DvtSelectable,DvtObj,"DvtSelectable");DvtSelectable.prototype.isSelectable=function(){};DvtSelectable.prototype.isSelected=function(){};DvtSelectable.prototype.setSelected=function(a){};DvtSelectable.prototype.showHoverEffect=function(){};DvtSelectable.prototype.hideHoverEffect=function(){};var DvtComponentKeyboardHandler=function(){};
DvtComponentKeyboardHandler.prototype.handleKeyboardEvent=function(a){};DvtComponentKeyboardHandler.prototype.hideKeyboardFocusEffect=function(){};var DvtKeyboardNavigable=function(){};DvtObj.createSubclass(DvtKeyboardNavigable,DvtObj,"DvtKeyboardNavigable");DvtKeyboardNavigable.prototype.getNextNavigable=function(a){};DvtKeyboardNavigable.prototype.getKeyboardBoundingBox=function(){};DvtKeyboardNavigable.prototype.showKeyboardFocusEffect=function(){};
DvtKeyboardNavigable.prototype.hideKeyboardFocusEffect=function(){};DvtKeyboardNavigable.prototype.isShowingKeyboardFocusEffect=function(){};DvtKeyboardNavigable.prototype.getContextMenuLocation=function(){};var DvtCategoricalObject=function(){};DvtObj.createSubclass(DvtCategoricalObject,DvtObj,"DvtCategoricalObject");DvtCategoricalObject.prototype.getCategories=function(){};var DvtContextMenuSource=function(){};DvtObj.createSubclass(DvtContextMenuSource,DvtObj,"DvtContextMenuSource");
DvtContextMenuSource.prototype.getContextMenuId=function(){};DvtContextMenuSource.prototype.getContextMenuLocation=function(){};var DvtPopupSource=function(){};DvtObj.createSubclass(DvtPopupSource,DvtObj,"DvtPopupSource");DvtPopupSource.prototype.getId=function(){};DvtPopupSource.prototype.getShowPopupBehaviors=function(){};var DvtZOrderManager=function(){};DvtObj.createSubclass(DvtZOrderManager,DvtObj,"DvtZOrderManager");DvtZOrderManager.prototype.bringToFrontOfSelection=function(a){};
DvtZOrderManager.prototype.pushToBackOfSelection=function(a){};DvtZOrderManager.prototype.setNumFrontObjs=function(a){};var DvtAutomationContainer=function(){};DvtObj.createSubclass(DvtAutomationContainer,DvtObj,"DvtAutomationContainer");DvtAutomationContainer.prototype.dispatchTestEvent=function(a,b,c){};var DvtSimpleObjPeer=function(a,b,c,d){this.Init(a,b,c,d)};DvtObj.createSubclass(DvtSimpleObjPeer,DvtObj,"DvtSimpleObjPeer");
DvtSimpleObjPeer.prototype.Init=function(a,b,c,d){this._tooltip=a;this._datatip=b;this._datatipColor=c;this._params=d};DvtSimpleObjPeer.prototype.setTooltip=function(a){this._tooltip=a};DvtSimpleObjPeer.prototype.setDatatip=function(a){this._datatip=a};DvtSimpleObjPeer.prototype.setDatatipColor=function(a){this._datatipColor=a};DvtSimpleObjPeer.prototype.getParams=function(){return this._params};DvtSimpleObjPeer.prototype.getTooltip=function(a){return this._tooltip};
DvtSimpleObjPeer.prototype.getDatatip=function(a){return this._datatip};DvtSimpleObjPeer.prototype.getDatatipColor=function(a){return this._datatipColor};var DvtAgent=function(){};DvtObj.createSubclass(DvtAgent,DvtObj,"DvtAgent");DvtAgent.UNKNOWN_VERSION=-1;DvtAgent.IE_PLATFORM="ie";DvtAgent.FLASH_PLATFORM="flash";DvtAgent.GECKO_PLATFORM="gecko";DvtAgent.WEBKIT_PLATFORM="webkit";DvtAgent.UNKNOWN_PLATFORM="unknown";DvtAgent.WINDOWS_OS="Windows";DvtAgent.SOLARIS_OS="Solaris";DvtAgent.MAC_OS="Mac";
DvtAgent.UNKNOWN_OS="Unknown";DvtAgent.getDevicePixelRatio=function(){DvtAgent._initialize();return DvtAgent._devicePixelRatio};DvtAgent.getElementPosition=function(a){return DvtAgent.getPlatform()==DvtAgent.FLASH_PLATFORM?new DvtPoint:DvtAgent.isPlatformIE()?DvtAgent._getElementPositionIE(a):DvtAgent.isPlatformGecko()?DvtAgent._getElementPositionGecko(a):DvtAgent._getElementPositionDefault(a)};DvtAgent.getPlatform=function(){DvtAgent._initialize();return DvtAgent._platform};
DvtAgent.getOS=function(){DvtAgent._initialize();return DvtAgent._os};DvtAgent.getVersion=function(){DvtAgent._initialize();return DvtAgent._version};DvtAgent.isBrowserChrome=function(){DvtAgent._initialize();return DvtAgent._bChrome};DvtAgent.isBrowserSafari=function(){return DvtAgent.isPlatformWebkit()&&!DvtAgent.isBrowserChrome()};DvtAgent.isPlatformGecko=function(){return DvtAgent.getPlatform()==DvtAgent.GECKO_PLATFORM};DvtAgent.isPlatformIE=function(){return DvtAgent.getPlatform()==DvtAgent.IE_PLATFORM};
DvtAgent.isPlatformWebkit=function(){return DvtAgent.getPlatform()==DvtAgent.WEBKIT_PLATFORM};DvtAgent.isRightToLeft=function(a){DvtAgent._initialize();return a&&null!=a.getReadingDirection()?"rtl"==a.getReadingDirection():DvtAgent._bRtl};DvtAgent.isTouchDevice=function(){DvtAgent._initialize();return DvtAgent._bTouchDevice};DvtAgent.setEnvironment=function(a){DvtAgent._environment=a};DvtAgent.isEnvironmentTest=function(){return"test"==DvtAgent._environment};
DvtAgent.isEnvironmentBatik=function(){return"batik"==DvtAgent._environment};DvtAgent.isEnvironmentBrowser=function(){return!DvtAgent.isEnvironmentTest()&&!DvtAgent.isEnvironmentBatik()};
DvtAgent._initialize=function(){if(!DvtAgent._bInitialized){var a=navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():null;DvtAgent._os=DvtAgent._determineOS(a);DvtAgent._platform=DvtAgent._determinePlatform(a);DvtAgent._bChrome=a&&-1!=a.indexOf("chrome/")&&-1===a.indexOf("edge");DvtAgent._version=DvtAgent._determineVersion(a,DvtAgent._platform);DvtAgent._bRtl=document&&document.documentElement?"rtl"==document.documentElement.dir:!1;DvtAgent._bTouchDevice=DvtAgent._platform==DvtAgent.WEBKIT_PLATFORM&&
a&&(-1!=a.indexOf("mobile")||-1!=a.indexOf("android"));DvtAgent._devicePixelRatio=window&&null!=window.devicePixelRatio?window.devicePixelRatio:1;DvtAgent._bInitialized=!0}};DvtAgent._determineOS=function(a){if(a){if(-1!=a.indexOf("win"))return DvtAgent.WINDOWS_OS;if(-1!=a.indexOf("mac"))return DvtAgent.MAC_OS;if(-1!=a.indexOf("sunos"))return DvtAgent.SOLARIS_OS}return DvtAgent.UNKNOWN_OS};
DvtAgent._determinePlatform=function(a){if(window){if(window.isFlashEnvironment)return DvtAgent.FLASH_PLATFORM;if(-1==a.indexOf("opera")){if(-1!=a.indexOf("trident")||-1!=a.indexOf("msie")||-1!=a.indexOf("edge"))return DvtAgent.IE_PLATFORM;if(-1!=a.indexOf("applewebkit")||-1!=a.indexOf("safari"))return DvtAgent.WEBKIT_PLATFORM;if(-1!=a.indexOf("gecko/"))return DvtAgent.GECKO_PLATFORM}}else if(DvtAgent.isEnvironmentTest())return DvtAgent.WEBKIT_PLATFORM;return DvtAgent.UNKNOWN_PLATFORM};
DvtAgent._determineVersion=function(a,b){if(a){if(b==DvtAgent.GECKO_PLATFORM)return DvtAgent._parseFloatVersion(a,/rv:(\d+[.]\d+)/);if(b==DvtAgent.IE_PLATFORM){var c=DvtAgent._parseFloatVersion(a,/trident\/(\d+[.]\d+)/);if(c!=DvtAgent.UNKNOWN_VERSION)return c+4;c=DvtAgent._parseFloatVersion(a,/edge\/(\d+[.]\d+)/);if(c!=DvtAgent.UNKNOWN_VERSION)return c;c=DvtAgent._parseFloatVersion(a,/msie (\d+\.\d+);/);return c!=DvtAgent.UNKNOWN_VERSION?c:DvtAgent._parseFloatVersion(a,/msie (\d+\.\d+)b;/)}if(b==
DvtAgent.WEBKIT_PLATFORM)return DvtAgent._parseFloatVersion(a,/applewebkit\/(\d+([.]\d+)*)/)}else if(DvtAgent.isEnvironmentTest())return 999;return DvtAgent.UNKNOWN_VERSION};DvtAgent._parseFloatVersion=function(a,b){try{var c=a.match(b);return c&&c[1]?parseFloat(c[1]):DvtAgent.UNKNOWN_VERSION}catch(d){return console.error("DvtAgent._parseFloatVersion error: "),console.error(d),DvtAgent.UNKNOWN_VERSION}};
DvtAgent._getElementPositionGecko=function(a){var b=a.getBoundingClientRect(),c=Math.round(b.top),b=b.left;a=a.ownerDocument.documentElement;b+=a.scrollLeft;c+=a.scrollTop;return new DvtPoint(b,c)};DvtAgent._getElementPositionIE=function(a){var b=a.getBoundingClientRect(),c=b.top,b=b.left;a=a.ownerDocument.documentElement;b-=a.clientLeft-a.scrollLeft;c-=a.clientTop-a.scrollTop;return{x:b,y:c}};
DvtAgent._getElementPositionDefault=function(a){for(var b=a.ownerDocument.body,c=a.offsetParent,d=a.offsetLeft,e=a.offsetTop;c;)a=c,d+=a.offsetLeft,e+=a.offsetTop,a!=b&&(d-=a.scrollLeft,e-=a.scrollTop),c=c.offsetParent;return{x:d,y:e}};var DvtBundle=function(){};DvtBundle._localizedStrings={};DvtObj.createSubclass(DvtBundle,DvtObj,"DvtBundle");DvtBundle.addLocalizedStrings=function(a){for(key in a)DvtBundle._localizedStrings[key]=a[key]};
DvtBundle.prototype._getLocalizedStringForKey=function(a){a=this._getFQKey(a);return DvtBundle._localizedStrings[a]};DvtBundle.prototype.GetBundlePrefix=function(){};DvtBundle.prototype.GetDefaultStringForKey=function(a){};DvtBundle.format=function(a,b){return a.replace(/\{(\d+)\}/g,function(a,d){return b[d]})};
DvtBundle.prototype.getTranslatedString=function(a,b){var c=this._getLocalizedStringForKey(a);c||(c=this.GetDefaultStringForKey(a));c&&null!==b&&void 0!==b&&(c=b instanceof Array?DvtBundle.format(c,b):DvtBundle.format(c,[b]));return c};DvtBundle.prototype._getFQKey=function(a){var b=this.GetBundlePrefix(),c=a;if(a.length<=b.length||a.substring(0,b.length)!==b)c=b+"."+a;return c};var DvtContextMenuHandler=function(a){this.Init(a)};DvtObj.createSubclass(DvtContextMenuHandler,DvtObj,"DvtContextMenuHandler");
DvtContextMenuHandler.TYPE_BODY_CONTEXT_MENU="bodyContextMenu";DvtContextMenuHandler.TYPE_CONTEXT_MENU="contextMenu";DvtContextMenuHandler.TYPE_MULTI_SELECT_CONTEXT_MENU="multiSelectContextMenu";DvtContextMenuHandler._ATTR_MENU_CONTAINER_TYPE="t";DvtContextMenuHandler._ATTR_MENU_CONTAINER_POPUP_ID="id";DvtContextMenuHandler._ATTR_MENU_ITEMS="i";DvtContextMenuHandler._ATTR_ITEM_TEXT="t";DvtContextMenuHandler._ATTR_ITEM_DISABLED="di";DvtContextMenuHandler._ATTR_ITEM_SEP_BEFORE="sb";
DvtContextMenuHandler._ATTR_ITEM_CLIENT_ID="id";DvtContextMenuHandler._ATTR_ITEM_DESTINATION="d";DvtContextMenuHandler._ATTR_ITEM_TARGET_FRAME="tf";DvtContextMenuHandler.prototype.Init=function(a){this._context=a;this._xmlNodes=[];this._impl=a.getImplFactory().newContextMenuHandler();this._impl.setObj(this)};DvtContextMenuHandler.prototype.add=function(a){this._xmlNodes.push(a)};DvtContextMenuHandler.prototype.show=function(a,b,c){return this._impl.getMenuEvent(this._xmlNodes,a,b,c)};
DvtContextMenuHandler.prototype.prepareMenuItems=function(a,b,c){this._impl.prepareMenuItems(a,b,c)};
DvtContextMenuHandler.prototype.getMenuItems=function(a,b){b||(b=0);if(a===DvtContextMenuHandler.TYPE_BODY_CONTEXT_MENU||a===DvtContextMenuHandler.TYPE_MULTI_SELECT_CONTEXT_MENU)b=0;for(var c=0;c<this._xmlNodes.length;c++){var d=this._xmlNodes[c];if(a==d.getAttr(DvtContextMenuHandler._ATTR_MENU_CONTAINER_TYPE)&&null!=b&&0<=b){var e=d.getChildNodes();if(e&&e.length>b&&(d=e[b].getAttr(DvtContextMenuHandler._ATTR_MENU_ITEMS))){for(var c=e[e.length-1].getChildNodes(),d=d.split(","),e=[],f=0;f<d.length;f++){var g=
c[d[f]],h=g.getAttr(DvtContextMenuHandler._ATTR_ITEM_TEXT),k=g.getAttr(DvtContextMenuHandler._ATTR_ITEM_DISABLED),m=g.getAttr(DvtContextMenuHandler._ATTR_ITEM_SEP_BEFORE),n=g.getAttr(DvtContextMenuHandler._ATTR_ITEM_CLIENT_ID),p=g.getAttr(DvtContextMenuHandler._ATTR_ITEM_DESTINATION),g=g.getAttr(DvtContextMenuHandler._ATTR_ITEM_TARGET_FRAME),n=new DvtGraphContextMenuSelectEvent(a,n,p,g);e.push(new DvtContextMenuItem(n,h,k,m))}return e}}}return null};DvtContextMenuHandler.prototype.getCtx=function(){return this._context};
DvtContextMenuHandler.prototype.DispatchContextMenuSelectEvent=function(a){this.getCtx().getJsExt().dispatchEvent(null,null,null,a)};var DvtPopupBehaviorHandler=function(a,b,c){this._context=a;this._callback=b;this._callbackObj=c;this._hoverBehavior=this._hoverTarget=this._popupPosition=null;this._hoverPopupShown=!1;this._hoverTimer=new DvtTimer(a,500,this._onHoverDelay,this,1)};DvtObj.createSubclass(DvtPopupBehaviorHandler,DvtObj,"DvtPopupBehaviorHandler");
DvtPopupBehaviorHandler.prototype.processClick=function(a,b,c){var d=!1;if(a&&b&&0<b.length)for(var e=0;e<b.length;e++){var f=b[e];!f||f.getTriggerType()!=DvtGraphShowPopupBehavior.TRIGGER_TYPE_ACTION&&f.getTriggerType()!=DvtGraphShowPopupBehavior.TRIGGER_TYPE_CLICK||(this.HidePopup(),d=this._createShowPopupEvent(a,f,c),DvtEventDispatcher.dispatchEvent(this._callback,this._callbackObj,this,d),d=!0)}return d};
DvtPopupBehaviorHandler.prototype.processMouseOver=function(a,b,c,d){if(a===this._hoverTarget)return!0;if(a&&b&&0<b.length)for(var e=0;e<b.length;e++){var f=b[e];if(f&&f.getTriggerType()==DvtGraphShowPopupBehavior.TRIGGER_TYPE_MOUSE_HOVER)return this.HidePopup(),this._hoverTarget=a,this._hoverBehavior=f,this._hoverDisplayable=d,this._popupPosition=c,this._hoverTimer.start(),!0}return!1};
DvtPopupBehaviorHandler.prototype.processMouseOut=function(a,b){var c=!1;b&&(c=1>b.length);!this._hoverTarget||!this._hoverBehavior||a!==this._hoverTarget&&!c||b&&this._hoverDisplayable&&-1<DvtArrayUtils.getIndex(b,this._hoverDisplayable)||this.HidePopup()};
DvtPopupBehaviorHandler.prototype.HidePopup=function(){if(this._hoverPopupShown){var a=new DvtGraphHidePopupEvent(this._hoverBehavior.getPopupId());DvtEventDispatcher.dispatchEvent(this._callback,this._callbackObj,this,a)}else this._hoverTimer.stop();this._hoverBehavior=this._hoverTarget=null;this._hoverPopupShown=!1;this._hoverDisplayable=null};DvtPopupBehaviorHandler.prototype.processMouseMove=function(a){this._popupPosition=a};
DvtPopupBehaviorHandler.prototype._createShowPopupEvent=function(a,b,c){var d=b,e=b;(b=d.getAlign()&&!d.getAlignId())&&(e=new DvtGraphShowPopupBehavior(d.getPopupId(),d.getTriggerType(),null,null));e=a.getPopupBounds?a.getPopupBounds(e):null;b&&!e?(c=this._context.getDocumentUtils().getStageRelativePosition(this._context.getStage(),c.x,c.y),e=new DvtRectangle(c.x,c.y-5,1,5)):e&&(d=new DvtGraphShowPopupBehavior(d.getPopupId(),d.getTriggerType(),null,d.getAlign()));d=new DvtGraphShowPopupEvent(d,e,
null);DvtEventManager._addContextInfo(a,d);return d};DvtPopupBehaviorHandler.prototype._onHoverDelay=function(){if(this._hoverTarget&&this._hoverBehavior){this._hoverPopupShown=!0;var a=this._createShowPopupEvent(this._hoverTarget,this._hoverBehavior,this._popupPosition);DvtEventDispatcher.dispatchEvent(this._callback,this._callbackObj,this,a)}};var DvtClientBehaviorHandler=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtClientBehaviorHandler,DvtObj,"DvtClientBehaviorHandler");
DvtClientBehaviorHandler.prototype.Init=function(a,b,c){this._context=a;this._callback=b;this._callbackObj=c};DvtClientBehaviorHandler.prototype.processClick=function(a,b){var c=!1;if(a&&b&&0<b.length)for(var d=0;d<b.length;d++){var e=b[d];!e||e.getTriggerType()!=DvtClientBehavior.TRIGGER_TYPE_ACTION&&e.getTriggerType()!=DvtClientBehavior.TRIGGER_TYPE_CLICK||(c=this.CreateClientBehaviorEvent(a,e),DvtEventDispatcher.dispatchEvent(this._callback,this._callbackObj,null,c),c=!0)}return c};
DvtClientBehaviorHandler.prototype.CreateClientBehaviorEvent=function(a,b){var c=new DvtClientBehaviorEvent(b);DvtEventManager._addContextInfo(a,c);return c};var DvtSelectionHandler=function(a){this.Init(a)};DvtObj.createSubclass(DvtSelectionHandler,DvtObj,"DvtSelectionHandler");DvtSelectionHandler.TYPE_SINGLE="s";DvtSelectionHandler.TYPE_MULTIPLE="m";DvtSelectionHandler.prototype.Init=function(a){this._selection=[];this._type=a?a:DvtSelectionHandler.TYPE_SINGLE;this._hiddenSelectedIds=[]};
DvtSelectionHandler.prototype.getType=function(){return this._type};DvtSelectionHandler.prototype.getSelectedCount=function(){return this._selection.length};DvtSelectionHandler.prototype.getSelection=function(){return this._selection.slice(0)};DvtSelectionHandler.prototype.getSelectedIds=function(){for(var a=[],b=0;b<this._selection.length;b++)a.push(this._selection[b].getId());return a.concat(this._hiddenSelectedIds)};
DvtSelectionHandler.prototype.processInitialSelections=function(a,b){this.clearSelection();if(a&&b)for(var c=0;c<a.length;c++){for(var d=!0,e=0;e<b.length;e++){var f=b[e].getId();if(null!=f&&DvtSelectionHandler._isEquals(a[c],f)&&b[e].isSelectable&&b[e].isSelectable()){this._addToSelection(b[e],!0);d=!1;break}}d&&this._hiddenSelectedIds.push(a[c])}};
DvtSelectionHandler.prototype.processClick=function(a,b){if(a&&a.isUnrelatedToSelection&&a.isUnrelatedToSelection())return!1;var c=!1;b&&this._type==DvtSelectionHandler.TYPE_MULTIPLE?a&&a.isSelectable&&a.isSelectable()&&(c=a.isSelected()?this.removeFromSelection(a):this._addToSelection(a,!0)):c=a&&a.isSelectable&&a.isSelectable()?this._addToSelection(a,!1):this.clearSelection();return c};
DvtSelectionHandler.prototype.processGroupSelection=function(a,b){b||this.clearSelection();for(var c,d=0;d<a.length;d++)(c=a[d])&&c.isUnrelatedToSelection&&c.isUnrelatedToSelection()||this._addToSelection(c,!0)};DvtSelectionHandler.prototype.processMouseOver=function(a){a&&a.isSelectable&&a.isSelectable()&&a.showHoverEffect&&a.showHoverEffect()};DvtSelectionHandler.prototype.processMouseOut=function(a){a&&a.isSelectable&&a.isSelectable()&&a.hideHoverEffect&&a.hideHoverEffect()};
DvtSelectionHandler.prototype._addToSelection=function(a,b){if(a.isSelected())return!1;b||this.clearSelection();a.setSelected(!0);this._selection.push(a);return!0};DvtSelectionHandler.prototype.removeFromSelection=function(a){if(!a.isSelected())return!1;a.setSelected(!1);for(var b=0;b<this._selection.length;b++)if(this._selection[b]==a){this._selection.splice(b,1);break}return!0};
DvtSelectionHandler.prototype.clearSelection=function(){if(0>=this._selection.length&&0>=this._hiddenSelectedIds.length)return!1;for(;0<this._selection.length;)this._selection.pop().setSelected(!1);this._hiddenSelectedIds.length=0;return!0};DvtSelectionHandler._isEquals=function(a,b){return a==b?!0:a instanceof String?!1:a&&a.equals?a.equals(b):!1};var DvtKeyboardHandler=function(a){this.Init(a)};DvtObj.createSubclass(DvtKeyboardHandler,DvtObj,"DvtKeyboardHandler");
DvtKeyboardHandler._OPTIMAL_ANGLE1=15/180*Math.PI;DvtKeyboardHandler._OPTIMAL_ANGLE2=40/180*Math.PI;DvtKeyboardHandler._SUBOPTIMAL_ANGLE_PENALTY1=2;DvtKeyboardHandler._SUBOPTIMAL_ANGLE_PENALTY2=6;DvtKeyboardHandler.prototype.Init=function(a){this._eventManager=a};DvtKeyboardHandler.prototype.processKeyDown=function(a){var b=this._eventManager.getFocus();return b&&(this.isNavigationEvent(a)||this.isMultiSelectEvent(a))?(a.preventDefault(),a=b.getNextNavigable(a),this._eventManager.setFocus(a),a):null};
DvtKeyboardHandler.getNextNavigable=function(a,b,c){var d=null,e=0,f=0;b=b.keyCode;if(!a)return!c||1>c.length?null:c[0];for(var g=a.getKeyboardBoundingBox(),h=0;h<c.length;h++){var k=c[h];a!==k&&(f=k.getKeyboardBoundingBox(),DvtKeyboardHandler._isInBounds(g,f,b)&&(f=DvtKeyboardHandler._computeDelta(g,f,b),(b==DvtKeyboardEvent.UP_ARROW||b==DvtKeyboardEvent.LEFT_ARROW)&&0>f&&(!d||f>e)||(b==DvtKeyboardEvent.DOWN_ARROW||b==DvtKeyboardEvent.RIGHT_ARROW)&&0<f&&(!d||f<e)))&&(d=k,e=f)}return d?d:a};
DvtKeyboardHandler.prototype.getDefaultNavigable=function(a){if(!a||0>=a.length)return null;for(var b=a[0],c=b.getKeyboardBoundingBox(),d,e,f=1;f<a.length;f++)if(d=a[f],e=d.getKeyboardBoundingBox(),(e.x==c.x&&e.y<c.y||e.x<c.x)&&!DvtAgent.isRightToLeft(this._eventManager.getCtx())||(e.x+e.w==c.x+c.w&&e.y<c.y||e.x+e.w<c.x+c.w)&&DvtAgent.isRightToLeft(this._eventManager.getCtx()))b=d,c=b.getKeyboardBoundingBox();return b};DvtKeyboardHandler.prototype.isNavigationEvent=function(a){switch(a.keyCode){case DvtKeyboardEvent.UP_ARROW:case DvtKeyboardEvent.DOWN_ARROW:case DvtKeyboardEvent.LEFT_ARROW:case DvtKeyboardEvent.RIGHT_ARROW:return!0}return!1};
DvtKeyboardHandler.prototype.isSelectionEvent=function(a){return!1};DvtKeyboardHandler.prototype.isMultiSelectEvent=function(a){return!1};DvtKeyboardHandler.prototype.isContextMenuEvent=function(a){return a.keyCode==DvtKeyboardEvent.M&&a.altKey&&a.ctrlKey};
DvtKeyboardHandler._isInBounds=function(a,b,c){if(c==DvtKeyboardEvent.UP_ARROW||c==DvtKeyboardEvent.DOWN_ARROW){c=a.x;a=c+a.w;var d=b.x;return!(c>=d+b.w||a<=d)}if(c==DvtKeyboardEvent.LEFT_ARROW||c==DvtKeyboardEvent.RIGHT_ARROW)return c=a.y,a=c+a.h,d=b.y,!(c>=d+b.h||a<=d)};
DvtKeyboardHandler._computeDelta=function(a,b,c){var d=0,e=a.getCenter().x;a=a.getCenter().y;var f=b.getCenter().x;b=b.getCenter().y;if(c==DvtKeyboardEvent.UP_ARROW||c==DvtKeyboardEvent.DOWN_ARROW)d=b-a;else if(c==DvtKeyboardEvent.LEFT_ARROW||c==DvtKeyboardEvent.RIGHT_ARROW)d=f-e;return d};
DvtKeyboardHandler.getNextAdjacentNavigable=function(a,b,c){b=b.keyCode;if(!c)return null;if(!a)return c[0];for(var d=a,e=Number.MAX_VALUE,f=!1,g=0;g<c.length;g++){var h=c[g];if(h!==a&&DvtKeyboardHandler._isValidDestination(h,a,b)){var k=DvtKeyboardHandler._calcInContact(h,a,b);if(!f||k){var m=DvtKeyboardHandler._calcDistanceAngleWeighted(h,a,b);if(!f&&k||m<e&&(f&&k||!f))e=m,d=h,f=k}}}return d};
DvtKeyboardHandler._calcInContact=function(a,b,c){a=a.getKeyboardBoundingBox();b=b.getKeyboardBoundingBox();switch(c){case DvtKeyboardEvent.UP_ARROW:return DvtKeyboardHandler._isVerticallyAligned(a,b)&&(b.y<=a.y+a.h||DvtKeyboardHandler._areEqualWithinTolerance(b.y,a.y+a.h));case DvtKeyboardEvent.DOWN_ARROW:return DvtKeyboardHandler._isVerticallyAligned(a,b)&&(a.y<=b.y+b.h||DvtKeyboardHandler._areEqualWithinTolerance(a.y,b.y+b.h));case DvtKeyboardEvent.RIGHT_ARROW:return DvtKeyboardHandler._isHorizontallyAligned(a,
b)&&(a.x<=b.x+b.w||DvtKeyboardHandler._areEqualWithinTolerance(a.x,b.x+b.w));case DvtKeyboardEvent.LEFT_ARROW:return DvtKeyboardHandler._isHorizontallyAligned(a,b)&&(b.x<=a.x+a.w||DvtKeyboardHandler._areEqualWithinTolerance(b.x,a.x+a.w))}return!1};DvtKeyboardHandler._isVerticallyAligned=function(a,b){return a.x>=b.x&&a.x<=b.x+b.w||b.x>=a.x&&b.x<=a.x+a.w};DvtKeyboardHandler._isHorizontallyAligned=function(a,b){return a.y>=b.y&&a.y<=b.y+b.h||b.y>=a.y&&b.y<=a.y+a.h};
DvtKeyboardHandler._calcDistanceAngleWeighted=function(a,b,c){var d=a.getKeyboardBoundingBox();a=d.x+d.w/2;var d=d.y+d.h/2,e=b.getKeyboardBoundingBox();b=Math.abs(a-(e.x+e.w/2));d=Math.abs(d-(e.y+e.h/2));a=Math.atan2(d,b);b=Math.sqrt(b*b+d*d);if(a>DvtKeyboardHandler._OPTIMAL_ANGLE1&&(c==DvtKeyboardEvent.RIGHT_ARROW||c==DvtKeyboardEvent.LEFT_ARROW)||a<DvtMath.HALF_PI-DvtKeyboardHandler._OPTIMAL_ANGLE1&&(c==DvtKeyboardEvent.UP_ARROW||c==DvtKeyboardEvent.DOWN_ARROW))b=a>DvtKeyboardHandler._OPTIMAL_ANGLE2&&
(c==DvtKeyboardEvent.RIGHT_ARROW||c==DvtKeyboardEvent.LEFT_ARROW)||a<DvtMath.HALF_PI-DvtKeyboardHandler._OPTIMAL_ANGLE2&&(c==DvtKeyboardEvent.UP_ARROW||c==DvtKeyboardEvent.DOWN_ARROW)?b*DvtKeyboardHandler._SUBOPTIMAL_ANGLE_PENALTY2:b*DvtKeyboardHandler._SUBOPTIMAL_ANGLE_PENALTY1;return b};
DvtKeyboardHandler._isValidDestination=function(a,b,c){a=a.getKeyboardBoundingBox();b=b.getKeyboardBoundingBox();switch(c){case DvtKeyboardEvent.UP_ARROW:return a.y<b.y||DvtKeyboardHandler._areEqualWithinTolerance(a.y,b.y);case DvtKeyboardEvent.DOWN_ARROW:return a.y>b.y||DvtKeyboardHandler._areEqualWithinTolerance(a.y,b.y);case DvtKeyboardEvent.RIGHT_ARROW:return a.x>b.x||DvtKeyboardHandler._areEqualWithinTolerance(a.x,b.x);case DvtKeyboardEvent.LEFT_ARROW:return a.x<b.x||DvtKeyboardHandler._areEqualWithinTolerance(a.x,
b.x)}return!0};DvtKeyboardHandler._areEqualWithinTolerance=function(a,b){return 1E-7>=Math.abs(a-b)};var DvtMarqueeHandler=function(a,b,c,d,e,f,g,h,k){this.Init(a,b,c,d,e,f,g,h,k)};DvtObj.createSubclass(DvtMarqueeHandler,DvtObj,"DvtMarqueeHandler");
DvtMarqueeHandler.prototype.Init=function(a,b,c,d,e,f,g,h,k){this._context=a.getCtx();this._container=a;this._bounds=b;this._fill=d;this._stroke=e;this._allowHoriz=null==f?!0:f;this._allowVert=null==g?!0:g;this._horizBounds=h;this._vertBounds=k;this._glassPane=new DvtRect(this._context,c.x,c.y,c.w,c.h);this._glassPane.setInvisibleFill();this._resizeVert=this._resizeHoriz=this._marqueeDrawn=this._marqueeOn=!1};
DvtMarqueeHandler.prototype.processDragStart=function(a,b){if(!this._marqueeOn){this._origPt=this._container.stageToLocal(a);this._resizeHoriz=this._allowHoriz;this._resizeVert=this._allowVert;if(!this._bounds.containsPoint(this._origPt.x,this._origPt.y))if(this._vertBounds&&this._vertBounds.containsPoint(this._origPt.x,this._origPt.y))this._resizeHoriz=!1;else if(this._horizBounds&&this._horizBounds.containsPoint(this._origPt.x,this._origPt.y))this._resizeVert=!1;else return null;this._marqueeOn=
!0;this._marquee=null;return this._createMarqueeEvent(DvtMarqueeEvent.SUBTYPE_START,b)}return null};
DvtMarqueeHandler.prototype.processDragMove=function(a,b){if(!this._marqueeOn)return null;this._marqueeDrawn||(this._container.addChild(this._glassPane),this._marquee=new DvtRect(this._context,this._bounds.x,this._bounds.y,this._bounds.w,this._bounds.h),this._resizeHoriz&&(this._marquee.setX(this._origPt.x),this._marquee.setWidth(0)),this._resizeVert&&(this._marquee.setY(this._origPt.y),this._marquee.setHeight(0)),this._marquee.setStroke(this._stroke),this._marquee.setFill(this._fill),this._marquee.setPixelHinting(!0),
this._glassPane.addChild(this._marquee),this._marqueeDrawn=!0);var c=this._container.stageToLocal(a);c.x=Math.max(c.x,this._bounds.x);c.x=Math.min(c.x,this._bounds.x+this._bounds.w);c.y=Math.max(c.y,this._bounds.y);c.y=Math.min(c.y,this._bounds.y+this._bounds.h);this._resizeHoriz&&(this._marquee.setWidth(Math.abs(c.x-this._origPt.x)),c.x<this._origPt.x?this._marquee.setX(c.x):this._marquee.setX(this._origPt.x));this._resizeVert&&(this._marquee.setHeight(Math.abs(c.y-this._origPt.y)),c.y<this._origPt.y?
this._marquee.setY(c.y):this._marquee.setY(this._origPt.y));return this._createMarqueeEvent(DvtMarqueeEvent.SUBTYPE_MOVE,b)};DvtMarqueeHandler.prototype.processDragEnd=function(a,b){return this._marqueeOn&&(this._marqueeOn=!1,this._marqueeDrawn)?(this._glassPane.removeChild(this._marquee),this._container.removeChild(this._glassPane),this._marqueeDrawn=!1,this._createMarqueeEvent(DvtMarqueeEvent.SUBTYPE_END,b)):null};
DvtMarqueeHandler.prototype.cancelMarquee=function(){return this._marqueeOn&&(this._marqueeOn=!1,this._marqueeDrawn)?(this._glassPane.removeChild(this._marquee),this._container.removeChild(this._glassPane),this._marqueeDrawn=!1,!0):!1};
DvtMarqueeHandler.prototype._createMarqueeEvent=function(a,b){var c=null,d=null,e=null,f=null;this._resizeHoriz&&(c=this._marquee?this._marquee.getX():this._origPt.x,e=this._marquee?this._marquee.getWidth():0);this._resizeVert&&(d=this._marquee?this._marquee.getY():this._origPt.y,f=this._marquee?this._marquee.getHeight():0);return new DvtMarqueeEvent(a,c,d,e,f,b)};
DvtMarqueeHandler.prototype.getCursor=function(a){var b=this._container.stageToLocal(a);a=this._bounds.containsPoint(b.x,b.y);var c=this._vertBounds&&this._vertBounds.containsPoint(b.x,b.y),b=this._horizBounds&&this._horizBounds.containsPoint(b.x,b.y);return a||c||b?"crosshair":"inherit"};var DvtPanZoomHandler=function(a,b,c,d){this.Init(a,b,c,d)};DvtObj.createSubclass(DvtPanZoomHandler,DvtObj,"DvtPanZoomHandler");
DvtPanZoomHandler.prototype.Init=function(a,b,c,d){this._context=a.getCtx();this._container=a;this._bounds=b;this._zoomRate=d;this._glassPane=new DvtRect(this._context,c.x,c.y,c.w,c.h);this._glassPane.setInvisibleFill();this._pinchOn=this._glassPaneDrawn=this._panOn=!1};
DvtPanZoomHandler.prototype.processDragStart=function(a){if(!this._panOn){this._lastPt=this._origPt=this._container.stageToLocal(a);if(!this._bounds.containsPoint(this._origPt.x,this._origPt.y))return null;this._panOn=!0;return new DvtPanZoomEvent(DvtPanZoomEvent.SUBTYPE_PAN_START,0,0,0,0,0,0,0,0)}return null};
DvtPanZoomHandler.prototype.processDragMove=function(a){if(!this._panOn)return null;this._glassPaneDrawn||(this._container.addChild(this._glassPane),this._glassPaneDrawn=!0);a=this._container.stageToLocal(a);var b=a.x-this._lastPt.x,c=a.y-this._lastPt.y,d=a.x-this._origPt.x,e=a.y-this._origPt.y;this._lastPt=a;return new DvtPanZoomEvent(DvtPanZoomEvent.SUBTYPE_PAN_MOVE,-b,-b,-c,-c,-d,-d,-e,-e)};
DvtPanZoomHandler.prototype.processDragEnd=function(a){if(this._panOn&&(this._panOn=!1,this._glassPaneDrawn)){this._container.removeChild(this._glassPane);this._glassPaneDrawn=!1;var b=a?this._container.stageToLocal(a):this._lastPt;a=b.x-this._lastPt.x;var c=b.y-this._lastPt.y,d=b.x-this._origPt.x,b=b.y-this._origPt.y;this._lastPt=null;return new DvtPanZoomEvent(DvtPanZoomEvent.SUBTYPE_PAN_END,-a,-a,-c,-c,-d,-d,-b,-b)}return null};
DvtPanZoomHandler.prototype.processMouseWheel=function(a,b){var c=this._container.stageToLocal(a);if(!this._bounds.containsPoint(c.x,c.y))return null;b*=this._zoomRate;var d=b*(c.x-this._bounds.x),e=-b*(this._bounds.x+this._bounds.w-c.x),f=b*(c.y-this._bounds.y),c=-b*(this._bounds.y+this._bounds.h-c.y);return new DvtPanZoomEvent(DvtPanZoomEvent.SUBTYPE_ZOOM,d,e,f,c,d,e,f,c)};
DvtPanZoomHandler.prototype.processPinchStart=function(a,b){if(!this._pinchOn){this._origPt1=this._container.stageToLocal(a);this._origPt2=this._container.stageToLocal(b);this._lastPt1=this._origPt1;this._lastPt2=this._origPt2;if(!this._bounds.containsPoint(this._origPt1.x,this._origPt1.y)||!this._bounds.containsPoint(this._origPt2.x,this._origPt2.y))return null;this._pinchOn=!0;return new DvtPanZoomEvent(DvtPanZoomEvent.SUBTYPE_PINCH_START,0,0,0,0,0,0,0,0)}return null};
DvtPanZoomHandler.prototype.processPinchMove=function(a,b){if(!this._pinchOn)return null;var c=this._container.stageToLocal(a),d=this._container.stageToLocal(b),e=this._computePinchDeltas(c,d,this._lastPt1,this._lastPt2),f=this._computePinchDeltas(c,d,this._origPt1,this._origPt2);this._lastPt1=c;this._lastPt2=d;return new DvtPanZoomEvent(DvtPanZoomEvent.SUBTYPE_PINCH_MOVE,e.dxMin,e.dxMax,e.dyMin,e.dyMax,f.dxMin,f.dxMax,f.dyMin,f.dyMax)};
DvtPanZoomHandler.prototype.processPinchEnd=function(){if(this._pinchOn){this._pinchOn=!1;var a=this._computePinchDeltas(this._lastPt1,this._lastPt2,this._origPt1,this._origPt2);this._lastPt2=this._lastPt1=null;return new DvtPanZoomEvent(DvtPanZoomEvent.SUBTYPE_PINCH_END,0,0,0,0,a.dxMin,a.dxMax,a.dyMin,a.dyMax)}return null};
DvtPanZoomHandler.prototype._computePinchDeltas=function(a,b,c,d){var e=Math.abs(a.x-b.x),f=Math.abs(a.y-b.y),g=Math.abs(c.x-d.x),h=Math.abs(c.y-d.y),g=e>f/2?g/e:1,e=f>e/2?h/f:1,f=(a.x+b.x)/2;b=(a.y+b.y)/2;a=f-(c.x+d.x)/2;c=b-(c.y+d.y)/2;d=(1-g)*(f-this._bounds.x);g=(g-1)*(this._bounds.x+this._bounds.w-f);f=(1-e)*(b-this._bounds.y);e=(e-1)*(this._bounds.y+this._bounds.h-b);return{dxMin:d-a,dxMax:g-a,dyMin:f-c,dyMax:e-c}};
DvtPanZoomHandler.prototype.setPanCursor=function(a,b){DvtAgent.isPlatformIE()||(a&&(this._panUpCursor="url("+a+") 8 8, auto"),b&&(this._panDownCursor="url("+b+") 8 8, auto"))};DvtPanZoomHandler.prototype.getCursor=function(a){var b=!0;a&&(a=this._container.stageToLocal(a),b=this._bounds.containsPoint(a.x,a.y));return b?this._panOn?this._panDownCursor?this._panDownCursor:"move":this._panUpCursor?this._panUpCursor:"move":"inherit"};var DvtBlackBoxAnimationHandler=function(){};
DvtObj.createSubclass(DvtBlackBoxAnimationHandler,DvtObj,"DvtBlackBoxAnimationHandler");DvtBlackBoxAnimationHandler.ALPHA_FADE="alphaFade";DvtBlackBoxAnimationHandler.CONVEYOR_FROM_RIGHT="conveyorFromRight";DvtBlackBoxAnimationHandler.CONVEYOR_FROM_LEFT="conveyorFromLeft";DvtBlackBoxAnimationHandler.CUBE_TO_RIGHT="cubeToRight";DvtBlackBoxAnimationHandler.CUBE_TO_LEFT="cubeToLeft";DvtBlackBoxAnimationHandler.FLIP_RIGHT="flipRight";DvtBlackBoxAnimationHandler.FLIP_LEFT="flipLeft";
DvtBlackBoxAnimationHandler.TRANSITION_TO_RIGHT="transitionToRight";DvtBlackBoxAnimationHandler.TRANSITION_TO_LEFT="transitionToLeft";DvtBlackBoxAnimationHandler.SLIDE_TO_RIGHT="slideToRight";DvtBlackBoxAnimationHandler.SLIDE_TO_LEFT="slideToLeft";DvtBlackBoxAnimationHandler.ZOOM="zoom";
DvtBlackBoxAnimationHandler.isSupported=function(a){return a==DvtBlackBoxAnimationHandler.ALPHA_FADE||a==DvtBlackBoxAnimationHandler.CONVEYOR_FROM_RIGHT||a==DvtBlackBoxAnimationHandler.CONVEYOR_FROM_LEFT||a==DvtBlackBoxAnimationHandler.CUBE_TO_RIGHT||a==DvtBlackBoxAnimationHandler.CUBE_TO_LEFT||a==DvtBlackBoxAnimationHandler.FLIP_RIGHT||a==DvtBlackBoxAnimationHandler.FLIP_LEFT||a==DvtBlackBoxAnimationHandler.TRANSITION_TO_RIGHT||a==DvtBlackBoxAnimationHandler.TRANSITION_TO_LEFT||a==DvtBlackBoxAnimationHandler.SLIDE_TO_RIGHT||
a==DvtBlackBoxAnimationHandler.SLIDE_TO_LEFT||a==DvtBlackBoxAnimationHandler.ZOOM};
DvtBlackBoxAnimationHandler.getInAnimation=function(a,b,c,d,e){return b==DvtBlackBoxAnimationHandler.ALPHA_FADE?new DvtAnimFadeIn(a,c,e):b==DvtBlackBoxAnimationHandler.CONVEYOR_FROM_RIGHT?new DvtAnimConveyorIn(a,c,DvtBaseAnimation.DIR_E,e):b==DvtBlackBoxAnimationHandler.CONVEYOR_FROM_LEFT?new DvtAnimConveyorIn(a,c,DvtBaseAnimation.DIR_W,e):b==DvtBlackBoxAnimationHandler.CUBE_TO_RIGHT?new DvtAnimCubeIn(a,c,DvtBaseAnimation.AXIS_Y,DvtBaseAnimation.ROT_DIR_CLOCKWISE,e):b==DvtBlackBoxAnimationHandler.CUBE_TO_LEFT?
new DvtAnimCubeIn(a,c,DvtBaseAnimation.AXIS_Y,DvtBaseAnimation.ROT_DIR_COUNTERCLOCKWISE,e):b==DvtBlackBoxAnimationHandler.FLIP_RIGHT?new DvtAnimFlipIn(a,c,DvtBaseAnimation.AXIS_Y,DvtBaseAnimation.ROT_DIR_CLOCKWISE,e):b==DvtBlackBoxAnimationHandler.FLIP_LEFT?new DvtAnimFlipIn(a,c,DvtBaseAnimation.AXIS_Y,DvtBaseAnimation.ROT_DIR_COUNTERCLOCKWISE,e):b==DvtBlackBoxAnimationHandler.TRANSITION_TO_RIGHT?new DvtAnimScaleFadeIn(a,c,d,DvtBaseAnimation.DIR_NW,.5,e):b==DvtBlackBoxAnimationHandler.TRANSITION_TO_LEFT?
new DvtAnimScaleFadeIn(a,c,d,DvtBaseAnimation.DIR_NE,.5,e):b==DvtBlackBoxAnimationHandler.SLIDE_TO_RIGHT?(DvtBlackBoxAnimationHandler._offsetObjects(c,-d.w,0),new DvtAnimMoveBy(a,c,new DvtPoint(d.w,0),e)):b==DvtBlackBoxAnimationHandler.SLIDE_TO_LEFT?(DvtBlackBoxAnimationHandler._offsetObjects(c,d.w,0),new DvtAnimMoveBy(a,c,new DvtPoint(-d.w,0),e)):b==DvtBlackBoxAnimationHandler.ZOOM?new DvtAnimScaleFadeIn(a,c,d,DvtBaseAnimation.DIR_C,.5,e):null};
DvtBlackBoxAnimationHandler.getCombinedAnimation=function(a,b,c,d,e,f){return b==DvtBlackBoxAnimationHandler.ALPHA_FADE?new DvtCombinedAnimFade(a,c,d,f):b==DvtBlackBoxAnimationHandler.CONVEYOR_FROM_RIGHT?new DvtCombinedAnimConveyor(a,c,d,DvtBaseAnimation.DIR_W,DvtBaseAnimation.DIR_E,f):b==DvtBlackBoxAnimationHandler.CONVEYOR_FROM_LEFT?new DvtCombinedAnimConveyor(a,c,d,DvtBaseAnimation.DIR_E,DvtBaseAnimation.DIR_W,f):b==DvtBlackBoxAnimationHandler.CUBE_TO_RIGHT?new DvtCombinedAnimCube(a,c,d,DvtBaseAnimation.AXIS_Y,
DvtBaseAnimation.ROT_DIR_CLOCKWISE,f):b==DvtBlackBoxAnimationHandler.CUBE_TO_LEFT?new DvtCombinedAnimCube(a,c,d,DvtBaseAnimation.AXIS_Y,DvtBaseAnimation.ROT_DIR_COUNTERCLOCKWISE,f):b==DvtBlackBoxAnimationHandler.FLIP_RIGHT?new DvtCombinedAnimFlip(a,c,d,DvtBaseAnimation.AXIS_Y,DvtBaseAnimation.ROT_DIR_CLOCKWISE,f):b==DvtBlackBoxAnimationHandler.FLIP_LEFT?new DvtCombinedAnimFlip(a,c,d,DvtBaseAnimation.AXIS_Y,DvtBaseAnimation.ROT_DIR_COUNTERCLOCKWISE,f):b==DvtBlackBoxAnimationHandler.TRANSITION_TO_RIGHT?
new DvtCombinedAnimScaleFade(a,c,d,e,DvtBaseAnimation.DIR_SE,DvtBaseAnimation.DIR_NW,.5,f):b==DvtBlackBoxAnimationHandler.TRANSITION_TO_LEFT?new DvtCombinedAnimScaleFade(a,c,d,e,DvtBaseAnimation.DIR_SW,DvtBaseAnimation.DIR_NE,.5,f):b==DvtBlackBoxAnimationHandler.SLIDE_TO_RIGHT?(DvtBlackBoxAnimationHandler._offsetObjects(d,-e.w,0),new DvtCombinedAnimMoveBy(a,c,d,new DvtPoint(e.w,0),new DvtPoint(e.w,0),f)):b==DvtBlackBoxAnimationHandler.SLIDE_TO_LEFT?(DvtBlackBoxAnimationHandler._offsetObjects(d,e.w,
0),new DvtCombinedAnimMoveBy(a,c,d,new DvtPoint(-e.w,0),new DvtPoint(-e.w,0),f)):b==DvtBlackBoxAnimationHandler.ZOOM?new DvtCombinedAnimScaleFade(a,c,d,e,DvtBaseAnimation.DIR_C,DvtBaseAnimation.DIR_C,.5,f):null};DvtBlackBoxAnimationHandler._offsetObjects=function(a,b,c){if(a.length)for(var d=0;d<a.length;d++)DvtBlackBoxAnimationHandler._offsetObjects(a[d],b,c);else a&&(a.setTranslateX(a.getTranslateX()+b),a.setTranslateY(a.getTranslateY()+c))};
var DvtDataAnimationHandler=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtDataAnimationHandler,DvtObj,"DvtDataAnimationHandler");DvtDataAnimationHandler.prototype.Init=function(a,b){this._context=a;this._deleteContainer=b;this._playables=[];this._newChart=null};
DvtDataAnimationHandler.prototype.constructAnimation=function(a,b){if(b){b=b.slice(0);if(a)for(var c=0;c<a.length;c++){var d=a[c];if(d){for(var e=d.getId(),f=!1,g=0;g<b.length;g++){var h=b[g];if(h){var k=h.getId();if(e===k||e&&e instanceof DvtObj&&e.equals&&e.equals(k)){h.animateUpdate(this,d);b.splice(g,1);f=!0;break}}}f||(b[0]&&b[0].getChart&&(d._newChart=b[0].getChart()),d.animateDelete(this,this._deleteContainer))}}for(c=0;c<b.length;c++)b[c]&&b[c].animateInsert(this)}};
DvtDataAnimationHandler.prototype.add=function(a,b){if(a){for(b||(b=0);this._playables.length<=b;)this._playables.push([]);this._playables[b].push(a)}};DvtDataAnimationHandler.prototype.getAnimation=function(){for(var a=[],b=0;b<this._playables.length;b++)if(0<this._playables[b].length){var c=new DvtParallelPlayable(this._context,this._playables[b]);a.push(c)}return new DvtSequentialPlayable(this._context,a)};DvtDataAnimationHandler.prototype.getNumPlayables=function(){return this._playables.length};
var DvtTooltipManager=function(){};DvtObj.createSubclass(DvtTooltipManager,DvtObj,"DvtTooltipManager");DvtTooltipManager.prototype.showDatatip=function(a,b,c,d){};DvtTooltipManager.prototype.showTooltip=function(a,b,c,d,e,f){};DvtTooltipManager.prototype.hideTooltip=function(){};var DvtCategoryRolloverHandler=function(){};DvtObj.createSubclass(DvtCategoryRolloverHandler,DvtObj,"DvtCategoryRolloverHandler");
DvtCategoryRolloverHandler.processEvent=function(a,b,c){if(a&&b){var d=c?c:.35;c=a.getCategory();a=a.getType()===DvtCategoryRolloverEvent.TYPE_OVER?d:1;for(d=0;d<b.length;d++){var e=b[d];if(e&&e.getCategories&&!DvtCategoryRolloverHandler._hasCategory(e,c)){var f=e.getDisplayables(f);DvtCategoryRolloverHandler._updateAlpha(f,a)}}}};
DvtCategoryRolloverHandler.highlight=function(a,b,c){if(a&&b){c=c?c:.35;for(var d=0;d<b.length;d++){var e=b[d];if(e&&e.getCategories){var f=a&&0<a.length&&!DvtCategoryRolloverHandler._hasCategory(e,a)?c:1,g=e.getDisplayables(g);DvtCategoryRolloverHandler._updateAlpha(g,f)}}}};DvtCategoryRolloverHandler._updateAlpha=function(a,b){if(a)for(var c=0;c<a.length;c++)a[c].setAlpha(b)};
DvtCategoryRolloverHandler._hasCategory=function(a,b){if(!a||!a.getCategories)return!1;var c=a.getCategories();if(b instanceof Array){for(var d=0;d<b.length;d++)if(0<=DvtArrayUtils.getIndex(c,b[d]))return!0;return!1}return 0<=DvtArrayUtils.getIndex(c,b)};var DvtHideShowCategoryHandler=function(){};DvtObj.createSubclass(DvtHideShowCategoryHandler,DvtObj,"DvtHideShowCategoryHandler");
DvtHideShowCategoryHandler.processEvent=function(a,b){if(a&&b)for(var c=a.getCategory(),d=a.getType()===DvtCategoryHideShowEvent.TYPE_HIDE,e=0;e<b.length;e++){var f=b[e];if(f&&f.getCategories&&0<=DvtArrayUtils.getIndex(f.getCategories(),c)){var g=f.getDisplayables(g);DvtHideShowCategoryHandler._updateVisible(g,!d)}}};DvtHideShowCategoryHandler._updateVisible=function(a,b){if(a)for(var c=0;c<a.length;c++)a[c].setVisible(b)};var DvtEventManager=function(a,b,c){this.Init(a,b,c)};
DvtObj.createSubclass(DvtEventManager,DvtObj,"DvtEventManager");DvtEventManager.CLEAR_SELECTION_ACTION_TYPE="clearSelectionActionType";
DvtEventManager.prototype.Init=function(a,b,c){this._context=a;this._callback=b;this._callbackObj=c;this._marqueeHandler=this.ContextMenuHandler=this._selectionHandler=null;this.PopupHandler=new DvtPopupBehaviorHandler(a,b,c);this.ClientBehaviorHandler=this.CreateClientBehaviorHandler(a,b,c);this.KeyboardHandler=null;this.setTooltipsEnabled(!0);a.getStage().getId();this.CustomTooltipManager=this._context.getCustomTooltipManager();this.CustomTooltipManager.addTooltipEventListener(DvtActionTooltipEvent.TOOLTIP_CLOSED_TYPE,
this.OnActionTooltipClosed,this);this.CustomTooltipManager.addTooltipEventListener(DvtActionTooltipEvent.TOOLTIP_STARTED_TYPE,this.OnActionTooltipStarted,this);this.TouchManager=null;DvtAgent.isTouchDevice()&&(this.TouchManager=new DvtTouchManager("touchmanager",this._context));this._isMagnifyShown=!1;this._focusedObj=null;this._bIgnoreNextClick=this._bMouseDrag=this._bMouseDown=this._bIgnoreClickAfterDrag=this._shouldDisplayKeyboardFocus=!1;this._ignoreNextClickOffTimer=null;this._eventInfo={};this._rolloverTypes=
[];this._keyboardHandlers=[this];this._currentKeyboardHandlerIdx=-1;this._bundle=new DvtUtilBundle};DvtEventManager.prototype.getCtx=function(){return this._context};DvtEventManager.prototype.associate=function(a,b){a&&(a._logicalObjects||(a._logicalObjects=[]),a._logicalObjects.push({logicalObject:b,eventManager:this}),!DvtAgent.isEnvironmentBrowser()&&a.getImpl().setLogicalObj&&a.getImpl().setLogicalObj(b))};
DvtEventManager.prototype.addListeners=function(a){a&&(DvtAgent.isTouchDevice()?(this.hideTooltip(),this._hideMagnify(),a.addEvtListener(DvtTouchEvent.TOUCHSTART,this.OnTouchStartBubble,!1,this),a.addEvtListener(DvtTouchEvent.TOUCHMOVE,this.OnTouchMoveBubble,!1,this),a.addEvtListener(DvtTouchEvent.TOUCHEND,this.OnTouchEndBubble,!1,this),this.TouchManager.addTouchEventListener(DvtComponentTouchEvent.TOUCH_HOVER_START_TYPE,this._preOnComponentTouchHoverStart,this),this.TouchManager.addTouchEventListener(DvtComponentTouchEvent.TOUCH_HOVER_MOVE_TYPE,
this._preOnComponentTouchHoverMove,this),this.TouchManager.addTouchEventListener(DvtComponentTouchEvent.TOUCH_HOVER_END_TYPE,this._preOnComponentTouchHoverEnd,this),this.TouchManager.addTouchEventListener(DvtComponentTouchEvent.TOUCH_HOVER_OUT_TYPE,this._preOnComponentTouchHoverOut,this),this.TouchManager.addTouchEventListener(DvtComponentTouchEvent.TOUCH_HOVER_OVER_TYPE,this._preOnComponentTouchHoverOver,this),this.TouchManager.addTouchEventListener(DvtComponentTouchEvent.TOUCH_CLICK_TYPE,this._preOnComponentTouchClick,
this),this.TouchManager.addTouchEventListener(DvtComponentTouchEvent.TOUCH_DOUBLE_CLICK_TYPE,this._preOnComponentTouchDblClick,this)):(a.addEvtListener(DvtMouseEvent.CLICK,this.PreOnClick,!1,this),a.addEvtListener(DvtMouseEvent.DBLCLICK,this.PreOnDblClick,!1,this),a.addEvtListener("contextmenu",this.PreOnContextMenu,!1,this),a.addEvtListener(DvtMouseEvent.MOUSEMOVE,this.PreOnMouseMove,!1,this),a.addEvtListener(DvtMouseEvent.MOUSEOVER,this.PreOnMouseOver,!1,this),a.addEvtListener(DvtMouseEvent.MOUSEOUT,
this.PreOnMouseOut,!1,this),a.addEvtListener(DvtMouseEvent.MOUSEDOWN,this.PreOnMouseDown,!1,this),a.addEvtListener(DvtMouseEvent.MOUSEUP,this.PreOnMouseUp,!1,this),a.addEvtListener(DvtKeyboardEvent.KEYDOWN,this.OnKeyDown,!1,this),a.addEvtListener(DvtKeyboardEvent.KEYUP,this.OnKeyUp,!1,this)))};
DvtEventManager.prototype.removeListeners=function(a){a&&(this.hideTooltip(),DvtAgent.isTouchDevice()?(this._hideMagnify(),a.removeEvtListener(DvtTouchEvent.TOUCHSTART,this.OnTouchStartBubble,!1,this),a.removeEvtListener(DvtTouchEvent.TOUCHMOVE,this.OnTouchMoveBubble,!1,this),a.removeEvtListener(DvtTouchEvent.TOUCHEND,this.OnTouchEndBubble,!1,this),this.TouchManager.removeTouchEventListener(DvtComponentTouchEvent.TOUCH_HOVER_START_TYPE,this._preOnComponentTouchHoverStart,this),this.TouchManager.removeTouchEventListener(DvtComponentTouchEvent.TOUCH_HOVER_MOVE_TYPE,
this._preOnComponentTouchHoverMove,this),this.TouchManager.removeTouchEventListener(DvtComponentTouchEvent.TOUCH_HOVER_END_TYPE,this._preOnComponentTouchHoverEnd,this),this.TouchManager.removeTouchEventListener(DvtComponentTouchEvent.TOUCH_HOVER_OUT_TYPE,this._preOnComponentTouchHoverOut,this),this.TouchManager.removeTouchEventListener(DvtComponentTouchEvent.TOUCH_HOVER_OVER_TYPE,this._preOnComponentTouchHoverOver,this),this.TouchManager.removeTouchEventListener(DvtComponentTouchEvent.TOUCH_CLICK_TYPE,
this._preOnComponentTouchClick,this),this.TouchManager.removeTouchEventListener(DvtComponentTouchEvent.TOUCH_DOUBLE_CLICK_TYPE,this._preOnComponentTouchDblClick,this)):(a.removeEvtListener(DvtMouseEvent.CLICK,this.PreOnClick,!1,this),a.removeEvtListener(DvtMouseEvent.DBLCLICK,this.PreOnDblClick,!1,this),a.removeEvtListener("contextmenu",this.PreOnContextMenu,!1,this),a.removeEvtListener(DvtMouseEvent.MOUSEMOVE,this.PreOnMouseMove,!1,this),a.removeEvtListener(DvtMouseEvent.MOUSEOVER,this.PreOnMouseOver,
!1,this),a.removeEvtListener(DvtMouseEvent.MOUSEOUT,this.PreOnMouseOut,!1,this),a.removeEvtListener(DvtMouseEvent.MOUSEDOWN,this.PreOnMouseDown,!1,this),a.removeEvtListener(DvtMouseEvent.MOUSEUP,this.PreOnMouseUp,!1,this),a.removeEvtListener(DvtKeyboardEvent.KEYDOWN,this.OnKeyDown,!1,this),a.removeEvtListener(DvtKeyboardEvent.KEYUP,this.OnKeyUp,!1,this)))};
DvtEventManager.prototype.destroy=function(){this.CustomTooltipManager&&(this.CustomTooltipManager.removeTooltipEventListener(DvtActionTooltipEvent.TOOLTIP_CLOSED_TYPE,this.OnActionTooltipClosed,this),this.CustomTooltipManager.removeTooltipEventListener(DvtActionTooltipEvent.TOOLTIP_STARTED_TYPE,this.OnActionTooltipStarted,this))};DvtEventManager.prototype.PreEventBubble=function(a){this.TouchManager.preEventBubble(a)};
DvtEventManager.prototype.setSelectionHandler=function(a){this._selectionHandler=a};DvtEventManager.prototype.getSelectionHandler=function(a){return this._selectionHandler};DvtEventManager.prototype.setMarqueeHandler=function(a){this._marqueeHandler=a};DvtEventManager.prototype.setDragSource=function(a){this.DragSource=a;DvtAgent.isTouchDevice()&&this.DragSource.setTouchManager(this.TouchManager)};DvtEventManager.prototype.setContextMenuHandler=function(a){this.ContextMenuHandler=a};
DvtEventManager.prototype.setKeyboardHandler=function(a){DvtAgent.isTouchDevice()||(this.KeyboardHandler=a)};DvtEventManager.prototype.getKeyboardHandler=function(){return this.KeyboardHandler};
DvtEventManager.prototype.setFocusObj=function(a){var b=this.getFocus();a!=b&&(this.setFocus(a),b&&b.hideKeyboardFocusEffect(),this.ShowKeyboardFocusByDefault()&&a.showKeyboardFocusEffect(),-1<this._currentKeyboardHandlerIdx&&this._currentKeyboardHandlerIdx<this._keyboardHandlers.length&&(a=this._keyboardHandlers[this._currentKeyboardHandlerIdx],a!=this&&a.hideKeyboardFocusEffect()),this._updateKeyboardHandlerIdx(this))};
DvtEventManager.prototype.setFocus=function(a){this.KeyboardHandler&&(this._focusedObj=a)};DvtEventManager.prototype.getFocus=function(){return this.KeyboardHandler?this._focusedObj:null};
DvtEventManager.prototype.setFocused=function(a){var b=this.getFocus();b&&this.KeyboardHandler&&(a?this.getCtx()instanceof DvtFlashContext?b.showKeyboardFocusEffect():this._shouldDisplayKeyboardFocus&&0<=this._currentKeyboardHandlerIdx&&this._currentKeyboardHandlerIdx<this._keyboardHandlers.length&&this._keyboardHandlers[this._currentKeyboardHandlerIdx]===this&&b.showKeyboardFocusEffect():b.hideKeyboardFocusEffect());a||(this._shouldDisplayKeyboardFocus=!1)};
DvtEventManager.prototype.ShowKeyboardFocusByDefault=function(){return!1};DvtEventManager.prototype.setTooltipsEnabled=function(a){this._tooltipsEnabled=a};DvtEventManager.prototype.getTooltipsEnabled=function(){return this._tooltipsEnabled};DvtEventManager.prototype.GetLogicalObject=function(a,b){var c=this.GetLogicalObjectAndDisplayable(a,b);return c?c.logicalObject:null};
DvtEventManager.prototype.GetLogicalObjectAndDisplayable=function(a,b){for(var c=a;c;){if(c._logicalObjects)for(var d=0;d<c._logicalObjects.length;d++){var e=c._logicalObjects[d];if(e.eventManager==this)return d={},d.logicalObject=e.logicalObject,d.displayable=c,d}c=b?null:c.getParent()}return null};DvtEventManager.prototype._getShowPopupBehaviors=function(a){if(a&&a.getShowPopupBehaviors)return a.getShowPopupBehaviors()};DvtEventManager.prototype._getClientBehaviors=function(a){if(a&&a.getClientBehaviors)return a.getClientBehaviors()};
DvtEventManager.prototype.GetContextMenuType=function(a){a=(a=this.getSelectionHandler(a))?a.getSelection().length:0;return 0>=a?DvtContextMenuHandler.TYPE_BODY_CONTEXT_MENU:1==a?DvtContextMenuHandler.TYPE_CONTEXT_MENU:DvtContextMenuHandler.TYPE_MULTI_SELECT_CONTEXT_MENU};DvtEventManager.prototype._getContextMenuId=function(a){if(a&&a.getContextMenuId)return a.getContextMenuId()};DvtEventManager.prototype.GetTooltipColor=function(a,b,c){if(a&&a.getDatatipColor)return a.getDatatipColor()};
DvtEventManager.prototype.FireEvent=function(a,b){this._callback&&this._callback.call(this._callbackObj,a,b)};DvtEventManager.prototype.FireUIEvent=function(a,b){};DvtEventManager.prototype.fireSelectionEvent=function(a){if(a=this.getSelectionHandler(a))a=a.getSelectedIds(),a=new DvtGraphSelectionEvent(a),this._callback.call(this._callbackObj,a)};
DvtEventManager.prototype.PreOnClick=function(a){if(this._bIgnoreClickAfterDrag&&this.IsIgnoreNextClick())this.SetIgnoreNextClick(!1);else if(this.IsDoubleClickable(a.target)){if(this._clickTimer&&this._clickTimer.isRunning()){var b=this._savedClickEvent;if(a.pageX==b.pageX&&a.pageY==b.pageY)return;this._clickTimer.stop();this._onClickTimerEnd()}this._savedClickEvent=a;this._clickTimer||(this._clickTimer=new DvtTimer(this._context,250,this._onClickTimerEnd,this,1));this._clickTimer.reset();this._clickTimer.start()}else this._propagateEvent(DvtMouseEvent.CLICK,
a,this.OnClick)};DvtEventManager.prototype._onClickTimerEnd=function(){var a=this._savedClickEvent;this._savedClickEvent=null;a&&this._propagateEvent(DvtMouseEvent.CLICK,a,this.OnClick)};
DvtEventManager.prototype.OnClick=function(a){var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));this.OnClickInternal(a);this.ProcessSelectionEventHelper(b,a.ctrlKey);this._shouldDisplayKeyboardFocus=!1;if(b){if(this.KeyboardHandler&&b.getNextNavigable){var c=b.getNextNavigable(a);this.setFocusObj(c)}c=null;this._eventInfo[a]&&(c=this._eventInfo[a].popupDisplayed);if(!c){var d=this._getShowPopupBehaviors(b);d&&(c=new DvtPoint(a.pageX,a.pageY),c=this.PopupHandler.processClick(b,d,c));c&&
(this._eventInfo[a].popupDisplayed=!0)}c||(a=this._getClientBehaviors(b))&&(c=this.ClientBehaviorHandler.processClick(b,a));!c&&b.isCommandComponent&&b.isCommandComponent()&&(a=new DvtGraphActionEvent(DvtGraphActionEvent.SUBTYPE_ACTION,b.getId()),DvtEventManager._addContextInfo(b,a),this._callback.call(this._callbackObj,a));this.FireUIEvent(DvtComponentUIEvent.TYPE_CLICK,b)}};
DvtEventManager.prototype.IsDoubleClickable=function(a){for(;a;){var b=this.GetLogicalObject(a,!0);if(b){if(b.isDoubleClickable&&b.isDoubleClickable())return!0;if(!this.IsPropagationEnabled(DvtMouseEvent.DBLCLICK,null,a))break}a=a.getParent()}return!1};DvtEventManager.prototype.ProcessSelectionEventHelper=function(a,b){var c=this.getSelectionHandler(a);c&&c.processClick(a,b)&&this.fireSelectionEvent(a)};
DvtEventManager.prototype.PreOnDblClick=function(a){this._propagateEvent(DvtMouseEvent.DBLCLICK,a,this.OnDblClick)};DvtEventManager.prototype.OnDblClick=function(a){if(this._clickTimer&&this._clickTimer.isRunning())this._clickTimer.stop(),this._savedClickEvent=null;else if(DvtAgent.isPlatformIE()){var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));b&&(b.isDoubleClickable&&b.isDoubleClickable()||this.OnClick(a))}};
DvtEventManager.prototype.PreOnContextMenu=function(a){this._propagateEvent("contextmenu",a,this.OnContextMenu)};DvtEventManager.prototype.OnContextMenu=function(a){var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));b&&b.getNextNavigable&&this.setFocus(b);this._onContextMenuHelper(a,b)};
DvtEventManager.prototype._onContextMenuHelper=function(a,b){this.OnContextMenuInternal(a);this._processActionPopup(this.GetCurrentTargetForEvent(a),new DvtPoint(a.pageX,a.pageY))&&a.preventDefault();this.ProcessSelectionEventHelper(b,a.ctrlKey);if(this.ContextMenuHandler){var c=this.GetContextMenuType(b),d=this._getContextMenuId(b);this.ContextMenuHandler.prepareMenuItems(a,c,d);if(c=this.ContextMenuHandler.show(a,c,d))this._context.getTooltipManager().hideTooltip(),this.PopupHandler.HidePopup(),
this._callback.call(this._callbackObj,c)}};
DvtEventManager.prototype.OnKeyDown=function(a){var b=a.keyCode,c=!1,d;d=0>this._currentKeyboardHandlerIdx||this._currentKeyboardHandlerIdx>this._keyboardHandlers.length?b==DvtKeyboardEvent.TAB&&a.shiftKey?this._keyboardHandlers.length-1:0:this._currentKeyboardHandlerIdx;b=b==DvtKeyboardEvent.TAB&&a.shiftKey?-1:1;for(d;0<=d&&d<this._keyboardHandlers.length&&!c;d+=b)if(c=this._keyboardHandlers[d],c=c===this?this.ProcessKeyboardEvent(a):c.handleKeyboardEvent(a))this._currentKeyboardHandlerIdx=d;return c};
DvtEventManager.prototype.handleKeyboardEvent=function(a){return this.OnKeyDown(a)};DvtEventManager.prototype.hideKeyboardFocusEffect=function(){var a=this.getFocus();a&&a.isShowingKeyboardFocusEffect()&&a.hideKeyboardFocusEffect()};
DvtEventManager.prototype.ProcessKeyboardEvent=function(a){if(!this.KeyboardHandler)return!1;this.hideTooltip();var b=this.getFocus(),c=null;return a.keyCode==DvtKeyboardEvent.TAB&&b&&b.isShowingKeyboardFocusEffect()?(b.hideKeyboardFocusEffect(),!1):b&&this.KeyboardHandler.isContextMenuEvent(a)?(b.getContextMenuLocation?c=b.getContextMenuLocation():(c=b.getKeyboardBoundingBox(),c=DvtAgent.isRightToLeft(this._context)?new DvtPoint(c.x,c.y):new DvtPoint(c.x+c.w,c.y)),a=this.GenerateMouseEventFromKeyboardEvent(a,
this._context.getStage(),c.x,c.y),a.ctrlKey=!1,this._onContextMenuHelper(a,b),!0):(c=this.KeyboardHandler.processKeyDown(a))?(this._shouldDisplayKeyboardFocus=!0,b&&b.hideKeyboardFocusEffect(),this.KeyboardHandler.isSelectionEvent(a)?this.ProcessSelectionEventHelper(c,a.shiftKey):this.KeyboardHandler.isMultiSelectEvent(a)&&this.ProcessSelectionEventHelper(c,a.ctrlKey),c.showKeyboardFocusEffect(),this._fireActiveElementChangeEvent(c),!0):!1};
DvtEventManager.prototype.GenerateMouseEventFromKeyboardEvent=function(a,b,c,d){var e=null;this._context instanceof DvtSvgContext&&(e=DvtSvgEventFactory.generateMouseEventFromKeyboardEvent(a,this._context,DvtMouseEvent.CLICK,b,c,d));return e};DvtEventManager.prototype.OnKeyUp=function(a){};DvtEventManager.prototype.PreOnMouseMove=function(a){this._propagateEvent(DvtMouseEvent.MOUSEMOVE,a,this.OnMouseMove)};
DvtEventManager.prototype.OnMouseMove=function(a){this._bIgnoreClickAfterDrag&&this._bMouseDown&&(this._bMouseDrag=!0);var b=a.pageX,c=a.pageY,d=this._context.getRelativePosition(b,c);if(this._marqueeHandler){var e=this._marqueeHandler.processDragMove(d,a.ctrlKey);e&&this._callback.call(this._callbackObj,e)}var f=this.GetCurrentTargetForEvent(a);if(e=this.GetLogicalObject(f))this._eventInfo[a].tooltipDisplayed||(this.IsTooltipShowable(e,d)?this._processShowTooltip(f,e,b,c)&&(this._eventInfo[a].tooltipDisplayed=
!0):this.hideTooltip()),b=new DvtPoint(b,c),this.PopupHandler.processMouseMove(b),this.DragSource&&!a.dragSourceSet&&this.IsDragCandidate(e)&&(this.DragSource.setDragCandidate(e),a.dragSourceSet=!0)};DvtEventManager.prototype.PreOnMouseOver=function(a){this._propagateEvent(DvtMouseEvent.MOUSEOVER,a,this.OnMouseOver);this._handlePreOverEvent(a)};DvtEventManager.prototype._getDisplayableHierarchy=function(a,b,c){for(var d=[];a;){var e=!0;b&&(e=b.call(c,a));e&&d.unshift(a);a=a.getParent()}return d};
DvtEventManager.prototype._getRolloverHierarchy=function(a){return this._getDisplayableHierarchy(a,this._isRolloverType,this)};DvtEventManager.prototype._isRolloverType=function(a){if(a=this.GetLogicalObject(a,!0))for(var b=0;b<this._rolloverTypes.length;b++)if(a instanceof this._rolloverTypes[b])return!0;return!1};DvtEventManager.prototype.addRolloverType=function(a){this._rolloverTypes.push(a)};
DvtEventManager.prototype.removeRolloverType=function(a){a=this._rolloverTypes.indexOf(a);-1!=a&&this._rolloverTypes.splice(a,1)};DvtEventManager.prototype.OnRollOver=function(a){};
DvtEventManager.prototype.OnMouseOver=function(a){var b=this.GetCurrentTargetForEvent(a),c=this.GetLogicalObjectAndDisplayable(b),d=null;c&&(d=c.logicalObject);var e=new DvtPoint(a.pageX,a.pageY);if(d){var f=this.getSelectionHandler(d);f&&f.processMouseOver(d);this.FireUIEvent(DvtComponentUIEvent.TYPE_ROLL_OVER,d);this._eventInfo[a].popupDisplayed||(f=this._getShowPopupBehaviors(d))&&this.PopupHandler.processMouseOver(d,f,e,c.displayable)&&(this._eventInfo[a].popupDisplayed=!0);this._fireActiveElementChangeEvent(b)}};
DvtEventManager.prototype.PreOnMouseOut=function(a){this._handlePreOutEvent(DvtMouseEvent.MOUSEOUT,a,this.OnMouseOut)};DvtEventManager.prototype.OnRollOut=function(a){};
DvtEventManager.prototype.OnMouseOut=function(a){var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a));if(b){var c=this.GetLogicalObject(a.relatedTarget);b!=c&&((c=this.getSelectionHandler(b))&&c.processMouseOut(b),this.FireUIEvent(DvtComponentUIEvent.TYPE_ROLL_OUT,b),(c=this.getFocus())&&b===c&&this._shouldDisplayKeyboardFocus&&!c.isShowingKeyboardFocusEffect()&&c.showKeyboardFocusEffect(),this.hideTooltip(),this.DragSource&&!a.dragSourceSet&&(this.DragSource.setDragCandidate(null),a.dragSourceSet=
!0))}};DvtEventManager.prototype.PreOnMouseDown=function(a){this._propagateEvent(DvtMouseEvent.MOUSEDOWN,a,this.OnMouseDown)};
DvtEventManager.prototype.OnMouseDown=function(a){this._bIgnoreClickAfterDrag&&(this._bMouseDown=!0);var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a)),c=this._context.getRelativePosition(a.pageX,a.pageY);this.isInActionPopup()&&this.CustomTooltipManager.closeActionTooltip();this._marqueeHandler&&(c=this._marqueeHandler.processDragStart(c,a.ctrlKey))&&this._callback.call(this._callbackObj,c);this.DragSource&&!a.dragSourceSet&&this.IsDragCandidate(b)&&(this.DragSource.setDragCandidate(b),
a.dragSourceSet=!0)};DvtEventManager.prototype.PreOnMouseUp=function(a){this._propagateEvent(DvtMouseEvent.MOUSEUP,a,this.OnMouseUp)};DvtEventManager.prototype.OnMouseUp=function(a){this._bIgnoreClickAfterDrag&&this._bMouseDown&&this._bMouseDrag&&this.SetIgnoreNextClick(!0);this._bMouseDrag=this._bMouseDown=!1;var b=this._context.getRelativePosition(a.pageX,a.pageY);this._marqueeHandler&&(a=this._marqueeHandler.processDragEnd(b,a.ctrlKey))&&this._callback.call(this._callbackObj,a)};
DvtEventManager.prototype._processMultiTouchTooltip=function(){var a=this.TouchManager.getTooltipInfo(),b=a.touchIds,a=a.tooltipTarget;0!=b.length&&a?(b=this.TouchManager.calcAveragePosition(b),a=this.GetLogicalObject(a),this._processObjectTooltip(b.x,b.y,a,null)):this.hideTooltip()};DvtEventManager.prototype.GetIgnoreNextClickOffTimer=function(){this._ignoreNextClickOffTimer||(this._ignoreNextClickOffTimer=new DvtTimer(this._context,500,this.HandleIgnoreNextClickOffTimer,this,1));return this._ignoreNextClickOffTimer};
DvtEventManager.prototype.HandleIgnoreNextClickOffTimer=function(a){this.SetIgnoreNextClick(!1)};DvtEventManager.prototype.SetIgnoreNextClick=function(a){(this._bIgnoreNextClick=a)?(this.GetIgnoreNextClickOffTimer().reset(),this.GetIgnoreNextClickOffTimer().start()):this.GetIgnoreNextClickOffTimer().isRunning()&&this.GetIgnoreNextClickOffTimer().stop()};DvtEventManager.prototype.IsIgnoreNextClick=function(){return this._bIgnoreNextClick};
DvtEventManager.prototype.OnTouchStartBubble=function(a){this.PreEventBubble(a);a.isInitialTouch()&&(this._popupJustClosed=!1);if(this.DragSource){var b=this.GetLogicalObject(a.target);!a.dragSourceSet&&this.IsDragCandidate(b)&&(this.DragSource.setDragCandidate(b),a.dragSourceSet=!0)}this.isInActionPopup()&&(this.CustomTooltipManager.closeActionTooltip(),this.TouchManager.resetTouchHold());this.HandleImmediateTouchStartInternal(a);this.TouchManager.fireLogicalEvents(a);this.TouchManager.postEventBubble(a);
this._processMultiTouchTooltip()};DvtEventManager.prototype.OnTouchMoveBubble=function(a){this.PreEventBubble(a);this.TouchManager&&(this._prevActionClear=!1,this.HandleImmediateTouchMoveInternal(a),this.TouchManager.fireLogicalEvents(a),this.TouchManager.postEventBubble(a),this._processMultiTouchTooltip())};
DvtEventManager.prototype._handleTouchEndTimer=function(){for(var a=0;a<this._touchEndTimer.length;a++){var b=this._touchEndTimer[a];b.timer.stop();b=b.event;this.TouchManager&&(this.HandleImmediateTouchEndInternal(b),this.TouchManager.fireLogicalEvents(b),this.TouchManager.postEventBubble(b))}this.DragSource&&!b.dragSourceSet&&(this.DragSource.setDragCandidate(null),b.dragSourceSet=!0);this._touchEndTimer=[]};
DvtEventManager.prototype.OnTouchEndBubble=function(a){this.PreEventBubble(a);var b=new DvtTimer(this._context,0,this._handleTouchEndTimer,this,1);this._touchEndTimer||(this._touchEndTimer=[]);this._touchEndTimer.push({event:a,timer:b});b.start()};DvtEventManager.prototype.HandleImmediateTouchStartInternal=function(a){};DvtEventManager.prototype.HandleImmediateTouchMoveInternal=function(a){};DvtEventManager.prototype.HandleImmediateTouchEndInternal=function(a){};
DvtEventManager.prototype._preOnComponentTouchHoverStart=function(a){this._propagateEvent(DvtComponentTouchEvent.TOUCH_HOVER_START_TYPE,a,this.OnComponentTouchHoverStart)};
DvtEventManager.prototype.OnComponentTouchHoverStart=function(a){var b=this.GetCurrentTargetForEvent(a),c=this.GetLogicalObject(b),d=a.touch,e=d.pageX,d=d.pageY,f=this._context.getRelativePosition(e,d);this._marqueeHandler&&(f=this._marqueeHandler.processDragStart(f,a.ctrlKey))&&(a.preventDefault(),this._callback.call(this._callbackObj,f));this.UpdateTouchHoverFeedback(b);this.ProcessMagnifyStart(new DvtPoint(e,d),c);this.HandleTouchHoverStartInternal(a);this._processMultiTouchTooltip();this._prevActionClear=
!1};DvtEventManager.prototype._preOnComponentTouchHoverMove=function(a){this._propagateEvent(DvtComponentTouchEvent.TOUCH_HOVER_MOVE_TYPE,a,this.OnComponentTouchHoverMove)};
DvtEventManager.prototype.OnComponentTouchHoverMove=function(a){var b=this.GetCurrentTargetForEvent(a),c=a.touch,d=c.pageX,e=c.pageY,f=this._context.getRelativePosition(d,e),g=this.GetLogicalObject(b);this._marqueeHandler&&(f=this._marqueeHandler.processDragMove(f,a.ctrlKey))&&(a.preventDefault(),this._callback.call(this._callbackObj,f));this.UpdateTouchHoverFeedback(b);this.ProcessMagnify(new DvtPoint(d,e),g);this.HandleTouchHoverMoveInternal(a);a=new DvtPoint(c.pageX,c.pageY);this.PopupHandler.processMouseMove(a)};
DvtEventManager.prototype._preOnComponentTouchHoverEnd=function(a){this._propagateEvent(DvtComponentTouchEvent.TOUCH_HOVER_END_TYPE,a,this.OnComponentTouchHoverEnd)};
DvtEventManager.prototype.OnComponentTouchHoverEnd=function(a){var b=this.GetCurrentTargetForEvent(a),c=this.GetLogicalObject(b),d=a.touch,e=d.pageX,d=d.pageY,f=this._context.getRelativePosition(e,d);this._marqueeHandler&&(f=this._marqueeHandler.processDragEnd(f,a.ctrlKey))&&(a.preventDefault(),this._callback.call(this._callbackObj,f));this._hideMagnify();this.HandleTouchHoverEndInternal(a);c&&c.isSelected&&c.isSelected()||this._processTouchSelection(c,a._isCancelEvent,!1);this.ProcessTouchContextMenu(a,
c);this._processActionPopup(b,new DvtPoint(e,d));this.FireUIEvent(DvtComponentUIEvent.TYPE_ROLL_OUT,c)};DvtEventManager.prototype._preOnComponentTouchHoverOut=function(a){this._handlePreOutEvent(DvtComponentTouchEvent.TOUCH_HOVER_OUT_TYPE,a,this.OnComponentTouchHoverOut)};
DvtEventManager.prototype.OnComponentTouchHoverOut=function(a){var b=this.GetCurrentTargetForEvent(a),b=this.GetLogicalObject(b);this.HandleTouchHoverOutInternal(a);(a=this.getSelectionHandler(b))&&a.processMouseOut(b);this.FireUIEvent(DvtComponentUIEvent.TYPE_ROLL_OUT,b)};DvtEventManager.prototype._preOnComponentTouchHoverOver=function(a){this._propagateEvent(DvtComponentTouchEvent.TOUCH_HOVER_OVER_TYPE,a,this.OnComponentTouchHoverOver);this._handlePreOverEvent(a)};
DvtEventManager.prototype.OnComponentTouchHoverOver=function(a){var b=this.GetCurrentTargetForEvent(a),b=this.GetLogicalObject(b),c=a.touch,c=new DvtPoint(c.pageX,c.pageY);this.HandleTouchHoverOverInternal(a);(a=this.getSelectionHandler(b))&&a.processMouseOver(b);this.FireUIEvent(DvtComponentUIEvent.TYPE_ROLL_OVER,b);(a=this._getShowPopupBehaviors(b))&&this.PopupHandler.processMouseOver(b,a,c)};
DvtEventManager.prototype._preOnComponentTouchDblClick=function(a){this._propagateEvent(DvtComponentTouchEvent.TOUCH_DOUBLE_CLICK_TYPE,a,this.OnComponentTouchDblClick)};DvtEventManager.prototype.OnComponentTouchDblClick=function(a){};DvtEventManager.prototype._preOnComponentTouchClick=function(a){this._propagateEvent(DvtComponentTouchEvent.TOUCH_CLICK_TYPE,a,this.OnComponentTouchClick)};
DvtEventManager.prototype.OnComponentTouchClick=function(a){var b=this.GetCurrentTargetForEvent(a),c=a.touch,d=this.GetLogicalObject(b),e=new DvtPoint(c.pageX,c.pageY),f=!1;this._eventInfo[a]&&(f=this._eventInfo[a].popupDisplayed);if(!f){var g=this._getShowPopupBehaviors(d);g&&(f=this.PopupHandler.processClick(d,g,e));f&&(this._eventInfo[a].popupDisplayed=!0)}f||(e=this._getClientBehaviors(d))&&this.ProcessClientBehaviorForTouch(d,e);this.FireUIEvent(DvtComponentUIEvent.TYPE_CLICK,d);this.HandleTouchClickInternal(a)||
(this._processTouchSelection(d,this._popupJustClosed,!0),this.CustomTooltipManager.displayActionPopup()&&(this.UpdateActionTooltipLaunchedFeedback(b,new DvtPoint(c.pageX,c.pageY)),this.CustomTooltipManager.startActionPopupAtPosition(c.pageX,c.pageY,b)),d&&!f&&d.isCommandComponent&&d.isCommandComponent()&&(a=new DvtGraphActionEvent(DvtGraphActionEvent.SUBTYPE_ACTION,d.getId()),DvtEventManager._addContextInfo(d,a),this._callback.call(this._callbackObj,a)))};
DvtEventManager.prototype._processTouchSelection=function(a,b,c){var d=!1;if(d=this.getSelectionHandler(a))if(a&&a.isSelectable&&a.isSelectable())(d=d.processClick(a,!0))&&this.fireSelectionEvent(a);else if(!b&&!this._prevActionClear){var e=b=!1;c&&(e=!0,this.isClearMenuAllowed()&&d.getType()==DvtSelectionHandler.TYPE_MULTIPLE&&1<d.getSelectedCount()&&(b=!0));e&&(b?this.addClearAllActionItem():(d=d.processClick(null,!1))&&this.fireSelectionEvent(a))}this._prevActionClear=!1};
DvtEventManager.prototype.OnActionTooltipClosed=function(a){a=a.target;this.GetLogicalObject(a);this._popupJustClosed=!0;this._isInActionPopup=!1;this.CustomTooltipManager.getActionTooltip().containsMenuId(DvtEventManager.CLEAR_SELECTION_ACTION_TYPE)&&(this._prevActionClear=!0);this.CustomTooltipManager.clearActionTooltip();this.UpdateActionTooltipClosedFeedback(a)};DvtEventManager.prototype.OnActionTooltipStarted=function(a){this._isInActionPopup=!0};
DvtEventManager.prototype._processObjectTooltip=function(a,b,c,d){this._processShowTooltip(d,c,a,b)};DvtEventManager.prototype._getTooltipInfo=function(a,b,c,d){var e=null,f=!1;b&&b.getDatatip&&(e=b.getDatatip(a,c,d))&&(f=!0);!e&&b&&b.getTooltip&&(e=b.getTooltip(a,c,d));return{text:e,isDatatip:f}};
DvtEventManager.prototype._processShowTooltip=function(a,b,c,d){if(this.getTooltipsEnabled()){var e=this._context.getRelativePosition(c,d),f=e.x,e=e.y,g=this._getTooltipInfo(a,b,f,e);a=g.isDatatip;if(g=g.text)return this.CustomTooltipManager.clearActionTooltip(),b=this.GetTooltipColor(b,f,e),this._isMagnifyShown?this.CustomTooltipManager.showMagnifyDatatip(c,d,g,b):(f=this._context.getTooltipManager(),a?f.showDatatip(c,d,g,b):f.showTooltip(c,d,g,null,!0,b)),this.TooltipLaunched(g,b),!0}this.hideTooltip();
return!1};DvtEventManager.prototype.hideTooltip=function(){var a=this._context.getTooltipManager();a&&a.hideTooltip();this._isMagnifyShown&&this.CustomTooltipManager.hideTooltip();this.TooltipHidden()};
DvtEventManager.prototype.ProcessTouchContextMenu=function(a,b){if(this.ContextMenuHandler){var c=this.GetContextMenuType(b),d=this._getContextMenuId(b),e=!1;b&&b.isSelected&&b.isSelected()?e=!0:(b&&b.isSelectable&&b.isSelectable()||(c=DvtContextMenuHandler.TYPE_BODY_CONTEXT_MENU),c==DvtContextMenuHandler.TYPE_BODY_CONTEXT_MENU&&(e=!0));if(e&&(c=this.ContextMenuHandler.getMenuItems(c,d))){for(d=0;d<c.length;d++){var f=c[d],e=this.CustomTooltipManager.getActionTooltip();e.setTooltipBorderColor(DvtCustomTooltip.DEFAULT_BORDER_COLOR);
f=new DvtContextMenuTooltipItem(this._context,"item"+d,this.ContextMenuItemListener,this,f);e.addMenuItem(f)}return 0<c.length}return!1}};DvtEventManager.prototype._processActionPopup=function(a,b){if(this.CustomTooltipManager.displayActionPopup())return this.SetupTouchTooltip(a),this.UpdateActionPopupShownFeedback(a),this.CustomTooltipManager.startActionPopupAtPosition(b.x,b.y,a),!0;this.UpdateActionPopupHiddenFeedback(a);return!1};DvtEventManager.prototype.TooltipLaunched=function(a,b){};
DvtEventManager.prototype.TooltipHidden=function(){};DvtEventManager.prototype.SetupTouchTooltip=function(a){var b=this.GetLogicalObject(a);a=this.CustomTooltipManager.getActionTooltip();null==a.getTooltipBorderColor()&&(b=this.GetTooltipColor(b),a.setTooltipBorderColor(b))};DvtEventManager.prototype.OnContextMenuInternal=function(a){};DvtEventManager.prototype.OnClickInternal=function(a){};DvtEventManager.prototype.HandleTouchHoverStartInternal=function(a){};
DvtEventManager.prototype.HandleTouchHoverMoveInternal=function(a){};DvtEventManager.prototype.HandleTouchHoverEndInternal=function(a){};DvtEventManager.prototype.HandleTouchHoverOverInternal=function(a){};DvtEventManager.prototype.HandleTouchHoverOutInternal=function(a){};DvtEventManager.prototype.HandleTouchClickInternal=function(a){return!1};DvtEventManager.prototype.UpdateActionPopupShownFeedback=function(a){};DvtEventManager.prototype.UpdateActionPopupHiddenFeedback=function(a){};
DvtEventManager.prototype.UpdateTouchHoverFeedback=function(a){};DvtEventManager.prototype.UpdateActionTooltipClosedFeedback=function(a){};DvtEventManager.prototype.UpdateActionTooltipLaunchedFeedback=function(a,b){};DvtEventManager.prototype.isInActionPopup=function(){return this._isInActionPopup};DvtEventManager.prototype.GetMagnifyContent=function(a){return null};
DvtEventManager.prototype.ProcessMagnifyStart=function(a,b){this.IsMagnifyLensEnabled()&&(this.GetMagnifyLens().setDirty(!0),this.ProcessMagnify(a,b))};
DvtEventManager.prototype.ProcessMagnify=function(a,b){if(this.IsMagnifyLensEnabled()){var c=this.GetMagnifyLens(),d=this._context.getRelativePosition(a.x,a.y);if(this.GetMagnifyLensRegion(d,b)){if(c.isDirty()){var e=this.GetMagnifyContent(a);e&&c.updateMagnifyContent(e);c.setDirty(!1)}c.UpdatePosition(d.x,d.y);this.CustomTooltipManager.showMagnifyLens(a.x,a.y,c);this._isMagnifyShown=!0}else this._hideMagnify(),this._isMagnifyShown=!1}return!1};
DvtEventManager.prototype._hideMagnify=function(){this.CustomTooltipManager.hideMagnifyLens();this.CustomTooltipManager.hideTooltip();this._isMagnifyShown=!1};DvtEventManager.prototype.IsMagnifyLensEnabled=function(){return!1};DvtEventManager.prototype.GetMagnifyLensRegion=function(a,b){return null};DvtEventManager.prototype.GetMagnifyLens=function(){return this.CustomTooltipManager.getMagnifyLens()};
DvtEventManager.prototype.IsTooltipShowable=function(a,b){if(!a)return!0;var c=this.GetTooltipsAllowedRegion(a),d=!0;c&&!c.containsPoint(b.x,b.y)&&(d=!1);return d&&this.IsTooltipShowableInternal&&this.IsTooltipShowableInternal(a,b)};DvtEventManager.prototype.IsTooltipShowableInternal=function(a,b){return a.isTooltipShowable?a.isTooltipShowable():!0};DvtEventManager.prototype.GetTooltipsAllowedRegion=function(a){return null};
DvtEventManager.prototype.GetClearSelectionText=function(){return this._bundle.getTranslatedString("CLEAR_SELECTION",null)};DvtEventManager.prototype.addClearAllActionItem=function(){this.addActionTooltipMenuItem(DvtEventManager.CLEAR_SELECTION_ACTION_TYPE,this.GetClearSelectionText(),this._actionTooltipClearListener,this);var a=this.CustomTooltipManager.getActionTooltip();a&&a.setTooltipBorderColor(DvtCustomTooltip.DEFAULT_BORDER_COLOR)};DvtEventManager.prototype.isClearMenuAllowed=function(){return!0};
DvtEventManager.prototype.addActionTooltipMenuItem=function(a,b,c,d){this.CustomTooltipManager.getActionTooltip().addMenuItem(new DvtCustomTooltipItem(this._context,a,b,c,d))};DvtEventManager.prototype.ContextMenuItemListener=function(a){a=a.menuItem.getEvent();this._callback.call(this._callbackObj,a)};DvtEventManager.prototype._actionTooltipClearListener=function(a){a=this.GetLogicalObject(a.target);this.getSelectionHandler(a).processClick(null,!1)&&this.fireSelectionEvent(a)};
DvtEventManager.prototype._actionTooltipSelectListener=function(a){a=this.GetLogicalObject(a.target);this.getSelectionHandler(a).processClick(a,!0)&&this.fireSelectionEvent(a)};DvtEventManager.prototype.setTouchRegionBounds=function(a){this.TouchManager.setTouchRegionBounds(a)};DvtEventManager.consumeEvent=function(a){a&&(a.preventDefault(),a.stopPropagation())};
DvtEventManager._addContextInfo=function(a,b){if(a.getContextCallback&&a.getContextCallbackObj){var c=a.getContextCallback(),d=a.getContextCallbackObj();c&&d&&c.call(d,b)}else b.addParam(DvtBaseComponentEvent.CLIENT_ROW_KEY,a.getId())};DvtEventManager.prototype.IsPropagationEnabled=function(a,b,c){return!1};DvtEventManager.prototype.GetCurrentTargetForEvent=function(a){return this._eventInfo[a]?this._eventInfo[a].currentTarget:a.target};
DvtEventManager.prototype._propagateEvent=function(a,b,c){if(this.GetLogicalObject(b.target)){var d=b.target;this._eventInfo[b]={};try{for(;d&&(!this.GetLogicalObject(d,!0)||(this._eventInfo[b].currentTarget=d,c.call(this,b),this.IsPropagationEnabled(a,b,d)));)d=d.getParent()}finally{delete this._eventInfo[b]}}else c.call(this,b)};
DvtEventManager.prototype.ConsumesClick=function(a){return a.isSelectable&&a.isSelectable()||a.isClickEventPropagationStopped&&a.isClickEventPropagationStopped()||this._hasClickPopup(a)||this._hasClickClientBehavior(a)};DvtEventManager.prototype._hasClickPopup=function(a){if(a=this._getShowPopupBehaviors(a))for(var b=0;b<a.length;b++){var c=a[b];if(c&&(c.getTriggerType()==DvtGraphShowPopupBehavior.TRIGGER_TYPE_ACTION||c.getTriggerType()==DvtGraphShowPopupBehavior.TRIGGER_TYPE_CLICK))return!0}return!1};
DvtEventManager.prototype.addComponentKeyboardHandler=function(a){a&&this._keyboardHandlers.push(a)};DvtEventManager.prototype.addComponentKeyboardHandlerAt=function(a,b){b>this._keyboardHandlers.length||!a||(this._keyboardHandlers.splice(b,0,a),b<=this._currentKeyboardHandlerIdx&&this._currentKeyboardHandlerIdx++)};
DvtEventManager.prototype.removeComponentKeyboardHandler=function(a){a&&(a=this._findHandler(a),-1<a&&(this._currentKeyboardHandlerIdx==a&&0==a?this._currentKeyboardHandlerIdx=0:a<=this._currentKeyboardHandlerIdx&&this._currentKeyboardHandlerIdx--,this._keyboardHandlers.splice(a,1)))};DvtEventManager.prototype._findHandler=function(a){for(var b=-1,c=this._keyboardHandlers.length,d=0;d<c;d++)this._keyboardHandlers[d]===a&&(b=d);return b};
DvtEventManager.prototype._updateKeyboardHandlerIdx=function(a){a=this._findHandler(a);0<a&&(this._currentKeyboardHandlerIdx=a)};DvtEventManager.prototype._hasClickClientBehavior=function(a){if(a=this._getClientBehaviors(a))for(var b=0;b<a.length;b++){var c=a[b];if(c&&(c.getTriggerType()==DvtClientBehavior.TRIGGER_TYPE_ACTION||c.getTriggerType()==DvtClientBehavior.TRIGGER_TYPE_CLICK))return!0}return!1};
DvtEventManager.prototype.CreateClientBehaviorHandler=function(a,b,c){return new DvtClientBehaviorHandler(a,b,c)};DvtEventManager.prototype.ProcessClientBehaviorForTouch=function(a,b){return this.ClientBehaviorHandler.processClick(a,b)};DvtEventManager.prototype.IsDragCandidate=function(a){return!0};DvtEventManager._getActiveElementId=function(){return"_dvtActiveElement"+Math.floor(1E9*Math.random())};
DvtEventManager.prototype._fireActiveElementChangeEvent=function(a){if(this.getCtx()instanceof DvtSvgContext){for(a=a.getDisplayable?a.getDisplayable():a.getDisplayables?a.getDisplayables()[0]:a;!a.getAriaRole()&&a.getParent();)a=a.getParent();this._prevActiveElement&&(this._prevActiveElement.setId(null),this._prevActiveElement=null);var b=a.getId();b||(b=DvtEventManager._getActiveElementId(),a.setId(b),this._prevActiveElement=a);a=new DvtActiveElementChangeEvent(DvtActiveElementChangeEvent.CHANGE,
b);this._callback&&this._callback.call(this._callbackObj,a)}};DvtEventManager.prototype._handlePreOverEvent=function(a){var b=this._getRolloverHierarchy(a.target),c=this._getRolloverHierarchy(a.relatedTarget);if(0<b.length&&(b=b[b.length-1],b!=(0==c.length?null:c[c.length-1]))){this._eventInfo[a]={};try{this._eventInfo[a].currentTarget=b,this.OnRollOver(a)}finally{delete this._eventInfo[a]}}};
DvtEventManager.prototype._handlePreOutEvent=function(a,b,c){var d=this.GetLogicalObject(b.relatedTarget),e=b.target;this._eventInfo[b]={};try{var f=this._getRolloverHierarchy(b.target),g=this._getRolloverHierarchy(b.relatedTarget);if(0<f.length){var h=f[f.length-1];h!=(0==g.length?null:g[g.length-1])&&(this._eventInfo[b].currentTarget=h,this.OnRollOut(b))}var k=this.GetLogicalObject(e);if(k)for(this.PopupHandler.processMouseOut(k,this._getDisplayableHierarchy(b.relatedTarget));e;){var m=this.GetLogicalObject(e,
!0);if(m){if(d===m)break;this._eventInfo[b].currentTarget=e;c.call(this,b);if(!this.IsPropagationEnabled(a,b,e))break}e=e.getParent()}else c.call(this,b)}finally{delete this._eventInfo[b]}};DvtEventManager.prototype.getTouchManager=function(){return this.TouchManager};var DvtCustomTooltipManager=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtCustomTooltipManager,DvtObj,"DvtCustomTooltipManager");DvtCustomTooltipManager.ACTION_POPUP_CLASS="OraDVTContextMenuPopup";
DvtCustomTooltipManager.prototype.Init=function(a,b){this._context=a;this._id=b;this._actionTooltip=new DvtCustomTooltip(this._context,this._id+"ActionPopup")};
DvtCustomTooltipManager.prototype.GetRichTooltipManager=function(){if(!this._RichTooltipManager){var a=this._id+"Tooltip";this._RichTooltipManager=this._context.getImplFactory().newRichTooltipManager(a);this._RichTooltipManager.InitializeTooltipElem();(a=this._RichTooltipManager.GetStoredContext())&&(new DvtCustomTooltipEventHandler(a,this,null,null)).addListeners(this._actionTooltip)}return this._RichTooltipManager};
DvtCustomTooltipManager.prototype.GetMagnifyLensManager=function(){this._ManifyLensManager||(this._ManifyLensManager=this._context.getImplFactory().newRichTooltipManager(this._id+"MagLens"));return this._ManifyLensManager};DvtCustomTooltipManager.prototype.getMagnifyLens=function(){this._magnifyLens||(this._magnifyLens=new DvtMagnifyLens(this._context));return this._magnifyLens};DvtCustomTooltipManager.prototype.clearActionTooltip=function(){this._actionTooltip&&this._actionTooltip.clearContent()};
DvtCustomTooltipManager.prototype.getActionTooltip=function(){return this._actionTooltip};DvtCustomTooltipManager.prototype.hideTooltip=function(){this.clearActionTooltip();this._RichTooltipManager&&this._RichTooltipManager.hideTooltip()};DvtCustomTooltipManager.prototype.closeActionTooltip=function(){var a=new DvtActionTooltipEvent(DvtActionTooltipEvent.TOOLTIP_CLOSED_TYPE,this._actionPopupObj);this.FireListener(a);this._actionPopupObj=null;this.hideTooltip()};
DvtCustomTooltipManager.prototype.showMagnifyLens=function(a,b,c){var d=c.getSize(),d=new DvtRectangle(0,0,d,d);this.GetMagnifyLensManager().showRichElementAtPosition(a-d.w/2,b-d.h,c,!1,!0)};DvtCustomTooltipManager.prototype.hideMagnifyLens=function(){this.GetMagnifyLensManager().hideTooltip()};
DvtCustomTooltipManager.prototype.showMagnifyDatatip=function(a,b,c,d){a=this.GetMagnifyLensManager().getTooltipBounds();var e=a.w/2,f=Math.PI/8;b=e-e*Math.cos(f);e-=e*Math.sin(f);f=this.getActionTooltip();f.setIncludePointer(!0);f._pointerLocation=new DvtPoint(-12-b,30+e);this.showTextAtPosition(a.x+a.w-b,a.y-30,c,d,!1);f.setIncludePointer(!1)};
DvtCustomTooltipManager.prototype.showDatatip=function(a,b,c,d){var e=this.getActionTooltip();c=DvtTextUtils.formatTextString(c);e.setTooltipText(c);null!=d&&e.setTooltipBorderColor(d);this.GetRichTooltipManager().showRichElement(a,b,e,!0)};DvtCustomTooltipManager.prototype.showTextAtPosition=function(a,b,c,d,e,f){f=this.getActionTooltip();c=DvtTextUtils.formatTextString(c);f.setTooltipText(c);null!=d&&f.setTooltipBorderColor(d);this.GetRichTooltipManager().showRichElement(a,b,f,e)};
DvtCustomTooltipManager.prototype.displayActionPopup=function(){var a=this.getActionTooltip();return a&&a.hasMenuItems()?!0:!1};DvtCustomTooltipManager.prototype.startActionPopupAtPosition=function(a,b,c,d){if(d=this.getActionTooltip())this.GetRichTooltipManager().showRichElementAtPosition(a,b,d,!0,!1,DvtCustomTooltipManager.ACTION_POPUP_CLASS),a=new DvtActionTooltipEvent(DvtActionTooltipEvent.TOOLTIP_STARTED_TYPE,c),this.FireListener(a),this._actionPopupObj=c};
DvtCustomTooltipManager.prototype.addTooltipEventListener=function(a,b,c){a=this._getListeners(a,!0);a.push(b);a.push(c)};DvtCustomTooltipManager.prototype.removeTooltipEventListener=function(a,b,c){a=this._getListeners(a,!1);if(null!==a)for(var d=0;d<a.length;d+=2)if(a[d]===b&&a[d+1]===c){a.splice(d,2);break}};
DvtCustomTooltipManager.prototype._getListeners=function(a,b){if(!this._listenerObj)if(b)this._listenerObj={};else return null;var c=this._listenerObj[a];!c&&b&&(c=[],this._listenerObj[a]=c);return c};DvtCustomTooltipManager.prototype.FireListener=function(a){var b=this._getListeners(a.getType(),!1);if(b)for(var c=0;c<b.length;c+=2)b[c].call(b[c+1],a)};var DvtCustomTooltipEventHandler=function(a,b,c,d){this._customTooltipManager=b;this.Init(a,c,d)};
DvtObj.createSubclass(DvtCustomTooltipEventHandler,DvtEventManager,"DvtCustomTooltipEventHandler");DvtCustomTooltipEventHandler.prototype.OnClickInternal=function(a){this._handleMenuClick(a.target)};DvtCustomTooltipEventHandler.prototype.HandleImmediateTouchStartInternal=function(a,b){a.blockTouchHold()};DvtCustomTooltipEventHandler.prototype.HandleTouchClickInternal=function(a){this._handleMenuClick(a.target)};
DvtCustomTooltipEventHandler.prototype._handleMenuClick=function(a){var b=this._customTooltipManager._actionPopupObj;if(a=a._menu){var c=!0;a instanceof DvtContextMenuTooltipItem&&a._menuItem.isDisabled()&&(c=!1);c&&(this._customTooltipManager.closeActionTooltip(),a.FireActionTooltipItem(b))}};var DvtCustomTooltip=function(a,b){this._Init(a,b)};DvtObj.createSubclass(DvtCustomTooltip,DvtContainer,"DvtCustomTooltip");DvtCustomTooltip.DEFAULT_BORDER_COLOR="gray";
DvtCustomTooltip.DEFAULT_BACKGROUND_COLOR="#ffffff";DvtCustomTooltip.TOOLTIP_ONLY="tooltipOnly";DvtCustomTooltip.MENU_ONLY="menuOnly";DvtCustomTooltip.MENU_AND_TOOLTIP="menuAndTooltip";DvtCustomTooltip.EMPTY="empty";DvtCustomTooltip.MENU_PADDING_LEFT=21;DvtCustomTooltip.MENU_PADDING_RIGHT=10;
DvtCustomTooltip.prototype._Init=function(a,b){this._context=a;this.getImpl()||this.setImpl(a.getImplFactory().newContainer("customTT"));DvtCustomTooltip.superclass.Init.call(this,a);this._tooltipBorderColor=this._tooltipText=null;this._menuFontSize=11;this._tooltipFill=new DvtSolidFill(DvtCustomTooltip.DEFAULT_BACKGROUND_COLOR);this._font=new DvtFont;this._font.size=11;this._includePointer=!1;this._pointerLocation=new DvtPoint(0,0)};
DvtCustomTooltip.prototype.setIncludePointer=function(a){this._includePointer=a};DvtCustomTooltip.prototype.getRootDisplayable=function(){return this};DvtCustomTooltip.prototype.UpdateTooltipSize=function(a,b){this._displayWidth=a;this._displayHeight=b};DvtCustomTooltip.prototype.getDisplayWidth=function(){return this._displayWidth};DvtCustomTooltip.prototype.getDisplayHeight=function(){return this._displayHeight};
DvtCustomTooltip.prototype.clearContent=function(){this.clearMenuItems();this.setTooltipBorderColor(null);this.setTooltipText(null)};DvtCustomTooltip.prototype.setMenuFontSize=function(a){this._menuFontSize=a};DvtCustomTooltip.prototype.setTooltipBorderColor=function(a){this._tooltipBorderColor=a};DvtCustomTooltip.prototype.getTooltipBorderColor=function(){return this._tooltipBorderColor};DvtCustomTooltip.prototype.setTooltipFill=function(a){this._tooltipFill=a};
DvtCustomTooltip.prototype.setFont=function(a){this._font=a};DvtCustomTooltip.prototype.setTooltipText=function(a){this._tooltipText=a};DvtCustomTooltip.prototype.getTooltipText=function(){return this._tooltipText};DvtCustomTooltip.prototype.addMenuItem=function(a){this.getMenuItems().push(a)};DvtCustomTooltip.prototype.hasMenuItems=function(){var a=this.getMenuItems();return a&&0<a.length};DvtCustomTooltip.prototype.hasTooltip=function(){return null!=this._tooltipText&&0<this._tooltipText.length};
DvtCustomTooltip.prototype.clearMenuItems=function(){this._menuItems&&(this._menuItems=[])};DvtCustomTooltip.prototype.getMenuItems=function(){this._menuItems||(this._menuItems=[]);return this._menuItems};DvtCustomTooltip.prototype.containsMenuId=function(a){for(var b=this.getMenuItems(),c=0;c<b.length;c++)if(b[c].getId()==a)return!0;return!1};
DvtCustomTooltip.prototype.getTooltipType=function(){var a=this.hasMenuItems(),b=this.hasTooltip();return a&&b?DvtCustomTooltip.MENU_AND_TOOLTIP:a?DvtCustomTooltip.MENU_ONLY:b?DvtCustomTooltip.TOOLTIP_ONLY:DvtCustomTooltip.EMPTY};
DvtCustomTooltip.prototype.Render=function(){var a=this.getRootDisplayable();a.removeChildren();var b=this.getTooltipType();if(b!=DvtCustomTooltip.EMPTY){var c=4,d=2;this._includePointer&&(d=3,c=10);var e=this.hasMenuItems(),f=this.hasTooltip(),g=c+d/2,h=0,k=0;b==DvtCustomTooltip.TOOLTIP_ONLY?a.setAlpha(.9):a.setAlpha(1);if(f){var m=new DvtTextArea(this._context,0,0);a.addChild(m);DvtTextUtils.applyFont(m,this._font);m.setMaxWidth(1E8);m.setMouseEnabled(!0);m.alignBaseline();m.alignStart();m.setTranslateY(this._font.getSize()+
c+d/2);this._cursorText=m;this._cursorText.removeChildren();this._cursorText.setText(this._tooltipText);var n=this._cursorText.getDimensions(),m=n.h,p=n.w,k=Math.max(p,k),h=h+m}m=[];n=[];b==DvtCustomTooltip.MENU_AND_TOOLTIP?h+=5:b==DvtCustomTooltip.MENU_ONLY&&(h+=2.5);if(e)for(var q=this.getMenuItems(),e=0;e<q.length;e++){var p=q[e],r=new DvtText(this._context,p.getText(),0,0,null);DvtTextUtils.applyFont(r,this._font);r.setFontSize(this._menuFontSize);p instanceof DvtContextMenuTooltipItem&&p._menuItem.isDisabled()&&
r.setAlpha(.5);r._menu=p;var t=r.measureDimensions(a);t.y=g+h;p=t.w;n.push(t);k=Math.max(p+DvtCustomTooltip.MENU_PADDING_LEFT+DvtCustomTooltip.MENU_PADDING_RIGHT,k);r.setY(t.y);h+=t.h;e<q.length-1&&(h+=5);m.push(r);r.alignStart();r.alignTop()}if(b==DvtCustomTooltip.MENU_ONLY||b==DvtCustomTooltip.MENU_AND_TOOLTIP)h+=2.5;e=k+2*c;b=e+d;g=g+h+c+d/2;this._cursorText&&this._cursorText.setTranslateX(c+d/2);k=12;q=this._pointerLocation.x>b;c=-this._pointerLocation.x;h=this._pointerLocation.y;this._includePointer?
(g/2<k&&(k=g/3),p=Math.max(h+d,g+d),q?(this.UpdateTooltipSize(this._pointerLocation.x,p),a.setTranslateX(d/2)):(this.UpdateTooltipSize(b+c+d,p),a.setTranslateX(d/2+c))):(this.UpdateTooltipSize(b+d,g+d),a.setTranslateX(d/2));a.setTranslateY(d/2);p=new DvtRect(this._context,0,0,b,g);if(this._includePointer){p=g/2;if(q)var q=new DvtPoint(0,0),r=new DvtPoint(b,0),t=new DvtPoint(b,p),v=new DvtPoint(this._pointerLocation.x,h),k=new DvtPoint(b,p+k),c=new DvtPoint(b,g),g=new DvtPoint(0,g),c=DvtPathUtils.moveTo(q.x+
5,q.y)+DvtPathUtils.lineTo(r.x-5,r.y)+DvtPathUtils.arcTo(5,5,Math.PI/2,1,r.x,r.y+5)+DvtPathUtils.lineTo(t.x,t.y)+DvtPathUtils.lineTo(v.x,v.y)+DvtPathUtils.lineTo(k.x,k.y)+DvtPathUtils.lineTo(c.x,c.y-5)+DvtPathUtils.arcTo(5,5,Math.PI/2,1,c.x-5,c.y)+DvtPathUtils.lineTo(g.x+5,g.y)+DvtPathUtils.arcTo(5,5,Math.PI/2,1,g.x,g.y-5)+DvtPathUtils.lineTo(0,5)+DvtPathUtils.arcTo(5,5,Math.PI/2,1,5,0)+DvtPathUtils.closePath();else q=new DvtPoint(0,0),r=new DvtPoint(b,0),t=new DvtPoint(b,g),v=new DvtPoint(0,g),k=
new DvtPoint(0,p+k),c=new DvtPoint(-c,h),g=new DvtPoint(0,p),c=DvtPathUtils.moveTo(q.x+5,q.y)+DvtPathUtils.lineTo(r.x-5,r.y)+DvtPathUtils.arcTo(5,5,Math.PI/2,1,r.x,r.y+5)+DvtPathUtils.lineTo(t.x,t.y-5)+DvtPathUtils.arcTo(5,5,Math.PI/2,1,t.x-5,t.y)+DvtPathUtils.lineTo(v.x+5,v.y)+DvtPathUtils.arcTo(5,5,Math.PI/2,1,v.x,v.y-5)+DvtPathUtils.lineTo(k.x,k.y)+DvtPathUtils.lineTo(c.x,c.y)+DvtPathUtils.lineTo(g.x,g.y)+DvtPathUtils.lineTo(0,5)+DvtPathUtils.arcTo(5,5,Math.PI/2,1,5,0)+DvtPathUtils.closePath();
p=new DvtPath(this._context,c,null)}f?(c=this._tooltipBorderColor,c||(c=DvtCustomTooltip.DEFAULT_BACKGROUND_COLOR),p.setSolidStroke(c,1,d)):p.setSolidStroke("rgb(229,232,238)");this._tooltipFill||(this._tooltipFill=new DvtSolidFill(DvtCustomTooltip.DEFAULT_BACKGROUND_COLOR));p.setFill(this._tooltipFill);a.addChildAt(p,0);d=.95*e;c=(b-d)/2;for(e=0;e<m.length;e++)g=m[e],a.addChild(g),g._menu&&(h=new DvtRectangle(0,n[e].y-2.5,b,n[e].h+5),h=new DvtRect(this._context,h.x,h.y,h.w,h.h),h.setInvisibleFill(),
h._menu=g._menu,a.addChild(h),0==e&&f?(h=new DvtSolidFill("gray",1),this.renderDivider(a,c,n[e].y-5,d,h)):0<e&&(h=g._menu._menuItem,m[e-1]._menu instanceof DvtContextMenuTooltipItem&&h.hasSeparatorBefore()&&(h=new DvtSolidFill("gray",.5),this.renderDivider(a,c,n[e].y-2.5,d,h)))),g.setTranslateX(DvtCustomTooltip.MENU_PADDING_LEFT)}};DvtCustomTooltip.prototype.renderDivider=function(a,b,c,d,e){b=new DvtRect(this._context,b,c,d,1);b.setFill(e);a.addChild(b)};
var DvtCustomTooltipItem=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtCustomTooltipItem,DvtObj,"DvtCustomTooltipItem");DvtCustomTooltipItem.prototype.Init=function(a,b,c,d,e){this._context=a;this._id=b;this._text=c;this._listener=d;this._listenerObj=e};DvtCustomTooltipItem.prototype.getId=function(){return this._id};DvtCustomTooltipItem.prototype.getText=function(){return this._text};
DvtCustomTooltipItem.prototype.FireActionTooltipItem=function(a){if(this._listenerObj&&this._listener){var b={};b.target=a;b.menuItem=this._menuItem;this._menuItemTimer=new DvtTimer(this._context,1,this._handleMenuTimer,this);this._menuItemTimer.evt=b;this._menuItemTimer.start()}};DvtCustomTooltipItem.prototype._handleMenuTimer=function(){this._menuItemTimer&&this._menuItemTimer.stop();this._listener.call(this._listenerObj,this._menuItemTimer.evt)};
var DvtContextMenuTooltipItem=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtContextMenuTooltipItem,DvtCustomTooltipItem,"DvtContextMenuTooltipItem");DvtContextMenuTooltipItem.prototype.Init=function(a,b,c,d,e){DvtContextMenuTooltipItem.superclass.Init.call(this,a,b,e.getText(),c,d);this._menuItem=e};var DvtBaseEvent=function(){};DvtObj.createSubclass(DvtBaseEvent,DvtObj,"DvtBaseEvent");DvtBaseEvent.prototype.Init=function(a,b){this.type=a;this.target=b};
DvtBaseEvent.prototype.getNativeEvent=function(){return null};DvtBaseEvent.prototype.preventDefault=function(){};DvtBaseEvent.prototype.stopPropagation=function(){};DvtBaseEvent.prototype.isPropagationStopped=function(){return!1};var DvtBaseComponentEvent=function(){};DvtObj.createSubclass(DvtBaseComponentEvent,DvtObj,"DvtBaseComponentEvent");DvtBaseComponentEvent.CLIENT_ROW_KEY="clientRowKey";DvtBaseComponentEvent.prototype.Init=function(a){this._type=a};DvtBaseComponentEvent.prototype.getType=function(){return this._type};
DvtBaseComponentEvent.prototype.getParamKeys=function(){return this._paramKeys};DvtBaseComponentEvent.prototype._getParamValues=function(){return this._paramValues};DvtBaseComponentEvent.prototype.addParam=function(a,b){this._paramKeys||(this._paramKeys=[],this._paramValues=[]);this._paramKeys.push(a);this._paramValues.push(b)};
DvtBaseComponentEvent.prototype.getParamValue=function(a){if(!a||!this._paramKeys||!this._paramValues)return null;for(var b=-1,c=0;c<this._paramKeys.length;c++)if(this._paramKeys[c]==a){b=c;break}return-1!=b?this._paramValues[b]:null};var DvtKeyboardEvent=function(a,b,c,d,e,f,g,h,k,m,n,p){this.Init(a,b,c,d,e,f,g,h,k,m,n,p)};DvtObj.createSubclass(DvtKeyboardEvent,DvtBaseEvent,"DvtKeyboardEvent");DvtKeyboardEvent.KEYDOWN=DvtObj.defineConstant("keydown");DvtKeyboardEvent.KEYUP=DvtObj.defineConstant("keyup");
DvtKeyboardEvent.TAB=9;DvtKeyboardEvent.ENTER=13;DvtKeyboardEvent.SHIFT=16;DvtKeyboardEvent.CONTROL=17;DvtKeyboardEvent.ESCAPE=27;DvtKeyboardEvent.SPACE=32;DvtKeyboardEvent.PAGE_UP=33;DvtKeyboardEvent.PAGE_DOWN=34;DvtKeyboardEvent.UP_ARROW=38;DvtKeyboardEvent.DOWN_ARROW=40;DvtKeyboardEvent.DELETE=46;DvtKeyboardEvent.LEFT_ARROW=37;DvtKeyboardEvent.RIGHT_ARROW=39;DvtKeyboardEvent.OPEN_BRACKET=219;DvtKeyboardEvent.CLOSE_BRACKET=221;DvtKeyboardEvent.BACK_SLASH=220;DvtKeyboardEvent.FORWARD_SLASH=191;
DvtKeyboardEvent.ZERO=48;DvtKeyboardEvent.NUMPAD_ZERO=96;DvtKeyboardEvent.NUMPAD_PLUS=107;DvtKeyboardEvent.NUMPAD_MINUS=109;DvtKeyboardEvent.WEBKIT_PLUS=187;DvtKeyboardEvent.WEBKIT_MINUS=189;DvtKeyboardEvent.GECKO_PLUS=61;DvtKeyboardEvent.GECKO_MINUS=173;DvtKeyboardEvent.A=65;DvtKeyboardEvent.F=70;DvtKeyboardEvent.M=77;DvtKeyboardEvent.PERIOD=190;DvtKeyboardEvent.NUMPAD_PERIOD=110;DvtKeyboardEvent.SINGLE_QUOTE=222;DvtKeyboardEvent.STAR=56;DvtKeyboardEvent.NUMPAD_STAR=144;
DvtKeyboardEvent.SEMICOLON=186;DvtKeyboardEvent.OPEN_ANGLED_BRACKET=188;DvtKeyboardEvent.CLOSE_ANGLED_BRACKET=190;DvtKeyboardEvent.GRAVE_ACCENT=192;DvtKeyboardEvent.prototype.Init=function(a,b,c,d,e,f,g,h,k,m,n,p){DvtKeyboardEvent.superclass.Init.call(this,a,null);this.bubbles=b;this.cancelable=c;this.view=d;this.charCode=e;this.keyCode=f;this.keyLocation=g;this.ctrlKey=h;this.altKey=k;this.shiftKey=m;this.repeat=n;this.locale=p};
DvtKeyboardEvent.isPlus=function(a){var b=a.keyCode;return b==DvtKeyboardEvent.NUMPAD_PLUS?!0:DvtAgent.isPlatformGecko()?b==DvtKeyboardEvent.GECKO_PLUS&&a.shiftKey?!0:!1:b==DvtKeyboardEvent.WEBKIT_PLUS&&a.shiftKey?!0:!1};DvtKeyboardEvent.isEquals=function(a){var b=a.keyCode;if(DvtAgent.isPlatformGecko()){if(b!=DvtKeyboardEvent.GECKO_PLUS||a.shiftKey)return!1}else if(b!=DvtKeyboardEvent.WEBKIT_PLUS||a.shiftKey)return!1;return!0};
DvtKeyboardEvent.isMinus=function(a){var b=a.keyCode;if(b==DvtKeyboardEvent.NUMPAD_MINUS)return!0;if(DvtAgent.isPlatformGecko()){if(b!=DvtKeyboardEvent.GECKO_MINUS||a.shiftKey)return!1}else if(b!=DvtKeyboardEvent.WEBKIT_MINUS||a.shiftKey)return!1;return!0};DvtKeyboardEvent.isUnderscore=function(a){var b=a.keyCode;return DvtAgent.isPlatformGecko()?b==DvtKeyboardEvent.GECKO_MINUS&&a.shiftKey?!0:!1:b==DvtKeyboardEvent.WEBKIT_MINUS&&a.shiftKey?!0:!1};
var DvtMouseEvent=function(a,b,c,d,e,f,g,h,k){this.Init(a,b,c,d,e,f,g,h,k)};DvtObj.createSubclass(DvtMouseEvent,DvtBaseEvent,"DvtMouseEvent");DvtMouseEvent.CLICK=DvtObj.defineConstant("click");DvtMouseEvent.DBLCLICK=DvtObj.defineConstant("dblclick");DvtMouseEvent.MOUSEOVER=DvtObj.defineConstant("mouseover");DvtMouseEvent.MOUSEOUT=DvtObj.defineConstant("mouseout");DvtMouseEvent.MOUSEDOWN=DvtObj.defineConstant("mousedown");DvtMouseEvent.MOUSEUP=DvtObj.defineConstant("mouseup");
DvtMouseEvent.MOUSEMOVE=DvtObj.defineConstant("mousemove");DvtMouseEvent.MOUSEWHEEL=DvtObj.defineConstant("mousewheel");DvtMouseEvent.RIGHT_CLICK_BUTTON=2;DvtMouseEvent.prototype.Init=function(a,b,c,d,e,f,g,h,k,m,n,p,q,r,t){DvtMouseEvent.superclass.Init.call(this,a,null);this.bubbles=b;this.cancelable=c;this.view=d;this.detail=e;this.pageX=f;this.pageY=g;this.clientX=h;this.clientY=k;this.ctrlKey=m||q;this.altKey=n;this.shiftKey=p;this.metaKey=q;this.button=r;this.relatedTarget=t};
var DvtTouchEvent=function(){};DvtObj.createSubclass(DvtTouchEvent,DvtBaseEvent,"DvtTouchEvent");DvtTouchEvent.TOUCHSTART=DvtObj.defineConstant("touchstart");DvtTouchEvent.TOUCHMOVE=DvtObj.defineConstant("touchmove");DvtTouchEvent.TOUCHEND=DvtObj.defineConstant("touchend");DvtTouchEvent.TOUCHCANCEL=DvtObj.defineConstant("touchcancel");DvtTouchEvent.prototype.Init=function(){};var DvtTouch=function(a){this.Init(a)};DvtObj.createSubclass(DvtTouch,DvtObj,"DvtTouch");
DvtTouch.prototype.Init=function(a){this.clientX=a.clientX;this.clientY=a.clientY;this.screenX=a.screenX;this.screenY=a.screenY;this.pageX=a.pageX;this.pageY=a.pageY;this.target=a.target;this.identifier=null==a.identifier||isNaN(a.identifier)?1:a.identifier};var DvtTouchManager=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtTouchManager,DvtObj,"DvtTouchManager");DvtTouchManager.TOUCH_MODE="mode";DvtTouchManager.TOUCH_MODE_DEFAULT="defaultMode";DvtTouchManager.TOUCH_MODE_LONG_PRESS="longPressMode";
DvtTouchManager.PREV_HOVER_OBJ="prevHoverObj";DvtTouchManager.HOVER_TOUCH_KEY="hoverTouch";
DvtTouchManager.prototype.Init=function(a,b){this._context=b;this._id=a;this._touchCount=0;this._touchHoldTimer=new DvtTimer(this._context,200,this._handleTouchHoldStartTimer,this);this._blockTouchHold=!1;this._touchMap={};this._touchRegionBounds=null;this._savedTouchInfo=[];this._addTouchHoldMoveEventListener(this._onTouchHoldHover,this);this._doubleTapTimer=new DvtTimer(this._context,300,this._handleDoubleTapTimer,this,1)};
DvtTouchManager.prototype.blockTouchHold=function(){this._touchHoldTimer.stop();this._blockTouchHold=!0};DvtTouchManager.prototype.unblockTouchHold=function(){this._blockTouchHold=!1};DvtTouchManager.prototype._addTouchHoldMoveEventListener=function(a,b){this.addTouchEventListener(DvtComponentTouchEvent.TOUCH_HOLD_START_TYPE,a,b);this.addTouchEventListener(DvtComponentTouchEvent.TOUCH_HOLD_MOVE_TYPE,a,b);this.addTouchEventListener(DvtComponentTouchEvent.TOUCH_HOLD_END_TYPE,a,b)};
DvtTouchManager.prototype._onTouchHoldHover=function(a){var b=a.getType(),c=a.touch,d=this._touchMap[c.identifier];a=a.target;b==DvtComponentTouchEvent.TOUCH_HOLD_END_TYPE?(b=new DvtComponentTouchEvent(DvtComponentTouchEvent.TOUCH_HOVER_END_TYPE,c,a),b._isCancelEvent=this._isCancelEvent,null!=a&&this.FireListener(new DvtComponentTouchEvent(DvtComponentTouchEvent.TOUCH_HOVER_OUT_TYPE,c,a)),d[DvtTouchManager.PREV_HOVER_OBJ]=null,this.FireListener(b)):b==DvtComponentTouchEvent.TOUCH_HOLD_START_TYPE?
(d[DvtTouchManager.PREV_HOVER_OBJ]=null,null!=a&&this.FireListener(new DvtComponentTouchEvent(DvtComponentTouchEvent.TOUCH_HOVER_OVER_TYPE,c,a)),d[DvtTouchManager.PREV_HOVER_OBJ]=a,this.FireListener(new DvtComponentTouchEvent(DvtComponentTouchEvent.TOUCH_HOVER_START_TYPE,c,a))):b==DvtComponentTouchEvent.TOUCH_HOLD_MOVE_TYPE&&(this._fireHoverOverOutEvents(a,d[DvtTouchManager.PREV_HOVER_OBJ],c),d[DvtTouchManager.PREV_HOVER_OBJ]=a,this.FireListener(new DvtComponentTouchEvent(DvtComponentTouchEvent.TOUCH_HOVER_MOVE_TYPE,
c,a)))};DvtTouchManager.prototype._getObjFromTouch=function(a){var b=null;if(a){var c=this._context.getRelativePosition(a.pageX,a.pageY);(!this._touchRegionBounds||this._touchRegionBounds.containsPoint(c.x,c.y))&&(c=this._context.getDocumentUtils())&&(b=c.elementFromTouch(a))}return b};
DvtTouchManager.prototype._fireHoverOverOutEvents=function(a,b,c){b!=a&&(null!=b&&this.FireListener(new DvtComponentTouchEvent(DvtComponentTouchEvent.TOUCH_HOVER_OUT_TYPE,c,b,a)),null!=a&&this.FireListener(new DvtComponentTouchEvent(DvtComponentTouchEvent.TOUCH_HOVER_OVER_TYPE,c,a,b)))};DvtTouchManager.prototype.addTouchEventListener=function(a,b,c){a=this._getListeners(a,!0);a.push(b);a.push(c)};
DvtTouchManager.prototype.removeTouchEventListener=function(a,b,c){if(a=this._getListeners(a,!1))for(var d=0;d<a.length;d+=2)if(a[d]===b&&a[d+1]===c){a.splice(d,2);break}};DvtTouchManager.prototype._getListeners=function(a,b){if(!this._listenerObj)if(b)this._listenerObj={};else return null;var c=this._listenerObj[a];!c&&b&&(c=[],this._listenerObj[a]=c);return c};
DvtTouchManager.prototype.FireListener=function(a){var b=this._getListeners(a.getType(),!1);if(b)for(var c=0;c<b.length;c+=2)b[c].call(b[c+1],a)};
DvtTouchManager.prototype.startTouchHold=function(){var a=this._startSingleFingerTouchId;if(null!=a&&!isNaN(a)){var b=this._touchMap[a];if(b){for(var c=b.startTarget,d=b.startTouch,e=this._findMatches("touchId",a),f=0;f<e.length;f++){var g=e[f],h=g.touchObj,g=g.touchId;h!=DvtTouchManager.HOVER_TOUCH_KEY&&(g=this.getTouchInfo(g).startTouch,this.performAssociatedTouchEnd(g,h,null))}b[DvtTouchManager.TOUCH_MODE]=DvtTouchManager.TOUCH_MODE_LONG_PRESS;this.saveProcessedTouch(a,DvtTouchManager.HOVER_TOUCH_KEY,
null,DvtTouchManager.HOVER_TOUCH_KEY,DvtTouchManager.HOVER_TOUCH_KEY,this.HoverMoveInternal,this.HoverEndInternal,this);a=new DvtComponentTouchEvent(DvtComponentTouchEvent.TOUCH_HOLD_START_TYPE,d,c);this.FireListener(a)}}};
DvtTouchManager.prototype.fireLogicalEvents=function(a){var b=a.type;if(b==DvtTouchEvent.TOUCHSTART)if(a.isTouchHoldBlocked()||this.processAssociatedTouchAttempt(a,DvtTouchManager.HOVER_TOUCH_KEY,this.HoverStartInternal,this),this._doubleTapAttemptStarted)a.preventDefault();else{var c=this.getTouchInfo(a.changedTouches[0].identifier),d=c.currentObj;DvtAgent.isBrowserChrome()&&(d instanceof DvtMarker||d instanceof DvtText)&&a.preventDefault()}else b==DvtTouchEvent.TOUCHMOVE?this.processAssociatedTouchMove(a,
DvtTouchManager.HOVER_TOUCH_KEY):b==DvtTouchEvent.TOUCHEND&&this.processAssociatedTouchEnd(a,DvtTouchManager.HOVER_TOUCH_KEY);if(b==DvtTouchEvent.TOUCHEND)for(var b=this._getStoredTouches(a.changedTouches),e=0;e<b.length;e++){var f=b[e],c=this.getTouchInfo(f.identifier),d=c.currentObj;c[DvtTouchManager.TOUCH_MODE]!=DvtTouchManager.TOUCH_MODE_LONG_PRESS&&c.fireClick&&(c=new DvtComponentTouchEvent(DvtComponentTouchEvent.TOUCH_CLICK_TYPE,f,d),c.touchEvent=a,this.FireListener(c),this._doubleTapAttemptStarted?
(c=this._doubleTapAttemptObj,this.resetDoubleTap(),d==c&&(d=new DvtComponentTouchEvent(DvtComponentTouchEvent.TOUCH_DOUBLE_CLICK_TYPE,f,d),d.touchEvent=a,this.FireListener(d))):(this.resetDoubleTap(),this._doubleTapTimer.start(),this._doubleTapAttemptStarted=!0,this._doubleTapAttemptObj=d))}};DvtTouchManager.prototype.getTouchInfo=function(a){return this._touchMap[a]};
DvtTouchManager.prototype.HoverStartInternal=function(a,b){this._blockTouchHold||(this._startSingleFingerTouchId=b.identifier,this._touchHoldTimer.stop(),this._touchHoldTimer.start())};DvtTouchManager.prototype.HoverMoveInternal=function(a,b){var c=this.getTouchInfo(b.identifier).currentObj,c=new DvtComponentTouchEvent(DvtComponentTouchEvent.TOUCH_HOLD_MOVE_TYPE,b,c);this.FireListener(c);a.preventDefault()};
DvtTouchManager.prototype.HoverEndInternal=function(a,b){var c=this.getTouchInfo(b.identifier).currentObj,c=new DvtComponentTouchEvent(DvtComponentTouchEvent.TOUCH_HOLD_END_TYPE,b,c);this.FireListener(c);a&&a.preventDefault()};DvtTouchManager.prototype.resetTouchHold=function(){this._startSingleFingerTouchId=null;this._touchHoldTimer&&this._touchHoldTimer.stop()};
DvtTouchManager.prototype.preEventBubble=function(a){a.setTouchManager&&a.setTouchManager(this);var b=a.type;b==DvtTouchEvent.TOUCHSTART?this.processTouchStart(a):b==DvtTouchEvent.TOUCHMOVE?this.processTouchMove(a):b==DvtTouchEvent.TOUCHEND&&this.processTouchEnd(a)};
DvtTouchManager.prototype.postEventBubble=function(a){var b=a.type;if(b!=DvtTouchEvent.TOUCHSTART&&b!=DvtTouchEvent.TOUCHMOVE&&b==DvtTouchEvent.TOUCHEND)for(a=this._getStoredTouches(a.changedTouches),b=0;b<a.length;b++){var c=a[b].identifier;delete this._touchMap[c];this._startSingleFingerTouchId==c&&(this._startSingleFingerTouchId=null);for(var c=this._findMatches("touchId",c),d=0;d<c.length;d++){var e=c[d];this.removeTooltipInfo(e.touchId,e.touchObj)}}};
DvtTouchManager.prototype.saveProcessedTouch=function(a,b,c,d,e,f,g,h){return null==a||isNaN(a)?!1:(a=DvtTouchManager.createSavedTouchInfo(a,b,c,d,e,f,g,h),this._savedTouchInfo.push(a),!0)};DvtTouchManager.prototype.saveProcessedTouchDefault=function(a,b,c,d,e,f){var g=null;f.immediateTouchMoved&&(g=f.immediateTouchMoved);var h=null;f.immediateTouchEnded&&(h=f.immediateTouchEnded);this.saveProcessedTouch(a,b,c,d,e,g,h,f)};
DvtTouchManager.prototype.processAssociatedTouch=function(a,b,c,d){var e=a.type;e==DvtTouchEvent.TOUCHSTART?this.processAssociatedTouchAttempt(a,b,c,d):e==DvtTouchEvent.TOUCHMOVE?this.processAssociatedTouchMove(a,b):e==DvtTouchEvent.TOUCHEND&&this.processAssociatedTouchEnd(a,b)};DvtTouchManager.prototype.processAssociatedTouchDefault=function(a,b){this.processAssociatedTouch(a,b,b.immediateTouchAttempted,b)};
DvtTouchManager.prototype.cancelTouchHold=function(){for(var a=DvtTouchManager.HOVER_TOUCH_KEY,b=this.getTouchIdsForObj(a),c=0;c<b.length;c++){var d=b[c],e=this.getTouchInfo(d).startTouch;e&&(this._isCancelEvent=!0,this.performAssociatedTouchEnd(e,a,null),this._isCancelEvent=!1,delete this._touchMap[d])}};
DvtTouchManager.prototype.performAssociatedTouchEnd=function(a,b,c){var d=a.identifier,e=this.getSavedTouchInfo(d,b);if(e){var f=e.listenerObj,g=e.endListener;this.removeTooltipInfo(d,b);g&&g.call(f,c,a,e)}};DvtTouchManager.prototype.processAssociatedTouchAttempt=function(a,b,c,d){b=a.changedTouches;for(var e=0;e<b.length;e++){var f=b[e];f&&c&&c.call(d,a,f)}};
DvtTouchManager.prototype.processAssociatedTouchMove=function(a,b){for(var c=this.getTouchIdsForObj(b),d=0;d<c.length;d++){var e=c[d];if(null!=e&&!isNaN(e)&&(e=DvtTouchManager.getTouchById(e,this._getStoredTouches(a.changedTouches)))){var f=this.getSavedTouchInfo(e.identifier,b);if(f){var g=f.listenerObj;(f=f.moveListener)&&f.call(g,a,e)}}}};
DvtTouchManager.prototype.processAssociatedTouchEnd=function(a,b){for(var c=this.getTouchIdsForObj(b),d=0;d<c.length;d++){var e=DvtTouchManager.getTouchById(c[d],this._getStoredTouches(a.changedTouches));e&&this.performAssociatedTouchEnd(e,b,a)}};DvtTouchManager.prototype._findMatch=function(a,b){for(var c=-1,d=0;d<this._savedTouchInfo.length;d++)this._savedTouchInfo[d][a]==b&&(c=d);return c};
DvtTouchManager.prototype._findMatches=function(a,b){for(var c=[],d=0;d<this._savedTouchInfo.length;d++){var e=this._savedTouchInfo[d];e[a]==b&&c.push(e)}return c};DvtTouchManager.prototype.getSavedTouchInfo=function(a,b){for(var c=this._findMatches("touchId",a),d=0;d<c.length;d++){var e=c[d];if(e.touchObj==b)return e}return null};DvtTouchManager.prototype.containsTouchId=function(a){return 0<this._findMatches("touchId",a).length};
DvtTouchManager.prototype.getTouchIdsForObj=function(a){var b=[];a=this._findMatches("touchObj",a);for(var c=0;c<a.length;c++)b.push(a[c].touchId);return b};
DvtTouchManager.prototype.removeTooltipInfo=function(a,b){for(var c=this._findMatches("touchId",a),d=[],e=0;e<c.length;e++){var f=c[e];f.touchObj==b&&d.push(f)}for(e=0;e<d.length;e++){for(var c=d[e],g=-1,h=0;h<this._savedTouchInfo.length;h++)f=this._savedTouchInfo[h],f==c&&(g=h);-1!=g&&(this._savedTouchInfo.splice(g,1),0==this._savedTouchInfo.length&&this._context.getTooltipManager().hideTooltip())}};
DvtTouchManager.prototype.setTooltipEnabled=function(a,b){for(var c=this._savedTouchInfo,d=0;d<c.length;d++){var e=c[d];e.touchId==a&&(e.allowTooltips=b)}};
DvtTouchManager.prototype.getTooltipInfo=function(){for(var a={},b=[],c=null,d=null,e=!1,f=this._findMatches("allowTooltips",!0),g=0;g<f.length;g++){var c=f[g],h=c.touchId;d?c.grouping!=d&&(e=!0):d=c.grouping;var k=this._touchMap[h].currentObj;c.tooltipObjOverride&&(k=c.tooltipObjOverride);b.push(h);c=k}e&&(b=[]);a.touchIds=b;a.tooltipTarget=c;return a};DvtTouchManager.prototype.containsGrouping=function(a){return 0<this._findMatches("grouping",a).length};
DvtTouchManager.prototype.processTouchStart=function(a){var b=a.changedTouches;this._touchCount=a.touches.length;for(var c=0;c<b.length;c++){var d=b[c],e=d.screenX,f=d.screenY,g=d.identifier,h=this._getObjFromTouch(d),d={x:e,y:f,prevX:e,prevY:f,pageX:d.pageX,pageY:d.pageY,prevPageX:d.pageX,prevPageY:d.pageY,dx:0,dy:0,fireClick:!0,startTarget:h,currentObj:h,touchMoved:!1,touchtype:null,startTouch:d};d[DvtTouchManager.TOUCH_MODE]=DvtTouchManager.TOUCH_MODE_DEFAULT;d.origx=e;d.origy=f;this._touchMap[g]=
d}!this._isHovering()&&this._isTouchHoldAllowed()||a.blockTouchHold();return!0};DvtTouchManager.prototype._isTouchHoldAllowed=function(){var a=!1,b=0,c;for(c in this._touchMap)this.getTouchInfo(c).touchMoved&&(a=!0),b++;return 1<b&&!a?(this.resetTouchHold(),!1):!0};DvtTouchManager.prototype._isHovering=function(){for(var a in this._touchMap)if(this.getTouchInfo(a)[DvtTouchManager.TOUCH_MODE]==DvtTouchManager.TOUCH_MODE_LONG_PRESS)return!0;return!1};
DvtTouchManager.prototype._getStoredTouches=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];this.getTouchInfo(d.identifier)&&b.push(d)}return b};
DvtTouchManager.prototype.processTouchMove=function(a){var b=this._getStoredTouches(a.changedTouches);a=this._getStoredTouches(a.touches);for(var c=0;c<b.length;c++){var d=b[c],e=this._getObjFromTouch(d),f=d.identifier,g=this.getTouchInfo(f);g[DvtTouchManager.TOUCH_MODE]!=DvtTouchManager.TOUCH_MODE_LONG_PRESS&&this._startSingleFingerTouchId==f&&0<Math.abs(g.pageX-d.pageX)&&this.resetTouchHold();g.currentObj=e;g.touchMoved=!0;g.fireClick&&g[DvtTouchManager.TOUCH_MODE]!=DvtTouchManager.TOUCH_MODE_LONG_PRESS&&
g.currentObj!=g.startTarget&&(g.fireClick=!1)}for(c=0;c<a.length;c++){var d=a[c],g=this.getTouchInfo(d.identifier),b=d.screenX,e=d.screenY,f=b-g.x,h=e-g.y;g.prevX=g.x;g.prevY=g.y;g.dx=f;g.dy=h;g.x=b;g.y=e;g.prevPageX=g.pageX;g.prevPageY=g.pageY;g.pageX=d.pageX;g.pageY=d.pageY}return!0};
DvtTouchManager.prototype.processTouchEnd=function(a){var b=a.changedTouches;this._touchCount=a.touches.length;for(a=0;a<b.length;a++){var c=b[a],d=this._getObjFromTouch(c);if((c=this.getTouchInfo(c.identifier))&&c.fireClick)if(c[DvtTouchManager.TOUCH_MODE]==DvtTouchManager.TOUCH_MODE_LONG_PRESS)this._startSingleFingerTouchId=null;else{var e=c.touchMoved;c.fireClick=d==c.startTarget&&!e}}return!0};
DvtTouchManager.getTouchById=function(a,b){if(null!=a&&!isNaN(a))for(var c=0;c<b.length;c++){var d=b[c];if(d.identifier==a)return d}return null};DvtTouchManager.createSavedTouchInfo=function(a,b,c,d,e,f,g,h){a={touchId:a,tooltipObjOverride:c,grouping:d,type:e,touchObj:b,allowTooltips:!0};a.moveListener=f;a.endListener=g;a.listenerObj=h;return a};DvtTouchManager.prototype.setTouchRegionBounds=function(a){this._touchRegionBounds=a};
DvtTouchManager.prototype._handleTouchHoldStartTimer=function(){this._touchHoldTimer.stop();this.startTouchHold()};DvtTouchManager.prototype._handleDoubleTapTimer=function(){this.resetDoubleTap()};DvtTouchManager.prototype.resetDoubleTap=function(){this._doubleTapAttemptStarted=!1;this._doubleTapAttemptObj=null;this._doubleTapTimer.stop()};
DvtTouchManager.prototype.getMultiTouchData=function(a){if(2==a.length){var b=this._touchMap[a[0]];a=this._touchMap[a[1]];if(null==b||null==a||0==b.dx&&0==a.dy)return null;var c=b.pageX-a.pageX,d=b.pageY-a.pageY,c=Math.sqrt(c*c+d*d),d=b.prevPageX-a.prevPageX,e=b.prevPageY-a.prevPageY,f=(b.pageX+a.pageX)/2,g=(b.pageY+a.pageY)/2;return{dz:c-Math.sqrt(d*d+e*e),cx:f,cy:g,dcx:f-(b.prevPageX+a.prevPageX)/2,dcy:g-(b.prevPageY+a.prevPageY)/2,dist:c}}return null};
DvtTouchManager.prototype.getMultiTouchDelta=function(a){if(a){var b,c;if(2==a.length){b=this._touchMap[a[0]];var d=this._touchMap[a[1]];if(null==b||null==d)return;null==b.touchtype&&(c=this._determineTouchDirection(b),null!=c&&(d=this._determineTouchDirection(d),null!=d&&(c=this._isSameDirection(c,d)?"scroll":"pinch",b.touchtype=c)));c=b.touchtype;if(null==c)return;if("pinch"==c)return null}for(var e=d=c=0;e<a.length;e++)b=this._touchMap[a[e]],c+=b.dx,d+=b.dy;c/=a.length;d/=a.length;return{deltaX:1*
c,deltaY:1*d}}return null};DvtTouchManager.prototype._isSameDirection=function(a,b){return a==b?!0:2==a.length&&1==b.length?a.charAt(0)==b||a.charAt(1)==b:1==a.length&&2==b.length?a==b.charAt(0)||b==a.charAt(1):!1};
DvtTouchManager.prototype._determineTouchDirection=function(a){var b=a.origx,c=a.origy;if(null==b||null==c)return null;b=a.x-b;a=a.y-c;if(Math.sqrt(Math.pow(b,2)+Math.pow(a,2))<.01*window.innerWidth)return null;c=null;.25<=Math.abs(b/a)&&(c=0>b?"l":"r");var d=null;.25<=Math.abs(a/b)&&(d=0>a?"u":"d");return null!=c&&null!=d?d+c:null==c?d:null==d?c:null};
DvtTouchManager.prototype.calcAveragePosition=function(a){for(var b=0,c=0,d=a.length,e=0;e<d;e++)var f=this.getTouchInfo(a[e]),b=b+f.pageX,c=c+f.pageY;return new DvtPoint(b/d,c/d)};DvtTouchManager.prototype.getStartTargetsByIds=function(a){for(var b=[],c=0;c<a.length;c++){var d=this.getTouchInfo(a[c]);b.push(d.startTarget)}return b};var DvtListItemEvent=function(a,b,c,d){this.Init(DvtListItemEvent.TYPE);this._listItemId=a;this._attrGroupId=b;this._showHide=c;this._evt=d};DvtListItemEvent.TYPE="listItemShowHide";
DvtListItemEvent.SHOW="show";DvtListItemEvent.HIDE="hide";DvtObj.createSubclass(DvtListItemEvent,DvtBaseComponentEvent,"DvtListItemEvent");DvtListItemEvent.prototype.getNativeEvent=function(){return this._evt};DvtListItemEvent.prototype.getListItemId=function(){return this._listItemId};DvtListItemEvent.prototype.getShowHide=function(){return this._showHide};DvtListItemEvent.prototype.getAttributeGroupId=function(){return this._attrGroupId};
var DvtLegendItemRollOverEvent=function(a,b,c,d,e){this.Init(DvtLegendItemRollOverEvent.TYPE);this._listItemId=a;this._attrGroupId=b;this._hideAttr=c;this._mouseState=d;this._evt=e};DvtLegendItemRollOverEvent.TYPE="legendItemRollOver";DvtLegendItemRollOverEvent.MOUSEOVER="mouseover";DvtLegendItemRollOverEvent.MOUSEOUT="mouseout";DvtObj.createSubclass(DvtLegendItemRollOverEvent,DvtBaseComponentEvent,"DvtLegendItemRollOverEvent");DvtLegendItemRollOverEvent.prototype.getNativeEvent=function(){return this._evt};
DvtLegendItemRollOverEvent.prototype.getHideAttributes=function(){return this._hideAttr};DvtLegendItemRollOverEvent.prototype.getListItemId=function(){return this._listItemId};DvtLegendItemRollOverEvent.prototype.getMouseState=function(){return this._mouseState};DvtLegendItemRollOverEvent.prototype.getAttributeGroupId=function(){return this._attrGroupId};var ViewportChangeEvent=function(a,b,c){this.Init(ViewportChangeEvent.TYPE);this._oldDim=a;this._newDim=b;this._evt=c};
ViewportChangeEvent.TYPE="viewportChange";DvtObj.createSubclass(ViewportChangeEvent,DvtBaseComponentEvent,"ViewportChangeEvent");ViewportChangeEvent.prototype.getNativeEvent=function(){return this._evt};ViewportChangeEvent.prototype.getOldDimensions=function(){return this._oldDim};ViewportChangeEvent.prototype.getNewDimensions=function(){return this._newDim};var DvtActionTooltipEvent=function(a,b){this.Init(a);this.target=b};DvtActionTooltipEvent.TOOLTIP_CLOSED_TYPE="actiontooltipclosed";
DvtActionTooltipEvent.TOOLTIP_STARTED_TYPE="actiontooltipstarted";DvtObj.createSubclass(DvtActionTooltipEvent,DvtBaseComponentEvent,"DvtActionTooltipEvent");DvtActionTooltipEvent.prototype.Init=function(a){DvtActionTooltipEvent.superclass.Init.call(this,a)};var DvtComponentTouchEvent=function(a,b,c,d){this.Init(a,b,c,d)};DvtComponentTouchEvent.TOUCH_HOLD_START_TYPE="touchholdstart";DvtComponentTouchEvent.TOUCH_HOLD_MOVE_TYPE="touchholdmove";DvtComponentTouchEvent.TOUCH_HOLD_END_TYPE="touchholdend";
DvtComponentTouchEvent.TOUCH_HOVER_START_TYPE="touchhoverstart";DvtComponentTouchEvent.TOUCH_HOVER_MOVE_TYPE="touchhovermove";DvtComponentTouchEvent.TOUCH_HOVER_END_TYPE="touchhoverend";DvtComponentTouchEvent.TOUCH_HOVER_OVER_TYPE="touchhoverover";DvtComponentTouchEvent.TOUCH_HOVER_OUT_TYPE="touchhoverout";DvtComponentTouchEvent.TOUCH_CLICK_TYPE="touchclick";DvtComponentTouchEvent.TOUCH_DOUBLE_CLICK_TYPE="touchdblclick";DvtObj.createSubclass(DvtComponentTouchEvent,DvtBaseComponentEvent,"DvtComponentTouchEvent");
DvtComponentTouchEvent.prototype.Init=function(a,b,c,d){DvtComponentTouchEvent.superclass.Init.call(this,a);this.target=c;this.touch=b;this.relatedTarget=d;this._isPropagationStopped=!1};DvtComponentTouchEvent.prototype.preventDefault=function(){};DvtComponentTouchEvent.prototype.stopPropagation=function(){this._isPropagationStopped=!0};DvtComponentTouchEvent.prototype.isPropagationStopped=function(){return this._isPropagationStopped};
var DvtScrollbarEvent=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};DvtObj.createSubclass(DvtScrollbarEvent,DvtBaseComponentEvent,"DvtScrollbarEvent");DvtScrollbarEvent.SB_MOVE="scrollbarMove";DvtScrollbarEvent.SB_MOVE_COMPLETE="scrollbarMoveComplete";DvtScrollbarEvent.SB_RESIZE="scrollbarResize";DvtScrollbarEvent.SB_RESIZE_COMPLETE="scrollbarResizeComplete";
DvtScrollbarEvent.prototype.Init=function(a,b,c,d,e,f){DvtScrollbarEvent.superclass.Init.call(this,a);this.type=a;this._sb=b;this._startCoord=c;this._endCoord=d;this._delta=e;this._scaledDelta=f};DvtScrollbarEvent.prototype.getScrollbarId=function(){return this._sb.getUIId()};DvtScrollbarEvent.prototype.getStartCoord=function(){return this._startCoord};DvtScrollbarEvent.prototype.getEndCoord=function(){return this._endCoord};DvtScrollbarEvent.prototype.getMovedDelta=function(){return this._delta};
DvtScrollbarEvent.prototype.getScaledDelta=function(){return this._scaledDelta};DvtScrollbarEvent.prototype.getScrollbar=function(){return this._sb};var DvtResizeEvent=function(a,b,c,d){this.Init(DvtResizeEvent.RESIZE_EVENT,a,b,c,d)};DvtObj.createSubclass(DvtResizeEvent,DvtBaseEvent,"DvtResizeEvent");DvtResizeEvent.RESIZE_EVENT="dvtResizeEvent";DvtResizeEvent.prototype.Init=function(a,b,c,d,e){DvtResizeEvent.superclass.Init.call(this,a);this._ww=b;this._hh=c;this._xx=d;this._yy=e};
DvtResizeEvent.prototype.getWidth=function(){return this._ww};DvtResizeEvent.prototype.getHeight=function(){return this._hh};DvtResizeEvent.prototype.getX=function(){return this._xx};DvtResizeEvent.prototype.getY=function(){return this._yy};var DvtScrollEvent=function(a,b){this.Init(DvtScrollEvent.SCROLL_EVENT,a,b)};DvtObj.createSubclass(DvtScrollEvent,DvtBaseEvent,"DvtScrollEvent");DvtScrollEvent.SCROLL_EVENT="dvtScrollEvent";
DvtScrollEvent.prototype.Init=function(a,b,c){DvtScrollEvent.superclass.Init.call(this,a);this._x=b;this._y=c};DvtScrollEvent.prototype.getX=function(){return this._x};DvtScrollEvent.prototype.getY=function(){return this._y};var DvtMarqueeEvent=function(a,b,c,d,e,f){this.Init(DvtMarqueeEvent.TYPE);this.subtype=a;this.x=b;this.y=c;this.w=d;this.h=e;this.ctrlKey=f};DvtObj.createSubclass(DvtMarqueeEvent,DvtBaseComponentEvent,"DvtMarqueeEvent");DvtMarqueeEvent.TYPE="dvtMarquee";
DvtMarqueeEvent.SUBTYPE_START="dvtMarqueeStartEvent";DvtMarqueeEvent.SUBTYPE_MOVE="dvtMarqueeMoveEvent";DvtMarqueeEvent.SUBTYPE_END="dvtMarqueeEndEvent";DvtMarqueeEvent.prototype.getSubtype=function(){return this.subtype};var DvtPanZoomEvent=function(a,b,c,d,e,f,g,h,k){this.Init(DvtPanZoomEvent.TYPE);this.subtype=a;this.dxMin=b;this.dxMax=c;this.dyMin=d;this.dyMax=e;this.dxMinTotal=f;this.dxMaxTotal=g;this.dyMinTotal=h;this.dyMaxTotal=k};
DvtObj.createSubclass(DvtPanZoomEvent,DvtBaseComponentEvent,"DvtPanZoomEvent");DvtPanZoomEvent.TYPE="dvtPanZoom";DvtPanZoomEvent.SUBTYPE_PAN_START="dvtPanStartEvent";DvtPanZoomEvent.SUBTYPE_PAN_MOVE="dvtPanMoveEvent";DvtPanZoomEvent.SUBTYPE_PAN_END="dvtPanEndEvent";DvtPanZoomEvent.SUBTYPE_ZOOM="dvtZoomEvent";DvtPanZoomEvent.SUBTYPE_PINCH_START="dvtPinchStartEvent";DvtPanZoomEvent.SUBTYPE_PINCH_MOVE="dvtPinchMoveEvent";DvtPanZoomEvent.SUBTYPE_PINCH_END="dvtPinchEndEvent";
DvtPanZoomEvent.prototype.getSubtype=function(){return this.subtype};var DvtBaseScroller=function(a,b,c,d){this.Init(a,b,c,d)};DvtObj.createSubclass(DvtBaseScroller,DvtContainer,"DvtBaseScroller");DvtBaseScroller.TYPE_DISABLED=0;DvtBaseScroller.TYPE_ENABLED=1;DvtBaseScroller.TYPE_ACTIVE=2;DvtBaseScroller.SYMBOL_WIDTH=11;DvtBaseScroller.SYMBOL_HEIGHT=5;DvtBaseScroller.BUTTON_CORNER_RADIUS=0;DvtBaseScroller.UP_BORDER_COLOR="#858585";DvtBaseScroller.UP_FILL_COLOR="#FFFFFF";
DvtBaseScroller.OVER_BORDER_COLOR="#7BA0D9";DvtBaseScroller.OVER_FILL_COLORS=["#BFD8FB","#FFFFFF"];DvtBaseScroller.OVER_FILL_ALPHAS=[100,100];DvtBaseScroller.OVER_FILL_RATIOS=[0,255];DvtBaseScroller.DOWN_BORDER_COLOR="#69849E";DvtBaseScroller.DOWN_FILL_COLORS=["#ACB9CA","#7488A5"];DvtBaseScroller.DOWN_FILL_ALPHAS=[100,100];DvtBaseScroller.DOWN_FILL_RATIOS=[0,255];DvtBaseScroller.SYMBOL_BORDER_COLOR_UP="#46566C";DvtBaseScroller.SYMBOL_BORDER_COLOR_OVER="#858585";
DvtBaseScroller.SYMBOL_BORDER_COLOR_DOWN="#858585";DvtBaseScroller.SYMBOL_BORDER_COLOR_DISABLED="#999999";DvtBaseScroller.SYMBOL_FILL_COLOR_UP="#625D5D";DvtBaseScroller.SYMBOL_FILL_COLOR_OVER="#46566C";DvtBaseScroller.SYMBOL_FILL_COLOR_DOWN="#FFFFFF";DvtBaseScroller.SYMBOL_FILL_COLOR_UP_DISABLED="#999999";
DvtBaseScroller.prototype.Init=function(a,b,c,d){this._context=a;d=(new DvtContainer(a,"legendScroller_"+d)).getImpl();DvtBaseScroller.superclass.Init.call(this,a,d.getId());this._width=b;this._height=c;DvtAgent.isTouchDevice()&&(a=this._createTouchArea(),this.addChild(a));this.drawUpState()};DvtBaseScroller.prototype.addMouseEventHandlers=function(){this.addEvtListener(DvtMouseEvent.MOUSEOUT,this.mouseOutHandler,!1,this);this.addEvtListener(DvtMouseEvent.MOUSEOVER,this.mouseOverHandler,!1,this)};
DvtBaseScroller.prototype.mouseOverHandler=function(a){this._upStateType==DvtBaseScroller.TYPE_ENABLED&&this.drawOverState()};DvtBaseScroller.prototype.mouseOutHandler=function(a){this._upStateType==DvtBaseScroller.TYPE_ENABLED&&this.drawUpState()};DvtBaseScroller.prototype.drawUpState=function(){return this._upStateType==DvtBaseScroller.TYPE_ENABLED?this.drawEnabledState():this._upStateType==DvtBaseScroller.TYPE_ACTIVE?this.drawActiveState():this.drawDisabledState()};
DvtBaseScroller.prototype.drawEnabledState=function(){this._upStateType!==DvtBaseScroller.TYPE_DISABLED&&(this._button||(this._button=this._drawButtonShape(),this.addChild(this._button)),this._upButton||(this._upButton=this._drawUpButtonShape(),this.addChild(this._upButton)),this._pointer||(this._pointer=this._drawSymbol(),this.addChild(this._pointer)));this._button.setAlpha(.001);this._upButton.setAlpha(1);this._button.setInvisibleFill();var a=new DvtSolidStroke(DvtBaseScroller.UP_BORDER_COLOR,1);
this._upButton.setStroke(a);var a=new DvtSolidStroke(DvtBaseScroller.SYMBOL_BORDER_COLOR_UP,1),b=new DvtSolidFill(DvtBaseScroller.SYMBOL_FILL_COLOR_UP,1);this._pointer.setFill(b);this._pointer.setStroke(a)};
DvtBaseScroller.prototype.drawActiveState=function(){if(this._upStateType!==DvtBaseScroller.TYPE_DISABLED){this._button||(this._button=this._drawButtonShape(),this.addChild(this._button));this._upButton||(this._upButton=this._drawUpButtonShape(),this.addChild(this._upButton));this._pointer||(this._pointer=this._drawSymbol(),this.addChild(this._pointer));this._upButton.setAlpha(.001);this._button.setAlpha(1);var a=new DvtSolidStroke(DvtBaseScroller.UP_BORDER_COLOR,1),b=new DvtSolidFill(DvtBaseScroller.UP_FILL_COLOR,
1);this._button.setStroke(a);this._button.setFill(b);a=new DvtSolidStroke(DvtBaseScroller.SYMBOL_BORDER_COLOR_UP,1);b=new DvtSolidFill(DvtBaseScroller.SYMBOL_FILL_COLOR_UP,1);this._pointer.setFill(b);this._pointer.setStroke(a)}};
DvtBaseScroller.prototype.drawDisabledState=function(){this._button||(this._button=this._drawButtonShape(),this.addChild(this._button));this._upButton||(this._upButton=this._drawUpButtonShape(),this.addChild(this._upButton));this._pointer||(this._pointer=this._drawSymbol(),this.addChild(this._pointer));this._button.setAlpha(.001);this._upButton.setAlpha(1);var a=new DvtSolidStroke(DvtBaseScroller.SYMBOL_FILL_COLOR_UP_DISABLED,1);this._upButton.setStroke(a);var a=new DvtSolidStroke(DvtBaseScroller.SYMBOL_BORDER_COLOR_DISABLED,
1),b=new DvtSolidFill(DvtBaseScroller.SYMBOL_FILL_COLOR_UP_DISABLED,1);this._pointer.setFill(b);this._pointer.setStroke(a)};
DvtBaseScroller.prototype.drawOverState=function(){if(this._upStateType!==DvtBaseScroller.TYPE_DISABLED){this._button||(this._button=this._drawButtonShape(),this.addChild(this._button));this._upButton||(this._upButton=this._drawUpButtonShape(),this.addChild(this._upButton));this._pointer||(this._pointer=this._drawSymbol(),this.addChild(this._pointer));this._upButton.setAlpha(.001);this._button.setAlpha(1);var a=new DvtLinearGradientFill(90,DvtBaseScroller.OVER_FILL_COLORS),b=new DvtSolidStroke(DvtBaseScroller.OVER_BORDER_COLOR,
1);this._button.setFill(a);this._button.setStroke(b);a=new DvtSolidStroke(DvtBaseScroller.SYMBOL_BORDER_COLOR_OVER,1);b=new DvtSolidFill(DvtBaseScroller.SYMBOL_FILL_COLOR_OVER,1);this._pointer.setFill(b);this._pointer.setStroke(a)}};DvtBaseScroller.prototype.init=function(){};DvtBaseScroller.prototype._drawSymbol=function(){};DvtBaseScroller.prototype._drawUpButtonShape=function(){};
DvtBaseScroller.prototype._drawButtonShape=function(){var a=DvtPathUtils.moveTo(DvtBaseScroller.BUTTON_CORNER_RADIUS,0)+DvtPathUtils.lineTo(this._width-DvtBaseScroller.BUTTON_CORNER_RADIUS,0)+DvtPathUtils.quadTo(this._width,0,this._width,DvtBaseScroller.BUTTON_CORNER_RADIUS)+DvtPathUtils.lineTo(this._width,DvtBaseScroller.BUTTON_CORNER_RADIUS)+DvtPathUtils.lineTo(this._width,this._height-DvtBaseScroller.BUTTON_CORNER_RADIUS)+DvtPathUtils.quadTo(this._width,this._height,this._width-DvtBaseScroller.BUTTON_CORNER_RADIUS,
this._height)+DvtPathUtils.lineTo(this._width-DvtBaseScroller.BUTTON_CORNER_RADIUS,this._height)+DvtPathUtils.lineTo(DvtBaseScroller.BUTTON_CORNER_RADIUS,this._height)+DvtPathUtils.quadTo(0,this._height,0,this._height-DvtBaseScroller.BUTTON_CORNER_RADIUS)+DvtPathUtils.lineTo(0,this._height-DvtBaseScroller.BUTTON_CORNER_RADIUS)+DvtPathUtils.lineTo(0,DvtBaseScroller.BUTTON_CORNER_RADIUS)+DvtPathUtils.quadTo(0,0,DvtBaseScroller.BUTTON_CORNER_RADIUS,0)+DvtPathUtils.lineTo(DvtBaseScroller.BUTTON_CORNER_RADIUS,
0);DvtPathUtils.closePath();a=new DvtPath(this._context,a);a.setCursor(DvtSelectionEffectUtils.getSelectingCursor());a.setPixelHinting(!0);return a};DvtBaseScroller.prototype.setUpStateType=function(a){this._upStateType=a;a==DvtBaseScroller.TYPE_DISABLED?this.drawDisabledState():this.drawUpState()};var DvtUpScroller=function(a,b,c,d){DvtUpScroller.superclass.Init.call(this,a,b,c,d)};DvtObj.createSubclass(DvtUpScroller,DvtBaseScroller,"DvtUpScroller");
DvtUpScroller.prototype._drawSymbol=function(){var a=this._width/2-DvtBaseScroller.SYMBOL_WIDTH/2,b=this._height/2-DvtBaseScroller.SYMBOL_HEIGHT/2,a=DvtPathUtils.moveTo(a+DvtBaseScroller.SYMBOL_WIDTH/2,b)+DvtPathUtils.lineTo(a+DvtBaseScroller.SYMBOL_WIDTH,b+DvtBaseScroller.SYMBOL_HEIGHT)+DvtPathUtils.lineTo(a,b+DvtBaseScroller.SYMBOL_HEIGHT)+DvtPathUtils.lineTo(a+DvtBaseScroller.SYMBOL_WIDTH/2,b);DvtPathUtils.closePath();a=new DvtPath(this._context,a);b=new DvtSolidFill("rgb(193, 194, 211)",1);a.setFill(b);
this._pointer=a;a.setCursor(DvtSelectionEffectUtils.getSelectingCursor());return a};DvtUpScroller.prototype._drawUpButtonShape=function(){var a=DvtPathUtils.moveTo(0,this._height)+DvtPathUtils.lineTo(this._width,this._height)+DvtPathUtils.moveTo(0,0);DvtPathUtils.closePath();var a=new DvtPath(this._context,a),b=new DvtSolidFill("rgb(19, 180, 200)",1);a.setFill(b);b=new DvtSolidStroke("rgb(19, 180, 200)",1);a.setStroke(b);a.setPixelHinting(!0);return a};
DvtUpScroller.prototype._createTouchArea=function(){var a=new DvtRect(this._context,0,-15,this._width,this._height+15);a.setInvisibleFill();return a};var DvtDownScroller=function(a,b,c,d){DvtDownScroller.superclass.Init.call(this,a,b,c,d)};DvtObj.createSubclass(DvtDownScroller,DvtBaseScroller,"DvtDownScroller");
DvtDownScroller.prototype._drawSymbol=function(){var a=this._width/2-DvtBaseScroller.SYMBOL_WIDTH/2,b=this._height/2-DvtBaseScroller.SYMBOL_HEIGHT/2,a=DvtPathUtils.moveTo(a,b)+DvtPathUtils.lineTo(a+DvtBaseScroller.SYMBOL_WIDTH,b)+DvtPathUtils.lineTo(a+DvtBaseScroller.SYMBOL_WIDTH/2,b+DvtBaseScroller.SYMBOL_HEIGHT)+DvtPathUtils.lineTo(a,b);DvtPathUtils.closePath();a=new DvtPath(this._context,a);b=new DvtSolidFill("rgb(193, 194, 211)",1);a.setFill(b);this._pointer=a;a.setCursor(DvtSelectionEffectUtils.getSelectingCursor());
return a};DvtDownScroller.prototype._drawUpButtonShape=function(){var a=DvtPathUtils.moveTo(0,0)+DvtPathUtils.lineTo(this._width,0)+DvtPathUtils.moveTo(0,0);DvtPathUtils.closePath();var a=new DvtPath(this._context,a),b=new DvtSolidFill("rgb(19, 180, 200)",1);a.setFill(b);b=new DvtSolidStroke("rgb(19, 180, 200)",1);a.setStroke(b);a.setPixelHinting(!0);return a};
DvtDownScroller.prototype._createTouchArea=function(){var a=new DvtRect(this._context,0,0,this._width,this._height+15);a.setInvisibleFill();return a};var DvtScrollableLegend=function(a,b,c,d,e,f,g,h){this.Init(a,b,c,d,e,f,g,h)};DvtObj.createSubclass(DvtScrollableLegend,DvtRect,"DvtScrollableLegend");DvtScrollableLegend.VERTICAL_GAP=4;DvtScrollableLegend.SCROLLER_HEIGHT=10;DvtScrollableLegend.HORIZONTAL_SCROLLER_PADDING=2;DvtScrollableLegend.VERTICAL_SCROLLER_PADDING=2;
DvtScrollableLegend.SCROLL_ACCELERATION_PER_SECOND=7;DvtScrollableLegend.MAX_SCROLL_VELOCITY_PER_SECOND=30;DvtScrollableLegend._TEST_ID_THIS=0;DvtScrollableLegend._TEST_ID_SCROLL_BUTTON_TOP=1;DvtScrollableLegend._TEST_ID_SCROLL_BUTTON_BOTTOM=2;
DvtScrollableLegend.prototype.Init=function(a,b,c,d,e,f,g,h){this._context=a;var k=(new DvtRect(a,b,c,d,e,"scrollableLegend")).getImpl();DvtScrollableLegend.superclass.Init.call(this,a,b,c,d,e,k.getId());this._width=d;this._height=e;this._x=b;this._y=c;this._legendHeight=f;this._overlay=this._legendHandle=this._bottomScroller=this._topScroller=null;this._legendViewableHeight=this._legendItemSpace=this._legendHandleMinY=this._legendHandleMaxY=0;this._peers=[];this._topScroller=new DvtUpScroller(a,
this._width-2*DvtScrollableLegend.HORIZONTAL_SCROLLER_PADDING,DvtScrollableLegend.SCROLLER_HEIGHT,"top");this._topScroller.setTranslateX(b+DvtScrollableLegend.HORIZONTAL_SCROLLER_PADDING);this._topScroller.setTranslateY(c+DvtScrollableLegend.VERTICAL_GAP);this.addChild(this._topScroller);this._bottomScroller=new DvtDownScroller(a,this._width-2*DvtScrollableLegend.HORIZONTAL_SCROLLER_PADDING,DvtScrollableLegend.SCROLLER_HEIGHT,"bottom");this._bottomScroller.setTranslateX(b+DvtScrollableLegend.HORIZONTAL_SCROLLER_PADDING);
this._bottomScroller.setTranslateY(c+e-DvtScrollableLegend.SCROLLER_HEIGHT-DvtScrollableLegend.VERTICAL_GAP);this.addChild(this._bottomScroller);this._maskTopY=c+DvtScrollableLegend.SCROLLER_HEIGHT+DvtScrollableLegend.VERTICAL_SCROLLER_PADDING+DvtScrollableLegend.VERTICAL_GAP;this._maskBottomY=c+e-DvtScrollableLegend.SCROLLER_HEIGHT-DvtScrollableLegend.VERTICAL_SCROLLER_PADDING-DvtScrollableLegend.VERTICAL_GAP;this._legendViewableHeight=this._maskBottomY-this._maskTopY;this._bottomScrollTimer=new DvtTimer(a,
50,this.scrollDown,this);this._topScrollTimer=new DvtTimer(a,50,this.scrollUp,this);this._handle=g;DvtAgent.isTouchDevice()?this._handle&&(this._handle.addEvtListener(DvtTouchEvent.TOUCHSTART,this._touchHandler,!1,this),this._handle.addEvtListener(DvtTouchEvent.TOUCHMOVE,this._touchHandler,!1,this),this._handle.addEvtListener(DvtTouchEvent.TOUCHEND,this._touchHandler,!1,this),this._topScroller.addEvtListener(DvtTouchEvent.TOUCHSTART,this._touchTopHandler,!1,this),this._topScroller.addEvtListener(DvtTouchEvent.TOUCHMOVE,
this._touchTopHandler,!1,this),this._topScroller.addEvtListener(DvtTouchEvent.TOUCHEND,this._touchTopHandler,!1,this),this._bottomScroller.addEvtListener(DvtTouchEvent.TOUCHSTART,this._touchBottomHandler,!1,this),this._bottomScroller.addEvtListener(DvtTouchEvent.TOUCHMOVE,this._touchBottomHandler,!1,this),this._bottomScroller.addEvtListener(DvtTouchEvent.TOUCHEND,this._touchBottomHandler,!1,this)):(this._topScroller.addMouseEventHandlers(),this._bottomScroller.addMouseEventHandlers(),this._topScroller.addEvtListener(DvtMouseEvent.MOUSEDOWN,
this.onStartTopScroller,!1,this),this._topScroller.addEvtListener(DvtMouseEvent.MOUSEUP,this.onStopTopScroller,!1,this),this._topScroller.addEvtListener(DvtMouseEvent.CLICK,this.onClickTopScroller,!1,this),this._bottomScroller.addEvtListener(DvtMouseEvent.MOUSEDOWN,this.onStartBottomScroller,!1,this),this._bottomScroller.addEvtListener(DvtMouseEvent.MOUSEUP,this.onStopBottomScroller,!1,this),this._bottomScroller.addEvtListener(DvtMouseEvent.CLICK,this.onClickBottomScroller,!1,this));this._handle&&
(this._handle.moveY(this._maskTopY-this._y),this._topScroller.setUpStateType(DvtBaseScroller.TYPE_DISABLED),this._bottomScroller.setUpStateType(DvtBaseScroller.TYPE_ENABLED),this._legendHandleMaxY=this._handle._y,this._legendHandleMinY=this._legendHandleMaxY-this._legendHeight+(this._maskBottomY-this._maskTopY),this._handle.setClipRect(new DvtRectangle(this._x,this._maskTopY,this._width,this._maskBottomY-this._maskTopY)));this._legendItemSpace=this._legendHeight/(0==h?1:h)};
DvtScrollableLegend.prototype.__registerObject=function(a){this._peers.push(a)};DvtScrollableLegend.prototype.processCategoryRollover=function(a){a=a.getCategory();a=a[0]?a[0]:a;for(var b=0;b<this._peers.length;b++){var c=this._peers[b];if(c&&c.getCategories&&-1<DvtArrayUtils.getIndex(c.getCategories(),a)){this.scrollIntoView(b);break}}};
DvtScrollableLegend.prototype.scrollLegend=function(a){0!=a&&(this._handle.moveY(a),this.isTopScrollerDisabled()?this._topScroller.setUpStateType(DvtBaseScroller.TYPE_DISABLED):this._topScroller.setUpStateType(DvtBaseScroller.TYPE_ENABLED),this.isBottomScrollerDisabled()?this._bottomScroller.setUpStateType(DvtBaseScroller.TYPE_DISABLED):this._bottomScroller.setUpStateType(DvtBaseScroller.TYPE_ENABLED))};
DvtScrollableLegend.prototype.onStartTopScroller=function(a){this.processStartTopScroller();a&&a.preventDefault()};DvtScrollableLegend.prototype.processStartTopScroller=function(){DvtAgent.isTouchDevice()||this._topScroller.drawActiveState();this._currTime=this._prevTime=(new Date).getTime();this._velocity=0;this._topScrollTimer.start()};DvtScrollableLegend.prototype.onStopTopScroller=function(a){this.processStopTopScroller();a&&a.preventDefault()};
DvtScrollableLegend.prototype.processStopTopScroller=function(){DvtAgent.isTouchDevice()?this._topScroller.drawUpState():this._topScroller.drawOverState();this._topScrollTimer.stop()};DvtScrollableLegend.prototype.onClickTopScroller=function(a){this.processClickTopScroller();a&&a.preventDefault()};DvtScrollableLegend.prototype.processClickTopScroller=function(){var a=this._legendHandleMaxY-this._handle._y;a>this._legendItemSpace?this.scrollLegend(this._legendItemSpace):this.scrollLegend(a);this.onStopTopScroller(null)};
DvtScrollableLegend.prototype.onStartBottomScroller=function(a){this.processStartBottomScroller();a&&a.preventDefault()};DvtScrollableLegend.prototype.processStartBottomScroller=function(){DvtAgent.isTouchDevice()||this._bottomScroller.drawActiveState();this._currTime=this._prevTime=(new Date).getTime();this._velocity=0;this._bottomScrollTimer.start()};DvtScrollableLegend.prototype.onStopBottomScroller=function(a){this.processStopBottomScroller();a&&a.preventDefault()};
DvtScrollableLegend.prototype.processStopBottomScroller=function(){DvtAgent.isTouchDevice()?this._bottomScroller.drawUpState():this._bottomScroller.drawOverState();this._bottomScrollTimer.stop()};DvtScrollableLegend.prototype.onClickBottomScroller=function(a){this.processClickBottomScroller();a&&a.preventDefault()};
DvtScrollableLegend.prototype.processClickBottomScroller=function(){var a=this._legendHandleMinY-this._handle._y;Math.abs(a)>this._legendItemSpace?this.scrollLegend(-this._legendItemSpace):this.scrollLegend(a);this.onStopBottomScroller(null)};
DvtScrollableLegend.prototype.processScrollerStart=function(a){if(a){var b=[];b.push(a);(a=a.getParent())&&b.push(a);for(a=0;a<b.length;a++){var c=b[a];if(c instanceof DvtDownScroller)return this.processStartBottomScroller(),!0;if(c instanceof DvtUpScroller)return this.processStartTopScroller(),!0}}return!1};
DvtScrollableLegend.prototype.processScrollerEnd=function(a){if(a){var b=[];b.push(a);(a=a.getParent())&&b.push(a);for(a=0;a<b.length;a++){var c=b[a];if(c instanceof DvtDownScroller)return this.processStopBottomScroller(),!0;if(c instanceof DvtUpScroller)return this.processStopTopScroller(),!0}}return!1};DvtScrollableLegend.prototype.isTopScrollerDisabled=function(){return this._handle._y>=this._legendHandleMaxY?!0:!1};
DvtScrollableLegend.prototype.isBottomScrollerDisabled=function(){return this._handle._y<=this._legendHandleMinY?!0:!1};
DvtScrollableLegend.prototype.scrollDown=function(){if(this._handle._y>this._legendHandleMinY)this._prevTime=this._currTime,this._currTime=(new Date).getTime(),this._velocity=Math.min(DvtScrollableLegend.MAX_SCROLL_VELOCITY_PER_SECOND,this._velocity+(this._currTime-this._prevTime)/1E3*DvtScrollableLegend.SCROLL_ACCELERATION_PER_SECOND),this.scrollLegend(Math.max(this._legendHandleMinY-this._handle._y,-this._velocity));else this.onStopBottomScroller(null)};
DvtScrollableLegend.prototype.scrollUp=function(){if(this._handle._y<this._legendHandleMaxY)this._prevTime=this._currTime,this._currTime=(new Date).getTime(),this._velocity=Math.min(DvtScrollableLegend.MAX_SCROLL_VELOCITY_PER_SECOND,this._velocity+(this._currTime-this._prevTime)/1E3*DvtScrollableLegend.SCROLL_ACCELERATION_PER_SECOND),this.scrollLegend(Math.min(this._legendHandleMaxY-this._handle._y,this._velocity));else this.onStopTopScroller(null)};
DvtScrollableLegend.prototype.scrollIntoView=function(a){if(!(0>a)){var b=0;a=this._legendHandleMaxY-a*this._legendItemSpace;a<=this._handle._y-this._legendViewableHeight+1?(b=a+this._legendViewableHeight-this._handle._y-this._legendItemSpace,this.scrollLegend(b)):a>this._handle._y&&(b=a-this._handle._y-this._legendItemSpace,this.scrollLegend(b),b=this._legendHandleMaxY-this._handle._y,b>this._legendItemSpace?this.scrollLegend(this._legendItemSpace):this.scrollLegend(b))}};
DvtScrollableLegend.prototype._touchHandler=function(a){this.getTouchManager().processAssociatedTouchDefault(a,this)};DvtScrollableLegend.prototype._touchTopHandler=function(a){this.getTouchManager().processAssociatedTouch(a,this._topScroller,this.OnTouchStartTopScroller,this)};DvtScrollableLegend.prototype._touchBottomHandler=function(a){this.getTouchManager().processAssociatedTouch(a,this._bottomScroller,this.OnTouchStartBottomScroller,this)};
DvtScrollableLegend.prototype.OnTouchStartTopScroller=function(a,b){this.processStartTopScroller();this.getTouchManager().saveProcessedTouch(b.identifier,this._topScroller,this._topScroller,"scrollablelegendtop","scrollablelegendtop",null,this.OnTouchEndTopScroller,this);a.blockTouchHold()};DvtScrollableLegend.prototype.OnTouchEndTopScroller=function(a,b){this.processStopTopScroller()};
DvtScrollableLegend.prototype.OnTouchStartBottomScroller=function(a,b){this.processStartBottomScroller();this.getTouchManager().saveProcessedTouch(b.identifier,this._bottomScroller,this._bottomScroller,"scrollablelegendbottom","scrollablelegendbottom",null,this.OnTouchEndBottomScroller,this);a.blockTouchHold()};DvtScrollableLegend.prototype.OnTouchEndBottomScroller=function(a,b){this.processStopBottomScroller()};
DvtScrollableLegend.prototype.immediateTouchAttempted=function(a,b){var c=this.getTouchManager(),d=b.pageX,e=b.pageY,d=this.getCtx().getRelativePosition(d,e),e=new DvtRectangle(this._x,this._y,this._width,this._height),f=this.localToStage(new DvtPoint(e.x,e.y));e.x=f.x;e.y=f.y;e.containsPoint(d.x,d.y)&&(this._prevTouchY=d.y,c.saveProcessedTouchDefault(b.identifier,this,this,"scrollablelegend","scrollablelegend",this))};
DvtScrollableLegend.prototype.immediateTouchMoved=function(a,b){var c=b.pageX,d=b.pageY,c=this.getCtx().getRelativePosition(c,d).y,d=c-this._prevTouchY;this._handle._y+d<this._legendHandleMinY&&(d=0);this._handle._y+d>this._legendHandleMaxY&&(d=0);this.scrollLegend(d);this._prevTouchY=c;a.preventDefault()};DvtScrollableLegend.prototype.immediateTouchEnded=function(a,b){};
DvtScrollableLegend.prototype.dispatchTestEvent=function(a,b,c){var d;a<=DvtScrollableLegend._TEST_ID_THIS?d=this:a==DvtScrollableLegend._TEST_ID_SCROLL_BUTTON_TOP?d=this._topScroller:a==DvtScrollableLegend._TEST_ID_SCROLL_BUTTON_BOTTOM&&(d=this._bottomScroller);d&&d instanceof DvtDisplayable&&d.dispatchDisplayableEvent(b,c)};DvtScrollableLegend.prototype.getTouchManager=function(){return this._touchManager};DvtScrollableLegend.prototype.setTouchManager=function(a){this._touchManager=a};
var DvtHandle=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtHandle,DvtContainer,"DvtHandle");DvtHandle.prototype.Init=function(a,b,c,d,e){DvtHandle.superclass.Init.call(this,a,b);this.Id=b;this._y=this._x=0;this._boundRect=c;this._clipRect=this._normalizeRect(d);this._clipId=e};DvtHandle.prototype.getId=function(){return this.Id};DvtHandle.prototype.getBoundingPoints=function(){return this._boundRect};DvtHandle.prototype.getClipRect=function(){return this._clipRect};
DvtHandle.prototype.setClipRect=function(a){this._clipRect=this._normalizeRect(a)};DvtHandle.prototype.getX=function(){return this._x};DvtHandle.prototype.getY=function(){return this._y};DvtHandle.prototype.moveX=function(a){this._x+=a;null!=this._boundRect&&(this._boundRect[0]+=a,this._boundRect[2]+=a);var b=this.getTranslateX();this.setTranslateX(b+a)};
DvtHandle.prototype.moveY=function(a){this._y+=a;null!=this._boundRect&&(this._boundRect[1]+=a,this._boundRect[3]+=a);var b=this.getTranslateY();this.setTranslateY(b+a)};DvtHandle.prototype.render=function(){if(this._clipRect){var a=new DvtGraphClipPath(this._clipId);a.addRect(this._clipRect.x,this._clipRect.y,this._clipRect.w,this._clipRect.h);this.setClipPath(a)}};DvtHandle.prototype._normalizeRect=function(a){a&&0>a.w&&(a.w=-a.w,a.x-=a.w);a&&0>a.h&&(a.h=-a.h,a.y-=a.h);return a};
var DvtDnDUtils=function(){};DvtObj.createSubclass(DvtDnDUtils,DvtObj,"DvtDnDUtils");DvtDnDUtils.getDragFeedbackBounds=function(a,b){if(!a)return null;var c=null;if(!(a instanceof Array))c=a.getDimensions(b?b:a.getParent());else if(0<a.length)for(var c=a[0].getDimensions(b?b:a[0].getParent()),d=1;d<a.length;d++){var e=a[d],e=e.getDimensions(b?b:e.getParent());e.x<c.x&&(c.w+=c.x-e.x,c.x=e.x);e.y<c.y&&(c.h+=c.y-e.y,c.y=e.y);e.x+e.w>c.x+c.w&&(c.w=e.x+e.w-c.x);e.y+e.h>c.y+c.h&&(c.h=e.y+e.h-c.y)}return c};
var DvtXmlParser=function(a){this._impl||(this._impl=a.getImplFactory().newParser())};DvtObj.createSubclass(DvtXmlParser,DvtObj,"DvtXmlParser");DvtXmlParser.prototype.parse=function(a){return this._impl&&this._impl.parse?this._impl.parse(a):null};var DvtXmlNode=function(){};DvtObj.createSubclass(DvtXmlNode,DvtObj,"DvtXmlNode");DvtXmlNode.prototype.getAttr=function(a){return null};DvtXmlNode.prototype.getChildNodes=function(){return[]};
DvtXmlNode.prototype.getChild=function(a){var b=this.getChildNodes();return null!=b&&b.length>a?b[a]:null};DvtXmlNode.prototype.getFirstChild=function(){return this.getChild(0)};DvtXmlNode.prototype.getName=function(){return null};DvtXmlNode.prototype.getAttributes=function(){return null};DvtXmlNode.prototype.getAllChildNodes=function(){return[]};DvtXmlNode.prototype.getNodeValue=function(){return null};DvtXmlNode.prototype.getTextContent=function(){return null};
DvtXmlNode.prototype.getElementsByTagName=function(a){return null};var DvtHtmlImplFactory=function(a){this.Init(a)};DvtObj.createSubclass(DvtHtmlImplFactory,DvtImplFactory,"DvtHtmlImplFactory");DvtHtmlImplFactory.prototype.Init=function(a){DvtHtmlImplFactory.superclass.Init.call(this,a)};DvtHtmlImplFactory.prototype.newParser=function(){return DvtAgent.isEnvironmentBrowser()?new DvtDomXmlParser:new DvtJavaXmlParser};DvtHtmlImplFactory.prototype.newTimer=function(){return new DvtHtmlTimer};
DvtHtmlImplFactory.prototype.newContextMenuHandler=function(){return new DvtHtmlContextMenuHandler};DvtHtmlImplFactory.prototype.newTooltipManager=function(a){return new DvtHtmlTooltipManager(this.GetContext(),a)};DvtHtmlImplFactory.prototype.newRichTooltipManager=function(a){return new DvtHtmlRichTooltipManager(this.GetContext(),a)};DvtHtmlImplFactory.prototype.newJsExt=function(){return new DvtSvgJsExt};var DvtHtmlTimer=function(){this.Init()};DvtObj.createSubclass(DvtHtmlTimer,DvtObj,"DvtHtmlTimer");
DvtHtmlTimer.prototype.Init=function(){this._timerId=null};DvtHtmlTimer.prototype.startTimer=function(a,b,c){this._timerId=window.setInterval(function(){b.call(c)},a)};DvtHtmlTimer.prototype.stopTimer=function(){this._timerId&&(window.clearInterval(this._timerId),this._timerId=null)};var DvtHtmlContextMenuHandler=function(){this.Init()};DvtObj.createSubclass(DvtHtmlContextMenuHandler,DvtObj,"DvtHtmlContextMenuHandler");DvtHtmlContextMenuHandler.prototype.Init=function(){};
DvtHtmlContextMenuHandler.prototype.setObj=function(a){this._obj=a};DvtHtmlContextMenuHandler.prototype.prepareMenuItems=function(a,b,c){};DvtHtmlContextMenuHandler.prototype.getMenuEvent=function(a,b,c,d){b=b.getNativeEvent();for(d=0;d<a.length;d++){var e=a[d];if(c==e.getAttr(DvtContextMenuHandler._ATTR_MENU_CONTAINER_TYPE))return a=e.getAttr(DvtContextMenuHandler._ATTR_MENU_CONTAINER_POPUP_ID),new DvtGraphContextMenuEvent(b,a)}return null};var DvtHtmlTooltipManager=function(a,b){this.Init(a,b)};
DvtObj.createSubclass(DvtHtmlTooltipManager,DvtTooltipManager,"DvtHtmlTooltipManager");DvtHtmlTooltipManager._TOOLTIP_DIV_ID="_dvtTooltip";DvtHtmlTooltipManager.SHOW_DELAY=500;DvtHtmlTooltipManager.HIDE_DELAY=5E3;DvtHtmlTooltipManager.TRANSITION_DURATION=250;DvtHtmlTooltipManager.BG_COLOR="#c1ccd7";DvtHtmlTooltipManager.BORDER_COLOR="#9ba2b0";DvtHtmlTooltipManager.FONT_COLOR="#383a47";DvtHtmlTooltipManager.UNSTYLED_POPUP_CLASS="OraDVTUnstyledPopup";DvtHtmlTooltipManager.DATATIP_POPUP_CLASS="OraDVTDatatipPopup";
DvtHtmlTooltipManager.TOOLTIP_POPUP_CLASS="OraDVTTooltipPopup";DvtHtmlTooltipManager.BORDER_BUFFER=2;DvtHtmlTooltipManager.TOOLTIP_ABOVE_OFFSET=10;DvtHtmlTooltipManager.prototype.Init=function(a,b){this._context=a;this._domElementId=b?b:DvtHtmlTooltipManager._TOOLTIP_DIV_ID;this._isTooltip=!0;this._font=null};DvtHtmlTooltipManager.prototype.setFont=function(a){this._font=a};
DvtHtmlTooltipManager.prototype.showDatatip=function(a,b,c,d,e){null==e&&(e=!0);this._isTooltip=!1;this._showTextAtPosition(a,b,c,d,e,DvtHtmlTooltipManager.DATATIP_POPUP_CLASS)};
DvtHtmlTooltipManager.prototype._showTextAtPosition=function(a,b,c,d,e,f){c&&(c=c.replace(/</g,"\x26lt;"),c=c.replace(/>/g,"\x26gt;"),c=c.replace(/&lt;b&gt;/g,"\x3cb\x3e"),c=c.replace(/&lt;\/b&gt;/g,"\x3c/b\x3e"),c=c.replace(/&lt;i&gt;/g,"\x3ci\x3e"),c=c.replace(/&lt;\/i&gt;/g,"\x3c/i\x3e"),c=c.replace(/\n/g,"\x3cbr\x3e"),c=c.replace(/&lt;br&gt;/g,"\x3cbr\x3e"),c=c.replace(/&lt;br\/&gt;/g,"\x3cbr\x3e"),c=c.replace(/ /g,"\x26nbsp;"));f||(f=DvtHtmlTooltipManager.UNSTYLED_POPUP_CLASS);var g=document.createElement("span");
g.style.visibility="inherit";g.style.width=null;g.style.height=null;this._font&&(g.style.fontSize=this._font.size+"px",g.style.color=this._font.color,g.style.fontFamily=this._font.name,this._font.bold&&(g.style.fontWeight="bold"),this._font.italic&&(g.style.fontStyle="italic"),this._font.underline&&(g.style.textDecoration="underline"));g.innerHTML=c;c=this.GetTooltipElem();c.style.borderColor=d;c.className=f;c.style.position="absolute";c.style.zIndex=2147483647;c.innerHTML="";c.appendChild(g);this.PostElement(c,
a,b,!0,e)};DvtHtmlTooltipManager.prototype.PostElement=function(a,b,c,d,e){a.style["pointer-events"]=d?"none":"auto";a.style.width=null;a.style.height=null;e?(d=this._getOffsets(a),this.positionTip(b+d.x,c+d.y,b,c)):this.positionTip(b,c,b,c);a.style.visibility="visible"};
DvtHtmlTooltipManager.prototype.hideTooltip=function(){this.clearTooltip();this._timerIsRunning=this._tooltipDisplayed=!1;var a=document.getElementById(this._domElementId);a&&(a.style.visibility="hidden",a.style.width="0px",a.style.height="0px",DvtAgent.isRightToLeft(this._context)||(a.style.left="0px"),a.style.top="0px")};DvtHtmlTooltipManager.prototype.GetTooltipElem=function(){var a=document.getElementById(this._domElementId);a||(a=this.InitializeTooltipElem());return a};
DvtHtmlTooltipManager.prototype.InitializeTooltipElem=function(){var a=document.createElement("div");a.id=this._domElementId;a.style.visibility="hidden";document.body.appendChild(a);this.InitContent(a);return a};DvtHtmlTooltipManager.prototype.InitContent=function(a){};
DvtHtmlTooltipManager.prototype.showTooltip=function(a,b,c,d,e,f){c&&0!=c.length&&(this._shape=d,this._x=a,this._y=b,this._text=c,this._trackMouse=e,this._timerIsRunning||(a=document.createElement("span"),a.className="OraDVTTooltipText",a.innerHTML=c,a.style.color=DvtHtmlTooltipManager.FONT_COLOR,f||(f=DvtHtmlTooltipManager.BORDER_COLOR),this.GetTooltipElem().style.borderColor=f,DvtAgent.isTouchDevice()||this._tooltipDisplayed&&this._trackMouse?this._displayTooltip(this._x,this._y,this._text,this._borderColor):
(this._timerIsRunning=!0,this._showTimerId=window.setTimeout(DvtObj.createCallback(this,this._handleShowTimer),DvtHtmlTooltipManager.SHOW_DELAY))))};DvtHtmlTooltipManager.prototype.clearTooltip=function(){this._showTimerId&&(window.clearTimeout(this._showTimerId),this._shape=this._trackMouse=this._text=this._y=this._x=this._showTimerId=void 0);this._hideTimerId&&(window.clearTimeout(this._hideTimerId),this._hideTimerId=void 0)};
DvtHtmlTooltipManager.prototype._handleShowTimer=function(a){this._timerIsRunning=!1;this._displayTooltip(this._x,this._y,this._text,this._borderColor);this._tooltipDisplayed=!0};DvtHtmlTooltipManager.prototype._displayTooltip=function(a,b,c,d){this._isTooltip=!0;this._showTextAtPosition(a,b,c,d,!0,DvtHtmlTooltipManager.TOOLTIP_POPUP_CLASS)};
DvtHtmlTooltipManager.prototype._getOffsets=function(a){a=this.getTooltipBounds(a);if(DvtAgent.isTouchDevice())return new DvtPoint(0-a.w/2,-30-a.h);var b=-12-a.h,c=12;this._isTooltip&&(b=22,c=0);DvtAgent.isRightToLeft(this._context)&&(c=-c-a.w);return new DvtPoint(c,b)};DvtHtmlTooltipManager.prototype.getTooltipBounds=function(){var a=this.GetTooltipElem();a.style.height="auto";return new DvtRectangle(parseInt(a.style.left),parseInt(a.style.top),a.offsetWidth,a.offsetHeight)};
DvtHtmlTooltipManager.prototype.positionTip=function(a,b){var c=this.GetTooltipElem(),d=this.getTooltipBounds(),e=d.w,d=d.h,f=new DvtRectangle(window.pageXOffset+DvtHtmlTooltipManager.BORDER_BUFFER,window.pageYOffset+DvtHtmlTooltipManager.BORDER_BUFFER,window.innerWidth-2*DvtHtmlTooltipManager.BORDER_BUFFER,window.innerHeight-2*DvtHtmlTooltipManager.BORDER_BUFFER),g=a;a+e>f.x+f.w?g=f.x+f.w-e:a<f.x&&(g=f.x);e=b;b<f.y?e=f.y:b+d>f.y+f.h&&(e=f.y+f.h-d);c.style.left=g+"px";c.style.top=e+"px"};
var DvtHtmlKeyboardListenerUtils=function(){};DvtObj.createSubclass(DvtHtmlKeyboardListenerUtils,DvtObj,"DvtHtmlKeyboardListenerUtils");DvtHtmlKeyboardListenerUtils.ATTR_IGNORE_EVENTS_FROM_TARGET="_dvtIgnoreEventsFromTarget";DvtHtmlKeyboardListenerUtils.getListener=function(a){return a?DvtHtmlKeyboardListenerUtils._captureListener:DvtHtmlKeyboardListenerUtils._bubbleListener};
DvtHtmlKeyboardListenerUtils._bubbleListener=function(a){if(!DvtHtmlKeyboardListenerUtils._checkIgnoreTarget(a)&&this._obj&&this._obj instanceof Array){var b,c,d,e=this._obj.length;for(b=0;b<e;b++)c=this._obj[b],d=DvtSvgEventFactory.newEvent(a,c.getObj().getCtx()),c.getObj().FireListener(d,!1)}};
DvtHtmlKeyboardListenerUtils._captureListener=function(a){if(!DvtHtmlKeyboardListenerUtils._checkIgnoreTarget(a)&&this._obj&&this._obj instanceof Array){var b,c,d,e=this._obj.length;for(b=0;b<e;b++)c=this._obj[b],d=DvtSvgEventFactory.newEvent(a,c.getObj().getCtx()),c.getObj().FireListener(d,!0)}};DvtHtmlKeyboardListenerUtils._checkIgnoreTarget=function(a){return a&&a.target&&a.target[DvtHtmlKeyboardListenerUtils.ATTR_IGNORE_EVENTS_FROM_TARGET]?!0:!1};var DvtDomXmlParser=function(){this._parser=new DOMParser};
DvtObj.createSubclass(DvtDomXmlParser,DvtObj,"DvtDomXmlParser");DvtDomXmlParser.prototype.parse=function(a){a=this._parser.parseFromString(a,"text/xml").documentElement;return new DvtDomXmlNode(a)};var DvtDomXmlNode=function(a){this._node=a};DvtObj.createSubclass(DvtDomXmlNode,DvtXmlNode,"DvtDomXmlNode");DvtDomXmlNode.prototype.getAttr=function(a){return this._node.getAttribute(a)};
DvtDomXmlNode.prototype.getChildNodes=function(){for(var a=[],b=this._node.firstChild;null!=b;)1==b.nodeType&&a.push(new DvtDomXmlNode(b)),b=b.nextSibling;return a};DvtDomXmlNode.prototype.getName=function(){return this._node.nodeName};DvtDomXmlNode.prototype.getAttributes=function(){for(var a=[],b=this._node.attributes.length,c=0;c<b;c++){var d=this._node.attributes[c];d.name&&"undefined"!=typeof d.value&&null!=d.value&&a.push({name:d.name,value:d.value})}return a};
DvtDomXmlNode.prototype.getAllChildNodes=function(){for(var a=[],b=this._node.firstChild;null!=b;)a.push(new DvtDomXmlNode(b)),b=b.nextSibling;return a};DvtDomXmlNode.prototype.getNodeValue=function(){return this._node.nodeValue};DvtDomXmlNode.prototype.getTextContent=function(){return this._node.textContent};DvtDomXmlNode.prototype.getElementsByTagName=function(a){var b=[];if(a=this._node.getElementsByTagName(a))for(var c=0;c<a.length;c++)b.push(new DvtDomXmlNode(a[c]));return b};
var DvtDocumentUtils=function(){};DvtObj.createSubclass(DvtDocumentUtils,DvtObj,"DvtDocumentUtils");DvtDocumentUtils.elementFromTouch=function(a){return null};var DvtGraphSelectionEvent=function(a){this.Init(a)};DvtObj.createSubclass(DvtGraphSelectionEvent,DvtBaseComponentEvent,"DvtGraphSelectionEvent");DvtGraphSelectionEvent.TYPE="selection";DvtGraphSelectionEvent.prototype.Init=function(a){DvtGraphSelectionEvent.superclass.Init.call(this,DvtGraphSelectionEvent.TYPE);this._selection=a};
DvtGraphSelectionEvent.prototype.getSelection=function(){return this._selection};var DvtValueChangeEvent=function(a,b,c){this.Init(!1===c?DvtValueChangeEvent.TYPE_INPUT:DvtValueChangeEvent.TYPE);this._oldValue=a;this._newValue=b};DvtObj.createSubclass(DvtValueChangeEvent,DvtBaseComponentEvent,"DvtValueChangeEvent");DvtValueChangeEvent.TYPE="valueChange";DvtValueChangeEvent.TYPE_INPUT="valueChangeInput";DvtValueChangeEvent.prototype.getOldValue=function(){return this._oldValue};
DvtValueChangeEvent.prototype.getNewValue=function(){return this._newValue};var DvtGraphShowPopupEvent=function(a,b,c){this.Init(DvtGraphShowPopupEvent.TYPE);this._showPopupBehavior=a;this._launcherBounds=b;this._launcherId=c};DvtObj.createSubclass(DvtGraphShowPopupEvent,DvtBaseComponentEvent,"DvtGraphShowPopupEvent");DvtGraphShowPopupEvent.TYPE="showPopup";DvtGraphShowPopupEvent.prototype.getShowPopupBehavior=function(){return this._showPopupBehavior};
DvtGraphShowPopupEvent.prototype.getLauncherBounds=function(){return this._launcherBounds};DvtGraphShowPopupEvent.prototype.getLauncherId=function(){return this._launcherId};DvtGraphShowPopupEvent.prototype.setLauncherId=function(a){this._launcherId=a};var DvtGraphHidePopupEvent=function(a){this.Init(DvtGraphHidePopupEvent.TYPE);this._popupId=a};DvtObj.createSubclass(DvtGraphHidePopupEvent,DvtBaseComponentEvent,"DvtGraphHidePopupEvent");DvtGraphHidePopupEvent.TYPE="hidePopup";
DvtGraphHidePopupEvent.prototype.getPopupId=function(){return this._popupId};var DvtClientBehaviorEvent=function(a){this.Init(DvtClientBehaviorEvent.TYPE);this._clientBehavior=a};DvtObj.createSubclass(DvtClientBehaviorEvent,DvtBaseComponentEvent,"DvtClientBehaviorEvent");DvtClientBehaviorEvent.TYPE="clientBehavior";DvtClientBehaviorEvent.prototype.getClientBehavior=function(){return this._clientBehavior};
var DvtComponentUIEvent=function(a,b){DvtComponentUIEvent.superclass.Init.call(this,a);this.params=b?b:{}};DvtObj.createSubclass(DvtComponentUIEvent,DvtBaseComponentEvent,"DvtComponentUIEvent");DvtComponentUIEvent.TYPE_CLICK="click";DvtComponentUIEvent.TYPE_ROLL_OUT="rollOut";DvtComponentUIEvent.TYPE_ROLL_OVER="rollOver";var DvtGraphContextMenuEvent=function(a,b){this.Init(DvtGraphContextMenuEvent.TYPE);this._nativeEvent=a;this._menuId=b};
DvtObj.createSubclass(DvtGraphContextMenuEvent,DvtBaseComponentEvent,"DvtGraphContextMenuEvent");DvtGraphContextMenuEvent.TYPE="contextMenu";DvtGraphContextMenuEvent.prototype.getNativeEvent=function(){return this._nativeEvent};DvtGraphContextMenuEvent.prototype.getMenuId=function(){return this._menuId};var DvtGraphContextMenuSelectEvent=function(a,b,c,d){this.Init(DvtGraphContextMenuSelectEvent.TYPE);this._menuType=a;this._clientId=b;this._destination=c;this._targetFrame=d};
DvtObj.createSubclass(DvtGraphContextMenuSelectEvent,DvtBaseComponentEvent,"DvtGraphContextMenuSelectEvent");DvtGraphContextMenuSelectEvent.TYPE="contextMenuSelect";DvtGraphContextMenuSelectEvent.prototype.getMenuType=function(){return this._menuType};DvtGraphContextMenuSelectEvent.prototype.getClientId=function(){return this._clientId};DvtGraphContextMenuSelectEvent.prototype.getDestination=function(){return this._destination};DvtGraphContextMenuSelectEvent.prototype.getTargetFrame=function(){return this._targetFrame};
var DvtDrillReplaceEvent=function(a){this.Init(DvtDrillReplaceEvent.TYPE);this._id=a};DvtObj.createSubclass(DvtDrillReplaceEvent,DvtBaseComponentEvent,"DvtDrillReplaceEvent");DvtDrillReplaceEvent.TYPE="drillReplace";DvtDrillReplaceEvent.prototype.getId=function(){return this._id};var DvtCategoryRolloverEvent=function(a,b){this.Init(a);this._category=b};DvtObj.createSubclass(DvtCategoryRolloverEvent,DvtBaseComponentEvent,"DvtCategoryRolloverEvent");DvtCategoryRolloverEvent.TYPE_OVER="categoryRollOver";
DvtCategoryRolloverEvent.TYPE_OUT="categoryRollOut";DvtCategoryRolloverEvent.prototype.getCategory=function(){return this._category};var DvtCategoryHideShowEvent=function(a,b){this.Init(a);this._category=b};DvtObj.createSubclass(DvtCategoryHideShowEvent,DvtBaseComponentEvent,"DvtCategoryHideShowEvent");DvtCategoryHideShowEvent.TYPE_HIDE="hideCategory";DvtCategoryHideShowEvent.TYPE_SHOW="showCategory";DvtCategoryHideShowEvent.prototype.getCategory=function(){return this._category};
var DvtPanEvent=function(a,b,c,d,e,f){this.Init(DvtPanEvent.TYPE);this.type=this.getType();this._subtype=a;this._newX=b;this._newY=c;this._oldX=d;this._oldY=e;this._animator=f};DvtObj.createSubclass(DvtPanEvent,DvtBaseComponentEvent,"DvtPanEvent");DvtPanEvent.TYPE="dvtPan";DvtPanEvent.SUBTYPE_DRAG_PAN_BEGIN="dragPanBegin";DvtPanEvent.SUBTYPE_DRAG_PAN_END="dragPanEnd";DvtPanEvent.SUBTYPE_PANNED="panned";DvtPanEvent.SUBTYPE_PANNING="panning";DvtPanEvent.SUBTYPE_ELASTIC_ANIM_BEGIN="elasticAnimBegin";
DvtPanEvent.SUBTYPE_ELASTIC_ANIM_END="elasticAnimEnd";DvtPanEvent.prototype.getSubType=function(){return this._subtype};DvtPanEvent.prototype.getNewX=function(){return this._newX};DvtPanEvent.prototype.getNewY=function(){return this._newY};DvtPanEvent.prototype.getOldX=function(){return this._oldX};DvtPanEvent.prototype.getOldY=function(){return this._oldY};DvtPanEvent.prototype.getAnimator=function(){return this._animator};
var DvtZoomEvent=function(a,b,c,d,e,f,g,h){this.Init(DvtZoomEvent.TYPE);this.type=this.getType();this._subtype=a;this._newZoom=b;this._oldZoom=c;this._animator=d;this._zoomToFitBounds=e;this._centerPoint=f;this._tx=g;this._ty=h};DvtObj.createSubclass(DvtZoomEvent,DvtBaseComponentEvent,"DvtZoomEvent");DvtZoomEvent.TYPE="dvtZoom";DvtZoomEvent.SUBTYPE_ZOOMED="zoomed";DvtZoomEvent.SUBTYPE_ZOOMING="zooming";DvtZoomEvent.SUBTYPE_ZOOM_END="zoomEnd";DvtZoomEvent.SUBTYPE_DRAG_ZOOM_BEGIN="dragZoomBegin";
DvtZoomEvent.SUBTYPE_DRAG_ZOOM_END="dragZoomEnd";DvtZoomEvent.SUBTYPE_ZOOM_AND_CENTER="zoomAndCenter";DvtZoomEvent.SUBTYPE_ZOOM_TO_FIT_CALC_BOUNDS="zoomToFitCalcBounds";DvtZoomEvent.SUBTYPE_ZOOM_TO_FIT_BEGIN="zoomToFitBegin";DvtZoomEvent.SUBTYPE_ZOOM_TO_FIT_END="zoomToFitEnd";DvtZoomEvent.SUBTYPE_ELASTIC_ANIM_BEGIN="elasticAnimBegin";DvtZoomEvent.SUBTYPE_ELASTIC_ANIM_END="elasticAnimEnd";DvtZoomEvent.SUBTYPE_ADJUST_PAN_CONSTRAINTS="adjustPanConstraints";DvtZoomEvent.prototype.getSubType=function(){return this._subtype};
DvtZoomEvent.prototype.getNewZoom=function(){return this._newZoom};DvtZoomEvent.prototype.getOldZoom=function(){return this._oldZoom};DvtZoomEvent.prototype.getAnimator=function(){return this._animator};DvtZoomEvent.prototype.setZoomToFitBounds=function(a){this._zoomToFitBounds=a};DvtZoomEvent.prototype.getZoomToFitBounds=function(){return this._zoomToFitBounds};DvtZoomEvent.prototype.getCenterPoint=function(){return this._centerPoint};DvtZoomEvent.prototype.getTx=function(){return this._tx};
DvtZoomEvent.prototype.getTy=function(){return this._ty};var DvtGraphActionEvent=function(a,b,c){this.Init(DvtGraphActionEvent.TYPE);this.type=this.getType();this._subtype=a;this._commandId=b;this._clientId=c};DvtObj.createSubclass(DvtGraphActionEvent,DvtBaseComponentEvent,"DvtGraphActionEvent");DvtGraphActionEvent.TYPE="dvtAct";DvtGraphActionEvent.SUBTYPE_ACTION="action";DvtGraphActionEvent.SUBTYPE_SET_ANCHOR="setAnchor";DvtGraphActionEvent.prototype.getSubType=function(){return this._subtype};
DvtGraphActionEvent.prototype.getCommandId=function(){return this._commandId};DvtGraphActionEvent.prototype.getClientId=function(){return this._clientId};DvtGraphActionEvent.prototype.setClientId=function(a){this._clientId=a};var DvtEventDispatcher={};DvtObj.createSubclass(DvtEventDispatcher,DvtObj,"DvtEventDispatcher");DvtEventDispatcher.dispatchEvent=function(a,b,c,d){a&&(a&&a.call?a.call(b,d,c):eval(a+"(event, component)"))};
var DvtIsolateEvent=function(a){this.Init(DvtIsolateEvent.TYPE);this._isolatedRows=a};DvtObj.createSubclass(DvtIsolateEvent,DvtBaseComponentEvent,"DvtIsolateEvent");DvtIsolateEvent.TYPE="isolate";DvtIsolateEvent.prototype.getIsolatedRows=function(){return this._isolatedRows};var DvtLogEvent=function(a,b,c){this.Init(DvtLogEvent.TYPE);this._logType=a;this._level=b;this._message=c};DvtObj.createSubclass(DvtLogEvent,DvtBaseComponentEvent,"DvtLogEvent");DvtLogEvent.TYPE="log";
DvtLogEvent.PERFORMANCE="performance";DvtLogEvent.LOG="log";DvtLogEvent.prototype.getLogType=function(){return this._logType};DvtLogEvent.prototype.getLevel=function(){return this._level};DvtLogEvent.prototype.getMessage=function(){return this._messaage};var DvtSetPropertyEvent=function(){this.Init(DvtSetPropertyEvent.TYPE)};DvtObj.createSubclass(DvtSetPropertyEvent,DvtBaseComponentEvent,"DvtSetPropertyEvent");DvtSetPropertyEvent.TYPE="dvtSetPropertyEvent";
var DvtActiveElementChangeEvent=function(a,b){this.Init(DvtActiveElementChangeEvent.TYPE);this._subtype=a;this._id=b};DvtObj.createSubclass(DvtActiveElementChangeEvent,DvtBaseComponentEvent,"DvtActiveElementChangeEvent");DvtActiveElementChangeEvent.TYPE="activeElementChangeEvent";DvtActiveElementChangeEvent.CHANGE="change";DvtActiveElementChangeEvent.prototype.getId=function(){return this._id};var DvtFlashContext=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtFlashContext,DvtContext,"DvtFlashContext");
var DvtFlashDocumentUtils=function(){};DvtObj.createSubclass(DvtFlashDocumentUtils,DvtDocumentUtils,"DvtFlashDocumentUtils");DvtFlashDocumentUtils.elementFromPoint=function(a,b){if(DvtFlashDocumentUtils.stage){var c=DvtFlashDocumentUtils.stage.getObjectsUnderPoint(DvtFlashDocumentUtils.context.getImplFactory().newPoint(a,b));if(c&&0<c.length)for(c=c[c.length-1];c;){if(c.hasOwnProperty("_obj")&&c._obj&&c.getObj&&c.getObj())return c.getObj();c=c.parent}}return null};
DvtFlashDocumentUtils.getStageRelativePosition=function(a,b,c){a=DvtFlashDocumentUtils.getStageAbsolutePosition(a);return new DvtPoint(b-a.x,c-a.y)};DvtFlashDocumentUtils.getStageAbsolutePosition=function(a){return new DvtPoint(0,0)};DvtFlashDocumentUtils.isFilterSupported=function(a){return!1};DvtFlashDocumentUtils.isStrokeTimeoutRequired=function(){return!1};DvtFlashDocumentUtils.isEventAvailableOutsideClip=function(){return!1};DvtFlashDocumentUtils.isFilterStraightLineAdjustmentNeeded=function(){return!1};
DvtFlashDocumentUtils.cancelDomEvent=function(a){};var DvtSvgContext=function(a,b){this._implFactory=new DvtSvgImplFactory(this);this._defs=this._implFactory.newDefs();this._root=a;DvtSvgUtils.appendChildElem(a,this._defs);this.Init(this._implFactory,a,b);DvtSvgUtils.appendChildElem(a,this._stage.getImpl().getElem());DvtSvgContext._USE_MEASURE_TEXT&&(this._dvtMeasureText=new DvtText(this,"",0,0),this._dvtMeasureText.setMouseEnabled(!1),this._dvtMeasureText.setAlpha(0),this._stage.addChild(this._dvtMeasureText))};
DvtObj.createSubclass(DvtSvgContext,DvtContext,"DvtSvgContext");DvtSvgContext._USE_MEASURE_TEXT=!0;DvtSvgContext.prototype.appendDefs=function(a){DvtSvgUtils.appendChildElem(this._defs,a)};DvtSvgContext.prototype.getDefs=function(){return this._defs};DvtSvgContext.prototype.getImplFactory=function(){return this._implFactory};DvtSvgContext.prototype.removeDefs=function(a){this._defs.removeChild(a)};
DvtSvgContext.prototype.removeDefsById=function(a){for(var b=this._defs.childNodes,c=b.length,d=0;d<c;d++){var e=b[d];if(e.id===a){this._defs.removeChild(e);break}}};DvtSvgContext.prototype.fixBrowserTextRTL=function(){!DvtAgent.isTouchDevice()&&(DvtAgent.isPlatformWebkit()||DvtAgent.isPlatformGecko()&&25<=DvtAgent.getVersion())?DvtSvgUtils.setAttrNullNS(this._root,"text-anchor","end"):DvtSvgUtils.setAttrNullNS(this._root,"text-anchor","start")};
DvtSvgContext.prototype.removeClipPath=function(a){DvtSvgContext.superclass.removeClipPath.call(this,a);this.hasClipPath(a)||this.removeDefsById(a)};DvtSvgContext.prototype.supportsMeasureText=function(){return DvtSvgContext._USE_MEASURE_TEXT&&this._dvtMeasureText?!0:!1};
DvtSvgContext.prototype.measureText=function(a,b,c,d){return this.supportsMeasureText()&&this._dvtMeasureText?(!b||this._lastCssStyle&&this._lastCssStyle.getStyle(DvtCSSStyle.FONT_STYLE)==b.getStyle(DvtCSSStyle.FONT_STYLE)&&this._lastCssStyle.getStyle(DvtCSSStyle.FONT_WEIGHT)==b.getStyle(DvtCSSStyle.FONT_WEIGHT)&&this._lastCssStyle.getStyle(DvtCSSStyle.FONT_SIZE)==b.getStyle(DvtCSSStyle.FONT_SIZE)&&this._lastCssStyle.getStyle(DvtCSSStyle.FONT_FAMILY)==b.getStyle(DvtCSSStyle.FONT_FAMILY)||(this._dvtMeasureText.getImpl().setCSSStyle(b),
this._lastCssStyle=b),c||(c=DvtText.H_ALIGN_DEFAULT),this._lastHorizAlign&&this._lastHorizAlign==c||(this._dvtMeasureText.setHorizAlignment(c),this._lastHorizAlign=c),d||(d=DvtText.V_ALIGN_DEFAULT),this._lastVertAlign&&this._lastVertAlign==d||(this._dvtMeasureText.setVertAlignment(d),this._lastVertAlign=d),this._dvtMeasureText.setTextString(a),this._dvtMeasureText.getDimensions()):null};
DvtSvgContext.resetUniqueSeeds=function(){"undefined"!=typeof DvtAfComponent&&(DvtAfComponent._uniqueSeed=0);DvtSvgFilterUtils._counter=0;DvtGraphClipPath._uniqueSeed=0;DvtSvgShapeUtils._uniqueSeed=0};var DvtSvgUtils={};DvtObj.createSubclass(DvtSvgUtils,DvtObj,"DvtSvgUtils");DvtSvgUtils.SVG_NS="http://www.w3.org/2000/svg";DvtSvgUtils.XLINK_NS="http://www.w3.org/1999/xlink";
DvtSvgUtils.createSvgDocument=function(a){var b=document.createElementNS(DvtSvgUtils.SVG_NS,"svg");DvtSvgUtils.setAttrNullNS(b,"id",a);DvtSvgUtils.setAttrNullNS(b,"width","100%");DvtSvgUtils.setAttrNullNS(b,"height","100%");return b};
DvtSvgUtils.getDragFeedback=function(a,b){a instanceof Array||(a=[a]);var c=DvtDnDUtils.getDragFeedbackBounds(a,b),d=DvtSvgUtils._getDragFeedbackSVG(a,c),e={};e.width=c.w+2*DvtDragSource.DRAG_FEEDBACK_MARGIN;e.height=c.h+2*DvtDragSource.DRAG_FEEDBACK_MARGIN;d&&(e.svg=d);return e};
DvtSvgUtils._getDragFeedbackSVG=function(a,b){var c=DvtSvgUtils.createSvgDocument("dnd"),d="translate("+(DvtDragSource.DRAG_FEEDBACK_MARGIN-b.x)+","+(DvtDragSource.DRAG_FEEDBACK_MARGIN-b.y)+")",e=DvtSvgShapeUtils.createElement("g");DvtSvgUtils.setAttrNullNS(e,"transform",d);DvtSvgUtils.appendChildElem(c,e);for(d=0;d<a.length;d++){var f=a[d],g=f.getImpl().getElem().cloneNode(!0);DvtSvgUtils.getAttrNullNS(g,"filter")&&DvtSvgUtils.setAttrNullNS(g,"filter",null);var h=DvtSvgShapeUtils.createElement("g");
DvtSvgUtils.appendChildElem(e,h);for(var f=f.getPathToStage(),k=null,m=1;m<f.length;m++)k?(k=k.clone(),k.concat(f[m].getMatrix())):k=f[m].getMatrix();k&&(f="matrix("+k.getA()+","+k.getC()+","+k.getB()+","+k.getD()+","+k.getTx()+","+k.getTy()+")",DvtSvgUtils.setAttrNullNS(h,"transform",f));DvtSvgUtils.appendChildElem(h,g)}return c};DvtSvgUtils.addDomEventListener=function(a,b,c,d){a&&a.addEventListener&&a.addEventListener(b,c,d)};
DvtSvgUtils.removeDomEventListener=function(a,b,c,d){a&&a.removeEventListener&&a.removeEventListener(b,c,d)};DvtSvgUtils.appendChildElem=function(a,b){return a.appendChild(b)};DvtSvgUtils.getAttrNS=function(a,b,c){return a.getAttributeNS(b,c)};DvtSvgUtils.getAttrNullNS=function(a,b){return a.getAttributeNS(null,b)};DvtSvgUtils.setAttrNS=function(a,b,c,d){a.setAttributeNS(b,c,d)};DvtSvgUtils.setAttrNullNS=function(a,b,c){a.setAttributeNS(null,b,c)};
DvtSvgUtils.removeAttrNS=function(a,b,c){a.removeAttributeNS(b,c)};DvtSvgUtils.removeAttrNullNS=function(a,b){DvtSvgUtils.removeAttrNS(a,null,b)};var DvtUtilBundle=function(){};DvtObj.createSubclass(DvtUtilBundle,DvtBundle,"DvtUtilBundle");
DvtUtilBundle._defaults={SCALING_SUFFIX_THOUSAND:"K",SCALING_SUFFIX_MILLION:"M",SCALING_SUFFIX_BILLION:"B",SCALING_SUFFIX_TRILLION:"T",SCALING_SUFFIX_QUADRILLION:"Q",MONTH_SHORT_JANUARY:"Jan",MONTH_SHORT_FEBRUARY:"Feb",MONTH_SHORT_MARCH:"Mar",MONTH_SHORT_APRIL:"Apr",MONTH_SHORT_MAY:"May",MONTH_SHORT_JUNE:"Jun",MONTH_SHORT_JULY:"Jul",MONTH_SHORT_AUGUST:"Aug",MONTH_SHORT_SEPTEMBER:"Sep",MONTH_SHORT_OCTOBER:"Oct",MONTH_SHORT_NOVEMBER:"Nov",MONTH_SHORT_DECEMBER:"Dec",CLEAR_SELECTION:"Clear Selection"};
DvtUtilBundle.prototype.GetDefaultStringForKey=function(a){return DvtUtilBundle._defaults[a]};DvtUtilBundle.prototype.GetBundlePrefix=function(){return"DvtUtilBundle"};
var DvtSvgDocumentUtils=function(){};DvtObj.createSubclass(DvtSvgDocumentUtils,DvtDocumentUtils,"DvtSvgDocumentUtils");DvtSvgDocumentUtils.elementFromPoint=function(a,b){for(var c=document.elementFromPoint(a,b);c;){if(c._obj&&c._obj.getObj&&c._obj.getObj())return c._obj.getObj();c=c.parentNode}return null};DvtSvgDocumentUtils.elementFromTouch=function(a){return this.elementFromPoint(a.clientX,a.clientY)};
DvtSvgDocumentUtils.getStageRelativePosition=function(a,b,c){a=DvtSvgDocumentUtils.getStageAbsolutePosition(a);return new DvtPoint(b-a.x,c-a.y)};DvtSvgDocumentUtils.getPageRelativePosition=function(a,b,c){a=DvtSvgDocumentUtils.getStageAbsolutePosition(a);return new DvtPoint(b+a.x,c+a.y)};
DvtSvgDocumentUtils.getStageAbsolutePosition=function(a){var b=a=a.getImpl().getSVGRoot();window&&window.AdfAgent?b=a.parentNode:a.parentNode&&a.parentNode.firstChild==a&&(b=a.parentNode);a=DvtAgent.getElementPosition(b);return new DvtPoint(parseInt(a.x),parseInt(a.y))};DvtSvgDocumentUtils.isFilterSupported=function(a){return!DvtAgent.isPlatformIE()&&!(DvtAgent.isBrowserSafari()&&536>DvtAgent.getVersion())&&!(DvtAgent.isTouchDevice()&&!DvtAgent.isBrowserSafari())};
DvtSvgDocumentUtils.isStrokeTimeoutRequired=function(){return DvtAgent.isBrowserChrome()};DvtSvgDocumentUtils.isEventAvailableOutsideClip=function(){return DvtAgent.isBrowserSafari()};DvtSvgDocumentUtils.isFilterStraightLineAdjustmentNeeded=function(){return DvtAgent.isPlatformGecko()};
DvtSvgDocumentUtils.fixGeckoContainerForFilter=function(a){if(a&&DvtAgent.isPlatformGecko()&&(a=a.getImpl().getElem())){var b=DvtSvgUtils.getAttrNullNS(a,"transform");b||(b="matrix(1 0 0 1 0 0)");DvtSvgUtils.setAttrNullNS(a,"transform",b)}};DvtSvgDocumentUtils.cancelDomEvent=function(a){a&&(a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),a.cancelBubble=!0,a.cancel=!0,a.returnValue=!1)};var DvtSvgImageLoader={_cache:{}};DvtObj.createSubclass(DvtSvgImageLoader,DvtObj,"DvtSvgImageLoader");
DvtSvgImageLoader.addBubbleEventListener=function(a,b,c){return window.addEventListener?(DvtSvgUtils.addDomEventListener(a,b,c,!1),!0):window.attachEvent?(a.attachEvent("on"+b,c),!0):!1};DvtSvgImageLoader.loadImage=function(a,b){var c=this._cache[a];if(c)if(c._image)DvtSvgImageLoader._addListenerToQueue(c._listeners,b);else return b&&b(c),c;else this.loadNewImage(a,b);return null};
DvtSvgImageLoader.loadNewImage=function(a,b){var c=document.createElement("img"),d={_listeners:[],url:a,_image:c};b&&DvtSvgImageLoader._addListenerToQueue(d._listeners,b);this._cache[a]=d;DvtSvgImageLoader.addBubbleEventListener(c,"load",function(a){d.width=c.width;d.height=c.height;delete d._image;var b=d._listeners.length;for(a=0;a<b;a++)if(d._listeners[a])d._listeners[a](d);delete d._listeners});c.src=a};
DvtSvgImageLoader._addListenerToQueue=function(a,b){if(b){for(var c=0;c<a.length;c++)if(a[c]===b)return;a.push(b)}};var DvtSvgBaseEvent=function(a){this.Init(a)};DvtObj.createSubclass(DvtSvgBaseEvent,DvtObj,"DvtSvgBaseEvent");DvtSvgBaseEvent.prototype.Init=function(a){this._event=a;this._isPropagationStopped=!1;this.target=DvtSvgBaseEvent.FindDisplayable(a.target);this.type=a.type};DvtSvgBaseEvent.prototype.getNativeEvent=function(){return this._event};DvtSvgBaseEvent.prototype.preventDefault=function(){this._event.preventDefault()};
DvtSvgBaseEvent.prototype.stopPropagation=function(){this._event.stopPropagation&&this._event.stopPropagation();this._event.cancelBubble=!0;this._event.cancel=!0;this._event.returnValue=!1;this._isPropagationStopped=!0};DvtSvgBaseEvent.prototype.isPropagationStopped=function(){return this._isPropagationStopped};DvtSvgBaseEvent.FindDisplayable=function(a){for(;a;){if(a._obj&&a._obj.getObj&&a._obj.getObj())return a._obj.getObj();a=a.parentNode}return null};var DvtSvgEventFactory={};
DvtObj.createSubclass(DvtSvgEventFactory,DvtObj,"DvtSvgEventFactory");DvtSvgEventFactory.newEvent=function(a,b){var c=a.type;if(c==DvtTouchEvent.TOUCHSTART||c==DvtTouchEvent.TOUCHMOVE||c==DvtTouchEvent.TOUCHEND||c==DvtTouchEvent.TOUCHCANCEL)return new DvtSvgTouchEvent(a,b);if(c==DvtKeyboardEvent.KEYDOWN||c==DvtKeyboardEvent.KEYUP)return new DvtSvgKeyboardEvent(a);b._nativeEvent!=a&&(b._nativeEvent=a,b._logicalEvent=new DvtSvgMouseEvent(a));return b._logicalEvent};
DvtSvgEventFactory.generateMouseEventFromKeyboardEvent=function(a,b,c,d,e,f){var g=null;document.createEvent&&(g=document.createEvent("MouseEvents"),d=DvtSvgDocumentUtils.getPageRelativePosition(d,e,f),g.initMouseEvent(c,!0,!0,window,1,d.x,d.y,d.x,d.y,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,0,null));return g?(b=DvtSvgEventFactory.newEvent(g,b),b.target=a.target,b):null};var DvtSvgKeyboardEvent=function(a){this.Init(a)};DvtObj.createSubclass(DvtSvgKeyboardEvent,DvtKeyboardEvent,"DvtSvgKeyboardEvent");
DvtSvgKeyboardEvent.prototype.Init=function(a){DvtSvgKeyboardEvent.superclass.Init.call(this,a.type,a.bubbles,a.cancelable,a.view,a.charCode,a.keyCode,a.keyLocation,a.ctrlKey,a.altKey,a.shiftKey,a.repeat,a.locale);this._event=a};DvtSvgKeyboardEvent.prototype.getNativeEvent=function(){return this._event};DvtSvgKeyboardEvent.prototype.preventDefault=function(){this._event.preventDefault()};
DvtSvgKeyboardEvent.prototype.stopPropagation=function(){this._event.stopPropagation&&this._event.stopPropagation();this._event.cancelBubble=!0;this._event.cancel=!0;this._event.returnValue=!1};var DvtSvgMouseEvent=function(a){this.Init(a)};DvtObj.createSubclass(DvtSvgMouseEvent,DvtSvgBaseEvent,"DvtSvgMouseEvent");
DvtSvgMouseEvent.prototype.Init=function(a){DvtSvgMouseEvent.superclass.Init.call(this,a);null!=a.relatedTarget&&(this.relatedTarget=DvtSvgBaseEvent.FindDisplayable(a.relatedTarget));this.button=a.button;this.ctrlKey=a.ctrlKey||a.metaKey;this.shiftKey=a.shiftKey;this.pageX=a.pageX;this.pageY=a.pageY;this._isEventModifiedForIE=!1;null!=a.wheelDelta?this.wheelDelta=a.wheelDelta/40:null!=a.deltaY?(this.deltaMode=a.deltaMode,this.deltaY=a.deltaY,a.deltaMode==a.DOM_DELTA_LINE?this.wheelDelta=-a.deltaY:
a.deltaMode==a.DOM_DELTA_PIXEL&&(this.wheelDelta=-a.deltaY/15)):this.wheelDelta=a.detail};DvtSvgMouseEvent.prototype.modifyEventForIE=function(a,b){this._isEventModifiedForIE||(this.type=a,this.relatedTarget=this.target,this.target=DvtSvgBaseEvent.FindDisplayable(b),this._isEventModifiedForIE=!0)};var DvtSvgTouchEvent=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtSvgTouchEvent,DvtSvgBaseEvent,"DvtSvgTouchEvent");
DvtSvgTouchEvent.prototype.Init=function(a,b){DvtSvgTouchEvent.superclass.Init.call(this,a);a.type==DvtTouchEvent.TOUCHCANCEL&&(this.type=DvtTouchEvent.TOUCHEND);this._nativeTouches=a.touches;this._nativeTargetTouches=a.targetTouches;this._nativeChangedTouches=a.changedTouches;this.touches=DvtSvgTouchEvent.createTouchArray(a.touches);this.targetTouches=DvtSvgTouchEvent.createTouchArray(a.targetTouches);this.changedTouches=DvtSvgTouchEvent.createTouchArray(a.changedTouches);this._context=b;this._touchManager=
null};DvtSvgTouchEvent.prototype.blockTouchHold=function(){this._event._touchHoldBlocked=!0};DvtSvgTouchEvent.prototype.isInitialTouch=function(){return 0==this.touches.length-this.changedTouches.length};DvtSvgTouchEvent.prototype.isTouchHoldBlocked=function(){return this._event._touchHoldBlocked?!0:!1};DvtSvgTouchEvent.createTouchArray=function(a){for(var b=[],c=0;c<a.length;c++){var d=new DvtTouch(a[c]);b.push(d)}return b};
DvtSvgTouchEvent.prototype.stopPropagation=function(){DvtSvgTouchEvent.superclass.stopPropagation.call(this);this._touchManager&&this._touchManager.postEventBubble(this)};DvtSvgTouchEvent.prototype.setTouchManager=function(a){this._touchManager=a};var DvtHtmlRichTooltipManager=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtHtmlRichTooltipManager,DvtHtmlTooltipManager,"DvtHtmlRichTooltipManager");
DvtHtmlRichTooltipManager.prototype.Init=function(a,b){this._storedContexts={};DvtHtmlRichTooltipManager.superclass.Init.call(this,a,b)};DvtHtmlRichTooltipManager.prototype.InitContent=function(a){var b=DvtSvgUtils.createSvgDocument("DvtCustomTooltip"),c=new DvtSvgContext(b,"tooltipStage");this._storedContexts[this._domElementId]=c;a.innerHTML="";DvtSvgUtils.appendChildElem(a,b)};DvtHtmlRichTooltipManager.prototype.GetStoredContext=function(){return this._storedContexts[this._domElementId]};
DvtHtmlRichTooltipManager.prototype.showRichElement=function(a,b,c,d){this.showRichElementAtPosition(a,b,c,d,!1,DvtHtmlTooltipManager.UNSTYLED_POPUP_CLASS)};
DvtHtmlRichTooltipManager.prototype.showRichElementAtPosition=function(a,b,c,d,e,f){var g=this.GetTooltipElem();f||(f=DvtHtmlTooltipManager.UNSTYLED_POPUP_CLASS);g.className=f;if(f=this.GetStoredContext()){f=f.getStage();f.removeChildren();var h=c.getRootDisplayable();f.addChild(h);c&&c.Render&&c.Render();f=f.getImpl().getSVGRoot();DvtSvgUtils.setAttrNullNS(f,"width",c.getDisplayWidth());DvtSvgUtils.setAttrNullNS(f,"height",c.getDisplayHeight());this.PostElement(g,a,b,e,d)}};
DvtHtmlRichTooltipManager.prototype.hideTooltip=function(){DvtHtmlRichTooltipManager.superclass.hideTooltip.call(this);var a=this.GetStoredContext();a&&a.getStage().removeChildren()};var DvtSvgImplFactory=function(a){this.Init(a)};DvtObj.createSubclass(DvtSvgImplFactory,DvtHtmlImplFactory,"DvtSvgImplFactory");DvtSvgImplFactory.prototype.newDefs=function(){return DvtSvgShapeUtils.createElement("defs")};DvtSvgImplFactory.prototype.newStage=function(a,b){return new DvtSvgStage(a,b)};
DvtSvgImplFactory.prototype.newContainer=function(a){return new DvtSvgContainer(a,"g")};DvtSvgImplFactory.prototype.newArc=function(a,b,c,d,e,f,g,h){return new DvtSvgArc(a,b,c,d,e,f,g,h)};DvtSvgImplFactory.prototype.newCircle=function(a,b,c,d){return new DvtSvgCircle(a,b,c,d)};DvtSvgImplFactory.prototype.newImage=function(a,b,c,d,e,f){return new DvtSvgImage(a,b,c,d,e,f)};DvtSvgImplFactory.prototype.newLine=function(a,b,c,d,e){return new DvtSvgLine(a,b,c,d,e)};
DvtSvgImplFactory.prototype.newMarker=function(a,b,c){return new DvtSvgMarker(a,b,c)};DvtSvgImplFactory.prototype.newOval=function(a,b,c,d,e){return new DvtSvgOval(a,b,c,d,e)};DvtSvgImplFactory.prototype.newPath=function(a,b){return new DvtSvgPath(a,b)};DvtSvgImplFactory.prototype.newPolygon=function(a,b){return new DvtSvgPolygon(a,b)};DvtSvgImplFactory.prototype.newPolyline=function(a,b){return new DvtSvgPolyline(a,b)};
DvtSvgImplFactory.prototype.newRect=function(a,b,c,d,e){return new DvtSvgRect(a,b,c,d,e)};DvtSvgImplFactory.prototype.newText=function(a,b,c,d){return new DvtSvgText(this.GetContext(),a,b,c,d)};DvtSvgImplFactory.prototype.newTextArea=function(a,b,c){return new DvtSvgTextArea(this.GetContext(),a,b,c)};DvtSvgImplFactory.prototype.newTextFormatted=function(a,b,c){return new DvtSvgTextFormatted(this.GetContext(),a,b,c)};
DvtSvgImplFactory.prototype.getImageLoader=function(){return DvtAgent.isEnvironmentBrowser()?DvtSvgImageLoader:DvtJavaImageLoader};DvtSvgImplFactory.prototype.getDocumentUtils=function(){return DvtSvgDocumentUtils};var DvtSvgJsExt=function(){};DvtObj.createSubclass(DvtSvgJsExt,DvtJsExt,"DvtSvgJsExt");DvtSvgJsExt.prototype.sendPPRProperty=function(a,b,c){try{AdfPage.PAGE.findComponent(a).getPeer().setDVTPPRAttribute(b,c)}catch(d){}};DvtSvgJsExt.prototype.sendPPR=function(a){try{AdfPage.PAGE.findComponent(a).getPeer().sendToServerPPR({source:a})}catch(b){}};
DvtSvgJsExt.prototype.sendPPRNonBlocking=function(a){try{AdfPage.PAGE.findComponent(a).getPeer().sendToServerPPR3({source:a})}catch(b){}};DvtSvgJsExt.prototype.callJs=function(a){var b=a.match(/'(.*?)'/g);a=b[0].replace(/\'/g,"");var c=b[2].replace(/\'/g,""),b=b[3].replace(/\'/g,"");return AdfPage.PAGE.findComponent(a).getPeer().sendToServerPPR({source:a,event:c,bi_gdzA:b})};DvtSvgJsExt.prototype.callJsWithParam=function(a,b){return eval(a)(b)};DvtSvgJsExt.prototype.getLogLevel=function(){return adf_dvt_fpGetLogLevel()};
DvtSvgJsExt.prototype.log=function(a,b){adf_dvt_fpLogger(a,void 0===b?DvtJsExt.LOG_INFO:b)};DvtSvgJsExt.prototype.msg=function(a){adf_dvt_fpMsg(a)};DvtSvgJsExt.prototype.perf=function(a,b){adf_dvt_fpPerfLogger(""+b+a)};DvtSvgJsExt.prototype.requestRefresh=function(){adf_dvt_fpRefresh()};DvtSvgJsExt.prototype.dispatchEvent=function(a,b,c,d){DvtEventDispatcher.dispatchEvent(a,b,c,d)};var DvtSvgFilterContext=function(){this.Init()};DvtObj.createSubclass(DvtSvgFilterContext,DvtObj,"DvtSvgFilterContext");
DvtSvgFilterContext.prototype.Init=function(){this._regionPctRect=new DvtRectangle(-10,-10,120,120);this._counter=0;this._resultIdsUnder=[];this._resultIdsOver=[]};DvtSvgFilterContext.prototype.getRegionPctRect=function(){return this._regionPctRect};DvtSvgFilterContext.prototype.getResultIdsUnder=function(){return this._resultIdsUnder};DvtSvgFilterContext.prototype.getResultIdsOver=function(){return this._resultIdsOver};
DvtSvgFilterContext.prototype.createResultId=function(a){a||(a="filtRes");return a+this._counter++};var DvtSvgFilterUtils=function(){};DvtObj.createSubclass(DvtSvgFilterUtils,DvtObj,"DvtSvgFilterUtils");DvtSvgFilterUtils._counter=0;
DvtSvgFilterUtils.createFilter=function(a,b){for(var c=DvtSvgShapeUtils.createElement("filter",DvtSvgFilterUtils.CreateFilterId()),d=new DvtSvgFilterContext,e=0;e<a.length;e++){var f=a[e];f&&DvtSvgFilterUtils.CreateFilterPrimitives(c,f,b,d)}var g=!1;if(b){var e=b.getObj(),h;if(h=e&&e._bInitFx&&e._origRect?e._origRect:b.getElem().getBBox())if(e=h.width,f=h.height,0==f||0==e){var k;b.getStroke&&(k=b.getStroke());g=10;k&&(g=k.getWidth());k=h.x;h=h.y;if(DvtSvgDocumentUtils.isFilterStraightLineAdjustmentNeeded()&&
b instanceof DvtSvgPolyline){var m=DvtArrayUtils.copy(b.getPoints());0==e&&(m[0]+=.01);0==f&&(m[1]+=.01);m=DvtSvgShapeUtils.convertPointsArray(m);DvtSvgUtils.setAttrNullNS(b.getElem(),"points",m)}0==f&&(f=2*g,h-=g);0==e&&(e=2*g,k-=g);DvtSvgUtils.setAttrNullNS(c,"x",k);DvtSvgUtils.setAttrNullNS(c,"y",h);DvtSvgUtils.setAttrNullNS(c,"width",e);DvtSvgUtils.setAttrNullNS(c,"height",f);DvtSvgUtils.setAttrNullNS(c,"filterUnits","userSpaceOnUse");g=!0}}g||(-10!=d.getRegionPctRect().x&&"Infinity"!=d.getRegionPctRect().x&&
"-Infinity"!=d.getRegionPctRect().x&&DvtSvgUtils.setAttrNullNS(c,"x",d.getRegionPctRect().x+"%"),-10!=d.getRegionPctRect().y&&"Infinity"!=d.getRegionPctRect().y&&"-Infinity"!=d.getRegionPctRect().y&&DvtSvgUtils.setAttrNullNS(c,"y",d.getRegionPctRect().y+"%"),120!=d.getRegionPctRect().w&&"Infinity"!=d.getRegionPctRect().w&&"-Infinity"!=d.getRegionPctRect().w&&DvtSvgUtils.setAttrNullNS(c,"width",d.getRegionPctRect().w+"%"),120!=d.getRegionPctRect().h&&"Infinity"!=d.getRegionPctRect().h&&"-Infinity"!=
d.getRegionPctRect().h&&DvtSvgUtils.setAttrNullNS(c,"height",d.getRegionPctRect().h+"%"));e=d.getResultIdsUnder().length;f=d.getResultIdsOver().length;h=DvtSvgShapeUtils.createElement("feMerge");if(0<e)for(g=0;g<e;g++)k=DvtSvgShapeUtils.createElement("feMergeNode"),DvtSvgUtils.setAttrNullNS(k,"in",d.getResultIdsUnder()[g]),DvtSvgUtils.appendChildElem(h,k);k=DvtSvgShapeUtils.createElement("feMergeNode");DvtSvgUtils.setAttrNullNS(k,"in","SourceGraphic");DvtSvgUtils.appendChildElem(h,k);if(0<f)for(g=
0;g<f;g++)k=DvtSvgShapeUtils.createElement("feMergeNode"),DvtSvgUtils.setAttrNullNS(k,"in",d.getResultIdsOver()[g]),DvtSvgUtils.appendChildElem(h,k);DvtSvgUtils.appendChildElem(c,h);return c};DvtSvgFilterUtils.CreateFilterPrimitives=function(a,b,c,d){b instanceof DvtShadow?DvtSvgShadowUtils.createFilterPrimitives(a,b,c,d):b instanceof DvtGlow?DvtSvgGlowUtils.createFilterPrimitives(a,b,c,d):b instanceof DvtBevel&&DvtSvgBevelUtils.createFilterPrimitives(a,b,c,d);return null};
DvtSvgFilterUtils.CreateFilterId=function(){return"filt"+DvtSvgFilterUtils._counter++};var DvtSvgBevelUtils=function(){};DvtObj.createSubclass(DvtSvgBevelUtils,DvtObj,"DvtSvgBevelUtils");
DvtSvgBevelUtils.createFilter=function(a,b){var c=DvtSvgBevelUtils.CreateFilterElem(a),d=new DvtSvgFilterContext;DvtSvgBevelUtils.createFilterPrimitives(c,a,b,d);var e=DvtSvgShapeUtils.createElement("feMerge"),f;0<d.getResultIdsUnder().length&&(f=DvtSvgShapeUtils.createElement("feMergeNode"),DvtSvgUtils.setAttrNullNS(f,"in",d.getResultIdsUnder()[0]),DvtSvgUtils.appendChildElem(e,f));f=DvtSvgShapeUtils.createElement("feMergeNode");DvtSvgUtils.setAttrNullNS(f,"in","SourceGraphic");DvtSvgUtils.appendChildElem(e,
f);0<d.getResultIdsOver().length&&(f=DvtSvgShapeUtils.createElement("feMergeNode"),DvtSvgUtils.setAttrNullNS(f,"in",d.getResultIdsOver()[0]),DvtSvgUtils.appendChildElem(e,f));DvtSvgUtils.appendChildElem(c,e);-10!=d.getRegionPctRect().x&&DvtSvgUtils.setAttrNullNS(c,"x",d.getRegionPctRect().x+"%");-10!=d.getRegionPctRect().y&&DvtSvgUtils.setAttrNullNS(c,"y",d.getRegionPctRect().y+"%");120!=d.getRegionPctRect().w&&DvtSvgUtils.setAttrNullNS(c,"width",d.getRegionPctRect().w+"%");120!=d.getRegionPctRect().h&&
DvtSvgUtils.setAttrNullNS(c,"height",d.getRegionPctRect().h+"%");return c};DvtSvgBevelUtils.createFilterPrimitives=function(a,b,c,d){b._type===DvtBevel.TYPE_INNER&&(c=c.getDimensions(c.getParent()),DvtSvgBevelUtils.CreateInnerFilterPrimitives2(a,b,d,c))};DvtSvgBevelUtils.CreateFilterElem=function(a){return DvtSvgShapeUtils.createElement("filter",a._Id)};
DvtSvgBevelUtils.CreateInnerFilterPrimitives2=function(a,b,c,d){var e=b._distance,f=b._angle,g=DvtColorUtils.getRed(b._hilightRgba),h=DvtColorUtils.getGreen(b._hilightRgba),k=DvtColorUtils.getBlue(b._hilightRgba),m=DvtColorUtils.getAlpha(b._hilightRgba),k=DvtColorUtils.makeRGB(g,h,k),h=DvtColorUtils.getRed(b._shadowRgba),n=DvtColorUtils.getGreen(b._shadowRgba),p=DvtColorUtils.getBlue(b._shadowRgba),g=DvtColorUtils.getAlpha(b._shadowRgba),h=DvtColorUtils.makeRGB(h,n,p),n=.5*b._blurX;b=.5*b._blurY;
d&&(p=2*n/d.w*100,d=2*b/d.h*100,c.getRegionPctRect().x>-p&&(c.getRegionPctRect().x=-p),c.getRegionPctRect().y>-d&&(c.getRegionPctRect().y=-d),c.getRegionPctRect().w<100+2*p&&(c.getRegionPctRect().w=100+2*p),c.getRegionPctRect().h<100+2*d&&(c.getRegionPctRect().h=100+2*d));d=DvtSvgShapeUtils.createElement("feGaussianBlur");DvtSvgUtils.setAttrNullNS(d,"in","SourceAlpha");DvtSvgUtils.setAttrNullNS(d,"stdDeviation",n+" "+b);b=c.createResultId("blur");DvtSvgUtils.setAttrNullNS(d,"result",b);var f=f*Math.PI/
180,n=e*Math.cos(f),q=e*Math.sin(f),e=DvtSvgShapeUtils.createElement("feOffset");DvtSvgUtils.setAttrNullNS(e,"dx",n);DvtSvgUtils.setAttrNullNS(e,"dy",q);DvtSvgUtils.setAttrNullNS(e,"in",b);p=c.createResultId("offset");DvtSvgUtils.setAttrNullNS(e,"result",p);f=DvtSvgShapeUtils.createElement("feFlood");DvtSvgUtils.setAttrNullNS(f,"in","SourceAlpha");DvtSvgUtils.setAttrNullNS(f,"flood-opacity",m/3);DvtSvgUtils.setAttrNullNS(f,"flood-color",k);k=c.createResultId("flood");DvtSvgUtils.setAttrNullNS(f,"result",
k);m=DvtSvgShapeUtils.createElement("feComposite");DvtSvgUtils.setAttrNullNS(m,"operator","out");DvtSvgUtils.setAttrNullNS(m,"in",k);DvtSvgUtils.setAttrNullNS(m,"in2",p);p=c.createResultId("comp");DvtSvgUtils.setAttrNullNS(m,"result",p);k=DvtSvgShapeUtils.createElement("feComposite");DvtSvgUtils.setAttrNullNS(k,"operator","in");DvtSvgUtils.setAttrNullNS(k,"in",p);DvtSvgUtils.setAttrNullNS(k,"in2","SourceGraphic");p=c.createResultId("comp");DvtSvgUtils.setAttrNullNS(k,"result",p);var r=DvtSvgShapeUtils.createElement("feOffset");
DvtSvgUtils.setAttrNullNS(r,"dx",-n);DvtSvgUtils.setAttrNullNS(r,"dy",-q);DvtSvgUtils.setAttrNullNS(r,"in",b);n=c.createResultId("offset");DvtSvgUtils.setAttrNullNS(r,"result",n);b=DvtSvgShapeUtils.createElement("feFlood");DvtSvgUtils.setAttrNullNS(b,"in","SourceAlpha");DvtSvgUtils.setAttrNullNS(b,"flood-opacity",2*g);DvtSvgUtils.setAttrNullNS(b,"flood-color",h);h=c.createResultId("flood");DvtSvgUtils.setAttrNullNS(b,"result",h);g=DvtSvgShapeUtils.createElement("feComposite");DvtSvgUtils.setAttrNullNS(g,
"operator","out");DvtSvgUtils.setAttrNullNS(g,"in",h);DvtSvgUtils.setAttrNullNS(g,"in2",n);n=c.createResultId("comp");DvtSvgUtils.setAttrNullNS(g,"result",n);h=DvtSvgShapeUtils.createElement("feComposite");DvtSvgUtils.setAttrNullNS(h,"operator","in");DvtSvgUtils.setAttrNullNS(h,"in",n);DvtSvgUtils.setAttrNullNS(h,"in2","SourceGraphic");n=c.createResultId("comp");DvtSvgUtils.setAttrNullNS(h,"result",n);c.getResultIdsOver().push(p);c.getResultIdsOver().push(n);DvtSvgUtils.appendChildElem(a,d);DvtSvgUtils.appendChildElem(a,
e);DvtSvgUtils.appendChildElem(a,f);DvtSvgUtils.appendChildElem(a,m);DvtSvgUtils.appendChildElem(a,k);DvtSvgUtils.appendChildElem(a,r);DvtSvgUtils.appendChildElem(a,b);DvtSvgUtils.appendChildElem(a,g);DvtSvgUtils.appendChildElem(a,h)};var DvtSvgGlowUtils=function(){};DvtObj.createSubclass(DvtSvgGlowUtils,DvtObj,"DvtSvgGlowUtils");
DvtSvgGlowUtils.createFilter=function(a,b){var c=DvtSvgGlowUtils.CreateFilterElem(a),d=new DvtSvgFilterContext;DvtSvgGlowUtils.createFilterPrimitives(c,a,b,d);var e=DvtSvgShapeUtils.createElement("feMerge"),f;0<d.getResultIdsUnder().length&&(f=DvtSvgShapeUtils.createElement("feMergeNode"),DvtSvgUtils.setAttrNullNS(f,"in",d.getResultIdsUnder()[0]),DvtSvgUtils.appendChildElem(e,f));f=DvtSvgShapeUtils.createElement("feMergeNode");DvtSvgUtils.setAttrNullNS(f,"in","SourceGraphic");DvtSvgUtils.appendChildElem(e,
f);0<d.getResultIdsOver().length&&(f=DvtSvgShapeUtils.createElement("feMergeNode"),DvtSvgUtils.setAttrNullNS(f,"in",d.getResultIdsOver()[0]),DvtSvgUtils.appendChildElem(e,f));DvtSvgUtils.appendChildElem(c,e);-10!=d.getRegionPctRect().x&&DvtSvgUtils.setAttrNullNS(c,"x",d.getRegionPctRect().x+"%");-10!=d.getRegionPctRect().y&&DvtSvgUtils.setAttrNullNS(c,"y",d.getRegionPctRect().y+"%");120!=d.getRegionPctRect().w&&DvtSvgUtils.setAttrNullNS(c,"width",d.getRegionPctRect().w+"%");120!=d.getRegionPctRect().h&&
DvtSvgUtils.setAttrNullNS(c,"height",d.getRegionPctRect().h+"%");return c};DvtSvgGlowUtils.createFilterPrimitives=function(a,b,c,d){b._bInner?DvtSvgGlowUtils.CreateInnerFilterPrimitives2(a,b,d):(c=c.getDimensions(c.getParent()),DvtSvgGlowUtils.CreateOuterFilterPrimitives(a,b,d,c))};DvtSvgGlowUtils.CreateFilterElem=function(a){return DvtSvgShapeUtils.createElement("filter",a._Id)};
DvtSvgGlowUtils.CreateOuterFilterPrimitives=function(a,b,c,d){var e=b._rgba,f=DvtColorUtils.getRed(e)/255,g=DvtColorUtils.getGreen(e)/255,h=DvtColorUtils.getBlue(e)/255,k=DvtColorUtils.getAlpha(e),e=b._strength,m=b._blurX/3;b=b._blurY/3;if(d){var n=2*m/d.w*100;d=2*b/d.h*100;c.getRegionPctRect().x>-n&&(c.getRegionPctRect().x=-n);c.getRegionPctRect().y>-d&&(c.getRegionPctRect().y=-d);c.getRegionPctRect().w<100+2*n&&(c.getRegionPctRect().w=100+2*n);c.getRegionPctRect().h<100+2*d&&(c.getRegionPctRect().h=
100+2*d)}d=DvtSvgShapeUtils.createElement("feColorMatrix");DvtSvgUtils.setAttrNullNS(d,"in","SourceGraphic");DvtSvgUtils.setAttrNullNS(d,"type","matrix");DvtSvgUtils.setAttrNullNS(d,"values","0 0 0 "+f+" 0 0 0 0 "+g+" 0 0 0 0 "+h+" 0 0 0 0 "+k+" 0");f=DvtSvgShapeUtils.createElement("feGaussianBlur");DvtSvgUtils.setAttrNullNS(f,"stdDeviation",m+" "+b);g=c.createResultId("blur");DvtSvgUtils.setAttrNullNS(f,"result",g);var p,q;1!=e&&(p=DvtSvgShapeUtils.createElement("feComponentTransfer"),DvtSvgUtils.setAttrNullNS(p,
"in",g),q=c.createResultId("compTran"),DvtSvgUtils.setAttrNullNS(p,"result",q),h=DvtSvgShapeUtils.createElement("feFuncA"),DvtSvgUtils.setAttrNullNS(h,"type","linear"),DvtSvgUtils.setAttrNullNS(h,"slope",""+e),DvtSvgUtils.appendChildElem(p,h));q?c.getResultIdsUnder().push(q):c.getResultIdsUnder().push(g);DvtSvgUtils.appendChildElem(a,d);DvtSvgUtils.appendChildElem(a,f);p&&DvtSvgUtils.appendChildElem(a,p)};
DvtSvgGlowUtils.CreateInnerFilterPrimitives2=function(a,b,c){var d=DvtColorUtils.getRed(b._rgba),e=DvtColorUtils.getGreen(b._rgba),f=DvtColorUtils.getBlue(b._rgba),g=DvtColorUtils.getAlpha(b._rgba),f=DvtColorUtils.makeRGB(d,e,f),d=b._strength,e=b._blurX/2,h=b._blurY/2;b=DvtSvgShapeUtils.createElement("feFlood");DvtSvgUtils.setAttrNullNS(b,"in","SourceGraphic");DvtSvgUtils.setAttrNullNS(b,"flood-opacity",g);DvtSvgUtils.setAttrNullNS(b,"flood-color",f);f=c.createResultId("flood");DvtSvgUtils.setAttrNullNS(b,
"result",f);g=DvtSvgShapeUtils.createElement("feComposite");DvtSvgUtils.setAttrNullNS(g,"operator","out");DvtSvgUtils.setAttrNullNS(g,"in",f);DvtSvgUtils.setAttrNullNS(g,"in2","SourceGraphic");var k=c.createResultId("comp");DvtSvgUtils.setAttrNullNS(g,"result",k);f=DvtSvgShapeUtils.createElement("feGaussianBlur");DvtSvgUtils.setAttrNullNS(f,"in",k);DvtSvgUtils.setAttrNullNS(f,"stdDeviation",e+" "+h);e=c.createResultId("blur");DvtSvgUtils.setAttrNullNS(f,"result",e);var m,n;1!=d&&(m=DvtSvgShapeUtils.createElement("feComponentTransfer"),
DvtSvgUtils.setAttrNullNS(m,"in",e),n=c.createResultId("compTran"),DvtSvgUtils.setAttrNullNS(m,"result",n),h=DvtSvgShapeUtils.createElement("feFuncA"),DvtSvgUtils.setAttrNullNS(h,"type","linear"),DvtSvgUtils.setAttrNullNS(h,"slope",""+d),DvtSvgUtils.appendChildElem(m,h));d=DvtSvgShapeUtils.createElement("feComposite");DvtSvgUtils.setAttrNullNS(d,"operator","in");n?DvtSvgUtils.setAttrNullNS(d,"in",n):DvtSvgUtils.setAttrNullNS(d,"in",e);DvtSvgUtils.setAttrNullNS(d,"in2","SourceGraphic");n=c.createResultId("comp");
DvtSvgUtils.setAttrNullNS(d,"result",n);c.getResultIdsOver().push(n);DvtSvgUtils.appendChildElem(a,b);DvtSvgUtils.appendChildElem(a,g);DvtSvgUtils.appendChildElem(a,f);m&&DvtSvgUtils.appendChildElem(a,m);DvtSvgUtils.appendChildElem(a,d)};var DvtSvgGradientUtils=function(){};DvtObj.createSubclass(DvtSvgGradientUtils,DvtObj,"DvtSvgGradientUtils");
DvtSvgGradientUtils.createElem=function(a,b){var c=a instanceof DvtLinearGradientFill||a instanceof DvtLinearGradientStroke,d=DvtSvgShapeUtils.createElement(c?"linearGradient":"radialGradient",b),e,f=a.getColors(),g=a.getAlphas(),h=a.getStops(),k=a.getBounds(),m=f.length;for(e=0;e<m;e++){var n=DvtSvgShapeUtils.createElement("stop");DvtSvgUtils.setAttrNullNS(n,"offset",""+100*h[e]+"%");var p=f[e];if(p){var q=g[e];DvtAgent.isBrowserSafari()&&-1!==p.indexOf("rgba")?(DvtSvgUtils.setAttrNullNS(n,"stop-color",
DvtColorUtils.getRGB(p)),null!=q?DvtSvgUtils.setAttrNullNS(n,"stop-opacity",DvtColorUtils.getAlpha(p)*q):DvtSvgUtils.setAttrNullNS(n,"stop-opacity",DvtColorUtils.getAlpha(p))):(DvtSvgUtils.setAttrNullNS(n,"stop-color",p),null!=q&&DvtSvgUtils.setAttrNullNS(n,"stop-opacity",q))}DvtSvgUtils.appendChildElem(d,n)}n=!k||0==k[0]&&0==k[1]&&0==k[2]&&0==k[3];if(c){m=a.getAngle();e=c="0%";f="100%";g="0%";h=!0;if(n)45===m?f=e="100%":90===m?(e="100%",f="0%"):135===m?(c="100%",f="0%",g="100%"):270===m?(f="0%",
g="100%"):0!==m&&(DvtSvgUtils.setAttrNullNS(d,"gradientTransform","rotate("+-m+" .5 .5)"),h=!1);else{DvtSvgUtils.setAttrNullNS(d,"gradientUnits","userSpaceOnUse");c="0";e="0.5";var f="1",g="0.5",p=k[2],q=k[3],n=k[0],k=k[1],r="translate("+n+" "+k+")",m="scale("+p+" "+q+") "+("rotate("+-m+" .5 .5)");if(0!=n||0!=k)m=r+" "+m;DvtSvgUtils.setAttrNullNS(d,"gradientTransform",m)}h&&(DvtSvgUtils.setAttrNullNS(d,"x1",c),DvtSvgUtils.setAttrNullNS(d,"y1",e),DvtSvgUtils.setAttrNullNS(d,"x2",f),DvtSvgUtils.setAttrNullNS(d,
"y2",g))}else n||(DvtSvgUtils.setAttrNullNS(d,"gradientUnits","userSpaceOnUse"),DvtSvgUtils.setAttrNullNS(d,"cx",a.getCx()),DvtSvgUtils.setAttrNullNS(d,"cy",a.getCy()),DvtSvgUtils.setAttrNullNS(d,"fx",a.getCx()),DvtSvgUtils.setAttrNullNS(d,"fy",a.getCy()),DvtSvgUtils.setAttrNullNS(d,"r",a.getRadius()));return d};var DvtSvgImageFillUtils=function(){};DvtObj.createSubclass(DvtSvgImageFillUtils,DvtObj,"DvtSvgImageFillUtils");
DvtSvgImageFillUtils.createElem=function(a,b){var c=DvtSvgShapeUtils.createElement("pattern",b),d=DvtSvgShapeUtils.createElement("image",b),e=a.getSrc(),f=a.getBound();a.getRepeat();f&&(DvtSvgUtils.setAttrNullNS(c,"x",f.x),DvtSvgUtils.setAttrNullNS(c,"y",f.y),DvtSvgUtils.setAttrNullNS(d,"x",f.x),DvtSvgUtils.setAttrNullNS(d,"y",f.y),DvtSvgUtils.setAttrNullNS(c,"width",f.w),DvtSvgUtils.setAttrNullNS(c,"height",f.h),DvtSvgUtils.setAttrNullNS(d,"width",f.w),DvtSvgUtils.setAttrNullNS(d,"height",f.h),DvtSvgUtils.setAttrNullNS(c,
"patternUnits","userSpaceOnUse"),e&&DvtSvgUtils.setAttrNS(d,DvtSvgImage.XLINK_NS,"xlink:href",e));DvtSvgUtils.appendChildElem(c,d);return c};var DvtSvgPatternFillUtils=function(){};DvtObj.createSubclass(DvtSvgPatternFillUtils,DvtObj,"DvtSvgPatternFillUtils");DvtSvgPatternFillUtils._SM_WIDTH=8;DvtSvgPatternFillUtils._SM_HEIGHT=8;DvtSvgPatternFillUtils._LG_WIDTH=16;DvtSvgPatternFillUtils._LG_HEIGHT=16;
DvtSvgPatternFillUtils.createElem=function(a,b){var c=DvtSvgShapeUtils.createElement("pattern",b),d=a.getPattern(),e;DvtSvgPatternFillUtils.IsSmallPattern(d)?(d=DvtSvgPatternFillUtils._SM_WIDTH,e=DvtSvgPatternFillUtils._SM_HEIGHT):(d=DvtSvgPatternFillUtils._LG_WIDTH,e=DvtSvgPatternFillUtils._LG_HEIGHT);DvtSvgUtils.setAttrNullNS(c,"x",0);DvtSvgUtils.setAttrNullNS(c,"y",0);DvtSvgUtils.setAttrNullNS(c,"width",d);DvtSvgUtils.setAttrNullNS(c,"height",e);DvtSvgUtils.setAttrNullNS(c,"patternUnits","userSpaceOnUse");
if(d=a.getMatrix())d="matrix("+d.getA()+","+d.getC()+","+d.getB()+","+d.getD()+","+d.getTx()+","+d.getTy()+")",DvtSvgUtils.setAttrNullNS(c,"patternTransform",d);DvtSvgPatternFillUtils.CreatePatternElems(a,c);return c};DvtSvgPatternFillUtils.IsSmallPattern=function(a){return"s"===a.charAt(0)};
DvtSvgPatternFillUtils.CreatePatternElems=function(a,b){var c,d,e,f,g,h,k;g=a.getPattern();var m=a.getColor(),n=DvtColorUtils.getRGB(m),m=DvtColorUtils.getAlpha(m);c=a.getBackgroundColor();h=DvtColorUtils.getRGB(c);var p=DvtColorUtils.getAlpha(c);DvtSvgPatternFillUtils.IsSmallPattern(g)?(c=DvtSvgPatternFillUtils._SM_WIDTH,d=DvtSvgPatternFillUtils._SM_HEIGHT,e=DvtSvgPatternFillUtils._SM_WIDTH,f=DvtSvgPatternFillUtils._SM_HEIGHT):(c=DvtSvgPatternFillUtils._LG_WIDTH,d=DvtSvgPatternFillUtils._LG_HEIGHT,
e=DvtSvgPatternFillUtils._LG_WIDTH,f=DvtSvgPatternFillUtils._LG_HEIGHT);h&&0<p&&(k=DvtSvgShapeUtils.createElement("rect"),DvtSvgUtils.setAttrNullNS(k,"stroke",h),DvtSvgUtils.setAttrNullNS(k,"stroke-opacity",p),DvtSvgUtils.setAttrNullNS(k,"stroke-width",1),DvtSvgUtils.setAttrNullNS(k,"fill",h),DvtSvgUtils.setAttrNullNS(k,"fill-opacity",p),DvtSvgUtils.setAttrNullNS(k,"x",0),DvtSvgUtils.setAttrNullNS(k,"y",0),DvtSvgUtils.setAttrNullNS(k,"width",c),DvtSvgUtils.setAttrNullNS(k,"height",d),DvtSvgUtils.appendChildElem(b,
k));if(g===DvtPatternFill.SM_DIAG_UP_LT||g===DvtPatternFill.LG_DIAG_UP_LT)k=DvtSvgShapeUtils.createElement("path"),DvtSvgUtils.setAttrNullNS(k,"stroke",n),DvtSvgUtils.setAttrNullNS(k,"stroke-opacity",m),DvtSvgUtils.setAttrNullNS(k,"stroke-width",1),DvtSvgUtils.setAttrNullNS(k,"stroke-linecap","square"),DvtSvgUtils.setAttrNullNS(k,"d",DvtPathUtils.moveTo(0,-f/2)+DvtPathUtils.lineTo(3*e/2,f)+DvtPathUtils.moveTo(-e/2,0)+DvtPathUtils.lineTo(e/2,f)),DvtSvgUtils.appendChildElem(b,k);else if(g===DvtPatternFill.SM_DIAG_UP_RT||
g===DvtPatternFill.LG_DIAG_UP_RT)k=DvtSvgShapeUtils.createElement("path"),DvtSvgUtils.setAttrNullNS(k,"stroke",n),DvtSvgUtils.setAttrNullNS(k,"stroke-opacity",m),DvtSvgUtils.setAttrNullNS(k,"stroke-width",1),DvtSvgUtils.setAttrNullNS(k,"stroke-linecap","square"),DvtSvgUtils.setAttrNullNS(k,"d",DvtPathUtils.moveTo(-e/2,f)+DvtPathUtils.lineTo(e,-f/2)+DvtPathUtils.moveTo(0,3*f/2)+DvtPathUtils.lineTo(3*e/2,0)),DvtSvgUtils.appendChildElem(b,k);else if(g===DvtPatternFill.SM_CROSSHATCH||g===DvtPatternFill.LG_CROSSHATCH)k=
DvtSvgShapeUtils.createElement("path"),DvtSvgUtils.setAttrNullNS(k,"stroke",n),DvtSvgUtils.setAttrNullNS(k,"stroke-opacity",m),DvtSvgUtils.setAttrNullNS(k,"stroke-width",1),DvtSvgUtils.setAttrNullNS(k,"d","M0,0L"+c+","+d+"M"+c+",0L0,"+d),DvtSvgUtils.appendChildElem(b,k);else if(g===DvtPatternFill.SM_CHECK||g===DvtPatternFill.LG_CHECK)g=e/2,h=f/2,k=DvtSvgShapeUtils.createElement("path"),DvtSvgUtils.setAttrNullNS(k,"stroke",n),DvtSvgUtils.setAttrNullNS(k,"stroke-opacity",m),DvtSvgUtils.setAttrNullNS(k,
"stroke-width",1),DvtSvgUtils.setAttrNullNS(k,"fill",n),DvtSvgUtils.setAttrNullNS(k,"fill-opacity",m),DvtSvgUtils.setAttrNullNS(k,"d","M"+g+",0L"+e+",0L"+e+","+h+"L"+g+","+h+"ZM0,"+h+"L"+g+","+h+"L"+g+","+f+"L0,"+f+"Z"),DvtSvgUtils.appendChildElem(b,k);else if(g===DvtPatternFill.SM_TRIANGLE_CHECK||g===DvtPatternFill.LG_TRIANGLE_CHECK)k=DvtSvgShapeUtils.createElement("polygon"),DvtSvgUtils.setAttrNullNS(k,"stroke",n),DvtSvgUtils.setAttrNullNS(k,"stroke-opacity",m),DvtSvgUtils.setAttrNullNS(k,"stroke-width",
1),DvtSvgUtils.setAttrNullNS(k,"fill",n),DvtSvgUtils.setAttrNullNS(k,"fill-opacity",m),DvtSvgUtils.setAttrNullNS(k,"points","0,"+d+" "+c+",0 "+c+","+d),DvtSvgUtils.appendChildElem(b,k);else if(g===DvtPatternFill.SM_DIAMOND_CHECK||g===DvtPatternFill.LG_DIAMOND_CHECK)g=e/2,h=f/2,k=DvtSvgShapeUtils.createElement("polygon"),DvtSvgUtils.setAttrNullNS(k,"stroke",n),DvtSvgUtils.setAttrNullNS(k,"stroke-opacity",m),DvtSvgUtils.setAttrNullNS(k,"stroke-width",1),DvtSvgUtils.setAttrNullNS(k,"fill",n),DvtSvgUtils.setAttrNullNS(k,
"fill-opacity",m),DvtSvgUtils.setAttrNullNS(k,"points","0,"+h+" "+g+",0 "+c+","+g+" "+g+","+d),DvtSvgUtils.appendChildElem(b,k)};var DvtSvgShadowUtils=function(){};DvtObj.createSubclass(DvtSvgShadowUtils,DvtObj,"DvtSvgShadowUtils");DvtSvgShadowUtils.RADS_PER_DEGREE=Math.PI/180;
DvtSvgShadowUtils.createFilter=function(a,b){var c;if(!a.isLocked()){var d=new DvtSvgFilterContext;c=DvtSvgShapeUtils.createElement("filter",a._Id);DvtSvgShadowUtils.createFilterPrimitives(c,a,b,d);var e=DvtSvgShapeUtils.createElement("feMerge"),f=DvtSvgShapeUtils.createElement("feMergeNode");DvtSvgUtils.setAttrNullNS(f,"in",d.getResultIdsUnder()[0]);d=DvtSvgShapeUtils.createElement("feMergeNode");DvtSvgUtils.setAttrNullNS(d,"in","SourceGraphic");DvtSvgUtils.appendChildElem(c,e);DvtSvgUtils.appendChildElem(e,
f);DvtSvgUtils.appendChildElem(e,d)}return c};DvtSvgShadowUtils.createFilterPrimitives=function(a,b,c,d){b._bInner?DvtSvgShadowUtils.CreateInnerFilterPrimitives(a,b,c,d):DvtSvgShadowUtils.CreateOuterFilterPrimitives(a,b,c,d)};
DvtSvgShadowUtils.CreateOuterFilterPrimitives=function(a,b,c,d){var e=b._rgba,f=DvtColorUtils.getRed(e)/255,g=DvtColorUtils.getGreen(e)/255,h=DvtColorUtils.getBlue(e)/255,k=DvtColorUtils.getAlpha(e),m=b._strength,n=b._blurX,p=b._blurY,q=e=0;0<b._blurX&&(e=Math.max(b._blurX/3,1));0<b._blurY&&(q=Math.max(b._blurY/3,1));var r=b._distance,t=b._angle*DvtSvgShadowUtils.RADS_PER_DEGREE;b=Math.cos(t)*r;var t=Math.sin(t)*r,v=c.getDimensions(c.getParent());if(v){var u=Math.abs(r),w=2*n,z=2*n,n=2*p,p=2*p;0<
r?(w-=u,n-=u,z+=u,p+=u):0>r&&(w+=u,n+=u,z-=u,p-=u);0>w&&(w=0);0>n&&(n=0);0>z&&(z=0);0>p&&(p=0);r=w/v.w*100;u=z/v.w*100;n=n/v.h*100;v=p/v.h*100;d.getRegionPctRect().x>-r&&(d.getRegionPctRect().x=-r);d.getRegionPctRect().y>-n&&(d.getRegionPctRect().y=-n);d.getRegionPctRect().w<100+r+u&&(d.getRegionPctRect().w=100+r+u);d.getRegionPctRect().h<100+n+v&&(d.getRegionPctRect().h=100+n+v)}c instanceof DvtSvgPolyline&&(c=c.getStroke().getWidth(),1<c&&(d.getRegionPctRect().h=d.getRegionPctRect().h+c,d.getRegionPctRect().y=
d.getRegionPctRect().y-c));c=DvtSvgShapeUtils.createElement("feColorMatrix");DvtSvgUtils.setAttrNullNS(c,"in","SourceGraphic");DvtSvgUtils.setAttrNullNS(c,"type","matrix");DvtSvgUtils.setAttrNullNS(c,"values","0 0 0 "+f+" 0 0 0 0 "+g+" 0 0 0 0 "+h+" 0 0 0 0 "+k*m+" 0");f=DvtSvgShapeUtils.createElement("feGaussianBlur");g=e;e!==q&&(g+=" "+q);DvtSvgUtils.setAttrNullNS(f,"stdDeviation",g);q=d.createResultId("blur");DvtSvgUtils.setAttrNullNS(f,"result",q);e=DvtSvgShapeUtils.createElement("feOffset");
DvtSvgUtils.setAttrNullNS(e,"dx",b);DvtSvgUtils.setAttrNullNS(e,"dy",t);DvtSvgUtils.setAttrNullNS(e,"in",q);b=d.createResultId("offset");DvtSvgUtils.setAttrNullNS(e,"result",b);d.getResultIdsUnder().push(b);DvtSvgUtils.appendChildElem(a,c);DvtSvgUtils.appendChildElem(a,f);DvtSvgUtils.appendChildElem(a,e)};
DvtSvgShadowUtils.CreateInnerFilterPrimitives=function(a,b,c,d){c=b._rgba;var e=DvtColorUtils.getRed(c)/255,f=DvtColorUtils.getGreen(c)/255,g=DvtColorUtils.getBlue(c)/255,f=DvtColorUtils.makeRGB(e,f,g),h=DvtColorUtils.getAlpha(c),k=Math.max(b._blurX/2,1),m=Math.max(b._blurY/2,1),g=b._distance,e=b._strength;b=b._angle*DvtSvgShadowUtils.RADS_PER_DEGREE;c=Math.cos(b)*g;g*=Math.sin(b);b=DvtSvgShapeUtils.createElement("feFlood");DvtSvgUtils.setAttrNullNS(b,"in","SourceGraphic");DvtSvgUtils.setAttrNullNS(b,
"flood-opacity",h);DvtSvgUtils.setAttrNullNS(b,"flood-color",f);h=d.createResultId("flood");DvtSvgUtils.setAttrNullNS(b,"result",h);f=DvtSvgShapeUtils.createElement("feComposite");DvtSvgUtils.setAttrNullNS(f,"operator","out");DvtSvgUtils.setAttrNullNS(f,"in",h);DvtSvgUtils.setAttrNullNS(f,"in2","SourceGraphic");var h=DvtSvgShapeUtils.createElement("feGaussianBlur"),n=k;k!==m&&(n+=" "+m);DvtSvgUtils.setAttrNullNS(h,"stdDeviation",n);m=d.createResultId("blur");DvtSvgUtils.setAttrNullNS(h,"result",m);
k=DvtSvgShapeUtils.createElement("feColorMatrix");DvtSvgUtils.setAttrNullNS(k,"in",m);DvtSvgUtils.setAttrNullNS(k,"type","matrix");DvtSvgUtils.setAttrNullNS(k,"values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 "+e+" 0");m=d.createResultId("colMat");DvtSvgUtils.setAttrNullNS(k,"result",m);e=DvtSvgShapeUtils.createElement("feOffset");DvtSvgUtils.setAttrNullNS(e,"dx",c);DvtSvgUtils.setAttrNullNS(e,"dy",g);DvtSvgUtils.setAttrNullNS(e,"in",m);g=d.createResultId("offset");DvtSvgUtils.setAttrNullNS(e,"result",
g);c=DvtSvgShapeUtils.createElement("feComposite");DvtSvgUtils.setAttrNullNS(c,"operator","in");DvtSvgUtils.setAttrNullNS(c,"in",g);DvtSvgUtils.setAttrNullNS(c,"in2","SourceGraphic");g=d.createResultId("comp");DvtSvgUtils.setAttrNullNS(c,"result",g);d.getResultIdsOver().push(g);DvtSvgUtils.appendChildElem(a,b);DvtSvgUtils.appendChildElem(a,f);DvtSvgUtils.appendChildElem(a,h);DvtSvgUtils.appendChildElem(a,k);DvtSvgUtils.appendChildElem(a,e);DvtSvgUtils.appendChildElem(a,c)};
var DvtSvgDisplayable=function(a,b){this._Init(a)};DvtObj.createSubclass(DvtSvgDisplayable,DvtObj,"DvtSvgDisplayable");DvtSvgDisplayable._ATTRS_TRANSFERABLE_TO_OUTER=["clip-path"];DvtSvgDisplayable._CREATE_EVENT_TYPE_MAP={click:DvtMouseEvent.CLICK,mouseover:DvtMouseEvent.MOUSEOVER,mouseout:DvtMouseEvent.MOUSEOUT,mousemove:DvtMouseEvent.MOUSEMOVE,keydown:DvtKeyboardEvent.KEYDOWN,keyup:DvtKeyboardEvent.KEYUP};
DvtSvgDisplayable.prototype._Init=function(a,b){a&&(this._id=a);this._Parent=null;this._elem=DvtSvgShapeUtils.createElement(b,this._id);this._elem._obj=this;this._bVisible=!0;this._filter=null;this._pixelHinting=!1;this._cursor=null;this._bMouseEnabled=!0;this._alpha=1;this._desc=this._captureClosure=this._bubbleClosure=this._matrix=null};DvtSvgDisplayable.prototype.getElem=function(){return this._elem};DvtSvgDisplayable.prototype.getOuterElem=function(){return this._outerElem?this._outerElem:this.getElem()};
DvtSvgDisplayable.prototype.getId=function(){return this._id};DvtSvgDisplayable.prototype.setId=function(a){this._id!==a&&(a&&0===a.length&&(a=null),(this._id=a)?DvtSvgUtils.setAttrNullNS(this._elem,"id",a):DvtSvgUtils.removeAttrNullNS(this._elem,"id"))};DvtSvgDisplayable.prototype.getObj=function(){return this._obj};DvtSvgDisplayable.prototype.setObj=function(a){this._obj=a};DvtSvgDisplayable.prototype.getParent=function(){return this._obj.getParent()};DvtSvgDisplayable.prototype.setParent=function(a){this._obj.setParent(a)};
DvtSvgDisplayable.prototype.getPixelHinting=function(){return this._pixelHinting};DvtSvgDisplayable.prototype.setPixelHinting=function(a){(this._pixelHinting=a)?DvtSvgUtils.setAttrNullNS(this._elem,"shape-rendering","crispEdges"):DvtSvgUtils.removeAttrNullNS(this._elem,"shape-rendering")};DvtSvgDisplayable.prototype.getVisible=function(){return this._bVisible};
DvtSvgDisplayable.prototype.setVisible=function(a){if(this._bVisible!==a){this._bVisible=a;var b=this instanceof DvtSvgMarker?this._elem:this.getElem();a?DvtSvgUtils.removeAttrNullNS(b,"visibility"):DvtSvgUtils.setAttrNullNS(b,"visibility","hidden")}};
DvtSvgDisplayable.prototype.setClipPath=function(a){if(a){!this._outerElem&&this._matrix&&this._createOuterGroupElem();var b=a.getId();if(b){var c=this.getObj().getCtx();DvtSvgShapeUtils.addClipPath(a,c)&&DvtSvgUtils.setAttrNullNS(this.getOuterElem(),"clip-path","url(#"+b+")")}}else DvtSvgUtils.removeAttrNullNS(this.getOuterElem(),"clip-path")};DvtSvgDisplayable.prototype.addClipPath=function(a,b){return DvtSvgShapeUtils.addClipPath(a,b)};
DvtSvgDisplayable.prototype.getDimensions=function(){try{var a=this.getElem().getBBox()}catch(b){return null}return new DvtRectangle(a.x,a.y,a.width,a.height)};DvtSvgDisplayable.prototype.getDimensionsWithStroke=function(){return this.GetDimensionsWithStroke()};DvtSvgDisplayable.prototype.GetDimensionsWithStroke=function(a){var b=this.GetElemDimensionsWithStroke();return a&&a!==this.getObj()?this.getObj().ConvertCoordSpaceRect(b,a):b};
DvtSvgDisplayable.prototype.GetElemDimensionsWithStroke=function(){var a=null;try{a=this._elem.getBBox()}catch(b){return null}return new DvtRectangle(a.x,a.y,a.width,a.height)};DvtSvgDisplayable.HasAttributes=function(a,b){if(b)for(var c=b.length,d=0;d<c;d++)if(DvtSvgUtils.getAttrNullNS(a,b[d]))return!0;return!1};
DvtSvgDisplayable.TransferAttributes=function(a,b,c){if(c)for(var d,e,f=c.length,g=0;g<f;g++)if(d=c[g],e=DvtSvgUtils.getAttrNullNS(a,d))DvtSvgUtils.removeAttrNullNS(a,d),DvtSvgUtils.setAttrNullNS(b,d,e),DvtAgent.isPlatformIE()&&DvtSvgUtils.setAttrNullNS(a,d,null)};
DvtSvgDisplayable.prototype._createOuterGroupElem=function(){if(!this._outerElem){this._outerElem=DvtSvgShapeUtils.createElement("g",this._id?this._id+"_outer":null);var a=this.getParent();a&&a.getImpl().getElem().replaceChild(this._outerElem,this.getElem());DvtSvgUtils.appendChildElem(this._outerElem,this.getElem());DvtSvgDisplayable.TransferAttributes(this.getElem(),this._outerElem,DvtSvgDisplayable._ATTRS_TRANSFERABLE_TO_OUTER)}};
DvtSvgDisplayable.prototype.addListener=function(a,b){var c=this._getListener(b);if(a==DvtKeyboardEvent.KEYUP||a==DvtKeyboardEvent.KEYDOWN){if(this.getObj()){var d=this.getObj().getCtx().getStage().getImpl().getSVGRoot().parentNode;d._obj||(d._obj=[]);-1==DvtArrayUtils.getIndex(d._obj,this)&&d._obj.push(this);c=DvtHtmlKeyboardListenerUtils.getListener(b);DvtSvgUtils.addDomEventListener(d,a,c,b)}}else this.AddElemListener(a,c,b)};
DvtSvgDisplayable.prototype.AddElemListener=function(a,b,c){DvtSvgUtils.addDomEventListener(this.getElem(),a,b,c);a==DvtTouchEvent.TOUCHEND&&DvtSvgUtils.addDomEventListener(this.getElem(),DvtTouchEvent.TOUCHCANCEL,b,c)};
DvtSvgDisplayable.prototype.removeListener=function(a,b){var c=this._getListener(b);if(a==DvtKeyboardEvent.KEYUP||a==DvtKeyboardEvent.KEYDOWN){if(this.getObj()){var d=this.getObj().getCtx().getStage().getImpl().getSVGRoot().parentNode;DvtSvgUtils.removeDomEventListener(d,a,c,b);c=DvtArrayUtils.getIndex(d._obj,this);-1!==c&&d._obj.splice(c)}}else DvtSvgUtils.removeDomEventListener(this.getElem(),a,c,b)};
DvtSvgDisplayable.prototype._getListener=function(a){var b=this;if(a)return this._captureClosure||(this._captureClosure=function(a){b._captureListener(a)}),this._captureClosure;this._bubbleClosure||(this._bubbleClosure=function(a){b._bubbleListener(a)});return this._bubbleClosure};
DvtSvgDisplayable.prototype._bubbleListener=function(a){if(DvtAgent.isPlatformIE())if(a.type==DvtMouseEvent.MOUSEOVER){if(this._bubbleHoverItem){if(this._bubbleHoverItem==a.target)return;var b=DvtSvgEventFactory.newEvent(a,this.getObj().getCtx());b.modifyEventForIE(DvtMouseEvent.MOUSEOUT,this._bubbleHoverItem);this.getObj().FireListener(b,!1)}this._bubbleHoverItem=a.target}else a.type==DvtMouseEvent.MOUSEOUT&&(this._bubbleHoverItem=null);b=DvtSvgEventFactory.newEvent(a,this.getObj().getCtx());this.getObj().FireListener(b,
!1)};
DvtSvgDisplayable.prototype._captureListener=function(a){if(DvtAgent.isPlatformIE())if(a.type==DvtMouseEvent.MOUSEOVER){if(this._captureHoverItem){if(this._captureHoverItem==a.target)return;var b=DvtSvgEventFactory.newEvent(a,this.getObj().getCtx());b.modifyEventForIE(DvtMouseEvent.MOUSEOUT,this._captureHoverItem);this.getObj().FireListener(b,!0)}this._captureHoverItem=a.target}else a.type==DvtMouseEvent.MOUSEOUT&&(this._captureHoverItem=null);b=DvtSvgEventFactory.newEvent(a,this.getObj().getCtx());this.getObj().FireListener(b,
!0)};DvtSvgDisplayable.prototype.getCSSStyle=function(){return this._cssStyle};DvtSvgDisplayable.prototype.setCSSStyle=function(a){this._cssStyle=a};DvtSvgDisplayable.prototype.setCursor=function(a){(this._cursor=a)?DvtSvgUtils.setAttrNullNS(this.getElem(),"cursor",a):DvtSvgUtils.removeAttrNullNS(this.getElem(),"cursor")};DvtSvgDisplayable.prototype.getCursor=function(){return this._cursor};
DvtSvgDisplayable.prototype.setMouseEnabled=function(a){a=(this._bMouseEnabled=a)?"visiblePainted":"none";DvtSvgUtils.setAttrNullNS(this.getElem(),"pointer-events",a)};DvtSvgDisplayable.prototype.isMouseEnabled=function(){return this._bMouseEnabled};DvtSvgDisplayable.prototype.getAlpha=function(){return this._alpha};DvtSvgDisplayable.prototype.setAlpha=function(a){1E-5>a&&(a=0);a!==this._alpha&&(this._alpha=a,DvtSvgUtils.setAttrNullNS(this.getElem(),"opacity",this._alpha))};
DvtSvgDisplayable.prototype.setMatrix=function(a){!this._outerElem&&DvtSvgDisplayable.HasAttributes(this.getElem(),DvtSvgDisplayable._ATTRS_TRANSFERABLE_TO_OUTER)&&this._createOuterGroupElem();(this._matrix=a)?(a="matrix("+a.getA()+","+a.getC()+","+a.getB()+","+a.getD()+","+a.getTx()+","+a.getTy()+")",this.SetElemMatrix(a)):DvtSvgUtils.getAttrNullNS(this.getElem(),"transform")&&(DvtSvgUtils.removeAttrNullNS(this.getElem(),"transform"),DvtAgent.isPlatformIE()&&DvtSvgUtils.setAttrNullNS(this.getElem(),
"transform",null))};DvtSvgDisplayable.prototype.SetElemMatrix=function(a){DvtSvgUtils.setAttrNullNS(this.getElem(),"transform",a)};
DvtSvgDisplayable.prototype.applyDrawEffects=function(a){!this._outerElem&&this._matrix&&this._createOuterGroupElem();this._filter&&(DvtSvgUtils.removeAttrNullNS(this.getOuterElem(),"filter"),this.getObj().getCtx().removeDefs(this._filter),this._filter=null);a&&0<a.length&&(this._filter=DvtSvgFilterUtils.createFilter(a,this))&&(this.getObj().getCtx().appendDefs(this._filter),a=DvtSvgUtils.getAttrNullNS(this._filter,"id"),DvtSvgUtils.setAttrNullNS(this.getOuterElem(),"filter","url(#"+a+")"))};
DvtSvgDisplayable.prototype.setAriaRole=function(a){a?DvtSvgUtils.setAttrNullNS(this.getElem(),"role",a):DvtSvgUtils.removeAttrNullNS(this.getElem(),"role")};DvtSvgDisplayable.prototype.setAriaProperty=function(a,b){b?DvtSvgUtils.setAttrNullNS(this.getElem(),"aria-"+a,b):DvtSvgUtils.removeAttrNullNS(this.getElem(),"aria-"+a)};
DvtSvgDisplayable.prototype.stageToLocal=function(a){for(var b=this.getObj(),c=b.getPathToStage(),d=c.length-1;0<=d;d--)b=c[d],b=b.getMatrix().clone(),b.invert(),a=b.transformPoint(a);return a};DvtSvgDisplayable.prototype.localToStage=function(a){for(var b=this.getObj(),c=b.getPathToStage(),d=0;d<c.length;d++)b=c[d],b=b.getMatrix(),a=b.transformPoint(a);return a};
DvtSvgDisplayable.prototype.createCopy=function(a){var b=this.getElem().cloneNode(!0);DvtSvgUtils.appendChildElem(a.getImpl().getElem(),b);this._disableEvents(b)};DvtSvgDisplayable.prototype._disableEvents=function(a){for(a=a.firstChild;null!=a;)a.setAttributeNS&&(DvtSvgUtils.setAttrNullNS(a,"pointer-events","none"),DvtSvgUtils.setAttrNullNS(a,"id",null)),this._disableEvents(a),a=a.nextSibling};
DvtSvgDisplayable.prototype.dispatchDisplayableEvent=function(a,b){var c=DvtSvgDisplayable._CREATE_EVENT_TYPE_MAP[a],d;if(DvtMouseEvent.CLICK==c||DvtMouseEvent.MOUSEOVER==c||DvtMouseEvent.MOUSEOUT==c||DvtMouseEvent.MOUSEMOVE==c){if(document.createEvent){d=this.getObj().getCtx();var e=this.getObj().getDimensions(),e=this.getObj().localToStage(new DvtPoint(e.x,e.y));d=d.getStageAbsolutePosition();d=new DvtPoint(d.x+e.x,d.y+e.y);e=document.createEvent("MouseEvents");e.initMouseEvent(c,!0,!0,window,1,
d.x,d.y,d.x,d.y,!1,!1,!1,!1,0,null);this.getElem().dispatchEvent(e)}}else DvtKeyboardEvent.KEYDOWN!=c&&DvtKeyboardEvent.KEYUP!=c||!document.createEvent||(e=document.createEvent("KeyboardEvent"),d=parseInt(b),void 0===this._ctrlKeyPressed&&(this._ctrlKeyPressed=!1),void 0===this._shiftKeyPressed&&(this._shiftKeyPressed=!1),d==DvtKeyboardEvent.CONTROL?this._ctrlKeyPressed&&c==DvtKeyboardEvent.KEYUP?this._ctrlKeyPressed=!1:this._ctrlKeyPressed||c!=DvtKeyboardEvent.KEYDOWN||(this._ctrlKeyPressed=!0):
d==DvtKeyboardEvent.SHIFT&&(this._shiftKeyPressed&&c==DvtKeyboardEvent.KEYUP?this._shiftKeyPressed=!1:this._shiftKeyPressed||c!=DvtKeyboardEvent.KEYDOWN||(this._shiftKeyPressed=!0)),"undefined"!=typeof e.initKeyboardEvent?e.initKeyboardEvent(c,!0,!0,window,this._ctrlKeyPressed,!1,this._shiftKeyPressed,!1,d,d):e.initKeyEvent(c,!0,!0,window,this._ctrlKeyPressed,!1,!1,this._shiftKeyPressed,d,d),c=DvtSvgEventFactory.newEvent(e),c.keyCode=d,c.ctrlKey=this._ctrlKeyPressed,c.shiftKey=this._shiftKeyPressed,
this.getObj()&&(d=this.getObj().getCtx(),d=d.getStage().getImpl().getSVGRoot().parentNode,DvtHtmlKeyboardListenerUtils._bubbleListener.call(d,c)))};DvtSvgDisplayable.prototype.setDesc=function(a){if(a&&this._desc!=a)if(!this._desc)this._createDesc(a);else if(this._desc!=a){for(var b=!1,c=this.getElem().firstChild;null!=c;){if("desc"==c.tagName){if(b=c.firstChild)b.nodeValue=a;this._desc=a;b=!0;break}c=c.nextSibling}b||this._createDesc(a)}};
DvtSvgDisplayable.prototype._createDesc=function(a){if(a){var b=DvtSvgShapeUtils.createElement("desc",null),c=document.createTextNode(a);DvtSvgUtils.appendChildElem(b,c);DvtSvgUtils.appendChildElem(this.getElem(),b);this._desc=a}};DvtSvgDisplayable.prototype.dispatchNativeEvent=function(a){};var DvtSvgContainer=function(a,b){this._Init(a,b)};DvtObj.createSubclass(DvtSvgContainer,DvtSvgDisplayable,"DvtSvgContainer");DvtSvgContainer.AttributesTransferableToGroup="transform opacity style visibility pointer-events clip-path".split(" ");
DvtSvgContainer.prototype.addChild=function(a){this._bShapeContainer&&this.CreateChildGroupElem(!1);var b=this.getContainerElem();DvtSvgUtils.appendChildElem(b,a.getOuterElem())};DvtSvgContainer.prototype.addChildAt=function(a,b){var c=b;this._bShapeContainer&&(this.CreateChildGroupElem(!1),c++);var d=this.getContainerElem();(c=d.childNodes[c])||(c=null);d.insertBefore(a.getOuterElem(),c)};DvtSvgContainer.prototype.GetAttributesTransferableToGroup=function(){return DvtSvgContainer.AttributesTransferableToGroup};
DvtSvgContainer.prototype.addChildAfter=function(a,b){};DvtSvgContainer.prototype.addChildBefore=function(a,b){};DvtSvgContainer.prototype.getElem=function(){return this._childGroupElem?this._childGroupElem:this._elem};DvtSvgContainer.prototype._Init=function(a,b){this._bShapeContainer=this instanceof DvtSvgShape;DvtSvgContainer.superclass._Init.call(this,a,b);this._childGroupElem=null};
DvtSvgContainer.prototype.removeChild=function(a){var b=a.getOuterElem();a=a.getParent();b&&a&&this.getContainerElem().removeChild(b);!this._anchorElem&&this._bShapeContainer&&1===this.getObj().getNumChildren()&&(a=(b=this._childGroupElem)?b.parentNode:null)&&(DvtSvgDisplayable.TransferAttributes(b,this._elem,this.GetAttributesTransferableToGroup()),a.replaceChild(this._elem,b),this._childGroupElem=null)};
DvtSvgContainer.prototype.swap=function(a,b){var c=a.getElem(),d=objw.getElem(),e=a.getParent(),f=d.nextSibling;e&&c&&d&&(e.replaceChild(c,d),e.insertBefore(c,f),c=a.getIndex(),d=b.getIndex(),this._arList[c]=b,this._arList[d]=a)};
DvtSvgContainer.prototype.CreateChildGroupElem=function(a,b){if(this._childGroupElem||!b&&0!==this.getObj().getNumChildren())a&&this.getObj().removeChildren();else{this._childGroupElem=DvtSvgShapeUtils.createElement("g",this._id?this._id+"_g":null);var c=this.getParent();c&&(c=c.getImpl().getElem(),c.replaceChild(this._childGroupElem,this._elem));a||DvtSvgUtils.appendChildElem(this._childGroupElem,this._elem);DvtSvgDisplayable.TransferAttributes(this._elem,this._childGroupElem,this.GetAttributesTransferableToGroup());
this._elem._obj&&(this._childGroupElem._obj=this._elem._obj)}};DvtSvgContainer.prototype.getDimensionsWithStroke=function(){for(var a=[],b=this.getObj().getNumChildren(),c=0;c<b;c++)a.push(this.getObj().getChildAt(c));for(var d=null;0<a.length;){var e=a.shift();(b=e.getImpl().GetDimensionsWithStroke(this.getObj()))&&(d=d?d.getUnion(b):b);b=e.getNumChildren();for(c=0;c<b;c++)a.push(e.getChildAt(c))}return d};DvtSvgContainer.prototype.GetDimensionsWithStroke=function(a){return null};
DvtSvgContainer.prototype.setHyperlink=function(a){var b,c,d;a&&(b=a.destination,c=a.targetFrame,d=a.focusable);a=this.getElem();var e;this._anchorElem?(e=this._anchorElem,b?(DvtSvgUtils.setAttrNS(e,DvtSvgImage.XLINK_NS,"xlink:href",b),c?DvtSvgUtils.setAttrNullNS(e,"target",c):DvtSvgUtils.removeAttrNullNS(e,"target"),d&&DvtSvgUtils.setAttrNullNS(e,"focusable",d)):(a&&e.parentNode==a&&(a.removeChild(e),DvtSvgContainer._reparentChildren(a,e)),this.setCursor("default"),this._anchorElem=null)):(e=DvtSvgShapeUtils.createElement("a"),
b&&DvtSvgUtils.setAttrNS(e,DvtSvgImage.XLINK_NS,"xlink:href",b),c&&DvtSvgUtils.setAttrNullNS(e,"target",c),d&&DvtSvgUtils.setAttrNullNS(e,"focusable",d),this._bShapeContainer&&this.CreateChildGroupElem(!1,!0),a=this.getElem(),DvtSvgContainer._reparentChildren(e,a),DvtSvgUtils.appendChildElem(a,e),this.setCursor(DvtSelectionEffectUtils.getSelectingCursor()),this._anchorElem=e)};
DvtSvgContainer._reparentChildren=function(a,b){var c=b.childNodes;if(c)for(var d,e,f=c.length-1;0<=f;f--)d=c[f],e?a.insertBefore(d,e):DvtSvgUtils.appendChildElem(a,d),e=d};DvtSvgContainer.prototype.getContainerElem=function(){return this._anchorElem?this._anchorElem:this.getElem()};DvtSvgContainer.prototype.dispatchNativeEvent=function(a){a=a.getNativeEvent();var b=null,b=this._bShapeContainer?this._childGroupElem:this._anchorElem?this._anchorElem:this._elem;b.dispatchEvent&&b.dispatchEvent(a)};
var DvtSvgStage=function(a,b){this._Init(a,b)};DvtObj.createSubclass(DvtSvgStage,DvtSvgContainer,"DvtSvgStage");DvtSvgStage.prototype.appendDefs=function(a){DvtSvgUtils.appendChildElem(this._elemDefs,a)};DvtSvgStage.prototype.getDefs=function(){return this._elemDefs};DvtSvgStage.prototype.getSVGRoot=function(){return this._SVGRoot};
DvtSvgStage.prototype._Init=function(a,b){DvtSvgStage.superclass._Init.call(this,b,"g");this._SVGRoot=a;this._bAppended=!0;this._obj=null;this.disableSelection(this._elem);this.setCursor("default")};DvtSvgStage.prototype.disableSelection=function(a){a.onselectstart=function(){return!1};a.onselect=function(){return!1}};var DvtSvgShapeUtils=function(){};DvtObj.createSubclass(DvtSvgShapeUtils,DvtObj,"DvtSvgShapeUtils");DvtSvgShapeUtils._uniqueSeed=0;DvtSvgShapeUtils._Stage=null;
DvtSvgShapeUtils.addClipPath=function(a,b){var c=a.getId();if(!c)return!1;var d=b.getDefs();if(!d)return!1;for(var e=d.childNodes,f=e.length,d=0;d<f;d++)if(e[d].id===c)return!0;c=DvtSvgShapeUtils.createElement("clipPath",c);b.appendDefs(c);e=a.getRegions();for(d=0;d<e.length;d++)if(f=e[d]){var g=null;f.type===DvtGraphClipPath.RECT?(g=DvtSvgShapeUtils.createElement("rect"),DvtSvgUtils.setAttrNullNS(g,"x",f.x),DvtSvgUtils.setAttrNullNS(g,"y",f.y),DvtSvgUtils.setAttrNullNS(g,"width",f.w),DvtSvgUtils.setAttrNullNS(g,
"height",f.h),f.rx&&DvtSvgUtils.setAttrNullNS(g,"rx",f.rx),f.ry&&DvtSvgUtils.setAttrNullNS(g,"ry",f.ry)):f.type===DvtGraphClipPath.PATH?(g=DvtSvgShapeUtils.createElement("path"),DvtSvgUtils.setAttrNullNS(g,"d",f.d)):f.type===DvtGraphClipPath.POLYGON?(g=DvtSvgShapeUtils.createElement("polygon"),DvtSvgUtils.setAttrNullNS(g,"points",f.points)):f.type===DvtGraphClipPath.ELLIPSE?(g=DvtSvgShapeUtils.createElement("ellipse"),DvtSvgUtils.setAttrNullNS(g,"cx",f.cx),DvtSvgUtils.setAttrNullNS(g,"cy",f.cy),DvtSvgUtils.setAttrNullNS(g,
"rx",f.rx),DvtSvgUtils.setAttrNullNS(g,"ry",f.ry)):f.type===DvtGraphClipPath.CIRCLE&&(g=DvtSvgShapeUtils.createElement("circle"),DvtSvgUtils.setAttrNullNS(g,"cx",f.cx),DvtSvgUtils.setAttrNullNS(g,"cy",f.cy),DvtSvgUtils.setAttrNullNS(g,"r",f.r));g&&DvtSvgUtils.appendChildElem(c,g)}return!0};DvtSvgShapeUtils.createElement=function(a,b){var c=document.createElementNS(DvtSvgUtils.SVG_NS,a);b&&DvtSvgUtils.setAttrNullNS(c,"id",b);return c};
DvtSvgShapeUtils.getUniqueId=function(a,b){var c=(b?b:"$")+DvtSvgShapeUtils._uniqueSeed++;return DvtAgent.isEnvironmentTest()?(a?a.getStage().getId()+"_":"")+c:c};DvtSvgShapeUtils.convertPointsArray=function(a){for(var b=a.length,c="",d=0;d<b;d++)0<d&&(c+=" "),c+=a[d];return c};var DvtSvgShape=function(a,b){this._Init(a,b)};DvtObj.createSubclass(DvtSvgShape,DvtSvgContainer,"DvtSvgShape");
DvtSvgShape.prototype._Init=function(a,b){DvtSvgShape.superclass._Init.call(this,a,b);this._origStroke=this._origFill=this._fill=this._stroke=null;this._bHollow=!1;DvtSvgUtils.setAttrNullNS(this._elem,"fill","none")};DvtSvgShape.prototype.getFill=function(){return this._fill};
DvtSvgShape.prototype.setFill=function(a){this._manageDefinitions(this._fill,a);if(!a)DvtSvgUtils.setAttrNullNS(this._elem,"fill","none"),DvtSvgUtils.removeAttrNullNS(this._elem,"fill-opacity"),this._fill=null;else if(this._fill!==a)if(this._fill=a,a instanceof DvtGradientFill||a instanceof DvtImageFill||a instanceof DvtPatternFill)this._setSpecFill(a);else{var b=a.getColor();b&&(a=a.getAlpha(),DvtAgent.isBrowserSafari()&&-1!==b.indexOf("rgba")?(DvtSvgUtils.setAttrNullNS(this._elem,"fill",DvtColorUtils.getRGB(b)),
null!=a?DvtSvgUtils.setAttrNullNS(this._elem,"fill-opacity",DvtColorUtils.getAlpha(b)*a):DvtSvgUtils.setAttrNullNS(this._elem,"fill-opacity",DvtColorUtils.getAlpha(b))):(DvtSvgUtils.setAttrNullNS(this._elem,"fill",b),null!=a&&DvtSvgUtils.setAttrNullNS(this._elem,"fill-opacity",a)))}};
DvtSvgShape.prototype._setSpecFill=function(a,b){var c;a.isLocked()?c=a.getId():(c=a.getId(),c||(c=a instanceof DvtPatternFill?DvtSvgShapeUtils.getUniqueId(this.getObj().getCtx(),"pat"):DvtSvgShapeUtils.getUniqueId(this.getObj().getCtx(),"Gr"),a.setId(c)));if(!a._defPresent){var d=a._defElem;d||(a instanceof DvtGradientFill?d=DvtSvgGradientUtils.createElem(a,c):a instanceof DvtImageFill?d=DvtSvgImageFillUtils.createElem(a,c):a instanceof DvtPatternFill&&(d=DvtSvgPatternFillUtils.createElem(a,c)));
a._defElem=d;this.getObj().getCtx().appendDefs(d);a._defPresent=!0}DvtSvgUtils.setAttrNullNS(this._elem,"fill","url(#"+c+")");DvtSvgUtils.setAttrNullNS(this._elem,"fill-opacity","1")};DvtSvgShape.prototype.getStroke=function(){return this._stroke};
DvtSvgShape.prototype.setStroke=function(a){this._manageDefinitions(this._stroke,a);if(this._stroke=a){if(a instanceof DvtGradientStroke)this._setSpecStroke(a);else{var b=a.getColor();if(b){var c=a.getAlpha();DvtAgent.isBrowserSafari()&&-1!==b.indexOf("rgba")?(DvtSvgUtils.setAttrNullNS(this._elem,"stroke",DvtColorUtils.getRGB(b)),null!=c?DvtSvgUtils.setAttrNullNS(this._elem,"stroke-opacity",DvtColorUtils.getAlpha(b)*c):DvtSvgUtils.setAttrNullNS(this._elem,"stroke-opacity",DvtColorUtils.getAlpha(b))):
(DvtSvgUtils.setAttrNullNS(this._elem,"stroke",b),null!=c&&DvtSvgUtils.setAttrNullNS(this._elem,"stroke-opacity",c))}}DvtSvgUtils.setAttrNullNS(this._elem,"stroke-width",a.getWidth());a.isFixedWidth()&&DvtSvgUtils.setAttrNullNS(this._elem,"vector-effect","non-scaling-stroke");a.getType()!==DvtStroke.SOLID?(DvtSvgUtils.setAttrNullNS(this._elem,"stroke-dasharray",a.getDash()),a.getDashOffset()&&DvtSvgUtils.setAttrNullNS(this._elem,"stroke-dashoffset",a.getDashOffset())):(DvtSvgUtils.removeAttrNullNS(this._elem,
"stroke-dasharray"),DvtSvgUtils.removeAttrNullNS(this._elem,"stroke-dashoffset"));(attrib=a.getLineJoin())&&DvtSvgUtils.setAttrNullNS(this._elem,"stroke-linejoin",attrib);(attrib=a.getLineEnd())&&DvtSvgUtils.setAttrNullNS(this._elem,"stroke-linecap",attrib);(attrib=a.getMiterLimit())&&DvtSvgUtils.setAttrNullNS(this._elem,"stroke-miterlimit",attrib)}else DvtSvgUtils.removeAttrNullNS(this._elem,"stroke"),DvtSvgUtils.removeAttrNullNS(this._elem,"stroke-opacity"),DvtSvgUtils.removeAttrNullNS(this._elem,
"stroke-width"),DvtSvgUtils.removeAttrNullNS(this._elem,"stroke-dasharray"),DvtSvgUtils.removeAttrNullNS(this._elem,"stroke-dashoffset"),DvtSvgUtils.removeAttrNullNS(this._elem,"stroke-linejoin"),DvtSvgUtils.removeAttrNullNS(this._elem,"stroke-linecap"),DvtSvgUtils.removeAttrNullNS(this._elem,"stroke-miterlimit")};
DvtSvgShape.prototype._setSpecStroke=function(a,b){var c;a.isLocked()?c=a.getId():(c=a.getId(),c||(c=DvtSvgShapeUtils.getUniqueId(this.getObj().getCtx(),"Gr"),a.setId(c)));if(!a._defPresent){var d=a._defElem;d||(d=DvtSvgGradientUtils.createElem(a,c));a._defElem=d;this.getObj().getCtx().appendDefs(d);a._defPresent=!0}DvtSvgUtils.setAttrNullNS(this._elem,"stroke","url(#"+c+")");c=a.getAlpha();null!=c&&DvtSvgUtils.setAttrNullNS(this._elem,"stroke-opacity",c)};
DvtSvgShape.prototype.setHollow=function(a,b){if(this._bHollow)this.setFill(this._origFill),this.setStroke(this._origStroke),this._bHollow=!1;else{this._origFill=this._fill;this._origStroke=this._stroke;var c=DvtSolidFill.invisibleFill(),d;d=a?new DvtSolidStroke(DvtColorUtils.getRGB(a),DvtColorUtils.getAlpha(a),b):new DvtSolidStroke(this._fill.getColor(),this._fill.getAlpha(),b);this.setFill(c);this.setStroke(d);this._bHollow=!0}};DvtSvgShape.prototype.isHollow=function(){return this._bHollow};
DvtSvgShape.prototype._manageDefinitions=function(a,b){a!=b&&(a&&(a._referenceCount--,0==a._referenceCount&&a._defElem&&(this.getObj().getCtx().removeDefs(a._defElem),a._defPresent=!1)),b&&(b._referenceCount||(b._referenceCount=0),b._referenceCount++))};DvtSvgShape.prototype.getDimensionsWithStroke=function(){var a=this.GetElemDimensionsWithStroke(),b=DvtSvgShape.superclass.getDimensionsWithStroke.call(this);a&&b?a=a.getUnion(b):b&&(a=b);return a};
DvtSvgShape.prototype.GetDimensionsWithStroke=function(a){var b=this.GetElemDimensionsWithStroke();return a&&a!==this.getObj()?this.getObj().ConvertCoordSpaceRect(b,a):b};DvtSvgShape.prototype.GetElemDimensionsWithStroke=function(){var a=DvtSvgShape.superclass.GetElemDimensionsWithStroke.call(this),b=this.getStroke();if(a&&b&&(b=b.getWidth())){var c=.5*b;a.x-=c;a.y-=c;a.w+=b;a.h+=b}return a};var DvtSvgArc=function(a,b,c,d,e,f,g,h){this._Init(a,b,c,d,e,f,g,h)};
DvtObj.createSubclass(DvtSvgArc,DvtSvgShape,"DvtSvgArc");DvtSvgArc.prototype._addClosure=function(a){this._ct===DvtArc.CHORD?a+=" z":this._ct===DvtArc.PIE?a+=" L "+this._cx+","+this._cy+" z":this._ct===DvtArc.OPEN&&this.setFill(null);return a};
DvtSvgArc.prototype._createArc=function(){if(!this._bInInit){var a=this._sa*DvtMath.RADS_PER_DEGREE,b=this._ae*DvtMath.RADS_PER_DEGREE,a="M "+(this._cx+this._rx*Math.cos(a))+" "+(this._cy-this._ry*Math.sin(a))+" A "+this._rx+","+this._ry+" 0 "+(180<Math.abs(this._ae)?"1":"0")+","+(0<this._ae?"0":"1")+" "+(this._cx+this._rx*Math.cos(a+b))+","+(this._cy-this._ry*Math.sin(a+b)),a=this._addClosure(a);DvtSvgUtils.setAttrNullNS(this._elem,"d",a);null!==this._stroke&&this.setStroke(this._stroke)}};
DvtSvgArc.prototype.getAngleExtent=function(){return this._ae};DvtSvgArc.prototype.setAngleExtent=function(a){a=null===a||isNaN(a)?0:a;this._ae!==a&&(360===a&&(a=359.99),this._ae=a,this._createArc())};DvtSvgArc.prototype.getAngleStart=function(){return this._sa};DvtSvgArc.prototype.setAngleStart=function(a){a=null===a||isNaN(a)?0:a;this._sa!==a&&(this._sa=a,this._createArc())};DvtSvgArc.prototype.getClosure=function(){return this._ct};
DvtSvgArc.prototype.setClosure=function(a){a!==this._ct&&(this._ct=a,this._createArc())};DvtSvgArc.prototype._Init=function(a,b,c,d,e,f,g,h){DvtSvgArc.superclass._Init.call(this,h,"path");this._ae=this._sa=0;d=null===d||isNaN(d)?c:d;this._bInInit=!0;this.setCx(a);this.setCy(b);this.setRx(c);this.setRy(d);this.setAngleStart(e);this.setAngleExtent(f);this.setClosure(g?g:DvtArc.OPEN);this._bInInit=!1;this._createArc()};DvtSvgArc.prototype.setArc=function(a,b){this.setAngleStart(a);this.setAngleExtentStart(b)};
DvtSvgArc.prototype.getCx=function(){return this._cx};DvtSvgArc.prototype.setCx=function(a){a!==this._cx&&(this._cx=a,DvtSvgUtils.setAttrNullNS(this._elem,"cx",a))};DvtSvgArc.prototype.getCy=function(){return this._cy};DvtSvgArc.prototype.setCy=function(a){a!==this._cy&&(this._cy=a,DvtSvgUtils.setAttrNullNS(this._elem,"cy",a))};DvtSvgArc.prototype.getRx=function(){return this._rx};DvtSvgArc.prototype.setRx=function(a){a!==this._rx&&(this._rx=a,DvtSvgUtils.setAttrNullNS(this._elem,"rx",this._rx))};
DvtSvgArc.prototype.getRy=function(){return this._ry};DvtSvgArc.prototype.setRy=function(a){a!==this._ry&&(this._ry=a,DvtSvgUtils.setAttrNullNS(this._elem,"ry",this._ry))};var DvtSvgCircle=function(a,b,c,d){this._Init(a,b,c,d)};DvtObj.createSubclass(DvtSvgCircle,DvtSvgShape,"DvtSvgCircle");DvtSvgCircle.prototype._Init=function(a,b,c,d,e){DvtSvgCircle.superclass._Init.call(this,d,e?e:"circle");this.setCx(a);this.setCy(b);this.setRadius(c)};DvtSvgCircle.prototype.getCx=function(){return this._cx};
DvtSvgCircle.prototype.setCx=function(a){a!==this._cx&&(this._cx=a,DvtSvgUtils.setAttrNullNS(this._elem,"cx",a))};DvtSvgCircle.prototype.getCy=function(){return this._cy};DvtSvgCircle.prototype.setCy=function(a){a!==this._cy&&(this._cy=a,DvtSvgUtils.setAttrNullNS(this._elem,"cy",a))};DvtSvgCircle.prototype.getRadius=function(){return this._r};DvtSvgCircle.prototype.setRadius=function(a){a!==this._r&&(this._r=a,DvtSvgUtils.setAttrNullNS(this._elem,"r",a))};
var DvtSvgImage=function(a,b,c,d,e,f){this._Init(a,b,c,d,e,f)};DvtObj.createSubclass(DvtSvgImage,DvtSvgShape,"DvtSvgImage");DvtSvgImage.XLINK_NS="http://www.w3.org/1999/xlink";DvtSvgImage.prototype._Init=function(a,b,c,d,e,f){DvtSvgImage.superclass._Init.call(this,f,"image");DvtAgent.isPlatformIE()&&(DvtSvgUtils.setAttrNullNS(this._elem,"fill","#FFFFFF"),DvtSvgUtils.setAttrNullNS(this._elem,"fill-opacity","0"));this.setImage(a,b,c,d,e)};DvtSvgImage.prototype.getHeight=function(){return this._h};
DvtSvgImage.prototype.setHeight=function(a){a!==this._h&&(this._h=a,DvtSvgUtils.setAttrNullNS(this._elem,"height",this._h))};DvtSvgImage.prototype.getPos=function(){return new DvtPoint(this._x,this._y)};DvtSvgImage.prototype.setPos=function(a,b){this.setX(a);this.setY(b)};DvtSvgImage.prototype.getX=function(){return this._x};DvtSvgImage.prototype.setX=function(a){a!==this._x&&(this._x=a,DvtSvgUtils.setAttrNullNS(this._elem,"x",this._x))};DvtSvgImage.prototype.getY=function(){return this._y};
DvtSvgImage.prototype.setY=function(a){a!==this._y&&(this._y=a,DvtSvgUtils.setAttrNullNS(this._elem,"y",this._y))};DvtSvgImage.prototype.getWidth=function(){return this._w};DvtSvgImage.prototype.setWidth=function(a){a!==this._w&&(this._w=a,DvtSvgUtils.setAttrNullNS(this._elem,"width",this._w))};DvtSvgImage.prototype.getSrc=function(){return this._src};DvtSvgImage.prototype.setSrc=function(a){a!==this._src&&(this._src=a,DvtSvgUtils.setAttrNS(this._elem,DvtSvgImage.XLINK_NS,"xlink:href",this._src))};
DvtSvgImage.prototype.setImage=function(a,b,c,d,e){b instanceof DvtImage?(this.setSrc(a.src),this.setPos(a.x,a.y),this.setWidth(a.w),this.setHeight(a.h)):(this.setSrc(a),this.setPos(b,c),this.setWidth(d),this.setHeight(e));DvtSvgUtils.setAttrNullNS(this._elem,"preserveAspectRatio","none")};DvtSvgImage.prototype.getDimensions=function(){var a=this.getElem().getBBox();return a.width&&a.height?new DvtRectangle(a.x,a.y,a.width,a.height):new DvtRectangle(a.x,a.y,this.getWidth(),this.getHeight())};
DvtSvgImage.prototype.loadImage=function(){if(this._src){var a=DvtSvgImageLoader.loadImage(this._src);if(a)return this.setWidth(a.width),this.setHeight(a.height),new DvtRectangle(0,0,this.getWidth(),this.getHeight())}return null};var DvtSvgLine=function(a,b,c,d,e){this._Init(a,b,c,d,e)};DvtObj.createSubclass(DvtSvgLine,DvtSvgShape,"DvtSvgLine");
DvtSvgLine.prototype._Init=function(a,b,c,d,e){DvtSvgLine.superclass._Init.call(this,e,"line");DvtSvgUtils.setAttrNullNS(this._elem,"fill","none");this.setX1(a);this.setY1(b);this.setX2(c);this.setY2(d);this._bHollow=!1};DvtSvgLine.prototype.getX1=function(){return this._x1};DvtSvgLine.prototype.setX1=function(a){a!==this._x1&&(this._x1=a,DvtSvgUtils.setAttrNullNS(this._elem,"x1",this._x1))};DvtSvgLine.prototype.getY1=function(){return this._y1};
DvtSvgLine.prototype.setY1=function(a){a!==this._y1&&(this._y1=a,DvtSvgUtils.setAttrNullNS(this._elem,"y1",this._y1))};DvtSvgLine.prototype.getX2=function(){return this._x2};DvtSvgLine.prototype.setX2=function(a){a!==this._x2&&(this._x2=a,DvtSvgUtils.setAttrNullNS(this._elem,"x2",this._x2))};DvtSvgLine.prototype.getY2=function(){return this._y2};DvtSvgLine.prototype.setY2=function(a){a!==this._y2&&(this._y2=a,DvtSvgUtils.setAttrNullNS(this._elem,"y2",this._y2))};
DvtSvgLine.prototype.setHollow=function(){var a=this._elem.parentNode;if(this._bHollow)this._origElem&&(a.replaceChild(this._origElem,this._elem),DvtSvgUtils.setAttrNullNS(this._origElem,"opacity",this._alpha),this._elem=this._origElem,this._origElem=null,this._bHollow=!1);else{this._origElem=this._elem;var b,c=this.getX2()-this.getX1(),d=this.getY1()-c/2,e=this.getStroke();b=DvtSvgShapeUtils.createElement("rect");DvtSvgUtils.setAttrNullNS(b,"x",this.getX1());DvtSvgUtils.setAttrNullNS(b,"y",d);DvtSvgUtils.setAttrNullNS(b,
"width",this.getX2()-this.getX1());DvtSvgUtils.setAttrNullNS(b,"height",c);if(c=e.getColor())e=e.getAlpha(),DvtAgent.isBrowserSafari()&&-1!==c.indexOf("rgba")?(DvtSvgUtils.setAttrNullNS(b,"stroke",DvtColorUtils.getRGB(c)),null!=e?DvtSvgUtils.setAttrNullNS(b,"stroke-opacity",DvtColorUtils.getAlpha(c)*e):DvtSvgUtils.setAttrNullNS(b,"stroke-opacity",DvtColorUtils.getAlpha(c))):(DvtSvgUtils.setAttrNullNS(b,"stroke",c),null!=e&&DvtSvgUtils.setAttrNullNS(b,"stroke-opacity",e));DvtSvgUtils.setAttrNullNS(b,
"fill","#ffffff");DvtSvgUtils.setAttrNullNS(b,"fill-opacity","0.001");DvtSvgUtils.setAttrNullNS(b,"shape-rendering","crispEdges");b._obj=this;a.replaceChild(b,this._elem);this._elem=b;DvtSvgUtils.setAttrNullNS(this._elem,"opacity",this._alpha);this._bHollow=!0}};DvtSvgShape.prototype.isHollow=function(){return this._bHollow};
DvtSvgLine.prototype.getDimensions=function(a){a=DvtSvgLine.superclass.getDimensions.call(this,a);if(this._childGroupElem&&this._elem){var b=this._childGroupElem.getBBox();0==b.x&&0==b.y&&0==b.width&&0==b.height&&(a=this._elem.getBBox(),a=new DvtRectangle(a.x,a.y,a.width,a.height))}return a};var DvtSvgMarker=function(a,b,c){this._Init(a,b,c)};DvtObj.createSubclass(DvtSvgMarker,DvtSvgShape,"DvtSvgMarker");DvtSvgMarker._REFERENCE_X=0;DvtSvgMarker._REFERENCE_Y=0;DvtSvgMarker._REFERENCE_W=10;
DvtSvgMarker._REFERENCE_H=10;DvtSvgMarker.MARKER_CIRCLE_ELEM_NAME="circle";DvtSvgMarker.MARKER_ELLIPSE_ELEM_NAME="ellipse";DvtSvgMarker.MARKER_LINE_ELEM_NAME="line";DvtSvgMarker.MARKER_PATH_ELEM_NAME="path";DvtSvgMarker.MARKER_POLYGON_ELEM_NAME="polygon";DvtSvgMarker.MARKER_POLYLINE_ELEM_NAME="polyline";DvtSvgMarker.MARKER_RECT_ELEM_NAME="rect";
DvtSvgMarker.prototype._Init=function(a,b,c){DvtSvgMarker.superclass._Init.call(this,b,c?c:a===DvtMarker.CIRCLE?"ellipse":a===DvtMarker.SQUARE?"rect":a===DvtMarker.ROUNDED_RECTANGLE?"rect":a===DvtMarker.TRIANGLE_UP?"polygon":a===DvtMarker.TRIANGLE_DOWN?"polygon":a===DvtMarker.DIAMOND?"polygon":a===DvtMarker.PLUS?"polygon":a===DvtMarker.HUMAN?"path":a===DvtMarker.IMAGE?"image":"rect");this._type=a;this._underlay=null;this._defaultScale=1};
DvtSvgMarker.prototype.setBounds=function(a,b,c,d,e){this._shapeInitialized||this._initShape(this._type,e,a,b,c,d)};
DvtSvgMarker.prototype._initShape=function(a,b,c,d,e,f){this._shapeInitialized=!0;this._x=c;this._y=d;this._w=e;this._h=f;if(a===DvtMarker.CUSTOM||a===DvtMarker.HUMAN){var g=DvtDisplayableUtils._getDimForced(this.getObj().getCtx(),b),h=Math.max(g.w,g.h),k=1,m=1;a===DvtMarker.CUSTOM?(k=e/(this.getObj().getMaintainAspect()?h:g.w),m=f/(this.getObj().getMaintainAspect()?h:g.h),c=c+-g.x*k+(e-g.w*k)/2,d=d+-g.y*m+(f-g.h*m)/2,this._setCustomMarker(b,c,d,k,m)):a===DvtMarker.HUMAN&&(k=e/h,m=f/h,c=c+-g.x*k+
(e-g.w*k)/2,d=d+-g.y*m+(f-g.h*m)/2,this._setCmds(DvtPathUtils.transformPath(this.getObj().getSkin()==DvtCSSStyle.SKIN_ALTA?DvtMarkerDef.HUMAN2_CMDS:DvtMarkerDef.HUMAN_CMDS,c,d,k,m)));this._defaultScale=g.h===h?f/h:e/h}else if(a===DvtMarker.IMAGE)a=this.getObj().GetMarkerImage(DvtMarker.IMAGE_SOURCE),this._setX(c),this._setY(d),this._setWidth(e),this._setHeight(f),this.setSource(a),DvtSvgUtils.setAttrNullNS(this._elem,"preserveAspectRatio","none"),DvtAgent.isPlatformIE()&&(DvtSvgUtils.setAttrNullNS(this._elem,
"fill","#FFFFFF"),DvtSvgUtils.setAttrNullNS(this._elem,"fill-opacity","0"));else if(a===DvtMarker.SQUARE)this._setX(c),this._setY(d),this._setWidth(e),this._setHeight(f);else if(a===DvtMarker.ROUNDED_RECTANGLE){this._setX(c);this._setY(d);this._setWidth(e);this._setHeight(f);c=d=6;if(e/4<d||f/4<c)c=d=Math.min(e,f)/4;this._setRX(d);this._setRY(c)}else a===DvtMarker.CIRCLE?(this._setCx(c+e/2),this._setCy(d+f/2),this._setRX(e/2),this._setRY(f/2)):(b=[],g=e/2,h=f/2,a===DvtMarker.TRIANGLE_UP?(b.push(c),
b.push(d+f),b.push(c+e),b.push(d+f),b.push(c+g),b.push(d),this._setPolygon(b)):a===DvtMarker.TRIANGLE_DOWN?(b.push(c),b.push(d),b.push(c+e),b.push(d),b.push(c+g),b.push(d+f),this._setPolygon(b)):a===DvtMarker.DIAMOND?(b.push(c+g),b.push(d),b.push(c+e),b.push(d+h),b.push(c+g),b.push(d+f),b.push(c),b.push(d+h),this._setPolygon(b)):a===DvtMarker.PLUS&&(a=e/3,g=2*a,h=f/3,k=2*h,b.push(c+a),b.push(d),b.push(c+g),b.push(d),b.push(c+g),b.push(d+h),b.push(c+e),b.push(d+h),b.push(c+e),b.push(d+k),b.push(c+
g),b.push(d+k),b.push(c+g),b.push(d+f),b.push(c+a),b.push(d+f),b.push(c+a),b.push(d+k),b.push(c),b.push(d+k),b.push(c),b.push(d+h),b.push(c+a),b.push(d+h),b.push(c+a),b.push(d),this._setPolygon(b)))};DvtSvgMarker.prototype.getDefaultScale=function(){return this._defaultScale};DvtSvgMarker.prototype.getType=function(){return this._type};DvtSvgMarker.prototype._setCx=function(a){DvtSvgUtils.setAttrNullNS(this._elem,"cx",a)};
DvtSvgMarker.prototype._setCy=function(a){DvtSvgUtils.setAttrNullNS(this._elem,"cy",a)};DvtSvgMarker.prototype._setX=function(a){DvtSvgUtils.setAttrNullNS(this._elem,"x",a)};DvtSvgMarker.prototype._setY=function(a){DvtSvgUtils.setAttrNullNS(this._elem,"y",a)};DvtSvgMarker.prototype._setWidth=function(a){DvtSvgUtils.setAttrNullNS(this._elem,"width",a)};DvtSvgMarker.prototype._setHeight=function(a){DvtSvgUtils.setAttrNullNS(this._elem,"height",a)};
DvtSvgMarker.prototype._setRadius=function(a){DvtSvgUtils.setAttrNullNS(this._elem,"r",a)};DvtSvgMarker.prototype._setPolygon=function(a){a=DvtSvgShapeUtils.convertPointsArray(a);DvtSvgUtils.setAttrNullNS(this._elem,"points",a)};DvtSvgMarker.prototype._setCmds=function(a){a!==this._cmds&&(this._cmds=a,DvtSvgUtils.setAttrNullNS(this._elem,"d",a))};DvtSvgMarker.prototype.UpdateMarkerImage=function(a){this.setSource(a)};
DvtSvgMarker.prototype.setSource=function(a){DvtSvgUtils.setAttrNS(this._elem,DvtSvgImage.XLINK_NS,"xlink:href",a)};DvtSvgMarker.prototype.GetAttributesTransferableToGroup=function(){var a=DvtSvgContainer.AttributesTransferableToGroup.slice(0);if(!this.getObj().getMatrix()){var b=DvtArrayUtils.getIndex(a,"transform");a.splice(b,1)}b=DvtArrayUtils.getIndex(a,"visibility");a.splice(b,1);return a};
DvtSvgMarker.prototype._positionUnderlay=function(a,b,c,d){var e=this._underlay.getType(),f=Math.max(c,d)/2,g=[],h=.4*f,k=1.6*f;e===DvtMarker.SQUARE?(e=.5*f,this._underlay._setX(a-e),this._underlay._setY(b-e),this._underlay._setWidth(2*(f+e)),this._underlay._setHeight(2*(f+e))):e===DvtMarker.CIRCLE?(e=.7*f,this._underlay._setCx(a+c/2),this._underlay._setCy(b+d/2),this._underlay._setRX(f+e),this._underlay._setRY(f+e)):e===DvtMarker.TRIANGLE_UP?(e=1.3*f,g.push(a-e),g.push(b+2*f+h),g.push(a+f),g.push(b-
k),g.push(a+2*f+e),g.push(b+2*f+h),this._underlay._setPolygon(g)):e===DvtMarker.TRIANGLE_DOWN?(e=1.3*f,g.push(a-e),g.push(b-h),g.push(a+2*f+e),g.push(b-h),g.push(a+f),g.push(b+2*f+k),this._underlay._setPolygon(g)):e===DvtMarker.DIAMOND&&(e=1.1*f,g.push(a-e),g.push(b+f),g.push(a+f),g.push(b-e),g.push(a+2*f+e),g.push(b+f),g.push(a+f),g.push(b+2*f+e),this._underlay._setPolygon(g))};
DvtSvgMarker.prototype._positionHumanUnderlay=function(a,b,c,d){var e=this._underlay.getType(),f=Math.max(c,d)/2,g=[],h=.2*f,k=.65*f;e===DvtMarker.SQUARE?(e=.15*f,this._underlay._setX(a-e),this._underlay._setY(b-e),this._underlay._setWidth(2*(f+e)),this._underlay._setHeight(2*(f+e))):e===DvtMarker.CIRCLE?(e=.2*f,this._underlay._setCx(a+c/2),this._underlay._setCy(b+d/2),this._underlay._setRX(f+e),this._underlay._setRY(f+e)):e===DvtMarker.TRIANGLE_UP?(e=.5*f,g.push(a-e),g.push(b+2*f+h),g.push(a+f),
g.push(b-k),g.push(a+2*f+e),g.push(b+2*f+h),this._underlay._setPolygon(g)):e===DvtMarker.TRIANGLE_DOWN?(e=.5*f,g.push(a-e),g.push(b-h),g.push(a+2*f+e),g.push(b-h),g.push(a+f),g.push(b+2*f+k),this._underlay._setPolygon(g)):e===DvtMarker.DIAMOND&&(e=.4*f,g.push(a-e),g.push(b+f),g.push(a+f),g.push(b-e),g.push(a+2*f+e),g.push(b+f),g.push(a+f),g.push(b+2*f+e),this._underlay._setPolygon(g))};
DvtSvgMarker.prototype.setUnderlay=function(a,b,c){this._underlay=this.getObj().getCtx().getImplFactory().newMarker(a);this._underlay.setFill(new DvtSolidFill(b,c));this._underlay.setObj(this.getObj());this.getType()===DvtMarker.HUMAN?this._positionHumanUnderlay(this._x,this._y,this._w,this._h):this._positionUnderlay(this._x,this._y,this._w,this._h);this.CreateChildGroupElem(!1);(a=this._childGroupElem.childNodes[0])||(a=null);this._childGroupElem.insertBefore(this._underlay.getOuterElem(),a)};
DvtSvgMarker.prototype.getUnderlay=function(){return this._underlay};DvtSvgMarker.prototype.setMouseEnabled=function(a){DvtSvgMarker.superclass.setMouseEnabled.call(this,a);this._childGroupElem&&DvtSvgUtils.setAttrNullNS(this._childGroupElem,"pointer-events",a?"visiblePainted":"none")};DvtSvgMarker.prototype.setHollow=function(a,b){DvtSvgMarker.superclass.setHollow.call(this,a,b)};
DvtSvgMarker.prototype._setCustomMarker=function(a,b,c,d,e){if(this._isMultiPaths())return a=this._cloneMultiPaths(a,b,c,d,e),this.getObj().addChild(a),a;this._setSingleShape(a,b,c,d,e);return null};
DvtSvgMarker.prototype._setSingleShape=function(a,b,c,d,e){a=a.getImpl();a.getElem().nodeName==DvtSvgMarker.MARKER_PATH_ELEM_NAME&&this._setCmds(DvtPathUtils.transformPath(a._sCmds,b,c,d,e));(b=a.getFill())&&this.setFill(b);(b=a.getAlpha())&&this.setAlpha(b);if(a=a.getStroke())a=a.clone(),a.setWidth(Math.min(d,e)*a.getWidth()),this.setStroke(a)};DvtSvgMarker.prototype._setPoints=function(a){a!==this._points&&(this._points=a,DvtSvgUtils.setAttrNullNS(this._elem,"points",a))};
DvtSvgMarker.prototype._setX1=function(a){DvtSvgUtils.setAttrNullNS(this._elem,"x1",a)};DvtSvgMarker.prototype._setY1=function(a){DvtSvgUtils.setAttrNullNS(this._elem,"y1",a)};DvtSvgMarker.prototype._setX2=function(a){DvtSvgUtils.setAttrNullNS(this._elem,"x2",a)};DvtSvgMarker.prototype._setY2=function(a){DvtSvgUtils.setAttrNullNS(this._elem,"y2",a)};DvtSvgMarker.prototype._setRX=function(a){DvtSvgUtils.setAttrNullNS(this._elem,"rx",a)};
DvtSvgMarker.prototype._setRY=function(a){DvtSvgUtils.setAttrNullNS(this._elem,"ry",a)};
DvtSvgMarker.prototype._cloneMultiPaths=function(a,b,c,d,e){for(var f=this.getObj().getCtx(),g=new DvtContainer(f,a.getId()+"_x"),h=a.getNumChildren(),k,m,n=0;n<h;n++)k=a.getChildAt(n),m=new DvtPath(f,DvtPathUtils.transformPath(k.getCmds(),b,c,d,e),k.getId()),k.getFill()&&m.setFill(k.getFill()),k.getAlpha()&&m.setAlpha(k.getAlpha()),k.getStroke()&&(k=k.getStroke().clone(),k.setWidth(Math.min(d,e)*k.getWidth()),m.setStroke(k)),g.addChild(m);return g};
DvtSvgMarker.prototype.addChild=function(a){this._isMultiPaths()?DvtSvgUtils.appendChildElem(this._elem,a.getOuterElem()):DvtSvgMarker.superclass.addChild.call(this,a)};DvtSvgMarker.prototype._isMultiPaths=function(){return"g"==this.getElem().nodeName&&this.getType()!=DvtMarker.IMAGE};DvtSvgMarker.prototype.getDimensions=function(){if(this._type==DvtMarker.IMAGE){var a=this.getObj().getScaledWidth(),b=this.getObj().getScaledHeight();return new DvtRectangle(this._x,this._y,a,b)}return DvtSvgMarker.superclass.getDimensions.call(this)};
DvtSvgMarker.prototype.GetElemDimensionsWithStroke=function(){return this._type==DvtMarker.IMAGE?this.getDimensions():DvtSvgMarker.superclass.GetElemDimensionsWithStroke.call(this)};var DvtSvgOval=function(a,b,c,d,e){this._Init(a,b,c,d,e)};DvtObj.createSubclass(DvtSvgOval,DvtSvgCircle,"DvtSvgOval");DvtSvgOval.prototype._Init=function(a,b,c,d,e){DvtSvgOval.superclass._Init.call(this,a,b,c,e,"ellipse");this.setRx(c);this.setRy(d);this.setRadius(null)};DvtSvgOval.prototype.getRx=function(){return this._rx};
DvtSvgOval.prototype.setRx=function(a){a!==this._rx&&(this._rx=a,DvtSvgUtils.setAttrNullNS(this._elem,"rx",this._rx))};DvtSvgOval.prototype.getRy=function(){return this._ry};DvtSvgOval.prototype.setRy=function(a){a!==this._ry&&(this._ry=a,DvtSvgUtils.setAttrNullNS(this._elem,"ry",this._ry))};var DvtSvgPath=function(a,b){this._Init(a,b)};DvtObj.createSubclass(DvtSvgPath,DvtSvgShape,"DvtSvgPath");
DvtSvgPath.prototype._Init=function(a,b){DvtSvgPath.superclass._Init.call(this,b,"path");DvtArrayUtils.isArray(a)?this.setCmds(DvtPathUtils.getPathString(a)):this.setCmds(a)};DvtSvgPath.prototype.getCmds=function(){return this._sCmds};DvtSvgPath.prototype.setCmds=function(a){(this._sCmds=a)&&DvtSvgUtils.setAttrNullNS(this._elem,"d",a)};var DvtSvgPolygon=function(a,b){this._Init(a,b)};DvtObj.createSubclass(DvtSvgPolygon,DvtSvgShape,"DvtSvgPolygon");
DvtSvgPolygon.prototype._Init=function(a,b){DvtSvgPolygon.superclass._Init.call(this,b,"polygon");this.setPoints(a)};DvtSvgPolygon.prototype.getPoints=function(){return this._arPoints};DvtSvgPolygon.prototype.setPoints=function(a){this._arPoints=a;this._sPoints=DvtSvgShapeUtils.convertPointsArray(a);DvtSvgUtils.setAttrNullNS(this._elem,"points",this._sPoints)};var DvtSvgPolyline=function(a,b){this._Init(a,b)};DvtObj.createSubclass(DvtSvgPolyline,DvtSvgShape,"DvtSvgPolyline");
DvtSvgPolyline.prototype._Init=function(a,b){DvtSvgPolyline.superclass._Init.call(this,b,"polyline");DvtSvgUtils.setAttrNullNS(this._elem,"fill","none");this.setPoints(a)};DvtSvgPolyline.prototype.getPoints=function(){return this._arPoints};DvtSvgPolyline.prototype.setPoints=function(a){this._arPoints=a;this._sPoints=DvtSvgShapeUtils.convertPointsArray(a);DvtSvgUtils.setAttrNullNS(this._elem,"points",this._sPoints)};var DvtSvgRect=function(a,b,c,d,e){this._Init(a,b,c,d,e)};
DvtObj.createSubclass(DvtSvgRect,DvtSvgShape,"DvtSvgRect");DvtSvgRect._cssAttrs=["background-color","border-color","border-width"];DvtSvgRect.prototype._Init=function(a,b,c,d,e){DvtSvgRect.superclass._Init.call(this,e,"rect");this.setX(a);this.setY(b);this.setWidth(c);this.setHeight(d)};DvtSvgRect.prototype.getX=function(){return this._x};DvtSvgRect.prototype.setX=function(a){a!==this._x&&(this._x=a,DvtSvgUtils.setAttrNullNS(this._elem,"x",this._x))};DvtSvgRect.prototype.getY=function(){return this._y};
DvtSvgRect.prototype.setY=function(a){a!==this._y&&(this._y=a,DvtSvgUtils.setAttrNullNS(this._elem,"y",this._y))};DvtSvgRect.prototype.getWidth=function(){return this._w};DvtSvgRect.prototype.setWidth=function(a){a!==this._w&&(this._w=a,DvtSvgUtils.setAttrNullNS(this._elem,"width",this._w))};DvtSvgRect.prototype.getHeight=function(){return this._h};DvtSvgRect.prototype.setHeight=function(a){a!==this._h&&(this._h=a,DvtSvgUtils.setAttrNullNS(this._elem,"height",this._h))};
DvtSvgRect.prototype.getRx=function(){return this._rx};DvtSvgRect.prototype.setRx=function(a){a!==this._rx&&(this._rx=a,DvtSvgUtils.setAttrNullNS(this._elem,"rx",this._rx))};DvtSvgRect.prototype.getRy=function(){return this._ry};DvtSvgRect.prototype.setRy=function(a){a!==this._ry&&(this._ry=a,DvtSvgUtils.setAttrNullNS(this._elem,"ry",this._ry))};
DvtSvgRect.prototype.setCSSStyle=function(a){DvtSvgRect.superclass.setCSSStyle.call(this,a);var b=this._elem;if(a){var c=a["background-color"];c&&DvtSvgUtils.setAttrNullNS(b,"fill",c);(c=a["border-color"])&&DvtSvgUtils.setAttrNullNS(b,"stroke",c);(c=a["border-width"])&&DvtSvgUtils.setAttrNullNS(b,"stroke-width",c);if(c=a["border-radius"])a=DvtStringUtils.trim(c).split(" "),0<a.length&&a[0]&&this.setRx(a[0]),1<a.length&&a[1]&&this.setRy(a[1])}else DvtSvgUtils.removeAttrNullNS(this._elem,"style")};
DvtSvgRect._removeDefaultAttributes=function(a){DvtSvgUtils.removeAttrNullNS(a,"fill");DvtSvgUtils.removeAttrNullNS(a,"stroke");DvtSvgUtils.removeAttrNullNS(a,"stroke-width")};var DvtSvgText=function(a,b,c,d,e){this._Init(a,b,c,d,e)};DvtObj.createSubclass(DvtSvgText,DvtSvgShape,"DvtSvgText");
DvtSvgText.prototype._Init=function(a,b,c,d,e){DvtSvgText.superclass._Init.call(this,e,"text");this._context=a;this.setTextString(b);this.setX(c);this.setY(d);DvtSvgUtils.setAttrNullNS(this.getElem(),"font-family","tahoma, sans-serif");DvtSvgUtils.setAttrNullNS(this.getElem(),"fill","rgb(0,0,0)");DvtAgent.isRightToLeft(a)&&(DvtAgent.isPlatformIE()?this.setTextString("\u202b"+b):DvtSvgText.needsTextAnchorAdjustment(a)?this.alignStart():DvtSvgUtils.setAttrNullNS(this.getElem(),"unicode-bidi","embed"));
this._baselineOffset=this._baseline=null;this._bEditMode=!1;this._editEndCallback=this._editStartCallback=null;this._editPxWidth;this._editElem=null;this._editBorder=!1;this._editTooltip=null};DvtSvgText.prototype.getTextString=function(){var a;if(this._bEditMode&&this._editElem)a=this._editElem.value;else{var b=this.GetTextElem().firstChild;b&&(a=b.nodeValue)}return a};
DvtSvgText.prototype.setTextString=function(a){var b=this.GetTextElem().firstChild;null!==b?b.nodeValue=a:(b=document.createTextNode(a),DvtSvgUtils.appendChildElem(this.GetTextElem(),b));this._editElem&&(this._editElem.value=a)};
DvtSvgText.prototype.doNotUseSetAngle=function(a){this._angle=a%360;0<this._angle&&(this._angle=360-this._angle);0!=this._angle?this._cx&&this._cy&&DvtSvgUtils.setAttrNullNS(this.getElem(),"transform","rotate("+this._angle+" "+this._cx+","+this._cy+")"):(DvtSvgUtils.removeAttrNullNS(this.getElem(),"transform"),DvtAgent.isPlatformIE()&&DvtSvgUtils.setAttrNullNS(this.getElem(),"transform",null))};
DvtSvgText.prototype.doNotUseSetRotatePoint=function(a,b){this._cx=a;this._cy=b;this._angle&&DvtSvgUtils.setAttrNullNS(this.getElem(),"transform","rotate("+this._angle+" "+a+","+b+")")};DvtSvgText.prototype.getX=function(){return this._x};DvtSvgText.prototype.setX=function(a){a!==this._x&&(this._x=a,DvtSvgUtils.setAttrNullNS(this.getElem(),"x",a))};DvtSvgText.prototype.getY=function(){return this._y};
DvtSvgText.prototype.setY=function(a){a!==this._y&&(this._y=a,DvtSvgUtils.setAttrNullNS(this.getElem(),"y",a))};DvtSvgText.prototype.setFontSize=function(a){DvtSvgUtils.setAttrNullNS(this.getElem(),"font-size",a);this._setMatrix(this.getMatrix(),a)};DvtSvgText.prototype.alignStart=function(){var a=DvtSvgText.needsTextAnchorAdjustment(this._context);DvtSvgUtils.setAttrNullNS(this.getElem(),"text-anchor",a?"end":"start")};
DvtSvgText.prototype.alignCenter=function(){DvtSvgUtils.setAttrNullNS(this.getElem(),"text-anchor","middle")};DvtSvgText.prototype.alignEnd=function(){var a=DvtSvgText.needsTextAnchorAdjustment(this._context);DvtSvgUtils.setAttrNullNS(this.getElem(),"text-anchor",a?"start":"end")};DvtSvgText.prototype.alignTop=function(){DvtAgent.isPlatformIE()?this.SetBaseline(1):this.SetDominantBaselineAttr("text-before-edge")};
DvtSvgText.prototype.alignMiddle=function(){DvtAgent.isPlatformIE()?this.SetBaseline(.4):this.SetDominantBaselineAttr("middle")};DvtSvgText.prototype.alignBottom=function(){DvtAgent.isPlatformIE()?this.SetBaseline(.2):this.SetDominantBaselineAttr("text-after-edge")};DvtSvgText.prototype.alignBaseline=function(){DvtAgent.isPlatformIE()?this.SetBaseline(0):this.SetDominantBaselineAttr(null)};DvtSvgText.prototype.SetBaseline=function(a){this._baseline=a;this._setMatrix(this.getMatrix(),null)};
DvtSvgText.prototype.SetDominantBaselineAttr=function(a){a?DvtSvgUtils.setAttrNullNS(this.getElem(),"dominant-baseline",a):DvtSvgUtils.removeAttrNullNS(this.getElem(),"dominant-baseline")};DvtSvgText.prototype.setText=function(a){var b=this.GetTextElem().firstChild;null!==b?b.nodeValue=a:(b=document.createTextNode(a),DvtSvgUtils.appendChildElem(this.GetTextElem(),b));this._bEditMode&&this._editElem&&(this._editElem.value=a)};
DvtSvgText.prototype.getText=function(){if(this._bEditMode&&this._editElem)return this._editElem.value;var a=this.GetTextElem().firstChild;if(a)return a.nodeValue};
DvtSvgText.prototype.setCSSStyle=function(a){DvtSvgText.superclass.setCSSStyle.call(this,a);var b=this.getOuterElem();if(a){var c=a.color;c&&DvtSvgUtils.setAttrNullNS(b,"fill",c);(c=a["font-family"])&&DvtSvgUtils.setAttrNullNS(b,"font-family",c);if(c=a["font-size"])DvtSvgUtils.setAttrNullNS(b,"font-size",c),this._setMatrix(this.getMatrix(),c);(c=a["font-style"])&&DvtSvgUtils.setAttrNullNS(b,"font-style",c);(c=a["font-weight"])&&DvtSvgUtils.setAttrNullNS(b,"font-weight",c);(c=a["text-decoration"])&&
DvtSvgUtils.setAttrNullNS(b,"text-decoration",c);(c=a.cursor)&&DvtSvgUtils.setAttrNullNS(b,"cursor",c);color=a.color}};
DvtSvgText.prototype.getFontStyles=function(){var a=new DvtCSSStyle,b=DvtSvgUtils.getAttrNullNS(this.getElem(),DvtCSSStyle.FONT_FAMILY);b||(b="tahoma, sans-serif");a.setStyle(DvtCSSStyle.FONT_FAMILY,b);(b=DvtSvgUtils.getAttrNullNS(this.getElem(),DvtCSSStyle.FONT_SIZE))||(b="medium");a.setStyle(DvtCSSStyle.FONT_SIZE,b);(b=DvtSvgUtils.getAttrNullNS(this.getElem(),DvtCSSStyle.FONT_STYLE))||(b="normal");a.setStyle(DvtCSSStyle.FONT_STYLE,b);(b=DvtSvgUtils.getAttrNullNS(this.getElem(),DvtCSSStyle.FONT_WEIGHT))||
(b="normal");a.setStyle(DvtCSSStyle.FONT_WEIGHT,b);return a};DvtSvgText.prototype.getEditMode=function(){return this._bEditMode};
DvtSvgText.prototype.setEditMode=function(a,b,c){this._editStartCallback=b;this._editEndCallback=c;this._bEditMode!=a&&(a?(b=this.getObj().getDimensions(),this.CreateChildGroupElem(),this._editRectElem=DvtSvgShapeUtils.createElement("rect"),DvtSvgUtils.setAttrNullNS(this._editRectElem,"x",0),DvtSvgUtils.setAttrNullNS(this._editRectElem,"y",0),DvtSvgUtils.setAttrNullNS(this._editRectElem,"width",this._editPxWidth),DvtSvgUtils.setAttrNullNS(this._editRectElem,"height",b.h),DvtSvgUtils.setAttrNullNS(this._editRectElem,
"fill","#ffffff"),DvtSvgUtils.setAttrNullNS(this._editRectElem,"fill-opacity",0),DvtSvgUtils.setAttrNullNS(this._editRectElem,"cursor","text"),DvtSvgUtils.appendChildElem(this._childGroupElem,this._editRectElem)):this._childGroupElem.removeChild(this._editRectElem),this._bEditMode=a)};
DvtSvgText.prototype.SetEditing=function(a){if(this._bEditMode&&a!=this._bEditing){var b=this.getObj(),c=this.GetTextElem(),d;if(!a&&this._editElem)b=this._editElem.value,this.setTextString(b),this._editEndCallback&&(d=this._editEndCallback.call(null,b))&&this.setTextString(d),this.getElem().insertBefore(c,this._editRectElem),this._bEventListener&&(d=this._editElem,this._htmlTextAreaListenerFunc&&(DvtSvgUtils.removeDomEventListener(d,DvtKeyboardEvent.KEYDOWN,this._htmlTextAreaListenerFunc,!1),DvtSvgUtils.removeDomEventListener(d,
DvtKeyboardEvent.KEYUP,this._htmlTextAreaListenerFunc,!1),DvtSvgUtils.removeDomEventListener(d,"keypress",this._htmlTextAreaListenerFunc,!1),DvtSvgUtils.removeDomEventListener(d,"textInput",this._htmlTextAreaListenerFunc,!1),DvtSvgUtils.removeDomEventListener(d,"textinput",this._htmlTextAreaListenerFunc,!1),this._htmlTextAreaListenerFunc=null),this._editBlurFunc&&(DvtSvgUtils.removeDomEventListener(d,"blur",this._editBlurFunc,!1),this._editBlurFunc=null),this._bEventListener=!1),this._editElem&&this._editElem.parentNode&&
this._editElem.parentNode.removeChild(this._editElem);else{var e=this.getText();this._editElem||(d=this._createHtmlTextArea(b,c,e));this._editStartCallback&&(d=this._editStartCallback.call(null,e))&&this.setTextString(d);this.getElem().removeChild(c);this._editElem&&DvtSvgUtils.appendChildElem(b.getCtx().getStage().getImpl().getSVGRoot().parentNode,this._editElem);d=this._editElem;var f=this;this._htmlTextAreaListenerFunc=function(a){f._handleHtmlTextAreaKeyboardEvent(a)};DvtSvgUtils.addDomEventListener(d,
DvtKeyboardEvent.KEYDOWN,this._htmlTextAreaListenerFunc,!1);DvtSvgUtils.addDomEventListener(d,DvtKeyboardEvent.KEYUP,this._htmlTextAreaListenerFunc,!1);DvtSvgUtils.addDomEventListener(d,"keypress",this._htmlTextAreaListenerFunc,!1);DvtSvgUtils.addDomEventListener(d,"textInput",this._htmlTextAreaListenerFunc,!1);DvtSvgUtils.addDomEventListener(d,"textinput",this._htmlTextAreaListenerFunc,!1);this._editBlurFunc=function(a){f._blurEditText()};DvtSvgUtils.addDomEventListener(d,"blur",this._editBlurFunc,
!1);this._bEventListener=!0}this._bEditing=a}};DvtSvgText.prototype.getEditWidth=function(a){return this._editPxWidth};DvtSvgText.prototype.setEditWidth=function(a){this._editPxWidth=a};DvtSvgText.prototype.setEditTooltip=function(a){this._editTooltip=a};DvtSvgText.prototype._handleHtmlTextAreaKeyboardEvent=function(a){DvtSvgText._editFilter(a);this.getObj().dispatchDisplayableEvent(a.type,""+a.keyCode)};
DvtSvgText._editFilter=function(a){a=a||window.event;if("textinput"!=a.type&&"textInput"!=a.type&&"keypress"==a.type){var b=a.charCode||a.keyCode;32>b&&13==b&&a.preventDefault&&a.preventDefault()}};DvtSvgText.prototype.selectEditText=function(){this._editElem&&this._editElem.select()};DvtSvgText.prototype.focusEditText=function(){this.SetEditing(!0);if(this._editElem){var a=this;window.setTimeout(function(){a._editElem.focus()},0)}};DvtSvgText.prototype._blurEditText=function(){this.SetEditing(!1)};
DvtSvgText.prototype._removeDefaultFontAttributes=function(a){DvtSvgUtils.removeAttrNullNS(a,"font-family");DvtSvgUtils.removeAttrNullNS(a,"fill")};
DvtSvgText.prototype._createTSpan=function(a,b){var c=DvtSvgShapeUtils.createElement("tspan",void 0);b?DvtSvgUtils.appendChildElem(b,c):DvtSvgUtils.appendChildElem(this.getElem(),c);var d=DvtSvgUtils.getAttrNullNS(this.getElem(),"dominant-baseline");d&&DvtSvgUtils.setAttrNullNS(c,"dominant-baseline",d);(d=DvtSvgUtils.getAttrNullNS(this.getElem(),"text-anchor"))&&DvtSvgUtils.setAttrNullNS(c,"text-anchor",d);a&&this._addTextNode(c,a);return c};
DvtSvgText.prototype._createTextNode=function(a){this._addTextNode(this.getElem(),a)};DvtSvgText.prototype._addTextNode=function(a,b){var c=document.createTextNode(b);a?DvtSvgUtils.appendChildElem(a,c):DvtSvgUtils.appendChildElem(this.getElem(),c)};
DvtSvgText.prototype._adjustBaseline=function(a){var b=0;null!=this._baseline&&(a||(a=DvtSvgUtils.getAttrNullNS(this.getElem(),"font-size"),a||(a=DvtSvgUtils.getAttrNullNS(this.getOuterElem(),"font-size"))||(a="11")),b=this._baseline*parseFloat(a),null!=this._baselineOffset&&(b+=this._baselineOffset));return b};
DvtSvgText.prototype._setMatrix=function(a,b){if(null!=this._baseline&&this.getObj()){a||(a=new DvtMatrix);var c=new DvtMatrix(null,null,null,null,null,this._adjustBaseline(b));c.concat(a);a=c}DvtSvgText.superclass.setMatrix.call(this,a)};DvtSvgText.prototype.getMatrix=function(){return this.getObj()?this.getObj().getMatrix():null};DvtSvgText.prototype.setMatrix=function(a){this._setMatrix(a,null)};
DvtSvgText.prototype.getDimensions=function(){var a=DvtSvgText.superclass.getDimensions.call(this);a&&(a.y+=this._adjustBaseline(null));return a};
DvtSvgText.prototype._createHtmlTextArea=function(a,b,c){var d=document.createElement("textArea");this._editElem=d;this._editElem._obj=this;var e=a.getDimensions(),f=a.getCSSStyle(),g;g=0;f||(f=DvtSvgUtils.getAttrNullNS(b,"font-size")||"11",g=DvtSvgUtils.getAttrNullNS(b,"font-family"),f="font-family:"+g+"; font-size: "+f+"px;");this._editPxWidth?(e=new DvtText(a.getCtx(),"W"),e.setCSSStyle(f),e.alignMiddle(),a.getParent().addChild(e),g=e.getDimensions(),a.getParent().removeChild(e),g=this._editPxWidth/
g.w):(0==e.w&&(e.w=10),this._editPxWidth=2*e.w,g=2);g=Math.floor(1.5*g);d.setAttribute("rows","1");d.setAttribute("cols",g);d.value=c?c:"";this._editTooltip&&d.setAttribute("title",this._editTooltip);f+=" color:"+DvtSvgUtils.getAttrNullNS(b,"fill")+";";f+=" overflow-x: hidden; border: none; border-width: 0px; margin: 0px; resize: none; outline: none;";f+=" dominant-baseline:"+DvtSvgUtils.getAttrNullNS(b,"dominant-baseline")+";";a=new DvtPoint(this.getX(),this.getY());a=this.getObj().localToStage(a);
f+=" position: absolute; top: "+a.y+"px; left: "+a.x+"px;";f+=" vertical-align: baseline; outline-offset: 0px;";f=DvtAgent.isRightToLeft(this.getObj().getCtx())?f+" text-align: right; padding: 0px 2px 0px 0px;":f+" text-align: left; padding: 0px 0px 0px 2px;";d.setAttribute("style",f);(DvtAgent.isBrowserChrome()||DvtAgent.isBrowserSafari())&&d.setAttribute("wrap","off");d[DvtHtmlKeyboardListenerUtils.ATTR_IGNORE_EVENTS_FROM_TARGET]=!0;return d};
DvtSvgText.prototype.AddElemListener=function(a,b,c){this.getEditMode()&&this._editElem&&(DvtSvgUtils.addDomEventListener(this._editElem,a,b,c),a==DvtTouchEvent.TOUCHEND&&DvtSvgUtils.addDomEventListener(this._editElem,DvtTouchEvent.TOUCHCANCEL,b,c));DvtSvgText.superclass.AddElemListener.call(this,a,b,c)};DvtSvgText.prototype.GetTextElem=function(){return this._elem};DvtSvgText.prototype.destroy=function(){this._editElem&&(this.SetEditing(!1),this._editElem=null)};
DvtSvgText.needsTextAnchorAdjustment=function(a){return DvtAgent.isRightToLeft(a)&&(DvtAgent.isPlatformWebkit()||DvtAgent.isPlatformGecko()&&25<=DvtAgent.getVersion())};var DvtSvgTextArea=function(a,b,c,d){this._Init(a,b,c,d)};DvtObj.createSubclass(DvtSvgTextArea,DvtSvgText,"DvtSvgTextArea");DvtSvgTextArea.prototype._Init=function(a,b,c,d){void 0===b&&void 0===c&&(c=b=0,this._notGraph=!0);DvtSvgTextArea.superclass._Init.call(this,a,"",b,c,d);this._leading=0};
DvtSvgTextArea.prototype.setText=function(a,b){var c;DvtArrayUtils.isArray(a)?1==a.length&&(c=a[0]):c=a;for(var d=this.getObj(),e=this.getElem(),f=this._getCurrentDominantBaseline(),g=e.firstChild;null!=g;){var h=g,g=g.nextSibling;e.removeChild(h)}this._multilineDims=null;if(0===d.getNumChildren()&&c)(e=this.getElem().firstChild)?e.nodeValue=c:this._addTextLine(d,c);else{var g=parseFloat(DvtSvgUtils.getAttrNullNS(e,"x")),k=parseFloat(DvtSvgUtils.getAttrNullNS(e,"y"));isNaN(g)&&(g=0);isNaN(k)&&(k=
0);if(c)this._addLine(d,c,g,k);else{c=0;var h=k,m=new DvtRectangle(g,k,d._getMaxTextWidth(),d._getMaxTextHeight());this._multilineDims=[];for(var n=0;n<a.length;n++)k=b&&b[n]?b[n]:m,this._multilineDims.push(k),c=g,this._notGraph&&(c+=this._getHorzOffset(k.w)),this._addTextLine(d,a[n],c,h,f),h+=k.h;d=this.getOuterElem();d.nodeName&&"g"==d.nodeName&&d!==e&&(d.removeChild(e),(d=this.getCSSStyle())&&this.setCSSStyle(d))}}this.RefreshVertAlign()};
DvtSvgTextArea.prototype.getText=function(){var a=this.getObj(),b=a.getNumChildren();if(0==b)return DvtSvgTextArea.superclass.getText.call(this);for(var c,d="",e=0;e<b;e++)c=a.getChildAt(e),d+=c.getText();return d};DvtSvgTextArea.prototype.getLeading=function(){return this._leading};DvtSvgTextArea.prototype.setLeading=function(a){this._leading=a};DvtSvgTextArea.prototype._addLine=function(a,b,c,d){a=this._createTSpan(b);DvtSvgUtils.setAttrNullNS(a,"x",c);DvtSvgUtils.setAttrNullNS(a,"dy",d+this.getLeading())};
DvtSvgTextArea.prototype._addTextLine=function(a,b,c,d,e){b=new DvtText(a.getCtx(),b,c,d,null);b.setParent(a);b=b.getImpl();c=this.getElem().firstChild;null==c&&(c=this.getElem());(d=DvtSvgUtils.getAttrNullNS(c,"dominant-baseline"))?DvtSvgUtils.setAttrNullNS(b.getElem(),"dominant-baseline",d):e&&DvtSvgUtils.setAttrNullNS(b.getElem(),"dominant-baseline",e);(d=DvtSvgUtils.getAttrNullNS(c,"text-anchor"))&&DvtSvgUtils.setAttrNullNS(b.getElem(),"text-anchor",d);(d=DvtSvgUtils.getAttrNullNS(c,"font-family"))&&
DvtSvgUtils.setAttrNullNS(b.getElem(),"font-family",d);(d=DvtSvgUtils.getAttrNullNS(c,"font-size"))&&DvtSvgUtils.setAttrNullNS(b.getElem(),"font-size",d);(d=DvtSvgUtils.getAttrNullNS(c,"fill"))&&DvtSvgUtils.setAttrNullNS(b.getElem(),"fill",d);(d=DvtSvgUtils.getAttrNullNS(c,"cursor"))&&DvtSvgUtils.setAttrNullNS(b.getElem(),"cursor",d);DvtAgent.isRightToLeft(a.getCtx())&&(d=DvtSvgUtils.getAttrNullNS(c,"unicode-bidi"))&&DvtSvgUtils.setAttrNullNS(b.getElem(),"unicode-bidi",d);DvtAgent.isPlatformIE()&&
(DvtSvgUtils.setAttrNullNS(b.getElem(),"transform",null),DvtSvgUtils.removeAttrNullNS(b.getElem(),"transform"));this.addChild(b)};DvtSvgTextArea.prototype._getTextAlign=function(){var a=this.getCSSStyle()["text-align"];switch(a){case "start":case "end":case "center":break;case "right":a="end";break;case "left":a="start";break;default:a=DvtAgent.isRightToLeft(this.getObj().getCtx())?"end":"start"}return a};
DvtSvgTextArea.prototype.setCursor=function(a){DvtSvgTextArea.superclass.setCursor.call(this,a);var b=this.getElem();if(null!=b)for(var c=0;c<b.childElementCount;c++)DvtSvgUtils.setAttrNullNS(b.childNodes[c],"cursor",a)};DvtSvgTextArea.prototype._getHorzOffset=function(a){var b=0,c=this.getObj(),d=this._getTextAlign();"end"==d?b=c._getMaxTextWidth()-a:"center"==d&&(b=(c._getMaxTextWidth()-a)/2);DvtSvgText.needsTextAnchorAdjustment(c.getCtx())&&(b+=a);return b};
DvtSvgTextArea.prototype.RefreshVertAlign=function(){DvtAgent.isPlatformIE()?this.SetBaseline(this._baseline):this._adjustMultiBaselines()};
DvtSvgTextArea.prototype.SetBaseline=function(a){this._baselineOffset=null;if(this._multilineDims){for(var b=0,c=1;c<this._multilineDims.length;c++)b+=this._multilineDims[c].h;switch(this.getObj().getVertAlignment()){case DvtText.V_ALIGN_MIDDLE:this._baselineOffset=-.5*b;break;case DvtText.V_ALIGN_BOTTOM:case DvtText.V_ALIGN_BASELINE:this._baselineOffset=-b}}DvtSvgTextArea.superclass.SetBaseline.call(this,a)};
DvtSvgTextArea.prototype.SetDominantBaselineAttr=function(a){DvtSvgTextArea.superclass.SetDominantBaselineAttr.call(this,a);this._adjustMultiBaselines()};DvtSvgTextArea.prototype._getCurrentDominantBaseline=function(){var a=this.getElem(),b;a&&"g"==a.nodeName&&(a=a.childNodes)&&0<a.length&&"text"==a[0].nodeName&&(b=DvtSvgUtils.getAttrNullNS(a[0],"dominant-baseline"));return b};
DvtSvgTextArea.prototype._adjustMultiBaselines=function(){var a=this.getElem();if(a&&this._multilineDims){for(var b=this.getObj().getVertAlignment(),c=this._getCurrentDominantBaseline(),d=a.childElementCount,e=0,f=1;f<this._multilineDims.length;f++)e+=this._multilineDims[f].h;for(f=0;f<d;f++){var g=a.childNodes[f];c?DvtSvgUtils.setAttrNullNS(g,"dominant-baseline",c):DvtSvgUtils.removeAttrNullNS(g,"dominant-baseline");switch(b){case DvtText.V_ALIGN_TOP:DvtSvgUtils.removeAttrNullNS(g,"baseline-shift");
break;case DvtText.V_ALIGN_MIDDLE:DvtSvgUtils.setAttrNullNS(g,"baseline-shift",.5*e+"px");break;case DvtText.V_ALIGN_BOTTOM:case DvtText.V_ALIGN_BASELINE:DvtSvgUtils.setAttrNullNS(g,"baseline-shift",e+"px")}}}};var DvtSvgTextFormatted=function(a,b,c,d){this._Init(a,b,c,d)};DvtObj.createSubclass(DvtSvgTextFormatted,DvtSvgText,"DvtSvgTextFormatted");DvtSvgTextFormatted.BOLD="b";DvtSvgTextFormatted.BREAK="br";DvtSvgTextFormatted.ITALIC="i";DvtSvgTextFormatted.LIST_ITEM="li";
DvtSvgTextFormatted.ORDERED_LIST="ol";DvtSvgTextFormatted.PARAGRAPH="p";DvtSvgTextFormatted.UNORDERED_LIST="ul";DvtSvgTextFormatted.prototype._Init=function(a,b,c,d){DvtSvgTextFormatted.superclass._Init.call(this,a,"",b,c,d)};DvtSvgTextFormatted.prototype.setText=function(a){var b=this.getObj();if(a=(new DvtXmlParser(b.getCtx())).parse("\x3croot\x3e"+a+"\x3c/root\x3e"))this._bEnableVertIndent=!1,this._parseChildren(a,null,0,!1,!1)};
DvtSvgTextFormatted.prototype._parseChildren=function(a,b,c,d,e){a=a.getAllChildNodes();for(var f=a.length,g=!1,h=0;h<f;h++){var k=a[h];if(k){var m=k.getName();g&&m!==DvtSvgTextFormatted.PARAGRAPH&&m!==DvtSvgTextFormatted.ORDERED_LIST&&m!==DvtSvgTextFormatted.UNORDERED_LIST&&(b=this._handleMarkup(DvtSvgTextFormatted.PARAGRAPH,b));g=!1;if("#text"===m)k=k.getNodeValue(),e&&(k="- "+k),this._addTextNode(b,k),this._bEnableVertIndent=!0;else{var n=this._handleMarkup(m,b,c,d),p=c,q=!1;if(m===DvtSvgTextFormatted.ORDERED_LIST||
m===DvtSvgTextFormatted.UNORDERED_LIST)0==p&&(q=!0),p++;this._parseChildren(k,n,p,q,m===DvtSvgTextFormatted.LIST_ITEM);m===DvtSvgTextFormatted.BREAK&&(b=n);if(m===DvtSvgTextFormatted.PARAGRAPH||(m===DvtSvgTextFormatted.ORDERED_LIST||m===DvtSvgTextFormatted.UNORDERED_LIST)&&1>c)g=!0;m===DvtSvgTextFormatted.LIST_ITEM&&(d=!1)}}}};
DvtSvgTextFormatted.prototype._handleMarkup=function(a,b,c,d){b=this._createTSpan(null,b);a===DvtSvgTextFormatted.BOLD?DvtSvgUtils.setAttrNullNS(b,"font-weight","bold"):a===DvtSvgTextFormatted.ITALIC?DvtSvgUtils.setAttrNullNS(b,"font-style","italic"):a===DvtSvgTextFormatted.BREAK?(DvtSvgUtils.setAttrNullNS(b,"x","0"),DvtSvgUtils.setAttrNullNS(b,"dy","1em")):a===DvtSvgTextFormatted.PARAGRAPH?(this._bEnableVertIndent&&(DvtSvgUtils.setAttrNullNS(b,"x","0"),DvtSvgUtils.setAttrNullNS(b,"dy","2em")),this._bEnableVertIndent=
!0):a!==DvtSvgTextFormatted.ORDERED_LIST&&a!==DvtSvgTextFormatted.UNORDERED_LIST&&a===DvtSvgTextFormatted.LIST_ITEM&&(DvtSvgUtils.setAttrNullNS(b,"x",c+"em"),this._bEnableVertIndent&&(d?DvtSvgUtils.setAttrNullNS(b,"dy","2em"):DvtSvgUtils.setAttrNullNS(b,"dy","1em")),this._bEnableVertIndent=!0);return b};
var DvtGraphSelectableArc=function(a,b,c,d,e,f,g,h,k){this.Init(a,b,c,d,e,f,g,h,k)};DvtObj.createSubclass(DvtGraphSelectableArc,DvtArc,"DvtGraphSelectableArc");
DvtGraphSelectableArc.prototype.Init=function(a,b,c,d,e,f,g,h,k){DvtGraphSelectableArc.superclass.Init.call(this,a,b,c,d,e,f,g,h,k);this._bSelecting=this._bSelected=!1;this._selectionEffects=null;this._bSelectedShadow=!0;this._dataColor="#000000";this._savedStroke=this._outerColor=this._innerColor=null;this._bSavedStroke=!1;this._applyStrokeTimer=this._relatedLogicalObjects=null;this._bZorder=!0;this._zOrderManager=null;this._selectionType=DvtSelectionEffectUtils.DEFAULT_SEL_TYPE};
DvtGraphSelectableArc.prototype.ApplySelectionState=function(){DvtSelectionEffectUtils.applySelectionState(this,this._dataColor,this._innerColor,this._outerColor)};DvtGraphSelectableArc.prototype.ApplySelectingState=function(){DvtSelectionEffectUtils.applySelectingState(this,this._dataColor)};DvtGraphSelectableArc.prototype.showHoverEffect=function(){this.SetSelectionMouseOver(!0)};DvtGraphSelectableArc.prototype.hideHoverEffect=function(){this.SetSelectionMouseOver(!1)};
DvtGraphSelectableArc.prototype.isHoverEffectShown=function(){return this._bSelecting};DvtGraphSelectableArc.prototype.SetSelectionMouseOver=function(a){this.SetSelectionMouseOverSelf(a);if(this._relatedLogicalObjects)for(var b=0;b<this._relatedLogicalObjects.length;b++)this._relatedLogicalObjects[b].SetSelectionMouseOverSelf&&this._relatedLogicalObjects[b].SetSelectionMouseOverSelf(a)};
DvtGraphSelectableArc.prototype.SetSelectionMouseOverSelf=function(a){this._bSelecting!=a&&(this._bSelecting=a,this._bZorder&&(this._bSelecting&&this._zOrderManager?this._zOrderManager.bringToFrontOfSelection(this):this._bSelected||this._zOrderManager.pushToBackOfSelection(this)),this.ApplySelectingState())};DvtGraphSelectableArc.prototype.isSelected=function(){return this._bSelected};
DvtGraphSelectableArc.prototype.setSelected=function(a){this.SetSelectedSelf(a);if(this._relatedLogicalObjects)for(var b=0;b<this._relatedLogicalObjects.length;b++)this._relatedLogicalObjects[b].SetSelectedSelf&&this._relatedLogicalObjects[b].SetSelectedSelf(a)};
DvtGraphSelectableArc.prototype.SetSelectedSelf=function(a){this._bSelected!=a&&(this._bSelected=a,this._bZorder&&(this._bSelected&&this._zOrderManager?this._zOrderManager.bringToFrontOfSelection(this):!this._bSelecting&&this._zOrderManager&&this._zOrderManager.pushToBackOfSelection(this)),this.ApplySelectionState())};DvtGraphSelectableArc.prototype.addRelatedObject=function(a){this._relatedLogicalObjects||(this._relatedLogicalObjects=[]);this._relatedLogicalObjects.push(a)};
DvtGraphSelectableArc.prototype.setSelectedShadow=function(a){this._bSelectedShadow=a};DvtGraphSelectableArc.prototype.setDataColor=function(a,b,c){this._dataColor=a;this._innerColor=b;this._outerColor=c};DvtGraphSelectableArc.prototype.setZorder=function(a){this._bZorder=a};DvtGraphSelectableArc.prototype.setZOrderManager=function(a){this._zOrderManager=a};DvtGraphSelectableArc.prototype.UpdateSelectionEffect=function(){};
var DvtGraphSelectableLineMarker=function(a,b,c,d,e,f,g,h,k,m,n){this.Init(a,b,c,d,e,f,g,h,k,m,n)};DvtObj.createSubclass(DvtGraphSelectableLineMarker,DvtMarker,"DvtGraphSelectableLineMarker");DvtGraphSelectableLineMarker.prototype.Init=function(a,b,c,d,e,f,g,h,k,m,n){DvtGraphSelectableLineMarker.superclass.Init.call(this,a,b,c,d,e,f,g,h,k,m,n);this._savedFill=null;this._bSavedStroke=this._bSavedFill=!1;this._zOrderManager=null};
DvtGraphSelectableLineMarker.prototype._applySelectingSelectionState=function(){var a=this._outerColor?this._outerColor:"#000000",b;this.isSelected()?(this._zOrderManager&&this._zOrderManager.bringToFrontOfSelection(this),a=new DvtSolidStroke(a,1,1.5),a.setMiterLimit(1),b=this._innerColor?new DvtSolidFill(DvtColorUtils.setAlpha(this._innerColor,1)):DvtSolidFill.invisibleFill(),this._bSelecting||this.SaveStrokeAndFill()):this._bSelecting?(this._zOrderManager&&this._zOrderManager.bringToFrontOfSelection(this),
a=DvtSelectionEffectUtils.createSelectingStroke(this._dataColor),b=DvtSolidFill.invisibleFill(),this.SaveStrokeAndFill()):(this._zOrderManager&&this._zOrderManager.pushToBackOfSelection(this),a=this._savedStroke,b=this._savedFill,this._savedFill=this._savedStroke=null,this._bSavedFill=this._bSavedStroke=!1);this.setStroke(a);this.setFill(b)};
DvtGraphSelectableLineMarker.prototype.SaveStrokeAndFill=function(){this._bSavedStroke||(this._savedStroke=this.getStroke(),this._bSavedStroke=!0);this._bSavedFill||(this._savedFill=this.getFill(),this._bSavedFill=!0)};DvtGraphSelectableLineMarker.prototype.ApplySelectingState=function(){this._applySelectingSelectionState()};DvtGraphSelectableLineMarker.prototype.ApplySelectionState=function(){this._applySelectingSelectionState()};
DvtGraphSelectableLineMarker.prototype.setZOrderManager=function(a){this._zOrderManager=a};DvtGraphSelectableLineMarker.prototype.UpdateSelectionEffect=function(){};
var DvtGraphSelectablePath=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtGraphSelectablePath,DvtPath,"DvtGraphSelectablePath");
DvtGraphSelectablePath.prototype.Init=function(a,b,c){DvtGraphSelectablePath.superclass.Init.call(this,a,b,c);this._bSelecting=this._bSelected=!1;this._selectionEffects=null;this._bSelectedShadow=!0;this._dataColor="#000000";this._savedStroke=this._outerColor=this._innerColor=null;this._bSavedStroke=!1;this._applyStrokeTimer=this._relatedLogicalObjects=null;this._bZorder=!0;this._zOrderManager=null;this._selectionType=DvtSelectionEffectUtils.DEFAULT_SEL_TYPE};
DvtGraphSelectablePath.prototype.ApplySelectionState=function(){DvtSelectionEffectUtils.applySelectionState(this,this._dataColor,this._innerColor,this._outerColor)};DvtGraphSelectablePath.prototype.ApplySelectingState=function(){DvtSelectionEffectUtils.applySelectingState(this,this._dataColor)};DvtGraphSelectablePath.prototype.showHoverEffect=function(){this.SetSelectionMouseOver(!0)};DvtGraphSelectablePath.prototype.hideHoverEffect=function(){this.SetSelectionMouseOver(!1)};
DvtGraphSelectablePath.prototype.isHoverEffectShown=function(){return this._bSelecting};DvtGraphSelectablePath.prototype.SetSelectionMouseOver=function(a){this.SetSelectionMouseOverSelf(a);if(this._relatedLogicalObjects)for(var b=0;b<this._relatedLogicalObjects.length;b++)this._relatedLogicalObjects[b].SetSelectionMouseOverSelf&&this._relatedLogicalObjects[b].SetSelectionMouseOverSelf(a)};
DvtGraphSelectablePath.prototype.SetSelectionMouseOverSelf=function(a){this._bSelecting!=a&&(this._bSelecting=a,this._bZorder&&(this._bSelecting&&this._zOrderManager?this._zOrderManager.bringToFrontOfSelection(this):!this._bSelected&&this._zOrderManager&&this._zOrderManager.pushToBackOfSelection(this)),this.ApplySelectingState())};DvtGraphSelectablePath.prototype.isSelected=function(){return this._bSelected};
DvtGraphSelectablePath.prototype.setSelected=function(a){this.SetSelectedSelf(a);if(this._relatedLogicalObjects)for(var b=0;b<this._relatedLogicalObjects.length;b++)this._relatedLogicalObjects[b].SetSelectedSelf&&this._relatedLogicalObjects[b].SetSelectedSelf(a)};
DvtGraphSelectablePath.prototype.SetSelectedSelf=function(a){this._bSelected!=a&&(this._bSelected=a,this._bZorder&&(this._bSelected&&this._zOrderManager?this._zOrderManager.bringToFrontOfSelection(this):!this._bSelecting&&this._zOrderManager&&this._zOrderManager.pushToBackOfSelection(this)),this.ApplySelectionState())};DvtGraphSelectablePath.prototype.addRelatedObject=function(a){this._relatedLogicalObjects||(this._relatedLogicalObjects=[]);this._relatedLogicalObjects.push(a)};
DvtGraphSelectablePath.prototype.setSelectedShadow=function(a){this._bSelectedShadow=a};DvtGraphSelectablePath.prototype.setDataColor=function(a,b,c){this._dataColor=a;this._innerColor=b;this._outerColor=c};DvtGraphSelectablePath.prototype.setZorder=function(a){this._bZorder=a};DvtGraphSelectablePath.prototype.setZOrderManager=function(a){this._zOrderManager=a};DvtGraphSelectablePath.prototype.UpdateSelectionEffect=function(){};
var DvtGraphSelectablePolygon=function(a,b,c,d){this.Init(a,b,c,d)};DvtObj.createSubclass(DvtGraphSelectablePolygon,DvtPolygon,"DvtGraphSelectablePolygon");
DvtGraphSelectablePolygon.prototype.Init=function(a,b,c){DvtGraphSelectablePolygon.superclass.Init.call(this,a,b,c);this._dataColor="#000000";this._outerColor=this._innerColor=null;this._bSelecting=this._bSelected=!1;this._selectionEffects=null;this._bSelectedShadow=!0;this._savedStroke=null;this._bSavedStroke=!1;this._applyStrokeTimer=this._relatedLogicalObjects=null;this._bZorder=!0;this._zOrderManager=null;this._selectionType=DvtSelectionEffectUtils.DEFAULT_SEL_TYPE};
DvtGraphSelectablePolygon.prototype.ApplySelectionState=function(){DvtSelectionEffectUtils.applySelectionState(this,this._dataColor,this._innerColor,this._outerColor)};DvtGraphSelectablePolygon.prototype.ApplySelectingState=function(){DvtSelectionEffectUtils.applySelectingState(this,this._dataColor)};DvtGraphSelectablePolygon.prototype.showHoverEffect=function(){this.SetSelectionMouseOver(!0)};DvtGraphSelectablePolygon.prototype.hideHoverEffect=function(){this.SetSelectionMouseOver(!1)};
DvtGraphSelectablePolygon.prototype.isHoverEffectShown=function(){return this._bSelecting};DvtGraphSelectablePolygon.prototype.SetSelectionMouseOver=function(a){this.SetSelectionMouseOverSelf(a);if(this._relatedLogicalObjects)for(var b=0;b<this._relatedLogicalObjects.length;b++)this._relatedLogicalObjects[b].SetSelectionMouseOverSelf&&this._relatedLogicalObjects[b].SetSelectionMouseOverSelf(a)};
DvtGraphSelectablePolygon.prototype.SetSelectionMouseOverSelf=function(a){this._bSelecting!=a&&(this._bSelecting=a,this._bZorder&&(this._bSelecting&&this._zOrderManager?this._zOrderManager.bringToFrontOfSelection(this):!this._bSelected&&this._zOrderManager&&this._zOrderManager.pushToBackOfSelection(this)),this.ApplySelectingState())};DvtGraphSelectablePolygon.prototype.isSelected=function(){return this._bSelected};
DvtGraphSelectablePolygon.prototype.setSelected=function(a){this.SetSelectedSelf(a);if(this._relatedDetObjects)for(var b=0;b<this._relatedDetObjects.length;b++)this._relatedDetObjects[b].SetSelectedSelf&&this._relatedDetObjects[b].SetSelectedSelf(a)};
DvtGraphSelectablePolygon.prototype.SetSelectedSelf=function(a){this._bSelected!=a&&(this._bSelected=a,this._bZorder&&(this._bSelected&&this._zOrderManager?this._zOrderManager.bringToFrontOfSelection(this):!this._bSelecting&&this._zOrderManager&&this._zOrderManager.pushToBackOfSelection(this)),this.ApplySelectionState())};DvtGraphSelectablePolygon.prototype.addRelatedObject=function(a){this._relatedLogicalObjects||(this._relatedLogicalObjects=[]);this._relatedLogicalObjects.push(a)};
DvtGraphSelectablePolygon.prototype.setSelectedShadow=function(a){this._bSelectedShadow=a};DvtGraphSelectablePolygon.prototype.setDataColor=function(a,b,c){this._dataColor=a;this._innerColor=b;this._outerColor=c};DvtGraphSelectablePolygon.prototype.setZorder=function(a){this._bZorder=a};DvtGraphSelectablePolygon.prototype.setZOrderManager=function(a){this._zOrderManager=a};DvtGraphSelectablePolygon.prototype.UpdateSelectionEffect=function(){};
var DvtPieChart=function(a,b,c,d){this.Init(a,b,c,d)};DvtPieChart.LABEL_POS_UNSPEC=-1;DvtPieChart.LABEL_POS_NONE=0;DvtPieChart.LABEL_POS_INSIDE=1;DvtPieChart.LABEL_POS_OUTSIDE=2;DvtPieChart.LABEL_POS_OUTSIDE_FEELERS=3;DvtPieChart.LABEL_TYPE_UNSPEC=-1;DvtPieChart.LABEL_TYPE_PERCENT=0;DvtPieChart.LABEL_TYPE_VALUE=1;DvtPieChart.LABEL_TYPE_TEXT=2;DvtPieChart.LABEL_TYPE_TEXT_PERCENT=3;DvtPieChart.LABEL_TYPE_TEXT_VALUE=4;DvtPieChart.LABEL_TYPE_CUSTOM=5;DvtPieChart.EXPLODE=0;DvtPieChart.UNITE=1;
DvtObj.createSubclass(DvtPieChart,DvtContainer,"DvtPieChart");
DvtPieChart.prototype.Init=function(a,b,c,d){DvtPieChart.superclass.Init.call(this,a);this._eventManager=b;this._anchorOffset=90;this._yRadius=this._xRadius=this._depth=0;this._center=new DvtPoint(0,0);this._pieInfo=null;this._frame=new DvtRectangle(0,0,0,0);this._bAutoExplode=!1;this._slices=[];this._maxExplodePixels=0;this._is3D=!1;this._shapesContainer=new DvtContainer(a);this._numSelectedObjsInFront=this._numFrontObjs=0;this._animationDuration=1;this._maxSliceIndex=-1};
DvtPieChart.prototype.__getEventManager=function(){return this._eventManager};DvtPieChart.prototype.setPosition=function(a,b,c,d){this._center=a;this._xRadius=b;this._yRadius=c;this._frame=new DvtRectangle(d.x,d.y,d.w,d.h)};
DvtPieChart.prototype.processEvent=function(a){var b=a.getType();b==DvtCategoryHideShowEvent.TYPE_HIDE||b==DvtCategoryHideShowEvent.TYPE_SHOW?DvtHideShowCategoryHandler.processEvent(a,this._slices):b!=DvtCategoryRolloverEvent.TYPE_OVER&&b!=DvtCategoryRolloverEvent.TYPE_OUT||DvtCategoryRolloverHandler.processEvent(a,this._slices)};DvtPieChart.prototype.highlight=function(a){DvtCategoryRolloverHandler.highlight(a,this._slices)};DvtPieChart.prototype.__getShowPopupBehaviors=function(){return null};
DvtPieChart.prototype.render=function(){var a;this.contains(this._shapesContainer)||(this._shapesContainer||(this._shapesContainer=new DvtContainer(this.getCtx())),this.addChild(this._shapesContainer),!this._is3D&&this._pieInfo.hasVisualEffects()&&(a=DvtColorUtils.makeRGBA(78,87,101,.45),a=new DvtShadow(a,4,7,7,54,2,3,!1,!1,!1)));DvtPieChart._layoutSlices(this._slices,this._anchorOffset);for(var b=this._slices.length,c=0;c<b;c++){var d=this._slices[c];d.preRender()}var e=DvtPieChart._orderSlicesForRendering(this._slices);
DvtPieChart._layoutLabelsAndFeelers(this);b=e.length;for(c=0;c<b;c++)d=e[c],d.render();b=e.length;for(c=0;c<b;c++)d=e[c],d.renderLabelAndFeeler();for(b=0;b<this._slices.length;b++)if(d=this._slices[b],d.getAction())for(d=d.getDisplayables(),c=0;c<d.length;c++)d[c].setCursor(DvtSelectionEffectUtils.getSelectingCursor());DvtAgent.isPlatformWebkit()&&this.getCtx()instanceof DvtSvgContext||a&&this._shapesContainer.addDrawEffect(a);this._pieInfo.isInitFx()&&!this._bInitFxDone&&(this._doInitFx(),this._bInitFxDone=
!0);b=e.length;for(c=0;c<b;c++)d=e[c],d._selected&&d.setSelected(!0),d.explodeSlice(d.getExplode())};DvtPieChart.prototype.addSliceInfo=function(a){var b=a.getExplode();b>this._maxExplodePixels&&(this._maxExplodePixels=b);b=a.getIndex();b>this._maxSliceIndex&&(this._maxSliceIndex=b);a=this.CreateSlice(this,a);this._slices.push(a);return a};DvtPieChart.prototype.getMaxSliceIndex=function(){return this._maxSliceIndex};
DvtPieChart.__computeTotal=function(a){var b=0;a=a._slices;for(var c=0;c<a.length;c++){var d=a[c].getSliceInfo().getValue();0<=d&&(b+=d)}return b};DvtPieChart._computeMaxExplodePixels=function(a){for(var b=a.length,c=0,d=0;d<b;d++){var e=a[d].getExplode();e>c&&(c=e)}return c};DvtPieChart.prototype.CreateSlice=function(a,b){return new DvtPieSlice(a,b)};
DvtPieChart._layoutSlices=function(a,b){var c,d,e,f=0,g=a?a.length:0;360<b&&(b-=360);0>b&&(b+=360);var h=e=0;0<g&&(h=DvtPieChart.__computeTotal(a[0].getPieChart()));for(c=0;c<g;c++)d=a[c],value=d.getSliceInfo().getValue(),e=0==h?0:Math.abs(value)/h*100,f=3.6*e,e=b-f,0>e&&(e+=360),d.setAngleStart(e),d.setAngleExtent(f),b=d.getAngleStart()};
DvtPieChart._orderSlicesForRendering=function(a){var b=[],c,d=a?a.length:0,e,f=-1,g,h;for(c=0;c<d;c++)if(e=a[c],g=e.getAngleStart(),e=e.getAngleExtent(),e=g+e,360<e&&(e-=360),0>e&&(e+=360),90==e||90>g&&90<e){f=c;h=e-90;break}g=[];for(c=f;c<d;c++)g.push(a[c]);for(c=0;c<f;c++)g.push(a[c]);f=a=0;h=180+h;for(c=0;c<d;c++)if(e=g[c]){if(a+e.getAngleExtent()>h){f=c;break}b.push(e);a+=e.getAngleExtent()}for(c=d-1;c>=f;c--)(e=g[c])&&b.push(e);return b};DvtPieChart.prototype.is3D=function(){return this._is3D};
DvtPieChart.prototype.set3D=function(a){this._is3D=a};DvtPieChart.prototype.__calcMaxExplodeDistance=function(){var a=.047*Math.min(this._frame.w,this._frame.h);0>a&&(a=0);return a};DvtPieChart.prototype.explodeAll=function(){this.animateExplode(0,-1)};DvtPieChart.prototype.uniteAll=function(){this.animateExplode(1,-1)};DvtPieChart.prototype.isPieAllExploded=function(){var a=!0,b,c,d=this._slices.length;for(c=0;c<d;c++)if(b=this._slices[c],0==b.getExplode()){a=!1;break}return a};
DvtPieChart.prototype.isPieAllUnited=function(){var a=!0,b,c,d=this._slices.length;for(c=0;c<d;c++)if(b=this._slices[c],0<b.getExplode()){a=!1;break}return a};DvtPieChart.prototype.animateSingleSliceExplode=function(a,b){var c,d,e=this._slices.length,f=-1;for(c=0;c<e;c++)if(d=this._slices[c],sliceInfo=d.getSliceInfo(),sliceInfo.getId()==b){f=c;break}-1<f&&this.animateExplode(a,f)};DvtPieChart.prototype.getAnimationDuration=function(){return this._animationDuration};
DvtPieChart.prototype.animateExplode=function(a,b){var c=this._slices.length,d;this._animationDuration=2;this.getCtx()instanceof DvtSvgContext&&DvtAgent.isPlatformWebkit()&&(this._animationDuration=1);var e=new DvtAnimator(this.getCtx(),this._animationDuration),f=0,f=this.__calcMaxExplodeDistance(),f=a==DvtPieChart.EXPLODE?f:0;if(-1==b){var g=[];for(d=0;d<c;d++)g[d]=f;e.addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this._getSliceExplodes,this._setSliceExplodes,g)}else this._pieInfo.isSliceInteractive()&&
0<=b&&b<c&&(c=this._slices[b],e.addProp(DvtAnimator.TYPE_NUMBER,c,c.getExplode,c.explodeSlice,f));e.play()};DvtPieChart.prototype._doInitFx=function(){for(var a=[],b=this._slices.length,c=0;c<b;c++){var d=this._slices[c].getSliceLabel();(a[c]=d)&&d.setAlpha(0)}(new DvtAnimFadeIn(this._context,a,this.getPieInfo().getAnimationDuration())).play()};DvtPieChart._layoutLabelsAndFeelers=function(a){var b=a._slices;b&&0<b.length&&(new DvtSliceLabelLayout(a)).layoutLabelsAndFeelers()};
DvtPieChart.prototype.setAnchorOffset=function(a){this._anchorOffset=a};DvtPieChart.prototype.getCenter=function(){return this._center};DvtPieChart.prototype.setFill=function(a){};DvtPieChart.prototype.setSolidFill=function(a,b){};DvtPieChart.prototype.__getFrame=function(){return this._frame};DvtPieChart.prototype.__getMaxExplodePixels=function(){return this._maxExplodePixels};DvtPieChart.prototype.getPieInfo=function(){return this._pieInfo};
DvtPieChart.prototype.setPieInfo=function(a){this._pieInfo=a};DvtPieChart.prototype.getRadiusX=function(){return this._xRadius};DvtPieChart.prototype.getSliceColor=function(a){return(a=this._slices[a])?a.getSliceInfo().getFillColor():null};DvtPieChart.prototype._getSliceDisplayable=function(a){return 0<=a&&a<this._slices.length&&(a=this._slices[a].getTopSurface())&&0<a.length?a[0]:null};DvtPieChart.prototype.__dispatchTestEvent=function(a,b){this._getSliceDisplayable(b).dispatchDisplayableEvent(a)};
DvtPieChart.prototype.getSliceText=function(a){if(a=this._slices[a])if(a=a.getSliceLabel())return a.getTextString();return null};DvtPieChart.prototype.getSliceTooltip=function(a){if(a=this._slices[a])if(a=a.getSliceInfo().getTooltip())return DvtGraphParser.convertLineBreaks(a);return null};DvtPieChart.prototype.__getShapesContainer=function(){return this._shapesContainer};DvtPieChart.prototype.getRadiusY=function(){return this._yRadius};DvtPieChart.prototype.__getSlices=function(){return this._slices};
DvtPieChart.prototype.animateUpdate=function(a,b){var c=new DvtDataAnimationHandler(this.getCtx(),this);c.constructAnimation(b.__getSlices(),this.__getSlices());var c=c.getAnimation(),d=new DvtCustomAnimation(this.getCtx(),this,this.getPieInfo().getAnimationDuration());d.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this._getAnimationParams,this._setAnimationParams,this._getAnimationParams());c=new DvtParallelPlayable(this.getCtx(),c,d);c.setOnEnd(this.render,this);a.add(c,0)};
DvtPieChart.prototype.animateInsert=function(a){};DvtPieChart.prototype.animateDelete=function(a,b){};DvtPieChart.prototype._getAnimationParams=function(){return[1]};DvtPieChart.prototype._setAnimationParams=function(a){this.removeChildren();this._shapesContainer&&this._shapesContainer.destroy();this._shapesContainer=null;this.render()};DvtPieChart.prototype._getSliceExplodes=function(){for(var a=[],b=this._slices.length,c=0;c<b;c++)a[c]=this._slices[c].getSliceInfo().getExplode();return a};
DvtPieChart.prototype._setSliceExplodes=function(a){for(var b=this._slices.length,c=0;c<b;c++){var d=this._slices[c],e=a[c];d.getSliceInfo().getExplode()!=e&&(d.explodeSlice(e),e>this._maxExplodePixels&&(this._maxExplodePixels=e))}};DvtPieChart.prototype.getDepth=function(){return this._depth};DvtPieChart.prototype.setDepth=function(a){this._depth=a};
DvtPieChart.prototype.bringToFrontOfSelection=function(a){var b=a.getPieChart()._shapesContainer;if(b){var c=b.getNumChildren();1<c-this._numFrontObjs&&(b.removeChild(a._topSurface[0]),b.addChildAt(a._topSurface[0],c-this._numFrontObjs-1))}};
DvtPieChart.prototype.pushToBackOfSelection=function(a){var b=this._slices.length,c=0;for(i=0;i<b;i++)this._slices[i].isSelected()&&c++;this._numSelectedObjsInFront=c;if(b=a.getPieChart()._shapesContainer)c=b.getNumChildren()-this._numFrontObjs-1-this._numSelectedObjsInFront,0<=c&&(b.removeChild(a._topSurface[0]),b.addChildAt(a._topSurface[0],c))};DvtPieChart.prototype.setNumFrontObjs=function(a){this._numFrontObjs=a};
DvtPieChart.prototype.getShapesForViewSwitcher=function(a){a={};if(this._slices)for(var b=0;b<this._slices.length;b++){var c=this._slices[b];if(c){var d=c.getId();d&&(d=d.getId())&&c._topSurface&&0<c._topSurface.length&&(a[d]=c._topSurface[0])}}return a};
var DvtPieInfo=function(){this._init()};DvtObj.createSubclass(DvtPieInfo,DvtObj,"DvtPieInfo");DvtPieInfo.prototype._init=function(){this._labelPosition=DvtPieChart.LABEL_POS_UNSPEC;this._labelType=DvtPieChart.LABEL_TYPE_UNSPEC;this._feelerColor="#000000";this._labelVF=this._arSliceLabels=this._converter=this._style=null;this._isSliceInteractive=!1;this._fillType=DvtFill.NONE;this._hasVisualEffects=!0;this._id=this._outerColor=this._innerColor=null;this._isInitFx=!1};
DvtPieInfo.prototype.isInitFx=function(){return this._isInitFx};DvtPieInfo.prototype.setInitFx=function(a){this._isInitFx=a};DvtPieInfo.prototype.getFeelerColor=function(){return this._feelerColor};DvtPieInfo.prototype.setFeelerColor=function(a){this._feelerColor=a};DvtPieInfo.prototype.getFillType=function(){return this._fillType};DvtPieInfo.prototype.setFillType=function(a){this._fillType=a};DvtPieInfo.prototype.getSelectedInnerColor=function(){return this._innerColor};
DvtPieInfo.prototype.setSelectedInnerColor=function(a){this._innerColor=a};DvtPieInfo.prototype.getSelectedOuterColor=function(){return this._outerColor};DvtPieInfo.prototype.setSelectedOuterColor=function(a){this._outerColor=a};DvtPieInfo.prototype.getCSSStyle=function(){return this._style};DvtPieInfo.prototype.setCSSStyle=function(a){this._style=a};DvtPieInfo.prototype.getDefaultLabelColor=function(){return this._defaultLabelColor};
DvtPieInfo.prototype.setDefaultLabelColor=function(a){this._defaultLabelColor=a};DvtPieInfo.prototype.getId=function(){return this._id};DvtPieInfo.prototype.setId=function(a){this._id=a};DvtPieInfo.prototype.getLabelPosition=function(){return this._labelPosition};DvtPieInfo.prototype.setLabelPosition=function(a){this._labelPosition=a};DvtPieInfo.prototype.getLabels=function(){return this._arSliceLabels};DvtPieInfo.prototype.setLabels=function(a){this._arSliceLabels=a};
DvtPieInfo.prototype.getLabelType=function(){return this._labelType};DvtPieInfo.prototype.setLabelType=function(a){this._labelType=a};DvtPieInfo.prototype.getConverter=function(){return this._converter};DvtPieInfo.prototype.setConverter=function(a){this._converter=a};DvtPieInfo.prototype.isSliceInteractive=function(){return this._isSliceInteractive};DvtPieInfo.prototype.setSliceInteractive=function(a){this._isSliceInteractive=a};DvtPieInfo.prototype.getValueFormat=function(){return this._labelVF};
DvtPieInfo.prototype.setValueFormat=function(a){this._labelVF=a};DvtPieInfo.prototype.hasVisualEffects=function(){return this._hasVisualEffects};DvtPieInfo.prototype.setVisualEffects=function(a){this._hasVisualEffects=a};DvtPieInfo.prototype.getSkin=function(){return this._skin?this._skin:DvtCSSStyle.SKIN_SKYROS};DvtPieInfo.prototype.setSkin=function(a){this._skin=a};DvtPieInfo.prototype.getAnimationDuration=function(){return this._duration};
DvtPieInfo.prototype.setAnimationDuration=function(a){this._duration=a};
var DvtPieSlice=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtPieSlice,DvtObj,"DvtPieSlice");
DvtPieSlice.prototype.Init=function(a,b){this._pieChart=a;this._sliceInfo=b;this._angleExtent=this._angleStart=0;this._crustSurface=this._rightSurface=this._leftSurface=this._topSurface=null;this._explodeOffsetY=this._explodeOffsetX=0;this._sliceLabelString=this._sliceLabelPosition=this._sliceLabel=null;this._hasFeeler=!1;this._outsideFeelerEnd=this._outsideFeelerMid=this._outsideFeelerStart=this._feelerHoriz=this._feelerRad=null;this._selecting=this._selected=!1;this._radiusX=this._pieChart.getRadiusX();
this._radiusY=this._pieChart.getRadiusY()};DvtPieSlice.prototype.getPieChart=function(){return this._pieChart};DvtPieSlice.prototype.render=function(){for(var a=DvtPieSlice._sortPieSurfaces(this._topSurface,this._leftSurface,this._rightSurface,this._crustSurface,this._angleStart,this._angleExtent),b=a.length,c=0;c<b;c++){var d=a[c];shapeCount=d.length;for(var e=0;e<shapeCount;e++)this._pieChart.__getShapesContainer().addChild(d[e]),d[e].render&&d[e].render()}};
DvtPieSlice.prototype.renderLabelAndFeeler=function(){this._sliceLabel&&(this._pieChart.addChild(this._sliceLabel),DvtPieSlice._associate(this,[this._sliceLabel]),this._pieChart.getPieInfo().getLabelPosition()==DvtPieChart.LABEL_POS_OUTSIDE_FEELERS&&this._renderOutsideFeeler())};
DvtPieSlice.prototype._feelerFromPts=function(a,b){var c=this._pieChart.getCtx(),c=new DvtLine(c,a.x,a.y,b.x,b.y),d=this._pieChart.getPieInfo().getFeelerColor(),d=new DvtSolidStroke(d);c.setStroke(d);if(!this._pieChart.contains(c)){var d=this._pieChart.__getShapesContainer(),e=d.getChildIndex(this._topSurface[0]);d.addChildAt(c,e)}return c};
DvtPieSlice.prototype._renderOutsideFeeler=function(){if(this._hasFeeler){var a=this._feelerFromPts(this._outsideFeelerStart,this._outsideFeelerMid),b=this._feelerFromPts(this._outsideFeelerMid,this._outsideFeelerEnd);this._feelerRad=a;this._feelerHoriz=b}};DvtPieSlice.prototype.preRender=function(){this.explodeSlice(this._sliceInfo.getExplode());this._createSurfaces()};
DvtPieSlice.prototype._createSurfaces=function(){var a=this._pieChart.getPieInfo(),b=this.getSliceInfo(),c=a.getFillType(),d=b.getFillPattern(),e;if(c==DvtFill.PATTERN||null!=d)a=new DvtPatternFill(d,b.getFillColor());else if(c==DvtFill.GRADIENT)var f=a.getSkin(),a=f==DvtCSSStyle.SKIN_SKYROS?297:270,g=this._pieChart.is3D()?"3D":"2D",d=DvtPieRenderUtils.getGradientColors(b.getFillColor(),g,f),b=DvtPieRenderUtils.getGradientAlphas(b.getFillAlpha(),g),f=DvtPieRenderUtils.getGradientRatios(g,f),g=[Math.floor(this._pieChart.getCenter().x-
this._pieChart.getRadiusX()),Math.floor(this._pieChart.getCenter().y-this._pieChart.getRadiusY()),Math.ceil(2*this._pieChart.getRadiusX()),Math.ceil(2*this._pieChart.getRadiusY())],a=new DvtLinearGradientFill(a,d,b,f,g);else a=new DvtSolidFill(b.getFillColor(),b.getFillAlpha()),e=new DvtSolidFill(DvtColorUtils.getRGB(DvtColorUtils.getDarker(b.getFillColor(),.6)),b.getFillAlpha());this._topSurface=DvtPieSlice.createTopSurface(this,a);this._pieChart.is3D()&&(0<this._pieChart.getDepth()||this._pieChart.getRadiusX()!=
this._pieChart.getRadiusY())&&(c=(b=c==DvtFill.GRADIENT||c==DvtFill.PATTERN)?DvtPieSlice._generateLateralGradientFill(this,DvtPieRenderUtils.SIDE):e,e=b?DvtPieSlice._generateLateralGradientFill(this,DvtPieRenderUtils.CRUST):e,this._leftSurface=DvtPieSlice._createLateralSurface(this,DvtPieSlice.SURFACE_LEFT,c),this._rightSurface=DvtPieSlice._createLateralSurface(this,DvtPieSlice.SURFACE_RIGHT,c),this._crustSurface=DvtPieSlice._createLateralSurface(this,DvtPieSlice.SURFACE_CRUST,e))};
DvtPieSlice._sortPieSurfaces=function(a,b,c,d,e,f){var g=[];b&&c&&d&&(270>=e&&270<e+f?(g.push(b),g.push(c),g.push(d)):270<e||90>=e+f?(g.push(b),g.push(d),g.push(c)):(g.push(c),g.push(d),g.push(b)));g.push(a);return g};DvtPieSlice.oppositeDirection=function(a,b,c){return 0<a-b!=0<a-c};
DvtPieSlice.prototype.explodeSlice=function(a){this._sliceInfo.setExplode(a);if(0!=a){a=(360-(this._angleStart+this._angleExtent/2))*DvtMath.RADS_PER_DEGREE;var b=this._pieChart.getRadiusY()/this._pieChart.getRadiusX(),c=this._sliceInfo.getExplode(),d=this._pieChart.__calcMaxExplodeDistance();d<c&&(c=d);this._explodeOffsetX=Math.cos(a)*c;this._explodeOffsetY=Math.sin(a)*b*c;this._pieChart.getCtx()instanceof DvtSvgContext&&DvtAgent.isPlatformWebkit()&&(this._explodeOffsetX=Math.round(this._explodeOffsetX),
this._explodeOffsetY=Math.round(this._explodeOffsetY))}else this._explodeOffsetY=this._explodeOffsetX=0;this._topSurface&&DvtPieSlice._translateShapes(this._topSurface,this._explodeOffsetX,this._explodeOffsetY);this._rightSurface&&DvtPieSlice._translateShapes(this._rightSurface,this._explodeOffsetX,this._explodeOffsetY);this._leftSurface&&DvtPieSlice._translateShapes(this._leftSurface,this._explodeOffsetX,this._explodeOffsetY);this._crustSurface&&DvtPieSlice._translateShapes(this._crustSurface,this._explodeOffsetX,
this._explodeOffsetY);if(this._hasFeeler){a=this._outsideFeelerStart.x;b=this._outsideFeelerStart.y;c=a+this._explodeOffsetX;d=b+this._explodeOffsetY;this._feelerRad.setX1(c);this._feelerRad.setY1(d);var e=this._outsideFeelerMid.x,f=this._outsideFeelerMid.y;DvtPieSlice.oppositeDirection(e,a,c)?(this._feelerRad.setX2(c),this._feelerHoriz.setX1(c)):(this._feelerRad.setX2(e),this._feelerHoriz.setX1(e));DvtPieSlice.oppositeDirection(f,b,d)?(this._feelerRad.setY2(d),this._feelerHoriz.setY1(d)):(this._feelerRad.setY2(f),
this._feelerHoriz.setY1(f))}else this._sliceLabel&&this._translateLabel(this._sliceLabel,this._explodeOffsetX,this._explodeOffsetY)};DvtPieSlice.prototype._translateLabel=function(a,b,c){a&&(a.setTranslateX(this._sliceLabelPosition.x+b),a.setTranslateY(this._sliceLabelPosition.y+c))};DvtPieSlice._translateShapes=function(a,b,c){if(a)for(var d=a.length,e=0;e<d;e++){var f=a[e];f.setTranslateX(b);f.setTranslateY(c)}};
DvtPieSlice.generateSliceLabelString=function(a){var b=a.getPieChart();if(b.getPieInfo().getLabelPosition()==DvtPieChart.LABEL_POS_NONE)return null;var c=b.getPieInfo().getLabelType();if(c==DvtPieChart.LABEL_TYPE_CUSTOM)return(c=a.getSliceInfo().getText())?c:"?";var d="",e="",f="",g="",h=b.getPieInfo().getConverter(),k=b.getPieInfo().getValueFormat(),m=a.getSliceInfo().getValue(),g=0,b=DvtPieChart.__computeTotal(b),g=0==b?0:Math.abs(m)/b*100;if(h&&h.getAsString)d=h.getAsString(g/100);else try{d=k.getFormattedValue(g/
100)}catch(n){g=g.toString();if(5<g.length)g=g.slice(0,5);else for(0>g.indexOf(".",0)&&4>g.length&&(g+=".");5>g.length;)g+="0";d=g+"%"}if(!isNaN(m))if(h&&h.getAsString)e=h.getAsString(m);else try{e=k.getFormattedValue(m)}catch(n){e=m.toString(),k&&(e=k.getFormattedValue(m))}(a=a.getSliceInfo().getText())&&(f=a);return c==DvtPieChart.LABEL_TYPE_PERCENT||c==DvtPieChart.LABEL_TYPE_UNSPEC?d:c==DvtPieChart.LABEL_TYPE_VALUE?e:c==DvtPieChart.LABEL_TYPE_TEXT?f:c==DvtPieChart.LABEL_TYPE_TEXT_PERCENT?f+", "+
d:c==DvtPieChart.LABEL_TYPE_TEXT_VALUE?f+", "+e:null};DvtPieSlice.prototype.getAngleExtent=function(){return this._angleExtent};DvtPieSlice.prototype.setAngleExtent=function(a){this._angleExtent=a};DvtPieSlice.prototype.getAngleStart=function(){return this._angleStart};DvtPieSlice.prototype.setAngleStart=function(a){this._angleStart=a};DvtPieSlice.prototype.getExplode=function(){return this._sliceInfo.getExplode()};DvtPieSlice.prototype.__getExplodeOffsetX=function(){return this._explodeOffsetX};
DvtPieSlice.prototype.__getExplodeOffsetY=function(){return this._explodeOffsetY};DvtPieSlice.prototype.setOutsideFeelerPoints=function(a,b,c){this._outsideFeelerStart=a;this._outsideFeelerMid=b;this._outsideFeelerEnd=c;this._hasFeeler=!0};DvtPieSlice.prototype.setNoOutsideFeeler=function(){this._outsideFeelerEnd=this._outsideFeelerMid=this._outsideFeelerStart=null;this._hasFeeler=!1};DvtPieSlice.prototype.getSliceInfo=function(){return this._sliceInfo};
DvtPieSlice.prototype.setSliceInfo=function(a){this._sliceInfo=a};DvtPieSlice.prototype.getSliceLabel=function(){return this._sliceLabel};DvtPieSlice.prototype.setSliceLabel=function(a){if(this._sliceLabel=a)this._sliceLabelPosition={x:a.getTranslateX(),y:a.getTranslateY()}};DvtPieSlice.prototype.getSliceLabelString=function(){return this._sliceLabelString};DvtPieSlice.prototype.setSliceLabelString=function(a){this._sliceLabelString=a};DvtPieSlice.prototype.getTopSurface=function(){return this._topSurface};
DvtPieSlice.prototype.getId=function(){return this._sliceInfo.getId()};DvtPieSlice.containsRect=function(a,b){return b.contains(a.x,a.y)&&b.contains(a.x+a.w,a.y)&&b.contains(a.x+a.w,a.y+a.h)&&b.contains(a.x,a.y+a.h)};DvtPieSlice._shapeIsSelectable=function(a){return a instanceof DvtGraphSelectableArc||a instanceof DvtGraphSelectablePolygon||a instanceof DvtGraphSelectablePath};
DvtPieSlice.prototype.contains=function(a,b){for(var c=this._pieChart.getCenter(),d=(a-c.x)/this._radiusX,c=(b-c.y)/this._radiusY,e=180/Math.PI*-Math.atan2(c,d);e<this._angleStart;)e+=360;for(;360<=e-this._angleStart;)e-=360;e=e<=this._angleStart+this._angleExtent;return 1>=Math.pow(d,2)+Math.pow(c,2)&&e};DvtPieSlice.prototype.GetAnimationParams=function(){return[this.getSliceInfo().getValue(),this._radiusX,this._radiusY]};
DvtPieSlice.prototype.SetAnimationParams=function(a){this.getSliceInfo().setValue(a[0]);this._radiusX=a[1];this._radiusY=a[2]};DvtPieSlice.prototype.animateUpdate=function(a,b){var c=b.GetAnimationParams(),d=this.GetAnimationParams();if(!DvtArrayUtils.equals(c,d)){var e=new DvtCustomAnimation(this._pieChart.getCtx(),this,this.getPieChart().getPieInfo().getAnimationDuration());e.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this.GetAnimationParams,this.SetAnimationParams,d);a.add(e,0);this.SetAnimationParams(c)}};
DvtPieSlice.prototype.animateInsert=function(a){var b=new DvtCustomAnimation(this._pieChart.getCtx(),this,this.getPieChart().getPieInfo().getAnimationDuration());b.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this.GetAnimationParams,this.SetAnimationParams,this.GetAnimationParams());a.add(b,0);this.SetAnimationParams([0,0,0])};
DvtPieSlice.prototype.animateDelete=function(a,b){var c=b.addSliceInfo(this.getSliceInfo()),d=b.__getSlices();d.splice(d.length-1,1);var e=this.getPieChart().__getSlices(),f=DvtArrayUtils.getIndex(e,this)-1;if(0<=f)for(e=e[f].getId(),f=0;f<d.length;f++){if(d[f].getId()==e){d.splice(f+1,0,c);break}}else d.splice(0,0,c);d=new DvtCustomAnimation(b.getCtx(),this,this.getPieChart().getPieInfo().getAnimationDuration());d.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,c,c.GetAnimationParams,c.SetAnimationParams,
[0,0,0]);d.setOnEnd(c._removeDeletedSlice,c);a.add(d,0)};DvtPieSlice.prototype._removeDeletedSlice=function(){var a=this.getPieChart().__getSlices(),b=DvtArrayUtils.getIndex(a,this);0<=b&&a.splice(b,1)};DvtPieSlice.prototype.getAction=function(){return this.getSliceInfo().getAction()};
DvtPieSlice.prototype.getDisplayables=function(){var a=[];this._topSurface&&(a=a.concat(this._topSurface));this._leftSurface&&(a=a.concat(this._leftSurface));this._rightSurface&&(a=a.concat(this._rightSurface));this._crustSurface&&(a=a.concat(this._crustSurface));this._sliceLabel&&a.push(this._sliceLabel);this._feelerRad&&a.push(this._feelerRad);this._feelerHoriz&&a.push(this._feelerHoriz);return a};
DvtPieSlice.prototype.getPhysicalShape=function(a){var b=this.getPieChart().getPieInfo();a.setDataColor(this.getSliceInfo().getFillColor(),b.getSelectedInnerColor(),b.getSelectedOuterColor());a.setZorder(!1);a.setSelectedShadow(!1);a.setCursor(DvtSelectionEffectUtils.getSelectingCursor());return a};DvtPieSlice.prototype.isSelectable=function(){return!0};DvtPieSlice.prototype.isSelected=function(){return this._selected};
DvtPieSlice.prototype.setSelected=function(a){(this._selected=a)?this._pieChart.bringToFrontOfSelection(this):this._selecting||this._pieChart.pushToBackOfSelection(this);var b=this.getDisplayables();for(i=0;i<b.length;i++)DvtPieSlice._shapeIsSelectable(b[i])&&this.getPhysicalShape(b[i]).setSelected(a)};
DvtPieSlice.prototype.showHoverEffect=function(){this._selecting=!0;this._pieChart.bringToFrontOfSelection(this);var a=this.getDisplayables();for(i=0;i<a.length;i++)DvtPieSlice._shapeIsSelectable(a[i])&&this.getPhysicalShape(a[i]).showHoverEffect()};DvtPieSlice.prototype.hideHoverEffect=function(){this._selecting=!1;this._selected||this._pieChart.pushToBackOfSelection(this);var a=this.getDisplayables();for(i=0;i<a.length;i++)DvtPieSlice._shapeIsSelectable(a[i])&&this.getPhysicalShape(a[i]).hideHoverEffect()};
DvtPieSlice.prototype.getDatatip=function(a,b,c){return a==this._sliceLabel&&this._sliceLabel&&this._sliceLabel.isTruncated()?this.getSliceLabelString():this.getSliceInfo().getTooltip()};DvtPieSlice.prototype.getDatatipColor=function(){return this.getSliceInfo().getFillColor()};DvtPieSlice.prototype.getShowPopupBehaviors=function(){var a=this.getSliceInfo().getShowPopupBehaviors();return a?a:this._pieChart.__getShowPopupBehaviors()};DvtPieSlice.prototype.getContextMenuId=function(){return this.getSliceInfo().getContextMenuId()};
DvtPieSlice.prototype.getCategories=function(){return[this.getSliceInfo().getId().getSeries()]};DvtPieSlice.prototype.getNextNavigable=function(a){if(a.type==DvtMouseEvent.CLICK||a.keyCode==DvtKeyboardEvent.SPACE&&a.ctrlKey)return this;var b=this._pieChart.__getSlices(),c=b.indexOf(this),d=null;a.keyCode==DvtKeyboardEvent.RIGHT_ARROW?d=c<b.length-1?b[c+1]:b[0]:a.keyCode==DvtKeyboardEvent.LEFT_ARROW&&(d=0==c?b[b.length-1]:b[c-1]);return d};
DvtPieSlice.prototype.getKeyboardBoundingBox=function(){var a=this.getDisplayables();return a[0]?a[0].getDimensions():new DvtRectangle(0,0,0,0)};DvtPieSlice.prototype.showKeyboardFocusEffect=function(){this._isShowingKeyboardFocusEffect=!0;this.showHoverEffect()};DvtPieSlice.prototype.hideKeyboardFocusEffect=function(){this._isShowingKeyboardFocusEffect=!1;this.hideHoverEffect()};DvtPieSlice.prototype.isShowingKeyboardFocusEffect=function(){return this._isShowingKeyboardFocusEffect};
DvtPieSlice.SURFACE_CRUST=0;DvtPieSlice.SURFACE_LEFT=1;DvtPieSlice.SURFACE_RIGHT=2;DvtPieSlice.SURFACE_TOP=3;
DvtPieSlice.createTopSurface=function(a,b){var c=a.getPieChart(),d=c.getPieInfo(),e=c.getCtx(),f=a._sliceInfo,g=c.getCenter(),h=DvtArc.PIE;360==a.getAngleExtent()&&(h=DvtArc.OPEN);e=new DvtGraphSelectableArc(e,g.x,g.y,a._radiusX,a._radiusY,a.getAngleStart(),a.getAngleExtent(),h);e.setDataColor(f.getFillColor(),d.getSelectedInnerColor(),d.getSelectedOuterColor());e.setZOrderManager(this._Chart);e.setTranslateX(a.__getExplodeOffsetX());e.setTranslateY(a.__getExplodeOffsetY());e.setFill(b);f.getStrokeColor()&&
e.setSolidStroke(f.getStrokeColor(),f.getStrokeAlpha());e.setAriaRole("img");d=a.getSliceInfo().getTooltip();e.setAriaProperty("label",d);d=[e];!a.getSliceInfo().getStrokeColor()&&c.getPieInfo().hasVisualEffects()&&c.is3D()&&0<c.getDepth()&&c.getPieInfo().getFillType()==DvtFill.GRADIENT&&(180<=a.getAngleStart()||180<=a.getAngleStart()+a.getAngleExtent()||360==a.getAngleExtent())&&(c=DvtPieSlice._createGradientPieBorder(a,b),c.setTranslateX(a.__getExplodeOffsetX()),c.setTranslateY(a.__getExplodeOffsetY()),
d.push(c));DvtPieSlice._associate(a,d);return d};DvtPieSlice._associate=function(a,b){if(b)for(var c=0;c<b.length;c++)a._pieChart.__getEventManager().associate(b[c],a)};
DvtPieSlice._createGradientPieBorder=function(a,b){var c=a.getSliceInfo(),d=DvtPieRenderUtils.BORDER,e=DvtPieRenderUtils.getGradientColors(null,d),c=DvtPieRenderUtils.getGradientAlphas(c.getStrokeAlpha(),d),d=DvtPieRenderUtils.getGradientRatios(d),f=b.getBounds();grAngle=120;e=new DvtLinearGradientStroke(grAngle,e,c,d,f);e.setWidth(1);c=a.getAngleStart();d=a.getAngleExtent();f=180>c?180-c:0;c=0<f?180:c;d-=f;360<c+d&&(d=360-c);var f=a.getPieChart(),g=f.getCenter(),c=new DvtArc(f.getCtx(),g.x,g.y,f.getRadiusX(),
f.getRadiusY(),c,d,DvtArc.OPEN);c.setStroke(e);return c};DvtPieSlice._createLateralSurface=function(a,b,c){if(0==a.getAngleExtent())return[];var d=[];if(0<a.getSliceInfo().getFillAlpha())if(b==DvtPieSlice.SURFACE_LEFT||b==DvtPieSlice.SURFACE_RIGHT)d.push(DvtPieSlice._generateLateralShape(a,b,null,c));else if(b==DvtPieSlice.SURFACE_CRUST)for(var e=DvtPieSlice._createCrustPathCommands(a),f=e.length,g=0;g<f;g++)d.push(DvtPieSlice._generateLateralShape(a,b,e[g],c));DvtPieSlice._associate(a,d);return d};
DvtPieSlice._generateLateralGradientFill=function(a,b){var c=a.getPieChart(),d=a.getSliceInfo(),e=c.getPieInfo().getSkin(),f=b==DvtPieRenderUtils.CRUST?c.getDepth():0,g=e==DvtCSSStyle.SKIN_SKYROS?0:270,h=DvtPieRenderUtils.getGradientColors(d.getFillColor(),b,e),d=DvtPieRenderUtils.getGradientAlphas(d.getFillAlpha(),b),k=DvtPieRenderUtils.getGradientRatios(b,e),m=null;e==DvtCSSStyle.SKIN_SKYROS&&(m=[Math.floor(c.getCenter().x-c.getRadiusX()),Math.floor(c.getCenter().y-c.getRadiusY())+f,Math.ceil(2*
c.getRadiusX()),Math.ceil(2*c.getRadiusY())]);return new DvtLinearGradientFill(g,h,d,k,m)};
DvtPieSlice._generateLateralShape=function(a,b,c,d){var e=a.getPieChart(),f=e.getCtx(),g=e.getPieInfo(),h=a.getSliceInfo();if(b==DvtPieSlice.SURFACE_LEFT||b==DvtPieSlice.SURFACE_RIGHT){var k=a.getAngleStart(),m=a.getAngleExtent();c=e.getCenter().x;var n=e.getCenter().y,p=a._radiusX,q=a._radiusY,r=e.getDepth();b=b==DvtPieSlice.SURFACE_LEFT?DvtPieRenderUtils.reflectAngleOverYAxis(k+m,c,n,p,q):DvtPieRenderUtils.reflectAngleOverYAxis(k,c,n,p,q);b=DvtPieSlice._generateInnerPoints(c,n,b.x,b.y,r);c=[];for(n=
0;n<b.length;n++)c.push(b[n].x,b[n].y);f=new DvtGraphSelectablePolygon(f,c);f.setDataColor(h.getFillColor(),g.getSelectedInnerColor(),g.getSelectedOuterColor());f.setZOrderManager(e);f.setTranslateX(a.__getExplodeOffsetX());f.setTranslateY(a.__getExplodeOffsetY());f.setFill(d);h.getStrokeColor()&&f.setSolidStroke(h.getStrokeColor(),h.getStrokeAlpha());return f}return c?(f=new DvtGraphSelectablePath(f,null),f.setDataColor(h.getFillColor(),g.getSelectedInnerColor(),g.getSelectedOuterColor()),f.setZOrderManager(e),
f.setCmds(c),f.setTranslateX(a.__getExplodeOffsetX()),f.setTranslateY(a.__getExplodeOffsetY()),f.setFill(d),h.getStrokeColor()&&f.setSolidStroke(h.getStrokeColor(),h.getStrokeAlpha()),f):null};
DvtPieSlice._createCrustPathCommands=function(a){var b=a.getAngleStart(),c=a.getAngleExtent(),d=b+c,e=a.getPieChart(),f=e.getCenter().x,g=e.getCenter().y,h=a._radiusX;a=a._radiusY;var e=e.getDepth(),k=[];180>b&&360<d?(k.push(DvtPieSlice._makeOuterPath(f,g,h,a,e,b,180-b)),k.push(DvtPieSlice._makeOuterPath(f,g,h,a,e,360,d-360)),k.push(DvtPieSlice._makeOuterPath(f,g,h,a,e,180,180))):360<d?(k.push(DvtPieSlice._makeOuterPath(f,g,h,a,e,b,360-b)),k.push(DvtPieSlice._makeOuterPath(f,g,h,a,e,360,d-360))):
180>b&&180<d?(k.push(DvtPieSlice._makeOuterPath(f,g,h,a,e,b,180-b)),k.push(DvtPieSlice._makeOuterPath(f,g,h,a,e,180,d-180))):k.push(DvtPieSlice._makeOuterPath(f,g,h,a,e,b,c));return k};
DvtPieSlice._makeOuterPath=function(a,b,c,d,e,f,g){g=DvtMath.degreesToRads(g);var h=-(DvtMath.degreesToRads(f)+g);--b;f=DvtPieRenderUtils.reflectAngleOverYAxis(f,a,b,c,d);a+=Math.cos(h)*c;b+=Math.sin(h)*d;h=DvtPathUtils.moveTo(f.x,f.y);h+=DvtPathUtils.arcTo(c,d,g,0,a,b);h+=DvtPathUtils.lineTo(a,b+e);h+=DvtPathUtils.arcTo(c,d,g,1,f.x,f.y+e);return h+=DvtPathUtils.lineTo(f.x,f.y)};
DvtPieSlice._generateInnerPoints=function(a,b,c,d,e){var f=[];f.push({x:a,y:b});f.push({x:c,y:d});f.push({x:c,y:d+e});f.push({x:a,y:b+e});return f};
var DvtSliceInfo=function(){this.Init()};DvtObj.createSubclass(DvtSliceInfo,DvtObj,"DvtSliceInfo");DvtSliceInfo.prototype.Init=function(){this._explode=0;this._action=this._text=this._contextMenuId=this._tooltip=this._value=this._strokeAlpha=this._strokeColor=this._fp=this._fillAlpha=this._fillColor=this._index=this._id=null};DvtSliceInfo.prototype.getText=function(){return this._text};DvtSliceInfo.prototype.setText=function(a){this._text=a};DvtSliceInfo.prototype.getExplode=function(){return this._explode};
DvtSliceInfo.prototype.setExplode=function(a){this._explode=a};DvtSliceInfo.prototype.getFillAlpha=function(){return this._fillAlpha};DvtSliceInfo.prototype.setFillAlpha=function(a){this._fillAlpha=a};DvtSliceInfo.prototype.getFillColor=function(){return this._fillColor};DvtSliceInfo.prototype.setFillColor=function(a){this._fillColor=a};DvtSliceInfo.prototype.getFillPattern=function(){return this._fp};DvtSliceInfo.prototype.setFillPattern=function(a){this._fp=a};DvtSliceInfo.prototype.getId=function(){return this._id};
DvtSliceInfo.prototype.setIndex=function(a){this._index=a};DvtSliceInfo.prototype.getIndex=function(){return this._index};DvtSliceInfo.prototype.setId=function(a){this._id=a};DvtSliceInfo.prototype.getStrokeAlpha=function(){return this._strokeAlpha};DvtSliceInfo.prototype.setStrokeAlpha=function(a){this._strokeAlpha=a};DvtSliceInfo.prototype.getStrokeColor=function(){return this._strokeFill};DvtSliceInfo.prototype.setStrokeColor=function(a){this._strokeFill=a};DvtSliceInfo.prototype.getTooltip=function(){return this._tooltip};
DvtSliceInfo.prototype.setTooltip=function(a){this._tooltip=a};DvtSliceInfo.prototype.getContextMenuId=function(){return this._contextMenuId};DvtSliceInfo.prototype.setContextMenuId=function(a){this._contextMenuId=a};DvtSliceInfo.prototype.getValue=function(){return this._value};DvtSliceInfo.prototype.setValue=function(a){this._value=a};DvtSliceInfo.prototype.getAction=function(){return this._action};DvtSliceInfo.prototype.setAction=function(a){this._action=a};
DvtSliceInfo.prototype.getShowPopupBehaviors=function(){return this._popupBehaviors};DvtSliceInfo.prototype.setShowPopupBehaviors=function(a){this._popupBehaviors=a};
var DvtSliceLabelInfo=function(){this._init()};DvtObj.createSubclass(DvtSliceLabelInfo,DvtObj,"DvtSliceLabelInfo");DvtSliceLabelInfo.prototype._init=function(){this._slice=this._sliceLabel=null;this._initialNumLines=this._y=this._x=this._height=this._width=this._position=this._angle=-1;this._hasFeeler=!1;this._minY=this._maxY=-1};DvtSliceLabelInfo.prototype.getAngle=function(){return this._angle};DvtSliceLabelInfo.prototype.setAngle=function(a){this._angle=a};
DvtSliceLabelInfo.prototype.getHeight=function(){return this._height};DvtSliceLabelInfo.prototype.setHeight=function(a){this._height=a};DvtSliceLabelInfo.prototype.getInitialNumLines=function(){return this._initialNumLines};DvtSliceLabelInfo.prototype.setInitialNumLines=function(a){this._initialNumLines=a};DvtSliceLabelInfo.prototype.getMaxY=function(){return this._maxY};DvtSliceLabelInfo.prototype.setMaxY=function(a){this._maxY=a};DvtSliceLabelInfo.prototype.getMinY=function(){return this._minY};
DvtSliceLabelInfo.prototype.setMinY=function(a){this._minY=a};DvtSliceLabelInfo.prototype.boundY=function(a){a=Math.max(a,this._minY);return a=Math.min(a,this._maxY)};DvtSliceLabelInfo.prototype.hasFeeler=function(){return this._hasFeeler};DvtSliceLabelInfo.prototype.setHasFeeler=function(a){this._hasFeeler=a};DvtSliceLabelInfo.prototype.getPosition=function(){return this._position};DvtSliceLabelInfo.prototype.setPosition=function(a){this._position=a};DvtSliceLabelInfo.prototype.getSlice=function(){return this._slice};
DvtSliceLabelInfo.prototype.setSlice=function(a){this._slice=a};DvtSliceLabelInfo.prototype.getSliceLabel=function(){return this._sliceLabel};DvtSliceLabelInfo.prototype.setSliceLabel=function(a){this._sliceLabel=a};DvtSliceLabelInfo.prototype.getWidth=function(){return this._width};DvtSliceLabelInfo.prototype.setWidth=function(a){this._width=a};DvtSliceLabelInfo.prototype.getX=function(){return this._x};DvtSliceLabelInfo.prototype.setX=function(a){this._x=a};DvtSliceLabelInfo.prototype.getY=function(){return this._y};
DvtSliceLabelInfo.prototype.setY=function(a){this._y=a};
var DvtSliceLabelLayout=function(a){this._init(a)};DvtObj.createSubclass(DvtSliceLabelLayout,DvtObj,"DvtSliceLabelLayout");DvtSliceLabelLayout._FONT_METRIC_CHAR="M";DvtSliceLabelLayout._FEELER_MINLENGTH=9;DvtSliceLabelLayout._ISA_FULL_RATIO=.9;DvtSliceLabelLayout._MAX_LINES_PER_LABEL=3;DvtSliceLabelLayout._COLLISION_MARGIN=1;DvtSliceLabelLayout._LEFT_SIDE_LABELS=1;DvtSliceLabelLayout._RIGHT_SIDE_LABELS=2;DvtSliceLabelLayout._LABEL_LEADING=-1.8;DvtSliceLabelLayout._ROUNDING_TOLERANCE=1E-4;
DvtSliceLabelLayout._FEELER_RAD_MINSIZE=.1;DvtSliceLabelLayout._FEELER_HORIZ_MINSIZE=.1;DvtSliceLabelLayout._LABEL_TO_FEELER_OFFSET=.5;DvtSliceLabelLayout._LABEL_TO_FEELER_DISTANCE=3;DvtSliceLabelLayout._NO_COLLISION=0;DvtSliceLabelLayout._HALF_COLLISION=1;DvtSliceLabelLayout._ALL_COLLISION=2;DvtSliceLabelLayout.prototype._init=function(a){this._pieChart=a;this._isaTop;this._isaBottom;this._isaLeft;this._isaRight;this._isaHeight;this._isaXRadius;this._isaYRadius;this._avgHeightFont=-1};
DvtSliceLabelLayout.prototype.layoutLabelsAndFeelers=function(){var a=this._pieChart.getPieInfo().getLabelPosition();a!=DvtPieChart.LABEL_POS_NONE&&(a==DvtPieChart.LABEL_POS_INSIDE?this._layoutInsideLabels():this._layoutOutsideLabelsAndFeelers())};
DvtSliceLabelLayout.prototype._layoutInsideLabels=function(){if(null!=this._pieChart){slices=this._pieChart.__getSlices();var a=slices.length;if(0<a)for(i=0;i<a;i++){var b=slices[i],c;c=b.getAngleStart()+b.getAngleExtent()/2;var d=this._pieChart.getCenter(),e=0,f=0,g=DvtSliceLabelLayout._createLabel(b);1==a?(e=d.x,f=d.y):(c=DvtPieRenderUtils.reflectAngleOverYAxis(c,d.x,d.y,.66*this._pieChart.getRadiusX(),.66*this._pieChart.getRadiusY()),e=c.x,f=c.y);g.setX(e);g.setY(f);g.alignMiddle();g.alignCenter();
g.truncateToCallback(this._pieChart,DvtPieSlice.containsRect,b);b.setSliceLabel(g)}}};
DvtSliceLabelLayout.prototype._layoutOutsideLabelsAndFeelers=function(){if(null!=this._pieChart){var a=[],b=[],c,a=this._pieChart.__getSlices(),a=DvtSliceLabelLayout._createLabel(a[0]);a.setText(DvtSliceLabelLayout._FONT_METRIC_CHAR);this._avgHeightFont=DvtSliceLabelLayout._getTextDimension(this._pieChart,a,-1,-1,-1).y;this._pieChart.__getMaxExplodePixels();this._isaXRadius=this._pieChart.getRadiusX();this._isaYRadius=this._pieChart.getRadiusY();a=this._pieChart.__getFrame();this._isaLeft=a.x;this._isaRight=
a.x+a.w;this._isaTop=a.y;this._isaBottom=a.y+a.h;this._isaHeight=this._isaBottom-this._isaTop;this._originalLabels=[];var d=this._generateInitialLayout(),a=d[0],b=d[1];c=this._refineInitialLayout(a,DvtSliceLabelLayout._LEFT_SIDE_LABELS);var e=this._refineInitialLayout(b,DvtSliceLabelLayout._RIGHT_SIDE_LABELS);c==DvtSliceLabelLayout._HALF_COLLISION&&e!=DvtSliceLabelLayout._NO_COLLISION&&this._columnLabels(a,!0,!0,!0);c!=DvtSliceLabelLayout._NO_COLLISION&&e==DvtSliceLabelLayout._HALF_COLLISION&&this._columnLabels(b,
!1,!0,!0);this._setLabelsAndFeelers(a,DvtSliceLabelLayout._LEFT_SIDE_LABELS);for(c=0;c<a.length;c++)a[c]=null;this._setLabelsAndFeelers(b,DvtSliceLabelLayout._RIGHT_SIDE_LABELS);for(c=0;c<b.length;c++)b[c]=null;d[0]=null;d[1]=null}};
DvtSliceLabelLayout._createLabel=function(a){var b=a.getPieChart(),c=b.getPieInfo();if(c.getLabelPosition()==DvtPieChart.LABEL_POS_NONE)return null;b=b.getCtx();b=new DvtTextArea(b,0,0);b.alignTop();b.setWordWrap(!0);var d=c.getCSSStyle();if(d){var e=d.toString();-1==e.indexOf("color")&&(d=c.getDefaultLabelColor(),c.getLabelPosition()==DvtPieChart.LABEL_POS_INSIDE&&(c=a.getSliceInfo().getFillColor(),d=DvtColorUtils.getContrastingTextColor(c)),d=new DvtCSSStyle(e+("color: "+d+";")))}DvtSliceLabelLayout._setFontPropsOnLabel(d,
b);c=DvtPieSlice.generateSliceLabelString(a);b.setText(c);a.setSliceLabelString(c);return b};DvtSliceLabelLayout._setFontPropsOnLabel=function(a,b){null!=b&&null!=a&&b.setCSSStyle(a)};
DvtSliceLabelLayout.prototype._refineInitialLayout=function(a,b){if(a&&0<a.length){var c=this._isaTop,d=!1,e=!1,f=!1,g=0,h,k=!1,m=k;h=!1;for(var n=b==DvtSliceLabelLayout._LEFT_SIDE_LABELS,p=0;p<a.length;p++)h=a[p],m=k,90<h.getPosition()&&(k=!0),g=h.getY()+h.getHeight(),(h=c-h.getY()>DvtSliceLabelLayout._COLLISION_MARGIN)&&(k?k&&!m?e=!0:f=!0:d=!0),g>c&&(c=g);return d&&f||e?(this._columnLabels(a,n,!0,!0),DvtSliceLabelLayout._ALL_COLLISION):d?(this._columnLabels(a,n,!0,!1),DvtSliceLabelLayout._HALF_COLLISION):
f?(this._columnLabels(a,n,!1,!0),DvtSliceLabelLayout._HALF_COLLISION):DvtSliceLabelLayout._NO_COLLISION}};
DvtSliceLabelLayout.prototype._setLabelsAndFeelers=function(a,b){if(!(null==a||0>=a.length)){var c,d,e,f,g=b==DvtSliceLabelLayout._LEFT_SIDE_LABELS,h=Infinity;for(c=0;c<a.length;c++)f=a[c],d=f.getSlice(),f.hasFeeler()?(d=DvtSliceLabelLayout._calculateFeeler(f,d,g),h=Math.min(h,d)):d.setNoOutsideFeeler();for(c=0;c<a.length;c++)f=a[c],d=f.getSlice(),e=f.getSliceLabel(),f.hasFeeler()&&(g?f.setX(f.getX()+h):f.setX(f.getX()-h),DvtSliceLabelLayout._calculateFeeler(f,d,g),e.setWordWrap(!1)),e.setTranslateY(f.getY()),
e.setTranslateX(f.getX()),f.getY()<this._isaTop||f.getY()+f.getHeight()>this._isaBottom?(d.setSliceLabel(null),d.setNoOutsideFeeler()):(this._truncateSliceLabel(d,f,g),d.setSliceLabel(e))}};
DvtSliceLabelLayout._calculateFeeler=function(a,b,c){var d=b.getPieChart(),e=a.getX(),f=a.getY()+a.getHeight()*DvtSliceLabelLayout._LABEL_TO_FEELER_OFFSET,g=DvtSliceLabelLayout._FEELER_HORIZ_MINSIZE*d.getRadiusX(),h;c?(e+=DvtSliceLabelLayout._LABEL_TO_FEELER_DISTANCE,h=e+g):(e-=DvtSliceLabelLayout._LABEL_TO_FEELER_DISTANCE,h=e-g);if(d.getPieInfo().getLabelPosition()==DvtPieChart.LABEL_POS_OUTSIDE_FEELERS){var k={x:0,y:0};h={x:h,y:f};e={x:e,y:f};k=a.getAngle();f=DvtSliceLabelLayout._adjustForDepth(k,
d.getDepth());k=DvtPieRenderUtils.reflectAngleOverYAxis(k,d.getCenter().x,d.getCenter().y+f,d.getRadiusX(),d.getRadiusY());a=DvtMath.degreesToRads(a.getPosition());d=Math.abs(Math.atan2(h.x-k.x,k.y-h.y));f=(k.y-h.y)*Math.tan(a);if(a>Math.PI/2&&d>Math.PI/2&&d<a||a<Math.PI/2&&d<Math.PI/2&&d>a)h.x=c?k.x-f:k.x+f;b.setOutsideFeelerPoints(k,h,e);return Math.abs(e.x-h.x)-g}return 0};DvtSliceLabelLayout._adjustForDepth=function(a,b){var c=0;189<a&&351>a&&(c=b);return c};
DvtSliceLabelLayout.prototype._getMiddleLabel=function(a){bestAngle=91;bestIndex=-1;for(var b=0;b<a.length;b++)pa=a[b].getPosition(),Math.abs(pa-90)<bestAngle&&(bestAngle=Math.abs(pa-90),bestIndex=b);return bestIndex};
DvtSliceLabelLayout.prototype._setOptimalLabelPosition=function(a,b,c){a.setX(b);b=this._pieChart.getRadiusY()*(1+DvtSliceLabelLayout._FEELER_RAD_MINSIZE);c=DvtMath.degreesToRads(a.getPosition());b*=Math.cos(c);c=DvtSliceLabelLayout._adjustForDepth(a.getAngle(),this._pieChart.getDepth());b=this._pieChart.getCenter().y-b-a.getHeight()*DvtSliceLabelLayout._LABEL_TO_FEELER_OFFSET+c;a.setY(a.boundY(b))};
DvtSliceLabelLayout.prototype._columnLabels=function(a,b,c,d){var e=this._isaTop,f=this._isaBottom,g,h=this._pieChart.getCenter().x;g=this._pieChart.getRadiusX()*(1+DvtSliceLabelLayout._FEELER_RAD_MINSIZE+DvtSliceLabelLayout._FEELER_HORIZ_MINSIZE);h=b?h-g:h+g;for(g=0;g<a.length;g++)a[g].setMinY(e),e+=a[g].getHeight();for(g=a.length-1;0<=g;g--)f-=a[g].getHeight(),a[g].setMaxY(f);if(a[0].getMinY()>=a[0].getMaxY())for(g=0;g<a.length;g++)c=a[g],c.setX(h),c.setY((c.getMinY()+c.getMaxY())/2),c.setHasFeeler(!0);
else{e=this._getMiddleLabel(a);g=a[e];f=90>=g.getPosition();c&&!d&&g.getMinY()+g.getHeight()>this._pieChart.getCenter().y&&(d=!0);d&&!c&&g.getMaxY()<this._pieChart.getCenter().y&&(c=!0);if(c&&f||d&&!f)this._setOptimalLabelPosition(g,h,b),g.setHasFeeler(!0);var f=g.getY(),k=g.getY()+g.getHeight(),m,n;if(c)for(g=e-1;0<=g;g--)c=a[g],n=c.getHeight(),this._setOptimalLabelPosition(c,h,b),c.setHasFeeler(!0),m=c.getY(),f=m+n<f?m:f-n,c.setY(f);if(d)for(g=e+1;g<a.length;g++)c=a[g],n=c.getHeight(),this._setOptimalLabelPosition(c,
h,b),c.setHasFeeler(!0),m=c.getY(),k=m>k?m+n:k+n,c.setY(k-n)}};
DvtSliceLabelLayout.prototype._truncateSliceLabel=function(a,b,c){var d=b.getSliceLabel(),e=d.getCSSStyle(),f=0,f=this._pieChart.getNumChildren(),g=!1;this._pieChart.contains(d)||(this._pieChart.addChild(d),g=!0);d.setCSSStyle(e);a=a.getSliceLabelString();d.setText(a);g&&this._pieChart.removeChildAt(f);f=c?b.getX()-this._isaLeft:this._isaRight-b.getX();c=DvtSliceLabelLayout._getTextDimension(this._pieChart,d,f,-1,b.getInitialNumLines());b.setWidth(c.x);return b.getHeight()!=c.y?(b.setHeight(c.y),
!0):!1};
DvtSliceLabelLayout.prototype._generateInitialLayout=function(){var a=Array(2),b=[],c=[],d,e,f,g=0,h=0,k,m,n;slices=this._pieChart.__getSlices();m=slices.length;if(0<m)for(k=0;k<m;k++)d=slices[k],n=DvtSliceLabelLayout._createLabel(d),g=d.getAngleStart()+d.getAngleExtent()/2,360<g&&(g-=360),0>g&&(g+=360),e=DvtPieRenderUtils.reflectAngleOverYAxis(g,this._pieChart.getCenter().x,this._pieChart.getCenter().y,this._isaXRadius,this._isaYRadius),f=90<=g&&270>g?e.x-this._isaLeft:this._isaRight-e.x,f=DvtSliceLabelLayout._getTextDimension(this._pieChart,
n,f,-1,DvtSliceLabelLayout._MAX_LINES_PER_LABEL),165>g&&15<g?e.y-=1*f.y:15>g||345<g?(e.y-=.5*f.y,e.x+=.2*f.y):165<g&&195>g&&(e.y-=.5*f.y,e.x-=.2*f.y),h=DvtSliceLabelLayout._adjustForDepth(g,this._pieChart.getDepth()),e.y+=h,1==m&&(e.x-=f.x/2),e.y<this._isaTop&&(e.y=this._isaTop),e.y+f.y>this._isaBottom&&(e.y=this._isaBottom-f.y),90<=g&&270>g?(n.alignEnd(),h=g-90,DvtSliceLabelLayout._createLabelInfo(d,n,g,h,f,e,b)):(h=90>=g?Math.abs(90-g):180-(g-270),DvtSliceLabelLayout._createLabelInfo(d,n,g,h,f,
e,c));a[0]=b;a[1]=c;return a};DvtSliceLabelLayout._isOnHorizontalAxis=function(a){return a<DvtSliceLabelLayout._ROUNDING_TOLERANCE||Math.abs(a-180)<DvtSliceLabelLayout._ROUNDING_TOLERANCE||Math.abs(a-360)<DvtSliceLabelLayout._ROUNDING_TOLERANCE};
DvtSliceLabelLayout._createLabelInfo=function(a,b,c,d,e,f,g){for(var h=-1,k,m=0;m<g.length;m++)if(k=g[m],k.getPosition()>d){h=m;break}-1==h&&(h=g.length);k=new DvtSliceLabelInfo;k.setPosition(d);k.setAngle(c);k.setSliceLabel(b);k.setSlice(a);k.setWidth(e.x);k.setHeight(e.y);k.setInitialNumLines(b.getNumLines());k.setX(f.x);k.setY(f.y);g.splice(h,0,k)};
DvtSliceLabelLayout._getTextDimension=function(a,b,c,d,e){d=a.getNumChildren();a.addChild(b);b.setLeading(DvtSliceLabelLayout._LABEL_LEADING);b.setWordWrap(!0);b.setMaxLines(e);b.setMaxWidth(c,0);c={x:0,y:0};b=b.getDimensions();c.x=b.w;c.y=b.h;a.removeChildAt(d);return c};
var DvtPieRenderUtils=function(){};DvtObj.createSubclass(DvtPieRenderUtils,DvtObj,"DvtPieRenderUtils");DvtPieRenderUtils.TWOD="2D";DvtPieRenderUtils.THREED="3D";DvtPieRenderUtils.CRUST="CRUST";DvtPieRenderUtils.SIDE="SIDE";DvtPieRenderUtils.BORDER="BORDER";DvtPieRenderUtils.reflectAngleOverYAxis=function(a,b,c,d,e){a=DvtMath.degreesToRads(360-a);return{x:b+Math.cos(a)*d,y:c+Math.sin(a)*e}};
DvtPieRenderUtils.getGradientColors=function(a,b,c){if(c&&c!=DvtCSSStyle.SKIN_SKYROS){if(b==DvtPieRenderUtils.TWOD||b==DvtPieRenderUtils.THREED)return[DvtColorUtils.adjustHSL(a,0,-.04,-.05),DvtColorUtils.adjustHSL(a,0,-.09,.04)];if(b==DvtPieRenderUtils.CRUST)return[DvtColorUtils.adjustHSL(a,0,-.04,-.05),DvtColorUtils.adjustHSL(a,0,0,-.14)];if(b==DvtPieRenderUtils.SIDE)return[DvtColorUtils.adjustHSL(a,0,-.1,.06),DvtColorUtils.adjustHSL(a,0,-.04,-.05)]}else{if(b==DvtPieRenderUtils.TWOD)return b=[],
b[0]=DvtColorUtils.getRGB(DvtColorUtils.getPastel(a,.1)),b[1]=b[0],b[2]=DvtColorUtils.getRGB(DvtColorUtils.getDarker(a,.9)),b;if(b==DvtPieRenderUtils.BORDER)return["#FFFFFF","#000000","#000000"];c=DvtColorUtils.getRGB(DvtColorUtils.getDarker(a,.88));var d=DvtColorUtils.getRGB(DvtColorUtils.getPastel(a,.05)),e=DvtColorUtils.getRGB(DvtColorUtils.getPastel(a,.15));a=DvtColorUtils.getRGB(DvtColorUtils.getPastel(a,.35));if(b==DvtPieRenderUtils.CRUST)return[c,e,a,c];if("SIDE"==b)return[c,a];if("3D"==b)return[a,
e,c,d,a]}};DvtPieRenderUtils.getGradientAlphas=function(a,b){var c=null==a||isNaN(a)||0==a?1:a;if(b==DvtPieRenderUtils.TWOD)return[c,c,c];if(b==DvtPieRenderUtils.BORDER)return[c/1.59375,c/5.3125,c/2.65625];if(b==DvtPieRenderUtils.THREED)return[c,c,c,c,c];if(b==DvtPieRenderUtils.CRUST)return[c,c,c,c];if(b==DvtPieRenderUtils.SIDE)return[c,c]};
DvtPieRenderUtils.getGradientRatios=function(a,b){if(b&&b!=DvtCSSStyle.SKIN_SKYROS)return[0,1];if(a==DvtPieRenderUtils.TWOD)return[.2,.5,1];if(a==DvtPieRenderUtils.BORDER)return[0,.5,1];if(a==DvtPieRenderUtils.THREED)return[0,.29,.55,.84,1];if(a==DvtPieRenderUtils.CRUST)return[0,.43,.91,1];if(a==DvtPieRenderUtils.SIDE)return[0,1]};
var DvtPieSliceExplodeHandler=function(){};DvtObj.createSubclass(DvtPieSliceExplodeHandler,DvtObj,"DvtPieSliceExplodeHandler");DvtPieSliceExplodeHandler.processClick=function(a){if(!(!a instanceof DvtPieSlice)){var b=a.getPieChart();a=a.getSliceInfo();var c;c=0<a.getExplode()?DvtPieChart.UNITE:DvtPieChart.EXPLODE;b.animateSingleSliceExplode(c,a.getId())}};
var DvtGaugeData=function(){this._Init()};DvtObj.createSubclass(DvtGaugeData,DvtObj,"DvtGaugeData");DvtGaugeData.prototype._Init=function(){this._id=null;this._curVal=this._maxVal=this._minVal=0;this._sTooltip=this._oPlotArea=this._arThresholdColors=this._arThresholdValues=this._oBottomLabel=this._oTopLabel=this._oMetricLabel=this._bottomLabel=this._topLabel=this._metricLabel=null};DvtGaugeData.prototype.getValue=function(){return this._curVal};
var DvtDialGaugeData=function(){this._Init()};DvtObj.createSubclass(DvtDialGaugeData,DvtGaugeData,"DvtDialGaugeData");DvtDialGaugeData.prototype._Init=function(){DvtDialGaugeData.superclass._Init.call(this);this._curAngle=this._dialAngleExtent=this._dialAngleStart=0;this._aThresholdAngles=this._objIndicatorBase=this._pathNeedle=null;this._initAngle=this._iThresholdIndex=0};
var DvtValueFormat=function(a,b,c,d,e,f,g,h,k,m,n,p,q,r,t,v,u,w,z,y,A,C){a=void 0!==a?a:1;b=void 0!==b?b:null;c=void 0!==c?c:null;d=void 0!==d?d:this.SFSYM_K;e=void 0!==e?e:this.SFSYM_M;f=void 0!==f?f:this.SFSYM_B;g=void 0!==g?g:this.SFSYM_T;h=void 0!==h?h:this.SFSYM_Q;k=void 0!==k?k:"";m=void 0!==m?m:"";n=void 0!==n?n:"";p=void 0!==p?p:"";q=void 0!==q?q:3;r=void 0!==r?r:0;t=void 0!==t?t:340;v=void 0!==v?v:1;u=void 0!==u?u:390;w=void 0!==w?w:"0";z=void 0!==z?z:!0;y=void 0!==y?y:"";A=void 0!==A?A:
NaN;C=void 0!==C?C:!1;this._nBaseMultiplier=this._nMultiplier=NaN;this._iMaxIntLen=this._iMinIntLen=this._iMaxFractLen=this._iMinFractLen=0;this._sPadSymbol=null;this._bShowScaleSymbol=!1;this._negSuffix=this._negPrefix=this._posSuffix=this._posPrefix=this._groupSeparator=this._decSymbol=this._sInvalidValueSym=null;this._iGroupSize=3;this._bIsPowerPlusTwo=!1;this._scaleFlag=this.SF_NONE;this._arScaleSymbols=[d,e,f,g,h];this._decDigits=0;this._round=.5;this._origDecDigits=this._origScaleFlag=this._power=
0;this._maxAxisValue=this._minAxisValue=this._origMultiplier=NaN;this._bDefault=0===arguments.length;this.SF_AUTO=0;this.SF_NONE=1;this.SF_K=2;this.SF_M=3;this.SF_B=4;this.SF_T=5;this.SF_Q=6;this.SF_SPECIFIED=99;this.SFSYM_K="K";this.SFSYM_M="M";this.SFSYM_B="B";this.SFSYM_T="T";this.SFSYM_Q="Q";this.cPERIOD=".";this.cCOMMA=",";this.cZEROS="000000000000000000000000000000";this.cEMPTY="";this.cTRUE="t";this.cE="e";this._nMultiplier=a;this._iGroupSize=q;this._iMinFractLen=r;this._iMaxFractLen=t;this._iMinIntLen=
v;this._iMaxIntLen=u;this._sPadSymbol=w;this._bShowScaleSymbol=z;this._nBaseMultiplier=1===A?NaN:A;this._bIsPowerPlusTwo=C;var B;if(isNaN(a))B=this.SF_AUTO,this._nMultiplier=1;else if(1===a)B=this.SF_NONE;else if(B=this.SF_SPECIFIED,z)switch(a){case .001:B=this.SF_K;break;case 1E-6:B=this.SF_M;break;case 1E-9:B=this.SF_B;break;case 1E-12:B=this.SF_T;break;case 1E-15:B=this.SF_Q}this._scaleFlag=B;var E=0;-1!==this._iMinFractLen&&(this._iMinFractLen>this._iMaxFractLen&&(this._iMaxFractLen=this._iMinFractLen),
this._iMinFractLen===this._iMaxFractLen?E=this._iMinFractLen:this._iMinFractLen<this._iMaxFractLen&&(E=this._iMaxFractLen));-1===this._iMinFractLen&&(E=-1);this._origScaleFlag=B;this._origMultiplier=this._nMultiplier;this._decDigits=this._origDecDigits=E;this._decSymbol=null===b?this.cPERIOD:b;-1!==E&&(this._round=Math.pow(10,E));this._groupSeparator=c;null===k&&(k=this.cEMPTY);null===m&&(m=this.cEMPTY);null===n&&(n=this.cEMPTY);null===p&&(p=this.cEMPTY);this._posPrefix=k;this._posSuffix=m;this._negPrefix=
n;this._negSuffix=p};DvtObj.createSubclass(DvtValueFormat,DvtObj,"DvtValueFormat");DvtValueFormat.prototype._autoDecDigits=function(a){var b=0;this._power=this._getPowerOfTen(a);this._bIsPowerPlusTwo&&(this._power+=2);b=2>=this._power?3-this._power:16<=this._power?3>this._power-15?3-(this._power-15):0:3-(this._power-3*Math.floor((this._power-1)/3));-1===this._decDigits&&(this._decDigits=b);0!==this._decDigits&&(this._round=Math.pow(10,this._decDigits))};
DvtValueFormat.prototype._autoScale=function(a){var b=!1;if(!isNaN(this._maxAxisValue)&&!isNaN(this._minAxisValue)){a=Math.abs(this._minAxisValue);var c=Math.abs(this._maxAxisValue);a=c>a?c:a;this._maxAxisValue=this._minAxisValue=NaN}this._power=this._getPowerOfTen(a);this._bIsPowerPlusTwo&&(this._power+=2);if(2>=this._power)this._scaleFlag=this.SF_NONE,this._nMultiplier=1,-1===this._decDigits&&(this._decDigits=3-this._power);else if(16<=this._power)this._scaleFlag=this.SF_Q,-1===this._decDigits&&
(this._decDigits=3>this._power-15?3-(this._power-15):0),this._nMultiplier=1E-15,b=!0;else{a=3*Math.floor((this._power-1)/3);switch(a){case 3:this._scaleFlag=this.SF_K;this._nMultiplier=.001;b=!0;break;case 6:this._scaleFlag=this.SF_M;this._nMultiplier=1E-6;b=!0;break;case 9:this._scaleFlag=this.SF_B;this._nMultiplier=1E-9;b=!0;break;case 12:this._scaleFlag=this.SF_T;this._nMultiplier=1E-12;b=!0;break;case 15:this._scaleFlag=this.SF_Q;this._nMultiplier=1E-15;b=!0;break;default:this._scaleFlag=this.SF_NONE}-1===
this._decDigits&&(this._decDigits=3-(this._power-a))}0!==this._decDigits&&(this._round=Math.pow(10,this._decDigits));return b};
DvtValueFormat.prototype.getFormattedValue=function(a,b,c){b=void 0!==b?b:NaN;c=void 0!==c?c:NaN;var d,e=!1;d=!1;var f=this._iMinFractLen,g=this._iMaxFractLen;if(isNaN(a)||!isFinite(a))return this._sInvalidValueSym;this._minAxisValue=b;this._maxAxisValue=c;this._scaleFlag=this._origScaleFlag;if(this._scaleFlag===this.SF_AUTO||this._scaleFlag!==this.SF_AUTO&&-1===f)this._power=0,this._scaleFlag===this.SF_AUTO&&(this._nMultiplier=1),this._decDigits=this._origDecDigits,this._nMultiplier=this._origMultiplier;
0>a&&(a=-a,e=!0);this._scaleFlag!==this.SF_AUTO&&-1===f&&(this._autoDecDigits(a),a*=this._nMultiplier,d=!0,-1==f&&(f=this._decDigits),-1===g&&(g=this._decDigits),this._round=Math.pow(10,this._decDigits));this._scaleFlag===this.SF_AUTO&&(this._autoScale(a),-1===f&&(f=this._decDigits),-1===g&&(g=this._decDigits),this._round=Math.pow(10,this._decDigits));d||this._scaleFlag===this.SF_NONE||1===this._nMultiplier||(b=0<this._decDigits?this._decDigits+3:3,a=a*this._nMultiplier*Math.pow(10,b),a/=Math.pow(10,
b));isNaN(this._nBaseMultiplier)||(a*=this._nBaseMultiplier);if(isNaN(a)||!isFinite(a))return this._sInvalidValueSym;a=Math.round(a*this._round)/this._round;a+="";c=a.indexOf(this.cPERIOD);b=0;0>this._power&&(d=a.indexOf(this.cE),0<d&&(a=a.substr(0,d),d=-this._power-c,0<d&&(a=this.cPERIOD+this.cZEROS.substring(0,d)+a.substr(0,c)+a.substr(c+1),c=0)));if(0===f&&0===g)0<=c&&(a=a.substring(0,c));else if(0<=c)if(b=a.length-1-c,b<f)if(b=f-b,"0"===this._sPadSymbol&&b<=this.cZEROS.length)a+=this.cZEROS.substr(0,
b);else for(d=b;0<d;d--)a+=this._sPadSymbol;else{if(b>g){d=c+f+1;for(var h=a.length;d<h;){if("0"!==a.charAt(d)){h=0;break}d++}a=a.substring(0,c+(0===h?g:f)+1)}}else if(0<f){a+=this._decSymbol;if("0"===this._sPadSymbol&&f<=this.cZEROS.length)a+=this.cZEROS.substr(0,f);else for(d=this._iMinFractLen;0<d;d--)a+=this._sPadSymbol;c=a.length-f-1}var f=0,k,g=0,f=0<=c?c:a.length,g=this._iMaxIntLen;1===f&&0===this._iMinIntLen&&(g=0);if(f<this._iMinIntLen){f=this._iMinIntLen-f;if("0"===this._sPadSymbol&&f<=
this.cZEROS.length)k=this.cZEROS.substr(0,f);else for(d=f;0<d;d--)k+=this._sPadSymbol;a=k+a;0<=c&&(c+=f)}else f>g&&(f-=g,a=a.substring(f),0<=c&&(c-=f));if(null!==this._groupSeparator&&0<this._iGroupSize&&(0>c&&(c=a.length),c>this._iGroupSize)){k=c-this._iGroupSize;f=a.substring(k);for(g=this.cEMPTY;;){f=g+f;k-=this._iGroupSize;if(0>=k){k+=this._iGroupSize;f=a.substring(0,k)+this._groupSeparator+f;break}g=a.substr(k,this._iGroupSize)+this._groupSeparator}a=f}0<b&&null!==this._decSymbol&&(c=a.lastIndexOf(this.cPERIOD),
0<=c&&(k=this.cEMPTY,b=a.substr(0,c),++c<=a.length&&(k=a.substr(c)),a=b+this._decSymbol+k));this._bShowScaleSymbol&&this._scaleFlag>=this.SF_K&&this._scaleFlag<=this.SF_Q&&(k=this._arScaleSymbols[this._scaleFlag-this.SF_K],null!==k&&(a+=k));e?(a=this._negPrefix+a,a+=this._negSuffix):(a=this._posPrefix+a,a+=this._posSuffix);return a};
DvtValueFormat.prototype._getPowerOfTen=function(a){var b=0;10<=a?(a=Math.floor(a),b=a.toString().length-1):1>a&&0!==a&&(b=a.toExponential(),a=b.indexOf("e"),b=parseInt(b.substr(a+1),10));return b};DvtValueFormat.prototype.isDefault=function(){return this._bDefault};DvtValueFormat.prototype.setDefault=function(a){this._bDefault=a};
var DvtDetObj=function(){this._Init()};DvtObj.createSubclass(DvtDetObj,DvtObj,"DvtDetObj");DvtDetObj.prototype._applyClipPath=function(){this._clipPath&&this._DetObj.setClipPath(this._clipPath)};DvtDetObj.prototype.getChart=function(){return this._Chart};DvtDetObj.prototype.setChart=function(a){this._Chart=a;this._DetObj.setChart&&this._DetObj.setChart(a)};DvtDetObj.prototype.getDetObj=function(){return this._DetObj};DvtDetObj.prototype.setDetObj=function(a){this._DetObj=a};
DvtDetObj.prototype.getId=function(){return DvtGraphEventUtils.getId(this.getSeriesId(),this.getGroupId())};DvtDetObj.prototype.getGroupId=function(){return this._groupId};DvtDetObj.prototype.setGroupId=function(a){this._groupId=a};DvtDetObj.prototype.getGroupIndex=function(){return this._groupIdx};DvtDetObj.prototype.setGroupIndex=function(a){this._groupIdx=a};DvtDetObj.prototype.getMiscId=function(){return this._miscId};DvtDetObj.prototype.setMiscId=function(a){this._miscId=a};
DvtDetObj.prototype.getObjId=function(){return this._objId};DvtDetObj.prototype.setObjId=function(a){this._objId=a};DvtDetObj.prototype.getCategories=function(){return[this.getSeriesId()]};DvtDetObj.prototype.isSelectable=function(){if(this.getChart()&&this.getChart().isSelectionSupported()){if(this._objId==DvtGraphObjType.STOCK_VOLUME_RISER)return!0;if(!(this._DetObj instanceof DvtText||this._objId==DvtGraphObjType.PARETO_LINE_RISER))return this.getSeriesId()&&this.getGroupId()}return!1};
DvtDetObj.prototype.isSelected=function(){return this._DetObj&&this._DetObj.isSelected?this._DetObj.isSelected():!1};DvtDetObj.prototype.setSelected=function(a){if(this._DetObj&&this._DetObj.setSelected)return this._DetObj.setSelected(a)};DvtDetObj.prototype.showHoverEffect=function(){if(this._DetObj&&this._DetObj.showHoverEffect)return this._DetObj.showHoverEffect()};DvtDetObj.prototype.hideHoverEffect=function(){if(this._DetObj&&this._DetObj.hideHoverEffect)return this._DetObj.hideHoverEffect()};
DvtDetObj.prototype.getShowPopupBehaviors=function(){if(this.getSeriesId()&&this.getGroupId())return this._Chart.__getShowPopupBehaviors()};DvtDetObj.prototype.getContextMenuId=function(){return this._Chart.getMenuId(this.getSeriesIndex(),this.getGroupIndex())};DvtDetObj.prototype.getRefObjs=function(){return this._aRefObjs};DvtDetObj.prototype.setRefObjs=function(a){this._aRefObjs=a};DvtDetObj.prototype.getSeriesId=function(){return this._seriesId};
DvtDetObj.prototype.setSeriesId=function(a){this._seriesId=a};DvtDetObj.prototype.getSeriesIndex=function(){return this._seriesIdx};DvtDetObj.prototype.setSeriesIndex=function(a){this._seriesIdx=a};DvtDetObj.prototype.getShapeAttr=function(a){return this._shapeAttr};DvtDetObj.prototype.setShapeAttr=function(a){this._shapeAttr=a};DvtDetObj.prototype.getStackId=function(){return this._stackId};DvtDetObj.prototype.setStackId=function(a){this._stackId=a};
DvtDetObj.prototype.getDatatip=function(a,b,c){if(this._datatip)return this._datatip;if(this._tooltip||this.isInitFxInProgress())return null;if(this.isUseTooltip())return DvtGraphParser.convertLineBreaks(DvtGraphEventUtils.GetTooltipText(this._Chart,this,b,c))};DvtDetObj.prototype.setDatatip=function(a){this._datatip=DvtGraphParser.convertLineBreaks(a)};DvtDetObj.prototype.getTooltip=function(a,b,c){return this._tooltip};DvtDetObj.prototype.setTooltip=function(a){this._tooltip=DvtGraphParser.convertLineBreaks(a)};
DvtDetObj.prototype.getTooltipText=function(){return this._tooltipText};DvtDetObj.prototype.setTooltipText=function(a){this._tooltipText=a};DvtDetObj.prototype.hasTooltipText=function(){return null!=this._tooltipText&&void 0!=this._tooltipText};DvtDetObj.prototype.getUserProps=function(){return this._userProps};DvtDetObj.prototype.setUserProps=function(a){this._userProps=a};DvtDetObj.prototype.init=function(){this._DetObj.init&&this._DetObj.init();this._applyClipPath()};
DvtDetObj.prototype.isInitFxInProgress=function(){return this._bInitFxInProgress};DvtDetObj.prototype.isMultiRiser=function(){return this._bMultiRiser};DvtDetObj.prototype.isRefObj=function(){return this._bRefObj};DvtDetObj.prototype.setRefObj=function(a){this._bRefObj=a};DvtDetObj.prototype.isUseTooltip=function(){return this._bUseTooltip};DvtDetObj.prototype.setInitFx=function(a){this._bInitFx=a||!1};DvtDetObj.prototype.setMultiRiser=function(a){this._bMultiRiser=a};
DvtDetObj.prototype.getUnderlayFC=function(){return this._underlayClr};DvtDetObj.prototype.setUnderlayFC=function(a){this._underlayClr=a};DvtDetObj.prototype.getUnderlayType=function(){return this._underlayType};DvtDetObj.prototype.setUnderlayType=function(a){this._underlayType=a};DvtDetObj.prototype.setUseTooltip=function(a){this._bUseTooltip=a};DvtDetObj.prototype.render=function(){this._bInitFx&&!this._bInitFxDone&&(this._DetObj.doInitFx(),this._bInitFxDone=!0);this._DetObj.render&&this._DetObj.render()};
DvtDetObj.prototype._Init=function(){this._bVisible=!0;this._datatipText=this._tooltipText=null;this._bUseTooltip=!1;this._seriesId=this._objId=this._Chart=null;this._seriesIdx=-1;this._groupId=null;this._miscId=this._groupIdx=-1;this._userProps=this._clipPath=this._stackId=null;this._bRefObj=this._bMultiRiser=this._bInitFxInProgress=this._bInitFx=!1;this._DetObj=this._shapeAttr=this._aRefObjs=null};
var DvtGraphAnimation=function(){this._Init()};DvtObj.createSubclass(DvtGraphAnimation,DvtObj,"DvtGraphAnimation");DvtGraphAnimation.NONE="none";DvtGraphAnimation.AUTO="auto";DvtGraphAnimation.ALL="all";DvtGraphAnimation.ADS=1;DvtGraphAnimation.PPR=2;DvtGraphAnimation.DISPLAY=3;DvtGraphAnimation.DURATION=1E3;
DvtGraphAnimation.prototype._Init=function(){this.animOnDataChange=DvtGraphAnimation.NONE;this.dataChangeDuration=DvtGraphAnimation.DURATION;this.animOnDisplay=DvtGraphAnimation.NONE;this.displayDuration=DvtGraphAnimation.DURATION;this.indicators=DvtGraphAnimation.ALL;this.upColor="#0099FF";this.upAlpha=1;this.downColor="#FF3300";this.downAlpha=1;this.twinkleColor="FFFF00";this.twinkleAlpha=1};
var DvtGraphSysUtils=function(){};DvtObj.createSubclass(DvtGraphSysUtils,DvtObj,"DvtGraphSysUtils");DvtGraphSysUtils.makeDetObject=function(a,b,c){var d=new DvtDetObj;d.setDetObj(a);a._Dlo=d;b&&(d.setChart(b),b.addDLO(d));void 0!==c&&d.setObjId(c)};
var DvtHandleManager=function(a){this.Init(a)};DvtObj.createSubclass(DvtHandleManager,DvtObj,"DvtHandleManager");DvtHandleManager.C_SCROLL="s";DvtHandleManager.C_RESIZE="r";DvtHandleManager.SCROLL_START="__START__";DvtHandleManager.SCROLL_SPAN="__SPAN__";DvtHandleManager.SCROLL_TOTAL="__TOTAL__";DvtHandleManager.TOK_TYPE="__T__";
DvtHandleManager.prototype.Init=function(a){this._Chart=a;this._handleList=[];this._fullPlotPoints=this._o1rs=this._y2rs=this._y1rs=this._x1rs=this._hY2L=this._hY1L=this._hOL=this._hY2PA=this._hY1PA=this._hX1L=this._hPA=null;this._fullPlotHeight=this._fullPlotWidth=0;this._fullPlotPointsY2=null;this._fullPlotHeightY2=this._fullPlotWidthY2=0;a.addEvtListener(DvtMouseEvent.MOUSEUP,this.onGlobalMouseUp,!1,this)};
DvtHandleManager.prototype.addHandle=function(a){this._handleList.push(a);switch(a.getId()){case DvtGraphHandle.ID_PA:this._hPA=a;break;case DvtGraphHandle.ID_X1L:this._hX1L=a;break;case DvtGraphHandle.ID_Y1PA:this._hY1PA=a;break;case DvtGraphHandle.ID_Y2PA:this._hY2PA=a;break;case DvtGraphHandle.ID_OL:this._hOL=a;break;case DvtGraphHandle.ID_Y1L:this._hY1L=a;break;case DvtGraphHandle.ID_Y2L:this._hY2L=a}a.getId()==DvtGraphHandle.ID_PA&&null!=a.getBoundingPoints()?(this._fullPlotPoints=a.getBoundingPoints(),
this._fullPlotWidth=this._fullPlotPoints[2]-this._fullPlotPoints[0],this._fullPlotHeight=this._fullPlotPoints[3]-this._fullPlotPoints[1]):a.getId()==DvtGraphHandle.ID_Y2PA&&null!=a.getBoundingPoints()&&(this._fullPlotPointsY2=a.getBoundingPoints(),this._fullPlotWidthY2=this._fullPlotPointsY2[2]-this._fullPlotPointsY2[0],this._fullPlotHeightY2=this._fullPlotPointsY2[3]-this._fullPlotPointsY2[1])};
DvtHandleManager.prototype.addScrollbar=function(a){var b=a.getScrollbarThumb();DvtGraphSysUtils.makeDetObject(b,a._Dlo._Chart);switch(a._uiId){case DvtScrollbar.ID_X1RS:this._x1rs=a;break;case DvtScrollbar.ID_Y1RS:this._y1rs=a;break;case DvtScrollbar.ID_Y2RS:this._y2rs=a;break;case DvtScrollbar.ID_O1RS:this._o1rs=a}a.addEvtListener(DvtScrollbarEvent.SB_MOVE,this.onScrollbarMove,!1,this);a.addEvtListener(DvtScrollbarEvent.SB_MOVE_COMPLETE,this.onScrollbarMoveComplete,!1,this);a.addEvtListener(DvtScrollbarEvent.SB_RESIZE_COMPLETE,
this.onScrollbarResizeComplete,!1,this)};DvtHandleManager.prototype.hasScrollbars=function(){return this._o1rs||this._x1rs||this._y1rs||this._y2rs?!0:!1};DvtHandleManager.prototype.onGlobalMouseUp=function(a){this._o1rs&&this._o1rs.processGlobalMouseUp();this._x1rs&&this._x1rs.processGlobalMouseUp();this._y1rs&&this._y1rs.processGlobalMouseUp();this._y2rs&&this._y2rs.processGlobalMouseUp()};
DvtHandleManager.prototype.onScrollbarMove=function(a){var b=a.getMovedDelta();if(a.type==DvtScrollbarEvent.SB_MOVE&&0!=b){this._Chart.isMagnifyLensEnabled()&&this._Chart.getCtx().getCustomTooltipManager().getMagnifyLens().setDirty(!0);var c=a.getScaledDelta(),b=a.getScrollbar(),d=this._fullPlotWidth,e=this._fullPlotHeight;b.getUIId()==DvtScrollbar.ID_Y2RS&&(d=this._fullPlotWidthY2,e=this._fullPlotHeightY2);c=b.isHorizontal()?c*d:c*e;c=0<c?Math.ceil(c):Math.floor(c);switch(a.getScrollbarId()){case DvtScrollbar.ID_X1RS:this._scrollXAxis(c,
b);break;case DvtScrollbar.ID_O1RS:this._scrollOAxis(c,b);break;case DvtScrollbar.ID_Y1RS:this._scrollYAxis(c,b);break;case DvtScrollbar.ID_Y2RS:this._scrollY2Axis(c,b)}}};DvtHandleManager.prototype.onScrollbarMoveComplete=function(a){this._emitMTEvent(a)};DvtHandleManager.prototype.onScrollbarResizeComplete=function(a){this._emitMTEvent(a)};
DvtHandleManager.prototype._emitMTEvent=function(a){var b=a.getScrollbar(),c,d;a.type==DvtScrollbarEvent.SB_MOVE_COMPLETE?(d=DvtHandleManager.C_SCROLL,c=b.getScrollEventJs()):a.type==DvtScrollbarEvent.SB_RESIZE_COMPLETE&&(d=DvtHandleManager.C_RESIZE,c=b.getZoomEventJs());if(c){var e=a.getStartCoord();a=a.getEndCoord()-e;var f=b.getScrollAreaLength();b.isHorizontal()||(e=f-a-e);var g=c.replace(DvtHandleManager.SCROLL_START,e).replace(DvtHandleManager.SCROLL_SPAN,a).replace(DvtHandleManager.SCROLL_TOTAL,
f).replace(DvtHandleManager.TOK_TYPE,d).match(/'(.*?)'/g),b=g[0].replace(/\'/g,"");c=g[2].replace(/\'/g,"");d=g[3].replace(/\'/g,"");e=g[4].replace(/\'/g,"");a=g[5].replace(/\'/g,"");f=g[6].replace(/\'/g,"");g=g[7].replace(/\'/g,"");AdfPage.PAGE.findComponent(b).getPeer().sendToServerPPR2({source:b,event:c,bi_gdsA:d,bi_gdsSt:e,bi_gdsSp:a,bi_gdsC:f,bi_gdsT:g})}};
DvtHandleManager.prototype._scrollOAxis=function(a,b){if(null!=this._hPA&&null!=this._hPA.getBoundingPoints()){var c=this._hPA.getBoundingPoints(),d=this._Chart.getFrameRect();b.isHorizontal()?(c=this._getBoundedOffset(a,c[0],c[2],d.x,d.x+d.w),this._hPA.moveX(-c),null!=this._hOL&&this._hOL.moveX(-c),null!=this._hY2PA&&this._hY2PA.moveX(-c)):(c=this._getBoundedOffset(a,c[1],c[3],d.y,d.y+d.h),this._hPA.moveY(-c),null!=this._hOL&&this._hOL.moveY(-c),null!=this._hY2PA&&this._hY2PA.moveY(-c))}};
DvtHandleManager.prototype._scrollXAxis=function(a,b){if(null!=this._hPA&&null!=this._hPA.getBoundingPoints()){var c=this._hPA.getBoundingPoints(),d=this._Chart.getFrameRect();b.isHorizontal()?(c=this._getBoundedOffset(a,c[0],c[2],d.x,d.x+d.w),this._hPA.moveX(-c),null!=this._hX1L&&this._hX1L.moveX(-c),null!=this._hY2PA&&this._hY2PA.moveX(-c)):(c=this._getBoundedOffset(a,c[1],c[3],d.y,d.y+d.h),this._hPA.moveY(-c),null!=this._hX1L&&this._hX1L.moveY(-c),null!=this._hY2PA&&this._hY2PA.moveY(-c))}};
DvtHandleManager.prototype._scrollYAxis=function(a,b){if(null!=this._hPA&&null!=this._hPA.getBoundingPoints()){var c=this._hPA.getBoundingPoints(),d=this._hPA.getClipRect();null!=d&&(b.isHorizontal()?(c=this._getBoundedOffset(a,c[0],c[2],d.x,d.x+d.w),this._hPA.moveX(-c),null!=this._hY1L&&this._hY1L.moveX(-c)):(c=this._getBoundedOffset(a,c[1],c[3],d.y,d.y+d.h),this._hPA.moveY(-c),null!=this._hY1L&&this._hY1L.moveY(-c)))}};
DvtHandleManager.prototype._scrollY2Axis=function(a,b){if(null!=this._hY2PA&&null!=this._hY2PA.getBoundingPoints()){var c=this._hY2PA.getBoundingPoints(),d=this._hY2PA.getClipRect();null!=d&&(b.isHorizontal()?(c=this._getBoundedOffset(a,c[0],c[2],d.x,d.x+d.w),this._hY2PA.moveX(-c),null!=this._hY2L&&this._hY2L.moveX(-c)):(c=this._getBoundedOffset(a,c[1],c[3],d.y,d.y+d.h),this._hY2PA.moveY(-c),null!=this._hY2L&&this._hY2L.moveY(-c)))}};
DvtHandleManager.prototype._getBoundedOffset=function(a,b,c,d,e){var f=a;b-a>=d?f=b-d:e>c-a&&(f=c-e);return f};
DvtHandleManager.prototype.scrollPlotAreaOffset=function(a,b,c,d,e,f,g){var h=0,k=0,m=0,n=0;0!=a&&null!=this._o1rs&&(h=this._o1rs.isHorizontal()?100*a/this._fullPlotWidth:100*a/this._fullPlotHeight);0!=b&&null!=this._x1rs&&(k=this._x1rs.isHorizontal()?100*b/this._fullPlotWidth:100*b/this._fullPlotHeight);0!=c&&null!=this._y1rs&&(m=this._hPA.getClipRect(),null!=e&&null!=m&&(e.x<m.x||e.x>m.x+m.width||e.y<m.y||e.y>m.y+m.height)&&(c=0),m=this._y1rs.isHorizontal()?100*c/this._fullPlotWidth:100*c/this._fullPlotHeight);
0!=d&&null!=this._y2rs&&(c=this._hY2PA.getClipRect(),null!=e&&null!=c&&(e.x<c.x||e.x>c.x+c.width||e.y<c.y||e.y>c.y+c.height)&&(d=0),n=this._y2rs.isHorizontal()?100*d/this._fullPlotWidthY2:100*d/this._fullPlotHeightY2);this.scrollPlotAreaPercentage(h,k,m,n,f,g)};
DvtHandleManager.prototype.scrollPlotAreaPercentage=function(a,b,c,d,e,f){var g=null;0!=a&&null!=this._o1rs&&(g=this._o1rs.isHorizontal()?a/100*this._fullPlotWidth:a/100*this._fullPlotHeight,this._scrollOAxis(g,this._o1rs),this._o1rs.move(a,e,f));0!=b&&null!=this._x1rs&&(g=this._x1rs.isHorizontal()?b/100*this._fullPlotWidth:b/100*this._fullPlotHeight,this._scrollXAxis(g,this._x1rs),this._x1rs.move(b,e,f));0!=c&&null!=this._y1rs&&(g=this._y1rs.isHorizontal()?c/100*this._fullPlotWidth:c/100*this._fullPlotHeight,
this._scrollYAxis(g,this._y1rs),this._y1rs.move(c,e,f));0!=d&&null!=this._y2rs&&(g=this._y2rs.isHorizontal()?d/100*this._fullPlotWidthY2:d/100*this._fullPlotHeightY2,this._scrollY2Axis(g,this._y2rs),this._y2rs.move(d,e,f))};DvtHandleManager.prototype.dispatchJSEvents=function(){null!=this._o1rs&&this._o1rs.move(0,!0,!0);null!=this._x1rs&&this._x1rs.move(0,!0,!0);null!=this._y1rs&&this._y1rs.move(0,!0,!0);null!=this._y2rs&&this._y2rs.move(0,!0,!0)};
DvtHandleManager.prototype.getHandle=function(a){switch(a){case DvtGraphHandle.ID_PA:return this._hPA;case DvtGraphHandle.ID_X1L:return this._hX1L;case DvtGraphHandle.ID_Y1PA:return this._hY1PA;case DvtGraphHandle.ID_Y2PA:return this._hY2PA;case DvtGraphHandle.ID_OL:return this._hOL;case DvtGraphHandle.ID_Y1L:return this._hY1L;case DvtGraphHandle.ID_Y2L:return this._hY2L;default:return null}};
var DvtGraphEventHandler=function(){};DvtObj.createSubclass(DvtGraphEventHandler,DvtEventManager,"DvtGraphEventHandler");DvtGraphEventHandler.prototype.Init=function(a,b,c){DvtGraphEventHandler.superclass.Init.call(this,a,b,c);this.SeriesFocusHandler=this.GraphKeyboardHandler=this.GraphPanHandler=this.DataCursorHandler=this.HideShowSeriesHandler=this.SeriesRolloverHandler=null};DvtGraphEventHandler.prototype.setSeriesRolloverHandler=function(a){this.SeriesRolloverHandler=a};
DvtGraphEventHandler.prototype.setHideShowSeriesHandler=function(a){this.HideShowSeriesHandler=a};DvtGraphEventHandler.prototype.setDataCursorHandler=function(a){this.DataCursorHandler=a};DvtGraphEventHandler.prototype.setGraphPanHandler=function(a){this.GraphPanHandler=a};DvtGraphEventHandler.prototype.setSeriesFocusHandler=function(a){this.SeriesFocusHandler=a};DvtGraphEventHandler.prototype.setGraphKeyboardHandler=function(a){this.GraphKeyboardHandler=a};
DvtGraphEventHandler.prototype.HandleTouchHoverStartInternal=function(a){var b=a.touch,c=a.target,d=b.pageX,e=b.pageY,f=this._context.getRelativePosition(d,e),g=this.GetLogicalObject(c);this.TouchManager.setTooltipEnabled(b.identifier,this.IsTooltipShowable(g,f));this.HandleTouchHoverStartGraphInternal(a);this.DataCursorHandler&&this.DataCursorHandler.processMove(d,e,c,g);return!1};DvtGraphEventHandler.prototype.HandleTouchHoverStartGraphInternal=function(a){};
DvtGraphEventHandler.prototype.HandleTouchHoverMoveInternal=function(a){var b=a.touch,c=a.target,d=b.pageX,e=b.pageY,f=this._context.getRelativePosition(d,e),g=this.GetLogicalObject(c),b=b.identifier;this.DataCursorHandler&&this.DataCursorHandler.processMove(d,e,c);this.TouchManager.setTooltipEnabled(b,this.IsTooltipShowable(g,f));this.HandleTouchHoverMoveGraphInternal(a);return!1};DvtGraphEventHandler.prototype.HandleTouchHoverMoveGraphInternal=function(a){};
DvtGraphEventHandler.prototype.HandleTouchHoverEndInternal=function(a){var b=a.touch,c=this.GetLogicalObject(a.target);this.DataCursorHandler&&this.DataCursorHandler.processEnd();this._processHideShowPopup(c)&&(b=this.TouchManager.getTouchInfo(b.identifier))&&(b.fireClick=!1);this.SeriesRolloverHandler&&this.SeriesRolloverHandler.processMouseOut(c);this.HandleTouchHoverEndGraphInternal(a)};DvtGraphEventHandler.prototype.HandleTouchHoverEndGraphInternal=function(a){};
DvtGraphEventHandler.prototype.HandleTouchHoverOverInternal=function(a){var b=this.GetLogicalObject(a.target);if(this.SeriesRolloverHandler&&(this.SeriesRolloverHandler.processMouseOver(b),this.IsMagnifyLensEnabled()&&b)){var c=this.GetMagnifyLens();null!==b.getCategories()[0]&&c.setDirty(!0)}this.HandleTouchHoverOverGraphInternal(a)};DvtGraphEventHandler.prototype.HandleTouchHoverOverGraphInternal=function(a){};
DvtGraphEventHandler.prototype.HandleTouchHoverOutInternal=function(a){var b=this.GetLogicalObject(a.target);this.SeriesRolloverHandler&&this.SeriesRolloverHandler.processMouseOut(b);this.HandleTouchHoverOutGraphInternal(a)};DvtGraphEventHandler.prototype.HandleTouchHoverOutGraphInternal=function(a){};
DvtGraphEventHandler.prototype.HandleTouchClickInternal=function(a){var b=a.touch,b=this._context.getRelativePosition(b.pageX,b.pageY),c=this.GetLogicalObject(a.target);this.SeriesFocusHandler&&this.SeriesFocusHandler.processSeriesFocus(b,c);return this.HandleTouchClickGraphInternal(a)};DvtGraphEventHandler.prototype.HandleTouchClickGraphInternal=function(a){};DvtGraphEventHandler.prototype._processHideShowPopup=function(a){return!1};DvtGraphEventHandler.prototype.IsMagnifyLensEnabled=function(){return!1};
var DvtMEH=function(a){this.Init(a)};DvtObj.createSubclass(DvtMEH,DvtGraphEventHandler,"DvtMEH");DvtMEH.HIDE_SERIES_ACTION_TYPE="hideSeriesActionType";DvtMEH.SHOW_SERIES_ACTION_TYPE="showSeriesActionType";DvtMEH.prototype.Init=function(a){DvtMEH.superclass.Init.call(this,a.getCtx(),a.__dispatchEvent,a);this.__arEVHList=null;this._Chart=a;this._graphMarqueeHandler=null};
DvtMEH.prototype.GetLogicalObjectAndDisplayable=function(a,b){var c=DvtMEH.superclass.GetLogicalObjectAndDisplayable.call(this,a,b);if(c)return c;if(a){var c=a._Dlo,d={};d.logicalObject=c;d.displayable=a;return d}return null};
DvtMEH.prototype.GetTooltipColor=function(a,b,c){var d=DvtMEH.superclass.GetTooltipColor.call(this,a);if(d)return d;var e;if(this._Chart.isArea()&&null!=b&&null!=c)if(d=this._Chart.getMarkerTooltipHelper()){if(b=d.findMatch(b,c))e=b.sidx}else e=a.getSeriesIndex();else e=a.getSeriesIndex();e=this._Chart.getSeriesColor(e);a._objId&&0==a._objId.indexOf("BR")&&(a=a._DetObj.getImpl().getFill(),a instanceof DvtSolidFill?e=a.getColor():a instanceof DvtGradientFill&&0>DvtArrayUtils.getIndex(a.getColors(),
e)&&(e=a.getColors()[0]));return e};DvtMEH.prototype.addEventHandler=function(a){a&&(this._arEVHList||(this._arEVHList=[]),this._arEVHList.push(a))};DvtMEH.prototype.destroy=function(){DvtMEH.superclass.destroy.call(this)};DvtMEH.prototype.OnMouseEventTemp=function(a){if(this._arEVHList)for(var b=this._arEVHList.length,c=this._arEVHList,d=0;d<b&&(!(eh=c[d])||eh.newMouseEvent(a));d++);};
DvtMEH.prototype.OnClickInternal=function(a){var b=this._context.getRelativePosition(a.pageX,a.pageY),c=this.GetLogicalObject(a.target),d=!1;this.SeriesFocusHandler&&(this.SeriesFocusHandler.processSeriesFocus(b,c),d=this.SeriesFocusHandler.isSeriesFocusHandled());d||this.OnMouseEventTemp(a);DvtShapeAttr.processEvent(c,a.target,a.type)};
DvtMEH.prototype.OnClick=function(a){DvtMEH.superclass.OnClick.call(this,a);a=this.GetLogicalObject(a.target);this._processPieExplode(a);(a=this._Chart.getZoomButton())&&a.resetButton()};
DvtMEH.prototype.OnKeyDown=function(a){a.keyCode==DvtKeyboardEvent.CONTROL?this._Chart.getMarqueeZoomMode()==DvtGraphMarqueeZoomHandlerBase.ZOOM_AUTO&&this._graphMarqueeHandler&&!this._graphMarqueeHandler.isMarqueeHappening()&&(this._graphMarqueeHandler.enableMarquee(!0),this.GraphPanHandler&&this.GraphPanHandler.enablePanning(!1),this._graphMarqueeHandler.updateCursor()):this._graphMarqueeHandler&&this._graphMarqueeHandler.isMarqueeEnabled()&&a.keyCode==DvtKeyboardEvent.ESCAPE?this._graphMarqueeHandler&&
this._graphMarqueeHandler.isMarqueeHappening()&&this._graphMarqueeHandler.cancelMarqueeZoom():this._Chart.getMarqueeZoomMode()!=DvtGraphMarqueeZoomHandlerBase.ZOOM_OFF&&a.keyCode==DvtKeyboardEvent.SHIFT?this._graphMarqueeHandler&&this._graphMarqueeHandler.processShiftZoom(!0):(this._graphMarqueeHandler?!this._graphMarqueeHandler.isMarqueeHappening():1)&&(this.GraphPanHandler?!this.GraphPanHandler.isCurrentlyPanning():1)&&this._Chart.getPanMode!=DvtGraphPanHandler.PAN_OFF&&this.GraphKeyboardHandler&&
this.GraphKeyboardHandler.processKeyDown(a)};
DvtMEH.prototype.OnKeyUp=function(a){a.keyCode==DvtKeyboardEvent.CONTROL?this._Chart.getMarqueeZoomMode()==DvtGraphMarqueeZoomHandlerBase.ZOOM_AUTO&&(this._graphMarqueeHandler&&(this._graphMarqueeHandler.enableMarquee(!1),this._graphMarqueeHandler.removeCursor(),this._graphMarqueeHandler.isMarqueeHappening()&&this._graphMarqueeHandler.cancelMarqueeZoom()),this.GraphPanHandler&&this.GraphPanHandler.enablePanning(!0)):this._Chart.getMarqueeZoomMode()!=DvtGraphMarqueeZoomHandlerBase.ZOOM_OFF&&a.keyCode==
DvtKeyboardEvent.SHIFT&&this._graphMarqueeHandler&&this._graphMarqueeHandler.processShiftZoom(!0)};
DvtMEH.prototype.OnMouseMove=function(a){var b=this.GetLogicalObject(a.target),c=this._context.getRelativePosition(a.pageX,a.pageY);this.OnMouseEventTemp(a);DvtMEH.superclass.OnMouseMove.call(this,a);this.DataCursorHandler&&this.DataCursorHandler.processMove(a.pageX,a.pageY,a.target);if(this._graphMarqueeHandler){var d=this._graphMarqueeHandler.processDragMove(c);d&&a.preventDefault()}DvtShapeAttr.processEvent(b,a.target,a.type);this.GraphPanHandler&&(d=this.GraphPanHandler.processDragMove(c))&&a.preventDefault()};
DvtMEH.prototype.OnMouseOver=function(a){this._context.getRelativePosition(a.pageX,a.pageY);DvtMEH.superclass.OnMouseOver.call(this,a);this.OnMouseEventTemp(a);var b=this.GetLogicalObject(a.target);DvtShapeAttr.processEvent(b,a.target,a.type);this.SeriesRolloverHandler&&this.SeriesRolloverHandler.processMouseOver(b);DvtRefObjHandler.processMouseOver(b);this._setFocused(!0)};
DvtMEH.prototype.OnMouseOut=function(a){var b=this._context.getRelativePosition(a.pageX,a.pageY);DvtMEH.superclass.OnMouseOut.call(this,a);this.OnMouseEventTemp(a);var c=this.GetLogicalObject(a.target);this.DataCursorHandler&&this.DataCursorHandler.processOut(b);DvtShapeAttr.processEvent(c,a.target,a.type);this.SeriesRolloverHandler&&this.SeriesRolloverHandler.processMouseOut(c);DvtRefObjHandler.processMouseOut(c);a=a.relatedTarget;(!a||a._Dlo&&a._Dlo.getChart()!=this._Chart)&&this._setFocused(!1)};
DvtMEH.prototype.OnMouseDown=function(a){DvtMEH.superclass.OnMouseDown.call(this,a);var b=this.GetLogicalObject(this.GetCurrentTargetForEvent(a)),c=this._context.getRelativePosition(a.pageX,a.pageY);this._graphMarqueeHandler&&(b=this._graphMarqueeHandler.processDragStart(c,b))&&a.preventDefault();this.OnMouseEventTemp(a);b=this.GetLogicalObject(a.target);DvtShapeAttr.processEvent(b,a.target,a.type);this.GraphPanHandler&&(b=this.GraphPanHandler.processDragStart(c,null))&&a.preventDefault()};
DvtMEH.prototype.OnMouseUp=function(a){DvtMEH.superclass.OnMouseUp.call(this,a);var b=this._context.getRelativePosition(a.pageX,a.pageY);this._graphMarqueeHandler&&this._graphMarqueeHandler.processDragEnd(b);this.OnMouseEventTemp(a);var c=this.GetLogicalObject(a.target);DvtShapeAttr.processEvent(c,a.target,a.type);this.GraphPanHandler&&this.GraphPanHandler.processDragEnd(b)};DvtMEH.prototype.OnContextMenuInternal=function(a){a=this.GetLogicalObject(a.target);this._processHideShowPopup(a)};
DvtMEH.prototype.HandleTouchHoverStartGraphInternal=function(a){a=this.GetLogicalObject(a.target);DvtRefObjHandler.processMouseOver(a)};DvtMEH.prototype.HandleTouchHoverEndGraphInternal=function(a){a=this.GetLogicalObject(a.target);DvtRefObjHandler.processMouseOut(a)};DvtMEH.prototype.HandleTouchHoverOverGraphInternal=function(a){a=this.GetLogicalObject(a.target);DvtRefObjHandler.processMouseOver(a)};DvtMEH.prototype.HandleTouchHoverOutGraphInternal=function(a){a=this.GetLogicalObject(a.target);DvtRefObjHandler.processMouseOut(a)};
DvtMEH.prototype.IsTooltipShowableInternal=function(a,b){var c=this._Chart;if(this.DataCursorHandler){c=c.getFrameRect();if(c.containsPoint(b.x,b.y))return a&&(c=a.getObjId(),c==DvtGraphObjType.OTHER||c==DvtGraphObjType.PARETO_LINE_RISER||c==DvtGraphObjType.PARETO_LINE_MARKER||c==DvtGraphObjType.TIME_SELECTOR)?!0:!1;if(DvtGraphEventUtils.isNonLegendData(a))return!1}else if(this.IsMagnifyLensEnabled()&&(c=c.getFrameRect(),!c.containsPoint(b.x,b.y)&&DvtGraphEventUtils.isNonLegendData(a)))return!1;return!0};
DvtMEH.prototype.GetTooltipsAllowedRegion=function(a){if(!a)return null;var b=this._Chart;return this._context.getDocumentUtils().isEventAvailableOutsideClip()&&b.getHandleManager().hasScrollbars()&&DvtGraphEventUtils.isNonLegendData(a)?b.getFrameRect():null};DvtMEH.prototype.HandleImmediateTouchStartInternal=function(a){this.GraphPanHandler&&this.TouchManager.processAssociatedTouchAttempt(a,DvtGraphPanHandler.PAN_TOUCH_KEY,this.PlotPanStartTouch,this)};
DvtMEH.prototype.HandleImmediateTouchMoveInternal=function(a){this.GraphPanHandler&&this.TouchManager.processAssociatedTouchMove(a,DvtGraphPanHandler.PAN_TOUCH_KEY)};DvtMEH.prototype.HandleImmediateTouchEndInternal=function(a){this.GraphPanHandler&&this.TouchManager.processAssociatedTouchEnd(a,DvtGraphPanHandler.PAN_TOUCH_KEY)};
DvtMEH.prototype.PlotPanStartTouch=function(a,b){if(this.GraphPanHandler){var c=this._Chart.getFrameRect(),d=this._context.getRelativePosition(b.pageX,b.pageY);(!c||c.containsPoint(d.x,d.y))&&1>=this.TouchManager.getTouchIdsForObj(DvtGraphPanHandler.PAN_TOUCH_KEY).length&&(this.TouchManager.saveProcessedTouch(b.identifier,DvtGraphPanHandler.PAN_TOUCH_KEY,null,DvtGraphPanHandler.PAN_TOUCH_KEY,DvtGraphPanHandler.PAN_TOUCH_KEY,this.PlotPanMoveTouch,this.PlotPanEndTouch,this),this.TouchManager.setTooltipEnabled(b.identifier,
!1),c=this.TouchManager.getTouchIdsForObj(DvtGraphPanHandler.PAN_TOUCH_KEY),2==c.length&&(c=this.TouchManager.calcAveragePosition(c),c=this._context.getRelativePosition(c.x,c.y),this.GraphPanHandler.processDragStart(c,null)))}};DvtMEH.prototype.PlotPanMoveTouch=function(a,b){if(this.GraphPanHandler){var c=this.TouchManager.getTouchIdsForObj(DvtGraphPanHandler.PAN_TOUCH_KEY);2==c.length&&((c=this.TouchManager.getMultiTouchDelta(c))&&this.GraphPanHandler.processDragMoveDelta(c),a.preventDefault())}};
DvtMEH.prototype.PlotPanEndTouch=function(a,b){if(this.GraphPanHandler){var c=this.TouchManager.getTouchIdsForObj(DvtGraphPanHandler.PAN_TOUCH_KEY),c=this.TouchManager.calcAveragePosition(c),c=this._context.getRelativePosition(c.x,c.y);this.GraphPanHandler.processDragEnd(c)}};
DvtMEH.prototype.HandleTouchClickGraphInternal=function(a){var b=this._Chart,c=a.target;a=a.touchEvent;var d=this.GetLogicalObject(c);this._processPieExplode(d);var e=b.getZoomButton();e&&e.resetButton();e=!1;this.SeriesFocusHandler&&(e=this.SeriesFocusHandler.isSeriesFocusHandled());e&&b.isMagnifyLensEnabled()&&this.GetMagnifyLens().setDirty(!0);e||this.HideShowSeriesHandler&&this._processShowHide(d)&&a.preventDefault();DvtShapeAttr.processEvent(d,c,DvtMouseEvent.CLICK);return e||!1};
DvtMEH.prototype._processPieExplode=function(a){this._Chart.isPieSliceExplodeEnabled()&&a instanceof DvtPieSlice&&DvtPieSliceExplodeHandler.processClick(a)};DvtMEH.prototype._processShowHide=function(a){(a=this.HideShowSeriesHandler.handleShowHide(a))&&this.IsMagnifyLensEnabled()&&this.GetMagnifyLens().setDirty(!0);return a};DvtMEH.prototype.GetMagnifyContent=function(a){return this._Chart};DvtMEH.prototype._actionTooltipHideListener=function(a){a=this.GetLogicalObject(a.target);this._processShowHide(a)};
DvtMEH.prototype._actionTooltipShowListener=function(a){a=this.GetLogicalObject(a.target);this._processShowHide(a)};DvtMEH.prototype.IsMagnifyLensEnabled=function(){return this._Chart.isMagnifyLensEnabled()};DvtMEH.prototype.GetMagnifyLensRegion=function(a,b){return DvtGraphEventUtils.getActionablePlotRect(this._Chart,a.x,a.y,b)};DvtMEH.prototype.GetClearSelectionText=function(){return this._Chart.getTextResource(DvtGraphCore.CLEAR_SELECTION_KEY)};
DvtMEH.prototype._processHideShowPopup=function(a){if(!a)return!1;var b=this._Chart;return b.isSeriesFocusEnabled()&&this.HideShowSeriesHandler&&DvtGraphEventUtils.isLegendMarker(a)?(a=a.getSeriesIndex(),b.isSeriesVisible(a)?this.addActionTooltipMenuItem(DvtEventManager.HIDE_SERIES_ACTION_TYPE,b.getTextResource(DvtGraphCore.HIDE_KEY),this._actionTooltipShowListener,this):this.addActionTooltipMenuItem(DvtEventManager.SHOW_SERIES_ACTION_TYPE,b.getTextResource(DvtGraphCore.SHOW_KEY),this._actionTooltipHideListener,
this),!0):!1};DvtMEH.prototype.removeEventManager=function(a){if(this._arEVHList){a=this._arEVHList.length;for(var b=0;b<a;b++)if(this.m_arEVHList[b]===ceh){this._arEVHList[b]=null;break}}};DvtMEH.prototype.getEventHandler=function(a){if(!this._arEVHList)return null;for(var b=0;b<this._arEVHList.length;b++)if(a===this._arEVHList[b].getType())return this._arEVHList[b];return null};DvtMEH.prototype._setFocused=function(a){var b=this._Chart.getZoomButton();b&&(a?b.show():b.hide())};
DvtMEH.prototype.setGraphMarqueeHandler=function(a){this._graphMarqueeHandler=a};DvtMEH.prototype.setTooltipStyle=function(a,b){var c=this._context.getTooltipManager();c&&c.setFont&&c.setFont(b);(c=this._Chart.getDataCursor())&&c.setFont(b);this.CustomTooltipManager&&(c=this.CustomTooltipManager.getActionTooltip())&&(a&&c.setTooltipFill(a),b&&(c.setFont(b),c.setMenuFontSize(b.size)))};
DvtMEH.prototype.hideTooltip=function(){this.DataCursorHandler&&this.DataCursorHandler.isDataCursorShown()&&DvtAgent.isTouchDevice()||DvtMEH.superclass.hideTooltip.call(this);if(this.DataCursorHandler&&DvtAgent.isPlatformIE())return this.DataCursorHandler.processEnd()};
var DvtGraphHandle=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtGraphHandle,DvtHandle,"DvtGraphHandle");DvtGraphHandle.ID_NONE=0;DvtGraphHandle.ID_X1L=1;DvtGraphHandle.ID_PA=2;DvtGraphHandle.ID_Y1PA=3;DvtGraphHandle.ID_Y2PA=4;DvtGraphHandle.ID_OL=5;DvtGraphHandle.ID_Y1L=6;DvtGraphHandle.ID_Y2L=7;DvtGraphHandle.prototype.Init=function(a,b,c,d,e){DvtGraphHandle.superclass.Init.call(this,a,b,c,d,e);this.Id=DvtGraphHandle.createHandleId(b);this._objList=[]};
DvtGraphHandle.prototype.init=function(){for(var a=this.getChildren(),b=0;b<a.length;b++){var c=a[b];c._Dlo.setChart(this._Dlo.getChart());this.addChild(c);c._Dlo.init()}};DvtGraphHandle.prototype.getChildren=function(){return this._objList};DvtGraphHandle.prototype.addObject=function(a){null!=a&&this._objList.push(a)};
DvtGraphHandle.createHandleId=function(a){switch(a){case "X1L":return DvtGraphHandle.ID_X1L;case "PA":return DvtGraphHandle.ID_PA;case "Y1PA":return DvtGraphHandle.ID_Y1PA;case "Y2PA":return DvtGraphHandle.ID_Y2PA;case "OL":return DvtGraphHandle.ID_OL;case "Y1L":return DvtGraphHandle.ID_Y1L;case "Y2L":return DvtGraphHandle.ID_Y2L;default:return DvtGraphHandle.ID_NONE}};
var DvtGraphAxis=function(a,b,c,d){this.Init(a,b,c,d)};DvtObj.createSubclass(DvtGraphAxis,DvtObj,"DvtGraphAxis");DvtGraphAxis.X=1;DvtGraphAxis.Y1=2;DvtGraphAxis.Y2=3;DvtGraphAxis.UNKNOWN=0;
DvtGraphAxis.prototype.Init=function(a,b,c,d){this._axis=b;this._aGrids=c;this._aLabels=d;this._type=DvtGraphAxis.UNKNOWN;this._Chart=a;b&&(a=b._Dlo.getObjId(),a===DvtGraphObjType.X1_AXIS_LINE||a===DvtGraphObjType.O1_AXIS_LINE?this._type=DvtGraphAxis.X:a===DvtGraphObjType.Y1_AXIS_LINE?this._type=DvtGraphAxis.Y1:a===DvtGraphObjType.Y2_AXIS_LINE&&(this._type=DvtGraphAxis.Y2))};DvtGraphAxis.prototype.getAxisLine=function(){return this._axis};DvtGraphAxis.prototype.getGridLines=function(){return this._aGrids};
DvtGraphAxis.prototype.getLabels=function(){return this._aLabels};DvtGraphAxis.prototype.getType=function(){return this._type};
var DvtGraphCore=function(a,b,c,d){this._Init(a,b,c,d)};DvtObj.createSubclass(DvtGraphCore,DvtContainer,"DvtGraphCore");DvtGraphCore.RB_NONE=0;DvtGraphCore.RB_DIM=1;DvtGraphCore.RB_HILITE=2;DvtGraphCore.SEL_NONE=0;DvtGraphCore.SEL_SINGLE=1;DvtGraphCore.SEL_MULTI=2;DvtGraphCore.DATA_ZOOM_NONE=0;DvtGraphCore.DATA_ZOOM_HORIZ=1;DvtGraphCore.DATA_ZOOM_VERT=2;DvtGraphCore.DATA_ZOOM_BOTH=3;DvtGraphCore.ZS_LIVE_SCROLL="ZS_LIVE_SCROLL";DvtGraphCore.ZS_DELAYED_SCROLL="ZS_DELAYED_SCROLL";
DvtGraphCore.prototype.addClipPath=function(a){this._aClipRects||(this._aClipRects=[]);this._aClipRects.push(a)};DvtGraphCore.prototype._addEventHandler=function(a){this._initEventHandler();this._MEH.addEventHandler(a)};
DvtGraphCore.prototype._initEventHandler=function(){if(!this._MEH){var a=new DvtMEH(this);this._MEH=a;a.setContextMenuHandler(this.__getContextMenuHandler());a.addListeners(this);DvtAgent.isTouchDevice()&&a.setTouchRegionBounds(new DvtRectangle(0,0,parseInt(this.getWidth()),parseInt(this.getHeight())));this.isDataCursorEnabled()&&a.setDataCursorHandler(new DvtGraphDCEH(this));this.isHSSeriesSupported()&&a.setHideShowSeriesHandler(new DvtHSSEH(this));this.isSeriesFocusEnabled()&&a.setSeriesFocusHandler(new DvtGraphSeriesFocusHandler(this));
this.getSROEffect()!==DvtGraphCore.RB_NONE&&a.setSeriesRolloverHandler(new DvtGraphSeriesRolloverHandler(this))}};DvtGraphCore.isStockObjId=function(a){return a==DvtGraphObjType.STOCK_CLOSE_TICK||a==DvtGraphObjType.STOCK_FALLING_RISER||a==DvtGraphObjType.STOCK_HIGH_LINE||a==DvtGraphObjType.STOCK_LOW_LINE||a==DvtGraphObjType.STOCK_OPEN_TICK||a==DvtGraphObjType.STOCK_RISER||a==DvtGraphObjType.STOCK_RISING_RISER||a==DvtGraphObjType.STOCK_VOLUME_RISER};
DvtGraphCore.prototype.addFont=function(a){null===this._aFontTable&&(this._aFontTable=[]);this._aFontTable[a._Id]=a};DvtGraphCore.prototype.activateLink=function(a,b){window.open(a,b)};DvtGraphCore.prototype.addUpdateIndicators=function(a){if(a)if(this._indicators||(this._indicators=[]),DvtArrayUtils.isArray(a))for(var b=a.length,c=0;c<b;c++)this._indicators.push(a[c]);else this._indicators.push(a)};DvtGraphCore.prototype.callJs=function(a){this._external.callJs(a)};
DvtGraphCore.prototype.getClipPath=function(a){var b;if(null!==this._aClipRects)for(var c=this._aClipRects.length,d=0;d<c;d++){var e=this._aClipRects[d];if(-1!=e.getId().indexOf(a)){b=e;break}}return b};DvtGraphCore.prototype.getCtx=function(){return this._ctx};DvtGraphCore.prototype.getObjList=function(){return this._objList};
DvtGraphCore.prototype.getPlotRect=function(){var a,b,c,d;this._Plot||(0<=this._rPlotW?(a=this._rPlotX,b=this._rPlotY,c=this._rPlotW,d=this._rPlotH):0<=this._rFrameW?(a=this._rFrameX,b=this._rFrameY,c=this._rFrameW,d=this._rFrameH):0<=this._rCBW?(a=this._rCBX,b=this._rCBY,c=this._rCBW,d=this._rCBH):(b=a=0,c=this._width,d=this._height),this._Plot=new DvtRectangle(a,b,c,d));return this._Plot};DvtGraphCore.prototype.getId=function(){return this._id?this._id:DvtGraphCore.superclass.getId.call(this)};
DvtGraphCore.prototype._Init=function(a,b,c,d){this.getImpl()||this.setImpl(a.getImplFactory().newContainer());DvtGraphCore.superclass.Init.call(this,a);this._id=b;this._ctx=a;this._callback=c;this._callbackObj=d;this._type="";this._height=this._width=0;this._3D=!1;this._objList=null;this._bObjInit=!1;this._MEH=null;this._Automation=new DvtGraphAutomation(this);this._aFontTable=null;this._bTooltips=!0;this._MarkerTooltipHelper=null;this._SRO=DvtGraphCore.RB_NONE;this._arHSSState=null;this._HSSShowCount=
0;this._arHSLegendMiscId=[];this._HiddenSeries=[];this._HiddenUnderlayStates=[];this._selMode=DvtGraphCore.SEL_NONE;this._selListener=!1;this._selectedIds=this._selectionHandler=null;this._dragSource=new DvtGraphDragSource(this,a);this._dropTarget=new DvtGraphDropTarget(this);this._aClipRects=this._Animation=null;this._seriesEffect=DvtFill.NONE;this._bVisEffect=!1;this._Data=this._DataSummary=this._Y2Axis=this._Y1Axis=this._XAxis=null;this._aDLOs=[];this._aRisers=this._arSeriesMarkerSize=null;this._firstRiserIdx=
-1;this._Plot=this._aMiscLegends=this._aLegends=this._aHMarkers=null;this._rFrameH=this._rFrameW=this._rFrameY=this._rFrameX=this._rCBH=this._rCBW=this._rCBY=this._rCBX=this._rPlotH=this._rPlotW=this._rPlotY=this._rPlotX=-1;this._numSelectedObjsInFront=this._numFrontObjs=0;this._bPieExplodeAll=!1;this._zoomButton=this._zoomDir=this._zoomScrollBehavior=this._zoomOutClickEventJs=this._zoomInClickEventJs=this._zoomOutRectEventJs=this._zoomInRectEventJs=null;this._external=a.getJsExt();this._pieChart=
this._scrollableLegend=this._legendHandle=null;this._dataCursorDisplay="AUTO";this._magnifyLensDisplay="OFF";this._bBiDi=!1;this._handleManager=null;this._MarqueeZoomMode=DvtGraphMarqueeZoomHandlerBase.ZOOM_OFF;this._PanMode=DvtGraphPanHandler.PAN_OFF;a.getDocumentUtils().isFilterSupported()||(DvtSelectionEffectUtils.DEFAULT_SEL_TYPE=DvtSelectionEffectUtils.SEL_TYPE_STROKE_NO_FILTERS);this._dragFeedbackFillColor=this._dragFeedbackBorderColor=this._dropSiteFeedback=null;this._dragFeedbackFillAlpha=
.5;this._attMode=!1};DvtGraphCore.prototype.destroy=function(){DvtGraphCore.superclass.destroy.call(this);this._MEH&&(this._MEH.removeListeners(this),this._MEH.destroy())};DvtGraphCore.prototype.__dispatchEvent=function(a){DvtEventDispatcher.dispatchEvent(this._callback,this._callbackObj,this,a)};DvtGraphCore.prototype.addDLO=function(a){a&&this._aDLOs.push(a)};DvtGraphCore.prototype.getDLOs=function(){return this._aDLOs};DvtGraphCore.prototype.__setPieChart=function(a){this._pieChart=a};
DvtGraphCore.prototype.__getPieChart=function(){return this._pieChart};DvtGraphCore.prototype.enableTooltips=function(a){this._bTooltips=a;this._MEH.setTooltipsEnabled(a)};DvtGraphCore.prototype.is3D=function(){return this._3D};DvtGraphCore.prototype.set3D=function(a){this._3D=a};DvtGraphCore.prototype.getAnimation=function(){return this._Animation};DvtGraphCore.prototype.getDataSummary=function(){return this._DataSummary};DvtGraphCore.prototype.getLayers=function(){return this._Data.getLayers()};
DvtGraphCore.prototype.getAutomation=function(){return this._Automation};DvtGraphCore.prototype.setAutomation=function(a){this._Automation=a};DvtGraphCore.prototype.getFont=function(a){var b=null,c=this._aFontTable;c&&a<c.length&&(b=(b=c[a])?b:null);return b};DvtGraphCore.prototype.getDatatipFill=function(){return this._datatipFill};DvtGraphCore.prototype.setDatatipFill=function(a){this._datatipFill=a};
DvtGraphCore.prototype.getFrameRect=function(a){a||(a=new DvtRectangle);a.x=this._rFrameX;a.y=this._rFrameY;a.w=this._rFrameW;a.h=this._rFrameH;return a};DvtGraphCore.prototype.setFrameRect=function(a,b,c,d){this._rFrameX=a;this._rFrameY=b;this._rFrameW=c;this._rFrameH=d};DvtGraphCore.prototype.getGaugeData=function(){return this._gaugeData};DvtGraphCore.prototype.setGaugeData=function(a){this._gaugeData=a};DvtGraphCore.prototype.getHeight=function(){return this._height};
DvtGraphCore.prototype.getSeriesVisCount=function(){return this._HSSShowCount};DvtGraphCore.prototype.isHSSeriesSupported=function(){return null!==this._arHSSState};DvtGraphCore.prototype.isSeriesVisible=function(a){var b=!1;a<this._arHSSState.length&&(b=this._arHSSState[a]);return b};DvtGraphCore.prototype.getHSSState=function(){var a=this._arHSSState,b="";if(a)for(var c=0;c<a.length;c++)b+=a[c]?"f":"t";return b};
DvtGraphCore.prototype.getHSLayersState=function(){var a="";if(0<this._arHSLegendMiscId.length)for(var b=this.getLayers(),c=0;c<this._arHSLegendMiscId.length;c++)0!=c&&(a+=";"),a+=b[this._arHSLegendMiscId[c]].join(",");return a};DvtGraphCore.prototype.setHSSState=function(a,b){this._arHSSState=a;this._HSSShowCount=b};DvtGraphCore.prototype.setHSLegendMiscId=function(a){this._arHSLegendMiscId=a};
DvtGraphCore.prototype.updateHSSeriesUnderlayState=function(a,b,c){a||this._removeHiddenState(b,!1);for(var d=this.getDLOs(),e=0;e<d.length;e++){var f=d[e];if(f.getUnderlayType()===b||f.getUnderlayFC()===b){var g=f.getDetObj();if("single"==this._HSNB&&g.getUnderlay){var h=g.getUnderlay();g.setUnderlayVisible(!1);a?(f.getUnderlayType()===b&&g.setUnderlay(DvtMarker.DEFAULT_UNDERLAY_TYPE,h.getFill().getColor(),h.getFill().getAlpha()),f.getUnderlayFC()===b&&g.setUnderlay(h.getType(),DvtMarker.DEFAULT_UNDERLAY_COLOR)):
a||(f.getUnderlayType()===b&&g.setUnderlay(f.getUnderlayType(),h.getFill().getColor(),h.getFill().getAlpha()),f.getUnderlayFC()===b&&g.setUnderlay(h.getType(),f.getUnderlayFC()));this._isHiddenSeries(g._Dlo)&&g.setUnderlayVisible(!1)}else"all"!=this._HSNB&&"true"!=this._HSNB||!g.setUnderlayVisible?"off"!=this._HSNB&&"false"!=this._HSNB||this._setMarkerUnderlayVisibility(g,a):(f=this._isHiddenSeries(g._Dlo)||this._isHiddenUnderlay(g._Dlo),a&&!f?g.setUnderlayVisible(!1):a||f||g.setUnderlayVisible(!0))}}a&&
this._addHiddenState(b,!1);c&&(a=this.getHSSState(),this._external.sendPPRProperty(this.getId(),DvtJsExt.PPR_ATTRIB_HSS,a),a=this.getHSLayersState(),this._external.sendPPRProperty(this.getId(),DvtJsExt.PPR_ATTRIB_HS_LAYERS,a))};
DvtGraphCore.prototype.updateHSSeriesState=function(a,b,c){a||this._removeHiddenState(b,!0);if(!this._HSR){for(var d=this.getDLOs(),e=d.length,f=0;f<e;f++){var g=d[f];if(!DvtGraphObjType.isLegendItem(g.getObjId())&&b==g.getSeriesIndex()){var g=g.getDetObj(),h=this._isHiddenSeries(g._Dlo);"all"==this._HSNB||"true"==this._HSNB?a&&!h?(g.setVisible(!1),g.setUnderlayVisible&&g.setUnderlayVisible(!1)):a||h||(g.setVisible(!0),g.setUnderlayVisible&&!this._isHiddenUnderlay(g._Dlo)&&g.setUnderlayVisible(!0)):
"single"==this._HSNB?a&&!h?(g.setVisible(!1),g.setUnderlayVisible&&g.setUnderlayVisible(!1)):a||h||(g.setVisible(!0),g.setUnderlayVisible&&g.setUnderlayVisible(!0)):this._setMarkerUnderlayVisibility(g,a)}}a&&this._addHiddenState(b,!0);a=!a;this._arHSSState[b]!==a&&((this._arHSSState[b]=a)?this._HSSShowCount++:this._HSSShowCount--);a=a?DvtCategoryHideShowEvent.TYPE_SHOW:DvtCategoryHideShowEvent.TYPE_HIDE;b=this.getDataObj().getSeriesFromIndex(b);b=new DvtCategoryHideShowEvent(a,b);this.processEvent(b,
this);c&&(c=this.getHSSState(),this._external.sendPPRProperty(this.getId(),DvtJsExt.PPR_ATTRIB_HSS,c),c=this.getHSLayersState(),this._external.sendPPRProperty(this.getId(),DvtJsExt.PPR_ATTRIB_HS_LAYERS,c))}};DvtGraphCore.prototype._setMarkerUnderlayVisibility=function(a,b){var c=this._isHiddenSeries(a._Dlo)||this._isHiddenUnderlay(a._Dlo);b&&!c?(a.setUnderlayVisible&&a.setUnderlayVisible(!1),a.setVisible(!1)):b||c||(a.setUnderlayVisible&&a.setUnderlayVisible(!0),a.setVisible(!0))};
DvtGraphCore.prototype.updateHSLegendState=function(a,b){if(this._aLegends&&this._aLegends[a]){var c=this._aLegends[a];c[0].setHollow(this.getSeriesColor(a));return c[0].isHollow()}};
DvtGraphCore.prototype.updateHSMiscLegendState=function(a,b){var c=this._aMiscLegends,d;if(c)for(g=0;g<c.length;g++){var e=c[g],f=e._Dlo.getMiscId();a!==f||e instanceof DvtText||(e.setHollow(),d=e.isHollow())}if(b)if(d)this._arHSLegendMiscId.push(a);else for(var g=0;g<this._arHSLegendMiscId.length;g++)this._arHSLegendMiscId[g]==a&&this._arHSLegendMiscId.splice(g,1);return d};
DvtGraphCore.prototype._isHiddenSeries=function(a){for(var b=0;b<this._HiddenSeries.length;b++)if(a.getSeriesIndex()==this._HiddenSeries[b])return!0;return!1};DvtGraphCore.prototype._isHiddenUnderlay=function(a){for(i=0;i<this._HiddenUnderlayStates.length;i++){var b=this._HiddenUnderlayStates[i];if(a.getUnderlayType()==b||a.getUnderlayFC()==b)return!0}return!1};DvtGraphCore.prototype._addHiddenState=function(a,b){b?this._HiddenSeries.push(a):this._HiddenUnderlayStates.push(a)};
DvtGraphCore.prototype._removeHiddenState=function(a,b){if(b)for(var c=0;c<this._HiddenSeries.length;c++){if(this._HiddenSeries[c]==a){this._HiddenSeries.splice(c,1);break}}else for(c=0;c<this._HiddenUnderlayStates.length;c++)if(this._HiddenUnderlayStates[c]===a){this._HiddenUnderlayStates.splice(c,1);break}};DvtGraphCore.prototype.getHiddenMarkers=function(){return this._aHMarkers};DvtGraphCore.prototype.setHiddenMarkers=function(a){this._aHMarkers=a};DvtGraphCore.prototype.getLegends=function(){return this._aLegends};
DvtGraphCore.prototype.setLegends=function(a){this._aLegends=a};DvtGraphCore.prototype.isMagnifyLensEnabled=function(){return"OFF"!=this._magnifyLensDisplay&&"AUTO"==this._magnifyLensDisplay&&DvtAgent.isTouchDevice()&&(this.isBubbleChart()||this.isScatterChart())?!0:!1};DvtGraphCore.prototype.setMagnifyLensDisplay=function(a){this._magnifyLensDisplay=a};DvtGraphCore.prototype.getMiscLegends=function(){return this._aMiscLegends};
DvtGraphCore.prototype.setMiscLegends=function(a){this._aMiscLegends=a};DvtGraphCore.prototype.getDataCursor=function(){return this._dataCursor};DvtGraphCore.prototype.setDataCursor=function(a){this._dataCursor=a};
DvtGraphCore.prototype.isDataCursorEnabled=function(){var a=this.getType();return this.isPieChart()||this.isRingChart()||this.isThreeDChart()||a==DvtGraphType.POLAR||a==DvtGraphType.FUNNEL||a==DvtGraphType.RADAR_LINE?!1:"ON"==this._dataCursorDisplay||"AUTO"==this._dataCursorDisplay&&DvtAgent.isTouchDevice()&&(this.isLineChart()||this.isArea())&&this._selMode==DvtGraphCore.SEL_NONE?!0:!1};DvtGraphCore.prototype.setDataCursorDisplay=function(a){this._dataCursorDisplay=a};
DvtGraphCore.prototype.getLegendSelector=function(){return this._legendSelector};DvtGraphCore.prototype.setLegendSelector=function(a){this._legendSelector=a};DvtGraphCore.prototype.setSeriesFocusEnabled=function(a){this._seriesFocus=a};DvtGraphCore.prototype.isSeriesFocusEnabled=function(){return this._seriesFocus};DvtGraphCore.HIDE_KEY="hide";DvtGraphCore.SHOW_KEY="show";DvtGraphCore.CLEAR_SELECTION_KEY="clearselection";DvtGraphCore.prototype.setTextResources=function(a){this._textResources=a};
DvtGraphCore.prototype.getTextResources=function(){return this._textResources};DvtGraphCore.prototype.getTextResource=function(a){return this._textResources?this._textResources[a]:null};DvtGraphCore.prototype.getLegendRect=function(){return this._legendRect};DvtGraphCore.prototype.setLegendRect=function(a){this._legendRect=a};DvtGraphCore.prototype.getScrollableLegend=function(){return this._scrollableLegend};DvtGraphCore.prototype.setScrollableLegend=function(a){this._scrollableLegend=a};
DvtGraphCore.prototype.getMarkerTooltipHelper=function(a){!this._MarkerTooltipHelper&&a&&(this._MarkerTooltipHelper=new DvtTooltipHelper(this));return this._MarkerTooltipHelper};DvtGraphCore.prototype.getSelListener=function(){return this._selListener};DvtGraphCore.prototype.setSelListener=function(a){this._selListener=a};DvtGraphCore.prototype.getMenuId=function(a,b){var c=a*this._Data.getGroupCount()+b;return!this._aMenuIds||this._aMenuIds.length<c?-1:this._aMenuIds[c]};
DvtGraphCore.prototype.setMenuIds=function(a){this._aMenuIds=a};DvtGraphCore.prototype.getTooltipFill=function(){return this._tooltipFill};DvtGraphCore.prototype.setTooltipFill=function(a){this._tooltipFill=a};DvtGraphCore.prototype.setTooltipFontId=function(a){this._tooltipFontId=a};DvtGraphCore.prototype.getTooltipFontId=function(){return this._tooltipFontId};DvtGraphCore.prototype.isPieSliceExplodeEnabled=function(){var a=this.__getPieChart();return a?a.getPieInfo().isSliceInteractive():!1};
DvtGraphCore.prototype.setPieExplodeAllResource=function(){};DvtGraphCore.prototype.setPieUniteAllResource=function(){};DvtGraphCore.prototype.getRisers=function(){return this._aRisers};DvtGraphCore.prototype.setRisers=function(a){this._aRisers=a};DvtGraphCore.prototype.getSeriesRisers=function(a){return this._aRisers[a]};DvtGraphCore.prototype.getSelectionMode=function(){return this._selMode};DvtGraphCore.prototype.setSelectionMode=function(a){this._selMode=a};
DvtGraphCore.prototype.isSelectionSupported=function(){return this.getSelectionMode()!=DvtGraphCore.SEL_NONE};DvtGraphCore.prototype.setSelectedIds=function(a){a&&(this._selectedIds=a)};DvtGraphCore.prototype.getSeriesColor=function(a){return this._Data.getSeriesColor(a)};DvtGraphCore.prototype.getSeriesCount=function(){return this._Data.getSeriesCount()};DvtGraphCore.prototype.getFormattedData=function(a,b,c){return this._Data.getFormattedValue(a,b,c)};
DvtGraphCore.prototype.getData=function(a,b,c){return this._Data.getValue(a,b,c)};DvtGraphCore.prototype.getDataObj=function(){return this._Data};DvtGraphCore.prototype.getSeriesEffect=function(){return this._seriesEffect};DvtGraphCore.prototype.setSeriesEffect=function(a){this._seriesEffect=a};DvtGraphCore.prototype.__getShowPopupBehaviors=function(){this._showPopupBehaviors||(this._showPopupBehaviors=[]);return this._showPopupBehaviors};
DvtGraphCore.prototype.__setShowPopupBehaviors=function(a){this._showPopupBehaviors=a};DvtGraphCore.prototype.getSROEffect=function(){return this._SRO};DvtGraphCore.prototype.setSROEffect=function(a){this._SRO=a};DvtGraphCore.prototype.getVisualEffect=function(){return this._bVisEffect};DvtGraphCore.prototype.setVisualEffect=function(a){this._bVisEffect=a};DvtGraphCore.prototype.getType=function(){return this._type};DvtGraphCore.prototype.getWidth=function(){return this._width};
DvtGraphCore.prototype.isArea=function(){return-1!=this.getType().indexOf("AREA")};DvtGraphCore.prototype.isBiDi=function(){return this._bBiDi};DvtGraphCore.prototype.isDataAnimation=function(){var a=this._Animation;return a&&a.animOnDataChange!==DvtGraphAnimation.NONE};DvtGraphCore.prototype.isBubbleChart=function(){return 0<=this._type.indexOf(DvtGraphType.BUBBLE)};DvtGraphCore.prototype.isLineChart=function(){return 0<=this._type.indexOf("LINE")};
DvtGraphCore.prototype.isStockChart=function(){return 0<=this._type.indexOf("STOCK")};DvtGraphCore.prototype.isPieChart=function(){return 0<=this._type.indexOf("PIE")};DvtGraphCore.prototype.isRingChart=function(){return 0<=this._type.indexOf("RING")};DvtGraphCore.prototype.isThreeDChart=function(){return 0<=this._type.indexOf("THREED")};DvtGraphCore.prototype.isDialGauge=function(){return this._type===DvtGraphType.DIAL};DvtGraphCore.prototype.isDualYAxis=function(){return 0<=this._type.indexOf("2Y")};
DvtGraphCore.prototype.isGauge=function(){return this._type===DvtGraphType.DIAL||0<=this._type.indexOf(DvtGraphType.STATUSMETER)||this._type===DvtGraphType.LED};DvtGraphCore.prototype.isGraph=function(){return!this.isGauge()};DvtGraphCore.prototype.isHorizontal=function(){return 0<=this._type.indexOf("HORIZ")};DvtGraphCore.prototype.isInitFx=function(){var a=this._Animation;return a&&a.animOnDisplay===DvtGraphAnimation.AUTO};DvtGraphCore.prototype.isPie=function(){return this._type===DvtGraphType.PIE};
DvtGraphCore.prototype.isPolarChart=function(){return this._type===DvtGraphType.POLAR};DvtGraphCore.prototype.isScatterChart=function(){return 0<=this._type.indexOf(DvtGraphType.SCATTER)};DvtGraphCore.prototype.isSplit=function(){return 0<=this._type.indexOf("SPLIT")};DvtGraphCore.prototype.isSplit2Y=function(){return 0<=this._type.indexOf("SPLIT2Y")};DvtGraphCore.prototype.isTooltipsEnabled=function(){return this._bTooltips};
DvtGraphCore.prototype.isVertical=function(){return this.isGauge()?0<=this._type.indexOf("VERT"):0>this._type.indexOf("HORIZ")};DvtGraphCore.prototype.log=function(a,b){this.external.log(a,b)};DvtGraphCore.prototype.makeTooltip=function(a){var b;if(a)if(a.hasTooltipText())b=a.getTooltipText();else try{b=this._Data.makeTooltipFromTemplate(a.getSeriesIndex(),a.getGroupIndex())}catch(c){}return b};
DvtGraphCore.prototype.makeTooltipFromSeriesGroup=function(a,b){var c;try{c=this._Data.makeTooltipFromTemplate(a,b)}catch(d){alert("DvtGraphCore.makeTooltipFromSeriesGroup() -\x3e ("+d.fileName+" line "+d.lineNumber+")  "+d.name+"  "+d.message),c=null}return c};
DvtGraphCore.prototype.processEvent=function(a,b){var c=a.getType();c==DvtCategoryHideShowEvent.TYPE_HIDE||c==DvtCategoryHideShowEvent.TYPE_SHOW||c==DvtCategoryRolloverEvent.TYPE_OVER||c==DvtCategoryRolloverEvent.TYPE_OUT?this._distributeToChildren(a):this.__dispatchEvent(a)};DvtGraphCore.prototype._distributeToChildren=function(a){this._pieChart&&this._pieChart.processEvent(a)};
DvtGraphCore.prototype.render=function(){if(!this._bObjInit){this.isBubbleChart()&&this._sortMarkers();if(this.isDataCursorEnabled()){var a=this.getDataCursor(),b=this.getFont(this.getTooltipFontId());a.setFont(b);a.setTooltipFill(this.getDatatipFill());a.getBehavior()==DvtDataCursor.BEHAVIOR_AUTO&&(this.isLineChart()||this.isArea()?a.setBehavior(DvtDataCursor.BEHAVIOR_SMOOTH):a.setBehavior(DvtDataCursor.BEHAVIOR_SNAP));this.getLegendRect()&&this.setSeriesFocusEnabled(!0)}this._bringScrollbarsToFront()}var a=
this._objList,b=a.length,c,d;for(c=0;c<b;c++)d=a[c],this._bObjInit||(this.addChild(d),d._Dlo.init());if(this._arHSSState)for(c=0;c<this._arHSSState.length;c++)this._arHSSState[c]||this._initHideShowState(c,-1);for(c=0;c<this._arHSLegendMiscId.length;c++)this._initHideShowState(-1,this._arHSLegendMiscId[c]);this._applyShadows();this._applyBevels();for(c=0;c<b;c++)d=a[c],d._Dlo.render();this._renderAdditionalControls();this._bObjInit||(this._bObjInit=!0,this._initEventHandler(),a=this.getDatatipFill(),
b=this.getFont(this.getTooltipFontId()),this._MEH.setTooltipStyle(a,b),this._selMode!==DvtGraphCore.SEL_NONE&&(a=this._selMode===DvtGraphCore.SEL_SINGLE?DvtSelectionHandler.TYPE_SINGLE:DvtSelectionHandler.TYPE_MULTIPLE,null==this._selectionHandler&&(this._selectionHandler=new DvtSelectionHandler(a)),this._MEH.setSelectionHandler(this._selectionHandler),null!=this._selectedIds&&(this.isPieChart()&&this._pieChart?this._selectionHandler.processInitialSelections(this._selectedIds,this._pieChart.__getSlices()):
this._selectionHandler.processInitialSelections(this._selectedIds,this._aDLOs))),this._MEH.setDragSource(this.getDragSource()),this.isHSSeriesSupported()&&this._addEventHandler(new DvtHSSEH(this)),this._zoomDir!=DvtGraphCore.DATA_ZOOM_NONE&&this._initZoomScrollHandlers(),a=new DvtGraphKeyboardHandler(this),this._MEH.setGraphKeyboardHandler(a));if(!this._HSR&&this._arHSSState&&this._pieChart)for(c=0;c<this._arHSSState.length;c++)this._arHSSState[c]||this._pieChart.hideSlice(c)};
DvtGraphCore.prototype._initHideShowState=function(a,b){var c;if(-1===a){var d=this.getLayers()[b];if(0<d.length){var e=d[0];a=parseInt(e,10);if(isNaN(a))"#"===e.charAt(0)?(c=this.updateHSMiscLegendState(b,!1),this.updateHSSeriesUnderlayState(c,e,!1)):(type="c"===e?DvtMarker.CIRCLE:"s"===e?DvtMarker.SQUARE:"t"===e?DvtMarker.TRIANGLE_UP:"td"===e?DvtMarker.TRIANGLE_DOWN:DvtMarker.DIAMOND,c=this.updateHSMiscLegendState(b,!1),this.updateHSSeriesUnderlayState(c,type,!1));else for(c=this.updateHSMiscLegendState(b,
!1),e=0;e<d.length;e++)this.updateHSSeriesState(c,d[e],!1)}}else c=this.updateHSLegendState(a,!1),this.updateHSSeriesState(c,a,!1)};
DvtGraphCore.prototype._renderAdditionalControls=function(){this.getZoomButton()&&this.addChild(this.getZoomButton());if(this.isDataCursorEnabled()||this.isMagnifyLensEnabled()){var a=this.getFrameRect(),b=a,c=0,d=0;this.is3D()&&(b=this.getFrameSide())&&(d=b.getDimensions(),c=d.w,d=d.h-a.h+1);b=new DvtRectangle(a.x,a.y,a.w,a.h);b.x+=-c;b.w+=c;b.h+=d;this._threeDHorizontalOffset=c;this._threeDVerticalOffset=d;var e=c=b,f=this.getFrameSeparator();f&&(e=f.getDimensions(),this.isHorizontal()?(this.is3D()&&
(e=new DvtRectangle(e.x,e.y+d,a.w,1)),c=new DvtRectangle(b.x,b.y,e.x-b.x,b.h),e=new DvtRectangle(e.x,b.y,b.x+b.w-e.x,b.h)):(this.is3D()&&(e=new DvtRectangle(e.x,e.y+d,1,a.h)),c=new DvtRectangle(b.x,b.y,b.w,e.y-b.y),e=new DvtRectangle(b.x,e.y,b.w,b.y+b.h-e.y)));this._topPlotRect=c;this._bottomPlotRect=e}this.isDataCursorEnabled()&&(this._dcContainer=a=new DvtContainer(this.getCtx()),d=this.getDataCursor(),a.addChild(d),this.addChild(this._dcContainer));this.isMagnifyLensEnabled()&&(a=this.getCtx().getCustomTooltipManager().getMagnifyLens(),
(d=this.getDatatipFill())&&a.setBackgroundFill(d),a.initialize())};DvtGraphCore.prototype.setAnimation=function(a){this._Animation=a};DvtGraphCore.prototype.setBGRect=function(a,b,c,d){this._rCBGX=a;this._rCBGY=b;this._rCBGW=c;this._rCBGH=d};DvtGraphCore.prototype.setBiDi=function(a){this._bBiDi=a};DvtGraphCore.prototype.setData=function(a){this._Data=a};DvtGraphCore.prototype.setDataSummary=function(a){this._DataSummary=a};
DvtGraphCore.prototype.setSeriesMarkerSize=function(a,b){null===this._arSeriesMarkerSize&&(this._arSeriesMarkerSize=[]);var c=this.getSeriesCount();0<=a&&a<c&&(this._arSeriesMarkerSize[a]=b)};DvtGraphCore.prototype.setXML=function(a,b){this._Animation=b;this._objList=(new DvtGraphParser(this._ctx,this,b)).parse(a);this._bBiDi&&this._ctx.fixBrowserTextRTL&&this._ctx.fixBrowserTextRTL()};DvtGraphCore.prototype.getGraphContext=function(a){return new DvtGraphContext(a)};
DvtGraphCore.prototype.getSelectionContext=function(){var a=this.getSelectionHandler().getSelection();if(a&&0<a.length)for(var b=[],c=0;c<a.length;c++){var d=this.getGraphContext(a[c]);b.push(d)}return b};DvtGraphCore.prototype.setPlotRect=function(a,b,c,d){this._rPlotX=a;this._rPlotY=b;this._rPlotW=c;this._rPlotH=d};DvtGraphCore.prototype.getXAxis=function(){return this._XAXis};DvtGraphCore.prototype.setXAxis=function(a){this._XAXis=a};DvtGraphCore.prototype.getY1Axis=function(){return this._Y1AXis};
DvtGraphCore.prototype.setY1Axis=function(a){this._Y1AXis=a};DvtGraphCore.prototype.getY2Axis=function(){return this._Y2AXis};DvtGraphCore.prototype.setY2Axis=function(a){this._Y2AXis=a};DvtGraphCore.prototype.getMarqueeZoomMode=function(){return this._MarqueeZoomMode};DvtGraphCore.prototype.setMarqueeZoomMode=function(a){this._MarqueeZoomMode=a};DvtGraphCore.prototype.getPanMode=function(){return this._PanMode};DvtGraphCore.prototype.setPanMode=function(a){this._PanMode=a};
DvtGraphCore.prototype.getZoomScrollBehavior=function(){return this._zoomScrollBehavior};DvtGraphCore.prototype.setZoomScrollBehavior=function(a){this._zoomScrollBehavior=a};DvtGraphCore.prototype.setZoomDir=function(a){this._zoomDir=a};DvtGraphCore.prototype.getZoomDir=function(){return this._zoomDir};DvtGraphCore.prototype.setZoomInOutJs=function(a,b,c,d){this._zoomInRectEventJs=a;this._zoomOutRectEventJs=b;this._zoomInClickEventJs=c;this._zoomOutClickEventJs=d};
DvtGraphCore.prototype.setZoomMode=function(a){this._MarqueeZoomMode=a;this._initZoomScrollHandlers()};
DvtGraphCore.prototype._initZoomScrollHandlers=function(){var a=this._MarqueeZoomMode==DvtGraphMarqueeZoomHandlerBase.ZOOM_ON,b=this.getFrameRect(),c=null;this._PanMode==DvtGraphPanHandler.PAN_OFF||a||(c=new DvtGraphPanHandler(this.getCtx(),this,b,this._PanMode));this._MEH.setGraphPanHandler(c);a=null;this._MarqueeZoomMode!=DvtGraphMarqueeZoomHandlerBase.ZOOM_OFF&&(a=new DvtGraphMarqueeZoomHandler(this.getCtx(),this,b,this._MarqueeZoomMode,this._zoomDir));this._MEH.setGraphMarqueeHandler(a)};
DvtGraphCore.prototype.getZoomButton=function(){return this._zoomButton};DvtGraphCore.prototype.setZoomButton=function(a){this._zoomButton=a};DvtGraphCore.prototype.__getContextMenuHandler=function(){this._contextMenuHandler||(this._contextMenuHandler=new DvtContextMenuHandler(this.getCtx()));return this._contextMenuHandler};
DvtGraphCore.prototype._sortMarkers=function(){var a,b,c,d,e=[],f=this._aRisers;if(f){var g=f.length;for(c=0;c<g;c++){var h=f[c];if(h){var k=h.length;for(d=0;d<k;d++)if(a=h[d],b=a._Dlo,b._objId===DvtGraphObjType.LINE_MARKER&&(b=a.getType(),b===DvtMarker.CIRCLE||b===DvtMarker.HUMAN)){var m={};m.size=a.getSize();m.marker=a;b=-1;for(var n=0,p=this._objList.length;n<p;n++)if(this._objList[n]===a){b=n;break}0<=b&&(m.index=b);e.push(m)}}}if(0<e.length)for(a=DvtArrayUtils.copy(e),a.sort(_fnSort),g=a.length,
c=0;c<g;c++)b=e[c].index,0<=b&&(this._objList[b]=a[c].marker)}};function _fnSort(a,b){return b.size-a.size}DvtGraphCore.prototype.bringToFrontOfSelection=function(a){var b=a.getParent();if(b){var c=b.getNumChildren();if(b==this&&this._dcContainer){var d=this.getChildIndex(this._dcContainer);this._numFrontObjs=-1!=d?c-d:0}1<c-this._numFrontObjs&&(b.removeChild(a),b.addChildAt(a,c-this._numFrontObjs-1))}a.isSelected()&&a.isHoverEffectShown()||this._numSelectedObjsInFront++};
DvtGraphCore.prototype.pushToBackOfSelection=function(a){0<this._numSelectedObjsInFront&&this._numSelectedObjsInFront--;var b=a.getParent();if(b){var c=b.getNumChildren()-this._numFrontObjs-1-this._numSelectedObjsInFront;0<=c&&(b.removeChild(a),b.addChildAt(a,c))}};DvtGraphCore.prototype.setNumFrontObjs=function(a){this._numFrontObjs=a};
DvtGraphCore.prototype._applyShadows=function(){if(this._shadowMap)for(var a=this._shadowMap.length,b,c,d=0;d<a;d+=2)b=this._shadowMap[d],c=this._shadowMap[d+1],b.addDrawEffect(c);this._shadowMap=null};DvtGraphCore.prototype._applyBevels=function(){if(this._bevelMap)for(var a=this._bevelMap.length,b,c,d=0;d<a;d+=2)b=this._bevelMap[d],c=this._bevelMap[d+1],b.addDrawEffect(c);this._bevelMap=null};
DvtGraphCore.prototype.getHandleManager=function(){null==this._handleManager&&(this._handleManager=new DvtHandleManager(this));return this._handleManager};DvtGraphCore.prototype.getCurrentSeries=function(){return this._currentSeries};DvtGraphCore.prototype.setCurrentSeries=function(a){this._currentSeries=a};DvtGraphCore.prototype.getFrameSeparator=function(){return this._frameSeparator};DvtGraphCore.prototype.setFrameSeparator=function(a){this._frameSeparator=a};
DvtGraphCore.prototype.getFrameSide=function(){return this._frameSide};DvtGraphCore.prototype.setFrameSide=function(a){this._frameSide=a};DvtGraphCore.prototype.createSubId=function(a){return a+"_"+this.getId()};DvtGraphCore.prototype._bringScrollbarsToFront=function(){var a=this._objList.length,b,c=[];for(b=0;b<a;b++)this._objList[b]instanceof DvtScrollbar&&(c.push(this._objList[b]),this._objList.splice(b,1),b--,a--);for(b=0;b<c.length;b++)this._objList.push(c[b])};
DvtGraphCore.prototype.getSelectionState=function(){for(var a=this.getSelectionHandler().getSelection(),b="",c=0;c<a.length;c++)b=this.isPieChart()?b+(a[c].getId()+"~:"):b+(a[c].getSeriesId()+"~:"+a[c].getGroupId()+"~;");return b=b.slice(0,-2)};DvtGraphCore.prototype.getDragSource=function(){return this._dragSource};DvtGraphCore.prototype.getDropTarget=function(){return this._dropTarget};
DvtGraphCore.prototype.getDragTransferable=function(a,b){if(!this.getSelectionHandler())return null;var c=this.getDragSource().getDragObject();c.isSelected()||(this.getSelectionHandler().processClick(c._Dlo,!1),this._MEH.fireSelectionEvent());var d=this.getSelectionHandler().getSelection(),e=this.getSelectionState(),f={};f.selection=e;1>=d.length&&c._Dlo&&(f.seriesId=c._Dlo.getSeriesId(),f.groupId=c._Dlo.getGroupId());return f};
DvtGraphCore.prototype.getDragContext=function(a,b){var c=this.getDragSource().getDragObject();if(!(c&&c instanceof DvtMarker))return null;var c=c._Dlo,d={};1<this.getSelectionHandler().getSelection().length?(d.xValue=this.getXValue(a),d.yValue=this.getYValue(b)):(d.xValue=this.getData(DvtGraphData.DV_X,c.getSeriesIndex(),c.getGroupIndex()),d.yValue=this.getData(DvtGraphData.DV_Y,c.getSeriesIndex(),c.getGroupIndex()));return d};
DvtGraphCore.prototype.getDragOverFeedback=function(a,b){var c=this.getSelectionHandler().getSelection();if(0>=c.length)return null;for(var d=[],e=0;e<c.length;e++)d.push(c[e].getDetObj());return d};DvtGraphCore.prototype.acceptDrag=function(a,b,c){var d=this.getPlotRect();if(null!=d&&a>=d.x&&a<=d.x+d.w&&b>=d.y&&b<=d.y+d.h)return c[0];this.dragExit();return null};
DvtGraphCore.prototype.dragEnter=function(){var a=this.getPlotRect();a&&(this._dropSiteFeedback=new DvtRect(this.getCtx(),a.x,a.y,a.w,a.h,"dropSiteFeedback"),this._dropSiteFeedback.setSolidStroke(this._dragFeedbackBorderColor,null,1),this._dropSiteFeedback.setSolidFill(this._dragFeedbackFillColor,this._dragFeedbackFillAlpha),this._dropSiteFeedback.setPixelHinting(!0),this.addChildAt(this._dropSiteFeedback,2))};
DvtGraphCore.prototype.dragExit=function(){null!=this._dropSiteFeedback&&(this.removeChild(this._dropSiteFeedback),this._dropSiteFeedback=null)};
DvtGraphCore.prototype.getDropSite=function(a,b){var c={};c.x=this.getXValue(a);c.y=this.getYValue(b);var d=this.getDragSource().getDragObject();if(null!=d&&d instanceof DvtGraphDetMarker){if(this.getSelectionMode()!=DvtGraphCore.SEL_MULTI){var e=d._Dlo;c.oldX=this.getData(DvtGraphData.DV_X,e.getSeriesIndex(),e.getGroupIndex());c.oldY=this.getData(DvtGraphData.DV_Y,e.getSeriesIndex(),e.getGroupIndex())}var f=this.getSelectionHandler().getSelection(),g=this.getDragSource().getDragCoords(),e=a-g.x,
g=b-g.y;if(1<f.length)for(d=0;d<f.length;d++){var h=f[d].getDetObj();h&&h instanceof DvtGraphDetMarker&&(h.setTranslateX(h.getTranslateX()+e),h.setTranslateY(h.getTranslateY()+g))}else{if(f=this.getDragSource().__getPointerOffset())e+=f.x,g+=f.y;d.setTranslateX(d.getTranslateX()+e);d.setTranslateY(d.getTranslateY()+g)}}return c};
DvtGraphCore.prototype.getDragFeedback=function(){return this.getDragSource().getDragObject()&&this.getSelectionMode()!=DvtGraphCore.SEL_MULTI?this.getDragTransferable():null};DvtGraphCore.prototype.getDragFeedbackBounds=function(){var a=this.getSelectionHandler().getSelection();if(0>=a.length)return null;for(var b=[],c=0;c<a.length;c++)b.push(a[c].getDetObj());return DvtDnDUtils.getDragFeedbackBounds(b)};
DvtGraphCore.prototype.setDragFeedbackBorderColor=function(a){this._dragFeedbackBorderColor=a};DvtGraphCore.prototype.setDragFeedbackFillColor=function(a){this._dragFeedbackFillColor=a};DvtGraphCore.prototype.setDragFeedbackFillAlpha=function(a){this._dragFeedbackFillAlpha=a};
DvtGraphCore.prototype.getXValue=function(a){var b=this.getDataSummary();return isNaN(b.x1MinVal)||isNaN(b.xPxMin)||isNaN(b.xPxRatio)||0==b.xPxRatio?NaN:b.xPxMin<=b.xPxMax?b.x1MinVal+(a-b.xPxMin)/b.xPxRatio:b.x1MinVal+(b.xPxMin-a)/b.xPxRatio};DvtGraphCore.prototype.getYValue=function(a){var b=this.getDataSummary();return isNaN(b.y1MinVal)||isNaN(b.yPxMin)||isNaN(b.yPxRatio)||0==b.yPxRatio?NaN:b.y1MinVal+(b.yPxMin-a)/b.yPxRatio};DvtGraphCore.prototype.getSelectionHandler=function(){return this._selectionHandler};
DvtGraphCore.prototype.getScrollOffset=function(a){a=this.getHandleManager().getHandle(a);return null!=a?new DvtPoint(a.getX(),a.getY()):new DvtPoint(0,0)};DvtGraphCore.prototype.__getEventManager=function(){this._initEventHandler();return this._MEH};DvtGraphCore.prototype.getLogicalObject=function(a){this._initEventHandler();return this._MEH.GetLogicalObject(a)};DvtGraphCore.prototype.useHSNewBehavior=function(){return this._HSNB};
DvtGraphCore.prototype.setHSNewBehaviorUsage=function(a){this._HSNB=a};DvtGraphCore.prototype.setHSRescale=function(a){this._HSR=a};DvtGraphCore.prototype.isAttachmentMode=function(){return this._attMode};DvtGraphCore.prototype.setAttachmentMode=function(a){this._attMode=a};
var DvtGraphData=function(){this._Init()};DvtObj.createSubclass(DvtGraphData,DvtObj,"DvtGraphData");DvtGraphData.DV_X=2;DvtGraphData.DV_Y=3;DvtGraphData.DV_Z=4;DvtGraphData.DV_HV=11;DvtGraphData.DV_LV=12;DvtGraphData.DV_OV=13;DvtGraphData.DV_CV=14;DvtGraphData.DV_VV=15;DvtGraphData.DV_AV=17;DvtGraphData.DV_TV=18;DvtGraphData.DV_AUV=27;DvtGraphData.DV_TUV=28;
DvtGraphData.prototype._Init=function(){this._arZLValues=this._arYLValues=this._arXLValues=this._arSeriesColors=this._arO1GroupLabels=this._arGroupLabels=this._arSeriesLabels=this._arGroups=this._arLayers=this._arSeries=null;this._iGroupCount=this._iSeriesCount=0;this._arTooltipTemplate=null;this._iMacroCount=0;this._arValueFormats=this._arMacroIDs=null;this._iMacroSupportedCount=0;this._arGroupSum=this._arMacroVals=this._arDataTypes=this._arData=null;this._XAxisValueFormat;this._YAxisValueFormat;
this._Y2AxisValueFormat};DvtGraphData.prototype.getGroups=function(){return this._arGroups};DvtGraphData.prototype.getGroupCount=function(){return null!==this._arGroups?this._arGroups.length:0};DvtGraphData.prototype.getGroupFromIndex=function(a){var b=null;null!==this._arGroups&&0<=a&&a<this._arGroups.length&&(b=this._arGroups[a]);return b};DvtGraphData.prototype.getGroupLabels=function(){return this._arGroupLabels};DvtGraphData.prototype.getO1GroupLabels=function(){return this._arO1GroupLabels};
DvtGraphData.prototype.getSeries=function(){return this._arSeries};DvtGraphData.prototype.getSeriesColor=function(a){var b=null;return b=void 0!==a&&null!==a&&null!==this._arSeriesColors&&0<=a&&a<this._arSeriesColors.length?this._arSeriesColors[a]:"#000000"};DvtGraphData.prototype.getIndexFromGroup=function(a){var b=-1;if(null!==this._arGroups)for(var c=this._arGroups.length,d=0;d<c;d++)if(this._arGroups[d]===a){b=d;break}return b};
DvtGraphData.prototype.getIndexFromSeries=function(a){var b=-1;if(null!==this._arSeries)for(var c=this._arSeries.length,d=0;d<c;d++)if(this._arSeries[d]===a){b=d;break}return b};
DvtGraphData.prototype.getMacroValues=function(a,b){var c;if(null!==this._arData){var d,e,f,g="",h="";for(c=0;c<this._iMacroCount;c++){d=this._arMacroIDs[c];if(0===d)0===g.length&&0<=a&&(null!==this._arSeriesLabels?g=this._arSeriesLabels[a]:null!==this._arSeries&&(g=this._arSeries[a])),f=g;else if(1==d)0===h.length&&0<=b&&(null!==this._arGroupLabels?h=this._arGroupLabels[b]:null!==this._arGroups&&(h=this._arGroups[b])),f=h;else{f="";e=this._arData[d];var k=a*this._iGroupCount+b;if(e)if(this._arDataTypes[d]){var m=
this._arValueFormats[d];m.isDefault()?d===DvtGraphData.DV_X?null!==this._arXLValues&&(f=this._arXLValues[k]):d===DvtGraphData.DV_Y?null!==this._arYLValues&&(f=this._arYLValues[k]):d===DvtGraphData.DV_Z?null!==this._arZLValues&&(f=this._arZLValues[k]):(d=e[k],f=m.getFormattedValue(d)):(d=e[k],f=m.getFormattedValue(d))}else f=e[a*this._iGroupCount+b];else d==DvtGraphData.DV_X?null!==this._arXLValues&&(f=this._arXLValues[k]):d==DvtGraphData.DV_Y?null!==this._arYLValues&&(f=this._arYLValues[k]):d==DvtGraphData.DV_Z&&
null!==this._arZLValues&&(f=this._arZLValues[k])}null===f&&(f="");this._arMacroVals[c]=f}}else for(c=0;c<this._iMacroCount;c++)this._arMacroVals[c]="";return this._arMacroVals};DvtGraphData.prototype.getSeriesCount=function(){return null!==this._arSeries?this._arSeries.length:0};DvtGraphData.prototype.getSeriesFromIndex=function(a){var b=null;null!==this._arSeries&&0<=a&&a<this._arSeries.length&&(b=this._arSeries[a]);return b};
DvtGraphData.prototype.getFormattedValue=function(a,b,c){b=this.getValue(a,b,c);return this._arValueFormats[a].getFormattedValue(b)};DvtGraphData.prototype.getValue=function(a,b,c){var d;if(a>=DvtGraphData.DV_X&&a<=DvtGraphData.DV_Z||a>=DvtGraphData.DV_HV&&a<=DvtGraphData.DV_TV||a>=DvtGraphData.DV_AUV&&a<=DvtGraphData.DV_TUV){var e=this._arData[a];e&&(d=this._arDataTypes[a]?e[b*this._iGroupCount+c]:parseFloat(e[b*this._iGroupCount+c]))}return d};
DvtGraphData.prototype.hasTooltipTemplate=function(){return null!==this._arTooltipTemplate&&0<this._arTooltipTemplate.length};DvtGraphData.prototype.isSeriesColor=function(a){return null!==this._arSeriesColors&&0<=a&&a<this._arSeriesColors.length};
DvtGraphData.prototype.makeTooltipFromTemplate=function(a,b){var c=this.getMacroValues(a,b),d=this._arTooltipTemplate.length,e="";if(0<d){var f,g;null!==c&&(g=c.length);var h;for(f=0;f<d;f++)e+=this._arTooltipTemplate[f],f<g&&(h=c[f],0<h.length&&(e+=h))}e=e.replace(DvtGraphParser.NEW_LINE+DvtGraphParser.NEW_LINE,DvtGraphParser.NEW_LINE);0==e.indexOf(DvtGraphParser.NEW_LINE)&&(e=e.substring(2));return e};
DvtGraphData.prototype.setAltLValues=function(a,b){a===DvtGraphData.DV_X?this._arXLValues=b:a===DvtGraphData.DV_Y?this._arYLValues=b:a===DvtGraphData.DV_Z&&(this._arZLValues=b)};DvtGraphData.prototype.setDataValues=function(a,b,c){null==this._arData&&(this._arData=[]);null==this._arDataTypes&&(this._arDataTypes=[]);this._arData[a]=b;this._arDataTypes[a]=c};DvtGraphData.prototype.setGroups=function(a){this._arGroups=a;null!==a&&(this._iGroupCount=a.length)};
DvtGraphData.prototype.setGroupLabels=function(a){this._arGroupLabels=a};DvtGraphData.prototype.setO1GroupLabels=function(a){this._arO1GroupLabels=a};DvtGraphData.prototype.getLayers=function(){return this._arLayers};DvtGraphData.prototype.setLayers=function(a){if(a){var b=[],c;for(c=0;c<a.length;c++)b.push(a[c].split(","));this._arLayers=b}};DvtGraphData.prototype.setMacrosSupported=function(a){this._iMacroSupportedCount=a;this._arData=[];this._arDataTypes=[]};
DvtGraphData.prototype.setSeries=function(a){this._arSeries=a;null!==a&&(this._iSeriesCount=a.length)};DvtGraphData.prototype.setSeriesColors=function(a){this._arSeriesColors=a};DvtGraphData.prototype.getSeriesLabels=function(){return this._arSeriesLabels};DvtGraphData.prototype.setSeriesLabels=function(a){this._arSeriesLabels=a};
DvtGraphData.prototype.setTooltipTemplate=function(a,b,c){this._arTooltipTemplate=a;this._arMacroIDs=b;this._iMacroSupportedCount=c;null!==b&&(this._iMacroCount=b.length);0<c&&(this._arData=[],this._arDataTypes=[],0<this._iMacroCount&&(this._arMacroVals=[]))};DvtGraphData.prototype.setValueFormat=function(a,b){null===this._arValueFormats&&(this._arValueFormats=[]);this._arValueFormats[a]=b};DvtGraphData.prototype.getXAVF=function(){return this._XAxisValueFormat};
DvtGraphData.prototype.setXAVF=function(a){this._XAxisValueFormat=a};DvtGraphData.prototype.getYAVF=function(){return this._YAxisValueFormat};DvtGraphData.prototype.setYAVF=function(a){this._YAxisValueFormat=a};DvtGraphData.prototype.getY2AVF=function(){return this._Y2AxisValueFormat};DvtGraphData.prototype.setY2AVF=function(a){this._Y2AxisValueFormat=a};
var DvtGraphObjType=function(){};DvtObj.createSubclass(DvtGraphObjType,DvtObj,"DvtGraphObjType");DvtGraphObjType.AREA_RISER="AR";DvtGraphObjType.AREA_RISER_BOTTOM="ARB";DvtGraphObjType.AREA_RISER_TOP="ART";DvtGraphObjType.BAR_RISER="BR";DvtGraphObjType.BAR3D_RISER="BR3D";DvtGraphObjType.BAR_RISER_SIDE="BRS";DvtGraphObjType.BAR_RISER_TOP="BRB";DvtGraphObjType.BOTTOM_LABEL="BottomLabel";DvtGraphObjType.BOX_BAR="BoxBar";DvtGraphObjType.BOX_LINE="BoxLine";DvtGraphObjType.BOX_MARK="BoxMark";
DvtGraphObjType.CHARTBKGND="CB";DvtGraphObjType.CUBE_RISER_FACE="CRF";DvtGraphObjType.DATA_TEXT="DataText";DvtGraphObjType.FRAME="F";DvtGraphObjType.FRAME_SIDE="FrameSide";DvtGraphObjType.FRAME_BOTTOM="FrameBottom";DvtGraphObjType.FRAME_SEPARATOR="FrameSeparator";DvtGraphObjType.FUNNEL_SLICE="FunnelSlice";DvtGraphObjType.GAUGE_BACKGROUND="GB";DvtGraphObjType.GAUGE_FRAME="GaugeFrame";DvtGraphObjType.GAUGESET_BKGND="GSB";DvtGraphObjType.INDICATOR="Indicator";DvtGraphObjType.INDICATOR_BASE="IndicatorBase";
DvtGraphObjType.LEGEND_AREA="LA";DvtGraphObjType.LEGEND_MARKER="LeM";DvtGraphObjType.LEGEND_TEXT="LT";DvtGraphObjType.LEGEND_TITLE="LegendTitle";DvtGraphObjType.LINE_MARKER="LM";DvtGraphObjType.LINE_RISER="LR";DvtGraphObjType.LINE_RISER_SIDE="LRS";DvtGraphObjType.LINE_RISER_TOP="LRT";DvtGraphObjType.METRIC_LABEL="ML";DvtGraphObjType.O1_AXIS_LINE="O1AxisLine";DvtGraphObjType.O1_LABEL="O1L";DvtGraphObjType.O1_MAJOR_GRID="O1MajorGrid";DvtGraphObjType.O1_MINOR_GRID="O1MinorGrid";
DvtGraphObjType.O1_RANGE_SLIDER="O1RS";DvtGraphObjType.O1_TITLE="O1Title";DvtGraphObjType.OTHER="Other";DvtGraphObjType.PARETO_LINE_MARKER="ParetoLineMarker";DvtGraphObjType.PARETO_LINE_RISER="ParetoLineRiser";DvtGraphObjType.PIE_BAR_RISER="PieBarRiser";DvtGraphObjType.PIE_BAR_RISER_SIDE="PieBarRiserSide";DvtGraphObjType.PIE_BAR_RISER_TOP="PieBarRiserTop";DvtGraphObjType.PIE_BAR_SLICE="PieBarSlice";DvtGraphObjType.PIE_BAR_SLICE_CRUST="PieBarSliecCrust";DvtGraphObjType.PIE_CHART="PieChart";
DvtGraphObjType.PIE_FEELER="PFL";DvtGraphObjType.PIE_FRAME="PieFrame";DvtGraphObjType.PIE_LABEL="PieLabel";DvtGraphObjType.PIE_SLICE="PieSlice";DvtGraphObjType.PIE_SLICE_LABEL="PSL";DvtGraphObjType.PLOT_AREA="PA";DvtGraphObjType.REFOBJ_BACK="ROB";DvtGraphObjType.REFOBJ_FRONT="ROF";DvtGraphObjType.RANGE_SLIDER_ZOOM_BUTTON="rszb";DvtGraphObjType.QUADRANT_LINE="QL";DvtGraphObjType.SCROLLABLE_LEGEND="ScrollableLegend";DvtGraphObjType.SLICE="Sl";DvtGraphObjType.STOCK_CLOSE_TICK="SCT";
DvtGraphObjType.SLICE_CRUST="SC";DvtGraphObjType.STOCK_FALLING_RISER="StockFallingRiser";DvtGraphObjType.STOCK_HIGH_LINE="StockHighLine";DvtGraphObjType.STOCK_LOW_LINE="StockLowLine";DvtGraphObjType.STOCK_OPEN_TICK="SOT";DvtGraphObjType.STOCK_RISER="SR";DvtGraphObjType.STOCK_RISING_RISER="StockRisingRiser";DvtGraphObjType.STOCK_VOLUME_RISER="StockVolumeRiser";DvtGraphObjType.SUBTITLE="Subtitle";DvtGraphObjType.THRESHOLD="Threshold";DvtGraphObjType.TICK_LABEL="TickLabel";
DvtGraphObjType.TICK_MARK="TickMark";DvtGraphObjType.TITLE="Title";DvtGraphObjType.TIME_SELECTOR="TimeSelector";DvtGraphObjType.TOP_LABEL="TopLabel";DvtGraphObjType.X1_AXIS_LINE="X1AxisLine";DvtGraphObjType.X1_LABEL="X1L";DvtGraphObjType.X1_MINOR_GRID="X1MinorGrid";DvtGraphObjType.X1_MAJOR_GRID="X1MG";DvtGraphObjType.X1_RANGE_SLIDER="X1RS";DvtGraphObjType.X1_TITLE="X1Title";DvtGraphObjType.Y1_AXIS_LINE="Y1AxisLine";DvtGraphObjType.Y2_AXIS_LINE="Y2AxisLine";DvtGraphObjType.Y1_LABEL="Y1L";
DvtGraphObjType.Y2_LABEL="Y2Label";DvtGraphObjType.Y1_MINOR_GRID="Y1MinorGrid";DvtGraphObjType.Y2_MINOR_GRID="Y2MinorGrid";DvtGraphObjType.Y1_MAJOR_GRID="Y1MG";DvtGraphObjType.Y2_MAJOR_GRID="Y2MajorGrid";DvtGraphObjType.Y1_RANGE_SLIDER="Y1RS";DvtGraphObjType.Y2_RANGE_SLIDER="Y2RS";DvtGraphObjType.Y1_TITLE="Y1Title";DvtGraphObjType.Y2_TITLE="Y2Title";DvtGraphObjType.ZOOM_WINDOW="ZoomWindow";DvtGraphObjType.AXIS="Axis";
DvtGraphObjType.isLegendItem=function(a){return a===DvtGraphObjType.LEGEND_TEXT||a===DvtGraphObjType.LEGEND_MARKER};
var DvtGraphType=function(){};DvtObj.createSubclass(DvtGraphType,DvtObj,"DvtGraphType");DvtGraphType.AREA_VERT_ABS="AREA_VERT_ABS";DvtGraphType.AREA_VERT_PERCENT="AREA_VERT_PERCENT";DvtGraphType.AREA_VERT_STACK="AREA_VERT_STACK";DvtGraphType.BAR_HORIZ_CLUST="BAR_HORIZ_CLUST";DvtGraphType.BAR_HORIZ_STACK="BAR_HORIZ_STACK";DvtGraphType.BAR_HORIZ_STACK_2Y="BAR_HORIZ_STACK_2Y";DvtGraphType.BAR_LINE_AREA_COMBO="COMBINATION_VERT_ABS";DvtGraphType.BAR_VERT_CLUST="BAR_VERT_CLUST";
DvtGraphType.BAR_VERT_PERCENT="BAR_VERT_PERCENT";DvtGraphType.BAR_VERT_STACK="BAR_VERT_STACK";DvtGraphType.BAR_VERT_STACK2Y="BAR_VERT_STACK2Y";DvtGraphType.BUBBLE="BUBBLE";DvtGraphType.BUBBLE_2Y="BUBBLE_2Y";DvtGraphType.DIAL="DIAL";DvtGraphType.FUNNEL="FUNNEL";DvtGraphType.LED="LED";DvtGraphType.LINE_SELECT_POINT="LineSelectPoint";DvtGraphType.LINE_VERT_ABS="LINE_VERT_ABS";DvtGraphType.LINE_VERT_CLUST="LineVerticalCluster";DvtGraphType.LINE_VERT_PERCENT="LINE_VERT_PERCENT";
DvtGraphType.LINE_VERT_STACK="LINE_VERT_STACK";DvtGraphType.LINE_VERT_STACK2Y="LINE_VERT_STACK2Y";DvtGraphType.PIE="PIE";DvtGraphType.POLAR="POLAR";DvtGraphType.RADAR_LINE="RADAR_LINE";DvtGraphType.RING_BAR="RING_BAR";DvtGraphType.RING="RING";DvtGraphType.SCATTER="SCATTER";DvtGraphType.SCATTER_2Y="SCATTER_2Y";DvtGraphType.STATUSMETER="STATUSMETER";
var DvtDataSummary=function(a){this.Init(a)};DvtObj.createSubclass(DvtDataSummary,DvtObj,"DvtDataSummary");DvtDataSummary.prototype.getChart=function(){return this._Chart};DvtDataSummary.prototype.Init=function(a){this._Chart=a;this.yPxRatio=this.yPxMin=this.xPxRatio=this.xPxMax=this.xPxMin=this.y2BaselineFront=this.y2Baseline=this.y2BaseVal=this.y2MaxVal=this.y2MinVal=this.y1BaselineFront=this.y1Baseline=this.y1BaseVal=this.y1MaxVal=this.y1MinVal=this.x1MaxVal=this.x1MinVal=0};
var DvtGraph=function(a,b,c,d){this._Init(a,b,c,d)};DvtObj.createSubclass(DvtGraph,DvtContainer,"DvtGraph");DvtGraph.prototype.getCtx=function(){return this._ctx};DvtGraph.prototype.getChart=function(){return this._Chart};DvtGraph.prototype.setId=function(a){this._id=a};DvtGraph.prototype.getId=function(){return this._id?this._id:DvtGraph.superclass.getId.call(this)};
DvtGraph.prototype._Init=function(a,b,c,d){this.getImpl()||this.setImpl(a.getImplFactory().newContainer());DvtGraph.superclass.Init.call(this,a);this._id=b;this._ctx=a;this._callback=c;this._callbackObj=d;this._DCM=this._Chart=null};DvtGraph.prototype.getAutomation=function(){return this._Chart?this._Chart.getAutomation():null};DvtGraph.prototype.getType=function(){return this._Chart?this._Chart.getType():null};DvtGraph.prototype.render=function(){this._Chart&&this._Chart.render()};
DvtGraph.prototype.resetXML=function(){this._bNoAnim=!0;this.setXML(this._xml);this._bNoAnim=null};
DvtGraph.prototype.setXML=function(a){if(a){var b=null,c=a.indexOf("\x3croot");0<c?(b=a.substring(0,c),b=this._trim(b),0===b.length&&(b=null),a=a.substr(c),a=this._trim(a)):0!==c&&(b=a,a=null);if(b||a){var c=new DvtGraphAnimation,d=!1;1!=this._bNoAnim&&(b&&this._Chart?-1!=b.indexOf("\x3canimate")?(d=!0,c.animOnDataChange=DvtGraphAnimation.PPR):0<b.indexOf("ppr")?c.animOnDataChange=DvtGraphAnimation.PPR:0<b.indexOf("ads")&&(d=!0,c.animOnDataChange=DvtGraphAnimation.ADS):c.animOnDisplay=DvtGraphAnimation.DISPLAY);
b=new DvtGraphCore(this._ctx,this.getId(),this._callback,this._callbackObj);b.setXML(a,c);this._xml=a;(a=b.getZoomButton())&&this.isFocused()&&(a.show(),a.drawOverState());this._Chart&&!d&&(c.animOnDisplay=DvtGraphAnimation.NONE);(this._bNoAnim||c.animOnDataChange!==DvtGraphAnimation.NONE&&c.animOnDataChange!==DvtGraphAnimation.AUTO)&&!DvtBlackBoxAnimationHandler.isSupported(c.animOnDataChange)&&(c.animOnDataChange=DvtGraphAnimation.NONE);c&&c.animOnDataChange===DvtGraphAnimation.NONE&&this._Chart&&
(this.removeChild(this._Chart),this._Chart.destroy(),this._Chart=null);this._bNoAnim||c.animOnDisplay===DvtGraphAnimation.NONE&&c.animOnDataChange===DvtGraphAnimation.NONE?(this.addChild(b),this._Chart=b,b.render()):(a=!0,c.animOnDisplay!==DvtGraphAnimation.NONE?c.animOnDisplay===DvtGraphAnimation.AUTO?a=!1:this._startBlackboxAnimation(c,null,b):c.animOnDataChange!==DvtGraphAnimation.NONE&&(c.animOnDataChange===DvtGraphAnimation.AUTO?a=this._startDataChangeAnimation(b,c):this._startBlackboxAnimation(c,
this._Chart,b)),a||(this._Chart&&(this.removeChild(this._Chart),this._Chart.destroy()),this.addChild(b),this._Chart=b,b.render()))}}};DvtGraph.prototype.setMode=function(a){this._Chart&&this._Chart.setZoomMode(a)};DvtGraph.prototype.setFocused=function(a){this._hasFocus=a;var b=this._Chart?this._Chart.getZoomButton():null;b&&(a?(b.show(),b.drawOverState()):b.hide())};DvtGraph.prototype.isFocused=function(){return this._hasFocus};
DvtGraph.prototype._startBlackboxAnimation=function(a,b,c){this._blackbox&&(this._blackbox.stop(),this._blackbox=null,this._Chart&&(this.removeChild(this._Chart),this._Chart.destroy(),this.addChild(b),this._Chart=b));var d=new DvtRectangle(0,0,c.getWidth(),c.getHeight()),e=(a.animOnDisplay!==DvtGraphAnimation.NONE?a.displayDuration:a.dataChangeDuration)/1E3;this._newChart=c;this.addChild(c);c.render();(a=b?DvtBlackBoxAnimationHandler.getCombinedAnimation(this._ctx,a.animOnDataChange,b,c,d,e):DvtBlackBoxAnimationHandler.getInAnimation(this._ctx,
a.animOnDisplay,c,d,e))?(this._blackbox=a,a.setOnEnd(this._fnEndDataChange,this),a.play()):(this._Chart=c,this._newChart=null)};DvtGraph.prototype._fnEndDataChange=function(){this._Chart&&(this.removeChild(this._Chart),this._Chart.destroy());this._Chart=this._newChart;this._blackbox=this._newChart=null};
DvtGraph.prototype._startDataChangeAnimation=function(a,b){this._DCM&&this._DCM.isAnimating()&&this._DCM.stopAnimating();this._DCM=new DvtDataChangeManager(this);var c=this._DCM.handleDataChange(this._Chart,a,b);c&&(this._Chart=a);return c};DvtGraph.prototype.__explodeAll=function(){var a=this._Chart.__getPieChart();null!=a&&a.explodeAll()};DvtGraph.prototype.__uniteAll=function(){var a=this._Chart.__getPieChart();null!=a&&a.uniteAll()};
DvtGraph.prototype.__isPieAllExploded=function(){var a=this._Chart.__getPieChart();if(null!=a)return a.isPieAllExploded()};DvtGraph.prototype.__isPieAllUnited=function(){var a=this._Chart.__getPieChart();if(null!=a)return a.isPieAllUnited()};DvtGraph.prototype._trim=function(a){return a.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1")};
DvtGraph.prototype.isDragAvailable=function(a,b,c){return this._Chart.getDragSource().isDragAvailable(c)};DvtGraph.prototype.initiateDrag=function(){this._Chart.getDragSource().initiateDrag()};DvtGraph.prototype.getDragTransferable=function(a,b){return this._Chart.getDragSource().getDragTransferable(a,b)};DvtGraph.prototype.getDragContext=function(a,b){return this._Chart.getDragSource().getDragContext(a,b)};
DvtGraph.prototype.getDragOverFeedback=function(a,b){return this._Chart.getDragSource().getDragOverFeedback(a,b)};DvtGraph.prototype.getDragOffset=function(a,b){return this._Chart.getDragSource().getDragOffset(a,b)};DvtGraph.prototype.getPointerOffset=function(a,b){return this._Chart.getDragSource().getPointerOffset(a,b)};DvtGraph.prototype.dragDropEnd=function(){this._Chart.getDragSource().dragDropEnd()};
DvtGraph.prototype.acceptDrag=function(a,b,c){return this._Chart.getDropTarget().acceptDrag(a,b,c)};DvtGraph.prototype.dragEnter=function(){this._Chart.getDropTarget().dragEnter()};DvtGraph.prototype.dragExit=function(){this._Chart.getDropTarget().dragExit()};DvtGraph.prototype.getDropSite=function(a,b){return this._Chart.getDropTarget().getDropSite(a,b)};
var DvtLegacyPieChart=function(a,b,c,d){this.Init(b,a.__getEventManager(),c,d);this._chart=a;this._pieSliceExplodeState=null};DvtObj.createSubclass(DvtLegacyPieChart,DvtPieChart,"DvtLegacyPieChart");DvtLegacyPieChart.prototype.init=function(){};DvtLegacyPieChart.prototype.CreateSlice=function(a,b){return new DvtLegacyPieSlice(a,b)};DvtLegacyPieChart.prototype.__getShowPopupBehaviors=function(){return this._chart.__getShowPopupBehaviors()};
DvtLegacyPieChart.prototype.animateExplode=function(a,b){var c=this.__getSlices(),d=this.getMaxSliceIndex()+1,e,f,g=0,h=0,k;if(null==this._pieSliceExplodeState){this._pieSliceExplodeState=Array(d);for(e=0;e<d;e++)this._pieSliceExplodeState[e]=0;for(k=0;k<c.length;k++)e=c[k],f=e.getSliceInfo(),e=f.getIndex(),this._pieSliceExplodeState[e]=0==f.getExplode()?0:100}for(e=0;e<d;e++)0!=this._pieSliceExplodeState[e]&&g++;k=a==DvtPieChart.EXPLODE?100:0;f=!1;if(-1==b)for(e=0;e<d;e++)this._pieSliceExplodeState[e]=
k;else 0<=b&&b<d&&(e=c[b].getSliceInfo().getIndex(),this._pieSliceExplodeState[e]=k);for(e=0;e<d;e++)0!=this._pieSliceExplodeState[e]&&h++;if(0==g&&0<h||g==d&&h<d||0!=g&&0==h||g!=d&&h==d)f=!0;DvtLegacyPieChart.superclass.animateExplode.call(this,a,b);this._updatePieExplodeJSState(f)};
DvtLegacyPieChart.prototype._updatePieExplodeJSState=function(a){if(null!=this._pieSliceExplodeState){var b=this._pieSliceExplodeState.join();DvtAgent.isTouchDevice()&&(b+=";true");var c=this._chart.getId();null==c&&(c="");var d=this.getCtx().getJsExt();d.sendPPRProperty(c,DvtJsExt.PPR_ATTRIB_PIE_EXPLODE,b);a&&setTimeout(function(){d.sendPPRNonBlocking(c)},1E3*this.getAnimationDuration())}};
DvtLegacyPieChart.prototype.hideSlice=function(a){var b=this.__getSlices();if(a=b&&a<b.length?b[a].getSliceInfo().getId():null)a=new DvtCategoryHideShowEvent(DvtCategoryHideShowEvent.TYPE_HIDE,a),this.processEvent(a)};
var DvtLegacySliceInfo=function(){this.Init()};DvtObj.createSubclass(DvtLegacySliceInfo,DvtSliceInfo,"DvtLegacySliceInfo");DvtLegacySliceInfo.prototype.Init=function(){DvtLegacySliceInfo.superclass.Init.call(this);this._objId=this._userProps=this._labelShapeAttr=this._shapeAttr=null};DvtLegacySliceInfo.prototype.getShapeAttr=function(){return this._shapeAttr};DvtLegacySliceInfo.prototype.setShapeAttr=function(a){this._shapeAttr=a};DvtLegacySliceInfo.prototype.getLabelShapeAttr=function(){return this._labelShapeAttr};
DvtLegacySliceInfo.prototype.setLabelShapeAttr=function(a){this._labelShapeAttr=a};DvtLegacySliceInfo.prototype.getUserProps=function(){return this._userProps};DvtLegacySliceInfo.prototype.setUserProps=function(a){this._userProps=a};DvtLegacySliceInfo.prototype.getObjId=function(){return this._objId};DvtLegacySliceInfo.prototype.setObjId=function(a){this._objId=a};
var DvtLegacyPieSlice=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtLegacyPieSlice,DvtPieSlice,"DvtLegacyPieSlice");DvtLegacyPieSlice.prototype.getId=function(){return DvtGraphEventUtils.getId(this.getSliceInfo().getId(),this.getPieChart().getPieInfo().getId())};DvtLegacyPieSlice.prototype.getTooltip=function(a){return(a=this.getShapeAttr(a))&&a.alt?a.alt:null};
DvtLegacyPieSlice.prototype.getShapeAttr=function(a){return a===this.getSliceLabel()?(a=this.getSliceInfo().getLabelShapeAttr())?a:this.getSliceInfo().getShapeAttr():this.getSliceInfo().getShapeAttr()};DvtLegacyPieSlice.prototype.render=function(){DvtLegacyPieSlice.superclass.render.call(this);var a=this.getShapeAttr(this);if(a&&DvtShapeAttr.hasClickableShapeAttribute(a))for(var a=this.getDisplayables(),b=0;b<a.length;b++)a[b]!=this._feeler&&a[b]!=this._sliceLabel&&a[b].setCursor(DvtSelectionEffectUtils.getSelectingCursor())};
DvtLegacyPieSlice.prototype.setSliceLabel=function(a){DvtLegacyPieSlice.superclass.setSliceLabel.call(this,a);if(null!=a){var b=this.getShapeAttr(a);if(b&&(DvtShapeAttr.hasClickableShapeAttribute(b)&&a.setCursor(DvtSelectionEffectUtils.getSelectingCursor()),b.bLink&&b.linkColor)){var c=a.getFill()?a.getFill().getAlpha():1;a.setSolidFill(b.linkColor,c)}}};DvtLegacyPieSlice.prototype.getCategories=function(){return[this.getSliceInfo().getId()]};
var Dvt2DBarRiser=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};DvtObj.createSubclass(Dvt2DBarRiser,DvtRect,"Dvt2DBarRiser");Dvt2DBarRiser.prototype.Init=function(a,b,c,d,e,f){Dvt2DBarRiser.superclass.Init.call(this,a,b,c,d,e,f);this._bSelecting=this._bSelected=!1;this._selectionEffects=null;this._bSelectedShadow=!0;this._dataColor="#000000";this._bInitFx=!1;this._applyStrokeTimer=this._relatedDetObjects=this._savedHoverStroke=this._savedUpStroke=this._DCHandler=null;this._selectionType=DvtSelectionEffectUtils.DEFAULT_SEL_TYPE};
Dvt2DBarRiser.prototype.doInitFx=function(){var a=this._Dlo._Chart,b=a.isVertical(),a=a.getAnimation().displayDuration;this._origRect=this.getImpl().getElem().getBBox();var c;b?(b=this.getHeight(),this.setHeight(0),c=new DvtAnimator(this.getCtx(),a/1E3),c.addProp(DvtAnimator.TYPE_NUMBER,this,this.getHeight,this.setHeight,b),a=this.getY()+b,b=this.getY(),this.setY(a),c.addProp(DvtAnimator.TYPE_NUMBER,this,this.getY,this.setY,b)):(b=this.getWidth(),this.setWidth(0),c=new DvtAnimator(this.getCtx(),1),
c.addProp(DvtAnimator.TYPE_NUMBER,this,this.getWidth,this.setWidth,b));c.play()};Dvt2DBarRiser.prototype.init=function(){this._Dlo.setInitFx(this._bInitFx);var a=this._Dlo;this._dataColor=a.getChart().getSeriesColor(a.getSeriesIndex());a.isSelectable()&&(a=this.getFill(),a instanceof DvtGradientFill?this._dataColor=a.getColors()[0]:a instanceof DvtSolidFill&&(this._dataColor=a.getColor()),this.setCursor(DvtSelectionEffectUtils.getSelectingCursor()))};
Dvt2DBarRiser.prototype.setInitFx=function(a){this._bInitFx=a};Dvt2DBarRiser.prototype.ApplySelectionState=function(){DvtSelectionEffectUtils.applySelectionState(this,this._dataColor)};Dvt2DBarRiser.prototype.ApplySelectingState=function(){DvtSelectionEffectUtils.applySelectingState(this,this._dataColor)};Dvt2DBarRiser.prototype.showHoverEffect=function(){this.SetSelectionMouseOver(!0)};Dvt2DBarRiser.prototype.hideHoverEffect=function(){this.SetSelectionMouseOver(!1)};
Dvt2DBarRiser.prototype.isHoverEffectShown=function(){return this._bSelecting};Dvt2DBarRiser.prototype.SetSelectionMouseOver=function(a){this.SetSelectionMouseOverSelf(a);if(this._relatedDetObjects)for(var b=0;b<this._relatedDetObjects.length;b++)this._relatedDetObjects[b].SetSelectionMouseOverSelf&&this._relatedDetObjects[b].SetSelectionMouseOverSelf(a)};Dvt2DBarRiser.prototype.SetSelectionMouseOverSelf=function(a){this._bSelecting!=a&&(this._bSelecting=a,this.ApplySelectingState())};
Dvt2DBarRiser.prototype.isSelected=function(){return this._bSelected};Dvt2DBarRiser.prototype.setSelected=function(a){this.SetSelectedSelf(a);if(this._relatedDetObjects)for(var b=0;b<this._relatedDetObjects.length;b++)this._relatedDetObjects[b].SetSelectedSelf&&this._relatedDetObjects[b].SetSelectedSelf(a)};Dvt2DBarRiser.prototype.SetSelectedSelf=function(a){this._bSelected!=a&&(this._bSelected=a,this.ApplySelectionState())};
Dvt2DBarRiser.prototype.addRelatedObject=function(a){this._relatedDetObjects||(this._relatedDetObjects=[]);this._relatedDetObjects.push(a)};Dvt2DBarRiser.prototype.UpdateSelectionEffect=function(){};
var Dvt3DBar=function(a,b){this.Init(a,b)};DvtObj.createSubclass(Dvt3DBar,DvtContainer,"Dvt3DBar");Dvt3DBar.prototype.Init=function(a,b){Dvt3DBar.superclass.Init.call(this,a,b);this._top=this._side=this._front=null;this._bSelecting=this._bSelected=!1};Dvt3DBar.prototype.init=function(){for(var a=this._side,b=0;3>b;b++)0<b&&(a=1==b?this._front:this._top),a&&(this.addChild(a),a.init&&a.init());this._front.setSelectedShadow&&this._front.setSelectedShadow(!1);this._top&&this._top.setSelectedShadow&&this._top.setSelectedShadow(!1)};
Dvt3DBar.prototype.getFront=function(){return this._front};Dvt3DBar.prototype.getSide=function(){return this._side};Dvt3DBar.prototype.getTop=function(){return this._top};Dvt3DBar.prototype.setAlpha=function(a){this._front.setAlpha(a);this._side.setAlpha(a);this._top.setAlpha(a)};Dvt3DBar.prototype.setChart=function(a){this._front&&this._front._Dlo.setChart(a);this._side&&this._side._Dlo.setChart(a);this._top&&this._top._Dlo.setChart(a)};
Dvt3DBar.prototype.setFace=function(a){var b=a._Dlo.getObjId();if(b===DvtGraphObjType.BAR_RISER||b===DvtGraphObjType.PIE_BAR_RISER)this._front=a;else if(b===DvtGraphObjType.BAR_RISER_SIDE||b===DvtGraphObjType.PIE_BAR_RISER_SIDE)this._side=a;else if(b===DvtGraphObjType.BAR_RISER_TOP||b===DvtGraphObjType.PIE_BAR_RISER_TOP)this._top=a;a.set3DBar&&a.set3DBar(this);this.setChart(this._Dlo.getChart())};
Dvt3DBar.prototype.showHoverEffect=function(){this._bSelecting=!0;this._side.SetSelectionMouseOverSelf&&this._side.SetSelectionMouseOverSelf(!0);this._front.SetSelectionMouseOverSelf&&this._front.SetSelectionMouseOverSelf(!0);this._top.SetSelectionMouseOverSelf&&this._top.SetSelectionMouseOverSelf(!0)};
Dvt3DBar.prototype.hideHoverEffect=function(){this._bSelecting=!1;this._side.SetSelectionMouseOverSelf&&this._side.SetSelectionMouseOverSelf(!1);this._front.SetSelectionMouseOverSelf&&this._front.SetSelectionMouseOverSelf(!1);this._top.SetSelectionMouseOverSelf&&this._top.SetSelectionMouseOverSelf(!1)};Dvt3DBar.prototype.isHoverEffectShown=function(){return this._bSelecting};Dvt3DBar.prototype.isSelected=function(){return this._bSelected};
Dvt3DBar.prototype.setSelected=function(a){this._bSelected=a;this._side.SetSelectedSelf&&this._side.SetSelectedSelf(a);this._front.SetSelectedSelf&&this._front.SetSelectedSelf(a);this._top.SetSelectedSelf&&this._top.SetSelectedSelf(a)};
var Dvt3DBarRiser=function(a,b){this.Init(a,b)};DvtObj.createSubclass(Dvt3DBarRiser,Dvt3DBar,"Dvt3DBarRiser");Dvt3DBarRiser.prototype.Init=function(a,b){Dvt3DBarRiser.superclass.Init.call(this,a,b);this._bInitFx=!1};Dvt3DBarRiser.prototype.setInitFx=function(a){this._bInitFx=a};
Dvt3DBarRiser.prototype.doInitFx=function(){for(var a=this._Dlo._Chart.getAnimation().displayDuration,b,c,d,e,f,g=0;2>g;g++)b=0===g?this._side:this._front,c=b.getPoints(),d=DvtArrayUtils.copy(c),d[7]=d[1],d[9]=d[1],0===g?(d[5]=d[3],e=c):(d[5]=d[1],f=c),b.setPoints(d);b=f[1]-f[7];c=this._top.getPoints();d=DvtArrayUtils.copy(c);10>d.length?(d[1]+=b,d[3]+=b,d[5]+=b,d[7]+=b):(d[5]+=b,d[7]+=b,d[1]+=b,d[3]+=b,d[9]+=b);this._top.setPoints(d);a=new DvtAnimator(this.getCtx(),a/1E3);a.addProp(DvtAnimator.TYPE_NUMBER_ARRAY,
this._side,this._side.getPoints,this._side.setPoints,e);a.addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this._front,this._front.getPoints,this._front.setPoints,f);a.addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this._top,this._top.getPoints,this._top.setPoints,c);a.play()};Dvt3DBarRiser.prototype.init=function(){this._Dlo.setInitFx(this._bInitFx);Dvt3DBarRiser.superclass.init.call(this)};
var DvtAreaRiser=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtAreaRiser,DvtPolygon,"DvtAreaRiser");DvtAreaRiser.prototype.doInitFx=function(){var a=this._Dlo._Chart.getAnimation().displayDuration,b=this.getPoints(),c=DvtArrayUtils.copy(b),d=c.length;if(!(6>=d)){var e=b[d-3],d=d-6;for(i=0;i<d;i+=2)c[i+1]=e;this.setPoints(c);a=new DvtAnimator(this.getCtx(),a/1E3);a.addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this.getPoints,this.setPoints,b);a.play()}};DvtAreaRiser.prototype.init=function(){this._Dlo.setInitFx(!0)};
var DvtLineRiser=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtLineRiser,DvtPolyline,"DvtLineRiser");
DvtLineRiser.prototype.doInitFx=function(){var a=this.getPoints();if(!(4>a.length)){var b=DvtArrayUtils.copy(a),c=b.length,d=this._Dlo._Chart.getAnimation().displayDuration,e=0,f=Number.MAX_VALUE,g=Number.MIN_VALUE,h;for(h=1;h<c;h+=2){var k=b[h];k<f&&(f=k);k>g&&(g=k);e+=k}4<c?(e=e-f-g,e/=(c-4)/2):(e=b[1],b[2]=b[0]);e=Math.round(e);for(h=1;h<c;h+=2)b[h]=e;this.setPoints(b);b=new DvtAnimator(this.getCtx(),d/1E3);b.addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this.getPoints,this.setPoints,a);a=new DvtAnimator(this.getCtx(),
.2*d/1E3,.8*d/1E3);if(d=this.getLineMarkers())for(c=d.length,h=0;h<c;h++)e=d[h],e._bAnimatedOnDisplay||(f=e.getAlpha(),e.setAlpha(0),a.addProp(DvtAnimator.TYPE_NUMBER,e,e.getAlpha,e.setAlpha,f),e._bAnimatedOnDisplay=!0);b.play();a.play()}};DvtLineRiser.prototype.getLineMarkers=function(){return this._aLMarkers};DvtLineRiser.prototype.init=function(){this._Dlo.setInitFx(!0)};DvtLineRiser.prototype.Init=function(a,b,c){DvtLineRiser.superclass.Init.call(this,a,b,c);this._aLM=null};
var DvtGraphDetMarker=function(a,b,c,d,e,f,g,h,k,m,n){this.Init(a,b,c,d,e,f,g,h,k,m,n)};DvtObj.createSubclass(DvtGraphDetMarker,DvtMarker,"DvtGraphDetMarker");DvtGraphDetMarker.prototype.Init=function(a,b,c,d,e,f,g,h,k,m,n){DvtGraphDetMarker.superclass.Init.call(this,a,b,c,d,e,f,g,h,k,m,n)};DvtGraphDetMarker.prototype.isDragAvailable=function(a){return a[0]};DvtGraphDetMarker.prototype.getDragTransferable=function(a,b){return this._Dlo._Chart.getDragTransferable(a,b)};
DvtGraphDetMarker.prototype.getDragFeedback=function(a,b){return this._Dlo._Chart.getDragOverFeedback(a,b)};DvtGraphDetMarker.prototype.UpdateSelectionEffect=function(){};
var DvtMarkerRiser=function(a,b,c,d,e,f,g,h,k,m,n){this.Init(a,b,c,d,e,f,g,h,k,m,n)};DvtObj.createSubclass(DvtMarkerRiser,DvtGraphDetMarker,"DvtMarkerRiser");DvtMarkerRiser._INIT_ANIM_MOVE=0;DvtMarkerRiser._INIT_ANIM_SCALE=1;DvtMarkerRiser._INIT_ANIM=DvtMarkerRiser._INIT_ANIM_SCALE;DvtMarkerRiser.prototype.Init=function(a,b,c,d,e,f,g,h,k,m,n){DvtMarkerRiser.superclass.Init.call(this,a,b,c,d,e,f,g,h,k,m,n);this._mrX=d;this._mrY=e;this._mrW=f;this._mrH=g};
DvtMarkerRiser.prototype.doInitFx=function(){var a=this._Dlo._Chart,b=a.getAnimation().displayDuration;if(b=this.CreateInitAnim(a,b))a.isBubbleChart()&&(a=this.getAlpha(),this.setAlpha(0),b.addProp(DvtAnimator.TYPE_NUMBER,this,this.getAlpha,this.setAlpha,a)),b.play()};DvtMarkerRiser.prototype.CreateInitAnim=function(a,b){switch(DvtMarkerRiser._INIT_ANIM){case DvtMarkerRiser._INIT_ANIM_MOVE:return this.CreateInitAnimMove(a,b);case DvtMarkerRiser._INIT_ANIM_SCALE:return this.CreateInitAnimScale(a,b)}return null};
DvtMarkerRiser.prototype.CreateInitAnimMove=function(a,b){var c=a.getPlotRect(),d=this._mrX+this._mrW/2,e=this._mrY+this._mrH/2,d=(d>=c.x+c.w/2?c.x+c.w:c.x)-d,e=(e>=c.y+c.h/2?c.y+c.h:c.y)-e,c=this.getMatrix(),f=this.getMatrix().clone();f.translate(d,e);this.setMatrix(f);d=new DvtAnimator(this.getCtx(),b/1E3);d.addProp(DvtAnimator.TYPE_MATRIX,this,this.getMatrix,this.setMatrix,c);return d};
DvtMarkerRiser.prototype.CreateInitAnimScale=function(a,b){var c=this.getMatrix();this.setScaleX(1E-6);this.setScaleY(1E-6);var d=this.getMatrix().clone();d.translate(this._mrW/2,this._mrH/2);this.setMatrix(d);d=new DvtAnimator(this.getCtx(),b/1E3);d.addProp(DvtAnimator.TYPE_MATRIX,this,this.getMatrix,this.setMatrix,c);return d};DvtMarkerRiser.prototype.init=function(){this._Dlo.setInitFx(this._bInitFx)};DvtMarkerRiser.prototype.setInitFx=function(a){this._bInitFx=a};
var DvtGraphScrollbar=function(a,b,c,d,e,f,g,h,k){this.Init(a,b,c,d,e,f,g,h,k)};DvtObj.createSubclass(DvtGraphScrollbar,DvtScrollbar,"DvtGraphScrollbar");DvtGraphScrollbar.prototype.Init=function(a,b,c,d,e,f,g,h,k){this._zoomEventJs=this._scrollEventJs=this._axis=null;this._uiId=b;DvtGraphScrollbar.superclass.Init.call(this,a,c,d,e,f,g,h,!1,null,k)};DvtGraphScrollbar.prototype.getUIId=function(){return this._uiId};DvtGraphScrollbar.prototype.setLiveScroll=function(a){this._isLiveScroll=a};
DvtGraphScrollbar.prototype.getAxis=function(){return this._axis};DvtGraphScrollbar.prototype.addDataAxis=function(a,b,c){this._axis=new DvtDataAxis(a,b,this._thumbStartMin,this._thumbStartMin+this._thumbLengthMax,this.getWidth(),this.getHeight(),this._isHoriz,c)};DvtGraphScrollbar.prototype.addTimeAxis=function(a,b,c,d){this._axis=new DvtTimeAxis(a,b,this._thumbStartMin,this._thumbStartMin+this._thumbLengthMax,this.getWidth(),this.getHeight(),c,d,this._isHoriz)};
DvtGraphScrollbar.prototype.addCustomAxis=function(a){this._axis=new DvtCustomAxis(a,this._thumbStartMin,this._thumbStartMin+this._thumbLengthMax,this.getWidth(),this.getHeight(),this._isHoriz)};DvtGraphScrollbar.prototype.getScrollEventJs=function(){return this._scrollEventJs};DvtGraphScrollbar.prototype.setScrollEventJs=function(a){this._scrollEventJs=a};DvtGraphScrollbar.prototype.getZoomEventJs=function(){return this._zoomEventJs};
DvtGraphScrollbar.prototype.setZoomEventJs=function(a){this._zoomEventJs=a};
var DvtZoomButton=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtZoomButton,DvtContainer,"DvtZoomButton");DvtZoomButton.BUTTON_SHOW=0;DvtZoomButton.BUTTON_HIDE=1;DvtZoomButton.BUTTON_STATE_UP=0;DvtZoomButton.BUTTON_STATE_OVER=1;DvtZoomButton.BUTTON_STATE_DOWN=2;DvtZoomButton.UP_BORDER_COLOR="#ffffff";DvtZoomButton.UP_BORDER_WIDTH=NaN;DvtZoomButton.UP_FILL_COLORS=["#ffffff","#ffffff"];DvtZoomButton.UP_FILL_ALPHAS=[0,0];DvtZoomButton.UP_FILL_RATIOS=[0,255];
DvtZoomButton.OVER_BORDER_COLOR="#097bf8";DvtZoomButton.OVER_BORDER_WIDTH=NaN;DvtZoomButton.OVER_FILL_COLORS=["#4ab5fc","#0d8cf9"];DvtZoomButton.OVER_FILL_ALPHAS=[1,1];DvtZoomButton.OVER_FILL_RATIOS=[0,255];DvtZoomButton.DOWN_BORDER_COLOR="#097bf8";DvtZoomButton.DOWN_BORDER_WIDTH=NaN;DvtZoomButton.DOWN_FILL_COLORS=["#4e555e","#a7b7d4"];DvtZoomButton.DOWN_FILL_ALPHAS=[1,1];DvtZoomButton.DOWN_FILL_RATIOS=[0,255];DvtZoomButton.MG_UP_BORDER_COLOR="#000000";
DvtZoomButton.MG_UP_FILL_COLORS=["#FFFFFF","#FFFFFF","#8BB9FC","#BDE3FD","#BDE3FD"];DvtZoomButton.MG_UP_FILL_ALPHAS=[1,1,1,1,.5];DvtZoomButton.MG_UP_FILL_RATIOS=[0,50,90,190,255];DvtZoomButton.MG_UP_FOCAL_POINT=.3;DvtZoomButton.MG_HANDLE_COLOR="#303950";DvtZoomButton.WIDTH=20;DvtZoomButton.HEIGHT=16;DvtZoomButton.CORNER_RADIUS=4;DvtZoomButton.MAGNIFYING_GLASS_RADIUS=4;
DvtZoomButton.prototype.Init=function(a,b,c,d,e){this._context=a;c=(new DvtContainer(a,"scrollbarZoomButton"+e)).getImpl();DvtZoomButton.superclass.Init.call(this,a,c.getId());this._menu=this._menuRenderer=null;this._resources=b;this._buttonMode=this._mouseEnabled=!0;this._flipped=d;this._curMenuRendererContents=this._buttonState=this._sAllActualJS=this._sY2ActualJS=this._sY1ActualJS=this._sX1ActualJS=this._sY2OutJS=this._sY2InJS=this._sY1OutJS=this._sY1InJS=this._sX1OutJS=this._sX1InJS=this._resourceY2Axis=
this._resourceYAxis=this._resourceXAxis=this._resourceZoomOut=this._resourceZoomIn=this._resourceActualSize=this._tooltip=null;this._curRendererIdx=-1;this._prevMenuRendererContents=null;this._prevRendererIdx=-1;this.drawUpState();DvtAgent.isTouchDevice()?(this.drawOverState(),this._isMouseOver=!0):(this.hide(),this._isMouseOver=!1);this.setCursor(DvtSelectionEffectUtils.getSelectingCursor());DvtAgent.isTouchDevice()?(this.addEvtListener(DvtTouchEvent.TOUCHSTART,this._touchHandler,!1,this),this.addEvtListener(DvtTouchEvent.TOUCHMOVE,
this._touchHandler,!1,this),this.addEvtListener(DvtTouchEvent.TOUCHEND,this._touchHandler,!1,this)):(this.addEvtListener(DvtMouseEvent.MOUSEOUT,this.mouseOutHandler,!1,this),this.addEvtListener(DvtMouseEvent.MOUSEOVER,this.mouseOverHandler,!1,this),this.addEvtListener(DvtMouseEvent.CLICK,this.clickHandler,!1,this))};
DvtZoomButton.prototype.onZoomEvent=function(a){try{var b=a.getZoomType(),c=a.getAxis(),d;b==DvtGraphZoomEvent.ZOOM_IN?c==DvtGraphZoomEvent.AXIS_X1?d=this._sX1InJS:c==DvtGraphZoomEvent.AXIS_Y1?d=this._sY1InJS:c==DvtGraphZoomEvent.AXIS_Y2&&(d=this._sY2InJS):b==DvtGraphZoomEvent.ZOOM_OUT?c==DvtGraphZoomEvent.AXIS_X1?d=this._sX1OutJS:c==DvtGraphZoomEvent.AXIS_Y1?d=this._sY1OutJS:c==DvtGraphZoomEvent.AXIS_Y2&&(d=this._sY2OutJS):b==DvtGraphZoomEvent.ZOOM_ACTUAL_SIZE&&(c==DvtGraphZoomEvent.AXIS_X1?d=this._sX1ActualJS:
c==DvtGraphZoomEvent.AXIS_Y1?d=this._sY1ActualJS:c==DvtGraphZoomEvent.AXIS_Y2?d=this._sY2ActualJS:c==DvtGraphZoomEvent.AXIS_ALL&&(d=this._sAllActualJS));null!=d&&this._context.getJsExt().callJs(d)}catch(e){console.log(e)}};DvtZoomButton.prototype.clickHandler=function(a){this.processClick(a.target);a.stopPropagation()};
DvtZoomButton.prototype.processClick=function(a){if(!(null!=this._menuRenderer&&a instanceof DvtDisplayable&&this._menuRenderer.contains(a)))if(this._menuRenderer)this.resetButton();else{this.drawDownState();this._menuRenderer=new DvtZoomMenuRenderer(this._context,this._menu,this._flipped,this.onZoomEvent,this);this.isFlipped()?this._menuRenderer.setTranslateX(-this._menuRenderer._w+DvtZoomButton.WIDTH):this._menuRenderer.setTranslateX(0);this._menuRenderer.setTranslateY(-this._menuRenderer._h);this.addChild(this._menuRenderer);
a=45;this._flipped&&(a=135);var b=DvtColorUtils.makeRGBA(0,0,0,.45);a=new DvtShadow(b,5,7,7,a,1,3,!1,!1,!1);this._menuRenderer.__bg.addDrawEffect(a);this.getParent().addChild(this)}};DvtZoomButton.prototype.mouseOverHandler=function(a){this._buttonState!=DvtZoomButton.BUTTON_STATE_DOWN&&this.drawOverState();this._isMouseOver=!0;a.stopPropagation()};DvtZoomButton.prototype.mouseOutHandler=function(a){this._buttonState!=DvtZoomButton.BUTTON_STATE_DOWN&&this.drawUpState();this._isMouseOver=!1;a.stopPropagation()};
DvtZoomButton.prototype.immediateTouchAttempted=function(a,b){this.getTouchManager().saveProcessedTouchDefault(b.identifier,this,this,"zoomButton","zoomButton",this);this.drawDownState();a.blockTouchHold()};DvtZoomButton.prototype.immediateTouchMoved=function(a,b){a.preventDefault()};DvtZoomButton.prototype.immediateTouchEnded=function(a,b){this.drawOverState();this.processClick(a.target);a.stopPropagation()};
DvtZoomButton.prototype._touchHandler=function(a){this.getTouchManager().preEventBubble(a);this.getTouchManager().processAssociatedTouchDefault(a,this);this.getTouchManager().postEventBubble(a)};DvtZoomButton.prototype.setX1ScrollInJS=function(a){this._sX1InJS=a};DvtZoomButton.prototype.setX1ScrollOutJS=function(a){this._sX1OutJS=a};DvtZoomButton.prototype.setY1ScrollInJS=function(a){this._sY1InJS=a};DvtZoomButton.prototype.setY1ScrollOutJS=function(a){this._sY1OutJS=a};
DvtZoomButton.prototype.setY2ScrollInJS=function(a){this._sY2InJS=a};DvtZoomButton.prototype.setY2ScrollOutJS=function(a){this._sY2OutJS=a};DvtZoomButton.prototype.setX1ActualJS=function(a){this._sX1ActualJS=a};DvtZoomButton.prototype.setY1ActualJS=function(a){this._sY1ActualJS=a};DvtZoomButton.prototype.setY2ActualJS=function(a){this._sY2ActualJS=a};DvtZoomButton.prototype.setAllActualJS=function(a){this._sAllActualJS=a};
DvtZoomButton.prototype.createMenu=function(a){var b=null!=this._sX1InJS||null!=this._sX1OutJS,c=null!=this._sY1InJS||null!=this._sY1OutJS,d=null!=this._sY2InJS||null!=this._sY2OutJS;if(null!=this._resources){var e=this._resources.split(",");this._tooltip=e[0];this._resourceActualSize=e[1];this._resourceZoomIn=e[2];this._resourceZoomOut=e[3];7==e.length&&(this._resourceXAxis=e[4],this._resourceYAxis=e[5],this._resourceY2Axis=e[6])}!b||c||d?b||!c||d?b||c||!d||(this._menu=this.createSubmenu(null,DvtGraphZoomEvent.AXIS_Y2)):
this._menu=this.createSubmenu(null,DvtGraphZoomEvent.AXIS_Y1):this._menu=this.createSubmenu(null,DvtGraphZoomEvent.AXIS_X1);null==this._menu&&(this._menu=new DvtZoomMenu(this._context,"",!0,!0),b&&a&&this._menu.add(this.createSubmenu(this._resourceXAxis,DvtGraphZoomEvent.AXIS_X1)),c&&this._menu.add(this.createSubmenu(this._resourceYAxis,DvtGraphZoomEvent.AXIS_Y1)),d&&this._menu.add(this.createSubmenu(this._resourceY2Axis,DvtGraphZoomEvent.AXIS_Y2)),b&&!a&&this._menu.add(this.createSubmenu(this._resourceXAxis,
DvtGraphZoomEvent.AXIS_X1)),this._menu.addSeparator(),this._menu.add(new DvtZoomMenuItem(this._context,this._resourceActualSize,DvtGraphZoomEvent.ZOOM_ACTUAL_SIZE,null!=this._sAllActualJS,!0,DvtGraphZoomEvent.AXIS_ALL)))};
DvtZoomButton.prototype.createSubmenu=function(a,b){var c=new DvtZoomMenu(this._context,a,!0,!0,b),d=!1,e=!1;b==DvtGraphZoomEvent.AXIS_X1?(d=null!=this._sX1InJS,e=null!=this._sX1OutJS):b==DvtGraphZoomEvent.AXIS_Y1?(d=null!=this._sY1InJS,e=null!=this._sY1OutJS):b==DvtGraphZoomEvent.AXIS_Y2&&(d=null!=this._sY2InJS,e=null!=this._sY2OutJS);c.add(new DvtZoomMenuItem(this._context,this._resourceZoomIn,DvtGraphZoomEvent.ZOOM_IN,d,!0,b));c.add(new DvtZoomMenuItem(this._context,this._resourceZoomOut,DvtGraphZoomEvent.ZOOM_OUT,
e,!0,b));c.addSeparator();c.add(new DvtZoomMenuItem(this._context,this._resourceActualSize,DvtGraphZoomEvent.ZOOM_ACTUAL_SIZE,e,!0,b));return c};DvtZoomButton.prototype.resetButton=function(){null!=this._menuRenderer&&this._menuRenderer.destroy();this._menuRenderer=null;DvtAgent.isTouchDevice()?this.drawOverState():this._isMouseOver?this.drawOverState():this.drawUpState()};
DvtZoomButton.prototype.drawUpState=function(){this._buttonState=DvtZoomButton.BUTTON_STATE_UP;this._buttonBg||(this._buttonBg=this._drawButtonBackground(),this.addChild(this._buttonBg));this._mgGlass||(this._mgGlass=this._drawMagnifyingGlass(DvtZoomButton.MG_UP_BORDER_COLOR,DvtZoomButton.MG_UP_FILL_COLORS,DvtZoomButton.MG_UP_FILL_ALPHAS,DvtZoomButton.MG_UP_FILL_RATIOS,DvtZoomButton.MG_UP_FOCAL_POINT),this.addChild(this._mgGlass));this._buttonBg.setAlpha(0);this._mgGlass.setAlpha(1);var a=new DvtLinearGradientFill(90,
DvtZoomButton.UP_FILL_COLORS,DvtZoomButton.UP_FILL_ALPHAS),b=new DvtSolidStroke(DvtZoomButton.UP_BORDER_COLOR,1);this._buttonBg.setFill(a);this._buttonBg.setStroke(b);a=new DvtRadialGradientFill(DvtZoomButton.MG_UP_FILL_COLORS,DvtZoomButton.MG_UP_FILL_ALPHAS);b=new DvtSolidStroke(DvtZoomButton.MG_UP_BORDER_COLOR,1);this._mgGlass.setFill(a);this._mgGlass.setStroke(b)};
DvtZoomButton.prototype.drawOverState=function(){this._buttonState=DvtZoomButton.BUTTON_STATE_OVER;DvtGraphSysUtils.makeDetObject(this._buttonBg);this._bgDlo=this._buttonBg._Dlo;this._bgDlo.setTooltip(this._tooltip);var a=null,a=DvtAgent.isTouchDevice()?new DvtLinearGradientFill(90,DvtZoomButton.UP_FILL_COLORS,DvtZoomButton.UP_FILL_ALPHAS):new DvtLinearGradientFill(90,DvtZoomButton.OVER_FILL_COLORS,DvtZoomButton.OVER_FILL_ALPHAS);this._buttonBg.setFill(a);this._buttonBg.setAlpha(1);this._mgGlass.setAlpha(1)};
DvtZoomButton.prototype.drawDownState=function(){this._buttonState=DvtZoomButton.BUTTON_STATE_DOWN;this._context.getTooltipManager().hideTooltip();this._bgDlo.setTooltip(null);var a=new DvtLinearGradientFill(90,DvtZoomButton.DOWN_FILL_COLORS,DvtZoomButton.DOWN_FILL_ALPHAS);this._buttonBg.setFill(a)};
DvtZoomButton.prototype._drawButtonBackground=function(){var a;a=this.isFlipped()?DvtPathUtils.moveTo(DvtZoomButton.CORNER_RADIUS,0)+DvtPathUtils.lineTo(DvtZoomButton.WIDTH,0)+DvtPathUtils.lineTo(DvtZoomButton.WIDTH,DvtZoomButton.HEIGHT-DvtZoomButton.CORNER_RADIUS)+DvtPathUtils.cubicTo(DvtZoomButton.WIDTH,DvtZoomButton.HEIGHT,DvtZoomButton.HEIGHT,DvtZoomButton.WIDTH-DvtZoomButton.CORNER_RADIUS,DvtZoomButton.HEIGHT,DvtZoomButton.WIDTH-DvtZoomButton.CORNER_RADIUS)+DvtPathUtils.lineTo(0,DvtZoomButton.HEIGHT)+
DvtPathUtils.lineTo(0,DvtZoomButton.CORNER_RADIUS)+DvtPathUtils.cubicTo(0,0,DvtZoomButton.CORNER_RADIUS,0,DvtZoomButton.CORNER_RADIUS,0):DvtPathUtils.moveTo(0,0)+DvtPathUtils.lineTo(DvtZoomButton.WIDTH-DvtZoomButton.CORNER_RADIUS,0)+DvtPathUtils.cubicTo(DvtZoomButton.WIDTH,0,DvtZoomButton.WIDTH,DvtZoomButton.CORNER_RADIUS,DvtZoomButton.WIDTH,DvtZoomButton.CORNER_RADIUS)+DvtPathUtils.lineTo(DvtZoomButton.WIDTH,DvtZoomButton.HEIGHT)+DvtPathUtils.lineTo(DvtZoomButton.CORNER_RADIUS,DvtZoomButton.HEIGHT)+
DvtPathUtils.cubicTo(0,DvtZoomButton.HEIGHT,0,DvtZoomButton.HEIGHT-DvtZoomButton.CORNER_RADIUS,0,DvtZoomButton.HEIGHT-DvtZoomButton.CORNER_RADIUS)+DvtPathUtils.lineTo(0,0);DvtPathUtils.closePath();return new DvtPath(this._context,a)};
DvtZoomButton.prototype._drawMagnifyingGlass=function(a,b,c,d,e){b=DvtZoomButton.WIDTH/2+2;c=DvtZoomButton.HEIGHT/3+1;a=new DvtCircle(this._context,b,c,DvtZoomButton.MAGNIFYING_GLASS_RADIUS);b=DvtPathUtils.moveTo(b-1.8*DvtZoomButton.MAGNIFYING_GLASS_RADIUS,c+1.8*DvtZoomButton.MAGNIFYING_GLASS_RADIUS)+DvtPathUtils.lineTo(b-DvtZoomButton.MAGNIFYING_GLASS_RADIUS/1.4,c+DvtZoomButton.MAGNIFYING_GLASS_RADIUS/1.4)+DvtPathUtils.moveTo(0,0);DvtPathUtils.closePath();b=new DvtPath(this._context,b);c=new DvtSolidStroke(DvtZoomButton.MG_HANDLE_COLOR,
1);c.setWidth(2);b.setStroke(c);a.addChild(b);return a};DvtZoomButton.prototype.hide=function(){this._buttonSHState!=DvtZoomButton.BUTTON_HIDE&&(this.resetButton(),this._buttonBg.setAlpha(0),this._mgGlass.setAlpha(0),this._buttonSHState=DvtZoomButton.BUTTON_HIDE)};DvtZoomButton.prototype.show=function(){this._buttonSHState!=DvtZoomButton.BUTTON_SHOW&&(this.resetButton(),this._mgGlass.setAlpha(1),this._buttonSHState=DvtZoomButton.BUTTON_SHOW)};DvtZoomButton.prototype.isFlipped=function(){return this._flipped};
DvtZoomButton.prototype.getButtonState=function(){return this._buttonState};
DvtZoomButton.prototype.processKeyboardEvent=function(a){a=a.keyCode;if(a==DvtKeyboardEvent.ENTER)this._curMenuRendererContents?(a=this._curMenuRendererContents.getChildAt(this._curRendererIdx),a.processClick()):(this.processClick(null),this._curMenuRendererContents=this._menuRenderer.__getContents(),this._curRendererIdx=this._getNextRendererIndex(this._curMenuRendererContents,-1,!0),a=this._curMenuRendererContents.getChildAt(this._curRendererIdx),a.drawOverState());else if(a==DvtKeyboardEvent.UP_ARROW||
a==DvtKeyboardEvent.DOWN_ARROW){var b=a==DvtKeyboardEvent.DOWN_ARROW?!0:!1;a=this._curMenuRendererContents.getChildAt(this._curRendererIdx);a.drawBaseState();this._curRendererIdx=this._getNextRendererIndex(this._curMenuRendererContents,this._curRendererIdx,b);a=this._curMenuRendererContents.getChildAt(this._curRendererIdx);a.drawOverState()}else a==DvtKeyboardEvent.LEFT_ARROW||a==DvtKeyboardEvent.RIGHT_ARROW?(a=a==DvtKeyboardEvent.LEFT_ARROW?!0:!1,DvtAgent.isRightToLeft()&&a||!DvtAgent.isRightToLeft()&&
!a?this._curMenuRendererContents&&(a=this._curMenuRendererContents.getChildAt(this._curRendererIdx),a instanceof DvtZoomSubmenuRenderer&&(this._prevMenuRendererContents=this._curMenuRendererContents,this._prevRendererIdx=this._curRendererIdx,a.showMenu(),this._curMenuRendererContents=a.__getSubmenuRenderer().__getContents(),this._curRendererIdx=this._getNextRendererIndex(this._curMenuRendererContents,-1,!0),a=this._curMenuRendererContents.getChildAt(this._curRendererIdx),a.drawOverState())):this._prevMenuRendererContents&&
this._hideCurrentMenu()):a==DvtKeyboardEvent.ESCAPE&&this._curMenuRendererContents&&this._hideCurrentMenu()};
DvtZoomButton.prototype._hideCurrentMenu=function(){this._curMenuRendererContents=this._prevMenuRendererContents;this._curRendererIdx=this._prevRendererIdx;this._prevMenuRendererContents=null;this._prevRendererIdx=-1;this._curMenuRendererContents?(currentZoomRenderer=this._curMenuRendererContents.getChildAt(this._curRendererIdx),currentZoomRenderer.hideSubmenu(),currentZoomRenderer.drawOverState()):(this._menuRenderer.hideMenu(),this.drawOverState())};
DvtZoomButton.prototype._getNextRendererIndex=function(a,b,c){if(a){var d,e=a.getNumChildren(),f=c?1:-1,g=c?b+1:b-1;for(g;c?g<e:0<=g;g+=f)if(d=a.getChildAt(g),d instanceof DvtZoomSubmenuRenderer||d instanceof DvtZoomMenuItemRenderer&&d.__isEnabled())return g}return b};DvtZoomButton.prototype.getTouchManager=function(){!this._touchManager&&DvtAgent.isTouchDevice()&&(this._touchManager=new DvtTouchManager("_touchManager_zoombutton",this._context));return this._touchManager};
var DvtGraphZoomEvent=function(a,b,c,d){this.Init(a,b,c,d)};DvtObj.createSubclass(DvtGraphZoomEvent,DvtBaseComponentEvent,"DvtGraphZoomEvent");DvtGraphZoomEvent.ZOOM="rangeSliderZoom";DvtGraphZoomEvent.AXIS_ALL=0;DvtGraphZoomEvent.AXIS_X1=1;DvtGraphZoomEvent.AXIS_Y1=2;DvtGraphZoomEvent.AXIS_Y2=3;DvtGraphZoomEvent.ZOOM_IN="Zoom In";DvtGraphZoomEvent.ZOOM_OUT="Zoom Out";DvtGraphZoomEvent.ZOOM_ACTUAL_SIZE="Actual Size";
DvtGraphZoomEvent.prototype.Init=function(a,b,c,d){DvtGraphZoomEvent.superclass.Init.call(this,b);this._axis=a;this._zoomType=b};DvtGraphZoomEvent.prototype.getAxis=function(){return this._axis};DvtGraphZoomEvent.prototype.getZoomType=function(){return this._zoomType};
var DvtZoomMenuItem=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};DvtObj.createSubclass(DvtZoomMenuItem,DvtObj,"DvtZoomMenuItem");DvtZoomMenuItem.prototype.Init=function(a,b,c,d,e,f){this._context=a;this._sLabel=b;this._sEventType=c;this._bEnabled=d;this._bVisible=e;this._id=f;this._userContext=null};DvtZoomMenuItem.prototype.getId=function(){return this._id};DvtZoomMenuItem.prototype.getUserContext=function(){return this._userContext};
DvtZoomMenuItem.prototype.setUserContext=function(a){this._userContext=a};DvtZoomMenuItem.prototype.isEnabled=function(){return this._bEnabled};DvtZoomMenuItem.prototype.setEnabled=function(a){this._bEnabled=a};DvtZoomMenuItem.prototype.getLabel=function(){return this._sLabel};DvtZoomMenuItem.prototype.setLabel=function(a){this._sLabel=a};DvtZoomMenuItem.prototype.getEventType=function(){return this._sEventType};DvtZoomMenuItem.prototype.setEventType=function(a){this._sEventType=a};
DvtZoomMenuItem.prototype.getVisible=function(){return this._bVisible};DvtZoomMenuItem.prototype.setVisible=function(a){this._bVisible=a};
var DvtZoomMenu=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtZoomMenu,DvtZoomMenuItem,"DvtZoomMenu");DvtZoomMenu.HANDLED=0;DvtZoomMenu.SEPARATOR="-";DvtZoomMenu.prototype.Init=function(a,b,c,d,e){DvtZoomMenu.superclass.Init.call(this,a,b,"",c,d,e);this._arMenuItems=[]};DvtZoomMenu.prototype.add=function(a){this._arMenuItems.push(a)};DvtZoomMenu.prototype.addSeparator=function(){this._arMenuItems.push(DvtZoomMenu.SEPARATOR)};DvtZoomMenu.prototype.getArMenuItems=function(){return this._arMenuItems};
var DvtZoomMenuItemRenderer=function(a,b,c,d,e,f,g,h,k){this.Init(a,b,c,d,e,f,g,h,k)};DvtObj.createSubclass(DvtZoomMenuItemRenderer,DvtContainer,"DvtZoomMenuItemRenderer");DvtZoomMenuItemRenderer.PADDING_TOP=2;DvtZoomMenuItemRenderer.PADDING_LEFT=21;DvtZoomMenuItemRenderer.PADDING_RIGHT=7;DvtZoomMenuItemRenderer.FONT_FAMILY="Tahoma";DvtZoomMenuItemRenderer.FONT_SIZE=11;DvtZoomMenuItemRenderer.FONT_COLOR="#000000";DvtZoomMenuItemRenderer.DISABLED_FONT_COLOR="#a2acc7";
DvtZoomMenuItemRenderer.BACKGROUND_COLOR="#ffffff";DvtZoomMenuItemRenderer.BACKGROUND_COLOR_OVER="#c1e6ff";
DvtZoomMenuItemRenderer.prototype.Init=function(a,b,c,d,e,f,g,h,k){this._context=a;k=(new DvtContainer(a,"zoomMenuItemRenderer"+k)).getImpl();DvtZoomMenuItemRenderer.superclass.Init.call(this,a,k);this._w=d;this._h=e;this._zoomMenuRenderer=b;this._item=c;this._flipped=f;this._enabled=c.isEnabled();this._callback=g;this._callbackObj=h;this._bg=new DvtRect(a,0,0,d,e);a=new DvtSolidFill(DvtZoomMenuItemRenderer.BACKGROUND_COLOR,1);this._bg.setFill(a);this.addChild(this._bg);a=c.getLabel();a=new DvtText(this._context,
a,DvtZoomMenuItemRenderer.PADDING_LEFT,DvtZoomMenuItemRenderer.PADDING_TOP);c=c.isEnabled()?new DvtSolidFill(DvtZoomMenuItemRenderer.FONT_COLOR,1):new DvtSolidFill(DvtZoomMenuItemRenderer.DISABLED_FONT_COLOR,1);a.alignBaseline();a.setTranslateY(DvtZoomMenuItemRenderer.FONT_SIZE);a.setFill(c);a.setFontSize(DvtZoomMenuItemRenderer.FONT_SIZE);a.setCursor(DvtSelectionEffectUtils.getSelectingCursor());this.addChild(a);this.drawBaseState();this._enabled&&(DvtAgent.isTouchDevice()?(this.addEvtListener(DvtTouchEvent.TOUCHSTART,
this._touchHandler,!1,this),this.addEvtListener(DvtTouchEvent.TOUCHMOVE,this._touchHandler,!1,this),this.addEvtListener(DvtTouchEvent.TOUCHEND,this._touchHandler,!1,this)):(this.addEvtListener(DvtMouseEvent.MOUSEOUT,this.mouseOutHandler,!1,this),this.addEvtListener(DvtMouseEvent.MOUSEOVER,this.mouseOverHandler,!1,this)));DvtAgent.isTouchDevice()||this.addEvtListener(DvtMouseEvent.CLICK,this.clickHandler,!1,this)};
DvtZoomMenuItemRenderer.prototype.processClick=function(){if(this._enabled){var a=new DvtGraphZoomEvent(this._item.getId(),this._item.getEventType());this._callback.call(this._callbackObj,a);this._callbackObj._isMouseOver=!1;this._callbackObj.resetButton()}};DvtZoomMenuItemRenderer.prototype.clickHandler=function(a){this.processClick();a.stopPropagation()};DvtZoomMenuItemRenderer.prototype.mouseOverHandler=function(a){this.drawOverState()};DvtZoomMenuItemRenderer.prototype.mouseOutHandler=function(a){this.drawBaseState()};
DvtZoomMenuItemRenderer.prototype.drawBaseState=function(){if(this._bg){var a=new DvtSolidFill(DvtZoomMenuItemRenderer.BACKGROUND_COLOR,1);this._bg.setFill(a)}};DvtZoomMenuItemRenderer.prototype.drawOverState=function(){if(this._bg){var a=new DvtSolidFill(DvtZoomMenuItemRenderer.BACKGROUND_COLOR_OVER,1);this._bg.setFill(a)}};
DvtZoomMenuItemRenderer.prototype.immediateTouchAttempted=function(a,b){this.getTouchManager().saveProcessedTouchDefault(b.identifier,this,this,"zoomButton","zoomButton",this);this.drawOverState();a.blockTouchHold()};DvtZoomMenuItemRenderer.prototype.immediateTouchMoved=function(a,b){a.preventDefault()};DvtZoomMenuItemRenderer.prototype.immediateTouchEnded=function(a,b){this.drawBaseState();this.processClick();a.stopPropagation()};
DvtZoomMenuItemRenderer.prototype._touchHandler=function(a){this.getTouchManager().preEventBubble(a);this.getTouchManager().processAssociatedTouchDefault(a,this);this.getTouchManager().postEventBubble(a)};DvtZoomMenuItemRenderer.prototype.__isEnabled=function(){return this._enabled};DvtZoomMenuItemRenderer.prototype.getTouchManager=function(){!this._touchManager&&DvtAgent.isTouchDevice()&&(this._touchManager=new DvtTouchManager("_touchManager_zoomitem",this._context));return this._touchManager};
var DvtZoomMenuRenderer=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};DvtObj.createSubclass(DvtZoomMenuRenderer,DvtContainer,"DvtZoomMenuRenderer");DvtZoomMenuRenderer.PADDING=1;DvtZoomMenuRenderer.SEPARATOR_PADDING=2*DvtZoomMenuRenderer.PADDING;DvtZoomMenuRenderer.MIN_WIDTH=120;DvtZoomMenuRenderer.ITEM_HEIGHT=20;DvtZoomMenuRenderer.SEPARATOR_HEIGHT=3;DvtZoomMenuRenderer.BORDER_COLOR_TOP="#A9B6CB";DvtZoomMenuRenderer.BORDER_COLOR_BOTTOM="#00000A";DvtZoomMenuRenderer.BORDER_COLOR_SIDES="#768092";
DvtZoomMenuRenderer.SEPARATOR_COLOR="#ADB9CD";
DvtZoomMenuRenderer.prototype.Init=function(a,b,c,d,e,f){null==b||null==b.getArMenuItems()?console.log("Null or Empty Menu Received"):(f=(new DvtContainer(a,"zoomMenuRenderer"+f)).getImpl(),DvtZoomMenuRenderer.superclass.Init.call(this,a,f),this._context=a,this._flipped=c,this._callback=d,this._callbackObj=e,this._contents=this._renderMenuContents(b),this._contents.setTranslateX(DvtZoomMenuRenderer.PADDING),this._contents.setTranslateY(DvtZoomMenuRenderer.PADDING),this._w=this._contents.getWidth()+
DvtZoomMenuRenderer.PADDING,this._h=this._contents.getHeight()+2*DvtZoomMenuRenderer.PADDING,this.__bg=new DvtRect(a,0,0,this._w,this._h),a=new DvtSolidFill("#FFFFFF",1),b=new DvtSolidStroke(DvtZoomMenuRenderer.BORDER_COLOR_SIDES,1),this._contents.setFill(a),this._contents.setStroke(b),this.__bg.setFill(a),this.addChild(this.__bg),this.addChild(this._contents),this.setTranslateY(-this._h),DvtAgent.isTouchDevice()?(this.addEvtListener(DvtTouchEvent.TOUCHSTART,this._touchHandler,!1,this),this.addEvtListener(DvtTouchEvent.TOUCHMOVE,
this._touchHandler,!1,this),this.addEvtListener(DvtTouchEvent.TOUCHEND,this._touchHandler,!1,this)):this.addEvtListener(DvtMouseEvent.CLICK,this.clickHandler,!1,this))};
DvtZoomMenuRenderer.prototype.destroy=function(){if(!this._bDestroyed){DvtZoomMenuRenderer.superclass.destroy.call(this);DvtAgent.isTouchDevice()?(this.removeEvtListener(DvtTouchEvent.TOUCHSTART,this._touchHandler),this.removeEvtListener(DvtTouchEvent.TOUCHMOVE,this._touchHandler),this.removeEvtListener(DvtTouchEvent.TOUCHEND,this._touchHandler)):this.removeEvtListener(DvtMouseEvent.CLICK,this.clickHandler);for(var a,b=0;b<this.getNumChildren();b++)a=this.getChildAt(b),a instanceof DvtZoomMenuItemRenderer&&
a.destroy();this.removeChild(this._contents);null!=this.getParent()&&this.getParent().removeChild(this);this._bDestroyed=!0}};
DvtZoomMenuRenderer.prototype._renderMenuContents=function(a){var b=new DvtRect(this._context,0,0),c=a.getArMenuItems();a=DvtZoomMenuRenderer.MIN_WIDTH;for(var d=[],e=0,f=0;f<c.length;f++)if(c[f]==DvtZoomMenu.SEPARATOR)d.push(e+DvtZoomMenuRenderer.SEPARATOR_HEIGHT/2),e+=DvtZoomMenuRenderer.SEPARATOR_HEIGHT;else{var g=c[f],g=g instanceof DvtZoomMenu?new DvtZoomSubmenuRenderer(this._context,this,g,DvtZoomMenuRenderer.MIN_WIDTH,DvtZoomMenuRenderer.ITEM_HEIGHT,this._flipped,this._callback,this._callbackObj):
new DvtZoomMenuItemRenderer(this._context,this,g,DvtZoomMenuRenderer.MIN_WIDTH,DvtZoomMenuRenderer.ITEM_HEIGHT,this._flipped,this._callback,this._callbackObj);g.setTranslateX(0);g.setTranslateY(e);b.addChild(g);e+=DvtZoomMenuRenderer.ITEM_HEIGHT}for(f=0;f<d.length;f++){var c=new DvtRect(this._context,0,d[f]-DvtZoomMenuRenderer.SEPARATOR_HEIGHT/2,DvtZoomMenuItemRenderer.PADDING_LEFT-1,DvtZoomMenuRenderer.SEPARATOR_HEIGHT),g=new DvtLine(this._context,DvtZoomMenuItemRenderer.PADDING_LEFT+DvtZoomMenuRenderer.SEPARATOR_PADDING,
d[f],a,d[f]),h=new DvtSolidFill(DvtZoomMenuItemRenderer.BACKGROUND_COLOR,1),k=new DvtSolidStroke(DvtZoomMenuRenderer.SEPARATOR_COLOR,1);c.setFill(h);g.setStroke(k);b.addChild(c);b.addChild(g)}b.setWidth(a);b.setHeight(e);return b};DvtZoomMenuRenderer.prototype.processClick=function(a){var b=a instanceof DvtDisplayable&&this.contains(a);a=a==this;if(!b)this.hideMenu();else if(a)return this.hideAllSubmenus(),!0;return!1};
DvtZoomMenuRenderer.prototype.clickHandler=function(a){this.processClick(a.target)&&a.stopPropagation()};DvtZoomMenuRenderer.prototype.immediateTouchAttempted=function(a,b){this.getTouchManager().saveProcessedTouchDefault(b.identifier,this,this,"zoomButton","zoomButton",this);a.blockTouchHold()};DvtZoomMenuRenderer.prototype.immediateTouchMoved=function(a,b){a.preventDefault()};DvtZoomMenuRenderer.prototype.immediateTouchEnded=function(a,b){this.processClick(a.target)&&a.stopPropagation()};
DvtZoomMenuRenderer.prototype._touchHandler=function(a){this.getTouchManager().preEventBubble(a);this.getTouchManager().processAssociatedTouchDefault(a,this);this.getTouchManager().postEventBubble(a)};DvtZoomMenuRenderer.prototype.hideMenu=function(){var a=this.getParent();null!=a&&(a instanceof DvtZoomSubmenuRenderer?a.hideSubmenu():a instanceof DvtZoomButton&&a.resetButton());this.destroy()};
DvtZoomMenuRenderer.prototype.hideAllSubmenus=function(){var a=!1;if(null!=this._contents)for(var b,c=0;c<this._contents.getNumChildren();c++)b=this._contents.getChildAt(c),b instanceof DvtZoomSubmenuRenderer&&(b.hideSubmenu(),a=!0);return a};DvtZoomMenuRenderer.prototype.__getContents=function(){return this._contents};
DvtZoomMenuRenderer.prototype.getTouchManager=function(){!this._touchManager&&DvtAgent.isTouchDevice()&&(this._touchManager=new DvtTouchManager("_touchManager_zoommenu",this._context));return this._touchManager};
var DvtZoomSubmenuRenderer=function(a,b,c,d,e,f,g,h,k){this.Init(a,b,c,d,e,f,g,h,k)};DvtObj.createSubclass(DvtZoomSubmenuRenderer,DvtZoomMenuItemRenderer,"DvtZoomSubmenuRenderer");DvtZoomSubmenuRenderer.ARROW_WIDTH=4;DvtZoomSubmenuRenderer.ARROW_HEIGHT=6;DvtZoomSubmenuRenderer.menuDisplayDelay=300;
DvtZoomSubmenuRenderer.prototype.Init=function(a,b,c,d,e,f,g,h,k){DvtZoomSubmenuRenderer.superclass.Init.call(this,a,b,c,d,e,f,g,h,k);this._submenu=c;this._submenuRenderer=null;this._callback=g;this._callbackObj=h;this.drawExpandArrow();DvtAgent.isTouchDevice()&&(DvtZoomSubmenuRenderer.menuDisplayDelay=0);this._menuDisplayTimer=new DvtTimer(a,DvtZoomSubmenuRenderer.menuDisplayDelay,this.onTimer,this,1)};
DvtZoomSubmenuRenderer.prototype.isSubmenuVisible=function(){return null!=this._submenuRenderer?!0:!1};DvtZoomSubmenuRenderer.prototype.destroy=function(){this._menuDisplayTimer=null;null!=this._submenuRenderer&&(this._submenuRenderer.destroy(),this._submenuRenderer=null)};DvtZoomSubmenuRenderer.prototype.hideSubmenu=function(){null!=this._submenuRenderer&&(this._submenuRenderer.destroy(),this._submenuRenderer=null)};
DvtZoomSubmenuRenderer.prototype.showMenu=function(){this._zoomMenuRenderer.hideAllSubmenus(null);this._submenuRenderer=new DvtZoomMenuRenderer(this._context,this._submenu,this._flipped,this._callback,this._callbackObj);this._flipped?this._submenuRenderer.setTranslateX(-this._w-4):this._submenuRenderer.setTranslateX(this._w+1);this._submenuRenderer.setTranslateY(this._h-this._submenuRenderer._h);this.addChild(this._submenuRenderer);var a=45;this._flipped&&(a=135);var b=DvtColorUtils.makeRGBA(0,0,
0,.45),a=new DvtShadow(b,5,7,7,a,1,3,!1,!1,!1);this._submenuRenderer.__bg.addDrawEffect(a)};DvtZoomSubmenuRenderer.prototype.processClick=function(){this._enabled&&(null==this._submenuRenderer?this.showMenu():this.hideSubmenu());this._menuDisplayTimer.stop()};DvtZoomSubmenuRenderer.prototype.clickHandler=function(a){this.processClick();a.stopPropagation()};DvtZoomSubmenuRenderer.prototype.mouseOverHandler=function(a){DvtZoomSubmenuRenderer.superclass.mouseOverHandler.call(this,a);this._menuDisplayTimer.start()};
DvtZoomSubmenuRenderer.prototype.mouseOutHandler=function(a){DvtZoomSubmenuRenderer.superclass.mouseOutHandler.call(this,a);this._menuDisplayTimer.stop()};DvtZoomSubmenuRenderer.prototype.onTimer=function(){null==this._submenuRenderer&&this.showMenu()};DvtZoomSubmenuRenderer.prototype.drawBaseState=function(){DvtZoomSubmenuRenderer.superclass.drawBaseState.call(this);this.drawExpandArrow()};
DvtZoomSubmenuRenderer.prototype.drawOverState=function(){DvtZoomSubmenuRenderer.superclass.drawOverState.call(this);this.drawExpandArrow()};
DvtZoomSubmenuRenderer.prototype.drawExpandArrow=function(){var a=DvtPathUtils.moveTo(-DvtZoomSubmenuRenderer.ARROW_WIDTH/2,-DvtZoomSubmenuRenderer.ARROW_HEIGHT/2)+DvtPathUtils.lineTo(DvtZoomSubmenuRenderer.ARROW_WIDTH/2,0)+DvtPathUtils.lineTo(-DvtZoomSubmenuRenderer.ARROW_WIDTH/2,DvtZoomSubmenuRenderer.ARROW_HEIGHT/2)+DvtPathUtils.lineTo(-DvtZoomSubmenuRenderer.ARROW_WIDTH/2,-DvtZoomSubmenuRenderer.ARROW_HEIGHT/2);DvtPathUtils.closePath();var a=new DvtPath(this._context,a),b=new DvtSolidFill("#000000",
1);a.setFill(b);var b=this._w-5-DvtZoomSubmenuRenderer.ARROW_WIDTH/2,c=this._h/2;this._flipped&&(b=5+DvtZoomSubmenuRenderer.ARROW_WIDTH/2,a.setRotation(Math.PI));a.setTranslateX(b);a.setTranslateY(c);this.addChild(a)};DvtZoomSubmenuRenderer.prototype.__getSubmenuRenderer=function(){return this._submenuRenderer};
var DvtDialIndicator=function(a){this.Init(a)};DvtObj.createSubclass(DvtDialIndicator,DvtPath,"DvtDialIndicator");
DvtDialIndicator.prototype.doInitFx=function(){var a=this._Dlo._Chart.getGaugeData()._curVal,b=this._Dlo._Chart.getGaugeData()._minVal,c=this._Dlo._Chart.getGaugeData()._maxVal;this._Dlo._Chart.getGaugeData();var d=this._Dlo._Chart.getGaugeData()._dialAngleExtent;a<b?a=b:a>c&&(a=c);if(a=Math.abs(a-b)/Math.abs(c-b)*d*(Math.PI/180))b=this.getMatrix().clone(),b.translate(-1*this._xPor,-1*this._yPor),b.rotate(-a),b.translate(this._xPor,this._yPor),this.setMatrix(b),b=this._Dlo._Chart.getAnimation().displayDuration,
b=new DvtAnimator(this.getCtx(),b/1E3),this._setRotationParams(0),b.addProp(DvtAnimator.TYPE_NUMBER,this,this._getRotationParams,this._setRotationParams,a),b.play()};DvtDialIndicator.prototype.init=function(){this._Dlo.setInitFx(!0)};DvtDialIndicator.prototype.Init=function(a){DvtDialIndicator.superclass.Init.call(this,a);this._angle=this._yPor=this._xPor=0};DvtDialIndicator.prototype._getRotationParams=function(){return this._angle};
DvtDialIndicator.prototype._setRotationParams=function(a){var b=this.getMatrix().clone();b.translate(-1*this._xPor,-1*this._yPor);b.rotate(a-this._angle);b.translate(this._xPor,this._yPor);this.setMatrix(b);this._angle=a};
var DvtStatusIndicator=function(a){this.Init(a)};DvtObj.createSubclass(DvtStatusIndicator,DvtPath,"DvtStatusIndicator");
DvtStatusIndicator.prototype.doInitFx=function(){var a=this._Dlo._Chart.getAnimation().displayDuration,b=0,c=this.getCommands(),d=DvtArrayUtils.copy(c);this._Dlo._Chart.isVertical()?"M"===c[0]&&"C"===c[3]&&"L"===c[16]&&"C"===c[19]&&(this._tval=b=c[12]-c[9],this._bVert=!0,d[2]+=b,d[5]+=b,d[7]+=b,d[9]+=b,d[18]+=b,d[21]+=b,d[23]+=b,d[25]+=b,this.setCommands(d)):"L"===c[6]&&"C"===c[9]&&"L"===c[16]&&"C"===c[19]&&(this._tval=b=c[7]-c[4],this._bVert=!1,d[7]-=b,d[10]-=b,d[12]-=b,d[14]-=b,d[17]-=b,d[20]-=
b,d[22]-=b,d[24]-=b,this.setCommands(d));this._aAnimCmds=DvtArrayUtils.copy(d);b&&(a=new DvtAnimator(this.getCtx(),a/1E3),this._setPseudo(0),a.addProp(DvtAnimator.TYPE_NUMBER,this,this._getPseudo,this._setPseudo,b),a.play())};DvtStatusIndicator.prototype.init=function(){this._Dlo.setInitFx(!0)};DvtStatusIndicator.prototype.Init=function(a){DvtStatusIndicator.superclass.Init.call(this,a);this._aAnimCmds=this._aCmds=null};DvtStatusIndicator.prototype._getPseudo=function(){return this._tval};
DvtStatusIndicator.prototype._setPseudo=function(a){var b=this.getCommands(),c=this._aAnimCmds;this._bVert?(b[2]=c[2]-a,b[5]=c[5]-a,b[7]=c[7]-a,b[9]=c[9]-a,b[18]=c[18]-a,b[21]=c[21]-a,b[23]=c[23]-a,b[25]=c[25]-a):(b[7]=c[7]+a,b[10]=c[10]+a,b[12]=c[12]+a,b[14]=c[14]+a,b[17]=c[17]+a,b[20]=c[20]+a,b[22]=c[22]+a,b[24]=c[24]+a);this.setCommands(b);this._tval=a};
var DvtTSGrabber=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtTSGrabber,DvtContainer,"DvtTSGrabber");DvtTSGrabber.WIDTH=8;DvtTSGrabber.HEIGHT=12;DvtTSGrabber.LEFT=1;DvtTSGrabber.RIGHT=2;DvtTSGrabber.prototype.Init=function(a,b){this._ts=a;this._side=b;var c=this.getGrabberBounds(a,b),d=a.getCtx();DvtTSGrabber.superclass.Init.call(this,d,"tsgrabber");this._container=new DvtRect(d,c.x,c.y,c.w,c.h,null);this.addChild(this._container);this._fill=DvtSolidFill.invisibleFill()};
DvtTSGrabber.prototype.getGrabberBounds=function(a,b){var c=this.getGrabberWidth(),d=this.getGrabberHeight(),e=0,e=b==DvtTSGrabber.LEFT?a.getX()-c/2:a.getX()+a.getWidth()-c/2,f=a.getY()+a.getHeight()/2-d/2;return new DvtRectangle(e,f,c,d)};
DvtTSGrabber.prototype.init=function(){this.setFill(this._fill);DvtAgent.isTouchDevice()||(this.addEvtListener(DvtMouseEvent.MOUSEOVER,this.mouseOverHandler,!1,this),this.addEvtListener(DvtMouseEvent.MOUSEOUT,this.mouseOutHandler,!1,this),this.addEvtListener(DvtMouseEvent.MOUSEDOWN,this.mouseDownHandler,!1,this));this._side==DvtTSGrabber.LEFT?this._container.getImpl().getElem().setAttributeNS(null,"cursor","w-resize"):this._side==DvtTSGrabber.RIGHT&&this._container.getImpl().getElem().setAttributeNS(null,
"cursor","e-resize");DvtGraphSysUtils.makeDetObject(this._container);this._container.setPixelHinting(!0);this._container._Dlo.setUseTooltip(!0)};DvtTSGrabber.prototype.getGrabberHeight=function(){return DvtTSGrabber.HEIGHT};DvtTSGrabber.prototype.getGrabberWidth=function(){return DvtTSGrabber.WIDTH};DvtTSGrabber.prototype.getTimeSelector=function(){return this._ts};DvtTSGrabber.prototype.setTimeSelector=function(a){this._ts=a};DvtTSGrabber.prototype.getSide=function(){return this._side};
DvtTSGrabber.prototype.setSide=function(a){this._side=a};DvtTSGrabber.prototype.isPointInside=function(a,b){return a>=this._container.getX()&&a<=this._container.getX()+this._container.getWidth()&&b>=this._container.getY()&&b<=this._container.getY()+this._container.getHeight()};DvtTSGrabber.prototype.mouseOverHandler=function(a){this._Dlo.setTooltip(this._ts.makeTooltipText());this._ts.mouseOverHandler(a)};DvtTSGrabber.prototype.mouseOutHandler=function(a){this._ts.mouseOutHandler(a)};
DvtTSGrabber.prototype.mouseDownHandler=function(a){this._ts.mouseDownHandler(a)};DvtTSGrabber.prototype.getContainer=function(){return this._container};DvtTSGrabber.prototype.setStroke=function(a){this._container.setStroke(a)};DvtTSGrabber.prototype.setSolidStroke=function(a,b,c){this._container.setSolidStroke(a,b,c)};DvtTSGrabber.prototype.setFill=function(a){this._container.setFill(a)};DvtTSGrabber.prototype.setSolidFill=function(a,b){this._container.setSolidFill(a,b)};
DvtTSGrabber.prototype.setX=function(a){this._container.setX(a)};var DvtMobileTSGrabber=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtMobileTSGrabber,DvtTSGrabber,"DvtMobileTSGrabber");DvtMobileTSGrabber.prototype.Init=function(a,b){DvtMobileTSGrabber.superclass.Init.call(this,a,b)};DvtMobileTSGrabber.prototype.isPointInside=function(a,b){return(new DvtRectangle(this._container.getX()-4,this._container.getY(),this._container.getWidth()+8,this._container.getHeight())).containsPoint(a,b)};
DvtMobileTSGrabber.prototype.getGrabberHeight=function(){return 25};DvtMobileTSGrabber.prototype.getGrabberWidth=function(){return 20};
var DvtTimeSelector=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};DvtObj.createSubclass(DvtTimeSelector,DvtContainer,"DvtTimeSelector");DvtTimeSelector.TOK_X="__X__";DvtTimeSelector.TOK_Y="__Y__";DvtTimeSelector.TOK_STARTDATE="__START_DATE__";DvtTimeSelector.TOK_ENDDATE="__END_DATE__";
DvtTimeSelector.prototype.init=function(){this._pxRatio=(this._timeAxisEndDate-this._timeAxisStartDate)/(this._timeAxisEndPixel-this._timeAxisStartPixel);var a=this.getLPos(),b=this.getRPos();a<this._timeAxisStartPixel&&this._container.setX(this._timeAxisStartPixel);b>this._timeAxisEndPixel&&this._container.setWidth(this._timeAxisEndPixel-this.getX());0>=this.getWidth()&&this._container.setWidth(1);this._timeAxis=new DvtTimeAxis(this._timeAxisStartDate,this._timeAxisEndDate,this._timeAxisStartPixel,
this._timeAxisEndPixel,300,10,this._aTimeAxisMonths,this._timeZoneOffset,!0);DvtAgent.isTouchDevice()?(this._Dlo._Chart.addEvtListener(DvtTouchEvent.TOUCHSTART,this._touchHandler,!1,this),this._Dlo._Chart.addEvtListener(DvtTouchEvent.TOUCHMOVE,this._touchHandler,!1,this),this._Dlo._Chart.addEvtListener(DvtTouchEvent.TOUCHEND,this._touchHandler,!1,this)):(this.addEvtListener(DvtMouseEvent.MOUSEOVER,this.mouseOverHandler,!1,this),this.addEvtListener(DvtMouseEvent.MOUSEOUT,this.mouseOutHandler,!1,this),
this.addEvtListener(DvtMouseEvent.MOUSEDOWN,this.mouseDownHandler,!1,this));this._grabberLeft=this.createGrabber(DvtTSGrabber.LEFT);this._grabberRight=this.createGrabber(DvtTSGrabber.RIGHT);this._grabberLeft.setStroke(this.getStroke());this._grabberRight.setStroke(this.getStroke());this._grabberLeft.setVisible(!1);this._grabberRight.setVisible(!1);this._grabberLeft.init();this._grabberRight.init();this._container.addChild(this._grabberLeft);this._container.addChild(this._grabberRight);this.addChild(this._container);
DvtAgent.isTouchDevice()&&this._showSelection();this._container.setPixelHinting(!0);DvtGraphSysUtils.makeDetObject(this._container);this._container._Dlo.setTooltip(this.makeTooltipText());this._standardStroke=this.getStroke();this._selectStroke=this._standardStroke.clone();this._selectStroke.setWidth(2)};DvtTimeSelector.prototype.createGrabber=function(a){var b=null,b=DvtAgent.isTouchDevice()?new DvtMobileTSGrabber(this,a):new DvtTSGrabber(this,a);DvtGraphSysUtils.makeDetObject(b);return b};
DvtTimeSelector.prototype.Init=function(a,b,c,d,e,f){DvtTimeSelector.superclass.Init.call(this,a,"timeselector");this._container=new DvtRect(a,b,c,d,e,f);this._timeAxisEndPixel=this._timeAxisStartPixel=this._timeAxisEndDate=this._timeAxisStartDate=0;this._aTimeAxisMonths=null;this._timeZoneOffset=0;this._timeAxis=this._translatedEnd=this._translatedStart=this._timeSelectorEventJs=this._timeAxisEventJs=null;this._pxRatio=0;this._grabberRight=this._grabberLeft=null;this._isDragging=this._isMouseOver=
!1;this._origRPos=this._origLPos=this._dragY=this._dragX=-1;this._overTarget=this._dragTarget=0;this._selectStroke=this._standardStroke=null;this._targets={};this._dragXMap={};this._dragItems=[]};DvtTimeSelector.prototype.getTimeAxisStartDate=function(){return this._timeAxisStartDate};DvtTimeSelector.prototype.setTimeAxisStartDate=function(a){this._timeAxisStartDate=a};DvtTimeSelector.prototype.getTimeAxisEndDate=function(){return this._timeAxisEndDate};
DvtTimeSelector.prototype.setTimeAxisEndDate=function(a){this._timeAxisEndDate=a};DvtTimeSelector.prototype.getTimeAxisStartPixel=function(){return this._timeAxisStartPixel};DvtTimeSelector.prototype.setTimeAxisStartPixel=function(a){this._timeAxisStartPixel=a};DvtTimeSelector.prototype.getTimeAxisEndPixel=function(){return this._timeAxisEndPixel};DvtTimeSelector.prototype.setTimeAxisEndPixel=function(a){this._timeAxisEndPixel=a};DvtTimeSelector.prototype.getTimeAxisMonths=function(){return this._aTimeAxisMonths};
DvtTimeSelector.prototype.setTimeAxisMonths=function(a){this._aTimeAxisMonths=a};DvtTimeSelector.prototype.getTimeZoneOffset=function(){return this._timeZoneOffset};DvtTimeSelector.prototype.setTimeZoneOffset=function(a){this._timeZoneOffset=a};DvtTimeSelector.prototype.getTimeAxisEventJs=function(){return this._timeAxisEventJs};DvtTimeSelector.prototype.setTimeAxisEventJs=function(a){this._timeAxisEventJs=a};DvtTimeSelector.prototype.getTimeSelectorEventJs=function(){return this._timeSelectorEventJs};
DvtTimeSelector.prototype.setTimeSelectorEventJs=function(a){this._timeSelectorEventJs=a};DvtTimeSelector.prototype.getTranslatedStart=function(){return this._translatedStart};DvtTimeSelector.prototype.setTranslatedStart=function(a){this._translatedStart=a};DvtTimeSelector.prototype.getTranslatedEnd=function(){return this._translatedEnd};DvtTimeSelector.prototype.setTranslatedEnd=function(a){this._translatedEnd=a};
DvtTimeSelector.prototype.isPointInside=function(a,b){return a>=this.getX()&&a<=this.getX()+this.getWidth()&&b>=this.getY()&&b<=this.getY()+this.getHeight()};DvtTimeSelector.prototype._getMouseTarget=function(a,b){var c=0;if(this._isMouseOver||this._isDragging)this._grabberLeft.isPointInside(a,b)?c=2:this._grabberRight.isPointInside(a,b)&&(c=3);0==c&&this.isPointInside(a,b)&&(c=1);return c};
DvtTimeSelector.prototype.mouseOverHandler=function(a){a=this.getCtx().getRelativePosition(a.pageX,a.pageY);a=this._getMouseTarget(a.x,a.y);this._isDragging?0<a&&(this._isMouseOver=!0):0==a||this._isMouseOver&&this._overTarget==a||(this._isMouseOver=!0,this._overTarget=a,1==a&&this._container.setCursor("move"),this._showSelection(a))};
DvtTimeSelector.prototype.mouseOutHandler=function(a){a=this.getCtx().getRelativePosition(a.pageX,a.pageY);a=this._getMouseTarget(a.x,a.y);this._isDragging?(0==a&&(this._isMouseOver=!1),this._overTarget=0):0==a&&0!=this._isMouseOver&&(this._isMouseOver=!1,this._container.setCursor("default"),this._hideSelection())};DvtTimeSelector.prototype._touchHandler=function(a){this._isMouseOver=!0;this.getTouchManager().processAssociatedTouchDefault(a,this)};
DvtTimeSelector.prototype.immediateTouchAttempted=function(a,b){var c=this.getCtx().getRelativePosition(b.pageX,b.pageY),d=c.x,c=c.y,e=this._getMouseTarget(d,c),f=!0;if(0!=e){for(var g=0;g<this._dragItems.length;g++){var h=this._targets[this._dragItems[g]];1==h?f=!1:1<h&&1==e&&(f=!1);h==e&&(f=!1)}f&&(this._dragItems.push(b.identifier),this._targets[b.identifier]=e,this._dragXMap[b.identifier]=d,this._dragStart(e,d,c),this.getTouchManager().saveProcessedTouchDefault(b.identifier,this,this._container,
"timeselector","timeselector"+e,this),a.blockTouchHold())}};DvtTimeSelector.prototype.immediateTouchMoved=function(a,b){var c=this.getCtx().getRelativePosition(b.pageX,b.pageY),d=c.x,c=c.y,e=this._getMouseTarget(d,c);a.preventDefault();if(0!=this._isDragging&&(e=this._targets[b.identifier],null!=e&&0<e)){for(var f=a.touches,g=0;g<this._dragItems.length;g++)for(var h=0;h<f.length;h++);f=this._dragXMap[b.identifier];this._dragTarget=e;this._dragX=f;this._dragMove(d,c)}};
DvtTimeSelector.prototype.immediateTouchEnded=function(a,b){var c=this.getCtx().getRelativePosition(b.pageX,b.pageY),d=c.x,c=c.y;this._getMouseTarget(d,c);if(0!=this._isDragging){var e=DvtArrayUtils.getIndex(this._dragItems,b.identifier);-1!=e&&(this._dragItems.splice(e,1),this._targets[b.identifier]=null,this._dragXMap[b.identifier]=null,this.getTouchManager().removeTooltipInfo(b.identifier));0==this._dragItems.length&&(this._dragItems=[],this._dragEnd(d,c),this._targets={},this._dragXMap={})}};
DvtTimeSelector.prototype.mouseDownHandler=function(a){var b=this.getCtx().getRelativePosition(a.pageX,a.pageY),c=b.x,b=b.y,d=this._getMouseTarget(c,b);this._dragStart(d,c,b);a&&a.preventDefault();this._Dlo._Chart.addEvtListener(DvtMouseEvent.MOUSEMOVE,this.mouseMoveHandler,!1,this);this._Dlo._Chart.addEvtListener(DvtMouseEvent.MOUSEUP,this.mouseUpHandler,!1,this)};
DvtTimeSelector.prototype.mouseUpHandler=function(a){this._Dlo._Chart.removeEvtListener(DvtMouseEvent.MOUSEMOVE,this.mouseMoveHandler,!1,this);this._Dlo._Chart.removeEvtListener(DvtMouseEvent.MOUSEUP,this.mouseUpHandler,!1,this);var b=this.getCtx().getRelativePosition(a.pageX,a.pageY);this._dragEnd(b.x,b.y);0==this._isMouseOver&&this._hideSelection();a&&a.preventDefault()};
DvtTimeSelector.prototype.mouseMoveHandler=function(a){if(0!=this._isDragging){var b=this.getCtx().getRelativePosition(a.pageX,a.pageY);this._dragMove(b.x,b.y);a&&a.preventDefault()}};
DvtTimeSelector.prototype._showSelection=function(a){1==a?(this.setStroke(this._selectStroke),this._grabberLeft.setStroke(this._standardStroke),this._grabberRight.setStroke(this._standardStroke)):2==a?(this.setStroke(this._standardStroke),this._grabberLeft.setStroke(this._selectStroke),this._grabberRight.setStroke(this._standardStroke)):3==a&&(this.setStroke(this._standardStroke),this._grabberLeft.setStroke(this._standardStroke),this._grabberRight.setStroke(this._selectStroke));this._grabberLeft.setVisible(!0);
this._grabberRight.setVisible(!0)};DvtTimeSelector.prototype._hideSelection=function(){this.setStroke(this._standardStroke);this._grabberLeft.setStroke(this._standardStroke);this._grabberRight.setStroke(this._standardStroke);this._grabberLeft.setVisible(!1);this._grabberRight.setVisible(!1)};DvtTimeSelector.prototype._dragStart=function(a,b,c){this._isDragging||(this._isDragging=!0,this._dragX=b,this._origLPos=this.getLPos(),this._origRPos=this.getRPos(),this._dragTarget=a)};
DvtTimeSelector.prototype._dragEnd=function(a,b){if(0!=this._isDragging&&(this._isDragging=!1,this._dragX=-1,this._dragTarget=0,(this._origLPos!=this.getLPos()||this._origRPos!=this.getRPos())&&this._timeSelectorEventJs&&0<this._timeSelectorEventJs.length)){var c=this._timeAxisStartDate+(this.getLPos()-this._timeAxisStartPixel)*this._pxRatio,d=this._timeAxisEndDate-(this._timeAxisEndPixel-this.getRPos())*this._pxRatio,e=new Date,f=new Date;e.setTime(c);f.setTime(d);c=this._timeSelectorEventJs.replace(DvtTimeSelector.TOK_X,
a).replace(DvtTimeSelector.TOK_Y,b).replace(DvtTimeSelector.TOK_STARTDATE,e.getTime()).replace(DvtTimeSelector.TOK_ENDDATE,f.getTime()).match(/'(.*?)'/g)[0].replace(/\'/g,"");AdfPage.PAGE.findComponent(c).getPeer().sendToServerPPR3({source:c,event:"bi_gtse",bi_gtsS:e.getTime(),bi_gtsE:f.getTime()})}};
DvtTimeSelector.prototype._dragMove=function(a,b){if(0!=this._isDragging){var c=a-this._dragX,d=this.getLPos(),e=Math.floor(this.getWidth()),f=this._grabberLeft.getGrabberWidth();1==this._dragTarget?(d=this._origLPos+c,d<this._timeAxisStartPixel&&(d=this._timeAxisStartPixel),d+Math.floor(this.getWidth())>this._timeAxisEndPixel&&(d=this._timeAxisEndPixel-Math.floor(this.getWidth()))):2==this._dragTarget?(d=this._origLPos+c,d<this._timeAxisStartPixel&&(d=this._timeAxisStartPixel),d>this.getRPos()-0&&
(d=this.getRPos()-0),e=this.getRPos()-d):3==this._dragTarget&&(c=this._origRPos+c,c<this.getLPos()+0&&(c=this.getLPos()+0),c>this._timeAxisEndPixel&&(c=this._timeAxisEndPixel),e=c-this.getLPos());0==e&&(e=1);this._container.setX(d);this._container.setWidth(e);c=d-f/2;d=d+Math.floor(this.getWidth())-f/2;this._grabberLeft.setX(c);this._grabberRight.setX(d);d=this.makeTooltipText();this._container._Dlo.setTooltip(d);this._grabberLeft.getContainer()._Dlo.setTooltip(d);this._grabberRight.getContainer()._Dlo.setTooltip(d)}};
DvtTimeSelector.prototype.getLPos=function(){return this.getX()};DvtTimeSelector.prototype.getRPos=function(){return this.getX()+Math.floor(this.getWidth())};DvtTimeSelector.prototype.makeTooltipText=function(){var a=this.getRPos()-this.getLPos();DvtAgent.isRightToLeft()&&(a=this.getLPos()-this.getRPos());var b=this._timeAxis.getLabelAt(this.getLPos(),a),a=this._timeAxis.getLabelAt(this.getRPos(),-a);return DvtAgent.isRightToLeft()?a+" - "+b:b+" - "+a};DvtTimeSelector.prototype.getStroke=function(){return this._container.getStroke()};
DvtTimeSelector.prototype.setStroke=function(a){this._container.setStroke(a)};DvtTimeSelector.prototype.setSolidStroke=function(a,b,c){this._container.setSolidStroke(a,b,c)};DvtTimeSelector.prototype.setFill=function(a){this._container.setFill(a)};DvtTimeSelector.prototype.setSolidFill=function(a,b){this._container.setSolidFill(a,b)};DvtTimeSelector.prototype.getX=function(){return this._container.getX()};DvtTimeSelector.prototype.getY=function(){return this._container.getY()};
DvtTimeSelector.prototype.getWidth=function(){return this._container.getWidth()};DvtTimeSelector.prototype.getHeight=function(){return this._container.getHeight()};DvtTimeSelector.prototype.getTouchManager=function(){return this._touchManager};DvtTimeSelector.prototype.setTouchManager=function(a){this._touchManager=a};
var DvtDataCursor=function(a,b){this.Init(a,b)};DvtObj.createSubclass(DvtDataCursor,DvtContainer,"DvtDataCursor");DvtDataCursor.DEFAULT_BACKGROUND_COLOR="#ffffff";DvtDataCursor.BEHAVIOR_SNAP="SNAP";DvtDataCursor.BEHAVIOR_SMOOTH="SMOOTH";DvtDataCursor.BEHAVIOR_AUTO="AUTO";DvtDataCursor._CURSOR_LINE_WIDTH=2;DvtDataCursor._DATATIP_BORDER_WIDTH=2;DvtDataCursor._DATATIP_TEXT_PADDING=2;DvtDataCursor._MARKER_SIZE_OUTER=16;DvtDataCursor._MARKER_SIZE_MIDDLE=12;DvtDataCursor._MARKER_SIZE_INNER=8;
DvtDataCursor.prototype.Init=function(a,b){DvtDataCursor.superclass.Init.call(this,a);this._bHoriz=b;this.setMouseEnabled(!1);this.setVisible(!1);b?(this._cursorLineRect=new DvtRect(this.getCtx(),0,0,0,DvtDataCursor._CURSOR_LINE_WIDTH,"dcLine"),this._cursorLineRect.setTranslateY(-DvtDataCursor._CURSOR_LINE_WIDTH/2)):(this._cursorLineRect=new DvtRect(this.getCtx(),0,0,DvtDataCursor._CURSOR_LINE_WIDTH,0,"dcLine"),this._cursorLineRect.setTranslateX(-DvtDataCursor._CURSOR_LINE_WIDTH/2));this._cursorLineRect.setSolidFill("black");
this._cursorLineRect.setMouseEnabled(!1);this.addChild(this._cursorLineRect);this._marker=new DvtContainer(this._context,"dotContainer");this._marker.setMouseEnabled(!1);this.addChild(this._marker);var c=new DvtMarker(this._context,DvtMarker.CIRCLE,null,0,0,DvtDataCursor._MARKER_SIZE_OUTER,DvtDataCursor._MARKER_SIZE_OUTER);c.setTranslateX(-DvtDataCursor._MARKER_SIZE_OUTER/2);c.setTranslateY(-DvtDataCursor._MARKER_SIZE_OUTER/2);c.setSolidFill("black");c.setMouseEnabled(!1);this._marker.addChild(c);
c=new DvtMarker(this._context,DvtMarker.CIRCLE,null,0,0,DvtDataCursor._MARKER_SIZE_MIDDLE,DvtDataCursor._MARKER_SIZE_MIDDLE);c.setTranslateX(-DvtDataCursor._MARKER_SIZE_MIDDLE/2);c.setTranslateY(-DvtDataCursor._MARKER_SIZE_MIDDLE/2);c.setSolidFill("white");c.setMouseEnabled(!1);this._marker.addChild(c);this._markerInnerCircle=new DvtMarker(this._context,DvtMarker.CIRCLE,null,0,0,DvtDataCursor._MARKER_SIZE_INNER,DvtDataCursor._MARKER_SIZE_INNER);this._markerInnerCircle.setTranslateX(-DvtDataCursor._MARKER_SIZE_INNER/
2);this._markerInnerCircle.setTranslateY(-DvtDataCursor._MARKER_SIZE_INNER/2);this._markerInnerCircle.setMouseEnabled(!1);this._marker.addChild(this._markerInnerCircle)};
DvtDataCursor.prototype.render=function(a,b,c,d,e,f){var g=this.isHorizontal(),h=DvtAgent.isRightToLeft(this.getCtx()),k=DvtSvgDocumentUtils.getStageAbsolutePosition(this.getCtx().getStage()),m=this.getCtx().getTooltipManager();m.showDatatip(b+k.x,c+k.y,e,f,!1);e=m.getTooltipBounds();var n,p;g?(n=h?a.x-.75*e.w:a.x+a.w-e.w/4,p=c-e.h/2,!h&&n-b<DvtDataCursor._MARKER_SIZE_OUTER?n=b+DvtDataCursor._MARKER_SIZE_OUTER:h&&b-(n+e.w)<DvtDataCursor._MARKER_SIZE_OUTER&&(n=b-DvtDataCursor._MARKER_SIZE_OUTER-e.w)):
(n=d-e.w/2,p=a.y-.75*e.h,c-(p+e.h)<DvtDataCursor._MARKER_SIZE_OUTER&&(p=c-DvtDataCursor._MARKER_SIZE_OUTER-e.h));m.positionTip(n+k.x,p+k.y);e=m.getTooltipBounds();n=e.x-k.x;p=e.y-k.y;this._markerInnerCircle.setSolidFill(f);g?(this.setTranslateX(a.x),this.setTranslateY(d),this._marker.setTranslateX(b-a.x),this._marker.setTranslateY(c-d),this._cursorLineRect.setWidth(Math.max(n+DvtDataCursor._DATATIP_BORDER_WIDTH/2-a.x,0)),h&&(b=n+e.w+DvtDataCursor._DATATIP_BORDER_WIDTH/2-a.x,this._cursorLineRect.setX(b),
this._cursorLineRect.setWidth(Math.max(a.w-b,0)))):(this.setTranslateX(d),this.setTranslateY(a.y+DvtDataCursor._DATATIP_BORDER_WIDTH/2),this._marker.setTranslateX(b-d),this._marker.setTranslateY(c-a.y),this._cursorLineRect.setTranslateY(p+e.h-(a.y+DvtDataCursor._DATATIP_BORDER_WIDTH/2)),this._cursorLineRect.setHeight(Math.max(a.y+a.h-p-e.h,0)))};DvtDataCursor.prototype.isHorizontal=function(){return this._bHoriz};DvtDataCursor.prototype.setFont=function(a){a&&(this._font=a)};
DvtDataCursor.prototype.setLineColor=function(a){this._cursorLineRect.setSolidFill(a)};DvtDataCursor.prototype.setTooltipFill=function(a){};DvtDataCursor.prototype.getBehavior=function(){return this._behavior?this._behavior:DvtDataCursor.BEHAVIOR_AUTO};DvtDataCursor.prototype.setBehavior=function(a){this._behavior=a};
var DvtLegendSelector=function(a){this._context=a;this._y=this._x=0;this._height=this._width=10;DvtLegendSelector.superclass.Init.call(this,a,"legendselector");this._container=new DvtRect(a,0,0,this._width,this._height)};DvtObj.createSubclass(DvtLegendSelector,DvtContainer,"DvtLegendSelector");
DvtLegendSelector.prototype.Render=function(){this._container&&this.removeChild(this._container);this._pointer&&this._container.removeChild(this._pointer);var a=this._x,b=this._y,a=DvtPathUtils.moveTo(a,b)+DvtPathUtils.lineTo(a+10,b-5)+DvtPathUtils.lineTo(a+10,b+5)+DvtPathUtils.closePath(),a=new DvtPath(this._context,a),b=new DvtSolidFill("rgb(193, 194, 211)",1);a.setFill(b);this._pointer=a;this._container.addChild(a);this.addChild(this._container)};
DvtLegendSelector.prototype.setX=function(a){this._x=a};DvtLegendSelector.prototype.setY=function(a){this._y=a};DvtLegendSelector.prototype.getX=function(){return this._x};DvtLegendSelector.prototype.getY=function(){return this._y};
var DvtGraphDetLine=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};DvtObj.createSubclass(DvtGraphDetLine,DvtLine,"DvtGraphDetLine");DvtGraphDetLine.prototype.Init=function(a,b,c,d,e,f){DvtGraphDetLine.superclass.Init.call(this,a,b,c,d,e,f);this._bSelecting=this._bSelected=!1;this._dataColor="#000000";this._selHighlightLine=this._relatedDetObjects=this._savedStroke=null};
DvtGraphDetLine.prototype.init=function(){var a=this._Dlo;this._dataColor=a.getChart().getSeriesColor(a.getSeriesIndex());a.isSelectable()&&(a=this.getStroke(),a instanceof DvtGradientFill?this._dataColor=a.getColors()[0]:a instanceof DvtSolidStroke&&(this._dataColor=a.getColor()),this.setCursor(DvtSelectionEffectUtils.getSelectingCursor()))};
DvtGraphDetLine.prototype.ApplySelectionState=function(){if(this._bSelected){var a=-(this.getStroke().getWidth()/2);-2>a&&(a=-2);var a=new DvtLine(this.getCtx(),this.getX1()+a,this.getY1()+a,this.getX2()+a,this.getY2()+a),b=DvtSelectionEffectUtils.createSelectingStroke(this._dataColor);this.getStroke()&&b.setWidth(this.getStroke().getWidth());a.setStroke(b);a.setMouseEnabled(!1);this._selHighlightLine=a;this.addChild(a);this._bSelecting&&(b=this._savedStroke,this.setStroke(b))}else this._selHighlightLine&&
(this.removeChild(this._selHighlightLine),this._selHighlightLine=null)};DvtGraphDetLine.prototype.ApplySelectingState=function(){var a;this._bSelected||(this._bSelecting?(a=DvtSelectionEffectUtils.createSelectingStroke(this._dataColor),this.getStroke()&&a.setWidth(this.getStroke().getWidth()),this._savedStroke=this.getStroke()):(a=this._savedStroke,this._savedStroke=null),this.setStroke(a))};DvtGraphDetLine.prototype.showHoverEffect=function(){this.SetSelectionMouseOver(!0)};
DvtGraphDetLine.prototype.hideHoverEffect=function(){this.SetSelectionMouseOver(!1)};DvtGraphDetLine.prototype.isHoverEffectShown=function(){return this._bSelecting};DvtGraphDetLine.prototype.SetSelectionMouseOver=function(a){this.SetSelectionMouseOverSelf(a);if(this._relatedDetObjects)for(var b=0;b<this._relatedDetObjects.length;b++)this._relatedDetObjects[b].SetSelectionMouseOverSelf&&this._relatedDetObjects[b].SetSelectionMouseOverSelf(a)};
DvtGraphDetLine.prototype.SetSelectionMouseOverSelf=function(a){if(this._bSelecting!=a){var b=this._Dlo.getObjId(),b=this.IsShowSelectionFeedbackObjId(b);this._bSelecting=a;b&&this.ApplySelectingState()}};DvtGraphDetLine.prototype.isSelected=function(){return this._bSelected};DvtGraphDetLine.prototype.setSelected=function(a){this.SetSelectedSelf(a);if(this._relatedDetObjects)for(var b=0;b<this._relatedDetObjects.length;b++)this._relatedDetObjects[b].SetSelectedSelf&&this._relatedDetObjects[b].SetSelectedSelf(a)};
DvtGraphDetLine.prototype.SetSelectedSelf=function(a){if(this._bSelected!=a){var b=this._Dlo.getObjId(),b=this.IsShowSelectionFeedbackObjId(b);this._bSelected=a;b&&this.ApplySelectionState()}};DvtGraphDetLine.prototype.IsShowSelectionFeedbackObjId=function(a){return a!==DvtGraphObjType.STOCK_HIGH_LINE&&a!==DvtGraphObjType.STOCK_LOW_LINE};DvtGraphDetLine.prototype.addRelatedObject=function(a){this._relatedDetObjects||(this._relatedDetObjects=[]);this._relatedDetObjects.push(a)};
var DvtGraphDetPolygon=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtGraphDetPolygon,DvtGraphSelectablePolygon,"DvtGraphDetPolygon");DvtGraphDetPolygon.prototype.Init=function(a,b,c){DvtGraphDetPolygon.superclass.Init.call(this,a,b,c);this._3DBar=null};DvtGraphDetPolygon.prototype.showHoverEffect=function(){this._3DBar?this._3DBar.showHoverEffect():this.SetSelectionMouseOver(!0)};DvtGraphDetPolygon.prototype.hideHoverEffect=function(){this._3DBar?this._3DBar.hideHoverEffect():this.SetSelectionMouseOver(!1)};
DvtGraphDetPolygon.prototype.isHoverEffectShown=function(){return this._3DBar?this._3DBar.isHoverEffectShown():this._bSelecting};DvtGraphDetPolygon.prototype.isSelected=function(){return this._3DBar?this._3DBar.isSelected():this._bSelected};DvtGraphDetPolygon.prototype.setSelected=function(a){this._3DBar?this._3DBar.setSelected(a):this.setSelected(a)};DvtGraphDetPolygon.prototype.set3DBar=function(a){this._3DBar=a};
var DvtGraphMarqueePanel=function(a){this.Init(a)};DvtObj.createSubclass(DvtGraphMarqueePanel,DvtContainer,"DvtGraphMarqueePanel");DvtGraphMarqueePanel.DEFAULT_BACKGROUND_COLOR="#ffffff";
DvtGraphMarqueePanel.prototype.Init=function(a){this.getImpl()||this.setImpl(a.getImplFactory().newContainer("marqueepanel"));this._backgroundFill=new DvtSolidFill(DvtGraphMarqueePanel.DEFAULT_BACKGROUND_COLOR,.6);this._panelHeight=this._panelWidth=100;a=new DvtRect(a,0,0,this._panelWidth,this._panelHeight);a.setFill(this._backgroundFill);this._rect=a;this.addChild(a);this.setMouseEnabled(!1);a.setMouseEnabled(!1);this.setBandAttributes(1,"orange")};
DvtGraphMarqueePanel.prototype.Render=function(){this._rect.setWidth(this._panelWidth);this._rect.setHeight(this._panelHeight)};DvtGraphMarqueePanel.prototype.setPanelSize=function(a,b){this._panelWidth=a;this._panelHeight=b};DvtGraphMarqueePanel.prototype.setBandAttributes=function(a,b){this.m_iBandWidth=a;this.m_iBandColor=b;var c=new DvtSolidStroke(this.m_iBandColor,1,this.m_iBandWidth);this._rect.setStroke(c)};
var DvtDataChangeManager=function(a){this._Init(a)};DvtObj.createSubclass(DvtDataChangeManager,DvtObj,"DvtDataChangeManager");
DvtDataChangeManager.prototype._buildAnimLists=function(a,b,c,d){var e,f,g,h,k,m,n,p,q;k=b.getRisers();q=a;for(e=0;2>e;e++){if(k)for(n=k.length,f=0;f<n;f++)if(m=k[f])for(p=m.length,g=0;g<p;g++)(h=m[g]._Dlo._DCHandler)&&q.push(h);k=d.getRisers();q=c}if(b.isGauge()&&d.isGauge()){q=b.getDLOs();f=d.getDLOs();for(e=0;e<q.length;e++)(h=q[e]._DCHandler)&&a.push(h);for(e=0;e<f.length;e++)(h=f[e]._DCHandler)&&c.push(h)}b.isPie()&&d.isPie()&&(e=b.__getPieChart(),h=d.__getPieChart(),e&&h&&(a.push(e),c.push(h)));
this._isY1AxisScaleChange()&&this._buildY1AxisAnimation();b=b.getXAxis();q=a;for(e=0;2>e;e++){if(b&&(k=b.getLabels()))for(arLen=k.length,f=0;f<arLen;f++)(h=k[f]._Dlo._DCHandler)&&q.push(h);b=d.getXAxis();q=c}};
DvtDataChangeManager.prototype._buildY1AxisAnimation=function(){var a=this._graph.getCtx(),b=this._newChart.getAnimation().dataChangeDuration/1E3,c=new DvtContainer(a,"YDelTainer"),d=new DvtDataAnimationHandler(a,c),e,f;this._Y1DelContainer=c;var g=this._oldChart.getY1Axis();if(g&&(ar=g.getGridLines()))for(Y1AxisIndex=g.getAxisLine(),arLen=ar.length,i=0;i<arLen;i++)f=ar[i],c.addChild(f),e=new DvtAnimFadeOut(a,f,b),d.add(e,0);if(g&&(ar=g.getLabels()))for(arLen=ar.length,i=0;i<arLen;i++)f=ar[i],c.addChild(f),
e=new DvtAnimFadeOut(a,f,b),d.add(e,0);if(g=this._newChart.getY1Axis())if(ar=g.getGridLines())for(arLen=ar.length,i=0;i<arLen;i++)f=ar[i],e=new DvtAnimFadeIn(a,f,b),d.add(e,0);var h,k;if(g&&(ar=g.getLabels()))for(arLen=ar.length,i=0;i<arLen;i++)f=ar[i],c=f.getX(),g=f.getY(),k=f.getAlpha(),0===i&&(h=g),e=new DvtCustomAnimation(a,this,b),e.getAnimator().addProp(DvtAnimator.TYPE_NUMBER,f,f.getX,f.setX,c),e.getAnimator().addProp(DvtAnimator.TYPE_NUMBER,f,f.getY,f.setY,g),e.getAnimator().addProp(DvtAnimator.TYPE_NUMBER,
f,f.getAlpha,f.setAlpha,k),d.add(e,0),f.setY(h),f.setAlpha(0);this._Y1Animation=d.getAnimation();this._Y1Animation.setOnEnd(this._onY1End,this)};DvtDataChangeManager.prototype._onY1End=function(){0<this._Y1DelContainer.getNumChildren()&&(this._newChart.removeChild(this._Y1DelContainer),this._Y1DelContainer.destroy());this._Y1DelContainer=null};
DvtDataChangeManager.prototype._canAnimate=function(){var a=this._oldChart,b=this._newChart;return a&&b&&a.getType()===b.getType()&&a.is3D()===b.is3D()&&(a.isGauge()||b.isGauge()||"PIE"==a.getType()||null!==a.getRisers()&&null!==b.getRisers())?0<=a.getType().indexOf("BUBBLE")||0<=a.getType().indexOf("SCATTER")||0<=a.getType().indexOf("LINE")||0<=a.getType().indexOf("AREA")||0<=a.getType().indexOf("COMBINATION")||0<=a.getType().indexOf("BAR")||0<=a.getType().indexOf("STATUSMETER")||0<=a.getType().indexOf("DIAL")||
"PIE"===a.getType():!1};DvtDataChangeManager.prototype._clear=function(){this._bAnimating=!1;this._Y1Animation=this._Y1DelContainer=this._delContainer=this._newChart=this._oldChart=null};
DvtDataChangeManager.prototype.handleDataChange=function(a,b,c){this._oldChart=a;this._newChart=b;if(!this._canAnimate())return!1;this._animation&&(this._animation.stop(),this._animation=null);c=[];var d=[];this._buildAnimLists(c,a,d,b);var e=this._graph.getCtx();this._delContainer=new DvtContainer(e,"DelTainer");e=new DvtDataAnimationHandler(e,this._delContainer);e.constructAnimation(c,d);c=e.getNumPlayables();0<c&&(this._animation=e.getAnimation(),this._animation.setOnEnd(this._onEnd,this));this._graph.addChild(b);
b.render();if(0<c){if(0<this._delContainer.getNumChildren()){var d=this._newChart.getRisers().slice(0),f;if(d){for(;!f;)f=d.shift();f=f[0];f=this._newChart.getChildIndex(f);b.addChildAt(this._delContainer,f)}else b.addChild(this._delContainer)}this._Y1Animation&&0<this._Y1DelContainer.getNumChildren()&&(f=-1,f=this._newChart.getY1Axis().getAxisLine(),f=this._newChart.getChildIndex(f),b.addChildAt(this._Y1DelContainer,f))}this._graph.removeChild(a);a.destroy();0<c&&(this._bAnimating=!0,this._Y1Animation&&
this._Y1Animation.play(),this._animation.play());return!0};DvtDataChangeManager.prototype._isY1AxisScaleChange=function(){var a=this._oldChart.getDataSummary(),b=a.y1MaxVal,a=this._newChart.getDataSummary(),a=a.y1MaxVal;this._bY1Overflow=a>b;this._bY1Underflow=a<b;return this._bY1Overflow||this._bY1Underflow};DvtDataChangeManager.prototype._Init=function(a){this._clear();this._graph=a;this._bY1Underflow=this._bY1Overflow=!1};DvtDataChangeManager.prototype.isAnimating=function(){return this._bAnimating};
DvtDataChangeManager.prototype._onEnd=function(){this._delContainer&&0<this._delContainer.getNumChildren()&&(this._newChart.removeChild(this._delContainer),this._delContainer.destroy());if(null!=this._newChart._indicators){for(var a=this._newChart._indicators,b=0;b<a.length;b++)a[b]&&(this._newChart.removeChild(a[b]),a[b].destroy());this._newChart._indicators=null}this._delContainer=null;this._bAnimating=!1;this._animation=null;this._newChart.isBubbleChart()&&this._graph.resetXML()};
DvtDataChangeManager.prototype.stopAnimating=function(){this._bAnimating&&(this._Y1Animation&&this._Y1Animation.stop(),this._animation.stop())};
var DvtDCUtils={};DvtObj.createSubclass(DvtDCUtils,DvtObj,"DvtDCUtils");DvtDCUtils.DIR_UP=0;DvtDCUtils.DIR_DOWN=1;DvtDCUtils.DIR_NOCHANGE=2;DvtDCUtils.getDirection=function(a,b,c,d,e,f,g){d=d.getValue(g,e,f);a=a.getValue(g,b,c);return d<a?DvtDCUtils.DIR_DOWN:d>a?DvtDCUtils.DIR_UP:DvtDCUtils.DIR_NOCHANGE};
DvtDCUtils.drawDirectionPointer=function(a,b,c,d,e,f,g){d+=12;c=a?c+d:c-d;a=a?DvtPathUtils.moveTo(-5,0)+DvtPathUtils.lineTo(5,0)+DvtPathUtils.lineTo(0,7)+DvtPathUtils.lineTo(-5,0):DvtPathUtils.moveTo(-5,0)+DvtPathUtils.lineTo(5,0)+DvtPathUtils.lineTo(0,-7)+DvtPathUtils.lineTo(-5,0);DvtPathUtils.closePath();g=new DvtPath(g,a);e=new DvtSolidFill(e,f);g.setFill(e);g.setTranslateX(b);g.setTranslateY(c);return g};
DvtDCUtils.compareGroups=function(a,b,c){var d=[],e=[],f=[],g=a.length;b=b.slice(0);if(a)for(var h=0;h<g;h++){for(var k=a[h],m=!1,n=0;n<b.length;n++)if(k===b[n]){b.splice(n,1);c&&(e=e.concat(b.splice(0,n)));m=!0;d.push(k);break}m||f.push(k)}for(a=0;a<b.length;a++)b[a]&&e.push(b[a]);return[d,e,f]};
var DvtDCAbstract=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtDCAbstract,DvtObj,"DvtDCAbstract");DvtDCAbstract.UPDATE=0;DvtDCAbstract.DELETE=1;DvtDCAbstract.INSERT=2;DvtDCAbstract.prototype.animateUpdate=function(a,b){};DvtDCAbstract.prototype.animateInsert=function(a){};DvtDCAbstract.prototype.animateDelete=function(a,b){};DvtDCAbstract.prototype.destroy=function(){this._newChart=this._Dlo=this._obj=null};DvtDCAbstract.prototype.getChart=function(){return this._Dlo.getChart()};
DvtDCAbstract.prototype.getId=function(){return this._animId};DvtDCAbstract.prototype.getNewChart=function(a){return this._newChart};DvtDCAbstract.prototype.Init=function(a,b,c){this._obj=b;this._Dlo=b._Dlo;this._animId=null};DvtDCAbstract.prototype.setNewChart=function(a){this._newChart=a};
var DvtDC2DBar=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtDC2DBar,DvtDCAbstract,"DvtDC2DBar");
DvtDC2DBar.prototype.animateUpdate=function(a,b){var c=this._Dlo.getChart(),d=b.getAnimationParams(),e=this.getAnimationParams();if(!DvtArrayUtils.equals(d,e)){var f=c.getDataObj(),g=b._Dlo.getChart().getDataObj(),h=b._Dlo.getSeriesIndex(),k=b._Dlo.getGroupIndex(),m=this._Dlo.getSeriesIndex(),n=this._Dlo.getGroupIndex(),p=c.getAnimation().dataChangeDuration/1E3,q=c.getAnimation(),r=0<=c.getType().indexOf("STACK");if(q.indicators!=DvtGraphAnimation.NONE){var t=c.isVertical(),f=t?DvtDCUtils.getDirection(g,
h,k,f,m,n,DvtGraphData.DV_Y):DvtDCUtils.getDirection(g,h,k,f,m,n,DvtGraphData.DV_X);f!=DvtDCUtils.DIR_NOCHANGE&&(f=f==DvtDCUtils.DIR_DOWN,this._offset=-10,g=d[0],h=d[1],r?(g+=d[2]/2,h+=d[3]/2):t?(g+=d[2]/2,this._offset=-10):(h+=d[3]/2,this._offset=4),f?(r=q.downColor,q=q.downAlpha):(r=q.upColor,q=q.upAlpha),q=DvtDCUtils.drawDirectionPointer(f,g,h,this._offset,r,q,this._obj.getCtx()),c.addChild(q),c.addUpdateIndicators(q),this._pointer=q)}c=new DvtCustomAnimation(this._obj.getCtx(),this,p);c.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,
this,this.getAnimationParams,this.setAnimationParams,e);a.add(c,0);this.setAnimationParams(d)}};
DvtDC2DBar.prototype.animateInsert=function(a){var b=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3,c=this._obj,d=[c.getX()+c.getWidth()/2,c.getY()+c.getHeight(),1,1,0],e=[c.getX(),c.getY(),c.getWidth(),c.getHeight(),c.getAlpha()],b=new DvtCustomAnimation(c.getCtx(),this,b);b.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this.getAnimationParams,this.setAnimationParamsPlusAlpha,e);a.add(b,0);this.setAnimationParamsPlusAlpha(d)};
DvtDC2DBar.prototype.animateDelete=function(a,b){b.addChild(this._obj);var c=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3,d=this._obj,e=[d.getX()+d.getWidth()/2,d.getY()+d.getHeight(),0,0,0],c=new DvtCustomAnimation(d.getCtx(),this,c);c.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this.getAnimationParams,this.setAnimationParamsPlusAlpha,e);a.add(c,0)};
DvtDC2DBar.prototype.getAnimationParams=function(){var a=[],b=this._obj;a[0]=b.getX();a[1]=b.getY();a[2]=b.getWidth();a[3]=b.getHeight();a[4]=this._obj.getAlpha();return a};DvtDC2DBar.prototype.Init=function(a,b,c){DvtDC2DBar.superclass.Init.call(this,a,b,c);a=this._Dlo;this._animId=a.getSeriesId()+"/"+a.getGroupId()+"/"+a.getObjId();this._pointer=null};
DvtDC2DBar.prototype.setAnimationParams=function(a){a[0]=Math.round(a[0]);a[1]=Math.round(a[1]);a[2]=Math.round(a[2]);a[3]=Math.round(a[3]);this._obj.setRect(a[0],a[1],a[2],a[3]);var b=[a[0],a[1],a[2],a[3]],c=this._obj.getFill();c instanceof DvtLinearGradientFill&&(b=new DvtLinearGradientFill(c.getAngle(),c.getColors(),c.getAlphas(),c.getStops(),b),this._obj.setFill(b));if(null!=this._pointer){var b=this._Dlo.getChart(),d=b.isVertical(),c=this._pointer;b.removeChild(c);0<=b.getType().indexOf("STACK")?
(d=a[0]+a[2]/2,a=a[1]+a[3]/2):d?(d=a[0]+a[2]/2,a=a[1]+this._offset):(d=a[0]+a[2]+this._offset,a=a[1]+a[3]/2);c.setTranslateX(d);c.setTranslateY(a);b.addChild(c)}};DvtDC2DBar.prototype.setAnimationParamsPlusAlpha=function(a){this._obj.setRect(a[0],a[1],a[2],a[3]);this._obj.setAlpha(a[4])};
var DvtDC3DBar=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtDC3DBar,DvtDCAbstract,"DvtDC3DBar");
DvtDC3DBar.prototype.animateUpdate=function(a,b){var c=b.getAnimationParams(),d=this.getAnimationParams();if(!DvtArrayUtils.equals(c,d)){var e=this._Dlo.getChart().getDataObj(),f=b._Dlo.getChart().getDataObj(),g=b._Dlo.getSeriesIndex(),h=b._Dlo.getGroupIndex(),k=this._Dlo.getSeriesIndex(),m=this._Dlo.getGroupIndex(),n=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3,p=this._Dlo.getChart().getAnimation(),q=0<=this._Dlo.getChart().getType().indexOf("STACK");if(p.indicators!=DvtGraphAnimation.NONE){var r=
this._Dlo.getChart().isVertical(),e=r?DvtDCUtils.getDirection(f,g,h,e,k,m,DvtGraphData.DV_Y):DvtDCUtils.getDirection(f,g,h,e,k,m,DvtGraphData.DV_X);e!=DvtDCUtils.DIR_NOCHANGE&&(e=e==DvtDCUtils.DIR_DOWN,this._offset=-10,f=c[20],g=c[27],q?(f=c[0],g=c[7],f+=(c[2]-c[0])/2,g+=(c[1]-c[7])/2):r?(f+=(c[22]-c[20])/2,this._offset=-10):(g+=(c[21]-c[27])/2,this._offset=4),e?(q=p.downColor,p=p.downAlpha):(q=p.upColor,p=p.upAlpha),p=DvtDCUtils.drawDirectionPointer(e,f,g,this._offset,q,p,this._obj.getCtx()),this._Dlo.getChart().addChild(p),
this._Dlo.getChart().addUpdateIndicators(p),this._pointer=p)}n=new DvtCustomAnimation(this._obj.getCtx(),this,n);n.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this.getAnimationParams,this.setAnimationParams,d);a.add(n,0);this.setAnimationParams(c)}};
DvtDC3DBar.prototype.animateInsert=function(a){var b,c=this._obj,d=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3,e=[],f=0,g=8===c.getTop().getPoints().length,h=c.getFront().getPoints(),k=h.length;for(b=0;b<k;b++)e.push(h[b]);var m=g?h[0]:h[0]+(h[2]-h[0])/2;e[0]=m;e[2]=m;e[4]=m;e[6]=m;e[8]=m;f+=k;h=c.getSide().getPoints();k=h.length;for(b=0;b<k;b++)e.push(h[b]);e[f+0]=m;e[f+2]=m;e[f+4]=m;e[f+6]=m;e[f+8]=m;f+=k;h=c.getTop().getPoints();k=h.length;for(b=0;b<k;b++)e.push(h[b]);g?(e[f+2]=
m,e[f+4]=m,e[f+3]=h[1],e[f+5]=h[1]):(b=(h[2]-h[0])/2,e[f+0]+=b,e[f+2]-=b,e[f+4]-=b,e[f+6]+=b,e[f+8]+=b);e.push(0);f=[];h=c.getFront().getPoints();for(b=0;3>b;b++){k=h.length;for(j=0;j<k;j++)f.push(h[j]);h=0===b?c.getSide().getPoints():c.getTop().getPoints()}f.push(c.getAlpha());c=new DvtCustomAnimation(c.getCtx(),this,d);c.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this.getAnimationParams,this.setAnimationParamsPlusAlpha,f);a.add(c,0);this.setAnimationParamsPlusAlpha(e)};
DvtDC3DBar.prototype.animateDelete=function(a,b){var c=this._obj;b.addChild(c);for(var d=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3,d=.8*d,e=[],f=0,g=8===c.getTop().getPoints().length,h=c.getFront().getPoints(),k=h.length,m=0;m<k;m++)e.push(h[m]);var n=g?h[0]:h[0]+(h[2]-h[0])/2,p=h[5],q=h[3];e[0]=n;e[2]=n;e[4]=n;e[6]=n;e[8]=n;g&&(e[7]=p,e[9]=q);f+=k;h=c.getSide().getPoints();k=h.length;for(m=0;m<k;m++)e.push(h[m]);e[f+0]=n;e[f+2]=n;e[f+4]=n;e[f+6]=n;e[f+8]=n;e[f+5]=p;e[f+3]=q;f+=k;
h=c.getTop().getPoints();k=h.length;for(m=0;m<k;m++)e.push(h[m]);g?(e[f+2]=e[f+4]=e[f+3]=p,e[f+5]=p):(e[f+0]=n,e[f+2]=n,e[f+4]=n,e[f+6]=n,e[f+8]=n,e[f+5]=p,e[f+7]=q);e.push(0);for(var f=[],h=c.getFront().getPoints(),m=0;3>m;m++){k=h.length;for(j=0;j<k;j++)f.push(h[j]);h=0===m?c.getSide().getPoints():c.getTop().getPoints()}f.push(c.getAlpha());c=new DvtCustomAnimation(c.getCtx(),this,d);c.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this.getAnimationParams,this.setAnimationParamsPlusAlpha,
e);a.add(c,0)};DvtDC3DBar.prototype.getAnimationParams=function(){for(var a=[],b=0,c=this._obj,d=c.getFront().getPoints(),e,f=0;3>f;f++){e=d.length;for(j=0;j<e;j++)a[b+j]=d[j];d=0===f?c.getSide().getPoints():c.getTop().getPoints();b+=e}a[b]=this._obj.getAlpha();return a};DvtDC3DBar.prototype.Init=function(a,b,c){DvtDC3DBar.superclass.Init.call(this,a,b,c);a=this._Dlo;this._animId=a.getSeriesId()+"/"+a.getGroupId()+"/"+a.getObjId();this._pointer=null};
DvtDC3DBar.prototype.setAnimationParams=function(a){var b,c,d=0,e=this._obj,f=e.getFront().getPoints(),g;for(b=0;3>b;b++){g=f.length;for(c=0;c<g;c++)f[c]=a[d+c];0===b?(e.getFront().setPoints(f),f=e.getSide().getPoints()):1===b?(e.getSide().setPoints(f),f=e.getTop().getPoints()):e.getTop().setPoints(f);d+=g}null!=this._pointer&&(this._Dlo.getChart().removeChild(this._pointer),b=0<=this._Dlo.getChart().getType().indexOf("STACK"),c=this._Dlo.getChart().isVertical(),d=20,b?(b=a[6]+(a[4]-a[6])/2,a=a[7]+
(a[1]-a[7])/2):c?(b=a[d+0]+(a[d+2]-a[d+0])/2,a=a[d+7]+this._offset):(b=a[d+0]+(a[d+2]-a[d+0])+this._offset,a=a[d+7]+(a[d+1]-a[d+7])/2),this._pointer.setTranslateX(b),this._pointer.setTranslateY(a),this._Dlo.getChart().addChild(this._pointer))};DvtDC3DBar.prototype.setAnimationParamsPlusAlpha=function(a){this.setAnimationParams(a);this._obj.setAlpha(a[a.length-1])};
var DvtDCMarker=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtDCMarker,DvtDCAbstract,"DvtDCMarker");
DvtDCMarker.prototype.animateUpdate=function(a,b){var c=b._obj,d=this._obj,e=d.getMatrix(),f=new DvtMatrix;f.translate(-d.getX(),-d.getY());f.scale(c.getWidth()/d.getWidth(),c.getHeight()/d.getHeight());f.translate(c.getX(),c.getY());if(!e.equals(f)){var g=this._Dlo.getChart().getAnimation(),h;h=g.dataChangeDuration/1E3;h=new DvtCustomAnimation(this._obj.getCtx(),this,h);d.setMatrix(f);h.getAnimator().addProp(DvtAnimator.TYPE_MATRIX,this,this.getAnimationParams,this.setAnimationParams,e);this.isUpdateTrigger(b)&&
g.indicators!=DvtGraphAnimation.NONE&&(c.setSolidFill("#FFFF00"),c.removeAllDrawEffects(),this._Dlo.getChart().addChild(c),h.getAnimator().addProp(DvtAnimator.TYPE_NUMBER,c,c.getAlpha,c.setAlpha,0),e=new DvtMatrix,e.translate(-c.getX(),-c.getY()),e.scale(d.getWidth()/c.getWidth(),d.getHeight()/c.getHeight()),e.translate(d.getX(),d.getY()),h.getAnimator().addProp(DvtAnimator.TYPE_MATRIX,c,c.getMatrix,c.setMatrix,e),d=[],d.push(c),this._Dlo.getChart()._indicators=d,c.setAlpha(1),this._overlay=c);a.add(h,
0)}};DvtDCMarker.prototype.animateInsert=function(a){var b=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3,c=this._obj,b=new DvtAnimFadeIn(c.getCtx(),c,b);a.add(b,0)};DvtDCMarker.prototype.animateDelete=function(a,b){b.addChild(this._obj);var c=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3,d=this._obj,c=new DvtAnimFadeOut(d.getCtx(),d,c);a.add(c,0)};DvtDCMarker.prototype.getAnimationParams=function(){return this._obj.getMatrix().clone()};
DvtDCMarker.prototype.Init=function(a,b,c){DvtDCMarker.superclass.Init.call(this,a,b,c);a=this._Dlo;b=a.getChart().getDataObj();a.getGroupIndex();b.getGroupLabels()||a.getGroupId();this._animId=a.getSeriesId()+"/"+a.getGroupId()+"/"+a.getObjId()};DvtDCMarker.prototype.setAnimationParams=function(a){this._obj.setMatrix(a);this._overlay&&this._Dlo.getChart().addChild(this._overlay)};
DvtDCMarker.prototype.isUpdateTrigger=function(a){var b=a._Dlo.getSeriesIndex(),c=a._Dlo.getGroupIndex(),d=this._Dlo.getSeriesIndex(),e=this._Dlo.getGroupIndex(),f=this._Dlo.getChart().getDataObj(),g=a._Dlo.getChart().getDataObj();return a?!(f.getValue(DvtGraphData.DV_X,d,e)==g.getValue(DvtGraphData.DV_X,b,c)&&f.getValue(DvtGraphData.DV_Y,d,e)==g.getValue(DvtGraphData.DV_Y,b,c)&&f.getValue(DvtGraphData.DV_Z,d,e)==g.getValue(DvtGraphData.DV_Z,b,c)):!1};
var DvtDCText=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtDCText,DvtDCAbstract,"DvtDCText");DvtDCText.prototype.animateUpdate=function(a,b){var c=b.getAnimationParams(),d=this.getAnimationParams();if(!DvtArrayUtils.equals(c,d)){var e;e=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3;e=new DvtCustomAnimation(this._obj.getCtx(),this,e);e.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,this,this.getAnimationParams,this.setAnimationParams,d);a.add(e,0);this.setAnimationParams(c)}};
DvtDCText.prototype.animateInsert=function(a){var b=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3,c=this._obj,b=new DvtAnimFadeIn(c.getCtx(),c,b);a.add(b,0)};DvtDCText.prototype.animateDelete=function(a,b){b.addChild(this._obj);var c=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3,d=this._obj,c=new DvtAnimFadeOut(d.getCtx(),d,c);a.add(c,0)};DvtDCText.prototype.getAnimationParams=function(){var a=[],b=this._obj;a[0]=b.getX();a[1]=b.getY();return a};
DvtDCText.prototype.Init=function(a,b,c){DvtDCText.superclass.Init.call(this,a,b,c);a=this._Dlo;this._animId=a.getSeriesId()+"/"+a.getGroupId()+"/"+a.getMiscId()+"/"+a.getObjId()};DvtDCText.prototype.setAnimationParams=function(a){this._obj.setX(a[0]);this._obj.setY(a[1])};
var DvtDCLineArea=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtDCLineArea,DvtDCAbstract,"DvtDCLineArea");
DvtDCLineArea.prototype.animateUpdate=function(a,b){var c=b.getAnimationParams(),d=this.getAnimationParams();this._finalState=null;if(!DvtArrayUtils.equals(c,d)){var e=this._Dlo.getChart().getDataObj(),f=b._Dlo.getChart().getDataObj(),g=e.getGroups(),h=f.getGroups(),k=g.length,m=h.length,n=DvtDCUtils.compareGroups(h,g,!0),p=n[0],q=n[1],r=n[2],t=0<q.length||0<r.length,n=[],v=0;this._arDirection=this._arPointers=null;var u=this._Dlo.getChart().getAnimation();u.indicators!=DvtGraphAnimation.NONE&&0<
p.length&&(this._arPointers=[],this._arDirection=[]);for(var p=[],w=[],z=b.getAnimationParams(),y=this.getAnimationParams(),A=z.length,C=y.length,B=this._Dlo.getSeriesIndex(),E=b._Dlo.getSeriesIndex(),D=0,H=0,F=0,G=0;D<m||H<k;)if(D<m&&H<k&&F<A&&G<C)if(h[D]===g[H]){n[v]=DvtDCAbstract.UPDATE;var I=z[F++],J=z[F++];null!=this._arPointers&&this._makeDirPointer(u,I,J,f,E,D,e,B,H,v);D++;H++;v++;t&&(p.push(I),p.push(J),w.push(y[G++]),w.push(y[G++]))}else 0<=DvtArrayUtils.getIndex(r,h[D])?(n[v]=DvtDCAbstract.DELETE,
p.push(z[F++]),p.push(z[F++]),w.push(0),w.push(0),D++,null!=this._arPointers&&(this._arPointers[v]=null,this._arDirection[v]=null),v++):-1<DvtArrayUtils.getIndex(q,g[H])?(n[v]=DvtDCAbstract.INSERT,p.push(0),p.push(0),w.push(y[G++]),w.push(y[G++]),H++,null!=this._arPointers&&(this._arPointers[v]=null,this._arDirection[v]=null),v++):(D++,H++);else{if(D<m&&F<A)for(;D<m&&F<A;)n[v]=DvtDCAbstract.DELETE,p.push(z[F++]),p.push(z[F++]),w.push(0),w.push(0),D++,null!=this._arPointers&&(this._arPointers[v]=null,
this._arDirection[v]=null),v++;else for(;H<k&&G<C;)n[v]=DvtDCAbstract.INSERT,p.push(0),p.push(0),w.push(y[G++]),w.push(y[G++]),H++,null!=this._arPointers&&(this._arPointers[v]=null,this._arDirection[v]=null),v++;break}if(t){r=k=m=k=h=g=0;c=n.length;for(e=0;e<c;e++)if(n[e]!=DvtDCAbstract.UPDATE){m=n[e];f=1;for(q=e+1;q<c&&n[q]==m;q++)f++;g=q===c;if(0===e)if(m===DvtDCAbstract.INSERT)for(m=2*(e+f),g=p[m],h=p[m+1],q=0;q<f;q++)0<q&&e++,m=2*e,p[m++]=g,p[m]=h;else for(m=2*(e+f),g=w[m],h=w[m+1],q=0;q<f;q++)0<
q&&e++,m=2*e,w[m++]=g,w[m]=h;else if(e===c-1||g)if(m===DvtDCAbstract.INSERT)m=2*(e-1),g=p[m],h=p[m+1],m=2*e,p[m++]=g,p[m]=h;else for(m=2*(e-1),g=w[m],h=w[m+1],q=0;q<f;q++)0<q&&e++,m=2*e,w[m++]=g,w[m]=h;else if(m===DvtDCAbstract.INSERT)for(q=2*(e-1),g=p[q++],h=p[q],q=2*(e+f),k=p[q++],m=p[q],k=(k-g)/(f+1),r=(m-h)/(f+1),q=0;q<f;q++)0<q&&e++,m=2*e,g+=k,h+=r,p[m++]=g,p[m]=h;else for(q=2*(e-1),g=w[q++],h=w[q],q=2*(e+f),k=w[q++],m=w[q],k=(k-g)/(f+1),r=(m-h)/(f+1),q=0;q<f;q++)0<q&&e++,m=2*e,g+=k,h+=r,w[m++]=
g,w[m]=h}this._obj instanceof DvtPolygon&&(F=z.length-6,G=y.length-6,p.push(z[F]),p.push(z[++F]),p.push(z[++F]),p.push(z[++F]),p.push(z[++F]),p.push(z[++F]),w.push(y[G]),w.push(y[++G]),w.push(y[++G]),w.push(y[++G]),w.push(y[++G]),w.push(y[++G]));c=p;this._finalState=d;d=w}this.setAnimationParams(c);this._arPointers&&this._Dlo.getChart().addUpdateIndicators(this._arPointers);n=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3;n=new DvtCustomAnimation(this._obj.getCtx(),this,n);n.getAnimator().addProp(DvtAnimator.TYPE_NUMBER_ARRAY,
this,this.getAnimationParams,this.setAnimationParams,d);this._finalState&&n.setOnEnd(this._resetPoints,this);a.add(n,0)}};DvtDCLineArea.prototype._resetPoints=function(){this._obj.setPoints(this._finalState)};DvtDCLineArea.prototype.animateInsert=function(a){var b=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3,c=this._obj,b=new DvtAnimFadeIn(c.getCtx(),c,b);a.add(b,0)};
DvtDCLineArea.prototype.animateDelete=function(a,b){var c=this._obj._Dlo.getChart().getChildIndex(this._obj);if(0<=c){this._Dlo.getChart().removeChild(this._obj);this.getNewChart().getObjList().splice(c,0,this._obj);var c=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3,d=this._obj,c=new DvtAnimFadeOut(d.getCtx(),d,c);c.setOnEnd(this._deleteSeries,this);a.add(c,0)}};DvtDCLineArea.prototype._deleteSeries=function(){this.getNewChart().removeChild(this._obj)};
DvtDCLineArea.prototype.getAnimationParams=function(){var a=[];return a=this._obj.getPoints()};DvtDCLineArea.prototype.Init=function(a,b,c){DvtDCLineArea.superclass.Init.call(this,a,b,c);this._animId=this._Dlo.getSeriesId()};
DvtDCLineArea.prototype._makeDirPointer=function(a,b,c,d,e,f,g,h,k,m){var n=null,p=!1;d=DvtDCUtils.getDirection(d,e,f,g,h,k,DvtGraphData.DV_Y);d!==DvtDCUtils.DIR_NOCHANGE&&((p=d==DvtDCUtils.DIR_DOWN)?(n=a.downColor,a=a.downAlpha):(n=a.upColor,a=a.upAlpha),d=(d=this._obj.getStroke())?d.getWidth():5,n=DvtDCUtils.drawDirectionPointer(p,b,c,d,n,a,this._obj.getCtx()),this._Dlo.getChart().addChild(n));this._arPointers[m]=n;this._arDirection[m]=p};
DvtDCLineArea.prototype.setAnimationParams=function(a){this._obj.setPoints(a);if(null!=this._arPointers)for(var b=0;b<this._arPointers.length;b++){var c=this._arPointers[b];if(c){this._Dlo.getChart().removeChild(c);var d=1==this._arDirection[b]?12:-12;c.setTranslateX(a[2*b]);c.setTranslateY(a[2*b+1]+d);this._Dlo.getChart().addChild(c)}}};
var DvtDCDialIndicator=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtDCDialIndicator,DvtDCAbstract,"DvtDCDialIndicator");
DvtDCDialIndicator.prototype.animateUpdate=function(a,b){var c=b._obj._Dlo.getChart().getGaugeData()._curVal,d=this._obj._Dlo.getChart().getGaugeData()._curVal,e=this._Dlo._Chart.getGaugeData()._minVal,f=this._Dlo._Chart.getGaugeData()._maxVal;c<e?c=e:c>f&&(c=f);d<e?d=e:d>f&&(d=f);this._Dlo._Chart.getGaugeData();var g=this._Dlo._Chart.getGaugeData()._dialAngleExtent,c=Math.abs(c-e)/Math.abs(f-e)*g*(Math.PI/180),d=Math.abs(d-e)/Math.abs(f-e)*g*(Math.PI/180);c!=d&&(e=this._obj.getMatrix().clone(),e.translate(-1*
this._obj._xPor,-1*this._obj._yPor),e.rotate(c-d),e.translate(this._obj._xPor,this._obj._yPor),this._obj.setMatrix(e),this._ang=c,e=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3,e=new DvtCustomAnimation(this._obj.getCtx(),this,e),e.getAnimator().addProp(DvtAnimator.TYPE_NUMBER,this,this.getAnimationParams,this.setAnimationParams,d),a.add(e,0),this.setAnimationParams(c))};
DvtDCDialIndicator.prototype.animateInsert=function(a){var b=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3,c=this._obj,b=new DvtAnimFadeIn(c.getCtx(),c,b);a.add(b,0)};DvtDCDialIndicator.prototype.animateDelete=function(a,b){b.addChild(this._obj);var c=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3,d=this._obj,c=new DvtAnimFadeOut(d.getCtx(),d,c);a.add(c,0)};DvtDCDialIndicator.prototype.getAnimationParams=function(){return this._ang};
DvtDCDialIndicator.prototype.Init=function(a,b,c){DvtDCDialIndicator.superclass.Init.call(this,a,b,c);a=this._Dlo;this._animId=a.getSeriesId()+"/"+a.getGroupId()+"/"+a.getMiscId()+"/"+a.getObjId();this._ang=0};DvtDCDialIndicator.prototype.setAnimationParams=function(a){var b=this._obj.getMatrix().clone();b.translate(-1*this._obj._xPor,-1*this._obj._yPor);b.rotate(a-this._ang);b.translate(this._obj._xPor,this._obj._yPor);this._obj.setMatrix(b);this._ang=a};
var DvtDCStatusIndicator=function(a,b,c){this.Init(a,b,c)};DvtObj.createSubclass(DvtDCStatusIndicator,DvtDCAbstract,"DvtDCStatusIndicator");
DvtDCStatusIndicator.prototype.animateUpdate=function(a,b){var c=b._obj.getCommands(),d=this._obj.getCommands();this._obj._Dlo.getChart().isVertical()?this._tval=c[9]-d[9]:this._tval=d[7]-c[7];this._tval&&(c=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3,c=new DvtCustomAnimation(this._obj.getCtx(),this,c),c.getAnimator().addProp(DvtAnimator.TYPE_NUMBER,this,this.getAnimationParams,this.setAnimationParams,0),a.add(c,0),this.setAnimationParams(this._tval))};
DvtDCStatusIndicator.prototype.animateInsert=function(a){var b=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3,c=this._obj,b=new DvtAnimFadeIn(c.getCtx(),c,b);a.add(b,0)};DvtDCStatusIndicator.prototype.animateDelete=function(a,b){b.addChild(this._obj);var c=this._Dlo.getChart().getAnimation().dataChangeDuration/1E3,d=this._obj,c=new DvtAnimFadeOut(d.getCtx(),d,c);a.add(c,0)};DvtDCStatusIndicator.prototype.getAnimationParams=function(){return this._tval};
DvtDCStatusIndicator.prototype.Init=function(a,b,c){DvtDCMarker.superclass.Init.call(this,a,b,c);a=this._Dlo;this._animId=a.getSeriesId()+"/"+a.getGroupId()+"/"+a.getMiscId()+"/"+a.getObjId();this._tval=0;a=this._obj.getCommands();this._aAnimCmds=DvtArrayUtils.copy(a);this._aCmds=a};
DvtDCStatusIndicator.prototype.setAnimationParams=function(a){var b=this._aAnimCmds,c=this._aCmds;this._obj._Dlo.getChart().isVertical()?(b[2]=c[2]+a,b[5]=c[5]+a,b[7]=c[7]+a,b[9]=c[9]+a,b[18]=c[18]+a,b[21]=c[21]+a,b[23]=c[23]+a,b[25]=c[25]+a):(b[7]=c[7]-a,b[10]=c[10]-a,b[12]=c[12]-a,b[14]=c[14]-a,b[17]=c[17]-a,b[20]=c[20]-a,b[22]=c[22]-a,b[24]=c[24]-a);this._obj.setCommands(b)};
var DvtGraphEH=function(){this._Init()};DvtObj.createSubclass(DvtGraphEH,DvtObj,"DvtGraphEH");DvtGraphEH.prototype._Init=function(a){this._type=null};DvtGraphEH.prototype.getType=function(){return this._type};DvtGraphEH.prototype.setType=function(a){this._type=a};DvtGraphEH.prototype.newKbdEvent=function(a){return!0};DvtGraphEH.prototype.newMouseEvent=function(a){return!0};
var DvtHSSEH=function(a){this._Init(a)};DvtObj.createSubclass(DvtHSSEH,DvtGraphEH,"DvtHSSEH");DvtHSSEH.TYPE="HSSEH";DvtHSSEH.prototype._Init=function(a){this.setType(DvtHSSEH.TYPE);this._Chart=a};DvtHSSEH.prototype.newKbdEvent=function(a){return!0};DvtHSSEH.prototype.newMouseEvent=function(a){var b=a.target._Dlo;if(!b||a.type!==DvtMouseEvent.CLICK||b.isInitFxInProgress())return!0;this.handleShowHide(b);return!0};
DvtHSSEH.prototype._performShowHideSeries=function(a){var b=this._Chart.updateHSLegendState(a,!0);this._Chart.updateHSSeriesState(b,a,!0)};DvtHSSEH.prototype._performShowHideSplitSeries=function(a,b){for(var c=this._Chart.updateHSMiscLegendState(b,!0),d=0;d<a.length;d++)this._Chart.updateHSSeriesState(c,a[d],!0)};DvtHSSEH.prototype._performShowHideUnderlay=function(a,b){var c=this._Chart.updateHSMiscLegendState(a,!0);this._Chart.updateHSSeriesUnderlayState(c,b,!0)};
DvtHSSEH.prototype.handleShowHide=function(a){if(DvtGraphEventUtils.isLegendMarker(a)){var b=a.getSeriesIndex(),c=a.getMiscId();if(-1===b){if(a=a.getChart().getLayers()[c],0<a.length){var d=a[0],b=parseInt(d,10);isNaN(b)?"#"===d.charAt(0)?this._performShowHideUnderlay(c,d):(type="c"===d?DvtMarker.CIRCLE:"s"===d?DvtMarker.SQUARE:"t"===d?DvtMarker.TRIANGLE_UP:"td"===d?DvtMarker.TRIANGLE_DOWN:DvtMarker.DIAMOND,this._performShowHideUnderlay(c,type)):this._performShowHideSplitSeries(a,c)}}else this._performShowHideSeries(b);
return!0}return!1};
var DvtRefObjHandler=function(){};DvtObj.createSubclass(DvtRefObjHandler,DvtObj,"DvtRefObjHandler");DvtRefObjHandler.processMouseOver=function(a){DvtRefObjHandler._setVisible(a,!0)};DvtRefObjHandler.processMouseOut=function(a){DvtRefObjHandler._setVisible(a,!1)};DvtRefObjHandler._setVisible=function(a,b){if(a&&a.getRefObjs){var c=a.getRefObjs();if(c)for(var d=0;d<c.length;d++)c[d].setVisible(b)}};
var DvtSeriesRolloverHandler=function(a){this.Init(a)};DvtObj.createSubclass(DvtSeriesRolloverHandler,DvtObj,"DvtSeriesRolloverHandler");DvtSeriesRolloverHandler.prototype.Init=function(){};DvtSeriesRolloverHandler.prototype.processMouseOver=function(a){this.ProcessEvent(a,!0)};DvtSeriesRolloverHandler.prototype.processMouseOut=function(a){this.ProcessEvent(a,!1)};DvtSeriesRolloverHandler.prototype.ProcessEvent=function(a,b){};
var DvtGraphSeriesRolloverHandler=function(a){this.Init(a)};DvtObj.createSubclass(DvtGraphSeriesRolloverHandler,DvtSeriesRolloverHandler,"DvtGraphSeriesRolloverHandler");DvtGraphSeriesRolloverHandler.prototype.Init=function(a){DvtGraphSeriesRolloverHandler.superclass.Init.call(this);this._chart=a;this._bDim=a.getSROEffect()===DvtGraphCore.RB_DIM;this._bHilite=a.getSROEffect()===DvtGraphCore.RB_HILITE};
DvtGraphSeriesRolloverHandler.prototype.ProcessEvent=function(a,b){if(a){var c=this._chart.getCurrentSeries();if(!(null!=c&&0<=c)){var c=this._bDim||this._bHilite,d=this._chart.getLayers(),e=a.getCategories();if(null!==e[0]){e=e[0];e=this._chart.getDataObj().getIndexFromSeries(e);if(0<=e&&(DvtGraphEventUtils.HighlightSeries(this._chart,e,c,b),this._chart._scrollableLegend)){var f=this._chart.getType();f==DvtGraphType.BAR_VERT_PERCENT||f==DvtGraphType.BAR_VERT_STACK||f==DvtGraphType.BAR_VERT_STACK2Y||
f==DvtGraphType.LINE_VERT_PERCENT||f==DvtGraphType.LINE_VERT_STACK||f==DvtGraphType.LINE_VERT_STACK2Y||f==DvtGraphType.AREA_VERT_PERCENT||f==DvtGraphType.AREA_VERT_STACK?this._chart._scrollableLegend.scrollIntoView(this._chart.getDataObj()._arSeries.length-1-e):this._chart._scrollableLegend.scrollIntoView(e)}d&&DvtGraphEventUtils.HighlightSplitSeriesLegend(this._chart,e,c,b)}else if(DvtGraphEventUtils.isLegendMarker(a)){var g=a.getMiscId(),d=d[g];0<d.length&&(f=d[0],e=parseInt(f,10),isNaN(e)?"#"===
f.charAt(0)?(DvtGraphEventUtils.HighlightMiscLegend(this._chart,g,c,b),DvtGraphEventUtils.HighlightUnderlay(this._chart,c,b,f)):(f="c"===f?DvtMarker.CIRCLE:"s"===f?DvtMarker.SQUARE:"t"===f?DvtMarker.TRIANGLE_UP:"td"===f?DvtMarker.TRIANGLE_DOWN:DvtMarker.DIAMOND,DvtGraphEventUtils.HighlightMiscLegend(this._chart,g,c,b),DvtGraphEventUtils.HighlightUnderlay(this._chart,c,b,null,f)):(DvtGraphEventUtils.HighlightMiscLegend(this._chart,g,c,b),DvtGraphEventUtils.HighlightSplitSeries(this._chart,d,c,b),this._chart._scrollableLegend&&
this._chart._scrollableLegend.scrollIntoView(e)))}}}};
var DvtSeriesFocusHandler=function(){this.Init()};DvtObj.createSubclass(DvtSeriesFocusHandler,DvtObj,"DvtSeriesFocusHandler");DvtSeriesFocusHandler.prototype.Init=function(){this._seriesFocusHandled=!1};
DvtSeriesFocusHandler.prototype.processSeriesFocus=function(a,b){this._seriesFocusHandled=!1;if(this.isSeriesFocusable(b)){var c=this.getSeriesCategory(b);this._renderSeriesFocus(c);this._seriesFocusHandled=!0}else null!=this.getCurrentSeriesCategory()&&this.isClearSeriesFocus(a)&&(this._renderSeriesFocus(null),this._seriesFocusHandled=!0)};
DvtSeriesFocusHandler.prototype._renderSeriesFocus=function(a){var b=this.getCurrentSeriesCategory();b!=a&&(null==a?(a=this.getCurrentSeriesCategory(),this.SeriesFocusCleared(a),this.setCurrentSeriesCategory(null)):(this.SeriesFocusChanged(b,a),this.setCurrentSeriesCategory(a)))};DvtSeriesFocusHandler.prototype.SeriesFocusCleared=function(a){};DvtSeriesFocusHandler.prototype.SeriesFocusChanged=function(a,b){};DvtSeriesFocusHandler.prototype.getSeriesCategory=function(a){};
DvtSeriesFocusHandler.prototype.getCurrentSeriesCategory=function(){};DvtSeriesFocusHandler.prototype.setCurrentSeriesCategory=function(a){};DvtSeriesFocusHandler.prototype.isClearSeriesFocus=function(a){return!1};DvtSeriesFocusHandler.prototype.isSeriesFocusHandled=function(){return this._seriesFocusHandled};DvtSeriesFocusHandler.prototype.isSeriesFocusable=function(a){return!1};
var DvtGraphSeriesFocusHandler=function(a){this.Init(a)};DvtObj.createSubclass(DvtGraphSeriesFocusHandler,DvtSeriesFocusHandler,"DvtGraphSeriesFocusHandler");DvtGraphSeriesFocusHandler.prototype.Init=function(a){DvtGraphSeriesFocusHandler.superclass.Init.call(this);this._Chart=a};DvtGraphSeriesFocusHandler.prototype.isSeriesFocusable=function(a){var b=this._Chart;return b.isSeriesFocusEnabled()&&1<b.getSeriesCount()&&DvtGraphEventUtils.isLegendMarker(a)?!0:!1};
DvtGraphSeriesFocusHandler.prototype.SeriesFocusCleared=function(a){DvtGraphEventUtils.UnhighlightAllSeries(this._Chart)};DvtGraphSeriesFocusHandler.prototype.SeriesFocusChanged=function(a,b){var c=this._Chart;DvtGraphEventUtils.HighlightSeries(c,a,!0,!1);DvtGraphEventUtils.HighlightSeries(c,b,!0,!0)};DvtGraphSeriesFocusHandler.prototype.getSeriesCategory=function(a){return a.getSeriesIndex()};DvtGraphSeriesFocusHandler.prototype.getCurrentSeriesCategory=function(){return this._Chart.getCurrentSeries()};
DvtGraphSeriesFocusHandler.prototype.setCurrentSeriesCategory=function(a){this._Chart.setCurrentSeries(a)};DvtGraphSeriesFocusHandler.prototype.isClearSeriesFocus=function(a){var b=this._Chart;return!this._getLegendBounds(b).containsPoint(a.x,a.y)&&!b.getFrameRect().containsPoint(a.x,a.y)};DvtGraphSeriesFocusHandler.prototype._getLegendBounds=function(a){return new DvtRectangle(a.getLegendRect().getX(),a.getLegendRect().getY(),a.getLegendRect().getWidth(),a.getLegendRect().getHeight())};
var DvtTTEH=function(a){this._Init(a)};DvtObj.createSubclass(DvtTTEH,DvtGraphEH,"DvtTTEH");DvtTTEH.TYPE="TTEH";DvtTTEH.prototype._Init=function(a){this.setType(DvtTTEH.TYPE);this._TTM=new DvtHtmlTooltipManager;this._Chart=a;this._Ctx=a.getCtx();this._bTipShowing=!1;DvtTTEH.superclass._Init.call(this)};
var DvtDCEH=function(a,b){this._Init(a,b)};DvtObj.createSubclass(DvtDCEH,DvtObj,"DvtDCEH");DvtDCEH.prototype._Init=function(a,b){this._context=a;this._isNumericMainAxis=this._useAllInGroup=this._horizontal=this._dataCursorShown=!1;this._dataCursor=b;this._threeDHorizontalOffset=0};
DvtDCEH.prototype.processMove=function(a,b,c,d){if(c){b=this._context.getRelativePosition(a,b);a=b.x;b=b.y;if(d=this.getActionablePlotRect(a,b,d))return this._showDataCursor(d,a,b,c),this._dataCursorShown=!0;this._removeDataCursor();return this._dataCursorShown=!1}this._removeDataCursor()};DvtDCEH.prototype.processEnd=function(){this._removeDataCursor()};DvtDCEH.prototype.processOut=function(a){this.getPlotRect().containsPoint(a.x,a.y)||this._removeDataCursor()};
DvtDCEH.prototype._showDataCursor=function(a,b,c,d){var e=this._dataCursor,f=this.getClosestMatch(b,c,d,a);if(null==f)this._removeDataCursor();else{d=DvtGeomUtils.getCenterPoint(f.matchRegion);e.getBehavior()==DvtDataCursor.BEHAVIOR_SNAP&&(e.isHorizontal()?c=Math.min(Math.max(d.y,a.y),a.y+a.h):b=Math.min(Math.max(d.x,a.x),a.x+a.w));if(this._threeDHorizontalOffset){var g=a.x+a.w-this._threeDHorizontalOffset;b>g&&(b=g)}(g=this.getTooltipText(f))&&""!=g?(e.setVisible(!0),f=this.getSeriesColor(f.sidx,
f.gidx),b=e.isHorizontal()?c:b,e.render(a,d.x,d.y,b,g,f)):e.setVisible(!1)}};DvtDCEH.prototype._removeDataCursor=function(){this._dataCursor.getVisible()&&this._dataCursor.setVisible(!1);this._context.getTooltipManager().hideTooltip()};DvtDCEH.prototype.isDataCursorShown=function(){return this._dataCursorShown};DvtDCEH.AddPotentialMatch=function(a,b,c,d){var e=b.matchRegion;if(d){if(e.y+e.h<c.y||e.y>c.y+c.h)return!1}else if(e.x+e.w<c.x||e.x>c.x+c.w)return!1;a.push(b);return!0};
DvtDCEH.GetClosestMatchSecondDirection=function(a,b,c,d){for(var e=null,f=1E8,g=0;g<a.length;g++){var h=a[g],k=Math.abs(((b?h.matchRegion.x:h.matchRegion.y)+(b?h.matchRegion.x+h.matchRegion.w:h.matchRegion.y+h.matchRegion.h))/2-(b?c:d));k<f&&(f=k,e=h)}return e};
DvtDCEH.GetClosestMatchesFirstDirection=function(a,b,c,d){for(var e=1E7,f=[],g=0;g<a.length;g++){var h=a[g],k=Math.abs(((b?h.matchRegion.y:h.matchRegion.x)+(b?h.matchRegion.y+h.matchRegion.h:h.matchRegion.x+h.matchRegion.w))/2-(b?d:c));k<=e&&(k<e&&(f=[]),f.push(h),e=k)}return f};DvtDCEH.prototype.getActionablePlotRect=function(a,b,c){return null};DvtDCEH.prototype.getPlotRect=function(){return null};DvtDCEH.prototype.getSeriesColor=function(a){return"black"};DvtDCEH.prototype.getTooltipText=function(a){return"Base class should override"};
DvtDCEH.prototype.getTargetSeriesIndex=function(a){return-1};DvtDCEH.prototype.findMatches=function(a,b,c,d,e,f){return null};
DvtDCEH.prototype.getClosestMatch=function(a,b,c,d){var e=this._horizontal,f=this._useAllInGroup,g=this._isNumericMainAxis,h=this.getTargetSeriesIndex(c),k=[];if(c=this.findMatches(a,b,c,k,d,h))return c;c=DvtDCEH.GetClosestMatchesFirstDirection(k,e,a,b);if(!g){g=1E6;d=-1E6;for(var m=null,h=0;h<c.length;h++)m=c[h],g=Math.min(g,e?m.matchRegion.y:m.matchRegion.x),d=Math.max(d,e?m.matchRegion.y+m.matchRegion.h:m.matchRegion.x+m.matchRegion.w),m=m.gidx;for(h=0;h<k.length;h++){var n=k[h],p=n.gidx;f?m==
p&&c.push(n):(p=((e?n.matchRegion.y:n.matchRegion.x)+(e?n.matchRegion.y+n.matchRegion.h:n.matchRegion.x+n.matchRegion.w))/2,d>=p&&g<=p&&c.push(n))}}return DvtDCEH.GetClosestMatchSecondDirection(c,e,a,b)};DvtDCEH.getGlobalBounds=function(a){var b=a.getDimensions(a.getParent());a=a.getParent().localToStage(new DvtPoint(b.x,b.y));b.x=a.x;b.y=a.y;return b};
var DvtGraphDCEH=function(a){this._Init(a)};DvtObj.createSubclass(DvtGraphDCEH,DvtDCEH,"DvtGraphDCEH");DvtGraphDCEH.prototype._Init=function(a){DvtGraphDCEH.superclass._Init.call(this,a.getCtx(),a.getDataCursor());this._Chart=a;this._horizontal=a.isHorizontal();this._useAllInGroup=a.isArea()||a.isLineChart()||a.isStockChart();this._isNumericMainAxis=a.isBubbleChart()||a.isScatterChart();this._threeDHorizontalOffset=a._threeDHorizontalOffset;this._isStockChart=a.isStockChart()};
DvtGraphDCEH.prototype.getPlotRect=function(){return this._Chart.getFrameRect()};DvtGraphDCEH.prototype.getActionablePlotRect=function(a,b,c){return DvtGraphEventUtils.getActionablePlotRect(this._Chart,a,b,c)};DvtGraphDCEH.prototype.getSeriesColor=function(a,b){return this._Chart.getSeriesColor(a)};DvtGraphDCEH.prototype.getTooltipText=function(a){a=DvtGraphEventUtils.GetDataCursorTooltip(this._Chart,a);return DvtGraphParser.convertLineBreaks(a)};
DvtGraphDCEH.prototype.getTargetSeriesIndex=function(a){var b=-1;a&&a._Dlo&&(b=a._Dlo.getSeriesIndex());return b};DvtGraphDCEH.prototype.findMatches=function(a,b,c,d,e,f){var g=this._Chart,h=null;return h=this._isStockChart?DvtGraphDCEH.ProcessClosestStockMatches(g,c,e,d,this._isNumericMainAxis,this._horizontal):DvtGraphDCEH.ProcessClosestMatches(g,c,e,d,this._isNumericMainAxis,this._horizontal,a,b,f)};
DvtGraphDCEH.ProcessClosestStockMatches=function(a,b,c,d,e,f){for(key in a._stockMarkersMap)for(var g=a._stockMarkersMap[key],h=0;h<g.length;h++){var k=g[h],m=k._Dlo;if(m.getObjId()==DvtGraphObjType.STOCK_RISER||m.getObjId()==DvtGraphObjType.STOCK_RISING_RISER||m.getObjId()==DvtGraphObjType.STOCK_FALLING_RISER||m.getObjId()==DvtGraphObjType.STOCK_VOLUME_RISER){var n=DvtDCEH.getGlobalBounds(k),m={obj:k,matchRegion:n,gidx:m.getGroupIndex(),sidx:m.getSeriesIndex(),marker:null};if(DvtDCEH.AddPotentialMatch(d,
m,c,f)&&!e&&k==b)return m}}};
DvtGraphDCEH.ProcessClosestMatches=function(a,b,c,d,e,f,g,h,k){var m=DvtGraphDCEH.GetSearchableRisers(a);if(null!=m)for(var n=0;n<m.length;n++){var p=m[n];if(null!=p)for(var q=0;q<p.length;q++){var r=p[q];if(r){var t=r._Dlo,v=t.getSeriesIndex();if(!a.isHSSeriesSupported()||a.isSeriesVisible(v)){var u=null,w=null,z=null,y=r;if(t&&t.isMultiRiser()){t=[];r._aLMarkers&&(t=t.concat(r._aLMarkers));var A=a.getHiddenMarkers();A&&(A=A[v])&&(t=t.concat(A));if(0<t.length)for(var C=1E6,A=0;A<t.length;A++){var B=
t[A],E=DvtDCEH.getGlobalBounds(B),D=Math.abs(g-(E.x+E.w/2));D<C&&(w=B._Dlo.getGroupIndex(),y=B,u=E,C=D)}else t=DvtGraphEventUtils.GetClosestLinePoint(a,g,h,r,v),null!=t&&(u=new DvtRectangle(t.x-3,t.y-3,6,6),w=t.gidx,z=t.marker)}t=-1;null!=u?t=v:(r instanceof Dvt3DBar&&(y=r.getFront()),u=E=DvtDCEH.getGlobalBounds(y),w=y._Dlo.getGroupIndex());v={obj:y,matchRegion:u,gidx:w,sidx:v,marker:z};if(DvtDCEH.AddPotentialMatch(d,v,c,f)&&!e){if(-1!=k&&-1!=t&&t==k)return v;u=[];u.push(r);u.push(y);r instanceof
Dvt3DBar&&(u.push(r.getSide()),u.push(r.getTop()));for(A=0;A<u.length;A++)if(u[A]==b)return v}}}}}};DvtGraphDCEH.GetSearchableRisers=function(a){var b=a.getRisers(),c=a.getCurrentSeries();null!=c&&0<=c&&(b=[],b.push(a.getSeriesRisers(c)));return b};
var DvtTooltipHelper=function(a){this._Init(a)};DvtObj.createSubclass(DvtTooltipHelper,DvtObj,"DvtTooltipHelper");DvtTooltipHelper.MAX_DISTANCE=3;DvtTooltipHelper.prototype.addMarker=function(a){this._arMarkers.push(a)};DvtTooltipHelper.prototype.getMarkers=function(a){var b;if(this._arMarkers){b=[];for(var c=this._arMarkers.length,d=0;d<c;d++){var e=this._arMarkers[d];e.getSeriesIndex()===a&&b.push(e)}}return b};
DvtTooltipHelper.prototype.findMatch=function(a,b){var c=null;this._arMarkers&&0<this._arMarkers.length&&this._findGlobalMatch(a,b)&&(this._obj.marker=this._marker,this._obj.sidx=this._sidx,this._obj.gidx=this._gidx,c=this._obj);return c};DvtTooltipHelper.prototype._findGlobalMatch=function(a,b){for(var c=!1,d=this._arMarkers.length-1;0<=d;d--){var e=this._arMarkers[d],c=this._Chart.getScrollOffset(e.getHandleId());if(c=this._findLocalMatch(a-c.x,b-c.y,e)){this._marker=e;break}}return c};
DvtTooltipHelper.prototype._findLocalMatch=function(a,b,c){var d=c.getCoords(),e=0,f=d.length;for(DvtAgent.isRightToLeft()&&2<d.length&&(d=this._bidiFlip(d.slice(0)));f>=e;){var g=(e+f)/2;1===g%2&&--g;if(Math.abs(a-d[g])<=DvtTooltipHelper.MAX_DISTANCE)return this._linearSearch(a,b,c,g);if(g===e||g===f)break;else a>d[g]?e=g+2:f=g}return null};
DvtTooltipHelper.prototype._Init=function(a){this._Chart=a;this._arMarkers=[];this._gidx=this._sidx=-1;this._tooltip=this._marker=null;this._obj={marker:null,sidx:null,gidx:null}};
DvtTooltipHelper.prototype._linearSearch=function(a,b,c,d){var e=c.getCoords(),f;DvtAgent.isRightToLeft()&&2<e.length&&(e=this._bidiFlip(e.slice(0)));var g=!1,h=16777215,k=c.getSeriesIndex(),m=0,n,p;for(f=d;0<=f&&!(n=Math.abs(a-e[f]),p=Math.abs(b-e[f+1]),n>DvtTooltipHelper.MAX_DISTANCE||n>h);f-=2)if(p<=DvtTooltipHelper.MAX_DISTANCE){h=e[f];m=c.getGroupIndex()+f/2;g=!0;break}var q=e.length-1;for(f=d+2;f<=q&&!(n=Math.abs(a-e[f]),p=Math.abs(b-e[f+1]),n>DvtTooltipHelper.MAX_DISTANCE||n>h);f+=2)if(p<=
DvtTooltipHelper.MAX_DISTANCE){m=c.getGroupIndex()+f/2;g=!0;break}g&&DvtAgent.isRightToLeft()&&2<e.length?(this._sidx=k,this._gidx=e.length/2-m-1):g&&(this._sidx=k,this._gidx=m);return g};DvtTooltipHelper.prototype._bidiFlip=function(a){var b,c,d,e=a.length;for(b=0;b<e/2;b+=2)c=a[b],d=a[b+1],a[b]=a[e-b-2],a[b+1]=a[e-b-1],a[e-b-2]=c,a[e-b-1]=d;return a};
var DvtGraphKeyboardHandler=function(a){this.Init(a)};DvtObj.createSubclass(DvtGraphKeyboardHandler,DvtObj,"DvtGraphKeyboardHandler");DvtGraphKeyboardHandler.prototype.Init=function(a){this._chart=a};
DvtGraphKeyboardHandler.prototype.processKeyDown=function(a){var b=a.keyCode,c=this._chart.getZoomButton();if(c&&c.getButtonState()==DvtZoomButton.BUTTON_STATE_UP)a.preventDefault(),c.drawOverState();else if(b==DvtKeyboardEvent.CONTROL||b==DvtKeyboardEvent.SHIFT||b==DvtKeyboardEvent.PAGE_UP||b==DvtKeyboardEvent.PAGE_DOWN)a.preventDefault(),this._handlePanKeyboard(a,!0);else if(b==DvtKeyboardEvent.ENTER||b==DvtKeyboardEvent.UP_ARROW||b==DvtKeyboardEvent.DOWN_ARROW||b==DvtKeyboardEvent.LEFT_ARROW||
b==DvtKeyboardEvent.RIGHT_ARROW||b==DvtKeyboardEvent.ESCAPE)a.preventDefault(),this._handleZoomKeyboard(a)};DvtGraphKeyboardHandler.prototype._handlePanKeyboard=function(a,b){this._chart.getPanMode()!=DvtGraphPanHandler.PAN_OFF&&b&&this._handlePanKeyboardHelper(a)};
DvtGraphKeyboardHandler.prototype._handlePanKeyboardHelper=function(a){var b=0,c=0,d=this._chart.getFrameRect(),e=DvtAgent.isRightToLeft();a.keyCode==DvtKeyboardEvent.PAGE_UP?a.shiftKey?b=e?d.w:-d.w:c=-d.h:a.keyCode==DvtKeyboardEvent.PAGE_DOWN&&(a.shiftKey?b=e?-d.w:d.w:c=d.h);this._chart.isVertical()?this._chart.getHandleManager().scrollPlotAreaOffset(b,b,c,c,null,!0,!0):this._chart.getHandleManager().scrollPlotAreaOffset(c,c,b,b,null,!0,!0)};
DvtGraphKeyboardHandler.prototype._handleZoomKeyboard=function(a){var b=this._chart.getZoomButton();b&&b.processKeyboardEvent(a)};
var DvtGraphEventUtils=function(){};DvtObj.createSubclass(DvtGraphEventUtils,DvtObj,"DvtGraphEventUtils");DvtGraphEventUtils.getId=function(a,b){return a+"~:"+b};DvtGraphEventUtils.GetMarkerTooltip=function(a,b,c){var d=a.getMarkerTooltipHelper();return d?(b=d.findMatch(b,c))?DvtGraphEventUtils.GetMarkerTooltipSeriesGroup(a,b.marker,b.sidx,b.gidx):null:null};DvtGraphEventUtils.GetMarkerTooltipSeriesGroup=function(a,b,c,d){return b?b.getTooltip(c,d):null};
DvtGraphEventUtils.GetClosestLinePoint=function(a,b,c,d,e){c=1E4;d=null;var f=a.getMarkerTooltipHelper();if(!f)return null;e=f.getMarkers(e);for(var g=f=null,h=null,k=0;k<e.length;k++)for(var m=e[k],n=a.getScrollOffset(m.getHandleId()),p=m.getCoords(),q=0;q<p.length;q+=2){var r=p[q]+n.x,t=p[q+1]+n.y,v=Math.abs(b-r);v<c&&(c=v,d=m.getGroupIndex()+q/2,f=r,g=t,h=m)}return{x:f,y:g,gidx:d,marker:h}};
DvtGraphEventUtils.GetTooltipText=function(a,b,c,d){if(!b||!a)return null;var e=null;if(b&&b.isMultiRiser()&&(e=DvtGraphEventUtils.GetMarkerTooltip(a,c,d),!e))return null;e||(e=a.makeTooltip(b));return e};DvtGraphEventUtils.GetDataCursorTooltip=function(a,b){var c=b.obj;if(!c)return null;var d=null;if((c=c._Dlo)&&c.isMultiRiser()&&(d=DvtGraphEventUtils.GetMarkerTooltipSeriesGroup(a,b.marker,b.sidx,b.gidx),!d))return null;d||(d=a.makeTooltip(c));return d};
DvtGraphEventUtils.isLegendMarker=function(a){if(!a||!a.getObjId)return!1;a=a.getObjId();return a===DvtGraphObjType.LEGEND_MARKER||a===DvtGraphObjType.LEGEND_TEXT?!0:!1};DvtGraphEventUtils.isBar=function(a){return a?a.getObjId()===DvtGraphObjType.BAR_RISER:!1};
DvtGraphEventUtils.HighlightSeries=function(a,b,c,d){var e=d?.35:1,f=a.getDLOs(),g=f.length;if(c)for(c=0;c<g;c++){var h=f[c];if(0<=h.getSeriesIndex()&&h.getSeriesIndex()!=b&&(h=h.getDetObj()))if(d)null==h._oldAlpha&&(h._oldAlpha=h.getAlpha()),h.getAlpha()>e&&h.setAlpha(e);else if(!d){var k=null!=h._oldAlpha?h._oldAlpha:e;h.getAlpha()<k&&h.setAlpha(k)}}d=d?DvtCategoryRolloverEvent.TYPE_OVER:DvtCategoryRolloverEvent.TYPE_OUT;b=a.getDataObj().getSeriesFromIndex(b);b=new DvtCategoryRolloverEvent(d,b);
a.processEvent(b,this)};DvtGraphEventUtils.HighlightSplitSeries=function(a,b,c,d){d=d?.35:1;a=a.getDLOs();var e=a.length;if(c)for(c=0;c<e;c++){var f=a[c],g=f.getSeriesIndex();if(0<=g){for(var h=!0,k=0;k<b.length;k++)b[k]==g&&(h=!1);h&&(f=f.getDetObj())&&f.setAlpha(d)}}};DvtGraphEventUtils.UnhighlightAllSeries=function(a){DvtGraphEventUtils.HighlightSeries(a,-1,!0,!1)};
DvtGraphEventUtils.HighlightMiscLegend=function(a,b,c,d){d=d?.35:1;if(c){if(c=a.getMiscLegends())for(i=0;i<c.length;i++){var e=c[i],f=e._Dlo.getMiscId();b!==f&&e.setAlpha(d)}if(c=a.getLegends())for(i=0;i<c.length;i++)for(a=0;a<c[i].length;a++)c[i][a].setAlpha(d)}};
DvtGraphEventUtils.HighlightSplitSeriesLegend=function(a,b,c,d){d=d?.35:1;var e=a.getLayers(),f=!0;if(c)for(a=a.getMiscLegends(),i=0;i<a.length;i++){c=a[i];for(var g=c._Dlo.getMiscId(),g=e[g],h=0;h<g.length;h++)b==g[h]&&(f=!1);f&&c.setAlpha(d);f=!0}};
DvtGraphEventUtils.HighlightUnderlay=function(a,b,c,d,e){c=c?.35:1;a=a.getDLOs();var f=a.length;if(b)for(b=0;b<f;b++){var g=a[b];if(0<=g.getSeriesIndex()){var h=g.getDetObj();null!==e&&void 0!==e?g.getUnderlayType()!==e&&h&&h.setAlpha(c):d&&g.getUnderlayFC()!==d&&h&&h.setAlpha(c)}}};DvtGraphEventUtils.getFirstLegendItem=function(a){return(a=a.getLegends())&&0<a.length?a[0][0]:null};
DvtGraphEventUtils.getLegendFromPosition=function(a,b,c){var d=b=null,e=1E5;if(a=a.getLegends())for(var f=a.length,g=0;g<f;g++){var h=a[g];if(void 0!==h){var k=h[0],m=k.getDimensions().y,n=k.getDimensions().h,m=Math.floor(Math.abs(m+n/2-c));m<e&&(b=k,d=h[1],e=m)}}return{marker:b,text:d}};DvtGraphEventUtils.isActionablePlotPosition=function(a,b,c,d){return null!=DvtGraphEventUtils.getActionablePlotRect(a,b,c,d)};
DvtGraphEventUtils.getActionablePlotRect=function(a,b,c,d){return a._topPlotRect.containsPoint(b,c)?a._topPlotRect:a._bottomPlotRect.containsPoint(b,c)?a._bottomPlotRect:null};DvtGraphEventUtils.isNonLegendData=function(a){return a&&null!==a.getCategories()[0]&&!DvtGraphEventUtils.isLegendMarker(a)?!0:!1};
var DvtGraphPanHandler=function(a,b,c,d){this.m_ctrlDown=this.m_bIsPanning=!1;this.m_chart=b;this.x=c.x;this.y=c.y;this.m_w=c.w;this.m_h=c.h;this.m_panMode=d;this.m_panMode!=DvtGraphPanHandler.PAN_OFF&&(this.m_bIsPanning=!0)};DvtGraphPanHandler.PAN_OFF=0;DvtGraphPanHandler.PAN_AUTO=1;DvtGraphPanHandler.PAN_TOUCH_KEY="panTouch";DvtObj.createSubclass(DvtGraphPanHandler,DvtObj,"DvtGraphPanHandler");DvtGraphPanHandler.prototype.enablePanning=function(a){this.m_bIsPanning=a};
DvtGraphPanHandler.prototype.removeCursor=function(){this.m_chart.setCursor("default")};DvtGraphPanHandler.prototype.isCursorInPlotArea=function(a){return 0<=this.m_mouseX&&this.m_mouseX<=this.m_w&&0<=this.m_mouseY&&this.m_mouseY<=this.m_h?!0:!1};
DvtGraphPanHandler.prototype.processDragStart=function(a,b){this.m_mouseX=a.x-this.x;this.m_mouseY=a.y-this.y;if(!this.m_bIsPanning||!this.isCursorInPlotArea(b))return!1;this.m_bMouseDown=!0;this.m_iStartPosX=this.m_mouseX;this.m_iStartPosY=this.m_mouseY;this.m_prevPosX=this.m_mouseX;this.m_prevPosY=this.m_mouseY;this.m_bIsPanning&&this.updateCursor();return!0};
DvtGraphPanHandler.prototype.processDragMove=function(a){this.m_mouseX=a.x-this.x;this.m_mouseY=a.y-this.y;return this.m_bIsPanning?this.handlePanMouseMove():!1};DvtGraphPanHandler.prototype.processDragMoveDelta=function(a){a=new DvtPoint(this.m_mouseX+this.x+a.deltaX,this.m_mouseY+this.y+a.deltaY);this.processDragMove(a)};
DvtGraphPanHandler.prototype.handlePanMouseMove=function(){if(!this.m_bMouseDown)return!1;this.updateCursor();var a=this.m_mouseX,b=this.m_mouseY;this.m_mouseX>this.m_w&&(a=this.m_w);0>this.m_mouseX&&(a=0);this.m_mouseY>this.m_h&&(b=this.m_h);0>this.m_mouseY&&(b=0);var c=a-this.m_prevPosX,d=b-this.m_prevPosY;this.m_prevPosX=a;this.m_prevPosY=b;this.m_chart.isVertical()?this.m_chart.getHandleManager().scrollPlotAreaOffset(-c,-c,-d,-d,new DvtPoint(this.x+a,this.y+b)):this.m_chart.getHandleManager().scrollPlotAreaOffset(-d,
-d,-c,-c,new DvtPoint(this.x+a,this.y+b));return!0};DvtGraphPanHandler.prototype.processDragEnd=function(a){this.m_mouseX=a.x-this.x;this.m_mouseY=a.y-this.y;this.m_bMouseDown&&(this.m_bMouseDown=!1,this.m_bIsPanning&&this.handlePanMouseUp())};DvtGraphPanHandler.prototype.handlePanMouseUp=function(){this.updateCursor();this.m_chart.getHandleManager().dispatchJSEvents()};
DvtGraphPanHandler.prototype.updateCursor=function(a){this.isCursorInPlotArea(null)?this.m_bIsPanning&&this.m_bMouseDown?(a=DvtSelectionEffectUtils.getSelectingCursor(),this.m_chart.setCursor(a)):this.removeCursor():this.removeCursor()};DvtGraphPanHandler.prototype.isCurrentlyPanning=function(){return this.m_bMouseDown};
var DvtGraphMarqueeHandler=function(a,b,c,d){this.Init(a,b,c,d)};DvtGraphMarqueeHandler.PANEL_BEHAVIOR_BOTH=0;DvtGraphMarqueeHandler.PANEL_BEHAVIOR_HORIZ=1;DvtGraphMarqueeHandler.PANEL_BEHAVIOR_VERT=1;DvtObj.createSubclass(DvtGraphMarqueeHandler,DvtObj,"DvtGraphMarqueeHandler");
DvtGraphMarqueeHandler.prototype.Init=function(a,b,c,d){this._context=a;this._rootDisplayable=b;this._panelBehavior=DvtGraphMarqueeHandler.PANEL_BEHAVIOR_BOTH;d&&(this._panelBehavior=d);this.m_iBandWidth=1;this.m_iBandColor="#c0c0c0";this.x=c.x;this.y=c.y;this.m_w=c.w;this.m_h=c.h;this._isMarqueeEnabled=!0;this.InitMarqueePanel()};DvtGraphMarqueeHandler.prototype.isMarqueeEnabled=function(){return this._isMarqueeEnabled};
DvtGraphMarqueeHandler.prototype.enableMarquee=function(a){this._isMarqueeEnabled=a};DvtGraphMarqueeHandler.prototype.InitMarqueePanel=function(){var a=new DvtGraphMarqueePanel(this._context);a.setVisible(!1);this._panel=a;this._rootDisplayable.addChild(a)};DvtGraphMarqueeHandler.prototype.isInBounds=function(a){return 0<=this.m_mouseX&&this.m_mouseX<=this.m_w&&0<=this.m_mouseY&&this.m_mouseY<=this.m_h?!0:!1};
DvtGraphMarqueeHandler.prototype.cancelMarqueeZoom=function(){this.removeCursor();this.m_bMouseDown=!1;var a=this._panel;a&&a.setVisible(!1)};DvtGraphMarqueeHandler.prototype.processDragStart=function(a,b){this.m_mouseX=a.x-this.x;this.m_mouseY=a.y-this.y;if(!this._isMarqueeEnabled||!this.isInBounds(b))return!1;this.m_bMouseDown=!0;this.m_iStartPosX=this.m_mouseX;this.m_iStartPosY=this.m_mouseY;this.m_prevPosX=this.m_mouseX;this.m_prevPosY=this.m_mouseY;return!0};
DvtGraphMarqueeHandler.prototype.processDragMove=function(a){this.m_mouseX=a.x-this.x;this.m_mouseY=a.y-this.y;return this._isMarqueeEnabled?this.handleMarqueeMove():!1};
DvtGraphMarqueeHandler.prototype.handleMarqueeMove=function(){this.updateCursor();if(this.m_bMouseDown){var a=this._panel;this.calcMarqueeCoords();a.setPanelSize(this._panelWidth,this._panelHeight);a.Render();a.setTranslateX(this.x+this._panelX);a.setTranslateY(this.y+this._panelY);a.setBandAttributes(this.m_iBandWidth,this.m_iBandColor);a.setVisible(!0);return!0}return!1};
DvtGraphMarqueeHandler.prototype.processDragEnd=function(a){this.m_mouseX=a.x-this.x;this.m_mouseY=a.y-this.y;this.m_bMouseDown&&(this.m_bMouseDown=!1,this._isMarqueeEnabled&&this.handleMarqueeEnd())};DvtGraphMarqueeHandler.prototype.handleMarqueeEnd=function(){this.removeCursor();this.calcMarqueeCoords();this.HandleMarqueeDone()};DvtGraphMarqueeHandler.prototype.HandleMarqueeDone=function(){};
DvtGraphMarqueeHandler.prototype.calcMarqueeCoords=function(){var a=this.m_mouseX,b=this.m_mouseY;this.m_mouseX>this.m_w&&(a=this.m_w);0>this.m_mouseX&&(a=0);this.m_mouseY>this.m_h&&(b=this.m_h);0>this.m_mouseY&&(b=0);this._panelBehavior==DvtGraphMarqueeHandler.PANEL_BEHAVIOR_BOTH?(this._panelX=Math.min(this.m_iStartPosX,a-1),this._panelY=Math.min(this.m_iStartPosY,b-1),this._panelWidth=Math.abs(a-this.m_iStartPosX),this._panelHeight=Math.abs(b-this.m_iStartPosY)):this._panelBehavior==DvtGraphMarqueeHandler.PANEL_BEHAVIOR_HORIZ?
(this._panelX=Math.min(this.m_iStartPosX,a-1),this._panelY=0,this._panelWidth=Math.abs(a-this.m_iStartPosX),this._panelHeight=this.m_h):this._panelBehavior==DvtGraphMarqueeHandler.PANEL_BEHAVIOR_VERT&&(this._panelX=0,this._panelY=Math.min(this.m_iStartPosY,b-1),this._panelWidth=this.m_w,this._panelHeight=Math.abs(b-this.m_iStartPosY))};DvtGraphMarqueeHandler.prototype.updateCursor=function(){};DvtGraphMarqueeHandler.prototype.removeCursor=function(){};
DvtGraphMarqueeHandler.prototype.isMarqueeHappening=function(){return this.m_bMouseDown};
var DvtGraphMarqueeZoomHandlerBase=function(a,b,c,d,e){this.InitZoom(a,b,c,d,e)};DvtGraphMarqueeZoomHandlerBase.ZOOM_OFF=0;DvtGraphMarqueeZoomHandlerBase.ZOOM_ON=1;DvtGraphMarqueeZoomHandlerBase.ZOOM_AUTO=2;DvtObj.createSubclass(DvtGraphMarqueeZoomHandlerBase,DvtGraphMarqueeHandler,"DvtGraphMarqueeZoomHandlerBase");
DvtGraphMarqueeZoomHandlerBase.prototype.InitZoom=function(a,b,c,d,e){DvtGraphMarqueeZoomHandlerBase.superclass.Init.call(this,a,b,c,e);this.m_bZoomIn=!0;this.m_zoomMode=DvtGraphMarqueeZoomHandlerBase.ZOOM_ON;null!=d&&(this.m_zoomMode=d);this._isMarqueeEnabled=!1;this.m_zoomMode==DvtGraphMarqueeZoomHandlerBase.ZOOM_ON&&(this._isMarqueeEnabled=!0,this.updateCursor())};DvtGraphMarqueeZoomHandlerBase.prototype.processShiftZoom=function(a){a=!a;this.m_bZoomIn!=a&&(this.m_bZoomIn=a,this.updateCursor())};
var DvtGraphMarqueeZoomHandler=function(a,b,c,d,e){this.InitZoom(a,b,c,d,e)};DvtGraphMarqueeZoomHandler.TOK_X="__X__";DvtGraphMarqueeZoomHandler.TOK_Y="__Y__";DvtGraphMarqueeZoomHandler.TOK_W="__W__";DvtGraphMarqueeZoomHandler.TOK_H="__H__";DvtObj.createSubclass(DvtGraphMarqueeZoomHandler,DvtGraphMarqueeZoomHandlerBase,"DvtGraphMarqueeZoomHandler");
DvtGraphMarqueeZoomHandler.prototype.InitZoom=function(a,b,c,d,e){this.m_chart=b;e=DvtGraphMarqueeZoomHandler.convertDirection(e);DvtGraphMarqueeZoomHandler.superclass.InitZoom.call(this,a,b,c,d,e)};DvtGraphMarqueeZoomHandler.convertDirection=function(a){if(a!=DvtGraphCore.DATA_ZOOM_BOTH){if(a==DvtGraphCore.DATA_ZOOM_HORIZ)return DvtGraphMarqueeHandler.PANEL_BEHAVIOR_HORIZ;if(a==DvtGraphCore.DATA_ZOOM_VERT)return DvtGraphMarqueeHandler.PANEL_BEHAVIOR_VERT}return DvtGraphMarqueeHandler.PANEL_BEHAVIOR_BOTH};
DvtGraphMarqueeZoomHandler.prototype.HandleMarqueeDone=function(){this._isMarqueeEnabled=!1;var a=null,b=null,c=null;2>this._panelWidth&&2>this._panelHeight?(this.m_bZoomIn&&null!=this.m_chart._zoomInClickEventJs?a=this.m_chart._zoomInClickEventJs:this.m_bZoomIn||null==this.m_chart._zoomOutClickEventJs||(a=this.m_chart._zoomOutClickEventJs),c=!0):this.m_bZoomIn&&null!=this.m_chart._zoomInRectEventJs?a=this.m_chart._zoomInRectEventJs:this.m_bZoomIn||null==this.m_chart._zoomOutRectEventJs||(a=this.m_chart._zoomOutRectEventJs);
var b=this._panelX+this.x,d=this._panelY+this.y;if(null!=a&&(b=a.replace(DvtGraphMarqueeZoomHandler.TOK_X,b),b=b.replace(DvtGraphMarqueeZoomHandler.TOK_Y,d),c||(b=b.replace(DvtGraphMarqueeZoomHandler.TOK_W,this._panelWidth),b=b.replace(DvtGraphMarqueeZoomHandler.TOK_H,this._panelHeight)),null!=b)){var e=b.match(/'(.*?)'/g),a=e[0].replace(/\'/g,""),c=e[2].replace(/\'/g,""),d=e[3].replace(/\'/g,""),b=e[4].replace(/\'/g,"");if(5<e.length){var f=e[5].replace(/\'/g,""),e=e[6].replace(/\'/g,"");AdfPage.PAGE.findComponent(a).getPeer().sendToServerPPR({source:a,
event:c,bi_gdzX:d,bi_gdzY:b,bi_gdzW:f,bi_gdzH:e})}else AdfPage.PAGE.findComponent(a).getPeer().sendToServerPPR({source:a,event:c,bi_gdzX:d,bi_gdzY:b})}};DvtGraphMarqueeZoomHandler.prototype.updateCursor=function(){this.isInBounds(null)?this._isMarqueeEnabled?(this.m_bMouseDown&&DvtSelectionEffectUtils.getSelectingCursor(),this.m_chart.setCursor("pointer")):this.removeCursor():this.removeCursor()};DvtGraphMarqueeZoomHandler.prototype.removeCursor=function(){this.m_chart.setCursor("default")};
var DvtGraphDragSource=function(a,b){this.Init(b);this._graph=a;this._pointerOffset=null};DvtObj.createSubclass(DvtGraphDragSource,DvtDragSource,"DvtGraphDragSource");DvtGraphDragSource.prototype.setDragCandidate=function(a){a=a&&a.getDetObj?a.getDetObj():null;DvtGraphDragSource.superclass.setDragCandidate.call(this,a)};
DvtGraphDragSource.prototype.getDragContext=function(a,b){return this.getDragObject()&&this._graph?this._graph.getDragContext(a,b):DvtGraphDragSource.superclass.getDragContext.call(this,a,b)};DvtGraphDragSource.prototype.getDragOffset=function(a,b){var c=null;if(this.getDragObject()&&this._graph){var d=this._graph.getDragFeedbackBounds();d&&(c={},c.x=a-d.x,c.y=b-d.y,c.x+=DvtDragSource.DRAG_FEEDBACK_MARGIN,c.y+=DvtDragSource.DRAG_FEEDBACK_MARGIN)}return c};
DvtGraphDragSource.prototype.getPointerOffset=function(a,b){this._pointerOffset={x:a,y:b};this._graph&&1<this._graph.getSelectionHandler().getSelection().length&&(this._pointerOffset.x=0,this._pointerOffset.y=0);return this._pointerOffset};DvtGraphDragSource.prototype.__getPointerOffset=function(){return this._pointerOffset};
var DvtGraphDropTarget=function(a){this._graph=a};DvtObj.createSubclass(DvtGraphDropTarget,DvtDropTarget,"DvtGraphDropTarget");DvtGraphDropTarget.prototype.acceptDrag=function(a,b,c){return this._graph?this._graph.acceptDrag(a,b,c):DvtGraphDropTarget.superclass.acceptDrag.call(this,a,b,c)};DvtGraphDropTarget.prototype.dragEnter=function(){return this._graph?this._graph.dragEnter():DvtGraphDropTarget.superclass.dragEnter.call(this)};
DvtGraphDropTarget.prototype.dragExit=function(){return this._graph?this._graph.dragExit():DvtGraphDropTarget.superclass.dragExit.call(this)};DvtDropTarget.prototype.getDropSite=function(a,b){return this._graph?this._graph.getDropSite(a,b):DvtGraphDropTarget.superclass.getDropSite.call(this,a,b)};
var DvtGraphParser=function(a,b,c){this._Init(b,a,c)};DvtObj.createSubclass(DvtGraphParser,DvtObj,"DvtGraphParser");DvtGraphParser.NEW_LINE="~@";DvtGraphParser.MD_GROUP_SEPARATOR="~;";DvtGraphParser.MD_MACROVAL_SEPARATOR="~;";DvtGraphParser.MD_D_SEPARATOR="~:";DvtGraphParser.MD_DATAVAL_SEPARATOR=",";DvtGraphParser.MD_VF_SEPARATOR="~;";DvtGraphParser.MD_TT_SEPARATOR="~;";DvtGraphParser.MD_SEL_SERIES_SEPARATOR="~;";DvtGraphParser.MD_SEL_GROUP_SEPARATOR="~:";DvtGraphParser.cATTR_X1IN="x1in";
DvtGraphParser.cATTR_X1OUT="x1out";DvtGraphParser.cATTR_Y1IN="y1in";DvtGraphParser.cATTR_Y1OUT="y1out";DvtGraphParser.cATTR_Y2IN="y2in";DvtGraphParser.cATTR_Y2OUT="y2out";DvtGraphParser.cATTR_X1ACTUAL="x1actual";DvtGraphParser.cATTR_Y1ACTUAL="y1actual";DvtGraphParser.cATTR_Y2ACTUAL="y2actual";DvtGraphParser.cATTR_ALLACTUAL="allactual";DvtGraphParser.TRUE="t";DvtGraphParser.COMMA=",";DvtGraphParser.PLOTAREACLIP="plotAreaClip";DvtGraphParser._MIN_TOUCH_MARKER_SIZE=16;
DvtGraphParser.prototype._Init=function(a,b,c){this._ctx=b;this._Chart=a;this._anim=c;this._bBiDi=!1;this._3DBarCurRiser=this._a3DCurBar=this._3DBars=this._aY2Labels=this._aY1Labels=this._aXLabels=this._FrameSep=this._aY2GridLines=this._aY1GridLines=this._aXGridLines=this._Data=this._DataSummary=this._XAxis=this._Y2Axis=this._Y1Axis=this._aHMarkers=this._aMiscLegends=this._aLegends=this._aRisers=this._type=null;this._iCurBarGroup=this._iCurBarSeries=-1;this._aRefTo=this._aRefFrom=this._pieChart=null;
this._bNeedRefObjHandler=!1;this._aForClipResolution=null;this._bHavePlotArea=!1;this._cacheFillType=this._cacheGroupId=this._cacheSeriesIndex=this._cacheSeriesId=this._cacheObjId=this._HSS=null;this._cacheBorderColor="#000000";this._cacheBorderAlpha=1;this._cacheColor=null;this._cacheColorAlpha=1;this._cacheFillColor="#000000";this._cacheFillAlpha=1;this._cacheGradStops=null;this._cacheGradDir="gdRi";this._cacheMarkerType=this._cacheMarkerSizes=this._cacheShadowObj=this._cacheShadow=this._cacheGradCustom=
this._cacheGradAngle=null;this._bCacheUseTooltipTemplate=this._bCacheMouseTransparency=!1;this._cacheTextAngle=0;this._cacheTextJustify="l";this._workRect=new DvtRectangle;this._workLW=this._workBA=this._workBC=this._workFA=this._workFC=this._workCA=this._workC=this._sTooltipTemplate=this._bCacheUseTooltipTemplate=null;this._workLS=DvtStroke.SOLID;this._pieLabelPos=this._pieFeelerColor=this._pieLabelType=this._workImgDsplyMode=this._workImgURL=this._workDash=null;this._pieFrameH=this._pieFrameW=this._pieFrameY=
this._pieFrameX=0;this._bPieAutoExplode=!1;this._pieSliceLabelVF=this._arPieSliceLabels=null;this._pieExplodeAll=!0;this._selectJS=this._initSelections=null;this._arMacros="S G X Y Z XM YM ZM CUMSTKV CUMPCTV PIEPCTV HV LV OV CV VV PV AV TV ON OD OID OIN OM LM HM CM AUV TUV".split(" ");this.ATTR_XAVF="XAVF";this.ATTR_YAVF="YAVF";this.ATTR_Y2AVF="Y2AVF";this._iSIndex=0;this._iGIndex=1;this._iXIndex=2;this._iYIndex=3;this._iZIndex=4;this.VF="VF";this.XL="XL";this.YL="YL";this.ZL="ZL";this.RADS_PER_DEGREE=
Math.PI/180;this.DEGREES_PER_RAD=180/Math.PI;this.LINEMARKER_HALFSIZE=3;this._invisFill=DvtSolidFill.invisibleFill();this._bevelMap=this._shadowMap=this._pie3DFacesMap=this._stockMarkersMap=null;this._linkColor="#0000ff";this._tempLayers=this._currentHandleId=null};DvtGraphParser.prototype._addHiddenMarker=function(a){this._aHMarkers||(this._aHMarkers=Array(this._Chart.getSeriesCount()));var b=a._Dlo._seriesIdx;this._aHMarkers[b]||(this._aHMarkers[b]=[]);this._aHMarkers[b].push(a)};
DvtGraphParser.prototype._addLegend=function(a){var b=a._Dlo;this._aLegends||(this._aLegends=[]);var c=b.getSeriesIndex();0<=c?(this._aLegends[c]||(this._aLegends[c]=[]),b=b.getObjId()===DvtGraphObjType.LEGEND_MARKER?0:1,this._aLegends[c][b]=a):(this._aMiscLegends||(this._aMiscLegends=[]),this._aMiscLegends.push(a))};
DvtGraphParser.prototype._addMarker=function(a){var b=a._Dlo._seriesIdx;if(this._aRisers&&(b=this._aRisers[b]))for(var c=b.length,d=0;d<c;d++){var e=b[d],f=e._Dlo._objId;if(f===DvtGraphObjType.LINE_RISER||f===DvtGraphObjType.AREA_RISER||f===DvtGraphObjType.LINE_RISER_TOP)e._aLMarkers||(e._aLMarkers=[]),e._aLMarkers.push(a)}};
DvtGraphParser.prototype._addRiser=function(a){this._aRisers||(this._aRisers=Array(this._Chart.getSeriesCount()));var b=a._Dlo._seriesIdx;this._aRisers[b]||(this._aRisers[b]=[]);this._aRisers[b].push(a)};DvtGraphParser.prototype._addToReferredFrom=function(a,b){this._aRefFrom||(this._aRefFrom=[]);this._aRefFrom.push(a);this._aRefFrom.push(b)};DvtGraphParser.prototype._addToReferredTo=function(a){this._aRefTo||(this._aRefTo=[]);this._aRefTo.push(a)};
DvtGraphParser.prototype._buildHSSeriesState=function(){if(this._HSS){var a=this._HSS.split(";"),b=a[0],a=a.slice(1,a.length),c=Array(this._Chart.getSeriesCount()),d=c.length,e=0,f;if(0===b.length)for(f=0;f<d;f++)c[f]=!0,e++;else{var g=b.length;g>d&&(g=d);for(f=0;f<g;f++)(c[f]="f"===b.charAt(f))&&e++;if(g<d)for(;f<d;f++)c[f]=!0,e++}this._Chart.setHSSState(c,e);if(a[0]){b=[];for(f=0;f<a.length;f++)c=DvtArrayUtils.getIndex(this._tempLayers,a[f]),-1!=c&&b.push(c);this._Chart.setHSLegendMiscId(b)}}};
DvtGraphParser.prototype._checkTooltipTemplate=function(a){a=a.getAttribute("tt");null!==a&&0<a.length&&(this._bCacheUseTooltipTemplate=a.charAt(0)===DvtGraphParser.TRUE&&this._Data.hasTooltipTemplate())};
DvtGraphParser.prototype._computeCustomAngleAndStops=function(a,b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h,k,m;m=a.indexOf(",");b=parseInt(a.substring(0,m));k=a.indexOf(",",++m);h=parseInt(a.substring(m,k));m=a.indexOf(",",++k);k=parseInt(a.substring(k,m));m=parseInt(a.substring(++m));a=b!==k?Math.atan2(m-h,k-b)*this.DEGREES_PER_RAD:h>=m?90:-90;var n=new DvtPoint(b,h),p=new DvtPoint(k,m),q=new DvtPoint(d,e),r=new DvtPoint(d+f,e),t=DvtLineUtils.intersect2Lines(n,p,q,r);q.y=e+g;r.x=d+f;r.y=q.y;g=DvtLineUtils.intersect2Lines(n,
p,q,r);q.y=e;r.x=d;e=DvtLineUtils.intersect2Lines(n,p,q,r);q.x=d+f;r.x=q.x;var d=DvtLineUtils.intersect2Lines(n,p,q,r),v,u,w,z,f=!1;null!==t&&(f=!0,u=t.x,w=t.y);null!==g&&(f?(v=g.x,z=g.y):(f=!0,u=g.x,w=g.y));null!==e&&(f?(v=e.x,z=e.y):(u=e.x,w=e.y));null!==d&&(u=d.x,w=d.y);d=DvtLineUtils.lineLen(b,h,k,m);f=DvtLineUtils.lineLen(u,w,v,z);e=DvtLineUtils.lineLen(b,h,u,w);u=DvtLineUtils.lineLen(k,m,u,w);v=e<u?e:DvtLineUtils.lineLen(b,h,v,z);for(m=0;m<c.length;m++)z=c[m],z=(z*d+v)/f,1<z?z=1:0>z&&(z=0),
c[m]=z;return a};DvtGraphParser.prototype._findRisersForSeries=function(a){var b=null;this._aRisers&&this._aRisers[a]&&(b=this._aRisers[a]);return b};
DvtGraphParser.prototype.parse=function(a){if(a){var b=a.substring(0,40),c=b.indexOf("version\x3d");0<=c&&parseFloat(b.substr(c+9));c=b.indexOf("bidi\x3d");0<=c&&(this._bBiDi=b.charAt(c+6)===DvtGraphParser.TRUE,this._Chart.setBiDi(this._bBiDi));a=a.replace(/>[\n\r]/gi,"\x3e");a=a.replace(/[\n\r]+/gi,DvtGraphParser.NEW_LINE);DvtGraphParser.NEW_LINE==a.substring(a.length-2)&&(a=a.substring(0,a.length-2));c=!1;b=null;a=(new DOMParser).parseFromString(a,"text/xml");var d=a.getElementsByTagName("graph");
if(!d||1!==d.length)if((d=a.getElementsByTagName("gaugeSet"))&&1===d.length)c=!0;else return!1;this._DataSummary=new DvtDataSummary(this._Chart);a=d[0];this._type=a.getAttribute(c?"gaugeType":"graphType");this._Chart._type=this._type;this._stockMarkersMap={};this._pie3DFacesMap={};this._parseGraphTag(a,c);this._parseAnimationAttributes(a,this._Chart);this._Chart.isHorizontal()?this._Chart.setDataCursor(new DvtDataCursor(this._ctx,!0)):this._Chart.setDataCursor(new DvtDataCursor(this._ctx,!1));a.hasChildNodes()&&
(c=a.childNodes)&&(b=this._parseNodes(c));this._parseResources();this._buildHSSeriesState();this._resolveRefObjLinkage();this._resolveClipRects();this._Chart.setDataSummary(this._DataSummary);this._Chart.setRisers(this._aRisers);this._Chart.setLegends(this._aLegends);this._Chart.setMiscLegends(this._aMiscLegends);this._Chart.setHiddenMarkers(this._aHMarkers);this._XAxis&&this._Chart.setXAxis(new DvtGraphAxis(this._Chart,this._XAxis,this._aXGridLines,this._aXLabels));this._XAxis&&this._Chart.setY1Axis(new DvtGraphAxis(this._Chart,
this._Y1Axis,this._aY1GridLines,this._aY1Labels));this._XAxis&&this._Chart.setY2Axis(new DvtGraphAxis(this._Chart,this._Y2Axis,this._aY2GridLines,this._aY2Labels));this._resolveRelatedStockMarkers();this._resolveRelatedPie3DFaces();this._Chart._stockMarkersMap=this._stockMarkersMap;this._pie3DFacesMap=this._stockMarkersMap=null;this._Chart._shadowMap=this._shadowMap;this._Chart._bevelMap=this._bevelMap;this._bevelMap=this._shadowMap=null;if(null!=this._initSelections){a=[];d=this._initSelections.split(DvtGraphParser.MD_SEL_SERIES_SEPARATOR);
for(i=0;i<d.length;i++)for(var e=d[i].split(DvtGraphParser.MD_SEL_GROUP_SEPARATOR),f=e.slice(1),c=0;c<f.length;c++)selectedId=e[0]+"~:"+f[c],a.push(selectedId);this._Chart.setSelectedIds(a)}return b}};DvtGraphParser.prototype._parseContextMenu=function(a){this._Chart.__getContextMenuHandler().add(new DvtDomXmlNode(a))};DvtGraphParser.prototype._parseDatatipFormat=function(a){a=a.getAttribute("fc");a=new DvtSolidFill(a);this._Chart.setDatatipFill(a)};
DvtGraphParser.prototype._parseListNode=function(a){var b=null;if(null===a)return null;var c=a.getAttribute("O");null!==c?this._cacheObjId=c:c=this._cacheObjId;var d=a.nodeName;"l"===d?b=this._parseLine(c,a):"r"===d?b=c===DvtGraphObjType.TIME_SELECTOR?this._parseTimeSelector(c,a):this._parseRect(c,a):"t"===d?b=this._parseText(c,a):"m"===d?b=this._parseMarker(c,a):"pg"===d?b=this._parsePolygon(c,a):"pl"===d?b=this._parsePolyline(c,a):"p"===d?b=this._parsePath(c,a):"c"===d||"o"==d?b=this._parseEllipse(c,
a):"f"===d?(b=this._parseFont(a),this._Chart.addFont(b),b=null):"lm"===d?this._parseLineMarker(c,a):"sl"===d?this._parsePieSlice(c,a):"md"===d?this._parseMetadata(a):"data"===d?this._parseData(a):"pie"==d?this._pieChart=b=this._parsePie(c,a):"ttf"===d?this._parseTooltipFormat(a):"dtf"===d?this._parseDatatipFormat(a):"clipPath"===d?this._parseClipPath(a):"menus"===d?this._parseContextMenu(a):"rs"===d?b=this._parseRangeSlider(c,a):"rszb"===d?this._parseRangeSliderZoomButton(a):"h"===d?b=this._parseHandle(c,
a):"spb"===d?this._parseShowPopupBehavior(a):"scrollableLegend"===d?(c=DvtGraphObjType.SCROLLABLE_LEGEND,b=this._parseScrollableLegend(c,a)):"img"===d?b=this._parseImage(c,a):"dataCursor"===d?this._parseDataCursor(a):"magnifyLens"===d?this._parseMagnifyLens(a):"markerDef"===d&&this._parseMarkerDef(new DvtDomXmlNode(a));return b};
DvtGraphParser.prototype._parseNodes=function(a){var b,c,d=a.length,e,f;if(0===d)return null;this._parseData(null);b=[];for(e=0;e<d;e++)if(c=a[e],null!==c&&"#text"!==c.nodeName&&(c=this._parseListNode(c),null!==c))if(c instanceof Array){f=c;for(var g=f.length,h=0;h<g;h++)c=f[h],b.push(c)}else b.push(c);return b};
DvtGraphParser.prototype._parseAnimationAttributes=function(a,b){var c=this._anim;if(!c)return!1;if(c.animOnDataChange===DvtGraphAnimation.ADS||c.animOnDataChange===DvtGraphAnimation.PPR)c.animOnDataChange=DvtGraphAnimation.AUTO;if(d=a.getAttribute("aDC"))"on"==d&&(d=DvtGraphAnimation.AUTO),c.animOnDataChange=d;c.animOnDisplay===DvtGraphAnimation.DISPLAY&&(d=a.getAttribute("aDi"))&&(c.animOnDisplay=d);c.animOnDisplay===DvtGraphAnimation.DISPLAY&&(c.animOnDisplay=DvtGraphAnimation.NONE);if(c.animOnDataChange===
DvtGraphAnimation.NONE&&c.animOnDisplay===DvtGraphAnimation.NONE)return!1;var d=a.getAttribute("aDu"),e=1E3;null!==d&&(e=parseInt(d,10));if(0===e)return c.animOnDataChange=DvtGraphAnimation.NONE,c.animOnDisplay=DvtGraphAnimation.NONE,!0;c.dataChangeDuration=e;c.displayDuration=e;d=a.getAttribute("aI");null!==d&&d===DvtGraphAnimation.NONE&&(c.indicators=DvtGraphAnimation.NONE);if(d=a.getAttribute("aU"))c.upColor=DvtColorUtils.getPound(d),c.upAlpha=DvtColorUtils.getAlpha(d);if(d=a.getAttribute("aD"))c.downColor=
DvtColorUtils.getPound(d),c.downAlpha=DvtColorUtils.getAlpha(d);if(d=a.getAttribute("aT"))c.twinkleColor=DvtColorUtils.getPound(d),c.twinkleAlpha=DvtColorUtils.getAlpha(d);return!0};
DvtGraphParser.prototype._parseBaseAttribs=function(a,b,c,d){var e=a._Dlo,f;void 0===d&&(d=!0);this._parseGroupIndex(b);e.setGroupIndex(this._cacheGroupIndex);e.setGroupId(this._cacheGroupId);this._parseSeriesIndex(b);e.setSeriesIndex(this._cacheSeriesIndex);e.setSeriesId(this._cacheSeriesId);f=this._parseMiscId(b);0<=f&&e.setMiscId(f);if(attr=b.getAttribute("stId"))f=parseInt(attr),0<=f&&e.setStackId(f);"RO"===c.substr(0,2)&&this._addToReferredTo(a);this._parseFillandStroke(c,a,b);this._parseShadow(b);
this._cacheShadowObj&&this._storeShadow(a,this._cacheShadowObj.clone());"LeM"!==c&&(f=this._parseBevel(b))&&this._storeBevel(a,f);attr=b.getAttribute("v");null!==attr&&("h"==attr&&"RO"===c.substr(0,2)?a.setVisible("h"!==attr):"h"==attr&&a.setAlpha(.001));this._parseMouseTransparency(b);a.setMouseEnabled(!this._bCacheMouseTransparency);this._checkTooltipTemplate(b);this._bCacheMouseTransparency||this._parseTooltip(b,a);if(attr=b.getAttribute("clip"))attr=this._Chart.createSubId(this._parseClipPathID(attr)),
e._clipPath=this._Chart.getClipPath(attr),null===e._clipPath&&(null===this._aForClipResolution&&(this._aForClipResolution=[]),this._aForClipResolution.push(attr),this._aForClipResolution.push(detObj));(attr=b.getAttribute("Z"))&&e.setUserProps(attr);c===DvtGraphObjType.LEGEND_MARKER&&(this._addLegend(a),this._HSS&&a.setCursor(DvtSelectionEffectUtils.getSelectingCursor()));"m"!==b.nodeName&&b.hasChildNodes()&&this._parseBaseChildNodes(b,a,d);(attr=b.getAttribute("drillJs"))&&this._parseDrill(a,attr)};
DvtGraphParser.prototype._parseBaseChildNodes=function(a,b,c){a=a.childNodes;var d=a.length;if(d)for(var e,f,g=0;g<d;g++)e=a[g],f=e.nodeName,"ros"===f?this._parseRefObjects(b,e):c&&"sa"===f&&this._parseShapeAttributes(b,e)};DvtGraphParser.prototype._parseBevel=function(a){return(a=a.getAttribute("bv"))?this._parseBevelAttrs(a):null};
DvtGraphParser.prototype._parseBevelAttrs=function(a){if(!a)return new DvtBevel;var b=null,c=null,d=45,e=1,f=1,g=4,h="inner",k=4,m=4,h="inner";if(""!=a){var n;a=a.split(",");for(var p=0;p<a.length;p++)if(n=a[p],null!=n&&0!=n.length)switch(p){case 0:b=DvtColorUtils.getRGBA(n);break;case 1:c=DvtColorUtils.getRGBA(n);break;case 2:n=parseFloat(n);isNaN(n)||(g=n);break;case 3:n=parseFloat(n);isNaN(n)||(e=n);break;case 4:n=parseFloat(n);isNaN(n)||(d=n);break;case 5:n=parseFloat(n);isNaN(n)||(k=n);break;
case 6:n=parseFloat(n);isNaN(n)||(m=n);break;case 7:n=parseInt(n,1);isNaN(n)||(f=n);break;case 8:h="o"==n.charAt()?DvtBevel.TYPE_OUTER:"f"==n.charAt()?DvtBevel.TYPE_FULL:DvtBevel.TYPE_INNER}}return new DvtBevel(g,d,b,c,k,m,e,f,h,!1)};
DvtGraphParser.prototype._parseClipPath=function(a){var b=this._Chart.createSubId(a.getAttribute("id"));if(null!==b&&a.hasChildNodes()&&(a=a.childNodes,!(0>=a.length))){var c,d,e;a=a[0];if("r"===a.nodeName&&(e=a.getAttribute("p"),null!==e)){var f;f=e.indexOf(DvtGraphParser.COMMA);a=parseInt(e.substring(0,f),10);isNaN(a)||(d=e.indexOf(DvtGraphParser.COMMA,++f),c=parseInt(e.substring(f,d)),isNaN(c)||(f=e.indexOf(DvtGraphParser.COMMA,++d),d=parseInt(e.substring(d,f),10),e=parseInt(e.substring(++f),10),
isNaN(d)||isNaN(e)||0===d||0===e||(f=new DvtGraphClipPath(b),f.addRect(a,c,d,e),this._Chart.addClipPath(f),-1==b.indexOf(DvtGraphParser.PLOTAREACLIP)||this._bHavePlotArea||(this._Chart.setPlotRect(a,c,d,e),this._bHavePlotArea=!0))))}}};DvtGraphParser.prototype._parseClipPathID=function(a){var b=null;if(a){var c=a.indexOf("#",1);if(1<=c){var c=c+1,d=a.indexOf(")",c);d>c&&(b=a.substring(c,d))}}return b};
DvtGraphParser.prototype._parseData=function(a){var b;if(this._Data)b=this._Data;else if(this._Data=b=new DvtGraphData,this._Chart.setData(b),null===a)return;var c,d,e,f;c=a.getAttribute("groups");null!==c&&(e=c.split(DvtGraphParser.MD_GROUP_SEPARATOR),null!==e&&0<e.length&&b.setGroups(e));c=a.getAttribute("series");null!==c&&(e=c.split(DvtGraphParser.MD_GROUP_SEPARATOR),null!==e&&0<e.length&&b.setSeries(e));c=a.getAttribute("groupLabels");null!==c&&(e=c.split(DvtGraphParser.MD_GROUP_SEPARATOR),null!==
e&&0<e.length&&b.setGroupLabels(e));c=a.getAttribute("O1GroupLabels");null!==c&&(e=c.split(DvtGraphParser.MD_GROUP_SEPARATOR),null!==e&&0<e.length&&b.setO1GroupLabels(e));c=a.getAttribute("seriesLabels");null!==c&&(e=c.split(DvtGraphParser.MD_GROUP_SEPARATOR),null!==e&&0<e.length&&b.setSeriesLabels(e));c=a.getAttribute("sc");if(null!==c&&(e=c.split(","),null!==e&&0<e.length)){f=e.length;if(0<f)for(d=[],c=0;c<f;c++)d.push(e[c]);b.setSeriesColors(d);this._arSeriesColors=d}c=this._sTooltipTemplate;var g;
if(null===c||0===c.length)b.setMacrosSupported(this._arMacros.length);else{var h;g=e=0;f=null;var k=this._arMacros.length,m=[],n=[],p=!1;d=c;do{h=d.indexOf("[",g);if(0>h){d=d.substring(g);0<d.length&&n.push(d);break}e=d.indexOf("]",h+2);if(0>e)break;f=d.substring(h+1,e);for(c=0;c<k;c++)if(f===this._arMacros[c]){n.push(d.substring(g,h));m.push(c);if(17==c||18==c)p=!0;break}p&&(m.push(27),m.push(28));g=e+1}while(1);if(0<m.length)for(b.setTooltipTemplate(n,m,this._arMacros.length),f=m.length,c=0;c<f;c++)g=
m[c],g>this._iZIndex&&(d=a.getAttribute(this._arMacros[g]),null!==d&&(e=d.split(DvtGraphParser.MD_MACROVAL_SEPARATOR),(null!==e||0<e.length)&&b.setDataValues(g,e,!1)))}for(g=this._iXIndex;g<=this._iZIndex;g++)if(e=null,d=a.getAttribute(this._arMacros[g]),null!==d&&(e=d.split(DvtGraphParser.MD_DATAVAL_SEPARATOR),null===e||0===e.length)&&(e=null),d=a.getAttribute(this._arMacros[g]+this.VF),c=this._parseValueFormat(d),null!==e&&b.setValueFormat(g,c),null!==e&&null!==d){for(x=0;x<e.length;x++)e[x]=parseFloat(e[x]);
b.setDataValues(g,e,!0)}else d=g===this._iXIndex?a.getAttribute(this.XL):g===this._iYIndex?a.getAttribute(this.YL):g===this._iZIndex?a.getAttribute(this.ZL):null,null!==d&&(c=d.split(DvtGraphParser.MD_MACROVAL_SEPARATOR),null!==c&&0<c.length&&(b.setAltLValues(g,c),null!==e&&(DvtArrayUtils.toFloat(e),b.setDataValues(g,e,!0))));d=a.getAttribute(this.ATTR_XAVF);null!==d&&b.setXAVF(this._parseValueFormat(d));d=a.getAttribute(this.ATTR_YAVF);null!==d&&b.setYAVF(this._parseValueFormat(d));d=a.getAttribute(this.ATTR_Y2AVF);
null!==d&&b.setY2AVF(this._parseValueFormat(d));this._Chart.isPie()&&(d=a.getAttribute("psl"))&&(e=d.split(DvtGraphParser.MD_GROUP_SEPARATOR))&&0<e.length&&(this._arPieSliceLabels=e)};DvtGraphParser.prototype._parseDrill=function(a,b){var c=a._Dlo,d=c.getShapeAttr();d?d.drillJS=b:(d=new DvtShapeAttr,d._chart=this._Chart,d.drillJS=b,c.setShapeAttr(d),a.setCursor(DvtSelectionEffectUtils.getSelectingCursor()))};
DvtGraphParser.prototype._parseEllipse=function(a,b){var c,d,e=!1,f,g;c=b.getAttribute("ang");null!==c&&(e=!0,d=c.indexOf(","),f=parseFloat(c.substring(0,d)),d=parseFloat(c.substring(++d)),g=b.getAttribute("ct"),g||(g=DvtArc.PIE));c=b.getAttribute("p");var h=c.split(","),h=DvtArrayUtils.toFloat(h);(c=this._Chart.isSelectionSupported()&&(a===DvtGraphObjType.SLICE||a===DvtGraphObjType.PIE_BAR_SLICE))&&e?(f=new DvtGraphSelectableArc(this._ctx,h[0],h[1],h[2],h[3],f,d,g),f.setDataColor(this._Chart.getSeriesColor(this._parseSeriesIndex(b))),
f.setCursor(DvtSelectionEffectUtils.getSelectingCursor()),f.setZOrderManager(this._Chart)):f=e?new DvtArc(this._ctx,h[0],h[1],h[2],h[3],f,d,g):"c"==b.nodeName?new DvtCircle(this._ctx,h[0],h[1],h[2]):new DvtOval(this._ctx,h[0],h[1],h[2],h[3]);DvtGraphSysUtils.makeDetObject(f,this._Chart,a);this._parseBaseAttribs(f,b,a);c&&e&&this._storePie3DFace(f._Dlo);this._workBC&&this.workLS===DvtStroke.DASHED&&(e=new DvtSolidStroke(this._workBC,this._workBA,this._workLW),e.setStyle(DvtStroke.DASHED,this._workDash),
f.setStroke(e));a!==DvtGraphObjType.SLICE&&a!==DvtGraphObjType.PIE_BAR_SLICE||this._addRiser(f);return f};DvtGraphParser.prototype._isInvisible=function(a){if(this._parseFillType(a)===DvtFill.COLOR){var b=a.getAttribute("fc");a=a.getAttribute("bc");if(null==b&&null==this._cacheFillColor&&null==a)return!0}return!1};
DvtGraphParser.prototype._parseFillandStroke=function(a,b,c){this._workLW=this._workBA=this._workBC=this._workFA=this._workFC=this._workCA=this._workC=null;this._workLS=DvtStroke.SOLID;this._workImgDsplyMode=this._workImgURL=this._workDash=null;attr=c.getAttribute("lw");this._workLW=null==attr?1:parseInt(attr);if(attr=c.getAttribute("ls")){var d=this._parseLineStyle(attr);this._workLS=d;d===DvtStroke.DASHED?this._workDash=DvtStroke.DASH:d===DvtStroke.DOTTED?this._workDash=DvtStroke.DOT:d===DvtStroke.DASHED_DOTTED&&
(this._workDash=DvtStroke.DASH_DOT)}var e,d=this._parseFillType(c);if(d===DvtFill.COLOR||d===DvtFill.PATTERN){attr=c.getAttribute("fc");if(null!==attr){var f=""!==attr?7<attr.length?DvtColorUtils.getPound(attr):attr:null;f&&(e=DvtColorUtils.getAlpha(attr));this._workFC=f;this._workFA=e;this._cacheFillColor=f;this._cacheFillAlpha=e}else this._workFC=this._cacheFillColor,this._workFA=this._cacheFillAlpha;a===DvtGraphObjType.LINE_MARKER&&null!==this._Data.getLayers()&&(this._arSeriesColors[this._parseSeriesIndex(c)]=
this._workFC,this._Data.setSeriesColors(this._arSeriesColors));d===DvtFill.COLOR&&b.setSolidFill(this._workFC,this._workFA)}if(d===DvtFill.GRADIENT){if(c.hasChildNodes())for(e=c.childNodes,d=e.length,i=0;i<d;i++)if(f=e[i],"g"===f.nodeName){b.setFill(this._parseGradient(a,f));break}}else d===DvtFill.TEXTURE?(attr=c.getAttribute("tURL"))?(this._workImgURL=attr,attr=c.getAttribute("TDM"),this._workImgDsplyMode="s"===attr?this._workImgDsplyMode=DvTFill.STRETCHED:DvtFill.TILED):(this._workFC="#ffffff",
this._workFA=1):d===DvtFill.PATTERN&&((a=c.getAttribute("fp"))?b.setFill(new DvtPatternFill(a,this._workFC)):b.setSolidFill("#ffffff"));attr=c.getAttribute("c");if(null!==attr){if(this._workC=""!==attr?7<attr.length?DvtColorUtils.getPound(attr):attr:null)this._workCA=DvtColorUtils.getAlpha(attr);this._cacheColor=this._workC;this._cacheColorAlpha=this._workCA}else this._workC=this._cacheColor,this._workCA=this._cacheColorAlpha;attr=c.getAttribute("bc");null!==attr&&(this._workBC=7<attr.length?DvtColorUtils.getPound(attr):
attr,this._workBA=DvtColorUtils.getAlpha(attr));this._workBC&&b.setSolidStroke(this._workBC,this._workBA,this._workLW)};DvtGraphParser.prototype._parseFillType=function(a){a=a.getAttribute("ft");null!==a?("ftC"===a?a=DvtFill.COLOR:"ftG"===a?a=DvtFill.GRADIENT:"ftP"===a&&(a=DvtFill.PATTERN),this._cacheFillType=a):a=this._cacheFillType;return a};
DvtGraphParser.prototype._parseFont=function(a){var b=parseInt(a.getAttribute("id"),10),c=a.getAttribute("font");a=null;var d=c.indexOf("'"),e=c.indexOf("'",d+1);0<=d&&0<=e&&(a=c.substring(d,e+1),c=c.replace(a,"font-family"));var c=c.split(" "),d=c[0],e=c[1],f=DvtColorUtils.getAlpha(e),e=7<e.length?DvtColorUtils.getPound(e):e;a=a?a:c[2];"'"===a.charAt(0)&&(a=a.substring(1,a.length-1));if("Default"===a||"sans-serif"===a)a=null;var g=!1,h=!1,k=!1;if(3<c.length)for(var m=c.length,n,p=3;p<m;p++)n=c[p].toUpperCase(),
"B"===n?g=!0:"I"===n?h=!0:"U"===n&&(k=!0);a=new DvtFont(d,e,f,a,g,h,k);a._Id=b;return a};DvtGraphParser.prototype._parseFontId=function(a){(a=a.getAttribute("fid"))?this._cacheFontId=a=parseInt(a,10):a=this._cacheFontId;return a};
DvtGraphParser.prototype._parseGradient=function(a,b){var c=null,d,c=0,e,f,g,h,k,m=null;h=!1;var n=null,p=null,q=null;d=b.getAttribute("p");null===d?q=this._cacheGradStops:null!==d&&(q=d.split(","),DvtArrayUtils.toFloat(q),this._cacheGradStops=q);d=b.getAttribute("c");if(null!==d)for(n=d.split(","),p=[],e=n.length,h=0;h<e;h++)d=n[h],7<d.length&&(n[h]=DvtColorUtils.getPound(d)),p.push(DvtColorUtils.getAlpha(d));else n=[black,white],p=[1,1];d=b.getAttribute("b");null!==d&&(m=d.split(","),DvtArrayUtils.toFloat(m));
h=m&&!(0==m[0]&&0==m[1]&&0==m[2]&&0==m[3]);d=b.getAttribute("ang");e=b.getAttribute("dir");null!==d?(c=parseFloat(d),isNaN(c)&&(c=0),this._cacheGradAngle=c):(null!==e?this._cacheGradDir=e:e=this._cacheGradDir,null!==e&&("gdD"==e?c=-90:"gdRi"==e?c=0:"gdD45"==e?(c=-135,h&&(radians=Math.atan2(m[3],m[2]),degrees=radians*this.DEGREES_PER_RAD,c=degrees+=180)):"gdD135"==e?(c=-45,h&&(radians=Math.atan2(m[3],m[2]),degrees=radians*this.DEGREES_PER_RAD,c=-degrees)):"gdR"===e?(d=b.getAttribute("cx"),f=null!=
d?parseInt(d):0,d=b.getAttribute("cy"),g=null!=d?parseInt(d):0,d=b.getAttribute("r"),k=null!=d?parseInt(d):0,d=b.getAttribute("rx"),h=null!=d?parseInt(d):0,d=b.getAttribute("ry"),d=null!=d?parseInt(d):0,0!=h&&(k=Math.max(h,d))):"gdC"==e?(s=b.getAttribute("pts"),null!==s?this._cacheCustomPts=s:s=this._cacheGradCustom,c=this._computeCustomAngleAndStops(s,m,q)):c=0));return c="gdR"===e?new DvtRadialGradientFill(n,p,q,f,g,k,m):new DvtLinearGradientFill(c,n,p,q,m)};
DvtGraphParser.prototype._parseGraphTag=function(a,b){this._Chart._width=parseInt(a.getAttribute("w"));this._Chart._height=parseInt(a.getAttribute("h"));var c;if(!b){(s=a.getAttribute("threed"))&&this._Chart.set3D(s.charAt(0)===DvtGraphParser.TRUE);s=a.getAttribute("sr");if(null!=s){c=DvtGraphCore.RB_NONE;var d=s.split(" ");l=d.length;for(i=0;i<l;i++)s=d[i],"RB_DIM"===s?c=DvtGraphCore.RB_DIM:"RB_HIGHLIGHT"===s&&(c=DvtGraphCore.RB_HILITE);this._Chart.setSROEffect(c)}s=a.getAttribute("hs");null!==s&&
void 0!==s&&(this._HSS=s,(s=a.getAttribute("hsr"))?this._Chart.setHSRescale("t"==s):this._Chart.setHSRescale(!1),(s=a.getAttribute("hsnb"))?this._Chart.setHSNewBehaviorUsage(s):this._Chart.setHSNewBehaviorUsage("off"));(s=a.getAttribute("att"))&&"t"==s&&this._Chart.setAttachmentMode(!0);if(s=a.getAttribute("zoomDir")){l=s.length;c=DvtGraphCore.DATA_ZOOM_NONE;for(i=0;i<l;i++)"h"==s.charAt(i)?c=c===DvtGraphCore.DATA_ZOOM_VERT?DvtGraphCore.DATA_ZOOM_BOTH:DvtGraphCore.DATA_ZOOM_HORIZ:"v"==s.charAt(i)&&
(c=c===DvtGraphCore.DATA_ZOOM_HORIZ?DvtGraphCore.DATA_ZOOM_BOTH:DvtGraphCore.DATA_ZOOM_VERT);this._Chart.setZoomDir(c)}(s=a.getAttribute("mz"))&&s.charAt(0)===DvtGraphParser.TRUE&&this._Chart.setMarqueeZoomMode(DvtGraphMarqueeZoomHandlerBase.ZOOM_AUTO);s=a.getAttribute("pan");null!=s&&s==DvtGraphParser.TRUE&&this._Chart.setPanMode(DvtGraphPanHandler.PAN_AUTO);this._Chart.setZoomInOutJs(a.getAttribute("dataZoomInRectEventJs"),a.getAttribute("dataZoomOutRectEventJs"),a.getAttribute("dataZoomInClickEventJs"),
a.getAttribute("dataZoomOutClickEventJs"));this._Chart.setZoomScrollBehavior(a.getAttribute("zoomAndScroll"));if(s=a.getAttribute("se"))s="c"===s?DvtFill.COLOR:"g"===s?DvtFill.GRADIENT:"p"===s?DvtFill.PATTERN:DvtFill.NONE,this._Chart.setSeriesEffect(s);s=a.getAttribute("ve");this._Chart.setVisualEffect(s&&s.charAt(0)===DvtGraphParser.TRUE);this._bPieAutoExplode=(s=a.getAttribute("pse"))&&s.charAt(0)===DvtGraphParser.TRUE;(s=a.getAttribute("sel"))&&this._Chart.setSelectionMode("m"!=s?DvtGraphCore.SEL_SINGLE:
DvtGraphCore.SEL_MULTI);(s=a.getAttribute("selList"))&&this._Chart.setSelListener(s.charAt(0)===DvtGraphParser.TRUE);if(s=a.getAttribute("linkColor"))this._linkColor=s;if(s=a.getAttribute("psea"))this._pieExplodeAll=!0;(s=a.getAttribute("dtBC"))&&this._Chart.setDragFeedbackBorderColor(s);(s=a.getAttribute("dtFC"))&&this._Chart.setDragFeedbackFillColor(s);(s=a.getAttribute("dtFA"))&&this._Chart.setDragFeedbackFillAlpha(s)}};
DvtGraphParser.prototype._parseGaugeMetaData=function(a){var b,c,d,e;this._type===DvtGraphType.DIAL&&(c=new DvtDialGaugeData,b=a.getAttribute("ang"),null!=b&&(e=b.indexOf(DvtGraphParser.COMMA),c._dialAngleStart=parseFloat(b.substring(0,e)),c._dialAngleExtent=parseFloat(b.substring(++e))),b=a.getAttribute("id"),null!==b&&(c._id=b),e=c);if(this._type===DvtGraphType.DIAL||this._type==DvtGraphType.LED||0<=this._type.indexOf(DvtGraphType.STATUSMETER)){e||(e=new DvtGaugeData);b=a.getAttribute("d");null!==
b&&(b=b.split(DvtGraphParser.MD_D_SEPARATOR),null!==b&&0<b.length)&&(c=b.length,null!==this._Chart.getGaugeData()&&(d=this._anim)&&(d.animationOnDisplay=DvtGraphAnimation.ANIMATION_NONE,d.animationOnDataChange=DvtGraphAnimation.ANIMATION_NONE),e._minVal=parseFloat(b[0]),e._maxVal=parseFloat(b[1]),e._curVal=parseFloat(b[2]),4<=c&&(e._metricLabel=b[3],5<=c&&(e._topLabel=b[4],5<c&&(e._bottomLabel=b[5]))));b=a.getAttribute("ac");if(null!==b&&"t"===b){b=a.getAttribute("tv");if(null!==b&&(b=b.split(DvtGraphParser.COMMA),
null!==b&&0<b.length))for(c=b.length,e._arThresholdValues=Array(c),d=0;d<c;d++)e._arThresholdValues[d]=parseFloat(b[d]);if(null!=e._arThresholdValues){b=a.getAttribute("tc");if(null!=b&&(b=b.split(DvtGraphParser.COMMA),null!==b&&0<b.length))for(c=b.length,e._arThresholdColors=Array(c),d=0;d<c;d++)e._arThresholdColors[d]=b[d];null===e._arThresholdColors&&(e._arThresholdValues=null)}}e.m_sTooltip=a.getAttribute("t");this._Chart.setGaugeData(e)}};
DvtGraphParser.prototype._parseGroupIndex=function(a){a=a.getAttribute("G");null!==a&&(0===a.length?(this._cacheGroupIndex=-1,this._cacheGroupId=null):(a=parseInt(a,10),!isNaN(a)&&a<this._Data.getGroupCount()&&(this._cacheGroupIndex=a,this._cacheGroupId=this._Data.getGroupFromIndex(a))))};
DvtGraphParser.prototype._parseHandle=function(a,b){var c,d=null,e=null,f=b.getAttribute("id");if(c=b.getAttribute("c"))d=new DvtRectangle,this._parseRectString(c,d);if(c=b.getAttribute("b"))c=c.split(","),e=DvtArrayUtils.toFloat(c);this._currentHandleId=DvtGraphHandle.createHandleId(f);d=new DvtGraphHandle(this._ctx,f,e,d,this._Chart.createSubId(f));if(b.hasChildNodes()&&(e=b.childNodes))for(var g=0;g<e.length;g++)if(!("clipPath"==e[g].nodeName&&0<e[g].childNodes.length&&e[g].childNodes[0].getAttribute("p")==
b.getAttribute("c"))){var h=this._parseListNode(e[g]);if(null!==h)if(h instanceof Array){c=h;for(var k=c.length,m=0;m<k;m++)h=c[m],d.addObject(h)}else d.addObject(h)}this._currentHandleId=null;DvtGraphSysUtils.makeDetObject(d,this._Chart,a);this._Chart.getHandleManager().addHandle(d);"scrollableLegend"===f&&(this._Chart._legendHandle=d);return d};
DvtGraphParser.prototype._parseImage=function(a,b){var c=b.getAttribute("x"),d=b.getAttribute("y"),e=b.getAttribute("w"),f=b.getAttribute("h"),g=b.getAttribute("url"),c=new DvtImage(this._ctx,g,c?parseInt(c):0,d?parseInt(d):0,e?parseInt(e):0,f?parseInt(f):0);DvtGraphSysUtils.makeDetObject(c,this._Chart,a);this._parseTooltip(b,c);(d=b.getAttribute("drillJs"))&&this._parseDrill(c,d);return c};
DvtGraphParser.prototype._parseLine=function(a,b){var c;c=b.getAttribute("p").split(",");DvtArrayUtils.toFloat(c);var d=a===DvtGraphObjType.STOCK_RISER||a===DvtGraphObjType.STOCK_OPEN_TICK||a===DvtGraphObjType.STOCK_CLOSE_TICK||a===DvtGraphObjType.STOCK_HIGH_LINE||a===DvtGraphObjType.STOCK_LOW_LINE;c=this._Chart.isSelectionSupported()&&d?new DvtGraphDetLine(this._ctx,c[0],c[1],c[2],c[3]):new DvtLine(this._ctx,c[0],c[1],c[2],c[3]);DvtGraphSysUtils.makeDetObject(c,this._Chart,a);this._parseBaseAttribs(c,
b,a);d&&this._storeStockMarker(c._Dlo);this._workC&&(d=new DvtSolidStroke(this._workC,this._workCA,this._workLW),this._workLS!==DvtStroke.SOLID&&d.setStyle(this._workLS,this._workDash),a!==DvtGraphObjType.LEGEND_MARKER&&a!==DvtGraphObjType.BOX_LINE&&d.setLineEnd(DvtStroke.ROUND),c.setStroke(d));c.setPixelHinting(a===DvtGraphObjType.O1_AXIS_LINE||a===DvtGraphObjType.O1_MINOR_GRID||a===DvtGraphObjType.O1_MAJOR_GRID||a===DvtGraphObjType.X1_AXIS_LINE||a===DvtGraphObjType.X1_MINOR_GRID||a===DvtGraphObjType.X1_MAJOR_GRID||
a===DvtGraphObjType.Y1_AXIS_LINE||a===DvtGraphObjType.Y2_AXIS_LINE||a===DvtGraphObjType.Y1_MINOR_GRID||a===DvtGraphObjType.Y2_MINOR_GRID||a===DvtGraphObjType.Y1_MAJOR_GRID||a===DvtGraphObjType.Y2_MAJOR_GRID||a===DvtGraphObjType.LEGEND_AREA||a===DvtGraphObjType.STOCK_HIGH_LINE||a===DvtGraphObjType.STOCK_LOW_LINE||a===DvtGraphObjType.STOCK_RISER||a===DvtGraphObjType.STOCK_CLOSE_TICK||a===DvtGraphObjType.STOCK_OPEN_TICK||a===DvtGraphObjType.BOX_LINE||a===DvtGraphObjType.REFOBJ_FRONT||a===DvtGraphObjType.REFOBJ_BACK||
a===DvtGraphObjType.TICK_MARK&&-1!=this._type.indexOf(DvtGraphType.STATUSMETER)||a===DvtGraphObjType.OTHER||a===DvtGraphObjType.QUADRANT_LINE);a===DvtGraphObjType.LINE_RISER&&this._addRiser(c);if(a===DvtGraphObjType.Y1_AXIS_LINE)this._Y1Axis=c;else if(a===DvtGraphObjType.Y2_AXIS_LINE)this._Y2Axis=c;else if(a===DvtGraphObjType.X1_AXIS_LINE||a===DvtGraphObjType.O1_AXIS_LINE)this._XAxis=c;if(a===DvtGraphObjType.X1_MINOR_GRID||a===DvtGraphObjType.X1_MAJOR_GRID)this._aXGridLines||(this._aXGridLines=[]),
this._aXGridLines.push(c),c.setMouseEnabled(!1);else if(a===DvtGraphObjType.Y1_MINOR_GRID||a===DvtGraphObjType.Y1_MAJOR_GRID)this._aY1GridLines||(this._aY1GridLines=[]),this._aY1GridLines.push(c),c.setMouseEnabled(!1);else if(a===DvtGraphObjType.Y2_MINOR_GRID||a===DvtGraphObjType.Y2_MAJOR_GRID)this._aY2GridLines||(this._aY2GridLines=[]),this._aY2GridLines.push(c),c.setMouseEnabled(!1);a===DvtGraphObjType.FRAME_SEPARATOR&&(this._FrameSep=c,this._Chart.setFrameSeparator(c));return c};
DvtGraphParser.prototype._parseLineMarker=function(a,b){var c=new DvtLineMarker(this._Chart),d,e;c.setHandleId(this._currentHandleId);if(d=b.getAttribute("p")){var f=d.split(",");e=f.length;for(d=0;d<e;d++)f[d]=parseFloat(f[d])+this.LINEMARKER_HALFSIZE;c.setCoords(f)}d=b.getAttribute("ms");e=2*this.LINEMARKER_HALFSIZE;null!==d&&(e=parseInt(d,10),isNaN(e)&&(e=6));this._parseGroupIndex(b);c.setGroupIndex(this._cacheGroupIndex);this._parseSeriesIndex(b);c.setSeriesIndex(this._cacheSeriesIndex);this._Chart.setSeriesMarkerSize(c.getSeriesIndex(),
e);this._parseShadow(b);this._checkTooltipTemplate(b);this._Chart.getMarkerTooltipHelper(!0).addMarker(c);if(c=this._findRisersForSeries(this._cacheSeriesIndex))for(e=c.length,d=0;d<e;d++)f=c[d]._Dlo,-1==f._objId.indexOf(DvtGraphObjType.LINE_RISER)&&f._objId!==DvtGraphObjType.AREA_RISER||f.setUseTooltip(!0)};
DvtGraphParser.prototype._parseLineStyle=function(a){switch(a){case "LS_SOLID":a=DvtStroke.SOLID;break;case "LS_DASH":a=DvtStroke.DASHED;break;case "LS_DOTTED":a=DvtStroke.DOTTED;break;case "LS_DASH_DOT":a=DvtStroke.DASHED_DOTTED;break;default:a=DvtStroke.SOLID}return a};
DvtGraphParser.prototype._parseMarker=function(a,b){var c,d,e,f,g=0,h=[],k=[],m=this._Chart.isScatterChart()||this._Chart.isBubbleChart(),n=this._Chart.isPolarChart(),p=a===DvtGraphObjType.LEGEND_MARKER,q=a===DvtGraphObjType.LINE_MARKER&&m&&this._Chart.isInitFx(),r=(a===DvtGraphObjType.LINE_MARKER||a===DvtGraphObjType.PARETO_LINE_MARKER)&&!m,t=this._Chart.isSelectionSupported(),v=this._isInvisible(b),u;c=b.getAttribute("p");if(null!==c)d=c.split(","),DvtArrayUtils.toFloat(d),g=d.length/2;else return null;
c=b.getAttribute("mt");if(null===c)f=this._cacheMarkerType,e=this._cacheMarkerSizes,DvtArrayUtils.toFloat(e,.5);else{var w=c.indexOf(",");0<=w?(f=c.substring(0,w),c=c.substring(w+1),null!==c&&(e=c.split(",")),null===e||0===e.length?e=this._cacheMarkerSizes:this._cacheMarkerSizes=DvtArrayUtils.toFloat(e,.5)):(f=c,e=this._cacheMarkerSizes);f=DvtMarker.convertShapeString(f);if(f===DvtMarker.HUMAN&&a!==DvtGraphObjType.LEGEND_MARKER)for(u=0;u<e.length;u++)e[u]*=1.4;this._cacheMarkerType=f}if(f===DvtMarker.HUMAN&&
a!==DvtGraphObjType.LEGEND_MARKER)for(u=0;u<d.length;u+=2)u/2<e.length?(d[u]-=e[u/2]/7,d[u+1]-=e[u/2]/7):0<e.length&&(d[u]-=e[0]/7,d[u+1]-=e[0]/7);var z=w=null;if(c=b.getAttribute("ums"))if(w=c.split(","),c=b.getAttribute("umc"))z=c.split(","),0===w.length&&(z=w=null);var y=e[0],A=d[0],C=d[1];DvtAgent.isTouchDevice()&&!t&&v&&y<DvtGraphParser._MIN_TOUCH_MARKER_SIZE&&(A-=(DvtGraphParser._MIN_TOUCH_MARKER_SIZE-y)/2,C-=(DvtGraphParser._MIN_TOUCH_MARKER_SIZE-y)/2,y=DvtGraphParser._MIN_TOUCH_MARKER_SIZE);
q?c=new DvtMarkerRiser(this._ctx,f,null,A,C,y,y,null,null,null,!0):p||!m&&!n?r&&t?(c=new DvtGraphSelectableLineMarker(this._ctx,f,null,A,C,y,y,null,null,null,!0),c.setZOrderManager(this._Chart)):c=new DvtMarker(this._ctx,f,null,A,C,y,y,null,null,null,!0):c=new DvtGraphDetMarker(this._ctx,f,null,A,C,y,y,null,null,null,!0);DvtGraphSysUtils.makeDetObject(c,this._Chart,a);var B=c._Dlo;this._parseBaseAttribs(c,b,a);var E=c.getFill();!(E instanceof DvtGradientFill)&&E instanceof DvtSolidFill&&"none"===
E.getColor()&&(E=DvtSolidFill.invisibleFill(),c.setFill(E));!p&&t&&(c.setDataColor(this._Chart.getSeriesColor(B.getSeriesIndex())),c.setCursor(DvtSelectionEffectUtils.getSelectingCursor()));null!=B.getUserProps()&&(k=B.getUserProps().split("~;"),1<=k.length&&null!=k[0]?B.setUserProps(k[0]):k=null);var D=null;(u=b.getAttribute("t"))&&(D=u.split(DvtGraphParser.MD_TT_SEPARATOR));D&&0<D.length&&B.setTooltipText(D[0]);h.push(c);if(1<g){var H=c,F=B.getSeriesIndex(),G=B.getSeriesId(),I=B.getGroupIndex(),
J=B._clipPath,L=e[0],M=c.getStroke(),K=2;for(u=1;u<g;u++)A=d[K],C=d[K+1],L=y=u<e.length?e[u]:L,DvtAgent.isTouchDevice()&&!t&&v&&y<DvtGraphParser._MIN_TOUCH_MARKER_SIZE&&(A-=(DvtGraphParser._MIN_TOUCH_MARKER_SIZE-y)/2,C-=(DvtGraphParser._MIN_TOUCH_MARKER_SIZE-y)/2,y=DvtGraphParser._MIN_TOUCH_MARKER_SIZE),q?c=new DvtMarkerRiser(this._ctx,f,null,A,C,y,y,null,null,null,!0):p||!m&&!n?p||!t?c=new DvtMarker(this._ctx,f,null,A,C,y,y,null,null,null,!0):r&&(c=new DvtGraphSelectableLineMarker(this._ctx,f,null,
A,C,y,y,null,null,null,!0),c.setZOrderManager(this._Chart)):c=new DvtGraphDetMarker(this._ctx,f,null,A,C,y,y,null,null,null,!0),!p&&t&&(c.setDataColor(this._Chart.getSeriesColor(this._parseSeriesIndex(b))),c.setCursor(DvtSelectionEffectUtils.getSelectingCursor())),DvtGraphSysUtils.makeDetObject(c,this._Chart,a),y=c._Dlo,y.setGroupIndex(++I),y.setGroupId(this._Data.getGroupFromIndex(I)),y.setSeriesIndex(F),y.setSeriesId(G),D&&D.length>u&&y.setTooltipText(D[u]),y.setUseTooltip(B.isUseTooltip()),y._clipPath=
J,null!=k&&u<k.length&&y.setUserProps(k[u]),c.setMouseEnabled(H.isMouseEnabled()),c.setFill(E),c.setStroke(M),this._cacheShadowObj&&this._storeShadow(c,this._cacheShadowObj.clone()),h.push(c),K+=2}p=b.childNodes;d=[];e=null;f=[];if(p)for(u=0;u<p.length;u++)child=p[u],childName=child.nodeName,"sa"===childName?d.push(child):"ros"===childName?e=child:"f"===childName?this._Chart.addFont(this._parseFont(child)):"t"===childName&&(t=child.getAttribute("O"),k=this._parseText(t,child),DvtGraphSysUtils.makeDetObject(k,
this._Chart,t),this._parseTooltip(child,k),f.push(k));for(u=0;u<g;u++)if(p=h?h[u]:c,0<d.length&&this._parseShapeAttributes(p,d[u]),e&&this._parseRefObjects(p,child),w&&(k=z[u],this._setAnalyticLayerVals(p._Dlo,w[u],k),p.setUnderlay(p._Dlo.getUnderlayType(),DvtColorUtils.getRGB(k),DvtColorUtils.getAlpha(k))),0<f.length&&(k=f[u],k._Dlo.setSeriesIndex(p._Dlo.getSeriesIndex()),k._Dlo.setSeriesId(p._Dlo.getSeriesId()),k._Dlo.setGroupIndex(p._Dlo.getGroupIndex()),k._Dlo.setGroupId(p._Dlo.getGroupId()),
k._Dlo.setUnderlayFC(p._Dlo.getUnderlayFC()),k._Dlo.setUnderlayType(p._Dlo.getUnderlayType()),p.setText(k),h.push(f[u])),r||m)m||n?(this._addRiser(p),q&&p.setInitFx&&p.setInitFx(!0),this._Chart.isDataAnimation()&&(p._Dlo._DCHandler=new DvtDCMarker(this._ctx,p))):v?this._addHiddenMarker(p):this._addMarker(p);return h};DvtGraphParser.prototype._parseMarkerDef=function(a){DvtMarkerUtils.createMarkerDef(this._ctx,a)};
DvtGraphParser.prototype._parseMetadata=function(a){var b,c,d;this._Chart.isGauge()&&this._parseGaugeMetaData(a);if(this._type===DvtGraphType.PIE){if(b=a.getAttribute("pfc"))7<b.length&&DvtColorUtils.getPound(b),this._pieFeelerColor=b;if(b=a.getAttribute("slp"))"n"===b.charAt(0)?this._pieLabelPos=DvtPieChart.LABEL_POS_NONE:"i"===b.charAt(0)?this._pieLabelPos=DvtPieChart.LABEL_POS_INSIDE:"o"===b.charAt(0)&&(1===b.length?this._pieLabelPos=DvtPieChart.LABEL_POS_OUTSIDE:2===b.length&&"f"===b.charAt(1)?
this._pieLabelPos=DvtPieChart.LABEL_POS_OUTSIDE_FEELERS:4===b.length&&"i"===b.charAt(2)&&(this._pieLabelPos=DvtPieChart.LABEL_POS_OUTSIDE_FEELERS));if(b=a.getAttribute("slt"))"p"===b.charAt(0)?this._pieLabelType=DvtPieChart.LABEL_TYPE_PERCENT:"v"===b.charAt(0)?this._pieLabelType=DvtPieChart.LABEL_TYPE_VALUE:"c"===b.charAt(0)?this._pieLabelType=DvtPieChart.LABEL_TYPE_CUSTOM:"t"===b.charAt(0)&&(1===b.length?this._pieLabelType=DvtPieChart.LABEL_TYPE_TEXT:"p"===b.charAt(1)?this._pieLabelType=DvtPieChart.LABEL_TYPE_TEXT_PERCENT:
"v"===b.charAt(1)&&(this._pieLabelType=DvtPieChart.LABEL_TYPE_TEXT_VALUE));b=a.getAttribute("PSLVF");this._pieSliceLabelVF=this._parseValueFormat(b)}var e,f=this._DataSummary;if(b=a.getAttribute("x1Vals"))d=b.indexOf(","),f.x1MinVal=parseFloat(b.substring(0,d)),f.x1MaxVal=parseFloat(b.substring(d+1));if(b=a.getAttribute("y1Vals"))d=b.indexOf(","),f.y1BaseVal=parseFloat(b.substring(0,d)),e=b.indexOf(",",++d),f.y1MinVal=parseFloat(b.substring(d,e)),f.y1MaxVal=parseFloat(b.substring(e+1));b=a.getAttribute("y2Vals");
null!=b&&(d=b.indexOf(","),f.y2BaseVal=parseFloat(b.substring(0,d)),e=b.indexOf(",",++d),f.y2MinVal=parseFloat(b.substring(d,e)),f.y2MaxVal=parseFloat(b.substring(e+1)));if(b=a.getAttribute("x1Coords"))d=b.indexOf(","),c=parseFloat(b.substring(0,d)),b=parseFloat(b.substring(d+1)),f.xPxMin=c,f.xPxMax=b,f.xPxRatio=Math.abs((c-b)/(f.x1MaxVal-f.x1MinVal));if(b=a.getAttribute("y1Coords"))d=b.indexOf(","),f.y1Baseline=parseFloat(b.substring(0,d)),e=b.indexOf(",",++d),c=parseFloat(b.substring(d,e)),b=parseFloat(b.substring(e+
1)),f.yPxMin=c,f.yPxRatio=Math.abs((c-b)/(f.y1MaxVal-f.y1MinVal));(b=a.getAttribute("layers"))&&(c=b.split(DvtGraphParser.MD_GROUP_SEPARATOR))&&0<c.length&&(this._tempLayers=c,this._Data.setLayers(c));(b=a.getAttribute("mid"))&&this._Chart.setMenuIds(b.split(","));this._sTooltipTemplate=a.getAttribute("tt");this._initSelections=a.getAttribute("sel");this._selectJS=a.getAttribute("selJS")};
DvtGraphParser.prototype._parseMiscId=function(a){var b=-1;a=a.getAttribute("M");null!==a&&(b=parseInt(a,10));return b};DvtGraphParser.prototype._parseMouseTransparency=function(a){a=a.getAttribute("go");null!==a&&(this._bCacheMouseTransparency=a===DvtGraphParser.TRUE);return this._bCacheMouseTransparency};DvtGraphParser.prototype._parseObjId=function(a){a=a.getAttribute("O");null!==a?this._cacheObjId=a:a=this._cacheObjId;return a};
DvtGraphParser.prototype._parsePath=function(a,b){var c,d,e,f=b.getAttribute("d").replace(/([MLCZQ])/gi,",$1,");c=f.split(",");d=c.length;c[0]||(c.splice(0,1),d--);c[d-1]||(c.splice(d-1,1),d--);for(e=0;e<d;e++)c[e]||(c.splice(e,1),d--);for(e=0;e<d;e++)f=c[e],"Z"!=f&&(c[e+1]=parseFloat(c[e+1]),c[e+2]=parseFloat(c[e+2]),e+=2,"M"!=f&&"L"!=f&&("C"==f&&(c[e+1]=parseFloat(c[e+1]),c[e+2]=parseFloat(c[e+2]),c[e+3]=parseFloat(c[e+3]),c[e+4]=parseFloat(c[e+4]),e+=4),"Q"==f&&(c[e+1]=parseFloat(c[e+1]),c[e+2]=
parseFloat(c[e+2]),e+=2)));d=a===DvtGraphObjType.INDICATOR&&this._Chart.isInitFx();f=this._Chart.isSelectionSupported()&&(a===DvtGraphObjType.FUNNEL_SLICE||a===DvtGraphObjType.SLICE||a===DvtGraphObjType.PIE_BAR_SLICE||a===DvtGraphObjType.SLICE_CRUST||a===DvtGraphObjType.PIE_BAR_SLICE_CRUST);e=this._Chart.getSeriesColor(this._parseSeriesIndex(b));d?d=this._type===DvtGraphType.DIAL?new DvtDialIndicator(this._ctx):new DvtStatusIndicator(this._ctx):f?(d=new DvtGraphSelectablePath(this._ctx),d.setDataColor(e),
d.setCursor(DvtSelectionEffectUtils.getSelectingCursor()),d.setZOrderManager(this._Chart)):d=new DvtPath(this._ctx);DvtGraphSysUtils.makeDetObject(d,this._Chart,a);d.setCommands(c);this._type===DvtGraphType.DIAL&&(c=b.getAttribute("por"),null!=c&&(c=c.split(","),d._xPor=parseFloat(c[0]),d._yPor=parseFloat(c[1])));a===DvtGraphObjType.INDICATOR&&this._Chart.isDataAnimation()&&(d._Dlo._DCHandler=this._type===DvtGraphType.DIAL?new DvtDCDialIndicator(this._ctx,d):new DvtDCStatusIndicator(this._ctx,d));
this._parseBaseAttribs(d,b,a);a!==DvtGraphObjType.SLICE&&a!==DvtGraphObjType.PIE_BAR_SLICE&&a!==DvtGraphObjType.SLICE_CRUST&&a!==DvtGraphObjType.PIE_BAR_SLICE_CRUST||this._storePie3DFace(d._Dlo);a!==DvtGraphObjType.SLICE&&a!==DvtGraphObjType.PIE_BAR_SLICE||this._addRiser(d);a===DvtGraphObjType.GAUGE_FRAME&&(c=this._Chart.getGaugeData().m_sTooltip)&&(d._Dlo.setTooltipText(c),d._Dlo.setUseTooltip(!0));return d};
DvtGraphParser.prototype._parsePie=function(a,b){var c,d,e=0,f=0;d=this._Chart.getWidth();var g=this._Chart.getHeight(),h=new DvtLegacyPieChart(this._Chart,this._ctx,this._Chart.__dispatchEvent,this._Chart);DvtGraphSysUtils.makeDetObject(h,this._Chart);var k=h._Dlo;this._Chart.__setPieChart(h);k.setObjId(DvtGraphObjType.PIE_CHART);this._parseBaseAttribs(h,b,a);var m=b.getAttribute("rotate"),k=0;m&&(k=parseFloat(m));if(m=b.getAttribute("p"))c=m.indexOf(DvtGraphParser.COMMA),e=parseFloat(m.substring(0,
c)),d=m.indexOf(DvtGraphParser.COMMA,++c),f=parseFloat(m.substring(c,d)),c=m.indexOf(DvtGraphParser.COMMA,++d),d=parseFloat(m.substring(d,c)),g=parseFloat(m.substring(++c)),isNaN(g)&&(g=d);m=b.getAttribute("depth");c=0;m&&(c=parseFloat(m));(m=this._arPieSliceLabels)||(m=this._Data.getSeriesLabels())||(m=this._Data.getSeries());d/=2;var g=g/2,n=this._Chart.is3D();h.set3D(n);var p=this._Chart.getFont(this._parseFontId(b)),n=new DvtPieInfo;n.setFeelerColor(this._pieFeelerColor);n.setFillType(this._Chart.getSeriesEffect());
n.setCSSStyle(p.getCSSStyle());n.setLabelPosition(this._pieLabelPos);n.setLabels(m);n.setLabelType(this._pieLabelType);n.setValueFormat(this._pieSliceLabelVF);n.setVisualEffects(this._Chart.getVisualEffect());n.setSliceInteractive(this._bPieAutoExplode);n.setInitFx(this._Chart.isInitFx());(m=this._Chart.getAnimation())&&m.dataChangeDuration&&n.setAnimationDuration(m.dataChangeDuration/1E3);h.setPieInfo(n);m=new DvtRectangle(this._pieFrameX,this._pieFrameY,this._pieFrameW,this._pieFrameH);e=new DvtPoint(e+
d,f+g);h.setPosition(e,d,g,m);h.setAnchorOffset(k);h.setDepth(c);return this._pieChart=h};
DvtGraphParser.prototype._parsePieSlice=function(a,b){var c=new DvtLegacySliceInfo,d=b.getAttribute("ex");d&&c.setExplode(parseFloat(d));this._parseGroupIndex(b);var e=this._pieChart.getPieInfo();e.setId(this._cacheGroupId);d=this._parseSeriesIndex(b);c.setId(this._cacheSeriesId);c.setIndex(d);c.setContextMenuId(this._Chart.getMenuId(this._cacheSeriesIndex,this._cacheGroupIndex));c.setValue(this._Chart.getData(DvtGraphData.DV_Y,this._cacheSeriesIndex,this._cacheGroupIndex));var f=b.getAttribute("fc");
f||(f=this._Chart.getSeriesColor(this._cacheSeriesIndex));var g=""!==f?7<f.length?DvtColorUtils.getPound(f):f:null,f=DvtColorUtils.getAlpha(f);c.setFillColor(g);c.setFillAlpha(f);f=this._parseFillType(b);f===DvtFill.PATTERN&&(this._pieChart._pieInfo.setFillType(f),c.setFillPattern(b.getAttribute("fp")));g=null;(f=b.getAttribute("l"))&&(g=f);e.getLabelType()!=DvtPieChart.LABEL_TYPE_CUSTOM&&(e=e.getLabels(),0<=d&&d<e.length&&e&&(g=e[d]));c.setText(g?g:"missing?");if(f=b.getAttribute("bc"))c.setStrokeColor(7<
f.length?DvtColorUtils.getPound(f):f),c.setStrokeAlpha(DvtColorUtils.getAlpha(f));this._checkTooltipTemplate(b);this._bCacheMouseTransparency||((f=b.getAttribute("t"))||this._bCacheUseTooltipTemplate&&(f=this._Data.makeTooltipFromTemplate(this._cacheSeriesIndex,this._cacheGroupIndex)),null!==f&&c.setTooltip(DvtGraphParser.convertLineBreaks(f)));(f=b.getAttribute("Z"))&&c.setUserProps(f);c.setObjId(a);if(d=b.childNodes)for(e=0;e<d.length;e++)if("sa"===d[e].nodeName)c.setShapeAttr(DvtShapeAttr.parse(this._Chart,
d[e]));else if("psl"===d[e].nodeName&&(f=d[e].childNodes))for(g=0;g<f.length;g++)if("sa"===f[g].nodeName){var h=DvtShapeAttr.parse(this._Chart,f[g]);h.bLink&&(h.linkColor=this._linkColor);c.setLabelShapeAttr(h)}this._pieChart.addSliceInfo(c)};
DvtGraphParser.prototype._parsePolygon=function(a,b){var c=b.getAttribute("p"),c=c.replace(/ /gi,","),c=c.split(","),c=DvtArrayUtils.toFloat(c),d=a===DvtGraphObjType.BAR_RISER||a===DvtGraphObjType.BAR_RISER_SIDE||a===DvtGraphObjType.BAR_RISER_TOP,e=a===DvtGraphObjType.PIE_BAR_RISER||a===DvtGraphObjType.PIE_BAR_RISER_SIDE||a===DvtGraphObjType.PIE_BAR_RISER_TOP,f=null;a===DvtGraphObjType.AREA_RISER&&this._Chart.isInitFx()?f=new DvtAreaRiser(this._ctx,c):this._Chart.isSelectionSupported()&&(d||e)?(f=
new DvtGraphDetPolygon(this._ctx,c),f.setDataColor(this._Chart.getSeriesColor(this._parseSeriesIndex(b))),f.setCursor(DvtSelectionEffectUtils.getSelectingCursor()),f.setZOrderManager(this._Chart)):f=new DvtPolygon(this._ctx,c);DvtGraphSysUtils.makeDetObject(f,this._Chart,a);c=f._Dlo;this._parseBaseAttribs(f,b,a);if(a===DvtGraphObjType.AREA_RISER||a===DvtGraphObjType.LINE_RISER_TOP)this._addRiser(f),c.setMultiRiser(!0),this._Chart.isDataAnimation()&&(f._Dlo._DCHandler=new DvtDCLineArea(this._ctx,f));
else if(this._Chart.is3D())if(a===DvtGraphObjType.FRAME_SIDE)this._Chart.setFrameSide(f);else if(d||e){var d=c.getSeriesIndex(),g=c.getGroupIndex();this._a3DCurBar||(this._a3DCurBar=[]);c=this._3DBarCurRiser;if(!c||this._iCurBarSeries!=d||this._iCurBarGroup!=g){var h=this._Chart.isInitFx();this._3DBarCurRiser=c=!h&&!this._Chart.isDataAnimation()||e?new Dvt3DBar(this._ctx):new Dvt3DBarRiser(this._ctx);DvtGraphSysUtils.makeDetObject(c,this._Chart)}this._iCurBarSeries=d;this._iCurBarGroup=g;if(a===DvtGraphObjType.BAR_RISER||
a===DvtGraphObjType.PIE_BAR_RISER)this._3DBars||(this._3DBars=[]),this._a3DCurBar[0]=f,e=this._3DBars[d],e||(e=[],this._3DBars[d]=e),e.push(this._a3DCurBar),c=this._3DBarCurRiser,h&&c.setInitFx&&c.setInitFx(h),c.setFace(f),c._Dlo.setObjId(DvtGraphObjType.BAR3D_RISER),c._Dlo.setSeriesIndex(d),c._Dlo.setSeriesId(""+f._Dlo.getSeriesId()),c._Dlo.setGroupIndex(f._Dlo.getGroupIndex()),c._Dlo.setGroupId(""+f._Dlo.getGroupId()),this._addRiser(c),this._Chart.isDataAnimation()&&c instanceof Dvt3DBarRiser&&
(c._Dlo._DCHandler=new DvtDC3DBar(this._ctx,c)),f=c;else if(a===DvtGraphObjType.BAR_RISER_SIDE||a===DvtGraphObjType.PIE_BAR_RISER_SIDE)this._a3DCurBar[1]=f,this._3DBarCurRiser.setFace(f),f=null;else if(a===DvtGraphObjType.BAR_RISER_TOP||a===DvtGraphObjType.PIE_BAR_RISER_TOP)this._a3DCurBar[2]=f,this._3DBarCurRiser.setFace(f),f=null}a===DvtGraphObjType.FRAME_SEPARATOR&&(this._FrameSep=f,this._Chart.setFrameSeparator(f));return f};
DvtGraphParser.prototype._parsePolyline=function(a,b){var c;c=b.getAttribute("points");c=c.replace(/ /gi,",");c=c.split(",");DvtArrayUtils.toFloat(c);c=a===DvtGraphObjType.LINE_RISER&&this._Chart.isInitFx()?new DvtLineRiser(this._ctx,c):new DvtPolyline(this._ctx,c);DvtGraphSysUtils.makeDetObject(c,this._Chart,a);this._parseBaseAttribs(c,b,a);if(this._workC){var d=new DvtSolidStroke(this._workC,this._workCA,this._workLW);d.setLineJoin(DvtStroke.ROUND);d.setStyle(this._workLS,this.workDash);c.setStroke(d)}this._workFC&&
c.setFill(null);a===DvtGraphObjType.LINE_RISER&&(this._addRiser(c),this._Chart.isDataAnimation()&&(c._Dlo._DCHandler=new DvtDCLineArea(this._ctx,c)),c._Dlo.setMultiRiser(!0));return c};
DvtGraphParser.prototype._parseRangeSlider=function(a,b){var c,d,e;c=b.getAttribute("p");d=c.split(",");d=DvtArrayUtils.toFloat(d);(c=b.getAttribute("isHoriz"))&&(e="t"===c?!0:!1);var f,g;switch(b.getAttribute("id")){case "X1RS":f=DvtScrollbar.ID_X1RS;g=DvtGraphObjType.X1_RANGE_SLIDER;break;case "Y1RS":f=DvtScrollbar.ID_Y1RS;g=DvtGraphObjType.Y1_RANGE_SLIDER;break;case "Y2RS":f=DvtScrollbar.ID_Y2RS;g=DvtGraphObjType.Y2_RANGE_SLIDER;break;case "O1RS":f=DvtScrollbar.ID_O1RS;g=DvtGraphObjType.O1_RANGE_SLIDER;
break;default:f=DvtScrollbar.ID_NONE}this._parseFontId(b);e=new DvtGraphScrollbar(this._ctx,f,d[0],d[1],d[2],d[3],e,!this._Chart.isAttachmentMode(),a);e.setLiveScroll(this._Chart.getZoomScrollBehavior()==DvtGraphCore.ZS_LIVE_SCROLL);DvtGraphSysUtils.makeDetObject(e,this._Chart,g);e.setScrollEventJs(b.getAttribute("scrollJS"));this._Chart.isAttachmentMode()||e.setZoomEventJs(b.getAttribute("zoomJS"));this._Chart.getHandleManager().addScrollbar(e);if(c=b.getAttribute("startV")){if(d=parseFloat(c),!isNaN(d)&&
(c=b.getAttribute("endV")))if(g=parseFloat(c),!isNaN(g)){c=null;if(null!=this._Data)switch(f){case DvtScrollbar.ID_X1RS:c=this._Data.getXAVF();break;case DvtScrollbar.ID_Y1RS:c=this._Data.getYAVF();break;case DvtScrollbar.ID_Y2RS:c=this._Data.getY2AVF()}e.addDataAxis(d,g,c)}}else if(c=b.getAttribute("startD")){if(d=parseInt(c),!isNaN(d)&&(c=b.getAttribute("endD")))if(g=parseInt(c),!isNaN(g)){f=null;(c=b.getAttribute("taR"))&&(f=c.split(","));var h=Number.NaN;(c=b.getAttribute("timeZone"))&&(h=parseInt(c));
e.addTimeAxis(d,g,f,h)}}else f==DvtScrollbar.ID_O1RS&&null!=this._Data&&((c=this._Data.getO1GroupLabels())&&0!=c.length||(c=this._Data.getGroupLabels()),c&&0<c.length&&e.addCustomAxis(c));if(c=b.getAttribute("tp"))d=c.split(","),e.setThumbStartAndLength(d[1],d[0]);e._thumb.updateTooltipText();return e};
DvtGraphParser.prototype._parseRangeSliderZoomButton=function(a){if(this._Chart.isAttachmentMode())return null;var b,c,d,e;b=a.getAttribute("p");c=b.split(",");c=DvtArrayUtils.toFloat(c);e=a.getAttribute("resources");(b=a.getAttribute("flipped"))&&(d="true"===b?!0:!1);b=new DvtZoomButton(this._ctx,e,null,d,DvtGraphObjType.RANGE_SLIDER_ZOOM_BUTTON);DvtGraphSysUtils.makeDetObject(b,this._Chart,DvtGraphObjType.RANGE_SLIDER_ZOOM_BUTTON);b.setTranslateX(c[0]);b.setTranslateY(c[1]);b.setX1ScrollInJS(a.getAttribute(DvtGraphParser.cATTR_X1IN));
b.setX1ScrollOutJS(a.getAttribute(DvtGraphParser.cATTR_X1OUT));b.setY1ScrollInJS(a.getAttribute(DvtGraphParser.cATTR_Y1IN));b.setY1ScrollOutJS(a.getAttribute(DvtGraphParser.cATTR_Y1OUT));b.setY2ScrollInJS(a.getAttribute(DvtGraphParser.cATTR_Y2IN));b.setY2ScrollOutJS(a.getAttribute(DvtGraphParser.cATTR_Y2OUT));b.setX1ActualJS(a.getAttribute(DvtGraphParser.cATTR_X1ACTUAL));b.setY1ActualJS(a.getAttribute(DvtGraphParser.cATTR_Y1ACTUAL));b.setY2ActualJS(a.getAttribute(DvtGraphParser.cATTR_Y2ACTUAL));b.setAllActualJS(a.getAttribute(DvtGraphParser.cATTR_ALLACTUAL));
b.createMenu(this._Chart.isVertical());this._Chart.setZoomButton(b)};
DvtGraphParser.prototype._parseRect=function(a,b){var c=b.getAttribute("p"),d=c.split(","),d=DvtArrayUtils.toFloat(d);if(c=b.getAttribute("tURL"))c=new DvtImage(this._ctx,c,d[0],d[1],d[2],d[3]);else{var e=a===DvtGraphObjType.BAR_RISER&&this._Chart.isInitFx(),c=e||(this._Chart.isDataAnimation()||this._Chart.isSelectionSupported())&&(a===DvtGraphObjType.BAR_RISER||a===DvtGraphObjType.PIE_BAR_RISER||a===DvtGraphObjType.STOCK_RISING_RISER||a===DvtGraphObjType.STOCK_FALLING_RISER||a===DvtGraphObjType.STOCK_VOLUME_RISER)?
new Dvt2DBarRiser(this._ctx,d[0],d[1],d[2],d[3]):new DvtRect(this._ctx,d[0],d[1],d[2],d[3]);e&&c.setInitFx&&c.setInitFx(e)}DvtGraphSysUtils.makeDetObject(c,this._Chart,a);this._parseBaseAttribs(c,b,a);this._Chart.isDataAnimation()&&c instanceof Dvt2DBarRiser&&(c._Dlo._DCHandler=new DvtDC2DBar(this._ctx,c));c instanceof DvtRect&&((e=b.getAttribute("rx"))&&c.setRx(parseFloat(e)),(e=b.getAttribute("ry"))&&c.setRy(parseFloat(e)));a!==DvtGraphObjType.STOCK_RISING_RISER&&a!==DvtGraphObjType.STOCK_FALLING_RISER&&
a!==DvtGraphObjType.STOCK_VOLUME_RISER||this._storeStockMarker(c._Dlo);a===DvtGraphObjType.FRAME?this._Chart.setFrameRect(d[0],d[1],d[2],d[3]):a===DvtGraphObjType.CHARTBKGND?this._Chart.setBGRect(d[0],d[1],d[2],d[3]):a===DvtGraphObjType.PIE_FRAME&&(this._pieFrameX=d[0],this._pieFrameY=d[1],this._pieFrameW=d[2],this._pieFrameH=d[3]);a===DvtGraphObjType.BAR_RISER&&this._addRiser(c);c.setPixelHinting(a===DvtGraphObjType.FRAME||a===DvtGraphObjType.LEGEND_AREA||a===DvtGraphObjType.STOCK_RISING_RISER||
a===DvtGraphObjType.STOCK_FALLING_RISER||a===DvtGraphObjType.STOCK_VOLUME_RISER||a===DvtGraphObjType.BOX_BAR);a===DvtGraphObjType.LEGEND_AREA&&this._Chart.setLegendRect(c);return c};DvtGraphParser.prototype._parseRectString=function(a,b){b=b?b:this._workRect;var c=a.split(DvtGraphParser.COMMA),c=DvtArrayUtils.toFloat(c);b.x=c[0];b.y=c[1];b.w=c[2];b.h=c[3]};
DvtGraphParser.prototype._parseRefObjects=function(a,b){var c=b.childNodes,d=c.length,e,f,g;for(e=0;e<d;e++)b=c[e],"ro"===b.nodeName&&(f=this._parseMiscId(b),0<=f&&f&&(g=this._parseObjId(b),f+=g,this._addToReferredFrom(a,f)))};
DvtGraphParser.prototype._parseScrollableLegend=function(a,b){var c=this._Chart.getCtx(),d,e;d=b.getAttribute("p");e=d.split(",");e=DvtArrayUtils.toFloat(e);var f=(this._aLegends?this._aLegends.length:0)+(this._aMiscLegends?this._aMiscLegends.length:0);d=b.getAttribute("h");c=new DvtScrollableLegend(c,e[0],e[1],e[2],e[3],d?parseInt(d):0,this._Chart._legendHandle,f);DvtAgent.isTouchDevice()&&c.setTouchManager(this._Chart.__getEventManager().getTouchManager());DvtGraphSysUtils.makeDetObject(c,this._Chart,
a);this._Chart._scrollableLegend=c;c._Dlo.setSeriesIndex(-1);return c};DvtGraphParser.prototype._parseShapeAttributes=function(a,b){if(a.isMouseEnabled()){var c=a._Dlo,d=DvtShapeAttr.parse(this._Chart,b);c.setShapeAttr(d);DvtShapeAttr.hasClickableShapeAttribute(d)&&a.setCursor(DvtSelectionEffectUtils.getSelectingCursor());d&&d.alt&&(c.setTooltipText(d.alt),c.setUseTooltip(!0));d.bLink&&a instanceof DvtText&&(c=a.getFill()?a.getFill().getAlpha():1,a.setSolidFill(this._linkColor,c))}};
DvtGraphParser.prototype._parseShowPopupBehavior=function(a){var b=a.getAttribute("popupId"),c=a.getAttribute("triggerType"),d=a.getAttribute("alignId");a=a.getAttribute("align");b=new DvtGraphShowPopupBehavior(b,c,d,a);this._Chart.__getShowPopupBehaviors().push(b)};
DvtGraphParser.prototype._resolveRefObjLinkage=function(){if(this._aRefFrom&&this._aRefTo){var a=this._aRefFrom.length,b=this._aRefTo.length,c,d,e,f,g,h,k=null;for(c=0;c<a;c++)for(d=this._aRefFrom[c++]._Dlo,g=this._aRefFrom[c],(k=d.getRefObjs())||(k=[],d.setRefObjs(k)),d=0;d<b;d++)if(f=this._aRefTo[d],e=f._Dlo,h=""+e.getMiscId()+e.getObjId(),g===h){k.push(f);e.setRefObj(!0);break}this._aRefTo=this._aRefFrom=null}};
DvtGraphParser.prototype._parseSeriesIndex=function(a){a=a.getAttribute("S");if(null!==a){if(0===a.length)return this._cacheSeriesIndex=-1,this._cacheSeriesId=null,-1}else return this._cacheSeriesIndex;a=parseInt(a,10);isNaN(a)&&(a=-1);this._cacheSeriesIndex=a;0<=a&&a<this._Data.getSeriesCount()?this._cacheSeriesId=this._Data.getSeriesFromIndex(a):(this._cacheSeriesIndex=a,this._cacheSeriesId=null);return a};
DvtGraphParser.prototype._parseShadow=function(a){a=a.getAttribute("sh");null!==a&&(0===a.length?this._cacheShadowObj=this._cacheShadow=null:a!==this._cacheShadow&&(this._cacheShadow=a,this._cacheShadowObj=this._parseShadowAttrs(a)))};
DvtGraphParser.prototype._parseShadowAttrs=function(a){if(!a)return new DvtShadow;var b=null,c=4,d=1,e=45,f=4,g=4,h=1,k=!1,m=!1,n=!1;a=a.split(",");for(var p=a.length,q,r=0;r<p;r++)if((q=a[r])&&0!==q.length)switch(r){case 0:b=DvtColorUtils.getRGBA(q);break;case 1:q=parseFloat(q);isNaN(q)||(c=q);break;case 2:q=parseFloat(q);isNaN(q)||(d=q);break;case 3:q=parseFloat(q);isNaN(q)||(e=q);break;case 4:q=parseFloat(q);isNaN(q)||(f=q);break;case 5:q=parseFloat(q);isNaN(q)||(g=q);break;case 6:q=parseInt(q,
10);isNaN(q)||(h=q);break;case 7:k=q.charAt()==DvtGraphParser.TRUE||"1"==q.charAt();break;case 8:m=q.charAt()==DvtGraphParser.TRUE||"1"==q.charAt();break;case 9:n=q.charAt()==DvtGraphParser.TRUE||"1"==q.charAt()}return new DvtShadow(b,c,f,g,e,d,h,k,m,n)};
DvtGraphParser.prototype._parseText=function(a,b){var c,d,e,f,g;c=b.getAttribute("p");d=c.split(",");d=DvtArrayUtils.toFloat(d);g=d[0];f=d[2];e=b.textContent;if(c=b.getAttribute("a"))this._cacheTextAngle=null!==c?parseFloat(c):0;var h=this._parseFontId(b);c=this._Chart.getFont(h);d=new DvtText(this._ctx,e,g,d[1]);DvtGraphSysUtils.makeDetObject(d,this._Chart,a);h=d._Dlo;DvtTextUtils.applyFont(d,c);0!==this._cacheTextAngle&&d.doNotUseSetAngle(this._cacheTextAngle);var k=b.getAttribute("j");k?(this._bBiDi&&
0==this._cacheTextAngle&&("r"==k?k="l":"l"==k&&(k="r")),"l"!==k&&"c"!==k&&"r"!==k&&(k="l"),this._cacheTextJustify=k):k=this._cacheTextJustify;"l"!==k&&(null!=document.body&&(e=this._getTextSize(e,c,new DvtRectangle),g="r"===k?g+f-e.width:g+f/2-e.width/2),d.setX(g));0!==this._cacheTextAngle&&(f=b.getAttribute("cx"),f=null!==f?parseFloat(f):0,g=b.getAttribute("cy"),g=null!==g?parseFloat(g):0,d.doNotUseSetAngle(this._cacheTextAngle),d.doNotUseSetRotatePoint(f,g));this._parseSeriesIndex(b);h.setSeriesIndex(this._cacheSeriesIndex);
h.setSeriesId(this._cacheSeriesId);this._parseGroupIndex(b);h.setGroupIndex(this._cacheGroupIndex);h.setGroupId(this._cacheGroupId);f=this._parseMiscId(b);0<=f&&h.setMiscId(f);this._checkTooltipTemplate(b);this._parseMouseTransparency(b);d.setMouseEnabled(!this._bCacheMouseTransparency);this._bCacheMouseTransparency||this._parseTooltip(b,d);a===DvtGraphObjType.LEGEND_TEXT&&(this._addLegend(d),this._Chart.isDataAnimation()&&(d._Dlo._DCHandler=new DvtDCText(this._ctx,d)));b.hasChildNodes()&&this._parseBaseChildNodes(b,
d,!0);(c=b.getAttribute("drillJs"))&&this._parseDrill(d,c);(c=b.getAttribute("Z"))&&h.setUserProps(c);a===DvtGraphObjType.O1_LABEL||a===DvtGraphObjType.X1_LABEL?(this._aXLabels||(this._aXLabels=[]),this._aXLabels.push(d),this._Chart.isDataAnimation()&&(d._Dlo._DCHandler=new DvtDCText(this._ctx,d))):a===DvtGraphObjType.Y1_LABEL?(this._aY1Labels||(this._aY1Labels=[]),this._aY1Labels.push(d)):a===DvtGraphObjType.Y2_LABEL?(this._aY12abels||(this._aY2Labels=[]),this._aY2Labels.push(d)):a===DvtGraphObjType.LEGEND_TEXT&&
this._HSS&&d.setCursor(DvtSelectionEffectUtils.getSelectingCursor());return d};
DvtGraphParser.prototype._parseTimeSelector=function(a,b){var c;c=b.getAttribute("p");c=c.split(",");c=DvtArrayUtils.toFloat(c);var d=new DvtTimeSelector(this._ctx,c[0],c[1],c[2],c[3],a);DvtAgent.isTouchDevice()&&d.setTouchManager(this._Chart.__getEventManager().getTouchManager());DvtGraphSysUtils.makeDetObject(d,this._Chart,a);this._parseBaseAttribs(d,b,a);(c=b.getAttribute("tasd"))&&d.setTimeAxisStartDate(parseFloat(c));(c=b.getAttribute("taed"))&&d.setTimeAxisEndDate(parseFloat(c));(c=b.getAttribute("tasp"))&&
d.setTimeAxisStartPixel(parseInt(c));(c=b.getAttribute("taep"))&&d.setTimeAxisEndPixel(parseInt(c));(c=b.getAttribute("taR"))&&d.setTimeAxisMonths(c.split(","));(c=b.getAttribute("timeZone"))&&d.setTimeZoneOffset(parseInt(c));d.setTimeAxisEventJs(b.getAttribute("taJS"));d.setTimeSelectorEventJs(b.getAttribute("tsJS"));d.setTranslatedStart(b.getAttribute("tranS"));d.setTranslatedEnd(b.getAttribute("tranE"));return d};
DvtGraphParser.prototype._parseTooltip=function(a,b){var c,d=b._Dlo;(c=a.getAttribute("t"))?0<c.replace(new RegExp(DvtGraphParser.MD_TT_SEPARATOR,"g"),"").length&&(d.setTooltipText(c.replace(new RegExp(DvtGraphParser.MD_TT_SEPARATOR,"g"),"\n")),d.setUseTooltip(!0)):(c=this._bCacheUseTooltipTemplate,d.setUseTooltip(c))};DvtGraphParser.prototype._parseTooltipFormat=function(a){var b="l",c=a.getAttribute("j");c&&(b=c.charAt(0).toLowerCase());this._cacheTextJustify=b;a=this._parseFontId(a);this._Chart.setTooltipFontId(a)};
DvtGraphParser.prototype._parseValueFormat=function(a){if(void 0==a||null===a||0===a.length)a=new DvtValueFormat;else{for(var b,c,d,e,f,g,h,k,m=a.split(DvtGraphParser.MD_VF_SEPARATOR);22>m.length;)m.push("");a=parseFloat(m[0]);b=parseInt(m[12],10);c=parseInt(m[13],10);d=parseInt(m[14],10);e=parseInt(m[15],10);f=parseInt(m[16],10);g=m[18].charAt(0)===DvtGraphParser.TRUE;h=parseFloat(m[20]);k=m[21].charAt(0)===DvtGraphParser.TRUE;a=new DvtValueFormat(a,m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],
m[11],b,c,d,e,f,m[17],g,m[19],h,k)}return a};DvtGraphParser.prototype._resolveClipRects=function(){if(null!==this._aForClipResolution){for(var a=this._aForClipResolution,b=this._aForClipResolution.length,c=0;c<b;c++)a[1]._Dlo._clipPath=this._Chart.getClipPath(a[0]),c++;this._aForClipResolution=null}};
DvtGraphParser.prototype._resolveRelatedPie3DFaces=function(){for(var a in this._pie3DFacesMap)for(var b=this._pie3DFacesMap[a],c=0;c<b.length;c++)for(var d=b[c],e=0;e<b.length;e++)if(c!==e){var f=b[e];d.addRelatedObject&&d.addRelatedObject(f)}};DvtGraphParser.prototype._resolveRelatedStockMarkers=function(){for(var a in this._stockMarkersMap)for(var b=this._stockMarkersMap[a],c=0;c<b.length;c++)for(var d=b[c],e=0;e<b.length;e++)if(c!==e){var f=b[e];d.addRelatedObject&&d.addRelatedObject(f)}};
DvtGraphParser.prototype._setAnalyticLayerVals=function(a,b,c){if(b=DvtMarker.convertShapeString(b))a.setUnderlayType(b),c?a.setUnderlayFC(c):a.setUnderlayFC(DvtColorUtils.setAlpha(defAnLayColor,defAnLayalpha))};DvtGraphParser.prototype._storePie3DFace=function(a){var b=a.getGroupId()+","+a.getSeriesId(),c=this._pie3DFacesMap[b];c||(c=[]);c.push(a.getDetObj());this._pie3DFacesMap[b]=c};
DvtGraphParser.prototype._storeStockMarker=function(a){var b=a.getGroupId(),c=this._stockMarkersMap[b];c||(c=[]);c.push(a.getDetObj());this._stockMarkersMap[b]=c};DvtGraphParser.prototype._storeShadow=function(a,b){this._shadowMap||(this._shadowMap=[]);this._shadowMap.push(a);this._shadowMap.push(b)};DvtGraphParser.prototype._storeBevel=function(a,b){this._bevelMap||(this._bevelMap=[]);this._bevelMap.push(a);this._bevelMap.push(b)};
DvtGraphParser.prototype._getTextSize=function(a,b,c){var d=document.createElement("DvtTM");document.body.appendChild(d);var e="",e=b.italic?"font-style:italic; ":"font-style:normal; ";b.bold&&(e+="font-weight:bold; ");b.underline&&(e+="text-decoration:underline; ");e+="font-family:"+(b.name?b.name:"tahoma, sans-serif")+";";d.style.cssText=e;d.style.fontSize=""+b.size+"px";d.style.position="absolute";d.style.left=-5E3;d.style.top=-5E3;d.style.width="auto";d.innerHTML=a;c||(c=new DvtRectangle);c.width=
d.clientWidth;c.height=d.clientHeight;document.body.removeChild(d);return c};DvtGraphParser.prototype._parseDataCursor=function(a){var b=this._Chart,c=b.getDataCursor(),d=a.getAttribute("behavior");d&&c.setBehavior(d);(d=a.getAttribute("display"))&&b.setDataCursorDisplay(d);(a=a.getAttribute("lineFillColor"))&&c.setLineColor(a)};
DvtGraphParser.prototype._parseMagnifyLens=function(a){var b=this._Chart,c=this._ctx.getCustomTooltipManager().getMagnifyLens(),d=a.getAttribute("display");d&&b.setMagnifyLensDisplay(d);(a=a.getAttribute("rimFillColor"))&&c.setRimFillColor(a)};DvtGraphParser.prototype._parseResources=function(){var a=this._Chart,b={};b[DvtGraphCore.HIDE_KEY]="Hide";b[DvtGraphCore.SHOW_KEY]="Show";b[DvtGraphCore.CLEAR_SELECTION_KEY]="Clear Selection";a.setTextResources(b)};
DvtGraphParser.convertLineBreaks=function(a){if(a)return a.replace(new RegExp(DvtGraphParser.NEW_LINE,"g"),"\n")};
var DvtBaseAxis=function(a,b,c,d,e){this.Init(a,b,c,d,e)};DvtObj.createSubclass(DvtBaseAxis,DvtObj,"DvtBaseAxis");DvtBaseAxis.prototype.Init=function(a,b,c,d,e){this._axisMinCoord=a;this._axisMaxCoord=b;this._axisLength=b-a;this._width=c;this._height=d;this._isHoriz=e};DvtBaseAxis.prototype.calcRatio=function(a){a=(a-this._axisMinCoord)/(this._axisMaxCoord-this._axisMinCoord);0>a?a=0:1<a&&(a=1);this._isHoriz||(a=1-a);return a};
var DvtCustomAxis=function(a,b,c,d,e,f){this.Init(a,b,c,d,e,f)};DvtObj.createSubclass(DvtCustomAxis,DvtBaseAxis,"DvtCustomAxis");DvtCustomAxis.prototype.Init=function(a,b,c,d,e,f){DvtCustomAxis.superclass.Init.call(this,b,c,d,e,f);this._labels=a};DvtCustomAxis.prototype.getLabelAt=function(a){return this._labels&&this._labels.length>a?this._labels[a]:""};DvtCustomAxis.prototype.getNumLabels=function(){return this._labels?this._labels.length:0};
var DvtDataAxis=function(a,b,c,d,e,f,g,h){this.Init(a,b,c,d,e,f,g,h)};DvtObj.createSubclass(DvtDataAxis,DvtBaseAxis,"DvtDataAxis");DvtDataAxis.prototype.Init=function(a,b,c,d,e,f,g,h){DvtDataAxis.superclass.Init.call(this,c,d,e,f,g);this._axisMinValue=a;this._axisMaxValue=b;this._valueFormat=h;this._axisRange=b-a;this._axisSize=d-c};
DvtDataAxis.prototype.getLabelAt=function(a){a=this.calcRatio(a);var b;b=(this._axisMaxValue-this._axisMinValue)*a+this._axisMinValue;DvtAgent.isRightToLeft()&&this._isHoriz&&(b=(this._axisMaxValue-this._axisMinValue)*-a+this._axisMaxValue);return this._valueFormat?this._valueFormat.getFormattedValue(b,this._axisMinValue,this._axisMaxValue):b};
var DvtTimeAxis=function(a,b,c,d,e,f,g,h,k){this.Init(a,b,c,d,e,f,g,h,k)};DvtObj.createSubclass(DvtTimeAxis,DvtBaseAxis,"DvtTimeAxis");DvtTimeAxis.TIME_SECOND=1E3;DvtTimeAxis.TIME_MINUTE=60*DvtTimeAxis.TIME_SECOND;DvtTimeAxis.TIME_HOUR=60*DvtTimeAxis.TIME_MINUTE;DvtTimeAxis.TIME_DAY=24*DvtTimeAxis.TIME_HOUR;DvtTimeAxis.TIME_MONTH=365/12*DvtTimeAxis.TIME_DAY;DvtTimeAxis.TIME_YEAR=365*DvtTimeAxis.TIME_DAY;DvtTimeAxis.INTERVAL_MILLISECONDS=0;DvtTimeAxis.INTERVAL_SECONDS=1;
DvtTimeAxis.INTERVAL_MINUTE=2;DvtTimeAxis.INTERVAL_HOUR=3;DvtTimeAxis.INTERVAL_DAY=4;DvtTimeAxis.INTERVAL_MONTH=5;DvtTimeAxis.INTERVAL_YEAR=6;DvtTimeAxis.AM_INDEX=12;DvtTimeAxis.PM_INDEX=13;DvtTimeAxis.AMPM_BEFORE_INDEX=14;DvtTimeAxis.DMY_ORDER_INDEX=15;DvtTimeAxis.YEAR_TRAILING_CHAR_INDEX=16;DvtTimeAxis.DAY_TRAILING_CHAR_INDEX=17;
DvtTimeAxis.prototype.Init=function(a,b,c,d,e,f,g,h,k){DvtTimeAxis.superclass.Init.call(this,c,d,e,f,k);this._axisMinValue=a;this._axisMaxValue=b;this._axisRange=b-a;this._innerIncrement=this._calcInnerIncrement(a,b);this._axisSize=d-c;this._incrSize=this._axisSize/(this._axisRange/this._innerIncrement);this._timeAxisResources=g?g:{};a=-1*(new Date).getTimezoneOffset();isNaN(h)?this._timeZoneOffset=0:this._timeZoneOffset=6E4*(h-a)};
DvtTimeAxis.prototype._calcInnerIncrement=function(a,b){var c=b-a;return c<DvtTimeAxis.TIME_MINUTE?DvtTimeAxis.TIME_MINUTE:c<DvtTimeAxis.TIME_HOUR?DvtTimeAxis.TIME_HOUR:c<DvtTimeAxis.TIME_DAY?DvtTimeAxis.TIME_DAY:c<DvtTimeAxis.TIME_MONTH?DvtTimeAxis.TIME_MONTH:DvtTimeAxis.TIME_YEAR};
DvtTimeAxis.prototype._calcOuterIncrement=function(a,b,c){var d=0;c<=DvtTimeAxis.TIME_HOUR?d=DvtTimeAxis.TIME_DAY:c==DvtTimeAxis.TIME_DAY?d=DvtTimeAxis.TIME_MONTH:c==DvtTimeAxis.TIME_MONTH&&(d=DvtTimeAxis.TIME_YEAR);return 0<d&&b-a>1*d?d:0};
DvtTimeAxis.prototype.getLabelAt=function(a,b){var c=this.calcRatio(a),d=(this._axisMaxValue-this._axisMinValue)*c+this._axisMinValue;DvtAgent.isRightToLeft()&&(d=(this._axisMaxValue-this._axisMinValue)*-c+this._axisMaxValue);if(null!=b){var c=this.calcRatio(a+b),e=(this._axisMaxValue-this._axisMinValue)*c+this._axisMinValue;DvtAgent.isRightToLeft()&&(e=(this._axisMaxValue-this._axisMinValue)*-c+this._axisMaxValue);return this._formatLabel(d,Math.abs(e-d))}return this._formatLabel(d)};
DvtTimeAxis.prototype._formatLabel=function(a,b){var c=new Date(a+this._timeZoneOffset);null!=b&&(this._innerIncrement=b);if(this._innerIncrement<=DvtTimeAxis.TIME_DAY)return this._formatTime(c);var d=c.getDate(),e=c.getFullYear(),f;f=this._timeAxisResources&&12<=this._timeAxisResources.length?this._timeAxisResources[c.getMonth()]:dateToString.substring(0,currIndex);if(this._timeAxisResources&&this._timeAxisResources.length>DvtTimeAxis.DAY_TRAILING_CHAR_INDEX)var g=this._timeAxisResources[DvtTimeAxis.DAY_TRAILING_CHAR_INDEX],
e=e+this._timeAxisResources[DvtTimeAxis.YEAR_TRAILING_CHAR_INDEX],d=d+g;var h=g=!0;this._timeAxisResources&&this._timeAxisResources.length>DvtTimeAxis.DMY_ORDER_INDEX&&(h=this._timeAxisResources[DvtTimeAxis.DMY_ORDER_INDEX],g=h.indexOf("D")<h.indexOf("M"),h=h.indexOf("M")<h.indexOf("Y"));return this._innerIncrement<=7*DvtTimeAxis.TIME_DAY&&null!=this._timeAxisResources?this._formatTime(c)+" "+d+" "+f:this._innerIncrement<=DvtTimeAxis.TIME_YEAR?g?d+" "+f:f+" "+d:this._innerIncrement>=DvtTimeAxis.TIME_YEAR?
h?f+" "+e:e+" "+f:e};
DvtTimeAxis.prototype._formatTime=function(a){var b=a.getHours(),c=a.getMinutes(),d=a.getSeconds(),e="",f="";a=!1;null!=this._timeAxisResources&&this._timeAxisResources>DvtTimeAxis.AMPM_BEFORE_INDEX&&(e=this._timeAxisResources[DvtTimeAxis.AM_INDEX],f=this._timeAxisResources[DvtTimeAxis.PM_INDEX],a="t"==this._timeAxisResources[DvtTimeAxis.AMPM_BEFORE_INDEX]);var g=""!=e&&""!=f,h;g&&(h=f,12<b?(b-=12,h=f):0==b?(h=e,b=12):12>b&&(h=e));b=this._doubleDigit(b)+":"+this._doubleDigit(c)+":"+this._doubleDigit(d);
return g?a?h+" "+b:b+" "+h:b};DvtTimeAxis.prototype._doubleDigit=function(a){return 10>a?"0"+a:""+a};
var DvtLineMarker=function(a){this._Init(a)};DvtObj.createSubclass(DvtLineMarker,DvtObj,"DvtLineMarker");DvtLineMarker.prototype._Init=function(a){this._Chart=a;this._arCoords=null;this._Chart=a;this._gidx=this._sidx=-1;this._handleId=null;this._yMin=this._xMin=Number.MAX_VALUE;this._yMax=this._xMax=Number.MIN_VALUE};DvtLineMarker.prototype.getCoords=function(){return this._arCoords};DvtLineMarker.prototype.setCoords=function(a){this._arCoords=a};DvtLineMarker.prototype.getSeriesIndex=function(){return this._sidx};
DvtLineMarker.prototype.setSeriesIndex=function(a){this._sidx=a};DvtLineMarker.prototype.getGroupIndex=function(){return this._gidx};DvtLineMarker.prototype.setGroupIndex=function(a){this._gidx=a};DvtLineMarker.prototype.getTooltip=function(a,b){return this._Chart.makeTooltipFromSeriesGroup(a,b)};DvtLineMarker.prototype.getHandleId=function(){return this._handleId};DvtLineMarker.prototype.setHandleId=function(a){this._handleId=a};
var DvtShapeAttr=function(){this._Init()};DvtObj.createSubclass(DvtShapeAttr,DvtObj,"DvtShapeAttr");DvtShapeAttr.CLICK_EVENT_JS="AdfPage.PAGE.findComponent('X-ID-X').getPeer().sendToServerPPR({source:'X-ID-X',event:'bi_click',bi_handle:'X-HAND-X',bi_series:'X-SERIES-X',bi_group:'X-GROUP-X',bi_row:'X-ROW-X',bi_column:'X-COL-X',bi_comp_id:'X-CID-X'});";DvtShapeAttr.SERIES_HANDLE="bi_series_handle";DvtShapeAttr.GROUP_HANDLE="bi_group_handle";DvtShapeAttr.DATA_HANDLE="bi_data_handle";
DvtShapeAttr.ANNOTATION_HANDLE="bi_annotation_handle";DvtShapeAttr.NONDATA_HANDLE="bi_non_data_handle";DvtShapeAttr.UNKNOWN_HANDLE="";DvtShapeAttr.prototype._clear=function(){this.linkRef=this.drillJS=this.target=this.onMouseUp=this.onMouseOver=this.onMouseOut=this.onMouseMove=this.onMouseDown=this.onDblClick=this.onClick=this.href=this.clickable=this.clickListener=this.clickEventJs=this.clickAction=this._chart=null};
DvtShapeAttr.prototype._Init=function(){this._clear();this._bClickListenerFired=!1};
DvtShapeAttr.parse=function(a,b){var c=new DvtShapeAttr;c._chart=a;c.alt=b.getAttribute("alt");c.clickAction=b.getAttribute("clickAction");c.clickEventJs=b.getAttribute("Ce");c.clickListener=b.getAttribute("clickListener");c.clickable=b.getAttribute("clickable");c.href=b.getAttribute("href");c.onClick=b.getAttribute("onClick");c.onDblClick=b.getAttribute("onDblClick");c.onMouseDown=b.getAttribute("onMouseDown");c.onMouseMove=b.getAttribute("onMouseMove");c.onMouseOut=b.getAttribute("onMouseOut");
c.onMouseOver=b.getAttribute("onMouseOver");c.onMouseUp=b.getAttribute("onMouseUp");c.target=b.getAttribute("target");c.drillJS=b.getAttribute("drillJs");c.bLink="t"==b.getAttribute("link");c.linkColor=null;return c};
DvtShapeAttr.prototype.clone=function(){var a=new DvtShapeAttr;a._chart=this._chart;a.clickAction=this.clickAction;a.clickEventJs=this.clickEventJs;a.clickListener=this.clickListener;a.clickable=this.clickable;a.href=this.href;a.onClick=this.onClick;a.onDblClick=this.onDblClick;a.onMouseDown=this.onMouseDown;a.onMouseMove=this.onMouseMove;a.onMouseOut=this.onMouseOut;a.onMouseOver=this.onMouseOver;a.onMouseUp=this.onMouseUp;a.target=this.target;a.drillJS=this.drillJS;a.linkRef=this.linkRef;a.bLink=
this.bLink;a.linkColor=this.linkColor;return a};DvtShapeAttr.prototype.fireClickListener=function(){this.clickListener&&(this._Chart.callExternal(this.clickListener),this._bClickListenerFired=!0)};
DvtShapeAttr.getClickEventJS=function(a,b){var c=a.clickEventJs.split(","),d=c[0],d="s"===d?DvtShapeAttr.SERIES_HANDLE:"g"===d?DvtShapeAttr.GROUP_HANDLE:"d"===d?DvtShapeAttr.DATA_HANDLE:"a"===d?DvtShapeAttr.ANNOTATION_HANDLE:"n"===d?DvtShapeAttr.NONDATA_HANDLE:DvtShapeAttr.UNKNOWN_HANDLE,e;e=""+DvtShapeAttr.CLICK_EVENT_JS;e=e.replace("X-ID-X",b);e=e.replace("X-ID-X",b);e=e.replace("X-HAND-X",d);e=e.replace("X-SERIES-X",c[1]);e=e.replace("X-GROUP-X",c[2]);e=e.replace("X-ROW-X",c[3]);e=e.replace("X-COL-X",
c[4]);return e=e.replace("X-CID-X",c[5])};DvtShapeAttr.prototype.hasClickListener=function(){return null!==this.clickListener};DvtShapeAttr.hasClickableShapeAttribute=function(a){return a.clickListener||a.clickAction||a.clickEventJs||a.onClick||a.drillJS||a.onDblClick||a.href||a.linkRef};
DvtShapeAttr.processEvent=function(a,b,c){if(!(!a||a.isInitFxInProgress&&a.isInitFxInProgress())&&(a=a.getShapeAttr(b))){b=null;switch(c){case DvtMouseEvent.MOUSEMOVE:b=a.onMouseMove;break;case DvtMouseEvent.MOUSEOVER:b=a.onMouseOver;break;case DvtMouseEvent.MOUSEOUT:b=a.onMouseOut;break;case DvtMouseEvent.CLICK:a.drillJS?b=a.drillJS:a.clickListener?a._bClickListenerFired?a._bClickListenerFired=!1:b=a.clickListener:a.clickAction?b=a.clickAction:a.clickEventJs?b=DvtShapeAttr.getClickEventJS(a,a._chart.getId()):
a.onClick?b=a.onClick:a.onMouseDown&&(b=a.onMouseDown);break;case DvtMouseEvent.DBLCLICK:b=a.onDblClick;break;case DvtMouseEvent.MOUSEDOWN:b=a.onMouseDown;break;case DvtMouseEvent.MOUSEUP:if(a.onMouseUp)b=a.onMouseUp;else if(a.href?b=a.href:a.linkRef&&(b=a.linkRef),b){a._chart.activateLink(b,a.target);return}}b&&a._chart.callJs(b)}};
var DvtGraphAutomation=function(a){this._Init(a)};DvtObj.createSubclass(DvtGraphAutomation,DvtObj,"DvtGraphAutomation");DvtGraphAutomation.prototype._Init=function(a){this._graphCore=a;this._sLastError=null};DvtGraphAutomation.AUTOMATION_NO_EVENT=-1;DvtGraphAutomation.AUTOMATION_MOUSE_CLICK=0;DvtGraphAutomation.AUTOMATION_MOUSE_DOWN=1;DvtGraphAutomation.AUTOMATION_MOUSE_MOVE=2;DvtGraphAutomation.AUTOMATION_MOUSE_OUT=3;DvtGraphAutomation.AUTOMATION_MOUSE_OVER=4;
DvtGraphAutomation.AUTOMATION_MOUSE_UP=5;DvtGraphAutomation.AUTOMATION_KEY_DOWN=6;DvtGraphAutomation.AUTOMATION_KEY_UP=7;DvtGraphAutomation.AUTOMATION_MOUSE_DRAG=8;
DvtGraphAutomation.prototype.processSubId=function(a,b,c){void 0===b&&(b=DvtGraphAutomation.AUTOMATION_NO_EVENT);if(null==a)return this._sLastError="subId is null",null;var d,e=-1,f=-1,g=-1,h=DvtGraphAutomation._convertSubIdToArray(a);d=h[0];e=h[1];f=h[2];a=h[h.length-1];var k,m=b!=DvtGraphAutomation.AUTOMATION_NO_EVENT;if("error"==d)return this._sLastError;var n=this._sLastError=null;"data"==d?n=this._convertDataSubIdToObjectId(e,f):"_Object"==d&&(n=h[1],e=h[2],f=h[3],5<=h.length&&(g=h[4]));var p;
p=this._graphCore.getDataObj();n?(b=this._processDetObj("_Object["+n+"]["+e+"]["+f+"]["+g+"]",b,c))&&!m&&(k=this._processDataMarkerInfo(b,a,e,f)):"title"==d?k=this._processDetObjString("_Object[Title][-1][-1][-1]"):"legendTitle"==d?k=this._processDetObjString("_Object[Other][-1][-1][-1]"):"axis"==d?"#title"==a&&(k=this._processDetObjString("_Object["+h[1].toUpperCase()+"Title][-1][-1][-1]")):"seriesCount"==d?k=p.getSeriesCount().toString():"groupCount"==d&&(k=p.getGroupCount().toString());return k};
DvtGraphAutomation._convertSubIdToArray=function(a){a=a.split("[");for(var b=DvtGraphAutomation._parseSubSubId(a),c=a.length,d=1;d<c;d++){var e=a[d],e=e.substr(0,e.length-1);tempIdAsNumber=parseFloat(e);e=isNaN(tempIdAsNumber)?e:tempIdAsNumber;a[d]=e}2==c&&(a[2]=-1,c++);1==c&&(a[1]=-1,a[2]=-1,c+=2);b&&(a[c]=b);return a};DvtGraphAutomation._parseSubSubId=function(a){var b=null;if(a&&0<=a.length){var c=a.length-1,d=a[c],e=d.indexOf("#");0<e&&(a[c]=d.substr(0,e),b=d.substr(e))}return b};
DvtGraphAutomation.prototype._processDetObjString=function(a){var b=null;this._sLastError=null;if(a=this._processDetObj(a,DvtGraphAutomation.AUTOMATION_NO_EVENT))b=a.getDetObj(),b=b instanceof DvtText?b.getTextString():b.toString();return b};
DvtGraphAutomation.prototype._processDetObj=function(a,b,c){this._sLastError=null;var d=this._getDetObject(a);if(b==DvtGraphAutomation.AUTOMATION_NO_EVENT){if(d instanceof DvtDetObj)return d}else{var e=null;b==DvtGraphAutomation.AUTOMATION_MOUSE_CLICK?e=DvtMouseEvent.CLICK:b==DvtGraphAutomation.AUTOMATION_MOUSE_OVER?e=DvtMouseEvent.MOUSEOVER:b==DvtGraphAutomation.AUTOMATION_MOUSE_OUT?e=DvtMouseEvent.MOUSEOUT:b==DvtGraphAutomation.AUTOMATION_MOUSE_MOVE?e=DvtMouseEvent.MOUSEMOVE:b==DvtGraphAutomation.AUTOMATION_KEY_DOWN?
e=DvtKeyboardEvent.KEYDOWN:b==DvtGraphAutomation.AUTOMATION_KEY_UP&&(e=DvtKeyboardEvent.KEYUP);d instanceof DvtDetObj&&(b=d.getDetObj(),a=DvtGraphAutomation._convertSubIdToArray(a),b&&(b instanceof DvtPieChart?(c=-1,a&&3<a.length&&(c=a[2]),b.__dispatchTestEvent(e,c)):b.dispatchTestEvent?a&&0<a.length&&"_Object"==a[0]&&5==a.length&&(a=a[4],b.dispatchTestEvent(a,e,c)):b.dispatchDisplayableEvent(e,c)))}return null};
DvtGraphAutomation.prototype._getDetObject=function(a){var b;this._sLastError=null;if(a){a=DvtGraphAutomation._convertSubIdToArray(a);var c,d,e,f;a&&0<a.length&&"_Object"==a[0]&&5==a.length&&(c=a[1],d=a[2],e=a[3],f=a[4]);b=this._automationGetDetObject(c,d,e,f)}return b};
DvtGraphAutomation.prototype._automationGetDetObject=function(a,b,c,d){this._sLastError=null;var e=this._graphCore.getDLOs(),f,g;a==DvtGraphObjType.PIE_SLICE&&(a=DvtGraphObjType.PIE_CHART);for(var h=0;h<e.length;h++)if(f=e[h],g=f.getObjId())if("stock"==a){if(DvtGraphCore.isStockObjId(g)&&f.getSeriesIndex()==b&&f instanceof DvtDetObj&&f.getMiscId()==d)return f}else if(g==a){if(a==DvtGraphObjType.INDICATOR)return f;if(a==DvtGraphObjType.PIE_CHART){g=this._graphCore.getDataObj().getGroupFromIndex(c);
var k=f.getDetObj().getPieInfo().getId();if(g==k)return f}else if(f.getSeriesIndex()==b&&(f.getDetObj&&f.getDetObj().getSubcomponent||g==DvtGraphObjType.LINE_MARKER||g==DvtGraphObjType.LINE_RISER||g==DvtGraphObjType.AREA_RISER||f.getGroupIndex()==c))return f}return null};
DvtGraphAutomation.prototype._convertDataSubIdToObjectId=function(a,b){var c=null,d=this._graphCore.getType();if(0<=d.indexOf("BAR"))c=DvtGraphObjType.BAR_RISER;else if(0<=d.indexOf("LINE")||0<=d.indexOf("AREA"))c=DvtGraphObjType.LINE_MARKER;else if(0<=d.indexOf("PIE"))c=DvtGraphObjType.PIE_SLICE;else if(this._graphCore.isBubbleChart()||this._graphCore.isScatterChart())c=DvtGraphObjType.LINE_MARKER;else if(0<=d.indexOf("STOCK"))c="stock";else if(this._graphCore.isGauge()||0<=d.indexOf("LED"))c=DvtGraphObjType.INDICATOR;
else if(0<=d.indexOf("FUNNEL"))c=DvtGraphObjType.FUNNEL_SLICE;else if(0<=d.indexOf("COMBINATION"))if(d=this._automationGetDetObject(DvtGraphObjType.BAR_RISER,a,b,-1))c=DvtGraphObjType.BAR_RISER;else if(d=this._automationGetDetObject(DvtGraphObjType.LINE_MARKER,a,b,-1))c=DvtGraphObjType.LINE_MARKER;return c};
DvtGraphAutomation.prototype._processDataMarkerInfo=function(a,b,c,d){var e=null;this._sLastError=null;var f=a.getDetObj();if(a.getObjId()==DvtGraphObjType.INDICATOR)return"#value"==b?this._graphCore.getGaugeData().getValue().toString():null;if(f instanceof DvtPieChart){if("#tooltip"==b)return f.getSliceTooltip(c);if("#color"==b)return f.getSliceColor(c);if("#text"==b)return f.getSliceText(c)}f=this._graphCore.getDataObj();if("#tooltip"==b)return(e=-1!=d?a.isMultiRiser()?this._graphCore.makeTooltipFromSeriesGroup(c,
d):a.hasTooltipText()?a.getTooltipText():this._graphCore.makeTooltipFromSeriesGroup(c,d):a.getTooltipText())&&(e=DvtGraphParser.convertLineBreaks(e)),e;if("#valueX"==b){if(-1!=d)return e=f.getValue(DvtGraphData.DV_X,c,d).toString(),"NaN"!=e?e:null}else if("#valueY"==b){if(-1!=d)return e=f.getValue(DvtGraphData.DV_Y,c,d).toString(),"NaN"!=e?e:null}else if("#valueZ"==b){if(-1!=d)return e=f.getValue(DvtGraphData.DV_Z,c,d).toString(),"NaN"!=e?e:null}else if("#color"==b){if(-1!=c&&f.isSeriesColor(c))return f.getSeriesColor(c)}else{if("#text"==
b)return a=null,(c=this._automationGetDetObject("DataText",c,d,-1))&&(a=c.getDetObj()),a&&(e=a.getTextString()),e;if(0<=this._graphCore.getType().indexOf("STOCK")){if("#valueHigh"==b)e=DvtGraphData.DV_HV;else if("#valueLow"==b)e=DvtGraphData.DV_LV;else if("#valueOpen"==b)e=DvtGraphData.DV_OV;else if("#valueClose"==b)e=DvtGraphData.DV_CV;else if("#valueVolume"==b)e=DvtGraphData.DV_VV;else return null;e=f.getValue(e,c,d).toString();return isNaN(e)?null:e}if(0<=this._graphCore.getType().indexOf("FUNNEL")){if("#valueTarget"==
b)e=DvtGraphData.DV_TV;else if("#valueActual"==b)e=DvtGraphData.DV_AV;else if("#unformattedValueActual"==b)e=DvtGraphData.DV_AUV;else if("#unformattedValueTarget"==b)e=DvtGraphData.DV_TUV;else return null;e=f.getValue(e,c,d).toString();return isNaN(e)?null:e}}return null};DvtGraphAutomation.prototype.getSubIdFromEvent=function(a){return this.getSubId(a.pageX,a.pageY,a.target)};
DvtGraphAutomation.prototype.getSubId=function(a,b,c){b=this._graphCore.getLogicalObject(c);if(b instanceof DvtPieSlice)return a=b.getSliceInfo().getId(),b=b.getPieChart().getPieInfo().getId(),c=this._graphCore.getDataObj(),a=c.getIndexFromSeries(a),b=c.getIndexFromGroup(b),"data["+a+"]["+b+"]";a=b.getObjId();return a==DvtGraphObjType.AREA_RISER||a==DvtGraphObjType.AREA_RISER_BOTTOM||a==DvtGraphObjType.AREA_RISER_TOP||a==DvtGraphObjType.BAR_RISER||a==DvtGraphObjType.BAR_RISER_SIDE||a==DvtGraphObjType.BAR_RISER_TOP||
a==DvtGraphObjType.LINE_MARKER||a==DvtGraphObjType.LINE_RISER||a==DvtGraphObjType.LINE_RISER_SIDE||a==DvtGraphObjType.LINE_RISER_TOP||a==DvtGraphObjType.PIE_SLICE||a==DvtGraphObjType.FUNNEL_SLICE||DvtGraphCore.isStockObjId(a)?"data["+b.getSeriesIndex()+"]["+b.getGroupIndex()+"]":null};DvtGraphAutomation.prototype.click=function(a){this.fireEvent(DvtGraphAutomation.AUTOMATION_MOUSE_CLICK,a)};DvtGraphAutomation.prototype.fireEvent=function(a,b,c){this.processSubId(b,a,c)};
DvtGraphAutomation.prototype.mouseOver=function(a){this.fireEvent(DvtGraphAutomation.AUTOMATION_MOUSE_OVER,a)};DvtGraphAutomation.prototype.mouseOut=function(a){this.fireEvent(DvtGraphAutomation.AUTOMATION_MOUSE_OUT,a)};DvtGraphAutomation.prototype.mouseMove=function(a){this.fireEvent(DvtGraphAutomation.AUTOMATION_MOUSE_MOVE,a)};DvtGraphAutomation.prototype.keyDown=function(a,b){this.fireEvent(DvtGraphAutomation.AUTOMATION_KEY_DOWN,a)};
DvtGraphAutomation.prototype.keyUp=function(a,b){this.fireEvent(DvtGraphAutomation.AUTOMATION_KEY_UP,a)};
var DvtGraphContext=function(a){this.Init(a)};DvtGraphContext._PIE_SLICE_LABEL_INTERNAL="PSLI";DvtObj.createSubclass(DvtGraphContext,DvtObj,"DvtGraphContext");
DvtGraphContext.prototype.Init=function(a){if(a&&(a.getChart&&null!=a.getChart()||a.getPieChart&&null!=a.getPieChart())){this._tooltip=this._bbox=this._dataColor=this._userProps=this._groupIndex=this._seriesIndex=this._groupId=this._seriesId=this._objId=null;var b;if(a.getChart&&a.getChart().getGaugeData&&null!=a.getChart().getGaugeData())this._objId=a.getObjId(),this._bbox=a.getDetObj().getDimensions(a.getChart().getCtx().getStage()),this._tooltip=a.getDatatip(),this._userProps=a.getUserProps(),
this._dataColor="#000000";else if(a.getPieChart&&null!=a.getPieChart())b=a.getSliceInfo().getObjId(),b==DvtStandaloneGraph.OBJ_SLICE&&(this._objId=b),this._seriesId=a.getSliceInfo().getId(),this._groupId=a.getPieChart().getPieInfo().getId(),b=a.getPieChart()._Dlo.getChart().getDataObj(),this._seriesIndex=b.getIndexFromSeries(this._seriesId),this._groupIndex=b.getIndexFromGroup(this._groupId),this._userProps=a.getSliceInfo().getUserProps(),-1<this._seriesIndex&&-1<this._groupIndex&&(this._dataColor=
a.getSliceInfo().getFillColor(),this._bbox=a.getKeyboardBoundingBox(),this._tooltip=a.getSliceInfo().getTooltip());else{b=a.getObjId();if(b==DvtStandaloneGraph.OBJ_LEGEND_AREA||b==DvtStandaloneGraph.OBJ_LEGEND_MARKER||b==DvtStandaloneGraph.OBJ_LEGEND_TEXT||b==DvtStandaloneGraph.OBJ_LEGEND_TITLE||b==DvtStandaloneGraph.OBJ_LINE_RISER||b==DvtStandaloneGraph.OBJ_LINE_RISER_SIDE||b==DvtStandaloneGraph.OBJ_LINE_RISER_TOP||b==DvtStandaloneGraph.OBJ_O1_TITLE||b==DvtStandaloneGraph.OBJ_X1_TITLE||b==DvtStandaloneGraph.OBJ_Y1_TITLE||
b==DvtStandaloneGraph.OBJ_Y2_TITLE)this._objId=b;else if(b==DvtStandaloneGraph.OBJ_SLICE||b==DvtGraphObjType.PIE_SLICE_LABEL||b==DvtGraphContext._PIE_SLICE_LABEL_INTERNAL)this._objId=b=DvtStandaloneGraph.OBJ_SLICE;this._seriesId=a.getSeriesId();this._groupId=a.getGroupId();this._seriesIndex=a.getSeriesIndex();this._groupIndex=a.getGroupIndex();this._userProps=a.getUserProps();-1<this._seriesIndex&&-1<this._groupIndex&&(this._dataColor=a.getChart().getSeriesColor(this._seriesIndex),a._objId&&0==a._objId.indexOf("BR")&&
(b=a.getDetObj().getImpl().getFill(),b instanceof DvtSolidFill?this._dataColor=b.getColor():b instanceof DvtGradientFill&&0>DvtArrayUtils.getIndex(b.getColors(),this._dataColor)&&(this._dataColor=b.getColors()[0])),this._bbox=a.getDetObj().getDimensions(a.getChart().getCtx().getStage()),this._tooltip=a.getDatatip())}}};DvtGraphContext.prototype.getObjId=function(){return this._objId};DvtGraphContext.prototype.getGroupId=function(){return this._groupId};DvtGraphContext.prototype.getGroupIndex=function(){return this._groupIndex};
DvtGraphContext.prototype.getSeriesId=function(){return this._seriesId};DvtGraphContext.prototype.getSeriesIndex=function(){return this._seriesIndex};DvtGraphContext.prototype.getUserProps=function(){return this._userProps};DvtGraphContext.prototype.getDataColor=function(){return this._dataColor};DvtGraphContext.prototype.getBBox=function(){return this._bbox};DvtGraphContext.prototype.getTooltip=function(){return this._tooltip};
var DvtStandaloneGraph=function(a,b,c,d){this._Init(a,b,c,d)};DvtStandaloneGraph.OBJ_LEGEND_AREA=DvtGraphObjType.LEGEND_AREA;DvtStandaloneGraph.OBJ_LEGEND_MARKER=DvtGraphObjType.LEGEND_MARKER;DvtStandaloneGraph.OBJ_LEGEND_TEXT=DvtGraphObjType.LEGEND_TEXT;DvtStandaloneGraph.OBJ_LEGEND_TITLE=DvtGraphObjType.LEGEND_TITLE;DvtStandaloneGraph.OBJ_LINE_RISER=DvtGraphObjType.LINE_RISER;DvtStandaloneGraph.OBJ_LINE_RISER_SIDE=DvtGraphObjType.LINE_RISER_SIDE;DvtStandaloneGraph.OBJ_LINE_RISER_TOP=DvtGraphObjType.LINE_RISER_TOP;
DvtStandaloneGraph.OBJ_O1_TITLE=DvtGraphObjType.O1_TITLE;DvtStandaloneGraph.OBJ_X1_TITLE=DvtGraphObjType.X1_TITLE;DvtStandaloneGraph.OBJ_Y1_TITLE=DvtGraphObjType.Y1_TITLE;DvtStandaloneGraph.OBJ_Y2_TITLE=DvtGraphObjType.Y2_TITLE;DvtStandaloneGraph.OBJ_SLICE=DvtGraphObjType.SLICE;DvtStandaloneGraph.TYPE_LINE_VERT_ABS=DvtGraphType.LINE_VERT_ABS;DvtStandaloneGraph.TYPE_PIE=DvtGraphType.PIE;DvtStandaloneGraph.TYPE_DIAL=DvtGraphType.DIAL;DvtStandaloneGraph.TYPE_LED=DvtGraphType.LED;
DvtStandaloneGraph.TYPE_STATUSMETER=DvtGraphType.STATUSMETER;DvtStandaloneGraph.TYPE_VERTICALSTATUSMETER="VERTICALSTATUSMETER";DvtObj.createSubclass(DvtStandaloneGraph,DvtGraph,"DvtStandaloneGraph");DvtStandaloneGraph.prototype.setXML=function(a){DvtStandaloneGraph.superclass.setXML.call(this,a)};
DvtStandaloneGraph.prototype.getType=function(){var a=DvtStandaloneGraph.superclass.getType.call(this);return a==DvtStandaloneGraph.TYPE_LINE_VERT_ABS||a==DvtStandaloneGraph.TYPE_PIE||a==DvtStandaloneGraph.TYPE_DIAL||a==DvtStandaloneGraph.TYPE_LED||a==DvtStandaloneGraph.TYPE_STATUSMETER||a==DvtStandaloneGraph.TYPE_VERTICALSTATUSMETER?a:null};DvtStandaloneGraph.prototype.getGraphContext=function(a){var b=this.getChart();if(b)return a=b.getLogicalObject(DvtSvgBaseEvent.FindDisplayable(a)),b.getGraphContext(a)};
DvtStandaloneGraph.prototype.setTooltipDisplay=function(a){var b=this.getChart();b&&b.enableTooltips(a)};DvtStandaloneGraph.prototype.getSelectionContext=function(){var a=this.getChart();if(a)return a.getSelectionContext()};DvtStandaloneGraph.prototype.getClientProperties=function(){var a=this.getChart();return a?a.getSelectionState():""};DvtStandaloneGraph.prototype.explodePieAll=function(){this.__explodeAll()};DvtStandaloneGraph.prototype.unitePieAll=function(){this.__uniteAll()};
DvtStandaloneGraph.prototype.isPieAllExploded=function(){return this.__isPieAllExploded()};DvtStandaloneGraph.prototype.isPieAllUnited=function(){return this.__isPieAllUnited()};DvtStandaloneGraph.prototype.getPlotAreaBounds=function(){var a=this.getChart();if(a)return a.getFrameRect()};
DvtStandaloneGraph.prototype.getGroupCount=function(){return parseFloat(this.getAutomation().processSubId("groupCount"))};DvtStandaloneGraph.prototype.getO1Axis=function(){return new DvtStandaloneGraphAxis("O1",this)};DvtStandaloneGraph.prototype.getSeriesCount=function(){return parseFloat(this.getAutomation().processSubId("seriesCount"))};DvtStandaloneGraph.prototype.getX1Axis=function(){return new DvtStandaloneGraphAxis("X1",this)};
DvtStandaloneGraph.prototype.getY1Axis=function(){return new DvtStandaloneGraphAxis("Y1",this)};DvtStandaloneGraph.prototype.getY2Axis=function(){return new DvtStandaloneGraphAxis("Y2",this)};DvtStandaloneGraph.prototype.getTitle=function(){return this.getAutomation().processSubId("title")};DvtStandaloneGraph.prototype.getLegend=function(){return new DvtStandaloneGraphLegend(this)};DvtStandaloneGraph.prototype.getDataMarker=function(a,b){return new DvtStandaloneGraphDataMarker(a,b,this)};
var DvtStandaloneGraphAxis=function(a,b){this._graph=b;this._axisId=a};DvtObj.createSubclass(DvtStandaloneGraphAxis,DvtObj,"DvtStandaloneGraphAxis");DvtStandaloneGraphAxis.prototype.getTitle=function(){return this._graph.getAutomation().processSubId("axis["+this._axisId+"]#title")};
function DvtStandaloneGraphDataMarker(a,b,c){this._series=a;this._group=b;this._graph=c;this._subId="data["+a+"]["+b+"]"}DvtObj.createSubclass(DvtStandaloneGraphDataMarker,DvtObj,"DvtStandaloneGraphDataMarker");DvtStandaloneGraphDataMarker.prototype.getColor=function(){return this._graph.getAutomation().processSubId(this._subId+"#color")};DvtStandaloneGraphDataMarker.prototype.getText=function(){return this._graph.getAutomation().processSubId(this._subId+"#text")};
DvtStandaloneGraphDataMarker.prototype.getTooltip=function(){return this._graph.getAutomation().processSubId(this._subId+"#tooltip")};DvtStandaloneGraphDataMarker.prototype.getValueActual=function(){return parseFloat(this._graph.getAutomation().processSubId(this._subId+"#unformattedValueActual"))};DvtStandaloneGraphDataMarker.prototype.getValueClose=function(){return parseFloat(this._graph.getAutomation().processSubId(this._subId+"#valueClose"))};
DvtStandaloneGraphDataMarker.prototype.getValueHigh=function(){return parseFloat(this._graph.getAutomation().processSubId(this._subId+"#valueHigh"))};DvtStandaloneGraphDataMarker.prototype.getValueLow=function(){return parseFloat(this._graph.getAutomation().processSubId(this._subId+"#valueLow"))};DvtStandaloneGraphDataMarker.prototype.getValueOpen=function(){return parseFloat(this._graph.getAutomation().processSubId(this._subId+"#valueOpen"))};
DvtStandaloneGraphDataMarker.prototype.getValueTarget=function(){return parseFloat(this._graph.getAutomation().processSubId(this._subId+"#unformattedValueTarget"))};DvtStandaloneGraphDataMarker.prototype.getValueX=function(){return parseFloat(this._graph.getAutomation().processSubId(this._subId+"#valueX"))};DvtStandaloneGraphDataMarker.prototype.getValueY=function(){return parseFloat(this._graph.getAutomation().processSubId(this._subId+"#valueY"))};
DvtStandaloneGraphDataMarker.prototype.getValueZ=function(){return parseFloat(this._graph.getAutomation().processSubId(this._subId+"#valueZ"))};
var DvtStandaloneGraphLegend=function(a){this._graph=a};DvtObj.createSubclass(DvtStandaloneGraphLegend,DvtObj,"DvtStandaloneGraphLegend");DvtStandaloneGraphLegend.prototype.getTitle=function(){return this._graph.getAutomation().processSubId("legendTitle")};
// Function wrapper to prevent naming collisions between graph and shared toolkit code.

// Export necessary variables that are accessed by the peer or non-ADF customers.
if(typeof(window) != undefined) {
  window['DvtGraph'] = DvtGraph;
  window['DvtGraphClipPath'] = DvtGraphClipPath;
  window['DvtStandaloneGraph'] = DvtStandaloneGraph;
  
  // Ideally these DvtSvg* could be renamed, but they are public and used by BI.
  window['DvtSvgContext'] = DvtSvgContext;
  window['DvtSvgUtils'] = DvtSvgUtils;
  
  // Events
  window['DvtGraphActionEvent'] = DvtGraphActionEvent;
  window['DvtGraphContextMenuEvent'] = DvtGraphContextMenuEvent;
  window['DvtGraphContextMenuSelectEvent'] = DvtGraphContextMenuSelectEvent;
  window['DvtGraphHidePopupEvent'] = DvtGraphHidePopupEvent;
  window['DvtGraphSelectionEvent'] = DvtGraphSelectionEvent;
  window['DvtGraphShowPopupEvent'] = DvtGraphShowPopupEvent;
  window['DvtGraphShowPopupBehavior'] = DvtGraphShowPopupBehavior;
}

})();
