',width:470,destroyOnClose:e._destroyOnClose,manager:e._manager,isClickOutFn:function(){if(e._isConfirmDialogOpened)return!1},actions:[{name:"submit",type:"primary",text:window.t("Save"),key:13,addClass:"js-submit-button"},{name:"cancel",type:"default",text:window.t("Cancel"),method:"close",addClass:"js-cancel-button"}]}))}.bind(null,i)).catch(i.oe)}))}},{key:"_onSubmit",value:function(e,t){var i=this,r=this._validate();if(r)e.error(r.error),r.focus();else{if(!this._needCheckConfirm)return t(this._collectValues(),e),void e.close();Promise.resolve(this._shouldShowConfirm(this._collectValues())).then((function(r){if(!r)return t(i._collectValues(),e),void e.close();i._showConfirmDialog().then((function(r){r===a&&(e.focus(),i._fields[0].focus()),r===s&&(t(i._collectValues(),e),e.close())}))}))}}},{key:"_showConfirmDialog",value:function(){var e=this;return new Promise((function(t){Promise.resolve(e._getConfirmMessage(e._collectValues())).then((function(i){e._isConfirmDialogOpened=!0,(0,
@@ -371,8 +371,8 @@ e.prototype.addLineTools=function(e){var t=this;this._doAndFireOnChange((functio
;n=this.screenPointToPoint(_),(TradingView.isNaN(n.price)||TradingView.isNaN(n.index))&&(n=this.screenPointToPoint(p))}}else this._fakePointAdded&&(this._points.splice(1,1),this._fakePointAdded=!1);return n},c.prototype._fixVerticalDiameterPoints=function(e,t,i){var r=this.pointToScreenPoint(e)[0],n=this.pointToScreenPoint(t)[0],o=this._model.timeScale(),s=o.indexToCoordinate(e.index),a=o.indexToCoordinate(i.index),l=2*Math.abs(s-a);l*=t.price>e.price?1:-1,e.price=this.screenPointToPoint({x:r.x,y:n.y+l}).price},c.prototype.addPoint=function(e,t,i){var r=o.prototype.addPoint.call(this,e,t,i);return r&&(this._fakePointAdded=!1),r},c.prototype.setPoint=function(e,t,i){var o=Object.assign({},t),s=this.pointToScreenPoint(this._points[0])[0],a=this.pointToScreenPoint(this._points[1])[0],l=this.pointToScreenPoint(this._points[2])[0];switch(e){case 0:if(i&&i.shift()){this._snapPoint45Degree(o,this._points[1]),this._points[0]=o,this._points[2]=this._preparePointInternal(this._points[2],i,!0),this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[0],this._points[1],this._points[2]);break}s=this.pointToScreenPoint(o)[0];var c=a.subtract(s),u=s.add(a).scaled(.5);d=(d=new r(-c.y,c.x)).normalized(),l=u.add(d.scaled(this._dist)),l=this.screenPointToPoint(l),this._points[0]=o,this._points[2]=l;break;case 1:if(i&&i.shift()){this._snapPoint45Degree(o,this._points[0]),this._points[1]=o,this._points[2]=this._preparePointInternal(this._points[2],i,!0),this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[1],this._points[0],this._points[2]);break}c=(a=this.pointToScreenPoint(o)[0]).subtract(s),u=s.add(a).scaled(.5);d=(d=new r(-c.y,c.x)).normalized(),l=u.add(d.scaled(this._dist)),l=this.screenPointToPoint(l),this._points[1]=o,this._points[2]=l;break;case 2:o=this.pointToScreenPoint(o)[0];var h=n(s,a,o).distance;c=a.subtract(s),u=s.add(a).scaled(.5);d=(d=new r(-c.y,c.x)).normalized(),l=u.add(d.scaled(h)),l=this.screenPointToPoint(l),this._points[2]=l;break;case 3:o=this.pointToScreenPoint(o)[0];var d;h=n(s,a,o).distance,c=a.subtract(s),u=s.add(a).scaled(.5);d=(d=new r(-c.y,c.x)).normalized(),l=u.add(d.scaled(h)),l=this.screenPointToPoint(l),this._points[2]=l}this.normalizePoints()},c.prototype.pointsCount=function(){return 3},c.prototype.translatedType=function(){return l},c.prototype.name=function(){return"Ellipse"},c.prototype.hasEditableCoordinates=function(){return!1},c.version=2,c.prototype.migrateVersion=function(e,t,i){if(1===e&&2===this._points.length){var r=this._points[0].price,n=.5*(this._points[0].price+this._points[1].price);this._points[0]={price:n,index:this._points[0].index},this._points[1]={price:n,index:this._points[1].index},this._points.push({price:r,index:this._points[0].index})}if(1===e&&2===this._timePoint.length){r=this._timePoint[0].price,n=.5*(this._timePoint[0].price+this._timePoint[1].price);this._timePoint[0].price=n,this._timePoint[1].price=n;var o={price:r,offset:this._timePoint[0].offset,time_t:this._timePoint[0].time_t}
;this._timePoint.push(o)}},c.prototype.getInputsPropertyPage=function(){return null},c.prototype.getStylesPropertyPage=function(){return a.LineToolEllipseStylesPropertyPage},c.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Zd1D").GeneralFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},c.createProperties=function(e){var t=new s("linetoolellipse",e);return c._configureProperties(t),t},c._configureProperties=function(e){o._configureProperties(e)},t.LineToolEllipse=c},V0al:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererXCross",(function(){return s}));var r=i("mrSG"),n=i("2WC2"),o=i("aO4+"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype._drawItemShapeUsingCSSPixels=function(e,t){var i=t.width,r=t.height,n=t.x-i/2,o=t.vertOffset,s=t.y-r/2+o;e.moveTo(n,s),e.lineTo(n+i,s+r),e.moveTo(n,s+r),e.lineTo(n+i,s)},t.prototype._calcBoundingBox=function(t){var i=t.width,r=t.height,n=t.x-i/2,s=t.vertOffset,a=t.y-r/2+s,l=n,c=n+i,u=a,h=a+r,d=new o.Point(l,u),p=new o.Point(c,h),f=Object(o.box)(d,p),_=e.prototype._calcBoundingBox.call(this,t);return _&&(f=this._unionBox(f,_)),f},t}(n.c)},V3Oj:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolText",(function(){return p})),i.d(t,"LineToolTextAbsolute",(function(){return f}));var r=i("mrSG"),n=i("Eyy1"),o=i("YFKU"),s=i("hayr"),a=i("Ss5c"),l=i("tc+8"),c=i.n(l),u=i("Ocx9"),h=Object(o.t)("Text",{context:"tool"}),d=Object(o.t)("Anchored Text"),p=function(e){function t(r,n){var o=this,s=n||t.createProperties();return(o=e.call(this,r,s)||this)._constructor="LineToolText",o._barSpacing=r.timeScale().barSpacing(),i.e("lt-pane-views").then(function(e){var t=i("mr3a").TextPaneView;o._setPaneViews([new t(o,r)])}.bind(null,i)).catch(void 0),o}return Object(r.__extends)(t,e),t.prototype.setPoint=function(e,t,i){var r,n=this.properties().childs();if(0===e&&n.wordWrapWidth.value()){var o=this.model().timeScale();r=this.isFixed()?this.fixedPoints()[0].x:o.indexToCoordinate(this.points()[0].index);var s=o.indexToCoordinate(t.index)-r-~~(n.fontsize.value()/6);if(!isFinite(s))return;n.wordWrapWidth.setValue(Math.max(100,s))}},t.prototype.pointsCount=function(){return 1},t.prototype.translatedType=function(){return h},t.prototype.name=function(){return"Text"},t.prototype.setPriceScale=function(t){e.prototype.setPriceScale.call(this,t),t&&t.priceRange()&&(this._priceDencity=t.height()/Object(n.ensureNotNull)(t.priceRange()).length(),this._isPriceDencityLog=t.isLog())},t.prototype.restoreSize=function(){var e=Object(n.ensureNotNull)(this.priceScale());this._barSpacing=this.model().timeScale().barSpacing(),this._priceDencity=e.height()/Object(n.ensureNotNull)(e.priceRange()).length(),this.updateAllViews(),this._model.updateSource(this)},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.template=function(){var t=e.prototype.template.call(this)
;return t.text=this.properties().childs().text.value(),t},t.prototype.state=function(t){var i=e.prototype.state.call(this,t);return t&&(i.state.fixedSize=!1),i},t.prototype.getInputsPropertyPage=function(){return null},t.prototype.getStylesPropertyPage=function(){return s.propertyPages.LineToolTextStylesPropertyPage},t.prototype.barSpacing=function(){return this._barSpacing},t.prototype.priceDencity=function(){return this._priceDencity},t.prototype.isPriceDencityLog=function(){return this._isPriceDencityLog},t.prototype.hasEditableCoordinates=function(){return!1},t.createProperties=function(e){var i=new u.DefaultProperty("linetooltext",e);return t._configureProperties(i),i},t.prototype._applyTemplateImpl=function(t){e.prototype._applyTemplateImpl.call(this,t),this.properties().childs().text.setValue(t.text)},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"QWxu")).then((function(e){return e.TextDefinitionsViewModel}))},t._configureProperties=function(e){a.LineDataSource._configureProperties(e),e.hasChild("text")||e.addChild("text",new c.a(window.t("Text"))),e.addExclusion("text")},t}(a.LineDataSource),f=function(e){function t(i,r){var n=r||t.createProperties();return e.call(this,i,n)||this}return Object(r.__extends)(t,e),t.prototype.isSynchronizable=function(){return!1},t.prototype.translatedType=function(){return d},t.prototype.name=function(){return"Anchored Text"},t.prototype.hasEditableCoordinates=function(){return!1},t.prototype.isFixed=function(){return!0},t.createProperties=function(e){var i=new u.DefaultProperty("linetooltextabsolute",e);return t._configureProperties(i),i},t._configureProperties=function(e){p._configureProperties(e)},t}(p)},VNzU:function(e,t,i){"use strict";i.r(t);var r=i("mrSG");i("Dq3s");i.d(t,"layouts",(function(){return s})),i.d(t,"isSingleLayout",(function(){return a})),i.d(t,"isMultipleLayout",(function(){return l}));var n,o={s:{title:"1 chart",count:1,sizer:function(e,t){if(0!==t)throw new RangeError("invalid index");return e}}};n={};var s=Object(r.__assign)(Object(r.__assign)({},o),n);function a(e){return"s"===e}function l(e){return!a(e)}},VVxS:function(e,t,i){"use strict";var r=function(){try{this.isAvailable=!0,this.localStorage=window.localStorage,this.localStorage.setItem("tvlocalstorage.available","true")}catch(e){delete this.isAvailable,delete this.localStorage}this._updateLength()};r.prototype.length=0,r.prototype.isAvailable=!1,r.prototype.localStorage={"tvlocalstorage.available":"false"},r.prototype._updateLength=function(){if(this.isAvailable)this.length=this.localStorage.length;else{var e,t=0;for(e in this.localStorage)this.localStorage.hasOwnProperty(e)&&t++;this.length=t}},r.prototype.key=function(e){return this.isAvailable?this.localStorage.key(e):Object.keys(this.localStorage)[e]},r.prototype.getItem=function(e){return this.isAvailable?this.localStorage.getItem(e):void 0===this.localStorage[e]?null:this.localStorage[e]},r.prototype.setItem=function(e,t){
-this.isAvailable?this.localStorage.setItem(e,t):this.localStorage[e]=t,this._updateLength()},r.prototype.removeItem=function(e){this.isAvailable?this.localStorage.removeItem(e):delete this.localStorage[e],this._updateLength()},r.prototype.clear=function(){this.isAvailable?this.localStorage.clear():this.localStorage={},this._updateLength()};var n=function(e){this.storage=e};n.prototype.getItem=function(e){return Promise.resolve(this.storage.getItem(e))},n.prototype.setItem=function(e,t){return Promise.resolve(this.storage.setItem(e,t))},window.TVLocalStorage=new r,window.TVLocalStorageAsync=new n(window.TVLocalStorage),e.exports={TVLocalStorage:window.TVLocalStorage,TVLocalStorageAsync:window.TVLocalStorageAsync}},VdBB:function(e,t,i){"use strict";i.r(t),i.d(t,"HitTestResult",(function(){return r}));var r=function(){function e(e,t,i){this._result=e,this._data=t,this._eraseMarker=i}return e.prototype.result=function(){return this._result},e.prototype.data=function(){return this._data},e.prototype.eraseMarker=function(){return this._eraseMarker},e.MOVEPOINT_BACKGROUND=1,e.REGULAR=2,e.MOVEPOINT=3,e.CHANGEPOINT=4,e.CUSTOM=5,e.CUSTOM_MOVE=6,e}()},Vdly:function(e,t,i){"use strict";(function(e){i("qFKp");i("BHQF").fetch;var t=i("dTSQ").regExpEscape,r=i("FBuY").TVXWindowEvents,n=i("VVxS").TVLocalStorage,o=i("aIyQ"),s=i("Kxc7"),a=["s.tradingview.com","betacdn.tradingview.com"],l=s.enabled("use_localstorage_for_settings"),c=window.TVSettings=function(){var e=!1,i=null;function u(){return!i&&l}try{e=!TradingView.onWidget()&&parent&&parent!==window&&!!parent.IS_DEMO_PAGE}catch(I){}if(e){var h={"widgetbar.layout-settings":{widgets:{},settings:{minimized:!0}},notShowMainWizard:!0},d=function(e,t,i){var r=h[e];return null==r?t:r},p=function(){};return{loaded:!1,loadedModel:!1,getValue:d,getJSON:d,getBool:d,getFloat:d,getInt:d,setValue:p,setJSON:p,remove:p,keys:function(){return Object.keys(h)},keysMask:function(){return[]},sync:p,onSync:{subscribe:function(){}}}}window.environment;var f,_=TradingView.onWidget()?"tradingview-widget":"tradingview",m={},y=[/^widgetbar\.widget\.watchlist.+/,/.+quicks$/,/^widgetbar\.layout-settings$/,/^ChartSideToolbarWidget\.visible$/,/^onwidget\.watchlist$/,/^domepanel.visible$/,/^orderpanel.visible$/,/^chart\.favoriteDrawings$/,/^chart\.favoriteDrawingsPosition$/,/^loadChartDialog.favorites$/,/^ChartFavoriteDrawingToolbarWidget\.visible/,/^trading\.chart\.proterty$/,/^trading_floating_toolbar\.position$/,/^trading\.orderWidgetMode\./,/^symbolWatermark$/,/^pinereference\.size$/,/^pinereference\.position$/,/^hint\.+/];function g(e){return _+"."+e}function v(e,t){var i=m[e];return null==i?t:i}function S(e,t,i){i=i||{};var r=""+t;return m[e]!==r&&(m[e]=r,w(e)),i.forceFlush&&!f&&(f=setTimeout((function(){f=void 0,P()}),10)),c}function b(e,t){return t=t||{},null!=m[e]&&(delete m[e],w(e)),t.forceFlush&&P(),c}function w(e){if(i)null==m[e]?i.removeValue(e):i.setValue(e,m[e]);else if(u())try{null==m[e]?n.removeItem(g(e)):n.setItem(g(e),m[e])}catch(I){}else 0;r.emit("settings",JSON.stringify({key:e,value:m[e]}))
-}function P(e){}function C(){return Object.keys(m)}function x(e){for(var t=0;t
=0;o--)e.test(r[o])&&n.push(r[o]),e.lastIndex=0;return n},sync:function(e){i?T(i.initialSettings||{}):u()?(function(){if(TradingView.onWidget()&&a.includes(window.location.host))for(var e=n.length;e--;){var t=n.key(e);if(0===t.indexOf("tradingview.")){var i=t.replace("tradingview.",_+".");n.setItem(i,n.getItem(t)),n.removeItem(t)}}}(),function(){m={};for(var e=_+".",t=!s.enabled("save_chart_properties_to_local_storage"),i=n.length;i--;){var r=n.key(i);if(r&&r.substring(0,e.length)===e){var o=r.substring(e.length);t&&!x(o)||(m[o]=n.getItem(r))}}}()):T(e||{}),L.fire()},onSync:L,setSettingsAdapter:function(e){i=e}}}();e&&e.exports&&(e.exports=c)}).call(this,i("YuTi")(e))},VgjZ:function(e,t,i){"use strict";i.r(t),i.d(t,"PriceAxisRendererOptionsProvider",(function(){return o}));var r=i("XlJ7"),n=i("zDbI"),o=function(){function e(e){this._rendererOptions={borderSize:1,tickLength:4,offsetSize:1,fontSize:NaN,font:"",color:"",paneBackgroundColor:"",paddingBottom:0,paddingInner:0,paddingOuter:0,paddingTop:0,baselineOffset:0},this._chartModel=e}return e.prototype.options=function(){var e=this._rendererOptions,t=this._chartModel.properties(),i=t.scalesProperties.fontSize.value();return e.fontSize!==i&&(e.fontSize=i,e.font=Object(r.makeFont)(i,n.CHART_FONT_FAMILY,""),e.paddingTop=Math.floor(i/3.5),e.paddingBottom=e.paddingTop,e.paddingInner=Math.max(Math.ceil(i/2-e.tickLength/2),0),e.paddingOuter=Math.ceil(i/2+e.tickLength/2),e.baselineOffset=Math.round(i/5)),e.color=t.scalesProperties.textColor.value(),e.paneBackgroundColor=t.paneProperties.background.value(),this._rendererOptions},e}()},W3MX:function(e){
+this.isAvailable?this.localStorage.setItem(e,t):this.localStorage[e]=t,this._updateLength()},r.prototype.removeItem=function(e){this.isAvailable?this.localStorage.removeItem(e):delete this.localStorage[e],this._updateLength()},r.prototype.clear=function(){this.isAvailable?this.localStorage.clear():this.localStorage={},this._updateLength()};var n=function(e){this.storage=e};n.prototype.getItem=function(e){return Promise.resolve(this.storage.getItem(e))},n.prototype.setItem=function(e,t){return Promise.resolve(this.storage.setItem(e,t))},window.TVLocalStorage=new r,window.TVLocalStorageAsync=new n(window.TVLocalStorage),e.exports={TVLocalStorage:window.TVLocalStorage,TVLocalStorageAsync:window.TVLocalStorageAsync}},VdBB:function(e,t,i){"use strict";i.r(t),i.d(t,"HitTestResult",(function(){return r}));var r=function(){function e(e,t,i){this._result=e,this._data=t,this._eraseMarker=i}return e.prototype.result=function(){return this._result},e.prototype.data=function(){return this._data},e.prototype.eraseMarker=function(){return this._eraseMarker},e.MOVEPOINT_BACKGROUND=1,e.REGULAR=2,e.MOVEPOINT=3,e.CHANGEPOINT=4,e.CUSTOM=5,e.CUSTOM_MOVE=6,e}()},Vdly:function(e,t,i){"use strict";(function(e){i("qFKp");i("BHQF").fetch;var t=i("dTSQ").regExpEscape,r=i("FBuY").TVXWindowEvents,n=i("VVxS").TVLocalStorage,o=i("aIyQ"),s=i("Kxc7"),a=["s.tradingview.com","betacdn.tradingview.com"],l=s.enabled("use_localstorage_for_settings"),c=window.TVSettings=function(){var e=!1,i=null;function u(){return!i&&l}try{e=!TradingView.onWidget()&&parent&&parent!==window&&!!parent.IS_DEMO_PAGE}catch(I){}if(e){var h={"widgetbar.layout-settings":{widgets:{},settings:{minimized:!0}},notShowMainWizard:!0},d=function(e,t,i){var r=h[e];return null==r?t:r},p=function(){};return{loaded:!1,loadedModel:!1,getValue:d,getJSON:d,getBool:d,getFloat:d,getInt:d,setValue:p,setJSON:p,remove:p,keys:function(){return Object.keys(h)},keysMask:function(){return[]},sync:p,onSync:{subscribe:function(){}}}}window.environment;var f,_=TradingView.onWidget()?"tradingview-widget":"tradingview",m={},y=[/^widgetbar\.widget\.watchlist.+/,/.+quicks$/,/^widgetbar\.layout-settings$/,/^ChartSideToolbarWidget\.visible$/,/^onwidget\.watchlist$/,/^domepanel.visible$/,/^orderpanel.visible$/,/^chart\.favoriteDrawings$/,/^chart\.favoriteDrawingsPosition$/,/^loadChartDialog.favorites$/,/^ChartFavoriteDrawingToolbarWidget\.visible/,/^trading\.chart\.proterty$/,/^trading_floating_toolbar\.position$/,/^trading\.orderWidgetMode\./,/^symbolWatermark$/,/^pinereference\.size$/,/^pinereference\.position$/,/^hint\.+/];function g(e){return _+"."+e}function v(e,t){var i=m[e];return null==i?t:i}function b(e,t,i){i=i||{};var r=""+t;return m[e]!==r&&(m[e]=r,w(e)),i.forceFlush&&!f&&(f=setTimeout((function(){f=void 0,P()}),10)),c}function S(e,t){return t=t||{},null!=m[e]&&(delete m[e],w(e)),t.forceFlush&&P(),c}function w(e){if(i)null==m[e]?i.removeValue(e):i.setValue(e,m[e]);else if(u())try{null==m[e]?n.removeItem(g(e)):n.setItem(g(e),m[e])}catch(I){}else 0;r.emit("settings",JSON.stringify({key:e,value:m[e]}))
+}function P(e){}function C(){return Object.keys(m)}function x(e){for(var t=0;t=0;o--)e.test(r[o])&&n.push(r[o]),e.lastIndex=0;return n},sync:function(e){i?T(i.initialSettings||{}):u()?(function(){if(TradingView.onWidget()&&a.includes(window.location.host))for(var e=n.length;e--;){var t=n.key(e);if(0===t.indexOf("tradingview.")){var i=t.replace("tradingview.",_+".");n.setItem(i,n.getItem(t)),n.removeItem(t)}}}(),function(){m={};for(var e=_+".",t=!s.enabled("save_chart_properties_to_local_storage"),i=n.length;i--;){var r=n.key(i);if(r&&r.substring(0,e.length)===e){var o=r.substring(e.length);t&&!x(o)||(m[o]=n.getItem(r))}}}()):T(e||{}),L.fire()},onSync:L,setSettingsAdapter:function(e){i=e}}}();e&&e.exports&&(e.exports=c)}).call(this,i("YuTi")(e))},VgjZ:function(e,t,i){"use strict";i.r(t),i.d(t,"PriceAxisRendererOptionsProvider",(function(){return o}));var r=i("XlJ7"),n=i("zDbI"),o=function(){function e(e){this._rendererOptions={borderSize:1,tickLength:4,offsetSize:1,fontSize:NaN,font:"",color:"",paneBackgroundColor:"",paddingBottom:0,paddingInner:0,paddingOuter:0,paddingTop:0,baselineOffset:0},this._chartModel=e}return e.prototype.options=function(){var e=this._rendererOptions,t=this._chartModel.properties(),i=t.scalesProperties.fontSize.value();return e.fontSize!==i&&(e.fontSize=i,e.font=Object(r.makeFont)(i,n.CHART_FONT_FAMILY,""),e.paddingTop=Math.floor(i/3.5),e.paddingBottom=e.paddingTop,e.paddingInner=Math.max(Math.ceil(i/2-e.tickLength/2),0),e.paddingOuter=Math.ceil(i/2+e.tickLength/2),e.baselineOffset=Math.round(i/5)),e.color=t.scalesProperties.textColor.value(),e.paneBackgroundColor=t.paneProperties.background.value(),this._rendererOptions},e}()},W3MX:function(e){
e.exports=JSON.parse('{"color-aqua-spring":"#ebf9f5","color-army-green":"#3d2c12","color-army-green-2":"#31230d","color-athens-gray-1":"#f2f3f5","color-athens-gray-2":"#f7f8fa","color-athens-gray-3":"#eceff2","color-black":"#000000","color-blue-dianne":"#21384d","color-bluish":"#2185cc","color-bright-gray":"#363c4e","color-brownish-grey":"#8d6e63","color-carnation":"#f04561","color-catskill-white":"#e1ecf2","color-charade":"#2f3241","color-charcoal-grey":"#323337","color-curious-blue":"#299dcd","color-dark-blue-grey":"#123440","color-darkness-blue-grey":"#12213b","color-dark-grey":"#292a2d","color-dark-grey-blue":"#28415a","color-dark-sky-blue":"#37a6ef","color-dark-slate-blue":"#194453","color-deep-sea-blue":"#016087","color-duck-egg-blue":"#e1eff9","color-ebony-clay":"#262b3e","color-foam":"#d7f0fb","color-gull-gray":"#9db2bd","color-humming-bird":"#d3eef9","color-keppel-1":"#37bc9b","color-keppel-2":"#34b293","color-lavender-blush":"#ffedf0","color-lightish-purple":"#a75ee8","color-loblolly":"#c5cbce","color-manatee":"#878ca8","color-mandy":"#eb4d5c","color-medium-blue":"#2e7bb2","color-milk-chocolate":"#6f2626","color-mirage-1":"#131722","color-mirage-2":"#171b29","color-mirage-3":"#1c2030","color-mischka":"#d6d8e0","color-morning-glory":"#9addcc","color-oslo-gray":"#8b8e95","color-pale":"#fff2cf","color-pale-grey-1":"#f9fafb","color-pale-grey-2":"#e7ebee","color-pale-sky":"#6b7988","color-picton-blue-1":"#3bb3e4","color-picton-blue-2":"#41bef1","color-puerto-rico":"#3bc2a1","color-purple-brown":"#4e2934","color-purple-brown-2":"#3d2028","color-radical-red":"#ff4a68","color-regent-gray":"#8797a5","color-scooter":"#38acdb","color-silver-tree":"#53b987","color-slate-gray":"#758696","color-sundown":"#ffa4b3","color-sunglow":"#ffca3b","color-tan-hide":"#ff9850","color-trout-1":"#4c525e","color-trout-2":"#4f5966","color-violet-1":"#332738","color-violet-2":"#271d2b","color-water-blue":"#1592e6","color-white":"#ffffff","color-white-ice":"#ebf7fc","color-wild-watermelon":"#ff5773","color-bg-primary":"color-white","color-bg-primary-hover":"color-cold-gray-100","color-bg-secondary":"color-white","color-bg-highlight":"color-cold-gray-50","color-bg-scroll-buttons":"color-cold-gray-100","color-legacy-bg-scroll-buttons":"color-cold-gray-850","color-legacy-bg-widget":"color-white","color-text-primary":"color-cold-gray-900","color-text-secondary":"color-cold-gray-500","color-text-tertiary":"color-cold-gray-400","color-text-disabled":"color-cold-gray-300","color-box-shadow":"color-cold-gray-300","color-divider":"color-cold-gray-150","color-divider-hover":"color-cold-gray-100","color-active-hover-text":"color-black","color-alert-text":"color-black","color-border-table":"color-cold-gray-100","color-brand":"color-tv-blue-500","color-brand-active":"color-tv-blue-600","color-brand-hover":"color-tv-blue-600","color-brand-light":"color-picton-blue-2","color-chart-page-bg":"color-cold-gray-150","color-common-tooltip-bg":"color-cold-gray-800","color-common-tooltip-text":"color-cold-gray-100","color-danger":"color-radical-red","color-depthrenderer-stroke-style":"color-athens-gray-1","color-highlight-new":"color-pale","color-input-bg":"color-white","color-input-publish-bg":"color-white","color-link":"color-tv-blue-500","color-link-hover":"color-tv-blue-600","color-link-active":"color-tv-blue-600","color-list-nth-child-bg":"color-athens-gray-2","color-pane-bg":"color-white","color-pane-secondary-bg":"color-cold-gray-100","color-popup-menu-item-hover-bg":"color-cold-gray-100","color-popup-menu-separator":"color-cold-gray-150","color-replay-data-mode":"color-radical-red","color-screener-header-bg":"color-athens-gray-2","color-screener-description":"color-trout-2","color-legacy-success":"color-keppel-1","color-success":"color-minty-green-500","color-success-hover":"color-minty-green-600","color-success-active":"color-minty-green-700","color-toolbar-button-text":"color-cold-gray-900","color-toolbar-button-text-hover":"color-black","color-toolbar-button-text-active":"color-tv-blue-500","color-toolbar-button-text-active-hover":"color-tv-blue-600","color-toolbar-button-background-hover":"color-cold-gray-100","color-toolbar-button-background-secondary-hover":"color-cold-gray-150","color-toolbar-toggle-button-background-active":"color-tv-blue-500","color-toolbar-toggle-button-background-active-hover":"color-tv-blue-600","color-toolbar-interactive-element-text-normal":"color-cold-gray-900","color-toolbar-interactive-element-text-hover":"color-black","color-toolbar-opened-element-bg":"color-cold-gray-100","color-tooltip-bg":"color-ebony-clay","color-tv-dialog-caption":"color-trout-2","color-tv-dropdown-item-hover-bg":"color-athens-gray-1","color-underlined-text":"color-slate-gray","color-widget-pages-bg":"color-white","color-warning":"color-tan-orange-500","color-growing":"color-minty-green-400","color-falling":"color-ripe-red-400","color-collapse-tabs-border":"color-athens-gray-3","color-forex-icon":"color-bright-gray","color-list-item-active-bg":"color-dark-sky-blue","color-list-item-hover-bg":"color-white-ice","color-list-item-text":"color-ebony-clay","color-site-widget-hover":"color-athens-gray-1","color-attention":"color-sunglow","color-price-axis-label-back":"color-cold-gray-150","color-price-axis-label-text":"color-cold-gray-650","color-price-axis-gear":"color-cold-gray-900","color-price-axis-gear-hover":"#000000","color-price-axis-highlight":"color-cold-gray-150","color-marker-flagged":"color-ripe-red-400","color-marker-flagged-hovered":"color-ripe-red-600","color-bid":"color-tv-blue-500","color-ask":"color-ripe-red-400","color-sell":"color-ripe-red-400","color-buy":"color-tv-blue-500","color-neutral":"color-cold-gray-500","color-border":"#dadde0","color-border-chat-fields":"#c9cbcd","color-border-hover":"#c8c8c8","color-button-hover-bg":"#f2f2f2","color-depthrenderer-fill-style":"#555555","color-disabled-border-and-color":"#ececec","color-disabled-input":"#ececec","color-readonly-input":"#b4b4b4","color-empty-container-message":"#8a8a8a","color-icons":"#7d7d7d","color-input-textarea-readonly":"#555555","color-item-active-blue":"#eff9ff","color-item-hover-active-bg":"#f1f3f6","color-item-hover-bg":"#edf1f2","color-item-hover-blue":"#c6e9f8","color-item-selected-blue":"#eafafe","color-item-active-text":"color-white","color-item-active-bg":"color-tv-blue-500","color-list-item":"#888989","color-news-highlight":"#f2f5f8","color-placeholder":"#adaeb0","color-row-hover-active-bg":"#f1f3f6","color-sb-scrollbar-body-bg":"#d8d8d8","color-screener-header-bg-hover":"#f1f3f6","color-section-separator-border":"#b5b7b9","color-separator-table-chat":"#eaecef","color-tag-active-bg":"#cfdce3","color-tag-hover-bg":"#dce6ea","color-text-regular":"#4a4a4a","color-tv-button-checked":"#757575","color-white-theme-tooltip-text":"#333333","color-brand-dark":"#2a2c39","color-scroll-bg":"color-cold-gray-400","color-scroll-border":"color-item-hover-active-bg","color-widget-border":"color-cold-gray-100","color-scroll-buttons-arrow":"color-white","color-control-intent-default":"color-cold-gray-200","color-control-intent-success":"color-minty-green-600","color-control-intent-primary":"color-tv-blue-500","color-control-intent-warning":"color-tan-orange-500","color-control-intent-danger":"color-ripe-red-500","color-seeking-alpha-brand":"#ff7200","color-pro":"color-minty-green-400","color-pro-hover":"color-minty-green-600","color-pro-plus":"color-tv-blue-500","color-pro-plus-hover":"color-tv-blue-600","color-pro-premium":"color-tan-orange-500","color-pro-premium-hover":"color-tan-orange-700","color-trial":"color-cold-gray-500","color-trial-hover":"color-cold-gray-600","color-mod":"color-ripe-red-400","color-mod-hover":"color-ripe-red-600","color-top":"color-banana-yellow-700","color-top-hover":"color-banana-yellow-800","color-ad":"color-banana-yellow-a700","color-broker-featured":"color-minty-green-400","color-broker-featured-hover":"color-minty-green-600","color-alert-status-active":"color-minty-green-400","color-alert-status-stopped":"color-ripe-red-500","color-alert-status-stopped-auto":"color-tan-orange-500","color-covid19-confirmed":"color-ripe-red-500","color-covid19-recovered":"color-minty-green-500","color-covid19-deaths":"color-cold-gray-450","color-blue-gray-950":"#0C0E15","color-cold-gray-50":"#F8F9FD","color-cold-gray-100":"#F0F3FA","color-cold-gray-150":"#E0E3EB","color-cold-gray-200":"#D1D4DC","color-cold-gray-250":"#C1C4CD","color-cold-gray-300":"#B2B5BE","color-cold-gray-350":"#A3A6AF","color-cold-gray-400":"#9598A1","color-cold-gray-450":"#868993","color-cold-gray-500":"#787B86","color-cold-gray-550":"#6A6D78","color-cold-gray-600":"#5D606B","color-cold-gray-650":"#50535E","color-cold-gray-700":"#434651","color-cold-gray-750":"#363A45","color-cold-gray-800":"#2A2E39","color-cold-gray-850":"#1E222D","color-cold-gray-900":"#131722","color-cold-gray-950":"#0C0E15","color-ripe-red-50":"#FFEBEE","color-ripe-red-100":"#FFCDD2","color-ripe-red-200":"#ef9a9a","color-ripe-red-300":"#E57373","color-ripe-red-400":"#EF5350","color-ripe-red-500":"#F44336","color-ripe-red-600":"#E53935","color-ripe-red-700":"#D32F2F","color-ripe-red-800":"#C62828","color-ripe-red-900":"#B71C1C","color-ripe-red-a200":"#FF5252","color-tan-orange-50":"#FFF3E0","color-tan-orange-100":"#FFE0B2","color-tan-orange-200":"#FFCC80","color-tan-orange-300":"#ffb74d","color-tan-orange-400":"#FFA726","color-tan-orange-500":"#FF9800","color-tan-orange-600":"#FB8C00","color-tan-orange-700":"#F57C00","color-tan-orange-800":"#EF6C00","color-tan-orange-900":"#e65100","color-tan-orange-a200":"#ffab40","color-tan-orange-a400":"#ff9100","color-tan-orange-a700":"#FF6D00","color-iguana-green-100":"#C8E6C9","color-iguana-green-200":"#A5D6A7","color-iguana-green-300":"#81c784","color-iguana-green-400":"#66BB6A","color-iguana-green-500":"#4caf50","color-iguana-green-600":"#43a047","color-iguana-green-700":"#388e3c","color-iguana-green-900":"#1B5E20","color-iguana-green-a700":"#00c853","color-banana-yellow-100":"#FFF9C4","color-banana-yellow-200":"#FFF59D","color-banana-yellow-300":"#FFF176","color-banana-yellow-400":"#ffee58","color-banana-yellow-500":"#ffeb3b","color-banana-yellow-600":"#fdd835","color-banana-yellow-700":"#fbc02d","color-banana-yellow-800":"#f9a825","color-banana-yellow-900":"#F57F17","color-banana-yellow-a400":"#ffea00","color-banana-yellow-a700":"#ffd600","color-tv-blue-50":"#E3F2FD","color-tv-blue-100":"#BBDEFB","color-tv-blue-200":"#90CAF9","color-tv-blue-300":"#64B5F6","color-tv-blue-400":"#42A5F5","color-tv-blue-500":"#2196F3","color-tv-blue-600":"#1E88E5","color-tv-blue-700":"#1976D2","color-tv-blue-800":"#1565C0","color-tv-blue-900":"#0d47a1","color-tv-blue-a100":"#82b1ff","color-tv-blue-a200":"#448aff","color-tv-blue-a400":"#2979ff","color-tv-blue-a600":"#2962FF","color-tv-blue-a700":"#144987","color-tv-blue-a800":"#143661","color-tv-blue-a900":"#132742","color-deep-blue-100":"#D1C4E9","color-deep-blue-200":"#B39DDB","color-deep-blue-300":"#9575cd","color-deep-blue-400":"#7e57c2","color-deep-blue-500":"#673ab7","color-deep-blue-700":"#512da8","color-deep-blue-800":"#4527A0","color-deep-blue-900":"#311B92","color-deep-blue-a100":"#b388ff","color-deep-blue-a700":"#6200EA","color-minty-green-100":"#B2DFDB","color-minty-green-200":"#80cbc4","color-minty-green-300":"#4db6ac","color-minty-green-400":"#26a69a","color-minty-green-500":"#009688","color-minty-green-600":"#00897b","color-minty-green-700":"#00796b","color-minty-green-900":"#004D40","color-minty-green-a400":"#1de9b6","color-minty-green-a700":"#00BFA5","color-grapes-purple-100":"#E1BEE7","color-grapes-purple-200":"#CE93D8","color-grapes-purple-300":"#ba68c8","color-grapes-purple-400":"#ab47bc","color-grapes-purple-500":"#9c27b0","color-grapes-purple-600":"#8e24aa","color-grapes-purple-700":"#7b1fa2","color-grapes-purple-800":"#6A1B9A","color-grapes-purple-900":"#4A148C","color-grapes-purple-a700":"#aa00ff","color-berry-pink-100":"#F8BBD0","color-berry-pink-200":"#f48fb1","color-berry-pink-300":"#f06292","color-berry-pink-400":"#ec407a","color-berry-pink-500":"#e91e63","color-berry-pink-600":"#D81B60","color-berry-pink-700":"#C2185B","color-berry-pink-900":"#880E4F","color-berry-pink-a200":"#ff4081","color-sky-blue-100":"#B2EBF2","color-sky-blue-200":"#80DEEA","color-sky-blue-300":"#4dd0e1","color-sky-blue-400":"#26c6da","color-sky-blue-500":"#00bcd4","color-sky-blue-600":"#00acc1","color-sky-blue-700":"#0097A7","color-sky-blue-800":"#00838F","color-sky-blue-900":"#006064","color-sky-blue-a400":"#00e5ff","color-sky-blue-a700":"#00B8D4","color-deep-blue-600":"#5E35B1","color-facebook":"#1877F2","color-twitter":"#1DA1F2","color-pre-market":"color-tan-orange-600","color-pre-market-bg":"color-tan-orange-400","color-post-market":"color-tv-blue-500","color-post-market-bg":"color-tv-blue-400","color-market-open":"color-minty-green-500","color-market-open-bg":"color-minty-green-400","color-market-closed":"color-cold-gray-400","color-market-holiday":"color-cold-gray-400","color-invalid-symbol":"color-ripe-red-400","color-invalid-symbol-hover":"color-ripe-red-700","color-replay-mode":"color-tv-blue-500","color-replay-mode-icon":"color-white","color-replay-mode-hover":"color-tv-blue-600","color-delay-mode":"color-berry-pink-600","color-delay-mode-bg":"color-berry-pink-600","color-eod-mode":"color-berry-pink-600","color-eod-mode-bg":"color-berry-pink-600","color-data-problem":"color-ripe-red-600","color-data-problem-bg":"color-ripe-red-400","color-data-problem-hover":"color-ripe-red-700","color-list-item-bg-highlighted":"color-tv-blue-50","color-list-item-bg-selected":"color-tv-blue-100"}')
},W5mg:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var r=["first_visible_bar_time","last_visible_bar_time"];function n(e){return!e.groupId&&"time"!==e.type&&!e.isHidden&&!r.includes(e.id)}},WIS0:function(e,t,i){"use strict";i.r(t),i.d(t,"DatafeedRequestsCachedProcessor",(function(){return d}));var r=i("mrSG"),n=i("Eyy1"),o=i("LxhU"),s=i("Y7w9"),a=i("ocLq"),l=i("Kxc7");i("HbRj");function c(e,t){return e.ticker+(e.currency_code?"_#_"+e.currency_code:"")+"_#_"+t}function u(e){return new Date(e).toISOString()}var h=function(){function e(e,t,i,r){this._cache={bars:[]},this._nextSubscriptionId=0,this._pendingSubscribers=[],this._subscribers=[],this._requesting=!1,this._leftDate=null,this._gaps=[],this._realtimeOn=!1,this._endOfData=!1,this._resetCacheTimeout=null,this._errorMessage=null,this._destroyed=!1,this._emptyResponsesCount=0,this._datafeed=e,this._symbolInfo=t,this._resolution=Object(n.ensureNotNull)(o.Interval.normalize(i)),this._dwmAligner=r}return e.prototype.destroy=function(){0!==this._subscribers.length&&console.warn("Destroying with not-empty state"),this._clearResetCacheTimeout(),this._unsubscribeRealtime(),this._purgeCache(),delete this._datafeed,this._destroyed=!0},e.prototype.addSubscription=function(e,t,i){var r=this,n=this._getNextSubscriptionId(),o=Math.floor(e.from/1e3),s=Math.floor(e.to/1e3);this._pendingSubscribers.push({key:n,range:{from:o,to:s},onHistoryCallback:t,onErrorCallback:i}),this._clearResetCacheTimeout();return setTimeout((function(){r._destroyed||r._processPendingSubscribers()}),0),n},e.prototype.removeSubscription=function(e){var t=this,i=this._pendingSubscribers.find((function(t){return t.key===e}));if(i)this._pendingSubscribers.splice(this._pendingSubscribers.indexOf(i),1);else{var r=this._subscribers.find((function(t){return t.key===e}));if(r)return this._subscribers.splice(this._subscribers.indexOf(r),1),void(this._subscribers.length||(this._symbolInfo.expired||this._symbolInfo.expiration_date?this._unsubscribeRealtime():this._resetCacheTimeout=setTimeout((function(){t._resetCacheTimeout=null,t._purgeCache(),t._unsubscribeRealtime()}))));console.warn("Unknown subscription symbol={0}, resolution={1}, key={2}".format(this._symbolInfo.name,this._resolution,e))}},e.prototype._logMessage=function(e,t){if(l.enabled("charting_library_debug_mode")||t){var i=this._symbolInfo.currency_code;console.log("FEED ["+this._symbolInfo.name+"|"+this._resolution+(i?"|"+i:"")+"]: "+e)}},e.prototype._clearResetCacheTimeout=function(){null!==this._resetCacheTimeout&&(clearTimeout(this._resetCacheTimeout),this._resetCacheTimeout=null)},e.prototype._purgeCache=function(){this._logMessage("Reset cache"),this._cache={bars:[]},this._gaps=[],this._errorMessage=null,this._leftDate=null,this._endOfData=!1},e.prototype._processPendingSubscribers=function(){var e=this,t=this._pendingSubscribers;if(t.length)if(this._requesting)this._logMessage("Processing is skipped due active request");else{if(this._logMessage("Processing pending subscribers, count="+t.length),this._errorMessage){
var i=this._errorMessage;return this._logMessage("Return error: "+i),this._pendingSubscribers=[],void t.forEach((function(e){e.onErrorCallback(i)}))}var r=t.reduce((function(e,t){return Math.min(t.range.from,e)}),1/0);if(this._logMessage('Leftmost requested "from" is '+u(1e3*r)),!this._leftDate||r0?this._logMessage("Bars to return for request {0}: total {1} bars in [{2} ... {3}] ".format(e.key,r.count(),u(r.bars[0].time),u(r.bars[r.count()-1].time))):this._logMessage("Request {0}. Nothing to return.".format(e.key)),t.barset=r;var n=this._inGapNextTime(i.from);if(n)this._logMessage("Request {0} is in gap, nextTime = {1}".format(e.key,u(1e3*n))),r.nextTime=n;else if(0===r.count()){var o=this._cache.bars.length&&this._cache.bars[this._cache.bars.length-1].time/1e3;o&&i.from>o&&(this._logMessage("Request {0} is in gap, nextTime = {1}".format(e.key,u(1e3*o))),r.nextTime=o||void 0)}this._endOfData&&null!==this._leftDate&&e.range.from<=this._leftDate&&(r.endOfData=!0),e.onHistoryCallback(r)},e.prototype._createBarset=function(e){var t=Object(s.lowerbound)(this._cache.bars,1e3*e,(function(e,t){return e.time>1,a=r+s;i(e[a],t)?(r=a+1,o-=s+1):o=s}return r}function s(e,t,i,r){return void 0===i&&(i=0),void 0===r&&(r=e.length),o(e,t,n,i,r)}function a(e,t,i,r,n){void 0===r&&(r=0),void 0===n&&(n=e.length);for(var o=n-r;0>1,a=r+s;i(t,e[a])?o=s:(r=a+1,o-=s+1)}return r}function l(e,t,i,r){return void 0===i&&(i=0),void 0===r&&(r=e.length),a(e,t,n,i,r)}function c(e,t){return e.filter((function(e){return!t.includes(e)}))}
function u(e,t){var i=e.indexOf(t);return i<0?e.slice():[t].concat(e.slice(0,i)).concat(e.slice(i+1))}function h(e,t,i){var n=new Set(t),o=[],a=[];return e.forEach((function(e,t){n.has(e)||(o.push(e),a.push(t))})),is?(console.warn("Too many variables-link in HEX-color search: "+i[0]),null):e(o,i)}(e);o[e]=n.ensureNotNull(t)})),t.colorsPalette=o,t.getHexColorByName=function(e){var i=t.colorsPalette[e];if(!i)throw new Error("No such color "+e);return i}},YWnQ:function(e,t,i){"use strict";var r;i.r(t),i.d(t,"SymbolErrorPermissionDeniedReason",(function(){return r})),i.d(t,"permissionDenied",(function(){return n})),function(e){e.Symbol="symbol",e.ExtendedHours="extended_hours",e.GroupPermission="group"}(r||(r={}));var n="permission denied"},"Ye2/":function(e,t,i){"use strict";var r;i.r(t),i.d(t,"LineToolBarsPatternMode",(function(){return r})),function(e){e[e.Bars=0]="Bars",e[e.Line=1]="Line",e[e.OpenClose=2]="OpenClose",e[e.LineOpen=3]="LineOpen",e[e.LineHigh=4]="LineHigh",e[e.LineLow=5]="LineLow",e[e.LineHL2=6]="LineHL2"}(r||(r={}))},Yj6H:function(e,t,i){"use strict";i.r(t),i.d(t,"PriceScaleBase",(function(){return _}));var r=i("Eyy1"),n=i("aIyQ"),o=i.n(n),s=i("Qb4w"),a=i("TTFo"),l=i("qJq3"),c=i("7ktv"),u=i("tc+8"),h=i.n(u),d=i("3ClC"),p=i("/tGj"),f={autoScale:!0,autoScaleDisabled:!1,lockScale:!1,percentage:!1,percentageDisabled:!1,log:!1,logDisabled:!1,alignLabels:!0,isInverted:!1,indexedTo100:!1},_=function(){function e(e){this._marksCache=null,this._onMarksChanged=new o.a,this._onCurrencyLabelContentChanged=new o.a,this.m_dataSources=[],this._sourcesForAutoscale=null,this._sourcesToUpdateViews=null,this._hasSeries=!1,this._seriesLikeSources=[],this._seriesLikeSourcesSet=new Set,this._priceDataSources=[],this._lastSourceRemoved=new o.a,this._scaleSeriesOnly=!1,this._currencyCache=null,e=Object.assign({},f,e),this._properties=new h.a(e)}return e.prototype.isLog=function(){return this._properties.childs().log.value()},e.prototype.isPercentage=function(){return this._properties.childs().percentage.value()},e.prototype.isInverted=function(){return this._properties.childs().isInverted.value()},e.prototype.isIndexedTo100=function(){return this._properties.childs().indexedTo100.value()},e.prototype.isAutoScale=function(){return this._properties.childs().autoScale.value()&&!this.isLockScale()},e.prototype.isLockScale=function(){
return this._properties.childs().lockScale.value()},e.prototype.isRegular=function(){return!this.isPercentage()&&!this.isLog()&&!this.isIndexedTo100()},e.prototype.properties=function(){return this._properties},e.prototype.dataSources=function(){return this.m_dataSources},e.prototype.seriesLikeSources=function(){return this._seriesLikeSources},e.prototype.addDataSource=function(e,t){var i=this;if(t||-1===this.m_dataSources.indexOf(e)){if(e instanceof c.PriceDataSource&&(this._priceDataSources.push(e),e.currencyChanged().subscribe(this,(function(){return i._currencyCache=null})),Object(p.isSymbolSource)(e)&&(this._seriesLikeSources.push(e),this._seriesLikeSourcesSet.add(e),e.symbolResolved().subscribe(this,(function(){return i._currencyCache=null})),e instanceof l.Series))){var r=e.properties();this._hasSeries||(r.childs().lockScale&&(this.setMode({lockScale:r.childs().lockScale.value()}),r.removeProperty("lockScale")),r.childs().pnfStyle.childs().lockScale&&r.childs().pnfStyle.removeProperty("lockScale")),this._hasSeries=!0}e.properties().visible.listeners().subscribe(null,(function(){i._sourcesForAutoscale=null,i._currencyCache=null})),this.m_dataSources.push(e),this._mainSource=void 0,this._sourcesForAutoscale=null,this._sourcesToUpdateViews=null,this._currencyCache=null,this.updateFormatter(),this._initScaleProperties(),this.invalidateSourcesCache()}},e.prototype.removeDataSource=function(e){var t=this.m_dataSources.indexOf(e);if(Object(r.assert)(-1!==t,"Source is not attached to scale"),e.properties().visible.listeners().unsubscribeAll(this),this.m_dataSources.splice(t,1),e instanceof c.PriceDataSource){var i=this._priceDataSources.indexOf(e);if(Object(r.assert)(-1!==i,"Source is not found"),this._priceDataSources.splice(i,1),Object(p.isSymbolSource)(e)){var n=this._seriesLikeSources.indexOf(e);Object(r.assert)(-1!==n,"Source is not found"),this._seriesLikeSources.splice(n,1),this._seriesLikeSourcesSet.delete(e),e.symbolResolved().unsubscribeAll(this),e instanceof l.Series&&(this._hasSeries=!1)}e.currencyChanged().unsubscribeAll(this)}this.mainSource()||this.setMode({autoScale:!0}),this._mainSource=void 0,this._sourcesForAutoscale=null,this._sourcesToUpdateViews=null,this.updateFormatter(),this.invalidateSourcesCache(),0===this.m_dataSources.length&&this._lastSourceRemoved.fire(),this._currencyCache=null},e.prototype.currency=function(e){if(null!==this._currencyCache&&e.size===this._currencyCache.availableCurrenciesCount)return this._currencyCache.value;for(var t=void 0,i=new Set,n=new Set,o=0===this._seriesLikeSources.length,s=void 0,a=!0,l=0,c=0,u=0,h=this._seriesLikeSources;u0)s=null;else if(void 0===s)s=v;else if(null!==s&&s!==v){s=null;break}o=!0;break}}}}return void 0===t&&(t=0===l&&0===c?null:{readOnly:o,selectedCurrency:s||null,currencies:n,originalCurrencies:i,symbolSourceCount:l,allCurrenciesAreOriginal:a}),this._currencyCache={value:t,availableCurrenciesCount:e.size},t},e.prototype.onMarksChanged=function(){return this._onMarksChanged},e.prototype.priceRangeInPrice=function(){if(this.isEmpty())return null;var e=this.mainSource();if(null===e)return null;var t=Object(r.ensureNotNull)(e.firstValue()),i=this.height();return{from:this.coordinateToPrice(i-1,t),to:this.coordinateToPrice(0,t)}},e.prototype.setPriceRangeInPrice=function(e){if(!this.isPercentage()&&!this.isIndexedTo100()){var t=this.isInverted(),i=t?this.bottomMargin():this.topMargin(),r=t?this.topMargin():this.bottomMargin(),n=this.isLog(),o=n?Object(a.toLog)(e.from):e.from,l=n?Object(a.toLog)(e.to):e.to,c=l-o;o+=r*c,l-=i*c,this.setMode({autoScale:!1}),this.setPriceRange(new s.PriceRange(o,l)),this._marksCache=null,this._onMarksChanged.fire()}},e.prototype.hasMainSeries=function(){return this._hasSeries},e.prototype.getStudies=function(){return this.dataSources().filter(d.isStudy)},e.prototype.lastSourceRemoved=function(){return this._lastSourceRemoved},e.prototype._recalculateSourcesForAutoscale=function(){this._mainSource&&(this._scaleSeriesOnly=this._scalesProperties.childs().scaleSeriesOnly.value());var e=this._scaleSeriesOnly&&this._hasSeries;this._sourcesForAutoscale=this.m_dataSources.filter((function(t){return!!(t.properties().visible.value()||t instanceof l.Series)&&(e?t instanceof l.Series:t.isIncludedInAutoScale())}))},e.prototype._updateAutoScaleDisabledProperty=function(e){var t=this._properties.childs(),i=t.indexedTo100.value()||t.percentage.value()||t.lockScale.value();e?t.autoScaleDisabled.setValueSilently(i):t.autoScaleDisabled.setValue(i)},e.prototype._setAutoScaleValueWithDependentProperties=function(e){var t=this._properties.childs();t.autoScale.setValueSilently(e),e&&(t.percentage.setValueSilently(!1),t.indexedTo100.setValueSilently(!1),t.lockScale.setValueSilently(!1),t.logDisabled.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)},e.prototype._setLockScaleValueWithDependentProperties=function(e){var t=this._properties.childs();t.lockScale.setValueSilently(e),e&&(t.autoScale.setValueSilently(!1),t.percentage.setValueSilently(!1),t.indexedTo100.setValueSilently(!1),t.log.setValueSilently(!1)),t.percentageDisabled.setValueSilently(e),t.logDisabled.setValueSilently(e),this._updateAutoScaleDisabledProperty(!0)},e.prototype._setPercentageValueWithDependentProperties=function(e){var t=this._properties.childs();t.percentage.setValueSilently(e),
+if(null!==t)for(var _=0,m=this._priceDataSources;_0)s=null;else if(void 0===s)s=v;else if(null!==s&&s!==v){s=null;break}o=!0;break}}}}return void 0===t&&(t=0===l&&0===c?null:{readOnly:o,selectedCurrency:s||null,currencies:n,originalCurrencies:i,symbolSourceCount:l,allCurrenciesAreOriginal:a}),this._currencyCache={value:t,availableCurrenciesCount:e.size},t},e.prototype.onMarksChanged=function(){return this._onMarksChanged},e.prototype.priceRangeInPrice=function(){if(this.isEmpty())return null;var e=this.mainSource();if(null===e)return null;var t=Object(r.ensureNotNull)(e.firstValue()),i=this.height();return{from:this.coordinateToPrice(i-1,t),to:this.coordinateToPrice(0,t)}},e.prototype.setPriceRangeInPrice=function(e){if(!this.isPercentage()&&!this.isIndexedTo100()){var t=this.isInverted(),i=t?this.bottomMargin():this.topMargin(),r=t?this.topMargin():this.bottomMargin(),n=this.isLog(),o=n?Object(a.toLog)(e.from):e.from,l=n?Object(a.toLog)(e.to):e.to,c=l-o;o+=r*c,l-=i*c,this.setMode({autoScale:!1}),this.setPriceRange(new s.PriceRange(o,l)),this._marksCache=null,this._onMarksChanged.fire()}},e.prototype.hasMainSeries=function(){return this._hasSeries},e.prototype.getStudies=function(){return this.dataSources().filter(d.isStudy)},e.prototype.lastSourceRemoved=function(){return this._lastSourceRemoved},e.prototype._recalculateSourcesForAutoscale=function(){this._mainSource&&(this._scaleSeriesOnly=this._scalesProperties.childs().scaleSeriesOnly.value());var e=this._scaleSeriesOnly&&this._hasSeries;this._sourcesForAutoscale=this.m_dataSources.filter((function(t){return!!(t.properties().visible.value()||t instanceof l.Series)&&(e?t instanceof l.Series:t.isIncludedInAutoScale())}))},e.prototype._updateAutoScaleDisabledProperty=function(e){var t=this._properties.childs(),i=t.indexedTo100.value()||t.percentage.value()||t.lockScale.value();e?t.autoScaleDisabled.setValueSilently(i):t.autoScaleDisabled.setValue(i)},e.prototype._setAutoScaleValueWithDependentProperties=function(e){var t=this._properties.childs();t.autoScale.setValueSilently(e),e&&(t.percentage.setValueSilently(!1),t.indexedTo100.setValueSilently(!1),t.lockScale.setValueSilently(!1),t.logDisabled.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)},e.prototype._setLockScaleValueWithDependentProperties=function(e){var t=this._properties.childs();t.lockScale.setValueSilently(e),e&&(t.autoScale.setValueSilently(!1),t.percentage.setValueSilently(!1),t.indexedTo100.setValueSilently(!1),t.log.setValueSilently(!1)),t.percentageDisabled.setValueSilently(e),t.logDisabled.setValueSilently(e),this._updateAutoScaleDisabledProperty(!0)},e.prototype._setPercentageValueWithDependentProperties=function(e){var t=this._properties.childs();t.percentage.setValueSilently(e),
e&&(t.autoScale.setValueSilently(!0),t.log.setValueSilently(!1),t.lockScale.setValueSilently(!1),t.indexedTo100.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)},e.prototype._setIndexedTo100ValueWithDependentProperties=function(e){var t=this._properties.childs();t.indexedTo100.setValueSilently(e),e&&(t.autoScale.setValueSilently(!0),t.log.setValueSilently(!1),t.lockScale.setValueSilently(!1),t.percentage.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)},e.prototype._setLogValueWithDependentProperties=function(e){var t=this._properties.childs();t.log.setValueSilently(e),e&&(t.lockScale.setValueSilently(!1),t.percentage.setValueSilently(!1),t.indexedTo100.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)},e.prototype._initScaleProperties=function(){var e=this.isLockScale(),t=this.properties().childs();e&&(t.percentage.setValue(!1),t.indexedTo100.setValue(!1),t.log.setValue(!1),t.autoScale.setValue(!1)),t.percentageDisabled.setValue(e),t.logDisabled.setValue(e),this._updateAutoScaleDisabledProperty(!1),t.percentage.value()&&(t.log.setValue(!1),t.indexedTo100.setValue(!1)),t.indexedTo100.value()&&(t.log.setValue(!1),t.percentage.setValue(!1))},e}()},Yjuu:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("5rJj"),o=i("xUGI"),s=i("hayr").propertyPages,a=i("ytGH").LineToolWidthsProperty,l=window.t("Fib Speed Resistance Arcs");function c(){o.call(this)}function u(e,t){this._constructor="LineToolFibSpeedResistanceArcs";var n=t||u.createProperties();r.call(this,e,n),e._fibSpeedResistanceArcsLabelsCache||(e._fibSpeedResistanceArcsLabelsCache=new c),i.e("lt-pane-views").then(function(e){var t=i("bcXK").FibSpeedResistanceArcsPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);for(var o=[this._properties.child("trendline").child("linewidth")],s=1;s<=u.LevelsCount;s++)o.push(this._properties.child("level"+s).child("linewidth"));this._widthsProperty=new a(o)}inherit(c,o),c.prototype.levelsCount=function(){return u.LevelsCount},inherit(u,r),u.LevelsCount=11,u.prototype.levelsCount=function(){return u.LevelsCount},u.prototype.pointsCount=function(){return 2},u.prototype.translatedType=function(){return l},u.prototype.name=function(){return"Fib Speed Resistance Arcs"},u.prototype.processErase=function(e,t){var i="level"+t,r=this.properties()[i].visible;e.setProperty(r,!1,"Erase level line")},u.prototype.getStylesPropertyPage=function(){return s.LineToolFibSpeedResistanceArcsStylesPropertyPage},u.createProperties=function(e){var t=new n("linetoolfibspeedresistancearcs",e,!1,{range:[1,11]});return u._configureProperties(t),t},u.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("pdv6").FibSpeedResistanceArcsDefinitionsViewModel}.bind(null,i)).catch(i.oe)},u._configureProperties=function(e){r._configureProperties(e)},t.LineToolFibSpeedResistanceArcs=u},YlKu:function(e,t,i){"use strict";i.r(t),
i.d(t,"ApplyLineToolTemplateUndoCommand",(function(){return n}));var r=i("mrSG"),n=function(e){function t(t,i,r){var n=e.call(this,r)||this;return n._source=t,n._newState=i,n._oldState=t.properties().state(),n}return Object(r.__extends)(t,e),t.prototype.redo=function(){this._source.applyTemplate(this._newState)},t.prototype.undo=function(){this._source.applyTemplate(this._oldState)},t}(i("RDU5").UndoCommand)},YmeR:function(e,t,i){"use strict";i.r(t),i.d(t,"ActionBinder",(function(){return o}));var r=i("mrSG"),n=i("2h0C"),o=function(e){function t(t,i,r,n,o){void 0===o&&(o=null);var s=e.call(this,t,i,!0,r,n)||this;return null!==o?t.update({onExecute:o.bind(s)}):t.update({onExecute:s._onActionCallback.bind(s)}),s}return Object(r.__extends)(t,e),t.prototype.action=function(){return this.control()},t.prototype.value=function(){return this.action().isChecked()},t.prototype.setValue=function(e){this.action().update({checked:Boolean(e)})},t.prototype._onActionCallback=function(){this._undoModel.setProperty(this._property,this.value(),this._undoText)},t}(n.Binding)},YuHv:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var r=i("AWC/");function n(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]);var i=document.createElement("div"),n=document.createElement("div");return i.appendChild(n),i.classList.add(r.container),n.classList.add(r.inner),e.forEach((function(e){i.classList.add(r[e])})),t.forEach((function(e){i.classList.add(r[e])})),i}},Z0Sh:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("5rJj"),o=i("hayr").propertyPages,s=window.t("Gann Box");function a(e,t){this._constructor="LineToolGannSquare";var n=t||a.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("eg8N").GannSquarePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,r),a.HLevelsCount=7,a.VLevelsCount=7,a.prototype.hLevelsCount=function(){return a.HLevelsCount},a.prototype.vLevelsCount=function(){return a.VLevelsCount},a.prototype.pointsCount=function(){return 2},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Gann Box"};var l=[4.5,9,11.25,18,22.5,36,45],c=function(){for(var e=[],t=l.length-1,i=1,r=0,n=0;n<1e10;)n=l[r]*i,e.push(Math.round(n)),e.push(Math.ceil(-n)),r===t-1&&(i*=10),r=(r+1)%t;return e.sort((function(e,t){return et?1:0})),e}();a.prototype._alignPriceOnPattern=function(e,t){var i=Math.round(1e6*(e.price-t.price))/1e6;if(0===i)return t.price;for(var r=l[0],n=l[l.length-1],o=1,s=Math.abs(i);s=0&&!(l[c]*o=0?a:-a),e},a.prototype._alignTimeOnPattern=function(e,t){var i=e.index-t.index;if(0===i)return 0;for(var r=c.length-2;r>=0&&!(c[r]0?1:0,e.index=t.index+c[r],e},a.prototype._alignPointsFixedIncrement=function(e,t){return this._alignTimeOnPattern(e,t),this._alignPriceOnPattern(e,t),e},a.prototype._preparePoint=function(e,t){
return t&&t.shift()&&0!==this._points.length&&this._alignPointsFixedIncrement(e,this._points[0]),r.prototype._preparePoint.call(this,e,t)},a.prototype.setPoint=function(e,t,i){if(i&&i.shift()){var n=0===e?this._points[1]:this._points[0];this._alignPointsFixedIncrement(t,n)}r.prototype.setPoint.call(this,e,t,i)},a.prototype.getStylesPropertyPage=function(){return o.LineToolGannSquareStylesPropertyPage},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("2liL").GannSquareDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetoolgannsquare",e,!1,{range:[1,7],prefixes:["h","v"],names:["coeff","color","visible"]});return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolGannSquare=a},Z8aO:function(e,t,i){"use strict";i.r(t),i.d(t,"SeriesPriceLinePaneView",(function(){return s}));var r=i("mrSG"),n=i("k4w6"),o=i("8Uy/"),s=function(e){function t(t){var i=e.call(this,t)||this;return i._lineRendererData.linestyle=o.LINESTYLE_SMALL_DASHED,i}return Object(r.__extends)(t,e),t.prototype._updateImpl=function(){if(this._lineRendererData.visible=!1,this._series.properties().showPriceLine.value()&&12!==this._series.properties().style.value()){var e=this._series.lastValueData(void 0,!0);e.noData||(this._lineRendererData.visible=!0,this._lineRendererData.y=e.coordinate,this._lineRendererData.color=this._series.priceLineColor(e.color),this._lineRendererData.linewidth=this._series.properties().priceLineWidth.value())}},t}(n.a)},ZAbA:function(e,t,i){"use strict";i.r(t),i.d(t,"SeriesDataEvents",(function(){return o}));var r=i("aIyQ"),n=i.n(r),o=function(){function e(){this._completed=new n.a,this._error=new n.a,this._symbolError=new n.a,this._symbolResolved=new n.a,this._seriesError=new n.a,this._symbolNotPermitted=new n.a,this._symbolGroupNotPermitted=new n.a,this._extendedHoursNotPermitted=new n.a,this._chartTypeNotPermitted=new n.a,this._intradaySpreadNotPermitted=new n.a,this._intradayExchangeNotPermitted=new n.a,this._customIntervalNotPermitted=new n.a,this._secondsIntervalNotPermitted=new n.a,this._tickMarksRangeChanged=new n.a,this._barReceived=new n.a,this._messageReceived=new n.a}return e.prototype.completed=function(){return this._completed},e.prototype.error=function(){return this._error},e.prototype.symbolError=function(){return this._symbolError},e.prototype.symbolResolved=function(){return this._symbolResolved},e.prototype.seriesError=function(){return this._seriesError},e.prototype.symbolNotPermitted=function(){return this._symbolNotPermitted},e.prototype.symbolGroupNotPermitted=function(){return this._symbolGroupNotPermitted},e.prototype.extendedHoursNotPermitted=function(){return this._extendedHoursNotPermitted},e.prototype.chartTypeNotPermitted=function(){return this._chartTypeNotPermitted},e.prototype.intradaySpreadNotPermitted=function(){return this._intradaySpreadNotPermitted},
e.prototype.intradayExchangeNotPermitted=function(){return this._intradayExchangeNotPermitted},e.prototype.customIntervalNotPermitted=function(){return this._customIntervalNotPermitted},e.prototype.secondsIntervalNotPermitted=function(){return this._secondsIntervalNotPermitted},e.prototype.tickMarksRangeChanged=function(){return this._tickMarksRangeChanged},e.prototype.barReceived=function(){return this._barReceived},e.prototype.messageReceived=function(){return this._messageReceived},e.prototype.fireCompleted=function(){this._completed.fire()},e.prototype.fireError=function(){this._error.fire()},e.prototype.fireSymbolError=function(e){this._symbolError.fire(e),this.fireError()},e.prototype.fireSymbolResolved=function(e){this._symbolResolved.fire(e)},e.prototype.fireSeriesError=function(e){this._seriesError.fire(e),this.fireError()},e.prototype.fireSymbolNotPermitted=function(e){this._symbolNotPermitted.fire(e),this.fireError()},e.prototype.fireSymbolGroupNotPermitted=function(e){this._symbolGroupNotPermitted.fire(e),this.fireError()},e.prototype.fireExtendedHoursNotPermitted=function(){this._extendedHoursNotPermitted.fire(),this.fireError()},e.prototype.fireChartTypeNotPermitted=function(e){this._chartTypeNotPermitted.fire(e),this.fireError()},e.prototype.fireIntradaySpreadNotPermitted=function(){this._intradaySpreadNotPermitted.fire(),this.fireError()},e.prototype.fireIntradayExchangeNotPermitted=function(){this._intradayExchangeNotPermitted.fire(),this.fireError()},e.prototype.fireCustomIntervalNotPermitted=function(){this._customIntervalNotPermitted.fire(),this.fireError()},e.prototype.fireSecondsIntervalNotPermitted=function(){this._secondsIntervalNotPermitted.fire(),this.fireError()},e.prototype.fireTickMarksRangeChanged=function(e){this._tickMarksRangeChanged.fire(e)},e.prototype.fireBarReceived=function(e){this._barReceived.fire(e)},e.prototype.fireMessageReceived=function(e){this._messageReceived.fire(e)},e}()},ZBiT:function(e,t,i){e.exports={"css-value-pane-controls-padding-left":"1px","css-value-pane-controls-padding-right":"5px"}},ZJKN:function(e,t,i){"use strict";i.r(t),i.d(t,"BarsRange",(function(){return n}));var r=i("Eyy1"),n=function(){function e(e,t){Object(r.assert)(e<=t,"The last bar in the bars range should be greater than or equal to the first bar"),this._firstBar=e,this._lastBar=t}return e.prototype.firstBar=function(){return this._firstBar},e.prototype.lastBar=function(){return this._lastBar},e.prototype.count=function(){return this._lastBar-this._firstBar+1},e.prototype.contains=function(e){return this._firstBar<=e&&e<=this._lastBar},e.prototype.equals=function(e){return this._firstBar===e.firstBar()&&this._lastBar===e.lastBar()},e.compare=function(e,t){return null===e||null===t?e===t:e.equals(t)},e}()},ZZnO:function(e,t,i){"use strict";i.r(t),i.d(t,"dateFormatProperty",(function(){return a})),i.d(t,"removeSettingsValue",(function(){return l}));var r=i("Vdly"),n=i("m/cY"),o=i("e1ZQ");function s(){return r.getValue("date_format",Object(o.defaultDateFormat)())}var a=Object(n.a)(s())
-;function l(){a.setValue(Object(o.defaultDateFormat)()),r.remove("date_format")}r.onSync.subscribe(null,(function(){return a.setValue(s())})),a.listeners().subscribe(null,(function(){return r.setValue("date_format",a.value())}))},ZjKI:function(e,t,i){"use strict";i.r(t),i.d(t,"CLOSE_POPUPS_AND_DIALOGS_COMMAND",(function(){return r}));var r="CLOSE_POPUPS_AND_DIALOGS_COMMAND"},"Zo2/":function(e,t,i){"use strict";(function(t,r){i("YCFM"),i("YFKU");var n=i("Eyy1").assert,o=i("Y7w9").moveToHead,s=i("mkn5").PaneWidget,a=i("fYB8").PaneSeparator,l=i("mNEU"),c=i("1IXQ").PriceAxisWidget,u=i("uPb3").TimeAxisWidget,h=i("fTGZ").BarsMarksContainer,d=i("qJq3").Series,p=i("Kxc7"),f=i("YmeR").ActionBinder,_=i("mKT+").resolveAndShowEditObjectDialog,m=i("Vdly").setValue,y=i("QloM").TabNames,g=i("cdbK").showGoToDateDialog,v=i("/3z9"),S=i("lxNp"),b=i("7nsU").showConfirmInputsDialog,w=i("GVHu").Study,P=i("8sOK").StudyStub,C=i("3ClC").isStudy,x=i("Ss5c").LineDataSource,T=i("CW80"),L=T.isLineToolName,I=T.isLineTool,M=T.isStudyLineTool,O=i("7KDR"),A=O.Action,k=O.Separator,E=(i("L/Ed").ToolboxType,i("mMWL")),D=i("LxhU").Interval,V=i("pPtI"),B=V.setLastUsedResolution,R=V.getDefaultResolution,N=i("n5al"),F=N.isRangeStyle,j=N.getDefaultStyle,W=i("pvsv").showSymbolInfoDialog,z=i("i1o5").InvalidateMask,H=i("i1o5").InvalidationLevel,U=i("nqXy").MouseWheelHelper,Y=i("PT1i").linking,G=i("mYjs").showChangeIntervalDialog,q=i("u5Q5").showDialog,K=i("u5Q5"),Z=K.activateKeyPressHandler,J=(K.setToastsForHotkeyChanges,i("Ocx9").DefaultProperty),X=i("+6ja"),Q=X.availableTimezones,ee=X.timezoneIsAvailable,te=i("0F0w").ChartSession,ie=i("0YCj"),re=i("c2JX").Spinner,ne=i("PC8g").trackEvent,oe=i("Tmoa"),se=i("ikwP").Size,ae=i("wZIs"),le=i("uOxu").getLogger("ChartWidget",{color:"#606"}),ce=i("U0+/").StudyMetaInfoRepository,ue=i("VNzU").isMultipleLayout,he=i("b1GK").addPerfMark,de=i("KnF9").EnvironmentState,pe=i("FQhm"),fe=i("wjVR").ChartWidgetBase,_e=i("EsvI").isStdThemedDefaultValue,me=i("qFKp").CheckMobile.any(),ye=i("ikwP").getCanvasDevicePixelRatio,ge=i("B8p3").setHandler,ve=(Y=i("PT1i").linking,i("YWnQ").permissionDenied),Se=window.t("On The Left"),be=window.t("On The Right"),we=window.t("Move Scale To Left"),Pe=window.t("Move Scale To Right"),Ce=p.enabled("chart_content_overrides_by_defaults");function xe(e,i){fe.call(this,e,i),this._options.timeScaleWidget&&(this._options.timeScaleWidget.pressedMouseMoveScale=this._options.handleScale.axisPressedMouseMove);var n=this;this._startSpinner(this._options.container.value());var o=this._options.content,s=this._options.readOnly;this._backgroundBasedTheme=new t("light"),this._removeMaximizeHotkey=null,n._hotkeys=S.createGroup({desc:"Chart actions",isDisabled:function(){return!n._isActive}});var a=this._options.containsData,l=this._options.onWidget,c=this._options.onCmeWidget;c&&le.logWarn("[ChartWidget] 'onCmeWidget' option is depricated")
-;var u=this._options.widgetCustomer,h=this._options.timezone,d=this._options.hideSymbolSearch,p=this._options.defSymbol,f=D.isValid(this._options.defInterval)?this._options.defInterval:void 0,_=parseInt(this._options.defStyle),m=N.isValidStyle(_)?_:void 0,y=this._options.defExtendedHours,g=this._options.defTimeframe;this._chartWidgetCollection=this._options.chartWidgetCollection||null,this._content=o,this._initialLoading=this._options.initialLoading,this._readOnly=s,this._containsData=a,this._showChartEvents=!a&&this._options.chartEventsEnabled,this._defSymbol=p,this._defInterval=f,this._defTimeframe=g,this._defStyle=m,this._onWidget=!!l,this._compareSymbols=this._options.compareSymbols,this._onWidget&&(c?this._widgetCustomer="cme":u&&(this._widgetCustomer=u)),this._hideSymbolSearch=d,this._frameTime=30,this._model=null,this._metaInfo={},this._drawRafId=0,this._lhsAxesWidth=0,this._rhsAxesWidth=0;var v=this._contentSeriesProperties();v&&(p=v.symbol,f=v.interval),void 0===this._options.useUserChartPreferences&&(this._options.useUserChartPreferences=!0),this._properties=new J("chartproperties",void 0,void 0,this._options.useUserChartPreferences);var b=this._options.useUserChartPreferences?ae.defaults("chartproperties.mainSeriesProperties"):ae.factoryDefaults("chartproperties.mainSeriesProperties");this._properties.mainSeriesProperties.merge(b),f=f||b.interval||"D",N.isValidStyle(m)||(m=N.isValidStyle(b.style)?b.style:j(D.isRange(f))),this._properties.mainSeriesProperties.merge({visible:!0,symbol:p||DEFAULT_SYMBOL,shortName:"",timeframe:"",onWidget:this._onWidget,interval:f,style:m,extendedHours:y,lineStyle:{styleType:ae.factoryDefaults("chartproperties.mainSeriesProperties.lineStyle.styleType")}}),this._containsData&&this._properties.mainSeriesProperties.merge({showCountdown:!1}),h&&ee(h)&&this._properties.timezone.setValue(h),this._tagsChanged=new r,this._modelCreated=new r,this._disconnected=new r,this._reconnectBailout=new r,this._connected=new r,this._redrawPanes=new r,this._onScroll=new r,this.chartWidgetInitialized=new r,this._chartSession=new te(ChartApiInstance),this._metaInfoRepository=new ce(this._chartSession),this.lhsPriceAxisWidthChanged=new r,this.rhsPriceAxisWidthChanged=new r,this._timingsMeter=null,this._isActive=this._options.isActive,this._options.container.subscribe((function(e){n._setElement($(e))}),{callWithLast:!0});var w=function(){n.resize()};this._options.width.subscribe(w),this._options.height.subscribe(w),this._options.visible.subscribe(this._updateTimingsMeterState.bind(this)),this._properties.paneProperties.background.listeners().subscribe(this,this._updateThemedColor),this._aboutToBeDestroyed=new r,this._actions=null,this._definitionsViewModel=null,this._backgroundColorSpawn=null,this._onZoom=new r}inherit(xe,fe),xe.prototype.onZoom=function(){return this._onZoom},xe.prototype.isInitialized=function(){return Boolean(this._inited)},xe.prototype.compareSymbols=function(){return this._compareSymbols},xe.prototype._getChartPropertyDefinitionsViewModel=function(){
+;function l(){a.setValue(Object(o.defaultDateFormat)()),r.remove("date_format")}r.onSync.subscribe(null,(function(){return a.setValue(s())})),a.listeners().subscribe(null,(function(){return r.setValue("date_format",a.value())}))},ZjKI:function(e,t,i){"use strict";i.r(t),i.d(t,"CLOSE_POPUPS_AND_DIALOGS_COMMAND",(function(){return r}));var r="CLOSE_POPUPS_AND_DIALOGS_COMMAND"},"Zo2/":function(e,t,i){"use strict";(function(t,r){i("YCFM"),i("YFKU");var n=i("Eyy1").assert,o=i("Y7w9").moveToHead,s=i("mkn5").PaneWidget,a=i("fYB8").PaneSeparator,l=i("mNEU"),c=i("1IXQ").PriceAxisWidget,u=i("uPb3").TimeAxisWidget,h=i("fTGZ").BarsMarksContainer,d=i("qJq3").Series,p=i("Kxc7"),f=i("YmeR").ActionBinder,_=i("mKT+").resolveAndShowEditObjectDialog,m=i("Vdly").setValue,y=i("QloM").TabNames,g=i("cdbK").showGoToDateDialog,v=i("/3z9"),b=i("lxNp"),S=i("7nsU").showConfirmInputsDialog,w=i("GVHu").Study,P=i("8sOK").StudyStub,C=i("3ClC").isStudy,x=i("Ss5c").LineDataSource,T=i("CW80"),L=T.isLineToolName,I=T.isLineTool,M=T.isStudyLineTool,O=i("7KDR"),A=O.Action,k=O.Separator,E=(i("L/Ed").ToolboxType,i("mMWL")),D=i("LxhU").Interval,V=i("pPtI"),B=V.setLastUsedResolution,R=V.getDefaultResolution,N=i("n5al"),F=N.isRangeStyle,j=N.getDefaultStyle,W=i("pvsv").showSymbolInfoDialog,z=i("i1o5").InvalidateMask,H=i("i1o5").InvalidationLevel,U=i("nqXy").MouseWheelHelper,Y=i("PT1i").linking,G=i("mYjs").showChangeIntervalDialog,q=i("u5Q5").showDialog,K=i("u5Q5"),Z=K.activateKeyPressHandler,J=(K.setToastsForHotkeyChanges,i("Ocx9").DefaultProperty),X=i("+6ja"),Q=X.availableTimezones,ee=X.timezoneIsAvailable,te=i("0F0w").ChartSession,ie=i("0YCj"),re=i("c2JX").Spinner,ne=i("PC8g").trackEvent,oe=i("Tmoa"),se=i("ikwP").Size,ae=i("wZIs"),le=i("uOxu").getLogger("ChartWidget",{color:"#606"}),ce=i("U0+/").StudyMetaInfoRepository,ue=i("VNzU").isMultipleLayout,he=i("b1GK").addPerfMark,de=i("KnF9").EnvironmentState,pe=i("FQhm"),fe=i("wjVR").ChartWidgetBase,_e=i("EsvI").isStdThemedDefaultValue,me=i("qFKp").CheckMobile.any(),ye=i("ikwP").getCanvasDevicePixelRatio,ge=i("B8p3").setHandler,ve=(Y=i("PT1i").linking,i("YWnQ").permissionDenied),be=window.t("On The Left"),Se=window.t("On The Right"),we=window.t("Move Scale To Left"),Pe=window.t("Move Scale To Right"),Ce=p.enabled("chart_content_overrides_by_defaults");function xe(e,i){fe.call(this,e,i),this._options.timeScaleWidget&&(this._options.timeScaleWidget.pressedMouseMoveScale=this._options.handleScale.axisPressedMouseMove);var n=this;this._startSpinner(this._options.container.value());var o=this._options.content,s=this._options.readOnly;this._backgroundBasedTheme=new t("light"),this._removeMaximizeHotkey=null,n._hotkeys=b.createGroup({desc:"Chart actions",isDisabled:function(){return!n._isActive}});var a=this._options.containsData,l=this._options.onWidget,c=this._options.onCmeWidget;c&&le.logWarn("[ChartWidget] 'onCmeWidget' option is depricated")
+;var u=this._options.widgetCustomer,h=this._options.timezone,d=this._options.hideSymbolSearch,p=this._options.defSymbol,f=D.isValid(this._options.defInterval)?this._options.defInterval:void 0,_=parseInt(this._options.defStyle),m=N.isValidStyle(_)?_:void 0,y=this._options.defExtendedHours,g=this._options.defTimeframe;this._chartWidgetCollection=this._options.chartWidgetCollection||null,this._content=o,this._initialLoading=this._options.initialLoading,this._readOnly=s,this._containsData=a,this._showChartEvents=!a&&this._options.chartEventsEnabled,this._defSymbol=p,this._defInterval=f,this._defTimeframe=g,this._defStyle=m,this._onWidget=!!l,this._compareSymbols=this._options.compareSymbols,this._onWidget&&(c?this._widgetCustomer="cme":u&&(this._widgetCustomer=u)),this._hideSymbolSearch=d,this._frameTime=30,this._model=null,this._metaInfo={},this._drawRafId=0,this._lhsAxesWidth=0,this._rhsAxesWidth=0;var v=this._contentSeriesProperties();v&&(p=v.symbol,f=v.interval),void 0===this._options.useUserChartPreferences&&(this._options.useUserChartPreferences=!0),this._properties=new J("chartproperties",void 0,void 0,this._options.useUserChartPreferences);var S=this._options.useUserChartPreferences?ae.defaults("chartproperties.mainSeriesProperties"):ae.factoryDefaults("chartproperties.mainSeriesProperties");this._properties.mainSeriesProperties.merge(S),f=f||S.interval||"D",N.isValidStyle(m)||(m=N.isValidStyle(S.style)?S.style:j(D.isRange(f))),this._properties.mainSeriesProperties.merge({visible:!0,symbol:p||DEFAULT_SYMBOL,shortName:"",timeframe:"",onWidget:this._onWidget,interval:f,style:m,extendedHours:y,lineStyle:{styleType:ae.factoryDefaults("chartproperties.mainSeriesProperties.lineStyle.styleType")}}),this._containsData&&this._properties.mainSeriesProperties.merge({showCountdown:!1}),h&&ee(h)&&this._properties.timezone.setValue(h),this._tagsChanged=new r,this._modelCreated=new r,this._disconnected=new r,this._reconnectBailout=new r,this._connected=new r,this._redrawPanes=new r,this._onScroll=new r,this.chartWidgetInitialized=new r,this._chartSession=new te(ChartApiInstance),this._metaInfoRepository=new ce(this._chartSession),this.lhsPriceAxisWidthChanged=new r,this.rhsPriceAxisWidthChanged=new r,this._timingsMeter=null,this._isActive=this._options.isActive,this._options.container.subscribe((function(e){n._setElement($(e))}),{callWithLast:!0});var w=function(){n.resize()};this._options.width.subscribe(w),this._options.height.subscribe(w),this._options.visible.subscribe(this._updateTimingsMeterState.bind(this)),this._properties.paneProperties.background.listeners().subscribe(this,this._updateThemedColor),this._aboutToBeDestroyed=new r,this._actions=null,this._definitionsViewModel=null,this._backgroundColorSpawn=null,this._onZoom=new r}inherit(xe,fe),xe.prototype.onZoom=function(){return this._onZoom},xe.prototype.isInitialized=function(){return Boolean(this._inited)},xe.prototype.compareSymbols=function(){return this._compareSymbols},xe.prototype._getChartPropertyDefinitionsViewModel=function(){
if(null===this._definitionsViewModel){var e=this;return new Promise((function(t,r){Promise.all([i.e(21),i.e(54),i.e("general-property-page")]).then(function(n){if(e._isDestroyed)r("Chart widget already destroyed");else{var o=i("5lPo").ChartPropertyDefinitionsViewModel;e.withModel(e,(function(){null===e._definitionsViewModel&&(e._definitionsViewModel=new o(e.model(),e.properties(),e._options)),t(e._definitionsViewModel)}))}}.bind(null,i)).catch(i.oe)}))}return Promise.resolve(this._definitionsViewModel)},xe.prototype._initMaximizeHotkey=function(e){var t=this;function i(e){e.defaultPrevented||v.modifiersFromEvent(e)===v.Modifiers.Alt&&e.stopPropagation()}function r(e){e.defaultPrevented||v.modifiersFromEvent(e)===v.Modifiers.Alt&&(e.preventDefault(),e.stopPropagation(),t.toggleFullscreen())}return e.addEventListener("mousedown",i,!0),e.addEventListener("click",r,!0),function(){e.removeEventListener("mousedown",i,!0),e.removeEventListener("click",r,!0)}},xe.prototype.toggleFullscreen=function(){var e=this.getResizerDetacher();e.fullscreenable.value()&&(e.fullscreen.value()?e.exitFullscreen():e.requestFullscreen())},xe.prototype.backgroundBasedTheme=function(){return this._backgroundBasedTheme.readonly()},xe.prototype._updateThemedColor=function(){var e=this._properties.paneProperties.background.value(),t=oe.getLuminance(e)<.5;this._jqMainDiv.toggleClass("chart-widget--themed-dark",t),this._jqMainDiv.toggleClass("chart-widget--themed-light",!t),this._backgroundBasedTheme.setValue(t?"dark":"light"),_e("chartProperties.paneProperties.background",e,this._backgroundBasedTheme.value())&&(e=null);for(var i=0;i',t),this._elTooltipDiv=t.createElement("div"),this._elTooltipDiv.className="tooltip-wrapper",this._jqMainDiv.append(this._elTooltipDiv),this._elMainTable=t.createElement("table"),this._elMainTable.className="chart-markup-table",this._elMainTable.setAttribute("cellpading","0"),this._elMainTable.setAttribute("cellspacing","0"),this._jqMainDiv.append(this._elMainTable),(this._options.controlBarEnabled||p.enabled("control_bar"))&&Promise.all([i.e(68),i.e(12),i.e("chart-widget-gui")]).then(function(e){if(!this._isDestroyed){this._controlBarNavigation&&this._controlBarNavigation.destroy();var t=i("TGRH").ControlBarNavigation;this._controlBarNavigation=new t(this,this._jqMainDiv[0],this._options.controlBar),this._model&&this.adjustSize()}}.bind(this).bind(null,i)).catch(i.oe),(this._options.handleScale.mouseWheel||this._options.handleScroll.mouseWheel)&&(this._mouseWheelHelper=new U,this._onWheelBound=this._onMousewheel.bind(this),this._jqMainDiv[0].addEventListener("wheel",this._onWheelBound,{passive:!1})),this.resize(),this._justActivated=!1,this.withModel(this,(function(){this._jqParent.append(this._jqMainDiv),this._jqMainDiv.on("mousedown",this._beginRequestActive.bind(this)),this._jqMainDiv.on("mouseup",this._endRequestActive.bind(this)),this._jqMainDiv.on("touchstart",this._beginRequestActive.bind(this)),this._jqMainDiv.on("touchmove",this._endRequestActive.bind(this)),this._jqMainDiv.on("touchend",this._endRequestActive.bind(this)),this._jqParent.on("click",this._requestActive.bind(this))})),this._inited&&(null!==this._timeAxisWidget&&(this._timeAxisWidget.destroy(),this._timeAxisWidget=null),this._paneWidgets.forEach((function(e){e.destroy()})),this._paneWidgets.length=0,this._paneSeparators.forEach((function(e){e.destroy()})),this._paneSeparators.length=0,this._update(z.full()))},xe.prototype._beginRequestActive=function(){var e=!1;this._chartWidgetCollection&&(e=this._chartWidgetCollection.activeChartWidget.value()!==this,this._chartWidgetCollection.activeChartWidget.setValue(this)),e&&(TradingView.isMobile.any()&&this._isLineToolModeExceptBrush()&&this.updateCrossHairPositionIfNeeded(),this._justActivated=!0)},xe.prototype._endRequestActive=function(){var e=this;this._justActivated&&setTimeout((function(){e._justActivated=!1}),0)},xe.prototype._requestActive=function(){this._beginRequestActive(),this._endRequestActive()},xe.prototype.justActivated=function(){return this._justActivated},xe.prototype._onMousewheel=function(e){if(this.model().model().zoomEnabled()&&(TradingView.onWidget()||!parent||parent===window||!parent.IS_DEMO_PAGE)&&this.model()&&!this.noScroll&&!this.model().timeScale().isEmpty()){var t=this._mouseWheelHelper.processWheel(e),i=t.deltaX/100,r=-t.deltaY/100
;if(0!==i&&this._options.handleScroll.mouseWheel||0!==r&&this._options.handleScale.mouseWheel){switch(e.cancelable&&e.preventDefault(),e.deltaMode){case e.DOM_DELTA_PAGE:i*=120,r*=120;break;case e.DOM_DELTA_LINE:i*=32,r*=32}if(0!==r&&this._options.handleScale.mouseWheel){var n=Math.sign(r)*Math.min(1,Math.abs(r)),o=this._jqMainDiv[0].getBoundingClientRect(),s=e.clientX-this._lhsAxesWidth-o.left;if(!Number.isFinite(s)||!Number.isFinite(n))return void le.logWarn("Incorrect mouse wheel processing: scrollPosition: "+s+", zoomScale: "+n);var a=new de(e).control();this.model().model().zoomTime(s,n,!!a||void 0),this._onZoom.fire(a)}0!==i&&this._options.handleScroll.mouseWheel&&this.model().scrollChart(-80*i)}}},xe.prototype.setTimezone=function(e){e&&ee(e)?this._properties.timezone.setValue(e):console.warn("Incorrect timezone: "+JSON.stringify(e))},xe.prototype.getTimezone=function(){return this._properties.timezone.value()},xe.prototype.refreshMarks=function(){this.model().barsMarksSources().forEach((function(e){e.refreshData()}))},xe.prototype.clearMarks=function(){this.model().barsMarksSources().forEach((function(e){e.clearMarks()}))},xe.prototype.metaInfoRepository=function(){return this._metaInfoRepository},xe.prototype._init=function(){var e=this;this.model()&&this.model().mainSeries().clearData(),this.initColors(),this._makeDefaultGui();var t=function(){e._checkObsoleteTimezone(),e._chartSession&&e._chartSession.connected()&&this._model.restart(),this._content&&(this.initColors(),this._updateGui(),this.update()),this._resizeHandler=function(){this.adjustSize(),this._model&&this._model.mainSeries().requestMoreData(),this.paint()}.bind(this),this._resizeHandler(),this._jqParent.append(this._jqMainDiv),this._spinner&&(this._spinner.stop(),delete this._spinner),$(window).on("keydown:chart_"+this._id,(function(e){27===e.which&&e.preventDefault()})),this._initBarsMarksSources(),this._activateSymbolSearchHotkeys(),this.model().timeScale().onScroll().subscribe(this,(function(){this._onScroll.fire()})),this._inited=!0}.bind(this),i=this._makeDefaultModel();void 0===i?t():i.then(t)},xe.prototype._activateSymbolSearchHotkeys=function(){this.readOnly()||this._hideSymbolSearch||Z()},xe.prototype._checkObsoleteTimezone=function(){var e=this._properties.timezone.value();ee(e)||this._properties.timezone.setValue({UTC:"Etc/UTC",EST:"America/New_York",CST:"America/Chicago",PST:"America/Los_Angeles"}[e]||"exchange")},xe.prototype._initBarsMarksSources=function(){var e=this;this.withModel(this,(function(){this.model().barsMarksSources().forEach((function(t){t.onNeedRepaint.subscribe(e,(function(){e.model().model().lightUpdate()}))}))}))},xe.prototype.initColors=function(){this._properties.paneProperties.vertGridProperties.color.listeners().subscribe(this,xe.prototype.redrawPanes),this._properties.paneProperties.horzGridProperties.color.listeners().subscribe(this,xe.prototype.redrawPanes),this._properties.scalesProperties.lineColor.listeners().subscribe(this,xe.prototype.setScaleLineColor),
this._properties.scalesProperties.textColor.listeners().subscribe(this,xe.prototype.setScaleTextColor)},xe.prototype._initBackgroundColor=function(){null===this._backgroundColorSpawn&&(this._backgroundColorSpawn=this._model.model().backgroundColor().spawn(),this._backgroundColorSpawn.subscribe(this.setBackgroundColor.bind(this)))},xe.prototype.paneWidgets=function(){return this._paneWidgets},xe.prototype.paneByCanvas=function(e){for(var t=0;t'),this.$shield=$('').appendTo(this.$element),this.$element.appendTo(t),this._showed=!1,this._cw.withModel(this,this._connectToModel)},xe.LoadingScreen.prototype._connectToModel=function(){this._cw.model().mainSeries().dataEvents().messageReceived().subscribe(this,(function(e){switch(e.method){case"symbol_error":e.params[1]!==ve&&this.hide();break;case"series_error":p.enabled("hide_loading_screen_on_series_error")&&this.hide();break;case"series_completed":this.hide()}}))},xe.LoadingScreen.prototype.show=function(){this._cw._inLoadingState=!0,this._showed||(this._showed=!0,this._show())},xe.LoadingScreen.prototype._show=function(){var e=this._cw.properties().paneProperties.background.value();this.$shield.css("background",e),this.$element.addClass("fade")},xe.LoadingScreen.prototype.hide=function(){delete this._cw._inLoadingState,this._showed&&this._hide()},xe.LoadingScreen.prototype._hide=function(){this._showed=!1,this.$element.removeClass("fade")},xe.LoadingScreen.prototype.$canvas=null,xe.LoadingScreen.prototype.context=null,xe.LoadingScreen.prototype.isShown=function(){return this._showed},xe.prototype.unsetActivePaneWidget=function(){this.activePaneWidget=!1},xe.prototype.setActivePaneWidget=function(e){this.activePaneWidget=e},xe.prototype.toggleMaximizePane=function(e){if(!(this._paneWidgets.length<2)){this._maximizedPaneWidget?(this._maximizedPaneWidget.state().setMaximized(!1),this._maximizedPaneWidget=null,this._paneSeparators.forEach((function(e){e.show()}))):(this._maximizedPaneWidget=e,
this._maximizedPaneWidget.state().setMaximized(!0),this._paneSeparators.forEach((function(e){e.hide()})));for(var t=this._paneWidgets.length;t--;)this._paneWidgets[t].updateControls(),this._paneWidgets[t].updatePriceAxisWidgets();this._timeAxisWidget.updatePriceAxisStubs(),this.adjustSize(),this.updateCrossHairPositionIfNeeded()}},xe.prototype._makePaneWidgetsAndSeparators=function(){for(var e=this._model.panes(),t=e.length,i=this._paneWidgets.length,r=t;r
0){var o=new a(this,r-1,r);this._paneSeparators.push(o),this._timeAxisWidget?$(o.getElement()).insertBefore(this._timeAxisWidget.getElement()):$(o.getElement()).appendTo(this._elMainTable)}this._timeAxisWidget?this._elMainTable.insertBefore(l.getElement(),this._timeAxisWidget.getElement()):this._elMainTable.appendChild(l.getElement())}null!==this._timeAxisSeparator&&this._timeAxisSeparator.destroy(),this._timeAxisSeparator=new a(this,this._paneWidgets.length-1,0,!0),$(this._timeAxisSeparator.getElement()).insertBefore(this._timeAxisWidget.getElement());for(r=0;r0;)for(var t=this._content.panes[e].sources,i=t.length;i-- >0;)if("MainSeries"===t[i].type)return t[i].state},xe.prototype.updateUndoRedo=function(){this._model&&(this.actions().undo.update({disabled:this._model.undoHistory().undoStack().isEmpty()}),this.actions().redo.update({disabled:this._model.undoHistory().redoStack().isEmpty()}))},xe.prototype.createSessionBreaksActions=function(e){var t=new A({label:window.t("Session Breaks"),checkable:!0,statName:"ToggleSessionBreaks"});t.binder=new f(t,this._model.chartModel().sessions().properties().graphics.vertlines.sessBreaks.visible,this.model(),"Session Breaks"),this._actions.sessionBreaks=t},xe.prototype.updateActionForIntradayOnly=function(e){!e||!e instanceof A||e.update({disabled:this.model().mainSeries().isDWM()})},xe.prototype.withModel=function(e,t){this.model()?t.call(e):this.modelCreated().subscribe(e,t,!0)},xe.prototype.containsVolume=function(){return this.model().dataSources().some((function(e){return e instanceof w&&"Volume"===e.metaInfo().shortId}))},xe.prototype.containsStudyByPredicate=function(e){return!!this._model&&this._model.dataSources().some((function(t){if(!(t instanceof w))return!1;var i=t.metaInfo();return e(i)}))},xe.prototype.containsStudy=function(e){return this.containsStudyByPredicate((function(t){return t.id===e||t.fullId===e}))},xe.prototype.isSmall=function(){return this._width()<550||this._height()<300},xe.prototype.onWidget=function(){return this._onWidget},xe.prototype.onCmeWidget=function(){return"cme"===this.widgetCustomer()},xe.prototype.widgetCustomer=function(){return this._widgetCustomer},xe.prototype._width=function(){return this._options.width.value()},xe.prototype._height=function(){return this._options.height.value()},xe.prototype.resize=function(){var e={height:this._height()+"px",width:this._width()+"px"};this._jqMainDiv.css(e),this._elMainTable.style.height=e.height,
this._elMainTable.style.width=e.width,this._resizeHandler&&this._jqMainDiv&&this._resizeHandler()},xe.prototype.chartSession=function(){return this._chartSession},xe.prototype.maxLhsPriceAxisWidth=0,xe.prototype.maxRhsPriceAxisWidth=0,xe.prototype.GUIResetScales=function(){ne("GUI","Reset Scales");var e=this.model();e&&e.resetScales()},xe.prototype.onLineCancelled=function(){E.resetToCursor()},xe.prototype._startSpinner=function(e){this._spinner||e&&(this._spinner=(new re).spin(e))},xe.prototype.isJustClonedChart=function(){return!!(this._options||{}).justCloned},xe.prototype.setDataWindowWidget=function(e){this._dataWindowWidget=e},xe.prototype.removeDataWindowWidget=function(){this._dataWindowWidget=null},p.enabled("datasource_copypaste")&&(xe.prototype.onAppClipboardPaste=function(e){le.logDebug("[[paste]]"),this._model&&this._model.pasteSourceFromClip(e)},xe.prototype.onAppClipboardCopy=function(e){e||(e=this._model.selection().sources()),e.filter((function(e){return e instanceof w&&e.isChildStudy()})).length?le.logDebug("Can not copy child study"):(le.logDebug("[[copy]]"),this._model&&this._model.copySourcesToClip(e))},xe.prototype.onAppClipboardCut=function(e){le.logDebug("[[cut]]"),this._model&&this._model.cutSourcesToClip(e||this._model.selection().sources())}),xe.prototype.applyOverrides=function(e){var t={};for(var i in e)i.startsWith("mainSeriesProperties.priceAxisProperties")||(t[i]=e[i]);applyPropertiesOverrides(this.properties(),null,!1,t,null),this._model&&(applyPropertiesOverrides(this._model.model().properties(),null,!1,t),applyPropertiesOverrides(this._model.mainSeries().properties(),null,!1,t,"mainSeriesProperties"))},xe.prototype.applyStudiesOverrides=function(e){ie.setDefaultsOverrides(e),this._applyStudiesOverrides()},xe.prototype.setActive=function(e){this._isActive=e,me&&(e&&this.selectBarMode().value()?this.startTrackingMode():this.exitTrackingMode()),this._paneWidgets.forEach((function(e){e.update()})),e||this.model().selectionMacro((function(e){e.clearSelection()}))},xe.prototype.isActive=function(){return this._isActive},xe.prototype.trackTime=function(){return this._chartWidgetCollection.lock.trackTime},xe.prototype.crossHairSyncEnabled=function(){return this._chartWidgetCollection.lock.crosshair.value()},xe.prototype.isMultipleLayout=function(){return ue(this._chartWidgetCollection.layout.value())},xe.prototype.selectBarMode=function(){return this._model.model().selectBarMode()},xe.prototype.toggleSelectBarMode=function(){this.selectBarMode().value()||(E.resetToCursor(!0),this._model.lineBeingCreated()&&this._model.cancelCreatingLine()),this._model.model().toggleSelectBarMode(),this.selectBarMode().value()&&this.startTrackingMode()},xe.prototype.startTrackingMode=function(){if(me){this.exitTrackingMode(),this.updateCrossHairPositionIfNeeded();var e=this._maximizedPaneWidget||this._paneWidgets[0],t=this._model.model().crossHairSource().currentPoint();e.startTrackingMode(t,t,new de)}},xe.prototype.onBarSelected=function(){return this._model.model().onBarSelected()},
-xe.prototype.trySetChartStyle=function(e){var t=this.model();return!!t&&(t.mainSeries().properties().style.value()===e||!!p.enabled("charting_library_base")&&(this._setChartStyle(e),!0))},xe.prototype._setChartStyle=function(e){var t=this.model(),i=t.mainSeries().properties().style;t.setChartStyleProperty(i,e,"Change Series Style")},xe.prototype.showReplayOrderConfirmationDialog=function(){if(!this.model().isInReplay())return Promise.resolve()},xe.prototype._addPerfMark=function(e){he("ChartWidget."+this._id+"."+e)},xe.prototype.requestFullscreen=function(){this._options.requestFullscreen()},xe.prototype.getResizerDetacher=function(){return this._options},e.exports.ChartWidget=xe,e.exports.trackingModeIsAvailable=me}).call(this,i("hY0g"),i("aIyQ"))},"Zp/P":function(e,t,i){"use strict";i.r(t),i.d(t,"extendAndClipLineSegment",(function(){return c})),i.d(t,"getArrowPoints",(function(){return u})),i.d(t,"optimalBarWidth",(function(){return h})),i.d(t,"optimalCandlestickWidth",(function(){return d})),i.d(t,"optimalHiLoWidth",(function(){return p})),i.d(t,"selectionTolerance",(function(){return f})),i.d(t,"coordinateIsValid",(function(){return _})),i.d(t,"setValidLineStyle",(function(){return m}));var r=i("aO4+"),n=i("hBTJ"),o=i("qFKp"),s=i("ogJP"),a=i("jFln"),l=o.CheckMobile.any()?12:2;function c(e,t,i,o,s,a){if(Object(r.equalPoints)(e,t))return null;var l=new r.Point(0,0),c=new r.Point(i,o);if(s){if(a){var u=Object(n.intersectLineAndBox)(Object(r.lineThroughPoints)(e,t),Object(r.box)(l,c));return Array.isArray(u)?u:null}var h;return null===(h=Object(n.intersectRayAndBox)(t,e,Object(r.box)(l,c)))||Object(r.equalPoints)(t,h)?null:Object(r.lineSegment)(t,h)}if(a)return null===(h=Object(n.intersectRayAndBox)(e,t,Object(r.box)(l,c)))||Object(r.equalPoints)(e,h)?null:Object(r.lineSegment)(e,h);u=Object(n.intersectLineSegmentAndBox)(Object(r.lineSegment)(e,t),Object(r.box)(l,c));return Array.isArray(u)?u:null}function u(e,t,i,r){var n=.5*i,o=Math.sqrt(2),s=t.subtract(e),a=s.normalized(),l=5*i;r&&(l=Math.min(l,.35*s.length()));var c=1*n;if(l*o*.2<=c)return[];var u=a.scaled(l),h=t.subtract(u),d=a.transposed(),p=1*l,f=d.scaled(p),_=h.add(f),m=h.subtract(f),y=_.subtract(t).normalized().scaled(c),g=m.subtract(t).normalized().scaled(c),v=t.add(y),S=t.add(g),b=n*(o-1),w=d.scaled(b),P=Math.min(l-1*n/o,n*o*1),C=a.scaled(P),x=t.subtract(w),T=t.add(w),L=t.subtract(C);return[[_,v],[m,S],[x,L.subtract(w)],[T,L.add(w)]]}function h(e,t){return t=t||1,Math.floor(.3*e*t)}function d(e,t){if(e>=2.5&&e<=4)return Math.floor(3*t);var i=1-.2*Math.atan(Math.max(4,e)-4)/(.5*Math.PI),r=Math.floor(e*i*t),n=Math.floor(e*t),o=Math.min(r,n);return Math.max(Math.floor(t),o)}function p(e){return.4*e}function f(e){return l+.5*e}function _(e){return null!=e&&!Object(s.isNaN)(e)}function m(e,t){void 0!==t&&Object(a.setLineStyle)(e,t)}},Zp8I:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererStepLine",(function(){return c}));var r=i("GEp6"),n=i("VdBB"),o=i("aO4+"),s=i("jFln"),a=i("Y7w9"),l=i("Zp/P"),c=function(){function e(){this._data=null}
-return e.prototype.setData=function(e){this._data=e},e.prototype.hitTest=function(e){if(null===this._data||0===this._data.items.length)return null;for(var t=this._data,i=t.items,s=t.lineWidth,c=Object(l.selectionTolerance)(s),u=Object(a.lowerbound)(i,e,(function(e,t){return e.x<=t.x})),h=Math.max(0,u-1),d=Math.min(i.length-1,u+1),p=h;p=2.5&&e<=4)return Math.floor(3*t);var i=1-.2*Math.atan(Math.max(4,e)-4)/(.5*Math.PI),r=Math.floor(e*i*t),n=Math.floor(e*t),o=Math.min(r,n);return Math.max(Math.floor(t),o)}function p(e){return.4*e}function f(e){return l+.5*e}function _(e){return null!=e&&!Object(s.isNaN)(e)}function m(e,t){void 0!==t&&Object(a.setLineStyle)(e,t)}},Zp8I:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererStepLine",(function(){return c}));var r=i("GEp6"),n=i("VdBB"),o=i("aO4+"),s=i("jFln"),a=i("Y7w9"),l=i("Zp/P"),c=function(){function e(){this._data=null}
+return e.prototype.setData=function(e){this._data=e},e.prototype.hitTest=function(e){if(null===this._data||0===this._data.items.length)return null;for(var t=this._data,i=t.items,s=t.lineWidth,c=Object(l.selectionTolerance)(s),u=Object(a.lowerbound)(i,e,(function(e,t){return e.x<=t.x})),h=Math.max(0,u-1),d=Math.min(i.length-1,u+1),p=h;p=3},inherit(u,r),u.version=2,u.LevelsCount=24,u.prototype.levelsCount=function(){return u.LevelsCount},u.prototype.stop=function(){r.prototype.stop.call(this),this._model._trendBasedFibExtensionLabelsCache.removeSource(this.id())},u.prototype.pointsCount=function(){return 3},u.prototype.translatedType=function(){return l},u.prototype.name=function(){return"Trend-Based Fib Extension"},u.prototype.migrateVersion=function(e,t,i){1===e&&this.properties().extendLines.setValue(!0)},u.prototype.processErase=function(e,t){var i="level"+t,r=this.properties()[i].visible;e.setProperty(r,!1,"Erase level line")},u.prototype.getStylesPropertyPage=function(){return s.LineToolTrendBasedFibExtensionStylesPropertyPage},u.createProperties=function(e){var t=new n("linetooltrendbasedfibextension",e,!1,{range:[0,8]});return u._configureProperties(t),t},u.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("17v9").FibDrawingsWith24LevelsDefinitionsViewModel}.bind(null,i)).catch(i.oe)},u._configureProperties=function(e){r._configureProperties(e)},u.prototype.fibLevelsBasedOnLogScale=function(){return this.properties().fibLevelsBasedOnLogScale.value()&&this.priceScale().isLog()},t.LineToolTrendBasedFibExtension=u},"Zy3/":function(e,t,i){"use strict";i.r(t),i.d(t,"CompositeRenderer",(function(){return r}));var r=function(){function e(){this._renderers=[],this._globalAlpha=1}return e.prototype.setGlobalAlpha=function(e){this._globalAlpha=e},e.prototype.append=function(e){this._renderers.push(e)},e.prototype.insert=function(e,t){this._renderers.splice(t,0,e)},e.prototype.clear=function(){this._renderers.length=0},e.prototype.draw=function(e,t){for(var i=0;i=0;r--){var n=this._renderers[r].hitTest(e,t);null!==n&&(null===i||n.result()>i.result())&&(i=n)}return i},e.prototype.doesIntersectWithBox=function(e){return this._renderers.some((function(t){return!!t.doesIntersectWithBox&&t.doesIntersectWithBox(e)}))},e}()},a7Ha:function(e,t,i){"use strict";var r;i.r(t),i.d(t,"LineEnd",(function(){return r})),function(e){e[e.Normal=0]="Normal",e[e.Arrow=1]="Arrow",e[e.Circle=2]="Circle"}(r||(r={}))},a9Kt:function(e,t){
e.exports=''},aDyP:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("5rJj"),o=i("7KDR").Action,s=i("hayr").propertyPages,a=i("rCHB").LineToolPitchforkStyle,l=null,c=i("ytGH").LineToolWidthsProperty,u=window.t("Pitchfork");function h(e,t){this._constructor="LineToolPitchfork";var i=t||h.createProperties();r.call(this,e,i),this._properties.style.listeners().subscribe(this,h.prototype._recreatePaneView),this._recreatePaneView();for(var n=[this._properties.child("median").child("linewidth")],o=0;o<=h.LevelsCount;o++)n.push(this._properties.child("level"+o).child("linewidth"));this._widthsProperty=new c(n)}inherit(h,r),h.LevelsCount=8,h.prototype.levelsCount=function(){return h.LevelsCount},h.prototype.additionalActions=function(){for(var e=[],t=["Original","Modified Schiff","Inside","Schiff"],i=0;i<4;i++){var r=new o({checked:this.properties().style.value()===i,checkable:!0,label:window.t(t[i]),payload:{target:this,value:i},onExecute:function(e){var t=e.getPayload(),i=t.target,r=t.value;i.properties().style.setValue(r),i.updateAllViews(),i._model.updateSource(i)}});e.push(r)}return[e[0],e[3],e[1],e[2]]},h.prototype._recreatePaneView=function(){if(null!==l){var e=[];this._properties.style.value()===a.Original?e=[new l.PitchforkLinePaneView(this,this._model)]:this._properties.style.value()===a.Schiff?e=[new l.SchiffPitchforkLinePaneView(this,this._model)]:this._properties.style.value()===a.Schiff2?e=[new l.SchiffPitchfork2LinePaneView(this,this._model)]:this._properties.style.value()===a.Inside&&(e=[new l.InsidePitchforkLinePaneView(this,this._model)]),this._setPaneViews(e)}else i.e("lt-pane-views").then(function(e){null===l&&(l=i("cT+B")),this._recreatePaneView()}.bind(this).bind(null,i)).catch(i.oe)},h.prototype.pointsCount=function(){return 3},h.prototype.translatedType=function(){return u},h.prototype.name=function(){return"Pitchfork"},h.prototype.processErase=function(e,t){var i="level"+t,r=this.properties()[i].visible;e.setProperty(r,!1,"Erase level line")},h.prototype.getStylesPropertyPage=function(){return s.LineToolPitchforkStylesPropertyPage},h.createProperties=function(e){var t=new n("linetoolpitchfork",e,!1,{range:[0,8]});return h._configureProperties(t),t},h.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("HCdA").PitchForkDefinitionsViewModel}.bind(null,i)).catch(i.oe)},h._configureProperties=function(e){r._configureProperties(e)},t.LineToolPitchfork=h},aILO:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("Ocx9").DefaultProperty,o=i("hayr").propertyPages,s=window.t("Head and Shoulders");function a(e,t){
this._constructor="LineToolHeadAndShoulders";var n=t||a.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("Fx2Q").LineToolHeadAndShouldersPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,r),a.prototype.pointsCount=function(){return 7},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Head and Shoulders"},a.prototype.getStylesPropertyPage=function(){return o.LineToolLineTool5PointsPatternStylesPropertyPage},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("EFc4").Points5PatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetoolheadandshoulders",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolHeadAndShoulders=a},aIha:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolFlagMark",(function(){return c}));var r=i("mrSG"),n=i("aO4+"),o=i("YFKU"),s=i("Ss5c"),a=i("Ocx9"),l=Object(o.t)("Flag Mark"),c=function(e){function t(r,o){var s=this,a=o||t.createProperties();return(s=e.call(this,r,a)||this)._constructor="LineToolFlagMark",i.e("lt-pane-views").then(function(e){var t=new(0,i("y/56").FlagMarkPaneView)(s,s.model());t.setAnchors(new n.Point(0,0)),s._setPaneViews([t])}.bind(null,i)).catch(void 0),s}return Object(r.__extends)(t,e),t.prototype.pointsCount=function(){return 1},t.prototype.translatedType=function(){return l},t.prototype.name=function(){return"Flag Mark"},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.createProperties=function(e){e&&void 0===e.flagColor&&(e.flagColor="#318757");var i=new a.DefaultProperty("linetoolflagmark",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"w/mY")).then((function(e){return e.FlagMarkDefinitionsViewModel}))},t.version=2,t}(s.LineDataSource)},aIyQ:function(e,t,i){"use strict";(function(e){i("uOxu").getLogger("Common.Delegate");function t(){this._listeners=[]}function r(e){return!e.singleshot}t.prototype.subscribe=function(e,t,i){var r={object:e,member:t,singleshot:!!i};this._listeners.push(r)},t.prototype.unsubscribe=function(e,t){for(var i=0;i=0;--t){this._listeners[t].object===e&&this._listeners.splice(t,1)}},t.prototype.destroy=function(){delete this._listeners},t.prototype.fire=function(){var e=this._listeners;this._listeners=this._listeners.filter(r);for(var t=e.length,i=0;i=0;e--)this._subcommands[e].undo()},t.prototype.commands=function(){return this._subcommands},t}(i("RDU5").UndoCommand)},bSeV:function(e,t){},bTqm:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("Ocx9").DefaultProperty,o=i("NJRZ").LineTool5PointsPattern,s=window.t("Cypher Pattern");function a(e,t){this._constructor="LineToolCypherPattern";var n=t||a.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("mjK7").CypherPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,o),a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Cypher Pattern"},a.createProperties=function(e){var t=new n("linetoolcypherpattern",e);return a._configureProperties(t),t},a._configureProperties=function(e){o._configureProperties(e)},t.LineToolCypherPattern=a},bc0y:function(e,t,i){},beCu:function(e,t,i){"use strict";i.r(t),i.d(t,"doAnimate",(function(){return s}));var r=i("mrSG");var n={from:0,duration:250,easing:i("j1f4").easingFunc.easeOutCubic},o=function(){function e(e){var t=this;this._doing=!0,
this._options=Object(r.__assign)(Object(r.__assign)({},n),e);var i=performance.now();window.requestAnimationFrame((function(e){t._animation(i,t._options.from,e)}))}return e.prototype.stop=function(){this._doing=!1},e.prototype._animation=function(e,t,i){var r=this;if(this._doing){var n,o,s,a=(i=!i||i<1e12?performance.now():i)-e,l=a>=this._options.duration||t===this._options.to,c=(n=this._options.from,o=this._options.to,s=this._options.easing(a/this._options.duration),n*(1-s)+o*s),u=l?this._options.to:c,h=u-t;this._options.onStep(h,u),l?this._finishAnimation():window.requestAnimationFrame((function(t){r._animation(e,u,t)}))}else this._finishAnimation()},e.prototype._finishAnimation=function(){this._options.onComplete&&this._options.onComplete()},e}();function s(e){return new o(e)}},biIa:function(e,t,i){"use strict";i.r(t),i.d(t,"SeriesWaterlinePaneView",(function(){return l}));var r=i("mrSG"),n=i("k4w6"),o=i("//lt"),s=i("VdBB"),a=i("8Uy/"),l=function(e){function t(t){var i=e.call(this,t)||this,r={cursorType:o.PaneCursorType.VerticalResize,pressedMouseMoveHandler:function(e){var i=t.priceScale(),r=t.properties().baselineStyle,n=i.height(),o=100-e.y/n*100,s=o<0?0:Math.round(10*o)/10;r.baseLevelPercentage.setValue(Math.max(Math.min(s,100),0))}};return i._lineRenderer.setHitTest(new s.HitTestResult(s.HitTestResult.CUSTOM_MOVE,r)),i._lineRendererData.visible=!0,i._lineRendererData.linestyle=a.LINESTYLE_SPARSE_DOTTED,i}return Object(r.__extends)(t,e),t.prototype._updateImpl=function(){var e=this._series.properties().baselineStyle,t=Math.abs(100-e.baseLevelPercentage.value());this._lineRendererData.y=Math.round(this._series.priceScale().height()*(t/100)),this._lineRendererData.color=e.baselineColor.value()},t}(n.a)},brCa:function(e,t,i){"use strict";i.r(t),i.d(t,"createNoticeDialog",(function(){return o})),i.d(t,"showNoticeDialog",(function(){return s}));var r=i("mrSG"),n=(i("YFKU"),{width:400,destroyOnClose:!0,title:window.t("Notification"),content:window.t("You are notified"),contentWrapTemplate:'',actionsWrapTemplate:'',actions:[{name:"ok",type:"primary",text:window.t("Ok"),method:"close",key:[13,32]}]});function o(e){return new Promise((function(t){Promise.all([i.e("dialogs-core"),i.e(55),i.e(10),i.e(14),i.e("create-dialog")]).then(function(o){var s=i("YDhE").createDialog;t(s(Object(r.__assign)(Object(r.__assign)({},n),e)))}.bind(null,i)).catch(void 0)}))}function s(e){o(e).then((function(e){return e.open()}))}},"bv/X":function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("Ocx9").DefaultProperty,o=i("hayr").propertyPages,s=window.t("Sine Line");function a(e,t){this._constructor="LineToolSineLine";var n=t||a.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("piZW").SineLinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,r),
a.prototype.pointsCount=function(){return 2},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Sine Line"},a.prototype.getStylesPropertyPage=function(){return o.LineToolTimeCyclesPropertyPage},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("LX4V").CyclicAndSineLinesPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetoolsineline",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolSineLine=a},c2JX:function(e,t,i){"use strict";i.r(t),i.d(t,"renderSpinnerTemplate",(function(){return o})),i.d(t,"Spinner",(function(){return a}));i("SzKR");var r=i("TzTt"),n=i("Owlf");function o(e){return void 0===e&&(e=""),'\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\x3c!--\n\t\t\t\t--\x3e
\n\t\t\t
\n\t\t
\n\t'}var s=Object(r.b)(o()),a=function(){function e(e){this._shown=!1,this._el=s.cloneNode(!0),this.setSize(e||n.a)}return e.prototype.spin=function(e){return this._el.classList.add("tv-spinner--shown"),void 0===this._container&&(this._container=e,void 0!==e&&e.appendChild(this._el)),this._shown=!0,this},e.prototype.stop=function(e){return e&&void 0!==this._container&&this._container.removeChild(this._el),this._el.classList.remove("tv-spinner--shown"),this._shown=!1,this},e.prototype.setStyle=function(e){var t=this;return Object.keys(e).forEach((function(i){var r=e[i];void 0!==r&&t._el.style.setProperty(i,r)})),this},e.prototype.setSize=function(e){var t=void 0!==e?"tv-spinner--size_"+e:"";return this._el.className="tv-spinner "+t+" "+(this._shown?"tv-spinner--shown":""),this},e.prototype.getEl=function(){return this._el},e.prototype.destroy=function(){this.stop(),delete this._el,delete this._container},e}()},cBZt:function(e,t,i){"use strict";function r(e,t){return e+"@"+t}function n(e){return e.replace(/(@[^-]+-[^-]+).*$/,"$1")}i.r(t),i.d(t,"studyIdString",(function(){return r})),i.d(t,"extractStudyId",(function(){return n}))},cKqi:function(e,t,i){"use strict";(function(e){
-var r=i("aO4+").Point,n=i("qJq3").Series,o=i("GVHu").Study,s=i("k9/m").PlotRowSearchMode,a=i("FBsw").OverlayPriceAxisView,l=i("KtbP").PanePriceAxisView,c=i("x0JF"),u=c.SeriesAreaPaneView,h=c.SeriesLinePaneView,d=c.SeriesHollowCandlesPaneView,p=c.SeriesCandlesPaneView,f=c.SeriesBarsPaneView,_=c.SeriesBaselinePaneView,m=i("biIa").SeriesWaterlinePaneView,y=i("i3nr").OverlayStatusView,g=i("JjUe").OverlayDataWindowView,v=i("z8/4").OverlayLegendView,S=i("38az").SeriesBarColorer,b=i("l4sv").HorizontalLineRenderer,w=i("hayr").propertyPages,P=i("Kxc7"),C=i("6sst").OverlayStudyPriceLineAxisView,x=i("Qb4w").PriceRange,T=i("XPit").barFunction,L=i("XPit").seriesPlotFunctionMap,I=i("k9/m").PlotList,M=i("n5al").createSeriesFormatter,O=i("n5al").seriesCurrency,A=i("n5al").extractSymbolNameFromSymbolInfo,k=i("wOSo").QuotesProvider,E=i("qFKp").CheckMobile.any()&&!1,D=!P.enabled("hide_study_overlay_legend_item"),V=P.enabled("uppercase_instrument_names"),B=i("uOxu").getLogger("Chart.StudyOverlay"),R=P.enabled("study_overlay_compare_legend_option");function N(e,t){this._source=e,this._model=t,this._points=[new r(0,0)],this._lineRenderer=new b}function F(e,t){return null==e[t]}function j(t,i,r,n){this._waterlineView=null,i.hasChild("currencyId")||i.addChild("currencyId",new e(null)),o.call(this,t,i,r,n),this.m_data=new I(L(),F),this._formatter=null,this._paneView=null;var s=this;this.properties().minTick.listeners().subscribe(null,(function(){s._recreatePriceFormattingDependencies(),s.updateAllViews(),s._model.fullUpdate()})),this.properties().style.listeners().subscribe(this,this._updateBarFunction),this.properties().lineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().areaStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().baselineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().currencyId.subscribe(this,this._onCurrencyChanged),this._updateBarFunction(),this._quotesProvider=new k,E&&this._quotesProvider.quotesUpdate().subscribe(this,this._onQuotesUpdate)}N.prototype.update=function(){if(this._visible=!1,this._source.properties().showPriceLine.value()){var e=this._source.lastValueData(void 0,!0);e.noData||(this._visible=!0,this._points=[new r(0,e.coordinate)],this._color=e.color)}},N.prototype.renderer=function(){var e={};return e.width=this._model.timeScale().width(),e.height=this._source.priceScale().height(),e.y=this._points[0].y,e.color=this._color,e.linewidth=1,e.linestyle=CanvasEx.LINESTYLE_DOTTED,e.visible=this._visible,this._lineRenderer.setData(e),this._lineRenderer},inherit(j,o),j.prototype._showLastValueOnPriceScale=function(){return this._model.properties().scalesProperties.showSeriesLastValue.value()},j.prototype.symbol=function(){var e,t=this.properties().inputs.symbol.value(),i=this.symbolInfo();return e=i?i.name:t,V?e.toUpperCase():e},j.prototype.currency=function(){return this._properties.currencyId.value()||null},j.prototype.setCurrency=function(e){this._properties.currencyId.setValue(e)},
+var r=i("aO4+").Point,n=i("qJq3").Series,o=i("GVHu").Study,s=i("k9/m").PlotRowSearchMode,a=i("FBsw").OverlayPriceAxisView,l=i("KtbP").PanePriceAxisView,c=i("x0JF"),u=c.SeriesAreaPaneView,h=c.SeriesLinePaneView,d=c.SeriesHollowCandlesPaneView,p=c.SeriesCandlesPaneView,f=c.SeriesBarsPaneView,_=c.SeriesBaselinePaneView,m=i("biIa").SeriesWaterlinePaneView,y=i("i3nr").OverlayStatusView,g=i("JjUe").OverlayDataWindowView,v=i("z8/4").OverlayLegendView,b=i("38az").SeriesBarColorer,S=i("l4sv").HorizontalLineRenderer,w=i("hayr").propertyPages,P=i("Kxc7"),C=i("6sst").OverlayStudyPriceLineAxisView,x=i("Qb4w").PriceRange,T=i("XPit").barFunction,L=i("XPit").seriesPlotFunctionMap,I=i("k9/m").PlotList,M=i("n5al").createSeriesFormatter,O=i("n5al").seriesCurrency,A=i("n5al").extractSymbolNameFromSymbolInfo,k=i("wOSo").QuotesProvider,E=i("qFKp").CheckMobile.any()&&!1,D=!P.enabled("hide_study_overlay_legend_item"),V=P.enabled("uppercase_instrument_names"),B=i("uOxu").getLogger("Chart.StudyOverlay"),R=P.enabled("study_overlay_compare_legend_option");function N(e,t){this._source=e,this._model=t,this._points=[new r(0,0)],this._lineRenderer=new S}function F(e,t){return null==e[t]}function j(t,i,r,n){this._waterlineView=null,i.hasChild("currencyId")||i.addChild("currencyId",new e(null)),o.call(this,t,i,r,n),this.m_data=new I(L(),F),this._formatter=null,this._paneView=null;var s=this;this.properties().minTick.listeners().subscribe(null,(function(){s._recreatePriceFormattingDependencies(),s.updateAllViews(),s._model.fullUpdate()})),this.properties().style.listeners().subscribe(this,this._updateBarFunction),this.properties().lineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().areaStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().baselineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().currencyId.subscribe(this,this._onCurrencyChanged),this._updateBarFunction(),this._quotesProvider=new k,E&&this._quotesProvider.quotesUpdate().subscribe(this,this._onQuotesUpdate)}N.prototype.update=function(){if(this._visible=!1,this._source.properties().showPriceLine.value()){var e=this._source.lastValueData(void 0,!0);e.noData||(this._visible=!0,this._points=[new r(0,e.coordinate)],this._color=e.color)}},N.prototype.renderer=function(){var e={};return e.width=this._model.timeScale().width(),e.height=this._source.priceScale().height(),e.y=this._points[0].y,e.color=this._color,e.linewidth=1,e.linestyle=CanvasEx.LINESTYLE_DOTTED,e.visible=this._visible,this._lineRenderer.setData(e),this._lineRenderer},inherit(j,o),j.prototype._showLastValueOnPriceScale=function(){return this._model.properties().scalesProperties.showSeriesLastValue.value()},j.prototype.symbol=function(){var e,t=this.properties().inputs.symbol.value(),i=this.symbolInfo();return e=i?i.name:t,V?e.toUpperCase():e},j.prototype.currency=function(){return this._properties.currencyId.value()||null},j.prototype.setCurrency=function(e){this._properties.currencyId.setValue(e)},
j.prototype.symbolSource=function(){return this},j.prototype.lastValueData=function(e,t,i){var r={noData:!0};if(this._model.timeScale().isEmpty()||null==this.priceScale()||this.priceScale().isEmpty()||this.data().isEmpty())return r;var o=this._model.timeScale().visibleBarsStrictRange();if(null===o)return r;if(!this.properties().visible.value())return r;var a=this.nearestIndex(o.lastBar(),s.NearestLeft,TradingView.OPEN_PLOT);if(null==a)return r;var l=this._lastNonEmptyPlotRow(TradingView.CLOSE_PLOT),c=null!==l&&o.contains(l.index),u=null!==l?l.value:null,h=t||c?u:this.data().valueAt(a);if(null===h)return r;var d=this._barFunction(h);if(!isNumber(d))return r;var p={noData:!1};i&&(p.price=d);var f=this.firstValue();if(!isNumber(f))return r;p.text=this.priceScale().formatPrice(d,f),p.text=this.priceScale().formatPrice(d,f),p.formattedPriceAbsolute=this.priceScale().formatPriceAbsolute(d),p.formattedPricePercentage=this.priceScale().formatPricePercentage(d,f),p.floatCoordinate=this.priceScale().priceToCoordinate(d,f),p.coordinate=p.floatCoordinate,p.item=h;var _=this.properties();switch(_.style.value()){case n.STYLE_BARS:p.color=h[TradingView.OPEN_PLOT]<=h[TradingView.CLOSE_PLOT]?_.barStyle.upColor.value():_.barStyle.downColor.value();break;case n.STYLE_CANDLES:case n.STYLE_HOLLOW_CANDLES:p.color=h[TradingView.OPEN_PLOT]<=h[TradingView.CLOSE_PLOT]?_.candleStyle.upColor.value():_.candleStyle.downColor.value();break;case n.STYLE_LINE:p.color=_.lineStyle.color.value();break;case n.STYLE_AREA:p.color=_.areaStyle.color1.value();break;case n.STYLE_BASELINE:var m=_.baselineStyle,y=this.priceScale(),g=Math.round(y.height()*(Math.abs(100-m.baseLevelPercentage.value())/100));p.color=p.coordinate
0),o?{left:0,right:1,totallySlots:i}:{left:1,right:0,totallySlots:i}}return{left:e,right:t,totallySlots:e+t}},he.prototype.startScalePrice=function(e,t,i){e.startScalePrice(t,i)},he.prototype.scalePriceTo=function(e,t,i){e.scalePriceTo(t,i),this.mainSeries().priceScale().isLockScale()?this.lightUpdate():this.invalidate(this._paneInvalidationMask(e,T.Light)),this._setScalesResetAvailable(!0)},he.prototype.endScalePrice=function(e,t){e.endScalePrice(t),this.invalidate(this._paneInvalidationMask(e,T.Light))},he.prototype.startScrollPrice=function(e,t,i){e.startScrollPrice(t,i)},he.prototype.scrollPriceTo=function(e,t,i){e.scrollPriceTo(t,i),this.invalidate(this._paneInvalidationMask(e,T.Light))},he.prototype.endScrollPrice=function(e,t){e.endScrollPrice(t),this.invalidate(this._paneInvalidationMask(e,T.Light))},he.prototype.setPriceAutoScale=function(e,t,i){e.setPriceAutoScale(t,i),this.invalidate(this._paneInvalidationMask(e,T.Light))},he.prototype.restorePriceScaleState=function(e,t,i){e.restorePriceScaleState(t,i),this.invalidate(this._paneInvalidationMask(e,T.Light))},he.prototype.resetPriceScale=function(e,t){this._setScalesResetAvailable(!1),e.resetPriceScale(t),this.invalidate(this._paneInvalidationMask(e,T.Light))},he.prototype.updateScales=function(e,t){this._undoModel._chartWidget._updateScalesActions()},he.prototype.startScaleTime=function(e){this._timeScale.startScale(e)},he.prototype.mainSeriesScaleRatioProperty=function(){return this._mainSeriesScaleRatioProperty},he.prototype.mainSeriesScaleRatioPropertyOnChanged=function(){this._mainSeriesScaleRatioProperty.listeners().fire(this._mainSeriesScaleRatioProperty)},he.prototype.mainSeriesScaleRatio=function(){return q(this._timeScale,this.m_mainSeries.priceScale())},
he.prototype.setMainSeriesScaleRatio=function(e){this.paneForSource(this.m_mainSeries).applyPriceScaleRatio(this.m_mainSeries.priceScale(),e)},he.prototype.scaleTimeTo=function(e){this._timeScale.scaleTo(e),this.recalculateAllPanes(),this.lightUpdate(),this._setScalesResetAvailable(!0)},he.prototype.endScaleTime=function(){this._timeScale.endScale(),this.lightUpdate(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudy(this.dataSources())},he.prototype.startScrollTime=function(e){this._timeScale.startScroll(e),this._isTimeScrolling=!0},he.prototype.scrollTimeTo=function(e){this._timeScale.scrollTo(e),this.recalculateAllPanes(),this.updateCrossHair(),this.lightUpdate(),this._setScalesResetAvailable(!0)},he.prototype.endScrollTime=function(){this._timeScale.endScroll(),this.lightUpdate(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudy(this.dataSources()),this._isTimeScrolling=!1},he.prototype.recalcStudyBasedLineTools=function(){this.dataSources().forEach((function(e){y(e)&&e.recalcStudyIfNeeded&&e.recalcStudyIfNeeded()}))},he.prototype.recalcVisibleRangeStudy=function(e,t){void 0!==this._recalcVRTimerId&&clearTimeout(this._recalcVRTimerId);var i=this;this._recalcVRTimerId=setTimeout((function(){i._recalcVisibleRangeStudy(e,t)}),500)},he.prototype._recalcVisibleRangeStudy=function(e,t){if(!this.timeScale().isEmpty()){var i=this.timeScale().visibleBarsStrictRange(),r=this.mainSeries().nearestData(i.firstBar(),R.NearestRight),n=this.mainSeries().nearestData(i.lastBar(),R.NearestLeft),o=this.mainSeries().bars().lastIndex(),s=r?r.index:void 0,a=n?n.index:void 0,l=s===this._oldStartVisibleIndex,c=a===this._oldEndVisibleIndex;if(!l||!c||t){this._oldStartVisibleIndex=s,this._oldEndVisibleIndex=a;for(var u={first_visible_bar_time:1e3*Math.floor(r&&r.value?r.value[TradingView.TIME_PLOT]:0),last_visible_bar_time:1e3*Math.floor(n&&n.value?n.value[TradingView.TIME_PLOT]:0),subscribeRealtime:n&&n.index===o},h=0;h0&&m.listeners().fire(m)}}}},he.prototype.onResetScales=function(){return this._resetScales},he.prototype.resetTimeScale=function(){this._timeScale.restoreDefault(),this.recalculateAllPanes(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudy(this.dataSources()),this.updateCrossHair(),this.lightUpdate(),this._resetScales.fire(),this._setScalesResetAvailable(!1)},he.prototype.restoreTimeScaleState=function(e){this._timeScale.restoreState(e),this.recalculateAllPanes(),this.updateCrossHair(),this.lightUpdate(),this._setScalesResetAvailable(!0)},he.prototype.restoreFactoryDefaults=function(e){e.restoreFactoryDefaults(),this.recalcVisibleRangeStudy(this.dataSources(),!0)},he.prototype.selectionMacro=function(e){var t=this.selection().sources();e({removeSourceFromSelection:pe.bind(this),addSourceToSelection:fe.bind(this),clearSelection:de.bind(this),
selection:this.selection.bind(this)});var i=Z(t,this.selection().sources()),r=Z(this.selection().sources(),t);r.concat(t).forEach((function(e){e.updateAllViews()})),i.forEach((function(e){var t=e.hasAlert&&e.hasAlert.value()&&e.getAlertSync();t&&t.set("selected",!1)})),r.forEach((function(e){var t=e.hasAlert&&e.hasAlert.value()&&e.getAlertSync();t&&t.set("selected",!0)})),this.lightUpdate(),this.setHoveredSource(null),(i.length>0||r.length>0)&&this._selectedSourceChanged.fire()},he.prototype.checkLineToolSelection=function(){this._selection.checkLineToolSelection()},he.prototype.onSelectedSourceChanged=function(){return this._selectedSourceChanged},he.prototype.selection=function(){return this._selection},he.prototype.invalidate=function(e){this._invalidateHandler&&this._invalidateHandler(e)},he.prototype.dataSources=function(){var e=[];e.push(this.m_crossHairSource);for(var t=0;t0)for(s=this.dataSources(),a=0;a0){var c=n-r,u=l?null:i.rightOffset()-c;if(!this._options.shiftVisibleRangeOnNewBar&&l){var h=i.width()/(a.length()+c);h>=i.minBarSpacing()?(i.setBarSpacing(h),u=i.rightOffset()+c):o.lastBar()!==r&&(u=i.rightOffset()-c)}null!==u&&i.setRightOffset(u)}}i.setBaseIndex(n)}},he.prototype.recalculatePane=function(e){e&&e.recalculate()},he.prototype.paneForSource=function(e){for(var t=this._panes.length-1;t>=0;t--)if(-1!==this._panes[t].dataSources().indexOf(e))return this._panes[t];return e instanceof P?this.paneForSource(this.m_mainSeries):null},he.prototype.recalculateAllPanes=function(){for(var e=0;e1},he.prototype.createLineTool=function(e,t,i,r,n,o){if(!_(i))return null;if("LineToolExecution"!==i&&ee("drawings","Study_Drawing_"+i),r){var s=r.state();r=f(i,s)}var l=p(i,this,r,null),c=!l.linkKey&&!n;F.drawOnAllCharts().value()?l.linkKey=n||U.randomHash():l.linkKey=n,l.toolname=i,o=o||e.mainDataSource(),r||l.properties().currencyId.setValue(o.symbolSource().currency()),l.setOwnerSource(o);var u,h=e.defaultPriceScale();if(e.addDataSource(l,h),l.isFixed()){var d=e.mainDataSource().firstValue(),m=this._timeScale.indexToCoordinate(t.index),y=h.priceToCoordinate(t.price,d);u=l.addFixedPoint(new a(m,y))}else u=l.addPoint(t);return u||(this._lineBeingCreated=l,this._paneBeingCreatedLineOn=e),c&&l.enableCurrentIntervalVisibility(),this.fullUpdate(),l},he.prototype.lineBeingCreated=function(){return this._lineBeingCreated},he.prototype.paneBeingCreatedLineOn=function(){return this._paneBeingCreatedLineOn},he.prototype.coninueCreatingLine=function(e,t,i,r){var n=this._lineBeingCreated.addPoint(e,t,i);this._lineBeingCreated.updateAllViews();var o=new x(T.Light);return n&&(this._paneBeingCreatedLineOn=null,this._lineBeingCreated=null),this.invalidate(o),n},he.prototype.cancelCreatingLine=function(){if(this._lineBeingCreated){var e=this._lineBeingCreated;this.removeSource(this._lineBeingCreated),this._lineBeingCreated=null,this._lineCancelled.fire(),F.drawOnAllCharts().value()&&e.isSynchronizable()&&F.cancelLineTool({model:this})}},he.prototype.startChangingLinetool=function(e,t,i,r,n){this._lineBeingEdited=e,F.isToolEditingNow.setValue(!0),this._linePointBeingEdited=i,this._lineBeingEdited.startChanging(i,t,n);var o=this.paneForSource(e);this._lineBeingEdited.startDragPoint&&this._lineBeingEdited.startDragPoint(i,t),this._lineBeingEdited.setPoint(i,t,r,n),this._lineBeingEdited.updateAllViews();var s=this._paneInvalidationMask(o,T.Light);if(s.force=!0,this.invalidate(s),e.linkKey&&e.isSynchronizable()){var a=this.externalTimeStamp(t.index);F.startChangingLineTool({linkKey:e.linkKey,model:this,symbol:this.mainSeries().symbol(),point:{price:t.price,timeStamp:a},pointIndex:i,envState:r})}},he.prototype.lineBeingEdited=function(){return this._lineBeingEdited},he.prototype.linePointBeingEdited=function(){return this._linePointBeingEdited},he.prototype.changeLinePoint=function(e,t,i){var r=this.paneForSource(this._lineBeingEdited),n=e.price,o=e.index;if(void 0!==e.x&&void 0!==e.y){var s=this._lineBeingEdited.priceScale(),a=r.mainDataSource().firstValue();n=s.coordinateToPrice(e.y,a),o=Math.round(this.timeScale().coordinateToIndex(e.x)),n=this._magnet.align(n,o,r),this._lineBeingEdited.setPoint(this._linePointBeingEdited,{price:n,index:o},t,i)}else this._lineBeingEdited.setPoint(this._linePointBeingEdited,e,t,i);if(this._lineBeingEdited.updateAllViews(),this.lightUpdate(),this._lineBeingEdited.linkKey&&this._lineBeingEdited.isSynchronizable()){
var l=this.externalTimeStamp(o);F.changeLineTool({linkKey:this._lineBeingEdited.linkKey,model:this,symbol:this.mainSeries().symbol(),point:{price:n,timeStamp:l},envState:t})}},he.prototype.endChangingLinetool=function(e,t){var i=this._lineBeingEdited;this._lineBeingEdited.endChanging(!1,e,t),this._lineBeingEdited=null,F.isToolEditingNow.setValue(!1),this._linePointBeingEdited=null,this.lightUpdate();var r={points:i._timePoint,interval:this.mainSeries().interval()};i.linkKey&&i.isSynchronizable()&&F.finishChangingLineTool({model:this,linkKey:i.linkKey,symbol:this.mainSeries().symbol(),finalState:r})},he.prototype.finishLineTool=function(e){var t=this.lineBeingCreated();t&&(t.finish&&t.finish(),!e&&F.drawOnAllCharts().value()&&t.linkKey&&t.isSynchronizable()&&F.finishLineTool({linkKey:t.linkKey,model:this}))},he.prototype.calculateDefaultTags=function(){for(var e=[],t=this.dataSources(),i=0;i-1&&this._modelIntervals.splice(t,1)},he.prototype.clearIntervals=function(){for(var e=0;e=0?p.SeriesBarColorer.upColor(this._series.properties()):p.SeriesBarColorer.downColor(this._series.properties());else{var M=this._series.barColorer().barStyle(u,!1);I=w(f,null!=M.barBorderColor?M.barBorderColor:M.barColor)}I=Object(m.resetTransparency)(w(f,I));for(var O=0,A=this._items;Ou&&(h-=Math.abs(u-(d+l)),d=Math.floor(h-c)+.5);var p=d+l,f=0+t.borderSize+t.paddingTop+t.fontSize+t.paddingBottom;e.fillStyle=r.background;var _=Math.round(d*i),m=Math.round(0*i),y=Math.round(p*i),g=Math.round(f*i);e.fillRect(_,m,y-_,g-m);var v=Math.round(r.coordinate*i),S=m,b=Math.round((S+t.borderSize+t.tickLength)*i);e.fillStyle=r.color;var w=Math.max(1,Math.floor(i)),P=Math.floor(.5*i);e.fillRect(v-P,S,w,b-S);var C=f-t.baselineOffset-t.paddingBottom;e.textAlign="left",e.fillStyle=r.color,Object(n.drawScaled)(e,i,(function(){return e.fillText(r.text,d+a,C)})),e.restore()}}},e}();i.d(t,"a",(function(){return a}));var a=function(){function e(e){this._renderer=new s,this._rendererData={background:"",color:"",coordinate:0,text:"",visible:!1,width:0},this._invalidated=!0,this._model=e,this._renderer.setData(this._rendererData)}return e.prototype.update=function(){this._invalidated=!0},e.prototype.renderer=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._renderer},e.prototype.coordinate=function(){return this._rendererData.coordinate},e.prototype._updateImpl=function(){var e=this._rendererData;if(e.visible=!1,!this._model.timeScale().isEmpty()){var t=this._getIndex();if(null!==t){e.visible=!0,e.width=this._model.timeScale().width(),
+;var r=i("mrSG"),n=i("eJTA"),o=i("ivNn"),s=i("4miz"),a=i("IzGk"),l=i("k9/m"),c=i("GH0z"),u=i("7qT/"),h=i("Ialn"),d=i("qFKp"),p=i("38az"),f=i("e92V"),_=i("mMWL"),m=i("Tmoa"),y=d.CheckMobile.any(),g=y&&!0,v=new c.PercentageFormatter,b=window.t("n/a"),S=b+" ("+b+"%)";function w(e,t){var i=Object(n.parseRgb)(t),r=Object(n.parseRgb)(e);return Object(n.distanceRgb)(i,r)<70?Object(n.rgbToHexString)(Object(n.invertRgb)(i)):t}var P=function(e){function t(t,i){var r=e.call(this)||this;return r._invalidated=!0,r._series=t,r._model=i,r._items.push(new s.a(window.t("Open"),"")),r._items.push(new s.a(window.t("High"),"")),r._items.push(new s.a(window.t("Low"),"")),r._items.push(new s.a(window.t("Close"),"")),r._items.push(new s.a("","")),r._items.push(new s.a("","")),r._items.push(new s.a(window.t("Change"),"")),r.update(),r}return Object(r.__extends)(t,e),t.prototype.update=function(){this._invalidated=!0},t.prototype.items=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items},t.prototype._updateImpl=function(){var e=this._series.symbolInfo();e?(this._header=[e.name,Object(a.translatedIntervalString)(this._series.interval()),e.exchange].join(", "),this._title=e.description):this._header=this._series.symbol();for(var t=this._showLastPriceAndChangeOnly(),i=0,r=this._items;i=0?p.SeriesBarColorer.upColor(this._series.properties()):p.SeriesBarColorer.downColor(this._series.properties());else{var M=this._series.barColorer().barStyle(u,!1);I=w(f,null!=M.barBorderColor?M.barBorderColor:M.barColor)}I=Object(m.resetTransparency)(w(f,I));for(var O=0,A=this._items;Ou&&(h-=Math.abs(u-(d+l)),d=Math.floor(h-c)+.5);var p=d+l,f=0+t.borderSize+t.paddingTop+t.fontSize+t.paddingBottom;e.fillStyle=r.background;var _=Math.round(d*i),m=Math.round(0*i),y=Math.round(p*i),g=Math.round(f*i);e.fillRect(_,m,y-_,g-m);var v=Math.round(r.coordinate*i),b=m,S=Math.round((b+t.borderSize+t.tickLength)*i);e.fillStyle=r.color;var w=Math.max(1,Math.floor(i)),P=Math.floor(.5*i);e.fillRect(v-P,b,w,S-b);var C=f-t.baselineOffset-t.paddingBottom;e.textAlign="left",e.fillStyle=r.color,Object(n.drawScaled)(e,i,(function(){return e.fillText(r.text,d+a,C)})),e.restore()}}},e}();i.d(t,"a",(function(){return a}));var a=function(){function e(e){this._renderer=new s,this._rendererData={background:"",color:"",coordinate:0,text:"",visible:!1,width:0},this._invalidated=!0,this._model=e,this._renderer.setData(this._rendererData)}return e.prototype.update=function(){this._invalidated=!0},e.prototype.renderer=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._renderer},e.prototype.coordinate=function(){return this._rendererData.coordinate},e.prototype._updateImpl=function(){var e=this._rendererData;if(e.visible=!1,!this._model.timeScale().isEmpty()){var t=this._getIndex();if(null!==t){e.visible=!0,e.width=this._model.timeScale().width(),
e.background=this._getBgColor(),e.color=Object(r.colorFromBackground)(e.background),e.coordinate=this._model.timeScale().indexToCoordinate(t);var i=this._model.timeScale().indexToUserTime(t);e.text=null!==i?this._model.dateTimeFormatter().format(i):"",this._invalidated=!1}}},e}()},d1Pk:function(e,t,i){"use strict";i.r(t),i.d(t,"fibLevelCoordinate",(function(){return n})),i.d(t,"fibLevelPrice",(function(){return o}));var r=i("Eyy1");function n(e,t,i,n,o,s){if(s)return Math.round(Object(r.ensureDefined)(e.coordinate)+Object(r.ensureDefined)(t.coordinate)*i);var a=e.price+t.price*i;return n.priceToCoordinate(a,o)}function o(e,t,i,n,o,s){if(!s)return e.price+t.price*i;var a=Object(r.ensureDefined)(e.coordinate)+Object(r.ensureDefined)(t.coordinate)*i;return n.coordinateToPrice(a,o)}},d700:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"a",(function(){return o}));var r=i("/3z9");function n(e){if("INPUT"===e.tagName){var t=e.type;return"text"===t||"email"===t||"number"===t||"password"===t||"search"===t||"tel"===t||"url"===t}return"TEXTAREA"===e.tagName||e.isContentEditable}function o(e,t){if(!t)return!1;var i=255&e;if(27===i||i>>>4==7)return!1;switch(e^i){case r.Modifiers.Alt:return(38===i||40===i)&&"SELECT"===t.tagName||n(t);case r.Modifiers.Alt+r.Modifiers.Shift:return n(t);case r.Modifiers.Mod:if(67===i||!r.isMacKeyboard&&45===i){var o=t.ownerDocument&&t.ownerDocument.getSelection();if(o&&!o.isCollapsed)return!0}return n(t);case r.Modifiers.Mod+r.Modifiers.Shift:return i>=33&&i<=40&&n(t);case r.Modifiers.Shift:case 0:return!!(9!==i||t.ownerDocument&&t!==t.ownerDocument.body&&t!==t.ownerDocument.documentElement)&&((13===i||32===i||!function(e){if("BUTTON"===e.tagName)return!0;if("INPUT"===e.tagName){var t=e.type;if("submit"===t||"button"===t||"reset"===t||"checkbox"===t||"radio"===t)return!0}return!1}(t))&&("form"in t||t.isContentEditable))}return!1}},dBsn:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererCross",(function(){return l}));var r=i("aO4+"),n=i("GEp6"),o=i("ogJP"),s=i("Zp/P"),a=i("VdBB"),l=function(){function e(e){this._data=e}return e.prototype.draw=function(e,t){for(var i,r,n,s,a=t.pixelRatio,l="",c=!1,u=0,h=this._data.items;u0?"Forward":"Backward")),this._model=e,this._sourcesIds=t.map((function(e){return e.id()})),this._shift=i}function B(e,t,i,r,n,o){y.call(this,"Zoom"),this._model=e,this._startBar=t,this._endBar=i,this._startPrice=r,this._endPrice=n,this._pane=o}function R(e,t,i){y.call(this,"Zoom"),this._baseCmd=e,this._zoomStack=t,this._inOut=i}function N(e,t,i){y.call(this,"Apply Chart Theme"),this._model=e,this._newChartProps=TradingView.factoryDefaults("chartproperties"),this._newSeriesProps=TradingView.factoryDefaults("chartproperties.mainSeriesProperties"),this._newSessionProps=t.sessions||TradingView.factoryDefaults("sessions"),["candleStyle","hollowCandleStyle","haStyle"].forEach((function(e){t.mainSourceProperties[e].wickUpColor=t.mainSourceProperties[e].wickUpColor||t.mainSourceProperties[e].wickColor,t.mainSourceProperties[e].wickDownColor=t.mainSourceProperties[e].wickDownColor||t.mainSourceProperties[e].wickColor})),t.chartProperties.paneProperties.vertGridProperties=t.chartProperties.paneProperties.vertGridProperties||t.chartProperties.paneProperties.gridProperties,
+Object(n.distanceToSegment)(new r.Point(o,t.y),new r.Point(l,i.y),new r.Point(e.x,e.y)).distance<=c)return new a.HitTestResult(a.HitTestResult.REGULAR)}return null},e}()},dDSx:function(e,t,i){"use strict";(function(e){var r=i("CW80").isLineTool,n=i("Ss5c").LineDataSource,o=i("FIi8").deepExtend,s=i("OK+B"),a=i("beCu").doAnimate,l=i("onDC").ChartUndoModelBase,c=i("Ocx9").saveDefaultProperties,u=i("GVQo"),h=i("GVHu").Study,d=i("8sOK").StudyStub,p=i("0YCj"),f=i("0waE"),_=i("7MZv").showTooManyStudiesNotice,m=i("MY2c").UndoStack,y=i("RDU5").UndoCommand,g=i("Ltzl").SaveLineToolStateUndoCommand,v=i("YlKu").ApplyLineToolTemplateUndoCommand,b=i("s9sR").SetResolutionUndoCommand,S=i("8C8C").RestoreFactoryDefaultsUndoCommand,w=i("2OVc").InsertStudyCommand,P=i("FKaq").SetPriceScaleSelectionStrategyCommand,C=i("/YGI").StudyInserter,x=i("PC8g").trackEvent,T=i("Fixu").trackDrawingPasted,L=i("uOxu").getLogger("Chart.ChartUndoModel"),I=i("QTwd").RestoreDefaultsPreferencesUndoCommand,M=i("bJYc").SetPropertyUndoCommand;function O(t,i,r,n,o,a,c,u,h){l.call(this,c),this._chartWidget=a,this.m_model=new s(t,i,r,n,o,this,u,h),this.m_zoomStack=new m,this._onSimpleZoomIn=new e,this._onSimpleZoomOut=new e,this._currentCustomMoveSource=null,this.beginUndoMacro=c.beginUndoMacro.bind(c),this.endUndoMacro=c.endUndoMacro.bind(c),this.createUndoCheckpoint=c.createUndoCheckpoint.bind(c),this.undoToCheckpoint=c.undoToCheckpoint.bind(c)}function A(e,t,i,r){y.call(this,i),this._priceScale=t,this._newMode=e,this._model=r}function k(e,t,i,r){y.call(this,i),this._property=e,this._newValue=t,this._model=r,this._priceScale=this._model.mainSeries().priceScale()}function E(e,t,i,r){y.call(this,"scale price",!1),this.m_model=e,this.m_pane=t,this.m_priceScale=i,this.m_state=r,this.m_newPriceScaleState=null}function D(e,t,i,r){this._model=e,this._series=t,this._oldSymbol=t.symbol(),this._oldInterval=t.interval(),this._symbol=i,this._interval=r}function V(e,t,i){y.call(this,"Move "+t[0].title()+" "+(i>0?"Forward":"Backward")),this._model=e,this._sourcesIds=t.map((function(e){return e.id()})),this._shift=i}function B(e,t,i,r,n,o){y.call(this,"Zoom"),this._model=e,this._startBar=t,this._endBar=i,this._startPrice=r,this._endPrice=n,this._pane=o}function R(e,t,i){y.call(this,"Zoom"),this._baseCmd=e,this._zoomStack=t,this._inOut=i}function N(e,t,i){y.call(this,"Apply Chart Theme"),this._model=e,this._newChartProps=TradingView.factoryDefaults("chartproperties"),this._newSeriesProps=TradingView.factoryDefaults("chartproperties.mainSeriesProperties"),this._newSessionProps=t.sessions||TradingView.factoryDefaults("sessions"),["candleStyle","hollowCandleStyle","haStyle"].forEach((function(e){t.mainSourceProperties[e].wickUpColor=t.mainSourceProperties[e].wickUpColor||t.mainSourceProperties[e].wickColor,t.mainSourceProperties[e].wickDownColor=t.mainSourceProperties[e].wickDownColor||t.mainSourceProperties[e].wickColor})),t.chartProperties.paneProperties.vertGridProperties=t.chartProperties.paneProperties.vertGridProperties||t.chartProperties.paneProperties.gridProperties,
t.chartProperties.paneProperties.horzGridProperties=t.chartProperties.paneProperties.horzGridProperties||t.chartProperties.paneProperties.gridProperties,t.chartProperties.paneProperties.legendProperties=this._model.properties().state().paneProperties.legendProperties,this._newChartProps=o({},this._newChartProps,t.chartProperties),delete this._newChartProps.scalesProperties.showLeftScale,delete this._newChartProps.scalesProperties.showRightScale,delete this._newChartProps.scalesProperties.scaleSeriesOnly,delete this._newChartProps.scalesProperties.showSeriesLastValue,delete this._newChartProps.scalesProperties.showStudyLastValue,delete this._newChartProps.scalesProperties.showSymbolLabels,delete this._newChartProps.scalesProperties.showStudyPlotLabels,delete this._newChartProps.scalesProperties.showFundamentalNameLabel,delete this._newChartProps.scalesProperties.showFundamentalLastValue,e.timeScale().preserveBarSpacing()&&delete this._newChartProps.scalesProperties.barSpacing,this._newSeriesProps=o({},this._newSeriesProps,t.mainSourceProperties),this._oldChartProps=e.properties().state(),delete this._oldChartProps.paneProperties.topMargin,delete this._oldChartProps.paneProperties.bottomMargin,this._oldSeriesProps=e.mainSeries().properties().state(),this._oldSessionsProps=this._model.sessions().state(),i||(delete this._oldSeriesProps.style,delete this._oldSeriesProps.symbol,delete this._oldSeriesProps.interval,delete this._oldSeriesProps.extendedHours,delete this._newSeriesProps.style,delete this._newSeriesProps.symbol,delete this._newSeriesProps.interval,delete this._newSeriesProps.extendedHours)}function F(e,t){y.call(this,"Stop Sincing Drawing"),this._model=e,this._sourceId=t.id(),this._linkKey=t.linkKey}function j(e,t){y.call(this,"Paste Indicator"),this._model=e,this._clipboardData=t}function W(e,t){y.call(this,"Move",!1),this._origPoint=e.clone(),this._point=null,this._handler=t}inherit(O,l),O.prototype.version=function(){return this.m_model._version},O.prototype.onData=function(e){switch(e.method){case"timescale_update":var t=e.params;this.m_model.updateTimeScale(t.index,t.zoffset,t.changes,t.index_diff,t.marks,t.clear)}},O.prototype.paneForSource=function(e){return this.m_model.paneForSource(e)},O.prototype.createPane=function(e){return this.m_model.createPane(e)},O.prototype.readOnly=function(){return this.m_model.readOnly()},O.prototype.restart=function(){this.m_model.restart()},O.prototype.disconnect=function(){this.m_model.disconnect()},O.prototype.studiesMetaData=function(){return this.m_model.studiesMetaData()},O.prototype.studyVersioning=function(){return this.m_model.studyVersioning()},O.prototype.chartModel=function(){return this._model()},O.prototype._model=function(){return this.m_model},O.prototype.pushUndoCommand=function(e){this._pushUndoCommand(e)},O.prototype._pushUndoCommand=function(e){this._undoHistory.pushUndoCommand(e)},O.prototype.startScalePrice=function(e,t,i){this.pushUndoCommand(new E(this.m_model,e,t,t.state())),this.chartModel().startScalePrice(e,t,i)},
O.prototype.scalePriceTo=function(e,t,i){this.chartModel().scalePriceTo(e,t,i)},O.prototype.endScalePrice=function(e,t){this.chartModel().endScalePrice(e,t)},O.prototype.startScrollPrice=function(e,t,i){t.isAutoScale()||(this._initialPriceScrollState=t.state(),this._initialPriceScrollPos=i,this.chartModel().startScrollPrice(e,t,i))},O.prototype.scrollPriceTo=function(e,t,i){t.isAutoScale()||(this._initialPriceScrollPos&&Math.abs(this._initialPriceScrollPos-i)>20&&(this.pushUndoCommand(new E(this.m_model,e,t,this._initialPriceScrollState)),delete this._initialPriceScrollState,delete this._initialPriceScrollPos),this.chartModel().scrollPriceTo(e,t,i))},O.prototype.endScrollPrice=function(e,t){t.isAutoScale()||(delete this._initialPriceScrollState,delete this._initialPriceScrollPos,this.chartModel().endScrollPrice(e,t))},O.prototype.setPriceAutoScale=function(e,t,i){this.pushUndoCommand(new E(this.m_model,e,t,t.state())),this.chartModel().setPriceAutoScale(e,t,i)},O.prototype.resetPriceScale=function(e,t){this.pushUndoCommand(new E(this.m_model,e,t,t.state())),this.chartModel().resetPriceScale(e,t)},O.prototype.setWidth=function(e){this.m_model.setWidth(e)},O.prototype.setPaneHeight=function(e,t){this.m_model.setPaneHeight(e,t)},O.prototype.gridSource=function(){return this.m_model.gridSource()},O.prototype.watermarkSource=function(){return this.m_model.watermarkSource()},O.prototype.addAlertsSource=function(e){return this.m_model.addAlertsSource(e)},O.prototype.alertsSources=function(){return this.m_model.alertsSources()},O.prototype.publishedChartsTimelineSource=function(){return this.m_model.publishedChartsTimelineSource()},O.prototype.barsMarksSources=function(){return this.m_model.barsMarksSources()},O.prototype.crossHairSource=function(){return this.m_model.crossHairSource()},O.prototype.model=function(){return this.m_model},O.prototype.chartWidget=function(){return this._chartWidget},O.prototype.mainSeries=function(){return this.m_model.m_mainSeries},O.prototype.mainSeriesScaleRatioProperty=function(){return this.m_model.mainSeriesScaleRatioProperty()},O.prototype.panes=function(){return this.m_model.panes()},O.prototype.timeScale=function(){return this.m_model.timeScale()},O.prototype.selectionMacro=function(e){return this.m_model.selectionMacro(e)},O.prototype.setHoveredSource=function(e,t){this.m_model.setHoveredSource(e,t)},O.prototype.selection=function(){return this.m_model.selection()},O.prototype.onSelectedSourceChanged=function(){return this.m_model.onSelectedSourceChanged()},O.prototype.hoveredSource=function(){return this.m_model.hoveredSource()},O.prototype.activeStrategySource=function(){return this.m_model.activeStrategySource()},O.prototype.invalidate=function(e){this.m_model.invalidate(e)},O.prototype.setCurrentPosition=function(e,t,i,r){this.m_model.setCurrentPosition(e,t,i,r)},O.prototype.setAndSaveCurrentPosition=function(e,t,i,r){this.m_model.setAndSaveCurrentPosition(e,t,i,r)},O.prototype.modifySeries=function(e,t,i){var r=new D(this.m_model,e,t,i);this.pushUndoCommand(r)},
-O.prototype.canCreateStudy=function(e){return this.model().chartApi().chartApi().isCanCreateStudy(e)},O.prototype.checkIfFeatureAvailable=function(e,t){var i=this.canCreateStudy(),r=t&&t instanceof h;return!this.readOnly()&&r&&(i=this.canCreateStudy(!0)),!!i||(r||_(),!1)},O.prototype._insertStudy=function(e,t,i,r,n,o,s,a,l){var c=new w(this.m_model,e,t,i,r,n,o,s,a,l||null,"Insert "+e.description);return this.pushUndoCommand(c),c.insertedStudy()},O.prototype.insertStudyWithoutCheck=function(e){return this._insertStudy(e)},O.prototype.createStudyInserter=function(e,t,i){var r=this,n=null,o={createStudy:function(e,t,i,o,s,a,l,c,u){return r.checkIfFeatureAvailable(e,a)?(x("studies","Study_"+e.id),"Compare@tv-basicstudies"===e.id&&x("compare","symbol:"+t.symbol),r._insertStudy(e,t,o,s,a,l,c,u,n)):(L.logNormal("Cannot insert study "+e.id),null)}};void 0!==i&&(o.createStub=function(){var e=r.m_model.insertStudyStub(i);return n={targetPaneId:r.m_model.paneForSource(e).id(),targetZOrder:e.zorder()},e.id()},o.removeStub=function(e){return r.m_model.removeStudyStub(e)});var s=new C(e,this.m_model._studiesMetaInfoRepository,o);return s.setParentSource(t),s},O.prototype.setProperty=function(e,t,i,r){if(e&&e.value()!==t){var n=new M(e,t,i,this.m_model,r);this.pushUndoCommand(n),this.emitEvent("setProperty")}},O.prototype.setProperties=function(e,t,i){var r=this;this.beginUndoMacro(i),this.m_model.selectionMacro((function(){for(var n=0;n0&&t.reverse(),t.forEach((function(t){e._model.changeZOrder(t,e._shift)}))},O.prototype.removePane=function(e){var t=this.m_model.panes()[e].dataSources().slice();this.removeSources(t,!1,"Remove pane")},inherit(B,y),B.prototype.redo=function(){this._timeScaleState=this._model.timeScale().state(),this._priceScaleState=this._pane.defaultPriceScale().state(),this._model.zoomToViewport(this._startBar,this._endBar,this._startPrice,this._endPrice,this._pane)},B.prototype.undo=function(){this._model.timeScale().restoreState(this._timeScaleState),this._pane.defaultPriceScale().restoreState(this._priceScaleState),this._model.recalculateAllPanes(),this._model.lightUpdate()},inherit(R,y),R.prototype.undo=function(){if(this._inOut){if(this._baseCmd!==this._zoomStack.head())return void L.logDebug("zoom stack inconsistency");this._baseCmd.undo(),this._zoomStack.pop()}else this._baseCmd.redo(),this._zoomStack.push(this._baseCmd)},R.prototype.redo=function(){if(this._inOut)this._baseCmd.redo(),this._zoomStack.push(this._baseCmd);else{if(this._baseCmd!==this._zoomStack.head())return void L.logDebug("zoom stack inconsistency");this._baseCmd.undo(),this._zoomStack.pop()}},inherit(N,y),N.prototype._merge=function(e,t,i){var r=this._model;c(!0),e&&(r.properties().paneProperties.mergeAndFire(e.paneProperties),r.properties().scalesProperties.mergeAndFire(e.scalesProperties)),r.mainSeries().priceScale().setMode({autoScale:t.priceAxisProperties.autoScale,percentage:t.priceAxisProperties.percentage,log:t.priceAxisProperties.log,lockScale:t.priceAxisProperties.lockScale}),r.mainSeries().properties().mergeAndFire(t),r.mainSeries().properties().saveDefaults(),r.mainSeries().createPaneView(),r.mainSeries().invalidateBarStylesCache(),r._version=t.version,r.recalculateAllPanes(),r.fullUpdate(),r.properties().saveDefaults(),r.sessions().restoreState({properties:i}),c(!1)},N.prototype.undo=function(){this._merge(this._oldChartProps,this._oldSeriesProps,this._oldSessionsProps),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),this._model.chartThemeLoaded()},N.prototype.redo=function(){this._merge(this._newChartProps,this._newSeriesProps,this._newSessionProps),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),this._model.chartThemeLoaded()},inherit(F,y),F.prototype.redo=function(){delete this._model.dataSourceForId(this._sourceId).linkKey},F.prototype.undo=function(){this._model.dataSourceForId(this._sourceId).linkKey=this._linkKey},inherit(j,y),j.prototype.redo=function(){if(!this._sourceState){var e=TradingView.clone(this._clipboardData.source);e.id=f.guid(),this._sourceState=e}var t=null,i=null
-;this._sourceState.metaInfo.is_price_study?(t=this._model.paneForSource(this._model.mainSeries()),i=this._model.mainSeries().priceScale()):i=(t=this._model.createPane()).defaultPriceScale();var r=t._restoreStudy(this._sourceState);r.metaInfo().linkedToSeries&&r.setOwnerSource(this._model.mainSeries()),r.start(),r.setPriceScale(i),t.move(r,i)},j.prototype.undo=function(){this._sourceState||L.logError("This command was never executed - nothing to undo");var e=this._model.dataSourceForId(this._sourceState.id);this._model.removeSource(e)},inherit(W,y),W.prototype.setPoint=function(e){this._point=e.clone(),this._handler(e)},W.prototype.point=function(){return this._point},W.prototype.undo=function(){this._handler(this._origPoint)},W.prototype.redo=function(){this._handler(this._point)},t.ChartUndoModel=O,t.PriceScaleChangeUndoCommand=E}).call(this,i("aIyQ"))},dTSQ:function(e,t,i){"use strict";function r(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}i.r(t),i.d(t,"regExpEscape",(function(){return r}))},dUDn:function(e,t,i){"use strict";i.r(t),i.d(t,"StandardPivotPointsPriceAxisView",(function(){return s}));var r=i("mrSG"),n=i("KcY8"),o=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5"],s=function(e){function t(t,i){var r=e.call(this)||this;r._source=t,r._data=i;var n=i.name;return r._completeName="P"===n.toUpperCase()?"P":"S"+n[1]+"/R"+n[1],r}return Object(r.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var r=this._source.properties();if(r.visible.value()){var n=this._completeName,s=r.levelsStyle.visibility;if(s[n]&&s[n].value()){var a=this._source.model().timeScale(),l=this._source.priceScale();if(!(a.isEmpty()||null===a.visibleBarsStrictRange()||null!==l&&l.isEmpty())){var c=this._source.customData();if(c&&c.pivots){var u=this._source.pricesView().prices()[o.indexOf(this._data.name.toUpperCase())];if(u){i.background=u.color,i.color=this.generateTextColor(u.color),i.coordinate=u.coordinate,i.floatCoordinate=u.floatCoordinate;var h=this._source.model().properties().scalesProperties;h.showStudyLastValue.value()&&(e.text=u.formatted,e.visible=!0),h.showStudyPlotLabels.value()&&(t.text=this._source.priceLabelText(this._data.name),t.visible=!0)}}}}}},t}(n.a)},dfhE:function(e,t,i){"use strict";var r,n,o;i.r(t),i.d(t,"STATUS_OFFLINE",(function(){return s})),i.d(t,"STATUS_RESOLVING",(function(){return a})),i.d(t,"STATUS_LOADING",(function(){return l})),i.d(t,"STATUS_READY",(function(){return c})),i.d(t,"STATUS_INVALID_SYMBOL",(function(){return u})),i.d(t,"STATUS_SNAPSHOT",(function(){return h})),i.d(t,"STATUS_EOD",(function(){return d})),i.d(t,"STATUS_PULSE",(function(){return p})),i.d(t,"STATUS_DELAYED",(function(){return f})),i.d(t,"STATUS_DELAYED_STREAMING",(function(){return _})),i.d(t,"STATUS_NO_BARS",(function(){return m})),i.d(t,"STATUS_REPLAY",(function(){return y})),i.d(t,"SERIES_STATUS_TEXT",(function(){return g})),i.d(t,"STYLE_LINE_TYPE_MARKERS",(function(){return v})),i.d(t,"STYLE_LINE_TYPE_STEP",(function(){return S})),i.d(t,"STYLE_LINE_TYPE_SIMPLE",(function(){
-return b})),i.d(t,"STYLE_BARS",(function(){return w})),i.d(t,"STYLE_CANDLES",(function(){return P})),i.d(t,"STYLE_LINE",(function(){return C})),i.d(t,"STYLE_AREA",(function(){return x})),i.d(t,"STYLE_RENKO",(function(){return T})),i.d(t,"STYLE_KAGI",(function(){return L})),i.d(t,"STYLE_PNF",(function(){return I})),i.d(t,"STYLE_PB",(function(){return M})),i.d(t,"STYLE_HEIKEN_ASHI",(function(){return O})),i.d(t,"STYLE_HOLLOW_CANDLES",(function(){return A})),i.d(t,"STYLE_BASELINE",(function(){return k})),i.d(t,"STYLE_RANGE",(function(){return E})),i.d(t,"STYLE_HILO",(function(){return D})),i.d(t,"STYLE_SHORT_NAMES",(function(){return V})),i.d(t,"SYMBOL_STRING_DATA",(function(){return B}));var s=0,a=1,l=2,c=3,u=4,h=5,d=6,p=7,f=8,_=9,m=10,y=11,g=((r={})[s]="connecting",r[a]="loading",r[l]="loading",r[c]="realtime",r[u]="invalid",r[h]="snapshot",r[d]="endofday",r[p]="endofday",r[f]="delayed",r[_]="delayed_streaming",r[m]="forbidden",r[y]="replay",r),v=0,S=1,b=2,w=0,P=1,C=2,x=3,T=4,L=5,I=6,M=7,O=8,A=9,k=10,E=11,D=12,V=((n={})[0]="bar",n[1]="candle",n[9]="hollowCandle",n[2]="line",n[3]="area",n[4]="renko",n[7]="pb",n[5]="kagi",n[6]="pnf",n[8]="ha",n[10]="baseline",n[11]="range",n[12]="hilo",n),B=((o={})[4]={type:"BarSetRenko@tv-prostudies",basicStudyVersion:40},o[7]={type:"BarSetPriceBreak@tv-prostudies",basicStudyVersion:34},o[5]={type:"BarSetKagi@tv-prostudies",basicStudyVersion:34},o[6]={type:"BarSetPnF@tv-prostudies",basicStudyVersion:34},o[8]={type:"BarSetHeikenAshi@tv-basicstudies",basicStudyVersion:60},o[11]={type:"BarSetRange@tv-basicstudies",basicStudyVersion:72},o)},di4O:function(e,t,i){"use strict";i.r(t),i.d(t,"watermarkProperty",(function(){return u})),i.d(t,"restoreWatermarkPropertyDefaults",(function(){return h}));var r=i("eJTA"),n=i("Vdly"),o=i("tc+8"),s=i.n(o),a={visibility:!1,color:"rgba(80, 83, 94, 0.25)"};function l(){var e=n.getJSON("symbolWatermark"),t=Object.assign({},a,e);if(void 0===e){if(void 0!==n.getJSON("chartproperties")){var i=n.getJSON("chartproperties").symbolWatermarkProperties;if(void 0!==i){var o=Object(r.tryParseRgba)(i.color);t=Object.assign(t,i),null!==o&&(0!==o[3]?t.visibility=!0:(o[3]=.25,t.color=Object(r.rgbaToString)(o)))}}delete t.transparency}return t}var c=null;function u(){return null===c&&(c=new s.a(l()),n.onSync.subscribe(null,(function(){null!==c&&c.mergeAndFire(l())})),c.listeners().subscribe(null,(function(){null!==c&&n.setJSON("symbolWatermark",c.state())}))),c}function h(){null!==c&&c.mergeAndFire(a)}},e1ZQ:function(e,t,i){"use strict";i.r(t),i.d(t,"dateFormatFunctions",(function(){return p})),i.d(t,"availableDateFormats",(function(){return f})),i.d(t,"defaultDateFormat",(function(){return _}));var r=i("YFKU"),n=i("kcTO"),o={1:r.t("Jan"),2:r.t("Feb"),3:r.t("Mar"),4:r.t("Apr"),5:r.t("May"),6:r.t("Jun"),7:r.t("Jul"),8:r.t("Aug"),9:r.t("Sep"),10:r.t("Oct"),11:r.t("Nov"),12:r.t("Dec")},s=function(e,t){return(t?e.getMonth():e.getUTCMonth())+1},a=function(e,t){return t?e.getFullYear():e.getUTCFullYear()},l=function(e,t){
+;this._sourceState.metaInfo.is_price_study?(t=this._model.paneForSource(this._model.mainSeries()),i=this._model.mainSeries().priceScale()):i=(t=this._model.createPane()).defaultPriceScale();var r=t._restoreStudy(this._sourceState);r.metaInfo().linkedToSeries&&r.setOwnerSource(this._model.mainSeries()),r.start(),r.setPriceScale(i),t.move(r,i)},j.prototype.undo=function(){this._sourceState||L.logError("This command was never executed - nothing to undo");var e=this._model.dataSourceForId(this._sourceState.id);this._model.removeSource(e)},inherit(W,y),W.prototype.setPoint=function(e){this._point=e.clone(),this._handler(e)},W.prototype.point=function(){return this._point},W.prototype.undo=function(){this._handler(this._origPoint)},W.prototype.redo=function(){this._handler(this._point)},t.ChartUndoModel=O,t.PriceScaleChangeUndoCommand=E}).call(this,i("aIyQ"))},dTSQ:function(e,t,i){"use strict";function r(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}i.r(t),i.d(t,"regExpEscape",(function(){return r}))},dUDn:function(e,t,i){"use strict";i.r(t),i.d(t,"StandardPivotPointsPriceAxisView",(function(){return s}));var r=i("mrSG"),n=i("KcY8"),o=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5"],s=function(e){function t(t,i){var r=e.call(this)||this;r._source=t,r._data=i;var n=i.name;return r._completeName="P"===n.toUpperCase()?"P":"S"+n[1]+"/R"+n[1],r}return Object(r.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var r=this._source.properties();if(r.visible.value()){var n=this._completeName,s=r.levelsStyle.visibility;if(s[n]&&s[n].value()){var a=this._source.model().timeScale(),l=this._source.priceScale();if(!(a.isEmpty()||null===a.visibleBarsStrictRange()||null!==l&&l.isEmpty())){var c=this._source.customData();if(c&&c.pivots){var u=this._source.pricesView().prices()[o.indexOf(this._data.name.toUpperCase())];if(u){i.background=u.color,i.color=this.generateTextColor(u.color),i.coordinate=u.coordinate,i.floatCoordinate=u.floatCoordinate;var h=this._source.model().properties().scalesProperties;h.showStudyLastValue.value()&&(e.text=u.formatted,e.visible=!0),h.showStudyPlotLabels.value()&&(t.text=this._source.priceLabelText(this._data.name),t.visible=!0)}}}}}},t}(n.a)},dfhE:function(e,t,i){"use strict";var r,n,o;i.r(t),i.d(t,"STATUS_OFFLINE",(function(){return s})),i.d(t,"STATUS_RESOLVING",(function(){return a})),i.d(t,"STATUS_LOADING",(function(){return l})),i.d(t,"STATUS_READY",(function(){return c})),i.d(t,"STATUS_INVALID_SYMBOL",(function(){return u})),i.d(t,"STATUS_SNAPSHOT",(function(){return h})),i.d(t,"STATUS_EOD",(function(){return d})),i.d(t,"STATUS_PULSE",(function(){return p})),i.d(t,"STATUS_DELAYED",(function(){return f})),i.d(t,"STATUS_DELAYED_STREAMING",(function(){return _})),i.d(t,"STATUS_NO_BARS",(function(){return m})),i.d(t,"STATUS_REPLAY",(function(){return y})),i.d(t,"SERIES_STATUS_TEXT",(function(){return g})),i.d(t,"STYLE_LINE_TYPE_MARKERS",(function(){return v})),i.d(t,"STYLE_LINE_TYPE_STEP",(function(){return b})),i.d(t,"STYLE_LINE_TYPE_SIMPLE",(function(){
+return S})),i.d(t,"STYLE_BARS",(function(){return w})),i.d(t,"STYLE_CANDLES",(function(){return P})),i.d(t,"STYLE_LINE",(function(){return C})),i.d(t,"STYLE_AREA",(function(){return x})),i.d(t,"STYLE_RENKO",(function(){return T})),i.d(t,"STYLE_KAGI",(function(){return L})),i.d(t,"STYLE_PNF",(function(){return I})),i.d(t,"STYLE_PB",(function(){return M})),i.d(t,"STYLE_HEIKEN_ASHI",(function(){return O})),i.d(t,"STYLE_HOLLOW_CANDLES",(function(){return A})),i.d(t,"STYLE_BASELINE",(function(){return k})),i.d(t,"STYLE_RANGE",(function(){return E})),i.d(t,"STYLE_HILO",(function(){return D})),i.d(t,"STYLE_SHORT_NAMES",(function(){return V})),i.d(t,"SYMBOL_STRING_DATA",(function(){return B}));var s=0,a=1,l=2,c=3,u=4,h=5,d=6,p=7,f=8,_=9,m=10,y=11,g=((r={})[s]="connecting",r[a]="loading",r[l]="loading",r[c]="realtime",r[u]="invalid",r[h]="snapshot",r[d]="endofday",r[p]="endofday",r[f]="delayed",r[_]="delayed_streaming",r[m]="forbidden",r[y]="replay",r),v=0,b=1,S=2,w=0,P=1,C=2,x=3,T=4,L=5,I=6,M=7,O=8,A=9,k=10,E=11,D=12,V=((n={})[0]="bar",n[1]="candle",n[9]="hollowCandle",n[2]="line",n[3]="area",n[4]="renko",n[7]="pb",n[5]="kagi",n[6]="pnf",n[8]="ha",n[10]="baseline",n[11]="range",n[12]="hilo",n),B=((o={})[4]={type:"BarSetRenko@tv-prostudies",basicStudyVersion:40},o[7]={type:"BarSetPriceBreak@tv-prostudies",basicStudyVersion:34},o[5]={type:"BarSetKagi@tv-prostudies",basicStudyVersion:34},o[6]={type:"BarSetPnF@tv-prostudies",basicStudyVersion:34},o[8]={type:"BarSetHeikenAshi@tv-basicstudies",basicStudyVersion:60},o[11]={type:"BarSetRange@tv-basicstudies",basicStudyVersion:72},o)},di4O:function(e,t,i){"use strict";i.r(t),i.d(t,"watermarkProperty",(function(){return u})),i.d(t,"restoreWatermarkPropertyDefaults",(function(){return h}));var r=i("eJTA"),n=i("Vdly"),o=i("tc+8"),s=i.n(o),a={visibility:!1,color:"rgba(80, 83, 94, 0.25)"};function l(){var e=n.getJSON("symbolWatermark"),t=Object.assign({},a,e);if(void 0===e){if(void 0!==n.getJSON("chartproperties")){var i=n.getJSON("chartproperties").symbolWatermarkProperties;if(void 0!==i){var o=Object(r.tryParseRgba)(i.color);t=Object.assign(t,i),null!==o&&(0!==o[3]?t.visibility=!0:(o[3]=.25,t.color=Object(r.rgbaToString)(o)))}}delete t.transparency}return t}var c=null;function u(){return null===c&&(c=new s.a(l()),n.onSync.subscribe(null,(function(){null!==c&&c.mergeAndFire(l())})),c.listeners().subscribe(null,(function(){null!==c&&n.setJSON("symbolWatermark",c.state())}))),c}function h(){null!==c&&c.mergeAndFire(a)}},e1ZQ:function(e,t,i){"use strict";i.r(t),i.d(t,"dateFormatFunctions",(function(){return p})),i.d(t,"availableDateFormats",(function(){return f})),i.d(t,"defaultDateFormat",(function(){return _}));var r=i("YFKU"),n=i("kcTO"),o={1:r.t("Jan"),2:r.t("Feb"),3:r.t("Mar"),4:r.t("Apr"),5:r.t("May"),6:r.t("Jun"),7:r.t("Jul"),8:r.t("Aug"),9:r.t("Sep"),10:r.t("Oct"),11:r.t("Nov"),12:r.t("Dec")},s=function(e,t){return(t?e.getMonth():e.getUTCMonth())+1},a=function(e,t){return t?e.getFullYear():e.getUTCFullYear()},l=function(e,t){
return Object(n.numberToStringWithLeadingZero)(function(e,t){return t?e.getDate():e.getUTCDate()}(e,t),2)},c=function(e,t){return o[s(e,t)]},u=function(e,t){return Object(n.numberToStringWithLeadingZero)(s(e,t),2)},h=function(e,t){return Object(n.numberToStringWithLeadingZero)(a(e,t)%100,2)},d=function(e,t){return Object(n.numberToStringWithLeadingZero)(a(e,t),4)},p={"dd MMM 'yy":function(e,t){return l(e,t)+" "+c(e,t)+" '"+h(e,t)},"MMM dd":function(e,t){return c(e,t)+" "+l(e,t)},"yyyy-MM-dd":function(e,t){return d(e,t)+"-"+u(e,t)+"-"+l(e,t)},"yy-MM-dd":function(e,t){return h(e,t)+"-"+u(e,t)+"-"+l(e,t)},"yy/MM/dd":function(e,t){return h(e,t)+"/"+u(e,t)+"/"+l(e,t)},"yyyy/MM/dd":function(e,t){return d(e,t)+"/"+u(e,t)+"/"+l(e,t)},"dd-MM-yyyy":function(e,t){return l(e,t)+"-"+u(e,t)+"-"+d(e,t)},"dd-MM-yy":function(e,t){return l(e,t)+"-"+u(e,t)+"-"+h(e,t)},"dd/MM/yy":function(e,t){return l(e,t)+"/"+u(e,t)+"/"+h(e,t)},"dd/MM/yyyy":function(e,t){return l(e,t)+"/"+u(e,t)+"/"+d(e,t)},"MM/dd/yy":function(e,t){return u(e,t)+"/"+l(e,t)+"/"+h(e,t)},"MM/dd/yyyy":function(e,t){return u(e,t)+"/"+l(e,t)+"/"+d(e,t)}},f=Object.keys(p),_=function(){return-1!==["ja","ko","zh","zh_TW"].indexOf(window.language||"")?"yyyy-MM-dd":"dd MMM 'yy"}},e92V:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"a",(function(){return o})),i.d(t,"c",(function(){return s}));var r=i("OH2X");function n(e){return!1}function o(e){return e in r||!1}function s(e){switch(e){case"LineToolBalloon":case"LineToolText":case"LineToolTextAbsolute":case"LineToolCallout":case"LineToolNote":case"LineToolNoteAbsolute":return!0}return!1}},eJTA:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i("ivNn");function n(e,t,i){return r.isNaN(t)||ti?i:Math.round(t)}function o(e,t,i){return r.isNaN(t)||ti?i:Math.round(1e4*t)/1e4}function s(e){return n(0,e,255)}function a(e){return n(0,e,255)}function l(e){return n(0,e,255)}function c(e){return o(0,e,1)}function u(e){return o(0,e,1)}function h(e){return o(0,e,1)}function d(e){return o(0,e,1)}function p(e){return o(0,e,1)}function f(e){return o(0,e,1)}function _(e){var t=e[0]/255,i=e[1]/255,r=e[2]/255,n=Math.min(t,i,r),o=Math.max(t,i,r),s=0,a=0,l=(n+o)/2;if(n===o)s=0,a=0;else{var c=o-n;switch(a=l>.5?c/(2-o-n):c/(o+n),o){case t:s=((i-r)/c+(i1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function y(e){var t,i,r,n=e[0],o=e[1],c=e[2];if(0===o)t=i=r=c;else{var u=c<.5?c*(1+o):c+o-c*o,h=2*c-u;t=m(h,u,n+1/3),i=m(h,u,n),r=m(h,u,n-1/3)}return[s(255*t),a(255*i),l(255*r)]}t.normalizeRedComponent=s,t.normalizeGreenComponent=a,t.normalizeBlueComponent=l,t.normalizeAlphaComponent=c,t.rgb=function(e,t,i){return[s(e),a(t),l(i)]},t.areEqualRgb=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},t.rgba=function(e,t,i,r){if(Array.isArray(e)){var n=e;return r=t,[n[0],n[1],n[2],c(r)]}var o=t;return i=i||0,r=r||0,[s(e),a(o),l(i),c(r)]},
-t.areEqualRgba=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},t.normalizeHue=u,t.normalizeHslSaturation=h,t.normalizeHsvSaturation=d,t.normalizeLightness=p,t.normalizeValue=f,t.hsl=function(e,t,i){return[u(e),h(t),p(i)]},t.areEqualHsl=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},t.hsv=function(e,t,i){return[u(e),d(t),f(i)]},t.areEqualHsv=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},t.rgbToHsl=_,t.hslToRgb=y,t.rgbToHsv=function(e){var t=e[0],i=e[1],r=e[2],n=t/255,o=i/255,s=r/255,a=Math.min(n,o,s),l=Math.max(n,o,s),c=l-a,u=0,h=0===l?0:c/l,d=l;if(l===a)u=0;else switch(l){case t:u=((o-s)/c+(o255)throw new Error("invalid threshold value, valid values are [0, 255]");return v(e)>=t?"white":"black"},t.tryParseRgb=E,t.parseRgb=function(e){var t=E(e);if(null!==t)return t;throw new Error("Passed color string does not match any of the known color representations")},t.tryParseRgba=D,t.parseRgba=V},ePL1:function(e,t,i){"use strict";i.r(t),i.d(t,"types",(function(){return r}));var r={ECONOMIC:"economic",QUANDL:"quandl"}},ei7k:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"a",(function(){return o}));var r=i("CLNU");function n(e){return Object(r.clean)(JSON.stringify(e))}function o(e){return JSON.parse(Object(r.clean)(e,!0))}},"f+Sq":function(e,t,i){"use strict";function r(e){if(void 0===e)throw new Error("Value is undefined");return e}function n(e){if(null===e)throw new Error("Value is null");return e}Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("Assertion failed"+(t?": "+t:""))},t.ensureDefined=r,t.ensureNotNull=n,t.ensure=function(e){return n(r(e))}},f3xO:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererUnicodeChar",(function(){return p}));var r=i("mrSG"),n=i("/SnT"),o=i.n(n),s=i("Eyy1"),a=i("aO4+"),l=i("2WC2"),c=i("VdBB"),u=i("Zp/P"),h=i("zDbI"),d=i("gBDZ"),p=function(e){function t(t,i){var r=e.call(this,t,i)||this;r._heightEnsured=Object(s.ensureDefined)(r._height);var n=t.char.slice(0,40);return r._ch=o()(n)[0]||" ",r._fontFamily=t.fontFamily||h.CHART_FONT_FAMILY,r._charCache=new d.b(r._ch,!1,!1,r._fontFamily,r._heightEnsured),r}return Object(r.__extends)(t,e),t.prototype.hitTest=function(e){for(var t=Object(u.selectionTolerance)(this._heightEnsured),i=0,r=this._items;i0?1:-1,s=i.y+i.vertOffset-o*Math.round(this._heightEnsured/2);r=i.style&&void 0!==i.style.color?i.style.color:this._color,this._charCache.paintTo(e,t,r,n,s,d.a.Center,i.vertOffset>0?d.c.Top:d.c.Bottom)},t.prototype._startPath=function(e,t,i,r){},t.prototype._endPath=function(e){},t}(l.b)},f6yo:function(e,t,i){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var r=i("hBTJ");t.pointInHalfplane=function(e,t){var i=t.edge;return i.A*e.x+i.B*e.y+i.C>0===t.isPositive},t.pointInTriangle=function(e,t,i,n){var o=t.add(i).scaled(.5).add(n).scaled(.5),s=r.intersectLineSegments(t,i,o,e);return null===s&&(null===(s=r.intersectLineSegments(i,n,o,e))&&null===(s=r.intersectLineSegments(n,t,o,e)))},t.pointInBox=function(e,t){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},t.pointInPolygon=function(e,t){for(var i=t.length-1,r=!1,n=e.x,o=e.y,s=0;s=o||l.y=o)&&a.x+(o-a.y)/(l.y-a.y)*(l.x-a.x)'},fxzW:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererDiamond",(function(){return s}));var r=i("mrSG"),n=i("2WC2"),o=i("aO4+"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype._drawItemShapeUsingCSSPixels=function(e,t){var i=Math.round(t.height/2),r=t.x,n=t.vertOffset,o=t.y+n;e.moveTo(r,o-i),e.lineTo(r+i,o),e.lineTo(r,o+i),e.lineTo(r-i,o),e.lineTo(r,o-i)},t.prototype._calcBoundingBox=function(t){var i=Math.round(t.height/2),r=t.x,n=t.vertOffset,s=t.y+n,a=r-i,l=r+i,c=s-i,u=s+i,h=new o.Point(a,c),d=new o.Point(l,u),p=Object(o.box)(h,d),f=e.prototype._calcBoundingBox.call(this,t);return f&&(p=this._unionBox(p,f)),p},t}(n.a)},g5Qf:function(e,t,i){"use strict";i.r(t),i.d(t,"getFavoriteDrawingToolbarPromise",(function(){return s})),i.d(t,"createFavoriteDrawingToolbar",(function(){return a}));i("YFKU");var r=i("yMne"),n=null,o=null;function s(){return o}function a(){null===o&&(o=new Promise((function(e){
Promise.all([i.e(31),i.e(39),i.e(75),i.e(14),i.e(29),i.e(35),i.e(47),i.e("floating-toolbars")]).then(function(t){if(null===n){var o=i("gmn6").FavoriteDrawingToolbar;n=new o({left:window.innerWidth/2,top:r.HEADER_TOOLBAR_HEIGHT_EXPANDED+61}),e(n)}}.bind(null,i)).catch(void 0)})))}},gAom:function(e,t,i){"use strict";function r(e,t,i,r,n,o){e.fillRect(t+o,i,r-2*o,o),e.fillRect(t+o,i+n-o,r-2*o,o),e.fillRect(t,i,o,n),e.fillRect(t+r-o,i,o,n)}function n(e,t,i,r){e.beginPath();var n=e.lineWidth%2?.5:0;e.moveTo(i,t+n),e.lineTo(r,t+n),e.stroke()}function o(e,t,i,r){e.beginPath();var n=e.lineWidth%2?.5:0;e.moveTo(t+n,i),e.lineTo(t+n,r),e.stroke()}i.r(t),i.d(t,"fillRectInnerBorder",(function(){return r})),i.d(t,"drawHorizontalLine",(function(){return n})),i.d(t,"drawVerticalLine",(function(){return o}))},gBDZ:function(e,t,i){"use strict";var r=i("Eyy1"),n=i("XlJ7");var o,s,a=i("ikwP");i.d(t,"a",(function(){return o})),i.d(t,"c",(function(){return s})),i.d(t,"b",(function(){return l})),function(e){e.Left="left",e.Right="right",e.Center="center"}(o||(o={})),function(e){e.Top="top",e.Bottom="bottom",e.Middle="middle"}(s||(s={}));var l=function(){function e(e,t,i,o,s,l){void 0===l&&(l="center"),this._cacheRenderParams=null,this._canvasesMap={},this._lines=e.split(/[^\S\r\n]*(?:\r\n|\r|\n)/),this._font=function(e,t,i,r){return Object(n.makeFont)(r,i,(e?"bold ":"")+(t?"italic ":""))}(t,i,o,s),this._fontSize=s,this._verticalPadding=~~(s/6),this._textAlign=l;var c=Object(a.createDisconnectedCanvas)(document,new a.Size(0,0),1),u=Object(r.ensureNotNull)(c.getContext("2d"));u.font=this._font;for(var h=0,d=0,p=this._lines;d0){var i=this._strategySources[this._strategySources.length-1];this.setActiveStrategySource(i)}this._strategySourcesChange.fire()}},e.prototype.setActiveStrategySource=function(e){-1!==this._strategySources.indexOf(e)&&this._activeStrategySource.setValue(e)},e.prototype.unsetActiveStrategySource=function(){this._activeStrategySource.setValue(null)},e.prototype.activeStrategySource=function(){return this._activeStrategySource},e.prototype.strategySources=function(){return this._strategySources},e.prototype.strategySourcesChange=function(){return this._strategySourcesChange},e.prototype.setScrollEnabled=function(e){this._scrollEnabled=e},e.prototype.scrollEnabled=function(){return this._scrollEnabled},e.prototype.setZoomEnabled=function(e){this._zoomEnabled=e},e.prototype.zoomEnabled=function(){return this._zoomEnabled},e.prototype.onTagsChanged=function(){return this._tagsChanged},e.prototype.canZoomIn=function(){return this._timeScale.canZoomIn()&&this._zoomEnabled},e.prototype.canZoomOut=function(){return this._timeScale.canZoomOut()&&this._zoomEnabled},e.prototype.onPaneTagsChanged=function(){this._tagsChanged.fire()},e.prototype.panesCollectionChanged=function(){return this._panesCollectionChanged},e.prototype.dataSourceCollectionChanged=function(){return this._dataSourceCollectionChanged},e.prototype.updateCrosshair=function(){var e=this.crossHairSource(),t=e.pane;if(null!==t){var i=e.originCoordX(),r=e.originCoordY();this.setAndSaveCurrentPosition(i,r,t)}},e.prototype.zoomTime=function(e,t,i){if(this._zoomEnabled){var r=this.timeScale();if(!r.isEmpty()&&0!==t){var n=r.width();e=Math.max(1,Math.min(e,n-2)),r.zoom(e,t,i),this.updateCrosshair(),this.recalculateAllPanes(),
-this.lightUpdate(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudy(this.dataSources()),this._setScalesResetAvailable(!0)}}},e.prototype.lineToolsGroupModel=function(){return this._lineToolsGroupModel},e.prototype.restoreLineToolsGroups=function(e){this._lineToolsGroupModel=b.LineToolsGroupModel.fromState(this,e)},e.prototype.updateSource=function(e){var t=this._invalidationMaskForSource(e);null!==t&&this.invalidate(t)},e.prototype.replaceStudyStub=function(e,t){var i=this.paneForSource(e);if(null===i)return!1;var r=e.priceScale(),n=e.zorder(),o=e.ownerSource();return this.paneForSource(e)===i?i.replaceSource(e,t,r):(i.insertDataSource(t,r,n),this.removeSource(e)),t.setOwnerSource(o),this.dataSources().forEach((function(i){i.ownerSource()===e&&i.setOwnerSource(t)})),t.start(),this.recalculatePane(i),this.fullUpdate(),!0},e.prototype.insertStudyStub=function(e){var t=this.mainSeries(),i=Object(r.ensureNotNull)(this.paneForSource(t)),n=new o.StudyStub(this,null,e),s=i.createPriceScaleAtPosition("overlay");return i.addDataSource(n,s,!1),this.recalculatePane(i),this.fullUpdate(),n},e.prototype.removeStudyStub=function(e){var t=this.dataSourceForId(e);return null===t?(L.logNormal("StudyStub id="+e+" is not found in chart model"),!1):(this.removeSource(t),!0)},e.prototype.setHoveredSource=function(e,t){var i=this._hoveredSource!==e;if(i||this._lastHittestData!==t){this._lastHittestData=t;var r,n=null;if(this._hoveredSource)this._hoveredSource.updateAllViews(),n=new f.InvalidateMask,null!==(r=this._invalidationMaskForSource(this._hoveredSource,f.InvalidationLevel.Light))&&n.merge(r);if(this._hoveredSource=e,e)e.updateAllViews(),n||(n=new f.InvalidateMask),null!==(r=this._invalidationMaskForSource(e,f.InvalidationLevel.Light))&&n.merge(r);n&&this.invalidate(n),i&&this._hoveredSourceChanged.fire(e)}},e.prototype.hoveredSource=function(){return this._hoveredSource},e.prototype.hoveredSourceChanged=function(){return this._hoveredSourceChanged},e.prototype.lastHittestData=function(){return this._lastHittestData},e.prototype.findNonOverlayStudyWithGroupingKey=function(e,t){for(var i=function(t){var i=t.dataSources().find((function(i){return Object(c.isStudy)(i)&&i.metaInfo().groupingKey===e&&!t.isOverlay(i)}));if(void 0!==i)return{value:{pane:t,study:i}}},r=0,n=void 0!==t?[t]:this._panes;r=0&&e=0&&e1)return void t.setValue(!1)}t.setValue(!0)}},e.prototype._getAvailableCurrencies=function(){var e=this;return this._options.currencyLabelEnabled?Object(T.isArray)(this._availableCurrencies)?this._availableCurrencies:(null!==this._availableCurrencies||(this._availableCurrencies=this.chartApi().availableCurrencies(),this._availableCurrencies.then((function(t){e._destroyed||(e._availableCurrencies=t,e.lightUpdate())})).catch((function(t){L.logWarn("An error occurred while getting available currencies: "+t),e._availableCurrencies=null}))),[]):[]},e}()},gQ5K:function(e,t,i){"use strict";i.r(t),i.d(t,"DateFormatter",(function(){return o}));var r=i("kcTO"),n=i("e1ZQ"),o=function(){function e(e){void 0===e&&(e="yyyy-MM-dd"),this._dateFormatFunc=n.dateFormatFunctions[e]}return e.prototype.format=function(e){return r.customFormatters&&r.customFormatters.dateFormatter?r.customFormatters.dateFormatter.format(e):this._dateFormatFunc(e,!1)},e.prototype.formatLocal=function(e){return r.customFormatters.dateFormatter?r.customFormatters.dateFormatter.formatLocal?r.customFormatters.dateFormatter.formatLocal(e):r.customFormatters.dateFormatter.format(e):this._dateFormatFunc(e,!0)},e}()},gTEF:function(e,t,i){"use strict";i.r(t),i.d(t,"SelectionRendererArrowsUpDown",(function(){return a}));var r=i("mrSG"),n=i("Eyy1"),o=i("vq8G"),s=i("6Fc/"),a=function(e){
function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype._drawMarker=function(e,t,i,r,o){var a=Object(n.ensureNotNull)(this._data),l=t.isUp?1:-1,c=i+l*Object(s.calculateVerticalOffset)(a.barSpacing)+l*Object(s.calculateMinHeight)(a.barSpacing),u=Math.round(3.5*o*2);u%2!=r%2&&(u+=1);var h=r%2/2,d=Math.round(t.x*o)+h,p=Math.round((t.y+c)*o)+h;e.beginPath(),e.arc(d,p,u/2,0,2*Math.PI,!0),e.closePath(),e.fill(),e.stroke()},t}(o.SelectionRenderer)},gVWb:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererBackground",(function(){return r}));var r=function(){function e(e){this._data=e}return e.prototype.draw=function(e,t){},e.prototype.drawBackground=function(e,t){e.save();for(var i=this._data,r=t.pixelRatio,n=0;n'+e+""}));a.innerHTML=(t=l.text).format.apply(t,c).replace(/\s\+\s/g,'+'),r.classList.add(S["common-tooltip__body--with-hotkey"]),s&&a.classList.add(S["common-tooltip__hotkey-block--divider"]),r.appendChild(a)}return i.addEventListener("contextmenu",v.a),i}function P(e,t){var i=t.rect;if(i){!function(e,t){var i,r=f.includes(t)?p[t]:"";(i=e.classList).remove.apply(i,f.map((function(e){return p[e]})).filter((function(e){return!!e}))),r&&!e.classList.contains(r)&&e.classList.add(r)}(e,t.colorTheme||"default"),t.addClass&&e.classList.add(t.addClass);var r=k(e);r.classList.toggle(S["common-tooltip__body--width_wide"],Boolean(t.wide)),r.classList.toggle(S["common-tooltip__body--no-padding"],Boolean(t.noPadding)),r.classList.toggle(S["common-tooltip__body--width_narrow"],Boolean(t.narrow)),r.classList.toggle(S["common-tooltip__body--no-buttons"],!0),e.classList.toggle(S["common-tooltip--no-pointer-events"],!Modernizr.pointerevents),r.style.left=x(0),r.style.width=x(r.clientWidth+(Boolean(t.noPadding)?0:2));var n=document.body.clientWidth,o=window.innerHeight,s=t.vertical,a=t.extendMargin||s&&i.w<20||!s&&i.h<20;e.classList.toggle(S["common-tooltip--farther"],a),e.classList.toggle(S["common-tooltip--vertical"],s),
-e.classList.toggle(S["common-tooltip--horizontal"],!s);var l=e.querySelector("."+S["common-tooltip__ear-holder"]),c="";if(s){e.style.left=x(i.x+i.w),e.style.top=x(i.y-(e.offsetHeight-i.h)/2);var u=(e.querySelector(":last-child")||r).getBoundingClientRect().right+10>n;e.classList.toggle(S["common-tooltip--direction_reversed"],u),e.classList.toggle(S["common-tooltip--direction_normal"],!u),c=u?"after":"before",Object(g.isRtl)()?(c=t.otr?"after":c,c=t.otl?"before":c):(c=t.otr?"before":c,c=t.otl?"after":c),l.classList.toggle(S["common-tooltip__ear-holder--before"],"before"===c),l.classList.toggle(S["common-tooltip__ear-holder--after"],"after"===c),"after"===c&&(e.style.left="auto",e.style.right=x(n-i.x))}else{var h=i.x-(r.offsetWidth-i.w)/2,d=n-10-e.offsetWidth,_=Math.max(10,Math.min(h,d));e.style.bottom=x(o-i.y),e.style.left=x(_);u=d\n\t\t