From 2a589f40d99aa9720366d0a9663cb7bbfee3de30 Mon Sep 17 00:00:00 2001 From: Jenkins Date: Wed, 10 Oct 2018 12:58:30 +0300 Subject: [PATCH] commit 2018-10-10 09:58:27.860286 User's colors not working when theme is enabled #3232 --- charting_library/charting_library.min.js | 2 +- ... => ar-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ...7d0a0f2f.js => 10.ef75a963f37114f76e2f.js} | 0 ...eadcd24e.js => 13.23881782ce3895456f66.js} | 0 ...ds-property-pages.1756b413f8f2d038f272.js} | 0 ... editobjectdialog.e76ba6bc652064d1ce6a.js} | 0 ...-date-dialog-impl.39b794932de89664f82f.js} | 0 ...=> lazy-jquery-ui.be361390d55b87a2a2f2.js} | 0 ...dfd.js => library.4b362457b3a7eceed386.js} | 20 +++++++++---------- ... => lt-pane-views.b3eda7684d6f1c5952d0.js} | 0 ...-info-dialog-impl.f3cf4493236b7285e923.js} | 0 ...image-dialog-impl.3c3cf6c1f317decbf3b4.js} | 0 ...cab.js => vendors.181dfaa7faeff71be7b9.js} | 2 +- ... => cs-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... da_DK-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => de-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => el-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => en-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => es-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... et_EE-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => fa-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => fr-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... he_IL-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... hu_HU-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... id_ID-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => it-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => ja-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => ko-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... ms_MY-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... nl_NL-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => no-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => pl-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => pt-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => ro-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => ru-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... sk_SK-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => sv-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => th-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => tr-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => vi-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... => zh-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- ... zh_TW-tv-chart.1c7535a2aac5ec511ed5.html} | 2 +- 42 files changed, 42 insertions(+), 42 deletions(-) rename charting_library/static/{ar-tv-chart.f6e221fd13e4fa375a2b.html => ar-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/bundles/{10.5fc4bebecf627d0a0f2f.js => 10.ef75a963f37114f76e2f.js} (100%) rename charting_library/static/bundles/{13.44339b003e12eadcd24e.js => 13.23881782ce3895456f66.js} (100%) rename charting_library/static/bundles/{ds-property-pages.bfd2564e4fd770bc0b0c.js => ds-property-pages.1756b413f8f2d038f272.js} (100%) rename charting_library/static/bundles/{editobjectdialog.c39226f8a9a3231aef9a.js => editobjectdialog.e76ba6bc652064d1ce6a.js} (100%) rename charting_library/static/bundles/{go-to-date-dialog-impl.c121ad9ddaf13331c500.js => go-to-date-dialog-impl.39b794932de89664f82f.js} (100%) rename charting_library/static/bundles/{lazy-jquery-ui.e4174a65a8360a06f2da.js => lazy-jquery-ui.be361390d55b87a2a2f2.js} (100%) rename charting_library/static/bundles/{library.22a6b826882cf5024dfd.js => library.4b362457b3a7eceed386.js} (98%) rename charting_library/static/bundles/{lt-pane-views.3daf4cdbe12b961666a6.js => lt-pane-views.b3eda7684d6f1c5952d0.js} (100%) rename charting_library/static/bundles/{symbol-info-dialog-impl.eba97409764f2b04ac83.js => symbol-info-dialog-impl.f3cf4493236b7285e923.js} (100%) rename charting_library/static/bundles/{take-chart-image-dialog-impl.b60665314521ef3361a1.js => take-chart-image-dialog-impl.3c3cf6c1f317decbf3b4.js} (100%) rename charting_library/static/bundles/{vendors.0cced1b93326172f9cab.js => vendors.181dfaa7faeff71be7b9.js} (99%) rename charting_library/static/{cs-tv-chart.f6e221fd13e4fa375a2b.html => cs-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{da_DK-tv-chart.f6e221fd13e4fa375a2b.html => da_DK-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{de-tv-chart.f6e221fd13e4fa375a2b.html => de-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{el-tv-chart.f6e221fd13e4fa375a2b.html => el-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{en-tv-chart.f6e221fd13e4fa375a2b.html => en-tv-chart.1c7535a2aac5ec511ed5.html} (98%) rename charting_library/static/{es-tv-chart.f6e221fd13e4fa375a2b.html => es-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{et_EE-tv-chart.f6e221fd13e4fa375a2b.html => et_EE-tv-chart.1c7535a2aac5ec511ed5.html} (98%) rename charting_library/static/{fa-tv-chart.f6e221fd13e4fa375a2b.html => fa-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{fr-tv-chart.f6e221fd13e4fa375a2b.html => fr-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{he_IL-tv-chart.f6e221fd13e4fa375a2b.html => he_IL-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{hu_HU-tv-chart.f6e221fd13e4fa375a2b.html => hu_HU-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{id_ID-tv-chart.f6e221fd13e4fa375a2b.html => id_ID-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{it-tv-chart.f6e221fd13e4fa375a2b.html => it-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{ja-tv-chart.f6e221fd13e4fa375a2b.html => ja-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{ko-tv-chart.f6e221fd13e4fa375a2b.html => ko-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{ms_MY-tv-chart.f6e221fd13e4fa375a2b.html => ms_MY-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{nl_NL-tv-chart.f6e221fd13e4fa375a2b.html => nl_NL-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{no-tv-chart.f6e221fd13e4fa375a2b.html => no-tv-chart.1c7535a2aac5ec511ed5.html} (98%) rename charting_library/static/{pl-tv-chart.f6e221fd13e4fa375a2b.html => pl-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{pt-tv-chart.f6e221fd13e4fa375a2b.html => pt-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{ro-tv-chart.f6e221fd13e4fa375a2b.html => ro-tv-chart.1c7535a2aac5ec511ed5.html} (98%) rename charting_library/static/{ru-tv-chart.f6e221fd13e4fa375a2b.html => ru-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{sk_SK-tv-chart.f6e221fd13e4fa375a2b.html => sk_SK-tv-chart.1c7535a2aac5ec511ed5.html} (98%) rename charting_library/static/{sv-tv-chart.f6e221fd13e4fa375a2b.html => sv-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{th-tv-chart.f6e221fd13e4fa375a2b.html => th-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{tr-tv-chart.f6e221fd13e4fa375a2b.html => tr-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{vi-tv-chart.f6e221fd13e4fa375a2b.html => vi-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{zh-tv-chart.f6e221fd13e4fa375a2b.html => zh-tv-chart.1c7535a2aac5ec511ed5.html} (99%) rename charting_library/static/{zh_TW-tv-chart.f6e221fd13e4fa375a2b.html => zh_TW-tv-chart.1c7535a2aac5ec511ed5.html} (99%) diff --git a/charting_library/charting_library.min.js b/charting_library/charting_library.min.js index db292d81..0d683d6a 100644 --- a/charting_library/charting_library.min.js +++ b/charting_library/charting_library.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.TradingView=t.TradingView||{})}(this,function(t){"use strict";function e(t,o){var i=n({},t);for(var s in o)"object"!=typeof t[s]||null===t[s]||Array.isArray(t[s])?void 0!==o[s]&&(i[s]=o[s]):i[s]=e(t[s],o[s]);return i}function o(){return"1.13 (internal id f6e221fd @ 2018-10-04 04:49:03.976474)"}function i(t){window.addEventListener("DOMContentLoaded",t,!1)}var n=Object.assign||function(t){for(var e,o=arguments,i=1,n=arguments.length;i'},t}(),d=a;window.TradingView=window.TradingView||{},window.TradingView.version=o,t.version=o,t.onready=i,t.widget=d,Object.defineProperty(t,"__esModule",{value:!0})}); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.TradingView=t.TradingView||{})}(this,function(t){"use strict";function e(t,o){var i=n({},t);for(var s in o)"object"!=typeof t[s]||null===t[s]||Array.isArray(t[s])?void 0!==o[s]&&(i[s]=o[s]):i[s]=e(t[s],o[s]);return i}function o(){return"1.13 (internal id 1c7535a2 @ 2018-10-10 04:58:21.362341)"}function i(t){window.addEventListener("DOMContentLoaded",t,!1)}var n=Object.assign||function(t){for(var e,o=arguments,i=1,n=arguments.length;i'},t}(),d=a;window.TradingView=window.TradingView||{},window.TradingView.version=o,t.version=o,t.onready=i,t.widget=d,Object.defineProperty(t,"__esModule",{value:!0})}); diff --git a/charting_library/static/ar-tv-chart.f6e221fd13e4fa375a2b.html b/charting_library/static/ar-tv-chart.1c7535a2aac5ec511ed5.html similarity index 99% rename from charting_library/static/ar-tv-chart.f6e221fd13e4fa375a2b.html rename to charting_library/static/ar-tv-chart.1c7535a2aac5ec511ed5.html index 2f2bfe59..afcda083 100644 --- a/charting_library/static/ar-tv-chart.f6e221fd13e4fa375a2b.html +++ b/charting_library/static/ar-tv-chart.1c7535a2aac5ec511ed5.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/charting_library/static/bundles/10.5fc4bebecf627d0a0f2f.js b/charting_library/static/bundles/10.ef75a963f37114f76e2f.js similarity index 100% rename from charting_library/static/bundles/10.5fc4bebecf627d0a0f2f.js rename to charting_library/static/bundles/10.ef75a963f37114f76e2f.js diff --git a/charting_library/static/bundles/13.44339b003e12eadcd24e.js b/charting_library/static/bundles/13.23881782ce3895456f66.js similarity index 100% rename from charting_library/static/bundles/13.44339b003e12eadcd24e.js rename to charting_library/static/bundles/13.23881782ce3895456f66.js diff --git a/charting_library/static/bundles/ds-property-pages.bfd2564e4fd770bc0b0c.js b/charting_library/static/bundles/ds-property-pages.1756b413f8f2d038f272.js similarity index 100% rename from charting_library/static/bundles/ds-property-pages.bfd2564e4fd770bc0b0c.js rename to charting_library/static/bundles/ds-property-pages.1756b413f8f2d038f272.js diff --git a/charting_library/static/bundles/editobjectdialog.c39226f8a9a3231aef9a.js b/charting_library/static/bundles/editobjectdialog.e76ba6bc652064d1ce6a.js similarity index 100% rename from charting_library/static/bundles/editobjectdialog.c39226f8a9a3231aef9a.js rename to charting_library/static/bundles/editobjectdialog.e76ba6bc652064d1ce6a.js diff --git a/charting_library/static/bundles/go-to-date-dialog-impl.c121ad9ddaf13331c500.js b/charting_library/static/bundles/go-to-date-dialog-impl.39b794932de89664f82f.js similarity index 100% rename from charting_library/static/bundles/go-to-date-dialog-impl.c121ad9ddaf13331c500.js rename to charting_library/static/bundles/go-to-date-dialog-impl.39b794932de89664f82f.js diff --git a/charting_library/static/bundles/lazy-jquery-ui.e4174a65a8360a06f2da.js b/charting_library/static/bundles/lazy-jquery-ui.be361390d55b87a2a2f2.js similarity index 100% rename from charting_library/static/bundles/lazy-jquery-ui.e4174a65a8360a06f2da.js rename to charting_library/static/bundles/lazy-jquery-ui.be361390d55b87a2a2f2.js diff --git a/charting_library/static/bundles/library.22a6b826882cf5024dfd.js b/charting_library/static/bundles/library.4b362457b3a7eceed386.js similarity index 98% rename from charting_library/static/bundles/library.22a6b826882cf5024dfd.js rename to charting_library/static/bundles/library.4b362457b3a7eceed386.js index 251bc482..914d60d8 100644 --- a/charting_library/static/bundles/library.22a6b826882cf5024dfd.js +++ b/charting_library/static/bundles/library.4b362457b3a7eceed386.js @@ -59,7 +59,7 @@ function o(e){e||(e={}),this.checkable=e.checkable||!1,this.checked=e.checked||n return t<=e}function n(t,e){return t>=e}function r(t,e,i){return Math.min(Math.max(t,e),i)}function s(t){return t<0?-1:t>0?1:0}function a(t){if(t<0)return f.logDebug("MathEx.isBaseDecimal: argument less zero"),!1;for(var e=t;e>1;e/=10)if(e%10!=0)return!1;return!0}function l(t,e,i){return e-t<=i}function c(t,e,i){return Math.abs(t-e)e?1:0}function d(t,e){var i,o;if(void 0===e&&(e=u),t.length<1)throw Error("array is empty");for(i=t[0],o=0;o0&&(i=t[o]);return i}var _,f;Object.defineProperty(e,"__esModule",{value:!0}),_=i(7),f=_.getLogger("Common.MathEx"),e.lessThan=o,e.greaterThan=n,e.clamp=r,e.sign=s,e.isBaseDecimal=a,e.greaterOrEqual=l,e.equal=c,e.log10=h,e.defComparator=u,e.min=d,e.max=p},,function(t,e,i){"use strict";function o(t){this.items=t.items,this.height=t.height||t.width,this.width=t.width||t.height,this._color=t.color,this._borderColor=t.borderColor,this._vertOffset=t.vertOffset||0,t.textCache&&(this._textCache=t.textCache,this._textColor=t.textColor,this._textVertOffset=this._vertOffset>0?this.height:-this.height,this._textImageWidth=this._textCache.textImageWidth,this._textImageHeight=this._textCache.textImageHeight)}var n=i(8).Point,r=i(11);o.prototype.draw=function(t){this.drawShape(t),this.drawText(t)},o.prototype.drawShape=function(t){throw Error("Not implemented")},o.prototype.drawText=function(t){var e,i,o,n,r,s;if(this._textCache)for(e=0,i=this.items.length;e0?"top":"bottom")},o.prototype.hitTest=function(t,e){var i,o,s,a,l,c,h,u,d,p,_,f,m,g=Math.max(this.height,this.width),v=this._vertOffset,y=this._textVertOffset;for(e=e||r.REGULAR,o=0;o0?0:-this._textImageHeight,h=v>0?this._textImageHeight:0,u=t.x,d=t.y,p=s.x-a,_=l+c,f=s.x+a,m=l+h,u>p&&u_&&di||o&&t.length>o})}function a(t,e,i){return l(t,e,function(t,e){return t.length>=i})}function l(t,e,i){var o,n,r,s,a,l=e;for(t.moveTo(l),o=[],n=0,r=0;!i(o,l);){if(n>5)throw console.trace(["0x10",new Date(e),"->",new Date(l)]),Error("Internal error 0x10 while extrapolating.");if((s=t.indexOfBar(l))===I)l=t.startOfBar(0);else if(s===k)l=t.startOfBar(k);else{if((a=t.startOfBar(s))!==e){if(r&&r===a)throw console.trace(["0x11",new Date(e),"->",new Date(a)]),Error("Internal error 0x11 while extrapolating.");r=a,n=0,o.push(a)}l=t.startOfBar(s+1)}t.moveTo(l),n++}return o}function c(t){if(isNaN(t))return NaN;var e=this.indexOfBar(t);return e===k&&(this.moveTo(t),e=this.indexOfBar(t)),e<0?NaN:this.startOfBar(e)}function h(t,e){this.period=t,this.session=e,this.sessionStart=Number.MIN_VALUE,this.sessionEnd=Number.MIN_VALUE}function u(t,e,i,o){this.period=i,this.sessionTgt=t,this.sessionSrc=e||t,this.builder=o,this.periodStart=-Number.MAX_VALUE,this.periodEnd=-Number.MAX_VALUE,this.periodLastBarStart=-Number.MAX_VALUE}function d(t,e,i){var o=M.clone(i);return e.alignToSessionStart(o,t),M.cal_to_utc(t,o)}function p(t,e){var i=M.get_day_of_week(e)-t.firstDayOfWeek();return i<0?i+7:i}function _(t,e){var i=e+t.firstDayOfWeek();return i>M.SATURDAY?i-M.SATURDAY:i}function f(t,e){var i=M.get_day_of_year(e)-1,o=p(t,e)-i%7;return 0===o?C(i/7):(o>=0&&(o-=7),C((o+i)/7))}function m(t,e,i){var o,n=0;for(o=e;o0){if((n=r-1)r.start()+r.length()&&o===r.dayOfWeek()-1&&(o++,n-=1440),o===r.dayOfWeek()&&n>=r.start()&&n=this.sessionEnd?k:C(M.time_seconds_diff(t,this.sessionStart)/this.period)},h.prototype.startOfBar=function(t){if(t===k)return this.sessionEnd;if(t<0)throw Error("Negative offset is not supported");return this.sessionStart+M.time_seconds(this.period*t)},h.prototype.isLastBar=function(t,e){return e>=this.sessionStart+M.time_seconds(this.period*(t+1)-1)},h.prototype.moveTo=function(t){var e=this.session.timezone,i=M.utc_to_cal(e,t),o=this.session.spec,n=o.alignToSessionStart(i,this.session.timezone);this.sessionStart=M.cal_to_utc(e,i),this.sessionEnd=this.sessionStart+M.time_minutes(n)},u.prototype.alignTime=c,u.prototype.alignTimeIfPossible=function(t){return this.tradingDayToSessionStart(t)},u.prototype.tradingDayToSessionStart=function(t){return this.moveTo(t),this.startOfBar(0)},u.prototype.indexOfBar=function(t){return t=this.periodEnd?k:0},u.prototype.startOfBar=function(t){if(t===k||t>0)return this.periodEnd;if(t===I)throw Error("PRE_SESSION is not supported");return this.periodStart},u.prototype.isLastBar=function(t,e){return e>=this.periodLastBarStart},u.prototype.moveTo=function(t){var e,i,o,n,r,s,a,l,c=M.utc_to_cal(this.sessionSrc.timezone,t);c=this.sessionSrc.spec.correctTradingDay(c,this.sessionSrc.timezone),e=this.sessionTgt.timezone,i=this.builder.indexOfPeriod(c,e),o=C(i/this.period)*this.period,n=M.get_year(c),r=this.sessionTgt.spec,s=this.builder.startOfPeriod(e,o,n),this.periodStart=d(e,r,s),a=o+this.period,l=this.builder.startOfPeriod(e,a,n),this.periodEnd=d(e,r,l),M.add_date(l,-1),this.moveToPrevWorkDay(r,l),this.periodLastBarStart=d(e,r,l),(this.periodLastBarStart0){if((n=r-1)r.start()+r.length()&&o===r.dayOfWeek()-1&&(o++,n-=1440),o===r.dayOfWeek()&&n>=r.start()&&n=this.sessionEnd?k:C(M.time_seconds_diff(t,this.sessionStart)/this.period)},h.prototype.startOfBar=function(t){if(t===k)return this.sessionEnd;if(t<0)throw Error("Negative offset is not supported");return this.sessionStart+M.time_seconds(this.period*t)},h.prototype.isLastBar=function(t,e){return e>=this.sessionStart+M.time_seconds(this.period*(t+1)-1)},h.prototype.moveTo=function(t){var e=this.session.timezone,i=M.utc_to_cal(e,t),o=this.session.spec,n=o.alignToSessionStart(i,this.session.timezone);this.sessionStart=M.cal_to_utc(e,i),this.sessionEnd=this.sessionStart+M.time_minutes(n)},u.prototype.alignTime=c,u.prototype.alignTimeIfPossible=function(t){return this.tradingDayToSessionStart(t)},u.prototype.tradingDayToSessionStart=function(t){return this.moveTo(t),this.startOfBar(0)},u.prototype.indexOfBar=function(t){return t=this.periodEnd?k:0},u.prototype.startOfBar=function(t){if(t===k||t>0)return this.periodEnd;if(t===I)throw Error("PRE_SESSION is not supported");return this.periodStart},u.prototype.isLastBar=function(t,e){return e>=this.periodLastBarStart},u.prototype.moveTo=function(t){var e,i,o,n,r,s,a,l,c=M.utc_to_cal(this.sessionSrc.timezone,t);c=this.sessionSrc.spec.correctTradingDay(c,this.sessionSrc.timezone),e=this.sessionTgt.timezone,i=this.builder.indexOfPeriod(c,e),-1===i&&(i*=this.period),o=C(i/this.period)*this.period,n=M.get_year(c),r=this.sessionTgt.spec,s=this.builder.startOfPeriod(e,o,n),this.periodStart=d(e,r,s),a=o+this.period,l=this.builder.startOfPeriod(e,a,n),this.periodEnd=d(e,r,l),M.add_date(l,-1),this.moveToPrevWorkDay(r,l),this.periodLastBarStart=d(e,r,l),(this.periodLastBarStart0;++o)r=s.sessionsSpec.isWeekEnd(_(s.sessionsSpec,o)),h+=r?1:0,n-=r?0:1;return a=e.weekEnds+h,l=C((i-e.businessDays)/(7-s.sessionsSpec.weekEndsCount())),c=a+s.sessionsSpec.weekEndsCount()*l,i+c}var s,a,l,c,h;return e>=g(this.sessionsSpec,i)&&(i++,e=0),s=this,a=new Date(Date.UTC(i,M.JANUARY,1)),l=p(this.sessionsSpec,a),c=new o(this.sessionsSpec,l),h=el?this.startOfPeriod(t,0,i+C(a/l)):(o=M.get_cal(t,i,M.JANUARY,1),n=M.add_days_considering_dst(t,o,a),M.utc_to_cal(t,+n))},T.prototype.indexOfPeriod=function(t){return M.get_month(t)},T.prototype.startOfPeriod=function(t,e,i){var o,n,r,s;return e<0?(o=C((11-e)/12),i-=o,e+=12*o):e>M.DECEMBER&&(i++,e=M.JANUARY),n=M.get_cal_utc(i,e,1),r=p(this.session.spec,n),r>4&&(s=7-r,M.add_date(n,s)),n},x.prototype.init=function(t,e){return this.timezone="string"==typeof t?M.get_timezone(t):t,this.spec=new o(e),this},{PRE_SESSION:I,POST_SESSION:k,LASTBAR_SESSION:-3,newBarBuilder:t,Session:x,alignPeriodsBack:r,extrapolateBarsFrontByCount:a,extrapolateBarsFrontToTime:s,lower_bound:P,isTradingNow:L,numberOfFullWeeks:f,numberOfWeekEndsSinceYearStart:v,BusinessDaysBuilder:b,alignExchangeTimeToSessionStartAndReturnUTC:d}}();t.exports=n}).call(e,i(78))},function(t,e,i){"use strict";function o(t){var e=t.className,i=t.icon,o=void 0===i?"":i,r=t.onClick,s=t.title;return n.createElement("span",{title:s,className:e,dangerouslySetInnerHTML:{__html:o},onClick:r})}Object.defineProperty(e,"__esModule",{value:!0});var n=i(2);e.Icon=o},function(t,e,i){"use strict";function o(t,e){var i=e.edge;return i.A*t.x+i.B*t.y+i.C>0===e.isPositive}function n(t,e,i,o){var n=e.add(i).scaled(.5),r=n.add(o).scaled(.5),s=l.intersectLineSegments(e,i,r,t);return null===s&&(null===(s=l.intersectLineSegments(i,o,r,t))&&null===(s=l.intersectLineSegments(o,e,r,t)))}function r(t,e,i){return t.x>=e.x&&t.x<=i.x&&t.y>=e.y&&t.y<=i.y}function s(t,e){var i,o,n,r=e.length-1,s=!1,a=t.x,l=t.y;for(i=0;i=l||n.y=l)&&o.x+(l-o.y)/(n.y-o.y)*(n.x-o.x)=0;e--)if(t=RegExp(i[e]),t.test(o))return!0;return!1},o.onOrder=function(){return"/order/"===window.location.pathname},t.exports.CheckMobile=o.isMobile,t.exports.isOnFeaturePage=i,t.exports.onWidget=o.onWidget,t.exports.supportTouch=o.supportTouch}).call(e,i(5))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=i(584);e.createDialog=o.createDialog},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),i(13),i(12),e.lineToolsInfo={LineTool5PointsPattern:{icon:i(622),localizedName:$.t("XABCD Pattern")},LineToolABCD:{icon:i(623),localizedName:$.t("ABCD Pattern")},LineToolArc:{icon:i(624),localizedName:$.t("Arc")},LineToolArrow:{ icon:i(625),localizedName:$.t("Arrow")},LineToolArrowMarkDown:{icon:i(626),localizedName:$.t("Arrow Mark Down")},LineToolArrowMarkLeft:{icon:i(627),localizedName:$.t("Arrow Mark Left")},LineToolArrowMarkRight:{icon:i(628),localizedName:$.t("Arrow Mark Right")},LineToolArrowMarkUp:{icon:i(629),localizedName:$.t("Arrow Mark Up")},LineToolBalloon:{icon:i(630),localizedName:$.t("Balloon")},LineToolBarsPattern:{icon:i(631),localizedName:$.t("Bars Pattern")},LineToolBezierCubic:{icon:i(632),localizedName:$.t("Double Curve")},LineToolBezierQuadro:{icon:i(633),localizedName:$.t("Curve")},LineToolBrush:{icon:i(634),localizedName:$.t("Brush")},LineToolCallout:{icon:i(635),localizedName:$.t("Callout")},LineToolCircleLines:{icon:i(636),localizedName:$.t("Cyclic Lines")},LineToolCypherPattern:{icon:i(637),localizedName:$.t("Cypher Pattern")},LineToolDateAndPriceRange:{icon:i(638),localizedName:$.t("Date and Price Range")},LineToolDateRange:{icon:i(639),localizedName:$.t("Date Range")},LineToolDisjointAngle:{icon:i(640),localizedName:$.t("Disjoint Angle")},LineToolElliottCorrection:{icon:i(641),localizedName:$.t("Elliott Correction Wave (ABC)")},LineToolElliottDoubleCombo:{icon:i(642),localizedName:$.t("Elliott Double Combo Wave (WXY)")},LineToolElliottImpulse:{icon:i(643),localizedName:$.t("Elliott Impulse Wave (12345)")},LineToolElliottTriangle:{icon:i(644),localizedName:$.t("Elliott Triangle Wave (ABCDE)")},LineToolElliottTripleCombo:{icon:i(645),localizedName:$.t("Elliott Triple Combo Wave (WXYXZ)")},LineToolEllipse:{icon:i(646),localizedName:$.t("Ellipse")},LineToolExtended:{icon:i(647),localizedName:$.t("Extended")},LineToolFibChannel:{icon:i(648),localizedName:$.t("Fib Channel")},LineToolFibCircles:{icon:i(649),localizedName:$.t("Fib Circles")},LineToolFibRetracement:{icon:i(650),localizedName:$.t("Fib Retracement")},LineToolFibSpeedResistanceArcs:{icon:i(651),localizedName:$.t("Fib Speed Resistance Arcs")},LineToolFibSpeedResistanceFan:{icon:i(652),localizedName:$.t("Fib Speed Resistance Fan")},LineToolFibSpiral:{icon:i(653),localizedName:$.t("Fib Spiral")},LineToolFibTimeZone:{icon:i(654),localizedName:$.t("Fib Time Zone")},LineToolFibWedge:{icon:i(655),localizedName:$.t("Fib Wedge")},LineToolFlagMark:{icon:i(656),localizedName:$.t("Flag Mark")},LineToolFlatBottom:{icon:i(657),localizedName:$.t("Flat Top/Bottom")},LineToolGannComplex:{icon:i(305),localizedName:$.t("Gann Square")},LineToolGannFixed:{icon:i(305),localizedName:$.t("Gann Square Fixed")},LineToolGannFan:{icon:i(658),localizedName:$.t("Gann Fan")},LineToolGannSquare:{icon:i(659),localizedName:$.t("Gann Box")},LineToolGhostFeed:{icon:i(660),localizedName:$.t("Ghost Feed")},LineToolHeadAndShoulders:{icon:i(661),localizedName:$.t("Head and Shoulders")},LineToolHorzLine:{icon:i(662),localizedName:$.t("Horizontal Line")},LineToolHorzRay:{icon:i(663),localizedName:$.t("Horizontal Ray")},LineToolIcon:{icon:"icon",localizedName:$.t("Font Icons")},LineToolInsidePitchfork:{icon:i(664),localizedName:$.t("Inside Pitchfork")},LineToolNote:{icon:i(665), @@ -263,8 +263,8 @@ backgroundColor:"rgba( 153, 21, 21, 0.3)",transparency:70}}),void 0===TradingVie d=TradingView.defaultProperties,f=0;ft._major?1:this._minort._minor?1:0},t.prototype.isLess=function(t){return this.compareTo(t)<0},t.prototype.isLessOrEqual=function(t){return this.compareTo(t)<=0},t.prototype.isEqual=function(t){return 0===this.compareTo(t)},t.prototype.isGreater=function(t){return this.compareTo(t)>0},t.prototype.isGreaterOrEqual=function(t){return this.compareTo(t)>=0},t.parse=function(e){var i,n,r;if(e instanceof t)return new t(e.major(),e.minor());if("number"==typeof e)return o.assert(Math.floor(e)===e,"Version should not be a float number"),new t(e,0);if("string"==typeof e){if(i=e.split("."),1===i.length)return n=parseInt(i[0],10),o.assert(!isNaN(n),"Bad version string: "+e),new t(n,0);if(2===i.length)return n=parseInt(i[0],10),o.assert(!isNaN(n),"Bad version string: "+e),r=parseInt(i[1],10),o.assert(!isNaN(r),"Bad version string: "+e),new t(n,r);throw Error("Bad version string (one dot expected): "+e)}throw Error("Bad version: "+e)},t.ZERO=new t(0,0),t}(),e.Version=n},function(t,e,i){"use strict";function o(t){this._studyId=t,this._maxToVers=n.ZERO,this._maxFromVers=n.ZERO,this._migrs=[]}var n=i(300).Version,r=i(7).getLogger("Chart.StudyMigration");o.prototype.addMigration=function(t,e,i){var o=n.parse(t),r=n.parse(e);o.isGreater(this._maxFromVers)&&(this._maxFromVers=o),r.isGreater(this._maxToVers)&&(this._maxToVers=r),this._migrs.push({fromVers:o,toVers:r,rules:i})},o.prototype.updateInputs=function(t,e,i){var o,n,s;if(!i)return i;for(o=TradingView.clone(i),n=t;n.isLess(e)&&null!=(s=this._findMigration(n));){ if(r.logNormal("Migrating study inputs from "+s.fromVers+" to "+s.toVers+" version, studyId: "+this._studyId+", migration: "+JSON.stringify(s)+", inputs: "+JSON.stringify(i)),o=this._applyMigration(o,s),!n.isLess(s.toVers))throw Error("Problems in study migration process... Possible infinite cycle has been detected and stopped.");n=s.toVers}return n>t&&r.logNormal("Study inputs migration is done, studyId: "+this._studyId+", inputs: "+JSON.stringify(o)),o},o.prototype._findMigration=function(t){var e,i,o=-1,n=this._maxFromVers;for(e=0;e=0||e.indexOf(t)>=0},o._applyInputChangedMinMaxRule=function(t,e){if("adjustValIfNeeded"!==e.action)throw Error("Unknown action "+e.action+" for rule with type "+e.type);var i=t[e.inputId];return ie.maxVal&&(t[e.inputId]=e.maxVal),r.logNormal("Input "+e.inputId+"="+i+" adjusted to value "+t[e.inputId]),t},o._applyInputChangedOptionsRule=function(t,e){if(!(["text"].indexOf(e.inputType)>=0&&"resetToDefValIfNeeded"===e.action))throw Error("Unexpected rule.inputType="+e.inputType+" in rule.action="+e.action);var i=t[e.inputId];return e.options.indexOf(i)<0&&(t[e.inputId]=e.defVal,r.logNormal("Input "+e.inputId+"="+i+" reset to default value "+e.defVal)),t},t.exports=o},function(t,e){ t.exports=''},function(t,e){t.exports=''},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t.reduce(function(t,e,i){return~t.indexOf(e)||t.push(e),t},[])},t.exports=e.default},function(t,e){t.exports=''},function(t,e,i){"use strict";var o,n,r,s,a;Object.defineProperty(e,"__esModule",{value:!0}),o=i(24),n=i(5),r=i(17),s=!n.enabled("hide_left_toolbar_by_default"),a=o.getBool("ChartDrawingToolbarWidget.visible",s),e.isDrawingToolbarVisible=new r(a)},function(t,e,i){"use strict";function o(t){var e=t.action,i=t.isActive,o=t.isBgFull,a=t.isHidden,l=t.isTransparent,c=t.toolName;return n.createElement(s.ToolButton,{icon:r.lineToolsInfo[c].icon,isActive:i,isBgFull:o,isHidden:a,isTransparent:l,onClick:e,title:r.lineToolsInfo[c].localizedName})}var n,r,s;Object.defineProperty(e,"__esModule",{value:!0}),n=i(2),r=i(66),s=i(151),e.ToolButtonAction=o},function(t,e,i){"use strict";function o(){var t,e,i=[];for(i=i.concat([61536,61537,61538,61539]),i=i.concat([61725,61726]),i=i.concat([61575,61576,61796,61797]),i=i.concat([61779,61780,61781,61782,61783,61784,61785,61786]),t=i.slice(0),e=61440;e<=61846;e++)-1===i.indexOf(e)&&(e%16==15&&61487!==e||e>=61620&&e<=61630||61718!==e&&61719!==e&&61472!==e&&61619!==e&&t.push(e));return t}Object.defineProperty(e,"__esModule",{value:!0}), -e.availableIcons=o()},function(t,e,i){"use strict";var o,n,r;Object.defineProperty(e,"__esModule",{value:!0}),o=i(10),n=i(24),function(t){function e(e){return t.favorites.indexOf(e)}function i(){t.favorites=[],n.getJSON("chart.favoriteDrawings",[]).forEach(function(e){t.favorites.push(e.tool||e)}),t.favoritesSynced.fire()}function r(){n.setJSON("chart.favoriteDrawings",t.favorites)}t.favorites=[],t.favoritesSynced=new o,t.favoriteIndex=e,t.saveFavorites=r,i(),n.onSync.subscribe(null,i)}(r||(r={})),function(t){function e(){return r.favorites.slice()}function i(){return r.favorites.length}function n(t){return t<0||t>=i()?"":r.favorites[t]}function s(e){return!l(e)&&(r.favorites.push(e),r.saveFavorites(),t.favoriteAdded.fire(e),!0)}function a(e){var i=r.favoriteIndex(e);return-1!==i&&(r.favorites.splice(i,1),r.saveFavorites(),t.favoriteRemoved.fire(e),!0)}function l(t){return-1!==r.favoriteIndex(t)}function c(e,o){if(o<0||o>=i())return!1;var n=r.favoriteIndex(e);return-1!==n&&o!==n&&(r.favorites.splice(n,1),r.favorites.splice(o,0,e),r.saveFavorites(),t.favoriteMoved.fire(e,n,o),!0)}t.favoriteAdded=new o,t.favoriteRemoved=new o,t.favoriteMoved=new o,t.favoritesSynced=r.favoritesSynced,t.favorites=e,t.favoritesCount=i,t.favorite=n,t.addFavorite=s,t.removeFavorite=a,t.isFavorite=l,t.moveFavorite=c}(e.LinetoolsFavoritesStore||(e.LinetoolsFavoritesStore={}))},function(t,e,i){"use strict";function o(t,e){var i=P.colorsPalette[t];if(!i)throw Error("No such color "+t);return i}function n(t){return!t.isPrivate}function r(){return e.themes[e.watchedTheme.value()]||e.themes[e.DEFAULT_THEME]}function s(t){return r().getThemedColor(t)}function a(t){e.watchedTheme.setValue(t)}function l(){a(w.getValue(L)||e.DEFAULT_THEME)}function c(){w.setValue(L,r().name,{forceFlush:!0})}function h(t){return T.loadTheme(t)}function u(){return T.loadThemes()}function d(){return C.getStdThemeNames()}function p(t){return C.getStdChartTheme(t).then(function(t){return t||{content:void 0}})}function _(){return C.getStdThemes()}function f(t,e){return T.saveTheme(t,e)}function m(t){return T.removeTheme(t)}function g(t){return T.isThemeExist(t)}function v(t){return C.translateThemeName(t)}function y(t){return C.isStdTheme(t)}function b(t){return{content:{chartProperties:{paneProperties:t.m_model.properties().paneProperties.state(),scalesProperties:t.m_model.properties().scalesProperties.state()},mainSourceProperties:t.m_model.m_mainSeries.properties().state()}}}var S,w,T,C,x,P,L,I;Object.defineProperty(e,"__esModule",{value:!0}),i(737),i(12),S=i(17),w=i(24),T=i(738),C=i(740),x=i(741),P=i(742),e.themes=(I={},I[C.StdTheme.Light]={name:C.StdTheme.Light,label:window.t("Light",{context:"colorThemeName"}),className:"theme-light",order:2,getThemedColor:function(t){return o(t)}},I[C.StdTheme.Dark]={name:C.StdTheme.Dark,label:window.t("Dark",{context:"colorThemeName"}),className:"theme-dark",order:1,getThemedColor:function(t){return o(x[t])}},I),e.DEFAULT_THEME="light",e.watchedTheme=new S,e.watchedTheme.subscribe(function(t){ -var i=document.getElementsByTagName("html")[0];Object.keys(e.themes).forEach(function(t){i.classList.remove(e.themes[t].className)}),i.classList.add(e.themes[t].className)}),e.isPublicTheme=n,e.getCurrentTheme=r,e.setThemedColor=s,e.setTheme=a,L="current_theme.name",e.restoreTheme=l,e.syncTheme=c,e.getTheme=h,e.getThemeNames=u,e.getStdThemeNames=d,e.getStdTheme=p,e.getStdThemes=_,e.saveTheme=f,e.removeTheme=m,e.isThemeExist=g,e.translateStdThemeName=v,e.isStdTheme=y,e.extractThemeFromModel=b},function(t,e,i){"use strict";var o=i(23),n=i(15).parseJSONorNot,r=i(7).getLogger("Chart.SaveloadAdapter.Library"),s=function(){var t,e,i,s,a={},l=null;return a.setCustomAdapter=function(t){l=t,r.logNormal("Use custom save-load adapter")},a.initialize=function(o,n,r,a){t=o,e=n,i=r,s=a},a.updateUser=function(t){e=t},a.getCharts=function(o,a){function c(t){t=t.map(function(t){return{id:t.id,name:t.name,image_url:t.id,modified_iso:t.timestamp,short_symbol:t.symbol,interval:t.resolution}}),o(t)}return l?void l.getAllCharts().then(c).catch(a):$.ajax({url:"{0}/{1}/charts?client={2}&user={3}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e)),type:"GET",crossDomain:!0}).done(function(t){var e=n(t);if("ok"!==e.status)return r.logWarn("Charts list request failed: "+e.message),void a();c(e.data)}).fail(a)},a.removeChart=function(o,a){if(l)return void l.removeChart(o).then(a);$.ajax({url:"{0}/{1}/charts?client={2}&user={3}&chart={4}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e),encodeURIComponent(o)),type:"DELETE",crossDomain:!0}).done(function(t){var e=n(t);"ok"!==e.status&&r.logWarn("Chart delete request failed: "+e.message),a()})},a.saveChart=function(o,a,c,h,u,d,p){var _,f=u.id.value(),m={name:o,content:JSON.stringify(h),symbol:a,resolution:c};if(l)return m.id=f,void l.saveChart(m).then(d).catch(p);_="{0}/{1}/charts?client={2}&user={3}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e)),void 0!==f&&(_+="&chart="+encodeURIComponent(f)),$.ajax({url:_,data:m,type:"POST",crossDomain:!0}).done(function(t){var e=n(t);if("ok"!==e.status)return r.logWarn("Chart save request failed: "+e.message),void p();d(e.id)}).fail(function(){p()})},a.getChartContent=function(o,a,c){function h(t){var e=JSON.parse(t);return e.uid=o.id,e}if(l)return void l.getChartContent(o.id).then(function(t){var e=h(t);a(e)}).catch(c);$.ajax({url:"{0}/{1}/charts?client={2}&user={3}&chart={4}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e),encodeURIComponent(o.id)),type:"GET",crossDomain:!0}).done(function(t){var e,i=n(t);if("ok"!==i.status)return void r.logWarn("Chart load request failed: "+i.message);e=h(i.data.content),a(e)}).fail(function(){c&&c()})},a.loadChart=function(t){a.getChartContent(t,function(t){o.emit("chart_load_requested",t)},function(){r.logWarn("Error loading chart")})},a.removeStudyTemplate=function(o,a){if(l)return void l.removeStudyTemplate({name:o}).then(a);$.ajax({ +e.availableIcons=o()},function(t,e,i){"use strict";var o,n,r;Object.defineProperty(e,"__esModule",{value:!0}),o=i(10),n=i(24),function(t){function e(e){return t.favorites.indexOf(e)}function i(){t.favorites=[],n.getJSON("chart.favoriteDrawings",[]).forEach(function(e){t.favorites.push(e.tool||e)}),t.favoritesSynced.fire()}function r(){n.setJSON("chart.favoriteDrawings",t.favorites)}t.favorites=[],t.favoritesSynced=new o,t.favoriteIndex=e,t.saveFavorites=r,i(),n.onSync.subscribe(null,i)}(r||(r={})),function(t){function e(){return r.favorites.slice()}function i(){return r.favorites.length}function n(t){return t<0||t>=i()?"":r.favorites[t]}function s(e){return!l(e)&&(r.favorites.push(e),r.saveFavorites(),t.favoriteAdded.fire(e),!0)}function a(e){var i=r.favoriteIndex(e);return-1!==i&&(r.favorites.splice(i,1),r.saveFavorites(),t.favoriteRemoved.fire(e),!0)}function l(t){return-1!==r.favoriteIndex(t)}function c(e,o){if(o<0||o>=i())return!1;var n=r.favoriteIndex(e);return-1!==n&&o!==n&&(r.favorites.splice(n,1),r.favorites.splice(o,0,e),r.saveFavorites(),t.favoriteMoved.fire(e,n,o),!0)}t.favoriteAdded=new o,t.favoriteRemoved=new o,t.favoriteMoved=new o,t.favoritesSynced=r.favoritesSynced,t.favorites=e,t.favoritesCount=i,t.favorite=n,t.addFavorite=s,t.removeFavorite=a,t.isFavorite=l,t.moveFavorite=c}(e.LinetoolsFavoritesStore||(e.LinetoolsFavoritesStore={}))},function(t,e,i){"use strict";function o(t,e){var i=L.colorsPalette[t];if(!i)throw Error("No such color "+t);return i}function n(t){return!t.isPrivate}function r(){return e.themes[e.watchedTheme.value()]||e.themes[e.DEFAULT_THEME]}function s(t){return r().getThemedColor(t)}function a(t){e.watchedTheme.setValue(t)}function l(){a(T.getValue(I)||e.DEFAULT_THEME)}function c(){return T.getValue(I)||null}function h(){T.setValue(I,r().name,{forceFlush:!0})}function u(t){return C.loadTheme(t)}function d(){return C.loadThemes()}function p(){return x.getStdThemeNames()}function _(t){return x.getStdChartTheme(t).then(function(t){return t||{content:void 0}})}function f(){return x.getStdThemes()}function m(t,e){return C.saveTheme(t,e)}function g(t){return C.removeTheme(t)}function v(t){return C.isThemeExist(t)}function y(t){return x.translateThemeName(t)}function b(t){return x.isStdTheme(t)}function S(t){return{content:{chartProperties:{paneProperties:t.m_model.properties().paneProperties.state(),scalesProperties:t.m_model.properties().scalesProperties.state()},mainSourceProperties:t.m_model.m_mainSeries.properties().state()}}}var w,T,C,x,P,L,I,k;Object.defineProperty(e,"__esModule",{value:!0}),i(737),i(12),w=i(17),T=i(24),C=i(738),x=i(740),P=i(741),L=i(742),e.themes=(k={},k[x.StdTheme.Light]={name:x.StdTheme.Light,label:window.t("Light",{context:"colorThemeName"}),className:"theme-light",order:2,getThemedColor:function(t){return o(t)}},k[x.StdTheme.Dark]={name:x.StdTheme.Dark,label:window.t("Dark",{context:"colorThemeName"}),className:"theme-dark",order:1,getThemedColor:function(t){return o(P[t])}},k),e.DEFAULT_THEME="light",e.watchedTheme=new w,e.watchedTheme.subscribe(function(t){ +var i=document.getElementsByTagName("html")[0];Object.keys(e.themes).forEach(function(t){i.classList.remove(e.themes[t].className)}),i.classList.add(e.themes[t].className)}),e.isPublicTheme=n,e.getCurrentTheme=r,e.setThemedColor=s,e.setTheme=a,I="current_theme.name",e.restoreTheme=l,e.savedThemeName=c,e.syncTheme=h,e.getTheme=u,e.getThemeNames=d,e.getStdThemeNames=p,e.getStdTheme=_,e.getStdThemes=f,e.saveTheme=m,e.removeTheme=g,e.isThemeExist=v,e.translateStdThemeName=y,e.isStdTheme=b,e.extractThemeFromModel=S},function(t,e,i){"use strict";var o=i(23),n=i(15).parseJSONorNot,r=i(7).getLogger("Chart.SaveloadAdapter.Library"),s=function(){var t,e,i,s,a={},l=null;return a.setCustomAdapter=function(t){l=t,r.logNormal("Use custom save-load adapter")},a.initialize=function(o,n,r,a){t=o,e=n,i=r,s=a},a.updateUser=function(t){e=t},a.getCharts=function(o,a){function c(t){t=t.map(function(t){return{id:t.id,name:t.name,image_url:t.id,modified_iso:t.timestamp,short_symbol:t.symbol,interval:t.resolution}}),o(t)}return l?void l.getAllCharts().then(c).catch(a):$.ajax({url:"{0}/{1}/charts?client={2}&user={3}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e)),type:"GET",crossDomain:!0}).done(function(t){var e=n(t);if("ok"!==e.status)return r.logWarn("Charts list request failed: "+e.message),void a();c(e.data)}).fail(a)},a.removeChart=function(o,a){if(l)return void l.removeChart(o).then(a);$.ajax({url:"{0}/{1}/charts?client={2}&user={3}&chart={4}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e),encodeURIComponent(o)),type:"DELETE",crossDomain:!0}).done(function(t){var e=n(t);"ok"!==e.status&&r.logWarn("Chart delete request failed: "+e.message),a()})},a.saveChart=function(o,a,c,h,u,d,p){var _,f=u.id.value(),m={name:o,content:JSON.stringify(h),symbol:a,resolution:c};if(l)return m.id=f,void l.saveChart(m).then(d).catch(p);_="{0}/{1}/charts?client={2}&user={3}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e)),void 0!==f&&(_+="&chart="+encodeURIComponent(f)),$.ajax({url:_,data:m,type:"POST",crossDomain:!0}).done(function(t){var e=n(t);if("ok"!==e.status)return r.logWarn("Chart save request failed: "+e.message),void p();d(e.id)}).fail(function(){p()})},a.getChartContent=function(o,a,c){function h(t){var e=JSON.parse(t);return e.uid=o.id,e}if(l)return void l.getChartContent(o.id).then(function(t){var e=h(t);a(e)}).catch(c);$.ajax({url:"{0}/{1}/charts?client={2}&user={3}&chart={4}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e),encodeURIComponent(o.id)),type:"GET",crossDomain:!0}).done(function(t){var e,i=n(t);if("ok"!==i.status)return void r.logWarn("Chart load request failed: "+i.message);e=h(i.data.content),a(e)}).fail(function(){c&&c()})},a.loadChart=function(t){a.getChartContent(t,function(t){o.emit("chart_load_requested",t)},function(){r.logWarn("Error loading chart")})},a.removeStudyTemplate=function(o,a){if(l)return void l.removeStudyTemplate({name:o}).then(a);$.ajax({ url:"{0}/{1}/study_templates?client={2}&user={3}&template={4}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e),encodeURIComponent(o)),type:"DELETE",crossDomain:!0}).done(function(t){var e=n(t);"ok"!==e.status&&r.logWarn("Chart delete request failed: "+e.message),a()})},a.getStudyTemplateContent=function(o,r){if(l)return void l.getStudyTemplateContent({name:o}).then(function(t){r({content:t})});$.ajax({url:"{0}/{1}/study_templates?client={2}&user={3}&template={4}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e),encodeURIComponent(o)),type:"GET",crossDomain:!0}).done(function(t){r(n(t).data)})},a.saveStudyTemplate=function(o,a){var c={name:o.name,content:o.content};if(l)return void l.saveStudyTemplate(c).then(a.bind(null,{error:""})).catch(function(t){a({error:null!=t?""+t:"error"})});$.ajax({url:"{0}/{1}/study_templates?client={2}&user={3}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e)),type:"POST",crossDomain:!0,data:c}).done(function(t){var e=n(t);"ok"!==e.status&&r.logWarn("Template save request failed: "+e.message),a({error:"ok"===e.status?"":e.status})})},a._templatesCache=null,a.getStudyTemplatesList=function(o){function c(t){t=t.map(function(t){return{is_default:!1,name:t.name}}),a._templatesCache=t,o(t)}return a._templatesCache?void o(a._templatesCache):(a._templatesCache=[],l?void l.getAllStudyTemplates().then(c):void $.ajax({url:"{0}/{1}/study_templates?client={2}&user={3}".format(i,encodeURIComponent(s),encodeURIComponent(t),encodeURIComponent(e)),type:"GET",crossDomain:!0}).done(function(t){if(null!==a._templatesCache){var e=n(t);if("ok"!==e.status)return void r.logWarn("Templates list request failed: "+e.message);c(e.data)}}))},a.invalidateStudyTemplatesList=function(){a._templatesCache=null},a}();t.exports=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o={SELECT:"select"};e.events=o},function(t,e,i){"use strict";function o(t){return t.replace(r,s)}function n(t){return void 0===t&&(t=""),t.replace(/(<([^>]+)>)/gi,"")}var r,s;Object.defineProperty(e,"__esModule",{value:!0}),r=/[<"'&>]/g,s=function(t){return"&#"+t.charCodeAt(0)+";"},e.htmlEscape=o,e.removeTags=n},function(t,e,i){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n;Object.defineProperty(e,"__esModule",{value:!0}),n=function(){function t(t,e){var i,o;for(i=0;i0&&void 0!==arguments[0]?arguments[0]:"keydown";o(this,t),this._event=e}return n(t,[{key:"regHandlers",value:function(t){this._handlers=t}},{key:"watchOn",value:function(t){this._listener=this._regListener(),this._watchingEl=t,t.addEventListener(this._event,this._listener)}},{key:"stopWatching",value:function(){ this._watchingEl.removeEventListener(this._event,this._listener)}},{key:"_regListener",value:function(){var t=this;return function(e){var i=e.which,o=t._getHandler(i);e.stopPropagation(),o(e)}}},{key:"_getHandler",value:function(t){var e=this._handlers[t],i=function(){},o=function(t){t.preventDefault(),e(t)};return e?o:i}}]),t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o={SELECT:"select",SELECT_CUSTOM:"selectCustom",AFTER_CLOSE_MENU:"afterCloseMenu",BEFORE_OPEN_MENU:"beforeOpenMenu"};e.events=o},function(t,e,i){"use strict";function o(t,e,i){e.toggleClass("i-hidden",""===t.val()),i.fire(t.val())}function n(t){var e,i,n,s=$(l);return t.addClass&&s.addClass(t.addClass),t.withoutControls&&s.addClass("tv-search-row--without-controls"),e=s.find(".js-input-control"),i=s.find(".js-reset-button"),t.placeholder&&e.attr("placeholder",t.placeholder),i[0].addEventListener("click",function(){e.val("").trigger("input").focus()}),n=new r,e.on("input propertychange",o.bind(null,e,i,n)),o(e,i,n),{$control:s,$input:e,inputChangedDelegate:n}}var r,s,a,l;Object.defineProperty(e,"__esModule",{value:!0}),r=i(10),s=i(383),a=i(762),i(763),l='
'+s+''+a+"
",e.createSearchControl=n},function(t,e,i){"use strict";function o(t){this._options=t||{},this._setInput(),this._caption=$('').html(" "),this._helpTooltipTrigger=$('').text("?").attr("title",$.t("Type the interval number for minute charts (i.e. 5 if it is going to be a five minute chart). Or number plus letter for H (Hourly), D (Daily), W (Weekly), M (Monthly) intervals (i.e. D or 2H)")),this._dialogTitle=$.t("Change Interval")}var n=i(76),r=i(71);o.prototype._setInput=function(){this._input=$(''),this._input.on("keypress",this._handleInput.bind(this)).on("input",function(){this._validate(),this._updateCaption()}.bind(this)).on("blur",function(){setTimeout(this._submit.bind(this),0)}.bind(this))},o.prototype._validate=function(){var t=this._input.val();this._parsed=r.parseIntervalValue(t),this._valid=!this._parsed.error,this._supported=!this._parsed.error&&r.intervalIsSupported(t),!this._supported||this._parsed.unit&&"H"!==this._parsed.unit||this._parsed.qty*("H"===this._parsed.unit?60:1)>1440&&(this._supported=!1)},o.prototype._updateCaption=function(){var t,e,i;this._valid&&this._supported?(e=this._parsed.qty||1,i=this._parsed.unit?{H:"hour",D:"day",W:"week",M:"month",S:"second"}[this._parsed.unit]:"minute",t=e+" "+$.t(i,{count:e}),this._input.add(this._caption).removeClass("error")):(t=this._parsed.error?" ":$.t("Not applicable"),this._input.add(this._caption).addClass("error")),this._caption.html(t)}, o.prototype._handleInput=function(t){if(13===t.which)return void this._submit();t.ctrlKey||t.metaKey||!t.charCode||!t.which||t.which<=32||r.isIntervalChar(String.fromCharCode(t.charCode))||t.preventDefault()},o.prototype._submit=function(){var t,e;TVDialogs.isOpen(this._dialogTitle)&&(this._valid&&this._supported&&(t=r.sanitizeIntervalValue(this._input.val()),e=n.interval.value(),t&&e!==t&&"function"==typeof this._options.callback&&this._options.callback(t)),TVDialogs.destroy(this._dialogTitle))},o.prototype._setInitialValue=function(t){var e,i;t=t||this._options.initialValue,e="",i=!1,t&&","!==t?e=r.sanitizeIntervalValue(t)||"":(t=n.interval.value(),e=t,i=!0),this._input.val(e),i&&this._input.select()},o.prototype.isValid=function(){return!!this._valid},o.prototype.show=function(t){var e=TVDialogs.createDialog(this._dialogTitle,{hideCloseCross:!0,addClass:"change-interval-dialog"}),i=e.find("._tv-dialog-content");return e.css("min-width",0),i.css("min-width",0).mousedown(function(t){this._input.is(t.target)||t.preventDefault()}.bind(this)).append(this._input.add(this._caption).add(this._helpTooltipTrigger)),TVDialogs.applyHandlers(e),TVDialogs.positionDialog(e),this._setInitialValue(t),this._validate(),this._updateCaption(),e},t.exports=o},function(t,e,i){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a,l;Object.defineProperty(e,"__esModule",{value:!0}),e.AddSymbolCheckbox=void 0,a=i(204),l=o(a),e.AddSymbolCheckbox=function(t){function e(t){n(this,e),t.checked=TVSettings.getBool("showAddSymbolDialog.checkboxState",!0);var i=r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.$checkbox.change(function(){setTimeout(function(){TVSettings.setValue("showAddSymbolDialog.checkboxState",i.checked)})}),i}return s(e,t),e}(l.default)},function(t,e,i){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){var i,o,n,r,c,p,_,f,m,g,v,y=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(y=$.extend({},{title:$.t("Confirm Inputs"),callback:function(t){}},y),i=null,o=(0,s.createDialog)({title:y.title,contentWrapTemplate:'
',width:u,closeOnClickAtOtherDialogs:!0,destroyOnClose:!0,actionsWrapTemplate:'
',isClickOutFn:function(t){var e=i.symbolSearchPopup() @@ -333,13 +333,13 @@ data:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, "right"!==this._data.horzAlign&&"center"!==this._data.horzAlign||(T="center"===this._data.horzAlign?t-b.w/2:t-b.w-(b.x-t),C=T-b.x,e+=C,b.x=T,!0!==this._data.doNotAlignText&&("right"===this._data.horzAlign?(r.textAlign="end",e+=d):(r.textAlign="center",e+=d/2))),b.w%2!=0&&b.w++,b.x+=.5,b.y+=.5,this._boundingRect=[new s(b.x,b.y),new s(b.x+b.w,b.y+b.h)],this._rect=b,this._padding=f,this._defaultPadding=y}else"bottom"!==this._data.vertAlign&&"middle"!==this._data.vertAlign||(o-=Math.round(h*("middle"===this._data.vertAlign?.5:1))),x=e,"right"!==this._data.horzAlign&&"center"!==this._data.horzAlign||(x-=Math.round(d*("center"===this._data.horzAlign?.5:1))),this._boundingRect=[new s(x,o),new s(x+d,o+h)];this._textPoint={x:e,y:o},this._textSizeCache&&(this._textSizeCache.widths=u),this._preRendered=!0,this._maxWidth=d}},o.prototype._drawIcon=function(t,e,i,o){var n,r,s,a;if(h.hasOwnProperty(o)){if(n=h[o],!n.src){for(n.src=document.createElement("canvas"),n.src.width=n.width,n.src.height=n.height,r=n.src.getContext("2d"),s=r.createImageData(n.width,n.height),a=0;ao?1:-1},t}(),e.SessionEntry=d,p=function(){function t(t){void 0===t&&(t="0000-0000");var e=this;this._entries=[],this._firstDayOfWeek=s.MONDAY,this._weekEndsCount=null,"24x7"===t.toLowerCase()?u.forEach(function(t){e.addSessionEntry(t,0,0)}):this._parseSpec(t),this._entries.sort(o)}return t.prototype.entries=function(){return this._entries},t.prototype.firstDayOfWeek=function(){return this._firstDayOfWeek},t.prototype.addSessionEntry=function(t,e,i){i<=e&&0!==e&&(e-=s.minutesPerDay);var o=i===e?s.minutesPerDay:i-e;this._entries.push(new d(t,e,o))},t.prototype.isWeekEnd=function(t){var e=a.lowerbound(this._entries,new d(t,0,0),function(t,e){return t.dayOfWeek()this._entries.length-1||this._entries[e].dayOfWeek()!==t},t.prototype.weekEndsCount=function(){if(null===this._weekEndsCount){var t={};this._entries.forEach(function(e){t[e.dayOfWeek()]=1}),this._weekEndsCount=7-Object.keys(t).reduce(function(e,i){return e+(t[+i]||0)},0)}return this._weekEndsCount},t.prototype.hasWeekEnds=function(){return this.weekEndsCount()>0},t.prototype.indexOfSessionEntry=function(t,e){var i=a.lowerbound(this._entries,new d(t,e,0),function(t,e){return t.compareTo(e)<0});return i>this._entries.length-1?0:i},t.prototype.findSessionEntry=function(t,e){return this._entries[this.indexOfSessionEntry(t,e)]},t.prototype.correctTradingDay=function(t,e){var i=s.get_day_of_week(t),o=60*s.get_hours(t)+s.get_minutes(t),n=this.findSessionEntry(i,o),r=n.dayOfWeek(),a=(r-i+7)%7;return 0!==a?s.add_days_considering_dst(e,t,a):t},t.prototype.alignToSessionStart=function(t,e){var i=s.get_day_of_week(t),o=s.get_minutes_from_midnight(t),n=this.findSessionEntry(i,o),a=n.alignedStart(),l=n.dayOfWeek(),c=n.isOvernight(),h=(l-i+7)%7-(c?1:0);return 0!==h&&s.add_date(t,h),s.set_hms(t,a/60|0,a%60,0,0),r(n.length(),t,e)},t.prototype._parseSpec=function(t){var e=this,i={},o=!1;t=this._parseFirstDayOfWeek(t),t.split("|").forEach(function(t){var e,r,s=t.split(":");if(1!==s.length&&2!==s.length)return void c.logError("Bad session section: "+t);if(e=1===s.length){if(o)return void c.logError("Duplicated default section: "+t);o=!0}r=e?h:n(s[1]),r.forEach(function(t){e&&i[t]||(i[t]=s[0])})}),u.forEach(function(o){var n=i[o];void 0!==n&&n.split(",").forEach(function(i){var n,r,a=i.split("-");2!==a.length&&(c.logError("Bad sessions spec: "+t),a=["0000","0000"]),n=a[0],r=a[1],e.addSessionEntry(o,s.get_minutes_from_hhmm(n),s.get_minutes_from_hhmm(r))})})},t.prototype._parseFirstDayOfWeek=function(t){var e,i,o,n=t.split(";");return n.length>2?(c.logError("Only one `first day` specification expected @ session "+t),t):1===n.length?t:(e=n[0].indexOf("-")>=0,i=e?NaN:parseInt(n[0]),o=1,isNaN(i)&&(o=0,i=parseInt(n[1])),is.SATURDAY?(c.logError("Unexpected day index @ session: "+t+"; day index "+i),t):(this._firstDayOfWeek=i,n[o]))},t}(),e.ExchangeSession=p},,,,function(t,e,i){"use strict";(function(t){function o(e){var i,o,c,h,u,d,p,_,f,m,g;if(e=$.extend({},l,e),i=$(t.render(s,{tabs:e.tabs,customControls:e.customControls,customControlsAddClass:e.customControlsContainerAddClass},{additionalHeaderContent:e.additionalHeaderContent})),o=$(a),c=o,e.contentAddClass&&o.addClass(e.contentAddClass),!1!==e.withScroll&&(o=$('
').append(c.addClass("tv-dialog__scroll-wrap-inner"))),h=$('
').append(i).append(o),e.customControls&&i.find(".js-custom-controls").append(e.customControls),!0!==e.doNotCreatePages)for(u=0;u').append(e.tabs[u].page));return d=e.tabStateSaveKey,p=e.activeTab,_=e.tabsScrollBoxAddClass,f=e.tabAddClass,delete e.tabs,delete e.activeTab,delete e.customControls, -delete e.tabStateSaveKey,delete e.customControlsContainerAddClass,delete e.tabsScrollBoxAddClass,delete e.tabAddClass,e.closeButtonAddClass="tv-tabbed-dialog__close",e.contentWrapTemplate=h,m=(0,r.createDialog)(e),g=new n.Tabs(i.find(".tv-tabs").get(0),c.get(0),{addLeftArrowsClass:"tv-tabbed-dialog__tabs-arrow-left",addRightArrowsClass:"tv-tabbed-dialog__tabs-arrow-right",addScrollBoxClass:_,tabClass:f,saveTab:d,activeTab:p}),m.on("afterOpen",function(){g.setActivePage(g.index(),!0,!0)}),{dialog:m,tabs:g}}var n,r,s,a,l;Object.defineProperty(e,"__esModule",{value:!0}),e.createTabbedDialog=o,n=i(955),r=i(65),i(958),s='
{{#tabs}}
{{name}}
{{/tabs}}
{{#customControls}}
{{/customControls}}
{{>additionalHeaderContent}}',a='
',l={tabs:[]}}).call(e,i(41))},function(t,e){t.exports=''},function(t,e){t.exports=''},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,i){"use strict";(function(t){function e(){var t,e,i=$.Deferred();return urlParams.theme?(t=urlParams.theme.toLowerCase(),e=d.themes[t],e?(d.setTheme(e.name),d.getStdTheme(e.name).then(function(t){i.resolve(t.content)}).catch(function(t){console.warn("Cannot load theme {0}, reason: {1}".format(e.name,t)),i.resolve()})):i.resolve()):i.resolve(),i.promise()}function o(){JSON.parse(urlParams.disabledFeatures).forEach(function(e){t.setEnabled(e,!1)}),JSON.parse(urlParams.enabledFeatures).forEach(function(e){t.setEnabled(e,!0)})}function n(){t.enabled("saveload_storage_customization")&&(window.parent[urlParams.uid].saveLoadAdapter?p.setCustomAdapter(window.parent[urlParams.uid].saveLoadAdapter):void 0!==urlParams.chartsStorageUrl&&urlParams.chartsStorageUrl&&void 0!==urlParams.clientId&&urlParams.clientId?p.initialize(urlParams.clientId,urlParams.userId,urlParams.chartsStorageUrl,urlParams.chartsStorageVer||"1.0"):(t.setEnabled("saveload_storage_customization",!1), -t.setEnabled("header_saveload",!1)))}function r(){j.resolve()}var s,a,l,c,h,u,d,p,_,f,m,g,v,y,b,S,w,T,C,x,P,L,I,k,A,M,E,D,V,O,R,B,z,F,N,W,H,U,j,q;i(570),i(12),s=i(573),i(574),i(298),i(601),o(),a=i(2),l=i(39),c=i(602).HeaderToolbar,h=i(621).DrawingToolbar,u=i(306).isDrawingToolbarVisible,d=i(310),p=i(311),_=i(52).Action,f=i(393).ChartSaver,m=i(744).StudyTemplates,g=i(759).FavoriteStudyTemplateService,v=i(76),y=i(23),b=i(28),S=b.formatterOptions,w=b.customFormatters,T=i(760),C=i(761),x=i(769).SaveLoadWidget,P=i(93).TVXWindowEvents,L=i(774),I=i(207),k=i(322).Root,A=i(779).ChartPage,M=new k(window),E=new A(M.allocate()),i(782),D=i(783),V=i(973).FavoriteDrawingToolbar,O=i(976),R=i(1001),B=i(33),z=i(1010),i(234),i(1018),F=i(71),N=window.parent[urlParams.uid].customIndicatorsUrl,W=$.Deferred(),H=$.Deferred(),$.when(W,H).done(function(){ChartApiInstance.start()}),N?$.getScript(N).done(function(){void 0!==window.__customIndicators&&window.isArray(window.__customIndicators)&&(window.PineJS=i(48),JSServer.studyLibrary=JSServer.studyLibrary.concat(window.__customIndicators),console.log("{0} custom indicators loaded.".format(window.__customIndicators.length)),W.resolve())}).fail(function(t){console.warn("Error loading custom indicators @ `{0}`: {1} ({2}) ".format(N,t.statusText,t.status)),W.resolve()}):W.resolve(),window.widgetReady=function(t){y.subscribe("onChartReady",t)},window.customizeUI=function(t){null!=t.studiesOverrides&&B.setDefaultsOverrides(t.studiesOverrides),window.__defaultsOverrides=t.defaultsOverrides},window.applyStudiesOverrides=function(t){t&&window.chartWidgetCollection.applyStudiesOverrides(t)},window.applyOverrides=function(t){$.extend(!0,window.__defaultsOverrides,t),window.applyDefaultsOverrides(TradingView.defaultProperties.chartproperties),window.applyDefaultOverridesToLinetools(),window.chartWidgetCollection.applyOverrides(t)},window.changeTheme=function(t){var e=d.themes[t.toLowerCase()];e&&window.tradingViewApi.themes().setStdTheme(e.name).then(function(){window.applyOverrides(window.__defaultsOverrides)})},window.is_authenticated=!1,window.parent[urlParams.uid].brokerFactory,window.t("charts by TradingView"),window.t("powered by TradingView"),U=function(e){var o,n,r,s,d,p,_,b,k,A,M,B,N,W,U;if(!Modernizr.canvas||!Modernizr.canvastext)throw Error("Charting library cannot be running under this browser");t.setEnabled("charting_library_debug_mode","true"===urlParams.debug),t.setEnabled("chart_property_page_trading",!1),t.setEnabled("chart_property_page_template_button",!1),o=window.headerChartPanel=$(".header-chart-panel"),n=$("#library-container"),t.enabled("remove_library_container_border")&&(n.css("border","0px"),n.css("padding","1px")),window.customizeUI({studiesOverrides:urlParams.studiesOverrides?JSON.parse(urlParams.studiesOverrides):void 0,defaultsOverrides:JSON.parse(urlParams.overrides)}),urlParams.numeric_formatting=urlParams.numeric_formatting&&JSON.parse(urlParams.numeric_formatting), -urlParams.numeric_formatting&&"string"==typeof urlParams.numeric_formatting.decimal_sign&&(S.decimalSign=urlParams.numeric_formatting.decimal_sign[0]),window.ChartApiInstance=new R(window.parent[urlParams.uid].datafeed),window.parent[urlParams.uid].customFormatters&&(window.parent[urlParams.uid].customFormatters.timeFormatter&&(w.timeFormatter=window.parent[urlParams.uid].customFormatters.timeFormatter),window.parent[urlParams.uid].customFormatters.dateFormatter&&(w.dateFormatter=window.parent[urlParams.uid].customFormatters.dateFormatter)),ChartApiInstance.setTimeFramesList(JSON.parse(urlParams.timeFrames)),ChartApiInstance.setStudiesAccessController(ChartApiInstance.createStudiesAccessController(urlParams.studiesAccess)),r=window.parent[window.urlParams.uid].settingsAdapter,null!=r?(TVSettings.setSettingsAdapter(r),TVSettings.sync()):t.enabled("use_localstorage_for_settings")&&TVSettings.sync(),s=urlParams.chartContent?JSON.parse(urlParams.chartContent).json:void 0,d=urlParams.interval||"D",p={resizerBridge:E.allocate({areaName:"center"}),padding:t.enabled("border_around_the_chart")?5:0,edge:t.enabled("border_around_the_chart")?6:0,content:s,widgetOptions:{hideIdeas:!0,addVolume:!0,handleSessionErrors:!0,muteSessionErrors:!0,timezone:urlParams.timezone,defSymbol:urlParams.symbol,defInterval:d,defTimeframe:urlParams.timeframe&&urlParams.timeframe.toLowerCase()},globalEvents:!0,snapshotUrl:urlParams.snapshotUrl},_=t.enabled("left_toolbar"),_&&(b=new V({left:window.innerWidth/2,top:window.headerChartPanel.outerHeight()+61}),p.widgetOptions.favoriteDrawingToolbar=b,p.widgetOptions.isDrawingToolbarVisible=u),s&&void 0!==s.extendedData&&(k=s.extendedData,p.metaInfo={id:k.uid,name:k.name,description:k.description,uid:k.uid,username:"",tags:""}),A=window.chartWidgetCollection=new D(p),window.studyMarket=new C(A,window.user),"undefined"!=typeof serviceLocator&&serviceLocator.registerService(CHART_WIDGET_COLLECTION_SERVICE,A),A.activeChartWidget.subscribe(function(t){y.emit("activeChartChanged",A.getAll().indexOf(t))}),window.saver=new f(A),window.chartWidget=A.activeChartWidget.value(),window.pro=new TradingView.Pro,M=JSON.parse(urlParams.favorites),M.intervals=M.intervals.map(function(t){var e=""+t;return e.match(/1[DWMYdwmy]/)&&(e=e.slice(1)),e}),t.enabled("study_templates")&&(B=new g(P,TVSettings),window.studyTemplates=new m({chartWidgetCollection:A,favoriteStudyTemplatesService:B})),t.enabled("header_widget")&&(N=E.allocate({areaName:"top"}),window.headerWidget=l.render(a.createElement(c,{tools:i(1022).getRestrictedToolSet(),chartSaver:window.saver,chartApiInstance:ChartApiInstance,chartWidgetCollection:A,defaultIntervals:Object.keys(ChartApiInstance.defaultResolutions()),defaultFavoriteStyles:M.chartTypes,defaultFavoriteIntervals:M.intervals,headerChartPanel:o,hideStudyTemplates:!0,resizerBridge:N,studyMarket:window.studyMarket,studyTemplates:window.studyTemplates,favoriteStudyTemplatesService:B,allowedModes:t.enabled("caption_buttons_text_if_possible")?void 0:["medium"]}),N.body.value()[0])), -window.tradingViewApi=new z(A,window.saver,ChartApiInstance,t.enabled("header_saveload")?new x(null,A):null),v.bindToChartWidgetCollection(A),W=urlParams.toolbarbg&&/^[0-9a-f]+$/i.test(urlParams.toolbarbg)?urlParams.toolbarbg+"":void 0,W&&$("