webpackJsonp([12],{1041:function(e,t){e.exports={tabs:"tabs-3f6R4UrH-",tab:"tab-C-so14ap-",active:"active-3_gZ3PzW-",slider:"slider-XCKyHkum-"}},1165:function(e,t){e.exports={button:"button-1VVj8kLG-"}},1166:function(e,t){e.exports={item:"item-3cgIlGYO-",hovered:"hovered-2g31gdB--",isActive:"isActive-2M6dwA7--",isFirst:"isFirst-2kfAV5tf-",isLast:"isLast-voJ1bqZh-"}},1167:function(e,t){e.exports={slider:"slider-1ealLtjI-",inner:"inner-3lmAEIjy-"}},1168:function(e,t){e.exports={sliderRow:"sliderRow-Tv1W7hM5-"}},1169:function(e,t){e.exports={button:"button-2gir_Bbb-",hovered:"hovered-C6AkUeyT-"}},1170:function(e,t){e.exports={button:"button-88UE6omC-",hovered:"hovered-3xELmoc6-",inner:"inner-2FptJsfC-"}},1171:function(e,t){e.exports={button:"button-37qwTsBL-"}},1172:function(e,t){e.exports={separator:"separator-3bp1jCsV-"}},1173:function(e,t){e.exports=''},1174:function(e,t){e.exports={icon:"icon-2Gun4jqH-"}},1175:function(e,t){e.exports=''},1176:function(e,t){e.exports=''},1177:function(e,t){e.exports={toolbar:"toolbar-2MJefnwP-",dateRangeWrapper:"dateRangeWrapper-yS_7EK1i-",seriesControlWrapper:"seriesControlWrapper-1c7dZFwu-",dateRangeExpanded:"dateRangeExpanded-Eh9SAOEe-",dateRangeCollapsed:"dateRangeCollapsed-1-pFg0M1-",item:"item-2cWFW_ze-",first:"first-1XNI05qr-",last:"last-2VBe7EFW-",inline:"inline-2rwBBIxN-",timezone:"timezone-34WAZb8x-",icon:"icon-3VRthUnU-",hidden:"hidden-3Tq8Bf9V-",collapsed:"collapsed-2lhil-Rc-"}},816:function(e,t,n){"use strict";function i(e){var t;return t=function(t){function n(e,n){var i=t.call(this,e,n)||this;return i._handleSelectRange=function(e){var t,n,a;i.setState({activeRange:e.value}),t=i.context.chartWidget,n=t.model(),a={val:e.value,res:e.targetResolution},n.loadRange(a)},i.state={ranges:[]},i}return C.c(n,t),n.prototype.componentDidMount=function(){var e=this,t=this.context.chartWidget;t.withModel(null,function(){var n=t.model(),i=n.mainSeries();i.onStatusChanged().subscribe(e,e._updateAvailableRanges), R.enabled("update_timeframes_set_on_symbol_resolve")&&i.dataEvents().symbolResolved().subscribe(e,e._updateAvailableRanges),i.priceScale().properties().lockScale.subscribe(e,e._updateAvailableRanges),i.onIntervalChanged().subscribe(e,e._onRangeChanged),n.model().onResetScales().subscribe(e,e._resetActiveInterval),i.dataEvents().symbolResolved().subscribe(e,e._resetActiveInterval),i.properties().extendedHours.subscribe(e,e._resetActiveInterval),e._updateAvailableRanges()}),t.onScroll().subscribe(this,this._resetActiveInterval)},n.prototype.componentWillUnmount=function(){var e=this,t=this.context.chartWidget;t.withModel(null,function(){var n=t.model(),i=n.mainSeries();i.onStatusChanged().unsubscribe(e,e._updateAvailableRanges),R.enabled("update_timeframes_set_on_symbol_resolve")&&i.dataEvents().symbolResolved().unsubscribe(e,e._updateAvailableRanges),i.priceScale().properties().lockScale.unsubscribe(e,e._updateAvailableRanges),i.onIntervalChanged().unsubscribe(e,e._onRangeChanged),n.model().onResetScales().unsubscribe(e,e._resetActiveInterval),i.dataEvents().symbolResolved().unsubscribe(e,e._resetActiveInterval),i.properties().extendedHours.unsubscribe(e,e._resetActiveInterval)}),t.onScroll().unsubscribe(this,this._resetActiveInterval)},n.prototype.render=function(){return y.createElement(e,{goToDateButton:this.props.goToDateButton,className:this.props.className,ranges:this.state.ranges,activeRange:this.state.activeRange,onSelectRange:this._handleSelectRange})},n.prototype._onRangeChanged=function(e,t){this.setState({activeRange:t.timeframe})},n.prototype._resetActiveInterval=function(){this.setState({activeRange:void 0})},n.prototype._updateAvailableRanges=function(){var e,t,n,i=this.context,a=i.availableTimeFrames,o=i.chartWidget;o.model()&&(e=o.model().mainSeries(),(t=e.status())!==M.STATUS_LOADING&&t!==M.STATUS_RESOLVING&&(n=a(e.symbolInfo(),e.status()),0!==n.length&&this.setState({ranges:n})))},n}(y.PureComponent),t.contextTypes={availableTimeFrames:S.func.isRequired,chartWidget:S.object.isRequired},t}function a(e){return y.createElement("div",{className:z.slider,ref:e.reference})}function o(e){return function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._activeTab=null,e}return C.c(n,t),n.prototype.componentDidUpdate=function(){this._componentDidUpdate()},n.prototype.componentDidMount=function(){this._componentDidUpdate()},n.prototype.render=function(){var t=this,n=this.props.className,i=this._generateTabs();return y.createElement("div",{className:E(n,z.tabs)},i,y.createElement(e,{reference:function(e){t._slider=e}}))},n.prototype._generateTabs=function(){var e=this;return this._activeTab=null,y.Children.map(this.props.children,function(t){var n=t,i=!!n.props.isActive,a={reference:function(t){i&&(e._activeTab=t),n.props.reference&&n.props.reference(t)}};return y.cloneElement(n,a)})},n.prototype._componentDidUpdate=function(){var e,t,n=Object(B.ensureNotNull)(this._slider),i=n.style;this._activeTab?(e=this._activeTab.offsetWidth,t=this._activeTab.offsetLeft, i.transform="translateX("+t+"px)",i.width=e+"px",i.opacity="1"):i.opacity="0"},n}(y.PureComponent)}function s(e){var t,n=E(I.item,(t={},t[I.isActive]=e.isActive,t[I.isFirst]=e.isFirst,t[I.isLast]=e.isLast,t));return y.createElement("div",{className:n,onClick:e.onClick,ref:e.reference},e.children)}function r(e){return y.createElement("div",{className:L.slider,ref:e.reference},y.createElement("div",{className:L.inner}))}function l(e){var t=e.className,n=e.ranges,i=e.activeRange,a=e.onSelectRange;return y.createElement(H,{className:E($.sliderRow,t)},n.map(function(e,t){return y.createElement(s,{key:e.value,isFirst:0===t,isLast:t===n.length-1,isActive:i===e.value,onClick:a&&a.bind(null,e)},y.createElement("div",{title:e.description||e.text,className:"apply-common-tooltip"},e.text))}))}function c(e){var t=e.reference,n=e.className,i=e.children,a=C.e(e,["reference","className","children"]);return y.createElement("button",C.a({},a,{className:E(n,X.button),ref:t}),y.createElement("span",{className:X.inner},i))}function d(e){e.updateActions();var t=e.actions();return t&&t.applyTimeZone&&t.applyTimeZone.subActions?t.applyTimeZone.subActions:[]}function u(e){return y.createElement("span",{className:E(oe.separator,e.className)})}function p(e){var t;return t=function(t){function n(e,n){var i=t.call(this,e,n)||this;return i._priceScale=null,i._handleSelect=function(){var e=i.context.chartWidget,t=e.model(),n=Object(B.ensureNotNull)(i.state.series),a=n.priceScale(),o=a.mode();n.priceScale().isLockScale()||t.setPriceScaleMode({log:!o.log},a,window.t("Toggle Log Scale"))},i.state={isActive:!1,series:null},i}return C.c(n,t),n.prototype.componentDidMount=function(){var e=this,t=this.context.chartWidget;t.withModel(null,function(){var n=t.model().mainSeries(),i=n.priceScale();e._handleMainSeriesPriceScaleChanged(i),n.priceScaleChanged().subscribe(e,e._handleMainSeriesPriceScaleChanged),e._handleModeChanged({},i.mode()),e.setState({isActive:n.priceScale().isLog(),series:n})})},n.prototype.componentWillUnmount=function(){var e=this,t=this.context.chartWidget;t.withModel(null,function(){t.model().mainSeries().priceScaleChanged().unsubscribe(e,e._handleMainSeriesPriceScaleChanged)}),null!==this._priceScale&&(this._priceScale.modeChanged().unsubscribeAll(this),this._priceScale=null)},n.prototype.render=function(){var t=this.props.className,n=this.state,i=n.isActive,a=n.series;return y.createElement(e,{className:t,isLogarithm:i,isDisabled:null===a,onClick:this._handleSelect})},n.prototype._handleMainSeriesPriceScaleChanged=function(e){var t={};null!==this._priceScale&&(t=this._priceScale.mode(),this._priceScale.modeChanged().unsubscribe(this,this._handleModeChanged)),this._priceScale=e,this._priceScale.modeChanged().subscribe(this,this._handleModeChanged),this._handleModeChanged(t,e.mode())},n.prototype._handleModeChanged=function(e,t){e.log!==t.log&&this.setState({isActive:t.log})},n}(y.PureComponent),t.contextTypes={chartWidget:S.object.isRequired},t}function h(e){var t;return t=function(t){function n(e,n){var i=t.call(this,e,n)||this ;return i._priceScale=null,i._handleSelect=function(){var e=i.context.chartWidget,t=e.model(),n=Object(B.ensureNotNull)(i.state.series),a=n.priceScale(),o=a.mode();t.setPriceScaleMode({autoScale:!o.autoScale},a,window.t("Toggle Auto Scale"))},i.state={isActive:!1,series:null},i}return C.c(n,t),n.prototype.componentDidMount=function(){var e=this,t=this.context.chartWidget;t.withModel(null,function(){var n=t.model().mainSeries(),i=n.priceScale();e._handleMainSeriesPriceScaleChanged(i),n.priceScaleChanged().subscribe(e,e._handleMainSeriesPriceScaleChanged),e._handleModeChanged({},i.mode()),e.setState({isActive:n.priceScale().isAutoScale(),series:n})})},n.prototype.componentWillUnmount=function(){var e=this,t=this.context.chartWidget;t.withModel(null,function(){t.model().mainSeries().priceScaleChanged().unsubscribe(e,e._handleMainSeriesPriceScaleChanged)}),null!==this._priceScale&&(this._priceScale.modeChanged().unsubscribeAll(this),this._priceScale=null)},n.prototype.render=function(){var t=this.props.className,n=this.state,i=n.isActive,a=n.series;return y.createElement(e,{className:t,isAuto:i,isDisabled:null===a,onClick:this._handleSelect})},n.prototype._handleMainSeriesPriceScaleChanged=function(e){var t={};null!==this._priceScale&&(t=this._priceScale.mode(),this._priceScale.modeChanged().unsubscribe(this,this._handleModeChanged)),this._priceScale=e,this._priceScale.modeChanged().subscribe(this,this._handleModeChanged),this._handleModeChanged(t,e.mode())},n.prototype._handleModeChanged=function(e,t){e.autoScale!==t.autoScale&&this.setState({isActive:t.autoScale})},n}(y.PureComponent),t.contextTypes={chartWidget:S.object.isRequired},t}function m(e){var t;return t=function(t){function n(e,n){var i=t.call(this,e,n)||this;return i._priceScale=null,i._handleSelect=function(){var e=i.context.chartWidget,t=e.model(),n=Object(B.ensureNotNull)(i.state.series),a=n.priceScale(),o=a.mode();n.priceScale().isLockScale()||t.setPriceScaleMode({percentage:!o.percentage},a,window.t("Toggle Percentage Scale"))},i.state={isActive:!1,series:null},i}return C.c(n,t),n.prototype.componentDidMount=function(){var e=this,t=this.context.chartWidget;t.withModel(null,function(){var n=t.model().mainSeries(),i=n.priceScale();e._handleMainSeriesPriceScaleChanged(i),n.priceScaleChanged().subscribe(e,e._handleMainSeriesPriceScaleChanged),e._handleScaleChange({},i.mode()),e.setState({isActive:n.priceScale().isPercentage(),series:n})})},n.prototype.componentWillUnmount=function(){var e=this,t=this.context.chartWidget;t.withModel(null,function(){t.model().mainSeries().priceScaleChanged().unsubscribe(e,e._handleMainSeriesPriceScaleChanged)}),null!==this._priceScale&&(this._priceScale.modeChanged().unsubscribeAll(this),this._priceScale=null)},n.prototype.render=function(){var t=this.props.className,n=this.state,i=n.isActive,a=n.series;return y.createElement(e,{className:t,isPercentage:i,isDisabled:null===a,onClick:this._handleSelect})},n.prototype._handleMainSeriesPriceScaleChanged=function(e){var t={};null!==this._priceScale&&(t=this._priceScale.mode(), this._priceScale.modeChanged().unsubscribe(this,this._handleScaleChange)),this._priceScale=e,this._priceScale.modeChanged().subscribe(this,this._handleScaleChange),this._handleScaleChange(t,e.mode())},n.prototype._handleScaleChange=function(e,t){e.percentage!==t.percentage&&this.setState({isActive:t.percentage})},n}(y.PureComponent),t.contextTypes={chartWidget:S.object.isRequired},t}function f(e){var t;return t=function(t){function n(e,n){var i,a=t.call(this,e,n)||this;return a._handleClick=function(e){var t=a.context.resizerDetacher;e.shiftKey&&t.detachable.value()?t.detach():a.state.isFullscreen?t.exitFullscreen():t.requestFullscreen()},a._handleLayoutChange=function(e){a.setState({isFullscreen:e})},i=a.context.resizerDetacher,a.state={isFullscreen:i.fullscreen.value()},a}return C.c(n,t),n.prototype.componentDidMount=function(){this.context.resizerDetacher.fullscreen.subscribe(this._handleLayoutChange)},n.prototype.componentWillUnmount=function(){this.context.resizerDetacher.fullscreen.unsubscribe(this._handleLayoutChange)},n.prototype.render=function(){var t=this.props.className,n=this.state.isFullscreen;return y.createElement(e,{className:t,isFullscreen:n,onClick:this._handleClick})},n}(y.PureComponent),t.contextTypes={chartWidget:S.object.isRequired,resizerDetacher:S.object.isRequired},t}function g(e){if(e.map){return y.Children.toArray(e.children).map(e.map)}return e.children}function v(e){return Object.keys(e).map(function(t){return{name:t,width:e[t].offsetWidth}}).sort(function(e,t){return Te[e.name]-Te[t.name]})}function b(e){var t={};return Object.keys(e).forEach(function(n){var i,a=e[n];null!==a&&null!==(i=x.findDOMNode(a))&&(t[n]=i)}),t}function _(e,t){return function(n,i,a){var o,s,r,l;return y.isValidElement(n)&&"string"!=typeof n.type&&(o=n.props,"string"==typeof o.className)?(s={className:E(o.className,0===i&&fe.first,i===a.length-1&&fe.last)},r=e(),l=Object(B.ensureDefined)(Me.get(n.type)),y.createElement("div",{key:null===n.key?void 0:n.key,className:E(fe.inline,r[l]&&fe.collapsed),ref:function(e){return t(e,l)}},y.cloneElement(n,s))):n}}var C,y,x,S,E,w,R,N,T,M,W,k,A,D,O,j,B,z,I,F,P,L,$,H,U,q,G,V,Z,J,K,Y,X,Q,ee,te,ne,ie,ae,oe,se,re,le,ce,de,ue,pe,he,me,fe,ge,ve,be,_e,Ce,ye,xe,Se,Ee,we,Re,Ne,Te,Me,We,ke,Ae,De;Object.defineProperty(t,"__esModule",{value:!0}),C=n(1),y=n(20),x=n(59),n(11),S=n(104),E=n(102),w=n(313),R=n(5),N=n(880),T=n(846),M=n(40),W=n(849),k=n(328),A=n(1165),D={title:window.t("Date Range"),goToDate:window.t("Go to...")},O=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleGoToDateClick=function(){var e=t.context.chartWidget;Object(k.showGoToDateDialog)(e.model())},t._handleRangeSelect=function(e){e&&t.props.onSelectRange&&t.props.onSelectRange(e)},t}return C.c(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.ranges,i=t.activeRange,a=t.goToDateButton;return y.createElement(N.a,{className:A.button,content:D.title,arrow:!0,verticalAttachEdge:N.b.Top,verticalDropDirection:N.c.FromBottomToTop,horizontalMargin:4},n.map(function(t){ return y.createElement(T.a,{key:t.value,label:t.description||t.text,isActive:i===t.value,onClick:e._handleRangeSelect,onClickArg:t})}),a&&y.createElement(W.a,null),a&&y.createElement(T.a,{label:D.goToDate,onClick:this._handleGoToDateClick}))},t.contextTypes={chartWidget:S.object.isRequired},t}(y.PureComponent),j=i(O),B=n(7),z=n(1041),o(a),I=n(1166),F=n(1167),P=n(882),L=Object(P.a)(z,F),$=n(1168),H=o(r),U=i(l),q=n(306),G=n(1169),V={title:window.t("Go to...")},Z=Object(q.b)({keys:["Alt","G"],text:"{0} + {1}"}),J=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleClick=function(){var e=t.context.chartWidget;Object(k.showGoToDateDialog)(e.model())},t}return C.c(t,e),t.prototype.render=function(){var e=this.props,t=e.className;return e.ranges.length>0&&y.createElement("div",{className:E("apply-common-tooltip",G.button,t),"data-tooltip-hotkey":Z,onClick:this._handleClick},V.title)},t.contextTypes={chartWidget:S.object.isRequired},t}(y.PureComponent),K=i(J),Y=n(847),X=n(1170),Q=n(340),ee=n(130),te=n(195),ne=n(1171),ie={hint:window.t("Timezone")},ae=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i._element=null,i._timeFormatter=new ee.TimeFormatter,i._handleRef=function(e){i._element=e},i.state={time:"",timezone:""},i}return C.c(t,e),t.prototype.componentDidMount=function(){var e,t=this,n=this.context.chartWidget,i=this.props.withMenu;n.withModel(null,function(){var e=n.model();e.model().mainSeries().dataEvents().symbolResolved().subscribe(t,t.updateTimezonesButton),e.model().properties().timezone.subscribe(t,t.updateTimezonesButton)}),i&&(e=Object(B.ensureNotNull)(this._element),Object(Y.bindPopupMenu)(e,function(){return d(n).map(function(e){return{action:e.enabled?e.executeCallback.bind(e):null,addClass:e.enabled?"":"special",disabled:!e.enabled,iconClass:e.checkable&&e.checked?"icon checked-icon":"unchecked-icon",svg:e.checkable&&e.checked?te:"",title:e.text||""}})},{direction:"up",addClass:"context-menu",svg:!0,wrapIcon:!0}))},t.prototype.componentWillUnmount=function(){var e,t=this,n=this.context.chartWidget;n.withModel(null,function(){var e=n.model();e.model().mainSeries().dataEvents().symbolResolved().unsubscribe(t,t.updateTimezonesButton),e.model().properties().timezone.unsubscribe(t,t.updateTimezonesButton)}),e=Object(B.ensureNotNull)(this._element),Object(Y.unbindPopupMenu)(e)},t.prototype.render=function(){var e=this.props,t=e.className,n=e.isDisabled,i=this.state,a=i.time,o=i.timezone;return y.createElement(c,{className:E(t,ne.button,"apply-common-tooltip"),title:ie.hint,reference:this._handleRef,disabled:n},a&&o&&a+" ("+o+")")},t.prototype.updateTimezonesButton=function(){var e,t,n,i,a=this.context.chartWidget;a.model()&&null!==a.model().mainSeries().symbolInfo()&&(e=a.model().model().timezone(),"exchange"===e&&(t=Object(B.ensureNotNull)(a.model().mainSeries().symbolInfo()),(n=t.timezone)&&(e=n)),i=Object(Q.a)(e),this._timezoneOffset=i.offset,this.setState({timezone:i.string}),this.tickClock())},t.prototype.tickClock=function(){ var e,t,n=this.context.chartApiInstance,i=this._timezoneOffset;void 0!==i&&(e=1e3*n.serverTimeOffset(),t=new Date(Date.now()+i+e),this.setState({time:this._timeFormatter.format(t)}))},t.contextTypes={chartWidget:S.object.isRequired,chartApiInstance:S.object.isRequired},t}(y.PureComponent),oe=n(1172),se=n(848),re=n(300),le=n(41),ce=n(1173),de=n(1174),ue={hint:window.t("Scales Properties")},pe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._element=null,t._handleRef=function(e){t._element=e},t}return C.c(t,e),t.prototype.componentDidMount=function(){var e=this.context.chartWidget,t=Object(B.ensureNotNull)(this._element);Object(Y.bindPopupMenu)(t,function(){var t,n,i,a,o,s,r,l=e.paneWidgets();for(t=0;t'},836:function(e,t){e.exports=''},844:function(e,t,n){"use strict";function i(){h.fire()}var a,o,s,r,l,c,d,u,p,h;n.d(t,"a",function(){return p}),t.b=i,a=n(1),o=n(20),n.n(o),s=n(102),n.n(s),r=n(7),n.n(r),l=n(50), c=n(871),n.n(c),d=n(8),u=n.n(d),p=function(e){function t(t){var n=e.call(this,t)||this;return n._containerRef=null,n._scrollWrapRef=null,n._handleContainerRef=function(e){return n._containerRef=e},n._handleScrollWrapRef=function(e){return n._scrollWrapRef=e},n._handleMeasure=function(){var e,t,i,a,o,s,c,d,u,p,h,m,f,g,v,b,_;n.state.isMeasureValid||(e=n.props.position,t=Object(r.ensureNotNull)(n._containerRef),i=t.getBoundingClientRect(),a=document.documentElement.clientHeight,o=document.documentElement.clientWidth,s=a-10,c=i.height>s,c&&(d=Object(r.ensureNotNull)(n._scrollWrapRef),d.style.overflowY="scroll",i=t.getBoundingClientRect()),u=i.width,p=i.height,h="function"==typeof e?e(u,p):e,m=5,f=o-u-5,g=Object(l.clamp)(h.x,m,Math.max(m,f)),v=5,b=a-p-5,_=Object(l.clamp)(h.y,v,Math.max(v,b)),n.setState({appearingMenuHeight:c?s:void 0,appearingMenuWidth:h.overrideWidth,appearingPosition:{x:g,y:_},isMeasureValid:!0}))},n._handleGlobalClose=function(){n.props.onClose()},n.state={},n}return a.c(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.isOpened&&!e.isOpened&&this.setState({isMeasureValid:void 0})},t.prototype.componentDidMount=function(){this._handleMeasure(),h.subscribe(this,this._handleGlobalClose)},t.prototype.componentDidUpdate=function(){this._handleMeasure()},t.prototype.componentWillUnmount=function(){h.unsubscribe(this,this._handleGlobalClose)},t.prototype.render=function(){var e,t=this.props,n=t.children,i=t.minWidth,a=t.theme,r=void 0===a?c:a,l=t.className,d=this.state,u=d.appearingMenuHeight,p=d.appearingMenuWidth,h=d.appearingPosition,m=d.isMeasureValid;return o.createElement("div",{className:s(l,r.menuWrap,(e={},e[r.isMeasuring]=!m,e)),style:{height:u,left:h&&h.x,minWidth:i,position:"fixed",top:h&&h.y,width:p},ref:this._handleContainerRef},o.createElement("div",{className:r.scrollWrap,style:{overflowY:void 0!==u?"scroll":"auto"},ref:this._handleScrollWrapRef},o.createElement("div",{className:r.menuBox},n)))},t}(o.PureComponent),h=new u.a},846:function(e,t,n){"use strict";function i(e){return s.createElement(e.href?"a":"div",e)}function a(e){e.stopPropagation()}var o,s,r,l,c,d;n.d(t,"a",function(){return d}),o=n(1),s=n(20),n.n(s),r=n(102),n.n(r),l=n(844),c=n(879),n.n(c),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleClick=function(e){var n=t.props,i=n.dontClosePopup,a=n.isDisabled,o=n.onClick,s=n.onClickArg;a||(o&&o(s,e),i||Object(l.b)())},t}return o.c(t,e),t.prototype.render=function(){var e,t,n=this.props,o=n.className,l=n.forceShowHint,d=n.hint,u=n.icon,p=n.isActive,h=n.isDisabled,m=n.isHovered,f=n.appearAsDisabled,g=n.label,v=n.link,b=n.showToolboxOnHover,_=n.target,C=n.toolbox,y=n.theme,x=void 0===y?c:y;return s.createElement(i,{className:r(o,x.item,u&&x.withIcon,(e={},e[x.isActive]=p,e[x.isDisabled]=h||f,e[x.hovered]=m,e)),href:v,target:_,onClick:this._handleClick},void 0!==u&&s.createElement("div",{className:x.icon,dangerouslySetInnerHTML:{__html:u}}),s.createElement("div",{className:x.labelRow},s.createElement("div",{className:x.label },g)),(void 0!==d||l)&&s.createElement("div",{className:x.hint},d),void 0!==C&&s.createElement("div",{onClick:a,className:r(x.toolbox,(t={},t[x.showOnHover]=b,t))},C))},t}(s.PureComponent)},847:function(e,t,n){"use strict";var i,a=n(192).ESC,o=function(e,t,i){var s,r,l,c,d,u,p=".popup-menu";e=$(e),i=i||{},i.activeClass=i.activeClass||"",s=(i.event||"click")+p,i.hideEvent&&(r=i.hideEvent+p),l=function(){},c=l,d={},u=function(s,u,h){function m(t){var n=$(t.target).parents().andSelf();n.is(_)||n.is(e)||n.is(".charts-popup-tab-headers, .charts-popup-itemheader")||c()}function f(e){if(d.preventFirstProcessClick)return void(d.preventFirstProcessClick=!1);var t=$(e.target).parents().andSelf();t.is(".charts-popup-tab-headers, .charts-popup-itemheader")||i.notCloseOnButtons&&t.is(".icon-delete")||c()}function g(e){e.keyCode===a&&c()}function v(t,a,s){var r,l,c,d,u,p,h,m,f,g,b,C,y,x,S,E;if(t instanceof o.TabGroup){if(!t.tabs||!t.tabs.length)return;return 1!==t.tabs.length||t.tabs[0].title?(r=$('
').appendTo(s),l=$('
').appendTo(r),c=null,void $.each(t.tabs||[],function(e,n){var i,a;n.items&&n.items.length&&(i=$('
').hide().appendTo(r),$.each(n.items,function(){v(this,void 0,i)}),a=$('').append($('').text(n.name)).appendTo(l),a.on("click",function(e){a.is(".active")||(l.find(".charts-popup-tab-header.active").removeClass("active"),a.addClass("active"),r.find(".charts-popup-tab").hide(),i.show(),e&&e.preventDefault(),"function"==typeof t.onChange&&t.onChange.call(t,n.name))}),c&&!n.active||(c=a,l.find(".charts-popup-tab-header.active").removeClass("active"),a.addClass("active"),r.find(".charts-popup-tab").hide(),i.show()))})):void $.each(t.tabs[0].items,function(){v(this,void 0,s)})}return t instanceof o.Group?(d=$('
').appendTo(s),t.title&&(u=$('
').text(t.title).prepend($('')),t.collapsible&&(d.addClass("charts-popup-group-collapsible"),d.toggleClass("collapsed",t.collapsed),u.on("click",function(){d.toggleClass("collapsed"),"function"==typeof t.onChange&&t.onChange(d.hasClass("collapsed")),_.height()===parseInt(_.css("max-height"))?_.addClass("popup-menu-scroll-y"):_.height()').text(t.title)):t.separator?(p=$(''),void s.append(p)):(p=$('
'),t.url&&p.attr("href",t.url),t.target&&p.attr("target",t.target),a||p.addClass("first"),"function"==typeof t.active?t.active(t)&&p.addClass("active"):t.active&&p.addClass("active"),t.addClass&&p.addClass(t.addClass),t.addData&&p.data(t.addData),t.disabled&&p.addClass("disabled"), "function"==typeof t.action&&(h=t.action,m=function(e){$(e.target).parents().andSelf().is(x)||(h.apply(p,arguments),!t.url&&e&&"function"==typeof e.preventDefault&&e.preventDefault())},i.upAction?p.bind("mouseup",m):p.bind("click",m)),t.date?(f=$('').appendTo(p),$('').text(t.date||"").appendTo(p)):t.icon&&!i.svg?(g=$('').appendTo(p),g.css("background-image",t.icon.image||""),t.icon.offset&&g.css("background-position","string"==typeof t.icon.offset?t.icon.offset:t.icon.offset.x+"px "+t.icon.offset.y+"px"),f=$('').appendTo(p)):!0===i.svg&&t.svg?(i.wrapIcon?p.append($('').addClass(t.iconClass).append(t.svg)):p.append(t.svg),f=$('').appendTo(p)):t.iconClass?(p.append($('').addClass(t.iconClass)),f=$('').appendTo(p)):f=$('').appendTo(p),t.html?f.html(t.html):f.text(TradingView.clean(t.title,!0)||""),b=$('').appendTo(p),t.shortcut&&b.text(t.shortcut.keys),"function"==typeof t.deleteAction&&(C=t.deleteAction,y=t.deleteAction.title||$.t("Delete"),x=$(''),x.html(n(828)),x.attr("title",y),x.on("click",function(e){C.apply(p,arguments),e.preventDefault()}),p.append(x)),t.buttons instanceof Array&&t.buttons.length&&t.buttons.forEach(function(e){e.el instanceof $||(e.el=$(e.el)),e.el.appendTo(p),e.handler&&e.el.on("click",function(t){e.handler.apply(p,arguments)})}),void 0!==t.counter&&("function"==typeof t.counter?(S=$('').html(t.counter()),S.appendTo(p)):(E=t.counterBlue?"blue":"",$('').text(t.counter+"").addClass(E).appendTo(p))),s.append(p),void e.data("popup-menu",s))}var b,_,C,y,x,S,E,w,R,N,T,M,W,k,A,D,O,j,B,z,I,F,P,L,H,U,q=s.target.ownerDocument,G=q.defaultView,V=u||t;if("function"==typeof V&&(V=V()),$(this).hasClass("open")||$(this).hasClass("active"))return s.preventDefault(),c(),void(b=d.scrollTop);switch(c=function(){d.scrollTop=_.scrollTop(),_.remove(),e.removeClass("active open "+i.activeClass),e.data("popup-menu",null),$(q).off("click",f),$(q).off("mousedown",m),Modernizr.touch&&$(q).off("touchstart.chartgui",m),$(q).off("selectstart."+p),q.removeEventListener("keydown",g,!1),c=l,i.onRemove&&i.onRemove()},e.addClass("active open "+i.activeClass),_=$('
'),i.addClass&&_.addClass(i.addClass),i.zIndex&&_.css("z-index",i.zIndex),C=_,i.listInner&&(C=$('
').appendTo(C)),i.listTable&&(C=$('
').appendTo(C)),$.each(V,function(e){v(this,e,C)}),r||(d.preventFirstProcessClick=!0),$(q).on("click",f),$(q).on("mousedown",m),q.addEventListener("keydown",g,!1),Modernizr.touch&&$(q).on("touchstart.chartgui",m),i.upAction&&$(q).on("selectstart.popup-menu",function(){return!1}),_.appendTo(q.body),y=$(G).width(),x=Math.min($(G).height(),$("body").height()),S=e.outerWidth(),E=e.outerHeight(),w=e.offset(), b=$(G).scrollTop()||0,w.top-=b,w.top=Math.round(w.top),w.left=Math.round(w.left),R=_.outerWidth(),N=_.outerHeight(),T=void 0!==i.viewportSpacing?i.viewportSpacing:10,M=i.popupSpacing?~~i.popupSpacing:1,W=i.popupDrift?~~i.popupDrift:0,k=N-_.height(),A="down",i.direction&&(A="function"==typeof i.direction?i.direction():i.direction),D=!!i.reverse,"down"===A?(O=x-w.top-E-M-T-k,j=w.top-M-T-k,OO&&(A="up")):"right"===A&&(B=y-w.left-S-M-T-k,z=w.left-M-T-k,BB&&(A="left")),A){case"down":case"up":"down"===A?_.css("top",w.top+E+M+"px"):_.css("bottom",x-w.top+M+"px").css("top","auto"),D?_.css("left",Math.max(w.left+W+S-R,T)+"px").css("right","auto"):_.css("left",w.left+W+"px").css("right","auto");break;case"right":case"left":M=Math.max(M,4),"right"===A?_.css("left",Math.floor(w.left+S+M)+"px").css("right","auto"):_.css("left",Math.floor(Math.max(w.left-R-M,T))+"px").css("right","auto"),D?_.css("top",Math.floor(Math.max(w.top+W+E-N,T))+"px"):_.css("top",Math.floor(w.top+W)+"px")}for(_.show(),I=w.top,"up"===A||{left:1,right:1}[A]&&D?"up"!==A?I+=E:I-=E+M+k+T:I=x-I-E-2*M-k,_.height()>I&&_.addClass("popup-menu-scroll-y"),_.css("max-height",I+"px"),i.careRightBorder&&(F=y+$(G).scrollLeft(),parseInt(_.css("left"))+_.width()+T>F&&_.css("left",F-_.width()-T+"px").css("right","auto")),i.careBottomBorder&&parseInt(_.css("top"))+_.height()+T>x+b&&_.css("top",x-_.height()-T+b+"px"),L=e.parents().andSelf(),H=L.size();H--;)if("fixed"===L.eq(H).css("position")){P=L.eq(H);break}P&&(U=_.offset(),_.css({position:"fixed",left:U.left-$(q).scrollLeft(),right:"auto"})),_[0].scrollHeight>_.height()&&_.addClass("popup-with-scroll"),s&&s.preventDefault()},s&&e.bind(s,u),r&&e.bind(r,function(){c()}),i.runOpened&&u()};o.TabGroup=function e(t){if(!(this instanceof e))return new e(t);t=t||{},this.tabs=[],"function"==typeof t.onChange&&(this.onChange=t.onChange)},o.TabGroup.prototype.appendTab=function(e,t,n){if(null==e?e="":e+="",t||(t=[]),n||(n={}),!Array.isArray(t))throw new TypeError("items must be an array");return this.tabs.push({name:e,items:t,active:!!n.active}),t},o.Header=function e(t){if(!(this instanceof e))return new e(t);this.title=t},o.Group=function e(t){if(!(this instanceof e))return new e(t);t=t||{},this.items=[],this.title=null==t.title?"":t.title+"",this.collapsible=!!t.collapsible,this.collapsed=!!t.collapsed,"function"==typeof t.onChange&&(this.onChange=t.onChange)},o.Group.prototype.push=function(){this.items.push.apply(this.items,arguments)},t.bindPopupMenu=o,i=function(e){e=$(e),e.unbind(".popup-menu"),e.removeData("popup-menu")},t.unbindPopupMenu=i},848:function(e,t,n){"use strict";function i(e){var t,n=e.icon,i=e.isActive,c=e.isOpened,d=e.isDisabled,u=e.onClick,p=e.text,h=e.textBeforeIcon,m=e.title,f=e.theme,g=void 0===f?l:f,v=e.className,b=e.forceInteractive,_=a.e(e,["icon","isActive","isOpened","isDisabled","onClick","text","textBeforeIcon","title","theme","className","forceInteractive"]),C=s(v,g.button,m&&"apply-common-tooltip",(t={},t[g.isActive]=i,t[g.isOpened]=c, t[g.isInteractive]=(b||!!u)&&!d,t[g.isDisabled]=d,t)),y=n&&("string"==typeof n?o.createElement(r.a,{className:g.icon,icon:n}):o.cloneElement(n,{className:g.icon}));return o.createElement("div",a.a({},_,{className:C,onClick:d?void 0:u,title:m}),h&&p&&o.createElement("div",{className:s("js-button-text",g.text)},p),y,!h&&p&&o.createElement("div",{className:s("js-button-text",g.text)},p))}var a,o,s,r,l;t.a=i,a=n(1),o=n(20),n.n(o),s=n(102),n.n(s),r=n(300),l=n(855),n.n(l)},849:function(e,t,n){"use strict";function i(e){return a.createElement("div",{className:o.separator})}var a,o;t.a=i,a=n(20),n.n(a),o=n(881),n.n(o)},855:function(e,t){e.exports={button:"button-2ioYhFEY-",isInteractive:"isInteractive-20uLObIc-",hovered:"hovered-3perbaxJ-",isActive:"isActive-22S-lGpa-",isOpened:"isOpened-p-Ume5l9-",isDisabled:"isDisabled-1_tmrLfP-",text:"text-1sK7vbvh-",icon:"icon-beK_KS0k-"}},871:function(e,t){e.exports={menuWrap:"menuWrap-1gEtmoET-",isMeasuring:"isMeasuring-FZ0EJCM2-",scrollWrap:"scrollWrap-1B5MfTJt-",menuBox:"menuBox-20sJGjtG-",isHidden:"isHidden-2vLQpR1t-"}},872:function(e,t,n){"use strict";function i(e){var t=p(e),n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,document.body.appendChild(n)),u[e]=(u[e]||0)+1,n}function a(e){var t=p(e),n=document.getElementById(t);u[e]&&(u[e]-=1),n&&0===u[e]&&document.body.removeChild(n)}var o,s=n(1),r=(n(127),n(20)),l=n(59),c=n(304),d=0,u={},p=function(e){return"__outside-render-"+e},h=function(e){function t(t){return e.call(this,t)||this}return s.c(t,e),t.prototype.componentDidMount=function(){this._rememberLayer(),this._renderLayer()},t.prototype.componentDidUpdate=function(e){this.props.layerId!==e.layerId&&(a(this._layerId),this._rememberLayer()),this._renderLayer()},t.prototype.componentWillUnmount=function(){l.unmountComponentAtNode(this._layer),a(this._layerId)},t.prototype.render=function(){return null},t.prototype._rememberLayer=function(){var e=this.props.layerId,t=void 0===e?d+++"":e;this._layerId=t,this._layer=i(t)},t.prototype._renderLayer=function(){l.render(r.createElement("div",null,this.props.children),this._layer)},t}(r.Component),m=n(844);n.d(t,"a",function(){return o}),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleClose=function(){t.props.onClose()},t._handleClickOutside=function(e){var n=t.props,i=n.closeOnClickOutside,a=n.onClickOutside,o=n.doNotCloseOn;a&&a(e),!i||void 0!==o&&l.findDOMNode(o).contains(e.target)||t._handleClose()},t}return s.c(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.isOpened&&!e.isOpened&&this.setState({isMeasureValid:void 0})},t.prototype.render=function(){var e=this.props,t=e.children,n=e.isOpened,i=(e.closeOnClickOutside,e.doNotCloseOn,e.onClickOutside,e.onClose,s.e(e,["children","isOpened","closeOnClickOutside","doNotCloseOn","onClickOutside","onClose"]));return n?r.createElement(h,null,r.createElement(c.a,{handler:this._handleClickOutside,mouseDown:!0,touchStart:!0,ctor:"div"},r.createElement(m.a,s.a({},i,{isOpened:n,onClose:this._handleClose }),t))):null},t.defaultProps={closeOnClickOutside:!0},t}(r.PureComponent)},879:function(e,t){e.exports={item:"item-2xPVYue0-",hovered:"hovered-1uf45E05-",isDisabled:"isDisabled-1wLqKupj-",isActive:"isActive-2j-GhQs_-",icon:"icon-2Qm7YIcz-",hint:"hint-1IhIvLPB-",toolbox:"toolbox-3ulPxfe--",withIcon:"withIcon-1xBjf-oB-",labelRow:"labelRow-3Q0rdE8--",label:"label-3Xqxy756-",showOnHover:"showOnHover-1q6ySzZc-"}},880:function(e,t,n){"use strict";var i,a,o,s,r,l,c,d,u,p,h,m;n.d(t,"b",function(){return d}),n.d(t,"c",function(){return p}),n.d(t,"a",function(){return m}),i=n(1),a=n(20),n.n(a),o=n(102),n.n(o),s=n(872),r=n(975),l=n(7),n.n(l),c=n(989),n.n(c),function(e){e[e.Top=0]="Top",e[e.Bottom=1]="Bottom"}(d||(d={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(u||(u={})),function(e){e[e.FromTopToBottom=0]="FromTopToBottom",e[e.FromBottomToTop=1]="FromBottomToTop"}(p||(p={})),function(e){e[e.FromLeftToRight=0]="FromLeftToRight",e[e.FromRightToLeft=1]="FromRightToLeft"}(h||(h={})),m=function(e){function t(t){var n=e.call(this,t)||this;return n._wrapperRef=null,n._handleWrapperRef=function(e){return n._wrapperRef=e},n._handleClick=function(){n._handleToggleDropdown()},n._handleToggleDropdown=function(e){var t=n.state.isOpened,i="boolean"==typeof e?e:!t;n.setState({isOpened:i})},n._handleClose=function(){n._handleToggleDropdown(!1)},n._getDropdownPosition=function(e,t){var i=Object(l.ensureNotNull)(n._wrapperRef).getBoundingClientRect(),a=n.props,o=a.verticalAttachEdge,s=a.verticalDropDirection,r=a.horizontalAttachEdge,c=a.horizontalDropDirection,m=a.horizontalMargin,f=void 0===m?0:m,g=a.verticalMargin,v=void 0===g?2:g,b=o===d.Top?-1*v:v,_=r===u.Right?i.right:i.left,C=o===d.Top?i.top:i.bottom;return{x:_-(c===h.FromRightToLeft?e:0)+f,y:C-(s===p.FromBottomToTop?t:0)+b}},n.state={isOpened:!1},n}return i.c(t,e),t.prototype.render=function(){var e,t=this.props,n=t.id,i=t.arrow,l=t.children,d=t.content,u=t.isDisabled,p=t.minWidth,h=t.title,m=t.className,f=t.hotKey,g=this.state.isOpened,v=o(m,c.button,"apply-common-tooltip",(e={},e[c.isDisabled]=u,e[c.isOpened]=g,e));return a.createElement("div",{id:n,className:v,onClick:u?void 0:this._handleClick,title:h,"data-tooltip-hotkey":f,ref:this._handleWrapperRef},d,i&&a.createElement("div",{className:c.arrow},a.createElement("div",{className:c.arrowWrap},a.createElement(r.a,{dropped:g}))),a.createElement(s.a,{closeOnClickOutside:this.props.closeOnClickOutside,doNotCloseOn:this,isOpened:g,minWidth:p,onClose:this._handleClose,position:this._getDropdownPosition},l))},t.defaultProps={arrow:!0,closeOnClickOutside:!0,verticalAttachEdge:d.Bottom,horizontalAttachEdge:u.Left,verticalDropDirection:p.FromTopToBottom,horizontalDropDirection:h.FromLeftToRight},t}(a.PureComponent)},881:function(e,t){e.exports={separator:"separator-25lkUpN--"}},882:function(e,t,n){"use strict";function i(e,t,n){var i,a,o,s,r;for(void 0===n&&(n={}),i=Object.assign({},t),a=0,o=Object.keys(t);a