From 3ba86a7da797665e59216c3af11f6b2fe0a56b76 Mon Sep 17 00:00:00 2001 From: "jenkins@nwork.local" Date: Thu, 10 Mar 2022 08:28:22 +0000 Subject: [PATCH] Release v20.037 (from 7a4f9e33) --- ...941fd1a.html => ar-tv-chart.7a4f9e33.html} | 2 +- ...390.js => library.80f14d8ecd4992c30c79.js} | 48 +++++++++---------- charting_library/charting_library.cjs.js | 2 +- charting_library/charting_library.esm.js | 2 +- charting_library/charting_library.js | 2 +- .../charting_library.standalone.js | 2 +- ...941fd1a.html => cs-tv-chart.7a4f9e33.html} | 2 +- ...fd1a.html => da_DK-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => de-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => el-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => en-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => es-tv-chart.7a4f9e33.html} | 2 +- ...fd1a.html => et_EE-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => fa-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => fr-tv-chart.7a4f9e33.html} | 2 +- ...fd1a.html => he_IL-tv-chart.7a4f9e33.html} | 2 +- ...fd1a.html => hu_HU-tv-chart.7a4f9e33.html} | 2 +- ...fd1a.html => id_ID-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => it-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => ja-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => ko-tv-chart.7a4f9e33.html} | 2 +- ...fd1a.html => ms_MY-tv-chart.7a4f9e33.html} | 2 +- ...fd1a.html => nl_NL-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => no-tv-chart.7a4f9e33.html} | 2 +- charting_library/package.json | 2 +- ...941fd1a.html => pl-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => pt-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => ro-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => ru-tv-chart.7a4f9e33.html} | 2 +- ...fd1a.html => sk_SK-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => sv-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => th-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => tr-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => vi-tv-chart.7a4f9e33.html} | 2 +- ...941fd1a.html => zh-tv-chart.7a4f9e33.html} | 2 +- ...fd1a.html => zh_TW-tv-chart.7a4f9e33.html} | 2 +- 36 files changed, 59 insertions(+), 59 deletions(-) rename charting_library/{ar-tv-chart.c941fd1a.html => ar-tv-chart.7a4f9e33.html} (99%) rename charting_library/bundles/{library.c42086f4764eddbf5390.js => library.80f14d8ecd4992c30c79.js} (97%) rename charting_library/{cs-tv-chart.c941fd1a.html => cs-tv-chart.7a4f9e33.html} (99%) rename charting_library/{da_DK-tv-chart.c941fd1a.html => da_DK-tv-chart.7a4f9e33.html} (99%) rename charting_library/{de-tv-chart.c941fd1a.html => de-tv-chart.7a4f9e33.html} (99%) rename charting_library/{el-tv-chart.c941fd1a.html => el-tv-chart.7a4f9e33.html} (99%) rename charting_library/{en-tv-chart.c941fd1a.html => en-tv-chart.7a4f9e33.html} (99%) rename charting_library/{es-tv-chart.c941fd1a.html => es-tv-chart.7a4f9e33.html} (99%) rename charting_library/{et_EE-tv-chart.c941fd1a.html => et_EE-tv-chart.7a4f9e33.html} (99%) rename charting_library/{fa-tv-chart.c941fd1a.html => fa-tv-chart.7a4f9e33.html} (99%) rename charting_library/{fr-tv-chart.c941fd1a.html => fr-tv-chart.7a4f9e33.html} (99%) rename charting_library/{he_IL-tv-chart.c941fd1a.html => he_IL-tv-chart.7a4f9e33.html} (99%) rename charting_library/{hu_HU-tv-chart.c941fd1a.html => hu_HU-tv-chart.7a4f9e33.html} (99%) rename charting_library/{id_ID-tv-chart.c941fd1a.html => id_ID-tv-chart.7a4f9e33.html} (99%) rename charting_library/{it-tv-chart.c941fd1a.html => it-tv-chart.7a4f9e33.html} (99%) rename charting_library/{ja-tv-chart.c941fd1a.html => ja-tv-chart.7a4f9e33.html} (99%) rename charting_library/{ko-tv-chart.c941fd1a.html => ko-tv-chart.7a4f9e33.html} (99%) rename charting_library/{ms_MY-tv-chart.c941fd1a.html => ms_MY-tv-chart.7a4f9e33.html} (99%) rename charting_library/{nl_NL-tv-chart.c941fd1a.html => nl_NL-tv-chart.7a4f9e33.html} (99%) rename charting_library/{no-tv-chart.c941fd1a.html => no-tv-chart.7a4f9e33.html} (99%) rename charting_library/{pl-tv-chart.c941fd1a.html => pl-tv-chart.7a4f9e33.html} (99%) rename charting_library/{pt-tv-chart.c941fd1a.html => pt-tv-chart.7a4f9e33.html} (99%) rename charting_library/{ro-tv-chart.c941fd1a.html => ro-tv-chart.7a4f9e33.html} (99%) rename charting_library/{ru-tv-chart.c941fd1a.html => ru-tv-chart.7a4f9e33.html} (99%) rename charting_library/{sk_SK-tv-chart.c941fd1a.html => sk_SK-tv-chart.7a4f9e33.html} (99%) rename charting_library/{sv-tv-chart.c941fd1a.html => sv-tv-chart.7a4f9e33.html} (99%) rename charting_library/{th-tv-chart.c941fd1a.html => th-tv-chart.7a4f9e33.html} (99%) rename charting_library/{tr-tv-chart.c941fd1a.html => tr-tv-chart.7a4f9e33.html} (99%) rename charting_library/{vi-tv-chart.c941fd1a.html => vi-tv-chart.7a4f9e33.html} (99%) rename charting_library/{zh-tv-chart.c941fd1a.html => zh-tv-chart.7a4f9e33.html} (99%) rename charting_library/{zh_TW-tv-chart.c941fd1a.html => zh_TW-tv-chart.7a4f9e33.html} (99%) diff --git a/charting_library/ar-tv-chart.c941fd1a.html b/charting_library/ar-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/ar-tv-chart.c941fd1a.html rename to charting_library/ar-tv-chart.7a4f9e33.html index 40b66654..9f51fb3b 100644 --- a/charting_library/ar-tv-chart.c941fd1a.html +++ b/charting_library/ar-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/bundles/library.c42086f4764eddbf5390.js b/charting_library/bundles/library.80f14d8ecd4992c30c79.js similarity index 97% rename from charting_library/bundles/library.c42086f4764eddbf5390.js rename to charting_library/bundles/library.80f14d8ecd4992c30c79.js index 2e8de700..ebbf2a05 100644 --- a/charting_library/bundles/library.c42086f4764eddbf5390.js +++ b/charting_library/bundles/library.80f14d8ecd4992c30c79.js @@ -25,7 +25,7 @@ return Promise.all(z.map((function(e){return S(e.chartWidget.model().mainSeries( "/hKg":function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererCandles",(function(){return l}));var s=i("Eyy1"),r=i("VdBB"),n=i("gAom"),o=i("Zp/P"),a=i("ExCE");class l extends a.a{constructor(e){super(),this._barSpacing=1,this._barWidth=1,this._borderVisible=!1,this._barBorderWidth=1,this._wickVisible=!1,this._bodyVisible=!0,this._borderColor=void 0,this._wickColor=void 0,this._hittest=void 0,e&&this.setData(e)}setData(e){this._bars=e.bars,this._barSpacing=e.barSpacing,this._borderVisible=e.borderVisible,this._bodyVisible=e.bodyVisible,this._wickVisible=e.wickVisible,this._borderColor=e.borderColor,this._wickColor=e.wickColor,this._hittest=e.hittest}hitTest(e){return this._wickVisible||this._borderVisible||this._bodyVisible?super.hitTest(e):null}draw(e,t){if(0===this._bars.length)return;const i=t.pixelRatio;if(this._barWidth=Object(o.optimalCandlestickWidth)(this._barSpacing,i),this._barWidth>=2){Math.floor(i)%2!=this._barWidth%2&&this._barWidth--}this._wickVisible&&this._drawWicks(e,i),this._borderVisible&&this._drawBorder(e,i),this._bodyVisible&&this._drawCandles(e,i)}_getTolerance(){return Object(o.interactionTolerance)().series+this._barBorderWidth/2}_getBarSpacing(){return this._barSpacing}_getHitTest(){return this._hittest||new r.HitTestResult(r.HitTestResult.REGULAR)}_isPointAtBar(e,t,i){const s=this._bodyVisible||this._borderVisible,r=this._wickVisible;if(!s&&!r)return!1;if(s){const s=r?Math.min(e.high,e.low):Math.min(e.open,e.close),n=r?Math.max(e.high,e.low):Math.max(e.open,e.close);return s-i<=t&&t<=n+i}{const s=Math.min(e.open,e.close),r=Math.max(e.open,e.close);return e.high-i<=t&&t<=s+i||r-i<=t&&t<=e.low+i}}_drawWicks(e,t){const i=this._bars;let r="",n=Math.min(Math.floor(t),Math.floor(this._barSpacing*t));n=Math.max(Math.floor(t),Math.min(n,this._barWidth));const o=Math.floor(.5*n);let a=null;for(const l of i){const i=l.wickColor?l.wickColor:Object(s.ensureDefined)(this._wickColor);i!==r&&(e.fillStyle=i,r=i);const c=Math.round(Math.min(l.open,l.close)*t),h=Math.round(Math.max(l.open,l.close)*t),u=Math.round(l.high*t),d=Math.round(l.low*t);let p=Math.round(t*l.time)-o;const _=p+n-1;null!==a&&(p=Math.max(a+1,p),p=Math.min(p,_));const m=_-p+1;e.fillRect(p,u,m,c-u),e.fillRect(p,h+1,m,d-h),a=_}}_calculateBorderWidth(e){let t=Math.floor(1*e);this._barWidth<=2*t&&(t=Math.floor(.5*(this._barWidth-1)));const i=Math.max(Math.floor(e),t);return this._barWidth<=2*i?Math.max(Math.floor(e),Math.floor(1*e)):i}_drawBorder(e,t){let i="";const r=this._calculateBorderWidth(t);let o=null;for(const a of this._bars){if(a.borderColor!==i&&(e.fillStyle=a.borderColor?a.borderColor:Object(s.ensureDefined)(this._borderColor),i=a.borderColor),this._bodyVisible&&a.hollow)continue;let l=Math.round(a.time*t)-Math.floor(.5*this._barWidth);const c=l+this._barWidth-1,h=Math.round(Math.min(a.open,a.close)*t),u=Math.round(Math.max(a.open,a.close)*t);if(null!==o&&(l=Math.max(o+1,l),l=Math.min(l,c)),this._barSpacing*t>2*r)Object(n.fillRectInnerBorder)(e,l,h,c-l+1,u-h+1,r);else{const t=c-l+1;e.fillRect(l,h,t,u-h+1)}o=c}}_drawCandles(e,t){ let i="";const s=this._calculateBorderWidth(t);for(const r of this._bars){if(this._borderVisible&&this._barWidth<=2*s&&!r.hollow)continue;let o=Math.round(Math.min(r.open,r.close)*t),a=Math.round(Math.max(r.open,r.close)*t),l=Math.round(r.time*t)-Math.floor(.5*this._barWidth),c=l+this._barWidth-1;if(r.color!==i){const t=r.color;e.fillStyle=t,i=t}if(r.hollow)e.fillStyle=r.color,Object(n.fillRectInnerBorder)(e,l,o,c-l+1,a-o+1,s);else{if(this._borderVisible&&(l+=s,o+=s,c-=s,a-=s),o>a)continue;e.fillRect(l,o,c-l+1,a-o+1)}}}}},"/kal":function(e,t){e.exports=''},"/tGj":function(e,t,i){"use strict";function s(e){return e.symbolSource()===e}i.r(t),i.d(t,"isSymbolSource",(function(){return s}))},"/z0S":function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var s=i("Kxc7");function r(e,t){s.enabled("saveload_requires_authentication")?window.runOrSignIn(e,t):e()}},"08i5":function(e,t,i){"use strict";var s,r;i.r(t),i.d(t,"AlertStatus",(function(){return s})),i.d(t,"Direction",(function(){return r})),function(e){e[e.Waiting=0]="Waiting",e[e.Success=1]="Success",e[e.Failure=2]="Failure"}(s||(s={})),function(e){e[e.Up=1]="Up",e[e.Down=2]="Down"}(r||(r={}))},"0F0w":function(e,t,i){"use strict";i.r(t);var s=i("aIyQ"),r=i.n(s),n=i("Eyy1"),o=i("hY0g"),a=i.n(o),l=i("e3/o"),c=i("txPx");const h=Object(c.getLogger)("ChartApi.AbstractSession");var u=i("ogJP");i.d(t,"ChartSession",(function(){return d}));Object(c.getLogger)("ChartSession");class d extends class{constructor(e,t,i){this._isConnected=new a.a(!1),this._state=0,this._isConnectForbidden=!1,this._sessionId="",this._sessionIdChanged=new r.a,this._chartApi=e,this._sessionPrefix=t,this._shouldReconnectAfterCriticalError=i}destroy(){this._logNormal("Destroying session"),this._isConnected.unsubscribe(),this.disconnect(),this._sessionIdChanged.destroy(),delete this._chartApi,this._logNormal("Session has been destroyed")}isConnected(){return this._isConnected}sessionId(){return this._sessionId}onSessionIdChanged(){return this._sessionIdChanged}connect(){0===this._state&&(Object(n.assert)(!this._isConnectForbidden,"Cannot call connect because it is forbidden at this moment"),this._setSessionId(`${this._sessionPrefix}_${Object(l.randomHash)()}`),this._logNormal("Connecting session - wait until transport stay connected"),this._state=1,this._chartApi.createSession(this._sessionId,this))}disconnect(){0!==this._state&&(Object(n.assert)(""!==this._sessionId,"sessionId must not be invalid"),this._logNormal("Disconnecting session..."),this._forbidConnectWhile(()=>{this._chartApi.connected()&&this._sendRemoveSession(),this._processDestroyingOnServer()}))}onMessage(e){switch(e.method){case"connected":return void this._onChartApiConnected() ;case"disconnected":return void this._onChartApiDisconnected();case"critical_error":const t=String(e.params[0]),i=String(e.params[1]);return void this._onCriticalError(t,i)}this._onMessage(e)}_getChartApi(){return this._chartApi}_generateLogMessage(e){return`[${this._sessionId}] ${e}`}_onCriticalError(e,t){this._logError(`Critical error. Reason=${e}, info=${t}.`),this._forbidConnectWhile(()=>{this._processDestroyingOnServer()}),this._shouldReconnectAfterCriticalError?(this._logNormal("Reconnecting after critical error..."),this.connect()):this._logNormal("Reconnecting after critical error skipped")}_onChartApiConnected(){Object(n.assert)(1===this._state,"Session is not registered"),this._logNormal("Transport is connected. Creating session on the server"),this._sendCreateSession(),this._state=2,this._isConnected.setValue(!0)}_onChartApiDisconnected(){this._logNormal("Transport is disconnected. Reconnecting..."),this._forbidConnectWhile(()=>{this._processDestroyingOnServer()}),this.connect()}_setSessionId(e){const t=this._sessionId;this._logNormal(`Changing sessionId: old=${t}, new=${e}`),this._sessionId=e,this._sessionIdChanged.fire(e,t)}_logNormal(e){h.logNormal(this._generateLogMessage(e))}_logError(e){h.logError(this._generateLogMessage(e))}_processDestroyingOnServer(){this._state=0,this._isConnected.setValue(!1),this._chartApi.removeSession(this._sessionId),this._setSessionId("")}_forbidConnectWhile(e){this._isConnectForbidden=!0,e(),this._isConnectForbidden=!1}}{constructor(e,t=!1){super(e,"cs",!1),this._sessionDisabled=!1,this._handler=null,this._criticalError=new r.a,this._disableStatistics=t}destroy(){this._criticalError.destroy(),this._handler=null,super.destroy()}serverTimeOffset(){return this._getChartApi().serverTimeOffset()}switchTimezone(e){return this._getChartApi().switchTimezone(this.sessionId(),e)}defaultResolutions(){return this._getChartApi().defaultResolutions()}availableCurrencies(){return this._getChartApi().availableCurrencies()}availableUnits(){return this._getChartApi().availableUnits()}resolveSymbol(e,t,i){return this._getChartApi().resolveSymbol(this.sessionId(),e,t,i)}requestFirstBarTime(e,t,i){return this._getChartApi().requestFirstBarTime(this.sessionId(),e,t,i)}createSeries(e,t,i,s,r,n,o){return this._getChartApi().createSeries(this.sessionId(),e,t,i,s,r,n,o)}modifySeries(e,t,i,s,r,n){return this._getChartApi().modifySeries(this.sessionId(),e,t,i,s,r,n)}removeSeries(e,t){return!!this.isConnected().value()&&this._getChartApi().removeSeries(this.sessionId(),e,t)}requestMoreData(e,t,i){return"number"==typeof e?this._getChartApi().requestMoreData(this.sessionId(),e):this._getChartApi().requestMoreData(this.sessionId(),e,t,i)}requestMoreTickmarks(e,t,i){return Object(u.isNumber)(e)?this._getChartApi().requestMoreTickmarks(this.sessionId(),e):this._getChartApi().requestMoreTickmarks(this.sessionId(),e,t,i)}requestMetadata(e,t){(()=>{this._getChartApi().requestMetadata(this.sessionId(),e,t)})()}isCanCreateStudy(e){return this._getChartApi().isCanCreateStudy(e)}createStudy(e,t,i,s,r,n,o){ -return this._getChartApi().createStudy(this.sessionId(),e,t,i,s,r,n,o)}rebindStudy(e,t,i,s,r,n,o){return this._getChartApi().rebindStudy(this.sessionId(),e,t,i,s,r,n,o)}modifyStudy(e,t,i,s){return this._getChartApi().modifyStudy(this.sessionId(),e,t,i,s)}removeStudy(e,t,i){return this._getChartApi().removeStudy(this.sessionId(),e,t,i)}createPointset(e,t,i,s,r,n){return this._getChartApi().createPointset(this.sessionId(),e,t,i,s,r,n)}modifyPointset(e,t,i,s){return this._getChartApi().modifyPointset(this.sessionId(),e,t,i,s)}removePointset(e){return this._getChartApi().removePointset(this.sessionId(),e)}setVisibleTimeRange(e,t,i,s,r){this._getChartApi().setVisibleTimeRange(this.sessionId(),e,t,i,s,r)}criticalError(){return this._criticalError}connect(e=null){null!==e&&(this._handler=e),super.connect()}setHandler(e){this._handler=e}connected(){return this.isConnected().value()&&!this._sessionDisabled}disable(){this._sessionDisabled=!0}chartApi(){return this._getChartApi()}_sendCreateSession(){Object.keys(this).forEach(e=>{/^(s|st|symbol_)\d+$/.test(e)&&delete this[e]}),this._getChartApi().chartCreateSession(this.sessionId(),this._disableStatistics)}_sendRemoveSession(){this._getChartApi().chartDeleteSession(this.sessionId())}_onMessage(e){this._handler&&this._handler(e)}_onCriticalError(e,t){this._criticalError.fire(e,t),super._onCriticalError(e,t)}}},"0Pxc":function(e,t,i){"use strict";var s=i("aO4+").Point,r=i("GEp6").distanceToLine,n=i("hfHJ"),o=n.rotationMatrix,a=n.scalingMatrix,l=n.translationMatrix,c=n.transformPoint,h=i("Ss5c").LineDataSource,u=i("Ocx9").DefaultProperty,d=i("j3hX").LineToolColorsProperty;class p extends h{constructor(e,t){super(e,t||p.createProperties()),this.version=p.version,i.e("lt-pane-views").then(i.t.bind(null,"dKqZ",7)).then(({ArcPaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}startChanging(e,t){if(super.startChanging(e,t),0===e||1===e){var i=this.pointToScreenPoint(this._points[0])[0],n=this.pointToScreenPoint(this._points[1])[0],o=this.pointToScreenPoint(this._points[2])[0];this._dist=r(i,n,o).distance;var a=n.subtract(i),l=new s(-a.y,a.x),c=i.add(n).scaled(.5);o.subtract(c).dotProduct(l)<0&&(this._dist=-this._dist)}}pointsCount(){return 3}name(){return"Arc"}hasEditableCoordinates(){return!1}setPoint(e,t){var i=Object.assign({},t),n=this.pointToScreenPoint(this._points[0])[0],h=this.pointToScreenPoint(this._points[1])[0],u=this.pointToScreenPoint(this._points[2])[0];switch(e){case 0:n=this.pointToScreenPoint(i)[0];var d=h.subtract(n),p=n.add(h).scaled(.5);m=(m=new s(-d.y,d.x)).normalized(),u=p.add(m.scaled(this._dist)),u=this.screenPointToPoint(u),this._points[0]=i,this._points[2]=u;break;case 1:var _=r(n,h,u).distance;d=(h=this.pointToScreenPoint(i)[0]).subtract(n),p=n.add(h).scaled(.5);m=(m=new s(-d.y,d.x)).normalized(),u=p.add(m.scaled(this._dist)),u=this.screenPointToPoint(u),this._points[1]=i,this._points[2]=u;break;case 2:i=this.pointToScreenPoint(i)[0];var m;_=r(n,h,i).distance,d=h.subtract(n),p=n.add(h).scaled(.5);m=(m=new s(-d.y,d.x)).normalized(), +return this._getChartApi().createStudy(this.sessionId(),e,t,i,s,r,n,o)}rebindStudy(e,t,i,s,r,n,o){return this._getChartApi().rebindStudy(this.sessionId(),e,t,i,s,r,n,o)}modifyStudy(e,t,i,s){return this._getChartApi().modifyStudy(this.sessionId(),e,t,i,s)}removeStudy(e,t,i){return this._getChartApi().removeStudy(this.sessionId(),e,t,i)}createPointset(e,t,i,s,r,n){return this._getChartApi().createPointset(this.sessionId(),e,t,i,s,r,n)}modifyPointset(e,t,i,s){return this._getChartApi().modifyPointset(this.sessionId(),e,t,i,s)}removePointset(e){return this._getChartApi().removePointset(this.sessionId(),e)}setVisibleTimeRange(e,t,i,s,r){this._getChartApi().setVisibleTimeRange(this.sessionId(),e,t,i,!0,s,r)}criticalError(){return this._criticalError}connect(e=null){null!==e&&(this._handler=e),super.connect()}setHandler(e){this._handler=e}connected(){return this.isConnected().value()&&!this._sessionDisabled}disable(){this._sessionDisabled=!0}chartApi(){return this._getChartApi()}_sendCreateSession(){Object.keys(this).forEach(e=>{/^(s|st|symbol_)\d+$/.test(e)&&delete this[e]}),this._getChartApi().chartCreateSession(this.sessionId(),this._disableStatistics)}_sendRemoveSession(){this._getChartApi().chartDeleteSession(this.sessionId())}_onMessage(e){this._handler&&this._handler(e)}_onCriticalError(e,t){this._criticalError.fire(e,t),super._onCriticalError(e,t)}}},"0Pxc":function(e,t,i){"use strict";var s=i("aO4+").Point,r=i("GEp6").distanceToLine,n=i("hfHJ"),o=n.rotationMatrix,a=n.scalingMatrix,l=n.translationMatrix,c=n.transformPoint,h=i("Ss5c").LineDataSource,u=i("Ocx9").DefaultProperty,d=i("j3hX").LineToolColorsProperty;class p extends h{constructor(e,t){super(e,t||p.createProperties()),this.version=p.version,i.e("lt-pane-views").then(i.t.bind(null,"dKqZ",7)).then(({ArcPaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}startChanging(e,t){if(super.startChanging(e,t),0===e||1===e){var i=this.pointToScreenPoint(this._points[0])[0],n=this.pointToScreenPoint(this._points[1])[0],o=this.pointToScreenPoint(this._points[2])[0];this._dist=r(i,n,o).distance;var a=n.subtract(i),l=new s(-a.y,a.x),c=i.add(n).scaled(.5);o.subtract(c).dotProduct(l)<0&&(this._dist=-this._dist)}}pointsCount(){return 3}name(){return"Arc"}hasEditableCoordinates(){return!1}setPoint(e,t){var i=Object.assign({},t),n=this.pointToScreenPoint(this._points[0])[0],h=this.pointToScreenPoint(this._points[1])[0],u=this.pointToScreenPoint(this._points[2])[0];switch(e){case 0:n=this.pointToScreenPoint(i)[0];var d=h.subtract(n),p=n.add(h).scaled(.5);m=(m=new s(-d.y,d.x)).normalized(),u=p.add(m.scaled(this._dist)),u=this.screenPointToPoint(u),this._points[0]=i,this._points[2]=u;break;case 1:var _=r(n,h,u).distance;d=(h=this.pointToScreenPoint(i)[0]).subtract(n),p=n.add(h).scaled(.5);m=(m=new s(-d.y,d.x)).normalized(),u=p.add(m.scaled(this._dist)),u=this.screenPointToPoint(u),this._points[1]=i,this._points[2]=u;break;case 2:i=this.pointToScreenPoint(i)[0];var m;_=r(n,h,i).distance,d=h.subtract(n),p=n.add(h).scaled(.5);m=(m=new s(-d.y,d.x)).normalized(), u=p.add(m.scaled(_));var f=p.add(m.scaled(-_)),g=d.length(),v=d.x/g,b=d.y/g,S=Math.acos(v);b<0&&(S=-S);var y=l(-p.x,-p.y);i=c(y,i);var w=c(y,u);y=o(-S),i=c(y,i),w=c(y,w),y=a(1,g/(2*_)),i=c(y,i),w=c(y,w);var C=i.y*w.y>=0?new s(u.x,u.y):new s(f.x,f.y);C=this.screenPointToPoint(C),this._points[2]=C}this.normalizePoints()}migrateVersion(e,t,i){if(1===e&&2===this._points.length){var s=(2*this._points[0].price+3*this._points[1].price)/5;this._points.append({price:s,index:this._points[1].index})}if(1===e&&2===this._timePoint.length){var r={price:s=(2*this._timePoint[0].price+3*this._timePoint[1].price)/5,offset:this._timePoint[1].offset,time_t:this._timePoint[1].time_t};this._timePoint.append(r)}}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(33),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"Zd1D"))).GeneralFiguresDefinitionsViewModel}static createProperties(e){var t=new u("linetoolarc",e);return p._configureProperties(t),t}static _configureProperties(e){h._configureProperties(e),e.addChild("linesColors",new d([e.color]))}}p.version=2,t.LineToolArc=p},"0YCj":function(e,t,i){"use strict";(function(e,t){i("Eyy1").assert;var s=i("txPx").getLogger("Chart.Study.MetaInfo"),r=i("9iCb").applyOverridesToStudyDefaults,n=null;function o(e){TradingView.merge(this,{palettes:{},inputs:[],plots:[],graphics:{},defaults:{}}),TradingView.merge(this,e);var t=e.fullId||e.id;TradingView.merge(this,o.parseIdString(t)),this.name=this.id}o.VERSION_STUDY_ARG_SOURCE=41,o.METAINFO_FORMAT_VERSION_SOS_V2=42,o.VERSION_PINE_PROTECT_TV_4164=43,o.CURRENT_METAINFO_FORMAT_VERSION=52,o.VERSION_NEW_STUDY_PRECISION_FORMAT=46,o.CHILD_STUDY_ALLOWED_PLOT_TYPES=["line"],o.canPlotBeSourceOfChildStudy=function(e){return o.CHILD_STUDY_ALLOWED_PLOT_TYPES.includes(e)},o.CHILD_STUDY_EXCLUDE_IDS=["CorrelationCoefficient@tv-basicstudies","Correlation - Log@tv-basicstudies-1"],o.CHILD_STUDY_PARENT_EXCLUDE_IDS=[],o.FilledArea={},o.FilledArea.TYPE_PLOTS="plot_plot",o.FilledArea.TYPE_HLINES="hline_hline",o.versionOf=function(e){var t="_metainfoVersion"in e&&isNumber(e._metainfoVersion)?e._metainfoVersion:0;return t<0&&s.logError("Metainfo format version cannot be negative: "+t),t},o.parseIdString=function(e){var t={};if(-1===e.indexOf("@"))t.shortId=e,t.packageId="tv-basicstudies",t.id=e+"@"+t.packageId,t.version=1;else{var i=e.split("@");t.shortId=i[0];var s=i[1].split("-");if(3===s.length)t.packageId=s.slice(0,2).join("-"),t.id=t.shortId+"@"+t.packageId,t.version=s[2];else if(1===s.length&&"decisionbar"===s[0])t.packageId="les-"+s[0],t.id=t.shortId+"@"+t.packageId,t.version=1;else{if(1!==s.length)throw new Error("unexpected study id:"+e);t.packageId="tv-"+s[0],t.id=t.shortId+"@"+t.packageId,t.version=1}}if(t.fullId=t.id+"-"+t.version,"tv-scripting"===t.packageId){var r=t.shortId;if(0===r.indexOf("Script$")||0===r.indexOf("StrategyScript$")){var n=r.indexOf("_");t.productId=n>=0?r.substring(0,n):t.packageId}else t.productId=t.packageId}else t.productId=t.packageId;return t},o.getPackageName=function(e){ return(/^[^@]+@([^-]+-[^-]+)/.exec(e||"")||[0,"tv-basicstudies"])[1]},o.cutDollarHash=function(e){var t=e.indexOf("$"),i=e.indexOf("@");return-1===t?e:e.substr(0,t)+(i>=0?e.substr(i):"")},o.hasUserIdSuffix=function(e){return/^USER;[\d\w]+;\d+$/.test(e)},o.isStandardPine=function(e){return/^(Strategy)?Script\$STD;.*@tv-scripting$/.test(e)},o.getSourceIdByInputs=function(e,t){if(!Array.isArray(e)||!t)return null;for(var i=0;i0){var l=a.replace(/^[^\$]+/,i);s.inputs[n.id].setValue(l)}}}},o.patchChildStudyMetaInfoState=function(e){e.state&&function e(t){if("object"==typeof t)for(var i in t)"string"==typeof t[i]&&/^[^\$]+\$\d+$/.test(t[i])?t[i]=t[i].replace(/^[^\$]+/,"{pid}"):e(t[i])}(e.state.inputs),e.state.isChildStudy=!0},o.prototype.parseValue=function(e,t){return"bool"===e?TradingView.parseBool(t):t},o.prototype.defaultInputs=function(){for(var e=[],t=0;t0?e[0].id:null},o.prototype.createDefaults=function(){if(this.defaults){var e=TradingView.clone(this.defaults);e.precision="default";var t=o.getStudyPropertyRootName(this);defaults.create(t,e)}},o.prototype.removeDefaults=function(){defaults.remove(o.getStudyPropertyRootName(this))},o.findStudyMetaInfoByDescription=function(e,t){if(e){for(var i=0;i{this._setVisibility(e)},this._chartWidgetCollection=e}show(){const e=this._chartWidgetCollection,t=e.activeChartWidget.value();return t.generalPropertiesDefinitions().then(s=>Promise.all([i.e("redux"),i.e("react"),i.e(1),i.e(2),i.e(3),i.e(6),i.e(7),i.e(8),i.e(9),i.e(11),i.e(13),i.e(15),i.e(16),i.e(19),i.e(20),i.e(21),i.e(23),i.e(28),i.e(30),i.e(31),i.e(34),i.e(39),i.e(46),i.e(53),i.e(70),i.e(90),i.e(0),i.e(5),i.e(4),i.e(10),i.e(12),i.e(17),i.e(29),i.e(25),i.e(26),i.e(27),i.e(33),i.e(36),i.e(51),i.e("general-chart-properties-dialog")]).then(i.bind(null,"PI1I")).then(i=>{var r,n;const o=new i.GeneralChartPropertiesDialogRenderer({chartWidgetCollection:e,propertyPages:s,activePageId:this._activePageId,model:t.model()});return null===(r=this._dialog)||void 0===r||r.hide(),null===(n=this._dialog)||void 0===n||n.visible().unsubscribe(this._subscribe),this._dialog=o,o.visible().subscribe(this._subscribe),o.show(),this._activePageId=void 0,o}))}hide(){var e;null===(e=this._dialog)||void 0===e||e.hide()}isVisible(){return this.visible().value()}focusOnText(){}setActivePage(e){this._activePageId=e}}},"0qMc":function(e,t,i){"use strict";i.r(t),i.d(t,"lineToolsLocalizedNames",(function(){return r}));i("YFKU");var s=i("+GxX");const r={LineTool5PointsPattern:window.t("XABCD Pattern"),LineToolABCD:window.t("ABCD Pattern"),LineToolArc:window.t("Arc"), @@ -220,25 +220,25 @@ m._updateTimeScaleState(i)},onRealtimeCallback:function(e,t,r,o,a){f(a,e),m._tim null===this._refreshPointsetsTimerId){var o=this;this._refreshPointsetsTimerId=setTimeout((function(){o._refreshPointsetsTimerId=null,o._refreshPointsets(o._invalidatedPointsetSessions),o._invalidatedPointsetSessions.clear()}),0)}this._invalidatedPointsetSessions.add(e)},P.prototype._refreshPointsets=function(e){var t=this;e.forEach((function(e){var i=t._studiesCache[e];if(null!=i){var s=null;for(var r in i){var n=i[r];if("series"===n.type){s=n;break}}if(null!==s&&null!=s.symbolInfo){var o=t._getSymbolExtrapolator(e,s.symbolInfo,s.resolution);t._pointsetsManagers[e].getUpdatesForSymbol(s.symbolInfo.full_name,s.resolution,o,t._timeScales[e]).forEach((function(t,i){TradingView.ChartapiMessagerInstances[e].onPointsetDataUpdate(i,null,t)}))}}}))},P.prototype.studiesMetadata=function(){return 0===this._metainfoCache.length&&(this._metainfoCache=JSServer.studyLibrary.map((function(e){return e.metainfo})),this._metainfoCache.push({palettes:{},inputs:[],plots:[{id:"open",type:"line"},{id:"high",type:"line"},{id:"low",type:"line"},{id:"close",type:"line"},{id:"volume",type:"line"}],graphics:{},_metainfoVersion:48,description:"Unnamed Study",format:{type:"inherit"},is_hidden_study:!0,is_price_study:!1,shortDescription:"Unnamed Study",description_localized:"Unnamed Study",id:"BarSetHeikenAshi@tv-prostudies",shortId:"BarSetHeikenAshi",packageId:"tv-basicstudies",version:"13",fullId:"BarSetHeikenAshi@tv-basicstudies-13",productId:"tv-basicstudies",name:"BarSetHeikenAshi@tv-basicstudies"})),this._metainfoCache},P.prototype.searchSymbols=function(e,t,i,s){this._logMessage("Symbol search requested: search string `{0}`, exchange: `{1}`, type `{2}`".format(e,t,i));var r=this;this._externalDatafeed.searchSymbols(e,t,i,(function(e){r._logMessage("Symbol search response: {0}".format(JSON.stringify(e))),s(e)}))},P.prototype.resolveSymbol=function(e,t,i){b(e)||console.error("Expect to get symbol encoded string, but got the following instead: "+e);var s=S(e),r="string"==typeof s.symbol?s:s.symbol,n=r.symbol,o=r["currency-id"],a=r["unit-id"];this._resolveSymbolByName(n,{currency:o,unit:a},t,i)},P.prototype._resolveSymbolByName=function(e,t,i,s){var r,n=t&&t.currency,o=t&&t.unit,a=e+(n?"_#_"+n:"")+(o?"_#_"+o:"");this._resolveRequests[a]?r=this._resolveRequests[a]:(r=this._resolveSymbolInternal(e,n||void 0,o||void 0),this._resolveRequests[a]=r),r.then(i).catch(s)},P.prototype._resolveSymbolInternal=function(e,t,i){var s=this;return new Promise(function(r,n){this._logMessage("Symbol resolve requested: `{0}` ".format(e));var o=!0;this._externalDatafeed.resolveSymbol(e,(function(t){o&&console.warn("`resolveSymbol` should return result asynchronously. Use `setTimeout` with 0 interval to execute the callback function."),s._logMessage("Symbol resolved: `{0}`, SymbolInfo in server response {1}".format(e,JSON.stringify(t))),function(e){if(e.base_name||(e.base_name=[e.name]),e.legs||(e.legs=[e.name]),e.exchange||(e.exchange=e["exchange-listed"]),e.full_name||(e.full_name=e.symbol||(e.exchange?e.exchange+":"+e.name:e.name)), e.pro_name||(e.pro_name=e.full_name),e.data_status||(e.data_status="streaming"),e.ticker||(e.ticker=e.symbol||e.name),!e.session&&e["session-regular"]&&(e.session=e["session-regular"]),!e.minmov&&e.minmovement&&(e.minmov=e.minmovement),e.currency_code&&(e.currency_id=e.currency_code),e.original_currency_code&&(e.original_currency_id=e.original_currency_code),e.supported_resolutions)for(var t=0;ts||(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,c={};if(o.type===d.PeriodBack){var h=this._studyEngine.getSeriesLastBarTime(e,i);if(null===h)return;l=h/1e3;var u=r.parse(o.value),_=this._symbolIdCache[this._makeSymbolKey(e,t)].symbolInfo;a=s.alignPeriodsBackForVisibleRange(_.session,_.holidays,_.corrections,u.letter(),u.multiplier(),1,h)/1e3;var m=p(this._studyEngine.getSeriesInterval(e,i),_);null!==m&&(l=m.timeToExchangeTradingDay(1e3*l)/1e3,a=m.timeToExchangeTradingDay(1e3*a)/1e3),c={applyDefaultRightMargin:!0}}else a=o.from,l=o.to;this.setVisibleTimeRange(e,i,a,l,c)},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:_ -})).then(o).catch(p);let f="{0}/{1}/charts?client={2}&user={3}".format(h,encodeURIComponent(u),encodeURIComponent(l),encodeURIComponent(c));null!=_&&(f+="&chart="+encodeURIComponent(_)),$.ajax({url:f,data:m,type:"POST",crossDomain:!0}).done(e=>{const t=Object(r.parseJSONorNot)(e);if("ok"!==t.status)return a.logWarn("Chart save request failed: "+t.message),void p();o(t.id)}).fail(()=>{p()})}function w(e,t,i){const s=t=>{const i=JSON.parse(t);return i.uid=e.id,i};d?d.getChartContent(e.id).then(e=>{const i=s(e);t(i)}).catch(i):$.ajax({url:"{0}/{1}/charts?client={2}&user={3}&chart={4}".format(h,encodeURIComponent(u),encodeURIComponent(l),encodeURIComponent(c),encodeURIComponent(e.id)),type:"GET",crossDomain:!0}).done(e=>{const i=Object(r.parseJSONorNot)(e);if("ok"!==i.status)return void a.logWarn("Chart load request failed: "+i.message);const n=s(i.data.content);t(n)}).fail(()=>{i&&i()})}function C(e){w(e,e=>{s.emit("chart_load_requested",e)},()=>{a.logWarn("Error loading chart")})}async function P(e){try{if(d)return d.removeStudyTemplate({name:e});const t=await fetch(`${_("study_templates")}&template=${encodeURIComponent(e)}`,{method:"DELETE",credentials:"same-origin"});if(!t.ok)throw new Error(`Remove study template response was not OK. Status: ${t.status}.`);const i=await t.json();if("ok"!==i.status)throw new Error("Remove study template request failed: "+i.message)}catch(t){throw a.logWarn(Object(o.a)(t)),t}}async function x(e){try{if(d){return{content:await d.getStudyTemplateContent({name:e})}}const t=await fetch(`${_("study_templates")}&template=${encodeURIComponent(e)}`,{credentials:"same-origin"});if(!t.ok)throw new Error(`Get study template response was not OK. Status: ${t.status}.`);const i=await t.json();if("ok"!==i.status)throw new Error("Get study template request failed: "+i.message);return i.data}catch(t){throw a.logWarn(Object(o.a)(t)),t}}async function T(e){try{if(d)return d.saveStudyTemplate(e).then(()=>({error:""})).catch(e=>({error:null!=e?Object(o.a)(e):"error"}));const t=new FormData;t.append("name",e.name),t.append("content",e.content);const i=await fetch(_("study_templates"),{method:"POST",body:t,credentials:"same-origin"});if(!i.ok)throw new Error(`Save study template response was not OK. Status: ${i.status}.`);const s=await i.json();return{error:"ok"===s.status?"":s.status}}catch(t){throw a.logWarn(Object(o.a)(t)),t}}async function M(){try{if(p)return p;p=[];const e=e=>(p=e.map(e=>({is_default:!1,name:e.name})),p);if(d)return d.getAllStudyTemplates().then(e);const t=await fetch(_("study_templates"),{method:"GET",credentials:"same-origin"});if(!t.ok)throw new Error(`Study templates list response was not OK. Status: ${t.status}.`);const i=await t.json();if("ok"!==i.status)throw new Error("Study templates list request failed: "+i.message);return e(i.data)}catch(e){throw a.logWarn(Object(o.a)(e)),e}}function I(){p=null}function L(e,t){throw new Error("Not implemented")}function O(e,t){throw new Error("Not implemented")}function A(e,t){throw new Error("Not implemented")}function E(e,t,i){ -throw new Error("Not implemented")}function k(e,t,i){throw new Error("Not implemented")}async function D(e){throw new Error("Not implemented")}async function V(e,t){throw new Error("Not implemented")}async function B(e,t){throw new Error("Not implemented")}async function R(e,t,i){throw new Error("Not implemented")}},EsvI:function(e,t,i){"use strict";i.r(t);i("bSeV");var s=i("eJTA"),r=i("wZIs"),n=i("Vdly"),o=i("wVAQ"),a=i("txPx");const l=Object(a.getLogger)("Themes.Provider");let c=null;function h(e){return Object(o.fetch)("/theme/?themeName="+encodeURIComponent(e),{credentials:"include",method:"GET"}).then(e=>e.json()).then(e=>{const t={};return e.content&&(t.content=JSON.parse(e.content)),t})}var u=i("zM7N"),d=i("oiZD");var p=i("YFKU"),_=i("IMMp"),m=i("HGP3");const f={[u.a.Light]:{name:u.a.Light,label:()=>Object(p.t)("Light",{context:"colorThemeName"}),order:2,getThemedColor:e=>Object(m.b)(e)},[u.a.Dark]:{name:u.a.Dark,label:()=>Object(p.t)("Dark",{context:"colorThemeName"}),order:1,getThemedColor:e=>{const t=_[e]||e;return Object(m.b)(t)}}};function g(e){return!e.isPrivate}function v(){return f[d.watchedTheme.value()]||f.light}function b(e){return v().getThemedColor(e)}function S(e,t,i,s,n=!0,o=!1,a=!1){const l=t?Promise.resolve(I(e)):P(e);return l.then(l=>{if(void 0!==l.content){const h=!t;a&&(void 0!==(c=l.content).chartProperties&&Object(r.applyDefaultsOverrides)(c.chartProperties),void 0!==c.mainSourceProperties&&Object(r.applyDefaultsOverrides)(c.mainSourceProperties,void 0,!0,"mainSeriesProperties")),s.applyTheme(l.content,h,i,e,t,n,o)}var c}),l}i.d(t,"isPublicTheme",(function(){return g})),i.d(t,"getCurrentTheme",(function(){return v})),i.d(t,"getThemedColor",(function(){return b})),i.d(t,"loadTheme",(function(){return S})),i.d(t,"restoreTheme",(function(){return y})),i.d(t,"savedThemeName",(function(){return w})),i.d(t,"syncTheme",(function(){return C})),i.d(t,"getTheme",(function(){return P})),i.d(t,"getThemeNames",(function(){return x})),i.d(t,"getStdThemeNames",(function(){return T})),i.d(t,"isStdThemeName",(function(){return M})),i.d(t,"getStdTheme",(function(){return I})),i.d(t,"getStdThemedValue",(function(){return L})),i.d(t,"isStdThemedDefaultValue",(function(){return O})),i.d(t,"saveTheme",(function(){return A})),i.d(t,"removeTheme",(function(){return E})),i.d(t,"isThemeExist",(function(){return k})),i.d(t,"translateStdThemeName",(function(){return D})),i.d(t,"isStdTheme",(function(){return V})),i.d(t,"extractThemeFromModel",(function(){return B})),i.d(t,"DEFAULT_THEME",(function(){return"light"})),i.d(t,"themes",(function(){return f}));function y(){Object(d.setTheme)(Object(n.getValue)("current_theme.name")||"light")}function w(){return Object(n.getValue)("current_theme.name")||null}function C(){Object(n.setValue)("current_theme.name",v().name,{forceFlush:!0})}function P(e){return h(e)}function x(){return c||Object(o.fetch)("/themes/",{credentials:"include",method:"GET"}).then(e=>(c=e.json(),c))}function T(){return u.c()}function M(e){return T().includes(e)}function I(e){return u.b(e)||{ -content:void 0}}function L(e,t){const i=t||v().name,s=u.b(i),r=0!==e.length&&e.split(".");return s&&s.content&&r?r.reduce((e,t)=>e[t],s.content):null}function O(e,t,i){const r=L(e,i);return null!==r&&Object(s.areEqualRgba)(Object(s.parseRgba)(r),Object(s.parseRgba)(String(t)))}function A(e,t){return function(e,t){const i=new FormData;return i.append("content",JSON.stringify(t)),i.append("name",e),c=null,Object(o.fetch)("/save-theme/",{credentials:"include",method:"POST",body:i}).then(e=>e.json(),e=>l.logError(e))}(e,t)}function E(e){return function(e){const t=new FormData;return t.append("name",e),c=null,Object(o.fetch)("/remove-theme/",{credentials:"include",method:"POST",body:t}).then(e=>e.json(),e=>l.logError(e))}(e)}function k(e){return function(e){return h(e).then(e=>Boolean(e.content))}(e)}function D(e){return u.e(e)}function V(e){return u.d(e)}function B(e){return{content:{chartProperties:{paneProperties:e.model().properties().paneProperties.state(),scalesProperties:e.model().properties().scalesProperties.state()},sessions:e.model().sessions().properties().state(),mainSourceProperties:e.model().mainSeries().properties().state()}}}},ExCE:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var s=i("VdBB");class r{constructor(){this._bars=[]}hitTest(e){const t=this._bars,i=this._getBarSpacing(),s=i/2;if(0===t.length)return null;const r=this._getTolerance(),n=t[0],o=t[t.length-1];if(e.xo.time+s+r)return null;let a=0,l=t.length-1,c=-1;for(;a<=l;){const i=Math.floor((a+l)/2),h=t[i];let u=s;if(h!==n&&h!==o||(u+=r),Math.abs(h.time-e.x)<=u){c=i;break}e.x-h.time>s?a=i+1:l=i-1}if(-1!==c){const n=Math.ceil(r/i);if(0!==n){const i=Math.max(0,c-n),o=Math.min(t.length-1,c+n);for(let n=i;n<=o;n++)if(Math.abs(e.x-t[n].time)<=s+r&&this._isPointAtBar(t[n],e.y,r))return this._getHitTest()}else if(this._isPointAtBar(t[c],e.y,r))return this._getHitTest()}return null}_getHitTest(){return new s.HitTestResult(s.HitTestResult.REGULAR)}_isPointAtBar(e,t,i){const s=Math.min(e.high,e.low),r=Math.max(e.high,e.low);return s-i<=t&&t<=r+i}}},EyEd:function(e,t,i){"use strict";var s=i("lCO3").Version,r=i("txPx").getLogger("Chart.StudyMigration");function n(e){this._studyId=e,this._maxToVers=s.ZERO,this._maxFromVers=s.ZERO,this._migrs=[]}n.prototype.addMigration=function(e,t,i){var r=s.parse(e),n=s.parse(t);r.isGreater(this._maxFromVers)&&(this._maxFromVers=r),n.isGreater(this._maxToVers)&&(this._maxToVers=n),this._migrs.push({fromVers:r,toVers:n,rules:i})},n.prototype.updateInputs=function(e,t,i){if(!i)return i;for(var s=TradingView.clone(i),n=e;n.isLess(t);){var o=this._findMigration(n);if(null==o)break;if(r.logNormal("Migrating study inputs from "+o.fromVers+" to "+o.toVers+" version, studyId: "+this._studyId+", migration: "+JSON.stringify(o)+", inputs: "+JSON.stringify(i)),s=this._applyMigration(s,o),!n.isLess(o.toVers))throw new Error("Problems in study migration process... Possible infinite cycle has been detected and stopped.");n=o.toVers} -return n>e&&r.logNormal("Study inputs migration is done, studyId: "+this._studyId+", inputs: "+JSON.stringify(s)),s},n.prototype._findMigration=function(e){for(var t=-1,i=this._maxFromVers,s=0;s=0||t.indexOf(e)>=0},n._applyInputChangedMinMaxRule=function(e,t){if("adjustValIfNeeded"!==t.action)throw new Error("Unknown action "+t.action+" for rule with type "+t.type);var i=e[t.inputId];return it.maxVal&&(e[t.inputId]=t.maxVal),r.logNormal("Input "+t.inputId+"="+i+" adjusted to value "+e[t.inputId]),e},n._applyInputChangedOptionsRule=function(e,t){if(!(["text"].indexOf(t.inputType)>=0&&"resetToDefValIfNeeded"===t.action))throw new Error("Unexpected rule.inputType="+t.inputType+" in rule.action="+t.action);var i=e[t.inputId];return t.options.indexOf(i)<0&&(e[t.inputId]=t.defVal,r.logNormal("Input "+t.inputId+"="+i+" reset to default value "+t.defVal)),e},e.exports=n},Eyy1:function(e,t,i){"use strict";function s(e){if(void 0===e)throw new Error("Value is undefined");return e}function r(e){if(null===e)throw new Error("Value is null");return e}Object.defineProperty(t,"__esModule",{value:!0}),t.ensureNever=t.ensure=t.ensureNotNull=t.ensureDefined=t.assert=void 0,t.assert=function(e,t){if(!e)throw new Error("Assertion failed"+(t?": "+t:""))},t.ensureDefined=s,t.ensureNotNull=r,t.ensure=function(e){return r(s(e))}, -t.ensureNever=function(e){}},F58L:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyTemplates",(function(){return p}));var s=i("zUrt"),r=i("JWMC"),n=i("aIyQ"),o=i.n(n),a=i("hY0g"),l=i.n(a),c=i("fZEr"),h=i("txPx");const u=Object(h.getLogger)("Platform.StudyTemplates"),d={confirmDelete:window.t("Do you really want to delete Study Template '{0}' ?")};class p{constructor(e){this._chartWidgetCollection=e.chartWidgetCollection,this._favoriteStudyTemplatesService=e.favoriteStudyTemplatesService,window.loginStateChange.subscribe(null,s.backend.invalidateStudyTemplatesList),this._list=new l.a([]),this._onChange=new o.a,this._list.subscribe(()=>this._onChange.fire())}findRecordByName(e){return this._list.value().find(t=>t.name===e)||null}showSaveAsDialog(){const e=this._chartWidgetCollection.activeChartWidget.value().model();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(13),i.e(15),i.e(18),i.e(19),i.e(21),i.e(24),i.e(34),i.e(88),i.e(0),i.e(5),i.e(12),i.e(17),i.e("study-template-dialog")]).then(i.bind(null,"IDfV")).then(t=>{new t.StudyTemplateSaver({controller:e,onSave:e=>{this._list.setValue(e)}}).show()})}applyTemplate(e){const t=this.findRecordByName(e);null!==t?window.runOrSignIn(()=>{const e=this._chartWidgetCollection.activeChartWidget.value(),i=i=>{Object(r.trackEvent)("GUI","Load Study Template"),e.model().applyStudyTemplate(JSON.parse(i.content),t.name)};void 0!==t.id?t.is_default?s.backend.getStandardStudyTemplateContentById(t.id,i):s.backend.getStudyTemplateContentById(t.id,i):s.backend.getStudyTemplateContent(t.name).then(i)},{source:"Study templates apply"}):u.logNormal(`Template ${e} not found in cache`)}deleteStudyTemplate(e){const t=this.findRecordByName(e);null!==t?this._removeTemplate(t):u.logNormal(`Template ${e} not found in cache`)}list(){return this._list.value()}getOnChange(){return this._onChange}refreshStudyTemplateList(e){s.backend.getStudyTemplatesList().then(t=>{this._list.setValue(t),void 0!==e&&e()})}invalidate(){s.backend.invalidateStudyTemplatesList()}_removeTemplate(e){window.runOrSignIn(()=>{Object(c.a)({text:d.confirmDelete.format(e.name),onConfirm:({dialogClose:t})=>new Promise(i=>{const r=()=>{this.refreshStudyTemplateList(()=>{const s=this.list();this._list.setValue(s.filter(t=>t!==e)),this._favoriteStudyTemplatesService&&this._favoriteStudyTemplatesService.remove(e.name),i(),t()})};s.backend.invalidateStudyTemplatesList(),void 0!==e.id?s.backend.removeStudyTemplateById(e.id,r):s.backend.removeStudyTemplate(e.name).then(r)})})},{source:"Study templates delete"})}}},FA0h:function(e,t,i){"use strict";function s(){return Promise.all([i.e("redux"),i.e("react"),i.e(1),i.e(2),i.e(3),i.e(6),i.e(8),i.e(9),i.e(21),i.e(22),i.e(41),i.e(72),i.e(75),i.e(0),i.e(5),i.e(10),i.e(14),i.e(29),i.e(37),i.e("symbol-search-dialog")]).then(i.bind(null,"GcSm"))}i.d(t,"a",(function(){return s}))},FBsw:function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayPriceAxisView",(function(){return o}));var s=i("KcY8"),r=i("n5al"),n=i("oXaB");class o extends s.a{constructor(e){super(),this._source=e} -_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const s=this._source.lastValueData("close",!1);if(s.noData)return;const r=this._source.model(),o=this._source.priceScale();if(null===o)return;if(!r.isPriceScaleVisible(o))return;i.background=s.color,i.textColor=this.generateTextColor(s.color),i.coordinate=s.coordinate,i.floatCoordinate=s.floatCoordinate;const a=this._source.model().properties().scalesProperties;if(a.showSeriesLastValue.value()){if(a.seriesLastValueMode.value()!==n.PriceAxisLastValueMode.LastPriceAndPercentageValue)e.text=s.text,e.secondLine="";else{const t=o.isPercentage();e.text=t?s.formattedPricePercentage:s.formattedPriceAbsolute,e.secondLine=t?s.formattedPriceAbsolute:s.formattedPricePercentage}e.visible=!0}t.text="",a.showSymbolLabels.value()&&(t.text=this._paneText(),t.visible=t.text.length>0)}_paneText(){let e="";if(this._source.model().properties().scalesProperties.showSymbolLabels.value()){const t=this._source.symbolInfo();e+=(t&&Object(r.symbolCurrentContract)(t)||this._source.symbol())+" "}return e.trim()}}},FBuY:function(e,t,i){"use strict";i.r(t),i.d(t,"TVXWindowEvents",(function(){return o}));i("HbRj");var s=i("txPx"),r=i("VVxS");const n=Object(s.getLogger)("XWindowEvents");var o;!function(e){const t="tvxwevents.",i={};let s;window.BroadcastChannel?(s=new BroadcastChannel("tvxwevents"),s.addEventListener("message",(function(e){const{data:{event:t,value:s}}=e;i[t]&&i[t].forEach(e=>{e(s)})})),function(){const e=[],i=performance.now();for(let n=0;n{t(e.newValue)});r.TVLocalStorage.removeItem(n)})),e.on=function(e,t){i[e]||(i[e]=[]),i[e].push(t)},e.off=function(e,t){if(!i[e])return;const s=i[e].indexOf(t);-1!==s&&(1===i[e].length?delete i[e]:i[e].splice(s,1))},e.emit=function(e,i=Date.now()){try{s?s.postMessage({event:e,value:i}):r.TVLocalStorage.setItem(t+e,i.toString())}catch(o){n.logError(o.message)}}}(o||(o={}))},FDyI:function(e,t,i){"use strict";i.r(t);var s=i("Eyy1"),r=i("LxhU"),n=i("IiTo"),o=i("/bs+");class a{constructor(e){this._timeScale=e}coordinateToTime(e){const t=this._timeScale.coordinateToIndex(e);return this._timeScale.indexToTimePoint(t)}barSpacing(){return this._timeScale.barSpacing()}rightOffset(){return this._timeScale.rightOffset()}width(){return this._timeScale.width()}}var l=i("aIyQ"),c=i.n(l),h=i("96Yh"),u=i("pOzK"),d=i("CsKN");i.d(t,"ChartWidgetApiBase",(function(){return p}));class p{constructor(e){this._visibleBarsChanged=new c.a, -this._ranges=null,this._chartWidget=e}getPriceToBarRatio(){return this._chartWidget.model().model().mainSeriesScaleRatioProperty().value()}setPriceToBarRatio(e,t){const i=this._chartWidget.model(),s=i.model(),r=s.mainSeriesScaleRatioProperty();(null==t?void 0:t.disableUndo)?new d.SetScaleRatioPropertiesCommand(r,e,"",s).redo():i.setScaleRatioProperty(r,e,"Change Price to Bar Ratio")}isPriceToBarRatioLocked(){return this._chartWidget.model().model().mainSeries().priceScale().isLockScale()}setPriceToBarRatioLocked(e,t){const i=this._chartWidget.model(),s=i.model(),r=s.mainSeries().priceScale();(null==t?void 0:t.disableUndo)?new u.SetPriceScaleModeCommand({lockScale:e},r,"",s).redo():i.setPriceScaleMode({lockScale:e},r,"Toggle Lock Scale")}onDataLoaded(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().dataEvents().completed())}onSymbolChanged(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().dataEvents().symbolResolved())}onIntervalChanged(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().onIntervalChanged())}onVisibleRangeChanged(){return this._makeSubscriptionFromDelegate(this._visibleBarsChanged)}onChartTypeChanged(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().onStyleChanged())}whenChartReady(e){this._chartWidget.withModel(this,e)}crossHairMoved(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().crossHairSource().moved())}setChartType(e){const t=this._chartWidget.model().mainSeries().properties().style;this._chartWidget.model().setChartStyleProperty(t,e,"Change Series Style")}getAllStudies(){return this._chartWidget.model().model().allStudies(!0).map(h.studyEntityInfo)}getAllPanesHeight(){const e=this._chartWidget.model().model().panes();if(this._chartWidget.isMaximizedPane()){let t=0,i=0;e.forEach(e=>{t+=e.height(),i+=e.stretchFactor()});const s=i/t;return e.map(e=>Math.round(e.stretchFactor()/s*100)/100)}return e.map(e=>e.height())}setAllPanesHeight(e){const t=this._chartWidget.model().model(),i=t.panes();Object(s.assert)(i.length===e.length,"There`s a mismatch between the number of heights you provided and the number of panes.");const r=i.reduce((e,t)=>e+t.stretchFactor(),0)/e.reduce((e,t)=>e+t);e.forEach((e,t)=>{const s=e*r;i[t].setStretchFactor(s)}),t.fullUpdate()}sessions(){return this._chartWidget.model().model().sessions()}getTimeScaleLogicalRange(){return this._chartWidget.model().timeScale().logicalRange()}exportData(e){return i.e("export-data").then(i.bind(null,"SIoL")).then(t=>t.exportData(this._chartWidget.model().model(),e))}barTimeToEndOfPeriod(e){const t=this._prepareEndOfPeriodArgs();return Object(o.a)(t.barBuilder,e,t.intervalObj)}endOfPeriodToBarTime(e){const t=this._prepareEndOfPeriodArgs();return Object(o.b)(t.barBuilder,e,t.intervalObj)}properties(){return this._chartWidget.properties()}setBarSpacing(e){this._chartWidget.model().timeScale().setBarSpacing(e)}scrollChartByBar(e){this._chartWidget.model().scrollChartByBar(e)}mergeAllScales(e){ -this._chartWidget.model().mergeAllScales(e)}chartPainted(){return this._chartWidget.chartPainted()}axesSizeReady(){for(const e of this._chartWidget.paneWidgets()){for(const t of e.leftPriceAxisesContainer().axes())if(!t.sizeReady())return!1;for(const t of e.rightPriceAxisesContainer().axes())if(!t.sizeReady())return!1}return!0}ranges(){throw new Error("not implemented")}getTimeScale(){return new a(this._chartWidget.model().timeScale())}_createStudy(e){return Promise.reject("Pine and java studies are not supported")}_makeSubscriptionFromDelegate(e){return{subscribe:e.subscribe.bind(e),unsubscribe:e.unsubscribe.bind(e),unsubscribeAll:e.unsubscribeAll.bind(e)}}_prepareEndOfPeriodArgs(){const e=this._chartWidget.model().model(),t=e.timezone(),i=Object(s.ensureNotNull)(e.mainSeries().symbolInfo()),o=e.mainSeries().interval(),a=new n.SessionInfo(t,i.session,i.holidays,i.corrections);return{barBuilder:Object(n.newBarBuilder)(o,a,a),intervalObj:r.Interval.parse(o)}}}},FIi8:function(e,t,i){"use strict";function s(e,...t){return e&&"object"==typeof e?(0===t.length||t.forEach(t=>{null!=t&&"object"==typeof t&&Object.keys(t).forEach(i=>{const n=e[i],o=t[i];if(o===e)return;const a=Array.isArray(o);if(o&&(r(o)||a)){let t;t=a?n&&Array.isArray(n)?n:[]:n&&r(n)?n:{},e[i]=s(t,o)}else void 0!==o&&(e[i]=o)})}),e):e}function r(e){if(!e||"[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);if(!t)return!0;const i=Object.hasOwnProperty.toString,s=t.hasOwnProperty("constructor")&&t.constructor;return"function"==typeof s&&i.call(s)===i.call(Object)}i.r(t),i.d(t,"deepExtend",(function(){return s}))},FKaq:function(e,t,i){"use strict";i.r(t),i.d(t,"SetPriceScaleSelectionStrategyCommand",(function(){return a}));var s=i("Eyy1"),r=i("RDU5"),n=i("MWAT");class o{constructor(e){this._leftScales=e.leftPriceScales().map(e=>e.id()),this._rightScales=e.rightPriceScales().map(e=>e.id())}restorePane(e){this._leftScales.reverse().map(t=>Object(s.ensureNotNull)(e.getPriceScaleById(t))).forEach(t=>e.movePriceScale(t,"left")),this._rightScales.reverse().map(t=>Object(s.ensureNotNull)(e.getPriceScaleById(t))).forEach(t=>e.movePriceScale(t,"right"))}}class a extends r.UndoCommand{constructor(e,t,i){super(i),this._chartModel=e,this._targetStrategy=Object(n.createPriceScaleSelectionStrategy)(t),this._initialState=e.panes().map(e=>new o(e))}redo(){this._chartModel.panes().forEach(e=>e.setPriceScaleSelectionStrategy(this._targetStrategy)),this._chartModel.fullUpdate()}undo(){const e=this._chartModel.panes();for(let t=0;t{e.apply(null,i)}),n.hasOwnProperty(e)&&n[e].fire.apply(n[e],t)}function p(e){a[e]&&console.warn(`Something went wrong: emitOnce called multiple times with same event (${e})`),a[e]=!0,d.apply(null,arguments)}},FZIs:function(e,t,i){"use strict";var s;i.d(t,"a",(function(){return s})),function(e){e.Light="light",e.Dark="dark"}(s||(s={}))},FaJS:function(e,t,i){"use strict";i.r(t),i.d(t,"scaleRatio",(function(){return r})),i.d(t,"priceRangeByScaleRatio",(function(){return n})),i.d(t,"barSpacingByScaleRatio",(function(){return o}));var s=i("Qb4w");function r(e,t){if(t.isLog()||e.isEmpty()||t.isEmpty())return null;const i=function(e){if(e.isEmpty())return null;const t=e.priceRange();if(null===t)return null;const i=t.length();return e.internalHeight()/i}(t);if(null===i)return null;return e.getValidBarSpacing()/Math.max(1e-10,i)}function n(e,t,i){if(e.isLog()||null===i||e.isEmpty())return null;const r=e.priceRange();if(null===r||r.isEmpty())return null;const n=e.internalHeight()/(t/i),o=r.length();if(n===o)return r;const a=(n-o)/2;return new s.PriceRange(r.minValue()-a,r.maxValue()+a)}function o(e,t){if(e.isLog()||null===t||e.isEmpty())return null;const i=e.priceRange();if(null===i)return null;const s=i.length();return e.internalHeight()/s*t}},Fdrt:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererStandardPivotLabel",(function(){return r}));var s=i("VdBB");class r{constructor(e,t,i){this._drawRects=[],this._cacheProvider=e,this._point=t,this._label=i}draw(e,t){const i=this._cacheProvider(t);e.save(),e.setTransform(1,0,0,1,0,0);const s=t.pixelRatio;this._drawRects=[];const r=t=>{const r=i.labelRectByIndex(t),n={left:Math.round(this._point.x-r.width+o),top:Math.round(this._point.y-r.height/2),width:r.width,height:r.height};return e.drawImage(i.canvas(),Math.round(r.left*s),Math.round(r.top*s),r.width*s,r.height*s,Math.round(n.left*s),Math.round(n.top*s),n.width*s,n.height*s),this._drawRects.push(n),r.width},n=this._label.split("/");let o=0;for(let a=0;a0&&(o+=r(e+11)/2),o+=r(e)/2}e.restore()}hitTest(e){for(const t of this._drawRects)if(e.x>=t.left&&e.x<=t.left+t.width&&e.y>=t.top&&e.y<=t.top+t.height)return new s.HitTestResult(s.HitTestResult.REGULAR);return null}}},Fixu:function(e,t,i){"use strict";i.d(t,"c",(function(){return r})),i.d(t,"d",(function(){return n})),i.d(t,"b",(function(){return o})),i.d(t,"a",(function(){return a}));i("Eyy1"),i("dfhE");function s(e,t){0}function r(e){s()}function n(e){s()}function o(e){s()}function a(e){0}},FsE7: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()),this.version=l.version,i.e("lt-pane-views").then(i.t.bind(null,"wgWl",7)).then(({FibTimeZonePaneView:e})=>{ -this._setPaneViews([new e(this,this._model)])})}levelsCount(){return l.LevelsCount}migrateVersion(e,t,i){if(1===e){i.properties.level1.color.setValue(i.properties.baselinecolor.value());for(var s=2;s<=11;s++)i.properties["level"+s].color.setValue(i.properties.linecolor.value());for(s=1;s<=11;s++)i.properties["level"+s].linewidth.setValue(i.properties.linewidth.value()),i.properties["level"+s].linestyle.setValue(i.properties.linestyle.value())}}pointsCount(){return 2}name(){return"Fib Time Zone"}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,"SMr9"))).FibTimezoneDefinitionsViewModel}static createProperties(e){var t=new r("linetoolfibtimezone",e,!1,{range:[1,11]});return l._configureProperties(t),t}static _configureProperties(e){s._configureProperties(e);for(var t=[],i=[],r=1;r<=l.LevelsCount;r++)t.push(e.child("level"+r).child("linewidth")),i.push(e.child("level"+r).child("color"));for(t=[],i=[],r=1;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.version=2,l.LevelsCount=11,t.LineToolFibTimeZone=l},"GD+X":function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));class s{constructor(e,t){this._chartUndoModel=e,this._chartModel=e.model(),this._priceScale=t}getMode(){const e=this._priceScale.properties().childs();return e.percentage.value()?2:e.indexedTo100.value()?3:e.log.value()?1:0}setMode(e){this._priceScale.setMode({percentage:2===e,log:1===e,indexedTo100:3===e})}isInverted(){return this._priceScale.isInverted()}setInverted(e){this._priceScale.properties().childs().isInverted.setValue(e)}getVisiblePriceRange(){return this._priceScale.priceRangeInPrice()}setVisiblePriceRange(e){this._priceScale.setPriceRangeInPrice(e),this._chartModel.lightUpdate()}hasMainSeries(){return this._priceScale.hasMainSeries()}getStudies(){return this._priceScale.getStudies().map(e=>e.id())}currency(){const e=this._priceScale.currency(this._chartModel.availableCurrencies());return null===e?null:{selectedCurrency:e.selectedCurrency,readOnly:e.readOnly}}setCurrency(e){this._chartUndoModel.setPriceScaleCurrency(this._priceScale,e)}unit(){const e=this._priceScale.unit(this._chartModel.availableUnits());return null===e?null:{selectedUnit:e.selectedUnit,readOnly:0===e.availableGroups.size,availableGroups:Array.from(e.availableGroups)}}setUnit(e){this._chartUndoModel.setPriceScaleUnit(this._priceScale,e)}}},GDWD:function(e,t,i){"use strict";i.r(t),i.d(t,"addPlusButtonProperty",(function(){return o})),i.d(t,"restoreAddPlusButtonSettingsValue",(function(){return a}));var s=i("Vdly"),r=i("m/cY");function n(){return s.getBool("add_plus_button",!0)}const o=Object(r.a)(n());function a(){o.setValue(!0),s.remove("add_plus_button")}s.onSync.subscribe(null,()=>o.setValue(n())), -o.listeners().subscribe(null,()=>s.setValue("add_plus_button",o.value()))},GEp6:function(e,t,i){"use strict";function s(e,t,i){var s=t.subtract(e),r=i.subtract(e).dotProduct(s)/s.dotProduct(s);return{coeff:r,distance:e.addScaled(s,r).subtract(i).length()}}Object.defineProperty(t,"__esModule",{value:!0}),t.distanceToLine=s,t.distanceToSegment=function(e,t,i){var r=s(e,t,i);if(0<=r.coeff&&r.coeff<=1)return r;var n=e.subtract(i).length(),o=t.subtract(i).length();return nr||(TradingView.ChartapiMessagerInstances[e].onSeriesTimeframeUpdate(t,u,_,r,o), +a&&setTimeout(a,0))}}}if(this._studyEngine.isTimeScaleExtendedTo(e,1e3*i))p();else{var m=TradingView.ChartapiMessagerInstances[e].seriesCompleted,f=TradingView.ChartapiMessagerInstances[e].seriesError;void 0!==this._setVisibleRangeTimeout[e]&&clearTimeout(this._setVisibleRangeTimeout[e]),this._setVisibleRangeTimeout[e]=setTimeout(function(){delete this._setVisibleRangeTimeout[e],m.subscribe(null,g,!0),f.subscribe(null,v,!0),this._studyEngine.ensureExtendedTo(t,e,1e3*i)}.bind(this),0)}function g(e,i){e===t&&i===u&&(m.unsubscribe(null,g),f.unsubscribe(null,v),p())}function v(e,i){e===t&&i===u&&m.unsubscribe(null,g)}},JSServer.ChartApi.prototype._applyTimeFrame=function(e,t,i,s,o){var a,l,c={},h=!0;if(o.type===p.PeriodBack){var u=this._studyEngine.getSeriesLastBarTime(e,i);if(null===u)return;l=u/1e3;var d=n.parse(o.value),m=this._symbolIdCache[this._makeSymbolKey(e,t)].symbolInfo;a=r.alignPeriodsBackForVisibleRange(m.session,m.holidays,m.corrections,d.letter(),d.multiplier(),1,u)/1e3;var f=_(this._studyEngine.getSeriesInterval(e,i),m);null!==f&&(l=f.timeToExchangeTradingDay(1e3*l)/1e3,a=f.timeToExchangeTradingDay(1e3*a)/1e3),c={applyDefaultRightMargin:!0},h=!1}else a=o.from,l=o.to;this.setVisibleTimeRange(e,i,a,l,h,c)},JSServer.ChartApi.prototype.modifySeries=function(e,t,i,s,r,n,o,a){i=i||"";var l=this;this._notificationHandlers[e][t]=new h((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);f(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 h(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:_})).then(o).catch(p);let f="{0}/{1}/charts?client={2}&user={3}".format(h,encodeURIComponent(u),encodeURIComponent(l),encodeURIComponent(c));null!=_&&(f+="&chart="+encodeURIComponent(_)),$.ajax({url:f,data:m,type:"POST",crossDomain:!0}).done(e=>{const t=Object(r.parseJSONorNot)(e);if("ok"!==t.status)return a.logWarn("Chart save request failed: "+t.message),void p();o(t.id)}).fail(()=>{p()})}function w(e,t,i){const s=t=>{const i=JSON.parse(t);return i.uid=e.id,i};d?d.getChartContent(e.id).then(e=>{const i=s(e);t(i)}).catch(i):$.ajax({url:"{0}/{1}/charts?client={2}&user={3}&chart={4}".format(h,encodeURIComponent(u),encodeURIComponent(l),encodeURIComponent(c),encodeURIComponent(e.id)),type:"GET",crossDomain:!0}).done(e=>{const i=Object(r.parseJSONorNot)(e);if("ok"!==i.status)return void a.logWarn("Chart load request failed: "+i.message);const n=s(i.data.content);t(n)}).fail(()=>{i&&i()})}function C(e){w(e,e=>{s.emit("chart_load_requested",e)},()=>{a.logWarn("Error loading chart")})}async function P(e){try{if(d)return d.removeStudyTemplate({name:e});const t=await fetch(`${_("study_templates")}&template=${encodeURIComponent(e)}`,{method:"DELETE",credentials:"same-origin"});if(!t.ok)throw new Error(`Remove study template response was not OK. Status: ${t.status}.`);const i=await t.json();if("ok"!==i.status)throw new Error("Remove study template request failed: "+i.message)}catch(t){throw a.logWarn(Object(o.a)(t)),t}}async function x(e){try{if(d){return{content:await d.getStudyTemplateContent({name:e})}}const t=await fetch(`${_("study_templates")}&template=${encodeURIComponent(e)}`,{credentials:"same-origin"});if(!t.ok)throw new Error(`Get study template response was not OK. Status: ${t.status}.`);const i=await t.json();if("ok"!==i.status)throw new Error("Get study template request failed: "+i.message);return i.data}catch(t){throw a.logWarn(Object(o.a)(t)),t}}async function T(e){try{if(d)return d.saveStudyTemplate(e).then(()=>({error:""})).catch(e=>({error:null!=e?Object(o.a)(e):"error"}));const t=new FormData;t.append("name",e.name),t.append("content",e.content);const i=await fetch(_("study_templates"),{method:"POST",body:t,credentials:"same-origin"});if(!i.ok)throw new Error(`Save study template response was not OK. Status: ${i.status}.`);const s=await i.json();return{error:"ok"===s.status?"":s.status}}catch(t){throw a.logWarn(Object(o.a)(t)),t}}async function M(){try{if(p)return p;p=[];const e=e=>(p=e.map(e=>({is_default:!1,name:e.name})),p);if(d)return d.getAllStudyTemplates().then(e);const t=await fetch(_("study_templates"),{method:"GET",credentials:"same-origin"});if(!t.ok)throw new Error(`Study templates list response was not OK. Status: ${t.status}.`);const i=await t.json();if("ok"!==i.status)throw new Error("Study templates list request failed: "+i.message);return e(i.data)}catch(e){throw a.logWarn(Object(o.a)(e)),e}}function I(){p=null}function L(e,t){throw new Error("Not implemented")}function O(e,t){throw new Error("Not implemented")} +function A(e,t){throw new Error("Not implemented")}function E(e,t,i){throw new Error("Not implemented")}function k(e,t,i){throw new Error("Not implemented")}async function D(e){throw new Error("Not implemented")}async function V(e,t){throw new Error("Not implemented")}async function B(e,t){throw new Error("Not implemented")}async function R(e,t,i){throw new Error("Not implemented")}},EsvI:function(e,t,i){"use strict";i.r(t);i("bSeV");var s=i("eJTA"),r=i("wZIs"),n=i("Vdly"),o=i("wVAQ"),a=i("txPx");const l=Object(a.getLogger)("Themes.Provider");let c=null;function h(e){return Object(o.fetch)("/theme/?themeName="+encodeURIComponent(e),{credentials:"include",method:"GET"}).then(e=>e.json()).then(e=>{const t={};return e.content&&(t.content=JSON.parse(e.content)),t})}var u=i("zM7N"),d=i("oiZD");var p=i("YFKU"),_=i("IMMp"),m=i("HGP3");const f={[u.a.Light]:{name:u.a.Light,label:()=>Object(p.t)("Light",{context:"colorThemeName"}),order:2,getThemedColor:e=>Object(m.b)(e)},[u.a.Dark]:{name:u.a.Dark,label:()=>Object(p.t)("Dark",{context:"colorThemeName"}),order:1,getThemedColor:e=>{const t=_[e]||e;return Object(m.b)(t)}}};function g(e){return!e.isPrivate}function v(){return f[d.watchedTheme.value()]||f.light}function b(e){return v().getThemedColor(e)}function S(e,t,i,s,n=!0,o=!1,a=!1){const l=t?Promise.resolve(I(e)):P(e);return l.then(l=>{if(void 0!==l.content){const h=!t;a&&(void 0!==(c=l.content).chartProperties&&Object(r.applyDefaultsOverrides)(c.chartProperties),void 0!==c.mainSourceProperties&&Object(r.applyDefaultsOverrides)(c.mainSourceProperties,void 0,!0,"mainSeriesProperties")),s.applyTheme(l.content,h,i,e,t,n,o)}var c}),l}i.d(t,"isPublicTheme",(function(){return g})),i.d(t,"getCurrentTheme",(function(){return v})),i.d(t,"getThemedColor",(function(){return b})),i.d(t,"loadTheme",(function(){return S})),i.d(t,"restoreTheme",(function(){return y})),i.d(t,"savedThemeName",(function(){return w})),i.d(t,"syncTheme",(function(){return C})),i.d(t,"getTheme",(function(){return P})),i.d(t,"getThemeNames",(function(){return x})),i.d(t,"getStdThemeNames",(function(){return T})),i.d(t,"isStdThemeName",(function(){return M})),i.d(t,"getStdTheme",(function(){return I})),i.d(t,"getStdThemedValue",(function(){return L})),i.d(t,"isStdThemedDefaultValue",(function(){return O})),i.d(t,"saveTheme",(function(){return A})),i.d(t,"removeTheme",(function(){return E})),i.d(t,"isThemeExist",(function(){return k})),i.d(t,"translateStdThemeName",(function(){return D})),i.d(t,"isStdTheme",(function(){return V})),i.d(t,"extractThemeFromModel",(function(){return B})),i.d(t,"DEFAULT_THEME",(function(){return"light"})),i.d(t,"themes",(function(){return f}));function y(){Object(d.setTheme)(Object(n.getValue)("current_theme.name")||"light")}function w(){return Object(n.getValue)("current_theme.name")||null}function C(){Object(n.setValue)("current_theme.name",v().name,{forceFlush:!0})}function P(e){return h(e)}function x(){return c||Object(o.fetch)("/themes/",{credentials:"include",method:"GET"}).then(e=>(c=e.json(),c))}function T(){return u.c()} +function M(e){return T().includes(e)}function I(e){return u.b(e)||{content:void 0}}function L(e,t){const i=t||v().name,s=u.b(i),r=0!==e.length&&e.split(".");return s&&s.content&&r?r.reduce((e,t)=>e[t],s.content):null}function O(e,t,i){const r=L(e,i);return null!==r&&Object(s.areEqualRgba)(Object(s.parseRgba)(r),Object(s.parseRgba)(String(t)))}function A(e,t){return function(e,t){const i=new FormData;return i.append("content",JSON.stringify(t)),i.append("name",e),c=null,Object(o.fetch)("/save-theme/",{credentials:"include",method:"POST",body:i}).then(e=>e.json(),e=>l.logError(e))}(e,t)}function E(e){return function(e){const t=new FormData;return t.append("name",e),c=null,Object(o.fetch)("/remove-theme/",{credentials:"include",method:"POST",body:t}).then(e=>e.json(),e=>l.logError(e))}(e)}function k(e){return function(e){return h(e).then(e=>Boolean(e.content))}(e)}function D(e){return u.e(e)}function V(e){return u.d(e)}function B(e){return{content:{chartProperties:{paneProperties:e.model().properties().paneProperties.state(),scalesProperties:e.model().properties().scalesProperties.state()},sessions:e.model().sessions().properties().state(),mainSourceProperties:e.model().mainSeries().properties().state()}}}},ExCE:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var s=i("VdBB");class r{constructor(){this._bars=[]}hitTest(e){const t=this._bars,i=this._getBarSpacing(),s=i/2;if(0===t.length)return null;const r=this._getTolerance(),n=t[0],o=t[t.length-1];if(e.xo.time+s+r)return null;let a=0,l=t.length-1,c=-1;for(;a<=l;){const i=Math.floor((a+l)/2),h=t[i];let u=s;if(h!==n&&h!==o||(u+=r),Math.abs(h.time-e.x)<=u){c=i;break}e.x-h.time>s?a=i+1:l=i-1}if(-1!==c){const n=Math.ceil(r/i);if(0!==n){const i=Math.max(0,c-n),o=Math.min(t.length-1,c+n);for(let n=i;n<=o;n++)if(Math.abs(e.x-t[n].time)<=s+r&&this._isPointAtBar(t[n],e.y,r))return this._getHitTest()}else if(this._isPointAtBar(t[c],e.y,r))return this._getHitTest()}return null}_getHitTest(){return new s.HitTestResult(s.HitTestResult.REGULAR)}_isPointAtBar(e,t,i){const s=Math.min(e.high,e.low),r=Math.max(e.high,e.low);return s-i<=t&&t<=r+i}}},EyEd:function(e,t,i){"use strict";var s=i("lCO3").Version,r=i("txPx").getLogger("Chart.StudyMigration");function n(e){this._studyId=e,this._maxToVers=s.ZERO,this._maxFromVers=s.ZERO,this._migrs=[]}n.prototype.addMigration=function(e,t,i){var r=s.parse(e),n=s.parse(t);r.isGreater(this._maxFromVers)&&(this._maxFromVers=r),n.isGreater(this._maxToVers)&&(this._maxToVers=n),this._migrs.push({fromVers:r,toVers:n,rules:i})},n.prototype.updateInputs=function(e,t,i){if(!i)return i;for(var s=TradingView.clone(i),n=e;n.isLess(t);){var o=this._findMigration(n);if(null==o)break;if(r.logNormal("Migrating study inputs from "+o.fromVers+" to "+o.toVers+" version, studyId: "+this._studyId+", migration: "+JSON.stringify(o)+", inputs: "+JSON.stringify(i)),s=this._applyMigration(s,o),!n.isLess(o.toVers))throw new Error("Problems in study migration process... Possible infinite cycle has been detected and stopped.") +;n=o.toVers}return n>e&&r.logNormal("Study inputs migration is done, studyId: "+this._studyId+", inputs: "+JSON.stringify(s)),s},n.prototype._findMigration=function(e){for(var t=-1,i=this._maxFromVers,s=0;s=0||t.indexOf(e)>=0},n._applyInputChangedMinMaxRule=function(e,t){if("adjustValIfNeeded"!==t.action)throw new Error("Unknown action "+t.action+" for rule with type "+t.type);var i=e[t.inputId];return it.maxVal&&(e[t.inputId]=t.maxVal),r.logNormal("Input "+t.inputId+"="+i+" adjusted to value "+e[t.inputId]),e},n._applyInputChangedOptionsRule=function(e,t){if(!(["text"].indexOf(t.inputType)>=0&&"resetToDefValIfNeeded"===t.action))throw new Error("Unexpected rule.inputType="+t.inputType+" in rule.action="+t.action);var i=e[t.inputId];return t.options.indexOf(i)<0&&(e[t.inputId]=t.defVal,r.logNormal("Input "+t.inputId+"="+i+" reset to default value "+t.defVal)),e},e.exports=n},Eyy1:function(e,t,i){"use strict";function s(e){if(void 0===e)throw new Error("Value is undefined");return e}function r(e){if(null===e)throw new Error("Value is null");return e}Object.defineProperty(t,"__esModule",{value:!0}),t.ensureNever=t.ensure=t.ensureNotNull=t.ensureDefined=t.assert=void 0,t.assert=function(e,t){if(!e)throw new Error("Assertion failed"+(t?": "+t:""))},t.ensureDefined=s,t.ensureNotNull=r,t.ensure=function(e){ +return r(s(e))},t.ensureNever=function(e){}},F58L:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyTemplates",(function(){return p}));var s=i("zUrt"),r=i("JWMC"),n=i("aIyQ"),o=i.n(n),a=i("hY0g"),l=i.n(a),c=i("fZEr"),h=i("txPx");const u=Object(h.getLogger)("Platform.StudyTemplates"),d={confirmDelete:window.t("Do you really want to delete Study Template '{0}' ?")};class p{constructor(e){this._chartWidgetCollection=e.chartWidgetCollection,this._favoriteStudyTemplatesService=e.favoriteStudyTemplatesService,window.loginStateChange.subscribe(null,s.backend.invalidateStudyTemplatesList),this._list=new l.a([]),this._onChange=new o.a,this._list.subscribe(()=>this._onChange.fire())}findRecordByName(e){return this._list.value().find(t=>t.name===e)||null}showSaveAsDialog(){const e=this._chartWidgetCollection.activeChartWidget.value().model();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(13),i.e(15),i.e(18),i.e(19),i.e(21),i.e(24),i.e(34),i.e(88),i.e(0),i.e(5),i.e(12),i.e(17),i.e("study-template-dialog")]).then(i.bind(null,"IDfV")).then(t=>{new t.StudyTemplateSaver({controller:e,onSave:e=>{this._list.setValue(e)}}).show()})}applyTemplate(e){const t=this.findRecordByName(e);null!==t?window.runOrSignIn(()=>{const e=this._chartWidgetCollection.activeChartWidget.value(),i=i=>{Object(r.trackEvent)("GUI","Load Study Template"),e.model().applyStudyTemplate(JSON.parse(i.content),t.name)};void 0!==t.id?t.is_default?s.backend.getStandardStudyTemplateContentById(t.id,i):s.backend.getStudyTemplateContentById(t.id,i):s.backend.getStudyTemplateContent(t.name).then(i)},{source:"Study templates apply"}):u.logNormal(`Template ${e} not found in cache`)}deleteStudyTemplate(e){const t=this.findRecordByName(e);null!==t?this._removeTemplate(t):u.logNormal(`Template ${e} not found in cache`)}list(){return this._list.value()}getOnChange(){return this._onChange}refreshStudyTemplateList(e){s.backend.getStudyTemplatesList().then(t=>{this._list.setValue(t),void 0!==e&&e()})}invalidate(){s.backend.invalidateStudyTemplatesList()}_removeTemplate(e){window.runOrSignIn(()=>{Object(c.a)({text:d.confirmDelete.format(e.name),onConfirm:({dialogClose:t})=>new Promise(i=>{const r=()=>{this.refreshStudyTemplateList(()=>{const s=this.list();this._list.setValue(s.filter(t=>t!==e)),this._favoriteStudyTemplatesService&&this._favoriteStudyTemplatesService.remove(e.name),i(),t()})};s.backend.invalidateStudyTemplatesList(),void 0!==e.id?s.backend.removeStudyTemplateById(e.id,r):s.backend.removeStudyTemplate(e.name).then(r)})})},{source:"Study templates delete"})}}},FA0h:function(e,t,i){"use strict";function s(){return Promise.all([i.e("redux"),i.e("react"),i.e(1),i.e(2),i.e(3),i.e(6),i.e(8),i.e(9),i.e(21),i.e(22),i.e(41),i.e(72),i.e(75),i.e(0),i.e(5),i.e(10),i.e(14),i.e(29),i.e(37),i.e("symbol-search-dialog")]).then(i.bind(null,"GcSm"))}i.d(t,"a",(function(){return s}))},FBsw:function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayPriceAxisView",(function(){return o}));var s=i("KcY8"),r=i("n5al"),n=i("oXaB");class o extends s.a{constructor(e){super(), +this._source=e}_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const s=this._source.lastValueData("close",!1);if(s.noData)return;const r=this._source.model(),o=this._source.priceScale();if(null===o)return;if(!r.isPriceScaleVisible(o))return;i.background=s.color,i.textColor=this.generateTextColor(s.color),i.coordinate=s.coordinate,i.floatCoordinate=s.floatCoordinate;const a=this._source.model().properties().scalesProperties;if(a.showSeriesLastValue.value()){if(a.seriesLastValueMode.value()!==n.PriceAxisLastValueMode.LastPriceAndPercentageValue)e.text=s.text,e.secondLine="";else{const t=o.isPercentage();e.text=t?s.formattedPricePercentage:s.formattedPriceAbsolute,e.secondLine=t?s.formattedPriceAbsolute:s.formattedPricePercentage}e.visible=!0}t.text="",a.showSymbolLabels.value()&&(t.text=this._paneText(),t.visible=t.text.length>0)}_paneText(){let e="";if(this._source.model().properties().scalesProperties.showSymbolLabels.value()){const t=this._source.symbolInfo();e+=(t&&Object(r.symbolCurrentContract)(t)||this._source.symbol())+" "}return e.trim()}}},FBuY:function(e,t,i){"use strict";i.r(t),i.d(t,"TVXWindowEvents",(function(){return o}));i("HbRj");var s=i("txPx"),r=i("VVxS");const n=Object(s.getLogger)("XWindowEvents");var o;!function(e){const t="tvxwevents.",i={};let s;window.BroadcastChannel?(s=new BroadcastChannel("tvxwevents"),s.addEventListener("message",(function(e){const{data:{event:t,value:s}}=e;i[t]&&i[t].forEach(e=>{e(s)})})),function(){const e=[],i=performance.now();for(let n=0;n{t(e.newValue)});r.TVLocalStorage.removeItem(n)})),e.on=function(e,t){i[e]||(i[e]=[]),i[e].push(t)},e.off=function(e,t){if(!i[e])return;const s=i[e].indexOf(t);-1!==s&&(1===i[e].length?delete i[e]:i[e].splice(s,1))},e.emit=function(e,i=Date.now()){try{s?s.postMessage({event:e,value:i}):r.TVLocalStorage.setItem(t+e,i.toString())}catch(o){n.logError(o.message)}}}(o||(o={}))},FDyI:function(e,t,i){"use strict";i.r(t);var s=i("Eyy1"),r=i("LxhU"),n=i("IiTo"),o=i("/bs+");class a{constructor(e){this._timeScale=e}coordinateToTime(e){const t=this._timeScale.coordinateToIndex(e);return this._timeScale.indexToTimePoint(t)}barSpacing(){return this._timeScale.barSpacing()}rightOffset(){return this._timeScale.rightOffset()}width(){return this._timeScale.width()}}var l=i("aIyQ"),c=i.n(l),h=i("96Yh"),u=i("pOzK"),d=i("CsKN");i.d(t,"ChartWidgetApiBase",(function(){return p}));class p{constructor(e){ +this._visibleBarsChanged=new c.a,this._ranges=null,this._chartWidget=e}getPriceToBarRatio(){return this._chartWidget.model().model().mainSeriesScaleRatioProperty().value()}setPriceToBarRatio(e,t){const i=this._chartWidget.model(),s=i.model(),r=s.mainSeriesScaleRatioProperty();(null==t?void 0:t.disableUndo)?new d.SetScaleRatioPropertiesCommand(r,e,"",s).redo():i.setScaleRatioProperty(r,e,"Change Price to Bar Ratio")}isPriceToBarRatioLocked(){return this._chartWidget.model().model().mainSeries().priceScale().isLockScale()}setPriceToBarRatioLocked(e,t){const i=this._chartWidget.model(),s=i.model(),r=s.mainSeries().priceScale();(null==t?void 0:t.disableUndo)?new u.SetPriceScaleModeCommand({lockScale:e},r,"",s).redo():i.setPriceScaleMode({lockScale:e},r,"Toggle Lock Scale")}onDataLoaded(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().dataEvents().completed())}onSymbolChanged(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().dataEvents().symbolResolved())}onIntervalChanged(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().onIntervalChanged())}onVisibleRangeChanged(){return this._makeSubscriptionFromDelegate(this._visibleBarsChanged)}onChartTypeChanged(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().onStyleChanged())}whenChartReady(e){this._chartWidget.withModel(this,e)}crossHairMoved(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().crossHairSource().moved())}setChartType(e){const t=this._chartWidget.model().mainSeries().properties().style;this._chartWidget.model().setChartStyleProperty(t,e,"Change Series Style")}getAllStudies(){return this._chartWidget.model().model().allStudies(!0).map(h.studyEntityInfo)}getAllPanesHeight(){const e=this._chartWidget.model().model().panes();if(this._chartWidget.isMaximizedPane()){let t=0,i=0;e.forEach(e=>{t+=e.height(),i+=e.stretchFactor()});const s=i/t;return e.map(e=>Math.round(e.stretchFactor()/s*100)/100)}return e.map(e=>e.height())}setAllPanesHeight(e){const t=this._chartWidget.model().model(),i=t.panes();Object(s.assert)(i.length===e.length,"There`s a mismatch between the number of heights you provided and the number of panes.");const r=i.reduce((e,t)=>e+t.stretchFactor(),0)/e.reduce((e,t)=>e+t);e.forEach((e,t)=>{const s=e*r;i[t].setStretchFactor(s)}),t.fullUpdate()}sessions(){return this._chartWidget.model().model().sessions()}getTimeScaleLogicalRange(){return this._chartWidget.model().timeScale().logicalRange()}exportData(e){return i.e("export-data").then(i.bind(null,"SIoL")).then(t=>t.exportData(this._chartWidget.model().model(),e))}barTimeToEndOfPeriod(e){const t=this._prepareEndOfPeriodArgs();return Object(o.a)(t.barBuilder,e,t.intervalObj)}endOfPeriodToBarTime(e){const t=this._prepareEndOfPeriodArgs();return Object(o.b)(t.barBuilder,e,t.intervalObj)}properties(){return this._chartWidget.properties()}setBarSpacing(e){this._chartWidget.model().timeScale().setBarSpacing(e)}scrollChartByBar(e){ +this._chartWidget.model().scrollChartByBar(e)}mergeAllScales(e){this._chartWidget.model().mergeAllScales(e)}chartPainted(){return this._chartWidget.chartPainted()}axesSizeReady(){for(const e of this._chartWidget.paneWidgets()){for(const t of e.leftPriceAxisesContainer().axes())if(!t.sizeReady())return!1;for(const t of e.rightPriceAxisesContainer().axes())if(!t.sizeReady())return!1}return!0}ranges(){throw new Error("not implemented")}getTimeScale(){return new a(this._chartWidget.model().timeScale())}_createStudy(e){return Promise.reject("Pine and java studies are not supported")}_makeSubscriptionFromDelegate(e){return{subscribe:e.subscribe.bind(e),unsubscribe:e.unsubscribe.bind(e),unsubscribeAll:e.unsubscribeAll.bind(e)}}_prepareEndOfPeriodArgs(){const e=this._chartWidget.model().model(),t=e.timezone(),i=Object(s.ensureNotNull)(e.mainSeries().symbolInfo()),o=e.mainSeries().interval(),a=new n.SessionInfo(t,i.session,i.holidays,i.corrections);return{barBuilder:Object(n.newBarBuilder)(o,a,a),intervalObj:r.Interval.parse(o)}}}},FIi8:function(e,t,i){"use strict";function s(e,...t){return e&&"object"==typeof e?(0===t.length||t.forEach(t=>{null!=t&&"object"==typeof t&&Object.keys(t).forEach(i=>{const n=e[i],o=t[i];if(o===e)return;const a=Array.isArray(o);if(o&&(r(o)||a)){let t;t=a?n&&Array.isArray(n)?n:[]:n&&r(n)?n:{},e[i]=s(t,o)}else void 0!==o&&(e[i]=o)})}),e):e}function r(e){if(!e||"[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);if(!t)return!0;const i=Object.hasOwnProperty.toString,s=t.hasOwnProperty("constructor")&&t.constructor;return"function"==typeof s&&i.call(s)===i.call(Object)}i.r(t),i.d(t,"deepExtend",(function(){return s}))},FKaq:function(e,t,i){"use strict";i.r(t),i.d(t,"SetPriceScaleSelectionStrategyCommand",(function(){return a}));var s=i("Eyy1"),r=i("RDU5"),n=i("MWAT");class o{constructor(e){this._leftScales=e.leftPriceScales().map(e=>e.id()),this._rightScales=e.rightPriceScales().map(e=>e.id())}restorePane(e){this._leftScales.reverse().map(t=>Object(s.ensureNotNull)(e.getPriceScaleById(t))).forEach(t=>e.movePriceScale(t,"left")),this._rightScales.reverse().map(t=>Object(s.ensureNotNull)(e.getPriceScaleById(t))).forEach(t=>e.movePriceScale(t,"right"))}}class a extends r.UndoCommand{constructor(e,t,i){super(i),this._chartModel=e,this._targetStrategy=Object(n.createPriceScaleSelectionStrategy)(t),this._initialState=e.panes().map(e=>new o(e))}redo(){this._chartModel.panes().forEach(e=>e.setPriceScaleSelectionStrategy(this._targetStrategy)),this._chartModel.fullUpdate()}undo(){const e=this._chartModel.panes();for(let t=0;t{e.apply(null,i)}),n.hasOwnProperty(e)&&n[e].fire.apply(n[e],t)}function p(e){a[e]&&console.warn(`Something went wrong: emitOnce called multiple times with same event (${e})`),a[e]=!0,d.apply(null,arguments)}},FZIs:function(e,t,i){"use strict";var s;i.d(t,"a",(function(){return s})),function(e){e.Light="light",e.Dark="dark"}(s||(s={}))},FaJS:function(e,t,i){"use strict";i.r(t),i.d(t,"scaleRatio",(function(){return r})),i.d(t,"priceRangeByScaleRatio",(function(){return n})),i.d(t,"barSpacingByScaleRatio",(function(){return o}));var s=i("Qb4w");function r(e,t){if(t.isLog()||e.isEmpty()||t.isEmpty())return null;const i=function(e){if(e.isEmpty())return null;const t=e.priceRange();if(null===t)return null;const i=t.length();return e.internalHeight()/i}(t);if(null===i)return null;return e.getValidBarSpacing()/Math.max(1e-10,i)}function n(e,t,i){if(e.isLog()||null===i||e.isEmpty())return null;const r=e.priceRange();if(null===r||r.isEmpty())return null;const n=e.internalHeight()/(t/i),o=r.length();if(n===o)return r;const a=(n-o)/2;return new s.PriceRange(r.minValue()-a,r.maxValue()+a)}function o(e,t){if(e.isLog()||null===t||e.isEmpty())return null;const i=e.priceRange();if(null===i)return null;const s=i.length();return e.internalHeight()/s*t}},Fdrt:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererStandardPivotLabel",(function(){return r}));var s=i("VdBB");class r{constructor(e,t,i){this._drawRects=[],this._cacheProvider=e,this._point=t,this._label=i}draw(e,t){const i=this._cacheProvider(t);e.save(),e.setTransform(1,0,0,1,0,0);const s=t.pixelRatio;this._drawRects=[];const r=t=>{const r=i.labelRectByIndex(t),n={left:Math.round(this._point.x-r.width+o),top:Math.round(this._point.y-r.height/2),width:r.width,height:r.height};return e.drawImage(i.canvas(),Math.round(r.left*s),Math.round(r.top*s),r.width*s,r.height*s,Math.round(n.left*s),Math.round(n.top*s),n.width*s,n.height*s),this._drawRects.push(n),r.width},n=this._label.split("/");let o=0;for(let a=0;a0&&(o+=r(e+11)/2),o+=r(e)/2}e.restore()}hitTest(e){for(const t of this._drawRects)if(e.x>=t.left&&e.x<=t.left+t.width&&e.y>=t.top&&e.y<=t.top+t.height)return new s.HitTestResult(s.HitTestResult.REGULAR);return null}}},Fixu:function(e,t,i){"use strict";i.d(t,"c",(function(){return r})),i.d(t,"d",(function(){return n})),i.d(t,"b",(function(){return o})),i.d(t,"a",(function(){return a}));i("Eyy1"),i("dfhE");function s(e,t){0}function r(e){s()}function n(e){s()}function o(e){s()}function a(e){0}},FsE7: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()),this.version=l.version, +i.e("lt-pane-views").then(i.t.bind(null,"wgWl",7)).then(({FibTimeZonePaneView:e})=>{this._setPaneViews([new e(this,this._model)])})}levelsCount(){return l.LevelsCount}migrateVersion(e,t,i){if(1===e){i.properties.level1.color.setValue(i.properties.baselinecolor.value());for(var s=2;s<=11;s++)i.properties["level"+s].color.setValue(i.properties.linecolor.value());for(s=1;s<=11;s++)i.properties["level"+s].linewidth.setValue(i.properties.linewidth.value()),i.properties["level"+s].linestyle.setValue(i.properties.linestyle.value())}}pointsCount(){return 2}name(){return"Fib Time Zone"}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,"SMr9"))).FibTimezoneDefinitionsViewModel}static createProperties(e){var t=new r("linetoolfibtimezone",e,!1,{range:[1,11]});return l._configureProperties(t),t}static _configureProperties(e){s._configureProperties(e);for(var t=[],i=[],r=1;r<=l.LevelsCount;r++)t.push(e.child("level"+r).child("linewidth")),i.push(e.child("level"+r).child("color"));for(t=[],i=[],r=1;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.version=2,l.LevelsCount=11,t.LineToolFibTimeZone=l},"GD+X":function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));class s{constructor(e,t){this._chartUndoModel=e,this._chartModel=e.model(),this._priceScale=t}getMode(){const e=this._priceScale.properties().childs();return e.percentage.value()?2:e.indexedTo100.value()?3:e.log.value()?1:0}setMode(e){this._priceScale.setMode({percentage:2===e,log:1===e,indexedTo100:3===e})}isInverted(){return this._priceScale.isInverted()}setInverted(e){this._priceScale.properties().childs().isInverted.setValue(e)}getVisiblePriceRange(){return this._priceScale.priceRangeInPrice()}setVisiblePriceRange(e){this._priceScale.setPriceRangeInPrice(e),this._chartModel.lightUpdate()}hasMainSeries(){return this._priceScale.hasMainSeries()}getStudies(){return this._priceScale.getStudies().map(e=>e.id())}currency(){const e=this._priceScale.currency(this._chartModel.availableCurrencies());return null===e?null:{selectedCurrency:e.selectedCurrency,readOnly:e.readOnly}}setCurrency(e){this._chartUndoModel.setPriceScaleCurrency(this._priceScale,e)}unit(){const e=this._priceScale.unit(this._chartModel.availableUnits());return null===e?null:{selectedUnit:e.selectedUnit,readOnly:0===e.availableGroups.size,availableGroups:Array.from(e.availableGroups)}}setUnit(e){this._chartUndoModel.setPriceScaleUnit(this._priceScale,e)}}},GDWD:function(e,t,i){"use strict";i.r(t),i.d(t,"addPlusButtonProperty",(function(){return o})),i.d(t,"restoreAddPlusButtonSettingsValue",(function(){return a}));var s=i("Vdly"),r=i("m/cY");function n(){return s.getBool("add_plus_button",!0)}const o=Object(r.a)(n());function a(){o.setValue(!0),s.remove("add_plus_button")} +s.onSync.subscribe(null,()=>o.setValue(n())),o.listeners().subscribe(null,()=>s.setValue("add_plus_button",o.value()))},GEp6:function(e,t,i){"use strict";function s(e,t,i){var s=t.subtract(e),r=i.subtract(e).dotProduct(s)/s.dotProduct(s);return{coeff:r,distance:e.addScaled(s,r).subtract(i).length()}}Object.defineProperty(t,"__esModule",{value:!0}),t.distanceToLine=s,t.distanceToSegment=function(e,t,i){var r=s(e,t,i);if(0<=r.coeff&&r.coeff<=1)return r;var n=e.subtract(i).length(),o=t.subtract(i).length();return n=0?e.vertOffset:e.vertOffset-e.shapeHeight}}),D.set("PaneRendererLabelDown",class extends M{_calcBoundingBox(e){const t=e.x-e.shapeWidth/2,i=e.x+e.shapeWidth/2,s=e.y-e.shapeHeight+e.vertOffset,n=e.y+e.vertOffset,o=new r.Point(t,s),a=new r.Point(i,n);return Object(r.box)(o,a)}_drawItemShape(e,t,i){const s=t.pixelRatio,r=this._lineWidth(t)%2?.5:0,n=Math.max(1,Math.floor(s))%2?.5:0,o=this._getArrowSize(i);let a=Math.round(o*s);(n+a)%1!=r%1&&(a+=.5);let l=Math.round(i.shapeWidth/2*s);(n+l)%1!=r%1&&(l+=.5);const c=Math.round(i.x*s)+n,h=Math.round((i.y+i.vertOffset)*s)+r,u=c+a,d=Math.round((i.y+i.vertOffset-o)*s)+r,p=c-a,_=c+l,m=Math.round((i.y+i.vertOffset-i.shapeHeight)*s)+r,f=c-l;e.moveTo(u,d),e.lineTo(c,h),e.lineTo(p,d),i.shapeWidth<=2*o?(e.lineTo(f,d),this._drawCorner(e,f,m,x.leftUp,s),this._drawCorner(e,_,m,x.rightUp,s),e.lineTo(_,d)):(this._drawCorner(e,f,d,x.leftDown,s),this._drawCorner(e,f,m,x.leftUp,s),this._drawCorner(e,_,m,x.rightUp,s),this._drawCorner(e,_,d,x.rightDown,s)),e.lineTo(u,d)}_getVerticalTextOffset(e){return-e.shapeHeight/2-this._getArrowSize(e)/2}_calcVertOffset(e){return Math.sign(e.vertOffset)<=0?e.vertOffset:e.vertOffset+e.shapeHeight}}),D.set("PaneRendererSquare",L),D.set("PaneRendererTriangleApexUp",class extends O{_drawItemShape(e,t,i){const s=i.width,r=i.height,n=Math.round(r/3),o=i.vertOffset-2*n,a=t.pixelRatio,l=this._lineWidth(t)%2?.5:0,c=Math.max(1,Math.floor(a)),h=c%2?.5:0;let u=Math.round(s*a);u%2!=c%2&&(u+=1);const d=Math.round(i.x*a)+h,p=Math.round((i.y+o)*a),_=d+u/2,m=Math.round((i.y+o+r)*a)+l,f=d-u/2;e.moveTo(d,p),e.lineTo(_,m),e.lineTo(f,m),e.lineTo(d,p)}}),D.set("PaneRendererTriangleApexDown",class extends O{_drawItemShape(e,t,i){const s=i.width,r=i.height,n=Math.round(r/3),o=i.vertOffset-n,a=t.pixelRatio,l=this._lineWidth(t)%2?.5:0,c=Math.max(1,Math.floor(a)),h=c%2?.5:0;let u=Math.round(s*a);u%2!=c%2&&(u+=1);const d=Math.round(i.x*a)+h,p=Math.round((i.y+o)*a)+l,_=d+u/2,m=Math.round((i.y+o+r)*a),f=d-u/2;e.moveTo(f,p),e.lineTo(_,p),e.lineTo(d,m),e.lineTo(f,p)}}),D.set("PaneRendererXCross",A);class V{constructor(e,t,i,s){this._items=[],this._invalidated=!1,this._renderer=null,this._isMarkersEnabled=n.enabled("source_selection_markers"),this._selectionData=null,this._plotIndex=null,this._topCoord=0,this._bottomCoord=0,this._study=e,this._series=t,this._model=i,this._plotName=s;const r=e.metaInfo().plots;for(let n=0;n=0;n--)e.test(s[n])&&r.push(s[n]),e.lastIndex=0;return r},sync:function(e){null!==e?(i?T(i.initialSettings||{}):h()?(function(){if(TradingView.onWidget()&&a.includes(window.location.host))for(var e=r.length;e--;){var t=r.key(e);if(0===t.indexOf("tradingview.")){var i=t.replace("tradingview.",m+".");r.setItem(i,r.getItem(t)),r.removeItem(t)}}}(),function(){f={};for(var e=m+".",t=!o.enabled("save_chart_properties_to_local_storage"),i=r.length;i--;){var s=r.key(i);if(s&&s.substring(0,e.length)===e){var n=s.substring(e.length);t&&!x(n)||(f[n]=r.getItem(s))}}}()):T(e||{}),M.fire()):!0},onSync:M,setSettingsAdapter:function(e){i=e}}}();e&&e.exports&&(e.exports=c)}).call(this,i("YuTi")(e))},VgjZ:function(e,t,i){"use strict";i.r(t),i.d(t,"PriceAxisRendererOptionsProvider",(function(){return n}));var s=i("XlJ7"),r=i("zDbI");class n{constructor(e){this._rendererOptions={borderSize:1,tickLength:5,fontSize:NaN,font:"",color:"",paneBackgroundColor:"",paddingBottom:0,paddingInner:0,paddingOuter:0,paddingTop:0,lineSpacing:0},this._chartModel=e}options(){const e=this._rendererOptions,t=this._chartModel.properties(),i=t.scalesProperties.fontSize.value();return e.fontSize!==i&&(e.fontSize=i,e.font=Object(s.makeFont)(i,r.CHART_FONT_FAMILY,""),e.paddingTop=2.5/12*i,e.paddingBottom=e.paddingTop,e.paddingInner=i/12*e.tickLength,e.paddingOuter=i/12*e.tickLength,e.lineSpacing=2/12*i),e.color=t.scalesProperties.textColor.value(),e.paneBackgroundColor=t.paneProperties.background.value(),this._rendererOptions}}},ViuT:function(e,t,i){"use strict";i.r(t);var s=i("Eyy1"),r=i("Kxc7"),n=i("jCNj"),o=i("Y7w9"),a=i("OLhd"),l=i("tqok"),c=i("/bs+");function h(e){return 60*e*60*1e3}function u(e){return 60*e*1e3}const d=[{divisor:1,weight:20},{divisor:(p=1,1e3*p),weight:19},{divisor:u(1),weight:20},{divisor:u(5),weight:21},{divisor:u(30),weight:22},{divisor:h(1),weight:30},{divisor:h(3),weight:31},{divisor:h(6),weight:32},{divisor:h(12),weight:33}];var p;function _(e,t){if(null!==t){if(e.getUTCFullYear()!==t.getUTCFullYear())return 70;if(e.getUTCMonth()!==t.getUTCMonth())return 60;if(e.getUTCDate()!==t.getUTCDate())return 50;const i=t.getTime(),s=e.getTime();for(let e=d.length-1;e>=0;--e)if(Math.floor(i/d[e].divisor)!==Math.floor(s/d[e].divisor))return d[e].weight}return 20}function m(e,t,i=0){if(0===e.length)return[];let s=i,r=i;const n=[] -;for(;s=t.length?(n.push({old:s,new:l.a}),s++):e[s].timeMs===t[r].timeMs?(s!==r&&n.push({old:s,new:r}),s++,r++):e[s].timeMs{if(e.new===t.new&&e.new===l.a)return e.old-t.old;if(e.new===l.a)return-1;if(t.new===l.a)return 1;const i=e.old-e.new,s=t.old-t.new;return i>0?s>0?e.old-t.old:-1:s<0?t.new-e.new:1})}function f(e,t){return{span:e.markWeight,time:e.displayTime,index:t}}i.d(t,"SessionTimeScale",(function(){return v}));const g=r.enabled("end_of_period_timescale_marks");class v{constructor(){this._completed=!0,this._mainSymbolExtrapolator=null,this._pointDataByTimePoint=new Map,this._seriesIds=new Set,this._displayTimezone=null,this._minFutureBarsCount=0,this._sortedTimePoints=[]}destroy(){this.clearTimeScale()}setCompleted(e){this._completed=e}isCompleted(){return this._completed}clearTimeScale(){return this._pointDataByTimePoint.clear(),this._seriesIds.clear(),this._sortedTimePoints=[],{baseIndex:0,pointsIndex:0,indexChange:[],marks:[],points:[]}}indexOfTime(e){if(0===this._sortedTimePoints.length)return null===this._mainSymbolExtrapolator?null:this._mainSymbolExtrapolator.indexOfTime(e);if(ethis._sortedTimePoints[this._sortedTimePoints.length-1].timeMs){if(null===this._mainSymbolExtrapolator)return null;const t=this._mainSymbolExtrapolator.indexOfTime(e),i=this._mainSymbolExtrapolator.indexOfTime(this._sortedTimePoints[this._sortedTimePoints.length-1].timeMs);if(null===t||null===i)return null;const s=t.index-i.index-1;return{index:this._sortedTimePoints.length+s,timeMs:t.timeMs}}let t=Object(o.lowerbound)(this._sortedTimePoints,e,(e,t)=>e.timeMs({timeMs:e,markWeight:0,displayTime:NaN}));this._fillPointsData(i,0,0!==this._sortedTimePoints.length?this._sortedTimePoints[this._sortedTimePoints.length-1].displayTime:null);const r=[];for(let s=e;sf(e,i+t));return r.concat(n)}setTimezone(e){ -this._displayTimezone="exchange"===e?null:Object(n.get_timezone)(e),this._fillPointsData(this._sortedTimePoints,0)}fillIndexesInRows(e){if(0===e.length)return;let t=-1,i=Object(o.lowerbound)(this._sortedTimePoints,Math.round(1e3*e[0].value[0]),(e,t)=>e.timeMse.timeMs{for(;i=this._sortedTimePoints.length){const t=this.indexOfTime(e);if(null===t)return l.a;i=t.timeMs!==e?t.index+1:t.index}return Object(s.assert)(i>t,"data must have unique sorted times"),t=i,i})}firstSeriesBarTime(){return 0===this._sortedTimePoints.length?null:this._sortedTimePoints[0].timeMs}replaceSeriesBarsTimesTail(e,t){if(0===t.length)return null;if(!this._seriesIds.has(e))return this.setSeriesBarsTimes(e,t);const i=[],s=Object(o.lowerbound)(this._sortedTimePoints,t[0],(e,t)=>e.timeMs({timeMs:e.timeMs,pointData:e.pointData,markWeight:0,displayTime:NaN}));for(let o=s;oe.timeMs-t.timeMs);const a=this._updateTimeScalePointsTail(n);return this._applyTimeScaleChanges(a,!1)}setSeriesBarsTimes(e,t){let i=0!==this._pointDataByTimePoint.size;if(this._seriesIds.has(e))if(1===this._seriesIds.size)i=!1,this._pointDataByTimePoint.clear();else for(const c of this._sortedTimePoints)c.pointData.series.delete(e);this._addBarsTimesToSeries(e,t,!1);const s=this._seriesIds.size;0===t.length?this._seriesIds.delete(e):this._seriesIds.add(e),i&&this._cleanupPointsData(this._sortedTimePoints);const r=sthis._seriesIds.size,o=r&&2===this._seriesIds.size||n&&1===this._seriesIds.size,a=[];this._pointDataByTimePoint.forEach((e,t)=>{a.push({markWeight:0,timeMs:t,displayTime:NaN,pointData:e})}),a.sort((e,t)=>e.timeMs-t.timeMs);const l=this._updateTimeScalePoints(a);return this._applyTimeScaleChanges(l,o)}_updateFutureBars(){if(0===this._minFutureBarsCount||null===this._mainSymbolExtrapolator)return;if(0!==this._sortedTimePoints.length){const e=this._sortedTimePoints[this._sortedTimePoints.length-1].timeMs;this._mainSymbolExtrapolator.ensureExtrapolatedToFutureTime(e)}const e=this._futureBarsFirstPointIndex() -;this._mainSymbolExtrapolator.setMinFutureBarsCount(e+this._minFutureBarsCount)}_addBarsTimesToSeries(e,t,i){const s=i?[]:null;for(const r of t){const t=this._pointDataByTimePoint.get(r);if(void 0===t){const t=new Set;t.add(e);const i={index:0,series:t};this._pointDataByTimePoint.set(r,i),null!==s&&s.push({timeMs:r,pointData:i})}else t.series.add(e)}return s}_futureBarsFirstPointIndex(){if(null===this._mainSymbolExtrapolator||0===this._sortedTimePoints.length)return 0;const e=this._mainSymbolExtrapolator.futureBars();return Object(o.upperbound_int)(e,this._sortedTimePoints[this._sortedTimePoints.length-1].timeMs)}_futureBars(){return null===this._mainSymbolExtrapolator?[]:this._mainSymbolExtrapolator.futureBars().slice(this._futureBarsFirstPointIndex(),this._futureBarsFirstPointIndex()+1e3)}_cleanupPointsData(e){for(const t of e)0===t.pointData.series.size&&this._pointDataByTimePoint.delete(t.timeMs)}_updateTimeScalePoints(e){let t=-1;for(let s=0;se.timeMs=this._sortedTimePoints.length)continue;this._sortedTimePoints[r].timeMs!==s.timeMs&&-1===i&&(i=r)}const s=t+e.length;if(i=b(i,this._sortedTimePoints.length,s),-1===i)return null;this._fillPointsData(e,0,0===t||0===this._sortedTimePoints.length?null:this._sortedTimePoints[t-1].displayTime);const r=m(this._sortedTimePoints.slice(t),e).map(e=>({old:e.old+t,new:e.new===l.a?e.new:e.new+t}));{const i=this._sortedTimePoints;let r=0;for(;t+r1&&null===i){const t=Math.ceil(n/(e.length-1)),i=new Date(1e3*(e[0].displayTime-t));e[0].markWeight=_(new Date(1e3*e[0].displayTime),i)}}(e,t,i)}_applyTimeScaleChanges(e,t){if(null===e)return t?(this._fillPointsData(this._sortedTimePoints,0),{points:[],pointsIndex:0,baseIndex:this._getBaseIndex(),indexChange:[],marks:this.tickMarks(0)}):null;let i=e.pointsIndex;if(0!==i&&t&&(this._fillPointsData(this._sortedTimePoints,0),i=0), -0===this._sortedTimePoints.length)return{baseIndex:0,pointsIndex:0,indexChange:[],marks:[],points:[]};const s=[];for(let r=e.pointsIndex;r=t.length?(n.push({old:s,new:l.a}),s++):e[s].timeMs===t[r].timeMs?(s!==r&&n.push({old:s,new:r}),s++,r++):e[s].timeMs{if(e.new===t.new&&e.new===l.a)return e.old-t.old;if(e.new===l.a)return-1;if(t.new===l.a)return 1;const i=e.old-e.new,s=t.old-t.new;return i>0?s>0?e.old-t.old:-1:s<0?t.new-e.new:1})}function f(e,t){return{span:e.markWeight,time:e.displayTime,index:t}}i.d(t,"SessionTimeScale",(function(){return v}));const g=r.enabled("end_of_period_timescale_marks");class v{constructor(){this._completed=!0,this._mainSymbolExtrapolator=null,this._pointDataByTimePoint=new Map,this._seriesIds=new Set,this._displayTimezone=null,this._minFutureBarsCount=0,this._sortedTimePoints=[]}destroy(){this.clearTimeScale()}setCompleted(e){this._completed=e}isCompleted(){return this._completed}clearTimeScale(){return this._pointDataByTimePoint.clear(),this._seriesIds.clear(),this._sortedTimePoints=[],{baseIndex:0,pointsIndex:0,indexChange:[],marks:[],points:[]}}indexOfTime(e){if(0===this._sortedTimePoints.length)return null===this._mainSymbolExtrapolator?null:this._mainSymbolExtrapolator.indexOfTime(e);if(ethis._sortedTimePoints[this._sortedTimePoints.length-1].timeMs){if(null===this._mainSymbolExtrapolator)return null;const t=this._mainSymbolExtrapolator.indexOfTime(e),i=this._mainSymbolExtrapolator.indexOfTime(this._sortedTimePoints[this._sortedTimePoints.length-1].timeMs);if(null===t||null===i)return null;const s=t.index-i.index-1;return{index:this._sortedTimePoints.length+s,timeMs:t.timeMs}}let t=Object(o.lowerbound)(this._sortedTimePoints,e,(e,t)=>e.timeMs({timeMs:e,markWeight:0,displayTime:NaN}));this._fillPointsData(i,0,0!==this._sortedTimePoints.length?this._sortedTimePoints[this._sortedTimePoints.length-1].displayTime:null);const r=[];for(let s=e;sf(e,i+t));return r.concat(n)}setTimezone(e){this._displayTimezone="exchange"===e?null:Object(n.get_timezone)(e),this._fillPointsData(this._sortedTimePoints,0)}fillIndexesInRows(e){if(0===e.length)return;let t=-1,i=Object(o.lowerbound)(this._sortedTimePoints,Math.round(1e3*e[0].value[0]),(e,t)=>e.timeMse.timeMs{for(;i=this._sortedTimePoints.length){const t=this.indexOfTime(e);if(null===t)return l.a;i=t.timeMs!==e?t.index+1:t.index}return Object(s.assert)(i>t,"data must have unique sorted times"),t=i,i})}firstSeriesBarTime(){return 0===this._sortedTimePoints.length?null:this._sortedTimePoints[0].timeMs}replaceSeriesBarsTimesTail(e,t){if(0===t.length)return null;if(!this._seriesIds.has(e))return this.setSeriesBarsTimes(e,t);const i=[],s=Object(o.lowerbound)(this._sortedTimePoints,t[0],(e,t)=>e.timeMs({timeMs:e.timeMs,pointData:e.pointData,markWeight:0,displayTime:NaN}));for(let o=s;oe.timeMs-t.timeMs);const a=this._updateTimeScalePointsTail(n);return this._applyTimeScaleChanges(a,!1)}setSeriesBarsTimes(e,t){let i=0!==this._pointDataByTimePoint.size;if(this._seriesIds.has(e))if(1===this._seriesIds.size)i=!1,this._pointDataByTimePoint.clear();else for(const c of this._sortedTimePoints)c.pointData.series.delete(e);this._addBarsTimesToSeries(e,t,!1);const s=this._seriesIds.size;0===t.length?this._seriesIds.delete(e):this._seriesIds.add(e),i&&this._cleanupPointsData(this._sortedTimePoints);const r=sthis._seriesIds.size,o=r&&2===this._seriesIds.size||n&&1===this._seriesIds.size,a=[];this._pointDataByTimePoint.forEach((e,t)=>{a.push({markWeight:0,timeMs:t,displayTime:NaN,pointData:e})}),a.sort((e,t)=>e.timeMs-t.timeMs);const l=this._updateTimeScalePoints(a);return this._applyTimeScaleChanges(l,o)}_updateFutureBars(){if(0===this._minFutureBarsCount||null===this._mainSymbolExtrapolator)return;if(0!==this._sortedTimePoints.length){const e=this._sortedTimePoints[this._sortedTimePoints.length-1].timeMs;this._mainSymbolExtrapolator.ensureExtrapolatedToFutureTime(e)} +const e=this._futureBarsFirstPointIndex();this._mainSymbolExtrapolator.setMinFutureBarsCount(e+this._minFutureBarsCount)}_addBarsTimesToSeries(e,t,i){const s=i?[]:null;for(const r of t){const t=this._pointDataByTimePoint.get(r);if(void 0===t){const t=new Set;t.add(e);const i={index:0,series:t};this._pointDataByTimePoint.set(r,i),null!==s&&s.push({timeMs:r,pointData:i})}else t.series.add(e)}return s}_futureBarsFirstPointIndex(){if(null===this._mainSymbolExtrapolator||0===this._sortedTimePoints.length)return 0;const e=this._mainSymbolExtrapolator.futureBars();return Object(o.upperbound_int)(e,this._sortedTimePoints[this._sortedTimePoints.length-1].timeMs)}_futureBars(){return null===this._mainSymbolExtrapolator?[]:this._mainSymbolExtrapolator.futureBars().slice(this._futureBarsFirstPointIndex(),this._futureBarsFirstPointIndex()+1e3)}_cleanupPointsData(e){for(const t of e)0===t.pointData.series.size&&this._pointDataByTimePoint.delete(t.timeMs)}_updateTimeScalePoints(e){let t=-1;for(let s=0;se.timeMs=this._sortedTimePoints.length)continue;this._sortedTimePoints[r].timeMs!==s.timeMs&&-1===i&&(i=r)}const s=t+e.length;if(i=b(i,this._sortedTimePoints.length,s),-1===i)return null;this._fillPointsData(e,0,0===t||0===this._sortedTimePoints.length?null:this._sortedTimePoints[t-1].displayTime);const r=m(this._sortedTimePoints.slice(t),e).map(e=>({old:e.old+t,new:e.new===l.a?e.new:e.new+t}));{const i=this._sortedTimePoints;let r=0;for(;t+r1&&null===i){const t=Math.ceil(n/(e.length-1)),i=new Date(1e3*(e[0].displayTime-t));e[0].markWeight=_(new Date(1e3*e[0].displayTime),i)}}(e,t,i)}_applyTimeScaleChanges(e,t){if(null===e)return t?(this._fillPointsData(this._sortedTimePoints,0),{points:[],pointsIndex:0,baseIndex:this._getBaseIndex(),indexChange:[],marks:this.tickMarks(0)}):null;let i=e.pointsIndex +;if(0!==i&&t&&(this._fillPointsData(this._sortedTimePoints,0),i=0),0===this._sortedTimePoints.length)return{baseIndex:0,pointsIndex:0,indexChange:[],marks:[],points:[]};const s=[];for(let r=e.pointsIndex;r{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("subscriber.barset is null");i.add(e),t.onHistoryCallback(i)})},u(this._symbolInfo,this._resolution),()=>{this._unsubscribeRealtime();const e=this._leftDate;this._purgeCache(),null!==e&&this._ensureRequestedTo({to:e,countBack:0})}),this._logMessage("Subscribed to realtime")}_unsubscribeRealtime(){!this._isSymbolExpired()&&this._realtimeOn&&(this._datafeed.unsubscribeBars(u(this._symbolInfo,this._resolution)),this._logMessage("Unsubscribed from realtime"),this._realtimeOn=!1)}_returnHistoryDataToSubscriber(e,t){const i=this._normalizeRange(e.range),s=this._createBarsetForRange(i) diff --git a/charting_library/charting_library.cjs.js b/charting_library/charting_library.cjs.js index 5da0e158..d0324877 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.036 (internal id c941fd1a @ 2022-03-07T10:42:34.752Z)"}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.c941fd1a.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.037 (internal id 7a4f9e33 @ 2022-03-10T08:24:04.662Z)"}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.7a4f9e33.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 49b58cd4..3a1112b1 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.036 (internal id c941fd1a @ 2022-03-07T10:42:34.752Z)"}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.c941fd1a.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.037 (internal id 7a4f9e33 @ 2022-03-10T08:24:04.662Z)"}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.7a4f9e33.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 d36eff8e..101ded6f 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.036 (internal id c941fd1a @ 2022-03-07T10:42:34.752Z)"}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.c941fd1a.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.037 (internal id 7a4f9e33 @ 2022-03-10T08:24:04.662Z)"}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.7a4f9e33.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 10d9d32e..1716819c 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.036 (internal id c941fd1a @ 2022-03-07T10:42:34.752Z)"}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.c941fd1a.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.037 (internal id 7a4f9e33 @ 2022-03-10T08:24:04.662Z)"}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.7a4f9e33.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.c941fd1a.html b/charting_library/cs-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/cs-tv-chart.c941fd1a.html rename to charting_library/cs-tv-chart.7a4f9e33.html index c31d8c15..746c0f29 100644 --- a/charting_library/cs-tv-chart.c941fd1a.html +++ b/charting_library/cs-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/da_DK-tv-chart.c941fd1a.html b/charting_library/da_DK-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/da_DK-tv-chart.c941fd1a.html rename to charting_library/da_DK-tv-chart.7a4f9e33.html index 01270e0d..72462e3d 100644 --- a/charting_library/da_DK-tv-chart.c941fd1a.html +++ b/charting_library/da_DK-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/de-tv-chart.c941fd1a.html b/charting_library/de-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/de-tv-chart.c941fd1a.html rename to charting_library/de-tv-chart.7a4f9e33.html index 1d9d4dfa..1a6e24f1 100644 --- a/charting_library/de-tv-chart.c941fd1a.html +++ b/charting_library/de-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/el-tv-chart.c941fd1a.html b/charting_library/el-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/el-tv-chart.c941fd1a.html rename to charting_library/el-tv-chart.7a4f9e33.html index e0983ac6..2418ac55 100644 --- a/charting_library/el-tv-chart.c941fd1a.html +++ b/charting_library/el-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/en-tv-chart.c941fd1a.html b/charting_library/en-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/en-tv-chart.c941fd1a.html rename to charting_library/en-tv-chart.7a4f9e33.html index 2ee1d77a..5d9e1fb2 100644 --- a/charting_library/en-tv-chart.c941fd1a.html +++ b/charting_library/en-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/es-tv-chart.c941fd1a.html b/charting_library/es-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/es-tv-chart.c941fd1a.html rename to charting_library/es-tv-chart.7a4f9e33.html index 25db8a9c..192f7703 100644 --- a/charting_library/es-tv-chart.c941fd1a.html +++ b/charting_library/es-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/et_EE-tv-chart.c941fd1a.html b/charting_library/et_EE-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/et_EE-tv-chart.c941fd1a.html rename to charting_library/et_EE-tv-chart.7a4f9e33.html index 2aa489ff..9579583d 100644 --- a/charting_library/et_EE-tv-chart.c941fd1a.html +++ b/charting_library/et_EE-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/fa-tv-chart.c941fd1a.html b/charting_library/fa-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/fa-tv-chart.c941fd1a.html rename to charting_library/fa-tv-chart.7a4f9e33.html index 9a72417a..ff380de2 100644 --- a/charting_library/fa-tv-chart.c941fd1a.html +++ b/charting_library/fa-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/fr-tv-chart.c941fd1a.html b/charting_library/fr-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/fr-tv-chart.c941fd1a.html rename to charting_library/fr-tv-chart.7a4f9e33.html index 02d0ead3..7e3c53e2 100644 --- a/charting_library/fr-tv-chart.c941fd1a.html +++ b/charting_library/fr-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/he_IL-tv-chart.c941fd1a.html b/charting_library/he_IL-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/he_IL-tv-chart.c941fd1a.html rename to charting_library/he_IL-tv-chart.7a4f9e33.html index 13a56fe1..2ffafae8 100644 --- a/charting_library/he_IL-tv-chart.c941fd1a.html +++ b/charting_library/he_IL-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/hu_HU-tv-chart.c941fd1a.html b/charting_library/hu_HU-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/hu_HU-tv-chart.c941fd1a.html rename to charting_library/hu_HU-tv-chart.7a4f9e33.html index 468c340f..4fef6f4b 100644 --- a/charting_library/hu_HU-tv-chart.c941fd1a.html +++ b/charting_library/hu_HU-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/id_ID-tv-chart.c941fd1a.html b/charting_library/id_ID-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/id_ID-tv-chart.c941fd1a.html rename to charting_library/id_ID-tv-chart.7a4f9e33.html index 6deb86e5..5b42b7a3 100644 --- a/charting_library/id_ID-tv-chart.c941fd1a.html +++ b/charting_library/id_ID-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/it-tv-chart.c941fd1a.html b/charting_library/it-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/it-tv-chart.c941fd1a.html rename to charting_library/it-tv-chart.7a4f9e33.html index 6ebbf79f..2053a047 100644 --- a/charting_library/it-tv-chart.c941fd1a.html +++ b/charting_library/it-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ja-tv-chart.c941fd1a.html b/charting_library/ja-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/ja-tv-chart.c941fd1a.html rename to charting_library/ja-tv-chart.7a4f9e33.html index 660822b7..9d62bf7c 100644 --- a/charting_library/ja-tv-chart.c941fd1a.html +++ b/charting_library/ja-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ko-tv-chart.c941fd1a.html b/charting_library/ko-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/ko-tv-chart.c941fd1a.html rename to charting_library/ko-tv-chart.7a4f9e33.html index 720f0f33..37aa092e 100644 --- a/charting_library/ko-tv-chart.c941fd1a.html +++ b/charting_library/ko-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ms_MY-tv-chart.c941fd1a.html b/charting_library/ms_MY-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/ms_MY-tv-chart.c941fd1a.html rename to charting_library/ms_MY-tv-chart.7a4f9e33.html index 4589a901..171490a9 100644 --- a/charting_library/ms_MY-tv-chart.c941fd1a.html +++ b/charting_library/ms_MY-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/nl_NL-tv-chart.c941fd1a.html b/charting_library/nl_NL-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/nl_NL-tv-chart.c941fd1a.html rename to charting_library/nl_NL-tv-chart.7a4f9e33.html index 6e28ce6f..b1d3853f 100644 --- a/charting_library/nl_NL-tv-chart.c941fd1a.html +++ b/charting_library/nl_NL-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/no-tv-chart.c941fd1a.html b/charting_library/no-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/no-tv-chart.c941fd1a.html rename to charting_library/no-tv-chart.7a4f9e33.html index 61820cbe..91d6b02e 100644 --- a/charting_library/no-tv-chart.c941fd1a.html +++ b/charting_library/no-tv-chart.7a4f9e33.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 ad58d367..2ceb3231 100644 --- a/charting_library/package.json +++ b/charting_library/package.json @@ -1,6 +1,6 @@ { "private": true, - "description": "CL v20.036 (internal id c941fd1a @ 2022-03-07T10:42:34.752Z)", + "description": "CL v20.037 (internal id 7a4f9e33 @ 2022-03-10T08:24:04.662Z)", "type": "module", "main": "charting_library.cjs.js", "module": "charting_library.esm.js", diff --git a/charting_library/pl-tv-chart.c941fd1a.html b/charting_library/pl-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/pl-tv-chart.c941fd1a.html rename to charting_library/pl-tv-chart.7a4f9e33.html index 332a4334..6ff223ee 100644 --- a/charting_library/pl-tv-chart.c941fd1a.html +++ b/charting_library/pl-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/pt-tv-chart.c941fd1a.html b/charting_library/pt-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/pt-tv-chart.c941fd1a.html rename to charting_library/pt-tv-chart.7a4f9e33.html index 77cccb01..3c7b5cab 100644 --- a/charting_library/pt-tv-chart.c941fd1a.html +++ b/charting_library/pt-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ro-tv-chart.c941fd1a.html b/charting_library/ro-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/ro-tv-chart.c941fd1a.html rename to charting_library/ro-tv-chart.7a4f9e33.html index 9ff0dacf..26ac7c09 100644 --- a/charting_library/ro-tv-chart.c941fd1a.html +++ b/charting_library/ro-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/ru-tv-chart.c941fd1a.html b/charting_library/ru-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/ru-tv-chart.c941fd1a.html rename to charting_library/ru-tv-chart.7a4f9e33.html index 5ec7da67..98a62f3c 100644 --- a/charting_library/ru-tv-chart.c941fd1a.html +++ b/charting_library/ru-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/sk_SK-tv-chart.c941fd1a.html b/charting_library/sk_SK-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/sk_SK-tv-chart.c941fd1a.html rename to charting_library/sk_SK-tv-chart.7a4f9e33.html index 7d8a6ade..837af0c8 100644 --- a/charting_library/sk_SK-tv-chart.c941fd1a.html +++ b/charting_library/sk_SK-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/sv-tv-chart.c941fd1a.html b/charting_library/sv-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/sv-tv-chart.c941fd1a.html rename to charting_library/sv-tv-chart.7a4f9e33.html index 9242dd7d..fa63b11f 100644 --- a/charting_library/sv-tv-chart.c941fd1a.html +++ b/charting_library/sv-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/th-tv-chart.c941fd1a.html b/charting_library/th-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/th-tv-chart.c941fd1a.html rename to charting_library/th-tv-chart.7a4f9e33.html index 80cbf0d5..342db595 100644 --- a/charting_library/th-tv-chart.c941fd1a.html +++ b/charting_library/th-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/tr-tv-chart.c941fd1a.html b/charting_library/tr-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/tr-tv-chart.c941fd1a.html rename to charting_library/tr-tv-chart.7a4f9e33.html index a1044d85..3ac16ac9 100644 --- a/charting_library/tr-tv-chart.c941fd1a.html +++ b/charting_library/tr-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/vi-tv-chart.c941fd1a.html b/charting_library/vi-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/vi-tv-chart.c941fd1a.html rename to charting_library/vi-tv-chart.7a4f9e33.html index 764abddc..b8b7b550 100644 --- a/charting_library/vi-tv-chart.c941fd1a.html +++ b/charting_library/vi-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/zh-tv-chart.c941fd1a.html b/charting_library/zh-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/zh-tv-chart.c941fd1a.html rename to charting_library/zh-tv-chart.7a4f9e33.html index 175df036..40b53042 100644 --- a/charting_library/zh-tv-chart.c941fd1a.html +++ b/charting_library/zh-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/zh_TW-tv-chart.c941fd1a.html b/charting_library/zh_TW-tv-chart.7a4f9e33.html similarity index 99% rename from charting_library/zh_TW-tv-chart.c941fd1a.html rename to charting_library/zh_TW-tv-chart.7a4f9e33.html index 9fb4b12b..2b4332a4 100644 --- a/charting_library/zh_TW-tv-chart.c941fd1a.html +++ b/charting_library/zh_TW-tv-chart.7a4f9e33.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file