diff --git a/charting_library/ar-tv-chart.c7e6d52b.html b/charting_library/ar-tv-chart.93881eb6.html similarity index 99% rename from charting_library/ar-tv-chart.c7e6d52b.html rename to charting_library/ar-tv-chart.93881eb6.html index 7ffb5208..40d912eb 100644 --- a/charting_library/ar-tv-chart.c7e6d52b.html +++ b/charting_library/ar-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/bundles/library.83b78f9d405377ddcb47.js b/charting_library/bundles/library.4b06694c5a814f98995f.js similarity index 95% rename from charting_library/bundles/library.83b78f9d405377ddcb47.js rename to charting_library/bundles/library.4b06694c5a814f98995f.js index ca43b7b5..74f7868c 100644 --- a/charting_library/bundles/library.83b78f9d405377ddcb47.js +++ b/charting_library/bundles/library.4b06694c5a814f98995f.js @@ -223,8 +223,8 @@ r&&t.v.cs&&r.stop(),TradingView.ChartapiMessagerInstances[e].onQuotesData([e].co ;return!!this._endOfData[s]},P.prototype._setEndOfData=function(e,t,i,s){var r=e+"!"+t+"@"+i;this._endOfData[r]=!1!==s},P.prototype.serverTimeOffset=function(){return this._serverTimeOffset},P.prototype.getCurrentUTCTime=function(){return(new Date).valueOf()/1e3+this._serverTimeOffset},P.prototype.switchTimezone=function(e,t){this._timeScales[e].setTimezone(t);var i=this._timeScales[e].tickMarks();null!==i&&TradingView.ChartapiMessagerInstances[e].onTickmarksUpdated(0,i)},e.exports=P},EX27:function(e,t,i){"use strict";var s=i("IiTo"),r=i("LxhU").Interval,n=i("EJcV"),o=i("MrEN"),a=i("XzZr"),l=a.ChartApiInterface,c=a.HandlerInfo,h=i("ogJP").requireFullInterfaceImplementation,u=i("txPx").getLogger("Chart.ChartApiLocal"),d=i("uDHo").TIMEFRAMETYPE,p=i("OLhd").createDwmAligner;function _(e,t,i){if(e[t])if(void 0!==i)e[t][i]&&(clearTimeout(e[t][i]),delete e[t][i]);else{for(var s in e[t])e[t].hasOwnProperty(s)&&_(e,t,s);delete e[t]}}function m(e,t,i,s){_(e,t,i),e[t]||(e[t]={}),e[t][i]=s}TradingView.STUDY_COUNT_LIMIT=210,JSServer.ChartApi=function(e){this._notificationHandlers={},this._sessions={},this.studyCounter=0,this._seriesTimers={},this._studyTimers={},this._seriesTurnarounds={},this._connected=!1,this._enabled=!1,this._studyEngine=new n(e),this._callbacks={},this._symbolIdCache={},this._seriesIdCache={},this._enableLogging=!1,this._enabledMoreBarsRequest=!0,this._serverTimeOffset=0;var t=this;this._studyEngine.on("configuration_received",(function(){t._fireEvent("configuration_received")})),this._studyEngine.on("realtime_tick",(function(e){var i={time:e.value[0]/1e3,open:e.value[1],high:e.value[2],low:e.value[3],close:e.value[4],volume:e.value[5]};t._fireEvent("realtime_tick",i,!0)})),this._setVisibleRangeTimeout={}},JSServer.ChartApi.prototype._makeSymbolKey=function(e,t){if(!e||!t)throw Error("incorrect identifiers");return e+"_"+t},JSServer.ChartApi.prototype._makeSeriesKey=function(e,t){if(!e||!t)throw Error("incorrect identifiers");return e+"_"+t},JSServer.ChartApi.prototype.destroy=function(){this._studyEngine.destroy(),this._studyEngine=null},JSServer.ChartApi.prototype.purgeCache=function(e){this._studyEngine.purgeCache(),this._studyEngine.purgeDataCache(),this._symbolIdCache={},this._seriesIdCache={}},JSServer.ChartApi.prototype.setAdditionalBarsRequestEnabled=function(e){this._enabledMoreBarsRequest=e},JSServer.ChartApi.prototype.defaultWatchlistSymbols=function(){return this._watchlistSettings.default_symbols},JSServer.ChartApi.prototype.defaultResolutions=function(){return this._studyEngine.supportedResolutions()||["1","3","5","15","30","45","60","120","180","240","1D","1W","1M"]},JSServer.ChartApi.prototype.availableCurrencies=function(){var e=this._studyEngine.supportedCurrencies().map((function(e){return{id:e,code:e,convertible:!0}}));return Promise.resolve(e)},JSServer.ChartApi.prototype.availableUnits=function(){return Promise.resolve(this._studyEngine.supportedUnits())},JSServer.ChartApi.prototype.supportedSymbolsTypes=function(){return this._studyEngine.supportedSymbolsTypes()}, JSServer.ChartApi.prototype.supportedExchangesList=function(){return this._studyEngine.supportedExchangesList()},JSServer.ChartApi.prototype.symbolsGrouping=function(){return this._studyEngine.symbolsGrouping()},JSServer.ChartApi.prototype.start=function(){this._enabled=!0,this._fireEvent("start_enabled")},JSServer.ChartApi.prototype._logMessage=function(e){this._enableLogging&&console.log(e)},JSServer.ChartApi.prototype.unsubscribe=function(e,t){var i=this._callbacks[e];i&&i.splice(i.indexOf(t),1)},JSServer.ChartApi.prototype.on=function(e,t){return this._callbacks.hasOwnProperty(e)||(this._callbacks[e]=[]),this._callbacks[e].push(t),this},JSServer.ChartApi.prototype._fireEvent=function(e,t,i){if(this._callbacks.hasOwnProperty(e)){var s=this._callbacks[e].slice(0);i||(this._callbacks[e]=[]);for(var r=0;rs||(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.alignPeriodsBack(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{if(Object(u.isPlotWithTechnicalValues)(t))return;const s=t.id;this._emptyValues.push({id:s,index:i,title:this._study.guiPlotName(s),value:"",visible:!1});const r=Object(u.isOhlcPlot)(t)?t.target:t.id;this._colorProviders.set(r,Object(p.createStudyPlotColorProvider)(e.metaInfo(),e.properties(),r))})}getItems(){return this._emptyValues}getValues(e){const t=this._emptyValues.map(e=>Object.assign({},e));let i=null;const r=this._study.data().lastIndex();if(null!==r)for(const s of t){if(!this._study.properties().styles[s.id].visible.value())continue;const e=this._study.nearestIndex(r,l.PlotRowSearchMode.NearestLeft,s.index+1);if(void 0===e)continue;const t=e+this._study.offset(s.id);i=null!==i?Math.max(t,i):t}(null===e||null!==i&&e>i)&&(e=i);const n=this._hideValues(),a=this._study.isVisible()&&!n?m:"";for(const s of t)s.value=a;if(n)return t;f&&t.length&&(t[t.length-1].value="");const c=this._study.priceScale();if(!this._study.isVisible()||null===e||null===c||c.isEmpty()||this._model.timeScale().isEmpty())return t;const h=this._study.metaInfo().plots,p=this._study.formatter(),_={};for(const m of t){let t=m.id;const i=this._study.properties().styles[t].visible.value();if(m.visible=i,!i)continue;const n=m.index,a=e-this._study.offset(t),c=null!==r&&a>r?l.PlotRowSearchMode.NearestLeft:l.PlotRowSearchMode.Exact,f=this._study.nearestIndex(a,c);if(void 0===f)continue;let g=_[t];if(void 0===g&&(g=this._study.getMinFirstBarIndexForPlot(t),Number.isFinite(g)&&(_[t]=g)),g>f)continue;const v=this._study.data().last(),b=this._study.data().valueAt(f)||(null!==v?v.value:null);if(null===b)continue;const S=b[n+1];if(!Object(s.isNumber)(S))continue;const y=S>0;m.value=p.format(S);const w=this._study.properties().styles[t];let C=w.color.value();const P=h[n];Object(u.isOhlcPlot)(P)?(t=P.target||t,C=this._study.properties().ohlcPlots[t].color.value()):Object(u.isArrowsPlot)(P)&&(C=y?w.colorup.value():w.colordown.value());let x=C;const T=this._colorProviders.get(t),M=T&&T.getPlotPointStyle(b);M&&(Object(u.isArrowsPlot)(P)?(y&&void 0!==M.colors[d.ColorerType.Up]&&(x=M.colors[d.ColorerType.Up]),y||void 0===M.colors[d.ColorerType.Down]||(x=M.colors[d.ColorerType.Down])):void 0!==M.colors[d.ColorerType.Main]&&(x=M.colors[d.ColorerType.Main])),"transparent"===x&&(x=C),x=Object(o.resetTransparency)(x),m.color=x}return t}_hideValues(){return _&&(null===this._model.crossHairSource().pane||Object(c.isLineToolName)(h.tool.value())||null!==this._model.lineBeingEdited())}}},Ecpn:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));const s={PivotPointsStandard:!0,VbPVisible:!0} ;function r(e){return e in s}},EqoR:function(e,t,i){"use strict";var s=i("5rJj"),r=i("aDyP").LineToolPitchfork;class n extends r{constructor(e,t){super(e,t||n.createProperties())}name(){return"Inside Pitchfork"}static createProperties(e){var t=new s("linetoolinsidepitchfork",e,!1,{range:[0,8]});return n._configureProperties(t),t}static _configureProperties(e){r._configureProperties(e)}}t.LineToolInsidePitchfork=n},Ery9:function(e,t,i){"use strict";i.r(t),i.d(t,"setCustomAdapter",(function(){return m})),i.d(t,"initialize",(function(){return f})),i.d(t,"updateUser",(function(){return g})),i.d(t,"getChartsCount",(function(){return v})),i.d(t,"getCharts",(function(){return b})),i.d(t,"removeChart",(function(){return S})),i.d(t,"saveChart",(function(){return y})),i.d(t,"getChartContent",(function(){return w})),i.d(t,"loadChart",(function(){return C})),i.d(t,"removeStudyTemplate",(function(){return P})),i.d(t,"getStudyTemplateContent",(function(){return x})),i.d(t,"saveStudyTemplate",(function(){return T})),i.d(t,"getStudyTemplatesList",(function(){return M})),i.d(t,"invalidateStudyTemplatesList",(function(){return I})),i.d(t,"getStudyTemplateContentById",(function(){return L})),i.d(t,"getStandardStudyTemplateContentById",(function(){return O})),i.d(t,"removeStudyTemplateById",(function(){return A})),i.d(t,"renameStudyTemplate",(function(){return E})),i.d(t,"replaceStudyTemplate",(function(){return k})),i.d(t,"getDrawingTemplates",(function(){return D})),i.d(t,"loadDrawingTemplate",(function(){return V})),i.d(t,"removeDrawingTemplate",(function(){return B})),i.d(t,"saveDrawingTemplate",(function(){return R}));var s=i("FQhm"),r=i("ogJP"),n=i("txPx"),o=i("Cf1E");const a=Object(n.getLogger)("Chart.SaveloadAdapter.Library");let l,c,h,u,d=null,p=null;function _(e){return`${h}/${encodeURIComponent(u)}/${e}?client=${encodeURIComponent(l)}&user=${encodeURIComponent(c)}`}function m(e){d=e}function f(e,t,i,s){l=e,c=t,h=i,u=s}function g(e){c=e}function v(e,t){throw new Error("Not implemented")}function b(e,t=(()=>{})){const i=t=>{e(t.map(e=>({id:e.id,name:e.name,image_url:String(e.id),modified_iso:e.timestamp,short_symbol:e.symbol,interval:e.resolution})))};if(!d)return $.ajax({url:"{0}/{1}/charts?client={2}&user={3}".format(h,encodeURIComponent(u),encodeURIComponent(l),encodeURIComponent(c)),type:"GET",crossDomain:!0}).done(e=>{const s=Object(r.parseJSONorNot)(e);if("ok"!==s.status)return a.logWarn("Charts list request failed: "+s.message),void t();i(s.data)}).fail(t);d.getAllCharts().then(i).catch(t)}function S(e,t){d?d.removeChart(e).then(t):$.ajax({url:"{0}/{1}/charts?client={2}&user={3}&chart={4}".format(h,encodeURIComponent(u),encodeURIComponent(l),encodeURIComponent(c),encodeURIComponent(e)),type:"DELETE",crossDomain:!0}).done(e=>{const i=Object(r.parseJSONorNot)(e);"ok"!==i.status&&a.logWarn("Chart delete request failed: "+i.message),t()})}function y(e,t,i,s,n,o,p){const _=n.id.value(),m={name:e,content:JSON.stringify(s),symbol:t,resolution:i};if(d)return void d.saveChart(Object.assign(Object.assign({},m),{id:_ @@ -279,39 +279,39 @@ return!this.isVisible()||this.canBeHiddenByGlobalFlag()&&h.hideAllIndicators().v if(t.params[3])return void this._resolveSymbol(t.params[3]).then(i);break;default:return void this._resolveSymbol(t.params[2]).then(i)}0,s(e)}})})}_recheckLineToolsActuality(){const e=this._model.paneForSource(this);null!==e&&e.sourcesByGroup().lineSourcesForAllSymbols().forEach(e=>{e.ownerSource()===this&&e.calcIsActualSymbol()})}_getSymbolObject(e){const t={symbol:e};return this._series&&this._series.extendedHours.value()&&(t.session="extended"),t}_onSymbolResolved(e,t){0}_resolvedSymbolKey(e){return e}_setStatus(e){this._status=e,this._statusView&&this._statusView.update(),this._model.updateSource(this),this._statusChanged.fire(e)}_bandsFirstValue(e){const t=Object(s.ensureNotNull)(this._metaInfo);if(!t.bands)return null;for(let i=0;i{null!=t[i]&&(e[i]=t[i])}),e}{const e=[];return Object.keys(t).forEach(i=>{null!=t[i]&&e.push(t[i])}),e}}_prepareInput(e,t){const i=this._prepareInputValue(e,t);return!e.isFake||t.fakeInputsForDisplay||t.onlyAtomValues?i:{v:i,f:!0,t:e.type}}}},IiTo:function(e,t,i){"use strict";i.r(t);var s=i("jCNj"),r=i("LxhU"),n=i("Hr11"),o=i("ZmuQ"),a=i("E6p6");class l extends o.a{constructor(e,t){super(),this._sessionStartMs=-Number.MAX_VALUE,this._sessionEndMs=-Number.MAX_VALUE,this._periodSec=e,this._session=t}alignTimeIfPossible(e){const t=this.alignTime(e);return isNaN(t)?e:t}indexOfBar(e){return e=this._sessionEndMs?a.SessionStage.POST_SESSION:Object(n.toInt)(s.time_seconds_diff(e,this._sessionStartMs)/this._periodSec)}startOfBar(e){if(e===a.SessionStage.PRE_SESSION){const e=s.get_cal_from_unix_timestamp_ms(this._session.timezone,this._sessionStartMs-1),t=this._session.spec.alignToNearestSessionEnd(e,-1);return s.cal_to_utc(this._session.timezone,t)}if(e===a.SessionStage.POST_SESSION)return this._sessionEndMs ;if(e<0)throw new Error("Negative offset is not supported");return this._sessionStartMs+s.time_seconds(this._periodSec*e)}endOfBar(e){if(e<0)throw new Error("Index cannot be negative");const t=this.startOfBar(e)+1e3*this._periodSec;return t>this._sessionEndMs?this._sessionEndMs:t}isLastBar(e,t){return t>=this._sessionStartMs+s.time_seconds(this._periodSec*(e+1)-1)}moveTo(e){const t=this._session.timezone,i=s.utc_to_cal(t,e),r=this._session.spec.alignToSessionStart(i);this._sessionStartMs=s.cal_to_utc(t,i),s.add_minutes(i,r),this._sessionEndMs=s.cal_to_utc(t,i)}indexOfLastBarInSession(){return Object(n.toInt)((this._sessionEndMs-1-this._sessionStartMs)/1e3/this._periodSec)}moveNext(){this.moveTo(this._sessionEndMs)}}var c=i("OBgQ");function h(e,t){const i=s.clone(t),r=e.businessDaysToCalendarDays(i,1);r>1&&s.add_date(i,r-1);const n=e.leftBorderOfDailyBar(i);if(null===n)throw new Error("Cannot calculate left border of daily bar");return s.cal_to_utc(s.get_timezone(e.timezone()),n)}class u extends o.a{constructor(e,t,i,s,r=!1){super(),this._periodStart=-Number.MAX_VALUE,this._periodEnd=-Number.MAX_VALUE,this._periodLastBarStart=-Number.MAX_VALUE,this._periodStartDay=new c.a(0,0,0),this._periodEndDay=new c.a(0,0,0),this._period=i,this._sessionTgt=e,this._builder=s,this._useBusinessDays=r,this._sessionSrc=r?new o.b("Etc/UTC","24x7"):t||e}builder(){return this._builder}alignTimeIfPossible(e){return this.tradingDayToSessionStart(e)}tradingDayToSessionStart(e){return this.moveTo(e),this.startOfBar(0)}indexOfBar(e){if(this._useBusinessDays){const t=c.a.fromCalendar(s.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e));return t.before(this._periodStartDay)?a.SessionStage.PRE_SESSION:this._periodEndDay.before(t)?a.SessionStage.POST_SESSION:0}return e=this._periodEnd?a.SessionStage.POST_SESSION:0}startOfBar(e){if(e===a.SessionStage.PRE_SESSION){const e=s.get_cal_from_unix_timestamp_ms(this._sessionTgt.timezone,this._periodStart-1),t=this._sessionTgt.spec.alignToNearestSessionEnd(e,-1);return s.cal_to_utc(this._sessionTgt.timezone,t)-1}return e===a.SessionStage.POST_SESSION||e>0?this._periodEnd:e===a.SessionStage.LASTBAR_SESSION?this._periodLastBarStart:this._periodStart}moveTo(e){const t=s.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e);this._sessionSrc.spec.correctTradingDay(t);const i=s.get_year(t),r=this._indexOfPeriodInYear(t),n=r+this._period,o=this._sessionTgt.spec,a=this._sessionTgt.timezone,l=this._builder.startOfPeriod(a,r,i);this._periodStart=h(o,l);const u=s.clone(l),d=o.businessDaysToCalendarDays(u,1);d>1&&s.add_date(u,d-1),this._periodStartDay=c.a.fromCalendar(u);const p=this._builder.startOfPeriod(a,n,i);this._periodEnd=h(o,p);const _=s.clone(p);for(s.add_date(_,-1);o.isCalWeekEnd(_);)s.add_date(_,-1);this._periodEndDay=c.a.fromCalendar(_),s.add_date(p,-1),function(e,t){for(;e.isCalWeekEnd(t);)s.add_date(t,-1)}(this._sessionTgt.spec,p),this._periodLastBarStart=h(o,p), (this._periodLastBarStart=this._periodLastBarStart}currentRange(){return{from:this._periodStartDay,to:this._periodEndDay}}indexOfBarInYear(e){const t=s.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e),i=s.get_year(t),r=this._builder.indexOfPeriod(t),o=this._sessionTgt.timezone;let a=this._builder.startOfPeriod(o,r,i),l=h(this._sessionTgt.spec,a);return a=s.get_cal_from_unix_timestamp_ms(s.get_timezone("Etc/UTC"),l),i=0&&(r-=7),Object(n.toInt)((r+i)/7))}class _{indexOfPeriod(e){return s.get_day_of_year(e)-1}startOfPeriod(e,t,i){const r=s.days_per_year(i);return s.get_cal(s.get_timezone("Etc/UTC"),i,s.JANUARY,1+Math.min(t,r))}}class m extends _{constructor(e){super(),this._sessionsSpec=e}indexOfPeriod(e){return super.indexOfPeriod(e)-function(e,t){const i=p(e,t),r=s.get_cal(s.get_timezone("Etc/UTC"),s.get_year(t),s.JANUARY,1);s.add_date(r,7*i);const n=i*e.weekEndsCount()+e.holidaysFromYearStart(r),o=s.get_day_of_year(t)-s.get_day_of_year(r);return n+o-e.calendarDaysToBusinessDays(r,o)}(this._sessionsSpec,e)}startOfPeriod(e,t,i){const r=7-this._sessionsSpec.weekEndsCount(),o=Math.max(0,Object(n.toInt)(t/r)-1),a=s.get_cal(s.get_timezone("Etc/UTC"),i,s.JANUARY,1),l=s.get_days_per_year(a);if(s.add_date(a,7*o),(t-=r*o-this._sessionsSpec.holidaysFromYearStart(a))>0){const e=this._sessionsSpec.businessDaysToCalendarDays(a,t);s.add_date(a,e)}let c=s.get_day_of_year(a)-1;return is.get_days_per_year(r)?this.startOfPeriod(e,0,i+1):(s.add_date(r,a),r)}}class v{indexOfPeriod(e){return s.get_month(e)}startOfPeriod(e,t,i){if(t<0){const e=Object(n.toInt)((11-t)/12);i-=e,t+=12*e}else t>s.DECEMBER&&(i++,t=s.JANUARY);return s.get_cal(s.get_timezone("Etc/UTC"),i,t,1)}}function b(e,t,i,s=!1){const n=r.Interval.parse(e),o=n.multiplier();return n.isMinutes()?new l(60*o,t):n.isSeconds()?new l(o,t):n.isTicks()?new l(1,t):n.isRange()?new l(60*o,t):new u(t,i,o,function(e,t){switch(e){case r.ResolutionKind.Days:return new f(t);case r.ResolutionKind.Weeks:return new g(t);case r.ResolutionKind.Months:return new v}throw new Error("Unknown dwm resolution: "+e)}(n.kind(),t),s)}function S(e,t,i,s,n,a,l){const c=r.Interval.parse(n+s);if(c.isMonths()){const e=new Date(l);e.setUTCDate(1);const t=e.getUTCMonth()-a*c.multiplier();return e.setUTCMonth(t),e.getTime()}const h=new o.b("Etc/UTC",e,t,i),u=c.inMilliseconds(),d=c.isDWM();let p;p=d?864e5:60*h.spec.findSession(0,0,0).getEntry().length()*1e3;let _=0;_=c.isWeeks()?7:7-h.spec.weekEndsCount();const m=p/u,f=_*m;let g;if(a=f&&(g=_/6048e5*f),Math.ceil(g)}function w(e,t){const i=s.clone(t);return e.alignToSessionStart(i),s.cal_to_utc(s.get_timezone(e.timezone()),i)}function C(e,t){const i=s.utc_to_cal(t.timezone,+e);let r=s.get_day_of_week(i),n=s.get_minutes_from_midnight(i);const o=t.spec.findSession(t.spec.getWeekIndex(i),r,n).getEntry();return o.isOvernight()&&n>o.startOffset()+o.length()&&r===o.dayOfWeek()-1&&(r++,n-=1440),r===o.dayOfWeek()&&n>=o.startOffset()&&nh||h<=0||c>=o?null:[new r.Point(c,e.y),new r.Point(h,t.y)]}_hitTestBackground(e,t,i,s){const o=this._extendAndClipLineSegment(t,i,s);return null!==o&&Object(n.pointInBox)(e,Object(r.box)(o[0],o[1]))?this._backHitTestResult:null}}},InMJ:function(e,t,i){"use strict";var s=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty;class n extends s{constructor(e,t){super(e,t||n.createProperties()),this.version=n.version,i.e("lt-pane-views").then(i.t.bind(null,"gr7S",7)).then(({FlatBottomPaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}pointsCount(){return 3}name(){return"Flat Bottom"}hasEditableCoordinates(){return!1}addPoint(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),s.prototype.addPoint.call(this,e)}setLastPoint(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),s.prototype.setLastPoint.call(this,e)}setPoint(e,t,i){if(i&&i.shift()&&1===e){this._snapPoint45Degree(t,this.points()[0])} -if(2===e)this._points[1].index=t.index;else if(3===e)return this._points[0].index=t.index,this._points[2].price=t.price,void this.normalizePoints();super.setPoint(e,t)}getPoint(e){return e<3?s.prototype.getPoint.call(this,e):3===e?{index:this._points[0].index,price:this._points[2].price}:void 0}canHasAlert(){return!0}_getAlertPlots(){var e=this._points[0],t=this._points[1],i=[];e.index<=t.index?(i.push(e),i.push(t)):(i.push(t),i.push(e));var s=this._points[2];s.time=t.time,s.index=t.index;var r,n,o,a,l={price:s.price,time:e.time,index:e.index},c=[];s.index<=l.index?(c.push(s),c.push(l)):(c.push(l),c.push(s)),i[0].price>c[0].price?(r=i,n=c):c[0].price>i[0].price||c[1].price>i[1].price?(r=c,n=i):(r=i,n=c);var h=this.properties().extendLeft.value(),u=this.properties().extendRight.value();return e.index<=t.index?(o=h,a=u):(o=u,a=h),[this._linePointsToAlertPlot(r,"Upper",o,a),this._linePointsToAlertPlot(n,"Lower",h,a)]}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"vm8R"))).GeneralTrendFiguresDefinitionsViewModel}static createProperties(e){var t=new r("linetoolflatbottom",e);return n._configureProperties(t),t}static _configureProperties(e){s._configureProperties(e)}}n.version=1,t.LineToolFlatBottom=n},J2xC:function(e,t,i){e.exports={"css-value-header-toolbar-height":"38px"}},JT5O:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyMarket",(function(){return n}));var s=i("hY0g"),r=i.n(s);class n{constructor(e,t){this._visibility=new r.a(!1),this._dialogPromise=null,this._dialog=null,this._chartWidgetCollection=e,this._options=t}visible(){return this._visibility.readonly()}show(e){var t;null===this._dialog&&this._requestDialog(e),null===(t=this._dialog)||void 0===t||t.open(e,void 0)}hide(){var e;null===(e=this._dialog)||void 0===e||e.hide()}resetAllPages(){var e;null===(e=this._dialog)||void 0===e||e.resetAllStudies()}_requestDialog(e){if(null===this._dialogPromise){let t;t=Promise.all([i.e("react"),i.e(1),i.e(2),i.e(3),i.e(6),i.e(8),i.e(9),i.e(15),i.e(35),i.e(41),i.e(70),i.e(82),i.e(0),i.e(5),i.e(37),i.e("study-market")]).then(i.bind(null,"zbLM")).then(e=>new e.IndicatorsLibraryContainer(this._chartWidgetCollection,this._options)),this._dialogPromise=t.then(t=>{this._dialog=t,this._dialog.visible().subscribe(e=>{this._visibility.setValue(e)}),this._dialog.open(e)})}return this._dialogPromise}}},JWMC:function(e,t,i){"use strict";i.r(t),i.d(t,"trackEvent",(function(){return l}));i("bSeV");var s=i("FQhm"),r=i("Kxc7"),n=i("txPx");const o=Object(n.getLogger)("Common.TrackEvent"),a=[/Study_(Drawing)_(.*)/,/(Study)_(.*)@tv-basicstudies/,/(Study)_(.*)/,/(Chart Style) (.*)/],l=(e,t,i)=>{if(r.enabled("charting_library_base"))return void((e,t,i)=>{t=t||e||i||"";let r="";for(let s=0;se.isInitialized())}function r(e,t){const i=e.getAll(),s=()=>{t(),i.forEach(e=>{e.chartWidgetInitialized.unsubscribe(null,s)})};i.forEach(e=>{e.chartWidgetInitialized.subscribe(null,s,!0)})}i.r(t),i.d(t,"isAnyChartWidgetInitialized",(function(){return s})),i.d(t,"waitAnyChartWidgetInitialized",(function(){return r}))},JjUe:function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayDataWindowView",(function(){return h}));var s=i("ivNn"),r=i("4miz"),n=i("qFKp"),o=i("e92V"),a=i("mMWL"),l=i("e1Hy");const c=n.CheckMobile.any();class h extends r.b{constructor(e,t){super(),this._invalidated=!0,this._study=e,this._model=t,this._valueProvider=this._createValuesProvider(e,t),this._items=this._valueProvider.getItems().map(e=>new r.a(e.title,"")),this.update()}items(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items}update(){this._invalidated=!0}_updateImpl(){this._header=this._study.title();let e;this._showLastPriceAndChangeOnly()?e=this._study.data().lastIndex():(e=this._model.crossHairSource().appliedIndex(),Object(s.isNumber)(e)||(e=this._study.data().lastIndex()));const t=this._valueProvider.getValues(e);for(let i=0;i=22)return t;for(var i={},s=0,r=0;;){var n=t[r];if(void 0===n)break;var o=t[n.id];n.isFake&&(n.id="in_"+s++),i[r]=n,i[n.id]=o,r++}return i}]} -h.prototype.updateMetaInfo=function(e){if(!e)return e;s(!e.isTVScript,"This method should update only built-in java indicators metaInfo. For Pine indicators use updateMetaInfoAsync");for(var t=null,i=this._studiesMetainfo,r=0;r=12&&l<=26){var c={};for(o=0;o=12&&c<=26){var u=r.columns;r.columns=[];for(var d=0;dt&&n.logWarn("Bad integer input max value in metaInfo id="+e.id+" title="+e.description))}},h._fixInputsMaxValue=function(e,t){if(!TradingView.isAbsent(t)){var i=h.INPUT_MAX_VALUE;if(t.inputs)for(var s=0;si&&(a.max=i))}if(e&&e.inputs){var r=h.splitInputs(e.inputs),n=r.arr;for(var o in n){var a;"integer"===(a=n[o]).type&&(a.max&&a.max>i&&(a.max=i))}e.inputs=TradingView.merge(r.obj,r.arr)}}},h.prototype.patchPropsStateAndMetaInfo=function(e,t,i){"Script$BOOKER"!==t.productId||t.alerts||delete e.alerts,h._fixInputsOrder(e,t),h._fixInputsMaxValue(e,t);var s=h.splitInputs(e.inputs);e.inputs=s.obj;var r=a.versionOf(t);ri&&(i=r))}e[i+1]=t},h.splitInputs=function(e){var t={},i={};for(var s in e)isNumber(parseInt(s,10))?t[s]=e[s]:i[s]=e[s];return{arr:t,obj:i}},h.findInputKeyById=function(e,t){var i=null;for(var s in e)if(isNumber(parseInt(s,10))&&e[s].id===t){i=s;break}return i},h.getInputKeyById=function(e,t){var i=h.findInputKeyById(e,t);if(!i)throw new Error("Cannot find input with id: "+t);return i},e.exports=h},K5cv:function(e,t,i){"use strict";let s;function r(){return s}function n(e){s=e}i.r(t),i.d(t,"getSearchRequestDelay",(function(){return r})),i.d(t,"setSearchRequestDelay",(function(){return n}))},K8V9:function(e,t){e.exports=''},K9GE:function(e,t,i){"use strict";i.d(t,"c",(function(){return s})),i.d(t,"d",(function(){return r})),i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return o}));const s=350,r={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e*e:(4-2*e)*e-1,easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1- --e*e*e*e,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-8*--e*e*e*e,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1+--e*e*e*e*e,easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e};class n{constructor(e,t,i,s){this._mX1=e,this._mY1=t,this._mX2=i,this._mY2=s}easingFunc(e){return this._mX1===this._mY1&&this._mX2===this._mY2?e:this._calcBezier(this._getTForX(e))}_a(e,t){return 1-3*t+3*e}_b(e,t){return 3*t-6*e}_c(e){return 3*e}_calcBezier(e){return((this._a(this._mY1,this._mY2)*e+this._b(this._mY1,this._mY2))*e+this._c(this._mY1))*e}_getSlope(e){return 3*this._a(this._mX1,this._mX2)*e*e+2*this._b(this._mX1,this._mX2)*e+this._c(this._mX1)}_getTForX(e){let t=e;for(let i=0;i<4;++i){const i=this._getSlope(t);if(0===i)return t;t-=(this._calcBezier(t)-e)/i}return t}}const o={black0:"#000",black20:"#2b2d36",black25:"#2b2e37",black27:"#2f3241",black30:"#212121",black70:"#4A4A4A",black80:"#535353",black100:"#646464",black110:"#757575",black140:"#8A8A8A",black170:"#ADAEB0",black180:"#b4b4b4",black200:"#C8C8C8",black220:"#DADDE0",black230:"#ECECEC",black240:"#F2F2F2",black248:"#F8F8F8",black255:"#FFF",brand:"#3BB3E4",brandHover:"#3BABD8",brandActive:"#3898C2",brandDown:"#049DDC",brand220:"#3BB3E0",brand255:"#3BB3FF",brandNew:"#37A6EF", -brandNew2:"#2196F3",spinner:"#00A2E2",brandMedium80:"#3C4650",brandMedium90:"#465a6e",brandMedium100:"#627384",brandMedium120:"#758696",brandMedium150:"#94959C",brandMedium190:"#9DB2BD",brandMedium220:"#E9EFF2",brandMedium230:"#EAECEF",brandMedium240:"#F1F3F6",brandDark:"#2A2C39",brandDark50:"#252733",brandDark45:"#20222D",brandDarkText:"#6A6B74",danger:"#FF4A68",dangerHover:"#F24965",dangerDown:"#FF173E",success:"#3CBC98",success55:"#37BC9B",success250:"#00FFC0",successHover:"#38B395",successDown:"#00A97F",attention:"#FFC84A",attention50:"#F89E30",growing:"#37bc9b",falling:"#ff4a68"}},"KG+6":function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return a}));var s,r,n=i("Eyy1"),o=i("tqok");i("hsV8");function a(e,t){if(e.firstBarTime>=t.length||e.lastBarTime>=t.length)return null;const i=t[e.firstBarTime],s=t[e.lastBarTime];return i===o.a||s===o.a?null:(Object(n.assert)(i<=s,"firstBarTime should not exceed lastBarTime"),Object(n.assert)(e.priceLow<=e.priceHigh,"priceLow should not exceed priceHigh"),{firstBarTime:i,lastBarTime:s,rate:e.rate,priceHigh:e.priceHigh,priceLow:e.priceLow})}!function(e){e.LeftToRight="left_to_right",e.RightToLeft="right_to_left"}(s||(s={})),function(e){e.Relative="relative",e.Absolute="absolute"}(r||(r={}))},KUek:function(e,t,i){"use strict";i.r(t);var s=i("Eyy1"),r=i("aIyQ"),n=i.n(r),o=i("k9/m"),a=i("hsV8"),l=i("jy4L"),c=i("w4Ji"),h=i("jenN"),u=i("txPx");const d=Object(u.getLogger)("Chart.StudyDataSource");var p,_;!function(e){e[e.Undefined=0]="Undefined",e[e.Loading=1]="Loading",e[e.Completed=2]="Completed",e[e.Error=3]="Error"}(p||(p={})),function(e){e[e.Idle=0]="Idle",e[e.AwaitingConnection=1]="AwaitingConnection",e[e.AwaitingParent=2]="AwaitingParent",e[e.AwaitingFirstDataUpdate=3]="AwaitingFirstDataUpdate",e[e.Active=4]="Active"}(_||(_={}));class m{constructor(e,t,i,s){this._inputs=null,this._status=_.Idle,this._studyId=null,this._turnaroundCounter=1,this._studyStatus={type:p.Undefined},this._studyStatusChanged=new n.a,this._graphics=new h.LiveStudyGraphics,this._dataCleared=new n.a,this._dataUpdated=new n.a,this._boundOnGatewayIsConnectedChanged=this._onGatewayIsConnectedChanged.bind(this),this._ongoingDataUpdate=Promise.resolve(),this._gateway=e,this._metaInfo=s,this._seriesSource=t,this._turnaroundPrefix=i,this._plots=new o.PlotList(Object(c.studyPlotFunctionMap)(s),c.studyEmptyPlotValuePredicate),this._gateway.isConnected().subscribe(this._boundOnGatewayIsConnectedChanged)}destroy(){this.stop(),this._gateway.isConnected().unsubscribe(this._boundOnGatewayIsConnectedChanged),this._dataUpdated.destroy(),this._dataCleared.destroy(),this._studyStatusChanged.destroy()}metaInfo(){return this._metaInfo}inputs(){return this._inputs}setInputs(e){this._inputs=e,null!==this._studyId&&(this._turnaroundCounter++,this._onStudyStatusChangedTo({type:p.Undefined}),this._gateway.modifyStudy(this._studyId,this._turnaround(),e,this._onMessage.bind(this)),this._status===_.Active&&this._changeStatusTo(_.AwaitingFirstDataUpdate))}isStarted(){ -return this._status!==_.Idle}isActive(){return this._status===_.Active}start(){this.isStarted()?d.logNormal("start: data source is already started, nothing to do"):(Object(s.assert)(null!==this._inputs,"Inputs should be defined when starting a study data source"),this._gateway.isConnected().value()?this._createStudy():this._changeStatusTo(_.AwaitingConnection))}stop(){this.isStarted()?(null!==this._studyId&&(this._gateway.removeStudy(this._studyId),this._studyId=null,this._onStudyStatusChangedTo({type:p.Undefined})),this._changeStatusTo(_.Idle)):d.logNormal("stop: data source is already stopped, nothing to do")}studyId(){return this._studyId}studyStatus(){return this._studyStatus}studyStatusChanged(){return this._studyStatusChanged}plots(){return this._plots}graphics(){return this._graphics}clearData(){this._plots.clear(),this._graphics.clear(),this._dataCleared.fire()}stopAndStealData(){Object(s.assert)(this._status===_.Active,"Couldn't steal data from non-active data source"),this.stop();const e=this._plots,t=this._graphics.extract();return this._plots=new o.PlotList(Object(c.studyPlotFunctionMap)(this._metaInfo),c.studyEmptyPlotValuePredicate),{plots:e,graphics:t}}dataCleared(){return this._dataCleared}dataUpdated(){return this._dataUpdated}_changeStatusTo(e){Object(s.assert)(this._status!==e,"Source and destination status should be distinct"),d.logNormal(`Status changed from ${_[this._status]} to ${_[e]}`),this._status=e}_createStudy(){const e=this._seriesSource.instanceId();null!==e?this._createStudyUsingParentId(e):(this._changeStatusTo(_.AwaitingParent),this._seriesSource.dataEvents().completed().subscribe(this,this._onSeriesCompleted,!0))}_createStudyUsingParentId(e){Object(s.assert)(this._status!==_.Active,'Status should not be "Active" when creating a study'),Object(s.assert)(this._studyStatus.type===p.Undefined,'Study status should be "Undefined" when creating a study'),Object(s.assert)(null===this._studyId,"Study id should be empty when creating a study"),this._studyId=Object(l.makeNextStudyId)(),this._gateway.createStudy(this._studyId,this._turnaround(),e,this._metaInfo.fullId+"!",Object(s.ensureNotNull)(this._inputs),this._onMessage.bind(this)),this._changeStatusTo(_.AwaitingFirstDataUpdate)}_onGatewayIsConnectedChanged(e){e?this._onGatewayConnected():this._onGatewayDisconnected()}_onGatewayConnected(){this._status===_.AwaitingConnection&&this._createStudy()}_onGatewayDisconnected(){this._status!==_.Idle&&this._status!==_.AwaitingConnection&&(this._studyId=null,this._changeStatusTo(_.AwaitingConnection),this._studyStatus.type!==p.Undefined&&this._onStudyStatusChangedTo({type:p.Undefined})),this._turnaroundCounter=1}_onSeriesCompleted(){this._status===_.AwaitingParent&&this._createStudyUsingParentId(Object(s.ensure)(this._seriesSource.instanceId()))}_onStudyStatusChangedTo(e){const t=this._studyStatus;this._studyStatus=e,d.logNormal(`Study status type changed from ${p[t.type]} to ${p[e.type]}`),this._studyStatusChanged.fire(t,e)}_onMessage(e){if("data_update"===e.method){ -const{customId:t,turnaround:i,plots:r,nonseries:n}=e.params;t===this._studyId&&this._checkTurnaround(i)&&this._onDataUpdate(r,Object(s.ensureDefined)(n))}else if("study_loading"===e.method){const[t,i,s]=e.params;t===this._studyId&&this._checkTurnaround(i)&&this._onStudyLoading(s)}else if("study_completed"===e.method){const[t,i,s]=e.params;t===this._studyId&&this._checkTurnaround(i)&&this._onStudyCompleted(s)}else if("study_error"===e.method){const[t,i,s,r,n]=e.params;t===this._studyId&&this._checkTurnaround(i)&&this._onStudyError(s,r,n)}else"clear_data"===e.method&&this._checkTurnaround(e.params.turnaround)&&this.clearData()}_onDataUpdate(e,t){const i=Object(a.unpackNonSeriesData)(t.d);return this._ongoingDataUpdate=this._ongoingDataUpdate.then(()=>i,()=>i).then(this._onDataUnpacked.bind(this,e,t.indexes)),this._ongoingDataUpdate}_onDataUnpacked(e,t,i){this._status!==_.Idle&&(this._status===_.AwaitingFirstDataUpdate&&(this._changeStatusTo(_.Active),this.clearData()),this._mergePlots(e),null!==i&&(i.indexes_replace?(Object(s.assert)("nochange"!==t),this._graphics.replaceIndexesTo(t)):("nochange"!==t&&this._graphics.replaceIndexesTo(t),void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),this._dataUpdated.fire(e,i,t))}_onStudyLoading(e){this._onStudyStatusChangedTo({type:p.Loading,startTime:Date.now()})}_onStudyError(e,t,i){this.clearData(),this._onStudyStatusChangedTo({type:p.Error,reason:e})}_onStudyCompleted(e){this._onStudyStatusChangedTo({type:p.Completed})}_mergePlots(e){this._plots.merge(e)}_turnaround(){return`${this._turnaroundPrefix}${this._turnaroundCounter}`}_checkTurnaround(e){const t=this._turnaround();return e===t||e===this._seriesSource.turnaround()||e===`${this._seriesSource.turnaround()}_${t}`}}var f=i("kcTO"),g=i("Ocx9"),v=i("oV8k"),b=i("Kxc7");i.d(t,"sessionsPreferencesDefault",(function(){return y})),i.d(t,"Sessions",(function(){return w}));const S=new f.PriceFormatter,y={graphics:{backgrounds:{outOfSession:{color:"#2196F3",transparency:92,visible:!1},preMarket:{color:"#FF9800",transparency:92,visible:!1},postMarket:{color:"#2196F3",transparency:92,visible:!1}},vertlines:{sessBreaks:{color:"#4985e7",style:2,visible:!1,width:1}}}};class w extends v.a{constructor(e,t,i){super(e,t),this._studySource=null,this._paneViews=[],this._metaInfo=null,this._destroyed=!1,this._isStarted=!1,this._loadedGraphics=null,this._doubleClickHandler=i;const s=t.mainSeries();this._properties=new g.DefaultProperty("sessions"),this._removeDuplicateProperties(),this._properties.subscribe(this,this._onPropertiesChanged),t.studyMetaInfoRepository().findById({type:"java",studyId:"Sessions@tv-basicstudies"}).then(e=>{this._destroyed||null===this._loadedGraphics&&(this._setMetaInfo(e),null!==this._metaInfo&&(this._studySource=new m(t.chartApi(),s.seriesSource(),"sessions_",this._metaInfo),this._createPaneViews(),this._studySource.dataCleared().subscribe(this,this.updateAllViews),this._studySource.dataUpdated().subscribe(this,this.updateAllViews),this._studySource.setInputs({}), -this._processHibernate()))}),t.timeScale().onReset().subscribe(this,this._clearData),t.timeScale().logicalRangeChanged().subscribe(this,this.updateAllViews),t.mainSeries().properties().extendedHours.subscribe(this,this._updateVisibleOfPreAndPostMarketBackground),t.mainSeries().properties().interval.subscribe(this,this._processHibernate),this._updateVisibleOfPreAndPostMarketBackground(t.mainSeries().properties().extendedHours)}start(){this._isStarted=!0,this._processHibernate()}restart(){this._clearData(),b.enabled("stop_study_on_restart")&&this.stop(),this.start()}isStarted(){return this._isStarted}stop(){this._isStarted=!1,null!==this._studySource&&this._studySource.stop()}isHoveredEnabled(){return!1}paneViews(e){return this._paneViews}updateAllViews(){this._paneViews.forEach(e=>e.update())}updateViewsForPane(e){this.updateAllViews()}destroy(){this._destroyed=!0,null!==this._studySource&&(this._studySource.dataCleared().unsubscribe(this,this.updateAllViews),this._studySource.dataUpdated().unsubscribe(this,this.updateAllViews),this._studySource.destroy(),this._studySource=null),this._model.timeScale().logicalRangeChanged().unsubscribe(this,this.updateAllViews),this._model.timeScale().onReset().unsubscribe(this,this._clearData),this._model.mainSeries().properties().extendedHours.unsubscribe(this,this._updateVisibleOfPreAndPostMarketBackground),this._model.mainSeries().properties().interval.unsubscribe(this,this._processHibernate),this._properties.unsubscribe(this,this._onPropertiesChanged)}series(){return this._model.mainSeries()}priceScale(){return this.series().priceScale()}graphics(){return this._loadedGraphics||Object(s.ensureNotNull)(this._studySource).graphics()}properties(){return this._properties}graphicsInfo(){return Object(s.ensureNotNull)(this._metaInfo).graphics}firstValue(e){return this._model.mainSeries().firstValue()}formatter(){return S}state(e){const t={properties:this._properties.state()};return e&&null!==this._metaInfo&&(t.data={graphics:Object(h.saveStudyGraphics)(this.graphics()),metaInfo:this._metaInfo}),t}restoreState(e,t){const i=e.properties;this._migrateOutOfSessionProperty(i),this._properties.mergeAndFire(i),this._removeDuplicateProperties(),this._updateVisibleOfPreAndPostMarketBackground(this._model.mainSeries().properties().extendedHours),void 0!==e.data&&t&&(this._loadStudyGraphics(e.data.graphics),this._setMetaInfo(e.data.metaInfo),this._createPaneViews())}restoreOldState(e,t){const i={properties:{graphics:e.state.graphics}};void 0!==e.data&&void 0!==e.metaInfo&&t&&(i.data={metaInfo:e.metaInfo,graphics:e.data.graphics}),this.restoreState(i,t)}applyPreferences(e){this._properties.mergePreferences(e)}metaInfo(){return Object(s.ensureNotNull)(this._metaInfo)}_loadStudyGraphics(e){const t=e.backgrounds;if(void 0!==t){const e=t.findIndex(e=>"inSession"===e.styleId);-1!==e&&t.splice(e,1)}this._loadedGraphics=Object(h.loadStudyGraphics)(e)}_setMetaInfo(e){const t=e.graphics.backgrounds;void 0!==t&&void 0!==t.inSession&&delete t.inSession,this._metaInfo=e} -_updateVisibleOfPreAndPostMarketBackground(e){const t=e.value();this._outOfSessionVisibilityProperty().setValue(t),this._preMarketVisibilityProperty().setValue(t),this._postMarketVisibilityProperty().setValue(t)}_clearData(){null!==this._studySource&&this._studySource.clearData()}_createPaneViews(){const e={doubleClickHandler:this._doubleClickHandler};Object(h.createGraphicsPaneViews)(this,this._model,e).then(e=>{this._paneViews=e,this._model.lightUpdate()})}_onPropertiesChanged(){this._processHibernate(),this.updateAllViews()}_processHibernate(){if(null!==this._studySource){const e=this._canBeHibernated(),t=this._isHibernated(),i=this._studySource.isStarted();!t&&e&&i?this._studySource.stop():!t||e||i||this._studySource.start()}}_canBeHibernated(){const e=this._model.mainSeries(),t=this._preMarketVisibilityProperty().value()&&this._postMarketVisibilityProperty().value()&&this._outOfSessionVisibilityProperty().value();return e.isDWM()||!t&&!this._vertLinesVisibleProperty().value()}_isHibernated(){return this._isStarted&&(null===this._studySource||!this._studySource.isStarted())}_outOfSessionVisibilityProperty(){return this._properties.childs().graphics.childs().backgrounds.childs().outOfSession.childs().visible}_preMarketVisibilityProperty(){return this._properties.childs().graphics.childs().backgrounds.childs().preMarket.childs().visible}_postMarketVisibilityProperty(){return this._properties.childs().graphics.childs().backgrounds.childs().postMarket.childs().visible}_vertLinesVisibleProperty(){return this._properties.childs().graphics.childs().vertlines.childs().sessBreaks.childs().visible}_removeDuplicateProperties(){this._properties.hasChild("properties")&&(this._properties.removeProperty("properties"),Object(g.saveDefaultProperties)(!0),this._properties.childChanged("",null),Object(g.saveDefaultProperties)(!1))}_migrateOutOfSessionProperty(e){const t=e.graphics.backgrounds;if(void 0!==t){const i=t.outOfSession;i.color===Object(s.ensureDefined)(y.graphics.backgrounds).outOfSession.color||"postMarket"in t||(e.graphics.backgrounds=Object.assign(Object.assign({},t),{postMarket:{color:i.color,transparency:i.transparency,visible:i.visible},preMarket:{color:i.color,transparency:i.transparency,visible:i.visible}}))}}}},KcY8:function(e,t,i){"use strict";var s=i("aO4+"),r=i("f6yo"),n=i("jFln"),o=i("VaSN"),a=i("972a"),l=i("Tmoa"),c=i("Ialn"),h=i("ikwP"),u=i("VdBB"),d=i("gAom"),p=i("//lt");class _{constructor(e,t){this.setData(e,t)}setData(e,t){this._data=Object.assign({},e),this._commonData=Object.assign({},t)}draw(e,t,i,s,r,o){if(!this._data.visible)return;e.save(),e.font=t.font;const u=void 0!==this._data.labelIcon,p=this._data.tickVisible?t.tickLength:0,_=t.borderSize,m=t.paddingTop+this._commonData.additionalPaddingTop,f=t.paddingBottom+this._commonData.additionalPaddingBottom,g=t.paddingInner,v=t.paddingOuter,b=t.fontSize;let S=this._data.text,y=this._data.textColor||this._commonData.textColor,w=this._data.secondLine||"",C=this._commonData.secondLineTextColor||y,P=this._data.thirdLine||"" -;const x=this._commonData.thirdLineTextColor||y;0===w.length&&(w=P,C=x,P=""),0===S.length&&(S=w,y=C,w=P,C=x,P="");const T=i.yMidCorrection(e,S)*o,M=Math.ceil(i.measureText(e,S)),I=b+m+f,L=Boolean(w),O=Boolean(P),A=L?Math.ceil(i.measureText(e,w)):0,E=O?Math.ceil(i.measureText(e,P)):0,k=_+g+v+M+p,D=A>0?_+g+v+A+p:0,V=E>0?_+g+v+E+p:0,B=Math.max(k,D,V),R=Math.max(1,Math.floor(o));let N=Math.round(I*o);N%2!=R%2&&(N+=1);const j=Math.round((b+t.lineSpacing)*o),F=Math.round(2*(b+t.lineSpacing)*o),W=Math.max(1,Math.floor(_*o)),H=this._data.separatorVisible?W:0,z=this._data.borderVisible?W:0,U=u?N:Math.round(B*o),G=Math.round(p*o),q=Math.ceil(s*o),Y=Math.ceil(g*o);let K=this._commonData.coordinate;this._commonData.fixedCoordinate&&(K=this._commonData.fixedCoordinate),K=Math.round(K*o)-Math.floor(.5*o);const J=Math.floor(K+R/2-N/2),Z=J+N,X="right"===r,$=X?q-H:H,Q=q;let ee,te,ie=$;const se=Object(l.resetTransparency)(this._data.backgroung||this._commonData.background);e.fillStyle=se;const re=2*o;if(e.textAlign=X?"right":"left",e.textBaseline="middle",X?(ie=$-U,ee=$-G,te=$-G-Y-1):(ie=$+U,ee=$+G,te=$+G+Y),S||u){const i=O?N+F:L?N+j:N,s=this._commonData.borderColor||se,r=(t,s,r)=>{X?Object(d.drawRoundRectWithInnerBorder)(e,ie,J,U,i,t,[re,0,0,re],z,s,r):Object(d.drawRoundRectWithInnerBorder)(e,$,J,U,i,t,[0,re,re,0],z,s,r)};if(r(se,"transparent"),this._data.tickVisible){e.strokeStyle=Object(l.generateColor)(this._data.tickColor||y,35),e.lineWidth=R;const t=void 0!==this._commonData.borderStyle?this._commonData.borderStyle:a.LineStyle.Solid;Object(n.setLineStyle)(e,t),Object(d.drawHorizontalLine)(e,Math.floor(K+R/2),$,ee)}if(r("transparent",s,this._commonData.borderStyle),this._data.separatorVisible&&(e.fillStyle=t.paneBackgroundColor,e.fillRect(X?Q-H:0,J,H,Z-J)),u){switch(this._data.labelIcon){case 0:this._drawPlusIcon(e,$,ie,J,K,Z,R);break;case 1:this._drawClockIcon(e,$,ie,K,R,o)}return}e.save(),e.translate(te,(J+Z)/2+T),Object(h.drawScaled)(e,o,()=>{e.fillStyle=y,e.fillText(S,0,0)}),e.restore()}L&&(e.fillStyle=C,e.save(),e.translate(te,(J+Z)/2+T+j),Object(h.drawScaled)(e,o,()=>{e.fillText(Object(c.startWithLTR)(w),0,0)}),e.restore()),O&&(e.fillStyle=x,e.save(),e.translate(te,(J+Z)/2+T+F),Object(h.drawScaled)(e,o,()=>{e.fillText(Object(c.startWithLTR)(P),0,0)}),e.restore()),e.restore()}height(e){const t=this._data,i=(t.text?1:0)+(t.secondLine?1:0)+(t.thirdLine?1:0);return t.visible&&0!==i?i*e.fontSize+(i-1)*e.lineSpacing+e.paddingTop+this._commonData.additionalPaddingTop+e.paddingBottom+this._commonData.additionalPaddingBottom:0}hitTest(e){const t=this._data.hitTestData;if(void 0===t||!this._data.visible)return null;const i=Object(o.lastEventIsTouch)()?10:0,n=Object(s.box)(new s.Point(t.xl-i,t.y-i),new s.Point(t.xl+t.containerWidth+i,t.y+t.containerHeight+i)),a=t.left&&Object(r.pointInBox)(e,n),l=Object(s.box)(new s.Point(t.xr-i,t.y-i),new s.Point(t.xr+t.containerWidth+i,t.y+t.containerHeight+i)),c=t.right&&Object(r.pointInBox)(e,l);if(a||c){const i=a?"left":"right";return new u.HitTestResult(u.HitTestResult.CUSTOM,{ -cursorType:p.PaneCursorType.Default,clickHandler:void 0===t.clickHandler?void 0:t.clickHandler.bind(this,e,i),tapHandler:void 0===t.clickHandler?void 0:t.clickHandler.bind(this,e,i),tooltip:t.tooltip})}return null}_drawPlusIcon(e,t,i,s,r,n,o){e.fillStyle=this._commonData.textColor,e.strokeStyle=this._commonData.textColor,e.lineWidth=o;const a=Math.abs(t-i);let l=Math.round(.35*a);l%2!=o%2&&(l+=1);let c=Math.round(.65*a);c%2!=o%2&&(c+=1);const h=Math.floor((a-l)/2),u=Math.min(t,i),d=u+Math.floor(a/2-o/2);e.fillRect(u+h,r,l,o),e.fillRect(d,s+h,o,l),e.beginPath(),e.arc(d+o/2,r+o/2,c/2,0,2*Math.PI,!1),e.stroke()}_drawClockIcon(e,t,i,s,r,n){e.fillStyle=this._commonData.textColor,e.lineWidth=r;const o=Math.abs(t-i);let a=Math.round(.35*o);a%2!=r%2&&(a+=1);let l=Math.round(.65*o);l%2!=r%2&&(l+=1);const c=Math.min(t,i)+Math.floor(o/2-r/2);e.save(),e.translate(c+r/2-l/2,s+r/2-l/2),e.scale(n,n);const h=new Path2D("M7.5 0.8a1 1 0 0 0 0 13.4 1 1 0 0 0 0-13.4zm0 1a1 1 0 0 1 0 11 1 1 0 0 1 0-11zm-.97-.25A3.5 3.5 0 0 0 3.5 0 3.5 3.5 0 0 0 0 3.5a3.5 3.5 0 0 0 1.75 3.03l.5-.86A2.5 2.5 0 0 1 1 3.5 2.5 2.5 0 0 1 3.5 1a2.5 2.5 0 0 1 2.17 1.25zm6.72 4.78A3.5 3.5 0 0 0 15 3.5 3.5 3.5 0 0 0 11.5 0a3.5 3.5 0 0 0-3.03 1.75l.86.5A2.5 2.5 0 0 1 11.5 1 2.5 2.5 0 0 1 14 3.5a2.5 2.5 0 0 1-1.25 2.17zM7 5h1v5H7zm3 2v1H5V7z");e.fill(h),e.restore()}}i.d(t,"a",(function(){return m}));class m{constructor(e){this._commonRendererData={coordinate:0,textColor:"#FFF",background:"#000",additionalPaddingBottom:0,additionalPaddingTop:0},this._axisRendererData={text:"",visible:!1,tickVisible:!0,separatorVisible:!1,borderVisible:!1},this._paneRendererData={text:"",visible:!1,tickVisible:!1,separatorVisible:!0,borderVisible:!1},this._invalidated=!0,this._axisRenderer=new(e||_)(this._axisRendererData,this._commonRendererData),this._paneRenderer=new(e||_)(this._paneRendererData,this._commonRendererData)}text(){return this._updateRendererDataIfNeeded(),this._axisRendererData.text}secondLineText(){return this._updateRendererDataIfNeeded(),this._axisRendererData.secondLine}thirdLineText(){return this._updateRendererDataIfNeeded(),this._axisRendererData.thirdLine}background(){return this._updateRendererDataIfNeeded(),this._commonRendererData.background}color(){return this._updateRendererDataIfNeeded(),this.generateTextColor(this.background())}generateTextColor(e){return Object(l.colorFromBackground)(e)}coordinate(){return this._updateRendererDataIfNeeded(),this._commonRendererData.coordinate}floatCoordinate(){return this._updateRendererDataIfNeeded(),this._commonRendererData.floatCoordinate||this._commonRendererData.coordinate}update(){this._invalidated=!0}height(e){return this._updateRendererDataIfNeeded(),Math.max(this._axisRenderer.height(e),this._paneRenderer.height(e))}getFixedCoordinate(){return this._commonRendererData.fixedCoordinate||0}setFixedCoordinate(e){this._commonRendererData.fixedCoordinate=e}isVisible(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible||this._paneRendererData.visible}isAxisLabelVisible(){ -return this._updateRendererDataIfNeeded(),this._axisRendererData.visible}isPaneLabelVisible(){return this._updateRendererDataIfNeeded(),this._paneRendererData.visible}renderer(){return this._updateRendererDataIfNeeded(),this._axisRenderer}paneRenderer(){return this._updateRendererDataIfNeeded(),this._paneRenderer}setPaneRendererLabelIcon(e){this._paneRendererData.labelIcon=e}setPaneLabelVisible(e){this._paneRendererData.visible=e,this._invalidated=!0}ignoreAlignment(){return!1}_updateRendererDataIfNeeded(){this._invalidated&&(this._updateRendererData(this._axisRendererData,this._paneRendererData,this._commonRendererData),this._invalidated=!1),this._axisRenderer.setData(this._axisRendererData,this._commonRendererData),this._paneRenderer.setData(this._paneRendererData,this._commonRendererData)}}},Kdr6:function(e,t,i){"use strict";i.r(t),i.d(t,"HHistLegendView",(function(){return r}));var s=i("TG9i");class r extends s.HHistDataWindowView{constructor(e,t){super(e,t),this._showStudyValues=t.properties().paneProperties.legendProperties.showStudyValues}isValuesVisible(){return this._showStudyValues.value()}additional(){return null}destroy(){}}},KmlC:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyPlotCandlesPaneView",(function(){return l}));var s=i("Zy3/"),r=i("Zp/P"),n=i("vq8G"),o=i("/hKg"),a=i("ehkz");class l extends a.a{renderer(){const e=this._study.properties().ohlcPlots[this._plotName];if(!e.visible.value())return null;this._invalidated&&(this._updateImpl(),this._invalidated=!1);const t=this._model.timeScale().barSpacing(),i={bars:this._bars,barSpacing:t,wickVisible:e.drawWick.value(),bodyVisible:!0,borderVisible:e.drawBorder.value(),barWidth:Object(r.optimalBarWidth)(t),borderColor:e.borderColor.value(),wickColor:e.wickColor.value()},a=new s.CompositeRenderer;return a.append(new o.PaneRendererCandles(i)),this._model.selection().isSelected(this._series)&&this._isMarkersEnabled&&this._selectionData&&a.append(new n.SelectionRenderer(this._selectionData)),a}}},KnF9:function(e,t,i){"use strict";i.r(t),i.d(t,"EnvironmentState",(function(){return r}));var s=i("qFKp");class r{constructor(e){this._shift=!1,this._control=!1,this._alt=!1,void 0!==e&&(this._shift=Boolean(e.shiftKey),this._control=Boolean(Object(s.isMac)()?e.metaKey:e.ctrlKey),this._alt=Boolean(e.altKey))}shift(){return this._shift}control(){return this._control}alt(){return this._alt}shiftOnly(){return this._shift&&!this._control&&!this._alt}controlOnly(){return this._control&&!this._shift&&!this._alt}altOnly(){return this._alt&&!this._shift&&!this._control}controlShift(){return this._shift&&this._control&&!this._alt}static create(e=!1,t=!1,i=!1){return new r({shiftKey:e,ctrlKey:t,metaKey:t,altKey:i})}}},KtbP:function(e,t,i){"use strict";i.r(t),i.d(t,"PanePriceAxisView",(function(){return n}));var s=i("u+0B");class r{constructor(e){this._priceAxisViewRenderer=null,this._rendererOptions=null,this._align="right",this._width=0,this._textWidthCache=e}setParams(e,t,i,s){this._priceAxisViewRenderer=e,this._rendererOptions=t,this._width=i,this._align=s}draw(e,t){ -null!==this._rendererOptions&&null!==this._priceAxisViewRenderer&&this._priceAxisViewRenderer.draw(e,this._rendererOptions,this._textWidthCache,this._width,this._align,t.pixelRatio)}hitTest(e){var t,i;return void 0===(null===(t=this._priceAxisViewRenderer)||void 0===t?void 0:t.hitTest)?null:null===(i=this._priceAxisViewRenderer)||void 0===i?void 0:i.hitTest(e)}}class n{constructor(e,t,i){this._renderer=null,this._invalidated=!0,this._priceAxisView=e,this._textWidthCache=new s.a(50),this._dataSource=t,this._chartModel=i,this._fontSize=-1,this._panePriceAxisViewRenderer=new r(this._textWidthCache)}update(){this._invalidated=!0}renderer(e,t){return this._invalidated&&this._updateImpl(e,t),this._renderer}_updateImpl(e,t){this._priceAxisView.update(),this._renderer=null;const i=this._chartModel.crossHairSource(),s=this._dataSource===i?i.pane:this._chartModel.paneForSource(this._dataSource);if(null===s)return;const r=this._priceScale();if(null===r)return;let n=s.priceScalePosition(r);if("overlay"===n&&(n=s.priceScalePosition(s.defaultPriceScale())),"overlay"===n)return;const o=this._chartModel.priceAxisRendererOptions();o.fontSize!==this._fontSize&&(this._fontSize=o.fontSize,this._textWidthCache.reset()),this._panePriceAxisViewRenderer.setParams(this._priceAxisView.paneRenderer(),o,t,n),this._renderer=this._panePriceAxisViewRenderer,this._invalidated=!1}_priceScale(){return this._dataSource.priceScale()}}},"L/Ed":function(e,t,i){"use strict";var s;i.r(t),i.d(t,"ToolboxType",(function(){return s})),function(e){e[e.Delete=0]="Delete"}(s||(s={}))},LAp3:function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var s=i("ogJP"),r=i("5rJj"),n=i.n(r);class o extends n.a{constructor(e,t){super(e,t,!1,{names:["width","color","visible"]})}_iterateLevels(e,t){for(const i in e.levels)if(e.levels[i]&&Object(s.isSameType)(e.levels[i],t.typecheck())){let s=t.tpl();for(const r in this._map.names)this._map.names.hasOwnProperty(r)&&(s=t.fill(r,this._map.names[r],e.levels[i],s));e.levels[i]=s}return e}}function a(e,t){return new o(e,t)}},LdoW:function(e,t){e.exports=''},Ltzl:function(e,t,i){"use strict";i.r(t),i.d(t,"SaveLineToolStateUndoCommand",(function(){return n}));var s=i("Eyy1"),r=i("RDU5");class n extends r.UndoCommand{constructor(e,t,i,s=!0){super(i,s),this._newStates=[],this._model=e,this._savedStates=t.map(e=>e.state(!1))}redo(){this._applyState(this._newStates)}undo(){0===this._newStates.length&&this.saveNewState(),this._applyState(this._savedStates)}saveNewState(){const e=this._savedStates.map(e=>Object(s.ensureNotNull)(this._model.dataSourceForId(e.id)));this._newStates=e.map(e=>e.state(!1))}_applyState(e){for(const t of e){const e=this._model.dataSourceForId(t.id);null!==e&&this._model.restoreLineToolState(e,t)}}}},LxhU:function(e,t,i){"use strict";i.r(t),i.d(t,"ResolutionKind",(function(){return n})), -i.d(t,"SpecialResolutionKind",(function(){return o})),i.d(t,"Interval",(function(){return h})),i.d(t,"isHour",(function(){return d}));const s=/^(\d*)([TSHDWMR])$/,r=/^(\d+)$/;var n,o;!function(e){e.Ticks="ticks",e.Seconds="seconds",e.Minutes="minutes",e.Days="days",e.Weeks="weeks",e.Months="months",e.Range="range",e.Invalid="invalid"}(n||(n={})),function(e){e.Hours="hours"}(o||(o={}));const a={};a[n.Ticks]=1e3,a[n.Seconds]=1e3,a[n.Minutes]=60*a[n.Seconds],a[n.Days]=1440*a[n.Minutes],a[n.Weeks]=7*a[n.Days];const l={T:n.Ticks,S:n.Seconds,D:n.Days,W:n.Weeks,M:n.Months,R:n.Range},c=new Set([n.Ticks,n.Seconds,n.Minutes]);class h{constructor(e,t){this._kind=n.Invalid,this._multiplier=0,e!==n.Invalid&&t>0&&(this._kind=e,this._multiplier=t)}kind(){return this._kind}multiplier(){return this._multiplier}isValid(){return this.kind()!==n.Invalid&&this.multiplier()>0}isDWM(){return this.isValid()&&!this.isRange()&&!this.isIntraday()&&!this.isTicks()}isIntraday(){const e=c.has(this.kind());return this.isValid()&&e}isSeconds(){return this.kind()===n.Seconds}isMinutes(){return this.kind()===n.Minutes}isMinuteHours(){return this.kind()===n.Minutes&&d(this.multiplier())}isDays(){return this.kind()===n.Days}isWeeks(){return this.kind()===n.Weeks}isMonths(){return this.kind()===n.Months}isRange(){return this.kind()===n.Range}isTicks(){return this.kind()===n.Ticks}isTimeBased(){return!this.isRange()}letter(){return this.isValid()&&this.kind()!==n.Minutes?this.kind()[0].toUpperCase():""}value(){return this.isValid()?this.kind()===n.Minutes?this.multiplier()+"":this.multiplier()+this.letter():""}isEqualTo(e){if(!(e instanceof h))throw new Error("Argument is not an Interval");return!(!this.isValid()||!e.isValid())&&(this.kind()===e.kind()&&this.multiplier()===e.multiplier())}inMilliseconds(e=Date.now()){if(!this.isValid()||this.isRange())return NaN;if(this.isMonths()){const t=new Date(e);t.setUTCMonth(t.getUTCMonth()+(this.multiplier()||1));return+t-e}const t=this.multiplier();return a[this.kind()]*t}static isEqual(e,t){return h.parse(e).isEqualTo(h.parse(t))}static parse(e){e=(e+"").toUpperCase().split(",")[0];let t=s.exec(e);return null!==t?"H"===t[2]?new h(n.Minutes,60*u(t[1])):new h(l[t[2]],u(t[1])):(t=r.exec(e),null!==t?new h(n.Minutes,u(t[1])):new h(n.Invalid,0))}static kind(e){return h.parse(e).kind()}static isValid(e){return h.parse(e).isValid()}static isDWM(e){return h.parse(e).isDWM()}static isIntraday(e){return h.parse(e).isIntraday()}static isSeconds(e){return h.parse(e).isSeconds()}static isMinutes(e){return h.parse(e).isMinutes()}static isMinuteHours(e){return h.parse(e).isMinuteHours()}static isDays(e){return h.parse(e).isDays()}static isWeeks(e){return h.parse(e).isWeeks()}static isMonths(e){return h.parse(e).isMonths()}static isRange(e){return h.parse(e).isRange()}static isTicks(e){return h.parse(e).isTicks()}static isTimeBased(e){return h.parse(e).isTimeBased()}static normalize(e){const t=h.parse(e);return t.isValid()?t.value():null}}function u(e){return 0===e.length?1:parseInt(e,10)}function d(e){return e>=60&&!(e%60)}}, -"M7/j":function(e,t,i){"use strict";i.r(t),i.d(t,"itemsRangeIsValid",(function(){return h})),i.d(t,"splitItems",(function(){return u})),i.d(t,"PaneRendererBaseline",(function(){return d}));var s=i("aO4+"),r=i("hBTJ"),n=i("GEp6"),o=i("Zp/P"),a=i("Y7w9"),l=i("cPgM"),c=i("VdBB");function h(e){if(0===e.length)return!1;const t=e.findIndex(e=>Object(o.coordinateIsValid)(e.y));if(-1===t)return!1;let i=e.length-1;for(;i>t&&!Object(o.coordinateIsValid)(e[i].y);)i--;return!(t>i)}function u(e,t){const i=[],n=[];let a=null;for(let l=0;l=t&&n.push(c),a=c;else{if(null===a)continue;c=a}if(Object(o.coordinateIsValid)(h.y)&&(c.y>t&&h.yt))if(Math.abs(c.x-h.x)<1){const e=new s.Point(c.x,t);i.push(e),n.push(e)}else{const e=Object(r.intersectLineSegments)(c,h,new s.Point(c.x,t),new s.Point(h.x,t));if(null!==e){const t=c.add(h.subtract(c).scaled(e));i.push(t),n.push(t)}}}return{topItems:i,bottomItems:n}}class d extends l.ScaledPaneRenderer{constructor(){super(...arguments),this._data=null}setData(e){this._data=e}hitTest(e){if(null===this._data)return null;const{items:t,topLineWidth:i,bottomLineWidth:r}=this._data,l=Object(o.interactionTolerance)().series+(i+r)/4,h=Object(a.lowerbound)(t,e,(e,t)=>e.x<=t.x),u=Math.max(1,h-1),d=Math.min(t.length-1,h+1);for(let o=u;o<=d;++o){const i=t[o-1],r=t[o],{distance:a}=Object(n.distanceToSegment)(new s.Point(i.x,i.y),new s.Point(r.x,r.y),new s.Point(e.x,e.y));if(a<=l)return new c.HitTestResult(c.HitTestResult.REGULAR)}return null}_drawImpl(e){if(null===this._data)return;const{items:t,baseLevelCoordinate:i,bottom:s,bottomFillColor1:r,bottomFillColor2:n,topFillColor1:o,topFillColor2:a,topLineColor:l,bottomLineColor:c,topLineWidth:d,bottomLineWidth:p}=this._data;if(!h(t))return;const{topItems:_,bottomItems:m}=u(t,i);e.lineCap="round",e.lineJoin="round",0!==_.length&&(e.beginPath(),e.moveTo(_[0].x,i),this._makeLine(e,_,!0,0),e.closePath(),e.fillStyle=this._makeLinearGradient(e,o,a,i-s,i),e.fill(),e.beginPath(),this._makeLine(e,_,!1,0),e.lineWidth=d,e.strokeStyle=l,e.stroke()),0!==m.length&&(e.beginPath(),e.moveTo(m[0].x,i),this._makeLine(e,m,!0,1),e.closePath(),e.fillStyle=this._makeLinearGradient(e,r,n,i,i+s),e.fill(),e.beginPath(),this._makeLine(e,m,!1,1),e.lineWidth=p,e.strokeStyle=c,e.stroke())}_makeLine(e,t,i,s){if(null===this._data)return;const r=t.findIndex(e=>Object(o.coordinateIsValid)(e.y));if(-1===r)return;const{barSpacing:n,baseLevelCoordinate:a}=this._data,l=.25*n;let c;const h=t.length;for(let u=r;u=a&&n.y>=a){e.moveTo(n.x,n.y);continue}}else if(c&&c.y<=a&&n.y<=a){e.moveTo(n.x,n.y);continue}if(c&&Object(o.coordinateIsValid)(c.y))e.lineTo(n.x,n.y),i&&!Object(o.coordinateIsValid)(h.y)&&e.lineTo(n.x,a);else if(h&&Object(o.coordinateIsValid)(h.y))i?(u!==r&&e.lineTo(n.x,a),e.lineTo(n.x,n.y)):e.moveTo(n.x,n.y);else if(i){if(0===u)continue;u!==r&&e.lineTo(n.x-l,a),e.lineTo(n.x-l,n.y), -e.lineTo(n.x+l,n.y),e.lineTo(n.x+l,a)}else e.moveTo(n.x-l,n.y),e.lineTo(n.x+l,n.y);c=n}}}_makeLinearGradient(e,t,i,s,r){const n=e.createLinearGradient(0,s,0,r);return n.addColorStop(0,t),n.addColorStop(1,i),n}}},MA5A:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolCrossLine",(function(){return a}));var s=i("Ocx9"),r=i("p1SQ"),n=i("GmZZ"),o=i("Ss5c");class a extends o.LineDataSource{constructor(e,t){super(e,t||a.createProperties()),this._priceAxisView=new r.LineToolHorzLinePriceAxisView(this),this._timeAxisView=new n.a(this),i.e("lt-pane-views").then(i.bind(null,"amUF")).then(({CrossLinePaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}pointsCount(){return 1}name(){return"Cross Line"}priceAxisViews(e,t){return this.isSourceHidden()?null:t===this.priceScale()&&this.properties().showPrice.value()&&this._model.paneForSource(this)===e?[this._priceAxisView]:null}timeAxisViews(){return this.isSourceHidden()?null:this.properties().showTime.value()?[this._timeAxisView]:null}updateAllViews(){super.updateAllViews(),this._priceAxisView.update(),this._timeAxisView.update()}canHasAlert(){return!1}lineColor(){return this.properties().linecolor.value()}lineWidth(){return this.properties().linewidth.value()}lineStyle(){return this.properties().linestyle.value()}static createProperties(e){const t=new s.DefaultProperty("linetoolcrossline",e);return a._configureProperties(t),t}_getPropertyDefinitionsViewModelClass(){return Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"xrdl")).then(e=>e.CrossLineDefinitionsViewModel)}static _configureProperties(e){o.LineDataSource._configureProperties(e)}}},MROS:function(e,t,i){"use strict";i.r(t),i.d(t,"ModelSelection",(function(){return o}));var s=i("Y7w9"),r=i("GxN8"),n=i("CW80");class o{constructor(){this._items=[],this._set=new Set}isEmpty(){return 0===this._items.length}add(e){if(this._items.length>0&&!Object(n.isLineTool)(this._items[0])&&this.clear(),Object(n.isLineTool)(e)){const t=Object(s.lowerbound)(this._items,e,(e,t)=>e.zorder()!Object(r.a)(e))}checkLineToolSelection(){this._items.forEach(e=>Object(n.isLineTool)(e)&&e.calcIsActualSymbol()),this._items=this._items.filter(e=>!Object(n.isLineTool)(e)||e.isActualSymbol())}remove(e){this._items=this._items.filter(t=>t!==e),this._set.delete(e)}clear(){this._items=[],this._set.clear()}notFixedSources(){return this._items.filter(e=>!Object(n.isLineTool)(e)||!e.isFixed())}}},MWAT:function(e,t,i){"use strict";i.r(t),i.d(t,"PriceScaleSelectionStrategyEvenly",(function(){return o})),i.d(t,"PriceScaleSelectionStrategyAllRight",(function(){return a})), -i.d(t,"PriceScaleSelectionStrategyAllLeft",(function(){return l})),i.d(t,"createPriceScaleSelectionStrategy",(function(){return h})),i.d(t,"allPriceScaleSelectionStrategyInfo",(function(){return u}));var s=i("Eyy1"),r=i("3ClC");class n{constructor(e){this._priceScalesLimit=8,this._metaInfo=e}metaInfo(){return this._metaInfo}findSuitableScale(e,t,i,s){if(void 0!==s)return this._tryToGetDesiredPriceScale(e,t,s,i);if(Object(r.isStudy)(t)){const s=t.metaInfo();if("Volume"===s.shortId&&e.containsMainSeries())return e.createPriceScaleAtPosition("overlay");const n=t.desiredPriceScalePosition();if(null!==n)return this._tryToGetDesiredPriceScale(e,t,n,i);if(void 0!==i&&(Object(r.isStudy)(i)||e.isMainPane())&&s.is_price_study)return this._getPriceScaleTheSameAsForSource(i,e)}let n=!1;if(Object(r.isStudy)(t)){const i=t.metaInfo().groupingKey;if(void 0!==i){const t=e.model().findNonOverlayStudyWithGroupingKey(i,e);if(null!==t)return this._getPriceScaleTheSameAsForSource(t.study,t.pane)}n=Boolean(t.metaInfo().is_price_study)}else t===e.model().mainSeries()&&(n=!0);if(n){const t=this._findFirstScaleForPriceStudy(e);if(null!==t)return t}return this.createNewPriceScaleIfPossible(e)}canCreateNewPriceScale(e){return e.leftPriceScales().length+e.rightPriceScales().lengthi&&this._priceScaleIsPrice(e.rightPriceScales()[i],t))return e.rightPriceScales()[i];if(e.leftPriceScales().length>i&&this._priceScaleIsPrice(e.leftPriceScales()[i],t))return e.leftPriceScales()[i]}return null}_targetPriceScaleIndex(e,t){if(e.mainSource()===t.mainSeries())return 0}_tryToGetDesiredPriceScale(e,t,i,r){switch(i){case"left":return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("left"):e.createPriceScaleAtPosition("overlay");case"right":return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("right"):e.createPriceScaleAtPosition("overlay");case"as-series":return void 0!==r?Object(s.ensureNotNull)(r.priceScale()):e.isMainPane()?Object(s.ensureNotNull)(Object(s.ensureNotNull)(e.mainDataSource()).priceScale()):this.createNewPriceScaleIfPossible(e);case"overlay":return e.createPriceScaleAtPosition("overlay")}}}class o extends n{constructor(e){super(e)}apply(e){if(e.containsMainSeries()){const t=Object(s.ensureNotNull)(Object(s.ensureNotNull)(e.mainDataSource()).priceScale());e.movePriceScale(t,"right",0)}const t=e.model();for(;e.leftPriceScales().length>e.rightPriceScales().length;){const i=e.leftPriceScales()[e.leftPriceScales().length-1];e.movePriceScale(i,"right",this._targetPriceScaleIndex(i,t))}for(;e.rightPriceScales().length-e.leftPriceScales().length>1;){ -const i=e.rightPriceScales()[e.rightPriceScales().length-1];e.movePriceScale(i,"left",this._targetPriceScaleIndex(i,t))}}createNewPriceScaleIfPossible(e){if(!this.canCreateNewPriceScale(e))return e.createPriceScaleAtPosition("overlay");const t=e.leftPriceScales().lengthe.movePriceScale(i,"right",this._targetPriceScaleIndex(i,t)))}createNewPriceScaleIfPossible(e){return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("right"):e.createPriceScaleAtPosition("overlay")}}class l extends n{constructor(e){super(e)}apply(e){const t=e.model();e.rightPriceScales().slice(0).forEach(i=>e.movePriceScale(i,"left",this._targetPriceScaleIndex(i,t)))}createNewPriceScaleIfPossible(e){return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("left"):e.createPriceScaleAtPosition("overlay")}}const c=[{name:"left",title:window.t("Stack On The Left"),ctor:l},{name:"right",title:window.t("Stack On The Right"),ctor:a},{name:"auto",title:window.t("Auto"),ctor:o}];function h(e){const t=Object(s.ensureDefined)(c.find(t=>t.name===e));return new t.ctor(t)}function u(){return c}},MXV9:function(e,t){e.exports=''},MY2c:function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var s=i("RDU5"),r=i("aIyQ"),n=i.n(r),o=i("txPx");const a=Object(o.getLogger)("Common.UndoStack");class l{constructor(){this._commands=[],this._onChange=new n.a}onChange(){return this._onChange}isEmpty(){return 0===this._commands.length}clear(){this.isEmpty()||(this._commands.length=0,this._onChange.fire())}push(e){if(!(e instanceof s.UndoCommand))throw new TypeError("argument must be an instance of UndoCommand");this._commands.push(e),this._onChange.fire(e)}pop(){if(this.isEmpty())return void a.logDebug("pop: undo stack is empty");const e=this._commands.pop();return this._onChange.fire(e),e}head(){if(!this.isEmpty())return this._commands[this._commands.length-1]}}},MbIA:function(e,t,i){"use strict" -;i.d(t,"a",(function(){return o}));var s=i("4kQX"),r=i("gQ5K");const n={dateFormat:"yyyy-MM-dd",timeFormat:"%h:%m:%s",dateTimeSeparator:" "};class o{constructor(e={}){const t=Object.assign({},n,e);this._dateFormatter=new r.DateFormatter(t.dateFormat),this._timeFormatter=new s.TimeFormatter(t.timeFormat),this._separator=t.dateTimeSeparator}format(e){return`${this._dateFormatter.format(e)}${this._separator}${this._timeFormatter.format(e)}`}formatLocal(e){return`${this._dateFormatter.formatLocal(e)}${this._separator}${this._timeFormatter.formatLocal(e)}`}}},MrEN:function(e,t,i){"use strict";var s=i("aIyQ"),r=function(e,t){this._server=e,this._session=t,this.seriesCompleted=new s,this.seriesError=new s};r.prototype.onRequestMetadata=function(e,t){this._server.receiveLocalResponse({method:"studies_metadata",params:[this._session,e,{errors:[],hash:"",metainfo:t,migrations:[]}]})},r.prototype.onSymbolResolved=function(e,t){this._server.receiveLocalResponse({method:"symbol_resolved",params:[this._session,e,t]})},r.prototype.onSymbolError=function(e,t){this._server.receiveLocalResponse({method:"symbol_error",params:[this._session,e,t]})},r.prototype.onStudyError=function(e,t,i){this._server.receiveLocalResponse({method:"study_error",params:[this._session,e,t,i]})},r.prototype.onSeriesLoading=function(e,t){this._server.receiveLocalResponse({method:"series_loading",params:[this._session,e,t]})},r.prototype.onSeriesCompleted=function(e,t,i){this._server.receiveLocalResponse({method:"series_completed",params:[this._session,e,i,t]}),this.seriesCompleted.fire(e,t)},r.prototype.onSeriesError=function(e,t,i){this._server.receiveLocalResponse({method:"series_error",params:[this._session,e,t,i]}),this.seriesError.fire(e,t)},r.prototype.onStudyCompleted=function(e,t){this._server.receiveLocalResponse({method:"study_completed",params:[this._session,e,t]})},r.prototype.onStudyLoading=function(e,t){this._server.receiveLocalResponse({method:"study_loading",params:[this._session,e,t]})},r.prototype.onTickmarksUpdated=function(e,t){var i={method:"tickmark_update",params:[this._session,{index:e,zoffset:0,changes:[],marks:t,index_diff:[]}]};this._server.receiveLocalResponse(i)},r.prototype.onTimescaleUpdate=function(e,t){var i={method:"timescale_update",params:[this._session,this._prepareDataUpdateObjects(t),{index:e.pointsIndex,zoffset:0,changes:e.points,marks:e.marks,index_diff:e.indexChange,baseIndex:e.baseIndex}]};this._server.receiveLocalResponse(i)},r.prototype.onTimescaleCompleted=function(e){this._server.receiveLocalResponse({method:"timescale_completed",params:[this._session,e]})},r.prototype.onSeriesTimeframeUpdate=function(e,t,i,s,r){var n={method:"series_timeframe",params:[this._session,e,t,i,s,null,!0,r]};this._server.receiveLocalResponse(n)},r.prototype.onPointsetDataUpdate=function(e,t,i){this.onDataUpdate(e,t,i,null)},r.prototype._prepareDataUpdateObjects=function(e){var t={};return e.forEach((function(e){t[e.objId]={series:e.data,turnaround:e.turnaround},e.nonSeriesData&&(e.nonSeriesData.data?t[e.objId].nonseries={ -d:JSON.stringify(e.nonSeriesData.data),indexes:e.nonSeriesData.indexes}:t[e.objId].nonseries={d:"",indexes:[]})})),t},r.prototype.onDataUpdate=function(e,t,i,s){var r={method:"data_update",params:[this._session,this._prepareDataUpdateObjects([{objId:e,turnaround:t,data:i,nonSeriesData:s}])]};this._server.receiveLocalResponse(r)},r.prototype.onQuotesData=function(e){this._server.receiveLocalResponse({method:"quote_symbol_data",params:e})},r.prototype.onDepthData=function(e){this._server.receiveLocalResponse({method:"dd",params:e})},r.prototype.onDepthUpdate=function(e){this._server.receiveLocalResponse({method:"dpu",params:e})},r.prototype.onClearData=function(e){this._server.receiveLocalResponse({method:"clear_data",params:[this._session,e]})},TradingView.ChartapiMessagerInstances=[],e.exports=r},"N+BX":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolBezierCubic",(function(){return n}));var s=i("Ocx9"),r=i("Ss5c");class n extends r.LineDataSource{constructor(e,t){const s=t||n.createProperties();super(e,s),this._controlPoints=null,i.e("lt-pane-views").then(i.bind(null,"a6on")).then(t=>{this._setPaneViews([new t.BezierCubicPaneView(this,e)])})}pointsCount(){return 2}name(){return"Double Curve"}properties(){return super.properties()}setLastPoint(e,t){super.setLastPoint(e,t),this._controlPoints=this._calculateControlPoints()}addPoint(e,t,i){const s=super.addPoint(e,t,i);if(s){const e=this._calculateControlPoints();this._controlPoints=null,this._points.push(e[0]),this._points.push(e[1]),i||(this.normalizePoints(),this.createServerPoints()),this._createPointProperty(2),this._createPointProperty(3)}return s}restorePoints(e,t,i){super.restorePoints(e,t,i),this._createPointProperty(2),this._createPointProperty(3)}controlPoints(){return this._controlPoints}static createProperties(e){const t=new s.DefaultProperty("linetoolbeziercubic",e);return n._configureProperties(t),t}_getPropertyDefinitionsViewModelClass(){return Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"b4fl")).then(e=>e.GeneralBezierDefinitionsViewModel)}static _configureProperties(e){r.LineDataSource._configureProperties(e)}_calculateControlPoints(){const e=this.pointToScreenPoint(this.points()[0])[0],t=this.pointToScreenPoint(this.points()[1])[0],i=t.subtract(e).scaled(.5).transposed().scaled(.3),s=e.add(t).scaled(.33),r=e.add(t).scaled(.67),n=s.add(i),o=r.subtract(i);return[this.screenPointToPoint(n),this.screenPointToPoint(o)]}}},N1UO:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyApi",(function(){return m}));i("YFKU");var s=i("Eyy1"),r=i("ogJP"),n=i("9iCb"),o=i("xo8u"),a=i("gaBL"),l=i("HGup"),c=i("jRfx"),h=i("/ToI"),u=i("HZKX"),d=i("SwuQ"),p=i("Yt+L"),_=i("GD+X");class m{constructor(e,t){this._study=e,this._chartWidget=t,this._undoModel=this._chartWidget.model(),this._model=this._undoModel.model()}isUserEditEnabled(){return this._study.userEditEnabled()}setUserEditEnabled(e){this._study.setUserEditEnabled(e)}getInputsInfo(){return this._study.metaInfo().inputs.map(e=>Object.assign(Object.assign({},e),{ -localizedName:void 0!==e.name?window.t(e.name,{context:"input"}):""}))}getInputValues(){const e=this._study.inputs({symbolsForChartApi:!1,asObject:!0});return Object.keys(e).map(t=>{const i=e[t];return{id:t,value:Object(r.isObject)(i)?i.v:i}})}setInputValues(e){const t=this.getInputValues();for(const i of e){void 0!==t.find(e=>e.id===i.id)?this._study.properties().inputs[i.id].setValue(i.value):console.warn(`There is no such input: "${i.id}"`)}}waitForData(e){return new Promise((t,i)=>{const s={},r=setTimeout(()=>{this._study.onStatusChanged().unsubscribeAll(s),i("Timeout waiting for study to got final status")},e);this._study.onStatusChanged().subscribe(s,e=>{""===e&&(this._study.onStatusChanged().unsubscribeAll(s),clearTimeout(r),t())})})}mergeUp(){this._model.isMergeUpAvailableForSource(this._study)&&new c.c(this._model,this._study,"").redo()}mergeDown(){this._model.isMergeDownAvailableForSource(this._study)&&new c.a(this._model,this._study,"").redo()}unmergeUp(){this._model.isUnmergeAvailableForSource(this._study)&&new l.c(this._model,this._study,"").redo()}unmergeDown(){this._model.isUnmergeAvailableForSource(this._study)&&new l.a(this._model,this._study,"").redo()}mergeUpWithUndo(){this._model.isMergeUpAvailableForSource(this._study)&&this._undoModel.mergeSourceUp(this._study)}mergeDownWithUndo(){this._model.isMergeDownAvailableForSource(this._study)&&this._undoModel.mergeSourceDown(this._study)}unmergeUpWithUndo(){this._model.isUnmergeAvailableForSource(this._study)&&this._undoModel.unmergeSourceUp(this._study)}unmergeDownWithUndo(){this._model.isUnmergeAvailableForSource(this._study)&&this._undoModel.unmergeSourceDown(this._study)}priceScale(){return new _.a(this._undoModel,Object(s.ensureNotNull)(this._study.priceScale()))}changePriceScale(e){const t=Object(s.ensureNotNull)(this._model.paneForSource(this._model.mainSeries())),i=Object(s.ensureNotNull)(this._model.paneForSource(this._study));switch(e){case"no-scale":Object(s.assert)(i.actionNoScaleIsEnabled(this._study),"Unable to leave a pane without any non-overlay price scale"),new h.b(this._model,this._study,i,"overlay","").redo();break;case"as-series":Object(s.assert)(i===t,"Study should be on the main pane"),new h.a(this._model,this._study,i,this._model.mainSeries().priceScale(),"").redo();break;case"new-left":new h.b(this._model,this._study,i,"left","").redo();break;case"new-right":new h.b(this._model,this._study,i,"right","").redo();break;default:const r=this._model.dataSourceForId(e);if(null===r)throw new Error(`There is no study with entityId='${e}'`);const n=i===this._model.paneForSource(r);Object(s.assert)(n,"Both studies should be on the same pane");const l=Object(s.ensureNotNull)(r.priceScale()),c=Object(a.sourceNewCurrencyOnPinningToPriceScale)(this._study,l,this._model),u=Object(d.sourceNewUnitOnPinningToPriceScale)(this._study,l,this._model);new h.a(this._model,this._study,i,l,"").redo(),null!==c&&new o.a(l,c,this._undoModel.chartWidget(),"").redo(),null!==u&&new p.a(l,u,this._undoModel.chartWidget(),"").redo()}}isVisible(){ -return this._study.properties().visible.value()}setVisible(e){this._study.properties().visible.setValue(e)}bringToFront(){this._model.bringToFront([this._study])}sendToBack(){this._model.sendToBack([this._study])}applyOverrides(e){Object(n.applyOverridesToStudy)(this._study,e)}dataLength(){return this._study.metaInfo().plots.length>0?this._study.data().size():this._model.mainSeries().bars().size()}isLoading(){return this._study.isLoading()}async applyToEntireLayout(){const e=new u.ActionsProvider(this._chartWidget),t=(await e.contextMenuActionsForSources([this._study])).find(e=>"applyStudyToEntireLayout"===e.id);t&&t.execute()}}},N22A:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var s=i("eqEH");const r={id:"TradingService"};function n(){return Object(s.hasService)(r)?Object(s.service)(r):null}},NJRZ:function(e,t,i){"use strict";i.r(t),i.d(t,"LineTool5PointsPattern",(function(){return a}));var s=i("Eyy1"),r=i("Ocx9"),n=i("Ss5c"),o=i("j3hX");class a extends n.LineDataSource{constructor(e,t){super(e,t||a.createProperties()),this._loadPaneViews(e)}pointsCount(){return 5}name(){return"XABCD Pattern"}properties(){return super.properties()}static createProperties(e){const t=new r.DefaultProperty("linetool5pointspattern",e);return a._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)}_loadPaneViews(e){i.e("lt-pane-views").then(i.bind(null,"6MfG")).then(t=>{this._setPaneViews([new t.Pattern5pointsPaneView(this,e)])})}static _configureProperties(e){n.LineDataSource._configureProperties(e),e.addChild("linesColors",new o.LineToolColorsProperty([Object(s.ensureDefined)(e.child("color"))])),e.addChild("textsColors",new o.LineToolColorsProperty([Object(s.ensureDefined)(e.child("textcolor"))]))}}},NSoL:function(e,t,i){"use strict";i.r(t),i.d(t,"clientSnapshot",(function(){return y}));var s=i("aO4+"),r=i("eJTA"),n=i("zM7N"),o=i("Y7w9"),a=i("ikwP"),l=i("zDbI"),c=i("XlJ7"),h=i("EsvI"),u=i("Dq3s"),d=i("Kxc7"),p=i("tzRX");const _=!d.enabled("widget_logo");function m(e,t=null,i=null){let s={};if("number"==typeof e)return{relativePositions:{[e]:{l:t,t:i}},nextElementLeft:e,nextElementTop:e};const[r,...n]=e;if("v"===r){let e=null;for(const r of n){const n=m(r,t,i);s=Object.assign(Object.assign({},s),n.relativePositions),i=n.nextElementTop,e=n.nextElementLeft}t=e}if("h"===r){let e=null;for(const r of n){const n=m(r,t,i);s=Object.assign(Object.assign({},s),n.relativePositions),t=n.nextElementLeft,e=n.nextElementTop}i=e}return{relativePositions:s,nextElementTop:i,nextElementLeft:t}}const f=function(e){const t={};for(const i of Object.keys(e)){const s=m(e[i]).relativePositions;t[i]=s}return t}(u);const g=URL.createObjectURL(new Blob([p],{type:"image/svg+xml"}));function v(e,t,i,s){return Object(a.drawScaled)(e,s,()=>{e.fillText(i,t.x/s,t.y/s)}),e.measureText(i).width*s}function b(e){return e.map(e=>Object.assign(Object.assign({},e),{title:""}))}class S{ -constructor(e,t){this._logoTextColor=null,this._snapshotData=e,t=t||{},this._options=Object.assign({backgroundColor:h.themes[e.theme].getThemedColor("color-bg-primary"),font:l.CHART_FONT_FAMILY,fontSize:12,legendMode:"vertical",hideResolution:!1},t);const i=f[e.layout],s=e.charts.map(e=>function(e){const t=e.panes[0],i=t.canvas.width+t.leftAxis.canvas.width+t.rightAxis.canvas.width;let s=0;for(const r of e.panes)s+=r.canvas.height;return void 0!==e.timeAxis&&(s+=e.timeAxis.canvas.height),new a.Size(i,s)}(e));if(this._pixelRatio=e.hidpiRatio,this._chartsGeometry=e.charts.map((e,t)=>function e(t,i,s,r){let n=Math.round(10*r),o=Math.round(10*r);const a=s[t];if(null!==a.l){const t=e(a.l,i,s,r);n=t.x+t.width+Math.round(5*r)}if(null!==a.t){const t=e(a.t,i,s,r);o=t.y+t.height+Math.round(5*r)}const l=i[t];return{x:n,y:o,width:l.w,height:l.h}}(t,s,i,this._pixelRatio)),!_){let i=e.theme;void 0!==t.backgroundColor&&(i="black"===Object(r.rgbToBlackWhiteString)(Object(r.parseRgb)(t.backgroundColor),150)?n.a.Dark:n.a.Light),this._logoTextColor=h.themes[i].getThemedColor("color-text-primary")}}async getImage(){let e=0,t=0;for(const a of this._chartsGeometry)e=Math.max(e,a.x+a.width),t=Math.max(t,a.y+a.height);const i=this._pixelRatio;e+=Math.round(10*i);const s=_?Math.round(10*i):Math.round(35*i),r=t;t+=s;const n=Object(a.createDisconnectedCanvas)(document,new a.Size(e,t),1),o=Object(a.getContext2D)(n);o.font=Object(c.makeFont)(this._options.fontSize,this._options.font),o.textBaseline="top",o.fillStyle=this._options.backgroundColor,o.fillRect(0,0,e,t);for(let a=0;a{const t=new Image;t.width=h,t.height=u,t.onload=()=>{e({image:t,width:h,height:u})},t.src=g}));o.fillStyle=this._logoTextColor,o.font=Object(c.makeFont)(13,l.CHART_FONT_FAMILY);const t=r+Math.round(s/2-e.height/2);!function(e,t,i,s,r){e.save(),e.drawImage(s.image,t,i,s.width,s.height),e.textBaseline="bottom";const n=(t+s.width)/r+3,o=(i+s.height)/r;Object(a.drawScaled)(e,r,()=>{e.fillText("TradingView",n,o)}),e.restore()}(o,Math.round(10*i),t,e,i)}var h,u;return n}_drawChart(e,t,i){i.save(),i.translate(t.x,t.y);let r=0;for(const n of e.panes){let t=0;const o=n.leftAxis.canvas.width+Math.round(8*this._pixelRatio),a=r,l=r+Math.round(10*this._pixelRatio);n.leftAxis.contentWidth>0&&(i.drawImage(n.leftAxis.canvas,t,r),t+=n.leftAxis.canvas.width),i.drawImage(n.canvas,t,r),t+=n.canvas.width,n.rightAxis.contentWidth>0&&i.drawImage(n.rightAxis.canvas,t,r),"pane"===n.type&&(i.fillStyle=e.colors.text,this._drawLegend(n,i,new s.Point(o,l),a)),r+=n.canvas.height}if(void 0!==e.timeAxis){let t=0;e.timeAxis.lhsStub.contentWidth>0&&(i.drawImage(e.timeAxis.lhsStub.canvas,t,r),t+=e.timeAxis.lhsStub.canvas.width),i.drawImage(e.timeAxis.canvas,t,r),t+=e.timeAxis.canvas.width,e.timeAxis.rhsStub.contentWidth>0&&i.drawImage(e.timeAxis.rhsStub.canvas,t,r)}i.restore()} -_drawLegend(e,t,i,r){let n=!0;const o=Math.ceil(1.4*this._options.fontSize*this._pixelRatio);let a=i.x,l=i.y;if(e.mainSeriesText&&l+oe.text).join("");let h=t.x;const u=function(e,t,i,s){if(e.measureText(t).width*s<=i)return{text:t,elided:!1};const r=e.measureText("...").width*s,n=[];for(let o=0;oe.measureText(t.slice(0,o+1)).width*s+r>i);return{text:(t=t.slice(0,a)).trim(),elided:!0}}(e,c,i-h,this._pixelRatio);if(u.elided&&!a)return null;const d=[];let p=0;for(const s of l){if(p+s.text.length>u.text.length)break;d.push(s.text),p+=s.text.length}const _=d.join("").trim().length;p=0;for(const o of l){if(p+o.text.length>_)break;o.color&&(e.save(),e.fillStyle=o.color),h+=v(e,new s.Point(h,t.y),o.text,this._pixelRatio),o.color&&e.restore(),p+=o.text.length}return u.elided&&(h+=v(e,new s.Point(h,t.y),"...",this._pixelRatio)),h}}async function y(e,t){return new S(e,t).getImage()}},NhkU:function(e,t,i){"use strict";var s=i("Ss5c").LineDataSource,r=i("5rJj"),n=i("j3hX"),o=n.LineToolWidthsProperty,a=n.LineToolColorsProperty;class l extends s{constructor(e,t){super(e,t||l.createProperties()),i.e("lt-pane-views").then(i.t.bind(null,"l5Au",7)).then(({PitchfanLinePaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}levelsCount(){return l.LevelsCount}pointsCount(){return 3}name(){return"Pitchfan"}processErase(e,t){var i="level"+t,s=this.properties()[i].visible;e.setProperty(s,!1,"Erase level line")}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"D+Nk"))).PitchBaseDefinitionsViewModel}static createProperties(e){var t=new r("linetoolpitchfan",e,!1,{range:[0,8]});return l._configureProperties(t),t}static _configureProperties(e){s._configureProperties(e);for(var t=[e.child("median").child("linewidth")],i=[e.child("median").child("color")],r=0;r<=l.LevelsCount;r++)t.push(e.child("level"+r).child("linewidth")),i.push(e.child("level"+r).child("color"));e.addChild("linesColors",new a(i)),e.addChild("linesWidths",new o(t))}}l.LevelsCount=8,t.LineToolPitchfan=l},NsVT:function(e,t,i){"use strict";i.r(t);var s=i("hY0g"),r=i.n(s),n=i("HySD");function o(e,t){let i=0;for(const{min:s,max:r}of t){ -if(e0&&t.push({min:e,max:s})}return t.sort((e,t)=>e.min-t.min||e.max-t.max),t}function l(e,t){if(e.length!==t.length)return!1;for(let i=e.length;i--;){if(e[i].min!==t[i].min)return!1;if(e[i].max!==t[i].max)return!1}return!0}var c=i("+GxX"),h=i("Kxc7");i.d(t,"ChartPage",(function(){return d}));const u=h.enabled("no_min_chart_width");class d{constructor(e){this._processVisibility=e=>{const t=e.container.value();return this._affectsLayout(e.name)?(t&&t.classList.toggle("js-hidden",!1),!0):(t&&t.classList.toggle("js-hidden",!0),!1)},this._setWidth=(e,t)=>{let i=t;this._fullscreenArea!==e.name&&(e.availWidth.setValue(t),e.canNegotiate.width&&(i=o(t,e.negotiations.width)));const s=e.container.value();return s&&(s.style.width=i+"px"),e.width.setValue(i),i},this._setHeight=(e,t)=>{let i=t;this._fullscreenArea!==e.name&&(e.availHeight.setValue(t),e.canNegotiate.height&&(i=o(t,e.negotiations.height)));const s=e.container.value();return s&&(s.style.height=i+"px"),e.height.setValue(i),i};const t=e.container.value();if(!t)throw new Error("bridge.container.value() must be an element");this._container=t,this._availableAreas=["left","tradingpanel","right","top","bottom","center","topleft","extratop"],this._areas={},this._bridge=e,this._width=e.width,this._height=e.height,this._width.subscribe(()=>this.recalculate()),this._height.subscribe(()=>this.recalculate()),this._bridge.visible.subscribe(()=>this._updateVisibility()),this._bridge.fullscreen.subscribe(()=>this._onParentFullscreenChange()),this.recalculate()}allocate(e){const t=e&&e.areaName;if(-1===this._availableAreas.indexOf(t))throw new Error("unknown options.areaName");this.free(t);const i=this._createDOM(t),s={name:t,canNegotiate:{width:"left"===t||"right"===t||"tradingpanel"===t||"topleft"===t,height:"top"===t||"bottom"===t||"topleft"===t||"extratop"===t},negotiations:{width:[],height:[]},remove:()=>{for(const e in this._areas)this._areas[e]===s&&this.free(e)},negotiateWidth:e=>{if(!s.canNegotiate.width)return;const t=a(e);l(s.negotiations.width,t)||(s.negotiations.width=t,this.recalculate())},negotiateHeight:e=>{if(!s.canNegotiate.height)return;const t=a(e);l(s.negotiations.height,t)||(s.negotiations.height=t,this.recalculate())},requestFullscreen:()=>{this._fullscreenArea||("right"!==t&&"center"!==t||(this._fullscreenArea=t),"center"===t&&this._bridge.requestFullscreen(),this._updateFullscreen())},exitFullscreen:()=>{t===this._fullscreenArea&&(this._fullscreenArea=void 0,"center"===t&&this._bridge.exitFullscreen(),this._updateFullscreen())},width:new r.a,height:new r.a,availWidth:new r.a,availHeight:new r.a,alive:new r.a(!0),container:new r.a(i),visible:new r.a(!0),fullscreen:new r.a(!0),rdState:new n.ResizerDetacherState};return s.rdState.pushOwner(s),this._areas[t]=s,s.rdState.owner.subscribe(e=>{ -const i=s.container.value();if(e!==s)i&&(i.innerHTML="",i.parentElement&&i.parentElement.removeChild(i));else{let e=null;for(let i=this._availableAreas.indexOf(t);i--;){const t=this._availableAreas[i];if(this._affectsLayout(t)){e=this._areas[t].container.value();break}}i&&(e&&i.parentElement?i.insertAdjacentElement("afterend",e):this._container.appendChild(i))}this.recalculate()},{callWithLast:!0}),s.rdState.bridge()}free(e){const t=this._areas[e];if(!t)return;this._areas[e]=void 0;const i=t.container.value();i&&i.parentElement&&i.parentElement.removeChild(i),t.alive.setValue(!1)}recalculate(){const e={};this._recalcSingleRunToken=e;const t=this._areas.topleft,i=this._areas.left,s=this._areas.tradingpanel,r=this._areas.right,n=this._areas.top,o=this._areas.bottom,a=this._areas.center,l=this._areas.extratop,c=this._width.value(),h=this._height.value();let d=0,p=0,_=0,m=0,f=0,g=0,v=0,b=0;if(e===this._recalcSingleRunToken&&l&&this._processVisibility(l)&&(b=this._setHeight(l,h),this._setWidth(l,c)),e===this._recalcSingleRunToken&&t&&this._processVisibility(t)){v=this._setHeight(t,h),g=this._setWidth(t,c),g&&(g+=4);const e=t.container.value();e&&(e.style.top=b+"px")}if(e===this._recalcSingleRunToken&&i&&this._processVisibility(i)){const e=i.container.value();e&&(e.style.top=v+b+"px"),this._setHeight(i,h-v-b),_=this._setWidth(i,c),_&&(_+=4)}if(e===this._recalcSingleRunToken&&s&&this._processVisibility(s)){this._setHeight(s,h);let e=c-_;u||(e-=300),f=this._setWidth(s,e)}if(e===this._recalcSingleRunToken&&r&&this._processVisibility(r)){this._setHeight(r,h-b);let e=c-_-f;u||(e-=300),m=this._setWidth(r,e);const t=r.container.value();t&&(t.style.top=b+"px")}const S=f+m,y=S?4:0;if(e===this._recalcSingleRunToken&&n&&this._processVisibility(n)){const e=Math.max(g,_),t=n.container.value();t&&(t.style.left=e+"px",t.style.top=b+"px");const i=c-e-f-m-y;this._setWidth(n,i),d=this._setHeight(n,h)}let w=0;const C=c-_-f-m-y;if(e===this._recalcSingleRunToken&&o&&this._processVisibility(o)){const e=o.container.value();e&&(e.style.left=_+"px",e.classList.toggle("no-border-top-left-radius",!_),e.classList.toggle("no-border-top-right-radius",!S)),this._setWidth(o,C);const t=h-d-b;w=Math.min(300,t-0),p=this._setHeight(o,t)+4}if(e===this._recalcSingleRunToken&&a&&this._processVisibility(a)){const e=a.container.value();e&&(e.style.left=_+"px",e.style.top=d+b+"px",e.classList.toggle("no-border-bottom-left-radius",!p||!_),e.classList.toggle("no-border-bottom-right-radius",!S||!p)),this._setWidth(a,C);const t=h-d-p-b;this._setHeight(a,Math.max(t,w))}if(e===this._recalcSingleRunToken&&s&&this._affectsLayout("tradingpanel")){const e=s.container.value();e&&(e.style.right=m+"px",e.style.top=b+"px")}e===this._recalcSingleRunToken&&this._updateVisibility()}_affectsLayout(e){const t=this._areas[e];if(!t)return!1;if(t.rdState.owner.value()!==t)return!1;if(this._fullscreenArea&&this._fullscreenArea!==e)return p(e);if(this._width.value()<=567||this._height.value()<=445){const t=["center","top","left","topleft","extratop"] -;if(Object(c.isFeatureEnabled)("mobile_show_bottom_panel")&&t.push("bottom"),!t.includes(e))return!1}return!0}_updateVisibility(){const e=this._bridge.visible.value();for(let t=0;te.year||this.year===e.year&&this.month>e.month||this.year===e.year&&this.month===e.month&&this.day>e.day?1:this.year===e.year&&this.month===e.month&&this.day===e.day?0:-1}before(e){return-1===this.compareTo(e)}toCalendar(e){return s.get_cal(s.get_timezone("Etc/UTC"),this.year,this.month-1,this.day)}addDays(e){const t=this.toCalendar(s.get_timezone("Etc/UTC"));return s.add_date(t,e),r.fromCalendar(t)}static fromCalendar(e){return new r(s.get_year(e),s.get_month(e)+1,s.get_day_of_month(e))}}},OH2X:function(e,t,i){"use strict";t.LineToolFibRetracement=i("t2ex").LineToolFibRetracement,t.LineToolFibChannel=i("xnA2").LineToolFibChannel,t.LineToolFibSpeedResistanceArcs=i("Yjuu").LineToolFibSpeedResistanceArcs,t.LineToolProjection=i("68at").LineToolProjection,t.LineToolTrendBasedFibExtension=i("ZtA1").LineToolTrendBasedFibExtension,t.LineToolElliott=i("xz+e").LineToolElliott,t.LineToolFibCircles=i("4bfY").LineToolFibCircles,t.LineToolVertLine=i("n40Z").LineToolVertLine,t.LineToolCrossLine=i("MA5A").LineToolCrossLine,t.LineToolBarsPattern=i("2bPF").LineToolBarsPattern,t.LineToolTrendBasedFibTime=i("yUly").LineToolTrendBasedFibTime,t.LineToolFibTimeZone=i("FsE7").LineToolFibTimeZone,t.LineToolCircleLines=i("tG6Q").LineToolCircleLines,t.LineToolDateRange=i("WkYF").LineToolDateRange,t.LineToolPriceRange=i("RDDl").LineToolPriceRange,t.LineToolDateAndPriceRange=i("UCMi").LineToolDateAndPriceRange,t.LineToolParallelChannel=i("qcGP").LineToolParallelChannel,t.LineToolTrendAngle=i("nW7S").LineToolTrendAngle,t.LineToolTrendLine=i("WPQD").LineToolTrendLine,t.LineToolInfoLine=i("yi8X").LineToolInfoLine,t.LineToolArrowMark=i("TohL").LineToolArrowMark,t.LineToolImage=i("8Blv").LineToolImage,t.LineToolExecution=i("704P").LineToolExecution,t.LineToolPitchfan=i("NhkU").LineToolPitchfan,t.LineToolGannSquare=i("Z0Sh").LineToolGannSquare,t.LineToolFibSpeedResistanceFan=i("zZ5f").LineToolFibSpeedResistanceFan,t.LineToolGannComplex=i("nd9+").LineToolGannComplex,t.LineToolGannFixed=i("TBaH").LineToolGannFixed,t.LineToolGannFan=i("4u8j").LineToolGannFan,t.LineToolFibWedge=i("9QkW").LineToolFibWedge,t.LineToolPitchfork=i("aDyP").LineToolPitchfork,t.LineToolDisjointAngle=i("oIoN").LineToolDisjointChannel,t.LineToolFlatBottom=i("InMJ").LineToolFlatBottom,t.LineToolIcon=i("icPo").LineToolIcon,t.LineToolRotatedRectangle=i("Az04").LineToolRotatedRectangle,t.LineToolFibSpiral=i("i80N").LineToolFibSpiral,t.LineToolHeadAndShoulders=i("aILO").LineToolHeadAndShoulders,t.LineToolTriangle=i("isVH").LineToolTriangle,t.LineToolTrianglePattern=i("lNN+").LineToolTrianglePattern,t.LineTool5PointsPattern=i("NJRZ").LineTool5PointsPattern,t.LineToolThreeDrivers=i("PYn8").LineToolThreeDrivers,t.LineToolABCD=i("pKDv").LineToolABCD,t.LineToolPolyline=i("hP9j").LineToolPolyline,t.LineToolPath=i("YdVo").LineToolPath, -t.LineToolPrediction=i("Wh6B").LineToolPrediction,t.LineToolPriceLabel=i("zqZp").LineToolPriceLabel,t.LineToolArrowMarker=i("wiuq").LineToolArrowMarker,t.LineToolNote=i("gLxC").LineToolNote,t.LineToolNoteAbsolute=i("gLxC").LineToolNoteAbsolute,t.LineToolSignpost=i("gASG").LineToolSignpost,t.LineToolBrush=i("+hLl").LineToolBrush,t.LineToolArc=i("0Pxc").LineToolArc,t.LineToolCallout=i("odCa").LineToolCallout,t.LineToolBalloon=i("me8f").LineToolBalloon,t.LineToolText=i("V3Oj").LineToolText,t.LineToolHorzLine=i("/DxK").LineToolHorzLine,t.LineToolHorzRay=i("CJIV").LineToolHorzRay,t.LineToolRectangle=i("7qI1").LineToolRectangle,t.LineToolEllipse=i("V086").LineToolEllipse,t.LineToolTimeCycles=i("kIXa").LineToolTimeCycles,t.LineToolSineLine=i("bv/X").LineToolSineLine,t.LineToolGhostFeed=i("XUCF").LineToolGhostFeed,t.LineToolBezierQuadro=i("Xyly").LineToolBezierQuadro,t.LineToolBezierCubic=i("N+BX").LineToolBezierCubic,t.LineToolArrow=i("QQu0").LineToolArrow,t.LineToolRay=i("5ZUI").LineToolRay,t.LineToolExtended=i("CHw2").LineToolExtended,t.LineToolSchiffPitchfork=i("v5F8").LineToolSchiffPitchfork,t.LineToolSchiffPitchfork2=i("XFad").LineToolSchiffPitchfork2,t.LineToolInsidePitchfork=i("EqoR").LineToolInsidePitchfork,t.LineToolTextAbsolute=i("V3Oj").LineToolTextAbsolute,t.LineToolArrowMarkLeft=i("TohL").LineToolArrowMarkLeft,t.LineToolArrowMarkRight=i("TohL").LineToolArrowMarkRight,t.LineToolArrowMarkUp=i("TohL").LineToolArrowMarkUp,t.LineToolArrowMarkDown=i("TohL").LineToolArrowMarkDown,t.LineToolFlagMark=i("aIha").LineToolFlagMark,t.LineToolCypherPattern=i("bTqm").LineToolCypherPattern,t.LineToolElliottImpulse=i("xz+e").LineToolElliottImpulse,t.LineToolElliottTriangle=i("xz+e").LineToolElliottTriangle,t.LineToolElliottTripleCombo=i("xz+e").LineToolElliottTripleCombo,t.LineToolElliottCorrection=i("xz+e").LineToolElliottCorrection,t.LineToolElliottDoubleCombo=i("xz+e").LineToolElliottDoubleCombo,t.LineToolRiskRewardLong=i("tDUI").LineToolRiskRewardLong,t.LineToolRiskRewardShort=i("tDUI").LineToolRiskRewardShort,t.LineToolPosition=i("ziJ5").LineToolPosition,t.LineToolOrder=i("B4/o").LineToolOrder,t.LineToolHighlighter=i("SMvR").LineToolHighlighter,t.LineToolPriceNote=i("Zl0W").LineToolPriceNote},"OK+B":function(e,t,i){"use strict" +const r=s.get_cal(s.get_timezone("Etc/UTC"),i,s.JANUARY,1),o=d(this._session.spec,r),a=0===o?7*t:7*(t+1)-o;return a>s.get_days_per_year(r)?this.startOfPeriod(e,0,i+1):(s.add_date(r,a),r)}}class v{indexOfPeriod(e){return s.get_month(e)}startOfPeriod(e,t,i){if(t<0){const e=Object(n.toInt)((11-t)/12);i-=e,t+=12*e}else t>s.DECEMBER&&(i++,t=s.JANUARY);return s.get_cal(s.get_timezone("Etc/UTC"),i,t,1)}}function b(e,t,i,s=!1){const n=r.Interval.parse(e),o=n.multiplier();return n.isMinutes()?new l(60*o,t):n.isSeconds()?new l(o,t):n.isTicks()?new l(1,t):n.isRange()?new l(60*o,t):new u(t,i,o,function(e,t){switch(e){case r.ResolutionKind.Days:return new f(t);case r.ResolutionKind.Weeks:return new g(t);case r.ResolutionKind.Months:return new v}throw new Error("Unknown dwm resolution: "+e)}(n.kind(),t),s)}function S(e,t,i,s,r,n,o){return w(e,t,i,s,r,n,o,0)}function y(e,t,i,s,r,n,o){return w(e,t,i,s,r,n,o,1)}function w(e,t,i,s,n,a,l,c){const h=r.Interval.parse(n+s);if(h.isMonths()){const e=new Date(l);return 0===c&&e.setUTCDate(1),function(e,t){T(e,Math.floor(t/12));let i=e.getUTCMonth()-t%12;i<0&&(T(e,1),i+=12);e.setUTCMonth(i);for(;e.getUTCMonth()!==i;)M(e,1)}(e,a*h.multiplier()),e.getTime()}const u=new o.b("Etc/UTC",e,t,i),d=h.inMilliseconds(),p=h.isDWM();let _;_=p?864e5:60*u.spec.findSession(0,0,0).getEntry().length()*1e3;let m=0;m=h.isWeeks()?7:7-u.spec.weekEndsCount();const f=_/d,g=m*f;let v;if(a=f&&(g=_/6048e5*f),Math.ceil(g)}function P(e,t){const i=s.clone(t);return e.alignToSessionStart(i),s.cal_to_utc(s.get_timezone(e.timezone()),i)}function x(e,t){const i=s.utc_to_cal(t.timezone,+e);let r=s.get_day_of_week(i),n=s.get_minutes_from_midnight(i);const o=t.spec.findSession(t.spec.getWeekIndex(i),r,n).getEntry();return o.isOvernight()&&n>o.startOffset()+o.length()&&r===o.dayOfWeek()-1&&(r++,n-=1440),r===o.dayOfWeek()&&n>=o.startOffset()&&nh||h<=0||c>=o?null:[new r.Point(c,e.y),new r.Point(h,t.y)]}_hitTestBackground(e,t,i,s){const o=this._extendAndClipLineSegment(t,i,s);return null!==o&&Object(n.pointInBox)(e,Object(r.box)(o[0],o[1]))?this._backHitTestResult:null}}},InMJ:function(e,t,i){"use strict";var s=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty;class n extends s{constructor(e,t){super(e,t||n.createProperties()),this.version=n.version,i.e("lt-pane-views").then(i.t.bind(null,"gr7S",7)).then(({FlatBottomPaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}pointsCount(){return 3}name(){return"Flat Bottom"}hasEditableCoordinates(){ +return!1}addPoint(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),s.prototype.addPoint.call(this,e)}setLastPoint(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),s.prototype.setLastPoint.call(this,e)}setPoint(e,t,i){if(i&&i.shift()&&1===e){this._snapPoint45Degree(t,this.points()[0])}if(2===e)this._points[1].index=t.index;else if(3===e)return this._points[0].index=t.index,this._points[2].price=t.price,void this.normalizePoints();super.setPoint(e,t)}getPoint(e){return e<3?s.prototype.getPoint.call(this,e):3===e?{index:this._points[0].index,price:this._points[2].price}:void 0}canHasAlert(){return!0}_getAlertPlots(){var e=this._points[0],t=this._points[1],i=[];e.index<=t.index?(i.push(e),i.push(t)):(i.push(t),i.push(e));var s=this._points[2];s.time=t.time,s.index=t.index;var r,n,o,a,l={price:s.price,time:e.time,index:e.index},c=[];s.index<=l.index?(c.push(s),c.push(l)):(c.push(l),c.push(s)),i[0].price>c[0].price?(r=i,n=c):c[0].price>i[0].price||c[1].price>i[1].price?(r=c,n=i):(r=i,n=c);var h=this.properties().extendLeft.value(),u=this.properties().extendRight.value();return e.index<=t.index?(o=h,a=u):(o=u,a=h),[this._linePointsToAlertPlot(r,"Upper",o,a),this._linePointsToAlertPlot(n,"Lower",h,a)]}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"vm8R"))).GeneralTrendFiguresDefinitionsViewModel}static createProperties(e){var t=new r("linetoolflatbottom",e);return n._configureProperties(t),t}static _configureProperties(e){s._configureProperties(e)}}n.version=1,t.LineToolFlatBottom=n},J2xC:function(e,t,i){e.exports={"css-value-header-toolbar-height":"38px"}},JT5O:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyMarket",(function(){return n}));var s=i("hY0g"),r=i.n(s);class n{constructor(e,t){this._visibility=new r.a(!1),this._dialogPromise=null,this._dialog=null,this._chartWidgetCollection=e,this._options=t}visible(){return this._visibility.readonly()}show(e){var t;null===this._dialog&&this._requestDialog(e),null===(t=this._dialog)||void 0===t||t.open(e,void 0)}hide(){var e;null===(e=this._dialog)||void 0===e||e.hide()}resetAllPages(){var e;null===(e=this._dialog)||void 0===e||e.resetAllStudies()}_requestDialog(e){if(null===this._dialogPromise){let t;t=Promise.all([i.e("react"),i.e(1),i.e(2),i.e(3),i.e(6),i.e(8),i.e(9),i.e(15),i.e(35),i.e(41),i.e(70),i.e(82),i.e(0),i.e(5),i.e(37),i.e("study-market")]).then(i.bind(null,"zbLM")).then(e=>new e.IndicatorsLibraryContainer(this._chartWidgetCollection,this._options)),this._dialogPromise=t.then(t=>{this._dialog=t,this._dialog.visible().subscribe(e=>{this._visibility.setValue(e)}),this._dialog.open(e)})}return this._dialogPromise}}},JWMC:function(e,t,i){"use strict";i.r(t),i.d(t,"trackEvent",(function(){return l}));i("bSeV");var s=i("FQhm"),r=i("Kxc7"),n=i("txPx") +;const o=Object(n.getLogger)("Common.TrackEvent"),a=[/Study_(Drawing)_(.*)/,/(Study)_(.*)@tv-basicstudies/,/(Study)_(.*)/,/(Chart Style) (.*)/],l=(e,t,i)=>{if(r.enabled("charting_library_base"))return void((e,t,i)=>{t=t||e||i||"";let r="";for(let s=0;se.isInitialized())}function r(e,t){const i=e.getAll(),s=()=>{t(),i.forEach(e=>{e.chartWidgetInitialized.unsubscribe(null,s)})};i.forEach(e=>{e.chartWidgetInitialized.subscribe(null,s,!0)})}i.r(t),i.d(t,"isAnyChartWidgetInitialized",(function(){return s})),i.d(t,"waitAnyChartWidgetInitialized",(function(){return r}))},JjUe:function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayDataWindowView",(function(){return h}));var s=i("ivNn"),r=i("4miz"),n=i("qFKp"),o=i("e92V"),a=i("mMWL"),l=i("e1Hy");const c=n.CheckMobile.any();class h extends r.b{constructor(e,t){super(),this._invalidated=!0,this._study=e,this._model=t,this._valueProvider=this._createValuesProvider(e,t),this._items=this._valueProvider.getItems().map(e=>new r.a(e.title,"")),this.update()}items(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items}update(){this._invalidated=!0}_updateImpl(){this._header=this._study.title();let e;this._showLastPriceAndChangeOnly()?e=this._study.data().lastIndex():(e=this._model.crossHairSource().appliedIndex(),Object(s.isNumber)(e)||(e=this._study.data().lastIndex()));const t=this._valueProvider.getValues(e);for(let i=0;i=22)return t;for(var i={},s=0,r=0;;){var n=t[r];if(void 0===n)break;var o=t[n.id];n.isFake&&(n.id="in_"+s++),i[r]=n,i[n.id]=o,r++}return i}]}h.prototype.updateMetaInfo=function(e){if(!e)return e;s(!e.isTVScript,"This method should update only built-in java indicators metaInfo. For Pine indicators use updateMetaInfoAsync");for(var t=null,i=this._studiesMetainfo,r=0;r=12&&l<=26){var c={};for(o=0;o=12&&c<=26){var u=r.columns;r.columns=[];for(var d=0;dt&&n.logWarn("Bad integer input max value in metaInfo id="+e.id+" title="+e.description))}},h._fixInputsMaxValue=function(e,t){if(!TradingView.isAbsent(t)){var i=h.INPUT_MAX_VALUE;if(t.inputs)for(var s=0;si&&(a.max=i))}if(e&&e.inputs){var r=h.splitInputs(e.inputs),n=r.arr;for(var o in n){var a;"integer"===(a=n[o]).type&&(a.max&&a.max>i&&(a.max=i))}e.inputs=TradingView.merge(r.obj,r.arr)}}},h.prototype.patchPropsStateAndMetaInfo=function(e,t,i){"Script$BOOKER"!==t.productId||t.alerts||delete e.alerts,h._fixInputsOrder(e,t),h._fixInputsMaxValue(e,t);var s=h.splitInputs(e.inputs);e.inputs=s.obj;var r=a.versionOf(t);ri&&(i=r))}e[i+1]=t},h.splitInputs=function(e){var t={},i={};for(var s in e)isNumber(parseInt(s,10))?t[s]=e[s]:i[s]=e[s];return{arr:t,obj:i}},h.findInputKeyById=function(e,t){var i=null;for(var s in e)if(isNumber(parseInt(s,10))&&e[s].id===t){i=s;break}return i},h.getInputKeyById=function(e,t){var i=h.findInputKeyById(e,t);if(!i)throw new Error("Cannot find input with id: "+t);return i},e.exports=h},K5cv:function(e,t,i){"use strict";let s;function r(){return s}function n(e){s=e}i.r(t),i.d(t,"getSearchRequestDelay",(function(){return r})),i.d(t,"setSearchRequestDelay",(function(){return n}))},K8V9:function(e,t){e.exports=''},K9GE:function(e,t,i){"use strict";i.d(t,"c",(function(){return s})),i.d(t,"d",(function(){return r})),i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return o}));const s=350,r={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e*e:(4-2*e)*e-1,easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1- --e*e*e*e,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-8*--e*e*e*e,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1+--e*e*e*e*e,easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e};class n{constructor(e,t,i,s){this._mX1=e,this._mY1=t,this._mX2=i,this._mY2=s}easingFunc(e){return this._mX1===this._mY1&&this._mX2===this._mY2?e:this._calcBezier(this._getTForX(e))}_a(e,t){return 1-3*t+3*e}_b(e,t){return 3*t-6*e}_c(e){return 3*e}_calcBezier(e){return((this._a(this._mY1,this._mY2)*e+this._b(this._mY1,this._mY2))*e+this._c(this._mY1))*e}_getSlope(e){return 3*this._a(this._mX1,this._mX2)*e*e+2*this._b(this._mX1,this._mX2)*e+this._c(this._mX1)}_getTForX(e){let t=e;for(let i=0;i<4;++i){const i=this._getSlope(t);if(0===i)return t;t-=(this._calcBezier(t)-e)/i}return t}} +const o={black0:"#000",black20:"#2b2d36",black25:"#2b2e37",black27:"#2f3241",black30:"#212121",black70:"#4A4A4A",black80:"#535353",black100:"#646464",black110:"#757575",black140:"#8A8A8A",black170:"#ADAEB0",black180:"#b4b4b4",black200:"#C8C8C8",black220:"#DADDE0",black230:"#ECECEC",black240:"#F2F2F2",black248:"#F8F8F8",black255:"#FFF",brand:"#3BB3E4",brandHover:"#3BABD8",brandActive:"#3898C2",brandDown:"#049DDC",brand220:"#3BB3E0",brand255:"#3BB3FF",brandNew:"#37A6EF",brandNew2:"#2196F3",spinner:"#00A2E2",brandMedium80:"#3C4650",brandMedium90:"#465a6e",brandMedium100:"#627384",brandMedium120:"#758696",brandMedium150:"#94959C",brandMedium190:"#9DB2BD",brandMedium220:"#E9EFF2",brandMedium230:"#EAECEF",brandMedium240:"#F1F3F6",brandDark:"#2A2C39",brandDark50:"#252733",brandDark45:"#20222D",brandDarkText:"#6A6B74",danger:"#FF4A68",dangerHover:"#F24965",dangerDown:"#FF173E",success:"#3CBC98",success55:"#37BC9B",success250:"#00FFC0",successHover:"#38B395",successDown:"#00A97F",attention:"#FFC84A",attention50:"#F89E30",growing:"#37bc9b",falling:"#ff4a68"}},"KG+6":function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return a}));var s,r,n=i("Eyy1"),o=i("tqok");i("hsV8");function a(e,t){if(e.firstBarTime>=t.length||e.lastBarTime>=t.length)return null;const i=t[e.firstBarTime],s=t[e.lastBarTime];return i===o.a||s===o.a?null:(Object(n.assert)(i<=s,"firstBarTime should not exceed lastBarTime"),Object(n.assert)(e.priceLow<=e.priceHigh,"priceLow should not exceed priceHigh"),{firstBarTime:i,lastBarTime:s,rate:e.rate,priceHigh:e.priceHigh,priceLow:e.priceLow})}!function(e){e.LeftToRight="left_to_right",e.RightToLeft="right_to_left"}(s||(s={})),function(e){e.Relative="relative",e.Absolute="absolute"}(r||(r={}))},KUek:function(e,t,i){"use strict";i.r(t);var s=i("Eyy1"),r=i("aIyQ"),n=i.n(r),o=i("k9/m"),a=i("hsV8"),l=i("jy4L"),c=i("w4Ji"),h=i("jenN"),u=i("txPx");const d=Object(u.getLogger)("Chart.StudyDataSource");var p,_;!function(e){e[e.Undefined=0]="Undefined",e[e.Loading=1]="Loading",e[e.Completed=2]="Completed",e[e.Error=3]="Error"}(p||(p={})),function(e){e[e.Idle=0]="Idle",e[e.AwaitingConnection=1]="AwaitingConnection",e[e.AwaitingParent=2]="AwaitingParent",e[e.AwaitingFirstDataUpdate=3]="AwaitingFirstDataUpdate",e[e.Active=4]="Active"}(_||(_={}));class m{constructor(e,t,i,s){this._inputs=null,this._status=_.Idle,this._studyId=null,this._turnaroundCounter=1,this._studyStatus={type:p.Undefined},this._studyStatusChanged=new n.a,this._graphics=new h.LiveStudyGraphics,this._dataCleared=new n.a,this._dataUpdated=new n.a,this._boundOnGatewayIsConnectedChanged=this._onGatewayIsConnectedChanged.bind(this),this._ongoingDataUpdate=Promise.resolve(),this._gateway=e,this._metaInfo=s,this._seriesSource=t,this._turnaroundPrefix=i,this._plots=new o.PlotList(Object(c.studyPlotFunctionMap)(s),c.studyEmptyPlotValuePredicate),this._gateway.isConnected().subscribe(this._boundOnGatewayIsConnectedChanged)}destroy(){this.stop(), +this._gateway.isConnected().unsubscribe(this._boundOnGatewayIsConnectedChanged),this._dataUpdated.destroy(),this._dataCleared.destroy(),this._studyStatusChanged.destroy()}metaInfo(){return this._metaInfo}inputs(){return this._inputs}setInputs(e){this._inputs=e,null!==this._studyId&&(this._turnaroundCounter++,this._onStudyStatusChangedTo({type:p.Undefined}),this._gateway.modifyStudy(this._studyId,this._turnaround(),e,this._onMessage.bind(this)),this._status===_.Active&&this._changeStatusTo(_.AwaitingFirstDataUpdate))}isStarted(){return this._status!==_.Idle}isActive(){return this._status===_.Active}start(){this.isStarted()?d.logNormal("start: data source is already started, nothing to do"):(Object(s.assert)(null!==this._inputs,"Inputs should be defined when starting a study data source"),this._gateway.isConnected().value()?this._createStudy():this._changeStatusTo(_.AwaitingConnection))}stop(){this.isStarted()?(null!==this._studyId&&(this._gateway.removeStudy(this._studyId),this._studyId=null,this._onStudyStatusChangedTo({type:p.Undefined})),this._changeStatusTo(_.Idle)):d.logNormal("stop: data source is already stopped, nothing to do")}studyId(){return this._studyId}studyStatus(){return this._studyStatus}studyStatusChanged(){return this._studyStatusChanged}plots(){return this._plots}graphics(){return this._graphics}clearData(){this._plots.clear(),this._graphics.clear(),this._dataCleared.fire()}stopAndStealData(){Object(s.assert)(this._status===_.Active,"Couldn't steal data from non-active data source"),this.stop();const e=this._plots,t=this._graphics.extract();return this._plots=new o.PlotList(Object(c.studyPlotFunctionMap)(this._metaInfo),c.studyEmptyPlotValuePredicate),{plots:e,graphics:t}}dataCleared(){return this._dataCleared}dataUpdated(){return this._dataUpdated}_changeStatusTo(e){Object(s.assert)(this._status!==e,"Source and destination status should be distinct"),d.logNormal(`Status changed from ${_[this._status]} to ${_[e]}`),this._status=e}_createStudy(){const e=this._seriesSource.instanceId();null!==e?this._createStudyUsingParentId(e):(this._changeStatusTo(_.AwaitingParent),this._seriesSource.dataEvents().completed().subscribe(this,this._onSeriesCompleted,!0))}_createStudyUsingParentId(e){Object(s.assert)(this._status!==_.Active,'Status should not be "Active" when creating a study'),Object(s.assert)(this._studyStatus.type===p.Undefined,'Study status should be "Undefined" when creating a study'),Object(s.assert)(null===this._studyId,"Study id should be empty when creating a study"),this._studyId=Object(l.makeNextStudyId)(),this._gateway.createStudy(this._studyId,this._turnaround(),e,this._metaInfo.fullId+"!",Object(s.ensureNotNull)(this._inputs),this._onMessage.bind(this)),this._changeStatusTo(_.AwaitingFirstDataUpdate)}_onGatewayIsConnectedChanged(e){e?this._onGatewayConnected():this._onGatewayDisconnected()}_onGatewayConnected(){this._status===_.AwaitingConnection&&this._createStudy()}_onGatewayDisconnected(){this._status!==_.Idle&&this._status!==_.AwaitingConnection&&(this._studyId=null, +this._changeStatusTo(_.AwaitingConnection),this._studyStatus.type!==p.Undefined&&this._onStudyStatusChangedTo({type:p.Undefined})),this._turnaroundCounter=1}_onSeriesCompleted(){this._status===_.AwaitingParent&&this._createStudyUsingParentId(Object(s.ensure)(this._seriesSource.instanceId()))}_onStudyStatusChangedTo(e){const t=this._studyStatus;this._studyStatus=e,d.logNormal(`Study status type changed from ${p[t.type]} to ${p[e.type]}`),this._studyStatusChanged.fire(t,e)}_onMessage(e){if("data_update"===e.method){const{customId:t,turnaround:i,plots:r,nonseries:n}=e.params;t===this._studyId&&this._checkTurnaround(i)&&this._onDataUpdate(r,Object(s.ensureDefined)(n))}else if("study_loading"===e.method){const[t,i,s]=e.params;t===this._studyId&&this._checkTurnaround(i)&&this._onStudyLoading(s)}else if("study_completed"===e.method){const[t,i,s]=e.params;t===this._studyId&&this._checkTurnaround(i)&&this._onStudyCompleted(s)}else if("study_error"===e.method){const[t,i,s,r,n]=e.params;t===this._studyId&&this._checkTurnaround(i)&&this._onStudyError(s,r,n)}else"clear_data"===e.method&&this._checkTurnaround(e.params.turnaround)&&this.clearData()}_onDataUpdate(e,t){const i=Object(a.unpackNonSeriesData)(t.d);return this._ongoingDataUpdate=this._ongoingDataUpdate.then(()=>i,()=>i).then(this._onDataUnpacked.bind(this,e,t.indexes)),this._ongoingDataUpdate}_onDataUnpacked(e,t,i){this._status!==_.Idle&&(this._status===_.AwaitingFirstDataUpdate&&(this._changeStatusTo(_.Active),this.clearData()),this._mergePlots(e),null!==i&&(i.indexes_replace?(Object(s.assert)("nochange"!==t),this._graphics.replaceIndexesTo(t)):("nochange"!==t&&this._graphics.replaceIndexesTo(t),void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),this._dataUpdated.fire(e,i,t))}_onStudyLoading(e){this._onStudyStatusChangedTo({type:p.Loading,startTime:Date.now()})}_onStudyError(e,t,i){this.clearData(),this._onStudyStatusChangedTo({type:p.Error,reason:e})}_onStudyCompleted(e){this._onStudyStatusChangedTo({type:p.Completed})}_mergePlots(e){this._plots.merge(e)}_turnaround(){return`${this._turnaroundPrefix}${this._turnaroundCounter}`}_checkTurnaround(e){const t=this._turnaround();return e===t||e===this._seriesSource.turnaround()||e===`${this._seriesSource.turnaround()}_${t}`}}var f=i("kcTO"),g=i("Ocx9"),v=i("oV8k"),b=i("Kxc7");i.d(t,"sessionsPreferencesDefault",(function(){return y})),i.d(t,"Sessions",(function(){return w}));const S=new f.PriceFormatter,y={graphics:{backgrounds:{outOfSession:{color:"#2196F3",transparency:92,visible:!1},preMarket:{color:"#FF9800",transparency:92,visible:!1},postMarket:{color:"#2196F3",transparency:92,visible:!1}},vertlines:{sessBreaks:{color:"#4985e7",style:2,visible:!1,width:1}}}};class w extends v.a{constructor(e,t,i){super(e,t),this._studySource=null,this._paneViews=[],this._metaInfo=null,this._destroyed=!1,this._isStarted=!1,this._loadedGraphics=null,this._doubleClickHandler=i;const s=t.mainSeries();this._properties=new g.DefaultProperty("sessions"),this._removeDuplicateProperties(), +this._properties.subscribe(this,this._onPropertiesChanged),t.studyMetaInfoRepository().findById({type:"java",studyId:"Sessions@tv-basicstudies"}).then(e=>{this._destroyed||null===this._loadedGraphics&&(this._setMetaInfo(e),null!==this._metaInfo&&(this._studySource=new m(t.chartApi(),s.seriesSource(),"sessions_",this._metaInfo),this._createPaneViews(),this._studySource.dataCleared().subscribe(this,this.updateAllViews),this._studySource.dataUpdated().subscribe(this,this.updateAllViews),this._studySource.setInputs({}),this._processHibernate()))}),t.timeScale().onReset().subscribe(this,this._clearData),t.timeScale().logicalRangeChanged().subscribe(this,this.updateAllViews),t.mainSeries().properties().extendedHours.subscribe(this,this._updateVisibleOfPreAndPostMarketBackground),t.mainSeries().properties().interval.subscribe(this,this._processHibernate),this._updateVisibleOfPreAndPostMarketBackground(t.mainSeries().properties().extendedHours)}start(){this._isStarted=!0,this._processHibernate()}restart(){this._clearData(),b.enabled("stop_study_on_restart")&&this.stop(),this.start()}isStarted(){return this._isStarted}stop(){this._isStarted=!1,null!==this._studySource&&this._studySource.stop()}isHoveredEnabled(){return!1}paneViews(e){return this._paneViews}updateAllViews(){this._paneViews.forEach(e=>e.update())}updateViewsForPane(e){this.updateAllViews()}destroy(){this._destroyed=!0,null!==this._studySource&&(this._studySource.dataCleared().unsubscribe(this,this.updateAllViews),this._studySource.dataUpdated().unsubscribe(this,this.updateAllViews),this._studySource.destroy(),this._studySource=null),this._model.timeScale().logicalRangeChanged().unsubscribe(this,this.updateAllViews),this._model.timeScale().onReset().unsubscribe(this,this._clearData),this._model.mainSeries().properties().extendedHours.unsubscribe(this,this._updateVisibleOfPreAndPostMarketBackground),this._model.mainSeries().properties().interval.unsubscribe(this,this._processHibernate),this._properties.unsubscribe(this,this._onPropertiesChanged)}series(){return this._model.mainSeries()}priceScale(){return this.series().priceScale()}graphics(){return this._loadedGraphics||Object(s.ensureNotNull)(this._studySource).graphics()}properties(){return this._properties}graphicsInfo(){return Object(s.ensureNotNull)(this._metaInfo).graphics}firstValue(e){return this._model.mainSeries().firstValue()}formatter(){return S}state(e){const t={properties:this._properties.state()};return e&&null!==this._metaInfo&&(t.data={graphics:Object(h.saveStudyGraphics)(this.graphics()),metaInfo:this._metaInfo}),t}restoreState(e,t){const i=e.properties;this._migrateOutOfSessionProperty(i),this._properties.mergeAndFire(i),this._removeDuplicateProperties(),this._updateVisibleOfPreAndPostMarketBackground(this._model.mainSeries().properties().extendedHours),void 0!==e.data&&t&&(this._loadStudyGraphics(e.data.graphics),this._setMetaInfo(e.data.metaInfo),this._createPaneViews())}restoreOldState(e,t){const i={properties:{graphics:e.state.graphics}};void 0!==e.data&&void 0!==e.metaInfo&&t&&(i.data={ +metaInfo:e.metaInfo,graphics:e.data.graphics}),this.restoreState(i,t)}applyPreferences(e){this._properties.mergePreferences(e)}metaInfo(){return Object(s.ensureNotNull)(this._metaInfo)}_loadStudyGraphics(e){const t=e.backgrounds;if(void 0!==t){const e=t.findIndex(e=>"inSession"===e.styleId);-1!==e&&t.splice(e,1)}this._loadedGraphics=Object(h.loadStudyGraphics)(e)}_setMetaInfo(e){const t=e.graphics.backgrounds;void 0!==t&&void 0!==t.inSession&&delete t.inSession,this._metaInfo=e}_updateVisibleOfPreAndPostMarketBackground(e){const t=e.value();this._outOfSessionVisibilityProperty().setValue(t),this._preMarketVisibilityProperty().setValue(t),this._postMarketVisibilityProperty().setValue(t)}_clearData(){null!==this._studySource&&this._studySource.clearData()}_createPaneViews(){const e={doubleClickHandler:this._doubleClickHandler};Object(h.createGraphicsPaneViews)(this,this._model,e).then(e=>{this._paneViews=e,this._model.lightUpdate()})}_onPropertiesChanged(){this._processHibernate(),this.updateAllViews()}_processHibernate(){if(null!==this._studySource){const e=this._canBeHibernated(),t=this._isHibernated(),i=this._studySource.isStarted();!t&&e&&i?this._studySource.stop():!t||e||i||this._studySource.start()}}_canBeHibernated(){const e=this._model.mainSeries(),t=this._preMarketVisibilityProperty().value()&&this._postMarketVisibilityProperty().value()&&this._outOfSessionVisibilityProperty().value();return e.isDWM()||!t&&!this._vertLinesVisibleProperty().value()}_isHibernated(){return this._isStarted&&(null===this._studySource||!this._studySource.isStarted())}_outOfSessionVisibilityProperty(){return this._properties.childs().graphics.childs().backgrounds.childs().outOfSession.childs().visible}_preMarketVisibilityProperty(){return this._properties.childs().graphics.childs().backgrounds.childs().preMarket.childs().visible}_postMarketVisibilityProperty(){return this._properties.childs().graphics.childs().backgrounds.childs().postMarket.childs().visible}_vertLinesVisibleProperty(){return this._properties.childs().graphics.childs().vertlines.childs().sessBreaks.childs().visible}_removeDuplicateProperties(){this._properties.hasChild("properties")&&(this._properties.removeProperty("properties"),Object(g.saveDefaultProperties)(!0),this._properties.childChanged("",null),Object(g.saveDefaultProperties)(!1))}_migrateOutOfSessionProperty(e){const t=e.graphics.backgrounds;if(void 0!==t){const i=t.outOfSession;i.color===Object(s.ensureDefined)(y.graphics.backgrounds).outOfSession.color||"postMarket"in t||(e.graphics.backgrounds=Object.assign(Object.assign({},t),{postMarket:{color:i.color,transparency:i.transparency,visible:i.visible},preMarket:{color:i.color,transparency:i.transparency,visible:i.visible}}))}}}},KcY8:function(e,t,i){"use strict";var s=i("aO4+"),r=i("f6yo"),n=i("jFln"),o=i("VaSN"),a=i("972a"),l=i("Tmoa"),c=i("Ialn"),h=i("ikwP"),u=i("VdBB"),d=i("gAom"),p=i("//lt");class _{constructor(e,t){this.setData(e,t)}setData(e,t){this._data=Object.assign({},e),this._commonData=Object.assign({},t)}draw(e,t,i,s,r,o){ +if(!this._data.visible)return;e.save(),e.font=t.font;const u=void 0!==this._data.labelIcon,p=this._data.tickVisible?t.tickLength:0,_=t.borderSize,m=t.paddingTop+this._commonData.additionalPaddingTop,f=t.paddingBottom+this._commonData.additionalPaddingBottom,g=t.paddingInner,v=t.paddingOuter,b=t.fontSize;let S=this._data.text,y=this._data.textColor||this._commonData.textColor,w=this._data.secondLine||"",C=this._commonData.secondLineTextColor||y,P=this._data.thirdLine||"";const x=this._commonData.thirdLineTextColor||y;0===w.length&&(w=P,C=x,P=""),0===S.length&&(S=w,y=C,w=P,C=x,P="");const T=i.yMidCorrection(e,S)*o,M=Math.ceil(i.measureText(e,S)),I=b+m+f,L=Boolean(w),O=Boolean(P),A=L?Math.ceil(i.measureText(e,w)):0,E=O?Math.ceil(i.measureText(e,P)):0,k=_+g+v+M+p,D=A>0?_+g+v+A+p:0,V=E>0?_+g+v+E+p:0,B=Math.max(k,D,V),R=Math.max(1,Math.floor(o));let N=Math.round(I*o);N%2!=R%2&&(N+=1);const j=Math.round((b+t.lineSpacing)*o),F=Math.round(2*(b+t.lineSpacing)*o),W=Math.max(1,Math.floor(_*o)),H=this._data.separatorVisible?W:0,z=this._data.borderVisible?W:0,U=u?N:Math.round(B*o),G=Math.round(p*o),q=Math.ceil(s*o),Y=Math.ceil(g*o);let K=this._commonData.coordinate;this._commonData.fixedCoordinate&&(K=this._commonData.fixedCoordinate),K=Math.round(K*o)-Math.floor(.5*o);const J=Math.floor(K+R/2-N/2),Z=J+N,X="right"===r,$=X?q-H:H,Q=q;let ee,te,ie=$;const se=Object(l.resetTransparency)(this._data.backgroung||this._commonData.background);e.fillStyle=se;const re=2*o;if(e.textAlign=X?"right":"left",e.textBaseline="middle",X?(ie=$-U,ee=$-G,te=$-G-Y-1):(ie=$+U,ee=$+G,te=$+G+Y),S||u){const i=O?N+F:L?N+j:N,s=this._commonData.borderColor||se,r=(t,s,r)=>{X?Object(d.drawRoundRectWithInnerBorder)(e,ie,J,U,i,t,[re,0,0,re],z,s,r):Object(d.drawRoundRectWithInnerBorder)(e,$,J,U,i,t,[0,re,re,0],z,s,r)};if(r(se,"transparent"),this._data.tickVisible){e.strokeStyle=Object(l.generateColor)(this._data.tickColor||y,35),e.lineWidth=R;const t=void 0!==this._commonData.borderStyle?this._commonData.borderStyle:a.LineStyle.Solid;Object(n.setLineStyle)(e,t),Object(d.drawHorizontalLine)(e,Math.floor(K+R/2),$,ee)}if(r("transparent",s,this._commonData.borderStyle),this._data.separatorVisible&&(e.fillStyle=t.paneBackgroundColor,e.fillRect(X?Q-H:0,J,H,Z-J)),u){switch(this._data.labelIcon){case 0:this._drawPlusIcon(e,$,ie,J,K,Z,R);break;case 1:this._drawClockIcon(e,$,ie,K,R,o)}return}e.save(),e.translate(te,(J+Z)/2+T),Object(h.drawScaled)(e,o,()=>{e.fillStyle=y,e.fillText(S,0,0)}),e.restore()}L&&(e.fillStyle=C,e.save(),e.translate(te,(J+Z)/2+T+j),Object(h.drawScaled)(e,o,()=>{e.fillText(Object(c.startWithLTR)(w),0,0)}),e.restore()),O&&(e.fillStyle=x,e.save(),e.translate(te,(J+Z)/2+T+F),Object(h.drawScaled)(e,o,()=>{e.fillText(Object(c.startWithLTR)(P),0,0)}),e.restore()),e.restore()}height(e){const t=this._data,i=(t.text?1:0)+(t.secondLine?1:0)+(t.thirdLine?1:0);return t.visible&&0!==i?i*e.fontSize+(i-1)*e.lineSpacing+e.paddingTop+this._commonData.additionalPaddingTop+e.paddingBottom+this._commonData.additionalPaddingBottom:0}hitTest(e){const t=this._data.hitTestData +;if(void 0===t||!this._data.visible)return null;const i=Object(o.lastEventIsTouch)()?10:0,n=Object(s.box)(new s.Point(t.xl-i,t.y-i),new s.Point(t.xl+t.containerWidth+i,t.y+t.containerHeight+i)),a=t.left&&Object(r.pointInBox)(e,n),l=Object(s.box)(new s.Point(t.xr-i,t.y-i),new s.Point(t.xr+t.containerWidth+i,t.y+t.containerHeight+i)),c=t.right&&Object(r.pointInBox)(e,l);if(a||c){const i=a?"left":"right";return new u.HitTestResult(u.HitTestResult.CUSTOM,{cursorType:p.PaneCursorType.Default,clickHandler:void 0===t.clickHandler?void 0:t.clickHandler.bind(this,e,i),tapHandler:void 0===t.clickHandler?void 0:t.clickHandler.bind(this,e,i),tooltip:t.tooltip})}return null}_drawPlusIcon(e,t,i,s,r,n,o){e.fillStyle=this._commonData.textColor,e.strokeStyle=this._commonData.textColor,e.lineWidth=o;const a=Math.abs(t-i);let l=Math.round(.35*a);l%2!=o%2&&(l+=1);let c=Math.round(.65*a);c%2!=o%2&&(c+=1);const h=Math.floor((a-l)/2),u=Math.min(t,i),d=u+Math.floor(a/2-o/2);e.fillRect(u+h,r,l,o),e.fillRect(d,s+h,o,l),e.beginPath(),e.arc(d+o/2,r+o/2,c/2,0,2*Math.PI,!1),e.stroke()}_drawClockIcon(e,t,i,s,r,n){e.fillStyle=this._commonData.textColor,e.lineWidth=r;const o=Math.abs(t-i);let a=Math.round(.35*o);a%2!=r%2&&(a+=1);let l=Math.round(.65*o);l%2!=r%2&&(l+=1);const c=Math.min(t,i)+Math.floor(o/2-r/2);e.save(),e.translate(c+r/2-l/2,s+r/2-l/2),e.scale(n,n);const h=new Path2D("M7.5 0.8a1 1 0 0 0 0 13.4 1 1 0 0 0 0-13.4zm0 1a1 1 0 0 1 0 11 1 1 0 0 1 0-11zm-.97-.25A3.5 3.5 0 0 0 3.5 0 3.5 3.5 0 0 0 0 3.5a3.5 3.5 0 0 0 1.75 3.03l.5-.86A2.5 2.5 0 0 1 1 3.5 2.5 2.5 0 0 1 3.5 1a2.5 2.5 0 0 1 2.17 1.25zm6.72 4.78A3.5 3.5 0 0 0 15 3.5 3.5 3.5 0 0 0 11.5 0a3.5 3.5 0 0 0-3.03 1.75l.86.5A2.5 2.5 0 0 1 11.5 1 2.5 2.5 0 0 1 14 3.5a2.5 2.5 0 0 1-1.25 2.17zM7 5h1v5H7zm3 2v1H5V7z");e.fill(h),e.restore()}}i.d(t,"a",(function(){return m}));class m{constructor(e){this._commonRendererData={coordinate:0,textColor:"#FFF",background:"#000",additionalPaddingBottom:0,additionalPaddingTop:0},this._axisRendererData={text:"",visible:!1,tickVisible:!0,separatorVisible:!1,borderVisible:!1},this._paneRendererData={text:"",visible:!1,tickVisible:!1,separatorVisible:!0,borderVisible:!1},this._invalidated=!0,this._axisRenderer=new(e||_)(this._axisRendererData,this._commonRendererData),this._paneRenderer=new(e||_)(this._paneRendererData,this._commonRendererData)}text(){return this._updateRendererDataIfNeeded(),this._axisRendererData.text}secondLineText(){return this._updateRendererDataIfNeeded(),this._axisRendererData.secondLine}thirdLineText(){return this._updateRendererDataIfNeeded(),this._axisRendererData.thirdLine}background(){return this._updateRendererDataIfNeeded(),this._commonRendererData.background}color(){return this._updateRendererDataIfNeeded(),this.generateTextColor(this.background())}generateTextColor(e){return Object(l.colorFromBackground)(e)}coordinate(){return this._updateRendererDataIfNeeded(),this._commonRendererData.coordinate}floatCoordinate(){return this._updateRendererDataIfNeeded(), +this._commonRendererData.floatCoordinate||this._commonRendererData.coordinate}update(){this._invalidated=!0}height(e){return this._updateRendererDataIfNeeded(),Math.max(this._axisRenderer.height(e),this._paneRenderer.height(e))}getFixedCoordinate(){return this._commonRendererData.fixedCoordinate||0}setFixedCoordinate(e){this._commonRendererData.fixedCoordinate=e}isVisible(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible||this._paneRendererData.visible}isAxisLabelVisible(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible}isPaneLabelVisible(){return this._updateRendererDataIfNeeded(),this._paneRendererData.visible}renderer(){return this._updateRendererDataIfNeeded(),this._axisRenderer}paneRenderer(){return this._updateRendererDataIfNeeded(),this._paneRenderer}setPaneRendererLabelIcon(e){this._paneRendererData.labelIcon=e}setPaneLabelVisible(e){this._paneRendererData.visible=e,this._invalidated=!0}ignoreAlignment(){return!1}_updateRendererDataIfNeeded(){this._invalidated&&(this._updateRendererData(this._axisRendererData,this._paneRendererData,this._commonRendererData),this._invalidated=!1),this._axisRenderer.setData(this._axisRendererData,this._commonRendererData),this._paneRenderer.setData(this._paneRendererData,this._commonRendererData)}}},Kdr6:function(e,t,i){"use strict";i.r(t),i.d(t,"HHistLegendView",(function(){return r}));var s=i("TG9i");class r extends s.HHistDataWindowView{constructor(e,t){super(e,t),this._showStudyValues=t.properties().paneProperties.legendProperties.showStudyValues}isValuesVisible(){return this._showStudyValues.value()}additional(){return null}destroy(){}}},KmlC:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyPlotCandlesPaneView",(function(){return l}));var s=i("Zy3/"),r=i("Zp/P"),n=i("vq8G"),o=i("/hKg"),a=i("ehkz");class l extends a.a{renderer(){const e=this._study.properties().ohlcPlots[this._plotName];if(!e.visible.value())return null;this._invalidated&&(this._updateImpl(),this._invalidated=!1);const t=this._model.timeScale().barSpacing(),i={bars:this._bars,barSpacing:t,wickVisible:e.drawWick.value(),bodyVisible:!0,borderVisible:e.drawBorder.value(),barWidth:Object(r.optimalBarWidth)(t),borderColor:e.borderColor.value(),wickColor:e.wickColor.value()},a=new s.CompositeRenderer;return a.append(new o.PaneRendererCandles(i)),this._model.selection().isSelected(this._series)&&this._isMarkersEnabled&&this._selectionData&&a.append(new n.SelectionRenderer(this._selectionData)),a}}},KnF9:function(e,t,i){"use strict";i.r(t),i.d(t,"EnvironmentState",(function(){return r}));var s=i("qFKp");class r{constructor(e){this._shift=!1,this._control=!1,this._alt=!1,void 0!==e&&(this._shift=Boolean(e.shiftKey),this._control=Boolean(Object(s.isMac)()?e.metaKey:e.ctrlKey),this._alt=Boolean(e.altKey))}shift(){return this._shift}control(){return this._control}alt(){return this._alt}shiftOnly(){return this._shift&&!this._control&&!this._alt}controlOnly(){return this._control&&!this._shift&&!this._alt}altOnly(){return this._alt&&!this._shift&&!this._control} +controlShift(){return this._shift&&this._control&&!this._alt}static create(e=!1,t=!1,i=!1){return new r({shiftKey:e,ctrlKey:t,metaKey:t,altKey:i})}}},KtbP:function(e,t,i){"use strict";i.r(t),i.d(t,"PanePriceAxisView",(function(){return n}));var s=i("u+0B");class r{constructor(e){this._priceAxisViewRenderer=null,this._rendererOptions=null,this._align="right",this._width=0,this._textWidthCache=e}setParams(e,t,i,s){this._priceAxisViewRenderer=e,this._rendererOptions=t,this._width=i,this._align=s}draw(e,t){null!==this._rendererOptions&&null!==this._priceAxisViewRenderer&&this._priceAxisViewRenderer.draw(e,this._rendererOptions,this._textWidthCache,this._width,this._align,t.pixelRatio)}hitTest(e){var t,i;return void 0===(null===(t=this._priceAxisViewRenderer)||void 0===t?void 0:t.hitTest)?null:null===(i=this._priceAxisViewRenderer)||void 0===i?void 0:i.hitTest(e)}}class n{constructor(e,t,i){this._renderer=null,this._invalidated=!0,this._priceAxisView=e,this._textWidthCache=new s.a(50),this._dataSource=t,this._chartModel=i,this._fontSize=-1,this._panePriceAxisViewRenderer=new r(this._textWidthCache)}update(){this._invalidated=!0}renderer(e,t){return this._invalidated&&this._updateImpl(e,t),this._renderer}_updateImpl(e,t){this._priceAxisView.update(),this._renderer=null;const i=this._chartModel.crossHairSource(),s=this._dataSource===i?i.pane:this._chartModel.paneForSource(this._dataSource);if(null===s)return;const r=this._priceScale();if(null===r)return;let n=s.priceScalePosition(r);if("overlay"===n&&(n=s.priceScalePosition(s.defaultPriceScale())),"overlay"===n)return;const o=this._chartModel.priceAxisRendererOptions();o.fontSize!==this._fontSize&&(this._fontSize=o.fontSize,this._textWidthCache.reset()),this._panePriceAxisViewRenderer.setParams(this._priceAxisView.paneRenderer(),o,t,n),this._renderer=this._panePriceAxisViewRenderer,this._invalidated=!1}_priceScale(){return this._dataSource.priceScale()}}},"L/Ed":function(e,t,i){"use strict";var s;i.r(t),i.d(t,"ToolboxType",(function(){return s})),function(e){e[e.Delete=0]="Delete"}(s||(s={}))},LAp3:function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var s=i("ogJP"),r=i("5rJj"),n=i.n(r);class o extends n.a{constructor(e,t){super(e,t,!1,{names:["width","color","visible"]})}_iterateLevels(e,t){for(const i in e.levels)if(e.levels[i]&&Object(s.isSameType)(e.levels[i],t.typecheck())){let s=t.tpl();for(const r in this._map.names)this._map.names.hasOwnProperty(r)&&(s=t.fill(r,this._map.names[r],e.levels[i],s));e.levels[i]=s}return e}}function a(e,t){return new o(e,t)}},LdoW:function(e,t){e.exports=''},Ltzl:function(e,t,i){"use strict";i.r(t),i.d(t,"SaveLineToolStateUndoCommand",(function(){return n}));var s=i("Eyy1"),r=i("RDU5");class n extends r.UndoCommand{constructor(e,t,i,s=!0){super(i,s),this._newStates=[],this._model=e,this._savedStates=t.map(e=>e.state(!1))} +redo(){this._applyState(this._newStates)}undo(){0===this._newStates.length&&this.saveNewState(),this._applyState(this._savedStates)}saveNewState(){const e=this._savedStates.map(e=>Object(s.ensureNotNull)(this._model.dataSourceForId(e.id)));this._newStates=e.map(e=>e.state(!1))}_applyState(e){for(const t of e){const e=this._model.dataSourceForId(t.id);null!==e&&this._model.restoreLineToolState(e,t)}}}},LxhU:function(e,t,i){"use strict";i.r(t),i.d(t,"ResolutionKind",(function(){return n})),i.d(t,"SpecialResolutionKind",(function(){return o})),i.d(t,"Interval",(function(){return h})),i.d(t,"isHour",(function(){return d}));const s=/^(\d*)([TSHDWMR])$/,r=/^(\d+)$/;var n,o;!function(e){e.Ticks="ticks",e.Seconds="seconds",e.Minutes="minutes",e.Days="days",e.Weeks="weeks",e.Months="months",e.Range="range",e.Invalid="invalid"}(n||(n={})),function(e){e.Hours="hours"}(o||(o={}));const a={};a[n.Ticks]=1e3,a[n.Seconds]=1e3,a[n.Minutes]=60*a[n.Seconds],a[n.Days]=1440*a[n.Minutes],a[n.Weeks]=7*a[n.Days];const l={T:n.Ticks,S:n.Seconds,D:n.Days,W:n.Weeks,M:n.Months,R:n.Range},c=new Set([n.Ticks,n.Seconds,n.Minutes]);class h{constructor(e,t){this._kind=n.Invalid,this._multiplier=0,e!==n.Invalid&&t>0&&(this._kind=e,this._multiplier=t)}kind(){return this._kind}multiplier(){return this._multiplier}isValid(){return this.kind()!==n.Invalid&&this.multiplier()>0}isDWM(){return this.isValid()&&!this.isRange()&&!this.isIntraday()&&!this.isTicks()}isIntraday(){const e=c.has(this.kind());return this.isValid()&&e}isSeconds(){return this.kind()===n.Seconds}isMinutes(){return this.kind()===n.Minutes}isMinuteHours(){return this.kind()===n.Minutes&&d(this.multiplier())}isDays(){return this.kind()===n.Days}isWeeks(){return this.kind()===n.Weeks}isMonths(){return this.kind()===n.Months}isRange(){return this.kind()===n.Range}isTicks(){return this.kind()===n.Ticks}isTimeBased(){return!this.isRange()}letter(){return this.isValid()&&this.kind()!==n.Minutes?this.kind()[0].toUpperCase():""}value(){return this.isValid()?this.kind()===n.Minutes?this.multiplier()+"":this.multiplier()+this.letter():""}isEqualTo(e){if(!(e instanceof h))throw new Error("Argument is not an Interval");return!(!this.isValid()||!e.isValid())&&(this.kind()===e.kind()&&this.multiplier()===e.multiplier())}inMilliseconds(e=Date.now()){if(!this.isValid()||this.isRange())return NaN;if(this.isMonths()){const t=new Date(e);t.setUTCMonth(t.getUTCMonth()+(this.multiplier()||1));return+t-e}const t=this.multiplier();return a[this.kind()]*t}static isEqual(e,t){return h.parse(e).isEqualTo(h.parse(t))}static parse(e){e=(e+"").toUpperCase().split(",")[0];let t=s.exec(e);return null!==t?"H"===t[2]?new h(n.Minutes,60*u(t[1])):new h(l[t[2]],u(t[1])):(t=r.exec(e),null!==t?new h(n.Minutes,u(t[1])):new h(n.Invalid,0))}static kind(e){return h.parse(e).kind()}static isValid(e){return h.parse(e).isValid()}static isDWM(e){return h.parse(e).isDWM()}static isIntraday(e){return h.parse(e).isIntraday()}static isSeconds(e){return h.parse(e).isSeconds()}static isMinutes(e){return h.parse(e).isMinutes()} +static isMinuteHours(e){return h.parse(e).isMinuteHours()}static isDays(e){return h.parse(e).isDays()}static isWeeks(e){return h.parse(e).isWeeks()}static isMonths(e){return h.parse(e).isMonths()}static isRange(e){return h.parse(e).isRange()}static isTicks(e){return h.parse(e).isTicks()}static isTimeBased(e){return h.parse(e).isTimeBased()}static normalize(e){const t=h.parse(e);return t.isValid()?t.value():null}}function u(e){return 0===e.length?1:parseInt(e,10)}function d(e){return e>=60&&!(e%60)}},"M7/j":function(e,t,i){"use strict";i.r(t),i.d(t,"itemsRangeIsValid",(function(){return h})),i.d(t,"splitItems",(function(){return u})),i.d(t,"PaneRendererBaseline",(function(){return d}));var s=i("aO4+"),r=i("hBTJ"),n=i("GEp6"),o=i("Zp/P"),a=i("Y7w9"),l=i("cPgM"),c=i("VdBB");function h(e){if(0===e.length)return!1;const t=e.findIndex(e=>Object(o.coordinateIsValid)(e.y));if(-1===t)return!1;let i=e.length-1;for(;i>t&&!Object(o.coordinateIsValid)(e[i].y);)i--;return!(t>i)}function u(e,t){const i=[],n=[];let a=null;for(let l=0;l=t&&n.push(c),a=c;else{if(null===a)continue;c=a}if(Object(o.coordinateIsValid)(h.y)&&(c.y>t&&h.yt))if(Math.abs(c.x-h.x)<1){const e=new s.Point(c.x,t);i.push(e),n.push(e)}else{const e=Object(r.intersectLineSegments)(c,h,new s.Point(c.x,t),new s.Point(h.x,t));if(null!==e){const t=c.add(h.subtract(c).scaled(e));i.push(t),n.push(t)}}}return{topItems:i,bottomItems:n}}class d extends l.ScaledPaneRenderer{constructor(){super(...arguments),this._data=null}setData(e){this._data=e}hitTest(e){if(null===this._data)return null;const{items:t,topLineWidth:i,bottomLineWidth:r}=this._data,l=Object(o.interactionTolerance)().series+(i+r)/4,h=Object(a.lowerbound)(t,e,(e,t)=>e.x<=t.x),u=Math.max(1,h-1),d=Math.min(t.length-1,h+1);for(let o=u;o<=d;++o){const i=t[o-1],r=t[o],{distance:a}=Object(n.distanceToSegment)(new s.Point(i.x,i.y),new s.Point(r.x,r.y),new s.Point(e.x,e.y));if(a<=l)return new c.HitTestResult(c.HitTestResult.REGULAR)}return null}_drawImpl(e){if(null===this._data)return;const{items:t,baseLevelCoordinate:i,bottom:s,bottomFillColor1:r,bottomFillColor2:n,topFillColor1:o,topFillColor2:a,topLineColor:l,bottomLineColor:c,topLineWidth:d,bottomLineWidth:p}=this._data;if(!h(t))return;const{topItems:_,bottomItems:m}=u(t,i);e.lineCap="round",e.lineJoin="round",0!==_.length&&(e.beginPath(),e.moveTo(_[0].x,i),this._makeLine(e,_,!0,0),e.closePath(),e.fillStyle=this._makeLinearGradient(e,o,a,i-s,i),e.fill(),e.beginPath(),this._makeLine(e,_,!1,0),e.lineWidth=d,e.strokeStyle=l,e.stroke()),0!==m.length&&(e.beginPath(),e.moveTo(m[0].x,i),this._makeLine(e,m,!0,1),e.closePath(),e.fillStyle=this._makeLinearGradient(e,r,n,i,i+s),e.fill(),e.beginPath(),this._makeLine(e,m,!1,1),e.lineWidth=p,e.strokeStyle=c,e.stroke())}_makeLine(e,t,i,s){if(null===this._data)return;const r=t.findIndex(e=>Object(o.coordinateIsValid)(e.y));if(-1===r)return;const{barSpacing:n,baseLevelCoordinate:a}=this._data,l=.25*n;let c +;const h=t.length;for(let u=r;u=a&&n.y>=a){e.moveTo(n.x,n.y);continue}}else if(c&&c.y<=a&&n.y<=a){e.moveTo(n.x,n.y);continue}if(c&&Object(o.coordinateIsValid)(c.y))e.lineTo(n.x,n.y),i&&!Object(o.coordinateIsValid)(h.y)&&e.lineTo(n.x,a);else if(h&&Object(o.coordinateIsValid)(h.y))i?(u!==r&&e.lineTo(n.x,a),e.lineTo(n.x,n.y)):e.moveTo(n.x,n.y);else if(i){if(0===u)continue;u!==r&&e.lineTo(n.x-l,a),e.lineTo(n.x-l,n.y),e.lineTo(n.x+l,n.y),e.lineTo(n.x+l,a)}else e.moveTo(n.x-l,n.y),e.lineTo(n.x+l,n.y);c=n}}}_makeLinearGradient(e,t,i,s,r){const n=e.createLinearGradient(0,s,0,r);return n.addColorStop(0,t),n.addColorStop(1,i),n}}},MA5A:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolCrossLine",(function(){return a}));var s=i("Ocx9"),r=i("p1SQ"),n=i("GmZZ"),o=i("Ss5c");class a extends o.LineDataSource{constructor(e,t){super(e,t||a.createProperties()),this._priceAxisView=new r.LineToolHorzLinePriceAxisView(this),this._timeAxisView=new n.a(this),i.e("lt-pane-views").then(i.bind(null,"amUF")).then(({CrossLinePaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}pointsCount(){return 1}name(){return"Cross Line"}priceAxisViews(e,t){return this.isSourceHidden()?null:t===this.priceScale()&&this.properties().showPrice.value()&&this._model.paneForSource(this)===e?[this._priceAxisView]:null}timeAxisViews(){return this.isSourceHidden()?null:this.properties().showTime.value()?[this._timeAxisView]:null}updateAllViews(){super.updateAllViews(),this._priceAxisView.update(),this._timeAxisView.update()}canHasAlert(){return!1}lineColor(){return this.properties().linecolor.value()}lineWidth(){return this.properties().linewidth.value()}lineStyle(){return this.properties().linestyle.value()}static createProperties(e){const t=new s.DefaultProperty("linetoolcrossline",e);return a._configureProperties(t),t}_getPropertyDefinitionsViewModelClass(){return Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"xrdl")).then(e=>e.CrossLineDefinitionsViewModel)}static _configureProperties(e){o.LineDataSource._configureProperties(e)}}},MROS:function(e,t,i){"use strict";i.r(t),i.d(t,"ModelSelection",(function(){return o}));var s=i("Y7w9"),r=i("GxN8"),n=i("CW80");class o{constructor(){this._items=[],this._set=new Set}isEmpty(){return 0===this._items.length}add(e){if(this._items.length>0&&!Object(n.isLineTool)(this._items[0])&&this.clear(),Object(n.isLineTool)(e)){const t=Object(s.lowerbound)(this._items,e,(e,t)=>e.zorder()!Object(r.a)(e))}checkLineToolSelection(){ +this._items.forEach(e=>Object(n.isLineTool)(e)&&e.calcIsActualSymbol()),this._items=this._items.filter(e=>!Object(n.isLineTool)(e)||e.isActualSymbol())}remove(e){this._items=this._items.filter(t=>t!==e),this._set.delete(e)}clear(){this._items=[],this._set.clear()}notFixedSources(){return this._items.filter(e=>!Object(n.isLineTool)(e)||!e.isFixed())}}},MWAT:function(e,t,i){"use strict";i.r(t),i.d(t,"PriceScaleSelectionStrategyEvenly",(function(){return o})),i.d(t,"PriceScaleSelectionStrategyAllRight",(function(){return a})),i.d(t,"PriceScaleSelectionStrategyAllLeft",(function(){return l})),i.d(t,"createPriceScaleSelectionStrategy",(function(){return h})),i.d(t,"allPriceScaleSelectionStrategyInfo",(function(){return u}));var s=i("Eyy1"),r=i("3ClC");class n{constructor(e){this._priceScalesLimit=8,this._metaInfo=e}metaInfo(){return this._metaInfo}findSuitableScale(e,t,i,s){if(void 0!==s)return this._tryToGetDesiredPriceScale(e,t,s,i);if(Object(r.isStudy)(t)){const s=t.metaInfo();if("Volume"===s.shortId&&e.containsMainSeries())return e.createPriceScaleAtPosition("overlay");const n=t.desiredPriceScalePosition();if(null!==n)return this._tryToGetDesiredPriceScale(e,t,n,i);if(void 0!==i&&(Object(r.isStudy)(i)||e.isMainPane())&&s.is_price_study)return this._getPriceScaleTheSameAsForSource(i,e)}let n=!1;if(Object(r.isStudy)(t)){const i=t.metaInfo().groupingKey;if(void 0!==i){const t=e.model().findNonOverlayStudyWithGroupingKey(i,e);if(null!==t)return this._getPriceScaleTheSameAsForSource(t.study,t.pane)}n=Boolean(t.metaInfo().is_price_study)}else t===e.model().mainSeries()&&(n=!0);if(n){const t=this._findFirstScaleForPriceStudy(e);if(null!==t)return t}return this.createNewPriceScaleIfPossible(e)}canCreateNewPriceScale(e){return e.leftPriceScales().length+e.rightPriceScales().lengthi&&this._priceScaleIsPrice(e.rightPriceScales()[i],t))return e.rightPriceScales()[i];if(e.leftPriceScales().length>i&&this._priceScaleIsPrice(e.leftPriceScales()[i],t))return e.leftPriceScales()[i]}return null}_targetPriceScaleIndex(e,t){if(e.mainSource()===t.mainSeries())return 0}_tryToGetDesiredPriceScale(e,t,i,r){switch(i){case"left":return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("left"):e.createPriceScaleAtPosition("overlay");case"right":return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("right"):e.createPriceScaleAtPosition("overlay");case"as-series":return void 0!==r?Object(s.ensureNotNull)(r.priceScale()):e.isMainPane()?Object(s.ensureNotNull)(Object(s.ensureNotNull)(e.mainDataSource()).priceScale()):this.createNewPriceScaleIfPossible(e);case"overlay": +return e.createPriceScaleAtPosition("overlay")}}}class o extends n{constructor(e){super(e)}apply(e){if(e.containsMainSeries()){const t=Object(s.ensureNotNull)(Object(s.ensureNotNull)(e.mainDataSource()).priceScale());e.movePriceScale(t,"right",0)}const t=e.model();for(;e.leftPriceScales().length>e.rightPriceScales().length;){const i=e.leftPriceScales()[e.leftPriceScales().length-1];e.movePriceScale(i,"right",this._targetPriceScaleIndex(i,t))}for(;e.rightPriceScales().length-e.leftPriceScales().length>1;){const i=e.rightPriceScales()[e.rightPriceScales().length-1];e.movePriceScale(i,"left",this._targetPriceScaleIndex(i,t))}}createNewPriceScaleIfPossible(e){if(!this.canCreateNewPriceScale(e))return e.createPriceScaleAtPosition("overlay");const t=e.leftPriceScales().lengthe.movePriceScale(i,"right",this._targetPriceScaleIndex(i,t)))}createNewPriceScaleIfPossible(e){return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("right"):e.createPriceScaleAtPosition("overlay")}}class l extends n{constructor(e){super(e)}apply(e){const t=e.model();e.rightPriceScales().slice(0).forEach(i=>e.movePriceScale(i,"left",this._targetPriceScaleIndex(i,t)))}createNewPriceScaleIfPossible(e){return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("left"):e.createPriceScaleAtPosition("overlay")}}const c=[{name:"left",title:window.t("Stack On The Left"),ctor:l},{name:"right",title:window.t("Stack On The Right"),ctor:a},{name:"auto",title:window.t("Auto"),ctor:o}];function h(e){const t=Object(s.ensureDefined)(c.find(t=>t.name===e));return new t.ctor(t)}function u(){return c}},MXV9:function(e,t){e.exports=''},MY2c:function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var s=i("RDU5"),r=i("aIyQ"),n=i.n(r),o=i("txPx");const a=Object(o.getLogger)("Common.UndoStack");class l{constructor(){this._commands=[],this._onChange=new n.a}onChange(){return this._onChange}isEmpty(){ +return 0===this._commands.length}clear(){this.isEmpty()||(this._commands.length=0,this._onChange.fire())}push(e){if(!(e instanceof s.UndoCommand))throw new TypeError("argument must be an instance of UndoCommand");this._commands.push(e),this._onChange.fire(e)}pop(){if(this.isEmpty())return void a.logDebug("pop: undo stack is empty");const e=this._commands.pop();return this._onChange.fire(e),e}head(){if(!this.isEmpty())return this._commands[this._commands.length-1]}}},MbIA:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var s=i("4kQX"),r=i("gQ5K");const n={dateFormat:"yyyy-MM-dd",timeFormat:"%h:%m:%s",dateTimeSeparator:" "};class o{constructor(e={}){const t=Object.assign({},n,e);this._dateFormatter=new r.DateFormatter(t.dateFormat),this._timeFormatter=new s.TimeFormatter(t.timeFormat),this._separator=t.dateTimeSeparator}format(e){return`${this._dateFormatter.format(e)}${this._separator}${this._timeFormatter.format(e)}`}formatLocal(e){return`${this._dateFormatter.formatLocal(e)}${this._separator}${this._timeFormatter.formatLocal(e)}`}}},MrEN:function(e,t,i){"use strict";var s=i("aIyQ"),r=function(e,t){this._server=e,this._session=t,this.seriesCompleted=new s,this.seriesError=new s};r.prototype.onRequestMetadata=function(e,t){this._server.receiveLocalResponse({method:"studies_metadata",params:[this._session,e,{errors:[],hash:"",metainfo:t,migrations:[]}]})},r.prototype.onSymbolResolved=function(e,t){this._server.receiveLocalResponse({method:"symbol_resolved",params:[this._session,e,t]})},r.prototype.onSymbolError=function(e,t){this._server.receiveLocalResponse({method:"symbol_error",params:[this._session,e,t]})},r.prototype.onStudyError=function(e,t,i){this._server.receiveLocalResponse({method:"study_error",params:[this._session,e,t,i]})},r.prototype.onSeriesLoading=function(e,t){this._server.receiveLocalResponse({method:"series_loading",params:[this._session,e,t]})},r.prototype.onSeriesCompleted=function(e,t,i){this._server.receiveLocalResponse({method:"series_completed",params:[this._session,e,i,t]}),this.seriesCompleted.fire(e,t)},r.prototype.onSeriesError=function(e,t,i){this._server.receiveLocalResponse({method:"series_error",params:[this._session,e,t,i]}),this.seriesError.fire(e,t)},r.prototype.onStudyCompleted=function(e,t){this._server.receiveLocalResponse({method:"study_completed",params:[this._session,e,t]})},r.prototype.onStudyLoading=function(e,t){this._server.receiveLocalResponse({method:"study_loading",params:[this._session,e,t]})},r.prototype.onTickmarksUpdated=function(e,t){var i={method:"tickmark_update",params:[this._session,{index:e,zoffset:0,changes:[],marks:t,index_diff:[]}]};this._server.receiveLocalResponse(i)},r.prototype.onTimescaleUpdate=function(e,t){var i={method:"timescale_update",params:[this._session,this._prepareDataUpdateObjects(t),{index:e.pointsIndex,zoffset:0,changes:e.points,marks:e.marks,index_diff:e.indexChange,baseIndex:e.baseIndex}]};this._server.receiveLocalResponse(i)},r.prototype.onTimescaleCompleted=function(e){this._server.receiveLocalResponse({ +method:"timescale_completed",params:[this._session,e]})},r.prototype.onSeriesTimeframeUpdate=function(e,t,i,s,r){var n={method:"series_timeframe",params:[this._session,e,t,i,s,null,!0,r]};this._server.receiveLocalResponse(n)},r.prototype.onPointsetDataUpdate=function(e,t,i){this.onDataUpdate(e,t,i,null)},r.prototype._prepareDataUpdateObjects=function(e){var t={};return e.forEach((function(e){t[e.objId]={series:e.data,turnaround:e.turnaround},e.nonSeriesData&&(e.nonSeriesData.data?t[e.objId].nonseries={d:JSON.stringify(e.nonSeriesData.data),indexes:e.nonSeriesData.indexes}:t[e.objId].nonseries={d:"",indexes:[]})})),t},r.prototype.onDataUpdate=function(e,t,i,s){var r={method:"data_update",params:[this._session,this._prepareDataUpdateObjects([{objId:e,turnaround:t,data:i,nonSeriesData:s}])]};this._server.receiveLocalResponse(r)},r.prototype.onQuotesData=function(e){this._server.receiveLocalResponse({method:"quote_symbol_data",params:e})},r.prototype.onDepthData=function(e){this._server.receiveLocalResponse({method:"dd",params:e})},r.prototype.onDepthUpdate=function(e){this._server.receiveLocalResponse({method:"dpu",params:e})},r.prototype.onClearData=function(e){this._server.receiveLocalResponse({method:"clear_data",params:[this._session,e]})},TradingView.ChartapiMessagerInstances=[],e.exports=r},"N+BX":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolBezierCubic",(function(){return n}));var s=i("Ocx9"),r=i("Ss5c");class n extends r.LineDataSource{constructor(e,t){const s=t||n.createProperties();super(e,s),this._controlPoints=null,i.e("lt-pane-views").then(i.bind(null,"a6on")).then(t=>{this._setPaneViews([new t.BezierCubicPaneView(this,e)])})}pointsCount(){return 2}name(){return"Double Curve"}properties(){return super.properties()}setLastPoint(e,t){super.setLastPoint(e,t),this._controlPoints=this._calculateControlPoints()}addPoint(e,t,i){const s=super.addPoint(e,t,i);if(s){const e=this._calculateControlPoints();this._controlPoints=null,this._points.push(e[0]),this._points.push(e[1]),i||(this.normalizePoints(),this.createServerPoints()),this._createPointProperty(2),this._createPointProperty(3)}return s}restorePoints(e,t,i){super.restorePoints(e,t,i),this._createPointProperty(2),this._createPointProperty(3)}controlPoints(){return this._controlPoints}static createProperties(e){const t=new s.DefaultProperty("linetoolbeziercubic",e);return n._configureProperties(t),t}_getPropertyDefinitionsViewModelClass(){return Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"b4fl")).then(e=>e.GeneralBezierDefinitionsViewModel)}static _configureProperties(e){r.LineDataSource._configureProperties(e)}_calculateControlPoints(){const e=this.pointToScreenPoint(this.points()[0])[0],t=this.pointToScreenPoint(this.points()[1])[0],i=t.subtract(e).scaled(.5).transposed().scaled(.3),s=e.add(t).scaled(.33),r=e.add(t).scaled(.67),n=s.add(i),o=r.subtract(i);return[this.screenPointToPoint(n),this.screenPointToPoint(o)]}}},N1UO:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyApi",(function(){return m}));i("YFKU") +;var s=i("Eyy1"),r=i("ogJP"),n=i("9iCb"),o=i("xo8u"),a=i("gaBL"),l=i("HGup"),c=i("jRfx"),h=i("/ToI"),u=i("HZKX"),d=i("SwuQ"),p=i("Yt+L"),_=i("GD+X");class m{constructor(e,t){this._study=e,this._chartWidget=t,this._undoModel=this._chartWidget.model(),this._model=this._undoModel.model()}isUserEditEnabled(){return this._study.userEditEnabled()}setUserEditEnabled(e){this._study.setUserEditEnabled(e)}getInputsInfo(){return this._study.metaInfo().inputs.map(e=>Object.assign(Object.assign({},e),{localizedName:void 0!==e.name?window.t(e.name,{context:"input"}):""}))}getInputValues(){const e=this._study.inputs({symbolsForChartApi:!1,asObject:!0});return Object.keys(e).map(t=>{const i=e[t];return{id:t,value:Object(r.isObject)(i)?i.v:i}})}setInputValues(e){const t=this.getInputValues();for(const i of e){void 0!==t.find(e=>e.id===i.id)?this._study.properties().inputs[i.id].setValue(i.value):console.warn(`There is no such input: "${i.id}"`)}}waitForData(e){return new Promise((t,i)=>{const s={},r=setTimeout(()=>{this._study.onStatusChanged().unsubscribeAll(s),i("Timeout waiting for study to got final status")},e);this._study.onStatusChanged().subscribe(s,e=>{""===e&&(this._study.onStatusChanged().unsubscribeAll(s),clearTimeout(r),t())})})}mergeUp(){this._model.isMergeUpAvailableForSource(this._study)&&new c.c(this._model,this._study,"").redo()}mergeDown(){this._model.isMergeDownAvailableForSource(this._study)&&new c.a(this._model,this._study,"").redo()}unmergeUp(){this._model.isUnmergeAvailableForSource(this._study)&&new l.c(this._model,this._study,"").redo()}unmergeDown(){this._model.isUnmergeAvailableForSource(this._study)&&new l.a(this._model,this._study,"").redo()}mergeUpWithUndo(){this._model.isMergeUpAvailableForSource(this._study)&&this._undoModel.mergeSourceUp(this._study)}mergeDownWithUndo(){this._model.isMergeDownAvailableForSource(this._study)&&this._undoModel.mergeSourceDown(this._study)}unmergeUpWithUndo(){this._model.isUnmergeAvailableForSource(this._study)&&this._undoModel.unmergeSourceUp(this._study)}unmergeDownWithUndo(){this._model.isUnmergeAvailableForSource(this._study)&&this._undoModel.unmergeSourceDown(this._study)}priceScale(){return new _.a(this._undoModel,Object(s.ensureNotNull)(this._study.priceScale()))}changePriceScale(e){const t=Object(s.ensureNotNull)(this._model.paneForSource(this._model.mainSeries())),i=Object(s.ensureNotNull)(this._model.paneForSource(this._study));switch(e){case"no-scale":Object(s.assert)(i.actionNoScaleIsEnabled(this._study),"Unable to leave a pane without any non-overlay price scale"),new h.b(this._model,this._study,i,"overlay","").redo();break;case"as-series":Object(s.assert)(i===t,"Study should be on the main pane"),new h.a(this._model,this._study,i,this._model.mainSeries().priceScale(),"").redo();break;case"new-left":new h.b(this._model,this._study,i,"left","").redo();break;case"new-right":new h.b(this._model,this._study,i,"right","").redo();break;default:const r=this._model.dataSourceForId(e);if(null===r)throw new Error(`There is no study with entityId='${e}'`) +;const n=i===this._model.paneForSource(r);Object(s.assert)(n,"Both studies should be on the same pane");const l=Object(s.ensureNotNull)(r.priceScale()),c=Object(a.sourceNewCurrencyOnPinningToPriceScale)(this._study,l,this._model),u=Object(d.sourceNewUnitOnPinningToPriceScale)(this._study,l,this._model);new h.a(this._model,this._study,i,l,"").redo(),null!==c&&new o.a(l,c,this._undoModel.chartWidget(),"").redo(),null!==u&&new p.a(l,u,this._undoModel.chartWidget(),"").redo()}}isVisible(){return this._study.properties().visible.value()}setVisible(e){this._study.properties().visible.setValue(e)}bringToFront(){this._model.bringToFront([this._study])}sendToBack(){this._model.sendToBack([this._study])}applyOverrides(e){Object(n.applyOverridesToStudy)(this._study,e)}dataLength(){return this._study.metaInfo().plots.length>0?this._study.data().size():this._model.mainSeries().bars().size()}isLoading(){return this._study.isLoading()}async applyToEntireLayout(){const e=new u.ActionsProvider(this._chartWidget),t=(await e.contextMenuActionsForSources([this._study])).find(e=>"applyStudyToEntireLayout"===e.id);t&&t.execute()}}},N22A:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var s=i("eqEH");const r={id:"TradingService"};function n(){return Object(s.hasService)(r)?Object(s.service)(r):null}},NJRZ:function(e,t,i){"use strict";i.r(t),i.d(t,"LineTool5PointsPattern",(function(){return a}));var s=i("Eyy1"),r=i("Ocx9"),n=i("Ss5c"),o=i("j3hX");class a extends n.LineDataSource{constructor(e,t){super(e,t||a.createProperties()),this._loadPaneViews(e)}pointsCount(){return 5}name(){return"XABCD Pattern"}properties(){return super.properties()}static createProperties(e){const t=new r.DefaultProperty("linetool5pointspattern",e);return a._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)}_loadPaneViews(e){i.e("lt-pane-views").then(i.bind(null,"6MfG")).then(t=>{this._setPaneViews([new t.Pattern5pointsPaneView(this,e)])})}static _configureProperties(e){n.LineDataSource._configureProperties(e),e.addChild("linesColors",new o.LineToolColorsProperty([Object(s.ensureDefined)(e.child("color"))])),e.addChild("textsColors",new o.LineToolColorsProperty([Object(s.ensureDefined)(e.child("textcolor"))]))}}},NSoL:function(e,t,i){"use strict";i.r(t),i.d(t,"clientSnapshot",(function(){return y}));var s=i("aO4+"),r=i("eJTA"),n=i("zM7N"),o=i("Y7w9"),a=i("ikwP"),l=i("zDbI"),c=i("XlJ7"),h=i("EsvI"),u=i("Dq3s"),d=i("Kxc7"),p=i("tzRX");const _=!d.enabled("widget_logo");function m(e,t=null,i=null){let s={};if("number"==typeof e)return{relativePositions:{[e]:{l:t,t:i}},nextElementLeft:e,nextElementTop:e};const[r,...n]=e;if("v"===r){let e=null;for(const r of n){const n=m(r,t,i);s=Object.assign(Object.assign({},s),n.relativePositions),i=n.nextElementTop,e=n.nextElementLeft}t=e}if("h"===r){let e=null;for(const r of n){const n=m(r,t,i);s=Object.assign(Object.assign({},s),n.relativePositions), +t=n.nextElementLeft,e=n.nextElementTop}i=e}return{relativePositions:s,nextElementTop:i,nextElementLeft:t}}const f=function(e){const t={};for(const i of Object.keys(e)){const s=m(e[i]).relativePositions;t[i]=s}return t}(u);const g=URL.createObjectURL(new Blob([p],{type:"image/svg+xml"}));function v(e,t,i,s){return Object(a.drawScaled)(e,s,()=>{e.fillText(i,t.x/s,t.y/s)}),e.measureText(i).width*s}function b(e){return e.map(e=>Object.assign(Object.assign({},e),{title:""}))}class S{constructor(e,t){this._logoTextColor=null,this._snapshotData=e,t=t||{},this._options=Object.assign({backgroundColor:h.themes[e.theme].getThemedColor("color-bg-primary"),font:l.CHART_FONT_FAMILY,fontSize:12,legendMode:"vertical",hideResolution:!1},t);const i=f[e.layout],s=e.charts.map(e=>function(e){const t=e.panes[0],i=t.canvas.width+t.leftAxis.canvas.width+t.rightAxis.canvas.width;let s=0;for(const r of e.panes)s+=r.canvas.height;return void 0!==e.timeAxis&&(s+=e.timeAxis.canvas.height),new a.Size(i,s)}(e));if(this._pixelRatio=e.hidpiRatio,this._chartsGeometry=e.charts.map((e,t)=>function e(t,i,s,r){let n=Math.round(10*r),o=Math.round(10*r);const a=s[t];if(null!==a.l){const t=e(a.l,i,s,r);n=t.x+t.width+Math.round(5*r)}if(null!==a.t){const t=e(a.t,i,s,r);o=t.y+t.height+Math.round(5*r)}const l=i[t];return{x:n,y:o,width:l.w,height:l.h}}(t,s,i,this._pixelRatio)),!_){let i=e.theme;void 0!==t.backgroundColor&&(i="black"===Object(r.rgbToBlackWhiteString)(Object(r.parseRgb)(t.backgroundColor),150)?n.a.Dark:n.a.Light),this._logoTextColor=h.themes[i].getThemedColor("color-text-primary")}}async getImage(){let e=0,t=0;for(const a of this._chartsGeometry)e=Math.max(e,a.x+a.width),t=Math.max(t,a.y+a.height);const i=this._pixelRatio;e+=Math.round(10*i);const s=_?Math.round(10*i):Math.round(35*i),r=t;t+=s;const n=Object(a.createDisconnectedCanvas)(document,new a.Size(e,t),1),o=Object(a.getContext2D)(n);o.font=Object(c.makeFont)(this._options.fontSize,this._options.font),o.textBaseline="top",o.fillStyle=this._options.backgroundColor,o.fillRect(0,0,e,t);for(let a=0;a{const t=new Image;t.width=h,t.height=u,t.onload=()=>{e({image:t,width:h,height:u})},t.src=g}));o.fillStyle=this._logoTextColor,o.font=Object(c.makeFont)(13,l.CHART_FONT_FAMILY);const t=r+Math.round(s/2-e.height/2);!function(e,t,i,s,r){e.save(),e.drawImage(s.image,t,i,s.width,s.height),e.textBaseline="bottom";const n=(t+s.width)/r+3,o=(i+s.height)/r;Object(a.drawScaled)(e,r,()=>{e.fillText("TradingView",n,o)}),e.restore()}(o,Math.round(10*i),t,e,i)}var h,u;return n}_drawChart(e,t,i){i.save(),i.translate(t.x,t.y);let r=0;for(const n of e.panes){let t=0;const o=n.leftAxis.canvas.width+Math.round(8*this._pixelRatio),a=r,l=r+Math.round(10*this._pixelRatio);n.leftAxis.contentWidth>0&&(i.drawImage(n.leftAxis.canvas,t,r),t+=n.leftAxis.canvas.width),i.drawImage(n.canvas,t,r), +t+=n.canvas.width,n.rightAxis.contentWidth>0&&i.drawImage(n.rightAxis.canvas,t,r),"pane"===n.type&&(i.fillStyle=e.colors.text,this._drawLegend(n,i,new s.Point(o,l),a)),r+=n.canvas.height}if(void 0!==e.timeAxis){let t=0;e.timeAxis.lhsStub.contentWidth>0&&(i.drawImage(e.timeAxis.lhsStub.canvas,t,r),t+=e.timeAxis.lhsStub.canvas.width),i.drawImage(e.timeAxis.canvas,t,r),t+=e.timeAxis.canvas.width,e.timeAxis.rhsStub.contentWidth>0&&i.drawImage(e.timeAxis.rhsStub.canvas,t,r)}i.restore()}_drawLegend(e,t,i,r){let n=!0;const o=Math.ceil(1.4*this._options.fontSize*this._pixelRatio);let a=i.x,l=i.y;if(e.mainSeriesText&&l+oe.text).join("");let h=t.x;const u=function(e,t,i,s){if(e.measureText(t).width*s<=i)return{text:t,elided:!1};const r=e.measureText("...").width*s,n=[];for(let o=0;oe.measureText(t.slice(0,o+1)).width*s+r>i);return{text:(t=t.slice(0,a)).trim(),elided:!0}}(e,c,i-h,this._pixelRatio);if(u.elided&&!a)return null;const d=[];let p=0;for(const s of l){if(p+s.text.length>u.text.length)break;d.push(s.text),p+=s.text.length}const _=d.join("").trim().length;p=0;for(const o of l){if(p+o.text.length>_)break;o.color&&(e.save(),e.fillStyle=o.color),h+=v(e,new s.Point(h,t.y),o.text,this._pixelRatio),o.color&&e.restore(),p+=o.text.length}return u.elided&&(h+=v(e,new s.Point(h,t.y),"...",this._pixelRatio)),h}}async function y(e,t){return new S(e,t).getImage()}},NhkU:function(e,t,i){"use strict";var s=i("Ss5c").LineDataSource,r=i("5rJj"),n=i("j3hX"),o=n.LineToolWidthsProperty,a=n.LineToolColorsProperty;class l extends s{constructor(e,t){super(e,t||l.createProperties()),i.e("lt-pane-views").then(i.t.bind(null,"l5Au",7)).then(({PitchfanLinePaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}levelsCount(){return l.LevelsCount}pointsCount(){return 3}name(){return"Pitchfan"}processErase(e,t){var i="level"+t,s=this.properties()[i].visible;e.setProperty(s,!1,"Erase level line")}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"D+Nk"))).PitchBaseDefinitionsViewModel}static createProperties(e){var t=new r("linetoolpitchfan",e,!1,{range:[0,8]});return l._configureProperties(t),t} +static _configureProperties(e){s._configureProperties(e);for(var t=[e.child("median").child("linewidth")],i=[e.child("median").child("color")],r=0;r<=l.LevelsCount;r++)t.push(e.child("level"+r).child("linewidth")),i.push(e.child("level"+r).child("color"));e.addChild("linesColors",new a(i)),e.addChild("linesWidths",new o(t))}}l.LevelsCount=8,t.LineToolPitchfan=l},NsVT:function(e,t,i){"use strict";i.r(t);var s=i("hY0g"),r=i.n(s),n=i("HySD");function o(e,t){let i=0;for(const{min:s,max:r}of t){if(e0&&t.push({min:e,max:s})}return t.sort((e,t)=>e.min-t.min||e.max-t.max),t}function l(e,t){if(e.length!==t.length)return!1;for(let i=e.length;i--;){if(e[i].min!==t[i].min)return!1;if(e[i].max!==t[i].max)return!1}return!0}var c=i("+GxX"),h=i("Kxc7");i.d(t,"ChartPage",(function(){return d}));const u=h.enabled("no_min_chart_width");class d{constructor(e){this._processVisibility=e=>{const t=e.container.value();return this._affectsLayout(e.name)?(t&&t.classList.toggle("js-hidden",!1),!0):(t&&t.classList.toggle("js-hidden",!0),!1)},this._setWidth=(e,t)=>{let i=t;this._fullscreenArea!==e.name&&(e.availWidth.setValue(t),e.canNegotiate.width&&(i=o(t,e.negotiations.width)));const s=e.container.value();return s&&(s.style.width=i+"px"),e.width.setValue(i),i},this._setHeight=(e,t)=>{let i=t;this._fullscreenArea!==e.name&&(e.availHeight.setValue(t),e.canNegotiate.height&&(i=o(t,e.negotiations.height)));const s=e.container.value();return s&&(s.style.height=i+"px"),e.height.setValue(i),i};const t=e.container.value();if(!t)throw new Error("bridge.container.value() must be an element");this._container=t,this._availableAreas=["left","tradingpanel","right","top","bottom","center","topleft","extratop"],this._areas={},this._bridge=e,this._width=e.width,this._height=e.height,this._width.subscribe(()=>this.recalculate()),this._height.subscribe(()=>this.recalculate()),this._bridge.visible.subscribe(()=>this._updateVisibility()),this._bridge.fullscreen.subscribe(()=>this._onParentFullscreenChange()),this.recalculate()}allocate(e){const t=e&&e.areaName;if(-1===this._availableAreas.indexOf(t))throw new Error("unknown options.areaName");this.free(t);const i=this._createDOM(t),s={name:t,canNegotiate:{width:"left"===t||"right"===t||"tradingpanel"===t||"topleft"===t,height:"top"===t||"bottom"===t||"topleft"===t||"extratop"===t},negotiations:{width:[],height:[]},remove:()=>{for(const e in this._areas)this._areas[e]===s&&this.free(e)},negotiateWidth:e=>{if(!s.canNegotiate.width)return;const t=a(e);l(s.negotiations.width,t)||(s.negotiations.width=t,this.recalculate())},negotiateHeight:e=>{if(!s.canNegotiate.height)return;const t=a(e);l(s.negotiations.height,t)||(s.negotiations.height=t,this.recalculate())},requestFullscreen:()=>{ +this._fullscreenArea||("right"!==t&&"center"!==t||(this._fullscreenArea=t),"center"===t&&this._bridge.requestFullscreen(),this._updateFullscreen())},exitFullscreen:()=>{t===this._fullscreenArea&&(this._fullscreenArea=void 0,"center"===t&&this._bridge.exitFullscreen(),this._updateFullscreen())},width:new r.a,height:new r.a,availWidth:new r.a,availHeight:new r.a,alive:new r.a(!0),container:new r.a(i),visible:new r.a(!0),fullscreen:new r.a(!0),rdState:new n.ResizerDetacherState};return s.rdState.pushOwner(s),this._areas[t]=s,s.rdState.owner.subscribe(e=>{const i=s.container.value();if(e!==s)i&&(i.innerHTML="",i.parentElement&&i.parentElement.removeChild(i));else{let e=null;for(let i=this._availableAreas.indexOf(t);i--;){const t=this._availableAreas[i];if(this._affectsLayout(t)){e=this._areas[t].container.value();break}}i&&(e&&i.parentElement?i.insertAdjacentElement("afterend",e):this._container.appendChild(i))}this.recalculate()},{callWithLast:!0}),s.rdState.bridge()}free(e){const t=this._areas[e];if(!t)return;this._areas[e]=void 0;const i=t.container.value();i&&i.parentElement&&i.parentElement.removeChild(i),t.alive.setValue(!1)}recalculate(){const e={};this._recalcSingleRunToken=e;const t=this._areas.topleft,i=this._areas.left,s=this._areas.tradingpanel,r=this._areas.right,n=this._areas.top,o=this._areas.bottom,a=this._areas.center,l=this._areas.extratop,c=this._width.value(),h=this._height.value();let d=0,p=0,_=0,m=0,f=0,g=0,v=0,b=0;if(e===this._recalcSingleRunToken&&l&&this._processVisibility(l)&&(b=this._setHeight(l,h),this._setWidth(l,c)),e===this._recalcSingleRunToken&&t&&this._processVisibility(t)){v=this._setHeight(t,h),g=this._setWidth(t,c),g&&(g+=4);const e=t.container.value();e&&(e.style.top=b+"px")}if(e===this._recalcSingleRunToken&&i&&this._processVisibility(i)){const e=i.container.value();e&&(e.style.top=v+b+"px"),this._setHeight(i,h-v-b),_=this._setWidth(i,c),_&&(_+=4)}if(e===this._recalcSingleRunToken&&s&&this._processVisibility(s)){this._setHeight(s,h);let e=c-_;u||(e-=300),f=this._setWidth(s,e)}if(e===this._recalcSingleRunToken&&r&&this._processVisibility(r)){this._setHeight(r,h-b);let e=c-_-f;u||(e-=300),m=this._setWidth(r,e);const t=r.container.value();t&&(t.style.top=b+"px")}const S=f+m,y=S?4:0;if(e===this._recalcSingleRunToken&&n&&this._processVisibility(n)){const e=Math.max(g,_),t=n.container.value();t&&(t.style.left=e+"px",t.style.top=b+"px");const i=c-e-f-m-y;this._setWidth(n,i),d=this._setHeight(n,h)}let w=0;const C=c-_-f-m-y;if(e===this._recalcSingleRunToken&&o&&this._processVisibility(o)){const e=o.container.value();e&&(e.style.left=_+"px",e.classList.toggle("no-border-top-left-radius",!_),e.classList.toggle("no-border-top-right-radius",!S)),this._setWidth(o,C);const t=h-d-b;w=Math.min(300,t-0),p=this._setHeight(o,t)+4}if(e===this._recalcSingleRunToken&&a&&this._processVisibility(a)){const e=a.container.value();e&&(e.style.left=_+"px",e.style.top=d+b+"px",e.classList.toggle("no-border-bottom-left-radius",!p||!_),e.classList.toggle("no-border-bottom-right-radius",!S||!p)),this._setWidth(a,C) +;const t=h-d-p-b;this._setHeight(a,Math.max(t,w))}if(e===this._recalcSingleRunToken&&s&&this._affectsLayout("tradingpanel")){const e=s.container.value();e&&(e.style.right=m+"px",e.style.top=b+"px")}e===this._recalcSingleRunToken&&this._updateVisibility()}_affectsLayout(e){const t=this._areas[e];if(!t)return!1;if(t.rdState.owner.value()!==t)return!1;if(this._fullscreenArea&&this._fullscreenArea!==e)return p(e);if(this._width.value()<=567||this._height.value()<=445){const t=["center","top","left","topleft","extratop"];if(Object(c.isFeatureEnabled)("mobile_show_bottom_panel")&&t.push("bottom"),!t.includes(e))return!1}return!0}_updateVisibility(){const e=this._bridge.visible.value();for(let t=0;te.year||this.year===e.year&&this.month>e.month||this.year===e.year&&this.month===e.month&&this.day>e.day?1:this.year===e.year&&this.month===e.month&&this.day===e.day?0:-1}before(e){return-1===this.compareTo(e)}toCalendar(e){return s.get_cal(s.get_timezone("Etc/UTC"),this.year,this.month-1,this.day)}addDays(e){const t=this.toCalendar(s.get_timezone("Etc/UTC"));return s.add_date(t,e),r.fromCalendar(t)}static fromCalendar(e){return new r(s.get_year(e),s.get_month(e)+1,s.get_day_of_month(e))}}},OH2X:function(e,t,i){"use strict";t.LineToolFibRetracement=i("t2ex").LineToolFibRetracement,t.LineToolFibChannel=i("xnA2").LineToolFibChannel,t.LineToolFibSpeedResistanceArcs=i("Yjuu").LineToolFibSpeedResistanceArcs,t.LineToolProjection=i("68at").LineToolProjection,t.LineToolTrendBasedFibExtension=i("ZtA1").LineToolTrendBasedFibExtension,t.LineToolElliott=i("xz+e").LineToolElliott,t.LineToolFibCircles=i("4bfY").LineToolFibCircles,t.LineToolVertLine=i("n40Z").LineToolVertLine,t.LineToolCrossLine=i("MA5A").LineToolCrossLine,t.LineToolBarsPattern=i("2bPF").LineToolBarsPattern,t.LineToolTrendBasedFibTime=i("yUly").LineToolTrendBasedFibTime,t.LineToolFibTimeZone=i("FsE7").LineToolFibTimeZone,t.LineToolCircleLines=i("tG6Q").LineToolCircleLines,t.LineToolDateRange=i("WkYF").LineToolDateRange,t.LineToolPriceRange=i("RDDl").LineToolPriceRange,t.LineToolDateAndPriceRange=i("UCMi").LineToolDateAndPriceRange,t.LineToolParallelChannel=i("qcGP").LineToolParallelChannel,t.LineToolTrendAngle=i("nW7S").LineToolTrendAngle,t.LineToolTrendLine=i("WPQD").LineToolTrendLine,t.LineToolInfoLine=i("yi8X").LineToolInfoLine,t.LineToolArrowMark=i("TohL").LineToolArrowMark,t.LineToolImage=i("8Blv").LineToolImage,t.LineToolExecution=i("704P").LineToolExecution,t.LineToolPitchfan=i("NhkU").LineToolPitchfan,t.LineToolGannSquare=i("Z0Sh").LineToolGannSquare,t.LineToolFibSpeedResistanceFan=i("zZ5f").LineToolFibSpeedResistanceFan,t.LineToolGannComplex=i("nd9+").LineToolGannComplex,t.LineToolGannFixed=i("TBaH").LineToolGannFixed,t.LineToolGannFan=i("4u8j").LineToolGannFan,t.LineToolFibWedge=i("9QkW").LineToolFibWedge,t.LineToolPitchfork=i("aDyP").LineToolPitchfork,t.LineToolDisjointAngle=i("oIoN").LineToolDisjointChannel,t.LineToolFlatBottom=i("InMJ").LineToolFlatBottom, +t.LineToolIcon=i("icPo").LineToolIcon,t.LineToolRotatedRectangle=i("Az04").LineToolRotatedRectangle,t.LineToolFibSpiral=i("i80N").LineToolFibSpiral,t.LineToolHeadAndShoulders=i("aILO").LineToolHeadAndShoulders,t.LineToolTriangle=i("isVH").LineToolTriangle,t.LineToolTrianglePattern=i("lNN+").LineToolTrianglePattern,t.LineTool5PointsPattern=i("NJRZ").LineTool5PointsPattern,t.LineToolThreeDrivers=i("PYn8").LineToolThreeDrivers,t.LineToolABCD=i("pKDv").LineToolABCD,t.LineToolPolyline=i("hP9j").LineToolPolyline,t.LineToolPath=i("YdVo").LineToolPath,t.LineToolPrediction=i("Wh6B").LineToolPrediction,t.LineToolPriceLabel=i("zqZp").LineToolPriceLabel,t.LineToolArrowMarker=i("wiuq").LineToolArrowMarker,t.LineToolNote=i("gLxC").LineToolNote,t.LineToolNoteAbsolute=i("gLxC").LineToolNoteAbsolute,t.LineToolSignpost=i("gASG").LineToolSignpost,t.LineToolBrush=i("+hLl").LineToolBrush,t.LineToolArc=i("0Pxc").LineToolArc,t.LineToolCallout=i("odCa").LineToolCallout,t.LineToolBalloon=i("me8f").LineToolBalloon,t.LineToolText=i("V3Oj").LineToolText,t.LineToolHorzLine=i("/DxK").LineToolHorzLine,t.LineToolHorzRay=i("CJIV").LineToolHorzRay,t.LineToolRectangle=i("7qI1").LineToolRectangle,t.LineToolEllipse=i("V086").LineToolEllipse,t.LineToolTimeCycles=i("kIXa").LineToolTimeCycles,t.LineToolSineLine=i("bv/X").LineToolSineLine,t.LineToolGhostFeed=i("XUCF").LineToolGhostFeed,t.LineToolBezierQuadro=i("Xyly").LineToolBezierQuadro,t.LineToolBezierCubic=i("N+BX").LineToolBezierCubic,t.LineToolArrow=i("QQu0").LineToolArrow,t.LineToolRay=i("5ZUI").LineToolRay,t.LineToolExtended=i("CHw2").LineToolExtended,t.LineToolSchiffPitchfork=i("v5F8").LineToolSchiffPitchfork,t.LineToolSchiffPitchfork2=i("XFad").LineToolSchiffPitchfork2,t.LineToolInsidePitchfork=i("EqoR").LineToolInsidePitchfork,t.LineToolTextAbsolute=i("V3Oj").LineToolTextAbsolute,t.LineToolArrowMarkLeft=i("TohL").LineToolArrowMarkLeft,t.LineToolArrowMarkRight=i("TohL").LineToolArrowMarkRight,t.LineToolArrowMarkUp=i("TohL").LineToolArrowMarkUp,t.LineToolArrowMarkDown=i("TohL").LineToolArrowMarkDown,t.LineToolFlagMark=i("aIha").LineToolFlagMark,t.LineToolCypherPattern=i("bTqm").LineToolCypherPattern,t.LineToolElliottImpulse=i("xz+e").LineToolElliottImpulse,t.LineToolElliottTriangle=i("xz+e").LineToolElliottTriangle,t.LineToolElliottTripleCombo=i("xz+e").LineToolElliottTripleCombo,t.LineToolElliottCorrection=i("xz+e").LineToolElliottCorrection,t.LineToolElliottDoubleCombo=i("xz+e").LineToolElliottDoubleCombo,t.LineToolRiskRewardLong=i("tDUI").LineToolRiskRewardLong,t.LineToolRiskRewardShort=i("tDUI").LineToolRiskRewardShort,t.LineToolPosition=i("ziJ5").LineToolPosition,t.LineToolOrder=i("B4/o").LineToolOrder,t.LineToolHighlighter=i("SMvR").LineToolHighlighter,t.LineToolPriceNote=i("Zl0W").LineToolPriceNote},"OK+B":function(e,t,i){"use strict" ;var s=i("Eyy1").assert,r=i("eJTA"),n=r.rgba,o=r.rgbaToString,a=r.parseRgb,l=i("+GxX").isFeatureEnabled,c=i("cWHH"),h=i("1Wlv").PriceScale,u=i("8sOK").StudyStub,d=i("CW80"),p=d.createLineTool,_=d.createLineToolProperties,m=d.createStudyLineToolProperties,f=d.isLineToolName,g=d.isStudyLineToolName,v=i("Ss5c").LineDataSource,b=i("OH2X").LineToolBarsPattern,S=i("OH2X").LineToolCallout,y=i("OH2X").LineToolImage,w=i("CW80").isLineTool,C=i("HLXm"),P=i("GVHu"),x=P.Study,T=P.prepareStudyPropertiesForLoadChart,M=i("3ClC").createStudy,I=i("qJq3").Series,L=i("dfhE"),O=i("n5al"),A=i("0YCj"),E=i("Kxc7"),k=i("txPx").getLogger("Chart.Serialization"),D=i("OH2X").LineToolParallelChannel,V=i("OH2X").LineToolTrendAngle,B=i("OH2X").LineToolGhostFeed,R=i("OH2X").LineToolElliott,N=i("7ktv").PriceDataSource,j=i("iDOr").Pane,F=i("Tmoa"),W=i("jofe").createDeferredPromise,H=i("ApcL").preferencesByWhiteList,z=(k=i("txPx").getLogger("Chart.Serialization"),i("mPvX").LineToolsGroupModel);c.version=2,c.prototype.state=function(e,t,i,s){for(var r={panes:[]},n=0;n1&&r.push(l)),o=(o+1)%t.length}return r},c.prototype.restoreState=function(e,t,i){new U(this).reset();var s={};if(e.panes)if(Array.isArray(e.panes)){if(!(e.panes.length<1)){if(this._shouldBeSavedEvenIfHidden=void 0===e.shouldBeSavedEvenIfHidden||e.shouldBeSavedEvenIfHidden,e.chartProperties&&!e.chartProperties.timezone&&(e.chartProperties.timezone=e.timezone), e.chartProperties){var r=TradingView.factoryDefaults("chartproperties").scalesProperties;TradingView.merge(r,e.chartProperties.scalesProperties),!("showLastValue"in r)||"showSeriesLastValue"in r||"showStudyLastValue"in r||(r.showSeriesLastValueProperty=r.showLastValue,r.showStudyLastValueProperty=r.showLastValue),"showSeriesLastValue"in r&&(s.showSeriesLastValueProperty=!0),"showStudyLastValue"in r&&(s.showStudyLastValueProperty=!0),e.chartProperties.paneProperties.vertGridProperties=e.chartProperties.paneProperties.vertGridProperties||TradingView.clone(e.chartProperties.paneProperties.gridProperties),e.chartProperties.paneProperties.horzGridProperties=e.chartProperties.paneProperties.horzGridProperties||TradingView.clone(e.chartProperties.paneProperties.gridProperties),"backgroundType"in e.chartProperties.paneProperties||(e.chartProperties.paneProperties.backgroundType="solid"),this._properties.paneProperties.mergeAndFire(e.chartProperties.paneProperties),this._properties.scalesProperties.mergeAndFire(r),e.chartProperties.timezone&&this._properties.timezone.setValue(e.chartProperties.timezone),e.chartProperties.chartEventsSourceProperties&&this._properties.chartEventsSourceProperties&&this._properties.chartEventsSourceProperties.mergeAndFire(e.chartProperties.chartEventsSourceProperties),e.chartProperties.tradingProperties&&this._properties.tradingProperties&&this._properties.tradingProperties.mergeAndFire(e.chartProperties.tradingProperties),this._timeScale.restoreState(e.timeScale,t),this._updateDateTimeFormatter()}if(e.timeScale&&this._timeScale.restoreState(e.timeScale,t),!this.readOnly()){var n=this._getExceedingChildStudies(e.panes);if(n.length){for(var o=e.panes.length-1;o>=0;--o){for(var a=(u=e.panes[o]).sources.length-1;a>=0;--a){var l=u.sources[a];~n.indexOf(l)&&u.sources.splice(a,1)}u.sources.length||e.panes.splice(o,1)}0}}var c=e.panes;this.panes()[0].restoreState(c[0],t,e.version,s,i,!0);var h=1;for(o=1;of&&_%100==0?{lines_limit_exceeded:!0,line_tools_count:_}:(this.panes().forEach(function(e){this._dataSourceCollectionChanged.fire(e)}.bind(this)),this._lineToolsGroupModel.fireChangedAll(),{})}k.logDebug("ChartModel.restoreState: invalid state") }else k.logDebug("ChartModel.restoreState: invalid state");else k.logDebug("ChartModel.restoreState: invalid state")},j.prototype.state=function(e,t,i,s,r,n){var o={},a=new Map;function l(e){if(a.has(e))return a.get(e);var o=null,l=i&&!e.isSavedInStudyTemplates()||!e.state||w(e)&&n||!(o=e.state(t,r))||!e.isSavedInChart(t)||s&&e.isActualSymbol&&!e.isActualSymbol()||e.isPhantom()?null:o;return a.set(e,l),l}if(e){o.sources=[];for(var c=0;c{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) -;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, +;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())} bold(){return!1}size(){return this._statusViewProperties.childs().fontSize.value()+"px"}_getTitleGenerationOptions(){const e=this._series.symbolInfo(),t=this._statusViewProperties.childs().symbolTextSource.value();return{description:"ticker"===this._statusViewProperties.childs().symbolTextSource.value()?e&&e.name||void 0:Object(s.getTranslatedSymbolDescription)({pro_name:e&&e.pro_name||void 0,short_name:e&&e.name||void 0,description:e&&e.description||void 0,short_description:e&&e.short_description||void 0,local_description:e&&e.local_description||void 0,language:e&&e.language||void 0}),exchange:this._statusViewProperties.childs().showExchange.value()&&e&&e.exchange||void 0,symbol:this._series.symbol(),interval:this._statusViewProperties.childs().showInterval.value()&&!this._options.hideResolution?this._series.interval():void 0,style:this._series.properties().childs().style.value(),inputs:this._series.getInputsProperties().state(),boxSize:this._series.data().boxSize,reversalAmount:this._series.data().reversalAmount,ticker:"ticker-and-description"===t?e&&e.name||void 0:""}}}},WPQD:function(e,t,i){"use strict";(function(e){var s=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty;class n extends s{constructor(e,t){super(e,t||n.createProperties()),this._trendLinePaneView=null,i.e("lt-pane-views").then(i.t.bind(null,"ocVb",7)).then(({TrendLinePaneView:e})=>{this._trendLinePaneView=new e(this,this._model),this._setPaneViews([this._trendLinePaneView])})}dataAndViewsReady(){return s.prototype.dataAndViewsReady.call(this)&&this._trendLinePaneView&&this._trendLinePaneView.iconsReady()}stop(){super.stop()}pointsCount(){return 2}name(){return"Trend Line"}canHasAlert(){return!0}_getAlertPlots(){return[this._linePointsToAlertPlot(this._points,null,this.properties().extendLeft.value(),this.properties().extendRight.value())]}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"auWl"))).TrendLineDefinitionsViewModel}template(){var e=s.prototype.template.call(this);return e.text=this.properties().childs().text.value(),e}_applyTemplateImpl(e){super._applyTemplateImpl(e),this.properties().childs().text.setValue(e.text||"")}static createProperties(e){var t=new r("linetooltrendline",e);return n._configureProperties(t),t}static _configureProperties(t){s._configureProperties(t),t.hasChild("text")||t.addChild("text",new e("")),t.addExclusion("text")}}t.LineToolTrendLine=n}).call(this,i("tc+8"))},"Wh/T":function(e,t,i){"use strict";var s=i("Kxc7");window.onload=function(){location.hostname.indexOf(".")>=0&&!function(){try{return/^(192|172|10)\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]/.test(location.hostname)||/^.*((?:\.local)|localhost)$/.test(location.hostname)}catch(e){return!1}}()&&setTimeout((function(){try{var e=function(){var e=0;return JSON.parse(urlParams.logo).image&&(e="C",s.enabled("link_to_tradingview")||(e="D")),e}();window.ga&&(0!==e&&window.ga("send","event","s",e),urlParams.utm||window.ga("send","event","l"))}catch(t){}}),3e4)}}, diff --git a/charting_library/charting_library.cjs.js b/charting_library/charting_library.cjs.js index 870ce7c7..a8ce627e 100644 --- a/charting_library/charting_library.cjs.js +++ b/charting_library/charting_library.cjs.js @@ -1 +1 @@ -"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.029 (internal id c7e6d52b @ 2021-09-16T11:38:03.852Z)"}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.c7e6d52b.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.030 (internal id 93881eb6 @ 2021-10-01T13:05:17.158Z)"}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.93881eb6.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 8744276e..40506b7a 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.029 (internal id c7e6d52b @ 2021-09-16T11:38:03.852Z)"}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.c7e6d52b.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.030 (internal id 93881eb6 @ 2021-10-01T13:05:17.158Z)"}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.93881eb6.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 0a47e0c9..52f640dd 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.029 (internal id c7e6d52b @ 2021-09-16T11:38:03.852Z)"}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.c7e6d52b.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.030 (internal id 93881eb6 @ 2021-10-01T13:05:17.158Z)"}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.93881eb6.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 29a2bbe9..fce1b795 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.029 (internal id c7e6d52b @ 2021-09-16T11:38:03.852Z)"}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.c7e6d52b.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.030 (internal id 93881eb6 @ 2021-10-01T13:05:17.158Z)"}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.93881eb6.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.c7e6d52b.html b/charting_library/cs-tv-chart.93881eb6.html similarity index 99% rename from charting_library/cs-tv-chart.c7e6d52b.html rename to charting_library/cs-tv-chart.93881eb6.html index 760e4ad6..718eb2cb 100644 --- a/charting_library/cs-tv-chart.c7e6d52b.html +++ b/charting_library/cs-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/da_DK-tv-chart.c7e6d52b.html b/charting_library/da_DK-tv-chart.93881eb6.html similarity index 99% rename from charting_library/da_DK-tv-chart.c7e6d52b.html rename to charting_library/da_DK-tv-chart.93881eb6.html index 3a768a78..c0abeec2 100644 --- a/charting_library/da_DK-tv-chart.c7e6d52b.html +++ b/charting_library/da_DK-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/de-tv-chart.c7e6d52b.html b/charting_library/de-tv-chart.93881eb6.html similarity index 99% rename from charting_library/de-tv-chart.c7e6d52b.html rename to charting_library/de-tv-chart.93881eb6.html index 28cc0b04..e444e0e4 100644 --- a/charting_library/de-tv-chart.c7e6d52b.html +++ b/charting_library/de-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/el-tv-chart.c7e6d52b.html b/charting_library/el-tv-chart.93881eb6.html similarity index 99% rename from charting_library/el-tv-chart.c7e6d52b.html rename to charting_library/el-tv-chart.93881eb6.html index 0ad2a1b2..96176b67 100644 --- a/charting_library/el-tv-chart.c7e6d52b.html +++ b/charting_library/el-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/en-tv-chart.c7e6d52b.html b/charting_library/en-tv-chart.93881eb6.html similarity index 99% rename from charting_library/en-tv-chart.c7e6d52b.html rename to charting_library/en-tv-chart.93881eb6.html index 1bcd8fc4..30eeff7c 100644 --- a/charting_library/en-tv-chart.c7e6d52b.html +++ b/charting_library/en-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/es-tv-chart.c7e6d52b.html b/charting_library/es-tv-chart.93881eb6.html similarity index 99% rename from charting_library/es-tv-chart.c7e6d52b.html rename to charting_library/es-tv-chart.93881eb6.html index f0c9e579..389b2d9e 100644 --- a/charting_library/es-tv-chart.c7e6d52b.html +++ b/charting_library/es-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/et_EE-tv-chart.c7e6d52b.html b/charting_library/et_EE-tv-chart.93881eb6.html similarity index 99% rename from charting_library/et_EE-tv-chart.c7e6d52b.html rename to charting_library/et_EE-tv-chart.93881eb6.html index 6f4a60ee..1e70c6ef 100644 --- a/charting_library/et_EE-tv-chart.c7e6d52b.html +++ b/charting_library/et_EE-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/fa-tv-chart.c7e6d52b.html b/charting_library/fa-tv-chart.93881eb6.html similarity index 99% rename from charting_library/fa-tv-chart.c7e6d52b.html rename to charting_library/fa-tv-chart.93881eb6.html index dc7af82a..1833dcd5 100644 --- a/charting_library/fa-tv-chart.c7e6d52b.html +++ b/charting_library/fa-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/fr-tv-chart.c7e6d52b.html b/charting_library/fr-tv-chart.93881eb6.html similarity index 99% rename from charting_library/fr-tv-chart.c7e6d52b.html rename to charting_library/fr-tv-chart.93881eb6.html index 9e09a5b1..6db268a0 100644 --- a/charting_library/fr-tv-chart.c7e6d52b.html +++ b/charting_library/fr-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/he_IL-tv-chart.c7e6d52b.html b/charting_library/he_IL-tv-chart.93881eb6.html similarity index 99% rename from charting_library/he_IL-tv-chart.c7e6d52b.html rename to charting_library/he_IL-tv-chart.93881eb6.html index 5881f426..85542923 100644 --- a/charting_library/he_IL-tv-chart.c7e6d52b.html +++ b/charting_library/he_IL-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/hu_HU-tv-chart.c7e6d52b.html b/charting_library/hu_HU-tv-chart.93881eb6.html similarity index 99% rename from charting_library/hu_HU-tv-chart.c7e6d52b.html rename to charting_library/hu_HU-tv-chart.93881eb6.html index 4d583331..598d4caa 100644 --- a/charting_library/hu_HU-tv-chart.c7e6d52b.html +++ b/charting_library/hu_HU-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/id_ID-tv-chart.c7e6d52b.html b/charting_library/id_ID-tv-chart.93881eb6.html similarity index 99% rename from charting_library/id_ID-tv-chart.c7e6d52b.html rename to charting_library/id_ID-tv-chart.93881eb6.html index 8ee1080a..28b6865e 100644 --- a/charting_library/id_ID-tv-chart.c7e6d52b.html +++ b/charting_library/id_ID-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/it-tv-chart.c7e6d52b.html b/charting_library/it-tv-chart.93881eb6.html similarity index 99% rename from charting_library/it-tv-chart.c7e6d52b.html rename to charting_library/it-tv-chart.93881eb6.html index 8d6da4b8..8036a759 100644 --- a/charting_library/it-tv-chart.c7e6d52b.html +++ b/charting_library/it-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ja-tv-chart.c7e6d52b.html b/charting_library/ja-tv-chart.93881eb6.html similarity index 99% rename from charting_library/ja-tv-chart.c7e6d52b.html rename to charting_library/ja-tv-chart.93881eb6.html index 9b68d0e5..8239edc9 100644 --- a/charting_library/ja-tv-chart.c7e6d52b.html +++ b/charting_library/ja-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ko-tv-chart.c7e6d52b.html b/charting_library/ko-tv-chart.93881eb6.html similarity index 99% rename from charting_library/ko-tv-chart.c7e6d52b.html rename to charting_library/ko-tv-chart.93881eb6.html index e4a6213a..4b8996df 100644 --- a/charting_library/ko-tv-chart.c7e6d52b.html +++ b/charting_library/ko-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ms_MY-tv-chart.c7e6d52b.html b/charting_library/ms_MY-tv-chart.93881eb6.html similarity index 99% rename from charting_library/ms_MY-tv-chart.c7e6d52b.html rename to charting_library/ms_MY-tv-chart.93881eb6.html index 0e0f224d..3ad58e0a 100644 --- a/charting_library/ms_MY-tv-chart.c7e6d52b.html +++ b/charting_library/ms_MY-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/nl_NL-tv-chart.c7e6d52b.html b/charting_library/nl_NL-tv-chart.93881eb6.html similarity index 99% rename from charting_library/nl_NL-tv-chart.c7e6d52b.html rename to charting_library/nl_NL-tv-chart.93881eb6.html index 65f621cb..41c6b9d8 100644 --- a/charting_library/nl_NL-tv-chart.c7e6d52b.html +++ b/charting_library/nl_NL-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/no-tv-chart.c7e6d52b.html b/charting_library/no-tv-chart.93881eb6.html similarity index 99% rename from charting_library/no-tv-chart.c7e6d52b.html rename to charting_library/no-tv-chart.93881eb6.html index 1b76e7a2..43495146 100644 --- a/charting_library/no-tv-chart.c7e6d52b.html +++ b/charting_library/no-tv-chart.93881eb6.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 e3cd92ad..89ae88ac 100644 --- a/charting_library/package.json +++ b/charting_library/package.json @@ -1,6 +1,6 @@ { "private": true, - "description": "CL v20.029 (internal id c7e6d52b @ 2021-09-16T11:38:03.852Z)", + "description": "CL v20.030 (internal id 93881eb6 @ 2021-10-01T13:05:17.158Z)", "type": "module", "main": "charting_library.cjs.js", "module": "charting_library.esm.js", diff --git a/charting_library/pl-tv-chart.c7e6d52b.html b/charting_library/pl-tv-chart.93881eb6.html similarity index 99% rename from charting_library/pl-tv-chart.c7e6d52b.html rename to charting_library/pl-tv-chart.93881eb6.html index 99888753..73f4a71c 100644 --- a/charting_library/pl-tv-chart.c7e6d52b.html +++ b/charting_library/pl-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/pt-tv-chart.c7e6d52b.html b/charting_library/pt-tv-chart.93881eb6.html similarity index 99% rename from charting_library/pt-tv-chart.c7e6d52b.html rename to charting_library/pt-tv-chart.93881eb6.html index be61c8fa..94d600a3 100644 --- a/charting_library/pt-tv-chart.c7e6d52b.html +++ b/charting_library/pt-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ro-tv-chart.c7e6d52b.html b/charting_library/ro-tv-chart.93881eb6.html similarity index 99% rename from charting_library/ro-tv-chart.c7e6d52b.html rename to charting_library/ro-tv-chart.93881eb6.html index 01426643..172a1519 100644 --- a/charting_library/ro-tv-chart.c7e6d52b.html +++ b/charting_library/ro-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ru-tv-chart.c7e6d52b.html b/charting_library/ru-tv-chart.93881eb6.html similarity index 99% rename from charting_library/ru-tv-chart.c7e6d52b.html rename to charting_library/ru-tv-chart.93881eb6.html index 443cda14..4c58bcb7 100644 --- a/charting_library/ru-tv-chart.c7e6d52b.html +++ b/charting_library/ru-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/sk_SK-tv-chart.c7e6d52b.html b/charting_library/sk_SK-tv-chart.93881eb6.html similarity index 99% rename from charting_library/sk_SK-tv-chart.c7e6d52b.html rename to charting_library/sk_SK-tv-chart.93881eb6.html index 7f2a1a7d..caa3452c 100644 --- a/charting_library/sk_SK-tv-chart.c7e6d52b.html +++ b/charting_library/sk_SK-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/sv-tv-chart.c7e6d52b.html b/charting_library/sv-tv-chart.93881eb6.html similarity index 99% rename from charting_library/sv-tv-chart.c7e6d52b.html rename to charting_library/sv-tv-chart.93881eb6.html index f94af3c4..6979c93f 100644 --- a/charting_library/sv-tv-chart.c7e6d52b.html +++ b/charting_library/sv-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/th-tv-chart.c7e6d52b.html b/charting_library/th-tv-chart.93881eb6.html similarity index 99% rename from charting_library/th-tv-chart.c7e6d52b.html rename to charting_library/th-tv-chart.93881eb6.html index a6615c56..e210cbda 100644 --- a/charting_library/th-tv-chart.c7e6d52b.html +++ b/charting_library/th-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/tr-tv-chart.c7e6d52b.html b/charting_library/tr-tv-chart.93881eb6.html similarity index 99% rename from charting_library/tr-tv-chart.c7e6d52b.html rename to charting_library/tr-tv-chart.93881eb6.html index 40e3d98b..3b6a2cb3 100644 --- a/charting_library/tr-tv-chart.c7e6d52b.html +++ b/charting_library/tr-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/vi-tv-chart.c7e6d52b.html b/charting_library/vi-tv-chart.93881eb6.html similarity index 99% rename from charting_library/vi-tv-chart.c7e6d52b.html rename to charting_library/vi-tv-chart.93881eb6.html index 8b5322fb..00b151fd 100644 --- a/charting_library/vi-tv-chart.c7e6d52b.html +++ b/charting_library/vi-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/zh-tv-chart.c7e6d52b.html b/charting_library/zh-tv-chart.93881eb6.html similarity index 99% rename from charting_library/zh-tv-chart.c7e6d52b.html rename to charting_library/zh-tv-chart.93881eb6.html index 939d4769..bb51eb2f 100644 --- a/charting_library/zh-tv-chart.c7e6d52b.html +++ b/charting_library/zh-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/zh_TW-tv-chart.c7e6d52b.html b/charting_library/zh_TW-tv-chart.93881eb6.html similarity index 99% rename from charting_library/zh_TW-tv-chart.c7e6d52b.html rename to charting_library/zh_TW-tv-chart.93881eb6.html index e09a8dc3..a82dddd4 100644 --- a/charting_library/zh_TW-tv-chart.c7e6d52b.html +++ b/charting_library/zh_TW-tv-chart.93881eb6.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file