diff --git a/charting_library/ar-tv-chart.ad2f4a55.html b/charting_library/ar-tv-chart.9df149da.html similarity index 99% rename from charting_library/ar-tv-chart.ad2f4a55.html rename to charting_library/ar-tv-chart.9df149da.html index be2fb47e..19a741c7 100644 --- a/charting_library/ar-tv-chart.ad2f4a55.html +++ b/charting_library/ar-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/bundles/chart-bottom-toolbar.759ca7fcec74eda8d35f.js b/charting_library/bundles/chart-bottom-toolbar.0ce40a4af0058113344e.js similarity index 50% rename from charting_library/bundles/chart-bottom-toolbar.759ca7fcec74eda8d35f.js rename to charting_library/bundles/chart-bottom-toolbar.0ce40a4af0058113344e.js index 908e9c62..6969ef69 100644 --- a/charting_library/bundles/chart-bottom-toolbar.759ca7fcec74eda8d35f.js +++ b/charting_library/bundles/chart-bottom-toolbar.0ce40a4af0058113344e.js @@ -4,12 +4,12 @@ className:a()(o.separator,"small"===t&&o.small,"normal"===t&&o.normal,"large"=== ranges:this.state.ranges,activeRange:this.state.activeRange,onSelectRange:this._handleSelectRange})}}).contextType=w,t}const R=new WeakMap;var k=n("cdbK"),O=n("l4ku"),T=n("02pg"),M=n("2uTr"),A=n("9VJd"),W=n("J3OW");function j(e){const{ranges:t,activeRange:n,onSelectRange:i}=e;return s.a.createElement(s.a.Fragment,null,t.map(e=>s.a.createElement(O.a,{key:e.value.value,label:e.description||e.text,active:n===e.value.value,checked:n===e.value.value,checkable:!0,disabled:!1,onClick:a.bind(null,e),doNotCloseOnClick:!1,subItems:[]})));function a(e){e&&i&&i(e),Object(g.b)()}}function B(e){const{onGoToDateClick:t}=e;return s.a.createElement(s.a.Fragment,null,s.a.createElement(T.a,{className:W.separator}),s.a.createElement(O.a,{icon:A,label:Object(M.appendEllipsis)(Object(r.t)("Go to")),onClick:t,active:!1,checked:!1,checkable:!1,disabled:!1,doNotCloseOnClick:!1,subItems:[]}))}const D={title:window.t("Date Range"),goToDate:Object(M.appendEllipsis)(window.t("Go to"))},L=Object(C.b)();class I extends i.PureComponent{constructor(e,t){super(e,t),this._handleGoToDateClick=()=>{const{chartWidget:e}=this.context;Object(k.showGoToDateDialog)(e),Object(g.b)()},this._handleRangeSelect=e=>{e&&this.props.onSelectRange&&this.props.onSelectRange(e),Object(g.b)()},this._renderChildren=e=>{const{ranges:t,activeRange:n,goToDateButton:s}=this.props;return e?i.createElement(i.Fragment,null,i.createElement(j,{ranges:t,activeRange:n,onSelectRange:this._handleRangeSelect}),s&&i.createElement(B,{onGoToDateClick:this._handleGoToDateClick})):i.createElement(i.Fragment,null,t.map(e=>i.createElement(b.b,{key:e.value.value,label:e.description||e.text,isActive:n===e.value.value,onClick:this._handleRangeSelect,onClickArg:e})),s&&i.createElement(v.a,null),s&&i.createElement(b.b,{label:D.goToDate,onClick:this._handleGoToDateClick}))},Object(C.c)(t,{chartWidget:l.any.isRequired})}render(){return i.createElement(p.a,{rule:"screen and (max-width: 428px)"},e=>i.createElement(u.a,{className:W.button,content:D.title,arrow:!0,verticalAttachEdge:m.c.Top,verticalDropDirection:m.d.FromBottomToTop,horizontalMargin:4,"data-name":"date-ranges-menu",isDrawer:e},this._renderChildren(e)))}}I.contextType=L;const z=N(I);var P=n("K3s3"),F=n("W9Y+");function U(e){const t=c(e.className,F.item,{[F.isActive]:e.isActive,[F.isFirst]:e.isFirst,[F.isLast]:e.isLast});return i.createElement("div",{className:t,onClick:e.onClick,ref:e.reference},e.children)}var H=n("nPPD"),q=n("RZ2Z");const K=Object(H.a)(P.a,q);var G=n("qSb5");const X=Object(P.c)((function(e){return i.createElement("div",{className:c(e.className,K.slider),ref:e.reference},i.createElement("div",{className:K.inner}))}));const V=N((function(e){const{className:t,ranges:n,activeRange:s,onSelectRange:a}=e;return i.createElement(X,{className:c(G.sliderRow,t),"data-name":"date-ranges-tabs"},n.map((e,t)=>i.createElement(U,{key:e.value.value,isFirst:0===t,isLast:t===n.length-1,isActive:s===e.value.value,onClick:a&&a.bind(null,e)},i.createElement("div",{title:e.description||e.text,className:"apply-common-tooltip"},e.text))))})) ;var Y=n("Iivm"),Z=n("/DW5"),J=n("ul7r"),Q=n("c7H2");const $=Object(Z.b)({keys:["Alt","G"],text:"{0} + {1}"}),ee=Object(C.b)();class te extends i.PureComponent{constructor(e,t){super(e,t),this._handleClick=()=>{const{chartWidget:e}=this.context;Object(_.trackEvent)("GUI","Chart Bottom Toolbar","go to"),Object(k.showGoToDateDialog)(e)},Object(C.c)(t,{chartWidget:l.any.isRequired})}render(){const{className:e,ranges:t}=this.props;return t.length>0&&i.createElement("div",{className:c("apply-common-tooltip",Q.button,e),"data-name":"go-to-date","data-tooltip-hotkey":$,onClick:this._handleClick,title:Object(r.t)("Go to")},i.createElement(Y.a,{className:Q.icon,icon:J}))}}te.contextType=ee;const ne=N(te);var ie=n("URQ3");function se(e){const{reference:t,className:n,children:s}=e,a=Object(o.a)(e,["reference","className","children"]);return i.createElement("button",Object.assign({},a,{className:c(n,ie.button),ref:t}),i.createElement("span",{className:ie.inner},s))}var ae=n("/+9u"),oe=n("4kQX"),re=n("7KDR"),le=n("5VQP");class ce extends i.PureComponent{constructor(e){super(e),this._element=null,this._menu=null,this._handleRef=e=>{this._element=e},this._showMenu=()=>{if(this._menu&&this._menu.isShown())return this._menu.hide(),void this._menu.destroy();const{getActions:e,right:t}=this.props,n=Object(f.ensureNotNull)(this._element),i=e();0!==i.length&&le.ContextMenuManager.createMenu(i).then(e=>{this._menu=e,e.show((e,i)=>{const s=n.getBoundingClientRect();return{clientX:t?s.right-e:s.left,clientY:s.top-Math.min(i,s.top),overrideHeight:s.top{const{chartApiInstance:e}=this.context,t=this._timezoneOffset;if(void 0!==t){const n=1e3*e.serverTimeOffset(),i=new Date(Date.now()+t+n);this.setState({time:this._timeFormatter.format(i)})}},this._getActions=()=>{if(!this.props.withMenu)return[];const{chartWidget:e}=this.context;return function(e){e.updateActions();const t=e.actions();return t&&t.applyTimeZone instanceof re.Action?t.applyTimeZone.getSubItems():[]}(e)},Object(C.c)(t,{chartWidget:l.any.isRequired,chartApiInstance:l.any.isRequired}),this.state={time:"",timezone:""}}componentDidMount(){const{chartWidget:e}=this.context;this._tickInterval=setInterval(this._tickClock,1e3),e.withModel(null,()=>{const t=e.model();t.model().mainSeries().dataEvents().symbolResolved().subscribe(this,this.updateTimezonesButton),t.model().properties().timezone.subscribe(this,this.updateTimezonesButton)})}componentWillUnmount(){const{chartWidget:e}=this.context;clearInterval(this._tickInterval),e.withModel(null,()=>{const t=e.model();t.model().mainSeries().dataEvents().symbolResolved().unsubscribe(this,this.updateTimezonesButton), t.model().properties().timezone.unsubscribe(this,this.updateTimezonesButton)})}render(){const{className:e,withMenu:t}=this.props,{time:n,timezone:s}=this.state;return i.createElement(ce,{getActions:this._getActions},i.createElement(se,{className:c(e,he.button,"apply-common-tooltip"),title:t?de.hint:void 0,disabled:!t,"data-name":"time-zone-menu"},n&&s&&`${n} (${s})`))}updateTimezonesButton(){const{chartWidget:e}=this.context;if(!e.model())return;if(null===e.model().mainSeries().symbolInfo())return;let t=e.model().model().timezone();if("exchange"===t){const n=Object(f.ensureNotNull)(e.model().mainSeries().symbolInfo()).timezone;n&&(t=n)}const n=Object(ae.a)(t);this._timezoneOffset=n.offset,this.setState({timezone:n.string}),this._tickClock()}}me.contextType=ue;var ge=n("z6ID");function pe(e){return i.createElement("span",{className:c(ge.separator,e.className)})}var be=n("tU7i"),ve=n("qFKp");class fe{constructor(e,t,n){this._highlighted=!1,this._chartWidget=e,this._priceScaleGetter=t,this._owner=n,this._setHighlight=this._setHighlight.bind(this),this._removeHighlight=this._removeHighlight.bind(this)}destroy(){this._highlighted&&this._removeHighlight()}handlers(){const e=ve.CheckMobile.any();return{onMouseEnter:e?void 0:this._setHighlight,onMouseLeave:e?void 0:this._removeHighlight}}_setHighlight(){const e=this._chartWidget.model().model(),t=e.paneForSource(e.mainSeries()),n=this._priceScaleGetter();if(null===t||null===n)return;const i=this._chartWidget.paneByState(t);if(null!==i){const t=i.rightPriceAxisesContainer().findAxisWidgetForScale(n);let s=null;null!==t&&(s=t.axisInfo());const a=i.leftPriceAxisesContainer().findAxisWidgetForScale(n);null!==a&&(s=a.axisInfo());const o=i.highlightedPriceAxis();null!==s&&o.value().axis!==s&&(o.setValue({owner:this._owner,axis:s}),e.lightUpdate(),this._highlighted=!0)}}_removeHighlight(){const e=this._chartWidget.model().model(),t=e.paneForSource(e.mainSeries());if(null===t)return;const n=this._chartWidget.paneByState(t);if(null!==n){const t=n.highlightedPriceAxis(),i=t.value();null!==i.axis&&i.owner===this._owner&&(t.setValue({owner:this._owner,axis:null}),e.lightUpdate(),this._highlighted=!1)}}}const _e=Object(C.b)();const Ce=Object(C.b)();const Se=Object(C.b)();const Ee=Object(C.b)();var ye=n("+GaQ"),xe=n("XAms"),we=n("T4/F"),Ne=n("ApAi"),Re=n("PP+v");const ke={extLabel:window.t("ext"),extHint:window.t("Extended Hours is available only for intraday charts"),percentageHint:window.t("Toggle Percentage"),logLabel:window.t("log",{context:"scale"}),logHint:window.t("Toggle Log Scale"),autoLabel:window.t("auto",{context:"scale"}),autoHint:window.t("Toggle Auto Scale"),fullscreenHint:window.t("Toggle Maximize Chart"),adjLabel:window.t("adj",{context:"adjustments"}),adjHint:window.t("Adjust data for dividends"),adjForDividendsOnlyHint:window.t("Data is adjusted for dividends only"),adjForSplitsOnlyHint:window.t("Data is adjusted for splits only")},Oe=(Te=e=>i.createElement(be.b,{text:ke.logLabel,title:ke.logHint,className:e.className,isActive:e.isLogarithm,isGrouped:!0, -onClick:e.onClick,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,"data-name":"logarithm"}),(Me=class extends i.PureComponent{constructor(e,t){super(e,t),this._priceScale=null,this._handleSelect=()=>{const e=this.context.chartWidget.model(),t=Object(f.ensureNotNull)(this.state.series),n=t.priceScale(),i=n.mode();t.priceScale().isLockScale()||e.setPriceScaleMode({log:!i.log},n,window.t("Toggle Log Scale"))},Object(C.c)(t,{chartWidget:l.any.isRequired}),this.state={isActive:!1,series:null},this._priceAxisHighlighter=new fe(this.context.chartWidget,()=>this._priceScale,"logarithm")}componentDidMount(){const e=this.context.chartWidget;e.withModel(null,()=>{const t=e.model().mainSeries(),n=t.priceScale();this._handleMainSeriesPriceScaleChanged(n),t.priceScaleChanged().subscribe(this,this._handleMainSeriesPriceScaleChanged),this._handleModeChanged({},n.mode()),this.setState({isActive:t.priceScale().isLog(),series:t})})}componentWillUnmount(){const e=this.context.chartWidget;e.withModel(null,()=>{e.model().mainSeries().priceScaleChanged().unsubscribe(this,this._handleMainSeriesPriceScaleChanged)}),null!==this._priceScale&&(this._priceScale.modeChanged().unsubscribeAll(this),this._priceScale=null),this._priceAxisHighlighter.destroy()}render(){const{className:e}=this.props,{isActive:t,series:n}=this.state;return i.createElement(Te,Object.assign({},this._priceAxisHighlighter.handlers(),{className:e,isLogarithm:t,isDisabled:null===n,onClick:this._handleSelect}))}_handleMainSeriesPriceScaleChanged(e){let 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())}_handleModeChanged(e,t){e.log!==t.log&&this.setState({isActive:t.log})}}).contextType=_e,Me);var Te,Me;const Ae=function(e){var t;return(t=class extends i.PureComponent{constructor(e,t){super(e,t),this._priceScale=null,this._handleSelect=()=>{const e=this.context.chartWidget.model(),t=Object(f.ensureNotNull)(this.state.series).priceScale(),n=t.mode();e.setPriceScaleMode({autoScale:!n.autoScale},t,window.t("Toggle Auto Scale"))},Object(C.c)(t,{chartWidget:l.any.isRequired}),this.state={isActive:!1,series:null},this._priceAxisHighlighter=new fe(this.context.chartWidget,()=>this._priceScale,"auto")}componentDidMount(){const e=this.context.chartWidget;e.withModel(null,()=>{const t=e.model().mainSeries(),n=t.priceScale();this._handleMainSeriesPriceScaleChanged(n),t.priceScaleChanged().subscribe(this,this._handleMainSeriesPriceScaleChanged),this._handleModeChanged({},n.mode()),this.setState({isActive:t.priceScale().isAutoScale(),series:t})})}componentWillUnmount(){const e=this.context.chartWidget;e.withModel(null,()=>{e.model().mainSeries().priceScaleChanged().unsubscribe(this,this._handleMainSeriesPriceScaleChanged)}),null!==this._priceScale&&(this._priceScale.modeChanged().unsubscribeAll(this),this._priceScale=null),this._priceAxisHighlighter.destroy()}render(){ -const{className:t}=this.props,{isActive:n,series:s}=this.state;return i.createElement(e,Object.assign({},this._priceAxisHighlighter.handlers(),{className:t,isAuto:n,isDisabled:null===s,onClick:this._handleSelect}))}_handleMainSeriesPriceScaleChanged(e){let 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())}_handleModeChanged(e,t){e.autoScale!==t.autoScale&&this.setState({isActive:t.autoScale})}}).contextType=Ce,t}(e=>i.createElement(be.b,{text:ke.autoLabel,title:ke.autoHint,className:e.className,isActive:e.isAuto,isGrouped:!0,onClick:e.onClick,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,"data-name":"auto"})),We=function(e){var t;return(t=class extends i.PureComponent{constructor(e,t){super(e,t),this._priceScale=null,this._handleSelect=()=>{const e=this.context.chartWidget.model(),t=Object(f.ensureNotNull)(this.state.series),n=t.priceScale(),i=n.mode();t.priceScale().isLockScale()||e.setPriceScaleMode({percentage:!i.percentage},n,window.t("Toggle Percentage Scale"))},Object(C.c)(t,{chartWidget:l.any.isRequired}),this.state={isActive:!1,series:null},this._priceAxisHighlighter=new fe(this.context.chartWidget,()=>this._priceScale,"percentage")}componentDidMount(){const e=this.context.chartWidget;e.withModel(null,()=>{const t=e.model().mainSeries(),n=t.priceScale();this._handleMainSeriesPriceScaleChanged(n),t.priceScaleChanged().subscribe(this,this._handleMainSeriesPriceScaleChanged),this._handleScaleChange({},n.mode()),this.setState({isActive:t.priceScale().isPercentage(),series:t})})}componentWillUnmount(){const e=this.context.chartWidget;e.withModel(null,()=>{e.model().mainSeries().priceScaleChanged().unsubscribe(this,this._handleMainSeriesPriceScaleChanged)}),null!==this._priceScale&&(this._priceScale.modeChanged().unsubscribeAll(this),this._priceScale=null),this._priceAxisHighlighter.destroy()}render(){const{className:t}=this.props,{isActive:n,series:s}=this.state;return i.createElement(e,Object.assign({},this._priceAxisHighlighter.handlers(),{className:t,isPercentage:n,isDisabled:null===s,onClick:this._handleSelect}))}_handleMainSeriesPriceScaleChanged(e){let 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())}_handleScaleChange(e,t){e.percentage!==t.percentage&&this.setState({isActive:t.percentage})}}).contextType=Se,t}(e=>i.createElement(be.b,{icon:we,title:ke.percentageHint,className:e.className,isActive:e.isPercentage,isDisabled:e.isDisabled,isGrouped:!0,onClick:e.onClick,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,"data-name":"percentage"}));const je=Object(Z.b)({keys:["Alt","Enter"],text:"{0} + {1}"}),Be=function(e){var t;return(t=class extends i.PureComponent{constructor(e,t){ -super(e,t),this._handleClick=e=>{const{resizerDetacher:t,chartWidgetCollection:n}=this.context;e.shiftKey&&t.detachable.value()?t.detach():this.state.isFullscreen?t.exitFullscreen():t.requestFullscreen()},this._handleLayoutChange=e=>{this.setState({isFullscreen:e})},this._handlePhoneSize=()=>{0},Object(C.c)(t,{chartWidgetCollection:l.any.isRequired,resizerDetacher:l.any.isRequired});const{resizerDetacher:n}=t;this.state={isFullscreen:n.fullscreen.value(),isChangeLayoutButton:this._isChangeLayoutButton()}}componentDidMount(){const{resizerDetacher:e,chartWidgetCollection:t}=this.context,{mobileChangeLayoutEnabled:n}=this.props;e.fullscreen.subscribe(this._handleLayoutChange)}componentWillUnmount(){const{resizerDetacher:e,chartWidgetCollection:t}=this.context,{mobileChangeLayoutEnabled:n}=this.props;e.fullscreen.unsubscribe(this._handleLayoutChange)}render(){const{className:t}=this.props,{isFullscreen:n,isChangeLayoutButton:s}=this.state;return i.createElement(e,{className:t,isFullscreen:n,onClick:this._handleClick})}_isChangeLayoutButton(){return!1}}).contextType=Ee,t}(e=>i.createElement(be.b,{icon:Ne,title:ke.fullscreenHint,className:e.className,isActive:e.isFullscreen,onClick:e.onClick,"data-tooltip-hotkey":je,"data-name":"fullscreen"})),De={properties:!0,fullscreen:!0,preventPhoneLayout:!0},Le={fullscreen:Number.MIN_SAFE_INTEGER,preventPhoneLayout:Number.MIN_SAFE_INTEGER,properties:Number.MIN_SAFE_INTEGER,timeZones:-1,auto:0,logarithm:1,percentage:2,ext:3,adj:4},Ie=(()=>{const e=new Map;return e.set(Oe,"logarithm"),e.set(We,"percentage"),e.set(Ae,"auto"),e.set(Be,"fullscreen"),e})();function ze(e){0}const Pe={dateRangeMode:"hidden",timeZones:!0,fullscreen:!0,preventPhoneLayout:!0,properties:!0,auto:!0,logarithm:!0,percentage:!0,ext:!0,adj:!0},Fe=Object(C.b)();class Ue extends i.PureComponent{constructor(e,t){var n,s;super(e,t),this._timezoneButtonRef=null,this._layout=Object.assign({},Pe),this._raf=null,this._toolbar=null,this._rangeExpanded=null,this._rangeCollapsed=null,this._seriesComponents={},this._injector=(n=()=>this._layout,s=(e,t)=>this._seriesComponents[t]=e,(e,t,a)=>{if(i.isValidElement(e)&&"string"!=typeof e.type){const{props:o}=e;if("string"==typeof o.className){const r={className:c(o.className,0===t&&Re.first,t===a.length-1&&Re.last)},l=n(),h=Object(f.ensureDefined)(Ie.get(e.type));return i.createElement("div",{key:null===e.key?void 0:e.key,className:c(Re.inline,l[h]&&Re.collapsed),ref:e=>s(e,h),onClick:()=>ze()},i.cloneElement(e,r))}}return e}),this._handleResize=()=>{null===this._raf&&(this._raf=requestAnimationFrame(()=>{const e=this._layout,t=Object(f.ensureNotNull)(this._toolbar),n=Object(f.ensureNotNull)(this._rangeExpanded),i=(s=function(e){const t={};return Object.keys(e).forEach(n=>{const i=e[n];if(null!==i){const e=a.findDOMNode(i);null!==e&&(t[n]=e)}}),t}(this._seriesComponents),Object.keys(s).map(e=>({name:e,width:s[e].offsetWidth})).sort((e,t)=>Le[e.name]-Le[t.name]));var s -;const o=t.offsetWidth,r=i.reduce((e,t)=>e+t.width,0),l=n.offsetWidth,c=!Boolean(n.textContent)||o-r-l<=0?"collapsed":"expanded";if(Object.assign(e,{dateRangeMode:c}),"expanded"!==c){const t=o-Object(f.ensureNotNull)(this._rangeCollapsed).offsetWidth-0;let n=0,s=0;for(const a of i)n+=a.width,a.name in De?(s+=a.width,Object.assign(e,{[a.name]:!1})):Object.assign(e,{[a.name]:t<=n});t<=s&&Object.assign(e,{dateRangeMode:"hidden"})}else Object.assign(e,{timeZones:!1,fullscreen:!1,preventPhoneLayout:!1,properties:!1,auto:!1,logarithm:!1,percentage:!1,ext:!1,adj:!1});this._applyResizing(),this._raf=null}))},this._handleTimezoneButtonRef=e=>{this._timezoneButtonRef=e},this._handleMeasure=()=>{null!==this._toolbar&&this.resizeUI()},this._handleFullscreenableChange=e=>{this._setStateWithResize({isFullscreenable:e})},this._handlePreventPhoneLayoutButtonVisibility=()=>{0},this._handleToolbarRef=e=>this._toolbar=e,this._handleRangeCollapsedRef=e=>this._rangeCollapsed=e,this._handleRangeExpandedRef=e=>this._rangeExpanded=e,this._handleTimeZonesRef=e=>{this._seriesComponents.timeZones=e},Object(C.c)(t,{onContentBoxChanged:l.any.isRequired,chartApiInstance:l.any.isRequired,chartWidget:l.any.isRequired,chartWidgetCollection:l.any.isRequired,resizerDetacher:l.any.isRequired});const{resizerDetacher:o}=this.context;this.state={isFullscreenable:o.fullscreenable.value(),isPreventPhoneLayoutButton:this._isPreventPhoneLayoutButton()}}componentDidMount(){const{onContentBoxChanged:e,resizerDetacher:t,chartWidgetCollection:n,chartWidget:i}=this.context;e.subscribe(this,this._handleResize),t.fullscreenable.subscribe(this._handleFullscreenableChange),this.updateTimezonesButton(),this.resizeUI()}componentWillUnmount(){const{onContentBoxChanged:e,resizerDetacher:t,chartWidgetCollection:n,chartWidget:i}=this.context;e.unsubscribe(this,this._handleResize),t.fullscreenable.unsubscribe(this._handleFullscreenableChange),null!==this._raf&&(cancelAnimationFrame(this._raf),this._raf=null)}render(){const e=this._layout;return i.createElement("div",{className:Re.toolbar,ref:this._handleToolbarRef,onContextMenu:xe.a},this.props.timeFramesWidgetEnabled&&i.createElement(ye.a,null,i.createElement("div",{className:c(Re.dateRangeWrapper,"collapsed"!==e.dateRangeMode&&Re.collapsed),ref:this._handleRangeCollapsedRef},i.createElement("div",{className:c(Re.dateRangeCollapsed)},i.createElement(z,{goToDateButton:this.props.goToDateEnabled}))),i.createElement(h,{onMeasure:this._handleMeasure},i.createElement("div",{className:c(Re.dateRangeWrapper,"expanded"!==e.dateRangeMode&&Re.collapsed),ref:this._handleRangeExpandedRef},i.createElement("div",{className:c(Re.dateRangeExpanded)},i.createElement(V,null),this.props.goToDateEnabled&&i.createElement(pe,null),this.props.goToDateEnabled&&i.createElement(ne,null))))),i.createElement("div",{className:Re.seriesControlWrapper},this.props.timeWidgetEnabled&&i.createElement(h,{onMeasure:this._handleMeasure},i.createElement("div",{className:c(Re.inline,e.timeZones&&Re.collapsed),ref:this._handleTimeZonesRef},i.createElement("div",{ -className:Re.inline,onClick:this._trackTimezonesButtonClick},i.createElement(me,{className:Re.timezone,withMenu:this.props.timezoneMenuEnabled,ref:this._handleTimezoneButtonRef})),i.createElement("div",{className:Re.inline},i.createElement(pe,null)))),i.createElement(ye.a,{map:this._injector},!1,!1,this.props.percentageScaleButtonEnabled&&!d.enabled("fundamental_widget")&&i.createElement(We,{className:Re.icon}),this.props.logScaleButtonEnabled&&i.createElement(Oe,{className:Re.item}),this.props.autoScaleButtonEnabled&&i.createElement(Ae,{className:Re.item}),this.props.fullscreenButtonEnabled&&this.state.isFullscreenable&&i.createElement(Be,{className:Re.icon,mobileChangeLayoutEnabled:this.props.mobileChangeLayoutEnabled}),!1)))}updateTimezonesButton(){null!==this._timezoneButtonRef&&this._timezoneButtonRef.updateTimezonesButton()}resizeUI(){this._handleResize()}_updateButtonsVisibility(){0}_trackTimezonesButtonClick(){ze()}_setStateWithResize(e){Object.assign(this._layout,Pe),this._applyResizing(),this.setState(e,()=>this._handleResize())}_applyResizing(){const e=this._layout,{dateRangeMode:t}=e,n=Object(o.a)(e,["dateRangeMode"]);this._rangeExpanded&&this._rangeExpanded.classList.toggle(Re.collapsed,"expanded"!==t),this._rangeCollapsed&&this._rangeCollapsed.classList.toggle(Re.collapsed,"collapsed"!==t),Object.keys(n).forEach(e=>{const t=e,i=this._seriesComponents[t];i&&i.classList.toggle(Re.collapsed,n[t])})}_isPreventPhoneLayoutButton(){return!1}}Ue.contextType=Fe;const He={onContentBoxChanged:l.any,computeContentBox:l.any,chartWidget:l.any,chartApiInstance:l.any,chartWidgetCollection:l.any,resizerDetacher:l.any,availableTimeFrames:l.any};class qe extends i.PureComponent{constructor(e){super(e),this._setActiveChart=e=>{this._defineRegistry(e),this.setState({chartWidget:e})};const t=this.props.chartWidgetCollection.activeChartWidget.value();this.state={chartWidget:t},this._defineRegistry(t)}componentDidMount(){this.props.chartWidgetCollection.activeChartWidget.subscribe(this._setActiveChart)}componentWillUnmount(){this.props.chartWidgetCollection.activeChartWidget.unsubscribe(this._setActiveChart)}render(){const{chartWidget:e}=this.state;if(!e)return null;const{options:t}=this.props,n={timeFramesWidgetEnabled:t.timeFramesWidgetEnabled,goToDateEnabled:t.timeFramesWidget.goToDateEnabled,timeWidgetEnabled:t.timeWidgetEnabled,timezoneMenuEnabled:t.timeWidget&&t.timeWidget.timezoneMenuEnabled,extendedHoursButtonEnabled:t.extendedHoursButtonEnabled,adjustForDividendsButtonEnabled:t.adjustForDividendsButtonEnabled,logScaleButtonEnabled:t.logScaleButtonEnabled,percentageScaleButtonEnabled:t.percentageScaleButtonEnabled,autoScaleButtonEnabled:t.autoScaleButtonEnabled,fullscreenButtonEnabled:t.fullscreenButtonEnabled,mobileChangeLayoutEnabled:t.mobileChangeLayoutEnabled};return i.createElement(C.a,{validation:He,value:this._registry},i.createElement(Ue,Object.assign({key:e.id()},n)))}_defineRegistry(e){ -const{onContentBoxChanged:t,computeContentBox:n,chartApiInstance:i,chartWidgetCollection:s,options:{timeFramesWidgetEnabled:a,timeFramesWidget:o}}=this.props,r=a?o.availableTimeFrames:void 0;this._registry={onContentBoxChanged:t,computeContentBox:n,chartWidget:e,availableTimeFrames:r,chartApiInstance:i,chartWidgetCollection:s,resizerDetacher:e.getResizerDetacher()}}}n.d(t,"BottomToolbarRenderer",(function(){return Ke}));class Ke{constructor(e,t,n,s,o,r,l){this._container=e;const c=i.createElement(qe,{onContentBoxChanged:t,computeContentBox:n,chartWidgetCollection:s,chartApiInstance:o,chartWidgetOptions:r,options:l});a.render(c,e),e.setAttribute("data-initialized","true")}destroy(){a.unmountComponentAtNode(this._container),this._container.removeAttribute("data-initialized")}}},N5tr:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return g}));var i=n("mrSG"),s=n("q1tI"),a=n.n(s),o=n("TSYQ"),r=n("tWVy"),l=n("JWMC"),c=n("ijHL"),h=n("v1bN");const d=h;function u(e){const{reference:t}=e,n=Object(i.a)(e,["reference"]),s=Object.assign(Object.assign({},n),{ref:t});return a.a.createElement(e.href?"a":"div",s)}function m(e){e.stopPropagation()}function g(e){const{id:t,role:n,"aria-selected":i,className:d,title:g,labelRowClassName:p,labelClassName:b,shortcut:v,forceShowShortcuts:f,icon:_,isActive:C,isDisabled:S,isHovered:E,appearAsDisabled:y,label:x,link:w,showToolboxOnHover:N,target:R,toolbox:k,reference:O,onMouseOut:T,onMouseOver:M,theme:A=h}=e,W=Object(c.b)(e),j=Object(s.useRef)(null);return a.a.createElement(u,Object.assign({},W,{id:t,role:n,"aria-selected":i,className:o(d,A.item,_&&A.withIcon,{[A.isActive]:C,[A.isDisabled]:S||y,[A.hovered]:E}),title:g,href:w,target:R,reference:function(e){j.current=e,"function"==typeof O&&O(e);"object"==typeof O&&(O.current=e)},onClick:function(t){const{dontClosePopup:n,onClick:i,onClickArg:s,trackEventObject:a}=e;if(S)return;a&&Object(l.trackEvent)(a.category,a.event,a.label);i&&i(s,t);n||Object(r.b)()},onContextMenu:function(t){const{trackEventObject:n,trackRightClick:i}=e;n&&i&&Object(l.trackEvent)(n.category,n.event,n.label+"_rightClick")},onMouseUp:function(t){const{trackEventObject:n,trackMouseWheelClick:i}=e;if(1===t.button&&w&&n){let e=n.label;i&&(e+="_mouseWheelClick"),Object(l.trackEvent)(n.category,n.event,e)}},onMouseOver:M,onMouseOut:T}),void 0!==_&&a.a.createElement("div",{className:A.icon,dangerouslySetInnerHTML:{__html:_}}),a.a.createElement("div",{className:o(A.labelRow,p)},a.a.createElement("div",{className:o(A.label,b)},x)),(void 0!==v||f)&&a.a.createElement("div",{className:A.shortcut},(B=v)&&B.split("+").join(" + ")),void 0!==k&&a.a.createElement("div",{onClick:m,className:o(A.toolbox,{[A.showOnHover]:N})},k));var B}},NOPy:function(e,t,n){e.exports={separator:"separator-eqcGT_ow",small:"small-eqcGT_ow",normal:"normal-eqcGT_ow",large:"large-eqcGT_ow"}},O7m7:function(e,t,n){},"PP+v":function(e,t,n){e.exports={toolbar:"toolbar-2yU8ifXU",dateRangeWrapper:"dateRangeWrapper-2yU8ifXU",seriesControlWrapper:"seriesControlWrapper-2yU8ifXU", -dateRangeExpanded:"dateRangeExpanded-2yU8ifXU",dateRangeCollapsed:"dateRangeCollapsed-2yU8ifXU",item:"item-2yU8ifXU",first:"first-2yU8ifXU",last:"last-2yU8ifXU",inline:"inline-2yU8ifXU",timezone:"timezone-2yU8ifXU",icon:"icon-2yU8ifXU",hidden:"hidden-2yU8ifXU",collapsed:"collapsed-2yU8ifXU"}},"R4+T":function(e,t){e.exports=''},R5JZ:function(e,t,n){"use strict";function i(e,t,n,i,s){function a(s){if(e>s.timeStamp)return;const a=s.target;void 0!==n&&null!==t&&null!==a&&a.ownerDocument===i&&(t.contains(a)||n(s))}return s.click&&i.addEventListener("click",a,!1),s.mouseDown&&i.addEventListener("mousedown",a,!1),s.touchEnd&&i.addEventListener("touchend",a,!1),s.touchStart&&i.addEventListener("touchstart",a,!1),()=>{i.removeEventListener("click",a,!1),i.removeEventListener("mousedown",a,!1),i.removeEventListener("touchend",a,!1),i.removeEventListener("touchstart",a,!1)}}n.d(t,"a",(function(){return i}))},RZ2Z:function(e,t,n){e.exports={slider:"slider-3GYrNsPp",inner:"inner-3GYrNsPp"}},"T4/F":function(e,t){e.exports=''},URQ3:function(e,t,n){e.exports={button:"button-2pZNJ24z",hover:"hover-2pZNJ24z",inner:"inner-2pZNJ24z"}},"W9Y+":function(e,t,n){e.exports={item:"item-3SbREAgE",hover:"hover-3SbREAgE",isActive:"isActive-3SbREAgE",isFirst:"isFirst-3SbREAgE",isLast:"isLast-3SbREAgE"}},XXQ5:function(e,t,n){e.exports={item:"item-1-SF84yU",emptyIcons:"emptyIcons-1-SF84yU",loading:"loading-1-SF84yU",disabled:"disabled-1-SF84yU",interactive:"interactive-1-SF84yU",hovered:"hovered-1-SF84yU",icon:"icon-1-SF84yU",label:"label-1-SF84yU",fullWidth:"fullWidth-1-SF84yU",title:"title-1-SF84yU",nested:"nested-1-SF84yU",shortcut:"shortcut-1-SF84yU",remove:"remove-1-SF84yU"}},XiJV:function(e,t,n){e.exports={separator:"separator-3No0pWrk"}},Xy1d:function(e,t){e.exports=''},Xzy5:function(e,t){e.exports=''},YZ9j:function(e){e.exports=JSON.parse('{"loader":"loader-8x1ZxRwP","item":"item-2-89r_cd","tv-button-loader":"tv-button-loader-23vqS1uY","black":"black-20Ytsf0V","white":"white-1ucCcc2I","gray":"gray-XDhHSS-T","loader-initial":"loader-initial-1deQDeio","loader-appear":"loader-appear-2krFtMrd"}')},c7H2:function(e,t,n){e.exports={button:"button-yLOygoSG",hover:"hover-yLOygoSG",icon:"icon-yLOygoSG"}},ijHL:function(e,t,n){"use strict";function i(e){return a(e,o)}function s(e){return a(e,r) -}function a(e,t){const n=Object.entries(e).filter(t),i={};for(const[s,a]of n)i[s]=a;return i}function o(e){const[t,n]=e;return 0===t.indexOf("data-")&&"string"==typeof n}function r(e){return 0===e[0].indexOf("aria-")}n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return s}))},l4ku:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var i=n("q1tI"),s=n.n(i),a=n("TSYQ"),o=n("Iivm"),r=n("6KyJ"),l=n("J+f8"),c=n("w+Rv"),h=n("Xy1d"),d=n("Xzy5"),u=n("20PO"),m=n("XXQ5");function g(e){const{isTitle:t,isLoading:n,isHovered:g,active:p,checkable:b,disabled:v,checked:f,icon:_,iconChecked:C,hint:S,subItems:E,label:y,onClick:x,children:w,toolbox:N,fullWidthLabel:R}=e,k=Object(i.useContext)(l.a),O=!!E.length;return n?s.a.createElement("li",{className:a(m.item,m.loading)},s.a.createElement(r.a,{color:"gray"})):s.a.createElement("li",{className:a(m.item,m.interactive,t&&m.title,v&&m.disabled,g&&m.hovered,p&&m.active,k&&m.emptyIcons),onClick:x},s.a.createElement(o.a,{className:a(m.icon),icon:function(){if(b&&f)return C||_||h;return _}()}),s.a.createElement("span",{className:a(m.label,R&&m.fullWidth)},y),!!N&&s.a.createElement(o.a,{onClick:function(){N&&N.action()},className:m.remove,icon:u}),!O&&S&&s.a.createElement(c.a,{className:m.shortcut,text:S}),O&&s.a.createElement(o.a,{className:m.nested,icon:d}),w)}},nPPD:function(e,t,n){"use strict";function i(e,t,n={}){const i=Object.assign({},t);for(const s of Object.keys(t)){const a=n[s]||s;a in e&&(i[s]=[e[a],t[s]].join(" "))}return i}function s(e,t,n={}){return Object.assign({},e,i(e,t,n))}n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return s}))},qSb5:function(e,t,n){e.exports={sliderRow:"sliderRow-1emAA4_D"}},ul7r:function(e,t){e.exports=''},v1bN:function(e,t,n){e.exports={"tablet-small-breakpoint":"screen and (max-width: 428px)",item:"item-2IihgTnv",hovered:"hovered-2IihgTnv",isDisabled:"isDisabled-2IihgTnv",isActive:"isActive-2IihgTnv",shortcut:"shortcut-2IihgTnv",toolbox:"toolbox-2IihgTnv",withIcon:"withIcon-2IihgTnv",icon:"icon-2IihgTnv",labelRow:"labelRow-2IihgTnv",label:"label-2IihgTnv",showOnHover:"showOnHover-2IihgTnv"}},"w+Rv":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("q1tI"),s=n("TSYQ"),a=n.n(s),o=n("ycgn");function r(e){const{text:t="",className:n}=e;return i.createElement("span",{className:a()(o.shortcut,n)},t)}},"x0D+":function(e,t,n){var i,s,a;s=[t],void 0===(a="function"==typeof(i=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t{const e=this.context.chartWidget.model(),t=Object(f.ensureNotNull)(this.state.series),n=t.priceScale(),i=n.mode();t.priceScale().isLockScale()||e.setPriceScaleMode({log:!i.log},n,window.t("Toggle Log Scale"))},Object(C.c)(t,{chartWidget:l.any.isRequired}),this.state={isActive:!1,series:null},this._priceAxisHighlighter=new fe(this.context.chartWidget,()=>this._priceScale,"logarithm")}componentDidMount(){const e=this.context.chartWidget;e.withModel(null,()=>{const t=e.model().mainSeries(),n=t.priceScale();this._handleMainSeriesPriceScaleChanged(n),t.priceScaleChanged().subscribe(this,this._handleMainSeriesPriceScaleChanged),this._handleModeChanged({},n.mode()),this.setState({isActive:t.priceScale().isLog(),series:t})})}componentWillUnmount(){const e=this.context.chartWidget;e.withModel(null,()=>{e.model().mainSeries().priceScaleChanged().unsubscribe(this,this._handleMainSeriesPriceScaleChanged)}),null!==this._priceScale&&(this._priceScale.modeChanged().unsubscribeAll(this),this._priceScale=null),this._priceAxisHighlighter.destroy()}render(){const{className:e}=this.props,{isActive:t,series:n}=this.state;return i.createElement(Te,Object.assign({},this._priceAxisHighlighter.handlers(),{className:e,isLogarithm:t,isDisabled:null===n,onClick:this._handleSelect}))}_handleMainSeriesPriceScaleChanged(e){null!==this._priceScale&&this._priceScale.modeChanged().unsubscribe(this,this._handleModeChanged),this._priceScale=e,this._priceScale.modeChanged().subscribe(this,this._handleModeChanged),this._handleModeChanged({},e.mode())}_handleModeChanged(e,t){Boolean(t.log)!==this.state.isActive&&this.setState({isActive:Boolean(t.log)})}}).contextType=_e,Me);var Te,Me;const Ae=function(e){var t;return(t=class extends i.PureComponent{constructor(e,t){super(e,t),this._priceScale=null,this._handleSelect=()=>{const e=this.context.chartWidget.model(),t=Object(f.ensureNotNull)(this.state.series).priceScale(),n=t.mode();e.setPriceScaleMode({autoScale:!n.autoScale},t,window.t("Toggle Auto Scale"))},Object(C.c)(t,{chartWidget:l.any.isRequired}),this.state={isActive:!1,series:null},this._priceAxisHighlighter=new fe(this.context.chartWidget,()=>this._priceScale,"auto")}componentDidMount(){const e=this.context.chartWidget;e.withModel(null,()=>{const t=e.model().mainSeries(),n=t.priceScale();this._handleMainSeriesPriceScaleChanged(n),t.priceScaleChanged().subscribe(this,this._handleMainSeriesPriceScaleChanged),this._handleModeChanged({},n.mode()),this.setState({isActive:t.priceScale().isAutoScale(),series:t})})}componentWillUnmount(){const e=this.context.chartWidget;e.withModel(null,()=>{e.model().mainSeries().priceScaleChanged().unsubscribe(this,this._handleMainSeriesPriceScaleChanged)}),null!==this._priceScale&&(this._priceScale.modeChanged().unsubscribeAll(this),this._priceScale=null),this._priceAxisHighlighter.destroy()}render(){ +const{className:t}=this.props,{isActive:n,series:s}=this.state;return i.createElement(e,Object.assign({},this._priceAxisHighlighter.handlers(),{className:t,isAuto:n,isDisabled:null===s,onClick:this._handleSelect}))}_handleMainSeriesPriceScaleChanged(e){null!==this._priceScale&&this._priceScale.modeChanged().unsubscribe(this,this._handleModeChanged),this._priceScale=e,this._priceScale.modeChanged().subscribe(this,this._handleModeChanged),this._handleModeChanged({},e.mode())}_handleModeChanged(e,t){Boolean(t.autoScale)!==this.state.isActive&&this.setState({isActive:Boolean(t.autoScale)})}}).contextType=Ce,t}(e=>i.createElement(be.b,{text:ke.autoLabel,title:ke.autoHint,className:e.className,isActive:e.isAuto,isGrouped:!0,onClick:e.onClick,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,"data-name":"auto"})),We=function(e){var t;return(t=class extends i.PureComponent{constructor(e,t){super(e,t),this._priceScale=null,this._handleSelect=()=>{const e=this.context.chartWidget.model(),t=Object(f.ensureNotNull)(this.state.series),n=t.priceScale(),i=n.mode();t.priceScale().isLockScale()||e.setPriceScaleMode({percentage:!i.percentage},n,window.t("Toggle Percentage Scale"))},Object(C.c)(t,{chartWidget:l.any.isRequired}),this.state={isActive:!1,series:null},this._priceAxisHighlighter=new fe(this.context.chartWidget,()=>this._priceScale,"percentage")}componentDidMount(){const e=this.context.chartWidget;e.withModel(null,()=>{const t=e.model().mainSeries(),n=t.priceScale();this._handleMainSeriesPriceScaleChanged(n),t.priceScaleChanged().subscribe(this,this._handleMainSeriesPriceScaleChanged),this._handleScaleChange({},n.mode()),this.setState({isActive:t.priceScale().isPercentage(),series:t})})}componentWillUnmount(){const e=this.context.chartWidget;e.withModel(null,()=>{e.model().mainSeries().priceScaleChanged().unsubscribe(this,this._handleMainSeriesPriceScaleChanged)}),null!==this._priceScale&&(this._priceScale.modeChanged().unsubscribeAll(this),this._priceScale=null),this._priceAxisHighlighter.destroy()}render(){const{className:t}=this.props,{isActive:n,series:s}=this.state;return i.createElement(e,Object.assign({},this._priceAxisHighlighter.handlers(),{className:t,isPercentage:n,isDisabled:null===s,onClick:this._handleSelect}))}_handleMainSeriesPriceScaleChanged(e){null!==this._priceScale&&this._priceScale.modeChanged().unsubscribe(this,this._handleScaleChange),this._priceScale=e,this._priceScale.modeChanged().subscribe(this,this._handleScaleChange),this._handleScaleChange({},e.mode())}_handleScaleChange(e,t){Boolean(t.percentage)!==this.state.isActive&&this.setState({isActive:Boolean(t.percentage)})}}).contextType=Se,t}(e=>i.createElement(be.b,{icon:we,title:ke.percentageHint,className:e.className,isActive:e.isPercentage,isDisabled:e.isDisabled,isGrouped:!0,onClick:e.onClick,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,"data-name":"percentage"}));const je=Object(Z.b)({keys:["Alt","Enter"],text:"{0} + {1}"}),Be=function(e){var t;return(t=class extends i.PureComponent{constructor(e,t){super(e,t), +this._handleClick=e=>{const{resizerDetacher:t,chartWidgetCollection:n}=this.context;e.shiftKey&&t.detachable.value()?t.detach():this.state.isFullscreen?t.exitFullscreen():t.requestFullscreen()},this._handleLayoutChange=e=>{this.setState({isFullscreen:e})},this._handlePhoneSize=()=>{0},Object(C.c)(t,{chartWidgetCollection:l.any.isRequired,resizerDetacher:l.any.isRequired});const{resizerDetacher:n}=t;this.state={isFullscreen:n.fullscreen.value(),isChangeLayoutButton:this._isChangeLayoutButton()}}componentDidMount(){const{resizerDetacher:e,chartWidgetCollection:t}=this.context,{mobileChangeLayoutEnabled:n}=this.props;e.fullscreen.subscribe(this._handleLayoutChange)}componentWillUnmount(){const{resizerDetacher:e,chartWidgetCollection:t}=this.context,{mobileChangeLayoutEnabled:n}=this.props;e.fullscreen.unsubscribe(this._handleLayoutChange)}render(){const{className:t}=this.props,{isFullscreen:n,isChangeLayoutButton:s}=this.state;return i.createElement(e,{className:t,isFullscreen:n,onClick:this._handleClick})}_isChangeLayoutButton(){return!1}}).contextType=Ee,t}(e=>i.createElement(be.b,{icon:Ne,title:ke.fullscreenHint,className:e.className,isActive:e.isFullscreen,onClick:e.onClick,"data-tooltip-hotkey":je,"data-name":"fullscreen"})),De={properties:!0,fullscreen:!0,preventPhoneLayout:!0},Le={fullscreen:Number.MIN_SAFE_INTEGER,preventPhoneLayout:Number.MIN_SAFE_INTEGER,properties:Number.MIN_SAFE_INTEGER,timeZones:-1,auto:0,logarithm:1,percentage:2,ext:3,adj:4},Ie=(()=>{const e=new Map;return e.set(Oe,"logarithm"),e.set(We,"percentage"),e.set(Ae,"auto"),e.set(Be,"fullscreen"),e})();function ze(e){0}const Pe={dateRangeMode:"hidden",timeZones:!0,fullscreen:!0,preventPhoneLayout:!0,properties:!0,auto:!0,logarithm:!0,percentage:!0,ext:!0,adj:!0},Fe=Object(C.b)();class Ue extends i.PureComponent{constructor(e,t){var n,s;super(e,t),this._timezoneButtonRef=null,this._layout=Object.assign({},Pe),this._raf=null,this._toolbar=null,this._rangeExpanded=null,this._rangeCollapsed=null,this._seriesComponents={},this._injector=(n=()=>this._layout,s=(e,t)=>this._seriesComponents[t]=e,(e,t,a)=>{if(i.isValidElement(e)&&"string"!=typeof e.type){const{props:o}=e;if("string"==typeof o.className){const r={className:c(o.className,0===t&&Re.first,t===a.length-1&&Re.last)},l=n(),h=Object(f.ensureDefined)(Ie.get(e.type));return i.createElement("div",{key:null===e.key?void 0:e.key,className:c(Re.inline,l[h]&&Re.collapsed),ref:e=>s(e,h),onClick:()=>ze()},i.cloneElement(e,r))}}return e}),this._handleResize=()=>{null===this._raf&&(this._raf=requestAnimationFrame(()=>{const e=this._layout,t=Object(f.ensureNotNull)(this._toolbar),n=Object(f.ensureNotNull)(this._rangeExpanded),i=(s=function(e){const t={};return Object.keys(e).forEach(n=>{const i=e[n];if(null!==i){const e=a.findDOMNode(i);null!==e&&(t[n]=e)}}),t}(this._seriesComponents),Object.keys(s).map(e=>({name:e,width:s[e].offsetWidth})).sort((e,t)=>Le[e.name]-Le[t.name]));var s;const o=t.offsetWidth,r=i.reduce((e,t)=>e+t.width,0),l=n.offsetWidth,c=!Boolean(n.textContent)||o-r-l<=0?"collapsed":"expanded" +;if(Object.assign(e,{dateRangeMode:c}),"expanded"!==c){const t=o-Object(f.ensureNotNull)(this._rangeCollapsed).offsetWidth-0;let n=0,s=0;for(const a of i)n+=a.width,a.name in De?(s+=a.width,Object.assign(e,{[a.name]:!1})):Object.assign(e,{[a.name]:t<=n});t<=s&&Object.assign(e,{dateRangeMode:"hidden"})}else Object.assign(e,{timeZones:!1,fullscreen:!1,preventPhoneLayout:!1,properties:!1,auto:!1,logarithm:!1,percentage:!1,ext:!1,adj:!1});this._applyResizing(),this._raf=null}))},this._handleTimezoneButtonRef=e=>{this._timezoneButtonRef=e},this._handleMeasure=()=>{null!==this._toolbar&&this.resizeUI()},this._handleFullscreenableChange=e=>{this._setStateWithResize({isFullscreenable:e})},this._handlePreventPhoneLayoutButtonVisibility=()=>{0},this._handleToolbarRef=e=>this._toolbar=e,this._handleRangeCollapsedRef=e=>this._rangeCollapsed=e,this._handleRangeExpandedRef=e=>this._rangeExpanded=e,this._handleTimeZonesRef=e=>{this._seriesComponents.timeZones=e},Object(C.c)(t,{onContentBoxChanged:l.any.isRequired,chartApiInstance:l.any.isRequired,chartWidget:l.any.isRequired,chartWidgetCollection:l.any.isRequired,resizerDetacher:l.any.isRequired});const{resizerDetacher:o}=this.context;this.state={isFullscreenable:o.fullscreenable.value(),isPreventPhoneLayoutButton:this._isPreventPhoneLayoutButton()}}componentDidMount(){const{onContentBoxChanged:e,resizerDetacher:t,chartWidgetCollection:n,chartWidget:i}=this.context;e.subscribe(this,this._handleResize),t.fullscreenable.subscribe(this._handleFullscreenableChange),this.updateTimezonesButton(),this.resizeUI()}componentWillUnmount(){const{onContentBoxChanged:e,resizerDetacher:t,chartWidgetCollection:n,chartWidget:i}=this.context;e.unsubscribe(this,this._handleResize),t.fullscreenable.unsubscribe(this._handleFullscreenableChange),null!==this._raf&&(cancelAnimationFrame(this._raf),this._raf=null)}render(){const e=this._layout;return i.createElement("div",{className:Re.toolbar,ref:this._handleToolbarRef,onContextMenu:xe.a},this.props.timeFramesWidgetEnabled&&i.createElement(ye.a,null,i.createElement("div",{className:c(Re.dateRangeWrapper,"collapsed"!==e.dateRangeMode&&Re.collapsed),ref:this._handleRangeCollapsedRef},i.createElement("div",{className:c(Re.dateRangeCollapsed)},i.createElement(z,{goToDateButton:this.props.goToDateEnabled}))),i.createElement(h,{onMeasure:this._handleMeasure},i.createElement("div",{className:c(Re.dateRangeWrapper,"expanded"!==e.dateRangeMode&&Re.collapsed),ref:this._handleRangeExpandedRef},i.createElement("div",{className:c(Re.dateRangeExpanded)},i.createElement(V,null),this.props.goToDateEnabled&&i.createElement(pe,null),this.props.goToDateEnabled&&i.createElement(ne,null))))),i.createElement("div",{className:Re.seriesControlWrapper},this.props.timeWidgetEnabled&&i.createElement(h,{onMeasure:this._handleMeasure},i.createElement("div",{className:c(Re.inline,e.timeZones&&Re.collapsed),ref:this._handleTimeZonesRef},i.createElement("div",{className:Re.inline,onClick:this._trackTimezonesButtonClick},i.createElement(me,{className:Re.timezone, +withMenu:this.props.timezoneMenuEnabled,ref:this._handleTimezoneButtonRef})),i.createElement("div",{className:Re.inline},i.createElement(pe,null)))),i.createElement(ye.a,{map:this._injector},!1,!1,this.props.percentageScaleButtonEnabled&&!d.enabled("fundamental_widget")&&i.createElement(We,{className:Re.icon}),this.props.logScaleButtonEnabled&&i.createElement(Oe,{className:Re.item}),this.props.autoScaleButtonEnabled&&i.createElement(Ae,{className:Re.item}),this.props.fullscreenButtonEnabled&&this.state.isFullscreenable&&i.createElement(Be,{className:Re.icon,mobileChangeLayoutEnabled:this.props.mobileChangeLayoutEnabled}),!1)))}updateTimezonesButton(){null!==this._timezoneButtonRef&&this._timezoneButtonRef.updateTimezonesButton()}resizeUI(){this._handleResize()}_updateButtonsVisibility(){0}_trackTimezonesButtonClick(){ze()}_setStateWithResize(e){Object.assign(this._layout,Pe),this._applyResizing(),this.setState(e,()=>this._handleResize())}_applyResizing(){const e=this._layout,{dateRangeMode:t}=e,n=Object(o.a)(e,["dateRangeMode"]);this._rangeExpanded&&this._rangeExpanded.classList.toggle(Re.collapsed,"expanded"!==t),this._rangeCollapsed&&this._rangeCollapsed.classList.toggle(Re.collapsed,"collapsed"!==t),Object.keys(n).forEach(e=>{const t=e,i=this._seriesComponents[t];i&&i.classList.toggle(Re.collapsed,n[t])})}_isPreventPhoneLayoutButton(){return!1}}Ue.contextType=Fe;const He={onContentBoxChanged:l.any,computeContentBox:l.any,chartWidget:l.any,chartApiInstance:l.any,chartWidgetCollection:l.any,resizerDetacher:l.any,availableTimeFrames:l.any};class qe extends i.PureComponent{constructor(e){super(e),this._setActiveChart=e=>{this._defineRegistry(e),this.setState({chartWidget:e})};const t=this.props.chartWidgetCollection.activeChartWidget.value();this.state={chartWidget:t},this._defineRegistry(t)}componentDidMount(){this.props.chartWidgetCollection.activeChartWidget.subscribe(this._setActiveChart)}componentWillUnmount(){this.props.chartWidgetCollection.activeChartWidget.unsubscribe(this._setActiveChart)}render(){const{chartWidget:e}=this.state;if(!e)return null;const{options:t}=this.props,n={timeFramesWidgetEnabled:t.timeFramesWidgetEnabled,goToDateEnabled:t.timeFramesWidget.goToDateEnabled,timeWidgetEnabled:t.timeWidgetEnabled,timezoneMenuEnabled:t.timeWidget&&t.timeWidget.timezoneMenuEnabled,extendedHoursButtonEnabled:t.extendedHoursButtonEnabled,adjustForDividendsButtonEnabled:t.adjustForDividendsButtonEnabled,logScaleButtonEnabled:t.logScaleButtonEnabled,percentageScaleButtonEnabled:t.percentageScaleButtonEnabled,autoScaleButtonEnabled:t.autoScaleButtonEnabled,fullscreenButtonEnabled:t.fullscreenButtonEnabled,mobileChangeLayoutEnabled:t.mobileChangeLayoutEnabled};return i.createElement(C.a,{validation:He,value:this._registry},i.createElement(Ue,Object.assign({key:e.id()},n)))}_defineRegistry(e){const{onContentBoxChanged:t,computeContentBox:n,chartApiInstance:i,chartWidgetCollection:s,options:{timeFramesWidgetEnabled:a,timeFramesWidget:o}}=this.props,r=a?o.availableTimeFrames:void 0;this._registry={ +onContentBoxChanged:t,computeContentBox:n,chartWidget:e,availableTimeFrames:r,chartApiInstance:i,chartWidgetCollection:s,resizerDetacher:e.getResizerDetacher()}}}n.d(t,"BottomToolbarRenderer",(function(){return Ke}));class Ke{constructor(e,t,n,s,o,r,l){this._container=e;const c=i.createElement(qe,{onContentBoxChanged:t,computeContentBox:n,chartWidgetCollection:s,chartApiInstance:o,chartWidgetOptions:r,options:l});a.render(c,e),e.setAttribute("data-initialized","true")}destroy(){a.unmountComponentAtNode(this._container),this._container.removeAttribute("data-initialized")}}},N5tr:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return g}));var i=n("mrSG"),s=n("q1tI"),a=n.n(s),o=n("TSYQ"),r=n("tWVy"),l=n("JWMC"),c=n("ijHL"),h=n("v1bN");const d=h;function u(e){const{reference:t}=e,n=Object(i.a)(e,["reference"]),s=Object.assign(Object.assign({},n),{ref:t});return a.a.createElement(e.href?"a":"div",s)}function m(e){e.stopPropagation()}function g(e){const{id:t,role:n,"aria-selected":i,className:d,title:g,labelRowClassName:p,labelClassName:b,shortcut:v,forceShowShortcuts:f,icon:_,isActive:C,isDisabled:S,isHovered:E,appearAsDisabled:y,label:x,link:w,showToolboxOnHover:N,target:R,toolbox:k,reference:O,onMouseOut:T,onMouseOver:M,theme:A=h}=e,W=Object(c.b)(e),j=Object(s.useRef)(null);return a.a.createElement(u,Object.assign({},W,{id:t,role:n,"aria-selected":i,className:o(d,A.item,_&&A.withIcon,{[A.isActive]:C,[A.isDisabled]:S||y,[A.hovered]:E}),title:g,href:w,target:R,reference:function(e){j.current=e,"function"==typeof O&&O(e);"object"==typeof O&&(O.current=e)},onClick:function(t){const{dontClosePopup:n,onClick:i,onClickArg:s,trackEventObject:a}=e;if(S)return;a&&Object(l.trackEvent)(a.category,a.event,a.label);i&&i(s,t);n||Object(r.b)()},onContextMenu:function(t){const{trackEventObject:n,trackRightClick:i}=e;n&&i&&Object(l.trackEvent)(n.category,n.event,n.label+"_rightClick")},onMouseUp:function(t){const{trackEventObject:n,trackMouseWheelClick:i}=e;if(1===t.button&&w&&n){let e=n.label;i&&(e+="_mouseWheelClick"),Object(l.trackEvent)(n.category,n.event,e)}},onMouseOver:M,onMouseOut:T}),void 0!==_&&a.a.createElement("div",{className:A.icon,dangerouslySetInnerHTML:{__html:_}}),a.a.createElement("div",{className:o(A.labelRow,p)},a.a.createElement("div",{className:o(A.label,b)},x)),(void 0!==v||f)&&a.a.createElement("div",{className:A.shortcut},(B=v)&&B.split("+").join(" + ")),void 0!==k&&a.a.createElement("div",{onClick:m,className:o(A.toolbox,{[A.showOnHover]:N})},k));var B}},NOPy:function(e,t,n){e.exports={separator:"separator-eqcGT_ow",small:"small-eqcGT_ow",normal:"normal-eqcGT_ow",large:"large-eqcGT_ow"}},O7m7:function(e,t,n){},"PP+v":function(e,t,n){e.exports={toolbar:"toolbar-2yU8ifXU",dateRangeWrapper:"dateRangeWrapper-2yU8ifXU",seriesControlWrapper:"seriesControlWrapper-2yU8ifXU",dateRangeExpanded:"dateRangeExpanded-2yU8ifXU",dateRangeCollapsed:"dateRangeCollapsed-2yU8ifXU",item:"item-2yU8ifXU",first:"first-2yU8ifXU",last:"last-2yU8ifXU",inline:"inline-2yU8ifXU", +timezone:"timezone-2yU8ifXU",icon:"icon-2yU8ifXU",hidden:"hidden-2yU8ifXU",collapsed:"collapsed-2yU8ifXU"}},"R4+T":function(e,t){e.exports=''},R5JZ:function(e,t,n){"use strict";function i(e,t,n,i,s){function a(s){if(e>s.timeStamp)return;const a=s.target;void 0!==n&&null!==t&&null!==a&&a.ownerDocument===i&&(t.contains(a)||n(s))}return s.click&&i.addEventListener("click",a,!1),s.mouseDown&&i.addEventListener("mousedown",a,!1),s.touchEnd&&i.addEventListener("touchend",a,!1),s.touchStart&&i.addEventListener("touchstart",a,!1),()=>{i.removeEventListener("click",a,!1),i.removeEventListener("mousedown",a,!1),i.removeEventListener("touchend",a,!1),i.removeEventListener("touchstart",a,!1)}}n.d(t,"a",(function(){return i}))},RZ2Z:function(e,t,n){e.exports={slider:"slider-3GYrNsPp",inner:"inner-3GYrNsPp"}},"T4/F":function(e,t){e.exports=''},URQ3:function(e,t,n){e.exports={button:"button-2pZNJ24z",hover:"hover-2pZNJ24z",inner:"inner-2pZNJ24z"}},"W9Y+":function(e,t,n){e.exports={item:"item-3SbREAgE",hover:"hover-3SbREAgE",isActive:"isActive-3SbREAgE",isFirst:"isFirst-3SbREAgE",isLast:"isLast-3SbREAgE"}},XXQ5:function(e,t,n){e.exports={item:"item-1-SF84yU",emptyIcons:"emptyIcons-1-SF84yU",loading:"loading-1-SF84yU",disabled:"disabled-1-SF84yU",interactive:"interactive-1-SF84yU",hovered:"hovered-1-SF84yU",icon:"icon-1-SF84yU",label:"label-1-SF84yU",fullWidth:"fullWidth-1-SF84yU",title:"title-1-SF84yU",nested:"nested-1-SF84yU",shortcut:"shortcut-1-SF84yU",remove:"remove-1-SF84yU"}},XiJV:function(e,t,n){e.exports={separator:"separator-3No0pWrk"}},Xy1d:function(e,t){e.exports=''},Xzy5:function(e,t){e.exports=''},YZ9j:function(e){e.exports=JSON.parse('{"loader":"loader-8x1ZxRwP","item":"item-2-89r_cd","tv-button-loader":"tv-button-loader-23vqS1uY","black":"black-20Ytsf0V","white":"white-1ucCcc2I","gray":"gray-XDhHSS-T","loader-initial":"loader-initial-1deQDeio","loader-appear":"loader-appear-2krFtMrd"}')},c7H2:function(e,t,n){e.exports={button:"button-yLOygoSG",hover:"hover-yLOygoSG",icon:"icon-yLOygoSG"}},ijHL:function(e,t,n){"use strict";function i(e){return a(e,o)}function s(e){return a(e,r)}function a(e,t){const n=Object.entries(e).filter(t),i={};for(const[s,a]of n)i[s]=a;return i}function o(e){const[t,n]=e;return 0===t.indexOf("data-")&&"string"==typeof n}function r(e){ +return 0===e[0].indexOf("aria-")}n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return s}))},l4ku:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var i=n("q1tI"),s=n.n(i),a=n("TSYQ"),o=n("Iivm"),r=n("6KyJ"),l=n("J+f8"),c=n("w+Rv"),h=n("Xy1d"),d=n("Xzy5"),u=n("20PO"),m=n("XXQ5");function g(e){const{isTitle:t,isLoading:n,isHovered:g,active:p,checkable:b,disabled:v,checked:f,icon:_,iconChecked:C,hint:S,subItems:E,label:y,onClick:x,children:w,toolbox:N,fullWidthLabel:R}=e,k=Object(i.useContext)(l.a),O=!!E.length;return n?s.a.createElement("li",{className:a(m.item,m.loading)},s.a.createElement(r.a,{color:"gray"})):s.a.createElement("li",{className:a(m.item,m.interactive,t&&m.title,v&&m.disabled,g&&m.hovered,p&&m.active,k&&m.emptyIcons),onClick:x},s.a.createElement(o.a,{className:a(m.icon),icon:function(){if(b&&f)return C||_||h;return _}()}),s.a.createElement("span",{className:a(m.label,R&&m.fullWidth)},y),!!N&&s.a.createElement(o.a,{onClick:function(){N&&N.action()},className:m.remove,icon:u}),!O&&S&&s.a.createElement(c.a,{className:m.shortcut,text:S}),O&&s.a.createElement(o.a,{className:m.nested,icon:d}),w)}},nPPD:function(e,t,n){"use strict";function i(e,t,n={}){const i=Object.assign({},t);for(const s of Object.keys(t)){const a=n[s]||s;a in e&&(i[s]=[e[a],t[s]].join(" "))}return i}function s(e,t,n={}){return Object.assign({},e,i(e,t,n))}n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return s}))},qSb5:function(e,t,n){e.exports={sliderRow:"sliderRow-1emAA4_D"}},ul7r:function(e,t){e.exports=''},v1bN:function(e,t,n){e.exports={"tablet-small-breakpoint":"screen and (max-width: 428px)",item:"item-2IihgTnv",hovered:"hovered-2IihgTnv",isDisabled:"isDisabled-2IihgTnv",isActive:"isActive-2IihgTnv",shortcut:"shortcut-2IihgTnv",toolbox:"toolbox-2IihgTnv",withIcon:"withIcon-2IihgTnv",icon:"icon-2IihgTnv",labelRow:"labelRow-2IihgTnv",label:"label-2IihgTnv",showOnHover:"showOnHover-2IihgTnv"}},"w+Rv":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("q1tI"),s=n("TSYQ"),a=n.n(s),o=n("ycgn");function r(e){const{text:t="",className:n}=e;return i.createElement("span",{className:a()(o.shortcut,n)},t)}},"x0D+":function(e,t,n){var i,s,a;s=[t],void 0===(a="function"==typeof(i=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);ts||(TradingView.ChartapiMessagerInstances[e].onSeriesTimeframeUpdate(t,c,d,s,r),n&&setTimeout(n,0))}}}if(this._studyEngine.isTimeScaleExtendedTo(e,1e3*i))u();else{ +this._studyEngine.resolveSymbol(i,(function(s){s.errmsg?o(t,s.errmsg):(n._symbolIdCache[n._makeSymbolKey(e,t)]={requestedSymbol:i,symbolInfo:s,status:"ok"},n._fireEvent("symbol_resolved",{symbolInfo:s,symbolId:t,session:e},!0),n._fireEvent(n._makeSymbolKey(e,t)+"_resolved",s),TradingView.ChartapiMessagerInstances[e].onSymbolResolved(t,s))}),(function(e){o(t,e)}))},JSServer.ChartApi.prototype._doWhenSymbolIdIsReady=function(e,t,i){var s=this,r=!0;function n(){r&&(i({requestedSymbol:s._symbolIdCache[s._makeSymbolKey(e,t)].requestedSymbol,symbolInfo:s._symbolIdCache[s._makeSymbolKey(e,t)].symbolInfo}),r=!1,s.unsubscribe(s._makeSymbolKey(e,t)+"_resolved",n),s.unsubscribe(s._makeSymbolKey(e,t)+"_resolve_fail",n))}this._symbolIdCache[this._makeSymbolKey(e,t)]?n():(this.on(this._makeSymbolKey(e,t)+"_resolved",n),this.on(this._makeSymbolKey(e,t)+"_resolve_fail",n))},JSServer.ChartApi.prototype._doWhenSeriesDataReceived=function(e,t){TradingView.ChartapiMessagerInstances[e].seriesCompleted.subscribe(null,t,!0)},JSServer.ChartApi.prototype._doWhenSeriesSymbolIdIsReady=function(e,t,i,s){var r=this,n=this._seriesIdCache[e+"_"+t].symbolId;function o(){var t;i({requestedSymbol:(t=r._symbolIdCache[r._makeSymbolKey(e,n)]).requestedSymbol,symbolInfo:t.symbolInfo})}function a(){r.unsubscribe("symbol_resolved",c),r.unsubscribe("resolve_fail",l)}function l(t){t.symbolId===n&&t.session===e&&(a(),s&&s())}function c(t){t.symbolId===n&&t.session===e&&(a(),o())}this._symbolIdCache[this._makeSymbolKey(e,n)]?o():(this.on("symbol_resolved",c),this.on("resolve_fail",l))},JSServer.ChartApi.prototype.createSeries=function(e,t,i,s,r,n,o,a){i=i||"";var l=this;this._notificationHandlers[e][t]=new c((function(r){"series_completed"===r.method&&null!==o&&(l._applyTimeFrame(e,s,t,i,o),o=null),a(r)}),t),this._seriesIdCache[e+"_"+t]={symbolId:s,resolution:r,timeframe:o,turnaround:i},this._seriesTurnarounds[e][t]=i,this._doWhenSeriesSymbolIdIsReady(e,t,(function(s){l._seriesTurnarounds[e][t]===i&&l._studyEngine.createSeries(s.requestedSymbol,r,e,t,i,{countBack:n||300})}))},JSServer.ChartApi.prototype.removeSeries=function(e,t,i){this._notificationHandlers[e][t]=new c(i,t),this._studyEngine.removeSeries(e,t),_(this._seriesTimers,e,t)},JSServer.ChartApi.prototype.setVisibleTimeRange=function(e,t,i,s,r,n){var o=i,a=!0!==(r=r||{}).applyDefaultRightMargin&&void 0===r.percentRightMargin&&void 0!==s?s:null,l=p(this._studyEngine.getSeriesInterval(e,t),this._studyEngine.getSeriesSymbolInfo(e,t));null!==l&&(o=l.timeToSessionStart(1e3*o)/1e3,null!==a&&(a=l.timeToSessionStart(1e3*a)/1e3));var c=this._seriesIdCache[e+"_"+t].turnaround,h=this;function u(){var i=h._studyEngine.sessionTimeScale(e);if(null!==i){var s,l=i.indexOfTime(1e3*o);if(null===a)s=i.lastSessionBarIndex();else{var u=i.indexOfTime(1e3*a);s=u&&u.index}if(null!==l&&null!==s){var d=l.index;l.timeMs<1e3*o&&(d+=1),d>s||(TradingView.ChartapiMessagerInstances[e].onSeriesTimeframeUpdate(t,c,d,s,r),n&&setTimeout(n,0))}}}if(this._studyEngine.isTimeScaleExtendedTo(e,1e3*i))u();else{ var d=TradingView.ChartapiMessagerInstances[e].seriesCompleted,_=TradingView.ChartapiMessagerInstances[e].seriesError;void 0!==this._setVisibleRangeTimeout[e]&&clearTimeout(this._setVisibleRangeTimeout[e]),this._setVisibleRangeTimeout[e]=setTimeout(function(){delete this._setVisibleRangeTimeout[e],d.subscribe(null,m,!0),_.subscribe(null,f,!0),this._studyEngine.ensureExtendedTo(t,e,1e3*i)}.bind(this),0)}function m(e,i){e===t&&i===c&&(d.unsubscribe(null,m),_.unsubscribe(null,f),u())}function f(e,i){e===t&&i===c&&d.unsubscribe(null,m)}},JSServer.ChartApi.prototype._applyTimeFrame=function(e,t,i,n,o){var a,l;if(o.type===d.PeriodBack){var c=this._studyEngine.getSeriesLastBarTime(e,i);if(null===c)return;l=c/1e3;var h=r.parse(o.value),u=this._symbolIdCache[this._makeSymbolKey(e,t)].symbolInfo;a=s.alignPeriodsBackForVisibleRange(u.session,u.holidays,u.corrections,h.letter(),h.multiplier(),1,c)/1e3;var _=p(this._studyEngine.getSeriesInterval(e,i),u);null!==_&&(l=_.timeToExchangeTradingDay(1e3*l)/1e3,a=_.timeToExchangeTradingDay(1e3*a)/1e3)}else a=o.from,l=o.to;this.setVisibleTimeRange(e,i,a,l,{applyDefaultRightMargin:!0})},JSServer.ChartApi.prototype.modifySeries=function(e,t,i,s,r,n,o,a){i=i||"";var l=this;this._notificationHandlers[e][t]=new c((function(r){"series_completed"===r.method&&null!==n&&(l._applyTimeFrame(e,s,t,i,n),n=null),o(r)}),t),this._seriesTurnarounds[e][t]=i,a&&(this._seriesIdCache[this._makeSeriesKey(e,a)]=null),this._seriesIdCache[this._makeSymbolKey(e,t)]={symbolId:s,resolution:r,turnaround:i},this._doWhenSeriesSymbolIdIsReady(e,t,(function(s){l._studyEngine.modifySeries(e,t,s.requestedSymbol,r,i)}))},JSServer.ChartApi.prototype.requestMoreData=function(e,t){if(this._enabledMoreBarsRequest){var i=this,s=setTimeout((function(){i._studyEngine.extendSeriesRange(e,t)}),0);m(this._seriesTimers,e,"requestMoreData",s)}},JSServer.ChartApi.prototype.setStudiesAccessController=function(e){this.studiesAccessController=e},JSServer.ChartApi.prototype.setWatchlistSettings=function(e){this._watchlistSettings=e},JSServer.ChartApi.prototype.allStudiesMetadata=function(){return this._studyEngine.studiesMetadata()},JSServer.ChartApi.prototype.requestMetadata=function(e,t,i){this._notificationHandlers[e][t]=new c(i,t);var s=this.studiesAccessController.getEnabledTools();TradingView.ChartapiMessagerInstances[e].onRequestMetadata(t,s)},JSServer.ChartApi.prototype.isCanCreateStudy=function(){return this.studyCounter{this._destroyed||this._processPendingSubscribers()},0),s}removeSubscription(e){const t=this._pendingSubscribers.find(t=>t.key===e);if(t)return void this._pendingSubscribers.splice(this._pendingSubscribers.indexOf(t),1);const i=this._subscribers.find(t=>t.key===e);if(i)return this._subscribers.splice(this._subscribers.indexOf(i),1),void(this._subscribers.length||(this._resetCacheTimeout=setTimeout(()=>{this._resetCacheTimeout=null,this._purgeCache(),this._unsubscribeRealtime()},this._resetCacheTimePeriod)));console.warn("Unknown subscription symbol={0}, resolution={1}, key={2}".format(this._symbolInfo.name,this._resolution,e))}_logMessage(e,t){if(a.enabled("charting_library_debug_mode")||t){const t=this._symbolInfo.currency_code,i=this._symbolInfo.unit_id;console.log(`FEED [${this._symbolInfo.name}|${this._resolution}${t?"|"+t:""}${i?"|"+i:""}]: ${e}`)}}_clearResetCacheTimeout(){null!==this._resetCacheTimeout&&(clearTimeout(this._resetCacheTimeout),this._resetCacheTimeout=null)}_purgeCache(){this._logMessage("Reset cache"),this._cache={bars:[]},this._errorMessage=null,this._leftDate=null,this._endOfData=!1,this._updateDatesFromExpirationDate()}_updateDatesFromExpirationDate(){void 0!==this._symbolInfo.expiration_date&&(this._nextTime=1e3*this._symbolInfo.expiration_date,this._leftDate=1e3*(this._symbolInfo.expiration_date+1))}_dealignTime(e){ -return null===this._dwmAligner?e:this._dwmAligner.timeToExchangeTradingDay(e)}_normalizeRange(e){const t=void 0!==e.to?e.to:this._dealignTime(this._now());if(0===this._cache.bars.length||void 0!==e.to&&t<=Object(s.ensureNotNull)(this._leftDate))return{countBack:e.countBack,to:t};const i=null!==this._dwmAligner?this._dwmAligner.timeToSessionStart(t):t,r=Object(n.lowerbound)(this._cache.bars,i,(e,t)=>e.time{e.onErrorCallback(t)})}let t=this._normalizeRange(e[0].range);for(const i of e.map(e=>this._normalizeRange(e.range)))(i.tot.countBack)&&(t=i);this._logMessage(`Leftmost subscriber requires ${t.countBack} bars prior ${d(t.to)}`);!(null===this._leftDate||t.to{const t=this._moveSubscriberToRealtime(e);this._returnHistoryDataToSubscriber(e,t)}),this._subscribeRealtimeIfNeeded()):this._ensureRequestedTo(t)}_moveSubscriberToRealtime(e){const t={key:e.key,onHistoryCallback:e.onHistoryCallback,barset:null};return this._subscribers.push(t),t}_isSymbolExpired(){return this._symbolInfo.expired||void 0!==this._symbolInfo.expiration_date}_subscribeRealtimeIfNeeded(){!this._subscribers.length||this._realtimeOn||this._isSymbolExpired()||this._subscribeRealtime()}_subscribeRealtime(){if(this._symbolInfo.expired||this._realtimeOn)return;this._realtimeOn=!0,this._datafeed.subscribeBars(this._symbolInfo,this._resolution,e=>{null!==this._dwmAligner&&(e.time=this._dwmAligner.timeToSessionStart(e.time)),this._putToCacheNewBar(e),this._subscribers.forEach(t=>{const i=t.barset;if(null===i)throw new Error("subscirber.barset is null");i.add(e),t.onHistoryCallback(i)})},u(this._symbolInfo,this._resolution),()=>{this._unsubscribeRealtime();const e=this._leftDate;this._purgeCache(),null!==e&&this._ensureRequestedTo({to:e,countBack:0})}),this._logMessage("Subscribed to realtime")}_unsubscribeRealtime(){!this._isSymbolExpired()&&this._realtimeOn&&(this._datafeed.unsubscribeBars(u(this._symbolInfo,this._resolution)),this._logMessage("Unsubscribed from realtime"),this._realtimeOn=!1)}_returnHistoryDataToSubscriber(e,t){const i=this._normalizeRange(e.range),s=this._createBarsetForRange(i) +return null===this._dwmAligner?e:this._dwmAligner.timeToExchangeTradingDay(e)}_normalizeRange(e){const t=void 0!==e.to?e.to:this._dealignTime(this._now());if(0===this._cache.bars.length||void 0!==e.to&&t<=Object(s.ensureNotNull)(this._leftDate))return{countBack:e.countBack,to:t};const i=null!==this._dwmAligner?this._dwmAligner.timeToSessionStart(t):t,r=Object(n.lowerbound)(this._cache.bars,i,(e,t)=>e.time{e.onErrorCallback(t)})}let t=this._normalizeRange(e[0].range);for(const i of e.map(e=>this._normalizeRange(e.range)))(i.tot.countBack)&&(t=i);this._logMessage(`Leftmost subscriber requires ${t.countBack} bars prior ${d(t.to)}`);!(null===this._leftDate||t.to{const t=this._moveSubscriberToRealtime(e);this._returnHistoryDataToSubscriber(e,t)}),this._subscribeRealtimeIfNeeded()):this._ensureRequestedTo(t)}_moveSubscriberToRealtime(e){const t={key:e.key,onHistoryCallback:e.onHistoryCallback,barset:null};return this._subscribers.push(t),t}_isSymbolExpired(){return this._symbolInfo.expired||void 0!==this._symbolInfo.expiration_date}_subscribeRealtimeIfNeeded(){!this._subscribers.length||this._realtimeOn||this._isSymbolExpired()||this._subscribeRealtime()}_subscribeRealtime(){if(this._symbolInfo.expired||this._realtimeOn)return;this._realtimeOn=!0,this._datafeed.subscribeBars(this._symbolInfo,this._resolution,e=>{null!==this._dwmAligner&&(e.time=this._dwmAligner.timeToSessionStart(e.time)),this._putToCacheNewBar(e),this._subscribers.forEach(t=>{const i=t.barset;if(null===i)throw new Error("subscriber.barset is null");i.add(e),t.onHistoryCallback(i)})},u(this._symbolInfo,this._resolution),()=>{this._unsubscribeRealtime();const e=this._leftDate;this._purgeCache(),null!==e&&this._ensureRequestedTo({to:e,countBack:0})}),this._logMessage("Subscribed to realtime")}_unsubscribeRealtime(){!this._isSymbolExpired()&&this._realtimeOn&&(this._datafeed.unsubscribeBars(u(this._symbolInfo,this._resolution)),this._logMessage("Unsubscribed from realtime"),this._realtimeOn=!1)}_returnHistoryDataToSubscriber(e,t){const i=this._normalizeRange(e.range),s=this._createBarsetForRange(i) ;s.count()>0?this._logMessage("Bars to return for request {0}: total {1} bars in [{2} ... {3}] ".format(e.key,s.count(),d(s.bars[0].time),d(s.bars[s.count()-1].time))):this._logMessage("Request {0}. Nothing to return.".format(e.key)),t.barset=s,this._endOfData&&null!==this._leftDate&&i.to<=this._leftDate&&(s.endOfData=!0),e.onHistoryCallback(s)}_createBarsetForRange(e){const t=null!==this._dwmAligner?this._dwmAligner.timeToSessionStart(e.to):e.to,i=Object(n.lowerbound)(this._cache.bars,t,(e,t)=>e.time{if(!this._destroyed)if(a)this._logMessage("getBars callback is already called before",!0);else{if(a=!0,e.length>0){const t=` [${d(e[0].time)} ... ${d(e[e.length-1].time)}]`;this._logMessage(`Receiving bars: total ${e.length} bars in ${t}, requested range: ${o}`)}else this._logMessage("Receiving bars: barset is empty, requested range: "+o);this._requesting=!1,this._processBars(e,t)}},e=>{this._destroyed||(a?this._logMessage("getBars callback is already called before",!0):(a=!0,this._requesting=!1,this._errorMessage=e||null,this._processPendingSubscribers()))})}_processBars(e,t){this._checkBars(e),this._alignBarsTime(e),e.length>0?(this._emptyResponsesCount=0, this._processFullBarset(e,t)):(this._emptyResponsesCount+=1,this._processEmptyBarset(t)),this._processPendingSubscribers()}_processEmptyBarset(e){e&&e.nextTime?(this._logMessage("Next time received: `{0}`".format(d(1e3*e.nextTime))),this._nextTime=1e3*e.nextTime):e&&e.noData?(this._logMessage("EOD received"),this._setEndOfData()):this._logMessage("nextTime or noData should present in metainfo when empty barset is returned"),50===this._emptyResponsesCount&&(this._logMessage("EOD detected due 50 empty responses in a row"),this._setEndOfData())}_setEndOfData(){this._endOfData=!0,this._cache.bars.length&&(this._leftDate=this._dealignTime(this._cache.bars[0].time))}_processFullBarset(e,t){this._putToCache(e)?null!==this._leftDate&&0!==this._cache.bars.length&&(this._interval.isTicks()?this._leftDate=this._dealignTime(this._cache.bars[0].time):this._leftDate=Math.min(this._leftDate,this._dealignTime(this._cache.bars[0].time))):this._logMessage("Incremental update failed. Starting full update. Returned data should be in the requested range.",!0),t&&t.nextTime?console.warn("nextTime should be set when there is no data in the requested period only"):t&&t.noData&&console.warn("noData should be set when there is no data in the requested period and earlier only")}_getNextSubscriptionId(){return this._nextSubscriptionId++}_checkBars(e,t=!1){if(a.enabled("charting_library_debug_mode"))for(let i=1;i"number"!=typeof e[i][t]||!isFinite(e[i][t]))&&console.error("Wrong bars values: all OHLC values should be numbers")}}_putToCache(e){if(0===e.length)return!0;if(this._cache.bars.length===e.length&&this._cache.bars[0].time===e[0].time&&this._cache.bars[this._cache.bars.length-1].time===e[e.length-1].time)return this._logMessage("Time range of received data is the same as cached one. Skip the update."),!0;if(0!==this._cache.bars.length&&e[e.length-1].time===this._cache.bars[0].time&&this._cache.bars.splice(0,1),0!==this._cache.bars.length&&e[e.length-1].time>=this._cache.bars[0].time){const t=this._cache.bars[this._cache.bars.length-1].time===e[e.length-1].time;if(this._cache.bars=[],!t)return this._leftDate=null,!1;this._logMessage("Received history up to now instead of incremental update. Return exactly what is requested.")}return this._cache.bars=[...e,...this._cache.bars],this._checkBars(this._cache.bars,!0),!0}_putToCacheNewBar(e){const t=this._cache.bars.length,i=e.time,s=0===t?NaN:this._cache.bars[t-1].time;0===t||st.destroy()),this._threads={},delete this._datafeed}purgeCache(){this._forEachThread((e,t)=>t.destroy()),this._threads={}}subscribe(e,t,i,s,r){const n=u(e,t);this._threads[n]||(this._threads[n]=this._createThread(e,t));return n+'"'+this._threads[n].addSubscription(i,s,r)}unsubscribe(e){const t=e.split('"');if(2!==t.length)return void console.warn("Wrong guid format");const i=t[0],s=parseInt(t[1]);this._threads.hasOwnProperty(i)?this._threads[i].removeSubscription(s):console.warn("Data thread doesnt exist: "+e)}_createThread(e,t){return new p(this._datafeed,e,t,this._serverTimeOffsetGetter,Object(c.createDwmAligner)(t,e),this._resetCacheTimePeriod)}_forEachThread(e){Object.keys(this._threads).forEach(t=>e(t,this._threads[t]))}}},WPIy:function(e,t,i){"use strict";var s=i("hOqT"),r=i("X0WL"),n=(i("Eyy1"),i("xDuj")),o=i("Kxc7");const a=i.n(o).a.enabled("hide_resolution_in_legend");function l(e){const t="QUANDL"===(e=e||{}).exchange,i={symbolDescription:"",interval:"",exchange:"",chartStyle:"",extended:"",provider:"",ticker:""};if(e.description&&t)if(2===e.description.split("/").length)i.symbolDescription=e.description.split("/")[1];else{e.description.split("'").filter(e=>e.length).forEach(e=>{let t=[];t=e&&("/"===e[0]||/\d+\/\(?/.test(e))?[e]:e.split("/").filter(e=>e.length),i.symbolDescription+=t[2===t.length?1:0]})}else e.description?i.symbolDescription=e.description:i.symbolDescription=e.symbol;if(e.interval&&(i.interval=Object(n.translatedIntervalString)(e.interval)),t&&e.description){const t=/[\w_]+\/[\w_]+/.exec(e.description);t&&t[0]?i.provider=t[0].split("/")[0]:i.provider=e.description.split("/")[0]}return e.exchange&&(i.exchange=e.exchange),i.chartStyle=function(e){return e.inputs,8===e.style?window.t("Heikin Ashi"):""}(e),e.extended&&(i.extended=window.t("ext",{context:"shorthand_for_extended_session"})),e.ticker&&(i.ticker=e.ticker),i}i.d(t,"a",(function(){return c}));class c extends r.a{constructor(e,t,i,s){super(t),this._series=e,this._statusViewProperties=i,this._options=s||{}}text(){return function(e){const t=l(e);return(t.symbolDescription+(t.interval?", "+t.interval:"")+function(e,t=", "){return(e.provider?`${t}${e.provider}`:"")+(e.exchange?`${t}${e.exchange}`:"")+(e.chartStyle?`${t}${e.chartStyle}`:"")+(e.extended?`${t}${e.extended}`:"")}(t)).replace(/'/g,"")}(this._getTitleGenerationOptions())}getSplitTitle(){return function(e){const t=l(e),i=t.symbolDescription.replace(/'/g,""),s=function(e){const t=[];e.provider&&t.push(e.provider);e.exchange&&t.push(e.exchange);e.chartStyle&&t.push(e.chartStyle);e.extended&&t.push(e.extended);return t}(t).map(e=>e.replace(/'/g,"")),r=[];return t.ticker&&r.push(t.ticker),r.push(i),a||r.push(t.interval||""),r.push(...s),r}(this._getTitleGenerationOptions())} @@ -523,7 +523,7 @@ e.setValue(t)}}class l{constructor(e,t){this._onChange=new n.a,this._properties= for(var i=t.time,r=t.offset,n=i.length,o=new Array(n),a=0;at){if((r=n-1)0&&e-t[s-1]<=r)return r;return 0},r.prototype.is_valid=function(){return!this._invalid},r._offset=function(e,t,i){var s=n(e,i);return-1===s?0:t[s]};var o=function(e){return 0|e},a=function(e){return 60*e*1e3},l=function(e,t){return c(e)-c(t)},c=function(e){return e<0?o(e/1e3)-(e%1e3!=0?1:0):o(e/1e3)};function h(e){return e%4==0&&(e%100!=0||e%400==0)}var u={0:0,1:31,2:59,3:90,4:120,5:151,6:181,7:212,8:243,9:273,10:304,11:334},d={SUNDAY:1,MONDAY:2,TUESDAY:3,WEDNESDAY:4,THURSDAY:5,FRIDAY:6,SATURDAY:7,JANUARY:0,FEBRUARY:1,MARCH:2,APRIL:3,MAY:4,JUNE:5,JULY:6,AUGUST:7,SEPTEMBER:8,OCTOBER:9,NOVEMBER:10,DECEMBER:11,YEAR:1,MONTH:2,WEEK_OF_YEAR:3,DAY_OF_MONTH:5,DAY_OF_YEAR:6,DAY_OF_WEEK:7,HOUR_OF_DAY:11,MINUTE:12,SECOND:13,minutesPerDay:1440,secondsPerDay:a(1440),get_minutes_from_hhmm:function(e){return-1!==e.indexOf(":")&&(e=e.split(":").join("")),e%100+60*o(e/100)},get_year:function(e){return e.getUTCFullYear()},get_month:function(e){return e.getUTCMonth()},get_hours:function(e){return e.getUTCHours()},get_minutes:function(e){return e.getUTCMinutes()},get_seconds:function(e){return e.getUTCSeconds()},get_day_of_month:function(e){return e.getUTCDate()},get_day_of_week:function(e){return e.getUTCDay()+1},get_day_of_year:function(e){var t=e.getUTCMonth(),i=u[t];return t>d.JANUARY+1&&h(e.getUTCFullYear())&&(i+=1),i+e.getUTCDate()},get_week_of_year:function(e){var t=new Date(Date.UTC(e.getUTCFullYear(),0,1)).getUTCDay(),i=0===t?1:8-t,s=d.get_day_of_year(e)-i;return Math.ceil(s/7)+1},get_minutes_from_midnight:function(e){return 60*d.get_hours(e)+d.get_minutes(e)},set_hms:function(e,t,i,s,r,n){e.setUTCHours(t),e.setUTCMinutes(i),e.setUTCSeconds(s),e.setUTCMilliseconds(r),d.correct_time(e,n)},correct_time:function(e,t){var i=e.getTime(),s=t.correction_loc(i);e.setTime(i+s)},add_days_considering_dst:function(e,t,i){var s=e.offset_utc(t),r=this.clone(t);this.add_date(r,i);var n=e.offset_utc(r);return r.setTime(r.getTime()+s-n),r},add_date:function(e,t){e.setTime(e.getTime()+t*d.secondsPerDay)},add_minutes:function(e,t){e.setTime(e.getTime()+a(t))},clone:function(e){return new Date(e.getTime())},get_days_per_year:function(e){var t=e.getUTCFullYear();return this.days_per_year(t)},days_per_year:function(e){return h(e)?366:365},get_part:function(e,t){switch(t){case d.YEAR:return d.get_year(e);case d.MONTH:return d.get_month(e);case d.DAY_OF_MONTH:return d.get_day_of_month(e);case d.WEEK_OF_YEAR:return d.get_week_of_year(e) ;case d.DAY_OF_WEEK:return d.get_day_of_week(e);case d.HOUR_OF_DAY:return d.get_hours(e);case d.MINUTE:return d.get_minutes(e);case d.DAY_OF_YEAR:return d.get_day_of_year(e);case d.SECOND:return d.get_seconds(e);default:return e.getTime()}},time_minutes:a,time_seconds:function(e){return 1e3*e},time_minutes_diff:function(e,t){return o(l(e,t)/60)},time_seconds_diff:l,utc_to_cal:function(e,t){return new Date(d.utc_to_cal_ts(e,t))},utc_to_cal_ts:function(e,t){return t+e.offset_utc(t)},get_cal:function(e,t,i,s,r,n,o){var a=new Date(Date.UTC(t,i,s,r||0,n||0,o||0)),l=e.offset_utc(+a);return new Date(a.valueOf()-l)},get_cal_from_unix_timestamp_ms:function(e,t){return new Date(t+e.offset_utc(t))},get_cal_utc:function(e,t,i){return new Date(Date.UTC(e,t,i))},cal_to_utc:function(e,t){var i=t.getTime();return i-e.offset_loc(i)},get_timezone:function(e){return new r(e)},shift_day:function(e,t){var i=e-1;return(i+=t)>6?i%=7:i<0&&(i=(7+i%7)%7),i+1}};e.exports=d},jFln:function(e,t,i){"use strict";var s=i("Hr11"),r=s.greaterThan,n=s.lessThan,o=window.CanvasEx=i("8Uy/");o.computeDashPattern=function(e){return[[e.lineWidth,2*e.lineWidth],[5*e.lineWidth,6*e.lineWidth],[6*e.lineWidth,6*e.lineWidth],[e.lineWidth,4*e.lineWidth],[2*e.lineWidth,e.lineWidth]][e.lineStyle-1]},o.drawLine=function(e,t,i,s,r){isFinite(t)&&isFinite(s)&&isFinite(i)&&isFinite(r)&&(e.lineStyle!==o.LINESTYLE_SOLID?o.drawDashedLine(e,t,i,s,r):o.drawSolidLine(e,t,i,s,r))},o.drawArrow=function(e,t,i,s,r,n){if(isFinite(t)&&isFinite(s)&&isFinite(i)&&isFinite(r)){var o=Math.round(n/2),a=t+o,l=s+o;e.beginPath(),e.moveTo(l,r),e.lineTo(a,i),e.moveTo(t,i+o),e.lineTo(a,i),e.lineTo(t+n,i+o),e.stroke()}},o.drawSolidLine=function(e,t,i,s,r){e.beginPath(),e.moveTo(t,i),e.lineTo(s,r),e.stroke()},o.setLineStyle=function(e,t){e.lineStyle=t;var i=[];t!==o.LINESTYLE_SOLID&&(i=o.computeDashPattern(e)),o.setLineDash(e,i)},o.setLineDash=function(e,t){"function"==typeof e.setLineDash?e.setLineDash(t):void 0!==e.mozDash?e.mozDash=t:void 0!==e.webkitLineDash&&(e.webkitLineDash=t)},o.drawPoly=function(e,t,i){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var s=0;s0&&(c.thereYet=n,c.cap=Math.max),t-s>0&&(l.thereYet=n,l.cap=Math.max),e.moveTo(t,i);for(var h=t,u=i,d=0,p=!0;!l.thereYet(h,s)||!c.thereYet(u,o);){var _=Math.atan2(o-i,s-t),m=a[d];h=l.cap(s,h+Math.cos(_)*m),u=c.cap(o,u+Math.sin(_)*m),p?e.lineTo(h,u):e.moveTo(h,u),d=(d+1)%a.length,p=!p}},o.setFont=function(e,t){if(e.font!==t)try{e.font=t}catch(i){}},"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.setFont=function(e){o.setFont(this,e)},CanvasRenderingContext2D.prototype.lineStyle=o.LINESTYLE_SOLID),e.exports=o},jJ9X:function(e,t,i){},jRfx:function(e,t,i){"use strict";i.d(t,"c",(function(){return o})),i.d(t,"a",(function(){return a})),i.d(t,"b",(function(){return l}));var s=i("Eyy1"),r=i("3u3j");class n extends r.a{constructor(e,t,i){super(e,t,i),this._restorePane=!1}redo(){const e=this._chartModel.panes().length,t=this._chartModel.panes()[this._targetPaneIndex()],i=Object(s.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),r=Object(s.ensureNotNull)(this._chartModel.paneForSource(i)),n=this._chartModel.children(i,!0);r.bulkActionMacro(()=>{n.forEach(e=>this._chartModel.detachSource(e)),this._restorePane=this._chartModel.detachSource(i)});const o="overlay"===this._initialPriceScalePosition?this._initialPriceScalePosition:void 0,a=t.findSuitableScale(i,void 0,o),l=0===a.dataSources().length;if(t.bulkActionMacro(()=>{t.addDataSource(i,a,!1),n.forEach(e=>t.addDataSource(e,a,!1))}),i===this._chartModel.mainSeries()){const e=t.priceScalePosition(a);t.movePriceScale(a,e,0)}if(l){Object(s.ensureNotNull)(i.priceScale()).restoreState(this._newPriceScaleState(t.isOverlay(i)))}this._chartModel.fullUpdate(),e!==this._chartModel.panes().length&&this._chartModel.setShouldBeSavedEvenIfHidden(!0)}undo(){let e;e=this._restorePane?this._chartModel.createPane(this._initialPaneIndex):this._chartModel.panes()[this._initialPaneIndex];const t=Object(s.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),i=Object(s.ensureNotNull)(this._chartModel.paneForSource(t)),r=this._chartModel.children(t,!0);i.bulkActionMacro(()=>{r.forEach(e=>this._chartModel.detachSource(e)),this._chartModel.detachSource(t)});let n=e.getPriceScaleById(this._initialPriceScaleId);null===n&&(n=e.createPriceScaleAtPosition(this._initialPriceScalePosition,this._initialPriceScaleIndex)),e.bulkActionMacro(()=>{e.addDataSource(t,n,!0),r.forEach(t=>e.addDataSource(t,n,!1))}),Object(s.ensureNotNull)(t.priceScale()).restoreState(this._originalPriceScaleState()),this._chartModel.fullUpdate()}}class o extends n{constructor(e,t,i){super(e,t,i)}_targetPaneIndex(){return this._initialPaneIndex-1}}class a extends n{constructor(e,t,i){super(e,t,i)}_targetPaneIndex(){return this._initialPaneIndex+1}}class l extends n{constructor(e,t,i,s){super(e,t,s),this._targetPane=i}_targetPaneIndex(){return this._targetPane}}},jTis:function(e,t,i){"use strict";var s;i.r(t),i.d(t,"CalloutConsts",(function(){return s})),function(e){e[e.RoundRadius=8]="RoundRadius",e[e.TextMargins=2]="TextMargins", -e[e.MinWidth=100]="MinWidth"}(s||(s={}))},jeZR:function(e,t,i){"use strict";i.r(t),i.d(t,"AppliedTimeFrame",(function(){return r}));var s=i("QfUd");class r{constructor(e){this._appliedTimeFrame=new s.a(null),this._appliedTimeFrameInfo=null,this._applidTimeFrameChangedBound=this._appliedTimeFrameChanged.bind(this),this._model=e,e.mainSeries().dataEvents().seriesTimeFrame().subscribe(this,this._onSeriesTimeFrame),this._appliedTimeFrame.subscribe(this._applidTimeFrameChangedBound)}destroy(){this._appliedTimeFrame.unsubscribe(this._applidTimeFrameChangedBound),this._model.timeScale().logicalRangeChanged().unsubscribeAll(this),this._model.mainSeries().dataEvents().seriesTimeFrame().unsubscribeAll(this)}appliedTimeFrame(){return this._appliedTimeFrame}_appliedTimeFrameChanged(){this._model.timeScale().logicalRangeChanged().unsubscribe(this,this._invalidateAppliedTimeFrame)}_onSeriesTimeFrame(e,t,i,s){if(s){const e=this._model.timeScale();this._appliedTimeFrameInfo={logicalRange:e.logicalRange(),baseIndex:e.baseIndex()},e.logicalRangeChanged().subscribe(this,this._invalidateAppliedTimeFrame)}}_invalidateAppliedTimeFrame(){if(null===this._appliedTimeFrameInfo)return;const e=this._model.timeScale(),t=e.logicalRange(),i=e.baseIndex(),s=this._appliedTimeFrameInfo.logicalRange,r=this._appliedTimeFrameInfo.baseIndex;(null===t||null===s||Math.abs(i-t.left()-(r-s.left()))>=.01||Math.abs(i-t.right()-(r-s.right()))>=.01)&&this._appliedTimeFrame.setValue(null)}}},jenN:function(e,t,i){"use strict";i.r(t);var s=i("txPx"),r=i("7Fue"),n=i("xWfy"),o=i("qySK"),a=i("KcY8");class l extends a.a{constructor(e,t){super(),this._source=e,this._data=t}_updateRendererData(e,t,i){e.visible=!1;const s=this._source.priceScale(),r=this._source.properties().visible.value();if(!s||s.isEmpty()||!r)return;const n=this._source.properties().graphics[this._data.lineType][this._data.styleId];if(!(n.visible&&n.visible.value()&&n.showPrice&&n.showPrice.value()))return;const o=this._source.firstValue();if(null===o)return;const a=this._data.line.level,l=n.color.value();i.background=l,i.textColor=this.generateTextColor(l),i.coordinate=s.priceToCoordinate(a,o),e.text=s.formatPrice(a,o),e.visible=!0}}i.d(t,"createGraphicsPaneViews",(function(){return d})),i.d(t,"createGraphicsPriceAxisViews",(function(){return _})),i.d(t,"isStudyGraphicsEmpty",(function(){return r.a})),i.d(t,"StaticStudyGraphics",(function(){return n.a})),i.d(t,"emptyStudyGraphics",(function(){return n.b})),i.d(t,"loadStudyGraphics",(function(){return n.c})),i.d(t,"saveStudyGraphics",(function(){return n.d})),i.d(t,"LiveStudyGraphics",(function(){return o.a}));const c=Object(s.getLogger)("Chart.StudyGraphics"),h=new Set(["dwgtablecells"]);async function u(e,t,s,r){switch(e){case"hhists":return new((await i.e("study-pane-views").then(i.bind(null,"Gj0v"))).HHistPaneView)(t,s,r);case"horizlines":return new((await i.e("study-pane-views").then(i.bind(null,"1sos"))).HorizLinePaneView)(t,s,r);case"vertlines":return new((await i.e("study-pane-views").then(i.bind(null,"psYU"))).VertLinePaneView)(t,s,r)} +e[e.MinWidth=100]="MinWidth"}(s||(s={}))},jeZR:function(e,t,i){"use strict";i.r(t),i.d(t,"AppliedTimeFrame",(function(){return r}));var s=i("QfUd");class r{constructor(e){this._appliedTimeFrame=new s.a(null),this._appliedTimeFrameInfo=null,this._appliedTimeFrameChangedBound=this._appliedTimeFrameChanged.bind(this),this._model=e,e.mainSeries().dataEvents().seriesTimeFrame().subscribe(this,this._onSeriesTimeFrame),this._appliedTimeFrame.subscribe(this._appliedTimeFrameChangedBound)}destroy(){this._appliedTimeFrame.unsubscribe(this._appliedTimeFrameChangedBound),this._model.timeScale().logicalRangeChanged().unsubscribeAll(this),this._model.mainSeries().dataEvents().seriesTimeFrame().unsubscribeAll(this)}appliedTimeFrame(){return this._appliedTimeFrame}_appliedTimeFrameChanged(){this._model.timeScale().logicalRangeChanged().unsubscribe(this,this._invalidateAppliedTimeFrame)}_onSeriesTimeFrame(e,t,i,s){if(s){const e=this._model.timeScale();this._appliedTimeFrameInfo={logicalRange:e.logicalRange(),baseIndex:e.baseIndex()},e.logicalRangeChanged().subscribe(this,this._invalidateAppliedTimeFrame)}}_invalidateAppliedTimeFrame(){if(null===this._appliedTimeFrameInfo)return;const e=this._model.timeScale(),t=e.logicalRange(),i=e.baseIndex(),s=this._appliedTimeFrameInfo.logicalRange,r=this._appliedTimeFrameInfo.baseIndex;(null===t||null===s||Math.abs(i-t.left()-(r-s.left()))>=.01||Math.abs(i-t.right()-(r-s.right()))>=.01)&&this._appliedTimeFrame.setValue(null)}}},jenN:function(e,t,i){"use strict";i.r(t);var s=i("txPx"),r=i("7Fue"),n=i("xWfy"),o=i("qySK"),a=i("KcY8");class l extends a.a{constructor(e,t){super(),this._source=e,this._data=t}_updateRendererData(e,t,i){e.visible=!1;const s=this._source.priceScale(),r=this._source.properties().visible.value();if(!s||s.isEmpty()||!r)return;const n=this._source.properties().graphics[this._data.lineType][this._data.styleId];if(!(n.visible&&n.visible.value()&&n.showPrice&&n.showPrice.value()))return;const o=this._source.firstValue();if(null===o)return;const a=this._data.line.level,l=n.color.value();i.background=l,i.textColor=this.generateTextColor(l),i.coordinate=s.priceToCoordinate(a,o),e.text=s.formatPrice(a,o),e.visible=!0}}i.d(t,"createGraphicsPaneViews",(function(){return d})),i.d(t,"createGraphicsPriceAxisViews",(function(){return _})),i.d(t,"isStudyGraphicsEmpty",(function(){return r.a})),i.d(t,"StaticStudyGraphics",(function(){return n.a})),i.d(t,"emptyStudyGraphics",(function(){return n.b})),i.d(t,"loadStudyGraphics",(function(){return n.c})),i.d(t,"saveStudyGraphics",(function(){return n.d})),i.d(t,"LiveStudyGraphics",(function(){return o.a}));const c=Object(s.getLogger)("Chart.StudyGraphics"),h=new Set(["dwgtablecells"]);async function u(e,t,s,r){switch(e){case"hhists":return new((await i.e("study-pane-views").then(i.bind(null,"Gj0v"))).HHistPaneView)(t,s,r);case"horizlines":return new((await i.e("study-pane-views").then(i.bind(null,"1sos"))).HorizLinePaneView)(t,s,r);case"vertlines":return new((await i.e("study-pane-views").then(i.bind(null,"psYU"))).VertLinePaneView)(t,s,r)} return null}async function d(e,t,i){const s=[],r=Object.keys(e.graphicsInfo());r.sort((e,t)=>p(e)-p(t));for(const n of r){const r=await u(n,e,t,i);null!==r?s.push(r):h.has(n)||c.logWarn(n+" is not supported by this build of graphics subsystem, skipping")}return s}function p(e){switch(e){case"polygons":return-100;case"trendchannels":return-90;default:return 0}}function _(e){const t=Object.keys(e.graphicsInfo()),i=[];for(const s of t)switch(s){case"hlines":e.graphics().hlines().forEach((t,r)=>{t.forEach(t=>{void 0!==t.level&&i.push(new l(e,{line:{level:t.level},styleId:r,lineType:s}))})});break;case"horizlines":e.graphics().horizlines().forEach((t,r)=>{t.forEach(t=>{void 0!==t.level&&i.push(new l(e,{line:{level:t.level},styleId:r,lineType:s}))})})}return i}},jkoZ:function(e,t,i){"use strict";var s=i("XlJ7").makeFont,r=i("XlJ7").parseFont,n=(0,i("txPx").getLogger)("Model.ChartTradingUtils"),o={_fontHeightCache:{},_parsedColorCache:{},_parseColor:function(e){if(this._parsedColorCache[e])return this._parsedColorCache[e];var t=document.createElement("div");t.style.color=e;var i=t.style.color.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i)||t.style.color.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d*\.?\d+)\s*\)$/i),s={r:i[1],g:i[2],b:i[3],a:i[4]||"1"};return this._parsedColorCache[e]=s,s},getColorFromProperties:function(e,t){var i=1-t.value()/100,s=this._parseColor(e.value());return"rgba("+s.r+","+s.g+","+s.b+","+i+")"},setColorToProperties:function(e,t,i){var s=this._parseColor(e);t.setValue("rgb("+s.r+","+s.g+","+s.b+")");var r=100*(1-s.a);i.setValue(Math.max(0,Math.min(r,100)))},getFontFromProperties:function(e,t,i,r){return s(t.value(),e.value(),r.value()?"italic":"",i.value()?"bold":"")},setFontToProperties:function(e,t,i,s,o){var a=r(e);null!==a?(a.family.length>0&&t.setValue(a.family),i.setValue(a.size),s.setValue(a.bold),o.setValue(a.italic)):n.logError("Invalid font: "+e)},fontHeight:function(e){if(!this._fontHeightCache[e]){var t=document.createElement("span");t.appendChild(document.createTextNode("height")),document.body.appendChild(t),t.style.cssText="font: "+e+"; white-space: nowrap; display: inline;";var i=t.offsetHeight;document.body.removeChild(t),this._fontHeightCache[e]=Math.ceil(i)}return this._fontHeightCache[e]},drawPolyHoverOrPress:function(e,t,i,s){s?(e.save(),e.fillStyle="rgba(0, 0, 0, 0.15)",CanvasEx.drawPoly(e,t,!0),e.restore()):i&&(e.save(),e.fillStyle="rgba(0, 0, 0, 0.1)",CanvasEx.drawPoly(e,t,!0),e.restore())},repaint:function(e){e.lightUpdate()},roundToMinTick:function(e,t){var i=1/e.mainSource().base();return i*Math.round(t/i)}};e.exports=o},jofe:function(e,t,i){"use strict";function s(){let e,t;return{promise:new Promise((i,s)=>{e=i,t=s}),reject:t,resolve:e}}i.r(t),i.d(t,"createDeferredPromise",(function(){return s}))},jpZi:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var s=i("Eyy1"),r=(i("YFKU"),i("HbRj"),i("RDU5"));const n=window.t("Exclude line tools from group {group}");class o extends r.UndoCommand{constructor(e,t,i){super(n.format({ group:t.name()})),this._model=e,this._groupId=t.id,this._groupName=t.name(),this._lineToolsIds=i.map(e=>e.id())}redo(){const e=Object(s.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId)),t=this._lineToolsIds.map(e=>this._model.dataSourceForId(e));e.excludeLineTools(t),0===e.lineTools().length&&this._model.lineToolsGroupModel().removeGroup(e)}undo(){const e=this._lineToolsIds.map(e=>this._model.dataSourceForId(e)),t=this._model.lineToolsGroupModel().groupForId(this._groupId);null!==t?t.addLineTools(e):this._model.lineToolsGroupModel().createGroup(e,this._groupName,this._groupId)}}},jvrd:function(e,t,i){"use strict";i.d(t,"e",(function(){return r})),i.d(t,"c",(function(){return o})),i.d(t,"b",(function(){return a})),i.d(t,"a",(function(){return l})),i.d(t,"d",(function(){return c}));var s=i("k9/m");function r(e,t,i){const s=e.barFunction();switch(e.style()){case 3:case 10:case 2:return s(t.value);default:return t.value[-1===i?3:2]}}function n(e){return e>=0?1:-1}function o(e,t){return-1===n(e)!==t?-1:1}function a(e,t,i,s){const r=Math.min(t,Math.max(0,1===s?i:t-i));return i-s*Math.abs(r*e/100)}function l(e,t,i){if(void 0===e.index)return null;const s=e.index();return null===s?null:{index:s,price:t.coordinateToPrice(t.height()/2,i)}}function c(e,t){const i=e.data().bars(),o=i.first(),a=i.last();if(null===o||null===a)return null;let l;if(void 0===t.index){const e=t.time(),r=o.value[0],n=a.value[0];if(en)return null;l=i.searchByTime(e,s.PlotRowSearchMode.NearestRight,4)}else{const e=t.index();if(null===e)return null;l=i.search(e)}return null===l?null:{index:l.index,price:r(e,l,n(t.position()))}}},jy4L:function(e,t,i){"use strict";i.r(t),i.d(t,"makeNextSymbolId",(function(){return r})),i.d(t,"makeNextStudyId",(function(){return o}));let s=0;function r(){return s++,"ss_"+s}let n=0;function o(){return n++,"st"+n}},k4w6:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var s=i("2ijp");class r extends s.a{constructor(e){super(),this._series=e,this._model=e.model()}}},"k9/m":function(e,t,i){"use strict";i.r(t),i.d(t,"PlotRowSearchMode",(function(){return l})),i.d(t,"PlotList",(function(){return u})),i.d(t,"mergeMinMax",(function(){return d})),i.d(t,"mergePlotRows",(function(){return p}));var s=i("Eyy1"),r=i("Y7w9"),n=i("tqok"),o=i("txPx");const a=Object(o.getLogger)("Chart.PlotList");var l;!function(e){e[e.NearestLeft=-1]="NearestLeft",e[e.Exact=0]="Exact",e[e.NearestRight=1]="NearestRight"}(l||(l={}));function c(e){return e.index}function h(e){return e.value[0]}class u{constructor(e=null,t=null){this._items=[],this._start=0,this._end=0,this._shareRead=!1,this._minMaxCache=new Map,this._rowSearchCacheByIndex=new Map,this._rowSearchCacheByIndexWithoutEmptyValues=new Map,this._rowSearchCacheByTime=new Map,this._rowSearchCacheByTimeWithoutEmptyValues=new Map,this._plotFunctions=e||new Map,this._emptyValuePredicate=t}clear(){this._items=[],this._start=0,this._end=0,this._shareRead=!1,this._minMaxCache.clear(),this._invalidateSearchCaches()}first(){ return this.size()>0?this._items[this._start]:null}last(){return this.size()>0?this._items[this._end-1]:null}firstIndex(){return this.size()>0?this._indexAt(this._start):null}lastIndex(){return this.size()>0?this._indexAt(this._end-1):null}size(){return this._end-this._start}isEmpty(){return 0===this.size()}contains(e){return null!==this.search(e,l.Exact)}valueAt(e){const t=this.search(e);return null!==t?t.value:null}add(e,t){if(this._shareRead)return a.logDebug("add: readonly collection modification attempt"),!1;const i={index:e,value:t},s=this._nonCachedSearch(e,l.Exact,c);return this._invalidateSearchCaches(),null===s?(this._items.splice(this._lowerbound(e,c),0,i),this._start=0,this._end=this._items.length,!0):(this._items[s]=i,!1)}search(e,t=l.Exact,i){return this._searchImpl(e,t,this._rowSearchCacheByIndex,this._rowSearchCacheByIndexWithoutEmptyValues,c,i)}searchByTime(e,t=l.Exact,i){return this._searchImpl(e,t,this._rowSearchCacheByTime,this._rowSearchCacheByTimeWithoutEmptyValues,h,i)}fold(e,t){let i=t;for(let s=this._start;s=i;--s){const t=this._indexAt(s),i=this._valueAt(s);if(e(t,i))return{index:t,value:i}}return null}each(e){for(let t=this._start;t!1,next:()=>{throw new Error("Invalid operation")}};let r=i-1;return{hasNext:()=>r(r+=1,this._items[r])}}minMaxOnRangeCached(e,t,i){if(this.isEmpty())return null;let s=null;for(const r of i){s=d(s,this._minMaxOnRangeCachedImpl(e-r.offset,t-r.offset,r.name))}return s}minMaxOnRange(e,t,i){if(this.isEmpty())return null;let s=null;for(const r of i){s=d(s,this._minMaxOnRange(e-r.offset,t-r.offset,r.name))}return s}merge(e){return this._shareRead?(a.logDebug("merge: readonly collection modification attempt"),null):0===e.length?null:this.isEmpty()||e[e.length-1].indexthis._items[this._items.length-1].index?this._append(e):1===e.length&&e[0].index===this._items[this._items.length-1].index?(this._updateLast(e[0]),e[0]):this._merge(e)}addTail(e,t=!1){let i=0;t&&this._end-this._start>0&&(i=1,this._items[this._end-this._start-1].value=e[0].value);for(let s=i;se._major?1:this._minore._minor?1:0}isLess(e){return this.compareTo(e)<0}isLessOrEqual(e){return this.compareTo(e)<=0}isEqual(e){return 0===this.compareTo(e)}isGreater(e){return this.compareTo(e)>0}isGreaterOrEqual(e){return this.compareTo(e)>=0}static parse(e){if(e instanceof r)return new r(e.major(),e.minor());if("number"==typeof e)return Object(s.assert)(Math.floor(e)===e,"Version should not be a float number"),new r(e,0);if("string"==typeof e){const t=e.split(".");if(1===t.length){const i=parseInt(t[0],10);return Object(s.assert)(!isNaN(i),"Bad version string: "+e),new r(i,0)}if(2===t.length){const i=parseInt(t[0],10);Object(s.assert)(!isNaN(i),"Bad version string: "+e);const n=parseInt(t[1],10);return Object(s.assert)(!isNaN(n),"Bad version string: "+e),new r(i,n)}throw new Error("Bad version string (one dot expected): "+e)}throw new Error("Bad version: "+e)}}r.ZERO=new r(0,0)},lJvs:function(e,t,i){"use strict";var s=i("aO4+").Point,r=i("vAx0").ESDPaneView,n=i("fTGZ").BarsMarksContainer,o=i("mMWL"),a=i("FQhm"),l=i("ttUj").Tooltip,c=i("zDbI").CHART_FONT_FAMILY;class h extends r{constructor(e,t){super(e,t,void 0,void 0),this.source=t,this.stylesCache={},this.templatesCache={},this._lollipops={},this._createLollipops()}_createLollipops(){var e=this.source._model.timeScale(),t=r.prototype._getY.call(this.source),i=this.source._model.lastHittestData(),n=this;Object.keys(this.source._marks).forEach((function(r){var o=this.source._marks[r],a=o.id,c=o.index;null!==c&&(n._lollipops[a]={id:a,basePoint:new s(e.indexToCoordinate(c)+1,t),hovered:i&&i.id===a||a===n.getLastClickedLollipopId(),barY:null,label:o.label,color:o.color,items:o.tooltip,tooltip:n._lollipops.hasOwnProperty(a)?n._lollipops[a].tooltip:new l,visible:!0})}),this)}clearCaches(){this.closeTooltips(),this.clearLastClicked(),this._lollipops={}}update(){this._createLollipops(),this._invalidated=!1}renderer(){return this.update(),r.prototype.renderer.call(this)}_generateTemplateStyle(e,t,i){var s=e+t+i;if(!(s in this.stylesCache)){var r="default"!==e,n={strokeStyle:t,lineWidth:1,fillStyle:"white",barLine:{lineStyle:CanvasEx.LINESTYLE_DASHED},lollipop:{width:32,height:96,circleHeight:16,radius:12,lineWidth:1.5,fillStyle:r?t:"white",fillCircle:r,strokeStyle:"#E2745B",text:{label:i,strokeStyle:r?"white":t,font:"normal 12px "+c}}};this.stylesCache[s]=n}return this.stylesCache[s]}getTemplate(e,t){var i=e+t.color+t.label;return i in this.templatesCache||(this.templatesCache[i]=this.createTemplate(this._generateTemplateStyle(e,t.color,t.label))),this.templatesCache[i]}getStyle(e,t){return this._generateTemplateStyle(e,t.color,t.label)}createText(e,t){"string"==typeof e.items?t.addTextLine(e.items):Array.isArray(e.items)&&e.items.forEach((function(e){t.addTextLine(e)}))}hasTooltip(e){return!!e.tooltip&&e.tooltip.length}}e.exports=class extends n{constructor(e){super(e),this.toolname="UserDefinedTimescaleMarks";var t=this;o.hideMarksOnBars().subscribe(this,(function(){ t._properties.visible.setValue(!o.hideMarksOnBars().value())})),this._paneView=new h(e,this),this._requestedPointsets=new Set}_initialize(e){this._properties.visible.setValue(!0)}userEditEnabled(){return!1}_plateViewData(e){return{text:e.text}}onClicked(e){a.emit("onTimescaleMarkClick",e.id)}clearMarks(){var e=this._model.chartApi();if(e.connected()){var t=this;Object.keys(this._marks).forEach((function(i){var s=t._getPointsetId(i);e.removePointset(s)}))}this._requestedPointsets.clear(),super.clearMarks(),this._paneView.clearCaches(),this.onNeedRepaint.fire()}_getData(e){var t=this._model.mainSeries().symbolInfo();if(t){var i=this.roundRange(this._rangeDifference(e)),s=this,r=this._model.mainSeries(),n=r.seriesSource().symbolInstanceId(),o=r.properties().interval.value();ChartApiInstance.getTimescaleMarks(t,i.start,i.end,(function(t){var i=s._model.chartApi();t.forEach((function(e){e.index=null;var t=e.id,r=s._getPointsetId(t),a=s._marks[t];if(a&&null!==a.index&&(a.tickmark===e.tickmark?e.index=a.index:s._requestedPointsets.has(r)&&i.connected()&&(i.removePointset(r),s._requestedPointsets.delete(r))),s._marks[t]=e,null===e.index&&i.connected()){s._requestedPointsets.add(r);var l=[[e.tickmark,0]];i.createPointset(r,"turnaround",n,o,l,(function(e){s._onPointsetData(e)}))}}),s),s._loadedRange=s._rangeUnion(e,s._loadedRange),s.onNeedRepaint.fire()}),o)}}_getPointsetId(e){return"pointsetMark_"+e}_onPointsetData(e){var t=e.params.customId.split("_")[1],i=this._marks[t],s=e.params.plots;i&&1===s.length&&(i.index=s[0].value[0])}updatePlateData(e,t){return t.barWidth=this.barWidth(),t.text=e.text,t.tooltipMargin=-1*Math.max(e.minSize/2,.4*this.barWidth()),t}hasContextMenu(){return!1}paneViews(){return this._properties.visible.value()?[this._paneView]:[]}onClickOutside(){this._paneView.onClickOutside()}}},"lNN+":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolTrianglePattern",(function(){return o}));var s=i("Ocx9"),r=i("Ss5c"),n=i("j3hX");class o extends r.LineDataSource{constructor(e,t){const s=t||o.createProperties();super(e,s),i.e("lt-pane-views").then(i.bind(null,"Jej9")).then(t=>{this._setPaneViews([new t.LineToolTrianglePatternPaneView(this,e)])})}pointsCount(){return 4}name(){return"Triangle Pattern"}properties(){return super.properties()}static createProperties(e){const t=new s.DefaultProperty("linetooltrianglepattern",e);return o._configureProperties(t),t}_getPropertyDefinitionsViewModelClass(){return Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"/HOw")).then(e=>e.PatternWithBackgroundDefinitionViewModel)}static _configureProperties(e){r.LineDataSource._configureProperties(e),e.addChild("linesColors",new n.LineToolColorsProperty([e.childs().color])),e.addChild("textsColors",new n.LineToolColorsProperty([e.childs().textcolor])),e.addChild("backgroundsColors",new n.LineToolColorsProperty([e.childs().backgroundColor]))}}},lReN:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolsGroupControllerApi",(function(){return o}));var s=i("s1Gx"),r=i("Eyy1"),n=i("CW80");class o{ constructor(e,t){this._controller=e,this._model=t}createGroupFromSelection(){return this._controller.createGroupFromSelection().id}removeGroup(e){const t=Object(r.ensureDefined)(this._groupById(e));this._controller.removeGroup(t)}groups(){return this._controller.groups().map(e=>e.id)}shapesInGroup(e){const t=Object(r.ensureDefined)(this._groupById(e));return Object(s.sortSources)(t.lineTools()).map(e=>e.id())}excludeShapeFromGroup(e,t){const i=Object(r.ensureDefined)(this._groupById(e)),s=Object(r.ensureNotNull)(this._model.dataSourceForId(t));Object(r.assert)(Object(n.isLineTool)(s),"Passed shapeId is not a line tool"),this._controller.excludeLineToolFromGroup(i,s)}availableZOrderOperations(e){const t=Object(r.ensureDefined)(this._groupById(e));return this._controller.availableZOrderOperations(t)}bringToFront(e){const t=Object(r.ensureDefined)(this._groupById(e));this._controller.bringToFront(t)}bringForward(e){const t=Object(r.ensureDefined)(this._groupById(e));this._controller.bringForward(t)}sendBackward(e){const t=Object(r.ensureDefined)(this._groupById(e));this._controller.sendBackward(t)}sendToBack(e){const t=Object(r.ensureDefined)(this._groupById(e));this._controller.sendToBack(t)}insertAfter(e,t){const i=Object(r.ensureDefined)(this._groupById(e)),s=Object(r.ensureNotNull)(this._groupById(t)||this._model.dataSourceForId(t));this._controller.insertAfter(i,s)}insertBefore(e,t){const i=Object(r.ensureDefined)(this._groupById(e)),s=Object(r.ensureNotNull)(this._groupById(t)||this._model.dataSourceForId(t));this._controller.insertBefore(i,s)}groupVisibility(e){return Object(r.ensureDefined)(this._groupById(e)).visibility()}setGroupVisibility(e,t){const i=Object(r.ensureDefined)(this._groupById(e));this._controller.setGroupVisibility(i,t)}groupLock(e){return Object(r.ensureDefined)(this._groupById(e)).locked()}setGroupLock(e,t){const i=Object(r.ensureDefined)(this._groupById(e));this._controller.setGroupLock(i,t)}getGroupName(e){return Object(r.ensureDefined)(this._groupById(e)).name()}setGroupName(e,t){const i=Object(r.ensureDefined)(this._groupById(e));this._controller.setGroupName(i,t)}canBeGroupped(e){const t=e.map(e=>Object(r.ensureNotNull)(this._model.dataSourceForId(e)));return!t.some(e=>!Object(n.isLineTool)(e))&&this._controller.canBeGroupped(t)}_groupById(e){return this._controller.groups().find(t=>t.id===e)}}},lTLF:function(e,t,i){"use strict";i.r(t);var s=i("Hr11");class r{constructor(e,t){if(this._base=e,this._integralDividers=t,Object(s.isBaseDecimal)(this._base))this._fractionalDividers=[2,2.5,2];else{this._fractionalDividers=[];for(let e=this._base;1!==e;){if(e%2==0)this._fractionalDividers.push(2),e/=2;else{if(e%5!=0)throw new Error("unexpected base");this._fractionalDividers.push(2),this._fractionalDividers.push(2.5),e/=5}if(this._fractionalDividers.length>100)throw new Error("something wrong with base")}}}tickSpan(e,t,i){const r=0===this._base?0:1/this._base;let n=Math.pow(10,Math.max(0,Math.ceil(Object(s.log10)(e-t)))),o=0,a=this._integralDividers[0];for(;;){ -const e=Object(s.greaterOrEqual)(n,r,1e-9)&&n>r+1e-9,t=Object(s.greaterOrEqual)(n,i*a,1e-9),l=Object(s.greaterOrEqual)(n,1,1e-9);if(!(e&&t&&l))break;n/=a,a=this._integralDividers[++o%this._integralDividers.length]}if(n<=r+1e-9&&(n=r),n=Math.max(1,n),this._fractionalDividers.length>0&&Object(s.equal)(n,1,1e-9))for(o=0,a=this._fractionalDividers[0];Object(s.greaterOrEqual)(n,i*a,1e-9)&&n>r+1e-9;)n/=a,a=this._fractionalDividers[++o%this._fractionalDividers.length];return n}}i.d(t,"PriceTickMarkBuilder",(function(){return n}));class n{constructor(e,t,i,s){this._marks=null,this._priceScale=e,this._base=t,this._coordinateToLogicalFunc=i,this._logicalToCoordinateFunc=s}base(){return this._base}setBase(e){if(e<0)throw new Error("base < 0");this._base=e}tickSpan(e,t,i=0){if(ei&&(c=h);const u=a.tickSpan(e,t,n);u>i&&(c=Math.min(c,u));const d=l.tickSpan(e,t,n);return d>i&&(c=Math.min(c,d)),c>0?c:e-t}rebuildTickMarks(){this._marks=null}marks(){return null===this._marks&&(this._marks=this._rebuildTickMarksImpl()),this._marks}_fontHeight(){return this._priceScale.fontSize()}_tickMarkHeight(){return Math.ceil(2.5*this._fontHeight())}_rebuildTickMarksImpl(){const e=this._priceScale,t=[],i=e.mainSource();if(e.isEmpty()||null===i)return{withoutEndingZerosIfPossible:[],full:[]};let s=i.firstValue();null===s&&(s=0);const r=e.height(),n=this._coordinateToLogicalFunc(r-1,s),o=this._coordinateToLogicalFunc(0,s),a=Math.max(n,o),l=Math.min(n,o);if(a===l)return{withoutEndingZerosIfPossible:[],full:[]};let c=this.tickSpan(a,l),h=a%c;h+=h<0?c:0;const u=a>=l?1:-1;let d=null;const p=e.formatter(),_=[];let m=!1,f=NaN;for(let g=a-h;g>l;g-=c){g===f&&(c=this.tickSpan(a,l,c)),f=g;const i=this._logicalToCoordinateFunc(g,s);if(null!==d&&Math.abs(i-d)=3600&&(o=f(Math.floor(n/3600))),n%=3600;const a=f(Math.floor(n/60));n%=60;const l=f(Math.floor(n));return null!==o?`${o}:${a}:${l}`:`${a}:${l}`}_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const s=this._source.properties();if(12===s.style.value())return;if(this._options.visibleOnHistoryOnly){const e=this._model.timeScale().visibleBarsStrictRange(),t=this._source.data().last();if(null===e||null===t||e.contains(t.index))return}const r=this._model.properties().scalesProperties;let n=r.showSeriesLastValue.value(),o=this._isCountdownEnabled()&&-1!==g.indexOf(s.style.value())&&s.showCountdown.value(),a=this._options.showSymbolLabel&&r.showSymbolLabels.value();const l=r.seriesLastValueMode.value()===m.PriceAxisLastValueMode.LastPriceAndPercentageValue,c=this._source.lastValueData(void 0,this._options.alwaysShowGlobalLast);if(c.noData)return;const h=8===s.style.value();if((n||o||a)&&h&&s.haStyle.showRealLastPrice.value()){const e=this._source.lastValueData(void 0,!1),t=this._source.lastValueData(void 0,!0);e.noData||t.noData||e.index!==t.index||(n=!1,o=!1,a=!1)}if(n||o){const t=this._axisFirstLineText(c,n);e.text=t,i.textColor=this.generateTextColor(i.background),e.textColor=i.textColor;const s=this._source.priceScale().isPercentage(),r=n&&l?s?c.formattedPriceAbsolute:c.formattedPricePercentage:"";e.secondLine=r,i.secondLineTextColor=i.textColor;const a=o?this._countdownText():"";this._previousCountdown=a,e.thirdLine=a,i.thirdLineTextColor=Object(u.generateColor)(i.textColor,25),0===t.length&&0===r.length&&0===a.length||(e.visible=!0)}a&&(t.text=this._paneText(a),t.visible=t.text.length>0),i.background=this._source.priceLineColor(c.color),i.coordinate=c.coordinate,i.floatCoordinate=c.floatCoordinate}_paneText(e){let t="";const i=this._source.symbolInfo();if(v)t+=i?i.exchange+" ":"";else if(e){let e=i&&Object(a.symbolCurrentContract)(i)||this._source.getSymbolName();e.length>40&&(e=e.substr(0,37)+"..."),t+=e+" "}return t.trim()}_axisFirstLineText(e,t){return t?e.text:""}_currentTime(){return Date.now()+1e3*this._source.serverTimeOffset()}}var y=i("TmNs"),w=i("k9/m");class C extends S{lastPrice(){return this._getSource().data().lastProjectionPrice}_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const s=this._getModel(),r=this._getSource(),n=r.priceScale(),o=s.timeScale(),a=this.lastPrice();if(o.isEmpty()||n.isEmpty()||void 0===a)return;const l=o.visibleBarsStrictRange();if(null===l)return;const c=l.firstBar(),d=l.lastBar(),p=r.data(),_=p.search(d,w.PlotRowSearchMode.NearestLeft);if(null===_)return;const f=r.nearestIndex(c,w.PlotRowSearchMode.NearestRight);if(void 0===f)return +const e=Object(s.greaterOrEqual)(n,r,1e-14)&&n>r+1e-14,t=Object(s.greaterOrEqual)(n,i*a,1e-14),l=Object(s.greaterOrEqual)(n,1,1e-14);if(!(e&&t&&l))break;n/=a,a=this._integralDividers[++o%this._integralDividers.length]}if(n<=r+1e-14&&(n=r),n=Math.max(1,n),this._fractionalDividers.length>0&&Object(s.equal)(n,1,1e-14))for(o=0,a=this._fractionalDividers[0];Object(s.greaterOrEqual)(n,i*a,1e-14)&&n>r+1e-14;)n/=a,a=this._fractionalDividers[++o%this._fractionalDividers.length];return n}}i.d(t,"PriceTickMarkBuilder",(function(){return n}));class n{constructor(e,t,i,s){this._marks=null,this._priceScale=e,this._base=t,this._coordinateToLogicalFunc=i,this._logicalToCoordinateFunc=s}base(){return this._base}setBase(e){if(e<0)throw new Error("base < 0");this._base=e}tickSpan(e,t,i=0){if(ei&&(c=h);const u=a.tickSpan(e,t,n);u>i&&(c=Math.min(c,u));const d=l.tickSpan(e,t,n);return d>i&&(c=Math.min(c,d)),c>0?c:e-t}rebuildTickMarks(){this._marks=null}marks(){return null===this._marks&&(this._marks=this._rebuildTickMarksImpl()),this._marks}_fontHeight(){return this._priceScale.fontSize()}_tickMarkHeight(){return Math.ceil(2.5*this._fontHeight())}_rebuildTickMarksImpl(){const e=this._priceScale,t=[],i=e.mainSource();if(e.isEmpty()||null===i)return{withoutEndingZerosIfPossible:[],full:[]};let s=i.firstValue();null===s&&(s=0);const r=e.height(),n=this._coordinateToLogicalFunc(r-1,s),o=this._coordinateToLogicalFunc(0,s),a=Math.max(n,o),l=Math.min(n,o);if(a===l)return{withoutEndingZerosIfPossible:[],full:[]};let c=this.tickSpan(a,l),h=a%c;h+=h<0?c:0;const u=a>=l?1:-1;let d=null;const p=e.formatter(),_=[];let m=!1,f=NaN;for(let g=a-h;g>l;g-=c){g===f&&(c=this.tickSpan(a,l,c)),f=g;const i=this._logicalToCoordinateFunc(g,s);if(null!==d&&Math.abs(i-d)=3600&&(o=f(Math.floor(n/3600))),n%=3600;const a=f(Math.floor(n/60));n%=60;const l=f(Math.floor(n));return null!==o?`${o}:${a}:${l}`:`${a}:${l}`}_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const s=this._source.properties();if(12===s.style.value())return;if(this._options.visibleOnHistoryOnly){const e=this._model.timeScale().visibleBarsStrictRange(),t=this._source.data().last();if(null===e||null===t||e.contains(t.index))return}const r=this._model.properties().scalesProperties;let n=r.showSeriesLastValue.value(),o=this._isCountdownEnabled()&&-1!==g.indexOf(s.style.value())&&s.showCountdown.value(),a=this._options.showSymbolLabel&&r.showSymbolLabels.value();const l=r.seriesLastValueMode.value()===m.PriceAxisLastValueMode.LastPriceAndPercentageValue,c=this._source.lastValueData(void 0,this._options.alwaysShowGlobalLast);if(c.noData)return;const h=8===s.style.value();if((n||o||a)&&h&&s.haStyle.showRealLastPrice.value()){const e=this._source.lastValueData(void 0,!1),t=this._source.lastValueData(void 0,!0);e.noData||t.noData||e.index!==t.index||(n=!1,o=!1,a=!1)}if(n||o){const t=this._axisFirstLineText(c,n);e.text=t,i.textColor=this.generateTextColor(i.background),e.textColor=i.textColor;const s=this._source.priceScale().isPercentage(),r=n&&l?s?c.formattedPriceAbsolute:c.formattedPricePercentage:"";e.secondLine=r,i.secondLineTextColor=i.textColor;const a=o?this._countdownText():"";this._previousCountdown=a,e.thirdLine=a,i.thirdLineTextColor=Object(u.generateColor)(i.textColor,25),0===t.length&&0===r.length&&0===a.length||(e.visible=!0)}a&&(t.text=this._paneText(a),t.visible=t.text.length>0),i.background=this._source.priceLineColor(c.color),i.coordinate=c.coordinate,i.floatCoordinate=c.floatCoordinate}_paneText(e){let t="";const i=this._source.symbolInfo();if(v)t+=i?i.exchange+" ":"";else if(e){let e=i&&Object(a.symbolCurrentContract)(i)||this._source.getSymbolName();e.length>40&&(e=e.substr(0,37)+"..."),t+=e+" "}return t.trim()}_axisFirstLineText(e,t){return t?e.text:""}_currentTime(){return Date.now()+1e3*this._source.serverTimeOffset()}}var y=i("TmNs"),w=i("k9/m");class C extends S{lastPrice(){return this._getSource().data().lastProjectionPrice}_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const s=this._getModel(),r=this._getSource(),n=r.priceScale(),o=s.timeScale(),a=this.lastPrice();if(o.isEmpty()||n.isEmpty()||void 0===a)return;const l=o.visibleBarsStrictRange();if(null===l)return;const c=l.firstBar(),d=l.lastBar(),p=r.data(),_=p.search(d,w.PlotRowSearchMode.NearestLeft);if(null===_)return;const f=r.nearestIndex(c,w.PlotRowSearchMode.NearestRight);if(void 0===f)return ;const g=r.model().properties().scalesProperties,v=Object(h.ensureNotNull)(p.valueAt(f))[TradingView.CLOSE_PLOT];let b=i.background,S=g.showSeriesLastValue.value(),y=!1,C=!1,P=!1;const x=r.lastValueData(TradingView.CLOSE_PLOT,!1),T=r.properties();if(8===T.style.value()&&T.haStyle.showRealLastPrice.value()){const e=r.lastValueData(TradingView.CLOSE_PLOT,!0);if(e.noData||e.color===i.background||(b=e.color),!e.noData&&!x.noData){const t=e.index===x.index;y=t&&g.showSymbolLabels.value(),C=g.seriesLastValueMode.value()===m.PriceAxisLastValueMode.LastPriceAndPercentageValue,S=S&&t,P=t&&this._isCountdownEnabled()&&T.showCountdown.value()}}else{b=r.barColorer().barStyle(_.index,!0).barColor}if(i.background=b,i.textColor=this.generateTextColor(b),i.secondLineTextColor=i.textColor,i.thirdLineTextColor=Object(u.generateColor)(i.textColor,25),i.coordinate=n.priceToCoordinate(a,v),e.visible=S||P,!x.noData){x.text=n.formatPrice(a,v),x.formattedPriceAbsolute=n.formatPriceAbsolute(a),x.formattedPricePercentage=n.formatPricePercentage(a,v),e.text=this._axisFirstLineText(x,S);const i=r.priceScale().isPercentage();e.secondLine=S&&C?i?x.formattedPriceAbsolute:x.formattedPricePercentage:"",e.thirdLine=P?this._countdownText():"",t.text=this._paneText(y)}t.visible=y}}var P=i("KtbP"),x=i("YFKU"),T=i("2ijp"),M=i("HGP3"),I=i("8Uy/");const L={light:{lineStyle:I.LINESTYLE_DOTTED,lineWidth:1,textColor:M.a["color-cold-gray-900"],backgroundColor:M.a["color-tv-blue-50"],lineColor:M.a["color-cold-gray-500"]},dark:{lineStyle:I.LINESTYLE_DOTTED,lineWidth:1,textColor:M.a["color-white"],backgroundColor:M.a["color-tv-blue-a800"],lineColor:M.a["color-cold-gray-500"]}};function O(e){return e?L.dark:L.light}class A extends T.a{constructor(e,t,i){super(),this._model=e,this._isVisible=t,this._getValue=i}_updateImpl(){const e=this._lineRendererData;if(e.visible=!1,!this._isVisible.value())return;const t=this._model.mainSeries(),i=t.priceScale(),s=t.firstValue(),r=this._getValue();if(null===s||null===r)return;const n=O(this._model.isDark());e.visible=!0,e.y=i.priceToCoordinate(r,s),e.linestyle=n.lineStyle,e.linewidth=n.lineWidth,e.color=n.lineColor}}class E extends p.a{constructor(e,t,i,s){super(),this._model=e,this._label=t,this._isVisible=i,this._getValue=s}_updateRendererData(e,t,i){if(e.visible=!1,t.visible=!1,!this._isVisible.value())return;const s=this._model.mainSeries(),r=s.priceScale(),n=s.firstValue(),o=this._getValue();if(null===n||null===o)return;const a=O(this._model.isDark());e.visible=!0,t.visible=!0,e.text=r.formatPriceAbsolute(o),t.text=this._label,i.coordinate=r.priceToCoordinate(o,n),i.background=a.backgroundColor,i.textColor=a.textColor}}class k extends y.PriceLineAxisView{constructor(e,t,i){super(),this._model=e,this._isLineVisible=t,this._getValue=i}_isVisible(){return this._isLineVisible.value()}_lineWidth(){return O(this._model.isDark()).lineWidth}_lineStyle(){return O(this._model.isDark()).lineStyle}_priceLineColor(e){return O(this._model.isDark()).lineColor}_value(){ const e=this._model.mainSeries(),t=e.priceScale(),i=e.firstValue(),s=this._getValue();if(null===i||null===s)return{noData:!0};const r=t.priceToCoordinate(s,i);return{noData:!1,floatCoordinate:r,coordinate:r,color:"",formattedPricePercentage:"",formattedPriceAbsolute:"",text:"",index:0}}}const D=Object(x.t)("High"),V=Object(x.t)("Low"),B=Object(x.t)("Avg");function R(e,t,i,s,r,n){const o=new A(e,r,n),a=new E(e,i,s,n);return{paneView:o,panePriceAxisView:new P.PanePriceAxisView(a,t,e),priceAxisView:a,priceLineAxisView:new k(e,r,n)}}var N=i("C2K+"),j=i("WPIy"),F=i("aIyQ"),W=i.n(F),H=i("ogJP"),z=i("xDuj");i.d(t,"SeriesBase",(function(){return q}));const U=_.enabled("price_scale_always_last_bar_value"),G={countdownEnabled:!0};class q extends s.PriceDataSource{constructor(e,t,i){super(e),this.extendedHours=new o.a,this.requestingIntradayWhenNotSupported=new W.a,this.requestingResolutionWhenNotSupported=new W.a,this._paneView=null,this._priceStep=null,this._symbolInfo=null,this._isPrePostMarketPricesForbiddenProperty=new o.a(!0),this._highLowAvgPriceCache=new Map,this._prevClosePriceAxisView=null,this._priceScaleChanged=new W.a,this._priceScaleAboutToBeChanged=new W.a,this._currency=null,this._unit=null,this._base=100,this._pointValue=1,this._formatter=new l.PriceFormatter(this._base),this._ignoreMinMoveFormatter=new l.PriceFormatter(this._base),this._ignoreMinMovePriceStep=null,this._lastBarCloseTime=null,this._quotesProvider=new c.a,this._quotesProvider.quotesUpdate().subscribe(this,this._onQuotesUpdate),this._setProperties(t),this._options=Object(H.merge)(Object(H.clone)(G),i);const s=new S(this,e,{alwaysShowGlobalLast:!0,showCountdown:i.countdownEnabled});this._priceAxisView=s;let r=null;U||(r=new S(this,e,{visibleOnHistoryOnly:!0,showSymbolLabel:!1,showCountdown:!1,alwaysShowGlobalLast:!1})),this._priceLinePriceAxisView=new y.SeriesPriceLineAxisView(this),this._priceLineAxisViews=[this._priceLinePriceAxisView];const n=new C(this,e,{showCountdown:i.countdownEnabled});this._priceAxisViews=[s,n],null!==r&&this._priceAxisViews.push(r),this._panePriceAxisView=new P.PanePriceAxisView(s,this,e),this._historyPricePanePriceAxisView=null!==r?new P.PanePriceAxisView(r,this,e):null,this._projectionPriceAxisView=new P.PanePriceAxisView(n,this,e),this._labelPaneViews=[this._panePriceAxisView,this._projectionPriceAxisView],null!==this._historyPricePanePriceAxisView&&this._labelPaneViews.push(this._historyPricePanePriceAxisView),this._highLowAvgPaneViews=[],this._createHighLowAvgViews()}destroy(){this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._model.timeScale().visibleBarsStrictRangeChanged().unsubscribeAll(this)}quotesProvider(){return this._quotesProvider}labelPaneViews(){return this._labelPaneViews}clearHighLowAvgPriceCache(){this._highLowAvgPriceCache.clear()}priceScaleChanged(){return this._priceScaleChanged}priceScaleAboutToBeChanged(){return this._priceScaleAboutToBeChanged}symbolInfo(){return this._symbolInfo}symbolResolved(){return this.dataEvents().symbolResolved()}formatter(e=!0){ return e?this._formatter:this._ignoreMinMoveFormatter}priceStep(e=!0){return e?this._priceStep:this._ignoreMinMovePriceStep}prevClose(){if(this.priceScale().isEmpty()||this.data().isEmpty())return null;const e=this.quotes(),t=this.firstValue();if(null===e||null===t)return null;const i=e.prev_close_price;return void 0===i?null:{coordinate:this.priceScale().priceToCoordinate(i,t),floatCoordinate:this.priceScale().priceToCoordinate(i,t),text:this.priceScale().formatPrice(i,t)}}hasClosePrice(){return 12!==this.properties().style.value()}nearestValue(e,t,i){const s=this.nearestData(e,i);return s?s.value[t]:void 0}autoScaleInfo(e,t){const i=this.priceRange(e,t);if(null===this._paneView)return{range:i};const s=this._paneView;return{range:i,topPixelMargin:s.topPixelMargin?s.topPixelMargin():void 0,bottomPixelMargin:s.bottomPixelMargin?s.bottomPixelMargin():void 0}}isPrePostMarketPricesForbiddenProperty(){return this._isPrePostMarketPricesForbiddenProperty}quotes(){return this.data().isEmpty()?null:this._quotesProvider.quotes()}base(){return this._base}pointValue(){return this._pointValue}barCloseTime(){return this._lastBarCloseTime}setSymbol(e){return this.properties().symbol.setValue(e)}currency(){return this.properties().currencyId.value()||null}setCurrency(e){this.properties().currencyId.setValue(e)}isConvertedToOtherCurrency(){return Object(a.isConvertedToOtherCurrency)(this.symbolInfo())}unit(){return this.properties().unitId.value()||null}setUnit(e){this.properties().unitId.setValue(e)}isConvertedToOtherUnit(){return Object(a.isConvertedToOtherUnit)(this.symbolInfo())}symbolSource(){return this}title(){return this.symbolTitle()}symbolTitle(e,t){let i=this.properties().symbol.value();const s=this.symbolInfo();return null!==s&&(i=Object(a.symbolTitle)(s,e)),t?i:`${i}, ${Object(z.translatedIntervalString)(this.properties().interval.value())}`}valuesProvider(){return new N.a(this,this.model())}statusProvider(e){return new j.a(this,this._model.properties().scalesProperties.textColor,this.properties().statusViewStyle,e)}open(e){const t=this.data().valueAt(e);return t&&t[1]}high(e){const t=this.data().valueAt(e);return t&&t[2]}low(e){const t=this.data().valueAt(e);return t&&t[3]}close(e){const t=this.data().valueAt(e);return t&&t[4]}moveItem(e,t,i){if(10===this.style()&&0===t){const t=this.priceScale(),i=this.properties().baselineStyle,s=t.height(),r=100-e.y/s*100,n=r<0?0:Math.round(10*r)/10;i.baseLevelPercentage.setValue(Math.max(Math.min(n,100),0))}}_isExtendedHoursAllowed(){return Boolean(this._symbolInfo&&this._symbolInfo.has_extended_hours)}_recreateFormatter(){this._formatter=Object(a.createSeriesFormatter)(this.symbolInfo(),this.properties().minTick.value()),this._ignoreMinMoveFormatter=Object(a.createSeriesFormatter)(this.symbolInfo(),this.properties().minTick.value(),!0),this.priceScale()&&this.priceScale().updateFormatter(),this._formatterChanged.fire()}_recreatePriceStep(){const{minMove:e,priceScale:t}=Object(a.getSeriesPriceFormattingState)(this.symbolInfo()),i=e/t;this._ignoreMinMovePriceStep=1/t, diff --git a/charting_library/bundles/runtime.844af55810a62567ba17.js b/charting_library/bundles/runtime.753eaaf1a2984697bcd9.js similarity index 99% rename from charting_library/bundles/runtime.844af55810a62567ba17.js rename to charting_library/bundles/runtime.753eaaf1a2984697bcd9.js index c3701d72..f831f8b0 100644 --- a/charting_library/bundles/runtime.844af55810a62567ba17.js +++ b/charting_library/bundles/runtime.753eaaf1a2984697bcd9.js @@ -2,5 +2,5 @@ 75:"7167ae4b5df4a1cf1e6b",76:"ac43a4da3d4d5b6f146e",77:"936093c60d857e8370c3",78:"7dfdb6f5096ed76328a2",79:"79dec51744645d57c739",80:"c6bb56bdd0c6d258b01a",81:"06dac836ce0117e9dcc8",82:"f20c731b293bca89b8ec",83:"d96b2016ec1dce063c10",84:"132e359d31cab0497a34",85:"141aaa3eb70e11706399",86:"f068358284cb992f14f4",87:"008da392d49e6905a9cd",88:"96967f45d1735bc64868",89:"571d44f72438bbeb3e51",90:"5ed5f531f60e763f2bf5",91:"58474eaaac241acb177a",92:"9d56ab0d8cccc39f28bc",93:"69ae8eec1b9033468a67",94:"317a27112e67c1d73c58",95:"65ce0cb01e7408bacf98",96:"8f574331c5f7254e658c",97:"f12f0e29d96e5e661d75",98:"9c85c8939af4a700b040",99:"d8aef69d7a7bc6b5d604",100:"1a1c3c422103b437ee0d","general-property-page":"31d6cfe0d16ae931b73c","study-property-pages-with-definitions":"31d6cfe0d16ae931b73c","lt-property-pages-with-definitions":"31d6cfe0d16ae931b73c","change-interval-dialog":"31d6cfe0d16ae931b73c",symbolsearch:"31d6cfe0d16ae931b73c","chart-widget-gui":"31d6cfe0d16ae931b73c","dialogs-core":"a032f8a90410cefb4e1b","create-dialog":"31d6cfe0d16ae931b73c","add-compare-dialog":"31d6cfe0d16ae931b73c","export-data":"31d6cfe0d16ae931b73c","lt-pane-views":"31d6cfe0d16ae931b73c",react:"31d6cfe0d16ae931b73c","simple-dialog":"31d6cfe0d16ae931b73c","new-edit-object-dialog":"31d6cfe0d16ae931b73c","new-confirm-inputs-dialog":"31d6cfe0d16ae931b73c","go-to-date-dialog-impl":"31d6cfe0d16ae931b73c","currency-label-menu":"31d6cfe0d16ae931b73c","study-template-dialog":"31d6cfe0d16ae931b73c","study-market":"31d6cfe0d16ae931b73c","line-tools-icons":"31d6cfe0d16ae931b73c","floating-toolbars":"31d6cfe0d16ae931b73c","restricted-toolset":"31d6cfe0d16ae931b73c","drawing-toolbar":"31d6cfe0d16ae931b73c","symbol-info-dialog-impl":"31d6cfe0d16ae931b73c","chart-bottom-toolbar":"31d6cfe0d16ae931b73c","header-toolbar":"31d6cfe0d16ae931b73c","take-chart-image-dialog-impl":"31d6cfe0d16ae931b73c","context-menu-renderer":"31d6cfe0d16ae931b73c","chart-event-hint":"31d6cfe0d16ae931b73c",redux:"31d6cfe0d16ae931b73c","general-chart-properties-dialog":"31d6cfe0d16ae931b73c","source-properties-editor":"31d6cfe0d16ae931b73c","object-tree-dialog":"31d6cfe0d16ae931b73c","load-chart-dialog":"31d6cfe0d16ae931b73c","symbol-search-dialog":"31d6cfe0d16ae931b73c","series-pane-views":"31d6cfe0d16ae931b73c","study-pane-views":"31d6cfe0d16ae931b73c","lazy-jquery-ui":"31d6cfe0d16ae931b73c","full-tooltips-popup":"31d6cfe0d16ae931b73c","lazy-velocity":"31d6cfe0d16ae931b73c",hammerjs:"31d6cfe0d16ae931b73c","custom-intervals-add-dialog":"31d6cfe0d16ae931b73c",clipboard:"31d6cfe0d16ae931b73c","show-theme-save-dialog":"31d6cfe0d16ae931b73c","manage-drawings-dialog":"31d6cfe0d16ae931b73c","series-icons-map":"31d6cfe0d16ae931b73c"}[e]+("rtl"===document.dir?".rtl.css":".css"),t=o.p+c,f=document.getElementsByTagName("link"),r=0;rthis._innerWindow().headerReady()))}onGrayedObjectClicked(e){this._innerAPI().onGrayedObjectClicked(e)}onShortcut(e,t){this._innerWindow().createShortcutAction(e,t)}subscribe(e,t){this._innerAPI().subscribe(e,t)}unsubscribe(e,t){this._innerAPI().unsubscribe(e,t)}chart(e){return this._innerAPI().chart(e)}getLanguage(){return this._options.locale}setSymbol(e,t,i){this._innerAPI().changeSymbol(e,t,i)}remove(){window.removeEventListener("resize",this._onWindowResize),this._readyHandlers.splice(0,this._readyHandlers.length),delete window[this._id],this._iFrame.parentNode&&this._iFrame.parentNode.removeChild(this._iFrame)}closePopupsAndDialogs(){this._innerAPI().closePopupsAndDialogs()}selectLineTool(e){this._innerAPI().selectLineTool(e)}selectedLineTool(){return this._innerAPI().selectedLineTool()}save(e){this._innerAPI().saveChart(e)}load(e,t){this._innerAPI().loadChart({json:e,extendedData:t})}getSavedCharts(e){this._innerAPI().getSavedCharts(e)}loadChartFromServer(e){this._innerAPI().loadChartFromServer(e)}saveChartToServer(e,t,i){this._innerAPI().saveChartToServer(e,t,i)}removeChartFromServer(e,t){this._innerAPI().removeChartFromServer(e,t)}onContextMenu(e){this._innerAPI().onContextMenu(e)}createButton(e){return this._innerWindow().createButton(e)}showNoticeDialog(e){this._innerAPI().showNoticeDialog(e)}showConfirmDialog(e){this._innerAPI().showConfirmDialog(e)}showLoadChartDialog(){this._innerAPI().showLoadChartDialog()}showSaveAsChartDialog(){this._innerAPI().showSaveAsChartDialog()}symbolInterval(){return this._innerAPI().getSymbolInterval()}mainSeriesPriceFormatter(){return this._innerAPI().mainSeriesPriceFormatter()}getIntervals(){return this._innerAPI().getIntervals()}getStudiesList(){return this._innerAPI().getStudiesList()}addCustomCSSFile(e){this._innerWindow().addCustomCSSFile(e)}applyOverrides(t){this._options=e(this._options,{overrides:t}),this._innerWindow().applyOverrides(t)}applyStudiesOverrides(e){this._innerWindow().applyStudiesOverrides(e)}watchList(){return this._innerAPI().watchlist()}activeChart(){return this._innerAPI().activeChart()}chartsCount(){return this._innerAPI().chartsCount()}layout(){return this._innerAPI().layout()}setLayout(e){this._innerAPI().setLayout(e)}layoutName(){return this._innerAPI().layoutName()}changeTheme(e,t){this._innerWindow().changeTheme(e,t)}getTheme(){return this._innerWindow().getTheme()}takeScreenshot(){this._innerAPI().takeScreenshot()}lockAllDrawingTools(){return this._innerAPI().lockAllDrawingTools()}hideAllDrawingTools(){return this._innerAPI().hideAllDrawingTools()}drawOnAllCharts(e){this._innerAPI().drawOnAllCharts(e)}magnetEnabled(){return this._innerAPI().magnetEnabled()}magnetMode(){return this._innerAPI().magnetMode()}undoRedoState(){return this._innerAPI().undoRedoState()}setIntervalLinkingEnabled(e){this._innerAPI().setIntervalLinkingEnabled(e)}setTimeFrame(e){this._innerAPI().setTimeFrame(e)}symbolSync(){return this._innerAPI().symbolSync()}intervalSync(){return this._innerAPI().intervalSync()}crosshairSync(){return this._innerAPI().crosshairSync()}timeSync(){return this._innerAPI().timeSync()}getAllFeatures(){return this._innerWindow().getAllFeatures()}clearUndoHistory(){return this._innerAPI().clearUndoHistory()}undo(){return this._innerAPI().undo()}redo(){return this._innerAPI().redo()}startFullscreen(){this._innerAPI().startFullscreen()}exitFullscreen(){this._innerAPI().exitFullscreen()}takeClientScreenshot(e){return this._innerAPI().takeClientScreenshot(e)}_innerAPI(){return this._innerWindow().tradingViewApi}_innerWindow(){return this._iFrame.contentWindow}_autoResizeChart(){this._options.fullscreen&&(this._iFrame.style.height=window.innerHeight+"px")}_create(){const e=this._render();this._options.container_id&&console.warn("`container_id` is now deprecated. Please use `container` instead to either still pass a string or an `HTMLElement`.");const t=this._options.container_id||this._options.container,i="string"==typeof t?document.getElementById(t):t;if(null===i)throw new Error(`There is no such element - #${this._options.container}`);i.innerHTML=e,this._iFrame=i.querySelector(`#${this._id}`);const n=this._iFrame;(this._options.autosize||this._options.fullscreen)&&(n.style.width="100%",this._options.fullscreen||(n.style.height="100%")),window.addEventListener("resize",this._onWindowResize),this._onWindowResize(),this._innerWindowLoaded=new Promise((e=>{const t=()=>{n.removeEventListener("load",t,!1),e()};n.addEventListener("load",t,!1)})),this._innerWindowLoaded.then((()=>{this._innerWindow().widgetReady((()=>{this._ready=!0;for(const t of this._readyHandlers)try{t.call(this)}catch(e){console.error(e)}this._innerWindow().initializationFinished()}))}))}_render(){const e=window;if(e[this._id]={datafeed:this._options.datafeed,customFormatters:this._options.custom_formatters||this._options.customFormatters,brokerFactory:this._options.broker_factory||this._options.brokerFactory,overrides:this._options.overrides,studiesOverrides:this._options.studies_overrides,tradingCustomization:this._options.trading_customization,disabledFeatures:this._options.disabled_features,enabledFeatures:this._options.enabled_features,brokerConfig:this._options.broker_config||this._options.brokerConfig,restConfig:this._options.restConfig,favorites:this._options.favorites,logo:this._options.logo,numeric_formatting:this._options.numeric_formatting,rss_news_feed:this._options.rss_news_feed,newsProvider:this._options.news_provider,loadLastChart:this._options.load_last_chart,saveLoadAdapter:this._options.save_load_adapter,loading_screen:this._options.loading_screen,settingsAdapter:this._options.settings_adapter,getCustomIndicators:this._options.custom_indicators_getter,additionalSymbolInfoFields:this._options.additional_symbol_info_fields,headerWidgetButtonsMode:this._options.header_widget_buttons_mode},this._options.saved_data)e[this._id].chartContent={json:this._options.saved_data},this._options.saved_data_meta_info&&(e[this._id].chartContentExtendedData=this._options.saved_data_meta_info);else if(!this._options.load_last_chart&&!this._options.symbol)throw new Error("Symbol is not defined: either 'symbol' or 'load_last_chart' option must be set");const t=(this._options.library_path||"")+`${encodeURIComponent(this._options.locale)}-tv-chart.ad2f4a55.html#symbol=`+encodeURIComponent(this._options.symbol||"")+"&interval="+encodeURIComponent(this._options.interval)+(this._options.timeframe?"&timeframe="+encodeURIComponent(this._options.timeframe):"")+(this._options.toolbar_bg?"&toolbarbg="+encodeURIComponent(this._options.toolbar_bg.replace("#","")):"")+(this._options.studies_access?"&studiesAccess="+encodeURIComponent(JSON.stringify(this._options.studies_access)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this._options.widgetbar))+(this._options.drawings_access?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this._options.drawings_access)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this._options.time_frames))+"&locale="+encodeURIComponent(this._options.locale)+"&uid="+encodeURIComponent(this._id)+"&clientId="+encodeURIComponent(String(this._options.client_id))+"&userId="+encodeURIComponent(String(this._options.user_id))+(this._options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this._options.charts_storage_url):"")+(this._options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this._options.charts_storage_api_version):"")+(this._options.custom_css_url?"&customCSS="+encodeURIComponent(this._options.custom_css_url):"")+(this._options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(String(this._options.auto_save_delay)):"")+"&debug="+encodeURIComponent(String(this._options.debug))+(this._options.snapshot_url?"&snapshotUrl="+encodeURIComponent(this._options.snapshot_url):"")+(this._options.timezone?"&timezone="+encodeURIComponent(this._options.timezone):"")+(this._options.study_count_limit?"&studyCountLimit="+encodeURIComponent(String(this._options.study_count_limit)):"")+(this._options.symbol_search_request_delay?"&ssreqdelay="+encodeURIComponent(String(this._options.symbol_search_request_delay)):"")+(this._options.compare_symbols?"&compareSymbols="+encodeURIComponent(JSON.stringify(this._options.compare_symbols)):"")+(this._options.theme?"&theme="+encodeURIComponent(String(this._options.theme)):"")+(this._options.header_widget_buttons_mode?"&header_widget_buttons_mode="+encodeURIComponent(String(this._options.header_widget_buttons_mode)):"")+(this._options.time_scale?"&time_scale="+encodeURIComponent(JSON.stringify(this._options.time_scale)):"");return''}};window.TradingView=window.TradingView||{},window.TradingView.version=n,exports.version=n,exports.widget=o; +"use strict";function e(t,i){const n=Object.assign({},t);for(const o in i)"object"!=typeof t[o]||null===t[o]||Array.isArray(t[o])?void 0!==i[o]&&(n[o]=i[o]):n[o]=e(t[o],i[o]);return n}Object.defineProperty(exports,"__esModule",{value:!0});const t={mobile:{disabled_features:["left_toolbar","header_widget","timeframes_toolbar","edit_buttons_in_legend","context_menus","control_bar","border_around_the_chart"],enabled_features:[]}},i={width:800,height:500,interval:"1D",timezone:"Etc/UTC",container:"",library_path:"",locale:"en",widgetbar:{details:!1,watchlist:!1,watchlist_settings:{default_symbols:[]}},overrides:{"mainSeriesProperties.showCountdown":!1},studies_overrides:{},trading_customization:{position:{},order:{}},brokerConfig:{configFlags:{}},fullscreen:!1,autosize:!1,disabled_features:[],enabled_features:[],debug:!1,logo:{},time_frames:[{text:"5y",resolution:"1W"},{text:"1y",resolution:"1W"},{text:"6m",resolution:"120"},{text:"3m",resolution:"60"},{text:"1m",resolution:"30"},{text:"5d",resolution:"5"},{text:"1d",resolution:"1"}],client_id:"0",user_id:"0",charts_storage_api_version:"1.0",favorites:{intervals:[],chartTypes:[]}};function n(){return"CL v20.033 (internal id 9df149da @ 2021-11-17T10:20:51.511Z)"}const o=class{constructor(n){if(this._id=`tradingview_${(1048576*(1+Math.random())|0).toString(16).substring(1)}`,this._ready=!1,this._readyHandlers=[],this._onWindowResize=this._autoResizeChart.bind(this),!n.datafeed)throw new Error("Datafeed is not defined");if(this._options=e(i,n),n.preset){const e=t[n.preset];e?(void 0!==this._options.disabled_features?this._options.disabled_features=this._options.disabled_features.concat(e.disabled_features):this._options.disabled_features=e.disabled_features,void 0!==this._options.enabled_features?this._options.enabled_features=this._options.enabled_features.concat(e.enabled_features):this._options.enabled_features=e.enabled_features):console.warn("Unknown preset: `"+n.preset+"`")}"Dark"===this._options.theme&&void 0===this._options.loading_screen&&(this._options.loading_screen={backgroundColor:"#131722"}),this._create()}onChartReady(e){this._ready?e.call(this):this._readyHandlers.push(e)}headerReady(){return this._innerWindowLoaded.then((()=>this._innerWindow().headerReady()))}onGrayedObjectClicked(e){this._innerAPI().onGrayedObjectClicked(e)}onShortcut(e,t){this._innerWindow().createShortcutAction(e,t)}subscribe(e,t){this._innerAPI().subscribe(e,t)}unsubscribe(e,t){this._innerAPI().unsubscribe(e,t)}chart(e){return this._innerAPI().chart(e)}getLanguage(){return this._options.locale}setSymbol(e,t,i){this._innerAPI().changeSymbol(e,t,i)}remove(){window.removeEventListener("resize",this._onWindowResize),this._readyHandlers.splice(0,this._readyHandlers.length),delete window[this._id],this._iFrame.parentNode&&this._iFrame.parentNode.removeChild(this._iFrame)}closePopupsAndDialogs(){this._innerAPI().closePopupsAndDialogs()}selectLineTool(e){this._innerAPI().selectLineTool(e)}selectedLineTool(){return this._innerAPI().selectedLineTool()}save(e){this._innerAPI().saveChart(e)}load(e,t){this._innerAPI().loadChart({json:e,extendedData:t})}getSavedCharts(e){this._innerAPI().getSavedCharts(e)}loadChartFromServer(e){this._innerAPI().loadChartFromServer(e)}saveChartToServer(e,t,i){this._innerAPI().saveChartToServer(e,t,i)}removeChartFromServer(e,t){this._innerAPI().removeChartFromServer(e,t)}onContextMenu(e){this._innerAPI().onContextMenu(e)}createButton(e){return this._innerWindow().createButton(e)}showNoticeDialog(e){this._innerAPI().showNoticeDialog(e)}showConfirmDialog(e){this._innerAPI().showConfirmDialog(e)}showLoadChartDialog(){this._innerAPI().showLoadChartDialog()}showSaveAsChartDialog(){this._innerAPI().showSaveAsChartDialog()}symbolInterval(){return this._innerAPI().getSymbolInterval()}mainSeriesPriceFormatter(){return this._innerAPI().mainSeriesPriceFormatter()}getIntervals(){return this._innerAPI().getIntervals()}getStudiesList(){return this._innerAPI().getStudiesList()}addCustomCSSFile(e){this._innerWindow().addCustomCSSFile(e)}applyOverrides(t){this._options=e(this._options,{overrides:t}),this._innerWindow().applyOverrides(t)}applyStudiesOverrides(e){this._innerWindow().applyStudiesOverrides(e)}watchList(){return this._innerAPI().watchlist()}activeChart(){return this._innerAPI().activeChart()}chartsCount(){return this._innerAPI().chartsCount()}layout(){return this._innerAPI().layout()}setLayout(e){this._innerAPI().setLayout(e)}layoutName(){return this._innerAPI().layoutName()}changeTheme(e,t){this._innerWindow().changeTheme(e,t)}getTheme(){return this._innerWindow().getTheme()}takeScreenshot(){this._innerAPI().takeScreenshot()}lockAllDrawingTools(){return this._innerAPI().lockAllDrawingTools()}hideAllDrawingTools(){return this._innerAPI().hideAllDrawingTools()}drawOnAllCharts(e){this._innerAPI().drawOnAllCharts(e)}magnetEnabled(){return this._innerAPI().magnetEnabled()}magnetMode(){return this._innerAPI().magnetMode()}undoRedoState(){return this._innerAPI().undoRedoState()}setIntervalLinkingEnabled(e){this._innerAPI().setIntervalLinkingEnabled(e)}setTimeFrame(e){this._innerAPI().setTimeFrame(e)}symbolSync(){return this._innerAPI().symbolSync()}intervalSync(){return this._innerAPI().intervalSync()}crosshairSync(){return this._innerAPI().crosshairSync()}timeSync(){return this._innerAPI().timeSync()}getAllFeatures(){return this._innerWindow().getAllFeatures()}clearUndoHistory(){return this._innerAPI().clearUndoHistory()}undo(){return this._innerAPI().undo()}redo(){return this._innerAPI().redo()}startFullscreen(){this._innerAPI().startFullscreen()}exitFullscreen(){this._innerAPI().exitFullscreen()}takeClientScreenshot(e){return this._innerAPI().takeClientScreenshot(e)}_innerAPI(){return this._innerWindow().tradingViewApi}_innerWindow(){return this._iFrame.contentWindow}_autoResizeChart(){this._options.fullscreen&&(this._iFrame.style.height=window.innerHeight+"px")}_create(){const e=this._render();this._options.container_id&&console.warn("`container_id` is now deprecated. Please use `container` instead to either still pass a string or an `HTMLElement`.");const t=this._options.container_id||this._options.container,i="string"==typeof t?document.getElementById(t):t;if(null===i)throw new Error(`There is no such element - #${this._options.container}`);i.innerHTML=e,this._iFrame=i.querySelector(`#${this._id}`);const n=this._iFrame;(this._options.autosize||this._options.fullscreen)&&(n.style.width="100%",this._options.fullscreen||(n.style.height="100%")),window.addEventListener("resize",this._onWindowResize),this._onWindowResize(),this._innerWindowLoaded=new Promise((e=>{const t=()=>{n.removeEventListener("load",t,!1),e()};n.addEventListener("load",t,!1)})),this._innerWindowLoaded.then((()=>{this._innerWindow().widgetReady((()=>{this._ready=!0;for(const t of this._readyHandlers)try{t.call(this)}catch(e){console.error(e)}this._innerWindow().initializationFinished()}))}))}_render(){const e=window;if(e[this._id]={datafeed:this._options.datafeed,customFormatters:this._options.custom_formatters||this._options.customFormatters,brokerFactory:this._options.broker_factory||this._options.brokerFactory,overrides:this._options.overrides,studiesOverrides:this._options.studies_overrides,tradingCustomization:this._options.trading_customization,disabledFeatures:this._options.disabled_features,enabledFeatures:this._options.enabled_features,brokerConfig:this._options.broker_config||this._options.brokerConfig,restConfig:this._options.restConfig,favorites:this._options.favorites,logo:this._options.logo,numeric_formatting:this._options.numeric_formatting,rss_news_feed:this._options.rss_news_feed,newsProvider:this._options.news_provider,loadLastChart:this._options.load_last_chart,saveLoadAdapter:this._options.save_load_adapter,loading_screen:this._options.loading_screen,settingsAdapter:this._options.settings_adapter,getCustomIndicators:this._options.custom_indicators_getter,additionalSymbolInfoFields:this._options.additional_symbol_info_fields,headerWidgetButtonsMode:this._options.header_widget_buttons_mode},this._options.saved_data)e[this._id].chartContent={json:this._options.saved_data},this._options.saved_data_meta_info&&(e[this._id].chartContentExtendedData=this._options.saved_data_meta_info);else if(!this._options.load_last_chart&&!this._options.symbol)throw new Error("Symbol is not defined: either 'symbol' or 'load_last_chart' option must be set");const t=(this._options.library_path||"")+`${encodeURIComponent(this._options.locale)}-tv-chart.9df149da.html#symbol=`+encodeURIComponent(this._options.symbol||"")+"&interval="+encodeURIComponent(this._options.interval)+(this._options.timeframe?"&timeframe="+encodeURIComponent(this._options.timeframe):"")+(this._options.toolbar_bg?"&toolbarbg="+encodeURIComponent(this._options.toolbar_bg.replace("#","")):"")+(this._options.studies_access?"&studiesAccess="+encodeURIComponent(JSON.stringify(this._options.studies_access)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this._options.widgetbar))+(this._options.drawings_access?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this._options.drawings_access)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this._options.time_frames))+"&locale="+encodeURIComponent(this._options.locale)+"&uid="+encodeURIComponent(this._id)+"&clientId="+encodeURIComponent(String(this._options.client_id))+"&userId="+encodeURIComponent(String(this._options.user_id))+(this._options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this._options.charts_storage_url):"")+(this._options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this._options.charts_storage_api_version):"")+(this._options.custom_css_url?"&customCSS="+encodeURIComponent(this._options.custom_css_url):"")+(this._options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(String(this._options.auto_save_delay)):"")+"&debug="+encodeURIComponent(String(this._options.debug))+(this._options.snapshot_url?"&snapshotUrl="+encodeURIComponent(this._options.snapshot_url):"")+(this._options.timezone?"&timezone="+encodeURIComponent(this._options.timezone):"")+(this._options.study_count_limit?"&studyCountLimit="+encodeURIComponent(String(this._options.study_count_limit)):"")+(this._options.symbol_search_request_delay?"&ssreqdelay="+encodeURIComponent(String(this._options.symbol_search_request_delay)):"")+(this._options.compare_symbols?"&compareSymbols="+encodeURIComponent(JSON.stringify(this._options.compare_symbols)):"")+(this._options.theme?"&theme="+encodeURIComponent(String(this._options.theme)):"")+(this._options.header_widget_buttons_mode?"&header_widget_buttons_mode="+encodeURIComponent(String(this._options.header_widget_buttons_mode)):"")+(this._options.time_scale?"&time_scale="+encodeURIComponent(JSON.stringify(this._options.time_scale)):"");return''}};window.TradingView=window.TradingView||{},window.TradingView.version=n,exports.version=n,exports.widget=o; diff --git a/charting_library/charting_library.esm.js b/charting_library/charting_library.esm.js index 8e78a2d6..f1f74636 100644 --- a/charting_library/charting_library.esm.js +++ b/charting_library/charting_library.esm.js @@ -1 +1 @@ -function e(t,i){const n=Object.assign({},t);for(const o in i)"object"!=typeof t[o]||null===t[o]||Array.isArray(t[o])?void 0!==i[o]&&(n[o]=i[o]):n[o]=e(t[o],i[o]);return n}const t={mobile:{disabled_features:["left_toolbar","header_widget","timeframes_toolbar","edit_buttons_in_legend","context_menus","control_bar","border_around_the_chart"],enabled_features:[]}},i={width:800,height:500,interval:"1D",timezone:"Etc/UTC",container:"",library_path:"",locale:"en",widgetbar:{details:!1,watchlist:!1,watchlist_settings:{default_symbols:[]}},overrides:{"mainSeriesProperties.showCountdown":!1},studies_overrides:{},trading_customization:{position:{},order:{}},brokerConfig:{configFlags:{}},fullscreen:!1,autosize:!1,disabled_features:[],enabled_features:[],debug:!1,logo:{},time_frames:[{text:"5y",resolution:"1W"},{text:"1y",resolution:"1W"},{text:"6m",resolution:"120"},{text:"3m",resolution:"60"},{text:"1m",resolution:"30"},{text:"5d",resolution:"5"},{text:"1d",resolution:"1"}],client_id:"0",user_id:"0",charts_storage_api_version:"1.0",favorites:{intervals:[],chartTypes:[]}};function n(){return"CL v20.032 (internal id ad2f4a55 @ 2021-10-28T12:29:15.152Z)"}const o=class{constructor(n){if(this._id=`tradingview_${(1048576*(1+Math.random())|0).toString(16).substring(1)}`,this._ready=!1,this._readyHandlers=[],this._onWindowResize=this._autoResizeChart.bind(this),!n.datafeed)throw new Error("Datafeed is not defined");if(this._options=e(i,n),n.preset){const e=t[n.preset];e?(void 0!==this._options.disabled_features?this._options.disabled_features=this._options.disabled_features.concat(e.disabled_features):this._options.disabled_features=e.disabled_features,void 0!==this._options.enabled_features?this._options.enabled_features=this._options.enabled_features.concat(e.enabled_features):this._options.enabled_features=e.enabled_features):console.warn("Unknown preset: `"+n.preset+"`")}"Dark"===this._options.theme&&void 0===this._options.loading_screen&&(this._options.loading_screen={backgroundColor:"#131722"}),this._create()}onChartReady(e){this._ready?e.call(this):this._readyHandlers.push(e)}headerReady(){return this._innerWindowLoaded.then((()=>this._innerWindow().headerReady()))}onGrayedObjectClicked(e){this._innerAPI().onGrayedObjectClicked(e)}onShortcut(e,t){this._innerWindow().createShortcutAction(e,t)}subscribe(e,t){this._innerAPI().subscribe(e,t)}unsubscribe(e,t){this._innerAPI().unsubscribe(e,t)}chart(e){return this._innerAPI().chart(e)}getLanguage(){return this._options.locale}setSymbol(e,t,i){this._innerAPI().changeSymbol(e,t,i)}remove(){window.removeEventListener("resize",this._onWindowResize),this._readyHandlers.splice(0,this._readyHandlers.length),delete window[this._id],this._iFrame.parentNode&&this._iFrame.parentNode.removeChild(this._iFrame)}closePopupsAndDialogs(){this._innerAPI().closePopupsAndDialogs()}selectLineTool(e){this._innerAPI().selectLineTool(e)}selectedLineTool(){return this._innerAPI().selectedLineTool()}save(e){this._innerAPI().saveChart(e)}load(e,t){this._innerAPI().loadChart({json:e,extendedData:t})}getSavedCharts(e){this._innerAPI().getSavedCharts(e)}loadChartFromServer(e){this._innerAPI().loadChartFromServer(e)}saveChartToServer(e,t,i){this._innerAPI().saveChartToServer(e,t,i)}removeChartFromServer(e,t){this._innerAPI().removeChartFromServer(e,t)}onContextMenu(e){this._innerAPI().onContextMenu(e)}createButton(e){return this._innerWindow().createButton(e)}showNoticeDialog(e){this._innerAPI().showNoticeDialog(e)}showConfirmDialog(e){this._innerAPI().showConfirmDialog(e)}showLoadChartDialog(){this._innerAPI().showLoadChartDialog()}showSaveAsChartDialog(){this._innerAPI().showSaveAsChartDialog()}symbolInterval(){return this._innerAPI().getSymbolInterval()}mainSeriesPriceFormatter(){return this._innerAPI().mainSeriesPriceFormatter()}getIntervals(){return this._innerAPI().getIntervals()}getStudiesList(){return this._innerAPI().getStudiesList()}addCustomCSSFile(e){this._innerWindow().addCustomCSSFile(e)}applyOverrides(t){this._options=e(this._options,{overrides:t}),this._innerWindow().applyOverrides(t)}applyStudiesOverrides(e){this._innerWindow().applyStudiesOverrides(e)}watchList(){return this._innerAPI().watchlist()}activeChart(){return this._innerAPI().activeChart()}chartsCount(){return this._innerAPI().chartsCount()}layout(){return this._innerAPI().layout()}setLayout(e){this._innerAPI().setLayout(e)}layoutName(){return this._innerAPI().layoutName()}changeTheme(e,t){this._innerWindow().changeTheme(e,t)}getTheme(){return this._innerWindow().getTheme()}takeScreenshot(){this._innerAPI().takeScreenshot()}lockAllDrawingTools(){return this._innerAPI().lockAllDrawingTools()}hideAllDrawingTools(){return this._innerAPI().hideAllDrawingTools()}drawOnAllCharts(e){this._innerAPI().drawOnAllCharts(e)}magnetEnabled(){return this._innerAPI().magnetEnabled()}magnetMode(){return this._innerAPI().magnetMode()}undoRedoState(){return this._innerAPI().undoRedoState()}setIntervalLinkingEnabled(e){this._innerAPI().setIntervalLinkingEnabled(e)}setTimeFrame(e){this._innerAPI().setTimeFrame(e)}symbolSync(){return this._innerAPI().symbolSync()}intervalSync(){return this._innerAPI().intervalSync()}crosshairSync(){return this._innerAPI().crosshairSync()}timeSync(){return this._innerAPI().timeSync()}getAllFeatures(){return this._innerWindow().getAllFeatures()}clearUndoHistory(){return this._innerAPI().clearUndoHistory()}undo(){return this._innerAPI().undo()}redo(){return this._innerAPI().redo()}startFullscreen(){this._innerAPI().startFullscreen()}exitFullscreen(){this._innerAPI().exitFullscreen()}takeClientScreenshot(e){return this._innerAPI().takeClientScreenshot(e)}_innerAPI(){return this._innerWindow().tradingViewApi}_innerWindow(){return this._iFrame.contentWindow}_autoResizeChart(){this._options.fullscreen&&(this._iFrame.style.height=window.innerHeight+"px")}_create(){const e=this._render();this._options.container_id&&console.warn("`container_id` is now deprecated. Please use `container` instead to either still pass a string or an `HTMLElement`.");const t=this._options.container_id||this._options.container,i="string"==typeof t?document.getElementById(t):t;if(null===i)throw new Error(`There is no such element - #${this._options.container}`);i.innerHTML=e,this._iFrame=i.querySelector(`#${this._id}`);const n=this._iFrame;(this._options.autosize||this._options.fullscreen)&&(n.style.width="100%",this._options.fullscreen||(n.style.height="100%")),window.addEventListener("resize",this._onWindowResize),this._onWindowResize(),this._innerWindowLoaded=new Promise((e=>{const t=()=>{n.removeEventListener("load",t,!1),e()};n.addEventListener("load",t,!1)})),this._innerWindowLoaded.then((()=>{this._innerWindow().widgetReady((()=>{this._ready=!0;for(const t of this._readyHandlers)try{t.call(this)}catch(e){console.error(e)}this._innerWindow().initializationFinished()}))}))}_render(){const e=window;if(e[this._id]={datafeed:this._options.datafeed,customFormatters:this._options.custom_formatters||this._options.customFormatters,brokerFactory:this._options.broker_factory||this._options.brokerFactory,overrides:this._options.overrides,studiesOverrides:this._options.studies_overrides,tradingCustomization:this._options.trading_customization,disabledFeatures:this._options.disabled_features,enabledFeatures:this._options.enabled_features,brokerConfig:this._options.broker_config||this._options.brokerConfig,restConfig:this._options.restConfig,favorites:this._options.favorites,logo:this._options.logo,numeric_formatting:this._options.numeric_formatting,rss_news_feed:this._options.rss_news_feed,newsProvider:this._options.news_provider,loadLastChart:this._options.load_last_chart,saveLoadAdapter:this._options.save_load_adapter,loading_screen:this._options.loading_screen,settingsAdapter:this._options.settings_adapter,getCustomIndicators:this._options.custom_indicators_getter,additionalSymbolInfoFields:this._options.additional_symbol_info_fields,headerWidgetButtonsMode:this._options.header_widget_buttons_mode},this._options.saved_data)e[this._id].chartContent={json:this._options.saved_data},this._options.saved_data_meta_info&&(e[this._id].chartContentExtendedData=this._options.saved_data_meta_info);else if(!this._options.load_last_chart&&!this._options.symbol)throw new Error("Symbol is not defined: either 'symbol' or 'load_last_chart' option must be set");const t=(this._options.library_path||"")+`${encodeURIComponent(this._options.locale)}-tv-chart.ad2f4a55.html#symbol=`+encodeURIComponent(this._options.symbol||"")+"&interval="+encodeURIComponent(this._options.interval)+(this._options.timeframe?"&timeframe="+encodeURIComponent(this._options.timeframe):"")+(this._options.toolbar_bg?"&toolbarbg="+encodeURIComponent(this._options.toolbar_bg.replace("#","")):"")+(this._options.studies_access?"&studiesAccess="+encodeURIComponent(JSON.stringify(this._options.studies_access)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this._options.widgetbar))+(this._options.drawings_access?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this._options.drawings_access)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this._options.time_frames))+"&locale="+encodeURIComponent(this._options.locale)+"&uid="+encodeURIComponent(this._id)+"&clientId="+encodeURIComponent(String(this._options.client_id))+"&userId="+encodeURIComponent(String(this._options.user_id))+(this._options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this._options.charts_storage_url):"")+(this._options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this._options.charts_storage_api_version):"")+(this._options.custom_css_url?"&customCSS="+encodeURIComponent(this._options.custom_css_url):"")+(this._options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(String(this._options.auto_save_delay)):"")+"&debug="+encodeURIComponent(String(this._options.debug))+(this._options.snapshot_url?"&snapshotUrl="+encodeURIComponent(this._options.snapshot_url):"")+(this._options.timezone?"&timezone="+encodeURIComponent(this._options.timezone):"")+(this._options.study_count_limit?"&studyCountLimit="+encodeURIComponent(String(this._options.study_count_limit)):"")+(this._options.symbol_search_request_delay?"&ssreqdelay="+encodeURIComponent(String(this._options.symbol_search_request_delay)):"")+(this._options.compare_symbols?"&compareSymbols="+encodeURIComponent(JSON.stringify(this._options.compare_symbols)):"")+(this._options.theme?"&theme="+encodeURIComponent(String(this._options.theme)):"")+(this._options.header_widget_buttons_mode?"&header_widget_buttons_mode="+encodeURIComponent(String(this._options.header_widget_buttons_mode)):"")+(this._options.time_scale?"&time_scale="+encodeURIComponent(JSON.stringify(this._options.time_scale)):"");return''}};window.TradingView=window.TradingView||{},window.TradingView.version=n;export{n as version,o as widget}; +function e(t,i){const n=Object.assign({},t);for(const o in i)"object"!=typeof t[o]||null===t[o]||Array.isArray(t[o])?void 0!==i[o]&&(n[o]=i[o]):n[o]=e(t[o],i[o]);return n}const t={mobile:{disabled_features:["left_toolbar","header_widget","timeframes_toolbar","edit_buttons_in_legend","context_menus","control_bar","border_around_the_chart"],enabled_features:[]}},i={width:800,height:500,interval:"1D",timezone:"Etc/UTC",container:"",library_path:"",locale:"en",widgetbar:{details:!1,watchlist:!1,watchlist_settings:{default_symbols:[]}},overrides:{"mainSeriesProperties.showCountdown":!1},studies_overrides:{},trading_customization:{position:{},order:{}},brokerConfig:{configFlags:{}},fullscreen:!1,autosize:!1,disabled_features:[],enabled_features:[],debug:!1,logo:{},time_frames:[{text:"5y",resolution:"1W"},{text:"1y",resolution:"1W"},{text:"6m",resolution:"120"},{text:"3m",resolution:"60"},{text:"1m",resolution:"30"},{text:"5d",resolution:"5"},{text:"1d",resolution:"1"}],client_id:"0",user_id:"0",charts_storage_api_version:"1.0",favorites:{intervals:[],chartTypes:[]}};function n(){return"CL v20.033 (internal id 9df149da @ 2021-11-17T10:20:51.511Z)"}const o=class{constructor(n){if(this._id=`tradingview_${(1048576*(1+Math.random())|0).toString(16).substring(1)}`,this._ready=!1,this._readyHandlers=[],this._onWindowResize=this._autoResizeChart.bind(this),!n.datafeed)throw new Error("Datafeed is not defined");if(this._options=e(i,n),n.preset){const e=t[n.preset];e?(void 0!==this._options.disabled_features?this._options.disabled_features=this._options.disabled_features.concat(e.disabled_features):this._options.disabled_features=e.disabled_features,void 0!==this._options.enabled_features?this._options.enabled_features=this._options.enabled_features.concat(e.enabled_features):this._options.enabled_features=e.enabled_features):console.warn("Unknown preset: `"+n.preset+"`")}"Dark"===this._options.theme&&void 0===this._options.loading_screen&&(this._options.loading_screen={backgroundColor:"#131722"}),this._create()}onChartReady(e){this._ready?e.call(this):this._readyHandlers.push(e)}headerReady(){return this._innerWindowLoaded.then((()=>this._innerWindow().headerReady()))}onGrayedObjectClicked(e){this._innerAPI().onGrayedObjectClicked(e)}onShortcut(e,t){this._innerWindow().createShortcutAction(e,t)}subscribe(e,t){this._innerAPI().subscribe(e,t)}unsubscribe(e,t){this._innerAPI().unsubscribe(e,t)}chart(e){return this._innerAPI().chart(e)}getLanguage(){return this._options.locale}setSymbol(e,t,i){this._innerAPI().changeSymbol(e,t,i)}remove(){window.removeEventListener("resize",this._onWindowResize),this._readyHandlers.splice(0,this._readyHandlers.length),delete window[this._id],this._iFrame.parentNode&&this._iFrame.parentNode.removeChild(this._iFrame)}closePopupsAndDialogs(){this._innerAPI().closePopupsAndDialogs()}selectLineTool(e){this._innerAPI().selectLineTool(e)}selectedLineTool(){return this._innerAPI().selectedLineTool()}save(e){this._innerAPI().saveChart(e)}load(e,t){this._innerAPI().loadChart({json:e,extendedData:t})}getSavedCharts(e){this._innerAPI().getSavedCharts(e)}loadChartFromServer(e){this._innerAPI().loadChartFromServer(e)}saveChartToServer(e,t,i){this._innerAPI().saveChartToServer(e,t,i)}removeChartFromServer(e,t){this._innerAPI().removeChartFromServer(e,t)}onContextMenu(e){this._innerAPI().onContextMenu(e)}createButton(e){return this._innerWindow().createButton(e)}showNoticeDialog(e){this._innerAPI().showNoticeDialog(e)}showConfirmDialog(e){this._innerAPI().showConfirmDialog(e)}showLoadChartDialog(){this._innerAPI().showLoadChartDialog()}showSaveAsChartDialog(){this._innerAPI().showSaveAsChartDialog()}symbolInterval(){return this._innerAPI().getSymbolInterval()}mainSeriesPriceFormatter(){return this._innerAPI().mainSeriesPriceFormatter()}getIntervals(){return this._innerAPI().getIntervals()}getStudiesList(){return this._innerAPI().getStudiesList()}addCustomCSSFile(e){this._innerWindow().addCustomCSSFile(e)}applyOverrides(t){this._options=e(this._options,{overrides:t}),this._innerWindow().applyOverrides(t)}applyStudiesOverrides(e){this._innerWindow().applyStudiesOverrides(e)}watchList(){return this._innerAPI().watchlist()}activeChart(){return this._innerAPI().activeChart()}chartsCount(){return this._innerAPI().chartsCount()}layout(){return this._innerAPI().layout()}setLayout(e){this._innerAPI().setLayout(e)}layoutName(){return this._innerAPI().layoutName()}changeTheme(e,t){this._innerWindow().changeTheme(e,t)}getTheme(){return this._innerWindow().getTheme()}takeScreenshot(){this._innerAPI().takeScreenshot()}lockAllDrawingTools(){return this._innerAPI().lockAllDrawingTools()}hideAllDrawingTools(){return this._innerAPI().hideAllDrawingTools()}drawOnAllCharts(e){this._innerAPI().drawOnAllCharts(e)}magnetEnabled(){return this._innerAPI().magnetEnabled()}magnetMode(){return this._innerAPI().magnetMode()}undoRedoState(){return this._innerAPI().undoRedoState()}setIntervalLinkingEnabled(e){this._innerAPI().setIntervalLinkingEnabled(e)}setTimeFrame(e){this._innerAPI().setTimeFrame(e)}symbolSync(){return this._innerAPI().symbolSync()}intervalSync(){return this._innerAPI().intervalSync()}crosshairSync(){return this._innerAPI().crosshairSync()}timeSync(){return this._innerAPI().timeSync()}getAllFeatures(){return this._innerWindow().getAllFeatures()}clearUndoHistory(){return this._innerAPI().clearUndoHistory()}undo(){return this._innerAPI().undo()}redo(){return this._innerAPI().redo()}startFullscreen(){this._innerAPI().startFullscreen()}exitFullscreen(){this._innerAPI().exitFullscreen()}takeClientScreenshot(e){return this._innerAPI().takeClientScreenshot(e)}_innerAPI(){return this._innerWindow().tradingViewApi}_innerWindow(){return this._iFrame.contentWindow}_autoResizeChart(){this._options.fullscreen&&(this._iFrame.style.height=window.innerHeight+"px")}_create(){const e=this._render();this._options.container_id&&console.warn("`container_id` is now deprecated. Please use `container` instead to either still pass a string or an `HTMLElement`.");const t=this._options.container_id||this._options.container,i="string"==typeof t?document.getElementById(t):t;if(null===i)throw new Error(`There is no such element - #${this._options.container}`);i.innerHTML=e,this._iFrame=i.querySelector(`#${this._id}`);const n=this._iFrame;(this._options.autosize||this._options.fullscreen)&&(n.style.width="100%",this._options.fullscreen||(n.style.height="100%")),window.addEventListener("resize",this._onWindowResize),this._onWindowResize(),this._innerWindowLoaded=new Promise((e=>{const t=()=>{n.removeEventListener("load",t,!1),e()};n.addEventListener("load",t,!1)})),this._innerWindowLoaded.then((()=>{this._innerWindow().widgetReady((()=>{this._ready=!0;for(const t of this._readyHandlers)try{t.call(this)}catch(e){console.error(e)}this._innerWindow().initializationFinished()}))}))}_render(){const e=window;if(e[this._id]={datafeed:this._options.datafeed,customFormatters:this._options.custom_formatters||this._options.customFormatters,brokerFactory:this._options.broker_factory||this._options.brokerFactory,overrides:this._options.overrides,studiesOverrides:this._options.studies_overrides,tradingCustomization:this._options.trading_customization,disabledFeatures:this._options.disabled_features,enabledFeatures:this._options.enabled_features,brokerConfig:this._options.broker_config||this._options.brokerConfig,restConfig:this._options.restConfig,favorites:this._options.favorites,logo:this._options.logo,numeric_formatting:this._options.numeric_formatting,rss_news_feed:this._options.rss_news_feed,newsProvider:this._options.news_provider,loadLastChart:this._options.load_last_chart,saveLoadAdapter:this._options.save_load_adapter,loading_screen:this._options.loading_screen,settingsAdapter:this._options.settings_adapter,getCustomIndicators:this._options.custom_indicators_getter,additionalSymbolInfoFields:this._options.additional_symbol_info_fields,headerWidgetButtonsMode:this._options.header_widget_buttons_mode},this._options.saved_data)e[this._id].chartContent={json:this._options.saved_data},this._options.saved_data_meta_info&&(e[this._id].chartContentExtendedData=this._options.saved_data_meta_info);else if(!this._options.load_last_chart&&!this._options.symbol)throw new Error("Symbol is not defined: either 'symbol' or 'load_last_chart' option must be set");const t=(this._options.library_path||"")+`${encodeURIComponent(this._options.locale)}-tv-chart.9df149da.html#symbol=`+encodeURIComponent(this._options.symbol||"")+"&interval="+encodeURIComponent(this._options.interval)+(this._options.timeframe?"&timeframe="+encodeURIComponent(this._options.timeframe):"")+(this._options.toolbar_bg?"&toolbarbg="+encodeURIComponent(this._options.toolbar_bg.replace("#","")):"")+(this._options.studies_access?"&studiesAccess="+encodeURIComponent(JSON.stringify(this._options.studies_access)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this._options.widgetbar))+(this._options.drawings_access?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this._options.drawings_access)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this._options.time_frames))+"&locale="+encodeURIComponent(this._options.locale)+"&uid="+encodeURIComponent(this._id)+"&clientId="+encodeURIComponent(String(this._options.client_id))+"&userId="+encodeURIComponent(String(this._options.user_id))+(this._options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this._options.charts_storage_url):"")+(this._options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this._options.charts_storage_api_version):"")+(this._options.custom_css_url?"&customCSS="+encodeURIComponent(this._options.custom_css_url):"")+(this._options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(String(this._options.auto_save_delay)):"")+"&debug="+encodeURIComponent(String(this._options.debug))+(this._options.snapshot_url?"&snapshotUrl="+encodeURIComponent(this._options.snapshot_url):"")+(this._options.timezone?"&timezone="+encodeURIComponent(this._options.timezone):"")+(this._options.study_count_limit?"&studyCountLimit="+encodeURIComponent(String(this._options.study_count_limit)):"")+(this._options.symbol_search_request_delay?"&ssreqdelay="+encodeURIComponent(String(this._options.symbol_search_request_delay)):"")+(this._options.compare_symbols?"&compareSymbols="+encodeURIComponent(JSON.stringify(this._options.compare_symbols)):"")+(this._options.theme?"&theme="+encodeURIComponent(String(this._options.theme)):"")+(this._options.header_widget_buttons_mode?"&header_widget_buttons_mode="+encodeURIComponent(String(this._options.header_widget_buttons_mode)):"")+(this._options.time_scale?"&time_scale="+encodeURIComponent(JSON.stringify(this._options.time_scale)):"");return''}};window.TradingView=window.TradingView||{},window.TradingView.version=n;export{n as version,o as widget}; diff --git a/charting_library/charting_library.js b/charting_library/charting_library.js index 8b696cef..b4970384 100644 --- a/charting_library/charting_library.js +++ b/charting_library/charting_library.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TradingView={})}(this,(function(e){"use strict";function t(e,i){const n=Object.assign({},e);for(const o in i)"object"!=typeof e[o]||null===e[o]||Array.isArray(e[o])?void 0!==i[o]&&(n[o]=i[o]):n[o]=t(e[o],i[o]);return n}const i={mobile:{disabled_features:["left_toolbar","header_widget","timeframes_toolbar","edit_buttons_in_legend","context_menus","control_bar","border_around_the_chart"],enabled_features:[]}},n={width:800,height:500,interval:"1D",timezone:"Etc/UTC",container:"",library_path:"",locale:"en",widgetbar:{details:!1,watchlist:!1,watchlist_settings:{default_symbols:[]}},overrides:{"mainSeriesProperties.showCountdown":!1},studies_overrides:{},trading_customization:{position:{},order:{}},brokerConfig:{configFlags:{}},fullscreen:!1,autosize:!1,disabled_features:[],enabled_features:[],debug:!1,logo:{},time_frames:[{text:"5y",resolution:"1W"},{text:"1y",resolution:"1W"},{text:"6m",resolution:"120"},{text:"3m",resolution:"60"},{text:"1m",resolution:"30"},{text:"5d",resolution:"5"},{text:"1d",resolution:"1"}],client_id:"0",user_id:"0",charts_storage_api_version:"1.0",favorites:{intervals:[],chartTypes:[]}};function o(){return"CL v20.032 (internal id ad2f4a55 @ 2021-10-28T12:29:15.152Z)"}const s=class{constructor(e){if(this._id=`tradingview_${(1048576*(1+Math.random())|0).toString(16).substring(1)}`,this._ready=!1,this._readyHandlers=[],this._onWindowResize=this._autoResizeChart.bind(this),!e.datafeed)throw new Error("Datafeed is not defined");if(this._options=t(n,e),e.preset){const t=i[e.preset];t?(void 0!==this._options.disabled_features?this._options.disabled_features=this._options.disabled_features.concat(t.disabled_features):this._options.disabled_features=t.disabled_features,void 0!==this._options.enabled_features?this._options.enabled_features=this._options.enabled_features.concat(t.enabled_features):this._options.enabled_features=t.enabled_features):console.warn("Unknown preset: `"+e.preset+"`")}"Dark"===this._options.theme&&void 0===this._options.loading_screen&&(this._options.loading_screen={backgroundColor:"#131722"}),this._create()}onChartReady(e){this._ready?e.call(this):this._readyHandlers.push(e)}headerReady(){return this._innerWindowLoaded.then((()=>this._innerWindow().headerReady()))}onGrayedObjectClicked(e){this._innerAPI().onGrayedObjectClicked(e)}onShortcut(e,t){this._innerWindow().createShortcutAction(e,t)}subscribe(e,t){this._innerAPI().subscribe(e,t)}unsubscribe(e,t){this._innerAPI().unsubscribe(e,t)}chart(e){return this._innerAPI().chart(e)}getLanguage(){return this._options.locale}setSymbol(e,t,i){this._innerAPI().changeSymbol(e,t,i)}remove(){window.removeEventListener("resize",this._onWindowResize),this._readyHandlers.splice(0,this._readyHandlers.length),delete window[this._id],this._iFrame.parentNode&&this._iFrame.parentNode.removeChild(this._iFrame)}closePopupsAndDialogs(){this._innerAPI().closePopupsAndDialogs()}selectLineTool(e){this._innerAPI().selectLineTool(e)}selectedLineTool(){return this._innerAPI().selectedLineTool()}save(e){this._innerAPI().saveChart(e)}load(e,t){this._innerAPI().loadChart({json:e,extendedData:t})}getSavedCharts(e){this._innerAPI().getSavedCharts(e)}loadChartFromServer(e){this._innerAPI().loadChartFromServer(e)}saveChartToServer(e,t,i){this._innerAPI().saveChartToServer(e,t,i)}removeChartFromServer(e,t){this._innerAPI().removeChartFromServer(e,t)}onContextMenu(e){this._innerAPI().onContextMenu(e)}createButton(e){return this._innerWindow().createButton(e)}showNoticeDialog(e){this._innerAPI().showNoticeDialog(e)}showConfirmDialog(e){this._innerAPI().showConfirmDialog(e)}showLoadChartDialog(){this._innerAPI().showLoadChartDialog()}showSaveAsChartDialog(){this._innerAPI().showSaveAsChartDialog()}symbolInterval(){return this._innerAPI().getSymbolInterval()}mainSeriesPriceFormatter(){return this._innerAPI().mainSeriesPriceFormatter()}getIntervals(){return this._innerAPI().getIntervals()}getStudiesList(){return this._innerAPI().getStudiesList()}addCustomCSSFile(e){this._innerWindow().addCustomCSSFile(e)}applyOverrides(e){this._options=t(this._options,{overrides:e}),this._innerWindow().applyOverrides(e)}applyStudiesOverrides(e){this._innerWindow().applyStudiesOverrides(e)}watchList(){return this._innerAPI().watchlist()}activeChart(){return this._innerAPI().activeChart()}chartsCount(){return this._innerAPI().chartsCount()}layout(){return this._innerAPI().layout()}setLayout(e){this._innerAPI().setLayout(e)}layoutName(){return this._innerAPI().layoutName()}changeTheme(e,t){this._innerWindow().changeTheme(e,t)}getTheme(){return this._innerWindow().getTheme()}takeScreenshot(){this._innerAPI().takeScreenshot()}lockAllDrawingTools(){return this._innerAPI().lockAllDrawingTools()}hideAllDrawingTools(){return this._innerAPI().hideAllDrawingTools()}drawOnAllCharts(e){this._innerAPI().drawOnAllCharts(e)}magnetEnabled(){return this._innerAPI().magnetEnabled()}magnetMode(){return this._innerAPI().magnetMode()}undoRedoState(){return this._innerAPI().undoRedoState()}setIntervalLinkingEnabled(e){this._innerAPI().setIntervalLinkingEnabled(e)}setTimeFrame(e){this._innerAPI().setTimeFrame(e)}symbolSync(){return this._innerAPI().symbolSync()}intervalSync(){return this._innerAPI().intervalSync()}crosshairSync(){return this._innerAPI().crosshairSync()}timeSync(){return this._innerAPI().timeSync()}getAllFeatures(){return this._innerWindow().getAllFeatures()}clearUndoHistory(){return this._innerAPI().clearUndoHistory()}undo(){return this._innerAPI().undo()}redo(){return this._innerAPI().redo()}startFullscreen(){this._innerAPI().startFullscreen()}exitFullscreen(){this._innerAPI().exitFullscreen()}takeClientScreenshot(e){return this._innerAPI().takeClientScreenshot(e)}_innerAPI(){return this._innerWindow().tradingViewApi}_innerWindow(){return this._iFrame.contentWindow}_autoResizeChart(){this._options.fullscreen&&(this._iFrame.style.height=window.innerHeight+"px")}_create(){const e=this._render();this._options.container_id&&console.warn("`container_id` is now deprecated. Please use `container` instead to either still pass a string or an `HTMLElement`.");const t=this._options.container_id||this._options.container,i="string"==typeof t?document.getElementById(t):t;if(null===i)throw new Error(`There is no such element - #${this._options.container}`);i.innerHTML=e,this._iFrame=i.querySelector(`#${this._id}`);const n=this._iFrame;(this._options.autosize||this._options.fullscreen)&&(n.style.width="100%",this._options.fullscreen||(n.style.height="100%")),window.addEventListener("resize",this._onWindowResize),this._onWindowResize(),this._innerWindowLoaded=new Promise((e=>{const t=()=>{n.removeEventListener("load",t,!1),e()};n.addEventListener("load",t,!1)})),this._innerWindowLoaded.then((()=>{this._innerWindow().widgetReady((()=>{this._ready=!0;for(const t of this._readyHandlers)try{t.call(this)}catch(e){console.error(e)}this._innerWindow().initializationFinished()}))}))}_render(){const e=window;if(e[this._id]={datafeed:this._options.datafeed,customFormatters:this._options.custom_formatters||this._options.customFormatters,brokerFactory:this._options.broker_factory||this._options.brokerFactory,overrides:this._options.overrides,studiesOverrides:this._options.studies_overrides,tradingCustomization:this._options.trading_customization,disabledFeatures:this._options.disabled_features,enabledFeatures:this._options.enabled_features,brokerConfig:this._options.broker_config||this._options.brokerConfig,restConfig:this._options.restConfig,favorites:this._options.favorites,logo:this._options.logo,numeric_formatting:this._options.numeric_formatting,rss_news_feed:this._options.rss_news_feed,newsProvider:this._options.news_provider,loadLastChart:this._options.load_last_chart,saveLoadAdapter:this._options.save_load_adapter,loading_screen:this._options.loading_screen,settingsAdapter:this._options.settings_adapter,getCustomIndicators:this._options.custom_indicators_getter,additionalSymbolInfoFields:this._options.additional_symbol_info_fields,headerWidgetButtonsMode:this._options.header_widget_buttons_mode},this._options.saved_data)e[this._id].chartContent={json:this._options.saved_data},this._options.saved_data_meta_info&&(e[this._id].chartContentExtendedData=this._options.saved_data_meta_info);else if(!this._options.load_last_chart&&!this._options.symbol)throw new Error("Symbol is not defined: either 'symbol' or 'load_last_chart' option must be set");const t=(this._options.library_path||"")+`${encodeURIComponent(this._options.locale)}-tv-chart.ad2f4a55.html#symbol=`+encodeURIComponent(this._options.symbol||"")+"&interval="+encodeURIComponent(this._options.interval)+(this._options.timeframe?"&timeframe="+encodeURIComponent(this._options.timeframe):"")+(this._options.toolbar_bg?"&toolbarbg="+encodeURIComponent(this._options.toolbar_bg.replace("#","")):"")+(this._options.studies_access?"&studiesAccess="+encodeURIComponent(JSON.stringify(this._options.studies_access)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this._options.widgetbar))+(this._options.drawings_access?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this._options.drawings_access)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this._options.time_frames))+"&locale="+encodeURIComponent(this._options.locale)+"&uid="+encodeURIComponent(this._id)+"&clientId="+encodeURIComponent(String(this._options.client_id))+"&userId="+encodeURIComponent(String(this._options.user_id))+(this._options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this._options.charts_storage_url):"")+(this._options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this._options.charts_storage_api_version):"")+(this._options.custom_css_url?"&customCSS="+encodeURIComponent(this._options.custom_css_url):"")+(this._options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(String(this._options.auto_save_delay)):"")+"&debug="+encodeURIComponent(String(this._options.debug))+(this._options.snapshot_url?"&snapshotUrl="+encodeURIComponent(this._options.snapshot_url):"")+(this._options.timezone?"&timezone="+encodeURIComponent(this._options.timezone):"")+(this._options.study_count_limit?"&studyCountLimit="+encodeURIComponent(String(this._options.study_count_limit)):"")+(this._options.symbol_search_request_delay?"&ssreqdelay="+encodeURIComponent(String(this._options.symbol_search_request_delay)):"")+(this._options.compare_symbols?"&compareSymbols="+encodeURIComponent(JSON.stringify(this._options.compare_symbols)):"")+(this._options.theme?"&theme="+encodeURIComponent(String(this._options.theme)):"")+(this._options.header_widget_buttons_mode?"&header_widget_buttons_mode="+encodeURIComponent(String(this._options.header_widget_buttons_mode)):"")+(this._options.time_scale?"&time_scale="+encodeURIComponent(JSON.stringify(this._options.time_scale)):"");return''}};window.TradingView=window.TradingView||{},window.TradingView.version=o,e.version=o,e.widget=s,Object.defineProperty(e,"__esModule",{value:!0})})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TradingView={})}(this,(function(e){"use strict";function t(e,i){const n=Object.assign({},e);for(const o in i)"object"!=typeof e[o]||null===e[o]||Array.isArray(e[o])?void 0!==i[o]&&(n[o]=i[o]):n[o]=t(e[o],i[o]);return n}const i={mobile:{disabled_features:["left_toolbar","header_widget","timeframes_toolbar","edit_buttons_in_legend","context_menus","control_bar","border_around_the_chart"],enabled_features:[]}},n={width:800,height:500,interval:"1D",timezone:"Etc/UTC",container:"",library_path:"",locale:"en",widgetbar:{details:!1,watchlist:!1,watchlist_settings:{default_symbols:[]}},overrides:{"mainSeriesProperties.showCountdown":!1},studies_overrides:{},trading_customization:{position:{},order:{}},brokerConfig:{configFlags:{}},fullscreen:!1,autosize:!1,disabled_features:[],enabled_features:[],debug:!1,logo:{},time_frames:[{text:"5y",resolution:"1W"},{text:"1y",resolution:"1W"},{text:"6m",resolution:"120"},{text:"3m",resolution:"60"},{text:"1m",resolution:"30"},{text:"5d",resolution:"5"},{text:"1d",resolution:"1"}],client_id:"0",user_id:"0",charts_storage_api_version:"1.0",favorites:{intervals:[],chartTypes:[]}};function o(){return"CL v20.033 (internal id 9df149da @ 2021-11-17T10:20:51.511Z)"}const s=class{constructor(e){if(this._id=`tradingview_${(1048576*(1+Math.random())|0).toString(16).substring(1)}`,this._ready=!1,this._readyHandlers=[],this._onWindowResize=this._autoResizeChart.bind(this),!e.datafeed)throw new Error("Datafeed is not defined");if(this._options=t(n,e),e.preset){const t=i[e.preset];t?(void 0!==this._options.disabled_features?this._options.disabled_features=this._options.disabled_features.concat(t.disabled_features):this._options.disabled_features=t.disabled_features,void 0!==this._options.enabled_features?this._options.enabled_features=this._options.enabled_features.concat(t.enabled_features):this._options.enabled_features=t.enabled_features):console.warn("Unknown preset: `"+e.preset+"`")}"Dark"===this._options.theme&&void 0===this._options.loading_screen&&(this._options.loading_screen={backgroundColor:"#131722"}),this._create()}onChartReady(e){this._ready?e.call(this):this._readyHandlers.push(e)}headerReady(){return this._innerWindowLoaded.then((()=>this._innerWindow().headerReady()))}onGrayedObjectClicked(e){this._innerAPI().onGrayedObjectClicked(e)}onShortcut(e,t){this._innerWindow().createShortcutAction(e,t)}subscribe(e,t){this._innerAPI().subscribe(e,t)}unsubscribe(e,t){this._innerAPI().unsubscribe(e,t)}chart(e){return this._innerAPI().chart(e)}getLanguage(){return this._options.locale}setSymbol(e,t,i){this._innerAPI().changeSymbol(e,t,i)}remove(){window.removeEventListener("resize",this._onWindowResize),this._readyHandlers.splice(0,this._readyHandlers.length),delete window[this._id],this._iFrame.parentNode&&this._iFrame.parentNode.removeChild(this._iFrame)}closePopupsAndDialogs(){this._innerAPI().closePopupsAndDialogs()}selectLineTool(e){this._innerAPI().selectLineTool(e)}selectedLineTool(){return this._innerAPI().selectedLineTool()}save(e){this._innerAPI().saveChart(e)}load(e,t){this._innerAPI().loadChart({json:e,extendedData:t})}getSavedCharts(e){this._innerAPI().getSavedCharts(e)}loadChartFromServer(e){this._innerAPI().loadChartFromServer(e)}saveChartToServer(e,t,i){this._innerAPI().saveChartToServer(e,t,i)}removeChartFromServer(e,t){this._innerAPI().removeChartFromServer(e,t)}onContextMenu(e){this._innerAPI().onContextMenu(e)}createButton(e){return this._innerWindow().createButton(e)}showNoticeDialog(e){this._innerAPI().showNoticeDialog(e)}showConfirmDialog(e){this._innerAPI().showConfirmDialog(e)}showLoadChartDialog(){this._innerAPI().showLoadChartDialog()}showSaveAsChartDialog(){this._innerAPI().showSaveAsChartDialog()}symbolInterval(){return this._innerAPI().getSymbolInterval()}mainSeriesPriceFormatter(){return this._innerAPI().mainSeriesPriceFormatter()}getIntervals(){return this._innerAPI().getIntervals()}getStudiesList(){return this._innerAPI().getStudiesList()}addCustomCSSFile(e){this._innerWindow().addCustomCSSFile(e)}applyOverrides(e){this._options=t(this._options,{overrides:e}),this._innerWindow().applyOverrides(e)}applyStudiesOverrides(e){this._innerWindow().applyStudiesOverrides(e)}watchList(){return this._innerAPI().watchlist()}activeChart(){return this._innerAPI().activeChart()}chartsCount(){return this._innerAPI().chartsCount()}layout(){return this._innerAPI().layout()}setLayout(e){this._innerAPI().setLayout(e)}layoutName(){return this._innerAPI().layoutName()}changeTheme(e,t){this._innerWindow().changeTheme(e,t)}getTheme(){return this._innerWindow().getTheme()}takeScreenshot(){this._innerAPI().takeScreenshot()}lockAllDrawingTools(){return this._innerAPI().lockAllDrawingTools()}hideAllDrawingTools(){return this._innerAPI().hideAllDrawingTools()}drawOnAllCharts(e){this._innerAPI().drawOnAllCharts(e)}magnetEnabled(){return this._innerAPI().magnetEnabled()}magnetMode(){return this._innerAPI().magnetMode()}undoRedoState(){return this._innerAPI().undoRedoState()}setIntervalLinkingEnabled(e){this._innerAPI().setIntervalLinkingEnabled(e)}setTimeFrame(e){this._innerAPI().setTimeFrame(e)}symbolSync(){return this._innerAPI().symbolSync()}intervalSync(){return this._innerAPI().intervalSync()}crosshairSync(){return this._innerAPI().crosshairSync()}timeSync(){return this._innerAPI().timeSync()}getAllFeatures(){return this._innerWindow().getAllFeatures()}clearUndoHistory(){return this._innerAPI().clearUndoHistory()}undo(){return this._innerAPI().undo()}redo(){return this._innerAPI().redo()}startFullscreen(){this._innerAPI().startFullscreen()}exitFullscreen(){this._innerAPI().exitFullscreen()}takeClientScreenshot(e){return this._innerAPI().takeClientScreenshot(e)}_innerAPI(){return this._innerWindow().tradingViewApi}_innerWindow(){return this._iFrame.contentWindow}_autoResizeChart(){this._options.fullscreen&&(this._iFrame.style.height=window.innerHeight+"px")}_create(){const e=this._render();this._options.container_id&&console.warn("`container_id` is now deprecated. Please use `container` instead to either still pass a string or an `HTMLElement`.");const t=this._options.container_id||this._options.container,i="string"==typeof t?document.getElementById(t):t;if(null===i)throw new Error(`There is no such element - #${this._options.container}`);i.innerHTML=e,this._iFrame=i.querySelector(`#${this._id}`);const n=this._iFrame;(this._options.autosize||this._options.fullscreen)&&(n.style.width="100%",this._options.fullscreen||(n.style.height="100%")),window.addEventListener("resize",this._onWindowResize),this._onWindowResize(),this._innerWindowLoaded=new Promise((e=>{const t=()=>{n.removeEventListener("load",t,!1),e()};n.addEventListener("load",t,!1)})),this._innerWindowLoaded.then((()=>{this._innerWindow().widgetReady((()=>{this._ready=!0;for(const t of this._readyHandlers)try{t.call(this)}catch(e){console.error(e)}this._innerWindow().initializationFinished()}))}))}_render(){const e=window;if(e[this._id]={datafeed:this._options.datafeed,customFormatters:this._options.custom_formatters||this._options.customFormatters,brokerFactory:this._options.broker_factory||this._options.brokerFactory,overrides:this._options.overrides,studiesOverrides:this._options.studies_overrides,tradingCustomization:this._options.trading_customization,disabledFeatures:this._options.disabled_features,enabledFeatures:this._options.enabled_features,brokerConfig:this._options.broker_config||this._options.brokerConfig,restConfig:this._options.restConfig,favorites:this._options.favorites,logo:this._options.logo,numeric_formatting:this._options.numeric_formatting,rss_news_feed:this._options.rss_news_feed,newsProvider:this._options.news_provider,loadLastChart:this._options.load_last_chart,saveLoadAdapter:this._options.save_load_adapter,loading_screen:this._options.loading_screen,settingsAdapter:this._options.settings_adapter,getCustomIndicators:this._options.custom_indicators_getter,additionalSymbolInfoFields:this._options.additional_symbol_info_fields,headerWidgetButtonsMode:this._options.header_widget_buttons_mode},this._options.saved_data)e[this._id].chartContent={json:this._options.saved_data},this._options.saved_data_meta_info&&(e[this._id].chartContentExtendedData=this._options.saved_data_meta_info);else if(!this._options.load_last_chart&&!this._options.symbol)throw new Error("Symbol is not defined: either 'symbol' or 'load_last_chart' option must be set");const t=(this._options.library_path||"")+`${encodeURIComponent(this._options.locale)}-tv-chart.9df149da.html#symbol=`+encodeURIComponent(this._options.symbol||"")+"&interval="+encodeURIComponent(this._options.interval)+(this._options.timeframe?"&timeframe="+encodeURIComponent(this._options.timeframe):"")+(this._options.toolbar_bg?"&toolbarbg="+encodeURIComponent(this._options.toolbar_bg.replace("#","")):"")+(this._options.studies_access?"&studiesAccess="+encodeURIComponent(JSON.stringify(this._options.studies_access)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this._options.widgetbar))+(this._options.drawings_access?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this._options.drawings_access)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this._options.time_frames))+"&locale="+encodeURIComponent(this._options.locale)+"&uid="+encodeURIComponent(this._id)+"&clientId="+encodeURIComponent(String(this._options.client_id))+"&userId="+encodeURIComponent(String(this._options.user_id))+(this._options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this._options.charts_storage_url):"")+(this._options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this._options.charts_storage_api_version):"")+(this._options.custom_css_url?"&customCSS="+encodeURIComponent(this._options.custom_css_url):"")+(this._options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(String(this._options.auto_save_delay)):"")+"&debug="+encodeURIComponent(String(this._options.debug))+(this._options.snapshot_url?"&snapshotUrl="+encodeURIComponent(this._options.snapshot_url):"")+(this._options.timezone?"&timezone="+encodeURIComponent(this._options.timezone):"")+(this._options.study_count_limit?"&studyCountLimit="+encodeURIComponent(String(this._options.study_count_limit)):"")+(this._options.symbol_search_request_delay?"&ssreqdelay="+encodeURIComponent(String(this._options.symbol_search_request_delay)):"")+(this._options.compare_symbols?"&compareSymbols="+encodeURIComponent(JSON.stringify(this._options.compare_symbols)):"")+(this._options.theme?"&theme="+encodeURIComponent(String(this._options.theme)):"")+(this._options.header_widget_buttons_mode?"&header_widget_buttons_mode="+encodeURIComponent(String(this._options.header_widget_buttons_mode)):"")+(this._options.time_scale?"&time_scale="+encodeURIComponent(JSON.stringify(this._options.time_scale)):"");return''}};window.TradingView=window.TradingView||{},window.TradingView.version=o,e.version=o,e.widget=s,Object.defineProperty(e,"__esModule",{value:!0})})); diff --git a/charting_library/charting_library.standalone.js b/charting_library/charting_library.standalone.js index 5c26c2b7..38d8b962 100644 --- a/charting_library/charting_library.standalone.js +++ b/charting_library/charting_library.standalone.js @@ -1 +1 @@ -var TradingView=function(e){"use strict";function t(e,i){const n=Object.assign({},e);for(const o in i)"object"!=typeof e[o]||null===e[o]||Array.isArray(e[o])?void 0!==i[o]&&(n[o]=i[o]):n[o]=t(e[o],i[o]);return n}const i={mobile:{disabled_features:["left_toolbar","header_widget","timeframes_toolbar","edit_buttons_in_legend","context_menus","control_bar","border_around_the_chart"],enabled_features:[]}},n={width:800,height:500,interval:"1D",timezone:"Etc/UTC",container:"",library_path:"",locale:"en",widgetbar:{details:!1,watchlist:!1,watchlist_settings:{default_symbols:[]}},overrides:{"mainSeriesProperties.showCountdown":!1},studies_overrides:{},trading_customization:{position:{},order:{}},brokerConfig:{configFlags:{}},fullscreen:!1,autosize:!1,disabled_features:[],enabled_features:[],debug:!1,logo:{},time_frames:[{text:"5y",resolution:"1W"},{text:"1y",resolution:"1W"},{text:"6m",resolution:"120"},{text:"3m",resolution:"60"},{text:"1m",resolution:"30"},{text:"5d",resolution:"5"},{text:"1d",resolution:"1"}],client_id:"0",user_id:"0",charts_storage_api_version:"1.0",favorites:{intervals:[],chartTypes:[]}};function o(){return"CL v20.032 (internal id ad2f4a55 @ 2021-10-28T12:29:15.152Z)"}const s=class{constructor(e){if(this._id=`tradingview_${(1048576*(1+Math.random())|0).toString(16).substring(1)}`,this._ready=!1,this._readyHandlers=[],this._onWindowResize=this._autoResizeChart.bind(this),!e.datafeed)throw new Error("Datafeed is not defined");if(this._options=t(n,e),e.preset){const t=i[e.preset];t?(void 0!==this._options.disabled_features?this._options.disabled_features=this._options.disabled_features.concat(t.disabled_features):this._options.disabled_features=t.disabled_features,void 0!==this._options.enabled_features?this._options.enabled_features=this._options.enabled_features.concat(t.enabled_features):this._options.enabled_features=t.enabled_features):console.warn("Unknown preset: `"+e.preset+"`")}"Dark"===this._options.theme&&void 0===this._options.loading_screen&&(this._options.loading_screen={backgroundColor:"#131722"}),this._create()}onChartReady(e){this._ready?e.call(this):this._readyHandlers.push(e)}headerReady(){return this._innerWindowLoaded.then((()=>this._innerWindow().headerReady()))}onGrayedObjectClicked(e){this._innerAPI().onGrayedObjectClicked(e)}onShortcut(e,t){this._innerWindow().createShortcutAction(e,t)}subscribe(e,t){this._innerAPI().subscribe(e,t)}unsubscribe(e,t){this._innerAPI().unsubscribe(e,t)}chart(e){return this._innerAPI().chart(e)}getLanguage(){return this._options.locale}setSymbol(e,t,i){this._innerAPI().changeSymbol(e,t,i)}remove(){window.removeEventListener("resize",this._onWindowResize),this._readyHandlers.splice(0,this._readyHandlers.length),delete window[this._id],this._iFrame.parentNode&&this._iFrame.parentNode.removeChild(this._iFrame)}closePopupsAndDialogs(){this._innerAPI().closePopupsAndDialogs()}selectLineTool(e){this._innerAPI().selectLineTool(e)}selectedLineTool(){return this._innerAPI().selectedLineTool()}save(e){this._innerAPI().saveChart(e)}load(e,t){this._innerAPI().loadChart({json:e,extendedData:t})}getSavedCharts(e){this._innerAPI().getSavedCharts(e)}loadChartFromServer(e){this._innerAPI().loadChartFromServer(e)}saveChartToServer(e,t,i){this._innerAPI().saveChartToServer(e,t,i)}removeChartFromServer(e,t){this._innerAPI().removeChartFromServer(e,t)}onContextMenu(e){this._innerAPI().onContextMenu(e)}createButton(e){return this._innerWindow().createButton(e)}showNoticeDialog(e){this._innerAPI().showNoticeDialog(e)}showConfirmDialog(e){this._innerAPI().showConfirmDialog(e)}showLoadChartDialog(){this._innerAPI().showLoadChartDialog()}showSaveAsChartDialog(){this._innerAPI().showSaveAsChartDialog()}symbolInterval(){return this._innerAPI().getSymbolInterval()}mainSeriesPriceFormatter(){return this._innerAPI().mainSeriesPriceFormatter()}getIntervals(){return this._innerAPI().getIntervals()}getStudiesList(){return this._innerAPI().getStudiesList()}addCustomCSSFile(e){this._innerWindow().addCustomCSSFile(e)}applyOverrides(e){this._options=t(this._options,{overrides:e}),this._innerWindow().applyOverrides(e)}applyStudiesOverrides(e){this._innerWindow().applyStudiesOverrides(e)}watchList(){return this._innerAPI().watchlist()}activeChart(){return this._innerAPI().activeChart()}chartsCount(){return this._innerAPI().chartsCount()}layout(){return this._innerAPI().layout()}setLayout(e){this._innerAPI().setLayout(e)}layoutName(){return this._innerAPI().layoutName()}changeTheme(e,t){this._innerWindow().changeTheme(e,t)}getTheme(){return this._innerWindow().getTheme()}takeScreenshot(){this._innerAPI().takeScreenshot()}lockAllDrawingTools(){return this._innerAPI().lockAllDrawingTools()}hideAllDrawingTools(){return this._innerAPI().hideAllDrawingTools()}drawOnAllCharts(e){this._innerAPI().drawOnAllCharts(e)}magnetEnabled(){return this._innerAPI().magnetEnabled()}magnetMode(){return this._innerAPI().magnetMode()}undoRedoState(){return this._innerAPI().undoRedoState()}setIntervalLinkingEnabled(e){this._innerAPI().setIntervalLinkingEnabled(e)}setTimeFrame(e){this._innerAPI().setTimeFrame(e)}symbolSync(){return this._innerAPI().symbolSync()}intervalSync(){return this._innerAPI().intervalSync()}crosshairSync(){return this._innerAPI().crosshairSync()}timeSync(){return this._innerAPI().timeSync()}getAllFeatures(){return this._innerWindow().getAllFeatures()}clearUndoHistory(){return this._innerAPI().clearUndoHistory()}undo(){return this._innerAPI().undo()}redo(){return this._innerAPI().redo()}startFullscreen(){this._innerAPI().startFullscreen()}exitFullscreen(){this._innerAPI().exitFullscreen()}takeClientScreenshot(e){return this._innerAPI().takeClientScreenshot(e)}_innerAPI(){return this._innerWindow().tradingViewApi}_innerWindow(){return this._iFrame.contentWindow}_autoResizeChart(){this._options.fullscreen&&(this._iFrame.style.height=window.innerHeight+"px")}_create(){const e=this._render();this._options.container_id&&console.warn("`container_id` is now deprecated. Please use `container` instead to either still pass a string or an `HTMLElement`.");const t=this._options.container_id||this._options.container,i="string"==typeof t?document.getElementById(t):t;if(null===i)throw new Error(`There is no such element - #${this._options.container}`);i.innerHTML=e,this._iFrame=i.querySelector(`#${this._id}`);const n=this._iFrame;(this._options.autosize||this._options.fullscreen)&&(n.style.width="100%",this._options.fullscreen||(n.style.height="100%")),window.addEventListener("resize",this._onWindowResize),this._onWindowResize(),this._innerWindowLoaded=new Promise((e=>{const t=()=>{n.removeEventListener("load",t,!1),e()};n.addEventListener("load",t,!1)})),this._innerWindowLoaded.then((()=>{this._innerWindow().widgetReady((()=>{this._ready=!0;for(const t of this._readyHandlers)try{t.call(this)}catch(e){console.error(e)}this._innerWindow().initializationFinished()}))}))}_render(){const e=window;if(e[this._id]={datafeed:this._options.datafeed,customFormatters:this._options.custom_formatters||this._options.customFormatters,brokerFactory:this._options.broker_factory||this._options.brokerFactory,overrides:this._options.overrides,studiesOverrides:this._options.studies_overrides,tradingCustomization:this._options.trading_customization,disabledFeatures:this._options.disabled_features,enabledFeatures:this._options.enabled_features,brokerConfig:this._options.broker_config||this._options.brokerConfig,restConfig:this._options.restConfig,favorites:this._options.favorites,logo:this._options.logo,numeric_formatting:this._options.numeric_formatting,rss_news_feed:this._options.rss_news_feed,newsProvider:this._options.news_provider,loadLastChart:this._options.load_last_chart,saveLoadAdapter:this._options.save_load_adapter,loading_screen:this._options.loading_screen,settingsAdapter:this._options.settings_adapter,getCustomIndicators:this._options.custom_indicators_getter,additionalSymbolInfoFields:this._options.additional_symbol_info_fields,headerWidgetButtonsMode:this._options.header_widget_buttons_mode},this._options.saved_data)e[this._id].chartContent={json:this._options.saved_data},this._options.saved_data_meta_info&&(e[this._id].chartContentExtendedData=this._options.saved_data_meta_info);else if(!this._options.load_last_chart&&!this._options.symbol)throw new Error("Symbol is not defined: either 'symbol' or 'load_last_chart' option must be set");const t=(this._options.library_path||"")+`${encodeURIComponent(this._options.locale)}-tv-chart.ad2f4a55.html#symbol=`+encodeURIComponent(this._options.symbol||"")+"&interval="+encodeURIComponent(this._options.interval)+(this._options.timeframe?"&timeframe="+encodeURIComponent(this._options.timeframe):"")+(this._options.toolbar_bg?"&toolbarbg="+encodeURIComponent(this._options.toolbar_bg.replace("#","")):"")+(this._options.studies_access?"&studiesAccess="+encodeURIComponent(JSON.stringify(this._options.studies_access)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this._options.widgetbar))+(this._options.drawings_access?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this._options.drawings_access)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this._options.time_frames))+"&locale="+encodeURIComponent(this._options.locale)+"&uid="+encodeURIComponent(this._id)+"&clientId="+encodeURIComponent(String(this._options.client_id))+"&userId="+encodeURIComponent(String(this._options.user_id))+(this._options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this._options.charts_storage_url):"")+(this._options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this._options.charts_storage_api_version):"")+(this._options.custom_css_url?"&customCSS="+encodeURIComponent(this._options.custom_css_url):"")+(this._options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(String(this._options.auto_save_delay)):"")+"&debug="+encodeURIComponent(String(this._options.debug))+(this._options.snapshot_url?"&snapshotUrl="+encodeURIComponent(this._options.snapshot_url):"")+(this._options.timezone?"&timezone="+encodeURIComponent(this._options.timezone):"")+(this._options.study_count_limit?"&studyCountLimit="+encodeURIComponent(String(this._options.study_count_limit)):"")+(this._options.symbol_search_request_delay?"&ssreqdelay="+encodeURIComponent(String(this._options.symbol_search_request_delay)):"")+(this._options.compare_symbols?"&compareSymbols="+encodeURIComponent(JSON.stringify(this._options.compare_symbols)):"")+(this._options.theme?"&theme="+encodeURIComponent(String(this._options.theme)):"")+(this._options.header_widget_buttons_mode?"&header_widget_buttons_mode="+encodeURIComponent(String(this._options.header_widget_buttons_mode)):"")+(this._options.time_scale?"&time_scale="+encodeURIComponent(JSON.stringify(this._options.time_scale)):"");return''}};return window.TradingView=window.TradingView||{},window.TradingView.version=o,e.version=o,e.widget=s,e}({}); +var TradingView=function(e){"use strict";function t(e,i){const n=Object.assign({},e);for(const o in i)"object"!=typeof e[o]||null===e[o]||Array.isArray(e[o])?void 0!==i[o]&&(n[o]=i[o]):n[o]=t(e[o],i[o]);return n}const i={mobile:{disabled_features:["left_toolbar","header_widget","timeframes_toolbar","edit_buttons_in_legend","context_menus","control_bar","border_around_the_chart"],enabled_features:[]}},n={width:800,height:500,interval:"1D",timezone:"Etc/UTC",container:"",library_path:"",locale:"en",widgetbar:{details:!1,watchlist:!1,watchlist_settings:{default_symbols:[]}},overrides:{"mainSeriesProperties.showCountdown":!1},studies_overrides:{},trading_customization:{position:{},order:{}},brokerConfig:{configFlags:{}},fullscreen:!1,autosize:!1,disabled_features:[],enabled_features:[],debug:!1,logo:{},time_frames:[{text:"5y",resolution:"1W"},{text:"1y",resolution:"1W"},{text:"6m",resolution:"120"},{text:"3m",resolution:"60"},{text:"1m",resolution:"30"},{text:"5d",resolution:"5"},{text:"1d",resolution:"1"}],client_id:"0",user_id:"0",charts_storage_api_version:"1.0",favorites:{intervals:[],chartTypes:[]}};function o(){return"CL v20.033 (internal id 9df149da @ 2021-11-17T10:20:51.511Z)"}const s=class{constructor(e){if(this._id=`tradingview_${(1048576*(1+Math.random())|0).toString(16).substring(1)}`,this._ready=!1,this._readyHandlers=[],this._onWindowResize=this._autoResizeChart.bind(this),!e.datafeed)throw new Error("Datafeed is not defined");if(this._options=t(n,e),e.preset){const t=i[e.preset];t?(void 0!==this._options.disabled_features?this._options.disabled_features=this._options.disabled_features.concat(t.disabled_features):this._options.disabled_features=t.disabled_features,void 0!==this._options.enabled_features?this._options.enabled_features=this._options.enabled_features.concat(t.enabled_features):this._options.enabled_features=t.enabled_features):console.warn("Unknown preset: `"+e.preset+"`")}"Dark"===this._options.theme&&void 0===this._options.loading_screen&&(this._options.loading_screen={backgroundColor:"#131722"}),this._create()}onChartReady(e){this._ready?e.call(this):this._readyHandlers.push(e)}headerReady(){return this._innerWindowLoaded.then((()=>this._innerWindow().headerReady()))}onGrayedObjectClicked(e){this._innerAPI().onGrayedObjectClicked(e)}onShortcut(e,t){this._innerWindow().createShortcutAction(e,t)}subscribe(e,t){this._innerAPI().subscribe(e,t)}unsubscribe(e,t){this._innerAPI().unsubscribe(e,t)}chart(e){return this._innerAPI().chart(e)}getLanguage(){return this._options.locale}setSymbol(e,t,i){this._innerAPI().changeSymbol(e,t,i)}remove(){window.removeEventListener("resize",this._onWindowResize),this._readyHandlers.splice(0,this._readyHandlers.length),delete window[this._id],this._iFrame.parentNode&&this._iFrame.parentNode.removeChild(this._iFrame)}closePopupsAndDialogs(){this._innerAPI().closePopupsAndDialogs()}selectLineTool(e){this._innerAPI().selectLineTool(e)}selectedLineTool(){return this._innerAPI().selectedLineTool()}save(e){this._innerAPI().saveChart(e)}load(e,t){this._innerAPI().loadChart({json:e,extendedData:t})}getSavedCharts(e){this._innerAPI().getSavedCharts(e)}loadChartFromServer(e){this._innerAPI().loadChartFromServer(e)}saveChartToServer(e,t,i){this._innerAPI().saveChartToServer(e,t,i)}removeChartFromServer(e,t){this._innerAPI().removeChartFromServer(e,t)}onContextMenu(e){this._innerAPI().onContextMenu(e)}createButton(e){return this._innerWindow().createButton(e)}showNoticeDialog(e){this._innerAPI().showNoticeDialog(e)}showConfirmDialog(e){this._innerAPI().showConfirmDialog(e)}showLoadChartDialog(){this._innerAPI().showLoadChartDialog()}showSaveAsChartDialog(){this._innerAPI().showSaveAsChartDialog()}symbolInterval(){return this._innerAPI().getSymbolInterval()}mainSeriesPriceFormatter(){return this._innerAPI().mainSeriesPriceFormatter()}getIntervals(){return this._innerAPI().getIntervals()}getStudiesList(){return this._innerAPI().getStudiesList()}addCustomCSSFile(e){this._innerWindow().addCustomCSSFile(e)}applyOverrides(e){this._options=t(this._options,{overrides:e}),this._innerWindow().applyOverrides(e)}applyStudiesOverrides(e){this._innerWindow().applyStudiesOverrides(e)}watchList(){return this._innerAPI().watchlist()}activeChart(){return this._innerAPI().activeChart()}chartsCount(){return this._innerAPI().chartsCount()}layout(){return this._innerAPI().layout()}setLayout(e){this._innerAPI().setLayout(e)}layoutName(){return this._innerAPI().layoutName()}changeTheme(e,t){this._innerWindow().changeTheme(e,t)}getTheme(){return this._innerWindow().getTheme()}takeScreenshot(){this._innerAPI().takeScreenshot()}lockAllDrawingTools(){return this._innerAPI().lockAllDrawingTools()}hideAllDrawingTools(){return this._innerAPI().hideAllDrawingTools()}drawOnAllCharts(e){this._innerAPI().drawOnAllCharts(e)}magnetEnabled(){return this._innerAPI().magnetEnabled()}magnetMode(){return this._innerAPI().magnetMode()}undoRedoState(){return this._innerAPI().undoRedoState()}setIntervalLinkingEnabled(e){this._innerAPI().setIntervalLinkingEnabled(e)}setTimeFrame(e){this._innerAPI().setTimeFrame(e)}symbolSync(){return this._innerAPI().symbolSync()}intervalSync(){return this._innerAPI().intervalSync()}crosshairSync(){return this._innerAPI().crosshairSync()}timeSync(){return this._innerAPI().timeSync()}getAllFeatures(){return this._innerWindow().getAllFeatures()}clearUndoHistory(){return this._innerAPI().clearUndoHistory()}undo(){return this._innerAPI().undo()}redo(){return this._innerAPI().redo()}startFullscreen(){this._innerAPI().startFullscreen()}exitFullscreen(){this._innerAPI().exitFullscreen()}takeClientScreenshot(e){return this._innerAPI().takeClientScreenshot(e)}_innerAPI(){return this._innerWindow().tradingViewApi}_innerWindow(){return this._iFrame.contentWindow}_autoResizeChart(){this._options.fullscreen&&(this._iFrame.style.height=window.innerHeight+"px")}_create(){const e=this._render();this._options.container_id&&console.warn("`container_id` is now deprecated. Please use `container` instead to either still pass a string or an `HTMLElement`.");const t=this._options.container_id||this._options.container,i="string"==typeof t?document.getElementById(t):t;if(null===i)throw new Error(`There is no such element - #${this._options.container}`);i.innerHTML=e,this._iFrame=i.querySelector(`#${this._id}`);const n=this._iFrame;(this._options.autosize||this._options.fullscreen)&&(n.style.width="100%",this._options.fullscreen||(n.style.height="100%")),window.addEventListener("resize",this._onWindowResize),this._onWindowResize(),this._innerWindowLoaded=new Promise((e=>{const t=()=>{n.removeEventListener("load",t,!1),e()};n.addEventListener("load",t,!1)})),this._innerWindowLoaded.then((()=>{this._innerWindow().widgetReady((()=>{this._ready=!0;for(const t of this._readyHandlers)try{t.call(this)}catch(e){console.error(e)}this._innerWindow().initializationFinished()}))}))}_render(){const e=window;if(e[this._id]={datafeed:this._options.datafeed,customFormatters:this._options.custom_formatters||this._options.customFormatters,brokerFactory:this._options.broker_factory||this._options.brokerFactory,overrides:this._options.overrides,studiesOverrides:this._options.studies_overrides,tradingCustomization:this._options.trading_customization,disabledFeatures:this._options.disabled_features,enabledFeatures:this._options.enabled_features,brokerConfig:this._options.broker_config||this._options.brokerConfig,restConfig:this._options.restConfig,favorites:this._options.favorites,logo:this._options.logo,numeric_formatting:this._options.numeric_formatting,rss_news_feed:this._options.rss_news_feed,newsProvider:this._options.news_provider,loadLastChart:this._options.load_last_chart,saveLoadAdapter:this._options.save_load_adapter,loading_screen:this._options.loading_screen,settingsAdapter:this._options.settings_adapter,getCustomIndicators:this._options.custom_indicators_getter,additionalSymbolInfoFields:this._options.additional_symbol_info_fields,headerWidgetButtonsMode:this._options.header_widget_buttons_mode},this._options.saved_data)e[this._id].chartContent={json:this._options.saved_data},this._options.saved_data_meta_info&&(e[this._id].chartContentExtendedData=this._options.saved_data_meta_info);else if(!this._options.load_last_chart&&!this._options.symbol)throw new Error("Symbol is not defined: either 'symbol' or 'load_last_chart' option must be set");const t=(this._options.library_path||"")+`${encodeURIComponent(this._options.locale)}-tv-chart.9df149da.html#symbol=`+encodeURIComponent(this._options.symbol||"")+"&interval="+encodeURIComponent(this._options.interval)+(this._options.timeframe?"&timeframe="+encodeURIComponent(this._options.timeframe):"")+(this._options.toolbar_bg?"&toolbarbg="+encodeURIComponent(this._options.toolbar_bg.replace("#","")):"")+(this._options.studies_access?"&studiesAccess="+encodeURIComponent(JSON.stringify(this._options.studies_access)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this._options.widgetbar))+(this._options.drawings_access?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this._options.drawings_access)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this._options.time_frames))+"&locale="+encodeURIComponent(this._options.locale)+"&uid="+encodeURIComponent(this._id)+"&clientId="+encodeURIComponent(String(this._options.client_id))+"&userId="+encodeURIComponent(String(this._options.user_id))+(this._options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this._options.charts_storage_url):"")+(this._options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this._options.charts_storage_api_version):"")+(this._options.custom_css_url?"&customCSS="+encodeURIComponent(this._options.custom_css_url):"")+(this._options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(String(this._options.auto_save_delay)):"")+"&debug="+encodeURIComponent(String(this._options.debug))+(this._options.snapshot_url?"&snapshotUrl="+encodeURIComponent(this._options.snapshot_url):"")+(this._options.timezone?"&timezone="+encodeURIComponent(this._options.timezone):"")+(this._options.study_count_limit?"&studyCountLimit="+encodeURIComponent(String(this._options.study_count_limit)):"")+(this._options.symbol_search_request_delay?"&ssreqdelay="+encodeURIComponent(String(this._options.symbol_search_request_delay)):"")+(this._options.compare_symbols?"&compareSymbols="+encodeURIComponent(JSON.stringify(this._options.compare_symbols)):"")+(this._options.theme?"&theme="+encodeURIComponent(String(this._options.theme)):"")+(this._options.header_widget_buttons_mode?"&header_widget_buttons_mode="+encodeURIComponent(String(this._options.header_widget_buttons_mode)):"")+(this._options.time_scale?"&time_scale="+encodeURIComponent(JSON.stringify(this._options.time_scale)):"");return''}};return window.TradingView=window.TradingView||{},window.TradingView.version=o,e.version=o,e.widget=s,e}({}); diff --git a/charting_library/cs-tv-chart.ad2f4a55.html b/charting_library/cs-tv-chart.9df149da.html similarity index 99% rename from charting_library/cs-tv-chart.ad2f4a55.html rename to charting_library/cs-tv-chart.9df149da.html index 7d521925..6ca0d02f 100644 --- a/charting_library/cs-tv-chart.ad2f4a55.html +++ b/charting_library/cs-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/da_DK-tv-chart.ad2f4a55.html b/charting_library/da_DK-tv-chart.9df149da.html similarity index 99% rename from charting_library/da_DK-tv-chart.ad2f4a55.html rename to charting_library/da_DK-tv-chart.9df149da.html index 8bb31082..f08e324d 100644 --- a/charting_library/da_DK-tv-chart.ad2f4a55.html +++ b/charting_library/da_DK-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/de-tv-chart.ad2f4a55.html b/charting_library/de-tv-chart.9df149da.html similarity index 99% rename from charting_library/de-tv-chart.ad2f4a55.html rename to charting_library/de-tv-chart.9df149da.html index df5341db..68bf8426 100644 --- a/charting_library/de-tv-chart.ad2f4a55.html +++ b/charting_library/de-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/el-tv-chart.ad2f4a55.html b/charting_library/el-tv-chart.9df149da.html similarity index 99% rename from charting_library/el-tv-chart.ad2f4a55.html rename to charting_library/el-tv-chart.9df149da.html index eb94955b..a9b96f34 100644 --- a/charting_library/el-tv-chart.ad2f4a55.html +++ b/charting_library/el-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/en-tv-chart.ad2f4a55.html b/charting_library/en-tv-chart.9df149da.html similarity index 99% rename from charting_library/en-tv-chart.ad2f4a55.html rename to charting_library/en-tv-chart.9df149da.html index 3d94dde1..a590d4c4 100644 --- a/charting_library/en-tv-chart.ad2f4a55.html +++ b/charting_library/en-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/es-tv-chart.ad2f4a55.html b/charting_library/es-tv-chart.9df149da.html similarity index 99% rename from charting_library/es-tv-chart.ad2f4a55.html rename to charting_library/es-tv-chart.9df149da.html index 727dbd59..6f84f8ae 100644 --- a/charting_library/es-tv-chart.ad2f4a55.html +++ b/charting_library/es-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/et_EE-tv-chart.ad2f4a55.html b/charting_library/et_EE-tv-chart.9df149da.html similarity index 98% rename from charting_library/et_EE-tv-chart.ad2f4a55.html rename to charting_library/et_EE-tv-chart.9df149da.html index 512acef1..ae123c12 100644 --- a/charting_library/et_EE-tv-chart.ad2f4a55.html +++ b/charting_library/et_EE-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/fa-tv-chart.ad2f4a55.html b/charting_library/fa-tv-chart.9df149da.html similarity index 99% rename from charting_library/fa-tv-chart.ad2f4a55.html rename to charting_library/fa-tv-chart.9df149da.html index 8ce11bf0..97aec5e0 100644 --- a/charting_library/fa-tv-chart.ad2f4a55.html +++ b/charting_library/fa-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/fr-tv-chart.ad2f4a55.html b/charting_library/fr-tv-chart.9df149da.html similarity index 99% rename from charting_library/fr-tv-chart.ad2f4a55.html rename to charting_library/fr-tv-chart.9df149da.html index 59cbb7fc..5193f1b8 100644 --- a/charting_library/fr-tv-chart.ad2f4a55.html +++ b/charting_library/fr-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/he_IL-tv-chart.ad2f4a55.html b/charting_library/he_IL-tv-chart.9df149da.html similarity index 99% rename from charting_library/he_IL-tv-chart.ad2f4a55.html rename to charting_library/he_IL-tv-chart.9df149da.html index 46ced0f1..395a1bcc 100644 --- a/charting_library/he_IL-tv-chart.ad2f4a55.html +++ b/charting_library/he_IL-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/hu_HU-tv-chart.ad2f4a55.html b/charting_library/hu_HU-tv-chart.9df149da.html similarity index 99% rename from charting_library/hu_HU-tv-chart.ad2f4a55.html rename to charting_library/hu_HU-tv-chart.9df149da.html index aac8a5ec..8284aab4 100644 --- a/charting_library/hu_HU-tv-chart.ad2f4a55.html +++ b/charting_library/hu_HU-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/id_ID-tv-chart.ad2f4a55.html b/charting_library/id_ID-tv-chart.9df149da.html similarity index 99% rename from charting_library/id_ID-tv-chart.ad2f4a55.html rename to charting_library/id_ID-tv-chart.9df149da.html index 157dee9b..b35857e6 100644 --- a/charting_library/id_ID-tv-chart.ad2f4a55.html +++ b/charting_library/id_ID-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/it-tv-chart.ad2f4a55.html b/charting_library/it-tv-chart.9df149da.html similarity index 99% rename from charting_library/it-tv-chart.ad2f4a55.html rename to charting_library/it-tv-chart.9df149da.html index 19944e18..6d153264 100644 --- a/charting_library/it-tv-chart.ad2f4a55.html +++ b/charting_library/it-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ja-tv-chart.ad2f4a55.html b/charting_library/ja-tv-chart.9df149da.html similarity index 99% rename from charting_library/ja-tv-chart.ad2f4a55.html rename to charting_library/ja-tv-chart.9df149da.html index 374bf4c2..636e430c 100644 --- a/charting_library/ja-tv-chart.ad2f4a55.html +++ b/charting_library/ja-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ko-tv-chart.ad2f4a55.html b/charting_library/ko-tv-chart.9df149da.html similarity index 99% rename from charting_library/ko-tv-chart.ad2f4a55.html rename to charting_library/ko-tv-chart.9df149da.html index b089e035..51a17b4e 100644 --- a/charting_library/ko-tv-chart.ad2f4a55.html +++ b/charting_library/ko-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ms_MY-tv-chart.ad2f4a55.html b/charting_library/ms_MY-tv-chart.9df149da.html similarity index 99% rename from charting_library/ms_MY-tv-chart.ad2f4a55.html rename to charting_library/ms_MY-tv-chart.9df149da.html index e2fbc937..2ff891a9 100644 --- a/charting_library/ms_MY-tv-chart.ad2f4a55.html +++ b/charting_library/ms_MY-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/nl_NL-tv-chart.ad2f4a55.html b/charting_library/nl_NL-tv-chart.9df149da.html similarity index 99% rename from charting_library/nl_NL-tv-chart.ad2f4a55.html rename to charting_library/nl_NL-tv-chart.9df149da.html index 3ac49eb2..79b5aa00 100644 --- a/charting_library/nl_NL-tv-chart.ad2f4a55.html +++ b/charting_library/nl_NL-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/no-tv-chart.ad2f4a55.html b/charting_library/no-tv-chart.9df149da.html similarity index 98% rename from charting_library/no-tv-chart.ad2f4a55.html rename to charting_library/no-tv-chart.9df149da.html index 78f5fc24..2d9a4c92 100644 --- a/charting_library/no-tv-chart.ad2f4a55.html +++ b/charting_library/no-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/package.json b/charting_library/package.json index b59e69e1..3994561f 100644 --- a/charting_library/package.json +++ b/charting_library/package.json @@ -1,6 +1,6 @@ { "private": true, - "description": "CL v20.032 (internal id ad2f4a55 @ 2021-10-28T12:29:15.152Z)", + "description": "CL v20.033 (internal id 9df149da @ 2021-11-17T10:20:51.511Z)", "type": "module", "main": "charting_library.cjs.js", "module": "charting_library.esm.js", diff --git a/charting_library/pl-tv-chart.ad2f4a55.html b/charting_library/pl-tv-chart.9df149da.html similarity index 99% rename from charting_library/pl-tv-chart.ad2f4a55.html rename to charting_library/pl-tv-chart.9df149da.html index c76100d7..b5899c62 100644 --- a/charting_library/pl-tv-chart.ad2f4a55.html +++ b/charting_library/pl-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/pt-tv-chart.ad2f4a55.html b/charting_library/pt-tv-chart.9df149da.html similarity index 99% rename from charting_library/pt-tv-chart.ad2f4a55.html rename to charting_library/pt-tv-chart.9df149da.html index b344b214..576c7d0e 100644 --- a/charting_library/pt-tv-chart.ad2f4a55.html +++ b/charting_library/pt-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ro-tv-chart.ad2f4a55.html b/charting_library/ro-tv-chart.9df149da.html similarity index 99% rename from charting_library/ro-tv-chart.ad2f4a55.html rename to charting_library/ro-tv-chart.9df149da.html index 1c1a4e4e..8987486d 100644 --- a/charting_library/ro-tv-chart.ad2f4a55.html +++ b/charting_library/ro-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ru-tv-chart.ad2f4a55.html b/charting_library/ru-tv-chart.9df149da.html similarity index 99% rename from charting_library/ru-tv-chart.ad2f4a55.html rename to charting_library/ru-tv-chart.9df149da.html index aaf2a712..4b2f7a0a 100644 --- a/charting_library/ru-tv-chart.ad2f4a55.html +++ b/charting_library/ru-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/sk_SK-tv-chart.ad2f4a55.html b/charting_library/sk_SK-tv-chart.9df149da.html similarity index 98% rename from charting_library/sk_SK-tv-chart.ad2f4a55.html rename to charting_library/sk_SK-tv-chart.9df149da.html index 701cc220..72229b76 100644 --- a/charting_library/sk_SK-tv-chart.ad2f4a55.html +++ b/charting_library/sk_SK-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/sv-tv-chart.ad2f4a55.html b/charting_library/sv-tv-chart.9df149da.html similarity index 99% rename from charting_library/sv-tv-chart.ad2f4a55.html rename to charting_library/sv-tv-chart.9df149da.html index c1851f5a..b828ce9f 100644 --- a/charting_library/sv-tv-chart.ad2f4a55.html +++ b/charting_library/sv-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/th-tv-chart.ad2f4a55.html b/charting_library/th-tv-chart.9df149da.html similarity index 99% rename from charting_library/th-tv-chart.ad2f4a55.html rename to charting_library/th-tv-chart.9df149da.html index 70202243..bff61b36 100644 --- a/charting_library/th-tv-chart.ad2f4a55.html +++ b/charting_library/th-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/tr-tv-chart.ad2f4a55.html b/charting_library/tr-tv-chart.9df149da.html similarity index 99% rename from charting_library/tr-tv-chart.ad2f4a55.html rename to charting_library/tr-tv-chart.9df149da.html index 53038ed9..6576cc5d 100644 --- a/charting_library/tr-tv-chart.ad2f4a55.html +++ b/charting_library/tr-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/vi-tv-chart.ad2f4a55.html b/charting_library/vi-tv-chart.9df149da.html similarity index 99% rename from charting_library/vi-tv-chart.ad2f4a55.html rename to charting_library/vi-tv-chart.9df149da.html index 9453e910..3d015b86 100644 --- a/charting_library/vi-tv-chart.ad2f4a55.html +++ b/charting_library/vi-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/zh-tv-chart.ad2f4a55.html b/charting_library/zh-tv-chart.9df149da.html similarity index 99% rename from charting_library/zh-tv-chart.ad2f4a55.html rename to charting_library/zh-tv-chart.9df149da.html index 1b078b29..7ee8cc79 100644 --- a/charting_library/zh-tv-chart.ad2f4a55.html +++ b/charting_library/zh-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/zh_TW-tv-chart.ad2f4a55.html b/charting_library/zh_TW-tv-chart.9df149da.html similarity index 99% rename from charting_library/zh_TW-tv-chart.ad2f4a55.html rename to charting_library/zh_TW-tv-chart.9df149da.html index 109b5671..e3dd1569 100644 --- a/charting_library/zh_TW-tv-chart.ad2f4a55.html +++ b/charting_library/zh_TW-tv-chart.9df149da.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file