Browse Source

修改技术指标多余单词和输入错误后,要自动刷新图形码

master
liaoxinyu 2 years ago
parent
commit
7897707488
  1. 5
      src/api/server/index.js
  2. 19
      src/views/signUp/index.vue
  3. 2
      static/Kline/charting_library/static/bundles/library.19c99ed5d0307c67f071.js

5
src/api/server/index.js

@ -125,6 +125,10 @@ server.interceptors.response.use(
if (loading) loading.close(); if (loading) loading.close();
let { code, message, data } = response.data; let { code, message, data } = response.data;
// console.log(code);
if(code==4001){
sessionStorage.setItem('COde',code)
}
if (code != 200 && code != 1021) { if (code != 200 && code != 1021) {
@ -158,7 +162,6 @@ server.interceptors.response.use(
} }
} }
return data; return data;
}, },

19
src/views/signUp/index.vue

@ -183,7 +183,8 @@ export default {
repassword: "", repassword: "",
country_id: "", // id country_id: "", // id
phone: "", phone: "",
parentCode: "" parentCode: "",
gc_code: ""
}, },
isAgree: false, isAgree: false,
@ -319,13 +320,15 @@ export default {
this.registerType // this.registerType //
) { ) {
case 1: case 1:
console.log(token);
Member.sendEmailCode({ Member.sendEmailCode({
email: this.user.email, email: this.user.email,
gc_code: this.user.gc_code, gc_code: this.user.gc_code,
gc_key: this.gc_key, gc_key: this.gc_key,
token token
}) }).then(data => {
.then(data => { // console.log(res,1111);
sessionStorage.removeItem("COde");
const res = /^([\w\-\.]+)@([\w\.\-]+)$/.exec(this.user.email); const res = /^([\w\-\.]+)@([\w\.\-]+)$/.exec(this.user.email);
this.ajar.email = `${res[1].slice(0, 3)}${"*".repeat(5)}@${res[2] this.ajar.email = `${res[1].slice(0, 3)}${"*".repeat(5)}@${res[2]
}`; }`;
@ -336,7 +339,14 @@ export default {
this.$refs.spaces[0].focus(); this.$refs.spaces[0].focus();
}); });
}) })
.catch(err => { }); .catch(err => {
const Code = sessionStorage.getItem('COde')
if(Code==4001){
setTimeout(()=>{
this.gett_gc_code()
},1000)
}
});
break; break;
case 2: // case 2: //
@ -379,6 +389,7 @@ export default {
Member.sendGCode().then( (res) =>{ Member.sendGCode().then( (res) =>{
this.gc_key = res.key this.gc_key = res.key
this.Graph_che = res.img this.Graph_che = res.img
console.log(this.gc_key);
console.log("gc",res) console.log("gc",res)
this.$message({ this.$message({
message: `${type} ${this.$t("login.sendOK")}`, message: `${type} ${this.$t("login.sendOK")}`,

2
static/Kline/charting_library/static/bundles/library.19c99ed5d0307c67f071.js

@ -377,7 +377,7 @@ TradingView.study_LinearRegression=function(){},TradingView.study_ElliottWave=fu
this.onDisconnect=new t,this._quoteApi=new n(ChartApiInstance),this._type=e||"full",this.fieldsSent=new $.Deferred,this._delayUpdateFastSymbols=s(this._updateFastSymbols,250),this._throttledSymbolData={},this._formatterValuesCache={},this._waitingForFormatters={},this._snapshotValuesCache={},this._waitingForSnapshot={},this.connect()}var n,r=i(41).PriceFormatter,s=i(374),a=i(710),l=i(711),c=i(64);n=i(736),o.prototype.destroy=function(){this._quoteApi.destroy(),this._quoteApi=null,this._connected=!1,this.onDisconnect.fire()},o.prototype.typeFields={},o.prototype.typeFields.simple=["ch","chp","current_session","description","local_description","language","exchange","fractional","is_tradable","lp","minmov","minmove2","original_name","pricescale","pro_name","short_name","type","update_mode","volume"],o.prototype.typeFields.simpleDetailed=[].concat(o.prototype.typeFields.simple,["ask","bid","fundamentals","high_price","is_tradable","low_price","open_price","prev_close_price","rch","rchp","rtc","status","basic_eps_net_income","beta_1_year","earnings_per_share_basic_ttm","industry","market_cap_basic","price_earnings_ttm","sector","volume"]),o.prototype.typeFields.full=[],o.prototype.connect=function(t){this._quoteApi.connect(this.quoteHandler.bind(this))},o.prototype.quoteHandler=function(t){var e=t.method,i=t.params;switch(e){case"connected":this._connected||(this._connected=!0,this.onConnected());break;case"quote_list_fields":break;case"quote_symbol_data":this._connected&&this.onSymbolData(i[0]);break;case"disconnected":this._connected&&(this._connected=!1,this.onDisconnect.fire())}},o.prototype.onConnected=function(){this.setFields();var t=Object.keys(this._symbol_data);t.length&&this._quoteApi.quoteAddSymbols(t,{forcePermission:!0}),this._delayed_subscriptions.forEach(function(t){this.subscribe.apply(this,t)},this),this._delayed_subscriptions=[],this.onConnect.fire()},o.prototype.setFields=function(){var t=o.prototype.typeFields[this._type];t&&t.length&&this._quoteApi.quoteSetFields(t),this.fieldsSent.resolve()},o.prototype.onSymbolData=function(t){var e=t.symbolname,i=this._throttledSymbolData[e];i||(i=this._throttledSymbolData[e]={fnDispatch:a(this.dipatchSymbolData.bind(this),this.options.throttleTimeout)}),i.cache?$.extend(!0,i.cache,t):i.cache=t,i.fnDispatch(e)},o.prototype._parseUpdateMode=function(t){var e=t.update_mode;e&&(e=e.match(/(delayed_streaming){1}(?:_([\d]+))?/))&&e[1]&&(e[2]&&(t.update_mode_seconds=+e[2]),t.update_mode=e[1])},o.prototype.dipatchSymbolData=function(t){var e,i,o=this._symbol_data[t],n=this._throttledSymbolData[t].cache;if(delete this._throttledSymbolData[t].cache,this._symbol_data[t]){$.extend(!0,o,n),o.values&&this._parseUpdateMode(o.values);for(e in this._subscriptions)i=this._subscriptions[e],i[t]&&i[t].forEach(function(t){t(o,n)})}},o.prototype.subscribe=function(t,e,i){var o,n;if(!this._connected)return void this._delayed_subscriptions.push(arguments);this._subscriptions[t]=this._subscriptions[t]||{},o=this._subscriptions[t],e=[].concat(e),n=[],e.forEach(function(t){ this.onDisconnect=new t,this._quoteApi=new n(ChartApiInstance),this._type=e||"full",this.fieldsSent=new $.Deferred,this._delayUpdateFastSymbols=s(this._updateFastSymbols,250),this._throttledSymbolData={},this._formatterValuesCache={},this._waitingForFormatters={},this._snapshotValuesCache={},this._waitingForSnapshot={},this.connect()}var n,r=i(41).PriceFormatter,s=i(374),a=i(710),l=i(711),c=i(64);n=i(736),o.prototype.destroy=function(){this._quoteApi.destroy(),this._quoteApi=null,this._connected=!1,this.onDisconnect.fire()},o.prototype.typeFields={},o.prototype.typeFields.simple=["ch","chp","current_session","description","local_description","language","exchange","fractional","is_tradable","lp","minmov","minmove2","original_name","pricescale","pro_name","short_name","type","update_mode","volume"],o.prototype.typeFields.simpleDetailed=[].concat(o.prototype.typeFields.simple,["ask","bid","fundamentals","high_price","is_tradable","low_price","open_price","prev_close_price","rch","rchp","rtc","status","basic_eps_net_income","beta_1_year","earnings_per_share_basic_ttm","industry","market_cap_basic","price_earnings_ttm","sector","volume"]),o.prototype.typeFields.full=[],o.prototype.connect=function(t){this._quoteApi.connect(this.quoteHandler.bind(this))},o.prototype.quoteHandler=function(t){var e=t.method,i=t.params;switch(e){case"connected":this._connected||(this._connected=!0,this.onConnected());break;case"quote_list_fields":break;case"quote_symbol_data":this._connected&&this.onSymbolData(i[0]);break;case"disconnected":this._connected&&(this._connected=!1,this.onDisconnect.fire())}},o.prototype.onConnected=function(){this.setFields();var t=Object.keys(this._symbol_data);t.length&&this._quoteApi.quoteAddSymbols(t,{forcePermission:!0}),this._delayed_subscriptions.forEach(function(t){this.subscribe.apply(this,t)},this),this._delayed_subscriptions=[],this.onConnect.fire()},o.prototype.setFields=function(){var t=o.prototype.typeFields[this._type];t&&t.length&&this._quoteApi.quoteSetFields(t),this.fieldsSent.resolve()},o.prototype.onSymbolData=function(t){var e=t.symbolname,i=this._throttledSymbolData[e];i||(i=this._throttledSymbolData[e]={fnDispatch:a(this.dipatchSymbolData.bind(this),this.options.throttleTimeout)}),i.cache?$.extend(!0,i.cache,t):i.cache=t,i.fnDispatch(e)},o.prototype._parseUpdateMode=function(t){var e=t.update_mode;e&&(e=e.match(/(delayed_streaming){1}(?:_([\d]+))?/))&&e[1]&&(e[2]&&(t.update_mode_seconds=+e[2]),t.update_mode=e[1])},o.prototype.dipatchSymbolData=function(t){var e,i,o=this._symbol_data[t],n=this._throttledSymbolData[t].cache;if(delete this._throttledSymbolData[t].cache,this._symbol_data[t]){$.extend(!0,o,n),o.values&&this._parseUpdateMode(o.values);for(e in this._subscriptions)i=this._subscriptions[e],i[t]&&i[t].forEach(function(t){t(o,n)})}},o.prototype.subscribe=function(t,e,i){var o,n;if(!this._connected)return void this._delayed_subscriptions.push(arguments);this._subscriptions[t]=this._subscriptions[t]||{},o=this._subscriptions[t],e=[].concat(e),n=[],e.forEach(function(t){
this._symbol_data[t]?o&&o[t]||this._symbol_data[t].subscribers_count++:(this._symbol_data[t]={subscribers_count:1},n.push(t)),o[t]=o[t]||[],o[t].push(i),o[t].fast=!0,this._symbol_data[t]&&this._symbol_data[t].values&&i(this._symbol_data[t],this._symbol_data[t])},this),n.length&&(this._quoteApi.quoteAddSymbols(n,{forcePermission:!0}),this._delayUpdateFastSymbols())},o.prototype.unsubscribe=function(t,e,i){var o,n=this._subscriptions[t];n&&(n[e]&&i?(o=n[e].indexOf(i),~o&&n[e].splice(o,1),n[e].length||delete n[e]):delete n[e]),n&&0===Object.keys(n).length&&delete this._subscriptions[t],this._symbol_data.hasOwnProperty(e)&&(n&&!n[e]&&this._symbol_data[e].subscribers_count--,this._symbol_data[e].subscribers_count||(delete this._symbol_data[e],this._quoteApi.quoteRemoveSymbols([e]),this._delayUpdateFastSymbols()))},o.prototype.setFastSymbols=function(t,e){var i,o;if(this._subscriptions[t]){i=this._subscriptions[t];for(o in i)i[o].fast=-1!==e.indexOf(o)}this._delayUpdateFastSymbols()},o.prototype._updateFastSymbols=function(){if(this._connected){var t=this._fastSymbols();0===t.length?this._quoteApi.quoteHibernateAll():this._quoteApi.quoteFastSymbols(t)}},o.prototype._delayUpdateFastSymbols=o.prototype._updateFastSymbols,o.prototype._fastSymbols=function(){var t,e,i,o=[];for(t in this._subscriptions){e=this._subscriptions[t];for(i in e)e[i].fast&&o.push(i)}return o=l(o)},o.prototype.formatter=function(t){function e(t){return new r(t.pricescale,t.minmov,t.fractional,t.minmove2)}function i(t){return t&&null!=t.pricescale&&null!=t.minmov}var o,n=this;return this._waitingForFormatters[t]?this._waitingForFormatters[t]:(o=new Promise(function(o,r){if(n._formatterValuesCache[t])o(e(n._formatterValuesCache[t]));else{var s=c.guid();n.subscribe(s,[t],function(a){a.error&&(n._waitingForFormatters[t]=null,r(a.error)),i(a.values)&&(n._waitingForFormatters[t]=null,n._formatterValuesCache[t]=a.values,o(e(a.values)),n.unsubscribe(s,t))})}}),this._waitingForFormatters[t]=o,o)},o.prototype.snapshot=function(t){var e,i=this;return this._waitingForSnapshot[t]?this._waitingForSnapshot[t]:(e=new Promise(function(e,o){if(i._snapshotValuesCache[t])e(i._snapshotValuesCache[t]);else{var n=c.guid();i.subscribe(n,[t],function(r){r.error&&(i._waitingForSnapshot[t]=null,o(r.error));var s=r.values;s&&s.minmov&&s.pricescale&&s.description&&(i._waitingForSnapshot[t]=null,i._snapshotValuesCache[t]=s,e(s),i.unsubscribe(n,t))})}}),this._waitingForSnapshot[t]=e,e)},TradingView.QuoteSessionMultiplexer=o,void 0!==e&&e&&e.exports&&(e.exports=o)}).call(e,i(20),i(78)(t))},,function(t,e){"use strict";function i(t,e){this.array=[];for(var i in t)t[i].key=i,this.array.push(t[i]);this.rearrange(e)}i.prototype.rearrange=function(t){if("function"!=typeof t)throw Error("sort param is not a function");return this.array.sort(t)},i.byValue=function(t){return function(t,e){return t-e}},i.byField=function(t){return function(e,i){return e[t]>i[t]?1:e[t]<i[t]?-1:e[t]===i[t]?0:void 0}},i.byOrder=function(t){return function(e,i){return t.indexOf(e.key)-t.indexOf(i.key)}}, this._symbol_data[t]?o&&o[t]||this._symbol_data[t].subscribers_count++:(this._symbol_data[t]={subscribers_count:1},n.push(t)),o[t]=o[t]||[],o[t].push(i),o[t].fast=!0,this._symbol_data[t]&&this._symbol_data[t].values&&i(this._symbol_data[t],this._symbol_data[t])},this),n.length&&(this._quoteApi.quoteAddSymbols(n,{forcePermission:!0}),this._delayUpdateFastSymbols())},o.prototype.unsubscribe=function(t,e,i){var o,n=this._subscriptions[t];n&&(n[e]&&i?(o=n[e].indexOf(i),~o&&n[e].splice(o,1),n[e].length||delete n[e]):delete n[e]),n&&0===Object.keys(n).length&&delete this._subscriptions[t],this._symbol_data.hasOwnProperty(e)&&(n&&!n[e]&&this._symbol_data[e].subscribers_count--,this._symbol_data[e].subscribers_count||(delete this._symbol_data[e],this._quoteApi.quoteRemoveSymbols([e]),this._delayUpdateFastSymbols()))},o.prototype.setFastSymbols=function(t,e){var i,o;if(this._subscriptions[t]){i=this._subscriptions[t];for(o in i)i[o].fast=-1!==e.indexOf(o)}this._delayUpdateFastSymbols()},o.prototype._updateFastSymbols=function(){if(this._connected){var t=this._fastSymbols();0===t.length?this._quoteApi.quoteHibernateAll():this._quoteApi.quoteFastSymbols(t)}},o.prototype._delayUpdateFastSymbols=o.prototype._updateFastSymbols,o.prototype._fastSymbols=function(){var t,e,i,o=[];for(t in this._subscriptions){e=this._subscriptions[t];for(i in e)e[i].fast&&o.push(i)}return o=l(o)},o.prototype.formatter=function(t){function e(t){return new r(t.pricescale,t.minmov,t.fractional,t.minmove2)}function i(t){return t&&null!=t.pricescale&&null!=t.minmov}var o,n=this;return this._waitingForFormatters[t]?this._waitingForFormatters[t]:(o=new Promise(function(o,r){if(n._formatterValuesCache[t])o(e(n._formatterValuesCache[t]));else{var s=c.guid();n.subscribe(s,[t],function(a){a.error&&(n._waitingForFormatters[t]=null,r(a.error)),i(a.values)&&(n._waitingForFormatters[t]=null,n._formatterValuesCache[t]=a.values,o(e(a.values)),n.unsubscribe(s,t))})}}),this._waitingForFormatters[t]=o,o)},o.prototype.snapshot=function(t){var e,i=this;return this._waitingForSnapshot[t]?this._waitingForSnapshot[t]:(e=new Promise(function(e,o){if(i._snapshotValuesCache[t])e(i._snapshotValuesCache[t]);else{var n=c.guid();i.subscribe(n,[t],function(r){r.error&&(i._waitingForSnapshot[t]=null,o(r.error));var s=r.values;s&&s.minmov&&s.pricescale&&s.description&&(i._waitingForSnapshot[t]=null,i._snapshotValuesCache[t]=s,e(s),i.unsubscribe(n,t))})}}),this._waitingForSnapshot[t]=e,e)},TradingView.QuoteSessionMultiplexer=o,void 0!==e&&e&&e.exports&&(e.exports=o)}).call(e,i(20),i(78)(t))},,function(t,e){"use strict";function i(t,e){this.array=[];for(var i in t)t[i].key=i,this.array.push(t[i]);this.rearrange(e)}i.prototype.rearrange=function(t){if("function"!=typeof t)throw Error("sort param is not a function");return this.array.sort(t)},i.byValue=function(t){return function(t,e){return t-e}},i.byField=function(t){return function(e,i){return e[t]>i[t]?1:e[t]<i[t]?-1:e[t]===i[t]?0:void 0}},i.byOrder=function(t){return function(e,i){return t.indexOf(e.key)-t.indexOf(i.key)}},
t.exports=i},function(t,e){"use strict";!function(t){t.fn.contextMenu=function(e){t(this).bind("contextmenu",function(t){return e(t),!1})}}(jQuery)},,function(t,e){"use strict";!function(t,e,i){"$:nomunge";function o(o,n){function r(e){t(s).each(function(){var i=t(this);this===e.target||i.has(e.target).length||i.triggerHandler(n,[e.target])})}n=n||o+i;var s=t(),a=o+"."+n+"-special-event";t.event.special[n]={setup:function(){s=s.add(this),delete s.prevObject,1===s.length&&t(e).bind(a,r)},teardown:function(){s=s.not(this),delete s.prevObject,0===s.length&&t(e).unbind(a)},add:function(t){var e=t.handler;t.handler=function(t,i){t.target=i,e.apply(this,arguments)}}}}t.map("click dblclick mousemove mousedown mouseup mouseover mouseout change select submit keydown keypress keyup".split(" "),function(t){o(t)}),o("focusin","focus"+i),o("focusout","blur"+i),Modernizr.touch&&(o("touchstart","mousedown"+i),o("touchmove","mousemove"+i),o("touchend","mouseup"+i)),t.addOutsideEvent=o}(jQuery,document,"outside")},function(t,e){"use strict";!function(t){t.fn.selectable=function(e){return this.each(function(){var i=t(this);i.css("user-select",e?"text":"none"),i.css("-moz-user-select",e?"text":"-moz-none"),i.css("-webkit-user-select",e?"auto":"none"),(t.browser.msie||t.browser.opera)&&i.attr("unselectable",e?"off":"on")})}}(jQuery)},function(t,e,i){(function(e){"use strict";function o(){}var n=i(367).AddCompareDialog,r=i(43),s=i(180),a=i(13).getLogger("Chart.ChartHeaderWidget");TradingView.SYMBOL_SEARCH_MAX_LENGTH=1e3,o.prototype._createBarsGroup=function(t){var e=this.createGroup("bars-style",{single:!0});return t._style_list.element().appendTo(e),e},o.prototype._createPropertiesGroup=function(t,o){var n,r=this.createGroup("properties",{single:!0});return this._onWidget&&!e.enabled("header_settings")||(n=$("<span>").addClass("button iconed properties apply-common-tooltip").append($(i(1235)).attr({width:17,height:17})).appendTo(r),n.on(t,function(t){t.pageX=n.offset().left,t.pageY=n.offset().top+n.height()+15,TVSettings.getValue("properties_dialog.active_tab.chart")||TVSettings.setValue("properties_dialog.active_tab.chart",$.t("Style")),o.activeChartWidget.value().showChartProperties({_lastEvent:t}).then(function(t){null!==t&&(n.addClass("active"),t.on("destroy",function(){n.removeClass("active")}))})}),n.attr("title",$.t("Chart Properties"))),r},o.prototype._createCompareGroup=function(t,e,o){var r=this.createGroup("compare",{single:!0}),s=$('<a class="button toggle-caption compare apply-common-tooltip">').append($(i(1202))).append($('<span class="caption">'+$.t("Compare")+"</span>")).appendTo(r);return this._compareButton=s,this._compareButton.on(o,function(t){var i,o;t.preventDefault(),i=new n(e),o=i.show(),s.addClass("active"),o.on("destroy",function(){s.removeClass("active")})}),this._compareButton.attr("title",$.t("Compare or Add Symbol")),r},o.prototype._createIndicatorsGroup=function(t,o){var n,a=this.createGroup("indicators",{single:!0,showInNarrowView:!0}) t.exports=i},function(t,e){"use strict";!function(t){t.fn.contextMenu=function(e){t(this).bind("contextmenu",function(t){return e(t),!1})}}(jQuery)},,function(t,e){"use strict";!function(t,e,i){"$:nomunge";function o(o,n){function r(e){t(s).each(function(){var i=t(this);this===e.target||i.has(e.target).length||i.triggerHandler(n,[e.target])})}n=n||o+i;var s=t(),a=o+"."+n+"-special-event";t.event.special[n]={setup:function(){s=s.add(this),delete s.prevObject,1===s.length&&t(e).bind(a,r)},teardown:function(){s=s.not(this),delete s.prevObject,0===s.length&&t(e).unbind(a)},add:function(t){var e=t.handler;t.handler=function(t,i){t.target=i,e.apply(this,arguments)}}}}t.map("click dblclick mousemove mousedown mouseup mouseover mouseout change select submit keydown keypress keyup".split(" "),function(t){o(t)}),o("focusin","focus"+i),o("focusout","blur"+i),Modernizr.touch&&(o("touchstart","mousedown"+i),o("touchmove","mousemove"+i),o("touchend","mouseup"+i)),t.addOutsideEvent=o}(jQuery,document,"outside")},function(t,e){"use strict";!function(t){t.fn.selectable=function(e){return this.each(function(){var i=t(this);i.css("user-select",e?"text":"none"),i.css("-moz-user-select",e?"text":"-moz-none"),i.css("-webkit-user-select",e?"auto":"none"),(t.browser.msie||t.browser.opera)&&i.attr("unselectable",e?"off":"on")})}}(jQuery)},function(t,e,i){(function(e){"use strict";function o(){}var n=i(367).AddCompareDialog,r=i(43),s=i(180),a=i(13).getLogger("Chart.ChartHeaderWidget");TradingView.SYMBOL_SEARCH_MAX_LENGTH=1e3,o.prototype._createBarsGroup=function(t){var e=this.createGroup("bars-style",{single:!0});return t._style_list.element().appendTo(e),e},o.prototype._createPropertiesGroup=function(t,o){var n,r=this.createGroup("properties",{single:!0});return this._onWidget&&!e.enabled("header_settings")||(n=$("<span>").addClass("button iconed properties apply-common-tooltip").append($(i(1235)).attr({width:17,height:17})).appendTo(r),n.on(t,function(t){t.pageX=n.offset().left,t.pageY=n.offset().top+n.height()+15,TVSettings.getValue("properties_dialog.active_tab.chart")||TVSettings.setValue("properties_dialog.active_tab.chart",$.t("Style")),o.activeChartWidget.value().showChartProperties({_lastEvent:t}).then(function(t){null!==t&&(n.addClass("active"),t.on("destroy",function(){n.removeClass("active")}))})}),n.attr("title",$.t("Chart Properties"))),r},o.prototype._createCompareGroup=function(t,e,o){var r=this.createGroup("compare",{single:!0}),s=$('<a class="button toggle-caption compare apply-common-tooltip">').append($(i(1202))).append($('<span class="caption">'+$.t("Compare")+"</span>")).appendTo(r);return this._compareButton=s,this._compareButton.on(o,function(t){var i,o;t.preventDefault(),i=new n(e),o=i.show(),s.addClass("active"),o.on("destroy",function(){s.removeClass("active")})}),this._compareButton.attr("title",$.t("Compare or Add Symbol")),r},o.prototype._createIndicatorsGroup=function(t,o){var n,a=this.createGroup("indicators",{single:!0,showInNarrowView:!0})
;return this._indicatorsButton=$('<a class="button toggle-caption indicators'+(this._onWidget?" no-last":"")+' apply-common-tooltip">').append($(i(1213))).append($('<span class="caption">'+$.t("Indicators")+"</span>")).appendTo(a),n="\n"+$.t("Slash",{context:"hotkey"})+" /",e.enabled("charting_library_base")||e.enabled("widget")?this._indicatorsButton.attr("title",$.t("Indicators")+n):this._indicatorsButton.attr("title",$.t("Indicators, Fundamentals, Economy and Add-ons")+n),this._indicatorsButton.on(t,function(t){t.preventDefault(),window.studyMarket.isVisible()?window.studyMarket.hide():(window.studyMarket.show(),r.emit("indicators_dialog"))}),s.registerListener("IndicatorsHotkey",function(t){if(47===t.which&&$(t.target).is("body")&&!window.studyMarket.isVisible())return window.studyMarket.show(),window.studyMarket.selectSearchPage(),t.preventDefault(),t.stopPropagation(),!0}),window.studyMarket.visibilityChanged.subscribe(this,function(t){this._indicatorsButton.toggleClass("active",t)}),!TradingView.onWidget()&&e.enabled("study_templates")&&studyTemplates.appendMenuButtonTo(a),a},o.prototype.createGroup=function(t,e){e=e||{};var i=$("<div>").addClass("group");return e.right&&i.addClass("right"),e.single&&i.addClass("space-single"),t&&i.addClass("header-group-"+t),i},o.prototype.bindToModel=function(){var t=this._chartWidget.model();this._model=t},o.prototype.backButton=function(){return this._backButton},o.prototype.saveLoadWidget=function(){return this._saveLoad||a.logWarn("No save-load widget created in footer")},o.prototype.styleIconPosition=function(t){return"-%1px 0".replace("%1",19*~~t)},o.styleIconPosition=o.prototype.styleIconPosition,t.exports=o}).call(e,i(7))},function(t,e,i){(function(e){"use strict";function o(t){function o(){if(!t.favoriteChartTypes)return[];var e={Bars:p.STYLE_BARS,Candles:p.STYLE_CANDLES,Line:p.STYLE_LINE,Area:p.STYLE_AREA,"Heiken Ashi":p.STYLE_HEIKEN_ASHI,"Hollow Candles":p.STYLE_HOLLOW_CANDLES,Baseline:p.STYLE_BASELINE};return t.favoriteChartTypes.map(function(t){return e[t]})}var a,f,m,g,v,y,b,S,w,T,x,C,P,L,I,k,A,M,E,V,D;t=t||{},a=this._chartWidgetCollection=t.chartWidgetCollection,f=this._chartWidget=a.activeChartWidget.value(),m=this._onWidget=f.onWidget(),g=this,v=Modernizr.touch?"touchstart":"click",this._onResizeRequested=!1,this._resizerBridge=t.resizerBridge,this._$root=$(t.resizerBridge.body.value()),this._$root.addClass("header-chart-panel").html('<div class="header-chart-panel-sizer"><div class="header-chart-panel-content"><div class="right"></div><div class="left"></div></div></div>'),this._$sizer=this._$root.find(".header-chart-panel-sizer"),this._$content=this._$root.find(".header-chart-panel-content"),this._$left=this._$root.find(".left"),this._$right=this._$root.find(".right"),this._itemsVisibility=t.itemsVisibility,a.readOnly()||(e.enabled("header_symbol_search")&&(y=this.createGroup("symbol-search").appendTo(this._$left),b=$('<div class="symbol-edit-widget no-last"></div>').appendTo(y),S=$('<div class="symbol-edit-wrap">').appendTo(b),w=null, ;return this._indicatorsButton=$('<a class="button toggle-caption indicators'+(this._onWidget?" no-last":"")+' apply-common-tooltip">').append($(i(1213))).append($('<span class="caption">'+$.t("Indicators")+"</span>")).appendTo(a),n="\n"+$.t("Slash",{context:"hotkey"}),e.enabled("charting_library_base")||e.enabled("widget")?this._indicatorsButton.attr("title",$.t("Indicators")+n):this._indicatorsButton.attr("title",$.t("Indicators, Fundamentals, Economy and Add-ons")+n),this._indicatorsButton.on(t,function(t){t.preventDefault(),window.studyMarket.isVisible()?window.studyMarket.hide():(window.studyMarket.show(),r.emit("indicators_dialog"))}),s.registerListener("IndicatorsHotkey",function(t){if(47===t.which&&$(t.target).is("body")&&!window.studyMarket.isVisible())return window.studyMarket.show(),window.studyMarket.selectSearchPage(),t.preventDefault(),t.stopPropagation(),!0}),window.studyMarket.visibilityChanged.subscribe(this,function(t){this._indicatorsButton.toggleClass("active",t)}),!TradingView.onWidget()&&e.enabled("study_templates")&&studyTemplates.appendMenuButtonTo(a),a},o.prototype.createGroup=function(t,e){e=e||{};var i=$("<div>").addClass("group");return e.right&&i.addClass("right"),e.single&&i.addClass("space-single"),t&&i.addClass("header-group-"+t),i},o.prototype.bindToModel=function(){var t=this._chartWidget.model();this._model=t},o.prototype.backButton=function(){return this._backButton},o.prototype.saveLoadWidget=function(){return this._saveLoad||a.logWarn("No save-load widget created in footer")},o.prototype.styleIconPosition=function(t){return"-%1px 0".replace("%1",19*~~t)},o.styleIconPosition=o.prototype.styleIconPosition,t.exports=o}).call(e,i(7))},function(t,e,i){(function(e){"use strict";function o(t){function o(){if(!t.favoriteChartTypes)return[];var e={Bars:p.STYLE_BARS,Candles:p.STYLE_CANDLES,Line:p.STYLE_LINE,Area:p.STYLE_AREA,"Heiken Ashi":p.STYLE_HEIKEN_ASHI,"Hollow Candles":p.STYLE_HOLLOW_CANDLES,Baseline:p.STYLE_BASELINE};return t.favoriteChartTypes.map(function(t){return e[t]})}var a,f,m,g,v,y,b,S,w,T,x,C,P,L,I,k,A,M,E,V,D;t=t||{},a=this._chartWidgetCollection=t.chartWidgetCollection,f=this._chartWidget=a.activeChartWidget.value(),m=this._onWidget=f.onWidget(),g=this,v=Modernizr.touch?"touchstart":"click",this._onResizeRequested=!1,this._resizerBridge=t.resizerBridge,this._$root=$(t.resizerBridge.body.value()),this._$root.addClass("header-chart-panel").html('<div class="header-chart-panel-sizer"><div class="header-chart-panel-content"><div class="right"></div><div class="left"></div></div></div>'),this._$sizer=this._$root.find(".header-chart-panel-sizer"),this._$content=this._$root.find(".header-chart-panel-content"),this._$left=this._$root.find(".left"),this._$right=this._$root.find(".right"),this._itemsVisibility=t.itemsVisibility,a.readOnly()||(e.enabled("header_symbol_search")&&(y=this.createGroup("symbol-search").appendTo(this._$left),b=$('<div class="symbol-edit-widget no-last"></div>').appendTo(y),S=$('<div class="symbol-edit-wrap">').appendTo(b),w=null,
!e.enabled("charting_library_base")&&u.canShowSpreadActions()&&(T=$('<div class="symbol-edit-buttonswrap">').appendTo(S),w=$('<div class="spread-actions">').appendTo(T).on("mousedown",function(t){t.preventDefault()})),x=$('<div class="symbol-edit-inputspacer">').appendTo(S),C=$('<input type="text" class="symbol-edit" maxlength="'+TradingView.SYMBOL_SEARCH_MAX_LENGTH+'">').appendTo(x),u.bindToInput(C,{syncWithChartWidget:!0,spreadActions:w}),function(){var t=!1;C.on("focus",function(){t=!0,S.addClass("expanded")}),C.on("blur",function(){t=!1,setTimeout(function(){t||S.removeClass("expanded")},40)})}()),e.enabled("header_resolutions")&&(y=this.createGroup("intervals",{single:!0,showInNarrowView:!0}).appendTo(this._$left),P={onWidget:m,submenuBtnAddClass:"apply-common-tooltip"},t.interval_options&&$.extend(P,t.interval_options),e.enabled("items_favoriting")||$.extend(P,{notShowQuicks:!0,popupSpacing:1}),TradingView.isOnFeaturePage&&$.extend(P,{notShowQuicks:!0}),this._interval=new l(P),loginStateChange.subscribe(this,function(){window.is_authenticated&&this._interval.forceUpdate()}),e.enabled("charting_library_base")&&ChartApiInstance.on("configuration_received",function(){g._interval.forceUpdate()}),this._interval.element().addClass("no-first").appendTo(y),this._interval.onResize.subscribe(this,this._onInternalResize),t.favoriteIntervals&&this._interval.setUpStarredItemsList(t.favoriteIntervals)),e.enabled("header_chart_type")&&(L=[{id:p.STYLE_BARS,title:$.t("Bars")},{id:p.STYLE_CANDLES,title:$.t("Candles")},{id:p.STYLE_HOLLOW_CANDLES,title:$.t("Hollow Candles")},{id:p.STYLE_HEIKEN_ASHI,title:$.t("Heikin Ashi")},{id:p.STYLE_LINE,title:$.t("Line")},{id:p.STYLE_AREA,title:$.t("Area")},{id:p.STYLE_BASELINE,title:$.t("Baseline")}],I=o()||[1,4,5,6],TradingView.isOnFeaturePage&&!e.enabled("charting_library_base")&&(I=[]),m?I=[1,3]:e.enabled("collapsible_header")&&this._createMinimizeButton(t.headerChartPanel),this._style_list=new d("StyleWidget",L.map(function(t){return{id:t.id,title:t.title,svg:$(_[t.id]).attr({width:26,height:26}),favoriteButton:{title:t.title,addClass:"apply-common-tooltip"}}}),{defaultFavorites:I,addClass:"chart-style-widget",popupAddClass:"chart-style-popup",notShowQuicks:!e.enabled("items_favoriting"),showJustDefaultQuicks:I&&I.length&&e.enabled("predefined_items_only_may_be_starred"),tooltip:$.t("Bar's Style"),addTooltipClass:"apply-common-tooltip"}),a.activeChartStyle.subscribe(function(t){g._style_list.setValue(t)},{callWithLast:!0}),k=!1,g._style_list.onChange().subscribe(this,function(t){k||a.trySetChartStyleToActiveWidget(t)||(k=!0,g._style_list.setValue(a.activeChartStyle.value()),k=!1)}),g._style_list.onResize().subscribe(this,this._onInternalResize)),window.studyMarket=new c(a,window.user,{onWidget:m,fundamentalsOnly:t.fundamentalsOnly}),this._createLayout(t,g,v),this._resizerBridge.width.subscribe(this._onInternalResize.bind(this))),!this._chartWidget.readOnly()&&e.enabled("header_undo_redo")&&(this._undoRedo=new n(this._$left,this._chartWidget)),e.enabled("header_screenshot")&&(A="Alt+S", !e.enabled("charting_library_base")&&u.canShowSpreadActions()&&(T=$('<div class="symbol-edit-buttonswrap">').appendTo(S),w=$('<div class="spread-actions">').appendTo(T).on("mousedown",function(t){t.preventDefault()})),x=$('<div class="symbol-edit-inputspacer">').appendTo(S),C=$('<input type="text" class="symbol-edit" maxlength="'+TradingView.SYMBOL_SEARCH_MAX_LENGTH+'">').appendTo(x),u.bindToInput(C,{syncWithChartWidget:!0,spreadActions:w}),function(){var t=!1;C.on("focus",function(){t=!0,S.addClass("expanded")}),C.on("blur",function(){t=!1,setTimeout(function(){t||S.removeClass("expanded")},40)})}()),e.enabled("header_resolutions")&&(y=this.createGroup("intervals",{single:!0,showInNarrowView:!0}).appendTo(this._$left),P={onWidget:m,submenuBtnAddClass:"apply-common-tooltip"},t.interval_options&&$.extend(P,t.interval_options),e.enabled("items_favoriting")||$.extend(P,{notShowQuicks:!0,popupSpacing:1}),TradingView.isOnFeaturePage&&$.extend(P,{notShowQuicks:!0}),this._interval=new l(P),loginStateChange.subscribe(this,function(){window.is_authenticated&&this._interval.forceUpdate()}),e.enabled("charting_library_base")&&ChartApiInstance.on("configuration_received",function(){g._interval.forceUpdate()}),this._interval.element().addClass("no-first").appendTo(y),this._interval.onResize.subscribe(this,this._onInternalResize),t.favoriteIntervals&&this._interval.setUpStarredItemsList(t.favoriteIntervals)),e.enabled("header_chart_type")&&(L=[{id:p.STYLE_BARS,title:$.t("Bars")},{id:p.STYLE_CANDLES,title:$.t("Candles")},{id:p.STYLE_HOLLOW_CANDLES,title:$.t("Hollow Candles")},{id:p.STYLE_HEIKEN_ASHI,title:$.t("Heikin Ashi")},{id:p.STYLE_LINE,title:$.t("Line")},{id:p.STYLE_AREA,title:$.t("Area")},{id:p.STYLE_BASELINE,title:$.t("Baseline")}],I=o()||[1,4,5,6],TradingView.isOnFeaturePage&&!e.enabled("charting_library_base")&&(I=[]),m?I=[1,3]:e.enabled("collapsible_header")&&this._createMinimizeButton(t.headerChartPanel),this._style_list=new d("StyleWidget",L.map(function(t){return{id:t.id,title:t.title,svg:$(_[t.id]).attr({width:26,height:26}),favoriteButton:{title:t.title,addClass:"apply-common-tooltip"}}}),{defaultFavorites:I,addClass:"chart-style-widget",popupAddClass:"chart-style-popup",notShowQuicks:!e.enabled("items_favoriting"),showJustDefaultQuicks:I&&I.length&&e.enabled("predefined_items_only_may_be_starred"),tooltip:$.t("Bar's Style"),addTooltipClass:"apply-common-tooltip"}),a.activeChartStyle.subscribe(function(t){g._style_list.setValue(t)},{callWithLast:!0}),k=!1,g._style_list.onChange().subscribe(this,function(t){k||a.trySetChartStyleToActiveWidget(t)||(k=!0,g._style_list.setValue(a.activeChartStyle.value()),k=!1)}),g._style_list.onResize().subscribe(this,this._onInternalResize)),window.studyMarket=new c(a,window.user,{onWidget:m,fundamentalsOnly:t.fundamentalsOnly}),this._createLayout(t,g,v),this._resizerBridge.width.subscribe(this._onInternalResize.bind(this))),!this._chartWidget.readOnly()&&e.enabled("header_undo_redo")&&(this._undoRedo=new n(this._$left,this._chartWidget)),e.enabled("header_screenshot")&&(A="Alt+S",
M=this.createGroup("screenshot",{single:!0}).appendTo(this._$right),E=$('<a class="button getimage"></a>').append($(i(1238)).attr({class:"icon"})).addClass("apply-common-tooltip").attr("title",$.t("Take instant snapshot of your chart. No more Paint or other editors to save screenshots – simply click the button and copy the link of the picture.")+"\n"+A).appendTo(M),M.click(function(t){if(!e.enabled("show_dialog_on_snapshot_ready")){if(E.hasClass("process"))return;E.addClass("process"),h.subscribe("onScreenshotReady",function(t){E.removeClass("process")},null,!0)}f.actions().takeScreenshot.callbacks().fire(),t.preventDefault()})),e.enabled("header_saveload")&&(V=e.enabled("header_saveload_to_the_right")?this._$right:this._$left,y=this.createGroup("save-load",{single:!0,showInNarrowView:!0}).appendTo(V),D=$("<div>").addClass("save-load-buttons").appendTo(y),this._saveLoad=new s(D,a,{popupDirection:"down",popupReverse:!0}),this._saveLoad.onTitleSizeChanged.subscribe(this,this._onInternalResize),TradingView.isOnFeaturePage&&this._saveLoad.hideTitle()),e.enabled("header_widget_dom_node")||$(".header-chart-panel").css("display","none"),f.withModel(this,r.prototype.bindToModel),this._resizerBridge.availWidth.subscribe(this._onAvailSizeChange.bind(this)),this._resizerBridge.availHeight.subscribe(this._onAvailSizeChange.bind(this)),this._onAvailSizeChange(),this._onInternalResize()}var n=i(819),r=i(744),s=i(1130).SaveLoadWidget,a=i(753),l=i(398),c=i(812),h=i(43),u=i(104),d=i(474).FavoredList,p=i(85),_=i(397);inherit(o,r),o.prototype.saveLoadWidget=function(){return this._saveLoad},o.prototype._onAvailSizeChange=function(){var t=this._resizerBridge.availWidth.value()<=520||this._resizerBridge.availHeight.value()<=250;!!this._compactMode!==t&&(this._compactMode=t,this._$root.toggleClass("header-chart-panel--compact",t),this._onInternalResize())},o.prototype.addButton=function(t,e){(e?this._$left:this._$right).append(t),this._onInternalResize()},o.prototype._createUndoRedoGroup=function(){return this._undoRedo=new n(this._$left,this._chartWidget),this._undoRedo.undoElement().addClass("apply-common-tooltip"),this._undoRedo.redoElement().addClass("apply-common-tooltip"),this.createGroup("undo-redo",{single:!0}).append(this._undoRedo.element())},o.prototype._createFullscreenGroup=function(){this._fullscreen=new a(this._chartWidgetCollection);var t=this.createGroup("fullscreen",{single:!0});return this._fullscreen.element().addClass("apply-common-tooltip").appendTo(t),t},o.prototype._createLayout=function(t,i,o){var n=[];e.enabled("header_chart_type")&&n.push(this._createBarsGroup(i)),e.enabled("header_settings")&&e.enabled("show_chart_property_page")&&n.push(this._createPropertiesGroup(o,t.chartWidgetCollection)),e.enabled("header_indicators")&&n.push(this._createIndicatorsGroup(o)),e.enabled("header_compare")&&n.push(this._createCompareGroup(i,t.chartWidgetCollection,o)),e.enabled("header_undo_redo")&&!this._chartWidget.readOnly()&&n.push(this._createUndoRedoGroup()), M=this.createGroup("screenshot",{single:!0}).appendTo(this._$right),E=$('<a class="button getimage"></a>').append($(i(1238)).attr({class:"icon"})).addClass("apply-common-tooltip").attr("title",$.t("Take instant snapshot of your chart. No more Paint or other editors to save screenshots – simply click the button and copy the link of the picture.")+"\n"+A).appendTo(M),M.click(function(t){if(!e.enabled("show_dialog_on_snapshot_ready")){if(E.hasClass("process"))return;E.addClass("process"),h.subscribe("onScreenshotReady",function(t){E.removeClass("process")},null,!0)}f.actions().takeScreenshot.callbacks().fire(),t.preventDefault()})),e.enabled("header_saveload")&&(V=e.enabled("header_saveload_to_the_right")?this._$right:this._$left,y=this.createGroup("save-load",{single:!0,showInNarrowView:!0}).appendTo(V),D=$("<div>").addClass("save-load-buttons").appendTo(y),this._saveLoad=new s(D,a,{popupDirection:"down",popupReverse:!0}),this._saveLoad.onTitleSizeChanged.subscribe(this,this._onInternalResize),TradingView.isOnFeaturePage&&this._saveLoad.hideTitle()),e.enabled("header_widget_dom_node")||$(".header-chart-panel").css("display","none"),f.withModel(this,r.prototype.bindToModel),this._resizerBridge.availWidth.subscribe(this._onAvailSizeChange.bind(this)),this._resizerBridge.availHeight.subscribe(this._onAvailSizeChange.bind(this)),this._onAvailSizeChange(),this._onInternalResize()}var n=i(819),r=i(744),s=i(1130).SaveLoadWidget,a=i(753),l=i(398),c=i(812),h=i(43),u=i(104),d=i(474).FavoredList,p=i(85),_=i(397);inherit(o,r),o.prototype.saveLoadWidget=function(){return this._saveLoad},o.prototype._onAvailSizeChange=function(){var t=this._resizerBridge.availWidth.value()<=520||this._resizerBridge.availHeight.value()<=250;!!this._compactMode!==t&&(this._compactMode=t,this._$root.toggleClass("header-chart-panel--compact",t),this._onInternalResize())},o.prototype.addButton=function(t,e){(e?this._$left:this._$right).append(t),this._onInternalResize()},o.prototype._createUndoRedoGroup=function(){return this._undoRedo=new n(this._$left,this._chartWidget),this._undoRedo.undoElement().addClass("apply-common-tooltip"),this._undoRedo.redoElement().addClass("apply-common-tooltip"),this.createGroup("undo-redo",{single:!0}).append(this._undoRedo.element())},o.prototype._createFullscreenGroup=function(){this._fullscreen=new a(this._chartWidgetCollection);var t=this.createGroup("fullscreen",{single:!0});return this._fullscreen.element().addClass("apply-common-tooltip").appendTo(t),t},o.prototype._createLayout=function(t,i,o){var n=[];e.enabled("header_chart_type")&&n.push(this._createBarsGroup(i)),e.enabled("header_settings")&&e.enabled("show_chart_property_page")&&n.push(this._createPropertiesGroup(o,t.chartWidgetCollection)),e.enabled("header_indicators")&&n.push(this._createIndicatorsGroup(o)),e.enabled("header_compare")&&n.push(this._createCompareGroup(i,t.chartWidgetCollection,o)),e.enabled("header_undo_redo")&&!this._chartWidget.readOnly()&&n.push(this._createUndoRedoGroup()),
e.enabled("header_fullscreen_button")&&n.push(this._createFullscreenGroup()),n.forEach(function(t){t.appendTo(this._$left)},this)},o.prototype._onInternalResize=function(){if(this.hidden)return void this._resizerBridge.negotiateHeight(0);this._onResizeRequested||(this._onResizeRequested=!0,this._resizerBridge.visible.when(function(){var t,i;this._onResizeRequested=!1,e.enabled("caption_buttons_text_if_possible")&&(t=this._$left,i=t.children(".group"),t.addClass("captions"),i.size()>1&&i.last().offset().top>i.first().offset().top+5&&t.removeClass("captions")),this._$content.find("svg").pixelSnap(),this._resizerBridge.negotiateHeight({min:0,max:this._$content.height()})}.bind(this)))},o.prototype._setupCaptionButtons=function(){window.studyTemplates&&studyTemplates.onFavoriteListResize.subscribe(this,this._onInternalResize)},o.prototype._createMinimizeButton=function(){var t=this,e=$("<span>",this._$root).addClass("tv-close-panel top").appendTo(this._$root).on("click",function(i){i.isDefaultPrevented()||(t.hidden=!t.hidden,e.toggleClass("top",!t.hidden),e.toggleClass("bottom",t.hidden),i.preventDefault(),h.emit("toggle_header",!t.hidden),t._onInternalResize())})},t.exports=o}).call(e,i(7))},,function(t,e,i){(function(e){"use strict";function o(t){var i,o,n,r,s,a,l,c,h,u,d,p,m,g,v,y,b,S,T=this;this._guid=q(),this._startSpinner(t.body.value()),P.init(),i=this,P.tool.subscribe(function(t){var e,o,n,r;i._model&&(e=t,i._model.model().setCurrentTool(e),TradingView.isMobile.any()&&(o=i._paneWidgets[0],w.isLineTool(e)&&"LineToolBrush"!==e&&!i.selectBarMode().value()?(n=.5*i._model.model().timeScale().width(),r=.5*o._state.defaultPriceScale().height(),i._model.model().setAndSaveCurrentPosition(n,r,o._state),o._updateTooltip(n,r)):o._hideTooltip()),i._model&&TradingView.isMobile.any()&&i._model.model().crossHairSource().updateAllViews())}),o=function(t,e,i){var o,n=e.mainSeries().syncModel(),r=t.mainSeries().syncModel(),s=i;return n&&r&&(o=t._createSyncPoint(n,r),s=o.sourceTimeToTargetTime(i)),t.timeScale().points().roughIndex(s,r&&r.distance.bind(r))},P.createdLineTool.subscribe(null,function(t){var e,i,n;T._model&&(e=T._model.model(),t.model!==e&&(i=e.paneForSource(T._model.model().mainSeries()),n={index:o(e,t.model,t.point.timeStamp),price:t.point.price},T._model.createLineTool(i,n,t.linetool,t.properties,t.linkKey)))}),P.continuedLineTool.subscribe(null,function(t){var e,i,n;T._model&&(e=T._model.model(),t.model!==e&&(i={index:o(e,t.model,t.point.timeStamp),price:t.point.price},(n=T._model.lineBeingCreated())&&T._model.model().coninueCreatingLine(i,t.envState,!!t.finalState)&&t.finalState&&n.restoreExternalPoints(t.finalState)))}),P.cancelledLineTool.subscribe(null,function(t){if(T._model){var e=T._model.model();t.model!==e&&T._model.model().cancelCreatingLine()}}),P.startedMovingLineTool.subscribe(null,function(t){var e,i,n;T._model&&(e=T._model.model(),t.model!==e&&(i=e.dataSources().filter(function(e){return e.linkKey===t.linkKey})[0])&&(n={index:o(e,t.model,t.point.timeStamp),price:t.point.price}, e.enabled("header_fullscreen_button")&&n.push(this._createFullscreenGroup()),n.forEach(function(t){t.appendTo(this._$left)},this)},o.prototype._onInternalResize=function(){if(this.hidden)return void this._resizerBridge.negotiateHeight(0);this._onResizeRequested||(this._onResizeRequested=!0,this._resizerBridge.visible.when(function(){var t,i;this._onResizeRequested=!1,e.enabled("caption_buttons_text_if_possible")&&(t=this._$left,i=t.children(".group"),t.addClass("captions"),i.size()>1&&i.last().offset().top>i.first().offset().top+5&&t.removeClass("captions")),this._$content.find("svg").pixelSnap(),this._resizerBridge.negotiateHeight({min:0,max:this._$content.height()})}.bind(this)))},o.prototype._setupCaptionButtons=function(){window.studyTemplates&&studyTemplates.onFavoriteListResize.subscribe(this,this._onInternalResize)},o.prototype._createMinimizeButton=function(){var t=this,e=$("<span>",this._$root).addClass("tv-close-panel top").appendTo(this._$root).on("click",function(i){i.isDefaultPrevented()||(t.hidden=!t.hidden,e.toggleClass("top",!t.hidden),e.toggleClass("bottom",t.hidden),i.preventDefault(),h.emit("toggle_header",!t.hidden),t._onInternalResize())})},t.exports=o}).call(e,i(7))},,function(t,e,i){(function(e){"use strict";function o(t){var i,o,n,r,s,a,l,c,h,u,d,p,m,g,v,y,b,S,T=this;this._guid=q(),this._startSpinner(t.body.value()),P.init(),i=this,P.tool.subscribe(function(t){var e,o,n,r;i._model&&(e=t,i._model.model().setCurrentTool(e),TradingView.isMobile.any()&&(o=i._paneWidgets[0],w.isLineTool(e)&&"LineToolBrush"!==e&&!i.selectBarMode().value()?(n=.5*i._model.model().timeScale().width(),r=.5*o._state.defaultPriceScale().height(),i._model.model().setAndSaveCurrentPosition(n,r,o._state),o._updateTooltip(n,r)):o._hideTooltip()),i._model&&TradingView.isMobile.any()&&i._model.model().crossHairSource().updateAllViews())}),o=function(t,e,i){var o,n=e.mainSeries().syncModel(),r=t.mainSeries().syncModel(),s=i;return n&&r&&(o=t._createSyncPoint(n,r),s=o.sourceTimeToTargetTime(i)),t.timeScale().points().roughIndex(s,r&&r.distance.bind(r))},P.createdLineTool.subscribe(null,function(t){var e,i,n;T._model&&(e=T._model.model(),t.model!==e&&(i=e.paneForSource(T._model.model().mainSeries()),n={index:o(e,t.model,t.point.timeStamp),price:t.point.price},T._model.createLineTool(i,n,t.linetool,t.properties,t.linkKey)))}),P.continuedLineTool.subscribe(null,function(t){var e,i,n;T._model&&(e=T._model.model(),t.model!==e&&(i={index:o(e,t.model,t.point.timeStamp),price:t.point.price},(n=T._model.lineBeingCreated())&&T._model.model().coninueCreatingLine(i,t.envState,!!t.finalState)&&t.finalState&&n.restoreExternalPoints(t.finalState)))}),P.cancelledLineTool.subscribe(null,function(t){if(T._model){var e=T._model.model();t.model!==e&&T._model.model().cancelCreatingLine()}}),P.startedMovingLineTool.subscribe(null,function(t){var e,i,n;T._model&&(e=T._model.model(),t.model!==e&&(i=e.dataSources().filter(function(e){return e.linkKey===t.linkKey})[0])&&(n={index:o(e,t.model,t.point.timeStamp),price:t.point.price},

Loading…
Cancel
Save