text: /*! 
  * DevExtreme (Range Selector)
  * Version: 14.1.7
  * Build date: Sep 22, 2014
  *
  * Copyright (c) 2012 - 2014 Developer Express Inc. ALL RIGHTS RESERVED
  * EULA: https://www.devexpress.com/Support/EULAs/DevExtreme.xml
  */
  "use strict";if(!DevExpress.MOD_VIZ_RANGESELECTOR){if(!DevExpress.MOD_VIZ_CORE)throw Error("Required module is not referenced: viz-core");(function(n){n.viz.rangeSelector={utils:{}}})(DevExpress),function(n,t){var o=t.viz.rangeSelector,r=o.utils,u=t.utils,e=-1e3,f=function(n,t){var u;if(!n||n.length===0)return-1;for(var r=0,i=n.length-1,u=0;i-r>1;)u=r+i>>1,n[u]>t?i=u:r=u;return n[i]<=t?i:r},s=function(n,t){var i=f(n,t);return n&&i>=0&&i<n.length?n[i]:t},h=function(n,t){var i=f(n,t);return n&&i>=0&&i<n.length?(i+1<n.length&&(u.isDate(t)?n[i+1].getTime()-t.getTime()<t.getTime()-n[i].getTime()&&i++:n[i+1]-t<t-n[i]&&i++),n[i]):t},c=function(n,t){var i=f(n,t);return n&&i>=0&&i<n.length?(n[i]<t&&i+1<n.length&&i++,n[i]):t},l=function(n,t,i){var r,f,e,o,s;return u.isDate(n)?i==="year"||i==="quarter"||i==="month"?{months:t.getFullYear()*12+t.getMonth()-n.getFullYear()*12-n.getMonth()}:{milliseconds:t.valueOf()-n.valueOf()}:t-n},a=function(n){return u.getRootOffset(n).left||0},v=function(n){var t=0;return n.pageX?t=n.pageX:n.originalEvent&&n.originalEvent.pageX&&(t=n.originalEvent.pageX),n.originalEvent&&n.originalEvent.touches&&(n.originalEvent.touches.length>0?t=n.originalEvent.touches[0].pageX:n.originalEvent.changedTouches.length>0&&(t=n.originalEvent.changedTouches[0].pageX)),t},y=function(n,t,i){var r=n.createText(t,e,e,{font:i}).append(),u=r.getBBox();return r.remove(),u};r.findLessOrEqualValue=s,r.findNearValue=h,r.findGreaterOrEqualValue=c,r.getInterval=l,r.getRootOffsetLeft=a,r.getEventPageX=v,r.getTextBBox=y}(jQuery,DevExpress),function(n){DevExpress.viz.rangeSelector.BaseVisualElement=n.Class.inherit({ctor:function(n){this._renderer=n,this._isDrawn=!1},applyOptions:function(n){this._options=n||{},this._applyOptions(this._options)},_applyOptions:function(){},redraw:function(n){var t=this;t._isDrawn?t._update(n||t._group):(t._isDrawn=!(t._draw(n||t._group)===!1),n&&(t._group=n))},isDrawn:function(){return!!this._isDrawn},isInitialized:function(){return!!this._options},_draw:function(){},_update:function(n){n.clear(),this._draw(n)}})}(DevExpress),function(n,t,i){var u=t.viz.rangeSelector,r=t.utils,s=t.data.utils,e=u.utils,h=t.viz.core.ParseUtils,o=t.formatHelper,f=t.viz.core;u.consts={fontHeightRatio:.55,emptySliderMarkerText:". . ."},u.formatValue=function(n,t){var i={value:n,valueText:o.format(n,t.format,t.precision)};return String(r.isFunction(t.customizeText)?t.customizeText.call(i,i):i.valueText)},u.RangeSelector=f.BaseWidget.inherit(function(){var w=5,t={size:i,margin:{left:0,top:0,right:0,bottom:0},scale:{showCustomBoundaryTicks:!0,showMinorTicks:!0,startValue:i,endValue:i,minorTickCount:i,minorTickInterval:i,majorTickInterval:i,useTicksAutoArrangement:!0,setTicksAtUnitBeginning:!0,minRange:i,maxRange:i,placeholderHeight:i,valueType:i,label:{visible:!0,format:i,precision:i,customizeText:i},marker:{visible:!0,label:{format:i,precision:i,customizeText:i}},logarithmBase:10},selectedRange:i,sliderMarker:{visible:!0,format:i,precision:i,customizeText:i,placeholderSize:i},behavior:{snapToTicks:!0,animationEnabled:!0,moveSelectedRangeByClick:!0,manualRangeSelectionEnabled:!0,allowSlidersSwap:!0,callSelectedRangeChanged:"onMovingComplete"},background:{color:"#C0BAE1",visible:!0,image:{url:i,location:"full"}},dataSource:i,dataSourceField:"arg",redrawOnResize:!0,theme:i,selectedRangeChanged:null},c=function(n,t,r){var o=t===i?u.consts.emptySliderMarkerText:u.formatValue(t,r),f=e.getTextBBox(n,o,r.font);return{width:Math.ceil(f.width)+2*r.padding,height:Math.ceil(f.height*u.consts.fontHeightRatio)+2*r.padding+r.pointerSize}},l=function(n,t,i){var r=u.formatValue(t,i.label),f=e.getTextBBox(n,r,i.label.font);return Math.ceil(f.width/2)},b=function(n,t,i){var r={left:t.left+i.left,top:t.top+i.top,width:n.width-t.left-t.right-i.left-i.right,height:n.height-t.top-t.bottom-i.top-i.bottom};return r.width<=0&&(r.width=1),r},k=function(n){var t,i,u;return r.isNumber(n)?t=i=u=n:n&&(r.isNumber(n.height)&&(u=n.height),r.isNumber(n.width)?t=i=n.width:n.width&&(r.isNumber(n.width.left)&&(t=n.width.left),r.isNumber(n.width.right)&&(i=n.width.right))),{widthLeft:t,widthRight:i,height:u}},d=function(n,t,i,r){var s,a=0,v=0,h,u=0,f=0,e=0,o;return o=k(r.placeholderSize),u=o.widthLeft||0,f=o.widthRight||0,e=o.height||0,r.visible&&(s=c(n,i.startValue,r),u||(u=s.width),h=c(n,i.endValue,r),f||(f=h.width),e||(e=Math.max(s.height,h.height))),i.label.visible&&(a=l(n,i.startValue,i),v=l(n,i.endValue,i)),u=Math.max(u,a),f=Math.max(f,v),{left:u,right:f,top:e,bottom:0}},g=function(n){n&&n.empty()},nt=function(n){return n._element()},tt=function(n){return u.rangeSelectorFactory.createRangeContainer(n)},it=function(n,t){return{x:f.CoreFactory.createTranslator2D(n.arg,t,{direction:"horizontal"}),y:f.CoreFactory.createTranslator2D(n.val,t)}},rt=function(n,t,i){return{left:t.left,top:t.top,right:n.width-t.width-t.left,bottom:n.height-t.height-t.top+i,width:n.width,height:n.height}},ut=function(n){var t=n.option("renderer");return t?t:f.CoreFactory.createRenderer({pathModified:n.option("pathModified"),rtl:n.option("rtlEnabled")})},ft=function(n){return u.rangeSelectorFactory.createThemeManager(n)},a=function(t,i){var r=[n.type(t),n.type(i)];return n.inArray(),n.inArray("date",r)!=-1?"datetime":n.inArray("number",r)!=-1?"numeric":""},et=function(n){var i,e=n._dataSource&&n._dataSource.items(),t=n.option("scale"),r=n.option("chart")||{},f=t.valueType;return f||(f=a(t.startValue,t.endValue)),(e||r.series)&&(i=new u.SeriesDataSource({renderer:n.renderer,dataSource:e,valueType:(f||"").toLowerCase(),axisType:t.type,chart:r,dataSourceField:n.option("dataSourceField"),backgroundColor:n._userBackgroundColor,incidentOccured:n._incidentOccured}),v(r.valueAxis,i.themeManager.theme().valueAxis.logarithmBase,n._incidentOccured)),i},ot=function(n,t,i){var o,u,e,s=!1,h;return r.isDefined(i.startValue)&&r.isDefined(i.endValue)?(s=i.inverted=i.startValue>i.endValue,u=s?i.endValue:i.startValue,e=s?i.startValue:i.endValue):(r.isDefined(i.startValue)||r.isDefined(i.endValue))&&(u=i.startValue,e=i.endValue),o=t?t.getBoundRange():{arg:new f.Range,val:new f.Range({isValueRange:!0})},h=r.isDate(u)&&r.isDate(e)&&u.getTime()===e.getTime(),u===e||h||o.arg.addRange({invert:s,min:u,max:e,minVisible:u,maxVisible:e,dataType:i.valueType}),o.arg.addRange({base:i.logarithmBase,axisType:i.type}),o.arg.isDefined()||(h&&(i.valueType="numeric"),o.arg.setStubData(i.valueType)),o},st=function(n,t,i){var r,u=t.label.visible;return t.placeholderHeight?t.placeholderHeight:(r=e.getTextBBox(n,"0",t.label.font),(u?t.label.topIndent+r.height:0)+(i?t.marker.topIndent+t.marker.separatorHeight:0))},ht=function(n,t,i,e){var o=t.isEmpty,v=f.CoreFactory.getTickProvider(),s,h,c,l,a=i.x.getBusinessRange();return s={tickInterval:o?0:n.option("scale").minorTickInterval,showCustomBoundaryTicks:t.showCustomBoundaryTicks,minorTickCount:t.minorTickCount},h={textOptions:{align:"center",font:t.label.font},renderer:n.renderer,getText:function(n){return u.formatValue(n,t.label)},translator:i.x,isStartTickGenerated:!r.isDefined(n.option("scale").majorTickInterval),tickInterval:t.majorTickInterval,textSpacing:w,setTicksAtUnitBeginning:t.setTicksAtUnitBeginning,useTicksAutoArrangement:t.useTicksAutoArrangement,hideLabels:o},c=o?a.min:t.startValue,l=o?a.max:t.endValue,v.getFullTicks(c,l,e,h,s,{axisType:t.type,dataType:t.valueType,base:t.logarithmBase})},ct=function(n,t,i){var u=f.CoreFactory.getTickProvider(),r=u.getTickIntervals(n.startValue,n.endValue,t,{tickInterval:n.majorTickInterval,incidentOccured:i},{tickInterval:n.minorTickInterval,incidentOccured:i},{axisType:n.type,dataType:n.valueType,base:n.logarithmBase});n.minorTickInterval=r.minorTickInterval,n.majorTickInterval=r.majorTickInterval},lt=function(n,t,u,f,e){var s=r.isDefined(u.arg.minVisible)?u.arg.minVisible:u.arg.min,h=r.isDefined(u.arg.maxVisible)?u.arg.maxVisible:u.arg.max,c;t&&!t.isEmpty()&&(e.startValue=e.inverted?h:s,e.endValue=e.inverted?s:h),c=r.isDate(e.startValue)&&r.isDate(e.endValue)&&e.startValue.getTime()===e.endValue.getTime()||e.startValue===e.endValue,e.isEmpty=!r.isDefined(e.startValue)||!r.isDefined(e.endValue)||c||e.valueType==="string",e.isEmpty?e.startValue=e.endValue=i:(ct(e,f,n._incidentOccured),e.valueType!=="datetime"||r.isDefined(e.label.format)||(e.label.format=e.marker.visible?r.getDateUnitInterval(e.majorTickInterval):o.getDateFormatByTickInterval(e.startValue,e.endValue,e.majorTickInterval)))},at=function(t,i,u){var f=n.extend(!0,{},t.option("sliderMarker")),e;return f.format||(!t.option("behavior").snapToTicks&&r.isNumber(i.startValue)&&(e=Math.abs(i.endValue-i.startValue),f.format="fixedPoint",f.precision=r.getSignificantDigitPosition(e/u)),i.valueType==="datetime"&&(i.marker.visible?f.format=r.getDateUnitInterval(r.isDefined(i.minorTickInterval)&&i.minorTickInterval!==0?i.minorTickInterval:i.majorTickInterval):r.isDefined(i.startValue)&&r.isDefined(i.endValue)&&(f.format=o.getDateFormatByTickInterval(i.startValue,i.endValue,i.minorTickInterval!==0?i.minorTickInterval:i.majorTickInterval)))),f},vt=function(n){return n.valueType=="datetime"&&n.marker.visible},yt=function(n,t){var i=t.minorTickInterval||t.majorTickInterval;n=n.arg.addRange({interval:i})},v=function(t,r,u){t&&(t.type==="logarithmic"&&t.logarithmBase<=0||t.logarithmBase&&!n.isNumeric(t.logarithmBase)?(t.logarithmBase=r,u("E2104")):t.type!=="logarithmic"&&(t.logarithmBase=i))},pt=function(u,f){var e=n.extend(!0,{},u.option("scale")),y=u._incidentOccured,o=0,l=new h({incidentOccured:y}),s=l.correctValueType((e.valueType||"").toLowerCase()),c;return(f&&(s=f.getCalculatedValueType()||s),s||(s=a(e.startValue,e.endValue)||"numeric"),e.valueType=s,e.valueType==="string")?(u._incidentOccured("E2201"),e):(c=l.getParser(s,"scale"),r.isDefined(e.startValue)&&(o=c(e.startValue),r.isDefined(o)?e.startValue=o:(e.startValue=i,u._incidentOccured("E2202",["start"]))),r.isDefined(e.endValue)&&(o=c(e.endValue),r.isDefined(o)?e.endValue=o:(e.endValue=i,u._incidentOccured("E2202",["end"]))),v(e,t.scale.logarithmBase,u._incidentOccured),e.type||(e.type="continuous"),e.parser=c,e)},wt=function(n,t,i){var r=n.option("size")||{};t.height||r.height===0||(t.height=i.valueType==="datetime"&&i.marker.visible!==!1?160:120),t.width||r.width===0||(t.width=400)},bt=function(n){var u,r,f,e,t,o,s,h,c=n.container;if(n._isUpdating=!0,t=p(n),n._actualSize=t,r=et(n),n._scaleOptions=pt(n,r),wt(n,t,n._scaleOptions),t.width&&t.height&&c.is(":visible"))n.stopRedraw=!1;else{n.stopRedraw=!0,n._incidentOccured("W2001",[n.NAME]);return}kt(n,t),n._updateLoadIndicator(i,n.canvas.width,n.canvas.height),f=ot(n,r,n._scaleOptions),lt(n,r,f,t.width,n._scaleOptions),yt(f,n._scaleOptions),s=at(n,n._scaleOptions,t.width),h=gt(n,n._scaleOptions),o=d(n.renderer,t,n._scaleOptions,s),u=b(t,n.option("margin"),o),e=st(n.renderer,n._scaleOptions,vt(n._scaleOptions)),n.translators=it(f,rt(t,u,e)),n._scaleOptions.ticksInfo=ht(n,n._scaleOptions,n.translators,u.width),r&&r.adjustSeriesDimensions(n.translators),n.rangeContainer.applyOptions({canvas:u,scaleLabelsAreaHeight:e,sliderMarkerSpacing:o,translators:n.translators,selectedRange:h,scale:n._scaleOptions,behavior:n.option("behavior"),background:n.option("background"),chart:n.option("chart"),seriesDataSource:r,sliderMarker:s,sliderHandle:n.option("sliderHandle"),shutter:n.option("shutter"),selectedRangeChanged:y(n),setSelectedRange:function(t){n.setSelectedRange(t)}}),n._isUpdating=!1},y=function(n){return function(t,i){var r=n.option("selectedRangeChanged");n.option("selectedRange",t),r&&!i&&setTimeout(function(){r.call(null,t)})}},p=function(n){var i=n.container,r=n.option("size")||{},t={width:r.width,height:r.height};return i&&(t.width||(t.width=i.width()),t.height||(t.height=i.height())),n.canvas=t,t},kt=function(n,t){var i=n.renderer;i.isInitialized()?i.getRoot().applySettings({width:t.width,height:t.height}):(i.recreateCanvas(t.width,t.height),i.draw(n.container[0]))},dt=function(n,t){var i,r=n.option("chart")||{};!r.theme&&t&&t.theme&&(i=t.theme,i&&(typeof i=="object"&&(i=i.chart||{},i.name=t.theme.name),r.theme=i))},gt=function(n,t){var f=n.option("selectedRange"),i,u,o=t.parser||function(){return null},e=function(i,u){var f,e=t[u];return r.isDefined(i)&&(f=o(i)),r.isDefined(f)?e=f:n._incidentOccured("E2203",[u]),e};return f?(i=e(f.startValue,"startValue"),i=n.rangeContainer.slidersContainer.truncateSelectedRange(i,t),u=e(f.endValue,"endValue"),u=n.rangeContainer.slidersContainer.truncateSelectedRange(u,t),{startValue:i,endValue:u}):{startValue:t.startValue,endValue:t.endValue}},ni=function(n){var t=n._actualSize,i=p(n);return t&&(t.width!==i.width||t.height!==i.height)};return{_setDefaultOptions:function(){this.callBase(),this.option(t)},_dataSourceOptions:function(){return{paginate:!1,_preferSync:!0}},_init:function(){var n=this;n.container=nt(n),g(n.container),n.renderer=ut(n),n.rangeContainer=tt(n.renderer),n.callBase(),n._reinitDataSource()},_reinitDataSource:function(){this._refreshDataSource()},_dispose:function(){var n=this,t=function(t){n[t]&&n[t].dispose(),n[t]=null};n.callBase(),t("renderer"),n.translators=null,t("rangeContainer")},_initOptions:function(t){var i=this,r;i._optionsInitializing=!0,t=t||{},i._userOptions=n.extend(!0,{},t),r=ft(t.theme),r.setBackgroundColor(t.containerBackgroundColor),i.option(r.applyRangeSelectorTheme(t)),dt(i,t),t.background&&(i._userBackgroundColor=t.background.color)},_refresh:function(){var n=this,t=n.callBase;n._endLoading(function(){t.call(n)})},_render:function(n){var t=this,r,i;t._optionsInitializing=!1,bt(t),t.stopRedraw||(n?(i=t.option("behavior"),r=i.animationEnabled,i.animationEnabled=!1,t.rangeContainer.redraw(),i.animationEnabled=r):t.rangeContainer.redraw(),!n&&(!t._dataSource||t._dataSource&&t._dataSource.isLoaded())&&t.hideLoadingIndicator()),t._drawn()},_optionChanged:function(n,t,i){var r=this;r._optionsInitializing||s.compileSetter(n)(r._userOptions,t,{functionsAsIs:!0,merge:!0}),n==="dataSource"?(r._reinitDataSource(),r._invalidate()):n==="selectedRange"?r.setSelectedRange(r.option("selectedRange")):n==="selectedRangeChanged"?r.rangeContainer.slidersContainer.selectedRangeChanged=y(r):n==="containerBackgroundColor"||n==="theme"?(r._initOptions(r._userOptions),r._invalidate()):r.callBase(n,t,i)},_resize:function(){ni(this)&&this._render(!0)},_handleDataSourceChanged:function(){var n=this;n._endLoading(function(){n.renderer.isInitialized()&&n._render()})},getSelectedRange:function(){var t=this,n=t.rangeContainer.slidersContainer.getSelectedRange();return{startValue:n.startValue,endValue:n.endValue}},setSelectedRange:function(n){var i=this,t;!i._isUpdating&&n&&((t=i.rangeContainer.slidersContainer.getSelectedRange(),t&&t.startValue===n.startValue&&t.endValue===n.endValue)||i.rangeContainer.slidersContainer.setSelectedRange(n))},resetSelectedRange:function(n){var t=this;t.setSelectedRange({startValue:t._scaleOptions.startValue,endValue:t._scaleOptions.endValue,blockSelectedRangeChanged:n})},render:function(n){return this._render(n),this}}}()).include(t.ui.DataHelperMixin)}(jQuery,DevExpress),function(n,t){var r=t.viz.rangeSelector;r.RangeContainer=r.BaseVisualElement.inherit(function(){var t=function(n){this.callBase(n),this.slidersContainer=u(n),this.rangeView=e(n),this.scale=f(n)},i=function(n){var t=this,i=n.scale.isEmpty,r={left:n.canvas.left,top:n.canvas.top,width:n.canvas.width,height:n.canvas.height>=n.scaleLabelsAreaHeight?n.canvas.height-n.scaleLabelsAreaHeight:0};t._viewCanvas=r,t.slidersContainer.applyOptions({canvas:r,translator:n.translators.x,scale:n.scale,selectedRange:n.selectedRange,sliderMarker:n.sliderMarker,sliderHandle:n.sliderHandle,shutter:n.shutter,behavior:n.behavior,selectedRangeChanged:n.selectedRangeChanged,isEmpty:i}),t.rangeView.applyOptions({canvas:r,translators:n.translators,background:n.background,chart:n.chart,seriesDataSource:n.seriesDataSource,behavior:n.behavior,isEmpty:i}),t.scale.applyOptions({canvas:n.canvas,translator:n.translators.x,scale:n.scale,hideLabels:i,scaleLabelsAreaHeight:n.scaleLabelsAreaHeight,setSelectedRange:n.setSelectedRange})},u=function(n){return r.rangeSelectorFactory.createSlidersContainer(n)},f=function(n){return r.rangeSelectorFactory.createScale(n)},e=function(n){return r.rangeSelectorFactory.createRangeView(n)},n=function(n,t){return{left:n.left-t.left,top:n.top-t.top,width:n.width+t.right+t.left,height:n.height+t.bottom+t.top}},o=function(){var t=this,i,e,o,s,r,u=n(t._options.canvas,t._options.sliderMarkerSpacing),f=t._viewCanvas;t._clipRect=t._renderer.createClipRect(u.left,u.top,u.width,u.height).append(),i=t._renderer.createGroup({"class":"rangeContainer",clipId:t._clipRect.id}).append(),t._viewClipRect=t._renderer.createClipRect(f.left,f.top,f.width,f.height).append(),e=t._renderer.createGroup({"class":"view",clipId:t._viewClipRect.id}),e.append(i),t.rangeView.redraw(e),o=t._renderer.createGroup({"class":"slidersContainer"}),o.append(i),t.slidersContainer.redraw(o),s=t._renderer.createGroup({"class":"scale"}),s.append(i),t.scale.redraw(s),r=t._renderer.createGroup({"class":"trackers"}),r.append(i),t._trackersGroup=r,t.slidersContainer.appendTrackers(r)},s=function(){var t=this,i=n(t._options.canvas,t._options.sliderMarkerSpacing),r=t._viewCanvas;t._clipRect.updateRectangle({x:i.left,y:i.top,width:i.width,height:i.height}),t._viewClipRect.updateRectangle({x:r.left,y:r.top,width:r.width,height:r.height}),t.rangeView.redraw(),t.slidersContainer.redraw(),t.slidersContainer.appendTrackers(t._trackersGroup),t.scale.redraw()},h=function(){this.slidersContainer.dispose(),this.slidersContainer=null};return{ctor:t,dispose:h,_applyOptions:i,_draw:o,_update:s}}())}(jQuery,DevExpress),function(n,t,i){var u=t.viz.rangeSelector,f=t.formatHelper,r=t.utils,e=5;u.Scale=u.BaseVisualElement.inherit({_setupDateUnitInterval:function(t){var u,o=function(t){var i=0;return n.each(t,function(){return++i<2}),i===1},e,i=t.ticksInfo.majorTickInterval,f=t.ticksInfo.majorTicks;if(t.valueType==="datetime"){if(r.isObject(i)&&!o(i)&&r.logger.warn('More than one field is specified within the object assigned to the "tickInterval" option. Assign an object with a single field specified (days, hours or a similar one).'),f&&f.autoArrangementStep>1){r.isString(i)&&(i=r.getDateIntervalByString(i));for(u in i)i.hasOwnProperty(u)&&(i[u]*=f.autoArrangementStep,e=r.convertDateTickIntervalToMilliseconds(i));i=r.convertMillisecondsToDateUnits(e)}this.dateUnitInterval=r.getDateUnitInterval(i)}},_prepareDatesDifferences:function(n,t){var i=t,u,f;if(i==="week"&&(i="day"),i==="quarter"&&(i="month"),n[i])for(f=0;f<r.dateUnitIntervals.length;f++)if(u=r.dateUnitIntervals[f],n[u]&&(n[u]=!1,n.count--),u===i)break},_getMarkerDate:function(n,t){var i=new Date(n.getTime()),r=0;switch(t){case"quarter":r=f.getFirstQuarterMonth(n.getMonth());case"month":i.setMonth(r);case"week":case"day":i.setDate(1);case"hour":i.setHours(0,0,0,0);break;case"millisecond":i.setMilliseconds(0);break;case"second":i.setSeconds(0,0);break;case"minute":i.setMinutes(0,0,0)}return i},_drawDateMarker:function(n,t){var r,u,f,i,e;if(t.x!==null)return i=this._options.scale,this.lineOptions["class"]="dx-range-selector-date-marker",this._renderer.createLine(t.x,t.y,t.x,t.y+i.marker.separatorHeight,this.lineOptions).append(t.group),f=this._getLabel(n,t.label),r=t.x+i.tick.width+i.marker.textLeftIndent,u=t.y+i.marker.textTopIndent+i.label.font.size,this.textOptions.align="left",e=this._renderer.createText(f,r,u,this.textOptions).append(t.group),r+e.getBBox().width},_drawDateMarkers:function(n,t){var c,i,e,o,u,h=-1,s;if(this._options.scale.valueType==="datetime"&&this.visibleMarkers&&(s=[],n.length>1)){for(i=1;i<n.length;i++)e=r.getDatesDifferences(n[i-1],n[i]),this._prepareDatesDifferences(e,this.dateUnitInterval),e.count>0&&(o=this._getMarkerDate(n[i],this.dateUnitInterval),u=this.translator.translate(o),u>h&&(u!==null&&s.push({date:o,posX:u}),h=this._drawDateMarker(o,{group:t,y:this._options.canvas.top+this._options.canvas.height-this.markersAreaHeight+this._options.scale.marker.topIndent,x:u,label:this._getLabelFormatOptions(f.getDateFormatByDifferences(e))})));this._initializeMarkersEvents(s,t)}},_getLabelFormatOptions:function(t){return r.isDefined(this._options.scale.marker.label.format)?this._options.scale.marker.label:n.extend({},this._options.scale.marker.label,{format:t})},_calculateRangeByMarkerPosition:function(n,t,i){for(var r={},u,f=0;f<t.length;f++)u=t[f],i.inverted?n<u.posX?r.endValue=u.date:r.startValue||(r.startValue=u.date):n>=u.posX?r.startValue=u.date:r.endValue||(r.endValue=u.date);return r.startValue=r.startValue||i.startValue,r.endValue=r.endValue||i.endValue,r},_initializeMarkersEvents:function(n,t){var i=this,s=this._options.canvas.top+this._options.canvas.height-this.markersAreaHeight+this._options.scale.marker.topIndent,r,f,h,e,o;if(n.length>0){r=i._renderer.createRect(i._options.canvas.left,s,i._options.canvas.width,i._options.scale.marker.separatorHeight,0,{fill:"grey",stroke:"grey",opacity:.0001}),r.append(t);r.on(u.events.start,function(t){f=u.utils.getRootOffsetLeft(i._renderer),e=u.utils.getEventPageX(t)-f,o=i._calculateRangeByMarkerPosition(e,n,i._options.scale),i._options.setSelectedRange(o)});i._markersTracker=r}},_getLabel:function(n,t){var i={value:n,valueText:f.format(n,t.format,t.precision)};return String(r.isFunction(t.customizeText)?t.customizeText.call(i,i):i.valueText)},_drawLabel:function(n,t){var i=this._options.canvas.top+this._options.canvas.height-this.markersAreaHeight,r=this._renderer.createText(this._getLabel(n,this._options.scale.label),this.translator.translate(n),i,this.textOptions);r.append(t)},_drawTick:function(n,t){this.lineOptions["class"]="dx-range-selector-tick";var r=this._options.canvas.top+this._options.canvas.height-this.scaleLabelsAreaHeight,i=this.translator.translate(n),u=this._renderer.createLine(i,this._options.canvas.top,i,r,this.lineOptions).append(t)},_redraw:function(n){for(var r=this,u=r._options.scale,e=r._renderer.createGroup(),o=r._renderer.createGroup().append(n),f=u.ticksInfo.majorTicks,s=u.ticksInfo.minorTicks,h=u.ticksInfo.customBoundaryTicks,c=r._options.hideLabels||f.hideLabels||!u.label.visible,i=0;i<f.length;i++)c||r._drawLabel(f[i],o),r._drawTick(f[i],e);if(u.showMinorTicks)for(i=0;i<s.length;i++)r._drawTick(s[i],e);for(i=0;i<h.length;i++)r._drawTick(h[i],e);e.append(n),r._drawDateMarkers(f,o)},_applyOptions:function(n){var t=n.scale,r;this.textOptions={align:"center","class":"dx-range-selector-scale",font:t.label.font,style:{"-webkit-user-select":"none"}},this.lineOptions={strokeWidth:t.tick.width,stroke:t.tick.color,strokeOpacity:t.tick.opacity},this._setupDateUnitInterval(t),this.visibleMarkers=t.marker.visible===i?!0:t.marker.visible,r=t.label.visible?t.label.topIndent+t.label.font.size:0,this.scaleLabelsAreaHeight=n.scaleLabelsAreaHeight,this.markersAreaHeight=this.scaleLabelsAreaHeight-r,this.translator=n.translator},_draw:function(n){this._redraw(n,!1)},_update:function(n){var t=this.callBase;this._markersTracker&&this._markersTracker.off(u.events.start,"**"),this.callBase=t,this.callBase(n)}})}(jQuery,DevExpress),function(n,t){var r=t.viz.rangeSelector,u=t.viz.renderers;r.rangeSelectorFactory=function(){return{createRangeContainer:function(n){return new r.RangeContainer(n)},createSlidersContainer:function(n){return new r.SlidersContainer(n)},createScale:function(n){return new r.Scale(n)},createSliderMarker:function(n){return new r.SliderMarker(n)},createRangeView:function(n){return new r.RangeView(n)},createThemeManager:function(n){return new r.ThemeManager(n)},createSlider:function(n,t){return new r.Slider(n,t)},createSlidersEventsManager:function(n,t,i){return new r.SlidersEventsManager(n,t,i)},createSlidersController:function(n){return new r.SlidersController(n)}}}()}(jQuery,DevExpress),function(n,t){var r=t.viz.rangeSelector,h=t.utils,e=window.navigator.msPointerEnabled||window.navigator.pointerEnabled,u=t.utils.isNumber,f=t.utils.isDate,o=0,s=1;r.SlidersContainer=r.BaseVisualElement.inherit(function(){return{_drawAreaTracker:function(n){var t=this,i,r;i=t._renderer.createRect(t._options.canvas.left,t._options.canvas.top,t._options.canvas.width,t._options.canvas.height,0,{fill:"grey",stroke:"grey",opacity:.0001}),i.append(n),r=t._renderer.createRect(t._options.canvas.left,t._options.canvas.top,t._options.canvas.width,t._options.canvas.height,0,{fill:"grey",stroke:"grey",opacity:.0001,style:{cursor:"pointer"}}),r.append(n),t._controller.setAreaTrackers(i,r)},dispose:function(){this._eventsManager.dispose(),this._eventManager=null},_processSelectionChanged:function(n,t){var i=this,u=function(n){return n&&i._lastSelectedRange.startValue===n.startValue&&i._lastSelectedRange.endValue===n.endValue},r=i.getSelectedRange();n&&(i._options.behavior.callSelectedRangeChanged||"").toLowerCase()!=="onmoving"||!i._options.selectedRangeChanged||u(r)||(i._updateLastSelectedRange(r),typeof i._options.selectedRangeChanged=="function"&&i._options.selectedRangeChanged.call(null,r,t),n||u(r)||i.setSelectedRange(r))},_updateLastSelectedRange:function(n){n=n||this._options.selectedRange,this._lastSelectedRange={startValue:n.startValue,endValue:n.endValue}},_createSlider:function(n){return r.rangeSelectorFactory.createSlider(this._renderer,n)},_createSlidersController:function(n){return r.rangeSelectorFactory.createSlidersController(n)},_createSlidersEventsManager:function(n){var t=this;return r.rangeSelectorFactory.createSlidersEventsManager(t._renderer,n,function(n){t._processSelectionChanged(n)})},ctor:function(n){var t=this,i;t.callBase(n),i=[t._createSlider(o),t._createSlider(s)],t._controller=t._createSlidersController(i),t._eventsManager=t._createSlidersEventsManager(t._controller),t._lastSelectedRange={}},getSelectedRange:function(){return this._controller.getSelectedRange()},truncateSelectedRange:function(n,t){var i=t.startValue>t.endValue?t.endValue:t.startValue,r=t.startValue>t.endValue?t.startValue:t.endValue;return n<i&&(n=i),n>r&&(n=r),n},setSelectedRange:function(n){var t=this,r=t._options.scale,e,o,i=t._options.selectedRange;n&&(e=n.startValue,o=n.endValue),(u(r.startValue)&&u(e)||f(r.startValue)&&f(e))&&(i.startValue=e),(u(r.endValue)&&u(o)||f(r.endValue)&&f(o))&&(i.endValue=o),i.startValue=t.truncateSelectedRange(i.startValue,r),i.endValue=t.truncateSelectedRange(i.endValue,r),t._controller.applySelectedRange(i),t._controller.applyPosition(),t._processSelectionChanged(!1,n&&n.blockSelectedRangeChanged)},appendTrackers:function(n){this._controller.appendTrackers(n)},_applyOptions:function(n){var t=this;t._controller.applyOptions({translator:n.translator,canvas:n.canvas,sliderMarker:n.sliderMarker,sliderHandle:n.sliderHandle,shutter:n.shutter,scale:n.scale,behavior:n.behavior}),t._eventsManager.applyOptions({behavior:n.behavior})},_draw:function(n){var t=this,i;e&&(i=t._renderer.getRoot(),i&&(i.element.style.msTouchAction="pinch-zoom")),t._controller.redraw(n),t._drawAreaTracker(n),t._eventsManager.initialize(),t._update()},_update:function(){var n=this,t=n._options.isEmpty;n._eventsManager.setEnabled(!t),n._controller.applySelectedRange(t?{}:n._options.selectedRange),n._controller.applyPosition(n.isDrawn()),n._updateLastSelectedRange(),n._controller.redraw()}}}())}(jQuery,DevExpress),function(n,t,i){var f=t.viz.rangeSelector,e=t.utils,r=0,u=1;f.SlidersController=t.Class.inherit(function(){return{ctor:function(n){this._sliders=n,n[r].setAnotherSlider(n[u]),n[u].setAnotherSlider(n[r])},setAreaTrackers:function(n,t){this._areaTracker=n,this._selectedAreaTracker=t},applyOptions:function(n){var i=this,t=null;i._options=n,i.getSlider(r).applyOptions(n),i.getSlider(u).applyOptions(n),n.behavior.snapToTicks&&(t=n.scale.ticksInfo.fullTicks,t.length>1&&t[0]>t[t.length-1]&&(t=t.reverse())),i.getSlider(r).setAvailableValues(t),i.getSlider(u).setAvailableValues(t)},processDocking:function(n){var t=this;n!==i?t.getSlider(n).processDocking():(t.getSlider(r).processDocking(),t.getSlider(u).processDocking()),t.setTrackersCursorStyle("default"),t.applyAreaTrackersPosition()},getSelectedRangeInterval:function(){var n=this,s=n._options.scale.type,t=n._options.scale.logarithmBase,i=n.getSlider(r).getValue(),o=n.getSlider(u).getValue();return s==="logarithmic"?f.utils.getInterval(e.getLog(i,t),e.getLog(o,t)):f.utils.getInterval(i,o)},moveSliders:function(n,t){var i=this;i.getSlider(r).setPosition(i.getSlider(r).getPosition()+n,!1,t),i.applyPosition(!0)},moveSlider:function(n,t,i,u,f,e){var o=this,s=o.getSlider(n),h=s.getAnotherSlider(),l=h.getIndex(),c;s.canSwap()&&(n===r?i>h.getPosition():i<h.getPosition())&&(c=t,t||Math.abs(u)>=Math.abs(f)&&u*f<0&&(c=!0,i+=2*f,e(-f)),c&&(o.swapSliders(),h.applyPosition(!0))),s.setPosition(i,!0),s.applyPosition(!0),o.applyAreaTrackersPosition(),o.setTrackersCursorStyle("w-resize")},applySelectedAreaCenterPosition:function(n){var t=this,i=(t.getSlider(u).getPosition()-t.getSlider(r).getPosition())/2,f=t.getSelectedRangeInterval();t.getSlider(r).setPosition(n-i,!1,f),t.applyPosition(),t.processDocking()},processManualSelection:function(n,t,i){var e=this,o,f,s=[Math.min(n,t),Math.max(n,t)];o=n<t?r:u,f=n<t?u:r,e.getSlider(f).setPosition(s[f]),e.getSlider(o).setPosition(s[o]),e.getSlider(f).setPosition(s[f],!0),e.getSlider(f).startEventHandler(i),e.getSlider(o).processDocking(),e.getSlider(f).applyPosition(!0)},applySelectedRange:function(n){var t=this,i=t._options.scale.inverted;!i&&n.startValue>n.endValue||i&&n.startValue<n.endValue?(t.getSlider(r).setValue(n.endValue),t.getSlider(u).setValue(n.startValue)):(t.getSlider(r).setValue(n.startValue),t.getSlider(u).setValue(n.endValue))},getSelectedRange:function(){var n=this;return{startValue:n.getSlider(r).getValue(),endValue:n.getSlider(u).getValue()}},swapSliders:function(){var n=this;n._sliders.reverse(),n.getSlider(r).changeLocation(),n.getSlider(u).changeLocation()},applyAreaTrackersPosition:function(){var n=this,t=n.getSelectedRange(),i=n._options.scale,f=n.getSlider(u).getPosition()-n.getSlider(r).getPosition(),e={x:n.getSlider(r).getPosition(),width:f<0?0:f,y:n._options.canvas.top,height:n._options.canvas.height,style:{cursor:i.endValue-i.startValue==t.endValue-t.startValue?"default":"pointer"}};n._selectedAreaTracker.applySettings(e),n._areaTracker.applySettings({x:n._options.canvas.left,width:n._options.canvas.width,y:n._options.canvas.top,height:n._options.canvas.height})},applyPosition:function(n){var t=this;t.getSlider(r).applyPosition(n),t.getSlider(u).applyPosition(n),t.applyAreaTrackersPosition()},redraw:function(n){var t=this;t.getSlider(r).redraw(n),t.getSlider(u).redraw(n)},appendTrackers:function(n){var t=this;t._areaTracker&&t._selectedAreaTracker&&(t._areaTracker.append(n),t._selectedAreaTracker.append(n)),t.getSlider(r).appendTrackers(n),t.getSlider(u).appendTrackers(n)},getSlider:function(n){return this._sliders[n]},getAreaTracker:function(){return this._areaTracker},getSelectedAreaTracker:function(){return this._selectedAreaTracker},setTrackersCursorStyle:function(n){var t=this;t._selectedAreaTracker.applySettings({style:{cursor:n}}),t._areaTracker.applySettings({style:{cursor:n}})}}}())}(jQuery,DevExpress),function(n,t,i){var e=t.viz.rangeSelector,p=t.utils,l=10,s=0,a=1,h=t.ui.events.addNamespace,v=function(){var n=window,t="ontouchstart"in n,i=n.navigator.msPointerEnabled,r=n.navigator.pointerEnabled;e.events={start:r?"pointerdown":i?"MSPointerDown":t?"touchstart mousedown":"mousedown",move:r?"pointermove":i?"MSPointerMove":t?"touchmove mousemove":"mousemove",end:r?"pointerup pointercancel":i?"MSPointerUp MSPointerCancel":t?"touchend mouseup":"mouseup"}},c,r=e.utils.getEventPageX,y=0;v();var u=function(n){var r=n||window.event,t=r.originalEvent,f=r.touches,u=t?t.pointerType:!1,e=t?t.touches:!1,o=r.which===i&&r.button===1,s=t&&u!==i&&(u===(t.MSPOINTER_TYPE_TOUCH||"touch")||u===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&t.buttons===1),h=o||r.which===1,c=f&&f.length>0||e&&e.length>0;return h||s||c},o=function(n){var t=n.originalEvent,i=n.touches,r=t?t.touches:!1;return i&&i.length>1||r&&r.length>1||null},f=function(n){return n&&n.type&&n.type.indexOf("touch")===0};c=e.SlidersEventsManager=function(n,t,i){var r=this,u=r._uniqueNS="dx-range-selector_"+y++,f=e.events;r._renderer=n,r._slidersController=t,r._processSelectionChanged=i,r._enabled=!0,r._eventsNames={start:h(f.start,u),move:h(f.move,u),end:h(f.end,u)}},c.prototype={constructor:c,_getRootOffsetLeft:function(){return e.utils.getRootOffsetLeft(this._renderer)},_initializeSliderEvents:function(t){var e=this,b=e._renderer,v,h=e._slidersController,l=e._processSelectionChanged,i=h.getSlider(t),k=i.getAnotherSlider(),y,c,s,p=function(){s&&(s=!1,h.processDocking(),l(!1))},w=function(n){var k,t,a,p=e._getRootOffsetLeft(),w,b=i.getIndex();v===f(n)&&(!u(n,!0)&&s?(s=!1,h.processDocking(),l(!1)):s&&(o(n)||n.preventDefault(),t=r(n),w=t-c-p,a=t-i.getPosition()-p,h.moveSlider(b,y,w,a,c,function(n){c=n}),l(!0)))},a=e._eventsNames;i.startEventHandler=function(n){e._enabled&&u(n)&&!s&&(y=this===i.getSliderTracker().element,s=!0,v=f(n),c=r(n)-i.getPosition()-e._getRootOffsetLeft(),o(n)||(n.stopPropagation(),n.preventDefault()))};i.on(a.start,i.startEventHandler);n(document).on(a.end,p).on(a.move,w)},_initializeAreaEvents:function(){var t=this,p=t._renderer,c,o=t._slidersController,s=t._processSelectionChanged,a=o.getAreaTracker(),i=!1,w=!1,e,v=function(n){var u;i&&(u=r(n),t._options.behavior.moveSelectedRangeByClick&&Math.abs(e-u)<l&&o.applySelectedAreaCenterPosition(u-t._getRootOffsetLeft()),i=!1,s(!1))},y=function(n){var h,a,v,y=t._getRootOffsetLeft();c===f(n)&&(i&&!u(n)&&(i=!1,s(!1)),i&&(h=r(n),t._options.behavior.manualRangeSelectionEnabled&&Math.abs(e-h)>=l&&(a=e-y,v=h-y,o.processManualSelection(a,v,n),i=!1,s(!0))))},h=t._eventsNames;a.on(h.start,function(n){t._enabled&&u(n)&&!i&&(i=!0,c=f(n),e=r(n))});n(document).on(h.end,v).on(h.move,y)},_initializeSelectedAreaEvents:function(){var e=this,b=e._renderer,l,t=e._slidersController,h=e._processSelectionChanged,y=t.getSelectedAreaTracker(),i=!1,a,v,p=function(){i&&(i=!1,t.processDocking(),h(!1))},w=function(n){var e,c;l===f(n)&&(i&&!u(n)&&(i=!1,t.processDocking(),h(!1)),i&&(o(n)||n.preventDefault(),c=r(n),e=c-t.getSlider(s).getPosition()-a,t.moveSliders(e,v),h(!0)))},c=e._eventsNames;y.on(c.start,function(n){e._enabled&&u(n)&&!i&&(i=!0,l=f(n),a=r(n)-t.getSlider(s).getPosition(),v=t.getSelectedRangeInterval(),o(n)||(n.stopPropagation(),n.preventDefault()))});n(document).on(c.end,p).on(c.move,w)},applyOptions:function(n){this._options=n},dispose:function(){n(document).off("."+this._uniqueNS)},initialize:function(){var n=this;n._renderer.isInitialized()&&(n._initializeSelectedAreaEvents(n),n._initializeAreaEvents(),n._initializeSliderEvents(s),n._initializeSliderEvents(a))},setEnabled:function(n){this._enabled=n}}}(jQuery,DevExpress),function(n,t,i){var f=t.viz.rangeSelector,r=t.utils,h="ontouchstart"in window,c=window.navigator.msPointerEnabled||window.navigator.pointerEnabled,o={duration:250},s=8,l=20,u=0,e=1;f.Slider=f.BaseVisualElement.inherit(function(){return{_createSlider:function(){var n=this,i,t,r=n._options.sliderHandle;return t=n._renderer.createGroup({"class":"slider"}),t.applySettings({translateX:n._options.canvas.left,translateY:n._options.canvas.top}),i=n._renderer.createLine(0,0,0,n._options.canvas.height,{"class":"dx-range-selector-slider",strokeWidth:r.width,stroke:r.color,strokeOpacity:r.opacity}),i.append(t),t.setValid=function(t){i.applySettings({stroke:t?n._options.sliderHandle.color:n._options.sliderMarker.invalidRangeColor})},t.updateHeight=function(){i.applySettings({points:[0,0,0,n._options.canvas.height]})},t.applyOptions=function(n){i.applySettings(n)},t},_createSliderTracker:function(){var n=this,r=n._options.sliderHandle.width,f=s<r?r:s,u=h||c?l:f,i,t;return i=n._renderer.createRect(-u/2,0,u,n._options.canvas.height,0,{fill:"grey",stroke:"grey",opacity:.0001,style:{cursor:"w-resize"}}),t=n._renderer.createGroup({"class":"sliderTracker"}),t.applySettings({translateX:0,translateY:n._options.canvas.top}),i.append(t),t.updateHeight=function(){i.applySettings({height:n._options.canvas.height})},t},_drawSliderTracker:function(n){var i=this,t=i._createSliderTracker();t&&(t.append(n),i._sliderTracker=t)},_createSliderMarker:function(n){return f.rangeSelectorFactory.createSliderMarker(n)},_setPosition:function(n,t){var i=this,r=i._correctPosition(n),u=i._options.translator.untranslate(r);i.setValue(u,t,!1),i._position=r},_setPositionForBothSliders:function(n,t){var u=this,s,f,e,h,a=u._options.scale.type,l=u._options.scale.logarithmBase,c=u._options.scale.inverted,o=function(n,i){var u;return a==="logarithmic"?(u=r.addInterval(r.adjustValue(r.getLog(n,l)),t,i),r.raiseTo(u,l)):r.addInterval(n,t,i)};s=u.getAnotherSlider(),n=u._correctBounds(n),f=u._options.translator.untranslate(n),e=o(f),!c&&e>u._options.scale.endValue||c&&e<u._options.scale.endValue?(e=u._options.scale.endValue,h=u._options.canvas.left+u._options.canvas.width,f=o(e,!0),n=u._options.translator.translate(f)):h=u._options.translator.translate(e),u._values&&((c?f>u._values[u._values.length-1]:f<u._values[0])?(f=u._correctBusinessValueByAvailableValues(f,!1),e=o(f)):(e=u._correctBusinessValueByAvailableValues(e,!1),f=o(e,!0))),s.setValue(e,i,!1),u.setValue(f,i,!1),u._position=n,s._position=h},_correctPosition:function(n){var i=this,t=i._correctInversion(n);return t=i._correctBounds(t)},_correctInversion:function(n){var i=this,r=n,t=i.getAnotherSlider().getPosition(),f=i.getIndex()===u?n>t:n<t;return f&&(r=t),r},_correctBounds:function(n){var r=this,i=n,t=r._options.canvas;return n<t.left&&(i=t.left),n>t.left+t.width&&(i=t.left+t.width),i},_correctBusinessValue:function(n,t,i){var u=this,r=u._correctBusinessValueByAvailableValues(n,i);return t&&(r=u._correctBusinessValueByMinMaxRangeFromAnotherSlider(r)),r=u._correctBusinessValueByMinRangeFromStartEndValues(r)},_correctBusinessValueByAvailableValues:function(n,t){var i=this._values;return!t&&i?f.utils.findNearValue(i,n):n},_correctBusinessValueByMinMaxRangeFromAnotherSlider:function(n){var r=this,h=n,t=r._options.scale,c=r._values,v=r.getIndex(),l=r.getAnotherSlider().getValue(),a=!0,o,s;return!t.inverted&&v===u||t.inverted&&v===e?(t.maxRange&&(o=r._addInterval(l,t.maxRange,!0)),t.minRange&&(s=r._addInterval(l,t.minRange,!0))):(t.maxRange&&(s=r._addInterval(l,t.maxRange)),t.minRange&&(o=r._addInterval(l,t.minRange))),s!==i&&h>s?(h=c?f.utils.findLessOrEqualValue(c,s):s,a=!1):o!==i&&h<o&&(h=c?f.utils.findGreaterOrEqualValue(c,o):o,a=!1),r._setValid(a),h},_addInterval:function(n,t,i){var u,o=this._options.scale.type,f=o==="logarithmic"&&this._options.scale.logarithmBase,e;return f?(e=r.addInterval(r.getLog(n,f),t,i),u=Math.pow(f,e)):u=r.addInterval(n,t,i),u},_correctBusinessValueByMinRangeFromStartEndValues:function(n){var r=this,s=r._values,f,o,h=!0,t=r._options.scale,i=n;return t.minRange&&(r.getIndex()===e?(f=r._addInterval(t.startValue,t.minRange,t.inverted),(!t.inverted&&i<f||t.inverted&&i>f)&&(i=f)):r.getIndex()===u&&(o=r._addInterval(t.endValue,t.minRange,!t.inverted),(!t.inverted&&i>o||t.inverted&&i<o)&&(i=o))),i},_applySliderPosition:function(n,t){var i=this,f=i._options.behavior.animationEnabled&&!t,r=i._options.canvas.top,u=i._slider;f||u.inAnimation?(u.inAnimation=!0,u.animate({translate:{x:n,y:r}},f?o:{duration:0},function(){u.inAnimation=!1}),i._sliderTracker.animate({translate:{x:n,y:r}},f?o:{duration:0})):(i._slider.applySettings({translateX:n,translateY:r}),i._sliderTracker.applySettings({translateX:n,translateY:r})),i._sliderTracker.updateHeight(),i._slider.updateHeight()},_applyShutterPosition:function(n,t){var i=this,r,f=i._shutter,s=i._options.behavior.animationEnabled&&!t,h=i.getIndex();h==u?r={x:i._options.canvas.left,y:i._options.canvas.top,width:n-i._options.canvas.left,height:i._options.canvas.height}:h==e&&(r={x:n+1,y:i._options.canvas.top,width:i._options.canvas.left+i._options.canvas.width-n,height:i._options.canvas.height}),r&&(s||f.inAnimation?(f.inAnimation=!0,f.animate(r,s?o:{duration:0},function(){f.inAnimation=!1})):f.applySettings(r))},_setValid:function(n){var t=this;t._marker&&t._marker.setValid(n),t._slider.setValid(n)},_setText:function(n){var t=this;t._marker&&t._marker.setText(n)},ctor:function(n,t){var i=this;i.callBase(n),i._index=t},getIndex:function(){return this._index},setAvailableValues:function(n){this._values=n},setAnotherSlider:function(n){this._anotherSlider=n},getAnotherSlider:function(){return this._anotherSlider},appendTrackers:function(n){var t=this;t._sliderTracker&&t._sliderTracker.append(n)},getSliderTracker:function(){return this._sliderTracker},changeLocation:function(){var n=this;n._marker&&n._marker.changeLocation(),n._index=this._index===u?e:u,n._lastPosition=null},setPosition:function(n,t,r){var f=this,e;r!==i?(e=f.getIndex()===u?f:f.getAnotherSlider(),e._setPositionForBothSliders(n,r)):f._setPosition(n,t)},getPosition:function(){return this._position},_applyOptions:function(){this._lastPosition=null},setValue:function(n,t,e){var o=this;n===i?(o._value=i,o._valuePosition=o._position=o.getIndex()===u?o._options.canvas.left:o._options.canvas.left+o._options.canvas.width,o._setText(f.consts.emptySliderMarkerText)):(o._value=o._correctBusinessValue(n,t,r.isDefined(e)?!!e:!0),o._valuePosition=o._position=o._options.translator.translate(o._value),o._setText(f.formatValue(o._value,o._options.sliderMarker)))},getValue:function(){return this._value},canSwap:function(){var i=this,n=i._options.scale,f,e,t;if(i._options.behavior.allowSlidersSwap){if(n.minRange)if(t=i.getAnotherSlider().getValue(),i.getIndex()===u){if(e=r.addInterval(n.endValue,n.minRange,!n.inverted),!n.inverted&&t>e||n.inverted&&t<e)return!1}else if(f=r.addInterval(n.startValue,n.minRange,n.inverted),!n.inverted&&t<f||n.inverted&&t>f)return!1;return!0}return!1},processDocking:function(){var n=this;n._position=n._valuePosition,n.applyPosition(!1),n._setValid(!0)},applyPosition:function(n){var t=this,i=t.getPosition();t._lastPosition!==i&&(t._applySliderPosition(i,n),t._applyShutterPosition(i,n),t._lastPosition=i)},on:function(n,t){var i=this;i._sliderTracker.on(n,t);if(i._marker)i._marker.getTracker().on(n,t)},_update:function(){var n=this;n._marker&&n._marker.applyOptions(n._options.sliderMarker),n._shutter&&n._shutter.applySettings({fill:n._options.shutter.color,fillOpacity:n._options.shutter.opacity}),n._slider&&n._slider.applyOptions({strokeWidth:n._options.sliderHandle.width,stroke:n._options.sliderHandle.color,strokeOpacity:n._options.sliderHandle.opacity})},_draw:function(n){var t=this,i,o,f,r,h,c,s=t.getIndex();f=t._renderer.createGroup({"class":"sliderArea"}),f.append(n),s===u?r=t._renderer.createRect(t._options.canvas.left,t._options.canvas.top,0,t._options.canvas.height,0):s===e&&(r=t._renderer.createRect(t._options.canvas.left,t._options.canvas.top,t._options.canvas.width,t._options.canvas.height,0)),r&&(r.append(f),i=t._createSlider(),i&&i.append(f),t._options.sliderMarker.visible&&(o=t._createSliderMarker({renderer:t._renderer,isLeftPointer:s===e,sliderMarkerOptions:t._options.sliderMarker}),o.draw(i)),t._shutter=r,t._slider=i,t._marker=o),t._drawSliderTracker(n)}}}())}(jQuery,DevExpress),function(n,t){var r=t.viz.rangeSelector;r.SliderMarker=t.Class.inherit(function(){var u=function(n){this._renderer=n.renderer,this._text=n.text,this._isLeftPointer=n.isLeftPointer,this._options=n.sliderMarkerOptions,this._isValid=!0,t(this,{width:10,height:10})},f=function(n){this._options=n,this.update()},n=function(n,t){return{width:Math.round(2*n._options.padding+t.width),height:Math.round(2*n._options.padding+t.height*r.consts.fontHeightRatio)}},t=function(t,i){var r=n(t,i);t._points=[],t._isLeftPointer?(t._points.push({x:0,y:0}),t._points.push({x:r.width,y:0}),t._points.push({x:r.width,y:r.height}),t._points.push({x:t._options.pointerSize,y:r.height}),t._points.push({x:0,y:r.height+t._options.pointerSize})):(t._points.push({x:0,y:0}),t._points.push({x:r.width,y:0}),t._points.push({x:r.width,y:r.height+t._options.pointerSize}),t._points.push({x:r.width-t._options.pointerSize,y:r.height}),t._points.push({x:0,y:r.height}))},e=function(t,i){var r=n(t,i);return t._isLeftPointer?{x:0,y:r.height+t._options.pointerSize}:{x:r.width-1,y:r.height+t._options.pointerSize}},o=function(n){var t=this,i=t._options.padding;t._sliderMarkerGroup=t._renderer.createGroup({"class":"sliderMarker"}),t._sliderMarkerGroup.append(n),t._area=t._renderer.createArea(t.points,{fill:t._options.color}),t._area.append(t._sliderMarkerGroup),t._label=t._renderer.createText(t._text,i,i,{font:t._options.font,align:"left",style:{"-webkit-user-select":"none"}}),t._label.append(t._sliderMarkerGroup),t._tracker=t._renderer.createRect(0,0,2*i,2*i+t._options.pointerSize,0,{fill:"grey",stroke:"grey",opacity:.0001,style:{cursor:"pointer"}}),t._tracker.append(t._sliderMarkerGroup),t._drawn=!0,t.update()},s=function(n){var t=n._label.getBBox();return!n._textHeight&&isFinite(t.height)&&(n._textHeight=t.height),{width:t.width,height:n._textHeight}},i=function(r){var u=this,f,o,h;(u._interval&&clearInterval(u._interval),delete u._interval,u._drawn)&&(u._label.updateText(u._text),f=s(u),r?delete u._textSize:(u._textSize=u._textSize||f,u._textSize=f.width>u._textSize.width||f.height>u._textSize.height?f:u._textSize,f=u._textSize,u._interval=setInterval(function(){i.call(u,[!0])},75)),o=n(u,f),h=e(u,f),u._sliderMarkerGroup.applySettings({translateX:-h.x,translateY:-h.y}),t(u,f),u._area.applySettings({points:u._points,fill:u._isValid?u._options.color:u._options.invalidRangeColor}),u._tracker.applySettings({width:o.width,height:o.height+u._options.pointerSize}),u._label.applySettings({x:u._options.padding,y:o.height-u._options.padding}))},h=function(){var n=this;return n._text},c=function(n){var t=this;t._text!==n&&(t._text=n,t.update())},l=function(n){var t=this;t._isValid=n,t.update()},a=function(){var n=this;n._isLeftPointer=!n._isLeftPointer,n.update()},v=function(){var n=this;return n._tracker};return{ctor:u,draw:o,update:i,getText:h,setText:c,changeLocation:a,applyOptions:f,getTracker:v,setValid:l}}())}(jQuery,DevExpress),function(n,t){var r=t.viz.rangeSelector;r.RangeView=r.BaseVisualElement.inherit(function(){return{_draw:function(n){var u=this,h,c,f,e,r,o,i,t=u._options,s,l=t.isEmpty;if(o=t.seriesDataSource&&t.seriesDataSource.isShowChart()&&!l,i=t.canvas,o?f=t.seriesDataSource.getBackgroundColor():!l&&t.background.visible&&(f=t.background.color),t.background.visible&&f&&(h=u._renderer.createRect(i.left,i.top,i.width+1,i.height,0,{fill:f,"class":"dx-range-selector-background"}),h.append(n)),t.background.visible&&t.background.image&&t.background.image.url&&(c=u._renderer.createImage(i.left,i.top,i.width+1,i.height,t.background.image.url,{location:t.background.image.location}),c.append(n)),o)for(e=t.seriesDataSource.getSeries(),t.seriesDataSource.adjustSeriesDimensions(t.translators,t.chart.useAggregation),r=0;r<e.length;r++)s=e[r].getOptions(),s.seriesGroup=n,s.labelsGroup=n,e[r].draw(t.translators,t.behavior&&t.behavior.animationEnabled&&u._renderer.animationEnabled())}}}())}(jQuery,DevExpress),function(n,t,i){var o=t.viz.rangeSelector,f=t.viz.charts,u=t.viz.core,e=u.CoreFactory,r=t.utils;o.SeriesDataSource=t.Class.inherit(function(){var t=function(n){return f.factory.createThemeManager(n,"rangeSelector.chart")},o=function(t){return n.isArray(t)&&t.length>0&&(r.isNumber(t[0])||r.isDate(t[0]))},s=function(t){return n.map(t,function(n,t){return{arg:n,val:t}})},h=function(t,r,u){var a=[],v,y,l,d,p=t.themeManager,k=!!p.getOptions("seriesTemplate"),h=k?u:r.chart.series,nt=r.chart.valueAxis&&r.chart.valueAxis.valueType,w,c,b,g;for(t.teamplateData=[],r.dataSource&&!h&&(o(r.dataSource)&&(r.dataSource=s(r.dataSource)),w=r.dataSourceField||"arg",h={argumentField:w,valueField:w},t._hideChart=!0),h=n.isArray(h)?h:h?[h]:[],t._backgroundColor=r.backgroundColor!==i?r.backgroundColor:p.getOptions("backgroundColor"),c=0;c<h.length;c++)v=n.extend(!0,{argumentType:r.valueType,argumentAxisType:r.axisType,valueType:w?r.valueType:nt,incidentOccured:r.incidentOccured},h[c]),v.rotated=!1,l=v.data||r.dataSource,y=p.getOptions("series",v),y.argumentField=y.argumentField||r.dataSourceField,l&&l.length>0&&(b=e.createSeries(r.renderer,y),a.push(b)),k&&(n.each(l,function(i,r){n.each(b.getTeamplatedFields(),function(n,t){r[t.teamplateField]=r[t.originalField]}),t.teamplateData.push(r)}),b.updateTeamplateFieldNames());for(l=k?t.teamplateData:l,t._dataValidator=f.factory.createDataValidator(l,[a],r.incidentOccured,p.getOptions("dataPrepareSettings")),d=t._dataValidator.validate(),c=0;c<a.length;c++)g=a[c],g.updateData(d);return a},c=function(t,i,r,u){var o=[],f=[];return n.each(t,function(t,i){n.inArray(i.type,f)===-1&&f.push(i.type)}),n.each(f,function(n,f){var s=new e.createSeriesFamily({type:f,equalBarWidth:i,minBubbleSize:r,maxBubbleSize:u});s.add(t),s.adjustSeriesValues(),o.push(s)}),o};return{ctor:function(n){var i=this,s,f,u=i.themeManager=t(n.chart),e=u.getOptions("topIndent"),o=u.getOptions("bottomIndent");i._indent={top:e>=0&&e<1?e:0,bottom:o>=0&&o<1?o:0},i._valueAxis=u.getOptions("valueAxisRangeSelector")||{},i._hideChart=!1,f=u.getOptions("seriesTemplate"),n.dataSource&&f&&(s=r.processSeriesTemplate(f,n.dataSource)),i._series=h(i,n,s),i._seriesFamilies=c(i._series,u.getOptions("equalBarWidth"),u.getOptions("minBubbleSize"),u.getOptions("maxBubbleSize"))},adjustSeriesDimensions:function(t,i){var r=this;i&&n.each(r._series||[],function(n,i){i.resamplePoints(t)}),n.each(r._seriesFamilies,function(){this.adjustSeriesDimensions(t)})},getBoundRange:function(){for(var f=this,l,v=f._valueAxis.min,y=f._valueAxis.max,t=new u.Range({isValueRange:!0,min:v,minVisible:v,max:y,maxVisible:y,axisType:f._valueAxis.type,base:f._valueAxis.logarithmBase}),a=new u.Range({}),e,o,s,h,c=0;c<f._series.length;c++)l=f._series[c].getRangeData(),t.addRange(l.val),a.addRange(l.arg);return t.isDefined()&&a.isDefined()&&(s=f._valueAxis.inverted?f._indent.top:f._indent.bottom,h=f._valueAxis.inverted?f._indent.bottom:f._indent.top,e=t.max-t.min,o=(n.isNumeric(t.maxVisible)?t.maxVisible:t.max)-(n.isNumeric(t.minVisible)?t.minVisible:t.min),r.isDate(t.min)?t.min=new Date(t.min.valueOf()-e*s):t.min-=e*s,r.isDate(t.max)?t.max=new Date(t.max.valueOf()+e*h):t.max+=e*h,n.isNumeric(o)&&(t.maxVisible=t.maxVisible?t.maxVisible+o*h:i,t.minVisible=t.minVisible?t.minVisible-o*s:i),t.invert=f._valueAxis.inverted),{arg:a,val:t}},getSeries:function(){var n=this;return n._series},getBackgroundColor:function(){var n=this;return n._backgroundColor},isEmpty:function(){var n=this;return n.getSeries().length===0},isShowChart:function(){var n=this;return!n.isEmpty()&&!n._hideChart},getCalculatedValueType:function(){var n=this,t;return n._series.length&&(t=n._series[0].argumentType),t}}}())}(jQuery,DevExpress),function(n,t){t.viz.rangeSelector=t.viz.rangeSelector,t.viz.rangeSelector.ThemeManager=t.viz.core.BaseThemeManager.inherit({_themeSection:"rangeSelector",ctor:function(n){this.setTheme(n)},_initializeTheme:function(){this._initializeFont(this._theme.scale.label.font),this._initializeFont(this._theme.sliderMarker.font),this._initializeFont(this._theme.loadingIndicator.font)},applyRangeSelectorTheme:function(t){var u=this,r=t.chart,f=t.dataSource,i;return delete t.dataSource,delete t.chart,i=n.extend(!0,{},u._theme,t),i.dataSource=f,r&&(i.chart=r),i},setBackgroundColor:function(n){var t=this._theme;n&&(t.containerBackgroundColor=n),t.shutter.color=t.shutter.color||t.containerBackgroundColor}})}(jQuery,DevExpress),function(n,t){var u=t.ui,r=t.viz;t.registerComponent("dxRangeSelector",r.rangeSelector.RangeSelector)}(jQuery,DevExpress),DevExpress.MOD_VIZ_RANGESELECTOR=!0}