';e.AddSymbolTab=function(){function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._chartWidgetCollection=e,this._dialog=i,this._$popup=null,this.init()}return o(t,[{key:"init",value:function(){var t=this;this.$tab=$(n),this._$input=this.$tab.find(".js-add-symbol-tab-input"),this._checkbox=new a.AddSymbolCheckbox({labelRight:$.t("Overlay the main chart"),labelAddClass:"tv-add-symbol-tab__checkbox-label",boxAddClass:"tv-add-symbol-tab__checkbox-box"}),this.$tab.find(".js-add-symbol-tab-checkbox").append(this._checkbox.$el),(0,s.symbolSearchUIService)().bindToInput(this._$input,{callback:function(e){var i=t._chartWidgetCollection.activeChartWidget.value();i&&i.addOverlayStudy(e,t._checkbox.checked)},onPopupOpen:function(e){e.css("z-index",t._dialog.getZIndex()),t._$popup=e},onPopupClose:function(){t._$popup=null},keepFocus:!0,clearAfterAccept:!0})}},{key:"focus",value:function(){Modernizr.mobiletouch||this._$input.focus()}},{key:"isClickOnTab",value:function(t){return!!this._$popup&&!(this._$popup[0]!==t.target&&!this._$popup[0].contains(t.target))}}]),t}()},UxRG:function(t,e,i){},dKfe:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AddSymbolCheckbox=void 0;var o,a=i("QwKQ"),s=(o=a)&&o.__esModule?o:{default:o};e.AddSymbolCheckbox=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t.checked=TVSettings.getBool("showAddSymbolDialog.checkboxState",!0);var i=function(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}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.$checkbox.change((function(){setTimeout((function(){TVSettings.setValue("showAddSymbolDialog.checkboxState",i.checked)}))})),i}return function(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)}(e,t),e}(s.default)},frtK:function(t,e,i){},jPTo:function(t,e,i){},k47Q:function(t,e,i){},ocUP:function(t,e,i){"use strict";(function(t,o){Object.defineProperty(e,"__esModule",{value:!0}),e.CompareTab=void 0;var a=function(){function t(t,e){for(var i=0;i\n\t
',l='\n\t
\n\t\t\n\t
';e.CompareTab=function(){function e(i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.selectedSymbols=[],this._chartWidgetCollection=i,this._dialog=o,this._$popup=null,this._predefines={},this._symbolAlias={},this._isBovespa=t.enabled("bovespa_widget"),this._predefines=this._chartWidgetCollection.activeChartWidget.value().compareSymbols()||[],this.init()}return a(e,[{key:"_addCompareSymbol",value:function(t,e,i){var o=this._chartWidgetCollection.activeChartWidget.value();if(o)return this.selectedSymbols.push(t),o.addCompareStudy(t).then((function(t){var e=null!==t;return e&&(0,n.trackEvent)("GUI","Add Compare"),e}))}},{key:"removeCompareSymbol",value:function(t){var e=this,i=this._chartWidgetCollection.activeChartWidget.value();if(i){var o=i.model();o&&(this.selectedSymbols=this.selectedSymbols.filter((function(e){return e!==t})),o.dataSources().forEach((function(i){if(i._metaInfo&&"Compare@tv-basicstudies"===i._metaInfo.id){var a=i.properties().inputs.symbol.value();(a===t||e._symbolAlias[a]&&e._symbolAlias[a]===t)&&o.removeSource(i)}})))}}},{key:"init",value:function(){var t=this,e=this._chartWidgetCollection.activeChartWidget.value();if(e){var i=e.model();if(i){var o=i.dataSources();this.$tab=$(r),this._initSymbolSearch(),this._createPredefinesList();var a=this.$tab.find(".js-compare-tab-predefines");a.find(".js-predefine-checkbox").attr("checked",!1),this._predefines.forEach((function(e){var i=e.symbol,s=t._symbolToId(i),n=a.find("#"+s);o.forEach((function(e){if(e._metaInfo&&"Compare@tv-basicstudies"===e._metaInfo.id){var o=e.properties().inputs.symbol.value();(o===i||t._symbolAlias[o]&&t._symbolAlias[o]===i)&&(n.attr("checked",!0),t.selectedSymbols.push(o))}}))}))}}}},{key:"_initSymbolSearch",value:function(){var t=this;this._$input=this.$tab.find(".js-compare-tab-input"),(0,s.symbolSearchUIService)().bindToInput(this._$input,{callback:function(e){return t._addCompareSymbol(e)},onPopupOpen:function(e){e.css("z-index",t._dialog.getZIndex()),t._$popup=e},onPopupClose:function(){t._$popup=null},keepFocus:!0,clearAfterAccept:!0})}},{key:"_createPredefinesList",value:function(){var t=this,e=this;function i(t){var i=this;setTimeout((function(){$(i).is(":checked")?e._addCompareSymbol(t.data.symbol).then((function(t){
t||$(i).attr("checked",!1)})):e.removeCompareSymbol(t.data.symbol)}))}var a=$('');this._predefines.forEach((function(e){var s=e.symbol,n=e.title,r=$(o.render(l,{symbolId:t._symbolToId(s),label:n,additionalClass:t._isBovespa?"tv-compare-tab__predefine-cell--wide":""}));r.find(".js-predefine-checkbox").change({symbol:s},i),r.appendTo(a)})),a.appendTo(this.$tab)}},{key:"_symbolToId",value:function(t){return t.replace(/[^a-z0-9]/gi,"_")}},{key:"focus",value:function(){Modernizr.mobiletouch||this._$input.focus()}},{key:"isClickOnTab",value:function(t){return!!this._$popup&&!(this._$popup[0]!==t.target&&!this._$popup[0].contains(t.target))}}]),e}()}).call(this,i("Kxc7"),i("nbsC"))},ohga:function(t,e,i){},pIOw:function(t,e,i){"use strict";i.r(e);i("ohga");var o=i("Eyy1");i("P5fv");function a(){return new Promise((function(t){i.e("lazy-velocity").then(function(e){i("WJ2Z"),t()}.bind(null,i)).catch(void 0)}))}$.fn.velocity=function(){for(var t=this,e=[],i=0;i'+f+""),this._elArrowRight=y(this._options.rArrowClass||"",this._elTabs,"append",'