Release v19.034 (from 71af24cd)

Fixes tradingview/charting_library#5870
This commit is contained in:
jenkins@nwork.local
2021-07-05 08:50:51 +00:00
parent 2b04deae4a
commit 1e089d1808
36 changed files with 39 additions and 39 deletions

View File

@@ -172,10 +172,10 @@ return v&&(null===this._model.crossHairSource().pane||Object(d.isLineToolName)(p
var m=document.createElement("table");m.classList.add("tv-chart-events-table");var v=document.createElement("tr"),y=document.createElement("tr");m.appendChild(v),m.appendChild(y);var g=document.createElement("th");g.textContent=window.t("Actual"),v.appendChild(g);var b=document.createElement("th");b.textContent=window.t("Forecast"),v.appendChild(b);var S=document.createElement("th");S.textContent=window.t("Previous"),v.appendChild(S);var w=document.createElement("td"),P=e.actual&&(0,r.forceLTRStr)(e.actual);o.html(w,P||"—"),y.appendChild(w);var C=document.createElement("td"),T=e.forecast&&(0,r.forceLTRStr)(e.forecast);o.html(C,T||"—"),y.appendChild(C);var x=document.createElement("td"),I=e.previous&&(0,r.forceLTRStr)(e.previous);o.html(x,I||"—"),y.appendChild(x),t.appendChild(m)}}t.Tooltip=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.direction,n=void 0===i?"top":i,r=t.clickable,o=void 0!==r&&r,s=t.width;l(this,e),this._direction=n,this._tooltipShown=!1,this._tooltipX=void 0,this._tooltipY=void 0,this._tooltipItems=null,this._width=void 0!==s?s:200,this._tooltip=document.createElement("div"),this._tooltip.classList.add("tv-chart-events-source__tooltip"),this._tooltip.style.position="absolute",this._tooltip.style.width=this._width+"px",this._tooltipContent=document.createElement("div"),this._tooltipContent.classList.add("tv-chart-events-source__tooltip__content"),this._tooltip.appendChild(this._tooltipContent),o&&this._tooltip.classList.add("tv-chart-events-source__tooltip--clickable")}return n(e,[{key:"show",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.items,i=void 0===t?[]:t,n=e.x,r=void 0===n?0:n,s=e.y,a=void 0===s?0:s,l=e.wrapElement,c=void 0===l?null:l,u=e.timeOffset,d=void 0===u?"":u,p=e.leftBorderColor,f=void 0===p?null:p;if(c&&!h(i)){var m=o.contentWidth(c),v=o.contentHeight(c),y=!1,g=!1;if(this._tooltipShown||(c.appendChild(this._tooltip),this._tooltipShown=!0,y=!0,g=!0),r===this._tooltipX&&a===this._tooltipY||(y=!0),y){var b=Math.max(Math.min(r-this._width/2,m-this._width-10),0);this._tooltip.style.left=Math.round(b)+"px",this._tooltip.style.bottom=Math.round(v-a+10)+"px"}if(this._tooltipItems||(g=!0),!g)for(var S=i.length;S--;)if(this._tooltipItems[S]!==i[S]){g=!0;break}if(g){var w=void 0;if(i.length<=1)w=i;else{for(var P={},C=i.length;C--;){var T=i[C].importance;null==T&&(T=-1),P[T]||(P[T]=[]),P[T].push(i[C])}var x=Object.keys(P).sort((function(e,t){return e-t}));if(x.length<=1)w=P[x[0]];else{w=[];for(var I=x.length;I--;)for(var L=P[x[I]],O=L.length;O--;)w.push(L[O])}}this._tooltipContent.innerHTML="";for(var M=w.length;M--;){var A=w[M],k="";A.hasOwnProperty("importance")?("string"==typeof A.importance&&("earnings"===A.importance?k="--importance-earnings":"splits"===A.importance?k="--importance-splits":"dividends"===A.importance?k="--importance-dividends":"list"===A.importance&&(k="--importance-list")),0===A.importance?k="--importance-normal":A.importance>0&&(k="--importance-high")):f||(k="--importance-none") var m=document.createElement("table");m.classList.add("tv-chart-events-table");var v=document.createElement("tr"),y=document.createElement("tr");m.appendChild(v),m.appendChild(y);var g=document.createElement("th");g.textContent=window.t("Actual"),v.appendChild(g);var b=document.createElement("th");b.textContent=window.t("Forecast"),v.appendChild(b);var S=document.createElement("th");S.textContent=window.t("Previous"),v.appendChild(S);var w=document.createElement("td"),P=e.actual&&(0,r.forceLTRStr)(e.actual);o.html(w,P||"—"),y.appendChild(w);var C=document.createElement("td"),T=e.forecast&&(0,r.forceLTRStr)(e.forecast);o.html(C,T||"—"),y.appendChild(C);var x=document.createElement("td"),I=e.previous&&(0,r.forceLTRStr)(e.previous);o.html(x,I||"—"),y.appendChild(x),t.appendChild(m)}}t.Tooltip=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.direction,n=void 0===i?"top":i,r=t.clickable,o=void 0!==r&&r,s=t.width;l(this,e),this._direction=n,this._tooltipShown=!1,this._tooltipX=void 0,this._tooltipY=void 0,this._tooltipItems=null,this._width=void 0!==s?s:200,this._tooltip=document.createElement("div"),this._tooltip.classList.add("tv-chart-events-source__tooltip"),this._tooltip.style.position="absolute",this._tooltip.style.width=this._width+"px",this._tooltipContent=document.createElement("div"),this._tooltipContent.classList.add("tv-chart-events-source__tooltip__content"),this._tooltip.appendChild(this._tooltipContent),o&&this._tooltip.classList.add("tv-chart-events-source__tooltip--clickable")}return n(e,[{key:"show",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.items,i=void 0===t?[]:t,n=e.x,r=void 0===n?0:n,s=e.y,a=void 0===s?0:s,l=e.wrapElement,c=void 0===l?null:l,u=e.timeOffset,d=void 0===u?"":u,p=e.leftBorderColor,f=void 0===p?null:p;if(c&&!h(i)){var m=o.contentWidth(c),v=o.contentHeight(c),y=!1,g=!1;if(this._tooltipShown||(c.appendChild(this._tooltip),this._tooltipShown=!0,y=!0,g=!0),r===this._tooltipX&&a===this._tooltipY||(y=!0),y){var b=Math.max(Math.min(r-this._width/2,m-this._width-10),0);this._tooltip.style.left=Math.round(b)+"px",this._tooltip.style.bottom=Math.round(v-a+10)+"px"}if(this._tooltipItems||(g=!0),!g)for(var S=i.length;S--;)if(this._tooltipItems[S]!==i[S]){g=!0;break}if(g){var w=void 0;if(i.length<=1)w=i;else{for(var P={},C=i.length;C--;){var T=i[C].importance;null==T&&(T=-1),P[T]||(P[T]=[]),P[T].push(i[C])}var x=Object.keys(P).sort((function(e,t){return e-t}));if(x.length<=1)w=P[x[0]];else{w=[];for(var I=x.length;I--;)for(var L=P[x[I]],O=L.length;O--;)w.push(L[O])}}this._tooltipContent.innerHTML="";for(var M=w.length;M--;){var A=w[M],k="";A.hasOwnProperty("importance")?("string"==typeof A.importance&&("earnings"===A.importance?k="--importance-earnings":"splits"===A.importance?k="--importance-splits":"dividends"===A.importance?k="--importance-dividends":"list"===A.importance&&(k="--importance-list")),0===A.importance?k="--importance-normal":A.importance>0&&(k="--importance-high")):f||(k="--importance-none")
;var E="tv-chart-events-source__tooltip__item";k&&(E+=" "+E+k);var V=document.createElement("div");o.attr(V,"class",E),f&&(V.style.borderLeftColor=f),_(A,V,d),this._tooltipContent.appendChild(V)}this._tooltipItems=i}"bottom"===this._direction&&(this._tooltip.style.bottom=Math.round(v-a-o.contentHeight(this._tooltipContent)+10)+"px")}}},{key:"hide",value:function(){this._tooltipShown&&(this._tooltip.parentElement&&this._tooltip.parentElement.removeChild(this._tooltip),this._tooltipShown=!1)}},{key:"isOpened",value:function(){return this._tooltipShown}},{key:"getElem",value:function(){return this._tooltip}}]),e}()},"704P":function(e,t,i){"use strict";(function(e){var n=i("Ss5c").LineDataSource,r=i("jkoZ"),o=i("Ocx9").DefaultProperty,s=i("k9/m").PlotRowSearchMode,a=i("s1Gx").sortSourcesPreOrdered.LineToolExecution;function l(e,t){this._pane=e,this._timeScale=t}function c(e){this._line=e}function u(e,t){this._adapter=new c(this);var r=t||u.createProperties();this.customization={forcePriceAxisLabel:!1,disableErasing:!0},n.call(this,e,r),this.setSelectionEnabled(!1),i.e("lt-pane-views").then(function(e){var t=i("tjxb").ExecutionPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}l.prototype._cachedByBarIndexOrderedExecutions={},l.recreateOrderedByBarsSourcesCache=function(e){l.clearOrderedByBarsSourcesCache();for(var t=l.prototype,i=e.sourcesByGroup().all(),n=0;n<i.length;++n){var r=i[n];if(r._adapter&&void 0!==r._adapter._index){var o=t._cachedByBarIndexOrderedExecutions[r._adapter._index];t._cachedByBarIndexOrderedExecutions[r._adapter._index]=o||[],t._cachedByBarIndexOrderedExecutions[r._adapter._index].push(r)}}},l.clearOrderedByBarsSourcesCache=function(){l.prototype._cachedByBarIndexOrderedExecutions={}},l.prototype.getXYCoordinate=function(e,t,i){var n=0,r=e.getDirection(),o="buy"===r,a=this._pane.model().mainSeries();if(a.bars){var l=o?10:-10,c=a.bars().search(i,s.NearestLeft);if(null!==c){i=c.index;var h=o?c.value[TradingView.LOW_PLOT]:c.value[TradingView.HIGH_PLOT],d=a.priceScale(),p=a.firstValue();n=d.priceToCoordinate(h,p)+l}}e._index=i;var f=t.visibleBarsStrictRange();if(!isFinite(i)||null===f||i>f.lastBar()||i<f.firstBar())return{x:-1,y:-1};for(var _=this._cachedByBarIndexOrderedExecutions[i]||this._pane.sourcesByGroup().all(),m=_.length-1;m>=0;--m){var v=_[m];if(v instanceof u&&v._adapter._index===i&&v._adapter.getDirection()===r){if(v===e._line)break;var y=v._adapter._height();n=o?n+y:n-y}}return{x:t.indexToCoordinate(i),y:n}},c.prototype._height=function(){var e=this.getArrowHeight(),t=this.getArrowSpacing();this.getText()&&r.fontHeight(this.getFont());return e+t+0+10},c.prototype.getIndex=function(){return this._line._model.timeScale().baseIndex()-this._line.points()[0].index},c.prototype.setIndex=function(e){var t=this._line._model.timeScale().baseIndex()-Math.abs(e);this._line.startMoving({logical:this._line.points()[0]});var i=TradingView.merge({},this._line.points()[0]);return i.index=t,this._line.move({logical:i}),this._line.endMoving(),this}, ;var E="tv-chart-events-source__tooltip__item";k&&(E+=" "+E+k);var V=document.createElement("div");o.attr(V,"class",E),f&&(V.style.borderLeftColor=f),_(A,V,d),this._tooltipContent.appendChild(V)}this._tooltipItems=i}"bottom"===this._direction&&(this._tooltip.style.bottom=Math.round(v-a-o.contentHeight(this._tooltipContent)+10)+"px")}}},{key:"hide",value:function(){this._tooltipShown&&(this._tooltip.parentElement&&this._tooltip.parentElement.removeChild(this._tooltip),this._tooltipShown=!1)}},{key:"isOpened",value:function(){return this._tooltipShown}},{key:"getElem",value:function(){return this._tooltip}}]),e}()},"704P":function(e,t,i){"use strict";(function(e){var n=i("Ss5c").LineDataSource,r=i("jkoZ"),o=i("Ocx9").DefaultProperty,s=i("k9/m").PlotRowSearchMode,a=i("s1Gx").sortSourcesPreOrdered.LineToolExecution;function l(e,t){this._pane=e,this._timeScale=t}function c(e){this._line=e}function u(e,t){this._adapter=new c(this);var r=t||u.createProperties();this.customization={forcePriceAxisLabel:!1,disableErasing:!0},n.call(this,e,r),this.setSelectionEnabled(!1),i.e("lt-pane-views").then(function(e){var t=i("tjxb").ExecutionPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}l.prototype._cachedByBarIndexOrderedExecutions={},l.recreateOrderedByBarsSourcesCache=function(e){l.clearOrderedByBarsSourcesCache();for(var t=l.prototype,i=e.sourcesByGroup().all(),n=0;n<i.length;++n){var r=i[n];if(r._adapter&&void 0!==r._adapter._index){var o=t._cachedByBarIndexOrderedExecutions[r._adapter._index];t._cachedByBarIndexOrderedExecutions[r._adapter._index]=o||[],t._cachedByBarIndexOrderedExecutions[r._adapter._index].push(r)}}},l.clearOrderedByBarsSourcesCache=function(){l.prototype._cachedByBarIndexOrderedExecutions={}},l.prototype.getXYCoordinate=function(e,t,i){var n=0,r=e.getDirection(),o="buy"===r,a=this._pane.model().mainSeries();if(a.bars){var l=o?10:-10,c=a.bars().search(i,s.NearestLeft);if(null!==c){i=c.index;var h=o?c.value[TradingView.LOW_PLOT]:c.value[TradingView.HIGH_PLOT],d=a.priceScale(),p=a.firstValue();n=d.priceToCoordinate(h,p)+l}}e._index=i;var f=t.visibleBarsStrictRange();if(!isFinite(i)||null===f||i>f.lastBar()||i<f.firstBar())return{x:-1,y:-1};for(var _=this._cachedByBarIndexOrderedExecutions[i]||this._pane.sourcesByGroup().all(),m=_.length-1;m>=0;--m){var v=_[m];if(v instanceof u&&v._adapter._index===i&&v._adapter.getDirection()===r){if(v===e._line)break;var y=v._adapter._height();n=o?n+y:n-y}}return{x:t.indexToCoordinate(i),y:n}},c.prototype._height=function(){var e=this.getArrowHeight(),t=this.getArrowSpacing();this.getText()&&r.fontHeight(this.getFont());return e+t+0+10},c.prototype.getIndex=function(){return this._line._model.timeScale().baseIndex()-this._line.points()[0].index},c.prototype.setIndex=function(e){var t=this._line._model.timeScale().baseIndex()-Math.abs(e);this._line.startMoving({logical:this._line.points()[0]});var i=TradingView.merge({},this._line.points()[0]);return i.index=t,this._line.move({logical:i}),this._line.endMoving(),this},
c.prototype.getTime=function(){return this._unixtime},c.prototype.setTime=function(e){return this._unixtime=e,this._line.restorePoints([{offset:0,price:this.getPrice(),time_t:this._unixtime}],[]),this._line.createServerPoints(),this},c.prototype.getPrice=function(){return this._line.points().length>0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0},c.prototype.setPrice=function(e){return this._line.points().length>0&&(this._line.points()[0].price=e),this._line._timePoint.length>0&&(this._line._timePoint[0].price=e),this},c.prototype.getText=function(){return this._line.properties().text.value()},c.prototype.setText=function(e){return this._line.properties().text.setValue(e||""),this._line.updateAllViewsAndRedraw(),this},c.prototype.getArrowHeight=function(){return this._line.properties().arrowHeight.value()},c.prototype.setArrowHeight=function(e){return this._line.properties().arrowHeight.setValue(e||5),this},c.prototype.getArrowSpacing=function(){return this._line.properties().arrowSpacing.value()},c.prototype.setArrowSpacing=function(e){return this._line.properties().arrowSpacing.setValue(e||1),this},c.prototype.getDirection=function(){return this._line.properties().direction.value()},c.prototype.setDirection=function(e){return this._line.properties().direction.setValue(e||"buy"),this},c.prototype.getArrowColor=function(){var e=this._line.properties();return"buy"===this.getDirection()?e.arrowBuyColor.value():e.arrowSellColor.value()},c.prototype.setArrowColor=function(e){return"buy"===this.getDirection()?this.setArrowBuyColor(e):this.setArrowSellColor(e),this},c.prototype.setArrowBuyColor=function(e){return this._line.properties().arrowBuyColor.setValue(e),this},c.prototype.setArrowSellColor=function(e){return this._line.properties().arrowSellColor.setValue(e),this},c.prototype.getTextColor=function(){return r.getColorFromProperties(this._line.properties().textColor,this._line.properties().textTransparency)},c.prototype.setTextColor=function(e){return r.setColorToProperties(e,this._line.properties().textColor,this._line.properties().textTransparency),this},c.prototype.getFont=function(){return r.getFontFromProperties(this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic)},c.prototype.setFont=function(e){return r.setFontToProperties(e,this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic),this},c.prototype.setTooltip=function(e){return null==e?e="":e+="",this._line.properties().tooltip.setValue(e),this},c.prototype.getTooltip=function(){return this._line.properties().tooltip.value()},c.prototype.remove=function(){this._line._model.removeSource(this._line),delete this._line},c.prototype.getPoints=function(){return this._line.points()},inherit(u,n),u.prototype.zorder=function(){return a},u.POINTS_COUNT=1,u.prototype.pointsCount=function(){return u.POINTS_COUNT},u.prototype.name=function(){return"Execution"}, c.prototype.getTime=function(){return this._unixtime},c.prototype.setTime=function(e){return this._unixtime=e,this._line.restorePoints([{offset:0,price:this.getPrice(),time_t:this._unixtime}],[]),this._line.createServerPoints(),this},c.prototype.getPrice=function(){return this._line.points().length>0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0},c.prototype.setPrice=function(e){return this._line.points().length>0&&(this._line.points()[0].price=e),this._line._timePoint.length>0&&(this._line._timePoint[0].price=e),this},c.prototype.getText=function(){return this._line.properties().text.value()},c.prototype.setText=function(e){return this._line.properties().text.setValue(e||""),this._line.updateAllViewsAndRedraw(),this},c.prototype.getArrowHeight=function(){return this._line.properties().arrowHeight.value()},c.prototype.setArrowHeight=function(e){return this._line.properties().arrowHeight.setValue(e||5),this},c.prototype.getArrowSpacing=function(){return this._line.properties().arrowSpacing.value()},c.prototype.setArrowSpacing=function(e){return this._line.properties().arrowSpacing.setValue(e||1),this},c.prototype.getDirection=function(){return this._line.properties().direction.value()},c.prototype.setDirection=function(e){return this._line.properties().direction.setValue(e||"buy"),this},c.prototype.getArrowColor=function(){var e=this._line.properties();return"buy"===this.getDirection()?e.arrowBuyColor.value():e.arrowSellColor.value()},c.prototype.setArrowColor=function(e){return"buy"===this.getDirection()?this.setArrowBuyColor(e):this.setArrowSellColor(e),this},c.prototype.setArrowBuyColor=function(e){return this._line.properties().arrowBuyColor.setValue(e),this},c.prototype.setArrowSellColor=function(e){return this._line.properties().arrowSellColor.setValue(e),this},c.prototype.getTextColor=function(){return r.getColorFromProperties(this._line.properties().textColor,this._line.properties().textTransparency)},c.prototype.setTextColor=function(e){return r.setColorToProperties(e,this._line.properties().textColor,this._line.properties().textTransparency),this},c.prototype.getFont=function(){return r.getFontFromProperties(this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic)},c.prototype.setFont=function(e){return r.setFontToProperties(e,this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic),this},c.prototype.setTooltip=function(e){return null==e?e="":e+="",this._line.properties().tooltip.setValue(e),this},c.prototype.getTooltip=function(){return this._line.properties().tooltip.value()},c.prototype.remove=function(){this._line._model.removeSource(this._line),delete this._line},c.prototype.getPoints=function(){return this._line.points()},inherit(u,n),u.prototype.zorder=function(){return a},u.POINTS_COUNT=1,u.prototype.pointsCount=function(){return u.POINTS_COUNT},u.prototype.name=function(){return"Execution"},
u.prototype.hasContextMenu=function(){return!1},u.prototype.state=function(){return null},u.prototype.updateAllViews=function(){return this._isVisible()?n.prototype.updateAllViews.call(this):null},u.prototype.priceAxisViews=function(e,t){return this._isVisible()?n.prototype.priceAxisViews.call(this,e,t):null},u.prototype._isVisible=function(){return this._model.properties().tradingProperties.showExecutions.value()},u.prototype.paneViews=function(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showExecutions.value()?n.prototype.paneViews.call(this):null},u.prototype.userEditEnabled=function(){return!1},u.prototype.showInObjectTree=function(){return!1},u.prototype.cloneable=function(){return!1},u.prototype.copiable=function(){return!1},u.createProperties=function(e){var t=new o("linetoolexecution",e,!1,!1);return u._configureProperties(t),t},u._configureProperties=function(e){n._configureProperties(e)},t.ExecutionsPositionController=l,t.LineToolExecution=u}).call(this,i("Kxc7"))},"7ETO":function(e,t,i){"use strict";i.r(t);var n=i("ocLq"),r=function(){function e(){}return e.prototype.main=function(e){var t=e.new_var(n.Std.open(e)),i=e.new_var(n.Std.close(e)),r=t.get(1),o=i.get(1),s=n.Std.ohlc4(e),a=n.Std.na(t.get(1))?(n.Std.open(e)+n.Std.close(e))/2:(r+o)/2;t.set(a),i.set(s);var l=n.Std.max(n.Std.high(e),n.Std.max(a,s)),c=n.Std.min(n.Std.low(e),n.Std.min(a,s)),u=n.Std.volume(e),h=e.symbol;return[h.time,a,l,c,s,u,h.updatetime,h.isBarClosed]},e}();function o(e){if(0===e.type.indexOf("BarSetHeikenAshi@tv-basicstudies-"))return new r;var t="unknown builder type: "+e.type;throw console.error(t),new Error(t)}i.d(t,"getChartStyleStudy",(function(){return o}))},"7Fue":function(e,t,i){"use strict";i.d(t,"a",(function(){return o})),i.d(t,"b",(function(){return s}));var n=i("mrSG"),r=["horizlines","vertlines","lines","hlines","textmarks","shapemarks","backgrounds","polygons","trendchannels","hhists","dwglabels","dwglines","dwgtables","dwgcells"];function o(e){return!r.some((function(t){return e[t]().size>0}))}function s(e){var t=new Map;return e.forEach((function(e,i){e.forEach((function(e){var r=Object(n.a)(Object(n.a)({},e),{styleId:i}),o=e.firstBarTime,s=t.get(o);void 0===s&&(s=new Set,t.set(o,s)),s.add(r)}))})),t}},"7KDR":function(e,t,i){"use strict";i.r(t),i.d(t,"Action",(function(){return c})),i.d(t,"ActionAsync",(function(){return u})),i.d(t,"Separator",(function(){return h}));var n=i("mrSG"),r=i("zRdu"),o=i("aIyQ"),s=i.n(o),a=i("/3z9"),l=i("e3/o"),c=function(){function e(e,t){void 0===t&&(t=l.guid()),this.type=r.a.Action,this._destroyed=!1,this._binding=null,this.id=t,this._onUpdate=new s.a,this._options=e,this.update(e)}return e.prototype.execute=function(){this._options.checkable&&this.update({checked:!this._options.checked}),this._options.onExecute&&this._options.onExecute(this)},e.prototype.getLabel=function(){return this._options.label||""},e.prototype.getSubItems=function(){return this._options.subItems||[]},e.prototype.isDisabled=function(){ u.prototype.hasContextMenu=function(){return!1},u.prototype.state=function(){return null},u.prototype.updateAllViews=function(){return this._isVisible()?n.prototype.updateAllViews.call(this):null},u.prototype.priceAxisViews=function(e,t){return this._isVisible()?n.prototype.priceAxisViews.call(this,e,t):null},u.prototype._isVisible=function(){return this._model.properties().tradingProperties.showExecutions.value()},u.prototype.paneViews=function(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showExecutions.value()?n.prototype.paneViews.call(this):null},u.prototype.userEditEnabled=function(){return!1},u.prototype.showInObjectTree=function(){return!1},u.prototype.cloneable=function(){return!1},u.prototype.copiable=function(){return!1},u.prototype.isSynchronizable=function(){return!1},u.createProperties=function(e){var t=new o("linetoolexecution",e,!1,!1);return u._configureProperties(t),t},u._configureProperties=function(e){n._configureProperties(e)},t.ExecutionsPositionController=l,t.LineToolExecution=u}).call(this,i("Kxc7"))},"7ETO":function(e,t,i){"use strict";i.r(t);var n=i("ocLq"),r=function(){function e(){}return e.prototype.main=function(e){var t=e.new_var(n.Std.open(e)),i=e.new_var(n.Std.close(e)),r=t.get(1),o=i.get(1),s=n.Std.ohlc4(e),a=n.Std.na(t.get(1))?(n.Std.open(e)+n.Std.close(e))/2:(r+o)/2;t.set(a),i.set(s);var l=n.Std.max(n.Std.high(e),n.Std.max(a,s)),c=n.Std.min(n.Std.low(e),n.Std.min(a,s)),u=n.Std.volume(e),h=e.symbol;return[h.time,a,l,c,s,u,h.updatetime,h.isBarClosed]},e}();function o(e){if(0===e.type.indexOf("BarSetHeikenAshi@tv-basicstudies-"))return new r;var t="unknown builder type: "+e.type;throw console.error(t),new Error(t)}i.d(t,"getChartStyleStudy",(function(){return o}))},"7Fue":function(e,t,i){"use strict";i.d(t,"a",(function(){return o})),i.d(t,"b",(function(){return s}));var n=i("mrSG"),r=["horizlines","vertlines","lines","hlines","textmarks","shapemarks","backgrounds","polygons","trendchannels","hhists","dwglabels","dwglines","dwgtables","dwgcells"];function o(e){return!r.some((function(t){return e[t]().size>0}))}function s(e){var t=new Map;return e.forEach((function(e,i){e.forEach((function(e){var r=Object(n.a)(Object(n.a)({},e),{styleId:i}),o=e.firstBarTime,s=t.get(o);void 0===s&&(s=new Set,t.set(o,s)),s.add(r)}))})),t}},"7KDR":function(e,t,i){"use strict";i.r(t),i.d(t,"Action",(function(){return c})),i.d(t,"ActionAsync",(function(){return u})),i.d(t,"Separator",(function(){return h}));var n=i("mrSG"),r=i("zRdu"),o=i("aIyQ"),s=i.n(o),a=i("/3z9"),l=i("e3/o"),c=function(){function e(e,t){void 0===t&&(t=l.guid()),this.type=r.a.Action,this._destroyed=!1,this._binding=null,this.id=t,this._onUpdate=new s.a,this._options=e,this.update(e)}return e.prototype.execute=function(){this._options.checkable&&this.update({checked:!this._options.checked}),this._options.onExecute&&this._options.onExecute(this)},e.prototype.getLabel=function(){return this._options.label||""},e.prototype.getSubItems=function(){
return!0===this._options.disabled},e.prototype.isActive=function(){return!0===this._options.active},e.prototype.isCheckable=function(){return!0===this._options.checkable},e.prototype.isChecked=function(){return!0===this._options.checked},e.prototype.getPayload=function(){return this._options.payload},e.prototype.update=function(e){this._destroyed||(this._unbindShortcut(),e.hotkeyHash&&(this._options.shortcutHint=Object(a.humanReadableHash)(e.hotkeyHash)),this._options=Object.assign(this._options,e),this._bindShortcut(),this._onUpdate.fire(this))},e.prototype.onUpdate=function(){return this._onUpdate},e.prototype.getState=function(){return{label:this.getLabel(),disabled:this.isDisabled(),active:this.isActive(),subItems:this.getSubItems(),checkable:this.isCheckable(),checked:this.isChecked(),doNotCloseOnClick:this._options.doNotCloseOnClick||!1,shortcutHint:this._options.shortcutHint,hint:this._options.hint,icon:this._options.icon,iconChecked:this._options.iconChecked,toolbox:this._options.toolbox,showToolboxOnHover:this._options.showToolboxOnHover||!1,statName:this._options.statName,name:this._options.name,fullWidthLabel:this._options.fullWidthLabel}},e.prototype.getBinding=function(){return this._binding},e.prototype.setBinding=function(e){this._binding=e},e.prototype.destroy=function(){this._destroyed=!0,this._onUpdate.destroy(),null!==this._binding&&this._binding.destroy(),this._unbindShortcut()},e.prototype._bindShortcut=function(){var e=this;if(this._options.hotkeyGroup&&this._options.hotkeyHash){var t="string"==typeof this._options.label?this._options.label:this._options.name;this._hotkeyAction=this._options.hotkeyGroup.add({hotkey:this._options.hotkeyHash,desc:t,handler:function(){return e.execute()},isDisabled:function(){return e.isDisabled()}})}},e.prototype._unbindShortcut=function(){this._hotkeyAction&&(this._hotkeyAction.destroy(),delete this._hotkeyAction)},e}(),u=function(e){function t(t,i){var n=e.call(this,{},i)||this;return n.type=r.a.ActionAsync,n._loader=t,n._loaded=!1,n}return Object(n.c)(t,e),t.prototype.loadOptions=function(){var e=this;return this._loadingPromise||(this._loadingPromise=this._loader().then((function(t){e.update(t),e._loaded=!0}))),this._loadingPromise},t.prototype.isLoaded=function(){return this._loaded},t}(c),h=function(){function e(e,t){void 0===t&&(t=l.guid()),this.type=r.a.Separator,this.id=t,this._hint=e}return e.prototype.getHint=function(){return this._hint},e}()},"7MZv":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showTooManyStudiesNotice=function(e){"number"!=typeof e&&(e=TradingView.STUDY_COUNT_LIMIT);(0,n.showNoticeDialog)({title:window.t("Warning"),content:window.t("Studies limit exceeded: {0} studies per layout.\nPlease, remove some studies.").format(e)})};var n=i("brCa")},"7RN7":function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"a",(function(){return r}));var n=52,r=5},"7dm8":function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return o})),i.d(t,"c",(function(){return s})), return this._options.subItems||[]},e.prototype.isDisabled=function(){return!0===this._options.disabled},e.prototype.isActive=function(){return!0===this._options.active},e.prototype.isCheckable=function(){return!0===this._options.checkable},e.prototype.isChecked=function(){return!0===this._options.checked},e.prototype.getPayload=function(){return this._options.payload},e.prototype.update=function(e){this._destroyed||(this._unbindShortcut(),e.hotkeyHash&&(this._options.shortcutHint=Object(a.humanReadableHash)(e.hotkeyHash)),this._options=Object.assign(this._options,e),this._bindShortcut(),this._onUpdate.fire(this))},e.prototype.onUpdate=function(){return this._onUpdate},e.prototype.getState=function(){return{label:this.getLabel(),disabled:this.isDisabled(),active:this.isActive(),subItems:this.getSubItems(),checkable:this.isCheckable(),checked:this.isChecked(),doNotCloseOnClick:this._options.doNotCloseOnClick||!1,shortcutHint:this._options.shortcutHint,hint:this._options.hint,icon:this._options.icon,iconChecked:this._options.iconChecked,toolbox:this._options.toolbox,showToolboxOnHover:this._options.showToolboxOnHover||!1,statName:this._options.statName,name:this._options.name,fullWidthLabel:this._options.fullWidthLabel}},e.prototype.getBinding=function(){return this._binding},e.prototype.setBinding=function(e){this._binding=e},e.prototype.destroy=function(){this._destroyed=!0,this._onUpdate.destroy(),null!==this._binding&&this._binding.destroy(),this._unbindShortcut()},e.prototype._bindShortcut=function(){var e=this;if(this._options.hotkeyGroup&&this._options.hotkeyHash){var t="string"==typeof this._options.label?this._options.label:this._options.name;this._hotkeyAction=this._options.hotkeyGroup.add({hotkey:this._options.hotkeyHash,desc:t,handler:function(){return e.execute()},isDisabled:function(){return e.isDisabled()}})}},e.prototype._unbindShortcut=function(){this._hotkeyAction&&(this._hotkeyAction.destroy(),delete this._hotkeyAction)},e}(),u=function(e){function t(t,i){var n=e.call(this,{},i)||this;return n.type=r.a.ActionAsync,n._loader=t,n._loaded=!1,n}return Object(n.c)(t,e),t.prototype.loadOptions=function(){var e=this;return this._loadingPromise||(this._loadingPromise=this._loader().then((function(t){e.update(t),e._loaded=!0}))),this._loadingPromise},t.prototype.isLoaded=function(){return this._loaded},t}(c),h=function(){function e(e,t){void 0===t&&(t=l.guid()),this.type=r.a.Separator,this.id=t,this._hint=e}return e.prototype.getHint=function(){return this._hint},e}()},"7MZv":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showTooManyStudiesNotice=function(e){"number"!=typeof e&&(e=TradingView.STUDY_COUNT_LIMIT);(0,n.showNoticeDialog)({title:window.t("Warning"),content:window.t("Studies limit exceeded: {0} studies per layout.\nPlease, remove some studies.").format(e)})};var n=i("brCa")},"7RN7":function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"a",(function(){return r}));var n=52,r=5},"7dm8":function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),
i.d(t,"d",(function(){return a})),i.d(t,"e",(function(){return l}));var n=i("ocLq"),r=function(){function e(){}return e.prototype.init=function(e,t){e.new_sym(t(1),n.Std.period(e)),this._source=t(0),this._scaleFactor1=1,this._scaleFactor2=1},e.prototype.main=function(e,t){var i=e.symbol.time,r=n.Std[this._source](e);e.select_sym(1);var o=n.Std[this._source](e),s=e.new_unlimited_var(o),a=e.new_unlimited_var(e.symbol.time);if(e.select_sym(0),isNaN(i))return null;var l=a.indexOf(i);-1!==l&&a.get(l)!==i&&(l=-1);var c=l<0?NaN:s.get(l);return[this._doCalculation(this._scaleFactor1,r,this._scaleFactor2,c)]},e}(),o={styles:{plot1:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:2,inputs:{source:"close",symbol2:""}},s=[{defval:"close",id:"source",name:"Source",options:["open","high","low","close","hl2","hlc3","ohlc4"],type:"text"},{id:"symbol2",name:"Symbol",type:"symbol",confirm:!0}],a=[{id:"plot1",type:"line"}],l={plot1:{title:"Plot",histogramBase:0}}},"7ktv":function(e,t,i){"use strict";i.r(t),i.d(t,"PriceDataSource",(function(){return l}));var n=i("mrSG"),r=i("fgLi"),o=i("aIyQ"),s=i.n(o),a=i("/tGj"),l=function(e){function t(t){var i=e.call(this)||this;return i._formatterChanged=new s.a,i._priceStepChanged=new s.a,i._currencyChanged=new s.a,i._priceRangeReadyChanged=new s.a,i._metaInfo=null,i._priceStep=null,i._priceRangeReady=!0,i._model=t,i}return Object(n.c)(t,e),t.prototype.firstValue=function(){return null},t.prototype.barColorer=function(){return null},t.prototype.base=function(){return 0},t.prototype.model=function(){return this._model},t.prototype.currencyChanged=function(){return this._currencyChanged},t.prototype.isCurrencySource=function(){return!0},t.prototype.priceRange=function(e,t){return null},t.prototype.isDraggable=function(){return!this._metaInfo||!this._metaInfo.linkedToSeries},t.prototype.priceLineColor=function(e){return e},t.prototype.formatterChanged=function(){return this._formatterChanged},t.prototype.priceStep=function(e){return this._priceStep},t.prototype.priceStepChanged=function(){return this._priceStepChanged},t.prototype.hasStateForAlert=function(){return!1},t.prototype.isIncludedInAutoScale=function(){return!0},t.prototype.correctScaleMargins=function(e){return e},t.prototype.priceRangeReady=function(){return this._priceRangeReady},t.prototype.priceRangeReadyChanged=function(){return this._priceRangeReadyChanged},t.prototype.disablePriceRangeReady=function(){var e=this.priceScale();null===e||e.isAutoScale()||e.mainSource()!==this||(this._priceRangeReady=!1,e.recalculatePriceRangeOnce()),this._priceRangeReadyChanged.fire(!1)},t.prototype._enablePriceRangeReady=function(){this._priceRangeReady=!0,this._priceRangeReadyChanged.fire(!0)},t.prototype._onSourceCurrencyChanged=function(){Object(a.isSymbolSource)(this)||this._currencyChanged.fire()},t.prototype._onSourcePriceRangeReadyChanged=function(e){Object(a.isSymbolSource)(this)||e||this.disablePriceRangeReady()},t}(r.DataSource)},"7nsU":function(e,t,i){"use strict";i.r(t), i.d(t,"b",(function(){return o})),i.d(t,"c",(function(){return s})),i.d(t,"d",(function(){return a})),i.d(t,"e",(function(){return l}));var n=i("ocLq"),r=function(){function e(){}return e.prototype.init=function(e,t){e.new_sym(t(1),n.Std.period(e)),this._source=t(0),this._scaleFactor1=1,this._scaleFactor2=1},e.prototype.main=function(e,t){var i=e.symbol.time,r=n.Std[this._source](e);e.select_sym(1);var o=n.Std[this._source](e),s=e.new_unlimited_var(o),a=e.new_unlimited_var(e.symbol.time);if(e.select_sym(0),isNaN(i))return null;var l=a.indexOf(i);-1!==l&&a.get(l)!==i&&(l=-1);var c=l<0?NaN:s.get(l);return[this._doCalculation(this._scaleFactor1,r,this._scaleFactor2,c)]},e}(),o={styles:{plot1:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:2,inputs:{source:"close",symbol2:""}},s=[{defval:"close",id:"source",name:"Source",options:["open","high","low","close","hl2","hlc3","ohlc4"],type:"text"},{id:"symbol2",name:"Symbol",type:"symbol",confirm:!0}],a=[{id:"plot1",type:"line"}],l={plot1:{title:"Plot",histogramBase:0}}},"7ktv":function(e,t,i){"use strict";i.r(t),i.d(t,"PriceDataSource",(function(){return l}));var n=i("mrSG"),r=i("fgLi"),o=i("aIyQ"),s=i.n(o),a=i("/tGj"),l=function(e){function t(t){var i=e.call(this)||this;return i._formatterChanged=new s.a,i._priceStepChanged=new s.a,i._currencyChanged=new s.a,i._priceRangeReadyChanged=new s.a,i._metaInfo=null,i._priceStep=null,i._priceRangeReady=!0,i._model=t,i}return Object(n.c)(t,e),t.prototype.firstValue=function(){return null},t.prototype.barColorer=function(){return null},t.prototype.base=function(){return 0},t.prototype.model=function(){return this._model},t.prototype.currencyChanged=function(){return this._currencyChanged},t.prototype.isCurrencySource=function(){return!0},t.prototype.priceRange=function(e,t){return null},t.prototype.isDraggable=function(){return!this._metaInfo||!this._metaInfo.linkedToSeries},t.prototype.priceLineColor=function(e){return e},t.prototype.formatterChanged=function(){return this._formatterChanged},t.prototype.priceStep=function(e){return this._priceStep},t.prototype.priceStepChanged=function(){return this._priceStepChanged},t.prototype.hasStateForAlert=function(){return!1},t.prototype.isIncludedInAutoScale=function(){return!0},t.prototype.correctScaleMargins=function(e){return e},t.prototype.priceRangeReady=function(){return this._priceRangeReady},t.prototype.priceRangeReadyChanged=function(){return this._priceRangeReadyChanged},t.prototype.disablePriceRangeReady=function(){var e=this.priceScale();null===e||e.isAutoScale()||e.mainSource()!==this||(this._priceRangeReady=!1,e.recalculatePriceRangeOnce()),this._priceRangeReadyChanged.fire(!1)},t.prototype._enablePriceRangeReady=function(){this._priceRangeReady=!0,this._priceRangeReadyChanged.fire(!0)},t.prototype._onSourceCurrencyChanged=function(){Object(a.isSymbolSource)(this)||this._currencyChanged.fire()},t.prototype._onSourcePriceRangeReadyChanged=function(e){Object(a.isSymbolSource)(this)||e||this.disablePriceRangeReady()},t
i.d(t,"showConfirmInputsDialog",(function(){return n}));i("YFKU");function n(e,t,n,r,o){void 0===o&&(o="default"),Promise.all([i.e("react"),i.e(1),i.e(2),i.e(5),i.e(6),i.e(7),i.e(9),i.e(10),i.e(11),i.e(12),i.e(15),i.e(19),i.e(25),i.e(26),i.e(28),i.e(31),i.e(58),i.e(100),i.e(0),i.e(4),i.e(3),i.e(8),i.e(17),i.e(23),i.e(30),i.e(52),i.e("new-confirm-inputs-dialog")]).then(i.bind(null,"iqv3")).then((function(i){var s=new i.ConfirmInputsDialogRenderer(function(e){if("symbol"===e)return window.t("Add Symbol");return window.t("Confirm Inputs")}(o),e,t,o,n,r);return s.show(),s}))}},"7qI1":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolRectangle",(function(){return u}));var n=i("mrSG"),r=i("aO4+"),o=i("Ocx9"),s=i("tc+8"),a=i.n(s),l=i("Ss5c"),c=i("j3hX"),u=function(e){function t(n,r){var o=this,s=r||t.createProperties();return o=e.call(this,n,s)||this,i.e("lt-pane-views").then(function(e){var t=[new(0,i("GW0y").RectanglePaneView)(o,n)];o._setPaneViews(t)}.bind(null,i)).catch(void 0),o}return Object(n.c)(t,e),t.prototype.pointsCount=function(){return 2},t.prototype.textColorsProperty=function(){return this.properties().childs().showLabel.value()?e.prototype.textColorsProperty.call(this):null},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.name=function(){return"Rectangle"},t.prototype.setPoint=function(t,i,n){if(t<2&&e.prototype.setPoint.call(this,t,i,n),n&&n.shift()&&this.properties().childs().snapTo45Degrees){var r=this._getAnchorPointForIndex(t);if(t>=4)return this._correctMiddlePoints(t,i,r),void this.normalizePoints();this._snapPoint45Degree(i,r)}switch(t){case 2:this._points[1].price=i.price,this._points[0].index=i.index;break;case 3:this._points[0].price=i.price,this._points[1].index=i.index;break;case 4:this._points[0].index=i.index;break;case 5:this._points[1].index=i.index;break;case 6:this._points[0].price=i.price;break;case 7:this._points[1].price=i.price}this.normalizePoints()},t.prototype.getPoint=function(t){return t<2?e.prototype.getPoint.call(this,t):this._getAnchorPointForIndex(t)},t.prototype.template=function(){var t=e.prototype.template.call(this);return t.text=this.properties().childs().text.value(),t},t.createProperties=function(e){var i=new o.DefaultProperty("linetoolrectangle",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(24),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"K4wI")).then((function(e){return e.RectangleDefinitionsViewModel}))},t.prototype._applyTemplateImpl=function(t){e.prototype._applyTemplateImpl.call(this,t),this.properties().childs().text.setValue(t.text)},t.prototype._snapPoint45Degree=function(e,t,i){var n=this.m_priceScale,r=this.ownerSource();if(null!==n&&null!==r){var o=r.firstValue();if(null!==o){ }(r.DataSource)},"7nsU":function(e,t,i){"use strict";i.r(t),i.d(t,"showConfirmInputsDialog",(function(){return n}));i("YFKU");function n(e,t,n,r,o){void 0===o&&(o="default"),Promise.all([i.e("react"),i.e(1),i.e(2),i.e(5),i.e(6),i.e(7),i.e(9),i.e(10),i.e(11),i.e(12),i.e(15),i.e(19),i.e(25),i.e(26),i.e(28),i.e(31),i.e(58),i.e(100),i.e(0),i.e(4),i.e(3),i.e(8),i.e(17),i.e(23),i.e(30),i.e(52),i.e("new-confirm-inputs-dialog")]).then(i.bind(null,"iqv3")).then((function(i){var s=new i.ConfirmInputsDialogRenderer(function(e){if("symbol"===e)return window.t("Add Symbol");return window.t("Confirm Inputs")}(o),e,t,o,n,r);return s.show(),s}))}},"7qI1":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolRectangle",(function(){return u}));var n=i("mrSG"),r=i("aO4+"),o=i("Ocx9"),s=i("tc+8"),a=i.n(s),l=i("Ss5c"),c=i("j3hX"),u=function(e){function t(n,r){var o=this,s=r||t.createProperties();return o=e.call(this,n,s)||this,i.e("lt-pane-views").then(function(e){var t=[new(0,i("GW0y").RectanglePaneView)(o,n)];o._setPaneViews(t)}.bind(null,i)).catch(void 0),o}return Object(n.c)(t,e),t.prototype.pointsCount=function(){return 2},t.prototype.textColorsProperty=function(){return this.properties().childs().showLabel.value()?e.prototype.textColorsProperty.call(this):null},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.name=function(){return"Rectangle"},t.prototype.setPoint=function(t,i,n){if(t<2&&e.prototype.setPoint.call(this,t,i,n),n&&n.shift()&&this.properties().childs().snapTo45Degrees){var r=this._getAnchorPointForIndex(t);if(t>=4)return this._correctMiddlePoints(t,i,r),void this.normalizePoints();this._snapPoint45Degree(i,r)}switch(t){case 2:this._points[1].price=i.price,this._points[0].index=i.index;break;case 3:this._points[0].price=i.price,this._points[1].index=i.index;break;case 4:this._points[0].index=i.index;break;case 5:this._points[1].index=i.index;break;case 6:this._points[0].price=i.price;break;case 7:this._points[1].price=i.price}this.normalizePoints()},t.prototype.getPoint=function(t){return t<2?e.prototype.getPoint.call(this,t):this._getAnchorPointForIndex(t)},t.prototype.template=function(){var t=e.prototype.template.call(this);return t.text=this.properties().childs().text.value(),t},t.createProperties=function(e){var i=new o.DefaultProperty("linetoolrectangle",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(24),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"K4wI")).then((function(e){return e.RectangleDefinitionsViewModel}))},t.prototype._applyTemplateImpl=function(t){e.prototype._applyTemplateImpl.call(this,t),this.properties().childs().text.setValue(t.text)},t.prototype._snapPoint45Degree=function(e,t,i){var n=this.m_priceScale,r=this.ownerSource();if(null!==n&&null!==r){var o=r.firstValue();if(null!==o){
var s=this._model.timeScale(),a=this.pointToScreenPoint(e)[0],l=this.pointToScreenPoint(t)[0],c=a.x-l.x,u=a.y-l.y,h=c<0?-1:1,d=u<0?-1:1,p=Math.max(Math.abs(c),Math.abs(u)),f=Math.round(s.coordinateToIndex(l.x+p*h)),_=Math.abs(s.indexToCoordinate(f)-l.x),m=n.coordinateToPrice(l.y+_*d,o);e.index=f,e.price=m}}},t.prototype._correctMiddlePoints=function(e,t,i){e<6?this._correctRightLeftMiddlePoint(e,t,i):this._correctTopBottomMiddlePoint(e,t,i)},t.prototype._correctRightLeftMiddlePoint=function(e,t,i){var n=this.pointToScreenPoint(t)[0],o=this.pointToScreenPoint(i)[0],s=this.pointToScreenPoint(this._points[0])[0],a=this.pointToScreenPoint(this._points[1])[0],l=n.x-o.x;if(0!==l){var c=s.x<a.x?1:-1,u=s.y<a.y?1:-1;switch(l*=c,e){case 4:var h=a.y-u*l/2,d=this.screenPointToPoint(new r.Point(a.x,h));this._points[1].price=d.price;var p=this.screenPointToPoint(new r.Point(s.x+c*l,s.y+u*l/2));this._points[0].price=p.price,this._points[0].index=p.index;break;case 5:var f=s.y-u*l/2;p=this.screenPointToPoint(new r.Point(s.x,f));this._points[0].price=p.price;d=this.screenPointToPoint(new r.Point(a.x+c*l,a.y+u*l/2));this._points[1].price=d.price,this._points[1].index=d.index}}},t.prototype._correctTopBottomMiddlePoint=function(e,t,i){var n=this.m_priceScale,o=this.ownerSource();if(null!==n&&null!==o){var s=this._model.timeScale(),a=o.firstValue();if(null!==a){var l=this.pointToScreenPoint(t)[0],c=this.pointToScreenPoint(i)[0],u=this.pointToScreenPoint(this._points[0])[0],h=this.pointToScreenPoint(this._points[1])[0],d=l.y-c.y,p=d<0?-1:1,f=u.x<h.x?1:-1,_=u.y<h.y?1:-1;switch(e){case 6:var m=Math.floor(h.x-f*d/2),v=this.screenPointToPoint(new r.Point(m,h.y)),y=Math.abs(this._points[1].index-v.index);if(0===(b=f*_*p*Math.ceil(y/2)))return;this._points[1].index=this._points[1].index-b;var g=p*Math.abs(s.indexToCoordinate(this._points[1].index)-h.x);this._points[0].price=n.coordinateToPrice(u.y+g,a),this._points[0].index=this._points[0].index+b;break;case 7:var b,S=Math.floor(u.x-f*d/2),w=this.screenPointToPoint(new r.Point(S,u.y));y=Math.abs(this._points[0].index-w.index);if(0===(b=f*_*p*Math.ceil(y/2)))return;this._points[0].index=this._points[0].index-b;g=p*Math.abs(s.indexToCoordinate(this._points[0].index)-u.x);this._points[1].price=n.coordinateToPrice(h.y+g,a),this._points[1].index=this._points[1].index+b}}}},t._configureProperties=function(e){l.LineDataSource._configureProperties(e),e.hasChild("text")||e.addChild("text",new a.a("")),e.addExclusion("text"),e.addChild("linesColors",new c.LineToolColorsProperty([e.childs().color])),e.addChild("textsColors",new c.LineToolColorsProperty([e.childs().textColor],e.childs().showLabel))},t.prototype._getAnchorPointForIndex=function(e){var t=this.points(),i=t[0],n=t[1],r=0,o=0;switch(e){case 0:r=i.price,o=i.index;break;case 1:r=n.price,o=n.index;break;case 2:r=n.price,o=i.index;break;case 3:r=i.price,o=n.index;break;case 4:r=(n.price+i.price)/2,o=i.index;break;case 5:r=(n.price+i.price)/2,o=n.index;break;case 6:r=i.price,o=(n.index+i.index)/2;break;case 7:r=n.price,o=(n.index+i.index)/2}return{ var s=this._model.timeScale(),a=this.pointToScreenPoint(e)[0],l=this.pointToScreenPoint(t)[0],c=a.x-l.x,u=a.y-l.y,h=c<0?-1:1,d=u<0?-1:1,p=Math.max(Math.abs(c),Math.abs(u)),f=Math.round(s.coordinateToIndex(l.x+p*h)),_=Math.abs(s.indexToCoordinate(f)-l.x),m=n.coordinateToPrice(l.y+_*d,o);e.index=f,e.price=m}}},t.prototype._correctMiddlePoints=function(e,t,i){e<6?this._correctRightLeftMiddlePoint(e,t,i):this._correctTopBottomMiddlePoint(e,t,i)},t.prototype._correctRightLeftMiddlePoint=function(e,t,i){var n=this.pointToScreenPoint(t)[0],o=this.pointToScreenPoint(i)[0],s=this.pointToScreenPoint(this._points[0])[0],a=this.pointToScreenPoint(this._points[1])[0],l=n.x-o.x;if(0!==l){var c=s.x<a.x?1:-1,u=s.y<a.y?1:-1;switch(l*=c,e){case 4:var h=a.y-u*l/2,d=this.screenPointToPoint(new r.Point(a.x,h));this._points[1].price=d.price;var p=this.screenPointToPoint(new r.Point(s.x+c*l,s.y+u*l/2));this._points[0].price=p.price,this._points[0].index=p.index;break;case 5:var f=s.y-u*l/2;p=this.screenPointToPoint(new r.Point(s.x,f));this._points[0].price=p.price;d=this.screenPointToPoint(new r.Point(a.x+c*l,a.y+u*l/2));this._points[1].price=d.price,this._points[1].index=d.index}}},t.prototype._correctTopBottomMiddlePoint=function(e,t,i){var n=this.m_priceScale,o=this.ownerSource();if(null!==n&&null!==o){var s=this._model.timeScale(),a=o.firstValue();if(null!==a){var l=this.pointToScreenPoint(t)[0],c=this.pointToScreenPoint(i)[0],u=this.pointToScreenPoint(this._points[0])[0],h=this.pointToScreenPoint(this._points[1])[0],d=l.y-c.y,p=d<0?-1:1,f=u.x<h.x?1:-1,_=u.y<h.y?1:-1;switch(e){case 6:var m=Math.floor(h.x-f*d/2),v=this.screenPointToPoint(new r.Point(m,h.y)),y=Math.abs(this._points[1].index-v.index);if(0===(b=f*_*p*Math.ceil(y/2)))return;this._points[1].index=this._points[1].index-b;var g=p*Math.abs(s.indexToCoordinate(this._points[1].index)-h.x);this._points[0].price=n.coordinateToPrice(u.y+g,a),this._points[0].index=this._points[0].index+b;break;case 7:var b,S=Math.floor(u.x-f*d/2),w=this.screenPointToPoint(new r.Point(S,u.y));y=Math.abs(this._points[0].index-w.index);if(0===(b=f*_*p*Math.ceil(y/2)))return;this._points[0].index=this._points[0].index-b;g=p*Math.abs(s.indexToCoordinate(this._points[0].index)-u.x);this._points[1].price=n.coordinateToPrice(h.y+g,a),this._points[1].index=this._points[1].index+b}}}},t._configureProperties=function(e){l.LineDataSource._configureProperties(e),e.hasChild("text")||e.addChild("text",new a.a("")),e.addExclusion("text"),e.addChild("linesColors",new c.LineToolColorsProperty([e.childs().color])),e.addChild("textsColors",new c.LineToolColorsProperty([e.childs().textColor],e.childs().showLabel))},t.prototype._getAnchorPointForIndex=function(e){var t=this.points(),i=t[0],n=t[1],r=0,o=0;switch(e){case 0:r=i.price,o=i.index;break;case 1:r=n.price,o=n.index;break;case 2:r=n.price,o=i.index;break;case 3:r=i.price,o=n.index;break;case 4:r=(n.price+i.price)/2,o=i.index;break;case 5:r=(n.price+i.price)/2,o=n.index;break;case 6:r=i.price,o=(n.index+i.index)/2;break;case 7:r=n.price,o=(n.index+i.index)/2}return{
index:o,price:r}},t}(l.LineDataSource)},"7qT/":function(e,t,i){"use strict";function n(e,t){return 100*(t-e)/Math.abs(e)}i.d(t,"a",(function(){return n}))},"8Blv":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolImage",(function(){return c}));var n=i("mrSG"),r=i("Eyy1"),o=i("Ocx9"),s=i("tc+8"),a=i.n(s),l=i("Ss5c"),c=function(e){function t(n,o){var s=e.call(this,n,o||t.createProperties())||this;s._cssWidth=0,s._cssHeight=0,s._angle=0,s._image=document.createElement("img");var a=s.properties();return s._image.src=Object(r.ensureDefined)(a.child("url")).value(),s._image.onload=function(){if(!(s._cssWidth&&s._cssHeight)){var e=n.timeScale().width()/4,t=Object(r.ensureNotNull)(s.priceScale()).height()/4,i=s._image.width,o=s._image.height,a=Math.min(1,e/i),l=Math.min(1,t/o),c=Math.min(a,l),u=Math.round(c*i),h=Math.round(c*o);s._cssWidth=u,s._cssHeight=h}},i.e("lt-pane-views").then(function(e){var t=i("xiOp").ImagePaneView;s._setPaneViews([new t(s,n)])}.bind(null,i)).catch(void 0),s}return Object(n.c)(t,e),t.prototype.state=function(t){var i=e.prototype.state.call(this,t);return Object(n.a)(Object(n.a)({},i),{cssWidth:this._cssWidth,cssHeight:this._cssHeight,angle:this._angle})},t.prototype.restoreData=function(e){this._cssWidth=e.cssWidth,this._cssHeight=e.cssHeight,this._angle=e.angle},t.prototype.cssWidth=function(){return this._cssWidth},t.prototype.cssHeight=function(){return this._cssHeight},t.prototype.angle=function(){return this._angle},t.prototype.pointsCount=function(){return 1},t.prototype.name=function(){return"Image"},t.prototype.image=function(){return this._image},t.prototype.setPoint=function(e,t,i){var n=this._model.timeScale(),o=Object(r.ensureNotNull)(this.priceScale()),s=Object(r.ensureNotNull)(this._model.paneForSource(this)),a=Object(r.ensureNotNull)(s.mainDataSource()),l=Object(r.ensureNotNull)(a.firstValue()),c=this._image.width,u=this._image.height,h=n.indexToCoordinate(t.index),d=o.priceToCoordinate(t.price,l),p=n.indexToCoordinate(this._points[0].index),f=o.priceToCoordinate(this._points[0].price,l),_=2*Math.abs(h-p)/c,m=2*Math.abs(d-f)/u,v=Math.min(_,m),y=Math.round(c*v),g=Math.round(u*v);this._cssWidth=y,this._cssHeight=g},t.createProperties=function(e){var i=new o.DefaultProperty("linetoolimage",e);return t._configureProperties(i),i},t._configureProperties=function(e){l.LineDataSource._configureProperties(e),e.hasChild("url")||e.addChild("url",new a.a("")),e.addExclusion("url")},t}(l.LineDataSource)},"8C8C":function(e,t,i){"use strict";i.r(t),i.d(t,"RestoreFactoryDefaultsUndoCommand",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i,n){void 0===n&&(n="Restore Defaults");var r=e.call(this,n)||this;return r._chartModel=t,r._defaultProperty=i,r._state=i.state(),r}return Object(n.c)(t,e),t.prototype.redo=function(){this._chartModel.restoreFactoryDefaults(this._defaultProperty)},t.prototype.undo=function(){this._defaultProperty.mergeAndFire(this._state),this._chartModel.mainSeries().onChartStyleChanged()},t}(i("RDU5").UndoCommand)},"8OdW":function(e,t,i){"use strict";i.r(t), index:o,price:r}},t}(l.LineDataSource)},"7qT/":function(e,t,i){"use strict";function n(e,t){return 100*(t-e)/Math.abs(e)}i.d(t,"a",(function(){return n}))},"8Blv":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolImage",(function(){return c}));var n=i("mrSG"),r=i("Eyy1"),o=i("Ocx9"),s=i("tc+8"),a=i.n(s),l=i("Ss5c"),c=function(e){function t(n,o){var s=e.call(this,n,o||t.createProperties())||this;s._cssWidth=0,s._cssHeight=0,s._angle=0,s._image=document.createElement("img");var a=s.properties();return s._image.src=Object(r.ensureDefined)(a.child("url")).value(),s._image.onload=function(){if(!(s._cssWidth&&s._cssHeight)){var e=n.timeScale().width()/4,t=Object(r.ensureNotNull)(s.priceScale()).height()/4,i=s._image.width,o=s._image.height,a=Math.min(1,e/i),l=Math.min(1,t/o),c=Math.min(a,l),u=Math.round(c*i),h=Math.round(c*o);s._cssWidth=u,s._cssHeight=h}},i.e("lt-pane-views").then(function(e){var t=i("xiOp").ImagePaneView;s._setPaneViews([new t(s,n)])}.bind(null,i)).catch(void 0),s}return Object(n.c)(t,e),t.prototype.state=function(t){var i=e.prototype.state.call(this,t);return Object(n.a)(Object(n.a)({},i),{cssWidth:this._cssWidth,cssHeight:this._cssHeight,angle:this._angle})},t.prototype.restoreData=function(e){this._cssWidth=e.cssWidth,this._cssHeight=e.cssHeight,this._angle=e.angle},t.prototype.cssWidth=function(){return this._cssWidth},t.prototype.cssHeight=function(){return this._cssHeight},t.prototype.angle=function(){return this._angle},t.prototype.pointsCount=function(){return 1},t.prototype.name=function(){return"Image"},t.prototype.image=function(){return this._image},t.prototype.setPoint=function(e,t,i){var n=this._model.timeScale(),o=Object(r.ensureNotNull)(this.priceScale()),s=Object(r.ensureNotNull)(this._model.paneForSource(this)),a=Object(r.ensureNotNull)(s.mainDataSource()),l=Object(r.ensureNotNull)(a.firstValue()),c=this._image.width,u=this._image.height,h=n.indexToCoordinate(t.index),d=o.priceToCoordinate(t.price,l),p=n.indexToCoordinate(this._points[0].index),f=o.priceToCoordinate(this._points[0].price,l),_=2*Math.abs(h-p)/c,m=2*Math.abs(d-f)/u,v=Math.min(_,m),y=Math.round(c*v),g=Math.round(u*v);this._cssWidth=y,this._cssHeight=g},t.createProperties=function(e){var i=new o.DefaultProperty("linetoolimage",e);return t._configureProperties(i),i},t._configureProperties=function(e){l.LineDataSource._configureProperties(e),e.hasChild("url")||e.addChild("url",new a.a("")),e.addExclusion("url")},t}(l.LineDataSource)},"8C8C":function(e,t,i){"use strict";i.r(t),i.d(t,"RestoreFactoryDefaultsUndoCommand",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i,n){void 0===n&&(n="Restore Defaults");var r=e.call(this,n)||this;return r._chartModel=t,r._defaultProperty=i,r._state=i.state(),r}return Object(n.c)(t,e),t.prototype.redo=function(){this._chartModel.restoreFactoryDefaults(this._defaultProperty)},t.prototype.undo=function(){this._defaultProperty.mergeAndFire(this._state),this._chartModel.mainSeries().onChartStyleChanged()},t}(i("RDU5").UndoCommand)},"8OdW":function(e,t,i){"use strict";i.r(t),
i.d(t,"MINUTE_SPAN",(function(){return n})),i.d(t,"HOUR_SPAN",(function(){return r})),i.d(t,"DAY_SPAN",(function(){return o})),i.d(t,"WEEK_SPAN",(function(){return s})),i.d(t,"MONTH_SPAN",(function(){return a})),i.d(t,"YEAR_SPAN",(function(){return l})),i.d(t,"DEFAULT_BAR_SPACING",(function(){return c}));var n=20,r=30,o=40,s=50,a=60,l=70,c=6},"8Uy/":function(e,t,i){"use strict";i.r(t),i.d(t,"LINESTYLE_SOLID",(function(){return n})),i.d(t,"LINESTYLE_DOTTED",(function(){return r})),i.d(t,"LINESTYLE_DASHED",(function(){return o})),i.d(t,"LINESTYLE_LARGE_DASHED",(function(){return s})),i.d(t,"LINESTYLE_SPARSE_DOTTED",(function(){return a})),i.d(t,"LINESTYLE_SMALL_DASHED",(function(){return l}));var n=0,r=1,o=2,s=3,a=4,l=5},"8gnj":function(e,t,i){"use strict";var n=i("LxhU").Interval,r=i("OLhd").isAlignmentEnabled,o=i("7ETO").getChartStyleStudy,s=i("5fI3").decodeExtendedSymbol,a=function(){var e=i("ocLq"),t=e.StudyEngine,a=e.BarBuilder,l=e.BarSet;function c(e){this.host=e,this.cache={}}function u(e){throw console.error(e),e}c.prototype.getCache=function(e){return this.cache[e]},c.prototype.putCache=function(e,t){this.cache[e]=t},c.prototype.subscribe=function(e,t,i,n,r,o,s,a,l){var c=a(o),u=function(e,t,i,n,r,o,s){var a=n.has_empty_bars?"_":"";return r+e+i+(t||"")+a+"_"+o.countBack+"_"+o.to+"_"+Boolean(s)}(e,t,i,o,s,c,l),h=this.getCache(u);return h||(h=this.createItem(e,t,i,o,c,s,l),this.putCache(u,h)),h.listeners.addListener(n,r),{key:u,listener:n}},c.prototype.unsubscribe=function(e){var t=this.getCache(e.key);t&&t.listeners.removeListener(e.listener)},c.prototype.removeUnused=function(){var e=[];for(var t in this.cache){if(this.cache[t])0===this.cache[t].listeners.listenersCount()&&e.push(t)}if(0!==e.length){for(var i=0;i<e.length;i++){var n=e[i],r=this.cache[n];this.cache[n]=null,r.stop()}this.removeUnused()}},c.prototype.rebuildFrom=function(e,t){var i=n.parse(e);if((i.isWeeks()||i.isMonths())&&t.has_weekly_and_monthly)return"1"+i.letter();if(i.isDWM()&&(void 0===t.has_daily||t.has_daily))return"1D";if(i.isDWM())return String(t.intraday_multipliers?t.intraday_multipliers[0]:1);if(i.isMinutes()&&void 0!==t.has_intraday&&!t.has_intraday&&u("Misconfiguration error: it is trying to request intraday resolution but symbol does not support it"),i.isSeconds()&&!t.has_seconds&&u("Misconfiguration error: it is trying to request seconds resolution but symbol does not support it"),i.isTicks())return t.has_ticks||u("Misconfiguration error: it is trying to request tick resolution but symbol does not support it"),"1T";var r=i.multiplier(),o=i.isSeconds()?t.seconds_multipliers:t.intraday_multipliers;if(o&&-1===o.indexOf(String(r))){for(var s=o.length-1;s>=0;s--){var a=Number(o[s]);if(r%a==0)return a+i.letter()}u("Misconfiguration error: it is trying to request "+i.value()+" but we cannot build it from lower resolution")}return i.value()};var h=n.parse("1M").inMilliseconds(0);c.prototype.createItem=function(e,t,i,l,c,_,m){var v=new f,y=s(e),g="string"!=typeof y.symbol?y.symbol:y;t=g["currency-id"]||t i.d(t,"MINUTE_SPAN",(function(){return n})),i.d(t,"HOUR_SPAN",(function(){return r})),i.d(t,"DAY_SPAN",(function(){return o})),i.d(t,"WEEK_SPAN",(function(){return s})),i.d(t,"MONTH_SPAN",(function(){return a})),i.d(t,"YEAR_SPAN",(function(){return l})),i.d(t,"DEFAULT_BAR_SPACING",(function(){return c}));var n=20,r=30,o=40,s=50,a=60,l=70,c=6},"8Uy/":function(e,t,i){"use strict";i.r(t),i.d(t,"LINESTYLE_SOLID",(function(){return n})),i.d(t,"LINESTYLE_DOTTED",(function(){return r})),i.d(t,"LINESTYLE_DASHED",(function(){return o})),i.d(t,"LINESTYLE_LARGE_DASHED",(function(){return s})),i.d(t,"LINESTYLE_SPARSE_DOTTED",(function(){return a})),i.d(t,"LINESTYLE_SMALL_DASHED",(function(){return l}));var n=0,r=1,o=2,s=3,a=4,l=5},"8gnj":function(e,t,i){"use strict";var n=i("LxhU").Interval,r=i("OLhd").isAlignmentEnabled,o=i("7ETO").getChartStyleStudy,s=i("5fI3").decodeExtendedSymbol,a=function(){var e=i("ocLq"),t=e.StudyEngine,a=e.BarBuilder,l=e.BarSet;function c(e){this.host=e,this.cache={}}function u(e){throw console.error(e),e}c.prototype.getCache=function(e){return this.cache[e]},c.prototype.putCache=function(e,t){this.cache[e]=t},c.prototype.subscribe=function(e,t,i,n,r,o,s,a,l){var c=a(o),u=function(e,t,i,n,r,o,s){var a=n.has_empty_bars?"_":"";return r+e+i+(t||"")+a+"_"+o.countBack+"_"+o.to+"_"+Boolean(s)}(e,t,i,o,s,c,l),h=this.getCache(u);return h||(h=this.createItem(e,t,i,o,c,s,l),this.putCache(u,h)),h.listeners.addListener(n,r),{key:u,listener:n}},c.prototype.unsubscribe=function(e){var t=this.getCache(e.key);t&&t.listeners.removeListener(e.listener)},c.prototype.removeUnused=function(){var e=[];for(var t in this.cache){if(this.cache[t])0===this.cache[t].listeners.listenersCount()&&e.push(t)}if(0!==e.length){for(var i=0;i<e.length;i++){var n=e[i],r=this.cache[n];this.cache[n]=null,r.stop()}this.removeUnused()}},c.prototype.rebuildFrom=function(e,t){var i=n.parse(e);if((i.isWeeks()||i.isMonths())&&t.has_weekly_and_monthly)return"1"+i.letter();if(i.isDWM()&&(void 0===t.has_daily||t.has_daily))return"1D";if(i.isDWM())return String(t.intraday_multipliers?t.intraday_multipliers[0]:1);if(i.isMinutes()&&void 0!==t.has_intraday&&!t.has_intraday&&u("Misconfiguration error: it is trying to request intraday resolution but symbol does not support it"),i.isSeconds()&&!t.has_seconds&&u("Misconfiguration error: it is trying to request seconds resolution but symbol does not support it"),i.isTicks())return t.has_ticks||u("Misconfiguration error: it is trying to request tick resolution but symbol does not support it"),"1T";var r=i.multiplier(),o=i.isSeconds()?t.seconds_multipliers:t.intraday_multipliers;if(o&&-1===o.indexOf(String(r))){for(var s=o.length-1;s>=0;s--){var a=Number(o[s]);if(r%a==0)return a+i.letter()}u("Misconfiguration error: it is trying to request "+i.value()+" but we cannot build it from lower resolution")}return i.value()};var h=n.parse("1M").inMilliseconds(0);c.prototype.createItem=function(e,t,i,l,c,_,m){var v=new f,y=s(e),g="string"!=typeof y.symbol?y.symbol:y;t=g["currency-id"]||t

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{ {
"private": true, "private": true,
"description": "CL v19.033 (internal id 6e7d81de @ 2021-06-29T12:46:50.041Z)", "description": "CL v19.034 (internal id 71af24cd @ 2021-07-05T08:46:56.445Z)",
"type": "module", "type": "module",
"main": "charting_library.cjs.js", "main": "charting_library.cjs.js",
"module": "charting_library.esm.js", "module": "charting_library.esm.js",