(window.webpackJsonp=window.webpackJsonp||[]).push([["library"],{"+6ja":function(e,t,i){"use strict";i.r(t),i.d(t,"availableTimezones",(function(){return u})),i.d(t,"timezoneIsAvailable",(function(){return h}));i("YFKU");for(var r=i("U/gD"),n=[{id:"Etc/UTC",title:window.t("UTC")},{id:"exchange",title:window.t("Exchange")}],o=[{id:"Africa/Cairo",title:window.t("Cairo"),offset:0},{id:"Africa/Johannesburg",title:window.t("Johannesburg"),offset:0},{id:"Africa/Lagos",title:window.t("Lagos"),offset:0},{id:"America/Argentina/Buenos_Aires",title:window.t("Buenos Aires"),offset:0},{id:"America/Bogota",title:window.t("Bogota"),offset:0},{id:"America/Caracas",title:window.t("Caracas"),offset:0},{id:"America/Chicago",title:window.t("Chicago"),offset:0},{id:"America/El_Salvador",title:window.t("San Salvador"),offset:0},{id:"America/Juneau",title:window.t("Juneau"),offset:0},{id:"America/Lima",title:window.t("Lima"),offset:0},{id:"America/Los_Angeles",title:window.t("Los Angeles"),offset:0},{id:"America/Mexico_City",title:window.t("Mexico City"),offset:0},{id:"America/New_York",title:window.t("New York"),offset:0},{id:"America/Phoenix",title:window.t("Phoenix"),offset:0},{id:"America/Santiago",title:window.t("Santiago"),offset:0},{id:"America/Sao_Paulo",title:window.t("Sao Paulo"),offset:0},{id:"America/Toronto",title:window.t("Toronto"),offset:0},{id:"America/Vancouver",title:window.t("Vancouver"),offset:0},{id:"US/Mountain",title:window.t("Denver"),offset:0},{id:"Asia/Almaty",title:window.t("Almaty"),offset:0},{id:"Asia/Ashkhabad",title:window.t("Ashkhabad"),offset:0},{id:"Asia/Bahrain",title:window.t("Bahrain"),offset:0},{id:"Asia/Bangkok",title:window.t("Bangkok"),offset:0},{id:"Asia/Chongqing",title:window.t("Chongqing"),offset:0},{id:"Asia/Dubai",title:window.t("Dubai"),offset:0},{id:"Asia/Ho_Chi_Minh",title:window.t("Ho Chi Minh"),offset:0},{id:"Asia/Hong_Kong",title:window.t("Hong Kong"),offset:0},{id:"Asia/Jakarta",title:window.t("Jakarta"),offset:0},{id:"Asia/Jerusalem",title:window.t("Jerusalem"),offset:0},{id:"Asia/Kolkata",title:window.t("Kolkata"),offset:0},{id:"Asia/Kuwait",title:window.t("Kuwait"),offset:0},{id:"Asia/Muscat",title:window.t("Muscat"),offset:0},{id:"Asia/Qatar",title:window.t("Qatar"),offset:0},{id:"Asia/Riyadh",title:window.t("Riyadh"),offset:0},{id:"Asia/Seoul",title:window.t("Seoul"),offset:0},{id:"Asia/Shanghai",title:window.t("Shanghai"),offset:0},{id:"Asia/Singapore",title:window.t("Singapore"),offset:0},{id:"Asia/Taipei",title:window.t("Taipei"),offset:0},{id:"Asia/Tehran",title:window.t("Tehran"),offset:0},{id:"Asia/Tokyo",title:window.t("Tokyo"),offset:0},{id:"Atlantic/Reykjavik",title:window.t("Reykjavik"),offset:0},{id:"Australia/Adelaide",title:window.t("Adelaide"),offset:0},{id:"Australia/Brisbane",title:window.t("Brisbane"),offset:0},{id:"Australia/Perth",title:window.t("Perth"),offset:0},{id:"Australia/Sydney",title:window.t("Sydney"),offset:0},{id:"Europe/Athens",title:window.t("Athens"),offset:0},{id:"Europe/Belgrade",title:window.t("Belgrade"),offset:0},{id:"Europe/Berlin", title:window.t("Berlin"),offset:0},{id:"Europe/Copenhagen",title:window.t("Copenhagen"),offset:0},{id:"Europe/Helsinki",title:window.t("Helsinki"),offset:0},{id:"Europe/Istanbul",title:window.t("Istanbul"),offset:0},{id:"Europe/London",title:window.t("London"),offset:0},{id:"Europe/Luxembourg",title:window.t("Luxembourg"),offset:0},{id:"Europe/Madrid",title:window.t("Madrid"),offset:0},{id:"Europe/Moscow",title:window.t("Moscow"),offset:0},{id:"Europe/Oslo",title:window.t("Oslo"),offset:0},{id:"Europe/Paris",title:window.t("Paris"),offset:0},{id:"Europe/Riga",title:window.t("Riga"),offset:0},{id:"Europe/Rome",title:window.t("Rome"),offset:0},{id:"Europe/Stockholm",title:window.t("Stockholm"),offset:0},{id:"Europe/Tallinn",title:window.t("Tallinn"),offset:0},{id:"Europe/Vilnius",title:window.t("Vilnius"),offset:0},{id:"Europe/Warsaw",title:window.t("Warsaw"),offset:0},{id:"Europe/Zurich",title:window.t("Zurich"),offset:0},{id:"Pacific/Auckland",title:window.t("New Zealand"),offset:0},{id:"Pacific/Chatham",title:window.t("Chatham Islands"),offset:0},{id:"Pacific/Fakaofo",title:window.t("Tokelau"),offset:0},{id:"Pacific/Honolulu",title:window.t("Honolulu"),offset:0},{id:"Pacific/Norfolk",title:window.t("Norfolk Island"),offset:0}],s=0,a=o;s'},"+hLl":function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("Ocx9").DefaultProperty,o=i("hayr").propertyPages,s=window.t("Brush");function a(e,t){this._constructor="LineToolBrush";var n=t||a.createProperties();r.call(this,e,n),this._finished=!1,i.e("lt-pane-views").then(function(e){var t=i("00XE").BrushPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,r),a.prototype.pointsCount=function(){return-1},a.prototype.finished=function(){return this._finished},a.prototype.finish=function(){this._finished=!0,this._lastPoint=null,this.normalizePoints(),this.createServerPoints()},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Brush"},a.prototype.hasEditableCoordinates=function(){return!1},a.prototype.percentDistance=function(e,t){return Math.abs((t-e)/e)},a.prototype.addPoint=function(e){if(this._finished)return!0;if(this._lastPoint=null,this._points.length>0){var t=this._points[this._points.length-1],i=this.pointToScreenPoint(t)[1];if(this.pointToScreenPoint(e)[1].subtract(i).length()<2)return this._finished}return r.prototype.addPoint.call(this,e),this._finished},a.prototype.restorePoints=function(e,t,i){r.prototype.restorePoints.call(this,e,t,i),this._finished=!0},a.prototype.getInputsPropertyPage=function(){return null},a.prototype.getStylesPropertyPage=function(){return o.LineToolBrushStylesPropertyPage},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("ZSes").BrushDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetoolbrush",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolBrush=a},"+q2u":function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererCrossShape",(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._drawItemShape=function(e,t,i){ var r=i.width,n=i.height,o=i.x-r/2,s=i.vertOffset,a=i.y-n/2+s,l=t.pixelRatio,c=this._lineWidth(t),u=c%2?.5:0,h=Math.round(o*l),d=Math.round((o+r)*l);(d-h)%2!=c%2&&(d+=1);var p=Math.floor((h+d)/2)+u,f=Math.round(a*l),_=Math.round((a+n)*l);(_-f)%2!=c%2&&(_+=1);var m=Math.floor((f+_)/2)+u;e.moveTo(p,f),e.lineTo(p,_),e.moveTo(h,m),e.lineTo(d,m)},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)},"//lt":function(e,t,i){"use strict";var r;i.r(t),i.d(t,"PaneCursorType",(function(){return r})),function(e){e[e.Default=0]="Default",e[e.Pointer=1]="Pointer",e[e.Eraser=2]="Eraser",e[e.Dot=3]="Dot",e[e.Grabbing=4]="Grabbing",e[e.ZoomIn=5]="ZoomIn",e[e.VerticalResize=6]="VerticalResize",e[e.HorizontalResize=7]="HorizontalResize"}(r||(r={}))},"/3z9":function(e,t,i){"use strict";i.r(t),i.d(t,"isMacKeyboard",(function(){return o})),i.d(t,"Modifiers",(function(){return r})),i.d(t,"modifiersFromEvent",(function(){return s})),i.d(t,"hashFromEvent",(function(){return a})),i.d(t,"humanReadableModifiers",(function(){return l})),i.d(t,"humanReadableHash",(function(){return h}));var r,n=i("qFKp"),o=Object(n.isMac)()||n.CheckMobile.iOS();function s(e){var t=0;return e.shiftKey&&(t+=1024),e.altKey&&(t+=512),e.ctrlKey&&(t+=256),e.metaKey&&(t+=2048),t}function a(e){return s(e)|e.keyCode}function l(e){var t="";return 256&e&&(t+=o?"^":"Ctrl + "),512&e&&(t+=o?"⌥":"Alt + "),1024&e&&(t+=o?"⇧":"Shift + "),2048&e&&(t+=o?"⌘":"Win + "),t}!function(e){e[e.None=0]="None",e[e.Alt=512]="Alt",e[e.Shift=1024]="Shift",e[e.Mod=o?2048:256]="Mod",e[e.Control=256]="Control",e[e.Meta=2048]="Meta"}(r||(r={}));for(var c={9:"⇥",13:"↵",27:"Esc",8:o?"⌫":"Backspace",32:"Space",35:"End",36:"Home",37:"←",38:"↑",39:"→",40:"↓",45:"Ins",46:"Del",191:"/"},u=1;u<=16;u++)c[u+111]="F"+u;function h(e){var t=l(e),i=255&e;return t+=i in c?c[i]:String.fromCharCode(i)}},"/5ju":function(e,t,i){"use strict";i.r(t);var r=i("mrSG"),n=i("UJLt"),o=i("hkLy"),s=i("zUrt"),a=i("Kxc7"),l=i("hY0g"),c=i.n(l),u=i("FQhm"),h=i("htUT"),d=i("/z0S"),p=i("BxxN");i("YFKU"),i("HbRj"),i("+GxX");i.d(t,"SaveChartService",(function(){return S}));var f={labelName:window.t("Chart layout name"),labelRename:window.t("Enter a new chart layout name"),error:window.t("Please enter chart layout name"),titleNew:window.t("Save New Chart Layout"),titleRename:window.t("Rename Chart Layout"),titleCopy:window.t("Copy Chart Layout"),valueCopy:window.t("{0} copy",{context:"ex: AAPL chart copy"})};function _(e,t,i,s){return Object(r.__awaiter)(this,void 0,void 0,(function(){var a;return Object(r.__generator)(this,(function(r){return a=new n.SaveRenameDialog({fields:[new o.InputField({name:"chart-title",label:e+":",error:t,maxLength:64})],title:i}),void 0!==s&&a.setField("chart-title",s),[2,a.show().then((function(e){return e["chart-title"]}))]}))}))}function m(e){ return Object(r.__awaiter)(this,void 0,void 0,(function(){return Object(r.__generator)(this,(function(t){return[2,_(f.labelRename,f.error,f.titleRename,e)]}))}))}function y(e){return Object(r.__awaiter)(this,void 0,void 0,(function(){return Object(r.__generator)(this,(function(t){return[2,_(f.labelRename,f.error,f.titleCopy,f.valueCopy.format(e))]}))}))}function g(e){return Object(r.__awaiter)(this,void 0,void 0,(function(){return Object(r.__generator)(this,(function(t){return[2,_(f.labelRename,f.error,f.titleNew,e)]}))}))}function v(){return Object(r.__awaiter)(this,void 0,void 0,(function(){return Object(r.__generator)(this,(function(e){return[2,new Promise((function(e){a.enabled("saved_charts_count_restriction")&&window.is_authenticated&&!window.user.is_pro?s.backend.getChartsCount((function(t){e(t<5)})):e(!0)}))]}))}))}var S=function(){function e(e,t){this._autosaveTimer=null,this._watchedAutoSaveEnabled=new c.a,this._toggleAutoSaveEnabledHandler=this._toggleAutoSaveEnabled.bind(this),this._chartWidgetCollection=e,this._chartSaver=t,this._chartChangesWatcher=new h.ChartChangesWatcher(e.undoHistory,t,u),e.saveKeysPressed().subscribe(this,this.saveChartOrShowTitleDialog),this._chartChangesWatcher.getOnChange().subscribe(this,this._onStateChanged)}return e.prototype.autoSaveEnabled=function(){return this._watchedAutoSaveEnabled},e.prototype.destroy=function(){0},e.prototype.cloneChart=function(){return Object(r.__awaiter)(this,void 0,void 0,(function(){var e,t;return Object(r.__generator)(this,(function(i){switch(i.label){case 0:return e=this._chartWidgetCollection,[4,v()];case 1:return i.sent()?[4,y(e.metaInfo.name.value())]:[3,3];case 2:return t=i.sent(),this._saveCurrentChartAsNewWithTitle(t),[3,5];case 3:return[3,5];case 4:i.sent().open(),i.label=5;case 5:return[2]}}))}))},e.prototype.saveChartAs=function(){Object(d.a)(this.cloneChart.bind(this),{source:"Clone chart"})},e.prototype.renameChart=function(){var e=this;Object(d.a)((function(){return Object(r.__awaiter)(e,void 0,void 0,(function(){var e,t;return Object(r.__generator)(this,(function(i){switch(i.label){case 0:return e=this._chartWidgetCollection,[4,m(e.metaInfo.name.value())];case 1:return t=i.sent(),e.metaInfo.name.setValue(t),this._doSave(),[2]}}))}))}),{source:"Rename chart"})},e.prototype.saveNewChart=function(e,t,i){return Object(r.__awaiter)(this,void 0,void 0,(function(){var n,o,s;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return n=this._chartWidgetCollection,o=n.metaInfo.name.value(),[4,v()];case 1:return r.sent()?[4,g(o)]:[3,3];case 2:return s=r.sent(),n.metaInfo.name.setValue(s),this._doSave(e,t,i),[3,5];case 3:return[3,5];case 4:r.sent().open(),r.label=5;case 5:return[2]}}))}))},e.prototype.saveExistentChart=function(e,t,i){this._doSave(e,t,i)},e.prototype.saveChartOrShowTitleDialog=function(e,t,i){var r=this,n=window.saver.isSaveInProcess(),o=this._chartChangesWatcher.hasChanges(),s=!!this._chartWidgetCollection.metaInfo.id.value();window.is_authenticated&&(n||!o&&s)||Object(d.a)((function(){ null!=r._chartWidgetCollection.metaInfo.id.value()?r.saveExistentChart(e,t,i):r.saveNewChart(e,t,i)}),{source:"Save chart",sourceMeta:"Chart"})},e.prototype.whenReadyToSave=function(e){this._chartSaver.whenReadyToSave(e)},e.prototype.saveToJSON=function(){return this._chartSaver.saveToJSON()},e.prototype.saveChartSilently=function(e,t,i){this._chartSaver.saveChartSilently(e,t,i)},e.prototype.setAutoSaveEnabled=function(e){var t=this;window.is_authenticated&&window.saver.isSaveInProcess()||Object(d.a)((function(){t._watchedAutoSaveEnabled.setValue(e)}),{source:"AutoSave chart"})},e.prototype._autoSaveEnabledSettingHandler=function(e){0},e.prototype._toggleAutoSaveEnabled=function(e){0},e.prototype._enableAutoSave=function(){0},e.prototype._disableAutoSave=function(){0},e.prototype._onStateChanged=function(e){e?this._startAutosave():this._stopAutosave()},e.prototype._saveCurrentChartAsNewWithTitle=function(e){var t=this._chartWidgetCollection;a.enabled("saveload_storage_customization")?(t.metaInfo.uid.deleteValue(),t.metaInfo.id.deleteValue(),t.metaInfo.name.setValue(e),this._doSave()):window.open(Object(p.a)({clone:t.metaInfo.uid.value(),name:e}),"_blank")},e.prototype._doSave=function(e,t,i,r){var n=this._chartWidgetCollection;void 0!==e&&e(),this._chartSaver.saveChartSilently((function(e){var i;i=n.metaInfo.uid.value(),"/chart/"===location.pathname&&(location.href="/chart/"+i),void 0!==t&&t(e)}),(function(){void 0!==i&&i()}),{autoSave:Boolean(r)})},e.prototype._startAutosave=function(){var e=this;a.enabled("charts_auto_save")&&null===this._autosaveTimer&&(this._autosaveTimer=setTimeout((function(){e._autosaveTimer=null,e._chartWidgetCollection.metaInfo.id.value()&&e._doSave(void 0,void 0,void 0,!0)}),6e4))},e.prototype._stopAutosave=function(){null!==this._autosaveTimer&&(clearInterval(this._autosaveTimer),this._autosaveTimer=null)},e}()},"/DxK":function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("p1SQ").LineToolHorzLinePriceAxisView,o=i("tc+8"),s=i("Ocx9").DefaultProperty,a=i("hayr").propertyPages,l=window.t("Horizontal Line");function c(e,t){this._constructor="LineToolHorzLine";var o=t||c.createProperties();this._priceAxisView=new n(this),r.call(this,e,o),i.e("lt-pane-views").then(function(e){var t=i("ckl+").HorzLinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(c,r),c.prototype.state=function(e){var t=r.prototype.state.call(this,e);return t.points&&0!==t.points.length&&(t.points[0].offset=0),t},c.prototype.pointsCount=function(){return 1},c.prototype.translatedType=function(){return l},c.prototype.name=function(){return"Horizontal Line"},c.prototype.priceAxisViews=function(e,t){return this.isSourceHidden()?null:t===this.priceScale()&&this.properties().showPrice.value()&&this._model.paneForSource(this)===e?[this._priceAxisView]:null},c.prototype.updateAllViews=function(){r.prototype.updateAllViews.call(this),this._priceAxisView.update()},c.prototype.canHasAlert=function(){return!0},c.prototype._getAlertPlots=function(){return[this.points()[0].price] },c.prototype.getInputsPropertyPage=function(){return a.LineToolHorzLineInputsPropertyPage},c.prototype.getStylesPropertyPage=function(){return a.LineToolHorzLineStylesPropertyPage},c.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("NEbb").HorizontalLineDefinitionsViewModel}.bind(null,i)).catch(i.oe)},c.prototype.template=function(){var e=r.prototype.template.call(this);return e.text=this.properties().childs().text.value(),e},c.prototype._applyTemplateImpl=function(e){r.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text)},c.createProperties=function(e){var t=new s("linetoolhorzline",e);return c._configureProperties(t),t},c._configureProperties=function(e){r._configureProperties(e),e.hasChild("text")||e.addChild("text",new o("")),e.addExclusion("text")},t.LineToolHorzLine=c},"/McG":function(e){ e.exports=JSON.parse('{"content":{"chartProperties":{"scalesProperties":{"textColor":"#5D606B","lineColor":"#787B86","backgroundColor":"#ffffff"},"paneProperties":{"vertGridProperties":{"color":"#F0F3FA"},"horzGridProperties":{"color":"#F0F3FA"},"background":"#ffffff"}},"sessions":{"graphics":{"backgrounds":{"outOfSession":{"color":"#2196F3","transparency":92}},"vertlines":{"sessBreaks":{"color":"#4985e7","style":2,"width":1}}}},"mainSourceProperties":{"baseLineColor":"#B2B5BE","candleStyle":{"borderColor":"#378658","upColor":"#26a69a","wickColor":"#737375","wickUpColor":"#26a69a","wickDownColor":"#ef5350","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350"},"haStyle":{"borderColor":"#378658","upColor":"#26a69a","wickColor":"#737375","wickUpColor":"#26a69a","wickDownColor":"#ef5350","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350"},"barStyle":{"downColor":"#ef5350","upColor":"#26a69a"},"pnfStyle":{"downColor":"#ef5350","upColor":"#26a69a","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae"},"baselineStyle":{"baselineColor":"rgba( 117, 134, 150, 1)","topFillColor1":"rgba( 38, 166, 154, 0.28)","topFillColor2":"rgba( 38, 166, 154, 0.05)","bottomFillColor1":"rgba( 239, 83, 80, 0.05)","bottomFillColor2":"rgba( 239, 83, 80, 0.28)","topLineColor":"rgba( 38, 166, 154, 1)","bottomLineColor":"rgba( 239, 83, 80, 1)"},"areaStyle":{"transparency":100,"color1":"rgba(33, 150, 243, 0.28)","color2":"#2196f3","linecolor":"#2196f3","linewidth":2,"linestyle":0},"renkoStyle":{"upColor":"#26a69a","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae","borderUpColorProjection":"#a9dcc3","borderDownColorProjection":"#f5a6ae","wickUpColor":"#26a69a","wickDownColor":"#ef5350"},"lineStyle":{"color":"#2196f3","linewidth":2,"linestyle":0},"kagiStyle":{"downColor":"#ef5350","upColor":"#26a69a","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae"},"pbStyle":{"upColor":"#26a69a","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae","borderUpColorProjection":"#a9dcc3","borderDownColorProjection":"#f5a6ae"},"rangeStyle":{"upColor":"#26a69a","downColor":"#ef5350","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae"}}}}')},"/ToI":function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return a}));var r=i("mrSG"),n=i("Eyy1"),o=function(e){function t(t,i,r,n){var o=e.call(this,t,i,n)||this;return o._sourcePaneRemoved=!1,o._targetPaneIndex=t.panes().indexOf(r),o}return Object(r.__extends)(t,e),t.prototype.redo=function(){for(var e=this._chartModel.panes()[this._initialPaneIndex],t=this._chartModel.panes()[this._targetPaneIndex],i=e!==t,r=this._targetPriceScale(t),o=Object(n.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),s=0,a=this._chartModel.children(o,!0);s1),u.fullscreen.setValue(se===u)}else u&&n(u)}xe(),De(),function(){for(var e=H.count,t=e,i=0;i1)}(),t(),F.forEach((function(e){e.chartWidget.onZoom().subscribe(this,(function(e){fe.fire(e)}))})),z.value()<1&&l>0&&F[l-1].rdState.bridge().attach()}function De(){var e=Math.min(H.count,F.length)-1;if(e<0)R.deleteValue();else{var t=j;t<0&&(t=0),t>e&&(t=e),R.setValue(F[t].chartWidget)}}function Ve(){for(var e=F.length;e--;){var t=e===j;$(F[e].container.value()).toggleClass("active",t).toggleClass("inactive",!t)}}function Be(){}k.seriesControlBarEnabled&&(me=V+B+"px",(ye=document.createElement("div")).style.left=me,ye.style.right=me,ye.style.bottom=me,ye.classList.add("chart-toolbar","chart-controls-bar"),he[0].appendChild(ye),Promise.all([i.e("react"),i.e(2),i.e(3),i.e(8),i.e(9),i.e(22),i.e(23),i.e(25),i.e(43),i.e(45),i.e(46),i.e(59),i.e(62),i.e(67),i.e(0),i.e(1),i.e(10),i.e(12),i.e(15),i.e(49),i.e("chart-bottom-toolbar")]).then(function(e){var r=i("MfqI").BottomToolbarRenderer,n=k.resizerBridge,o=[n.container.spawn(),n.width.spawn(),n.height.spawn()],s=n.container.value(),a=new t,l=function(){a.fire()};o.forEach((function(e){e.subscribe(l)})),ge=new r(ye,a,(function(){var e=s.getBoundingClientRect(),t=Se();return t.top=e.top+t.top,t.left=e.left+t.left,t}),A,ChartApiInstance,ae,k.seriesControlBar),ve=function(){null!==ge&&(ge.destroy(),ge=null,ye.remove(),ye=null),o.forEach((function(e){e.destroy()})),a.destroy()}}.bind(null,i)).catch(i.oe)),ne.subscribe(xe),oe.subscribe(xe),this.updateLayout=xe;var Re=new t,Ne=new g,Fe=new g,je=null;function We(e){var t=e.mainSeries().properties();t.style.subscribe(null,ze),ze(t.style),e.model().onSelectedSourceChanged().subscribe(null,He),He(e.selection().sources())}function ze(e){Ne.setValue(e.value())}function He(){var e=je.model();Fe.setValue(e.selection().sources())}function Ue(e){for(var t=!1,i=0;i=o[e].count)return e;return"s"}function Xe(e,t){if(K=!0,Z=Boolean(t),G=[],e){e.charts||(e={layout:"s",charts:[e]});var i=new Set;e.charts.forEach((function(e){e.chartId&&i.add(e.chartId)})),e.charts.forEach((function(e){if(!e.chartId){var t=ke((function(e){return i.has(e)}));i.add(t),e.chartId=t}})),U=Je(e.layout||"s");for(var r=0;r1},setActive:Ke,inlineChartsCount:z.readonly(),revertToInline:function(){Oe(null);for(var e=0;e0||e.status()===L.STATUS_INVALID_SYMBOL||e.status()===L.STATUS_NO_BARS)tt();else{var i=e.dataEvents(),r=function(){tt(),i.barReceived().unsubscribe(null,r),i.completed().unsubscribe(null,r),i.error().unsubscribe(null,r)};i.barReceived().subscribe(null,r),i.completed().subscribe(null,r),i.error().subscribe(null,r)}}))}})),a()){var it=h.tool.setValue;h.tool.setValue=function(){A.selectedSources.value()&&A.activeChartWidget.value().model().lineBeingCreated()&&A.activeChartWidget.value().model().cancelCreatingLine(),it.apply(h.tool,arguments)}}Promise.all(F.map((function(e){return S(e.chartWidget.modelCreated()).promise}))).then((function(){return Promise.all(F.map((function(e){return S(e.chartWidget.model().mainSeries().dataEvents().symbolResolved()).promise})))})).then((function(){window.saver&&window.is_authenticated&&k.widgetOptions.justCloned&&window.saver.saveChartSilently()})).catch(P.logError.bind(P))}}).call(this,i("aIyQ"))},"/YGI":function(e,t,i){"use strict";i.r(t);var r,n=i("mrSG"),o=i("0YCj"),s=i.n(o);!function(e){e.StudyCannotBeChild="cannot_be_child",e.StubWasRemoved="stub_was_removed",e.CannotGetMetainfo="cannot_get_metainfo",e.Cancelled="cancelled",e.Unknown="unknown"}(r||(r={}));var a=i("uOxu");i.d(t,"StudyInserter",(function(){return c}));var l=Object(a.getLogger)("Chart.Studies.StudyInserter"),c=function(){function e(e,t,i){this._parentSource=void 0,this._propsState=void 0,this._preferredPriceScale=void 0,this._allowChangeCurrency=!1,this._paneSize=void 0,this._forceOverlay=!1,this._studyMetaInfoRepository=t,this._inserterImpl=i,this._studyDescriptor=e}return e.prototype.setParentSource=function(e){this._parentSource=e||void 0},e.prototype.setPaneSize=function(e){this._paneSize=e},e.prototype.setPreferredPriceScale=function(e){this._preferredPriceScale=e},e.prototype.setAllowChangeCurrency=function(e){this._allowChangeCurrency=e},e.prototype.setForceOverlay=function(e){this._forceOverlay=e},e.prototype.setPropertiesState=function(e){this._propsState=e},e.prototype.insert=function(e,t){return Object(n.__awaiter)(this,void 0,void 0,(function(){var i,o,s,a,c,u,h;return Object(n.__generator)(this,(function(d){switch(d.label){case 0:p=this._inserterImpl,i=void 0!==p.createStub&&void 0!==p.removeStub?this._inserterImpl.createStub():null,o=!0,d.label=1;case 1:return d.trys.push([1,3,4,5]),[4,this._studyMetaInfoRepository.findById(this._studyDescriptor)];case 2:return s=d.sent(),[3,5];case 3:return d.sent(), l.logWarn("Cannot get study "+JSON.stringify(this._studyDescriptor)),[2,Promise.reject(r.CannotGetMetainfo)];case 4:return null!==i&&(o=this._inserterImpl.removeStub(i)),[7];case 5:return o?void 0!==t&&t.cancelled?[2,Promise.reject(r.Cancelled)]:this._canApplyStudyToParent(s)?(a=Object(n.__assign)({},s.defaults.inputs),void 0===e?[3,7]:[4,e(a,s.inputs,s)]):[2,Promise.reject(r.StudyCannotBeChild)]:[2,Promise.reject(r.StubWasRemoved)];case 6:return u=d.sent(),[3,8];case 7:u={},d.label=8;case 8:return c=u,void 0!==t&&t.cancelled?[2,Promise.reject(r.Cancelled)]:null===(h=this._insertStudy(s,c))?[2,Promise.reject(r.Unknown)]:[2,h]}var p}))}))},e.prototype._insertStudy=function(e,t){return this._inserterImpl.createStudy(e,t,null,this._propsState,this._forceOverlay,this._parentSource,this._preferredPriceScale,this._allowChangeCurrency,this._paneSize)},e.prototype._canApplyStudyToParent=function(e){return void 0===this._parentSource||s.a.canBeChild(e)},e}()},"/b+7":function(e,t){e.exports=''},"/bs+":function(e,t,i){"use strict";i.r(t),i.d(t,"barTimeToEndOfPeriod",(function(){return n})),i.d(t,"endOfPeriodToBarTime",(function(){return o}));var r=i("E6p6");function n(e,t,i,n){if(n.isDays())return i;if(e.moveTo(1e3*i),n.isIntraday()){var o=e.indexOfBar(1e3*i);if(o<0)throw new Error(i+" is out of the instrument session ");return e.endOfBar(o)/1e3}return e.startOfBar(r.SessionStage.LASTBAR_SESSION)/1e3}function o(e,t,i,r){if(r.isDays())return i;var n=1e3*i-1;if(e.moveTo(n),r.isIntraday()){var o=e.indexOfBar(n);if(o<0)throw new Error(i+" is out of the instrument session ");return e.startOfBar(o)/1e3}return i=e.startOfBar(0)/1e3}},"/hKg":function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererCandles",(function(){return a}));var r=i("Eyy1"),n=i("VdBB"),o=i("gAom"),s=i("Zp/P"),a=function(){function e(e){this._bars=[],this._barSpacing=1,this._barWidth=1,this._borderVisible=!1,this._barBorderWidth=1,this._wickVisible=!1,this._bodyVisible=!0,this._borderColor=void 0,this._wickColor=void 0,this._hittest=void 0,e&&this.setData(e)}return e.prototype.setData=function(e){this._bars=e.bars,this._barSpacing=e.barSpacing,this._borderVisible=e.borderVisible,this._bodyVisible=e.bodyVisible,this._wickVisible=e.wickVisible,this._borderColor=e.borderColor,this._wickColor=e.wickColor,this._hittest=e.hittest},e.prototype.hitTest=function(e){var t=this._bars,i=.5*this._barSpacing ;if(0===t.length)return null;if(e.xt[t.length-1].time+i)return null;for(var r=null,o=0,a=t;o=2)Math.floor(i)%2!=this._barWidth%2&&this._barWidth--;this._wickVisible&&this._drawWicks(e,i),this._borderVisible&&this._drawBorder(e,i),this._bodyVisible&&this._drawCandles(e,i)}},e.prototype._drawWicks=function(e,t){var i=this._bars,n="",o=Math.min(Math.floor(t),Math.floor(this._barSpacing*t));o=Math.max(Math.floor(t),Math.min(o,this._barWidth));for(var s=Math.floor(.5*o),a=null,l=0,c=i;l2*n)Object(o.fillRectInnerBorder)(e,u,d,h-u+1,p-d+1,n);else{var f=h-u+1;e.fillRect(u,d,f,p-d+1)}s=h}}},e.prototype._drawCandles=function(e,t){for(var i="",r=this._calculateBorderWidth(t),n=0,s=this._bars;nc)continue;e.fillRect(u,l,h-u+1,c-l+1)}}}},e}()},"/jjs":function(e,t,i){"use strict";i.r(t),i.d(t,"Magnet",(function(){return s}));var r=i("Eyy1"),n=i("4o++"),o=i("zL3Q"),s=function(){function e(){}return e.prototype.align=function(e,t,i){var s=e;if(!Object(o.a)().value())return s;var a=i.mainDataSource();if(null===a)return s ;var l=a.model().mainSeries();if(a!==l)return s;var c=l.priceScale(),u=l.bars();if(c.isEmpty()||!u.contains(t))return s;var h=u.valueAt(t);if(null===h)return s;var d=[h[1],h[2],h[3],h[4]],p=Object(r.ensure)(l.firstValue()),f=d.map((function(e){return{y:c.priceToCoordinate(e,p),price:e}})),_=c.priceToCoordinate(e,p);f.sort((function(e,t){return Math.abs(e.y-_)-Math.abs(t.y-_)}));var m=f[0];return(Object(o.b)().value()===n.MagnetMode.StrongMagnet||Math.abs(m.y-_)<50)&&(s=m.price),s},e}()},"/kal":function(e,t){e.exports=''},"/mDy":function(e,t,i){},"/tGj":function(e,t,i){"use strict";function r(e){return e.symbolSource()===e}i.r(t),i.d(t,"isSymbolSource",(function(){return r}))},"/z0S":function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var r=i("Kxc7");function n(e,t){r.enabled("saveload_requires_authentication")?window.runOrSignIn(e,t):e()}},"08i5":function(e,t,i){"use strict";var r,n;i.r(t),i.d(t,"AlertStatus",(function(){return r})),i.d(t,"Direction",(function(){return n})),function(e){e[e.Waiting=0]="Waiting",e[e.Success=1]="Success",e[e.Failure=2]="Failure"}(r||(r={})),function(e){e[e.Up=1]="Up",e[e.Down=2]="Down"}(n||(n={}))},"0F0w":function(e,t,i){"use strict";i.r(t);var r=i("mrSG"),n=i("aIyQ"),o=i.n(n),s=i("Eyy1"),a=i("hY0g"),l=i.n(a),c=i("0waE"),u=i("uOxu"),h=Object(u.getLogger)("ChartApi.AbstractSession"),d=function(){function e(e,t,i){this._isConnected=new l.a(!1),this._state=0,this._isConnectForbidden=!1,this._sessionId="",this._sessionIdChanged=new o.a,this._chartApi=e,this._sessionPrefix=t,this._shouldReconnectAfterCriticalError=i}return e.prototype.destroy=function(){this._logNormal("Destroying session"),this._isConnected.unsubscribe(),this.disconnect(),this._sessionIdChanged.destroy(),delete this._chartApi,this._logNormal("Session has been destroyed")},e.prototype.isConnected=function(){return this._isConnected},e.prototype.sessionId=function(){return this._sessionId},e.prototype.onSessionIdChanged=function(){return this._sessionIdChanged},e.prototype.connect=function(){0===this._state&&(Object(s.assert)(!this._isConnectForbidden,"Cannot call connect because it is forbidden at this moment"),this._setSessionId(this._sessionPrefix+"_"+Object(c.randomHash)()),this._logNormal("Connecting session - wait until transport stay connected"),this._state=1,this._chartApi.createSession(this._sessionId,this))},e.prototype.disconnect=function(){var e=this;0!==this._state&&(Object(s.assert)(""!==this._sessionId,"sessionId must not be invalid"),this._logNormal("Disconnecting session..."),this._forbidConnectWhile((function(){e._chartApi.connected()&&e._sendRemoveSession(),e._processDestroyingOnServer()})))},e.prototype.onMessage=function(e){switch(e.method){ case"connected":return void this._onChartApiConnected();case"disconnected":return void this._onChartApiDisconnected();case"critical_error":var t=String(e.params[0]),i=String(e.params[1]);return void this._onCriticalError(t,i)}this._onMessage(e)},e.prototype._getChartApi=function(){return this._chartApi},e.prototype._generateLogMessage=function(e){return"["+this._sessionId+"] "+e},e.prototype._onCriticalError=function(e,t){var i=this;this._logError("Critical error. Reason="+e+", info="+t+"."),this._forbidConnectWhile((function(){i._processDestroyingOnServer()})),this._shouldReconnectAfterCriticalError?(this._logNormal("Reconnecting after critical error..."),this.connect()):this._logNormal("Reconnecting after critical error skipped")},e.prototype._onChartApiConnected=function(){Object(s.assert)(1===this._state,"Session is not registered"),this._logNormal("Transport is connected. Creating session on the server"),this._sendCreateSession(),this._state=2,this._isConnected.setValue(!0)},e.prototype._onChartApiDisconnected=function(){var e=this;this._logNormal("Transport is disconnected. Reconnecting..."),this._forbidConnectWhile((function(){e._processDestroyingOnServer()})),this.connect()},e.prototype._setSessionId=function(e){var t=this._sessionId;this._logNormal("Changing sessionId: old="+t+", new="+e),this._sessionId=e,this._sessionIdChanged.fire(e,t)},e.prototype._logNormal=function(e){h.logNormal(this._generateLogMessage(e))},e.prototype._logError=function(e){h.logError(this._generateLogMessage(e))},e.prototype._processDestroyingOnServer=function(){this._state=0,this._isConnected.setValue(!1),this._chartApi.removeSession(this._sessionId),this._setSessionId("")},e.prototype._forbidConnectWhile=function(e){this._isConnectForbidden=!0,e(),this._isConnectForbidden=!1},e}();i.d(t,"ChartSession",(function(){return p}));Object(u.getLogger)("ChartSession");var p=function(e){function t(t,i){void 0===i&&(i=!1);var r=e.call(this,t,"cs",!1)||this;return r._sessionDisabled=!1,r._handler=null,r._criticalError=new o.a,r._disableStatistics=i,r}return Object(r.__extends)(t,e),t.prototype.destroy=function(){this._criticalError.destroy(),this._handler=null,e.prototype.destroy.call(this)},t.prototype.serverTimeOffset=function(){return this._getChartApi().serverTimeOffset()},t.prototype.switchTimezone=function(e){return this._getChartApi().switchTimezone(this.sessionId(),e)},t.prototype.defaultResolutions=function(){return this._getChartApi().defaultResolutions()},t.prototype.availableCurrencies=function(){return this._getChartApi().availableCurrencies()},t.prototype.resolveSymbol=function(e,t,i){return this._getChartApi().resolveSymbol(this.sessionId(),e,t,i)},t.prototype.requestFirstBarTime=function(e,t,i){return this._getChartApi().requestFirstBarTime(this.sessionId(),e,t,i)},t.prototype.createSeries=function(e,t,i,r,n,o){return this._getChartApi().createSeries(this.sessionId(),e,t,i,r,n,o)},t.prototype.modifySeries=function(e,t,i,r,n){return this._getChartApi().modifySeries(this.sessionId(),e,t,i,r,n)}, t.prototype.removeSeries=function(e,t){return!!this.isConnected().value()&&this._getChartApi().removeSeries(this.sessionId(),e,t)},t.prototype.requestMoreData=function(e,t,i){return this._getChartApi().requestMoreData(this.sessionId(),e,t,i)},t.prototype.requestMoreTickmarks=function(e,t,i){return this._getChartApi().requestMoreTickmarks(this.sessionId(),e,t,i)},t.prototype.requestMetadata=function(e,t){var i=this;i._getChartApi().requestMetadata(i.sessionId(),e,t)},t.prototype.isCanCreateStudy=function(e){return this._getChartApi().isCanCreateStudy(e)},t.prototype.createStudy=function(e,t,i,r,n,o,s){return this._getChartApi().createStudy(this.sessionId(),e,t,i,r,n,o,s)},t.prototype.rebindStudy=function(e,t,i,r,n,o,s){return this._getChartApi().rebindStudy(this.sessionId(),e,t,i,r,n,o,s)},t.prototype.modifyStudy=function(e,t,i,r){return this._getChartApi().modifyStudy(this.sessionId(),e,t,i,r)},t.prototype.removeStudy=function(e,t,i){return this._getChartApi().removeStudy(this.sessionId(),e,t,i)},t.prototype.createPointset=function(e,t,i,r,n,o){return this._getChartApi().createPointset(this.sessionId(),e,t,i,r,n,o)},t.prototype.modifyPointset=function(e,t,i,r){return this._getChartApi().modifyPointset(this.sessionId(),e,t,i,r)},t.prototype.removePointset=function(e){return this._getChartApi().removePointset(this.sessionId(),e)},t.prototype.setVisibleTimeRange=function(e,t,i,r,n){this._getChartApi().setVisibleTimeRange(e,this.sessionId(),t,i,r,n)},t.prototype.criticalError=function(){return this._criticalError},t.prototype.connect=function(t){void 0===t&&(t=null),null!==t&&(this._handler=t),e.prototype.connect.call(this)},t.prototype.setHandler=function(e){this._handler=e},t.prototype.connected=function(){return this.isConnected().value()&&!this._sessionDisabled},t.prototype.disable=function(){this._sessionDisabled=!0},t.prototype.chartApi=function(){return this._getChartApi()},t.prototype._sendCreateSession=function(){var e=this;Object.keys(this).forEach((function(t){/^(s|st|symbol_)\d+$/.test(t)&&delete e[t]})),this._getChartApi().chartCreateSession(this.sessionId(),this._disableStatistics)},t.prototype._sendRemoveSession=function(){this._getChartApi().chartDeleteSession(this.sessionId())},t.prototype._onMessage=function(e){this._handler&&this._handler(e)},t.prototype._onCriticalError=function(t,i){this._criticalError.fire(t,i),e.prototype._onCriticalError.call(this,t,i)},t}(d)},"0Pxc":function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("GEp6").distanceToLine,o=i("hfHJ"),s=o.rotationMatrix,a=o.scalingMatrix,l=o.translationMatrix,c=o.transformPoint,u=i("Ss5c").LineDataSource,h=i("Ocx9").DefaultProperty,d=i("hayr").propertyPages,p=window.t("Arc");function f(e,t){this._constructor="LineToolArc";var r=t||f.createProperties();u.call(this,e,r),this.version=f.version,i.e("lt-pane-views").then(function(e){var t=i("dKqZ").ArcPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(f,u),f.prototype.startChanging=function(e,t){if(u.prototype.startChanging.call(this,e,t), 0===e||1===e){var i=this.pointToScreenPoint(this._points[0])[0],o=this.pointToScreenPoint(this._points[1])[0],s=this.pointToScreenPoint(this._points[2])[0];this._dist=n(i,o,s).distance;var a=o.subtract(i),l=new r(-a.y,a.x),c=i.add(o).scaled(.5);s.subtract(c).dotProduct(l)<0&&(this._dist=-this._dist)}},f.prototype.pointsCount=function(){return 3},f.prototype.translatedType=function(){return p},f.prototype.name=function(){return"Arc"},f.prototype.hasEditableCoordinates=function(){return!1},f.prototype.setPoint=function(e,t){var i=Object.assign({},t),o=this.pointToScreenPoint(this._points[0])[0],u=this.pointToScreenPoint(this._points[1])[0],h=this.pointToScreenPoint(this._points[2])[0];switch(e){case 0:o=this.pointToScreenPoint(i)[0];var d=u.subtract(o),p=o.add(u).scaled(.5);_=(_=new r(-d.y,d.x)).normalized(),h=p.add(_.scaled(this._dist)),h=this.screenPointToPoint(h),this._points[0]=i,this._points[2]=h;break;case 1:var f=n(o,u,h).distance;d=(u=this.pointToScreenPoint(i)[0]).subtract(o),p=o.add(u).scaled(.5);_=(_=new r(-d.y,d.x)).normalized(),h=p.add(_.scaled(this._dist)),h=this.screenPointToPoint(h),this._points[1]=i,this._points[2]=h;break;case 2:i=this.pointToScreenPoint(i)[0];var _;f=n(o,u,i).distance,d=u.subtract(o),p=o.add(u).scaled(.5);_=(_=new r(-d.y,d.x)).normalized(),h=p.add(_.scaled(f));var m=p.add(_.scaled(-f)),y=d.length(),g=d.x/y,v=d.y/y,S=Math.acos(g);v<0&&(S=-S);var b=l(-p.x,-p.y);i=c(b,i);var w=c(b,h);b=s(-S),i=c(b,i),w=c(b,w),b=a(1,y/(2*f)),i=c(b,i),w=c(b,w);var P=i.y*w.y>=0?new r(h.x,h.y):new r(m.x,m.y);P=this.screenPointToPoint(P),this._points[2]=P}this.normalizePoints()},f.version=2,f.prototype.migrateVersion=function(e,t,i){if(1===e&&2===this._points.length){var r=(2*this._points[0].price+3*this._points[1].price)/5;this._points.append({price:r,index:this._points[1].index})}if(1===e&&2===this._timePoint.length){var n={price:r=(2*this._timePoint[0].price+3*this._timePoint[1].price)/5,offset:this._timePoint[1].offset,time_t:this._timePoint[1].time_t};this._timePoint.append(n)}},f.prototype.getInputsPropertyPage=function(){return null},f.prototype.getStylesPropertyPage=function(){return d.LineToolArcStylesPropertyPage},f.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)},f.createProperties=function(e){var t=new h("linetoolarc",e);return f._configureProperties(t),t},f._configureProperties=function(e){u._configureProperties(e)},t.LineToolArc=f},"0YCj":function(e,t,i){"use strict";(function(e,t){i("Eyy1").assert;var r=i("uOxu").getLogger("Chart.Study.MetaInfo"),n=i("9iCb").applyOverridesToStudyDefaults,o=null;function s(e){TradingView.merge(this,{palettes:{},inputs:[],plots:[],graphics:{},defaults:{}}),TradingView.merge(this,e);var t=e.fullId||e.id;TradingView.merge(this,s.parseIdString(t)),this.name=this.id}s.VERSION_STUDY_ARG_SOURCE=41,s.METAINFO_FORMAT_VERSION_SOS_V2=42,s.VERSION_PINE_PROTECT_TV_4164=43, s.CURRENT_METAINFO_FORMAT_VERSION=51,s.VERSION_NEW_STUDY_PRECISION_FORMAT=46,s.CHILD_STUDY_ALLOWED_PLOT_TYPES=["line"],s.canPlotBeSourceOfChildStudy=function(e){return s.CHILD_STUDY_ALLOWED_PLOT_TYPES.includes(e)},s.CHILD_STUDY_EXCLUDE_IDS=["CorrelationCoefficient@tv-basicstudies","Correlation - Log@tv-basicstudies-1"],s.CHILD_STUDY_PARENT_EXCLUDE_IDS=[],s.FilledArea={},s.FilledArea.TYPE_PLOTS="plot_plot",s.FilledArea.TYPE_HLINES="hline_hline",s.versionOf=function(e){var t="_metainfoVersion"in e&&isNumber(e._metainfoVersion)?e._metainfoVersion:0;return t<0&&r.logError("Metainfo format version cannot be negative: "+t),t},s.parseIdString=function(e){var t={};if(-1===e.indexOf("@"))t.shortId=e,t.packageId="tv-basicstudies",t.id=e+"@"+t.packageId,t.version=1;else{var i=e.split("@");t.shortId=i[0];var r=i[1].split("-");if(3===r.length)t.packageId=r.slice(0,2).join("-"),t.id=t.shortId+"@"+t.packageId,t.version=r[2];else if(1===r.length&&"decisionbar"===r[0])t.packageId="les-"+r[0],t.id=t.shortId+"@"+t.packageId,t.version=1;else{if(1!==r.length)throw new Error("unexpected study id:"+e);t.packageId="tv-"+r[0],t.id=t.shortId+"@"+t.packageId,t.version=1}}if(t.fullId=t.id+"-"+t.version,"tv-scripting"===t.packageId){var n=t.shortId;if(0===n.indexOf("Script$")||0===n.indexOf("StrategyScript$")){var o=n.indexOf("_");t.productId=o>=0?n.substring(0,o):t.packageId}else t.productId=t.packageId}else t.productId=t.packageId;return t},s.getPackageName=function(e){return(/^[^@]+@([^-]+-[^-]+)/.exec(e||"")||[0,"tv-basicstudies"])[1]},s.cutDollarHash=function(e){var t=e.indexOf("$"),i=e.indexOf("@");return-1===t?e:e.substr(0,t)+(i>=0?e.substr(i):"")},s.hasUserIdSuffix=function(e){return/^USER;[\d\w]+;\d+$/.test(e)},s.isStandardPine=function(e){return/^(Strategy)?Script\$STD;.*@tv-scripting$/.test(e)},s.getSourceIdByInputs=function(e,t){if(!Array.isArray(e)||!t)return null;for(var i=0;i0){var l=a.replace(/^[^\$]+/,i);r.inputs[o.id].setValue(l)}}}},s.patchChildStudyMetaInfoState=function(e){e.state&&function e(t){if("object"==typeof t)for(var i in t)"string"==typeof t[i]&&/^[^\$]+\$\d+$/.test(t[i])?t[i]=t[i].replace(/^[^\$]+/,"{pid}"):e(t[i])}(e.state.inputs),e.state.isChildStudy=!0},s.prototype.parseValue=function(e,t){return"bool"===e?TradingView.parseBool(t):t},s.prototype.defaultInputs=function(){for(var e=[],t=0;t0?e[0].id:null},s.prototype.createDefaults=function(){if(this.defaults){var e=TradingView.clone(this.defaults);e.precision="default";var t=s.getStudyPropertyRootName(this);defaults.create(t,e)}},s.prototype.removeDefaults=function(){defaults.remove(s.getStudyPropertyRootName(this))},s.findStudyMetaInfoByDescription=function(e,t){if(e){for(var i=0;ii&&(s=e,o=t)}for(var l=new r(e,t),c=this._pane.state(),u=n.length-1;u>=0;--u){var h=n[u],d=h.priceAxisViews(c,this._priceScale);if(d&&0!==d.length)for(var p=d.length-1;p>=0;--p){var f=d[p].renderer();if(null!==f&&void 0!==f.hitTest){var _=f.hitTest(l,this._size.w,this._isLeft?"left":"right");null!==_&&a(_,h)}}}return o},L.prototype._setCursorClassName=function(e){var t="";e&&(t="price-axis--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._cell.classList.remove(this._currentCursorClassName),t&&this._cell.classList.add(t),this._currentCursorClassName=t)},L.prototype.mouseClickEvent=function(e){var t=this.dataSourceAtPoint(e.localX,e.localY);t&&this._pane.chart().model().selectionMacro((function(e){e.selection().isSelected(t)||(e.clearSelection(),e.addSourceToSelection(t))}))},L.prototype.mouseMoveEvent=function(e){this._priceScale&&(this.dataSourceAtPoint(e.localX,e.localY)?this._setCursorClassName("pointer"):this._setResizeCursor())},L.prototype._zoomAvailable=function(){return!this.priceScale().isEmpty()&&this._pane.chart().model().model().zoomEnabled()&&this._options.pressedMouseMoveScale},L.prototype.mouseDownEvent=function(e){if(this._zoomAvailable()){var t=this._pane.chart().model(),i=this._pane.state();this._mousedown=!0,t.startScalePrice(i,this.priceScale(),e.localY)}},L.prototype.pressedMouseMoveEvent=function(e){if(this._zoomAvailable()){var t=this._pane.chart().model(),i=this._pane.state(),r=this.priceScale();t.scalePriceTo(i,r,e.localY)}},L.prototype.mouseDownOutsideEvent=function(e){if(this._zoomAvailable()&&this._pane.hasState()){var t=this._pane.chart().model(),i=this._pane.state(),r=this.priceScale();this._mousedown&&(this._mousedown=!1,t.endScalePrice(i,r),this.restoreDefaultCursor())}},L.prototype.mouseUpEvent=function(e){if(this._zoomAvailable()){var t=this._pane.chart().model(),i=this._pane.state(),r=this.priceScale();this._mousedown=!1,t.endScalePrice(i,r),this.restoreDefaultCursor()}},L.prototype.mouseEnterEvent=function(e){this._setResizeCursor()},L.prototype.mouseLeaveEvent=function(e){this._setCursorClassName("")},L.prototype._setResizeCursor=function(){this._priceScale.isPercentage()||this._priceScale.isIndexedTo100()?this._setCursorClassName(""):this._pane.chart().model().model().zoomEnabled()&&this._setCursorClassName("ns-resize")},L.prototype._initActions=function(e){if(this._pane.hasState()&&null===this.actions){this.actions={};var t=this,r=this._pane.chart().model();this.actions.reset=new a({ label:window.t("Reset Price Scale"),icon:i("LdoW"),shortcut:"Alt+R",shortcutHint:n.humanReadableHash(n.Modifiers.Alt+82),statName:"ResetScale",onExecute:L.prototype.reset.bind(this)}),this.actions.setAutoScale=new a({label:window.t("Auto (Fits Data To Screen)"),checkable:!0,checked:!0,statName:"ToggleAutoScale",onExecute:function(){r.togglePriceScaleAutoScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setPercentage=new a({label:window.t("Percent",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isPercentage(),statName:"TogglePercantage",onExecute:function(){r.togglePriceScalePercentageScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setIndexedTo100=new a({label:window.t("Indexed to 100",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isIndexedTo100(),statName:"ToggleIndexedTo100",onExecute:function(){r.togglePriceScaleIndexedTo100ScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setLog=new a({label:window.t("Logarithmic",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isLog(),statName:"ToggleLogScale",onExecute:function(){r.togglePriceScaleLogScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setRegular=new a({label:window.t("Regular",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isRegular(),statName:"ToggleRegularScale",onExecute:function(){r.setPriceScaleRegularScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.alignLabels=new a({label:window.t("No Overlapping Labels",{context:"scale_menu"}),checkable:!0,checked:!1,statName:"TogglePreciseLabels"}),this.actions.alignLabels.binding=new g(this.actions.alignLabels,this.priceScale().properties().alignLabels,this._pane.chart().model(),"No Overlapping Labels"),this.actions.invertScale=new a({label:window.t("Invert Scale",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isInverted(),statName:"Invert Scale",onExecute:function(){r.invertPriceScale(t.priceScale()),t._updateScalesActions()}}),this._updateScalesActions()}},L.prototype._logAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().logSeriesScale:this.actions.setLog},L.prototype._percentageAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().percentSeriesScale:this.actions.setPercentage},L.prototype._indexedTo100Action=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().indexedTo100SeriesScale:this.actions.setIndexedTo100},L.prototype._autoScaleAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().autoSeriesScale:this.actions.setAutoScale},L.prototype._regularScaleAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().regularSeriesScale:this.actions.setRegular},L.prototype._lockScaleAction=function(){var e=this._pane.chart().actions().lockSeriesScale,t=M(this.priceScale(),this._pane.chart().model().model().mainSeriesScaleRatio());return e.update({hint:t}),e},L.prototype._invertAction=function(){ return this._isMainSeriesAxis()?this._pane.chart().actions().invertSeriesScale:this.actions.invertScale},L.prototype._isMainSeriesAxis=function(){return this.priceScale().hasMainSeries()},L.prototype._updateMainSeriesScalesActions=function(){this._isMainSeriesAxis()&&null!==this.actions&&this._updateScalesActions()},L.prototype._updateScalesActions=function(){var e=this.priceScale(),t=this._isMainSeriesAxis(),i=e.mainSource().properties(),r=t&&e.isLockScale(),n=t&&i.style.value()===TradingView.Series.STYLE_PNF;this.actions.setRegular.update({checked:e.isRegular(),disabled:r||n}),this.actions.setPercentage.update({checked:e.isPercentage(),disabled:r||n}),this.actions.setIndexedTo100.update({checked:e.isIndexedTo100(),disabled:r||n}),this.actions.setLog.update({checked:e.isLog(),disabled:r||n}),this.actions.setAutoScale.update({checked:e.isAutoScale(),disabled:e.properties().autoScaleDisabled.value()})},L.prototype.mouseDoubleClickEvent=function(e){var t=this.dataSourceAtPoint(e.localX,e.localY);t?this._pane.processDoubleClickOnSource(t):(this.reset(),y("GUI","Double click price scale"))},L.prototype.contextMenuEvent=function(e){if(this._options.contextMenuEnabled){var t=this.dataSourceAtPoint(e.localX,e.localY);if(null!==t&&this._options.contextMenu.source)return void this._pane.chart().model().selectionMacro(function(i){i.selection().isSelected(t)||(i.clearSelection(),i.addSourceToSelection(t)),this._pane.showContextMenuForSelection(e)}.bind(this));this._options.contextMenu.general&&this._createContextMenu().then((function(t){t.show(e)}))}},L.prototype._createContextMenu=function(){return c.createMenu(this.getContextMenuActions(),{statName:"PriceScaleContextMenu"})},L.prototype._createMergeScalesAction=function(){var e=this._pane.chart().actions(),t=this._pane.chart().model().model().priceScaleSlotsCount();if(t.left+t.right===1)return 0===t.left?e.moveScaleToLeft:e.moveScaleToRight;var i=[];return i.push(e.mergeLeftScalesAction),i.push(e.mergeRightScalesAction),new a({label:T,subItems:i})},L.prototype.getContextMenuActions=function(){this._initActions();var e=this._pane.chart().actions(),t=[];if(t.push(this.actions.reset,new l,this._autoScaleAction()),this._isMainSeriesAxis()&&t.push(this._lockScaleAction()),t.push(e.scaleSeriesOnly,this._invertAction(),new l,this._regularScaleAction(),this._percentageAction(),this._indexedTo100Action(),this._logAction(),new l),o.any()||(t.push(this._createMergeScalesAction()),t.push(new l)),!x.enabled("fundamental_widget")){t.push(new a({label:window.t("Labels"),subItems:[e.showSymbolLabelsAction,e.showSeriesLastValue,e.showStudyPlotNamesAction,e.showStudyLastValue,null,null,this.actions.alignLabels].filter(Boolean)}))}return x.enabled("countdown")&&t.push(e.showCountdown),this._options.currencyLabelEnabled&&t.push(e.showCurrency),!TradingView.onWidget()&&x.enabled("show_chart_property_page")&&x.enabled("chart_property_page_scales")&&e.scalesProperties&&t.push(new l,e.scalesProperties),t},L.prototype._sameSideSources=function(){var e=this._isLeft?"left":"right" ;return this._pane.state().orderedSources(e)},L.prototype._grouppedSources=function(){var e=this._pane,t=e.chart().model(),i=this._sameSideSources().slice(),r=e.state(),n=this.priceScale(),o=new Set,s=t.lineBeingEdited()||t.lineBeingCreated();if(s&&o.add(s),t.sourcesBeingMoved().forEach((function(e){o.add(e)})),t.selection().sources().forEach((function(e){o.add(e)})),t.hoveredSource()&&o.add(t.hoveredSource()),n===r.defaultPriceScale())for(var a=this._pane.state().dataSources(),l=0;l0&&this._hightlightBackground(e,a,this.priceScale().mainSource(),t);var l=o.model().crossHairSource();l.startMeasurePoint()&&this._hightlightBackground(e,l.measurePoints(),this.priceScale().mainSource(),t)},L.prototype.drawBorder=function(e,t){e.save(),e.fillStyle=this.lineColor();var i,r=Math.max(1,Math.floor(this.rendererOptions().borderSize*t));i=this._isLeft?Math.floor(this._size.w*t)-r:0,e.fillRect(i,0,r,Math.ceil(this._size.h*t)+1),e.restore()},L.prototype.drawTickMarks=function(e,t){var i=this.priceScale().marks();e.save(),e.setFont(this.baseFont()) ;var r=this.rendererOptions(),n=this._isLeft?Math.floor((this._size.w-r.tickLength-r.borderSize)*t):Math.floor(r.borderSize*t),o=this._isLeft?Math.round(n-r.paddingInner*t):Math.round(n+(r.tickLength+r.paddingInner)*t),s=this._isLeft?"right":"left",a=Math.round(r.tickLength*t),l=Math.max(1,Math.floor(t)),c=Math.floor(.5*t),u=0!==i.length?this._tickmarksCache.getLabelHeight(e,i[0].label):0,h=this._isCurrencyLabelVisible()?this._currencyLabelLineHeight()+this._currencyLabel.labelTop():0,d=i.map((function(e){if(this._options.croppedTickMarks)return!0;var t=e.coord-u/2;return!(e.coord+u/2>this._size.h||t0&&(e=a[0].floatCoordinate())}}}u.forEach((function(e){h.add(e)})),d(r),d(this._pane.state().customSources());var p=t.filter((function(t){return t.floatCoordinate()<=e})),f=t.filter((function(t){return t.floatCoordinate()>e}));p.sort((function(e,t){return t.floatCoordinate()-e.floatCoordinate()})),p.length&&f.length&&f.push(p[0]),f.sort((function(e,t){return e.floatCoordinate()-t.floatCoordinate()}));var _=t.length;for(a=0;a<_;a++){(y=t[a]).setFixedCoordinate(y.coordinate())}var m=this.priceScale().properties();if(m.alignLabels&&m.alignLabels.value()){for(a=1;aS-g&&y.setFixedCoordinate(S-g)}for(var b=1;b=l)&&(o={value:l,view:a})}})),n.view&&r.push(n.view),o.view&&r.push(o.view),r}, L.prototype._isFromSameSide=function(e){return(this._isLeft?this._pane.state().leftPriceScales():this._pane.state().rightPriceScales()).includes(e)},L.prototype._addViewsOrMaxMin=function(e,t){var i=this._pane.state(),r=this.priceScale();if(r!==i.defaultPriceScale()&&(e=e.filter(function(e){return i.isOverlay(e)||this._isFromSameSide(e.priceScale())}.bind(this))),0!==e.length)if(1===e.length){var n=e[0].priceAxisViews(i,r);n&&n.length&&t.push(n)}else t.push(this._minMaxViews(e))},L.prototype.drawCrossHairLabel=function(e,t){e.save();var i=this._pane.chart().model().model(),r=this._pane.state(),n=this.priceScale(),o=[],s=this._pane.state(),a=this.priceScale()===r.defaultPriceScale(),l=i.lineBeingEdited()||i.lineBeingCreated();l&&(l.priceScale()===n||a&&r.isOverlay(l))&&((u=l.priceAxisViews(s,n))&&u.length&&o.push(u));this._addViewsOrMaxMin(i.sourcesBeingMoved(),o),this._addViewsOrMaxMin(i.selection().sources(),o);var c=i.hoveredSource();if(c){var u,h=r.customSources().includes(c)?n:c.priceScale();if(!i.selection().isSelected(c)&&(this._isFromSameSide(h)||a&&r.isOverlay(c)))(u=i.hoveredSource().priceAxisViews(s,n))&&u.length&&o.push(u)}(u=i.crossHairSource().priceAxisViews(s,n))&&u.length&&o.push(u);var d=this.rendererOptions(),p=this._isLeft?"right":"left";o.forEach((function(i){i.forEach((function(i){e.save(),i.renderer().draw(e,d,this._widthCache,this._size.w,p,t),e.restore()}),this)}),this),e.restore()},L.prototype.setAutoScale=function(e){var t=this._pane.state(),i=this.priceScale();this._pane.chart().model().setPriceAutoScale(t,i,e)},L.prototype.reset=function(){var e=this._pane.state(),t=this.priceScale();this._pane.chart().model().resetPriceScale(e,t)},L.prototype.hardResetCanvas=function(){null!==this._size&&(p(this._canvasBinding,this._size),p(this._topCanvasBinding,this._size))},L.prototype._isMainPane=function(){return this._pane.state().containsMainSeries()},L.prototype.paint=function(e){if(this._isVisible&&e){if(e!==u.Cursor){var t=d(this._canvasBinding.canvas);this._alignLabels(),this.drawBackground(t,this._canvasBinding.pixelRatio),this.drawBorder(t,this._canvasBinding.pixelRatio),this._pane.hasState()&&(this._updateCurrencyLabel(),this.drawTickMarks(t,this._canvasBinding.pixelRatio),this.drawBackLabels(t,this._canvasBinding.pixelRatio))}if(this._pane.hasState()){var i=d(this._topCanvasBinding.canvas),r=this._topCanvasBinding.pixelRatio;i.clearRect(0,0,Math.ceil(this._size.w*r)+1,Math.ceil(this._size.h*r)+1),this.drawCrossHairLabel(i,r)}}},L.prototype.restoreDefaultCursor=function(){this.setCursor("")},L.prototype.setCursor=function(e){var t="";"grabbing"!==e&&"ns-resize"!==e||(t="price-axis--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._cell.classList.remove(this._currentCursorClassName),t&&this._cell.classList.add(t),this._currentCursorClassName=t,this._cell.style.cursor)},L.prototype.axisInfo=function(){return this._axisInfo},L.prototype.setHighlighted=function(e){this._highlighted!==e&&(this._highlighted=e)};var M=I(4);e.exports={PriceAxisWidget:L, scaleRatioForContextMenuTransformer:I}},"1Wlv":function(e,t,i){"use strict";(function(e){var r=i("Yj6H").PriceScaleBase,n=i("Ss5c").LineDataSource,o=i("7ktv").PriceDataSource,s=i("qJq3").Series,a=i("kcTO").PriceFormatter,l=i("GH0z").PercentageFormatter,c=i("Qb4w").PriceRange,u=i("0waE").randomHash,h=i("s1Gx").sortSources,d=i("3ClC").isStudy,p=i("lTLF").PriceTickMarkBuilder,f=i("TTFo"),_=f.fromPercent,m=f.toPercent,y=f.toPercentRange,g=f.fromIndexedTo100,v=f.toIndexedTo100,S=f.toIndexedTo100Range,b=f.fromLog,w=f.toLog,P=new l,C=new a(100,1);function x(t,i){r.call(this,i),this._scalesProperties=t,this.m_height=0,this._internalHeightCache=null,this._internalHeightChanged=new e,this.m_priceRange=null,this._priceRangeChanged=new e,this.m_topMargin=0,this.m_bottomMargin=0,this._topPixelMargin=0,this._bottomPixelMargin=0,this.m_scrollStartPoint=null,this.m_scaleStartPoint=null,this.m_maxPriceRange=null,this.m_minPriceRange=null,this.m_priceRangeSnapshot=null,this._invalidatedForRange={isValid:!0,visibleBars:null};var n=this;this._coordinateToLogicalFunc=function(e,t){return n._coordinateToLogical(e,t)},this._logicalToCoordinateFunc=function(e,t){return n._logicalToCoordinate(e,t)},this.m_markBuilder=new p(this,100,this._coordinateToLogicalFunc,this._logicalToCoordinateFunc),this._modeChanged=new e,this._properties.isInverted.listeners().subscribe(this,x.prototype._onIsInvertedChanged),this._properties.listeners().subscribe(null,(function(){if(n.mainSource()&&n.mainSource().model()){var e=n.mainSource().model().paneForSource(n.mainSource());n.mainSource().model().updatePane(e)}})),this._scalesProperties.listeners().subscribe(this,(function(){this._marksCache=null})),this.setId(u())}inherit(x,r),x.prototype.id=function(){return this._id},x.prototype.setId=function(e){this._id=e},x.prototype._convertPriceRangeFromLog=function(e){if(null===e)return null;var t=b(e.minValue()),i=b(e.maxValue());return new c(t,i)},x.prototype._convertPriceRangeToLog=function(e){if(null===e)return null;var t=w(e.minValue()),i=w(e.maxValue());return new c(t,i)},x.prototype._canConvertPriceRangeFromLog=function(e){if(null===e)return!1;var t=b(e.minValue()),i=b(e.maxValue());return isFinite(t)&&isFinite(i)},x.prototype.mode=function(){return{autoScale:this._properties.autoScale.value(),lockScale:this._properties.lockScale.value(),percentage:this._properties.percentage.value(),indexedTo100:this._properties.indexedTo100.value(),log:this._properties.log.value()}},x.prototype.setMode=function(e){var t={},i=this.mode(),r=this._properties.state(),n=null;void 0!==e.autoScale&&e.autoScale!==r.autoScale&&(t.autoScale=e.autoScale,this._setAutoScaleValueWithDependentProperties(e.autoScale)),void 0!==e.lockScale&&e.lockScale!==r.lockScale&&(t.lockScale=e.lockScale,this._setLockScaleValueWithDependentProperties(e.lockScale)),void 0!==e.percentage&&e.percentage!==r.percentage&&(t.percentage=e.percentage,this._setPercentageValueWithDependentProperties(e.percentage),this._invalidatedForRange.isValid=!1), void 0!==e.indexedTo100&&e.indexedTo100!==r.indexedTo100&&(t.indexedTo100=e.indexedTo100,this._setIndexedTo100ValueWithDependentProperties(e.indexedTo100),this._invalidatedForRange.isValid=!1),void 0!==e.log&&e.log!==r.log&&(t.log=e.log,this._setLogValueWithDependentProperties(e.log)),r.log&&!this._properties.log.value()&&(this._canConvertPriceRangeFromLog(this.m_priceRange)?null!==(n=this._convertPriceRangeFromLog(this.m_priceRange))&&this.setPriceRange(n):this.properties().autoScale.setValue(!0)),!r.log&&this._properties.log.value()&&null!==(n=this._convertPriceRangeToLog(this.m_priceRange))&&this.setPriceRange(n),r.autoScale!==this._properties.autoScale.value()&&this._properties.autoScale.listeners().fire(this._properties.autoScale),r.autoScaleDisabled!==this._properties.autoScaleDisabled.value()&&this._properties.autoScaleDisabled.listeners().fire(this._properties.autoScaleDisabled),r.lockScale!==this._properties.lockScale.value()&&this._properties.lockScale.listeners().fire(this._properties.lockScale),r.percentage!==this._properties.percentage.value()&&(this._properties.percentage.listeners().fire(this._properties.percentage),this.updateFormatter()),r.indexedTo100!==this._properties.indexedTo100.value()&&(this._properties.indexedTo100.listeners().fire(this._properties.indexedTo100),this.updateFormatter()),r.percentageDisabled!==this._properties.percentageDisabled.value()&&this._properties.percentageDisabled.listeners().fire(this._properties.percentageDisabled),r.log!==this._properties.log.value()&&this._properties.log.listeners().fire(this._properties.log),r.logDisabled!==this._properties.logDisabled.value()&&this._properties.logDisabled.listeners().fire(this._properties.logDisabled),void 0===t.log&&void 0===t.percentage&&void 0===t.lockScale&&void 0===t.autoScale&&void 0===t.indexedTo100||this._modeChanged.fire(i,this.mode())},x.prototype.modeChanged=function(){return this._modeChanged},x.prototype.fontSize=function(){return this._scalesProperties.fontSize.value()},x.prototype.height=function(){return this.m_height},x.prototype.setHeight=function(e){this.m_height!==e&&(this.m_height=e,this._invalidateInternalHeightCache(),this._marksCache=null)},x.prototype.topPixelMargin=function(){return this.isInverted()?this.m_bottomMargin*this.height()+this._bottomPixelMargin:this.m_topMargin*this.height()+this._topPixelMargin},x.prototype.topMargin=function(){return this.m_topMargin},x.prototype.setTopMargin=function(e){if(!isNumber(e))throw new TypeError("invalid margin");if(e<0||e>30)throw new RangeError("invalid margin");this.m_topMargin!==e&&(this.m_topMargin=e,this._invalidateInternalHeightCache(),this._marksCache=null)},x.prototype.bottomPixelMargin=function(){return this.isInverted()?this.m_topMargin*this.height()+this._topPixelMargin:this.m_bottomMargin*this.height()+this._bottomPixelMargin},x.prototype.bottomMargin=function(){return this.m_bottomMargin},x.prototype.setBottomMargin=function(e){if(!isNumber(e))throw new TypeError("invalid margin");if(e<0||e>30)throw new RangeError("invalid margin") ;this.m_bottomMargin!==e&&(this.m_bottomMargin=e,this._invalidateInternalHeightCache(),this._marksCache=null)},x.prototype.internalHeight=function(){if(this._internalHeightCache)return this._internalHeightCache;var e=this.height()-this.topPixelMargin()-this.bottomPixelMargin();return this._internalHeightCache=e,e},x.prototype._invalidateInternalHeightCache=function(){this._internalHeightCache=null,this._internalHeightChanged.fire()},x.prototype.internalHeightChanged=function(){return this._internalHeightChanged},x.prototype.priceRange=function(){return this.makeSureItIsValid(),this.m_priceRange},x.prototype.priceRangeChanged=function(){return this._priceRangeChanged},x.prototype.setPriceRange=function(e,t,i){if(!(e instanceof c))throw new TypeError("incorrect price range");var r=this.m_priceRange;if(!t&&(null!==r||null===e)&&(null===r||r.equals(e)))return!1;var n=null!==this.m_maxPriceRange&&this.m_maxPriceRange.containsStrictly(e),o=null!==this.m_minPriceRange&&e.containsStrictly(this.m_minPriceRange);if(this.isLockScale()&&!t&&(n||o))return!1;this._marksCache=null,this.m_priceRange=e,i||this._priceRangeChanged.fire(r,e)},x.prototype.isEmpty=function(){return this.makeSureItIsValid(),0===this.m_height||!this.m_priceRange||this.m_priceRange.isEmpty()},x.prototype.invertedCoordinate=function(e){return this.isInverted()?e:this.height()-1-e},x.prototype.priceToLogical=function(e){return this.isLog()&&e?w(e):e},x.prototype.logicalToPrice=function(e){return this.isLog()?b(e):e},x.prototype._logicalToCoordinate=function(e,t){if(this.makeSureItIsValid(),this.isEmpty())return 0;e=this.priceToLogical(e);var i=this.bottomPixelMargin()+(this.internalHeight()-1)*(e-this.priceRange().minValue())/(this.priceRange().maxValue()-this.priceRange().minValue());return this.invertedCoordinate(i)},x.prototype.priceToCoordinate=function(e,t){return this.isPercentage()?e=m(e,t):this.isIndexedTo100()&&(e=v(e,t)),this._logicalToCoordinate(e,t)},x.prototype.pointsArrayToCoordinates=function(e,t){this.makeSureItIsValid();var i=this.bottomPixelMargin(),r=this.priceRange().minValue(),n=this.priceRange().maxValue(),o=this.internalHeight()-1,s=this.isInverted(),a=o/(n-r);if(this.isPercentage())for(var l=0;l0||Math.abs(s-this._bottomPixelMargin)>0)&&(this._bottomPixelMargin=s,this._topPixelMargin=o,this._marksCache=null,this._invalidateInternalHeightCache()),t?(t.minValue()===t.maxValue()&&(t=new c(t.minValue()-.5,t.maxValue()+.5)),this.setPriceRange(t)):this.m_priceRange||this.setPriceRange(new c(-.5,.5)),this._invalidatedForRange.isValid=!0}},x.prototype.sourcesToUpdateViews=function(){if(!this._sourcesToUpdateViews){this._sourcesToUpdateViews=[];for(var e=0;e'},"2+aH":function(e,t,i){"use strict";(function(e){ var r=i("aO4+").Point,n=i("vdSZ").CrosshairDataWindowView,o=i("Hm6r").CrosshairTimeAxisView,s=i("zZ2k").CrosshairBase,a=i("mMWL"),l=i("ogJP").isNaN;function c(t,i,r){var l=this;s.call(this,t,r),this._properties=i,this._dataWindowView=new n(t);var c=function(){return this.appliedIndex()}.bind(this),u=function(){return this._startMeasurePoint.index}.bind(this),h=function(){return this._lastMeasurePoint().index}.bind(this);this._timeAxisView=new o(t,c,!1),this._startMeasureTimeAxisView=new o(t,u,!0),this._endMeasureTimeAxisView=new o(t,h,!0),this.visible=!0,t.readOnly()?this.areLinesVisible=!0:a.cursorTool.subscribe((function(e){l.areLinesVisible="arrow"!==e}),{callWithLast:!0}),this._movedDelegate=new e,this._subscribed=!1,this._barSelectedDelegate=new e}inherit(c,s),c.prototype.index=0,c.prototype.price=NaN,c.prototype.pane=null,c.prototype.color="white",c.prototype.style="",c.prototype.customization={disableSelection:!0},c.prototype.model=function(){return this._model},c.prototype.properties=function(){return this._properties},c.prototype.moved=function(){return this._movedDelegate},c.prototype.originX=function(){return this._originX},c.prototype.originY=function(){return this._originY},c.prototype.saveOriginCoord=function(e,t){this._originX=e,this._originY=t},c.prototype.originCoordX=function(){return this._originX},c.prototype.originCoordY=function(){return this._originY},c.prototype.clearOriginCoord=function(){this._originX=NaN,this._originY=NaN},c.prototype.setPosition=function(e,t,i){this._subscribed||(this._model.mainSeries().onRestarted().subscribe(this,c.prototype.clearMeasure),this._subscribed=!0),this.setLockedPosition(i),this.visible=!0,this._tryToUpdateViews(e,t,i)},c.prototype.selectionPane=function(){return this._selectionPane},c.prototype.update=function(){if(this.visible){var e=this._priceScaleByPane(this.pane),t=this._originX||this.x,i=this._originY||this.y,r=this._model.timeScale().coordinateToIndex(t),n=NaN;if(null!==e){var o=this.pane.mainDataSource().firstValue();n=e.coordinateToPrice(i,o)}this._tryToUpdateViews(r,n,this.pane)}else this._setIndexToLastSeriesBarIndex()},c.prototype._priceScaleByPane=function(e){return e&&!e.defaultPriceScale().isEmpty()?e.defaultPriceScale():null},c.prototype._tryToUpdateViews=function(e,t,i){this._tryToUpdateData(e,t,i)&&(this.updateAllViews(),this._movedDelegate.fire({time:this._model.timeScale().points().roughTime(this.index),price:this.price}))},c.prototype._tryToUpdateData=function(e,t,i){var r=this.x,n=this.y,o=this.price,s=this.index,a=this.pane,c=this._priceScaleByPane(i);if(this.index=e,this.x=l(e)?NaN:this._model.timeScale().indexToCoordinate(e),null!==c){this.pane=i,this.price=t;var u=i.mainDataSource().firstValue();this.y=c.priceToCoordinate(t,u)}else this.pane=null,this.price=NaN,this.y=NaN;return r!==this.x||n!==this.y||s!==this.index||o!==this.price||a!==this.pane},c.prototype.setLockedPosition=function(e){delete this.lockedIndex,delete this.lockedX, e!==this._measurePane&&a.lockTimeAxis().value()&&(this.lockedIndex=this._model.timeScale().points().roughIndex(a.lockTimeAxisTime.value()),this.lockedX=this._model.timeScale().indexToCoordinate(this.lockedIndex))},c.prototype.clearPosition=function(){this.visible=!1,this._setIndexToLastSeriesBarIndex(),this.price=NaN,this.x=NaN,this.y=NaN,this.pane=null,this.clearOriginCoord()},c.prototype._setIndexToLastSeriesBarIndex=function(){var e=this._model.mainSeries().bars().lastIndex();this.index=null!==e?e:NaN},c.prototype.dataWindowView=function(){return this._dataWindowView},c.prototype.currentPoint=function(){return new r(this.x,this.y)},c.prototype.appliedIndex=function(){return isFinite(this.lockedIndex)&&this.lockedIndex||this.index},c.prototype.appliedX=function(){return isFinite(this.lockedX)&&this.lockedX||this.x},c.prototype.selectBarMode=function(){return this._selectBarMode},c.prototype.toggleSelectBarMode=function(){this._setSelectBarModeState(!this._selectBarMode.value())},c.prototype.onBarSelected=function(){return this._barSelectedDelegate},c.prototype._setSelectBarModeState=function(e){this._selectBarMode.setValue(e),this._model.lightUpdate()},c.prototype.trySelectCurrentBar=function(){if(this._model.mainSeries().bars().contains(this.index)){var e=this._model.timeScale().indexToTimePoint(this.index);null!==e&&(this._setSelectBarModeState(!1),this._barSelectedDelegate.fire(e))}},c.prototype.handleContextMenuEvent=function(){this._selectBarMode.value()&&this._setSelectBarModeState(!1)},c.prototype.setOnHoveredChartWidget=function(e){this._isOnHoveredChartWidget=e},c.prototype.isOnHoveredChartWidget=function(){return this._isOnHoveredChartWidget},c.prototype.setLinesShouldBeHidden=function(e){this._linesShouldBeHidden=e},c.prototype.linesShouldBeHidden=function(){return this._linesShouldBeHidden},t.CrossHair=c}).call(this,i("aIyQ"))},"22xp":function(e,t,i){"use strict";i.r(t);var r=i("mrSG"),n=i("Eyy1"),o=(i("YFKU"),i("j1f4")),s=i("uOxu"),a=i("beCu"),l=i("aIyQ"),c=i.n(l),u=i("Kxc7"),h=i("Hr11"),d=i("ogJP"),p=i("ZJKN"),f=function(){function e(e,t){Object(n.assert)(e<=t,"The left value should be greater than or equal to the right value"),this._left=e,this._right=t}return e.prototype.left=function(){return this._left},e.prototype.right=function(){return this._right},e.prototype.length=function(){return this._right-this._left+1},e.prototype.contains=function(e){return this._left<=e&&e<=this._right},e.prototype.equals=function(e){return this._left===e.left()&&this._right===e.right()},e.compare=function(e,t){return null===e||null===t?e===t:e.equals(t)},e}(),_=Object(s.getLogger)("Chart.TimePoints"),m=function(){function e(){this._zoffset=0,this._items=[]}return e.prototype.clear=function(){this._zoffset=0,this._items=[]},e.prototype.size=function(){return this._items.length},e.prototype.firstIndex=function(){return this._offsetToIndex(0)},e.prototype.lastIndex=function(){return this._offsetToIndex(this._items.length-1)},e.prototype.merge=function(e,t,i){ if(0===i.length)return _.logError("merge: 'values' does not contain any time points"),[];if(t>this._zoffset&&e+t>0)return _.logError("merge: when the first time point index is updated, we should fill the time points starting from the first one"),[];if(0===this._items.length)return this._items=i,this._zoffset=t,[{change:"rebuild",index:this._validOffsetToIndex(0)}];var r=e+this._zoffset;if(r<0){var n=Math.abs(r);if(i.lengththis._items.length){n=l-this._items.length;for(var c=a;cthis._items[this._items.length-1])return t?this._validOffsetToIndex(this._items.length-1):null;for(var i=0;is?(u=e-s)<500&&null!=t?t(l,u):l+u*c:null},e.prototype.roughIndex=function(e,t){void 0===t&&(t=null);var i=this._items;if(!i.length||i.length<2)return null;var r=i.length-1,n=this._validOffsetToIndex(0),o=this._validOffsetToIndex(r),s=i[0],a=i[r];if(e>=s&&e<=a)return this.closestIndexLeft(e);var l=(a-s)/(o-n);if(ea){var u;c=e-a;if((u=Math.trunc(c/l))<500&&null!==t){var h=t(a,e);h.success&&(u=h.result)}return o+u}return null},e.prototype.closestIndexLeft=function(e){var t=this._items;if(!t.length)return null;if(Number.isNaN(e))return null;var i=t.length-1 ;if(e>=t[i])return this._validOffsetToIndex(i);var r=0,n=t[r];if(er+1;){var o=r+i>>1,s=t[o];if(s>e)i=o;else{if(!(s0&&this._points.merge(e,t,i),this._tickMarks.merge(r),this._correctOffset()},e.prototype.addTail=function(e,t,i){this._tickMarks.removeTail(t);for(var r=e.params,o=Object(n.ensureDefined)(this._tickMarks.maxIndex)+(i?0:1),s=0;s0&&(i*=this._width/e.width)),this._tryToUpdateBarSpacing(this._barSpacing,i),this._correctOffset()}else A.logDebug("restoreState: invalid state");else A.logDebug("restoreState: invalid state")},e.prototype.marks=function(){if(this.isEmpty())return null;for(var e=this._barSpacing,t=5*((this._scalesProperties.childs().fontSize.value()||0)+4),i=Math.round(t/e),r=Object(n.ensureNotNull)(this.visibleBarsStrictRange()),o=Math.max(r.firstBar(),r.firstBar()-i),s=Math.max(r.lastBar(),r.lastBar()-i),a=[],l=0,c=this._tickMarks.build(e,t);l=P.DAY_SPAN})}}return a},e.prototype.visibleBarsStrictRange=function(){return this._visibleBarsInvalidated&&(this._visibleBarsInvalidated=!1,this._updateVisibleBars()),this._visibleBars.strictRange()},e.prototype.visibleBarsStrictRangeChanged=function(){return this._visibleBarsChanged},e.prototype.logicalRangeChanged=function(){return this._logicalRangeChanged},e.prototype.tickMarks=function(){return this._tickMarks},e.prototype.points=function(){return this._points},e.prototype.width=function(){ return this._width},e.prototype.setWidth=function(e){if(!Number.isFinite(e)||e<=0)A.logWarn("setWidth: invalid argument: "+e);else if(this._width!==e){if(this._visibleBarsInvalidated=!0,this._options.lockVisibleTimeRangeOnResize&&this._width){var t=this._barSpacing*e/this._width;this._tryToUpdateBarSpacing(this._barSpacing,t)}if(null!==this._leftEdgeIndex)if(Object(n.ensureNotNull)(this.visibleBarsStrictRange()).firstBar()<=this._leftEdgeIndex){var i=this._width-e;this._rightOffset-=Math.round(i/this._barSpacing)+1}this._width=e,this._widthChanged.fire(e),this._correctOffset()}},e.prototype.setLeftEdgeFix=function(e){this._leftEdgeIndex=e;var t=this.visibleBarsStrictRange();if(null!==t){var i=t.firstBar()-e;if(i<0){var r=this._rightOffset-i-1;this.scrollToOffsetAnimated(r,500)}}},e.prototype.indexToCoordinate=function(e){if(this.isEmpty())return 0;if(!Object(d.isInteger)(e))return 0;var t=this.baseIndex()+this._rightOffset-e;return this._width-(t+.5)*this._barSpacing},e.prototype.indexToUserTime=function(e){return this._tickMarks.indexToTime(e)},e.prototype.timePointToIndex=function(e){return this._points.indexOf(e,!0)},e.prototype.indexToTimePoint=function(e){return this._points.valueAt(e)},e.prototype.timeToCoordinate=function(e){var t=this._points.closestIndexLeft(e);if(null===t)return null;var i=Object(n.ensureNotNull)(this._points.valueAt(t)),r=this.indexToCoordinate(t);if(r<=0||r>=this._width)return null;var o=this.barSpacing(),s=this.baseIndex(),a=r+(e-i)/(Object(n.ensureNotNull)(this._points.valueAt(s))-Object(n.ensureNotNull)(this._points.valueAt(s-1)))*o+1;return a<=0||a>=this._width?null:a},e.prototype.barIndexesToCoordinates=function(e){for(var t=this.baseIndex(),i=0,r=e;i0&&r>s&&(r=s);var l=this._model;Object(a.doAnimate)({from:n,to:r,duration:1e3,easing:o.easingFunc.easeInOutQuint,onComplete:t,onStep:function(e,t){i._visibleBarsInvalidated=!0,i._rightOffset=t,i._correctOffset(),l.recalculateAllPanes(),l.lightUpdate(),l.recalcVisibleRangeStudy(l.dataSources())}})}else this._visibleBarsInvalidated=!0,this._rightOffset=r,this._correctOffset(),void 0!==t&&t()},e.prototype.scrollToOffsetAnimated=function(e,t){var i=this;if(!isFinite(e))throw new RangeError("offset is required and must be finite number");var r=void 0===t?400:t;if(!isFinite(r)||r<=0)throw new RangeError("animationDuration (optional) must be finite positive number") ;var n=this._rightOffset,o=Date.now(),s=function(){i._visibleBarsInvalidated=!0;var t=(Date.now()-o)/r;if(t>=1)return i._rightOffset=e,i._correctOffset(),i._visibleBarsInvalidated=!0,i._model.recalculateAllPanes(),void i._model.lightUpdate();i._rightOffset=n+(e-n)*t,i._correctOffset(),i._model.recalculateAllPanes(),setTimeout(s,20)};s()},e.prototype.defaultRightOffsetProperty=function(){return this._defaultRightOffsetProperty},e.prototype.rightOffsetDefaultValue=function(){return 10},e.prototype.barSpacing=function(){return this._barSpacing},e.prototype.setBarSpacing=function(e){Number.isFinite(e)?(e=this.getValidBarSpacing(e),this._tryToUpdateBarSpacing(this._barSpacing,e)&&(this._correctOffset(),this._options.preserveBarSpacing&&(Object(b.saveDefaultProperties)(!0),this._scalesProperties.childs().barSpacing.setValue(this._barSpacing),Object(b.saveDefaultProperties)(!1)))):A.logWarn("setBarSpacing: invalid argument: "+e)},e.prototype.barSpacingChanged=function(){return this._barSpacingChanged},e.prototype.getValidBarSpacing=function(e){return null==e&&(e=this.barSpacing()),ethis.maxBarSpacing()?this.maxBarSpacing():e},e.prototype.isValidBarSpacing=function(e){return e>=this.minBarSpacing()&&e<=this.maxBarSpacing()},e.prototype.preserveBarSpacing=function(){return this._options.preserveBarSpacing},e.prototype.normalizeBarIndex=function(e){var t=0,i=0,r=this.baseIndex(),o=Object(n.ensureNotNull)(this._points.firstIndex());return er?(t=Object(n.ensureNotNull)(this._points.valueAt(r)),i=e-r):(t=Object(n.ensureNotNull)(this._points.valueAt(e)),i=0),{time_t:t,offset:i}},e.prototype.denormalizeTimePoint=function(e){var t=this._points.indexOf(e.time_t,!1);if(null!==t)return t+e.offset},e.prototype.rightOffset=function(){return this._rightOffset},e.prototype.minRightOffset=function(){var e=this.points().firstIndex(),t=this._baseIndex;if(null===e||null===t)return null;if(null!==this._leftEdgeIndex){var i=this.width()/this._barSpacing;return this._leftEdgeIndex-t+i-1}return e-t-1+O},e.prototype.maxRightOffset=function(){return this.width()/this._barSpacing-O},e.prototype.maxRightOffsetChanged=function(){return this._maxRightOffsetChanged},e.prototype.onReset=function(){return this._resetDelegate},e.prototype.scrollStartPoint=function(){return this._scrollStartPoint},e.prototype.baseIndex=function(){return this._baseIndex||0},e.prototype.zoom=function(e,t,i){if(Number.isFinite(e)&&Number.isFinite(t)){var r=this.coordinateToIndex(e),n=this.barSpacing(),o=n+t*(n/10);this.setBarSpacing(o),(void 0!==i?!i:this._options.rightBarStaysOnScroll)||this.setRightOffset(this.rightOffset()-.5+(r-this._coordinateToFloatIndex(e)))}else A.logWarn("zoom: invalid arguments: "+e+", "+t+", "+i)},e.prototype.zoomToBarsRange=function(e,t){if(!(t<=e)){var i=this.baseIndex();this._rightOffset=t-i;var r=k.get(this._model.mainSeries().style())||.6,n=Math.max(t-e+r,O);this.setBarSpacing(this.width()/n),this._visibleBarsInvalidated=!0}}, e.prototype.coordinateToIndex=function(e){return Math.ceil(this._coordinateToFloatIndex(e))},e.prototype.canZoomIn=function(){return this.barSpacing()M},e.prototype.minBarSpacing=function(){return M},e.prototype.maxBarSpacing=function(){return I?this.width():50},e.prototype.resetRightOffset=function(){this.setRightOffset(this._defaultRightOffsetProperty.value())},e.prototype.reset=function(){this._visibleBarsInvalidated=!0,this._points=new m,this._scrollStartPoint=null,this._scaleStartPoint=null,this._clearCommonTransitionsStartState(),this._tickMarks.reset(),this._leftEdgeIndex=null,this._resetDelegate.fire()},e.prototype.setBaseIndex=function(e){Number.isFinite(e)?(this._visibleBarsInvalidated=!0,this._baseIndex=e,this._correctOffset()):A.logDebug("setBaseIndex: invalid argument: "+e)},e.prototype.setRightOffset=function(e){Number.isFinite(e)?(this._visibleBarsInvalidated=!0,this._rightOffset=e,this._correctOffset()):A.logWarn("setRightOffset: invalid argument: "+e)},e.prototype.correctBarSpacing=function(){this.isEmpty()||this.points().size()e&&(this._rightOffset=e,this._visibleBarsInvalidated=!0);var t=this.minRightOffset();null!==t&&this._rightOffsett[t.length-1].time+i)return null;for(var o=null,s=0,a=t;s=2)&&(Math.max(1,Math.floor(i))%2!=this._barWidth%2&&this._barWidth--);this._barLineWidth=this._thinBars?Math.min(this._barWidth,Math.floor(i)):this._barWidth;for(var r=null,n=this._barLineWidth<=this._barWidth&&this._barSpacing>=Math.floor(1.5*t.pixelRatio),o=0,s=this._bars;o_+y-1&&(S=(b=_+y-1)-h+1),e.fillRect(v,S,u-v,b-S+1)}var w=c+g,P=Math.max(_,Math.round(a.close*i)-l),C=P+h-1;C>_+y-1&&(P=(C=_+y-1)-h+1),e.fillRect(d+1,P,w-d,C-P+1)}}e.restore()},e.prototype._calcBarWidth=function(e){var t=Math.floor(e);return Math.max(t,Math.floor(Object(n.optimalBarWidth)(this._barSpacing,e)))},e}()},"2Fqk":function(e,t,i){"use strict";i.r(t),i.d(t,"CompareLegendView",(function(){return n}));var r=i("mrSG"),n=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r._additional=null,r._showStudyValues=i.properties().paneProperties.legendProperties.showStudyValues,r._showStudyValues.subscribe(r,r.update),r}return Object(r.__extends)(t,e),t.prototype.isValuesVisible=function(){return this._showStudyValues.value()},t.prototype.destroy=function(){this._showStudyValues.unsubscribeAll(this)},t.prototype.additional=function(){return this._additional},t.prototype._updateImpl=function(){e.prototype._updateImpl.call(this)},t}(i("TrvT").CompareDataWindowView)},"2OVc":function(e,t,i){"use strict";i.r(t),i.d(t,"InsertStudyCommand",(function(){return a}));var r=i("mrSG"),n=i("Eyy1"),o=i("RDU5"),s=i("PC8g"),a=function(e){function t(t,i,r,n,o,s,a,l,c,u,h){var d=e.call(this,h)||this;return d._studyId=null,d._chartModel=t,d._studyMetaInfo=i,d._props=n,d._addAsOverlay=o,d._parentId=null==s?null:s.id(),d._inputs=r,d._targetZOrder=u,d._preferredPriceScale=a,d._allowChangeCurrency=l,d._paneSize=c,d}return Object(r.__extends)(t,e),t.prototype.redo=function(){var e=null===this._parentId?void 0:this._chartModel.dataSourceForId(this._parentId),t=this._chartModel.insertStudyWithParams(this._studyMetaInfo,this._inputs,this._targetZOrder,this._props,this._addAsOverlay,e,this._preferredPriceScale,this._allowChangeCurrency,this._paneSize,null===this._studyId?void 0:this._studyId);this._studyId=t.id(),t.childStudyByRebind().subscribe(null,(function(){return Object(s.trackEvent)("SOS","Apply SOS","Rebind SOS")})),this._chartModel.setShouldBeSavedEvenIfHidden(!0)},t.prototype.undo=function(){var e=Object(n.ensureNotNull)(this._chartModel.dataSourceForId(Object(n.ensureNotNull)(this._studyId)));this._chartModel.removeSource(e)},t.prototype.insertedStudy=function(){return this._chartModel.dataSourceForId(Object(n.ensureNotNull)(this._studyId))},t}(o.UndoCommand)},"2S76":function(e,t,i){"use strict";i.r(t) ;var r=i("mrSG"),n=i("Eyy1"),o=i("hY0g"),s=i.n(o),a=i("+DwS"),l=i("dfhE"),c=i("8woN"),u=i.n(c),h=["DJ","CBOE"];function d(e){return Object(r.__awaiter)(this,void 0,void 0,(function(){var t,i,n;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return[3,2];case 1:return r.sent(),i=t.getProduct(function(e){return"exchange-"+e.pro_perm}(e)),(n=function(e){0;return null}(i.exchange))&&"cme-full"===n.exchange?[2,i]:[2,n||i];case 2:return[2,null]}}))}))}var p=i("uOxu"),f=i("Cf1E");i.d(t,"DataUpdatedModeModel",(function(){return y}));var _=Object(p.getLogger)("Chart.Definitions.Series");function m(e,t){var i,r=[];return void 0!==(i=e.delay)&&i>0?(!function(e){return"index"===e.type&&h.includes(e.listed_exchange)}(e)?r.push("DelayToRealtime"):r.push("DelayNoRealtime"),r):function(e,t){return u.a.hasEodSymbols(e.full_name)||t===l.STATUS_EOD}(e,t)?(r.push("EOD"),r):r}var y=function(){function e(e,t,i){this._dataUpdatedModeStatus=new s.a(null),this._symbolInfo=Object(a.a)(e.getter,e.onChange),this._status=Object(a.a)(t.getter,t.onChange),this._symbolInfo.subscribe(this._update.bind(this)),this._status.subscribe(this._update.bind(this)),this._resetSubscription=i,this._resetSubscription.subscribe(this,this._resetStatus)}return e.prototype.destroy=function(){this._symbolInfo.destroy(),this._status.destroy(),this._resetSubscription.unsubscribeAll(this)},e.prototype.status=function(){return this._dataUpdatedModeStatus.readonly()},e.prototype.symbolName=function(){var e=this._symbolInfo.value();return null!==e?e.name:""},e.prototype.time=function(){var e=this._symbolInfo.value(),t=null!==e&&e.delay&&e.delay>0?e.delay:900;return Math.round(t/60)},e.prototype.listedExchange=function(){var e=this._symbolInfo.value();return null!==e?e.listed_exchange:""},e.prototype.description=function(){return Object(r.__awaiter)(this,void 0,void 0,(function(){var e,t,i,o;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:if(null===(e=this._symbolInfo.value()))return[2,""];t={},r.label=1;case 1:return r.trys.push([1,3,,4]),i=n.ensureNotNull,[4,d(e)];case 2:return t=i.apply(void 0,[r.sent()]),[3,4];case 3:return o=r.sent(),_.logWarn("Cannot get exchange "+Object(f.a)(o)),[3,4];case 4:return[2,t.description||e.listed_exchange]}}))}))},e.prototype.exchange=function(){var e=this._symbolInfo.value();return null!==e?e.exchange:""},e.prototype._resetStatus=function(){this._dataUpdatedModeStatus.setValue(null)},e.prototype._update=function(){var e=this._symbolInfo.value();if(null!==e){var t=this._status.value();if("string"!=typeof t){if(t!==l.STATUS_LOADING&&t!==l.STATUS_RESOLVING){var i=m(e,t);0!==i.length?this._dataUpdatedModeStatus.setValue(i):this._dataUpdatedModeStatus.setValue(null)}}else this._dataUpdatedModeStatus.setValue(null)}else this._dataUpdatedModeStatus.setValue(null)},e}()},"2WC2":function(e,t,i){"use strict";var r=i("mrSG"),n=i("Eyy1"),o=i("aO4+"),s=i("f6yo"),a=i("VdBB");function l(e,t,i){var r=e.get(t);return void 0!==r?r:(e.set(t,i),i)}function c(e,t,i,r){var n=l(e,t,new Map);return l(n,i,r)} function u(e,t,i,r,n){var o=l(e,t,new Map),s=l(o,i,new Map);return l(s,r,n)}var h=function(){function e(){this._map=new Map,this._size=0}return e.prototype.size=function(){return this._size},e.prototype.clear=function(){this._map.clear(),this._size=0},e}(),d=(function(e){function t(){return e.call(this)||this}Object(r.__extends)(t,e),t.prototype._add=function(e,t){l(this._map,e,[]).push(t),++this._size},t.prototype._get=function(e){return l(this._map,e,[])},t.prototype._forEach=function(e){this._map.forEach((function(t,i){e(i,t)}))}}(h),function(e){function t(){return e.call(this)||this}Object(r.__extends)(t,e),t.prototype._add=function(e,t,i){c(this._map,e,t,[]).push(i),++this._size},t.prototype._get=function(e,t){return c(this._map,e,t,[])},t.prototype._forEach=function(e){this._map.forEach((function(t,i){t.forEach((function(t,r){e(i,r,t)}))}))}}(h),function(e){function t(){return e.call(this)||this}Object(r.__extends)(t,e),t.prototype._add=function(e,t,i,r){u(this._map,e,t,i,[]).push(r),++this._size},t.prototype._get=function(e,t,i){return u(this._map,e,t,i,[])},t.prototype._forEach=function(e){this._map.forEach((function(t,i){t.forEach((function(t,r){t.forEach((function(t,n){e(i,r,n,t)}))}))}))}}(h),i("gBDZ")),p=function(e){function t(t){var i=e.call(this)||this;return i._maxSize=t,i._keysQueue=[],i}return Object(r.__extends)(t,e),t.prototype.get=function(e){if(!e.text||!e.fontSize||!e.align)return null;var t=e.fontSize,i=e.text,r=e.align,n=c(this._map,t,r,new Map),o=n.get(i);return void 0!==o||(this._size>=this._maxSize?this._deleteFirstKey():++this._size,this._keysQueue.push([t,i,r]),o=new d.b(e.text,e.bold,e.italic,e.font,e.fontSize,e.align),n.set(i,o)),o},t.prototype._deleteFirstKey=function(){var e=this._keysQueue.shift(),t=e[0],i=e[1],r=this._map.get(t);r.delete(i),0===r.size&&this._map.delete(t)},t}(h),f=i("zDbI"),_=i("ikwP");i.d(t,"b",(function(){return m})),i.d(t,"c",(function(){return y})),i.d(t,"a",(function(){return g}));var m=function(){function e(e,t){void 0===t&&(t={skipRenderingOptimizations:!1}),this._height=void 0!==e.height?e.height:e.width,this._width=void 0!==e.width?e.width:e.height,this._items=[],this._barSpacing=0,this._textCache=t.textCache||new p(5e3),this._drawOperation=t.skipRenderingOptimizations?this._drawWithoutOptimizations.bind(this):this._drawWithOptimizations.bind(this),this._color=e.color,this._borderColor=e.borderColor,this._vertOffset=e.vertOffset||0,e.text&&(this._text=e.text,this._fontSize=e.fontSize,this._textColor=e.textColor,this._textAlign=e.textAlign||"center"),void 0!==e.items&&void 0!==e.barSpacing&&this.setData(e.items,e.barSpacing)}return e.prototype.draw=function(e,t){this._preDrawInit(),this._drawOperation(e,t)},e.prototype.hitTest=function(e){for(var t=a.HitTestResult.REGULAR,i=null,r=0,n=this._items;r0?0:-n,c=t>0?n:0,u=new o.Point(e.x-s,a+l),h=new o.Point(e.x+s,a+c);return Object(o.box)(u,h)}},e.prototype._unionBox=function(e,t){var i=Math.min(e.min.x,t.min.x),r=Math.max(e.max.x,t.max.x),n=Math.min(e.min.y,t.min.y),s=Math.max(e.max.y,t.max.y),a=new o.Point(i,n),l=new o.Point(r,s);return Object(o.box)(a,l)},e.prototype._getTooltip=function(e,t){if(e.tooltip)return{content:{type:"text",data:e.tooltip},tooltipDelay:200,extendMargin:!0,rect:{x:t.min.x,y:t.min.y,w:Math.abs(t.max.x-t.min.x),h:Math.abs(t.max.y-t.min.y)}}},e.prototype._setBaseData=function(e,t){this._items.length=0,this._barSpacing=t;for(var i=0,o=e;i0?l:-l;this._items.push(Object(r.__assign)({width:a,height:l,vertOffset:c,textVertOffset:u,shapeWidth:0,shapeHeight:0,stepX:0,stepY:0},s))}},e.prototype._drawItemText=function(e,t,i){var r=this._getTextCache(i);if(null!==r){var n,o=i.x,s=i.vertOffset,a=i.y+s+i.textVertOffset;n=i.style&&void 0!==i.style.textColor?i.style.textColor:this._textColor,r.paintTo(e,t,n,o,a,d.a.Center,s>0?d.c.Top:d.c.Bottom)}},e.prototype._drawWithOptimizations=function(e,t){for(var i,r,n=null,o=!1,s=0,a=this._items;sthis.points()[1].index&&(this._points[0].price=this._points[1].price),this._pattern=[];for(var _=n;_<=f;_++){var m=this._model.mainSeries().data().valueAt(_);this._pattern.push(TradingView.clone(m))}if(this._pattern.length>0){var y=this.patternPriceDiff();this._points[1].price=this._points[0].price+y,this._points[1].index=this._points[0].index+(f-n),this.normalizePoints(), this.createServerPoints()}}return h},u.prototype.setPoint=function(e,t,i){1===e&&t.index<=this._points[0].index&&(t.index=this._points[0].index+1),0===e&&t.index>=this._points[1].index&&(t.index=this._points[1].index-1),r.prototype.setPoint.call(this,e,t,i)},u.prototype.migrateVersion=function(e,t,i){if(1===e&&this._pattern.length>0){var r=this.patternPriceDiff();2===this._timePoint.length&&(this._timePoint[1].price=this._timePoint[0].price+r),2===this._points.length&&(this._points[1].price=this._points[0].price+r)}},u.prototype.getInputsPropertyPage=function(){return null},u.prototype.getStylesPropertyPage=function(){return a.LineToolBarsPatternStylesPropertyPage},u.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("8ioM").BarsPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},u.createProperties=function(e){var t=new o("linetoolbarspattern",e);return u._configureProperties(t),t},u._configureProperties=function(e){r._configureProperties(e),e.addExclusion("mirrored"),e.addExclusion("flipped")},t.LineToolBarsPattern=u},"2cgs":function(e,t,i){"use strict";var r=i("ocLq");JSServer.studyLibrary=[{name:"Accumulation/Distribution",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#808000"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Accumulation/Distribution",shortDescription:"Accum/Dist",is_price_study:!1,inputs:[],id:"Accumulation/Distribution@tv-basicstudies-1",scriptIdPart:"",name:"Accumulation/Distribution"},constructor:function(){this.f_0=function(e,t,i,n){return r.Std.or(r.Std.and(r.Std.eq(e,t),r.Std.eq(e,i)),r.Std.eq(t,i))?0:(2*e-i-t)/(t-i)*n},this.main=function(e,t){this._context=e,this._input=t;var i=this.f_0(r.Std.close(this._context),r.Std.high(this._context),r.Std.low(this._context),r.Std.volume(this._context));return[r.Std.cum(i,this._context)]}}},{name:"Accumulative Swing Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#3C78D8"}},precision:4,inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"ASI",histogramBase:0,joinPoints:!1}},description:"Accumulative Swing Index",shortDescription:"ASI",is_price_study:!1,inputs:[{id:"in_0",name:"Limit Move Value",defval:10,type:"float",min:.1,max:1e5}],id:"Accumulative Swing Index@tv-basicstudies-1",scriptIdPart:"",name:"Accumulative Swing Index"},constructor:function(){this.f_0=function(e,t){ var i=t.new_var(r.Std.open(t)),n=t.new_var(r.Std.high(t)),o=t.new_var(r.Std.low(t)),s=t.new_var(r.Std.close(t)),a=r.Std.abs(n-s.get(1)),l=r.Std.abs(o-s.get(1)),c=r.Std.abs(n-o),u=r.Std.abs(s.get(1)-i.get(1)),h=r.Std.max(a,l),d=r.Std.iff(a>=r.Std.max(l,c),a-.5*l+.25*u,r.Std.iff(l>=r.Std.max(a,c),l-.5*a+.25*u,c+.25*u));return r.Std.iff(0===d,0,(s-s.get(1)+.5*(s-i)+.25*(s.get(1)-i.get(1)))/d*h/e*50)},this.f_1=function(e,t){var i=this.f_0(e,t);return r.Std.cum(i,t)},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0);return[this.f_1(i,this._context)]}}},{name:"Advance/Decline",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Advance/Decline",shortDescription:"AD",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:10,type:"integer",min:1,max:2e3}],id:"Advance/Decline@tv-basicstudies-1",scriptIdPart:"",name:"Advance/Decline"},constructor:function(){this.f_0=function(e,t){return r.Std.gt(e,t)},this.f_1=function(e,t){return r.Std.lt(e,t)},this.f_2=function(e,t){return 0===t?e:e/t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=this.f_0(r.Std.close(this._context),r.Std.open(this._context)),o=this._context.new_var(n),s=r.Std.sum(o,i,this._context),a=this.f_1(r.Std.close(this._context),r.Std.open(this._context)),l=this._context.new_var(a),c=r.Std.sum(l,i,this._context);return[this.f_2(s,c)]}}},{name:"Arnaud Legoux Moving Average",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,inputs:{in_0:9,in_1:.85,in_2:6}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Arnaud Legoux Moving Average",shortDescription:"ALMA",is_price_study:!0,inputs:[{id:"in_0",name:"Window Size",defval:9,type:"integer",min:0,max:5e3},{id:"in_1",name:"Offset",defval:.85,type:"float",min:-1e12,max:1e12},{id:"in_2",name:"Sigma",defval:6,type:"float",min:-1e12,max:1e12}],id:"Arnaud Legoux Moving Average@tv-basicstudies-1",scriptIdPart:"",name:"Arnaud Legoux Moving Average"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.close(this._context),n=this._input(0),o=this._input(1),s=this._input(2),a=this._context.new_var(i);return[r.Std.alma(a,n,o,s)]}}},{name:"Aroon",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF6A00"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0094FF"}},precision:4,inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{ plot_0:{title:"Upper",histogramBase:0,joinPoints:!1},plot_1:{title:"Lower",histogramBase:0,joinPoints:!1}},description:"Aroon",shortDescription:"Aroon",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Aroon@tv-basicstudies-1",scriptIdPart:"",name:"Aroon"},constructor:function(){this.f_0=function(e,t){return 100*(e+t)/t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=r.Std.high(this._context),o=i+1,s=this._context.new_var(n),a=r.Std.highestbars(s,o,this._context),l=this.f_0(a,i),c=r.Std.low(this._context),u=this._context.new_var(c),h=r.Std.lowestbars(u,o,this._context);return[l,this.f_0(h,i)]}}},{name:"Average Price",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,id:"AveragePrice@tv-basicstudies-1",scriptIdPart:"",name:"Average Price",description:"Average Price",shortDescription:"Average Price",is_price_study:!0,plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#85200C"}},precision:4,inputs:{}},styles:{plot_0:{title:"Plot"}},inputs:[]},constructor:function(){this.main=function(e,t){return this._context=e,this._input=t,[r.Std.ohlc4(this._context)]}}},{name:"Average Directional Index",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:14,in_1:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"ADX",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Average Directional Index",shortDescription:"ADX",is_price_study:!1,inputs:[{id:"in_0",name:"ADX Smoothing",defval:14,type:"integer",min:-1e12,max:1e12},{id:"in_1",name:"DI Length",defval:14,type:"integer",min:-1e12,max:1e12}],id:"average_directional_Index@tv-basicstudies-1",scriptIdPart:"",name:"Average Directional Index"},constructor:function(){this.f_0=function(e){var t=this._context.new_var(r.Std.high(this._context)),i=r.Std.change(t),n=this._context.new_var(r.Std.low(this._context)),o=-r.Std.change(n),s=this._context.new_var(r.Std.tr(void 0,this._context)),a=r.Std.rma(s,e,this._context),l=this._context.new_var(r.Std.and(r.Std.gt(i,o),r.Std.gt(i,0))?i:0),c=r.Std.fixnan(100*r.Std.rma(l,e,this._context)/a,this._context),u=this._context.new_var(r.Std.and(r.Std.gt(o,i),r.Std.gt(o,0))?o:0);return[c,r.Std.fixnan(100*r.Std.rma(u,e,this._context)/a,this._context)]},this.f_1=function(e,t){var i=this.f_0(e),n=i[0],o=i[1],s=n+o,a=this._context.new_var(r.Std.abs(n-o)/(r.Std.eq(s,0)?1:s));return[100*r.Std.rma(a,t,this._context)]},this.main=function(e,t){return this._context=e,this._input=t,this.f_1(this._input(0),this._input(1))}}},{name:"Average True Range",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:14}},plots:[{ id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Average True Range",shortDescription:"ATR",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Average True Range@tv-basicstudies-1",scriptIdPart:"",name:"Average True Range"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=r.Std.tr(this._context),o=this._context.new_var(n);return[r.Std.rma(o,i,this._context)]}}},{name:"Awesome Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:1,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,palettes:{palette_0:{colors:{0:{color:"#FF0000",width:1,style:0},1:{color:"#008000",width:1,style:0}}}},inputs:{}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",palette:"palette_0",target:"plot_0",type:"colorer"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Awesome Oscillator",shortDescription:"AO",is_price_study:!1,palettes:{palette_0:{colors:{0:{name:"Color 0"},1:{name:"Color 1"}}}},inputs:[],id:"Awesome Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Awesome Oscillator"},constructor:function(){this.f_0=function(e,t){return e-t},this.f_1=function(e){return r.Std.le(e,0)?0:1},this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.hl2(this._context),n=this._context.new_var(i),o=r.Std.sma(n,5,this._context),s=this._context.new_var(i),a=r.Std.sma(s,34,this._context),l=this.f_0(o,a),c=l,u=this._context.new_var(l),h=r.Std.change(u);return[c,this.f_1(h)]}}},{name:"Balance of Power",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Balance of Power",shortDescription:"Balance of Power",is_price_study:!1,inputs:[],id:"Balance of Power@tv-basicstudies-1",scriptIdPart:"",name:"Balance of Power"},constructor:function(){this.f_0=function(e,t,i,r){return(e-t)/(i-r)},this.main=function(e,t){return this._context=e,this._input=t,[this.f_0(r.Std.close(this._context),r.Std.open(this._context),r.Std.high(this._context),r.Std.low(this._context))]}}},{name:"Bollinger Bands",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,filledAreasStyle:{fill_0:{color:"#000080",transparency:90,visible:!0}},inputs:{in_0:20,in_1:2}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{ title:"Median",histogramBase:0,joinPoints:!1},plot_1:{title:"Upper",histogramBase:0,joinPoints:!1},plot_2:{title:"Lower",histogramBase:0,joinPoints:!1}},description:"Bollinger Bands",shortDescription:"BB",is_price_study:!0,filledAreas:[{id:"fill_0",objAId:"plot_1",objBId:"plot_2",type:"plot_plot",title:"Plots Background"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:1e4},{id:"in_1",name:"mult",defval:2,type:"float",min:.001,max:50}],id:"Bollinger Bands@tv-basicstudies-1",scriptIdPart:"",name:"Bollinger Bands"},constructor:function(){this.f_0=function(e,t){return e*t},this.f_1=function(e,t){return e+t},this.f_2=function(e,t){return e-t},this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.close(this._context),n=this._input(0),o=this._input(1),s=this._context.new_var(i),a=r.Std.sma(s,n,this._context),l=this._context.new_var(i),c=r.Std.stdev(l,n,this._context),u=this.f_0(o,c);return[a,this.f_1(a,u),this.f_2(a,u)]}}},{name:"Bollinger Bands %B",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:1},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],filledAreasStyle:{fill_0:{color:"#008080",transparency:90,visible:!0}},inputs:{in_0:20,in_1:2}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Bollinger Bands %B",shortDescription:"BB %B",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:1e4},{id:"in_1",name:"mult",defval:2,type:"float",min:.001,max:50}],id:"Bollinger Bands %B@tv-basicstudies-1",scriptIdPart:"",name:"Bollinger Bands %B"},constructor:function(){this.f_0=function(e,t){return e*t},this.f_1=function(e,t){return e+t},this.f_2=function(e,t){return e-t},this.f_3=function(e,t,i){return(e-t)/(i-t)},this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.close(this._context),n=this._input(0),o=this._input(1),s=this._context.new_var(i),a=r.Std.sma(s,n,this._context),l=this._context.new_var(i),c=r.Std.stdev(l,n,this._context),u=this.f_0(o,c),h=this.f_1(a,u),d=this.f_2(a,u);return[this.f_3(i,d,h)]}}},{name:"Bollinger Bands Width",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:20,in_1:2}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Bollinger Bands Width",shortDescription:"BBW",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:1e4},{id:"in_1",name:"mult",defval:2,type:"float",min:.001,max:50}], id:"Bollinger Bands Width@tv-basicstudies-1",scriptIdPart:"",name:"Bollinger Bands Width"},constructor:function(){this.f_0=function(e,t){return e*t},this.f_1=function(e,t){return e+t},this.f_2=function(e,t){return e-t},this.f_3=function(e,t,i){return(e-t)/i},this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.close(this._context),n=this._input(0),o=this._input(1),s=this._context.new_var(i),a=r.Std.sma(s,n,this._context),l=this._context.new_var(i),c=r.Std.stdev(l,n,this._context),u=this.f_0(o,c),h=this.f_1(a,u),d=this.f_2(a,u);return[this.f_3(h,d,a)]}}},{name:"Chaikin Money Flow",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Chaikin Money Flow",shortDescription:"CMF",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:2e3}],id:"Chaikin Money Flow@tv-basicstudies-1",scriptIdPart:"",name:"Chaikin Money Flow"},constructor:function(){this.f_0=function(e,t,i,n){return r.Std.or(r.Std.and(r.Std.eq(e,t),r.Std.eq(e,i)),r.Std.eq(t,i))?0:(2*e-i-t)/(t-i)*n},this.f_1=function(e,t){return e/t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=this.f_0(r.Std.close(this._context),r.Std.high(this._context),r.Std.low(this._context),r.Std.volume(this._context)),o=this._context.new_var(n),s=r.Std.sum(o,i,this._context),a=r.Std.volume(this._context),l=this._context.new_var(a),c=r.Std.sum(l,i,this._context);return[this.f_1(s,c)]}}},{name:"Chaikin Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:3,in_1:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Chaikin Oscillator",shortDescription:"Chaikin Osc",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"short",defval:3,type:"integer",min:1,max:2e3},{id:"in_1",name:"long",defval:10,type:"integer",min:1,max:2e3}],id:"Chaikin Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Chaikin Oscillator"},constructor:function(){this.f_0=function(e,t){return e-t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=this._input(1),o=r.Std.accdist(this._context),s=this._context.new_var(o),a=r.Std.ema(s,i,this._context),l=this._context.new_var(o),c=r.Std.ema(l,n,this._context);return[this.f_0(a,c)]}}},{name:"Chaikin Volatility",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Chaikin Volatility@tv-basicstudies-1", scriptIdPart:"",name:"Chaikin Volatility",description:"Chaikin Volatility",shortDescription:"Chaikin Volatility",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#F00000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{periods:10,rocLookback:10}},styles:{plot_0:{title:"Plot"}},bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"periods",type:"integer",name:"Periods"},{id:"rocLookback",type:"integer",name:"Rate of Change Lookback"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.rocLookback=this._input(1)},this.main=function(e,t){this._context=e,this._input=t;var i=this._context.new_var(r.Std.high(this._context)-r.Std.low(this._context)),n=this._context.new_var(r.Std.ema(i,this.period,this._context));return[r.Std.roc(n,this.rocLookback)]}}},{name:"Chande Kroll Stop",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:10,in_1:1,in_2:9}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Long",histogramBase:0,joinPoints:!1},plot_1:{title:"Short",histogramBase:0,joinPoints:!1}},description:"Chande Kroll Stop",shortDescription:"Chande Kroll Stop",is_price_study:!0,inputs:[{id:"in_0",name:"p",defval:10,type:"integer",min:1,max:4999},{id:"in_1",name:"x",defval:1,type:"integer",min:1,max:1e12},{id:"in_2",name:"q",defval:9,type:"integer",min:1,max:1e12}],id:"Chande Kroll Stop@tv-basicstudies-1",scriptIdPart:"",name:"Chande Kroll Stop"},constructor:function(){this.f_0=function(e,t,i){return e-t*i},this.f_1=function(e,t,i){return e+t*i},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=this._input(1),o=this._input(2),s=r.Std.high(this._context),a=this._context.new_var(s),l=r.Std.highest(a,i,this._context),c=r.Std.atr(i,this._context),u=this.f_0(l,n,c),h=this._context.new_var(s),d=r.Std.lowest(h,i,this._context),p=this.f_1(d,n,c),f=this._context.new_var(u),_=r.Std.highest(f,o,this._context),m=this._context.new_var(p);return[r.Std.lowest(m,o,this._context),_]}}},{name:"Chande Momentum Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008080"}},precision:4,inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Chande Momentum Oscillator",shortDescription:"ChandeMO",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:2e3}],id:"Chande Momentum Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Chande Momentum Oscillator"},constructor:function(){ this.f_0=function(e){return r.Std.ge(e,0)?e:0},this.f_1=function(e){return r.Std.ge(e,0)?0:-e},this.f_2=function(e,t){return 100*e/t},this.f_3=function(e,t){return this.f_2(e-t,e+t)},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=r.Std.close(this._context),o=this._context.new_var(n),s=r.Std.change(o),a=this.f_0(s),l=this.f_1(s),c=this._context.new_var(a),u=r.Std.sum(c,i,this._context),h=this._context.new_var(l),d=r.Std.sum(h,i,this._context);return[this.f_3(u,d)]}}},{name:"Chop Zone",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:5,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,palettes:{palette_0:{colors:{0:{color:"#34dddd",width:1,style:0},1:{color:"#006400",width:1,style:0},2:{color:"#98fb98",width:1,style:0},3:{color:"#00FF00",width:1,style:0},4:{color:"#8B0000",width:1,style:0},5:{color:"#FF0000",width:1,style:0},6:{color:"#FF7F00",width:1,style:0},7:{color:"#ffc04c",width:1,style:0},8:{color:"#FFFF00",width:1,style:0}}}},inputs:{}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",palette:"palette_0",target:"plot_0",type:"colorer"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Chop Zone",shortDescription:"Chop Zone",is_price_study:!1,palettes:{palette_0:{colors:{0:{name:"Color 0"},1:{name:"Color 1"},2:{name:"Color 2"},3:{name:"Color 3"},4:{name:"Color 4"},5:{name:"Color 5"},6:{name:"Color 6"},7:{name:"Color 7"},8:{name:"Color 8"}},valToIndex:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8}}},inputs:[],id:"chop_zone@tv-basicstudies-1",scriptIdPart:"",name:"Chop Zone"},constructor:function(){this.f_0=function(){var e=r.Std.close(this._context),t=r.Std.hlc3(this._context),i=this._context.new_var(r.Std.high(this._context)),n=r.Std.highest(i,30,this._context),o=r.Std.lowest(i,30,this._context),s=25/(n-o)*o,a=this._context.new_var(e),l=this._context.new_var(r.Std.ema(a,34,this._context)),c=(l.get(1)-l.get(0))/t*s,u=r.Std.sqrt(1+c*c),h=r.Std.round(180*r.Std.acos(1/u)/3.141592653589793),d=r.Std.iff(r.Std.gt(c,0),-h,h),p=r.Std.and(r.Std.gt(d,-2.14),r.Std.le(d,-.71))?7:8,f=r.Std.and(r.Std.gt(d,-3.57),r.Std.le(d,-2.14))?6:p,_=r.Std.and(r.Std.gt(d,-5),r.Std.le(d,-3.57))?5:f,m=r.Std.le(d,-5)?4:_,y=r.Std.and(r.Std.lt(d,2.14),r.Std.ge(d,.71))?3:m,g=r.Std.and(r.Std.lt(d,3.57),r.Std.ge(d,2.14))?2:y,v=r.Std.and(r.Std.lt(d,5),r.Std.ge(d,3.57))?1:g;return[1,r.Std.ge(d,5)?0:v]},this.main=function(e,t){return this._context=e,this._input=t,this.f_0()}}},{name:"Choppiness Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:61.8},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:38.2}],filledAreasStyle:{fill_0:{color:"#008000",transparency:90,visible:!0}},inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{ title:"Plot",histogramBase:0,joinPoints:!1}},description:"Choppiness Index",shortDescription:"CHOP",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Choppiness Index@tv-basicstudies-1",scriptIdPart:"",name:"Choppiness Index"},constructor:function(){this.f_0=function(e,t,i,n){return 100*r.Std.log10(e/(t-i))/n},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=r.Std.atr(1,this._context),o=this._context.new_var(n),s=r.Std.sum(o,i,this._context),a=r.Std.high(this._context),l=this._context.new_var(a),c=r.Std.highest(l,i,this._context),u=r.Std.low(this._context),h=this._context.new_var(u),d=r.Std.lowest(h,i,this._context),p=r.Std.log10(i);return[this.f_0(s,c,d,p)]}}},{name:"Commodity Channel Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#808000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:100},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:-100}],filledAreasStyle:{fill_0:{color:"#808000",transparency:90,visible:!0}},inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Commodity Channel Index",shortDescription:"CCI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:2e3}],id:"Commodity Channel Index@tv-basicstudies-1",scriptIdPart:"",name:"Commodity Channel Index"},constructor:function(){this.f_0=function(e,t,i){return(e-t)/(.015*i)},this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.hlc3(this._context),n=this._input(0),o=this._context.new_var(i),s=r.Std.sma(o,n,this._context),a=this._context.new_var(i),l=r.Std.dev(a,n,this._context);return[this.f_0(i,s,l)]}}},{name:"Connors RSI",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:70},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:30}],filledAreasStyle:{fill_0:{color:"#800080",transparency:90,visible:!0}},inputs:{in_0:3,in_1:2,in_2:100}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"CRSI",histogramBase:0,joinPoints:!1}},description:"Connors RSI",shortDescription:"CRSI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0", name:"RSI Length",defval:3,type:"integer",min:1},{id:"in_1",name:"UpDown Length",defval:2,type:"integer",min:1},{id:"in_2",name:"ROC Length",defval:100,type:"integer",min:1}],id:"Connors RSI@tv-basicstudies-1",scriptIdPart:"",name:"Connors RSI"},constructor:function(){var e;this.f_1=function(e,t,i){var n=i.new_var(r.Std.max(r.Std.change(e),0));return r.Std.rma(n,t,i)},this.f_2=function(e,t,i){var n=i.new_var(-r.Std.min(r.Std.change(e),0));return r.Std.rma(n,t,i)},this.f_3=(e=0,function(t){var i=t.get(0),n=t.get(1);return e=i===n?0:i>n?r.Std.nz(e)<=0?1:r.Std.nz(e)+1:r.Std.nz(e)>=0?-1:r.Std.nz(e)-1,this._context.new_var(e)}),this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.close(this._context),n=this._context.new_var(i),o=this._input(0),s=this._input(1),a=this._input(2),l=r.Std.rsi(this.f_1(n,o,this._context),this.f_2(n,o,this._context)),c=this.f_3(n),u=r.Std.rsi(this.f_1(c,s,this._context),this.f_2(c,s,this._context)),h=this._context.new_var(r.Std.roc(n,1)),d=r.Std.percentrank(h,a);return[r.Std.avg(l,u,d)]}}},{name:"Coppock Curve",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,inputs:{in_0:10,in_1:14,in_2:11}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Coppock Curve",shortDescription:"Coppock Curve",is_price_study:!1,inputs:[{id:"in_0",name:"WMA Length",defval:10,type:"integer",min:-1e12,max:5e3},{id:"in_1",name:"Long RoC Length",defval:14,type:"integer",min:1,max:4999},{id:"in_2",name:"Short RoC Length",defval:11,type:"integer",min:1,max:4999}],id:"Coppock Curve@tv-basicstudies-1",scriptIdPart:"",name:"Coppock Curve"},constructor:function(){this.f_0=function(e,t){return e+t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=this._input(1),o=this._input(2),s=r.Std.close(this._context),a=this._context.new_var(s),l=r.Std.roc(a,n),c=this._context.new_var(s),u=r.Std.roc(c,o),h=this.f_0(l,u),d=this._context.new_var(h);return[r.Std.wma(d,i,this._context)]}}},{name:"Correlation Coeff",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:4,trackPrice:!1,transparency:40,visible:!0,color:"#800080"}},precision:4,inputs:{in_0:"AAPL",in_1:20}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Correlation Coefficient",shortDescription:"CC",is_price_study:!1,inputs:[{id:"in_0",name:"sym",defval:"AAPL",type:"symbol"},{id:"in_1",name:"length",defval:20,type:"integer",min:1,max:2e3}],id:"Correlation Coeff@tv-basicstudies-1",scriptIdPart:"",name:"Correlation Coeff"},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this._context.new_sym(this._input(0),r.Std.period(this._context),r.Std.period(this._context))},this.main=function(e,t){this._context=e,this._input=t ;var i=this._context.new_unlimited_var(this._context.symbol.time),n=(this._input(0),r.Std.period(this._context),r.Std.close(this._context)),o=this._input(1);this._context.select_sym(1);var s=this._context.new_unlimited_var(this._context.symbol.time),a=r.Std.close(this._context),l=this._context.new_unlimited_var(a);this._context.select_sym(0);var c=l.adopt(s,i,0),u=this._context.new_var(n),h=this._context.new_var(c);return[r.Std.correlation(u,h,o,this._context)]}}},{name:"Correlation - Log",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Correlation - Log@tv-basicstudies-1",scriptIdPart:"",name:"Correlation - Log",description:"Correlation - Log",shortDescription:"Correlation - Log",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#800080"}},precision:4,inputs:{instrument:"INTC",instrument2:"AMZN",periods:25}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"instrument",name:"Instrument 1",type:"symbol",defval:"INTC"},{id:"instrument2",name:"Instrument 2",type:"symbol",defval:"AMZN"},{id:"periods",name:"Periods",type:"integer",defval:25}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this._context.new_sym(this._input(0),r.Std.period(this._context),r.Std.period(this._context)),this._context.new_sym(this._input(1),r.Std.period(this._context),r.Std.period(this._context)),this.period=this._input(2)},this.correlationLog=function(e,t,i,n){var o=r.Std.sma(e,i,n),s=r.Std.sma(t,i,n),a=n.new_var(e.get()*t.get());return(r.Std.sma(a,i,n)-o*s)/Math.sqrt(r.Std.variance2(e,o,i)*r.Std.variance2(t,s,i))},this.main=function(e,t){this._context=e,this._input=t,this._context.select_sym(1);var i=this._context.new_var(this._context.symbol.time);this._context.select_sym(2);var n=this._context.new_var(r.Std.close(this._context)),o=this._context.new_var(r.Std.log(n.get()/n.get(1))),s=this._context.new_var(this._context.symbol.time);this._context.select_sym(1);var a=this._context.new_var(r.Std.close(this._context)),l=this._context.new_var(r.Std.log(a.get()/a.get(1))),c=this._context.new_var(o.adopt(s,i,0));return[this.correlationLog(l,c,this.period,this._context)]}}},{name:"Detrended Price Oscillator",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#808000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:21,in_1:!1}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"DPO",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Detrended Price Oscillator",shortDescription:"DPO",is_price_study:!1,is_hidden_study:!1,id:"detrended_price_oscillator@tv-basicstudies-1",bands:[{id:"hline_0",name:"Zero",isHidden:!1}],inputs:[{id:"in_0",name:"Period",defval:21,type:"integer",min:1,max:1e12},{id:"in_1",name:"isCentered",defval:!1,type:"bool"}],scriptIdPart:"",name:"Detrended Price Oscillator"}, constructor:function(){this.f_0=function(){var e=this._input(0),t=this._input(1),i=Math.floor(e/2+1),n=this._context.new_var(r.Std.close(this._context)),o=this._context.new_var(r.Std.sma(n,e,this._context)),s=this._context.new_var(r.Std.close(this._context)).get(i)-o,a=r.Std.close(this._context)-o.get(i);return[t?s:a,t?-i:0]},this.main=function(e,t){this._context=e,this._input=t;var i=this.f_0();return[{value:i[0],offset:i[1]}]}}},{name:"Directional Movement Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:14,in_1:14}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"+DI",histogramBase:0,joinPoints:!1},plot_1:{title:"-DI",histogramBase:0,joinPoints:!1},plot_2:{title:"ADX",histogramBase:0,joinPoints:!1}},description:"Directional Movement",shortDescription:"DMI",is_price_study:!1,inputs:[{id:"in_0",name:"DI Length",defval:14,type:"integer",min:1,max:2e3},{id:"in_1",name:"ADX Smoothing",defval:14,type:"integer",min:1,max:50}],id:"Directional Movement Index@tv-basicstudies-1",scriptIdPart:"",name:"Directional Movement Index"},constructor:function(){this.f_0=function(e){return-e},this.f_1=function(e,t){return r.Std.and(r.Std.gt(e,t),r.Std.gt(e,0))?e:0},this.f_2=function(e,t){return 100*e/t},this.f_3=function(e,t){return e+t},this.f_4=function(e,t,i){return r.Std.abs(e-t)/(r.Std.eq(i,0)?1:i)},this.f_5=function(e){return 100*e},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=this._input(1),o=r.Std.high(this._context),s=this._context.new_var(o),a=r.Std.change(s),l=r.Std.low(this._context),c=this._context.new_var(l),u=r.Std.change(c),h=this.f_0(u),d=r.Std.tr(this._context),p=this._context.new_var(d),f=r.Std.rma(p,i,this._context),_=this.f_1(a,h),m=this._context.new_var(_),y=r.Std.rma(m,i,this._context),g=this.f_2(y,f),v=r.Std.fixnan(g,this._context),S=this.f_1(h,a),b=this._context.new_var(S),w=r.Std.rma(b,i,this._context),P=this.f_2(w,f),C=r.Std.fixnan(P,this._context),x=this.f_3(v,C),T=this.f_4(v,C,x),L=this._context.new_var(T),I=r.Std.rma(L,n,this._context);return[v,C,this.f_5(I)]}}},{name:"Donchian Channels",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"}},precision:4,filledAreasStyle:{fill_0:{color:"#0000FF",transparency:90,visible:!0}},inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"},{id:"plot_1", type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Lower",histogramBase:0,joinPoints:!1},plot_1:{title:"Upper",histogramBase:0,joinPoints:!1},plot_2:{title:"Basis",histogramBase:0,joinPoints:!1}},description:"Donchian Channels",shortDescription:"DC",is_price_study:!0,filledAreas:[{id:"fill_0",objAId:"plot_1",objBId:"plot_0",type:"plot_plot",title:"Plots Background"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:2e3}],id:"Donchian Channels@tv-basicstudies-1",scriptIdPart:"",name:"Donchian Channels"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=r.Std.low(this._context),o=this._context.new_var(n),s=r.Std.lowest(o,i,this._context),a=r.Std.high(this._context),l=this._context.new_var(a),c=r.Std.highest(l,i,this._context);return[s,c,r.Std.avg(c,s)]}}},{name:"Double Exponential Moving Average",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Double EMA",shortDescription:"DEMA",is_price_study:!0,inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:1e4}],id:"Double Exponential Moving Average@tv-basicstudies-1",scriptIdPart:"",name:"Double Exponential Moving Average"},constructor:function(){this.f_0=function(e,t){return 2*e-t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=r.Std.close(this._context),o=this._context.new_var(n),s=r.Std.ema(o,i,this._context),a=this._context.new_var(s),l=r.Std.ema(a,i,this._context);return[this.f_0(s,l)]}}},{name:"Ease of Movement",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#808000"}},precision:4,inputs:{in_0:1e4,in_1:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Ease Of Movement",shortDescription:"EOM",is_price_study:!1,inputs:[{id:"in_0",name:"Divisor",defval:1e4,type:"integer",min:1,max:1e9},{id:"in_1",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Ease of Movement@tv-basicstudies-1",scriptIdPart:"",name:"Ease of Movement"},constructor:function(){this.f_0=function(e,t,i,r,n){return e*t*(i-r)/n},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=this._input(1),o=r.Std.hl2(this._context),s=this._context.new_var(o),a=r.Std.change(s),l=this.f_0(i,a,r.Std.high(this._context),r.Std.low(this._context),r.Std.volume(this._context)),c=this._context.new_var(l);return[r.Std.sma(c,n,this._context)]}}},{name:"Elders Force Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800000"}},precision:4,bands:[{ color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:13}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Elder's Force Index",shortDescription:"EFI",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"length",defval:13,type:"integer",min:1,max:2e3}],id:"Elders Force Index@tv-basicstudies-1",scriptIdPart:"",name:"Elders Force Index"},constructor:function(){this.f_0=function(e,t){return e*t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=r.Std.close(this._context),o=this._context.new_var(n),s=r.Std.change(o),a=this.f_0(s,r.Std.volume(this._context)),l=this._context.new_var(a);return[r.Std.ema(l,i,this._context)]}}},{name:"EMA Cross",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"},plot_2:{linestyle:0,linewidth:4,plottype:3,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,inputs:{in_0:9,in_1:26}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Short",histogramBase:0,joinPoints:!1},plot_1:{title:"Long",histogramBase:0,joinPoints:!1},plot_2:{title:"Crosses",histogramBase:0,joinPoints:!1}},description:"EMA Cross",shortDescription:"EMA Cross",is_price_study:!0,inputs:[{id:"in_0",name:"Short",defval:9,type:"integer",min:1,max:2e3},{id:"in_1",name:"Long",defval:26,type:"integer",min:1,max:2e3}],id:"EMA Cross@tv-basicstudies-1",scriptIdPart:"",name:"EMA Cross"},constructor:function(){this.f_0=function(e,t){return e?t:r.Std.na()},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=this._input(1),o=r.Std.close(this._context),s=this._context.new_var(o),a=r.Std.ema(s,i,this._context),l=this._context.new_var(o),c=r.Std.ema(l,n,this._context),u=a,h=c,d=r.Std.cross(a,c,this._context);return[u,h,this.f_0(d,a)]}}},{name:"Envelopes",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,filledAreasStyle:{fill_0:{color:"#0000FF",transparency:90,visible:!0}},inputs:{in_0:20,in_1:10,in_2:10,in_3:"Simple",in_4:"close"}},plots:[{id:"plot_1",type:"line"},{id:"plot_0",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Average",histogramBase:0,joinPoints:!1},plot_1:{title:"Upper",histogramBase:0,joinPoints:!1},plot_2:{title:"Lower",histogramBase:0,joinPoints:!1}},description:"Envelopes",shortDescription:"Envelopes",is_price_study:!0,filledAreas:[{id:"fill_0",objAId:"plot_1",objBId:"plot_2", type:"plot_plot",title:"Plots Background"}],inputs:[{id:"in_0",name:"Length",defval:20,type:"integer",min:1,max:2e3},{id:"in_1",name:"Upper Percentage",defval:2,type:"float",min:0},{id:"in_2",name:"Lower Percentage",defval:2,type:"float",min:0},{id:"in_3",name:"Method",type:"text",defval:"Simple",options:["Simple","Exponential","Weighted"]},{id:"in_4",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]}],id:"Envelope@tv-basicstudies-1",scriptIdPart:"",name:"Envelopes"},constructor:function(){this.f_0=function(e,t){return e*(1+t)},this.f_1=function(e,t){return e*(1-t)},this.main=function(e,t){this._context=e,this._input=t;var i=this._context.new_var(r.Std[this._input(4)](this._context)),n=r.Std.sma(i,this._input(0),this._context);return"Exponential"===this._input(3)?n=r.Std.ema(i,this._input(0),this._context):"Weighted"===this._input(3)&&(n=r.Std.wma(i,this._input(0),this._context)),[this.f_0(n,this._input(1)/100),n,this.f_1(n,this._input(2)/100)]}}},{name:"Standard Error",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Standard Error@tv-basicstudies-1",scriptIdPart:"",name:"Standard Error",description:"Standard Error",shortDescription:"Standard Error",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,color:"#FF6D00"}},precision:4,inputs:{length:14}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"length",type:"integer",name:"Length"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0)},this.main=function(e,t){this._context=e,this._input=t;for(var i,n,o=this._context.new_var(r.Std.close(this._context)),s=0,a=0,l=0;lthis._context.new_var(n).get(1)?1:0,[100*r.Std.sma(this._context.new_var(i),this.rollingPeriod,this._context)]}}},{name:"Net Volume",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Net Volume",shortDescription:"Net Volume",is_price_study:!1,inputs:[],id:"Net Volume@tv-basicstudies-1",scriptIdPart:"",name:"Net Volume"},constructor:function(){this.f_0=function(e,t,i){return r.Std.gt(e,0)?t:r.Std.lt(i,0)?-t:0*t},this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.close(this._context),n=this._context.new_var(i),o=r.Std.change(n);return[this.f_0(o,r.Std.volume(this._context),o)]}}},{name:"On Balance Volume",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"On Balance Volume",shortDescription:"OBV",is_price_study:!1,inputs:[],id:"On Balance Volume@tv-basicstudies-1",scriptIdPart:"",name:"On Balance Volume"},constructor:function(){this.f_0=function(e,t,i){return r.Std.gt(e,0)?t:r.Std.lt(i,0)?-t:0*t},this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.close(this._context),n=this._context.new_var(i),o=r.Std.change(n),s=this.f_0(o,r.Std.volume(this._context),o);return[r.Std.cum(s,this._context)]}}},{name:"Parabolic SAR",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:3,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:.02,in_1:.02,in_2:.2}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Parabolic SAR",shortDescription:"SAR",is_price_study:!0,inputs:[{id:"in_0",name:"start",defval:.02,type:"float",min:-1e12,max:1e12},{id:"in_1",name:"increment",defval:.02,type:"float",min:-1e12,max:1e12},{id:"in_2", name:"maximum",defval:.2,type:"float",min:-1e12,max:1e12}],id:"Parabolic SAR@tv-basicstudies-1",scriptIdPart:"",name:"Parabolic SAR"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=this._input(1),o=this._input(2);return[r.Std.sar(i,n,o,this._context)]}}},{name:"Price Channel",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0080"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0080"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0496FF"}},precision:4,inputs:{in_0:20,in_1:0}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Highprice Line",histogramBase:0,joinPoints:!1},plot_1:{title:"Lowprice Line",histogramBase:0,joinPoints:!1},plot_2:{title:"Centerprice Line",histogramBase:0,joinPoints:!1}},description:"Price Channel",shortDescription:"PC",is_price_study:!1,inputs:[{id:"in_0",name:"Length",defval:20,type:"integer",min:1,max:2e3},{id:"in_1",name:"Offset Length",defval:0,type:"integer",min:1,max:2e3}],id:"Price Channel@tv-basicstudies-1",scriptIdPart:"",name:"Price Channel"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.high(this._context),n=this._context.new_var(i),o=r.Std.low(this._context),s=this._context.new_var(o),a=this._input(0),l=this._input(1),c=r.Std.highest(n,a,this._context),u=r.Std.lowest(s,a,this._context);return[{value:c,offset:l},{value:u,offset:l},{value:r.Std.avg(c,u),offset:l}]}}},{name:"Price Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:10,in_1:21}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Price Oscillator",shortDescription:"PPO",is_price_study:!1,inputs:[{id:"in_0",name:"shortlen",defval:10,type:"integer",min:1,max:2e3},{id:"in_1",name:"longlen",defval:21,type:"integer",min:1,max:2e3}],id:"Price Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Price Oscillator"},constructor:function(){this.f_0=function(e,t){return(e-t)/t*100},this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.close(this._context),n=this._input(0),o=this._input(1),s=this._context.new_var(i),a=r.Std.sma(s,n,this._context),l=this._context.new_var(i),c=r.Std.sma(l,o,this._context);return[this.f_0(a,c)]}}},{name:"Price Volume Trend",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"PVT",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Price Volume Trend", shortDescription:"PVT",is_price_study:!1,is_hidden_study:!1,id:"price_volume_trend@tv-basicstudies-1",inputs:[],scriptIdPart:"",name:"Price Volume Trend"},constructor:function(){this.f_0=function(){var e=this._context.new_var(r.Std.close(this._context));return[r.Std.cum(r.Std.change(e)/e.get(1)*r.Std.volume(this._context),this._context)]},this.main=function(e,t){return this._context=e,this._input=t,[this.f_0()[0]]}}},{name:"Rate Of Change",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"ROC",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Rate Of Change",shortDescription:"ROC",is_price_study:!1,bands:[{id:"hline_0",name:"Zero Line",isHidden:!1}],inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:1e12}],id:"rate_of_change@tv-basicstudies-1",scriptIdPart:"",name:"Rate Of Change"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._context.new_var(r.Std.close(this._context)),n=this._input(0);return[100*(i.get(0)-i.get(n))/i.get(n)]}}},{name:"Relative Strength Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:70},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:30}],filledAreasStyle:{fill_0:{color:"#800080",transparency:90,visible:!0}},inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Relative Strength Index",shortDescription:"RSI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"Length",defval:14,type:"integer",min:1,max:2e3}],id:"Relative Strength Index@tv-basicstudies-1",scriptIdPart:"",name:"Relative Strength Index"},constructor:function(){this.f_0=function(e){return r.Std.max(e,0)},this.f_1=function(e){return-r.Std.min(e,0)},this.f_2=function(e,t){return r.Std.eq(e,0)?100:r.Std.eq(t,0)?0:100-100/(1+t/e)},this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.close(this._context),n=this._input(0),o=this._context.new_var(i),s=r.Std.change(o),a=this.f_0(s),l=this._context.new_var(a),c=r.Std.rma(l,n,this._context),u=this.f_1(s),h=this._context.new_var(u),d=r.Std.rma(h,n,this._context);return[this.f_2(d,c)]}}},{name:"Relative Vigor Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"},plot_1:{linestyle:0, linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"RVGI",histogramBase:0,joinPoints:!1},plot_1:{title:"Signal",histogramBase:0,joinPoints:!1}},description:"Relative Vigor Index",shortDescription:"RVGI",is_price_study:!1,inputs:[{id:"in_0",name:"Length",defval:10,type:"integer",min:1,max:2e3}],id:"Relative Vigor Index@tv-basicstudies-1",scriptIdPart:"",name:"Relative Vigor Index"},constructor:function(){this.f_0=function(e,t){return e-t},this.f_1=function(e,t){return e/t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=this.f_0(r.Std.close(this._context),r.Std.open(this._context)),o=this._context.new_var(n),s=r.Std.swma(o,this._context),a=this._context.new_var(s),l=r.Std.sum(a,i,this._context),c=this.f_0(r.Std.high(this._context),r.Std.low(this._context)),u=this._context.new_var(c),h=r.Std.swma(u,this._context),d=this._context.new_var(h),p=r.Std.sum(d,i,this._context),f=this.f_1(l,p),_=this._context.new_var(f);return[f,r.Std.swma(_,this._context)]}}},{name:"Relative Volatility Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:80},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:20}],filledAreasStyle:{fill_0:{color:"#808000",transparency:90,visible:!0}},inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Relative Volatility Index",shortDescription:"RVI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:10,type:"integer",min:1,max:2e3}],id:"Relative Volatility Index@tv-basicstudies-1",scriptIdPart:"",name:"Relative Volatility Index"},constructor:function(){this.f_0=function(e,t){return r.Std.le(e,0)?0:t},this.f_1=function(e,t){return r.Std.gt(e,0)?0:t},this.f_2=function(e,t){return e/(e+t)*100},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=r.Std.close(this._context),o=this._context.new_var(n),s=r.Std.stdev(o,i,this._context),a=this._context.new_var(n),l=r.Std.change(a),c=this.f_0(l,s),u=this._context.new_var(c),h=r.Std.ema(u,14,this._context),d=this.f_1(l,s),p=this._context.new_var(d),f=r.Std.ema(p,14,this._context);return[this.f_2(h,f)]}}},{name:"SMI Ergodic Indicator/Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"},plot_2:{linestyle:0,linewidth:1,plottype:1, trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:5,in_1:20,in_2:5}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Indicator",histogramBase:0,joinPoints:!1},plot_1:{title:"Signal",histogramBase:0,joinPoints:!1},plot_2:{title:"Oscillator",histogramBase:0,joinPoints:!1}},description:"SMI Ergodic Indicator/Oscillator",shortDescription:"SMIIO",is_price_study:!1,inputs:[{id:"in_0",name:"shortlen",defval:5,type:"integer",min:1,max:2e3},{id:"in_1",name:"longlen",defval:20,type:"integer",min:1,max:2e3},{id:"in_2",name:"siglen",defval:5,type:"integer",min:1,max:2e3}],id:"SMI Ergodic Indicator/Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"SMI Ergodic Indicator/Oscillator"},constructor:function(){this.f_0=function(e,t){return e-t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=this._input(1),o=this._input(2),s=r.Std.close(this._context),a=this._context.new_var(s),l=r.Std.tsi(a,i,n,this._context),c=this._context.new_var(l),u=r.Std.ema(c,o,this._context);return[l,u,this.f_0(l,u)]}}},{name:"Smoothed Moving Average",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:7,in_1:"close"}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Smoothed Moving Average",shortDescription:"SMMA",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:7,type:"integer",min:1,max:1e12},{id:"in_1",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]}],id:"smoothed_moving_average@tv-basicstudies-1",scriptIdPart:"",name:"Smoothed Moving Average"},constructor:function(){this.f_0=function(){var e=this._input(0),t=r.Std[this._input(1)](this._context),i=this._context.new_var(t),n=r.Std.sma(i,e,this._context),o=this._context.new_var(),s=(o.get(1)*(e-1)+t)/e;return o.set(r.Std.na(o.get(1))?n:s),[o.get(0)]},this.main=function(e,t){return this._context=e,this._input=t,this.f_0()}}},{name:"Standard Deviation",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,id:"Standard Deviation@tv-basicstudies-1",scriptIdPart:"",name:"Standard Deviation",description:"Standard Deviation",shortDescription:"Standard Deviation",is_price_study:!1,plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,color:"#26A69A"}},precision:4,inputs:{periods:5,deviations:1}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",name:"Periods",type:"integer"},{id:"deviations",name:"Deviations",type:"float"}]},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=this._input(1),o=this._context.new_var(r.Std.close(this._context));return[r.Std.stdev(o,i,this._context)*n]}}},{name:"Stochastic",metainfo:{_metainfoVersion:27, isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:80},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:20}],filledAreasStyle:{fill_0:{color:"#800080",transparency:75,visible:!0}},inputs:{in_0:14,in_1:1,in_2:3}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"%K",histogramBase:0,joinPoints:!1},plot_1:{title:"%D",histogramBase:0,joinPoints:!1}},description:"Stochastic",shortDescription:"Stoch",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:1e4},{id:"in_1",name:"smoothK",defval:1,type:"integer",min:1,max:1e4},{id:"in_2",name:"smoothD",defval:3,type:"integer",min:1,max:1e4}],id:"Stochastic@tv-basicstudies-1",scriptIdPart:"",name:"Stochastic"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=this._input(1),o=this._input(2),s=r.Std.close(this._context),a=r.Std.high(this._context),l=r.Std.low(this._context),c=this._context.new_var(s),u=this._context.new_var(a),h=this._context.new_var(l),d=r.Std.stoch(c,u,h,i,this._context),p=this._context.new_var(d),f=r.Std.sma(p,n,this._context),_=this._context.new_var(f);return[f,r.Std.sma(_,o,this._context)]}}},{name:"Stochastic RSI",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:80},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:20}],filledAreasStyle:{fill_0:{color:"#800080",transparency:80,visible:!0}},inputs:{in_0:14,in_1:14,in_2:3,in_3:3}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"%K",histogramBase:0,joinPoints:!1},plot_1:{title:"%D",histogramBase:0,joinPoints:!1}},description:"Stochastic RSI",shortDescription:"Stoch RSI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"lengthRSI",defval:14,type:"integer",min:1,max:1e4},{id:"in_1",name:"lengthStoch",defval:14,type:"integer",min:1,max:1e4},{id:"in_2",name:"smoothK",defval:3,type:"integer",min:1,max:1e4},{id:"in_3",name:"smoothD",defval:3,type:"integer",min:1,max:1e4}],id:"Stochastic RSI@tv-basicstudies-1",scriptIdPart:"",name:"Stochastic RSI"},constructor:function(){ this.f_1=function(e,t,i){var n=i.new_var(r.Std.max(r.Std.change(e),0));return r.Std.rma(n,t,i)},this.f_2=function(e,t,i){var n=i.new_var(-r.Std.min(r.Std.change(e),0));return r.Std.rma(n,t,i)},this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.close(this._context),n=this._input(0),o=this._input(1),s=this._input(2),a=this._input(3),l=this._context.new_var(i),c=r.Std.rsi(this.f_1(l,n,this._context),this.f_2(l,n,this._context)),u=this._context.new_var(c),h=this._context.new_var(c),d=this._context.new_var(c),p=r.Std.stoch(u,h,d,o,this._context),f=this._context.new_var(p),_=r.Std.sma(f,s,this._context),m=this._context.new_var(_);return[_,r.Std.sma(m,a,this._context)]}}},{name:"TRIX",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:18}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"TRIX",histogramBase:0,joinPoints:!1}},description:"TRIX",shortDescription:"TRIX",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"length",defval:18,type:"integer",min:1,max:2e3}],id:"TRIX@tv-basicstudies-1",scriptIdPart:"",name:"TRIX"},constructor:function(){this.f_0=function(e){return r.Std.log(e)},this.f_1=function(e){return 1e4*e},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=this.f_0(r.Std.close(this._context)),o=this._context.new_var(n),s=r.Std.ema(o,i,this._context),a=this._context.new_var(s),l=r.Std.ema(a,i,this._context),c=this._context.new_var(l),u=r.Std.ema(c,i,this._context),h=this._context.new_var(u),d=r.Std.change(h);return[this.f_1(d)]}}},{name:"Triple EMA",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Triple EMA",shortDescription:"TEMA",is_price_study:!0,inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:1e4}],id:"Triple EMA@tv-basicstudies-1",scriptIdPart:"",name:"Triple EMA"},constructor:function(){this.f_0=function(e,t,i){return 3*(e-t)+i},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=r.Std.close(this._context),o=this._context.new_var(n),s=r.Std.ema(o,i,this._context),a=this._context.new_var(s),l=r.Std.ema(a,i,this._context),c=this._context.new_var(l),u=r.Std.ema(c,i,this._context);return[this.f_0(s,l,u)]}}},{name:"True Strength Indicator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{ color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:25,in_1:13,in_2:13}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1},plot_1:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"True Strength Indicator",shortDescription:"True Strength Indicator",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"long",defval:25,type:"integer",min:1,max:4999},{id:"in_1",name:"short",defval:13,type:"integer",min:1,max:4999},{id:"in_2",name:"siglen",defval:13,type:"integer",min:1,max:4999}],id:"True Strength Indicator@tv-basicstudies-1",scriptIdPart:"",name:"True Strength Indicator"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=this._input(1),o=this._input(2),s=r.Std.close(this._context),a=this._context.new_var(s),l=r.Std.tsi(a,n,i,this._context),c=this._context.new_var(l);return[l,r.Std.ema(c,o,this._context)]}}},{name:"Trend Strength Index",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Trend Strength Index@tv-basicstudies-1",scriptIdPart:"",name:"Trend Strength Index",description:"Trend Strength Index",shortDescription:"Trend Strength Index",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#F00000"}},precision:4,inputs:{periods:14}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",type:"integer",name:"Periods"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.invertedPeriod=1/this.period,this.sumX=(this.period-1)*this.period/2,this.sumXX=(this.period-1)*this.period*(2*this.period-1)/6,this.invertedPeriodSumXSumX=this.invertedPeriod*this.sumX*this.sumX},this.trendStrengthIndex=function(){for(var e=this._context.new_var(r.Std.close(this._context)),t=r.Std.sum(e,this.period,this._context),i=0,n=0,o=0;o0?1:-1:a/(l=Math.sqrt(l))},this.main=function(e,t){return this._context=e,this._input=t,[this.trendStrengthIndex()]}}},{name:"Typical Price",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,id:"TypicalPrice@tv-basicstudies-1",scriptIdPart:"",name:"Typical Price",description:"Typical Price",shortDescription:"Typical Price",is_price_study:!0,plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#85200C"}},precision:3,inputs:{}},styles:{plot_0:{title:"Plot"}},inputs:[]},constructor:function(){this.main=function(e,t){return this._context=e,this._input=t,[r.Std.hlc3(this._context)]}}},{name:"Ultimate Oscillator",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1, plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:7,in_1:14,in_2:28}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"UO",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Ultimate Oscillator",shortDescription:"UO",is_price_study:!1,inputs:[{id:"in_0",name:"length7",defval:7,type:"integer",min:1,max:1e12},{id:"in_1",name:"length14",defval:14,type:"integer",min:1,max:1e12},{id:"in_2",name:"length28",defval:28,type:"integer",min:1,max:1e12}],id:"ultimate_oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Ultimate Oscillator"},constructor:function(){this.f_0=function(e,t,i){var n=this._context.new_var(e),o=this._context.new_var(t);return[r.Std.sum(n,i,this._context)/r.Std.sum(o,i,this._context)]},this.f_1=function(){var e=this._input(0),t=this._input(1),i=this._input(2),n=this._context.new_var(r.Std.close(this._context)),o=r.Std.max(r.Std.high(this._context),n.get(1)),s=this._context.new_var(r.Std.close(this._context)),a=r.Std.min(r.Std.low(this._context),s.get(1)),l=r.Std.close(this._context)-a,c=o-a,u=this.f_0(l,c,e),h=this.f_0(l,c,t),d=this.f_0(l,c,i);return[100*(4*u[0]+2*h[0]+d[0])/7]},this.main=function(e,t){return this._context=e,this._input=t,this.f_1()}}},{name:"Volatility Close-to-Close",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Volatility Close-to-Close@tv-basicstudies-1",scriptIdPart:"",name:"Volatility Close-to-Close",description:"Volatility Close-to-Close",shortDescription:"Volatility Close-to-Close",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,color:"#0000FF"}},precision:4,inputs:{periods:10,daysPerYear:252}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",name:"Periods",type:"integer",defval:10},{id:"daysPerYear",name:"Days Per Year",type:"integer",defval:252}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.daysPerYear=this._input(1)},this.stdev=function(e,t,i){var n=this.variance(e,t,i);return r.Std.sqrt(n)},this.variance=function(e,t,i){var n=r.Std.sma(e,t,i);return this.variance2(e,n,t)},this.variance2=function(e,t,i){var r,n,o=0;for(r=0;r0&&(a=.12*this.square(e.get()-n.get(1))/this.marketClosedPercentage+.88*a/(1-this.marketClosedPercentage)),a/=s,a*=this.secondsPerYear;var l=this._context.new_var(a);return 100*Math.sqrt(r.Std.sum(l,this.period,this._context)/this.period)},this.main=function(e,t){return this._context=e,this._input=t,[this.volatilityOHLC()]}}},{name:"Volatility Index",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!0,id:"Volatility Index@tv-basicstudies-1",scriptIdPart:"",name:"Volatility Index", description:"Volatility Index",shortDescription:"Volatility Index",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#F00000"}},precision:3,inputs:{periods:10,atrMult:3,method:"Wilder Smoothing"}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",name:"Periods",type:"integer"},{id:"atrMult",name:"ATR Mult",type:"float"},{id:"method",name:"Method",type:"text",defval:"Exponential",options:["Exponential","Wilder Smoothing"]}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.atrMult=this._input(1),this.maMethod=this._input(2),this.nextsar=null,this.position=null,this.sic=null,this.bars=[],this.count=0,this.lastSar=null},this.highest=function(e,t){for(var i=this.bars.length-this.period,r=this.bars[i],n=i+1;nr&&(r=this.bars[n]);return r},this.computeATR=function(){var e=r.Std.high(this._context)-r.Std.low(this._context),t=r.Std.high(this._context)-this.bars[this.bars.length-2],i=this.bars[this.bars.length-2]-r.Std.low(this._context);return this.tr=Math.max(e,t,i),"Exponential"===this.maMethod?this.atr=r.Std.ema(this._context.new_var(this.tr),this.period,this._context):this.atr=this.tr/this.period+(1-1/this.period)*this.atr,this.atr*this.atrMult},this.calculateVolatility=function(){if(r.Std.close(this._context)===this.bars[this.bars.length-1])return this.lastSar;if(this.bars.push(r.Std.close(this._context)),1===this.count)this.atr=r.Std.high(this._context)-r.Std.low(this._context),this.sic=r.Std.close(this._context);else if(this.countthis.sic&&(this.sic=r.Std.close(this._context))}else if(this.count===this.period){e=r.Std.high(this._context)-r.Std.low(this._context),t=r.Std.high(this._context)-this.bars[this.bars.length-2],i=this.bars[this.bars.length-2]-r.Std.low(this._context);this.atr+=Math.max(e,t,i),this.atr*=1/this.period,r.Std.close(this._context)>this.sic&&(this.sic=r.Std.close(this._context)),this.position="LONG",this.nextsar=this.sic-this.atr*this.atrMult}else{var n=this.nextsar;"LONG"===this.position?r.Std.close(this._context)n?(this.position="LONG",this.sic=r.Std.close(this._context),this.nextsar=this.sic-this.computeATR()):(this.position="SHORT",this.sic=Math.min(r.Std.close(this._context),this.sic),this.nextsar=this.sic+this.computeATR())),this.lastSar=n}return this.count++,n},this.main=function(e,t){return this._context=e,this._input=t,this._context.select_sym(0),[this.calculateVolatility()]}}},{name:"VWAP",metainfo:{ _metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:0,transparency:0,visible:!0,color:"#3A6CA8"}},precision:4},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"VWAP",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"VWAP",shortDescription:"VWAP",is_price_study:!0,inputs:[],id:"VWAP@tv-basicstudies-1",scriptIdPart:"",name:"VWAP"},constructor:function(){this.f_1=function(e){e.hist=null,e.add_hist()},this.init=function(e,t){this._isNewSession=null},this.main=function(e,t){this._context=e,this._input=t;var i=e.new_var(),n=e.new_var(),o=this._context.symbol.time;return o&&(null===this._isNewSession&&(this._isNewSession=r.Std.createNewSessionCheck(e)),this._isNewSession(o)&&(this.f_1(i),this.f_1(n))),i.set(r.Std.nz(i.get(1))+r.Std.hlc3(this._context)*r.Std.volume(this._context)),n.set(r.Std.nz(n.get(1))+r.Std.volume(this._context)),[i.get(0)/n.get(0)]}}},{name:"VWMA",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"VWMA",shortDescription:"VWMA",is_price_study:!0,inputs:[{id:"in_0",name:"len",defval:20,type:"integer",min:1,max:1e4}],id:"VWMA@tv-basicstudies-1",scriptIdPart:"",name:"VWMA"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.close(this._context),n=this._input(0),o=this._context.new_var(i);return[r.Std.vwma(o,n,this._context)]}}},{name:"Volume Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:5,in_1:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Volume Oscillator",shortDescription:"Volume Osc",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"shortlen",defval:5,type:"integer",min:1,max:4999},{id:"in_1",name:"longlen",defval:10,type:"integer",min:1,max:4999}],id:"Volume Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Volume Oscillator"},constructor:function(){this.f_0=function(e,t){return 100*(e-t)/t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=this._input(1),o=r.Std.volume(this._context),s=this._context.new_var(o),a=r.Std.ema(s,i,this._context),l=this._context.new_var(o),c=r.Std.ema(l,n,this._context);return[this.f_0(a,c)]}}},{name:"Vortex Indicator",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35, visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"VI +",histogramBase:0,joinPoints:!1,isHidden:!1},plot_1:{title:"VI -",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Vortex Indicator",shortDescription:"VI",is_price_study:!1,is_hidden_study:!1,id:"vortex_indicator@tv-basicstudies-1",inputs:[{id:"in_0",name:"Period",defval:14,type:"integer",min:2,max:1e12}],scriptIdPart:"",name:"Vortex Indicator"},constructor:function(){this.f_0=function(){var e=this._input(0),t=this._context.new_var(r.Std.low(this._context)),i=this._context.new_var(r.Std.abs(r.Std.high(this._context)-t.get(1))),n=r.Std.sum(i,e,this._context),o=this._context.new_var(r.Std.high(this._context)),s=this._context.new_var(r.Std.abs(r.Std.low(this._context)-o.get(1))),a=r.Std.sum(s,e,this._context),l=this._context.new_var(r.Std.atr(1,this._context)),c=r.Std.sum(l,e,this._context);return[n/c,a/c]},this.main=function(e,t){return this._context=e,this._input=t,this.f_0()}}},{name:"Willams %R",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:-20},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:-80}],filledAreasStyle:{fill_0:{color:"#000080",transparency:90,visible:!0}},inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Williams %R",shortDescription:"%R",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Willams %R@tv-basicstudies-1",scriptIdPart:"",name:"Willams %R"},constructor:function(){this.f_0=function(e,t,i){return 100*(e-t)/(t-i)},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=r.Std.high(this._context),o=this._context.new_var(n),s=r.Std.highest(o,i,this._context),a=r.Std.low(this._context),l=this._context.new_var(a),c=r.Std.lowest(l,i,this._context);return[this.f_0(r.Std.close(this._context),s,c)]}}},{name:"Williams Alligator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{in_0:21,in_1:13,in_2:8}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Jaw",histogramBase:0,joinPoints:!1},plot_1:{title:"Teeth",histogramBase:0,joinPoints:!1},plot_2:{title:"Lips",histogramBase:0, joinPoints:!1}},description:"Williams Alligator",shortDescription:"Alligator",is_price_study:!0,inputs:[{id:"in_0",name:"jawLength",defval:21,type:"integer",min:1,max:2e3},{id:"in_1",name:"teethLength",defval:13,type:"integer",min:1,max:2e3},{id:"in_2",name:"lipsLength",defval:8,type:"integer",min:1,max:2e3}],id:"Williams Alligator@tv-basicstudies-1",scriptIdPart:"",name:"Williams Alligator"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),n=this._input(1),o=this._input(2),s=r.Std.hl2(this._context),a=this._context.new_var(s),l=r.Std.ema(a,i,this._context),c=this._context.new_var(s),u=r.Std.ema(c,n,this._context),h=this._context.new_var(s);return[{value:l,offset:8},{value:u,offset:5},{value:r.Std.ema(h,o,this._context),offset:3}]}}},{name:"Williams Fractals",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{plottype:"shape_triangle_down",visible:!0,location:"BelowBar",transparency:0,color:"#800000"},plot_1:{plottype:"shape_triangle_up",visible:!0,location:"AboveBar",transparency:0,color:"#808000"}},precision:4,inputs:{in_0:2}},plots:[{id:"plot_0",type:"shapes"},{id:"plot_1",type:"shapes"}],styles:{plot_0:{title:"Down fractals",isHidden:!1},plot_1:{title:"Up fractals",isHidden:!1}},description:"Williams Fractal",shortDescription:"Fractals",is_price_study:!0,is_hidden_study:!1,id:"Williams Fractals@tv-basicstudies-1",inputs:[{id:"in_0",name:"Periods",defval:2,type:"integer",min:2,max:1e12}],scriptIdPart:"",name:"Williams Fractals",isCustomIndicator:!0},constructor:function(){this.f_0=function(){var e=this._input(0),t=this._context.new_var(r.Std.high(this._context)),i=r.Std.or(r.Std.and(r.Std.and(r.Std.lt(t.get(e+2),t.get(e)),r.Std.lt(t.get(e+1),t.get(e))),r.Std.and(r.Std.lt(t.get(e-1),t.get(e)),r.Std.lt(t.get(e-2),t.get(e)))),r.Std.or(r.Std.or(r.Std.and(r.Std.lt(t.get(e+3),t.get(e)),r.Std.and(r.Std.and(r.Std.lt(t.get(e+2),t.get(e)),r.Std.eq(t.get(e+1),t.get(e))),r.Std.and(r.Std.lt(t.get(e-1),t.get(e)),r.Std.lt(t.get(e-2),t.get(e))))),r.Std.and(r.Std.and(r.Std.lt(t.get(e+4),t.get(e)),r.Std.lt(t.get(e+3),t.get(e))),r.Std.and(r.Std.and(r.Std.eq(t.get(e+2),t.get(e)),r.Std.le(t.get(e+1),t.get(e))),r.Std.and(r.Std.lt(t.get(e-1),t.get(e)),r.Std.lt(t.get(e-2),t.get(e)))))),r.Std.or(r.Std.and(r.Std.and(r.Std.lt(t.get(e+5),t.get(e)),r.Std.and(r.Std.lt(t.get(e+4),t.get(e)),r.Std.eq(t.get(e+3),t.get(e)))),r.Std.and(r.Std.and(r.Std.eq(t.get(e+2),t.get(e)),r.Std.le(t.get(e+1),t.get(e))),r.Std.and(r.Std.lt(t.get(e-1),t.get(e)),r.Std.lt(t.get(e-2),t.get(e))))),r.Std.and(r.Std.and(r.Std.and(r.Std.lt(t.get(e+6),t.get(e)),r.Std.lt(t.get(e+5),t.get(e))),r.Std.and(r.Std.eq(t.get(e+4),t.get(e)),r.Std.le(t.get(e+3),t.get(e)))),r.Std.and(r.Std.and(r.Std.eq(t.get(e+2),t.get(e)),r.Std.le(t.get(e+1),t.get(e))),r.Std.and(r.Std.lt(t.get(e-1),t.get(e)),r.Std.lt(t.get(e-2),t.get(e)))))))),n=this._context.new_var(r.Std.low(this._context)) ;return[r.Std.or(r.Std.and(r.Std.and(r.Std.gt(n.get(e+2),n.get(e)),r.Std.gt(n.get(e+1),n.get(e))),r.Std.and(r.Std.gt(n.get(e-1),n.get(e)),r.Std.gt(n.get(e-2),n.get(e)))),r.Std.or(r.Std.or(r.Std.and(r.Std.gt(n.get(e+3),n.get(e)),r.Std.and(r.Std.and(r.Std.gt(n.get(e+2),n.get(e)),r.Std.eq(n.get(e+1),n.get(e))),r.Std.and(r.Std.gt(n.get(e-1),n.get(e)),r.Std.gt(n.get(e-2),n.get(e))))),r.Std.and(r.Std.and(r.Std.gt(n.get(e+4),n.get(e)),r.Std.gt(n.get(e+3),n.get(e))),r.Std.and(r.Std.and(r.Std.eq(n.get(e+2),n.get(e)),r.Std.ge(n.get(e+1),n.get(e))),r.Std.and(r.Std.gt(n.get(e-1),n.get(e)),r.Std.gt(n.get(e-2),n.get(e)))))),r.Std.or(r.Std.and(r.Std.and(r.Std.gt(n.get(e+5),n.get(e)),r.Std.and(r.Std.gt(n.get(e+4),n.get(e)),r.Std.eq(n.get(e+3),n.get(e)))),r.Std.and(r.Std.and(r.Std.eq(n.get(e+2),n.get(e)),r.Std.ge(n.get(e+1),n.get(e))),r.Std.and(r.Std.gt(n.get(e-1),n.get(e)),r.Std.gt(n.get(e-2),n.get(e))))),r.Std.and(r.Std.and(r.Std.and(r.Std.gt(n.get(e+6),n.get(e)),r.Std.gt(n.get(e+5),n.get(e))),r.Std.and(r.Std.eq(n.get(e+4),n.get(e)),r.Std.ge(n.get(e+3),n.get(e)))),r.Std.and(r.Std.and(r.Std.eq(n.get(e+2),n.get(e)),r.Std.ge(n.get(e+1),n.get(e))),r.Std.and(r.Std.gt(n.get(e-1),n.get(e)),r.Std.gt(n.get(e-2),n.get(e)))))))),i]},this.main=function(e,t){this._context=e,this._input=t;var i=this.f_0();return[{value:i[0],offset:-2},{value:i[1],offset:-2}]}}}]},"2h0C":function(e,t,i){var r=i("uOxu").getLogger("Chart.PropertyPage.Binding");function n(e,t,i,n,o,s){e?(this._control=e,this._property=t,this._applyOnFly=i,this._undoModel=n,this._undoText=o,this._doesNotAffectSave=!1,t&&(this._formatters=[],this._changed=!1,this.setValue(t.value()),t.listeners().subscribe(this,this.propertyChanged))):r.logDebug("Missing control")}n.prototype.addFormatter=function(e){this._formatters.push(e),this.setValue(this._property.value())},n.prototype._formatValue=function(e){return this._formatters.reduce((function(e,t){return t(e)}),e)},n.prototype._setValueToProperty=function(e){this._setter?this._setter.call(this,e):this.setValueToProperty(e)},n.prototype._attachToControl=function(e,t){var i=this;t?e.on("keyup change input",(function(e){var t=i.value();i._setValueToProperty(t),i.setValue(t)})):(e.keypress((function(e){if(i._changed=!0,13===e.which){var t=i.value();i._setValueToProperty(t),i.setValue(t)}})),e.focusout((function(e){var t=i.value();i.changed()&&(i._setValueToProperty(t),i.setValue(t))})),e.change((function(e){var t=i.value();$(e.target).is(".ticker")?(void 0!==i._changeTimerId&&clearTimeout(i._changeTimerId),i._changeTimerId=setTimeout((function(){i._setValueToProperty(t)}),250)):i._setValueToProperty(t),i.setValue(t)})))},n.prototype.control=function(){return this._control},n.prototype.changed=function(){return this._changed},n.prototype.setValueToProperty=function(e){this._undoModel.setProperty(this._property,e,this._undoText,this._doesNotAffectSave),this._changed=!1},n.prototype.property=function(){return this._property},n.prototype.propertyChanged=function(e){this.setValue(e.value())},n.prototype.destroy=function(){ this._property&&this._property.listeners().unsubscribe(this,this.propertyChanged)},n.prototype.disableAffectingSave=function(){this._doesNotAffectSave=!0},t.Binding=n},"2jXJ":function(e,t,i){"use strict";i.r(t),i.d(t,"supportedLineTools",(function(){return r}));var r={cursor:{name:"cursor",onlySelectable:!0},dot:{name:"dot",onlySelectable:!0},arrow_cursor:{name:"arrow",onlySelectable:!0},eraser:{name:"eraser",onlySelectable:!0},measure:{name:"measure",onlySelectable:!0},zoom:{name:"zoom",onlySelectable:!0},brush:{name:"LineToolBrush",onlySelectable:!0},text:{name:"LineToolText"},anchored_text:{name:"LineToolTextAbsolute"},note:{name:"LineToolNote"},anchored_note:{name:"LineToolNoteAbsolute"},callout:{name:"LineToolCallout"},balloon:{name:"LineToolBalloon"},arrow_up:{name:"LineToolArrowMarkUp"},arrow_down:{name:"LineToolArrowMarkDown"},arrow_left:{name:"LineToolArrowMarkLeft"},arrow_right:{name:"LineToolArrowMarkRight"},price_label:{name:"LineToolPriceLabel"},arrow_marker:{name:"LineToolArrowMarker"},flag:{name:"LineToolFlagMark"},vertical_line:{name:"LineToolVertLine"},horizontal_line:{name:"LineToolHorzLine"},cross_line:{name:"LineToolCrossLine"},horizontal_ray:{name:"LineToolHorzRay"},trend_line:{name:"LineToolTrendLine"},info_line:{name:"LineToolInfoLine"},trend_angle:{name:"LineToolTrendAngle"},arrow:{name:"LineToolArrow"},ray:{name:"LineToolRay"},extended:{name:"LineToolExtended"},parallel_channel:{name:"LineToolParallelChannel"},disjoint_angle:{name:"LineToolDisjointAngle"},flat_bottom:{name:"LineToolFlatBottom"},pitchfork:{name:"LineToolPitchfork"},schiff_pitchfork_modified:{name:"LineToolSchiffPitchfork"},schiff_pitchfork:{name:"LineToolSchiffPitchfork2"},inside_pitchfork:{name:"LineToolInsidePitchfork"},pitchfan:{name:"LineToolPitchfan"},gannbox:{name:"LineToolGannSquare"},gannbox_square:{name:"LineToolGannComplex"},gannbox_fixed:{name:"LineToolGannFixed"},gannbox_fan:{name:"LineToolGannFan"},fib_retracement:{name:"LineToolFibRetracement"},fib_trend_ext:{name:"LineToolTrendBasedFibExtension"},fib_speed_resist_fan:{name:"LineToolFibSpeedResistanceFan"},fib_timezone:{name:"LineToolFibTimeZone"},fib_trend_time:{name:"LineToolTrendBasedFibTime"},fib_circles:{name:"LineToolFibCircles"},fib_spiral:{name:"LineToolFibSpiral"},fib_speed_resist_arcs:{name:"LineToolFibSpeedResistanceArcs"},fib_wedge:{name:"LineToolFibWedge"},fib_channel:{name:"LineToolFibChannel"},xabcd_pattern:{name:"LineTool5PointsPattern"},cypher_pattern:{name:"LineToolCypherPattern"},abcd_pattern:{name:"LineToolABCD"},triangle_pattern:{name:"LineToolTrianglePattern"},"3divers_pattern":{name:"LineToolThreeDrivers"},head_and_shoulders:{name:"LineToolHeadAndShoulders"},elliott_impulse_wave:{name:"LineToolElliottImpulse"},elliott_triangle_wave:{name:"LineToolElliottTriangle"},elliott_triple_combo:{name:"LineToolElliottTripleCombo"},elliott_correction:{name:"LineToolElliottCorrection"},elliott_double_combo:{name:"LineToolElliottDoubleCombo"},cyclic_lines:{name:"LineToolCircleLines"},time_cycles:{name:"LineToolTimeCycles"},sine_line:{ name:"LineToolSineLine"},long_position:{name:"LineToolRiskRewardLong"},short_position:{name:"LineToolRiskRewardShort"},forecast:{name:"LineToolPrediction"},date_range:{name:"LineToolDateRange"},price_range:{name:"LineToolPriceRange"},date_and_price_range:{name:"LineToolDateAndPriceRange"},bars_pattern:{name:"LineToolBarsPattern"},ghost_feed:{name:"LineToolGhostFeed"},projection:{name:"LineToolProjection"},rectangle:{name:"LineToolRectangle"},rotated_rectangle:{name:"LineToolRotatedRectangle"},ellipse:{name:"LineToolEllipse"},triangle:{name:"LineToolTriangle"},polyline:{name:"LineToolPolyline"},curve:{name:"LineToolBezierQuadro"},double_curve:{name:"LineToolBezierCubic"},arc:{name:"LineToolArc"},icon:{name:"LineToolIcon"}}},"2kV1":function(e,t,i){"use strict";i.r(t),i.d(t,"StudyStatusView",(function(){return a}));var r=i("mrSG"),n=i("nBJD"),o=i("8sOK"),s={NONE:"Default"},a=function(e){function t(t,i){var r=e.call(this,i)||this;return r._source=t,r}return Object(r.__extends)(t,e),t.prototype.color=function(){return this._source instanceof o.StudyStub?e.prototype.color.call(this):this._source.isFailed()||this._source.metaInfo&&this._source.metaInfo().isTVScriptStub?"#ff0000":e.prototype.color.call(this)},t.prototype.getSplitTitle=function(){var e=this._source.titleInParts(!0,s,void 0,!1);if(this._source.isFailed()){var t=e[1];return[(e[0]+" "+(void 0===t?"":t.join(" "))).trim()+": "+this._source.status(),void 0]}return e},t.prototype.update=function(){this._source.isFailed()?this._text=this._source.title(!0,s,void 0,!1)+": "+this._source.status():this._text=this._source.title(!0,s,void 0,!1)+" "+this._source.status()},t}(n.a)},"3/8U":function(e,t,i){"use strict";function r(e){return"dark"===e?"rgba(30,136,229,0.25)":"rgba(33,150,243,0.25)"}i.r(t),i.d(t,"axesHighlightColor",(function(){return r}))},"38az":function(e,t,i){"use strict";var r=i("k9/m").PlotRowSearchMode;function n(){this.backColorers=[]}function o(e){n.call(this),this._series=e}function s(e,t){n.call(this),this._study=e,this._plotIndex=t}n.prototype.barStyle=function(e,t,i){for(var r={},n=this.backColorers.length-1;n>=0;n--)this.backColorers[n].applyBarStyle(e,t,r,i);return this.applyBarStyle(e,t,r,i),r},n.prototype.pushBackBarColorer=function(e){this.backColorers.push(e)},n.prototype.applyBarStyle=function(e,t,i){throw new Error("This function is supposed to be reimplemented in a subclass")},inherit(o,n),o.upColor=function(e,t){switch(e.style.value()){case TradingView.Series.STYLE_LINE:return e.lineStyle.color.value();case TradingView.Series.STYLE_AREA:return e.areaStyle.linecolor.value();case TradingView.Series.STYLE_BARS:return e.barStyle.upColor.value();case TradingView.Series.STYLE_CANDLES:return e.candleStyle.upColor.value();case TradingView.Series.STYLE_HOLLOW_CANDLES:return e.hollowCandleStyle.upColor.value();case TradingView.Series.STYLE_HEIKEN_ASHI:return e.haStyle.upColor.value();case TradingView.Series.STYLE_BASELINE:return e.baselineStyle.topLineColor.value();case TradingView.Series.STYLE_HILO:return e.hiloStyle.color.value()} throw new Error("Unknown series style")},o.downColor=function(e,t){switch(e.style.value()){case TradingView.Series.STYLE_LINE:return e.lineStyle.color.value();case TradingView.Series.STYLE_AREA:return e.areaStyle.linecolor.value();case TradingView.Series.STYLE_BARS:return e.barStyle.downColor.value();case TradingView.Series.STYLE_CANDLES:return e.candleStyle.downColor.value();case TradingView.Series.STYLE_HOLLOW_CANDLES:return e.hollowCandleStyle.downColor.value();case TradingView.Series.STYLE_HEIKEN_ASHI:return e.haStyle.downColor.value();case TradingView.Series.STYLE_BASELINE:return e.baselineStyle.bottomLineColor.value();case TradingView.Series.STYLE_HILO:return e.hiloStyle.color.value()}throw new Error("Unknown series style")},o.prototype._applyLineStyle=function(e,t,i,r,n){i.barColor=o.upColor(n)},o.prototype._applyAreaStyle=function(e,t,i,r,n){i.barColor=o.upColor(n)},o.prototype._applyBarStyle=function(e,t,i,r,n){var s=o.upColor(n),a=o.downColor(n),l=this.findBar(e,!1,r);if(n.barStyle.barColorsOnPrevClose.value()){var c=this.findPrevBar(e,!1,r);i.barColor=c[TradingView.CLOSE_PLOT]<=l[TradingView.CLOSE_PLOT]?s:a,i.barBorderColor=c[TradingView.CLOSE_PLOT]<=l[TradingView.CLOSE_PLOT]?s:a}else i.barColor=l[TradingView.OPEN_PLOT]<=l[TradingView.CLOSE_PLOT]?s:a,i.barBorderColor=l[TradingView.OPEN_PLOT]<=l[TradingView.CLOSE_PLOT]?s:a},o.prototype._applyCandleStyle=function(e,t,i,r,n){var s,a=o.upColor(n,t),l=o.downColor(n,t),c=n.candleStyle.borderUpColor?n.candleStyle.borderUpColor.value():n.candleStyle.borderColor.value(),u=n.candleStyle.borderDownColor?n.candleStyle.borderDownColor.value():n.candleStyle.borderColor.value(),h=n.candleStyle.wickUpColor?n.candleStyle.wickUpColor.value():n.candleStyle.wickColor.value(),d=n.candleStyle.wickDownColor?n.candleStyle.wickDownColor.value():n.candleStyle.wickColor.value(),p=this.findBar(e,!1,r);n.candleStyle.barColorsOnPrevClose.value()?s=this.findPrevBar(e,!1,r)[TradingView.CLOSE_PLOT]<=p[TradingView.CLOSE_PLOT]:s=p[TradingView.OPEN_PLOT]<=p[TradingView.CLOSE_PLOT];i.barColor=s?a:l,i.barBorderColor=s?c:u,i.barWickColor=s?h:d},o.prototype._applyHollowCandleStyle=function(e,t,i,r,n){var s=o.upColor(n,t),a=o.downColor(n,t),l=n.hollowCandleStyle.borderUpColor?n.hollowCandleStyle.borderUpColor.value():n.hollowCandleStyle.borderColor.value(),c=n.hollowCandleStyle.borderDownColor?n.hollowCandleStyle.borderDownColor.value():n.hollowCandleStyle.borderColor.value(),u=n.hollowCandleStyle.wickUpColor?n.hollowCandleStyle.wickUpColor.value():n.hollowCandleStyle.wickColor.value(),h=n.hollowCandleStyle.wickDownColor?n.hollowCandleStyle.wickDownColor.value():n.hollowCandleStyle.wickColor.value(),d=this.findBar(e,!1,r);this.findPrevBar(e,!1,r)[TradingView.CLOSE_PLOT]<=d[TradingView.CLOSE_PLOT]?(i.barColor=s,i.barBorderColor=l,i.barWickColor=u):(i.barColor=a,i.barBorderColor=c,i.barWickColor=h),i.isBarHollow=d[TradingView.OPEN_PLOT]<=d[TradingView.CLOSE_PLOT]},o.prototype._applyHAStyle=function(e,t,i,r,n){ var s,a=o.upColor(n,t),l=o.downColor(n,t),c=n.haStyle.borderUpColor.value(),u=n.haStyle.borderDownColor.value(),h=n.haStyle.wickUpColor.value(),d=n.haStyle.wickDownColor.value(),p=this.findBar(e,t,r);n.haStyle.barColorsOnPrevClose.value()?s=this.findPrevBar(e,t,r)[TradingView.CLOSE_PLOT]<=p[TradingView.CLOSE_PLOT]:s=p[TradingView.OPEN_PLOT]<=p[TradingView.CLOSE_PLOT];i.barColor=s?a:l,i.barBorderColor=s?c:u,i.barWickColor=s?h:d},o.prototype._applyBaseLineStyle=function(e,t,i,r,n){var s=this.findBar(e,t,r),a=n.baselineStyle,l=this._series.priceScale(),c=Math.round(l.height()*(Math.abs(100-a.baseLevelPercentage.value())/100)),u=this._series.firstValue(),h=l.coordinateToPrice(c,u);s[TradingView.CLOSE_PLOT]>h?i.barColor=o.upColor(n,t):i.barColor=o.downColor(n,t)},o.prototype._applyHiLoStyle=function(e,t,i,r,n){i.barColor=o.upColor(n,t),i.barBorderColor=n.hiloStyle.borderColor.value()},o.prototype.applyBarStyle=function(e,t,i,r){i||(i={}),i.barColor=null,i.barBorderColor=null,i.barWickColor=null,i.isBarHollow=null,i.isBarUp=null,i.upColor=null,i.downColor=null,i.isTwoColorBar=null,i.isMergedBar=null;var n=this._series.properties();switch(n.style.value()){case TradingView.Series.STYLE_LINE:this._applyLineStyle(e,t,i,r,n);break;case TradingView.Series.STYLE_AREA:this._applyAreaStyle(e,t,i,r,n);break;case TradingView.Series.STYLE_BARS:this._applyBarStyle(e,t,i,r,n);break;case TradingView.Series.STYLE_CANDLES:this._applyCandleStyle(e,t,i,r,n);break;case TradingView.Series.STYLE_HOLLOW_CANDLES:this._applyHollowCandleStyle(e,t,i,r,n);break;case TradingView.Series.STYLE_HEIKEN_ASHI:this._applyHAStyle(e,t,i,r,n);break;case TradingView.Series.STYLE_BASELINE:this._applyBaseLineStyle(e,t,i,r,n);break;case TradingView.Series.STYLE_HILO:this._applyHiLoStyle(e,t,i,r,n)}return i},o.prototype.getSeriesBars=function(e){return e?this._series.nsBars():this._series.bars()},o.prototype._findBarFieldValue=function(e,t,i){var r=this.getSeriesBars(i).valueAt(e);if(null!==r)return r[t]},o.prototype.findBar=function(e,t,i){return i?i.value:this.getSeriesBars(t).valueAt(e)||[]},o.prototype.findPrevBar=function(e,t,i){if(i&&i.previousValue)return i.previousValue;var n=this._series.bars()._search(e,r.Exact);return null!==n&&n>0?this._series.bars()._valueAt(n-1):[]},inherit(s,n),s.prototype.getBars=function(){return this._study.series().bars()},s.prototype.firstColoredBar=function(e){for(var t=e,i=0;ie+a)return i;var l=r.styles[s.id] ;if(l.visible&&!l.visible.value())return i;var c=o.valueAt(e-a);if(null===c)return i;var u=c[this._plotIndex+1];if(null==u)return i;u=Math.round(u);var h=n.plots[this._plotIndex].palette,d=r.palettes[h],p=n.palettes[h].valToIndex?n.palettes[h].valToIndex[u]:u,f=d.colors[p].color.value();return i.barColor=f,i.upColor=f.color,i.downColor=f.color,i},t.SeriesBarColorer=o,t.StudyBarColorer=s},"3ClC":function(e,t,i){"use strict";i.r(t);var r=i("0YCj"),n=i.n(r),o=i("GVHu"),s=i("FVma"),a=i("cKqi"),l=i("0gbU"),c=i("TMWk"),u=i("8sOK"),h=i("mrSG"),d=function(e){function t(t,i,r,n){var o=e.call(this,t,i,r,n)||this;return o.properties().styles.vol_ma.visible.listeners().subscribe(o,(function(){return o.invalidateTitleCache()})),o}return Object(h.__extends)(t,e),t.prototype.base=function(){return 1},t.prototype.destroy=function(){this.properties().styles.vol_ma.visible.listeners().unsubscribeAll(this),e.prototype.destroy.call(this)},t.prototype._titleInputs=function(){var e={symbolsForDisplay:!0,skipHiddenInputs:!0,fakeInputsForDisplay:!0,asObject:!1};return this.properties().styles.vol_ma.visible.value()?this.inputs(e):this.inputs(Object(h.__assign)(Object(h.__assign)({},e),{skippedInputs:["length"]}))},t}(o.Study);function p(e,t){return void 0===t&&(t="shift"),{studyConstructor:e,colorRotationMode:t}}i.d(t,"isStudy",(function(){return m})),i.d(t,"isStudyStrategy",(function(){return y})),i.d(t,"isStudyStub",(function(){return g})),i.d(t,"isFundamentalStudy",(function(){return v})),i.d(t,"isESDStudy",(function(){return S})),i.d(t,"isFundamentalStudyMetaInfo",(function(){return b})),i.d(t,"createStudy",(function(){return P})),i.d(t,"studyColorRotationMode",(function(){return C}));var f={study_PivotPointsStandard:p(s.study_PivotPointsStandard),study_Overlay:p(a.study_Overlay,"loop"),study_Compare:p(l.study_Compare,"loop"),study_Volume:p(d),study_ScriptWithDataOffset:p(c.study_ScriptWithDataOffset)};for(var _ in f)f.hasOwnProperty(_)&&(TradingView[_]=f[_].studyConstructor);function m(e){return e instanceof o.Study}function y(e){return!1}function g(e){return e instanceof u.StudyStub}function v(e){return e instanceof Fundamental}function S(e){return!1}function b(e){return"study_Internal$STD;Fund_"===w(e)}function w(e){var t="study_"+(e.classId||e.shortId);return t.startsWith("study_Internal$STD;Fund_")?"study_Internal$STD;Fund_":t}function P(e,t,i,r,n){var s=w(r),a=new(s in f?f[s].studyConstructor:o.Study)(e,t,i,r);return void 0!==n&&a.setId(n),a}function C(e){var t=w(e);return t in f?f[t].colorRotationMode:1!==e.plots.length?"shift":void 0===e.pine||n.a.isStandardPine(e.id)?"loop":"shift"}},"3UA0":function(e,t){e.exports.tzData={"America/New_York":{ time:[-2717668562,-1633298400,-1615154400,-1601848800,-1583704800,-1570399200,-1551650400,-1536530400,-1523224800,-1504476e3,-1491775200,-1473026400,-1459720800,-1441576800,-1428271200,-1410127200,-1396821600,-1378677600,-1365372e3,-1347228e3,-1333922400,-1315173600,-1301868e3,-1283724e3,-1270418400,-1252274400,-1238968800,-1220824800,-1207519200,-1189375200,-1176069600,-1157320800,-114462e4,-1125871200,-1112565600,-1094421600,-1081116e3,-1062972e3,-1049666400,-1031522400,-1018216800,-1000072800,-986767200,-968018400,-955317600,-936568800,-923263200,-905119200,-891813600,-880236e3,-76941e4,-765410400,-747266400,-733960800,-715816800,-702511200,-684367200,-671061600,-652917600,-639612e3,-620863200,-608162400,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-447285600,-431560800,-415836e3,-400111200,-384386400,-368661600,-352936800,-337212e3,-321487200,-305762400,-289432800,-273708e3,-257983200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3], offset:[-17762,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3]},"America/Los_Angeles":{ time:[-2717668378,-1633298400,-1615154400,-1601848800,-1583704800,-880236e3,-769420800,-765410400,-687995940,-662680800,-620866800,-608162400,-589417200,-576108e3,-557967600,-544658400,-526518e3,-513208800,-495068400,-481759200,-463618800,-450309600,-431564400,-418255200,-400114800,-386805600,-368665200,-355356e3,-337215600,-323906400,-305766e3,-292456800,-273711600,-261007200,-242262e3,-226533600,-210812400,-195084e3,-179362800,-163634400,-147913200,-13158e4,-116463600,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3],offset:[-28378,-28800,-25200,-28800,-25200,-28800,-25200,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800]},"America/Chicago":{ time:[-2717668236,-1633298400,-1615154400,-1601848800,-1583704800,-1563746400,-1551650400,-1538949600,-1520200800,-1504476e3,-1491775200,-1473026400,-1459720800,-1441576800,-1428271200,-1410127200,-1396821600,-1378677600,-1365372e3,-1347228e3,-1333922400,-1315173600,-1301868e3,-1283724e3,-1270418400,-1252274400,-1238968800,-1220824800,-1207519200,-1189375200,-1176069600,-1157320800,-114462e4,-1125871200,-1112565600,-1094421600,-1081116e3,-1067810400,-1045432800,-1031522400,-1018216800,-1000072800,-986767200,-968018400,-955317600,-936568800,-923263200,-905119200,-891813600,-880236e3,-769413600,-765410400,-747266400,-733960800,-715816800,-702511200,-684367200,-671061600,-652917600,-639612e3,-620863200,-608162400,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-447285600,-431560800,-415836e3,-400111200,-384386400,-368661600,-352936800,-337212e3,-321487200,-305762400,-289432800,-273708e3,-257983200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3], offset:[-21036,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600]},"America/Phoenix":{time:[-2717670498,-1633298400,-1615154400,-1601848800,-1583704800,-880236e3,-820540740,-812678340,-796867140,-84405600,-68680800,1924966800],offset:[-26898,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200]},"America/Toronto":{ time:[-2366755200,-1632088800,-1615154400,-1601771400,-1583712e3,-1567375200,-1554681600,-1534716e3,-1524088800,-1503266400,-149238e4,-1471816800,-1460930400,-1440972e3,-1428876e3,-1409522400,-1397426400,-1378072800,-1365976800,-1346623200,-1333922400,-1315173600,-1301868e3,-1283724e3,-1270418400,-1252274400,-1238968800,-1220824800,-1207519200,-1188770400,-1176069600,-1157320800,-1144015200,-1125871200,-1112565600,-1094421600,-1081116e3,-1062972e3,-1049666400,-1031522400,-1018216800,-1000072800,-986767200,-968018400,-955317600,-936568800,-880232400,-76941e4,-765410400,-747266400,-733960800,-715824e3,-702518400,-684374400,-671068800,-652924800,-634176e3,-620863200,-602719200,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-450309600,-431560800,-418255200,-400111200,-384386400,-368661600,-352936800,-337212e3,-321487200,-305762400,-289432800,-273708e3,-257983200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,136346400,152071200,167796e3,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3], offset:[-19052,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-14400,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3]},"America/Vancouver":{ time:[-2713910400,-1632088800,-1615154400,-880236e3,-769420800,-765410400,-747266400,-733960800,-715816800,-702511200,-684367200,-671061600,-652917600,-639612e3,-620863200,-608162400,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-450309600,-431560800,-418255200,-400111200,-386805600,-368661600,-355356e3,-337212e3,-323906400,-305762400,-292456800,-273708e3,-261007200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,136346400,152071200,167796e3,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3], offset:[-29548,-28800,-25200,-28800,-25200,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800]},"America/Argentina/Buenos_Aires":{time:[-2372112e3,-1567468800,-1233446400,-1222992e3,-1205971200,-1194048e3,-117288e4,-1162512e3,-1141344e3,-1130976e3,-1109808e3,-109944e4,-1078272e3,-1067817600,-1046649600,-1036281600,-1015113600,-1004745600,-983577600,-973209600,-952041600,-941587200,-931046400,-900892800,-890352e3,-83376e4,-82728e4,-752284800,-733795200,-197337600,-190857600,-184204800,-164505600,-152668800,-132969600,-121132800,-101433600,-86832e3,-71107200,-54777600,-39052800,-23328e3,-7603200,128131200,136598400,596937600,605059200,624412800,636508800,656467200,667958400,687916800,699408e3,719366400,731462400,938908800,952041600,1198972800,1205625600,1224374400,1237075200,1924981200],offset:[-14028,-15408,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-10800,-10800,-7200,-10800,-7200,-10800]},"America/El_Salvador":{time:[-1546300800,546998400,559699200,578448e3,591148800,1924970400],offset:[-21408,-21600,-18e3,-21600,-18e3,-21600]},"America/Sao_Paulo":{ time:[-1767225600,-1206968400,-1191369600,-1175385600,-1159833600,-633830400,-622076400,-602294400,-59184e4,-570758400,-560217600,-539136e3,-53136e4,-195436800,-184204800,-155174400,-150076800,-128908800,-121132800,-99964800,-89596800,-68428800,-57974400,499737600,511228800,530582400,540259200,562118400,571190400,592963200,602035200,624412800,634694400,656467200,666748800,687916800,697593600,719971200,728438400,750816e3,761702400,782265600,793152e3,813715200,823996800,84456e4,856051200,876096e3,888710400,908064e3,919555200,938908800,951609600,970963200,982454400,1003017600,1013904e3,1036281600,1045353600,1066521600,1076803200,1099353600,1108857600,1129420800,1140307200,1162684800,1172361600,119232e4,1203206400,1224374400,1234656e3,1255824e3,1266710400,1287273600,129816e4,1318723200,1330214400,1350777600,1361059200,1382227200,1392508800,1413676800,1424563200,1445126400,1456012800,1476576e3,1487462400,1508025600,1518912e3,1541289600,1550361600,1924981200],offset:[-11188,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800]},"America/Bogota":{time:[-2707689600,-1739059200,704851200,733881600,1924974e3],offset:[-17776,-17776,-18e3,-14400,-18e3]},"America/Caracas":{time:[-2524521600,-1826755200,-157766400,1197169200,1462069800,1924977600],offset:[-16064,-16060,-16200,-14400,-16200,-14400]},"Europe/Moscow":{time:[-2840140800,-1688256e3,-165681e4,-1641340800,-1627956e3,-1618700400,-1596416400,-1593804521,-1589846400,-1542416400,-1539478800,-1525305600,-1522713600,-1491177600,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1414288800,1925002800], offset:[9017,9017,9079,12679,9079,16279,12679,16279,14400,10800,14400,18e3,14400,10800,7200,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,10800,7200,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800]},"Europe/Athens":{time:[-2344636800,-1686095940,-1182988800,-1178150400,-906854400,-904867200,-85725e4,-844473600,-828230400,-812419200,-552355200,-541641600,166492800,186195600,198036e3,213764400,228880800,244090800,260330400,275457600,291805200,307418400,323395200,338947200,354682800,370411200,386132400,401860800,417582e3,433310400,449031600,465364800,481086e3,496814400,512535600,528264e3,543985200,559713600,575434800,591163200,606884400,622612800,638334e3,654667200,670388400,686116800,701838e3,717566400,733287600,749016e3,764737200,780465600,796186800,811915200,828241200,846388800,859690800,877838400,891140400,909288e3,92259e4,941342400,954039600,972792e3,985489200,1004241600,1017543600,1035691200,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3],offset:[5692,5692,7200,10800,7200,10800,7200,3600,7200,3600,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Europe/Belgrade":{ time:[-2713910400,-905821200,-85725e4,-844552800,-828219600,-812498400,-79677e4,-777938400,-766616400,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[4920,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Berlin":{time:[-2422051200,-1693702800,-1680476400,-1663452e3,-1650142800,-1632002400,-1618693200,-938901600,-85725e4,-844552800,-828219600,-812498400,-79677e4,-781048800,-776556e3,-765925200,-761173200,-748476e3,-733266e3,-717627600,-714603600,-71037e4,-701902800,-684972e3,-670453200,-654127200,-639003600,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], offset:[3208,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,10800,7200,3600,7200,3600,7200,10800,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/London":{ time:[-3852662400,-1691964e3,-1680469200,-1664143200,-1650142800,-1633903200,-1617483600,-1601848800,-1586034e3,-1570399200,-1552165200,-1538344800,-152253e4,-15075e5,-1490562e3,-1473631200,-1460926800,-1442786400,-1428872400,-1410732e3,-1396213200,-1379282400,-1364763600,-1348437600,-1333314e3,-1315778400,-1301259600,-1284328800,-126981e4,-1253484e3,-1238360400,-1221429600,-1206910800,-118998e4,-1175461200,-1159135200,-1143406800,-1126476e3,-1111957200,-1095631200,-1080507600,-1063576800,-1049058e3,-1032127200,-1017608400,-1001282400,-986158800,-969228e3,-950475600,-942012e3,-904514400,-896043600,-875484e3,-864594e3,-844034400,-832539600,-812584800,-798066e3,-781048800,-772059600,-764802e3,-748476e3,-733352400,-719445600,-717026400,-706741200,-699483600,-687996e3,-668034e3,-654732e3,-636584400,-622072800,-605739600,-590623200,-57429e4,-558568800,-542235600,-527119200,-512600400,-496274400,-481150800,-46422e4,-449701200,-432165600,-417646800,-401320800,-386197200,-369266400,-354747600,-337816800,-323298e3,-306972e3,-291848400,-276732e3,-257979600,-245282400,-22653e4,-213228e3,-195080400,-182383200,-163630800,-150933600,-132181200,-119484e3,-100731600,-88034400,-68677200,-59004e3,-37238400,57726e3,69818400,89175600,101268e3,120625200,132717600,152074800,164167200,183524400,196221600,214974e3,227671200,246423600,259120800,278478e3,290570400,309927600,32202e4,341377200,354675600,372823200,386125200,404272800,417574800,435722400,449024400,467776800,481078800,499226400,512528400,530676e3,543978e3,562125600,575427600,593575200,606877200,625629600,638326800,657079200,670381200,688528800,701830800,719978400,733280400,751428e3,76473e4,782877600,796179600,814327200,828234e3,846381600,859683600,877831200,891133200,909280800,922582800,941335200,954032400,972784800,985482e3,1004234400,1017536400,1035684e3,1048986e3,1067133600,1080435600,1099188e3,1111885200,1130637600,1143334800,1162087200,1174784400,1193536800,1206838800,1224986400,1238288400,1256436e3,1269738e3,1288490400,1301187600,131994e4,1332637200,1351389600,1364691600,1382839200,1396141200,1414288800,1427590800,1445738400,1459040400,1477792800,149049e4,1509242400,1521939600,1540692e3,1553994e3,1572141600,1585443600,1603591200,1616893200,1635645600,1648342800,1667095200,1679792400,1698544800,1711846800,1729994400,1743296400,1761444e3,1774746e3,1792893600,1806195600,1824948e3,1837645200,1856397600,1869094800,1887847200,1901149200,1919296800,1932598800], offset:[-75,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,0,3600,0,3600,7200,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0]},"Europe/Luxembourg":{time:[-2069712e3,-1692493200,-1680476400,-1662339600,-165015e4,-1632002400,-1618693200,-1612656e3,-1604278800,-1585515600,-1574038800,-1552255200,-1539997200,-1520546400,-1507510800,-1490569200,-1473642e3,-1459116e3,-1444006800,-142767e4,-1411866e3,-1396220400,-1379293200,-1364770800,-1348448400,-1333321200,-1316394e3,-1301266800,-1284339600,-126981e4,-1253484e3,-1238360400,-1221429600,-1206910800,-1191189600,-1175461200,-1160344800,-1143406800,-1127685600,-1111957200,-1096840800,-1080507600,-1063576800,-1049058e3,-1033336800,-1017608400,-1002492e3,-986158800,-969228e3,-950475600,-942012e3,-935182800,-85725e4,-844552800,-828219600,-812498400,-797979600,-781048800,-766616400,-745452e3,-733266e3,228880800,244004400,260330400,276058800,29178e4,307508400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], offset:[1476,3600,7200,3600,7200,3600,7200,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Madrid":{time:[-2177453684,-1631926800,-1616886e3,-1601168400,-158535e4,-1442451600,-142767e4,-1379293200,-1364770800,-1348448400,-1333321200,-1316390400,-1301266800,-1284339600,-1269817200,-1026954e3,-1017615600,-1001898e3,-999478800,-986083200,-951433200,-940208400,-873075600,-862614e3,-842835600,-828313200,-811386e3,-796863600,-779936400,-765414e3,-748486800,-733964400,-652323600,-639010800,135126e3,150253200,166575600,181702800,196815600,212547600,22887e4,243997200,260330400,276058800,29178e4,307508400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], offset:[-884,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,0,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Paris":{time:[-2486678340,-1855958340,-1689814800,-1680393600,-1665363600,-1648339200,-1635123600,-1616889600,-1604278800,-158544e4,-1574038800,-1552262400,-1539997200,-1520553600,-1507510800,-1490572800,-1470618e3,-1459123200,-1444006800,-1427673600,-1411952400,-1396224e3,-1379293200,-1364774400,-1348448400,-1333324800,-1316394e3,-1301270400,-1284339600,-1269820800,-1253494800,-1238371200,-1221440400,-1206921600,-1191200400,-1175472e3,-1160355600,-1143417600,-1127696400,-1111968e3,-1096851600,-1080518400,-1063587600,-1049068800,-1033347600,-1017619200,-1002502800,-986169600,-969238800,-950486400,-942012e3,-932432400,-85725e4,-844552800,-828219600,-812498400,-800064e3,-796258800,-781048800,-766616400,196822800,212547600,228880800,244004400,260330400,276058800,29178e4,307508400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], offset:[561,561,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,7200,3600,7200,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Rome":{time:[-3252096e3,-2403562204,-1690761600,-168048e4,-1664755200,-1648944e3,-163512e4,-1616889600,-1604275200,-1585526400,-1571011200,-1555286400,-932428800,-85725e4,-844552800,-828219600,-812498400,-798066e3,-781048800,-76671e4,-750895200,-733352400,-719452800,-70191e4,-689205600,-670453200,-114048e3,-103161600,-81993600,-71708400,-50544e3,-40258800,-18489600,-8204400,1296e4,23245200,43804800,54694800,75859200,86749200,107913600,118198800,138758400,149648400,170812800,181098e3,202262400,212547600,233107200,243997200,265161600,276051600,296611200,307501200,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], offset:[2996,2996,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Warsaw":{time:[-2840140800,-1717027200,-1693702800,-1680476400,-1663452e3,-1650142800,-1632002400,-1618693200,-1600466400,-1587157200,-1501718400,-931730400,-85725e4,-844552800,-828219600,-812498400,-796600800,-778723200,-762652800,-748483200,-733266e3,-715212e3,-701902800,-684972e3,-670453200,-654127200,-639003600,-397090800,-386805600,-371084400,-355356e3,-334191600,-323301600,-307580400,-291852e3,-271292400,-260402400,-239842800,-228952800,-208393200,-197503200,-176338800,-166053600,228877200,244000800,260326800,276055200,291776400,307504800,323830800,338954400,354675600,370404e3,386125200,401853600,417574800,433303200,449024400,465357600,481078800,496807200,512528400,528256800,543978e3,559706400,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], offset:[5040,5040,3600,7200,3600,7200,3600,7200,7200,10800,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Istanbul":{time:[-2840140800,-1869868800,-1693699200,-168048e4,-1570406400,-1552176e3,-1538352e3,-1522540800,-1507507200,-1490572800,-1440201600,-1428019200,-1409702400,-1396483200,-931046400,-922665600,-917827200,-892425600,-875836800,-764726400,-744336e3,-733795200,-716428800,-701913600,-684979200,-670464e3,-654134400,-639014400,-62208e4,-60696e4,-590025600,-575510400,-235612800,-194832e3,-177724800,-165715200,107917200,121226400,133927200,152676e3,164685600,184125600,196221600,215575200,228880800,245815200,260330400,267926400,428464800,433908e3,468122400,482806800,496720800,512528400,528256800,543978e3,559706400,575427600,591156e3,606877200,622605600,638326800,65466e4,670381200,686109600,701830800,717559200,733280400,749008800,764125200,780458400,796179600,811908e3,828234e3,846381600,859683600,877831200,891133200,909280800,922582800,941335200,954032400,972784800,985482e3,1004234400,1017536400,1035684e3,1048986e3,1067133600,1080435600,1099188e3,1111885200,1130637600,1143334800,1162087200,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301281200,1319947200,1332644400,1351396800,1364698800,1382846400,1396234800,1414296e3,1427598e3,1446955200,1459047600,1473206400,1925002800],offset:[6952,7016,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,10800,14400,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,10800]},"Europe/Zurich":{ time:[-3675196800,-2385244800,-904431600,-891122400,-872982e3,-859672800,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[2048,1786,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Australia/Sydney":{time:[-2364076800,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,-828309600,-813189600,57722400,68007600,89172e3,100062e3,120621600,131511600,152071200,162961200,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,386737200,404877600,415767600,436327200,447217200,467776800,478666800,499226400,511326e3,530071200,542775600,562125600,57483e4,59418e4,606279600,625629600,636519600,657079200,667969200,688528800,699418800,719978400,731473200,752032800,762922800,783482400,794372400,814932e3,828241200,846381600,859690800,877831200,891140400,909280800,92259e4,941335200,954039600,967341600,985489200,1004234400,1017543600,1035684e3,1048993200,1067133600,1080442800,1099188e3,1111892400,1130637600,1143946800,1162087200,1174791600,1193536800,1207450800,1223172e3,1238900400,1254621600,127035e4,1286071200,1301799600,1317520800,1333249200,1349575200,1365303600,1381024800,1396753200,1412474400,1428202800,1443924e3,1459652400,1475373600,1491102e3,1506823200,1522551600,1538877600,1554606e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800], offset:[36292,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600]},"Australia/Brisbane":{time:[-2366755200,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,-828309600,-813189600,57722400,68007600,625629600,636519600,657079200,667969200,688528800,699418800,1925028e3],offset:[36728,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3]},"Australia/Adelaide":{time:[-2364076800,-2230156800,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,-828309600,-813189600,57722400,68007600,89172e3,100062e3,120621600,131511600,152071200,162961200,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,384318e3,404877600,415767600,436327200,447217200,467776800,478666800,499226400,511326e3,530071200,542775600,562125600,57483e4,59418e4,606279600,625629600,637729200,657079200,667969200,688528800,701233200,719978400,731473200,752032800,764132400,783482400,796186800,814932e3,828241200,846381600,859690800,877831200,891140400,909280800,92259e4,941335200,954039600,972784800,985489200,1004234400,1017543600,1035684e3,1048993200,1067133600,1080442800,1099188e3,1111892400,1130637600,1143946800,1162087200,1174791600,1193536800,1207450800,1223172e3,1238900400,1254621600,127035e4,1286071200,1301799600,1317520800,1333249200,1349575200,1365303600,1381024800,1396753200,1412474400,1428202800,1443924e3,1459652400,1475373600,1491102e3,1506823200,1522551600,1538877600,1554606e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800], offset:[33260,32400,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800]},"Australia/ACT":{time:[-2364076800,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,-828309600,-813189600,57722400,68007600,89172e3,100062e3,120621600,131511600,152071200,162961200,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,386737200,404877600,415767600,436327200,447217200,467776800,478666800,499226400,511326e3,530071200,542775600,562125600,57483e4,59418e4,606279600,625629600,636519600,657079200,667969200,688528800,699418800,719978400,731473200,752032800,762922800,783482400,794372400,814932e3,828241200,846381600,859690800,877831200,891140400,909280800,92259e4,941335200,954039600,967341600,985489200,1004234400,1017543600,1035684e3,1048993200,1067133600,1080442800,1099188e3,1111892400,1130637600,1143946800,1162087200,1174791600,1193536800,1207450800,1223172e3,1238900400,1254621600,127035e4,1286071200,1301799600,1317520800,1333249200,1349575200,1365303600,1381024800,1396753200,1412474400,1428202800,1443924e3,1459652400,1475373600,1491102e3,1506823200,1522551600,1538877600,1554606e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800],offset:[36292,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600]},"Asia/Almaty":{ time:[-1441152e3,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1925013600],offset:[18468,18e3,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,21600,18e3,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600]},"Asia/Ashkhabad":{time:[-1441152e3,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,192501e4],offset:[14012,14400,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,18e3,14400,18e3]},"Asia/Tokyo":{time:[-2587678861,-683769600,-672274800,-654739200,-640825200,-620265600,-609375600,-588816e3,-577926e3,1925024400],offset:[33539,32400,36e3,32400,36e3,32400,36e3,32400,36e3,32400]},"Asia/Taipei":{time:[-2335219200,-1017792e3,-766191600,-745804800,-733795200,-716860800,-699580800,-683856e3,-670636800,-65232e4,-639100800,-620784e3,-607564800,-589248e3,-576028800,-562896e3,-541728e3,-528681600,-510192e3,-497145600,-478656e3,-465609600,-449798400,-433987200,-418176e3,-402451200,-38664e4,-370915200,-355104e3,-339379200,-323568e3,-302486400,-291945600,-270950400,-260409600,134006400,149817600,165542400,181353600,299635200,307584e3,1925020800],offset:[29160,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Singapore":{time:[-2177452800,-2038176e3,-1167609600,-1073001600,-894153600,-879638400,-766972800,378691200,1925020800],offset:[24925,24925,25200,26400,26400,27e3,32400,27e3,28800]},"Asia/Shanghai":{time:[-2177452800,-933638400,-922060800,-908841600,-888796800,-881020800,-767836800,-745804800,-733795200,-716860800,-699580800,-683856e3,-670636800,-65232e4,-649987200,515556e3,527047200,545191200,558496800,577245600,589946400,608695200,622000800,640144800,653450400,671594400,6849e5,1925020800],offset:[29143,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Seoul":{ time:[-1948752e3,-1830384e3,-767318400,-681177600,-672192e3,-654739200,-640828800,-623376e3,-609379200,-588816e3,-577929600,-498096e3,-462672e3,-451699200,-429753600,-418262400,-399513600,-387417600,-368064e3,-355968e3,-336614400,-324518400,-305164800,-293068800,-264902400,547610400,560919600,57906e4,592369200,1925024400],offset:[30472,30600,32400,32400,36e3,32400,36e3,32400,36e3,32400,36e3,32400,30600,34200,30600,34200,30600,34200,30600,34200,30600,34200,30600,34200,30600,32400,36e3,32400,36e3,32400]},"Asia/Tehran":{time:[-1704153600,-757382400,247190400,259286400,277776e3,283996800,290822400,306547200,322444800,338515200,673228800,685497600,701222400,71712e4,732758400,748656e3,764294400,780192e3,795830400,811728e3,827366400,843264e3,858988800,874886400,890524800,906422400,922060800,937958400,953596800,969494400,985219200,1001116800,1016755200,1032652800,1048291200,1064188800,1079827200,1095724800,1111449600,1127347200,1206057600,1221955200,123768e4,1253577600,1269216e3,1285113600,1300752e3,1316649600,1332288e3,1348185600,1363910400,1379808e3,1395446400,1411344e3,1426982400,144288e4,1458518400,1474416e3,1490140800,1506038400,1521676800,1537574400,1553212800,1569110400,1584748800,1600646400,1616371200,1632268800,1647907200,1663804800,1679443200,1695340800,1710979200,1726876800,1742601600,1758499200,1774137600,1790035200,1805673600,1821571200,1837209600,1853107200,1868745600,1884643200,1900368e3,1916265600,1931904e3],offset:[12344,12344,12600,14400,18e3,14400,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600]},"Asia/Dubai":{time:[-1577923200,1925006400],offset:[13272,14400]},"Asia/Kolkata":{time:[-3645216e3,-3155673600,-2019686400,-891561600,-872035200,-862617600,-764121600,1925011800],offset:[21208,21200,19270,19800,23400,19800,23400,19800]},"Asia/Hong_Kong":{time:[-2056663398,-900882e3,-891547200,-884217600,-761176800,-747878400,-728508600,-717021e3,-697059e3,-683757e3,-668028600,-654726600,-636579e3,-623277e3,-605129400,-591827400,-573679800,-559773e3,-541625400,-528323400,-510179400,-498083400,-478729800,-466633800,-446675400,-435184200,-415225800,-403129800,-383776200,-371680200,-352326600,-340230600,-320877e3,-308781e3,-288822600,-277331400,-257373e3,-245881800,-225923400,-213827400,-194473800,-182377800,-163024200,-148509e3,-132784200,-117059400,-101334600,-85609800,-69280200,-53555400,-37830600,-22105800,-6381e3,9343800,25068600,40793400,56518200,72243e3,88572600,104297400,120022200,126070200,151471800,167196600,182921400,198646200,214371e3,295414200,309324600,1925020800], offset:[27402,28800,32400,30600,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Bangkok":{time:[-2840140800,-1570060800,1925017200],offset:[24124,24124,25200]},"Asia/Chongqing":{time:[-2177452800,-933638400,-922060800,-908841600,-888796800,-881020800,-767836800,-745804800,-733795200,-716860800,-699580800,-683856e3,-670636800,-65232e4,-649987200,515556e3,527047200,545191200,558496800,577245600,589946400,608695200,622000800,640144800,653450400,671594400,6849e5,1925020800],offset:[29143,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Jerusalem":{time:[-2840140800,-1640995200,-933638400,-857347200,-844293600,-825811200,-812678400,-794188800,-779846400,-762645600,-748303200,-731116800,-681955200,-673228800,-667951200,-65232e4,-636415200,-62208e4,-608936400,-59184e4,-572475600,-558568800,-542840400,-527724e3,-514414800,-490838400,-482976e3,-459468e3,-451526400,-428544e3,-418251600,-400024800,-387417600,142387200,150854400,167184e3,178675200,334022400,337654800,452563200,462243600,482284800,495590400,516758400,526435200,545443200,558489600,576633600,589334400,609897600,620784e3,638323200,651628800,669772800,683683200,701827200,715737600,733708800,747187200,765158400,778032e3,796608e3,810086400,826848e3,842832e3,858902400,874195200,890352e3,90504e4,923018400,936324e3,955677600,970794e3,986778e3,1001293200,1017363600,1033952400,1048813200,1065142800,1081299600,1095814800,1112320800,1128823200,1143770400,1159668e3,117522e4,1189908e3,1206669600,1223172e3,1238119200,1254016800,1269568800,1284256800,1301623200,1317520800,1333072800,1348365600,1364522400,1382839200,1395972e3,1414288800,1427421600,1445738400,1458871200,1477792800,1490320800,1509242400,1521770400,1540692e3,1553824800,1572141600,1585274400,1603591200,1616724e3,1635645600,1648173600,1667095200,1679623200,1698544800,1711677600,1729994400,1743127200,1761444e3,1774576800,1792893600,1806026400,1824948e3,1837476e3,1856397600,1868925600,1887847200,190098e4,1919296800,1932429600], offset:[8454,8440,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,14400,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Asia/Kuwait":{time:[-719625600,1925002800],offset:[11212,10800]},"Asia/Muscat":{time:[-1577923200,1925006400],offset:[13272,14400]},"Asia/Qatar":{time:[-1577923200,76204800,1925002800],offset:[12368,14400,10800]},"Asia/Riyadh":{time:[-719625600,1925002800],offset:[11212,10800]},"Pacific/Auckland":{time:[-3192393600,-1330293600,-1320012e3,-1300658400,-1287352800,-1269208800,-1255903200,-1237759200,-1224453600,-1206309600,-1192399200,-117486e4,-1160949600,-1143410400,-1125871200,-1112565600,-1094421600,-1081116e3,-1062972e3,-1049666400,-1031522400,-1018216800,-1000072800,-986767200,-968018400,-955317600,-936568800,-923263200,-757382400,152676e3,162356400,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,384318e3,404877600,415767600,436327200,447217200,467776800,478666800,499226400,510116400,530676e3,541566e3,562125600,573620400,59418e4,60507e4,623815200,637729200,655264800,669178800,686714400,700628400,718164e3,732682800,749613600,764132400,781063200,795582e3,812512800,827031600,844567200,858481200,876016800,889930800,907466400,921985200,938916e3,953434800,970365600,984884400,100242e4,1016334e3,1033869600,1047783600,1065319200,1079838e3,1096768800,1111287600,1128218400,1142737200,1159668e3,1174186800,1191117600,1207450800,1222567200,1238900400,1254016800,127035e4,1285466400,1301799600,1316916e3,1333249200,1348970400,1365303600,138042e4,1396753200,1411869600,1428202800,1443319200,1459652400,1474768800,1491102e3,1506218400,1522551600,1538272800,1554606e3,1569722400,1586055600,1601172e3,1617505200,1632621600,1648954800,1664071200,1680404400,1695520800,1712458800,1727575200,1743908400,1759024800,1775358e3,1790474400,1806807600,1821924e3,1838257200,1853373600,1869706800,1885428e3,1901761200,1916877600,1933210800], offset:[41944,41400,45e3,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800]},"Pacific/Chatham":{time:[-3192393600,-757382400,152678700,162359100,183523500,195018300,215577900,226467900,247027500,257917500,278477100,289367100,309926700,320816700,341376300,352266300,372825900,384320700,404880300,415770300,436329900,447219900,467779500,478669500,499229100,510119100,530678700,541568700,562128300,573623100,594182700,605072700,623817900,637731900,655267500,669181500,686717100,700631100,718166700,732685500,749616300,764135100,781065900,795584700,812515500,827034300,844569900,858483900,876019500,889933500,907469100,921987900,938918700,953437500,970368300,984887100,1002422700,1016336700,1033872300,1047786300,1065321900,1079840700,1096771500,1111290300,1128221100,1142739900,1159670700,1174189500,1191120300,1207453500,1222569900,1238903100,1254019500,1270352700,1285469100,1301802300,1316918700,1333251900,1348973100,1365306300,1380422700,1396755900,1411872300,1428205500,1443321900,1459655100,1474771500,1491104700,1506221100,1522554300,1538275500,1554608700,1569725100,1586058300,1601174700,1617507900,1632624300,1648957500,1664073900,1680407100,1695523500,1712461500,1727577900,1743911100,1759027500,1775360700,1790477100,1806810300,1821926700,1838259900,1853376300,1869709500,1885430700,1901763900,1916880300,1933213500],offset:[44028,44100,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500]},"Pacific/Fakaofo":{time:[-2177452800,1325203200,1925038800],offset:[-41096,-39600,46800]},"Pacific/Honolulu":{time:[-2334139200,-1157320800,-1155470400,-880236e3,-769429800,-765410400,-712188e3,1924956e3], offset:[-37886,-37800,-34200,-37800,-34200,-34200,-37800,-36e3]},"America/Mexico_City":{time:[-1514763396,-1343091600,-1234828800,-1220317200,-1207180800,-1191369600,-975283200,-963187200,-917136e3,-907372800,-821923200,-810086400,-627523200,-613008e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,989114400,1001815200,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1175392800,1193536800,1207447200,1224986400,1238896800,1256436e3,1270346400,1288490400,1301796e3,131994e4,1333245600,1351389600,13653e5,1382839200,1396749600,1414288800,1428199200,1445738400,1459648800,1477792800,1491098400,1509242400,1522548e3,1540692e3,1554602400,1572141600,1586052e3,1603591200,1617501600,1635645600,1648951200,1667095200,1680400800,1698544800,1712455200,1729994400,1743904800,1761444e3,1775354400,1792893600,1806804e3,1824948e3,1838253600,1856397600,1869703200,1887847200,1901757600,1919296800,1933207200],offset:[-23796,-25200,-21600,-25200,-21600,-25200,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600]},"Africa/Cairo":{time:[-2185401600,-929836800,-923097600,-906163200,-892857600,-875836800,-857779200,-844300800,-825811200,-812678400,-794188800,-779846400,-762652800,-399081600,-38664e4,-368323200,-355104e3,-336783600,-323643600,-305161200,-292021200,-273625200,-260485200,-242089200,-228949200,-210553200,-197413200,-178930800,-165790800,-147394800,-134254800,-115858800,-102632400,-84322800,-71096400,-52700400,-39474e3,-21164400,-7938e3,10371600,23598e3,41907600,55134e3,7353e4,86756400,105066e3,118292400,136602e3,149828400,168138e3,181364400,199760400,212986800,231296400,244522800,262832400,276058800,294368400,307594800,325990800,339217200,357526800,370753200,396406800,402289200,426819600,433825200,452221200,465447600,483757200,496983600,515293200,528519600,546829200,560055600,578451600,591678e3,610419600,623214e3,641523600,65475e4,673059600,686286e3,704682e3,717908400,736218e3,749444400,767754e3,780980400,799027200,812332800,830476800,843782400,861926400,875232e3,893376e3,906681600,925430400,938736e3,95688e4,970185600,988329600,1001635200,1019779200,1033084800,1051228800,1064534400,1083283200,1096588800,1114732800,1128038400,1146182400,1158883200,1177632e3,1189123200,1209081600,1219968e3,1240531200,1250812800,1272585600,1281484800,1284076800,1285891200,1400198400,1403827200,1406851200,1411689600,1924999200], offset:[7509,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Africa/Johannesburg":{time:[-2458166400,-2109283200,-860968800,-845244e3,-829519200,-813794400,1924999200],offset:[6720,5400,7200,10800,7200,10800,7200]},"Asia/Kathmandu":{time:[-1577923200,504921600,1925012700],offset:[20476,19800,20700]},"US/Mountain":{time:[-2717668796,-1633298400,-1615154400,-1601848800,-1583704800,-1570399200,-1551650400,-1538949600,-1534111200,-880236e3,-769417200,-765410400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3], offset:[-25196,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200]},"Europe/Helsinki":{time:[-2890252800,-1535932800,-875664e3,-859762800,354679200,370407600,386128800,401857200,417582e3,433310400,449031600,465364800,481086e3,496814400,512535600,528264e3,543985200,559713600,575434800,591163200,606884400,622612800,638334e3,654667200,670388400,686116800,701838e3,717566400,733287600,749016e3,764737200,780465600,796186800,811915200,828241200,846388800,859690800,877838400,891140400,909288e3,92259e4,941342400,954039600,972792e3,985489200,1004241600,1017543600,1035691200,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3],offset:[5989,5989,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Europe/Stockholm":{ time:[-2871676800,-2208988800,-1692493200,-1680476400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[4332,3614,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Copenhagen":{time:[-2524521600,-2398291200,-1692493200,-1680483600,-935107200,-85725e4,-844552800,-828219600,-812498400,-79677e4,-781048800,-769381200,-747007200,-736376400,-715212e3,-706741200,-683157600,-675291600,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], offset:[3020,3020,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Atlantic/Reykjavik":{time:[-1956614400,-1668214800,-1647212400,-1636678800,-161343e4,-1605142800,-1581894e3,-1539565200,-153135e4,-968029200,-952293600,-942012e3,-920239200,-909961200,-888789600,-877906800,-857944800,-846457200,-826495200,-815007600,-795045600,-783558e3,-762991200,-752108400,-731541600,-717634800,-700092e3,-686185200,-668642400,-654735600,-636588e3,-623286e3,-605743200,-591836400,-573688800,-559782e3,-542239200,-528332400,-510789600,-496882800,-47934e4,-465433200,-447890400,-433983600,-415836e3,-401929200,-384386400,-370479600,-352936800,-33903e4,-321487200,-307580400,-290037600,-276130800,-258588e3,-244681200,-226533600,-212626800,-195084e3,-181177200,-163634400,-149727600,-132184800,-118278e3,-100735200,-86828400,-68680800,-54774e3,1924992e3],offset:[-5280,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0]},"Europe/Tallinn":{time:[-2840140800,-1638316800,-1632002400,-1618693200,-1593820800,-1535932800,-927936e3,-892944e3,-85725e4,-844552800,-828219600,-812498400,-797644800,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909288e3,92259e4,941342400,1017543600,1035691200,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3], offset:[5940,5940,3600,7200,3600,5940,7200,10800,7200,3600,7200,3600,7200,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Europe/Riga":{time:[-2840140800,-1632002400,-1618693200,-1601676e3,-1597266e3,-1377302400,-928022400,-899510400,-85725e4,-844552800,-828219600,-812498400,-79677e4,-795830400,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,843966e3,859690800,877838400,891140400,909288e3,92259e4,941342400,985489200,1004241600,1017543600,1035691200,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3],offset:[5794,5794,9394,5794,9394,5794,7200,10800,7200,3600,7200,3600,7200,3600,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Europe/Vilnius":{ time:[-2840140800,-1672531200,-1585094400,-1561248e3,-1553558400,-928195200,-900115200,-85725e4,-844552800,-828219600,-812498400,-802137600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891140400,909284400,922586400,941338800,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3],offset:[6076,5040,5736,3600,7200,3600,10800,7200,3600,7200,3600,7200,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,7200,3600,7200,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"America/Lima":{time:[-2524521600,-1938556800,-1009843200,-1002067200,-986774400,-971049600,-955324800,-9396e5,504921600,512697600,536457600,544233600,631152e3,638928e3,757382400,765158400,1924974e3],offset:[-18492,-18516,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3]},"America/Santiago":{ time:[-2524521600,-1892678400,-1688428800,-1619222400,-1593820800,-1336003200,-13176e5,-1304380800,-1286064e3,-1272844800,-1254528e3,-1241308800,-1222992e3,-1209772800,-1191369600,-1178150400,-870566400,-865296e3,-740534400,-736387200,-718070400,-713667600,-36633600,-23932800,-3369600,7516800,24451200,37756800,55900800,69206400,87955200,100656e3,118195200,132105600,150854400,163555200,182304e3,195609600,213753600,227059200,245203200,258508800,277257600,289958400,308707200,321408e3,340156800,353462400,371606400,384912e3,403056e3,416361600,434505600,447811200,46656e4,479260800,498009600,510710400,529459200,545184e3,560908800,574214400,592358400,605664e3,624412800,637113600,653443200,668563200,687312e3,700617600,718761600,732067200,750211200,763516800,781660800,794966400,813715200,826416e3,845164800,85968e4,876614400,88992e4,906854400,923184e3,939513600,952819200,971568e3,984268800,1003017600,1015718400,1034467200,1047168e3,1065916800,1079222400,1097366400,1110672e3,1128816e3,1142121600,1160870400,1173571200,119232e4,1206835200,1223769600,1237075200,1255219200,1270339200,1286668800,1304812800,1313884800,1335657600,1346544e3,1367107200,1378598400,1398556800,1410048e3,1463270400,1471132800,149472e4,1502582400,1526169600,1534032e3,1554595200,1567900800,1586044800,1599350400,1617494400,16308e5,1648944e3,1662249600,1680393600,1693699200,1712448e3,1725753600,1743897600,1757203200,1775347200,1788652800,1806796800,1820102400,1838246400,1851552e3,1870300800,1883001600,1901750400,1915056e3,19332e5],offset:[-16966,-16966,-18e3,-16966,-14400,-16966,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-10800,-14400,-18e3,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800]},"Asia/Bahrain":{time:[-1577923200,76204800,1925002800],offset:[12368,14400,10800]},"Asia/Jakarta":{time:[-3231273600,-1451693568,-117288e4,-876614400,-766022400,-683856e3,-620784e3,-189388800,1925017200],offset:[25632,25632,26400,27e3,32400,27e3,28800,27e3,25200]},"Africa/Lagos":{time:[-1588464e3,1924995600],offset:[816,3600]},"Pacific/Norfolk":{ time:[-2177452800,-599616e3,152071200,162961200,1443924e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800],offset:[40312,40320,41400,45e3,41400,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200]},"America/Juneau":{time:[-3225169588,-2188987200,-880236e3,-769420800,-765410400,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,438998400,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3],offset:[54139,-32261,-28800,-25200,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-28800,-28800,-25200,-28800,-25200,-28800,-25200,-32400,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400]},"Asia/Ho_Chi_Minh":{time:[-2004048e3,-1851552e3,-852080400,-782614800,-767836800,-718070400,-457747200,-315622800,171849600,1925017200],offset:[25600,25590,25200,28800,32400,25200,28800,25200,28800,25200]},"Australia/Perth":{ time:[-2337897600,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,152071200,162961200,436327200,447217200,690343200,699418800,1165111200,1174791600,1193536800,1206846e3,1224986400,1238295600,1925020800],offset:[27804,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Europe/Oslo":{time:[-2366755200,-1691881200,-1680566400,-927507600,-85725e4,-844552800,-828219600,-812498400,-79677e4,-781048800,-765320400,-340840800,-324507600,-308786400,-293058e3,-277336800,-261608400,-245887200,-230158800,-214437600,-198709200,-182988e3,-166654800,-147909600,-135205200,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[2580,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]}}},"3u3j":function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var r=i("mrSG"),n=i("Eyy1"),o=function(e){function t(t,i,r){var o=e.call(this,r)||this;o._chartModel=t,o._sourceId=i.id();var s=Object(n.ensureNotNull)(i.priceScale());o._initialPriceScaleId=s.id();var a=Object(n.ensureNotNull)(t.paneForSource(i));return o._initialPriceScalePosition=a.priceScalePosition(s),o._initialPriceScaleIndex=a.priceScaleIndex(s,o._initialPriceScalePosition),o._initialPaneIndex=t.panes().indexOf(a),o}return Object(r.__extends)(t,e),t}(i("RDU5").UndoCommand)},"4TVt":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolPriceAxisView",(function(){return o}));var r=i("mrSG"),n=i("Eyy1"),o=function(e){ function t(t,i){var r=e.call(this)||this;return r._active=!1,r._source=t,r._data=i,r}return Object(r.__extends)(t,e),t.prototype.setActive=function(e){this._active=e},t.prototype._updateRendererData=function(e,t,i){e.visible=!1;var r=this._source.model();if(r.timeScale()&&!r.timeScale().isEmpty()){var n=this._source.priceScale();if(null!==n&&!n.isEmpty())if(r.selection().isSelected(this._source)||this._source.isForcedDrawPriceAxisLabel())if(null!==r.timeScale().visibleBarsStrictRange()){var o=this._source.axisPoints(),s=this._data.pointIndex;if(!(o.length<=s)){var a=o[s];if(isFinite(a.price)){var l=this._source.ownerSource(),c=null!==l?l.firstValue():null;if(null!==c){var u=this._active?"#1565C0":r.isDark()?"#1E88E5":"#2196F3";this._data.backgroundProperty?u=this._data.backgroundProperty.value():this._data.backgroundPropertyGetter&&(u=this._data.backgroundPropertyGetter()),i.background=u,i.borderColor="#2E84A6",i.color=this.generateTextColor(u),i.coordinate=n.priceToCoordinate(a.price,c),e.text=this._formatPrice(a.price,c),e.visible=!0}}}}}},t.prototype._formatPrice=function(e,t){return Object(n.ensureNotNull)(this._source.priceScale()).formatPrice(e,t)},t}(i("KcY8").a)},"4bfY":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 Circles");function c(){o.call(this)}function u(e,t){this._constructor="LineToolFibCircles";var n=t||u.createProperties();r.call(this,e,n),e._fibCirclesLabelsCache||(e._fibCirclesLabelsCache=new c),i.e("lt-pane-views").then(function(e){var t=i("FzRY").FibCirclesPaneView;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 Circles"},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.LineToolFibCirclesStylesPropertyPage},u.createProperties=function(e){var t=new n("linetoolfibcircles",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("6U6r").FibCirclesDefinitionsViewModel}.bind(null,i)).catch(i.oe)},u._configureProperties=function(e){r._configureProperties(e)},t.LineToolFibCircles=u},"4kQX":function(e,t,i){"use strict";i.r(t),i.d(t,"TimeFormatter",(function(){return n}));var r=i("kcTO"),n=function(){function e(e){this._formatStr=e||"%h:%m:%s"}return e.prototype.format=function(e){ return r.customFormatters.timeFormatter?r.customFormatters.timeFormatter.format(e):this._formatStr.replace("%h",Object(r.numberToStringWithLeadingZero)(e.getUTCHours(),2)).replace("%m",Object(r.numberToStringWithLeadingZero)(e.getUTCMinutes(),2)).replace("%s",Object(r.numberToStringWithLeadingZero)(e.getUTCSeconds(),2))},e.prototype.formatLocal=function(e){return r.customFormatters.timeFormatter?r.customFormatters.timeFormatter.formatLocal?r.customFormatters.timeFormatter.formatLocal(e):r.customFormatters.timeFormatter.format(e):this._formatStr.replace("%h",Object(r.numberToStringWithLeadingZero)(e.getHours(),2)).replace("%m",Object(r.numberToStringWithLeadingZero)(e.getMinutes(),2)).replace("%s",Object(r.numberToStringWithLeadingZero)(e.getSeconds(),2))},e}()},"4miz":function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return n}));var r=function(){function e(e,t){this._visible=!0,this._title=e,this._value=t}return e.prototype.title=function(){return this._title},e.prototype.setTitle=function(e){this._title=e},e.prototype.text=function(){return this._value},e.prototype.value=function(){return this._value},e.prototype.setValue=function(e){this._value=e},e.prototype.visible=function(){return this._visible},e.prototype.setVisible=function(e){this._visible=e},e.prototype.color=function(){return this._color},e.prototype.setColor=function(e){this._color=e},e}(),n=function(){function e(){this._items=[],this._header="",this._title=""}return e.prototype.header=function(){return this._header},e.prototype.title=function(){return this._title},e.prototype.items=function(){return this._items},e.prototype.update=function(){},e}()},"4o++":function(e,t,i){"use strict";var r;i.r(t),i.d(t,"MagnetMode",(function(){return r})),function(e){e[e.WeakMagnet=0]="WeakMagnet",e[e.StrongMagnet=1]="StrongMagnet"}(r||(r={}))},"4u8j":function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("5rJj"),o=i("hayr").propertyPages,s=i("ytGH").LineToolWidthsProperty,a=window.t("Gann Fan");function l(e,t){this._constructor="LineToolGannFan";var n=t||l.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("ZJWf").GannFanPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);for(var o=[],a=1;a<=l.LevelsCount;a++)o.push(this._properties.child("level"+a).child("linewidth"));this._widthsProperty=new s(o)}inherit(l,r),l.LevelsCount=9,l.prototype.levelsCount=function(){return l.LevelsCount},l.prototype.pointsCount=function(){return 2},l.prototype.translatedType=function(){return a},l.prototype.name=function(){return"Gann Fan"},l.prototype.processErase=function(e,t){var i="level"+t,r=this.properties()[i].visible;e.setProperty(r,!1,"Erase level line")},l.prototype.getStylesPropertyPage=function(){return o.LineToolGannFanStylesPropertyPage},l.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("ASG6").GannFanDefinitionsViewModel}.bind(null,i)).catch(i.oe)}, l.createProperties=function(e){var t=new n("linetoolgannfan",e,!1,{range:[1,9]});return l._configureProperties(t),t},l._configureProperties=function(e){r._configureProperties(e)},t.LineToolGannFan=l},"5/lF":function(e,t,i){"use strict";i.r(t),i.d(t,"TrendLineStatsRenderer",(function(){return y}));var r=i("aO4+"),n=i("f6yo"),o=i("Eyy1"),s=i("qFKp"),a=i("qgcf"),l=i("VdBB"),c=i("jFln"),u=i("ogJP"),h=i("ikwP"),d=null;function p(e){var t=new Image;return t.width=_,t.height=_,t.src=e,t}var f={angle:{dark:p("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjQ5OTk5IDE1SDIuNjU3NzFMMy4wNjEwNCAxNC4yNjA2TDkuMDYxMDQgMy4yNjA1N0w5LjMwMDQ2IDIuODIxNjJMMTAuMTc4NCAzLjMwMDQ4TDkuOTM4OTMgMy43Mzk0Mkw3LjUxMzg1IDguMTg1NDJDMTAuNTYyMSA5LjY3MjA1IDEwLjk0NTEgMTIuNjI2MSAxMC45OTMxIDE0SDE0LjVIMTVWMTVIMTQuNUgzLjQ5OTk5Wk05Ljk5MTk3IDE0QzkuOTQyMzYgMTIuNzI1OSA5LjU4NjI5IDEwLjI4OCA3LjAzNDM1IDkuMDY0NDlMNC4zNDIyNiAxNEg5Ljk5MTk3WiIgZmlsbD0iI0Y4RjlGRCIvPgo8L3N2Zz4K"),light:p("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMy40OTk5OSAxNUgyLjY1NzcxTDMuMDYxMDQgMTQuMjYwNkw5LjA2MTA0IDMuMjYwNTdMOS4zMDA0NiAyLjgyMTYyTDEwLjE3ODQgMy4zMDA0OEw5LjkzODkzIDMuNzM5NDJMNy41MTM4NSA4LjE4NTQyQzEwLjU2MjEgOS42NzIwNSAxMC45NDUxIDEyLjYyNjEgMTAuOTkzMSAxNEgxNC41SDE1VjE1SDE0LjVIMy40OTk5OVpNOS45OTE5NyAxNEM5Ljk0MjM2IDEyLjcyNTkgOS41ODYyOSAxMC4yODggNy4wMzQzNSA5LjA2NDQ5TDQuMzQyMjYgMTRIOS45OTE5N1oiIGZpbGw9IiMyQTJFMzkiLz4NCjwvc3ZnPg0K")},barsRange:{dark:p("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMiAzVjMuNVY1SDFWNlYxM1YxNEgyVjE1LjVWMTZIM1YxNS41VjE0SDRWMTNWNlY1SDNWMy41VjNIMlpNOC4yMDcxMSA3LjVMNy44NTM1NSA3Ljg1MzU1TDYuNzA3MTEgOUgxMS4yOTI5TDEwLjE0NjQgNy44NTM1NUw5Ljc5Mjg5IDcuNUwxMC41IDYuNzkyODlMMTAuODUzNiA3LjE0NjQ1TDEyLjg1MzYgOS4xNDY0NUwxMy4yMDcxIDkuNUwxMi44NTM2IDkuODUzNTVMMTAuODUzNiAxMS44NTM2TDEwLjUgMTIuMjA3MUw5Ljc5Mjg5IDExLjVMMTAuMTQ2NCAxMS4xNDY0TDExLjI5MjkgMTBINi43MDcxMUw3Ljg1MzU1IDExLjE0NjRMOC4yMDcxMSAxMS41TDcuNSAxMi4yMDcxTDcuMTQ2NDUgMTEuODUzNkw1LjE0NjQ1IDkuODUzNTVMNC43OTI4OSA5LjVMNS4xNDY0NSA5LjE0NjQ1TDcuMTQ2NDUgNy4xNDY0NUw3LjUgNi43OTI4OUw4LjIwNzExIDcuNVpNMyA2SDJWMTNIM1Y2Wk0xNSAzLjVWM0gxNlYzLjVWNUgxN1Y2VjEzVjE0SDE2VjE1LjVWMTZIMTVWMTUuNVYxNEgxNFYxM1Y2VjVIMTVWMy41Wk0xNSA2SDE2VjEzSDE1VjZaIiBmaWxsPSIjRjhGOUZEIi8+DQo8L3N2Zz4NCg=="), light:p("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMiAzVjMuNVY1SDFWNlYxM1YxNEgyVjE1LjVWMTZIM1YxNS41VjE0SDRWMTNWNlY1SDNWMy41VjNIMlpNOC4yMDcxMSA3LjVMNy44NTM1NSA3Ljg1MzU1TDYuNzA3MTEgOUgxMS4yOTI5TDEwLjE0NjQgNy44NTM1NUw5Ljc5Mjg5IDcuNUwxMC41IDYuNzkyODlMMTAuODUzNiA3LjE0NjQ1TDEyLjg1MzYgOS4xNDY0NUwxMy4yMDcxIDkuNUwxMi44NTM2IDkuODUzNTVMMTAuODUzNiAxMS44NTM2TDEwLjUgMTIuMjA3MUw5Ljc5Mjg5IDExLjVMMTAuMTQ2NCAxMS4xNDY0TDExLjI5MjkgMTBINi43MDcxMUw3Ljg1MzU1IDExLjE0NjRMOC4yMDcxMSAxMS41TDcuNSAxMi4yMDcxTDcuMTQ2NDUgMTEuODUzNkw1LjE0NjQ1IDkuODUzNTVMNC43OTI4OSA5LjVMNS4xNDY0NSA5LjE0NjQ1TDcuMTQ2NDUgNy4xNDY0NUw3LjUgNi43OTI4OUw4LjIwNzExIDcuNVpNMyA2SDJWMTNIM1Y2Wk0xNSAzLjVWM0gxNlYzLjVWNUgxN1Y2VjEzVjE0SDE2VjE1LjVWMTZIMTVWMTUuNVYxNEgxNFYxM1Y2VjVIMTVWMy41Wk0xNSA2SDE2VjEzSDE1VjZaIiBmaWxsPSIjMkEyRTM5Ii8+DQo8L3N2Zz4NCg==")},priceRange:{dark:p("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMyAySDMuNUgxMy41SDE0VjNIMTMuNUgzLjVIM1YyWk04LjUgMy43OTI4OUw4Ljg1MzU1IDQuMTQ2NDVMMTAuODUzNiA2LjE0NjQ1TDExLjIwNzEgNi41TDEwLjUgNy4yMDcxMUwxMC4xNDY0IDYuODUzNTVMOSA1LjcwNzExVjEyLjI5MjlMMTAuMTQ2NCAxMS4xNDY0TDEwLjUgMTAuNzkyOUwxMS4yMDcxIDExLjVMMTAuODUzNiAxMS44NTM2TDguODUzNTUgMTMuODUzNkw4LjUgMTQuMjA3MUw4LjE0NjQ1IDEzLjg1MzZMNi4xNDY0NSAxMS44NTM2TDUuNzkyODkgMTEuNUw2LjUgMTAuNzkyOUw2Ljg1MzU1IDExLjE0NjRMOCAxMi4yOTI5VjUuNzA3MTFMNi44NTM1NSA2Ljg1MzU1TDYuNSA3LjIwNzExTDUuNzkyODkgNi41TDYuMTQ2NDUgNi4xNDY0NUw4LjE0NjQ1IDQuMTQ2NDVMOC41IDMuNzkyODlaTTMuNSAxNkgzVjE1SDMuNUgxMy41SDE0VjE2SDEzLjVIMy41WiIgZmlsbD0iI0Y4RjlGRCIvPg0KPC9zdmc+DQo="),light:p("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMyAySDMuNUgxMy41SDE0VjNIMTMuNUgzLjVIM1YyWk04LjUgMy43OTI4OUw4Ljg1MzU1IDQuMTQ2NDVMMTAuODUzNiA2LjE0NjQ1TDExLjIwNzEgNi41TDEwLjUgNy4yMDcxMUwxMC4xNDY0IDYuODUzNTVMOSA1LjcwNzExVjEyLjI5MjlMMTAuMTQ2NCAxMS4xNDY0TDEwLjUgMTAuNzkyOUwxMS4yMDcxIDExLjVMMTAuODUzNiAxMS44NTM2TDguODUzNTUgMTMuODUzNkw4LjUgMTQuMjA3MUw4LjE0NjQ1IDEzLjg1MzZMNi4xNDY0NSAxMS44NTM2TDUuNzkyODkgMTEuNUw2LjUgMTAuNzkyOUw2Ljg1MzU1IDExLjE0NjRMOCAxMi4yOTI5VjUuNzA3MTFMNi44NTM1NSA2Ljg1MzU1TDYuNSA3LjIwNzExTDUuNzkyODkgNi41TDYuMTQ2NDUgNi4xNDY0NUw4LjE0NjQ1IDQuMTQ2NDVMOC41IDMuNzkyODlaTTMuNSAxNkgzVjE1SDMuNUgxMy41SDE0VjE2SDEzLjVIMy41WiIgZmlsbD0iIzJBMkUzOSIvPg0KPC9zdmc+DQo=")}},_=18,m=new Map,y=function(){function e(e,t,i){this._fontSize=0,this._preRendered=!1,this._boundingBox=null,this._rect=null,this._padding=null,this._textPoint=null,this._textSizeCache=t,this._data=e,this._fontSize=e.fontSize?e.fontSize:12,this._lineSpacing=Object(u.isNumber)(this._data.lineSpacing)&&this._data.lineSpacing?this._data.lineSpacing:0, e.lines=this._lines=Object(a.wordWrap)(e.text,this.fontStyle(),e.wordWrapWidth),this._hittest=i||new l.HitTestResult(l.HitTestResult.MOVEPOINT)}return e.prototype.fontStyle=function(){return(this._data.bold?"bold ":"")+(this._data.italic?"italic ":"")+this._fontSize+"px "+this._data.font},e.prototype.draw=function(e){if(0===this._data.points.length)return{width:0};this._preRender();var t=this._fontSize+this._lineSpacing;e.textBaseline="top",e.font=this.fontStyle();var i=Object(o.ensureNotNull)(this._rect);if(this._rect){if("right"!==this._data.horzAlign&&"center"!==this._data.horzAlign||!0!==this._data.doNotAlignText&&(e.textAlign="right"===this._data.horzAlign?"end":"center"),this._data.backgroundRoundRect?(Object(c.drawRoundRect)(e,i.x,i.y,i.w,i.h,this._data.backgroundRoundRect),e.fillStyle=this._data.backgroundColor,e.fill(),e.globalAlpha=1):(e.fillStyle=this._data.backgroundColor,e.fillRect(i.x,i.y,i.w,i.h),e.globalAlpha=1),!s.isIE&&this._data.icons)for(var r=0,n=Math.ceil((_-this._fontSize)/2),a=Object(o.ensureNotNull)(this._padding),l=0,u=this._data.icons;l=48&&e<=57}var c=function(){function e(){ this.entries=[],this.firstDayOfWeek=r.MONDAY,this.weekEndsCount=-1}return e.prototype.parseSessions=function(t,i){if(this._clear(),this.timezone=t,"24x7"===(i=this._parseFirstDayOfWeek(i)).toLowerCase())for(var r=0,n=h;r2)return a.logError("Only one `first day` specification expected @ session "+e),e;if(1===t.length)return e;var i=1,n=t[0].indexOf("-")>=0?NaN:parseInt(t[0]);return isNaN(n)&&(i=0,n=parseInt(t[1])),nr.SATURDAY?(a.logError("Unexpected day index @ session: "+e+"; day index "+n),e):(this.firstDayOfWeek=n,t[i])},e._parseDay=function(e){var t=parseInt(e.substring(0,4)),i=parseInt(e.substring(4,6)),r=parseInt(e.substring(6,8));return new s.a(t,i,r)},e._parseSessionEntry=function(t,i){var r=i.split("-");2!==r.length&&(a.logError("Bad sessions entry: "+i),r=["0000","0000"]);var n=0,o=r[0];if(o.includes("F")){var s=o.split("F");o=s[0],n=""!==s[1]?parseInt(s[1]):1}var l=0,c=r[1];if(c.includes("F")){s=c.split("F");c=s[0],l=""!==s[1]?parseInt(s[1]):1}if(!this._isCorrectSession(o)||!this._isCorrectSession(c))throw new Error("Incorrect entry syntax: "+i);var u=o,h=c;return this._createSessionEntry(t,e._minutesFromHHMM(u),e._minutesFromHHMM(h),n,l)},e._isCorrectSession=function(e){ return 4===e.length&&l(e.charCodeAt(0))&&l(e.charCodeAt(1))&&l(e.charCodeAt(2))&&l(e.charCodeAt(3))},e._parseWorkingDays=function(e){for(var t=[],i=0;i0&&(t-=n*r.minutesPerDay),o>0&&(i-=o*r.minutesPerDay),new f(e,t,i-t)},e}();i.d(t,"workingDays",(function(){return u})),i.d(t,"workingDaysAndWeekEnds",(function(){return h})),i.d(t,"compareSessionEntries",(function(){return p})),i.d(t,"SessionEntry",(function(){return f})),i.d(t,"EntryIndex",(function(){return _})),i.d(t,"SessionSpec",(function(){return y}));var u=[r.MONDAY,r.TUESDAY,r.WEDNESDAY,r.THURSDAY,r.FRIDAY],h=[r.SUNDAY,r.MONDAY,r.TUESDAY,r.WEDNESDAY,r.THURSDAY,r.FRIDAY,r.SATURDAY];function d(e,t){return e.compareTo(t)<0}function p(e,t){return e.compareTo(t)}var f=function(){function e(e,t,i){this._dayOfWeek=e,this._start=t,this._length=i}return e.prototype.start=function(){return this._start+r.minutesPerDay*this.sessionStartDaysOffset()},e.prototype.startOffset=function(){return this._start},e.prototype.sessionStartDaysOffset=function(){return this._start>=0?0:this._start%r.minutesPerDay==0?-Math.ceil(this._start/r.minutesPerDay):-Math.floor(this._start/r.minutesPerDay)},e.prototype.isOvernight=function(){return this._start<0},e.prototype.dayOfWeek=function(){return this._dayOfWeek},e.prototype.sessionStartDayOfWeek=function(){var e=this._dayOfWeek-this.sessionStartDaysOffset();return er?1:-1},e.prototype.contains=function(e){var t=60*r.get_hours(e)+r.get_minutes(e),i=r.get_day_of_week(e)-this._dayOfWeek;i>0&&(i-=7);var n=i*r.minutesPerDay+t;return n>=this._start&&n0&&(t-=n*r.minutesPerDay),o>0&&(i-=o*r.minutesPerDay);var s=i-t;this._entries.push(new f(e,t,s))},e.prototype.longestSessionLength=function(){for(var e=0,t=0,i=0,r=this._holidaySessions;ithis._entries.length-1||this._entries[t].dayOfWeek()!==e},e.prototype.isCalWeekEnd=function(e){var t=r.get_day_of_week(e);if(!this._isThereCorrections)return this.isWeekEnd(t);var i=s.a.fromCalendar(e),n=this._holidayAndCorrectionMap.get(i.toString());return void 0===n?this.isWeekEnd(t):0===n.length},e.prototype.hasWeekEnds=function(){return this.weekEndsCount()>0},e.prototype.weekEndsCount=function(){return this._weekEndsCount},e.prototype.holidaysFromYearStart=function(e){if(!this._isThereCorrections)return 0;for(var t=r.get_timezone(this._timezone),i=new s.a(r.get_year(e),r.JANUARY,1),n=s.a.fromCalendar(e),o=0,a=this._selectHolidays(i,n),l=0;l0?1:-1;;){var c=s+l;if(c<0||c>=o.length||o[c].dayOfWeek()!==a)break;s=c}return new _(n.weekIndex,s,o)},e.prototype.getWeekIndex=function(e){if(!this._isThereCorrections)return 0;var t=r.get_day_of_week(e)-r.SUNDAY,i=r.get_timezone("Etc/UTC"),n=r.get_cal(i,r.get_year(e),r.get_month(e),r.get_day_of_month(e)-t);return Math.floor((n.getTime()+621672192e5)/1e3/86400/7)},e.prototype.correctTradingDay=function(e){var t=r.get_day_of_week(e),i=60*r.get_hours(e)+r.get_minutes(e),n=this.getWeekIndex(e),o=this.findSession(n,t,i,0),s=o.getEntry().dayOfWeek()-t+7*(o.weekIndex-n);return 0!==s&&r.add_date(e,s),e},e.prototype.alignToSessionStart=function(e,t){void 0===t&&(t=0) ;var i=r.get_day_of_week(e),n=60*r.get_hours(e)+r.get_minutes(e),o=this.getWeekIndex(e),s=this.findSession(o,i,n,t),a=s.getEntry(),l=a.dayOfWeek()-i+7*(s.weekIndex-o);0!==l&&r.add_date(e,l);var c=a.startOffset();return r.set_hms(e,c/60,c%60,0,0,r.get_timezone(this._timezone)),a.length()},e.prototype.businessDaysToCalendarDays=function(e,t){for(var i=this.getWeekIndex(e),n=r.get_day_of_week(e),o=0,s=0;sc);)a[l].dayOfWeek()=t)return o}i++,n=r.SUNDAY}return o},e.prototype.calendarDaysToBusinessDays=function(e,t){for(var i=this.getWeekIndex(e),n=r.get_day_of_week(e),o=0,s=0;oc);)a[l].dayOfWeek()=t)return s}i++,n=r.SUNDAY}return s},e.prototype.alignToNearestSessionStart=function(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionStart.bind(this))},e.prototype.alignToNearestSessionEnd=function(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionEnd.bind(this))},e.prototype.leftBorderOfDailyBar=function(e){var t=this._getEntriesForDay(e);return 0===t.length?null:(t.sort(p),this._getLeftEntryBorder(e,t[0]))},e.prototype.bordersOfDailyBar=function(e){var t=this._getEntriesForDay(e);if(0===t.length)return null;t.sort(p);var i=this._getLeftEntryBorder(e,t[0]),n=t[t.length-1],o=r.clone(e),s=60*(n.startOffset()+n.length())-1,a=Math.floor(s/3600);return s-=3600*a,r.set_hms(o,a,s/60,s%60,0,r.get_timezone(this._timezone)),{from:i,to:o}},e.prototype._getEntriesForWeek=function(e){var t=this._entriesHash.get(e);if(void 0===t)return this._entries;if(null!==t)return t;var i=r.get_timezone(this._timezone);t=this._entries.slice();for(var n=this._weekIndexToCalendar(e),o=this._weekIndexToCalendar(e+1),a=s.a.fromCalendar(n),l=s.a.fromCalendar(o),c=function(e){var n=e.day.toCalendar(i),o=r.get_day_of_week(n);t=(t=t.filter((function(e){return e.dayOfWeek()!==o}))).concat(e.sessions)},u=0,h=this._selectHolidays(a,l);u0&&i>=0||c<0&&i<0)&&r.add_date(t,7*c),!s.contains(t)){var h=a-o;u&&i<0&&(h=-(7-a+o)),r.add_date(t,h),o=r.get_day_of_week(t)}s.isOvernight()&&o===s.dayOfWeek()&&r.add_date(t,-s.sessionStartDaysOffset());var d=n(s),p=Math.floor(d/3600);return d-=3600*p,r.set_hms(t,p,d/60,d%60,0,r.get_timezone(this._timezone)),t},e.prototype._getEntriesForDay=function(e){var t=r.get_day_of_week(e);return this._getEntriesForWeek(this.getWeekIndex(e)).filter((function(e){return e.dayOfWeek()===t}))},e.prototype._getLeftEntryBorder=function(e,t){var i=r.clone(e),n=t.startOffset();return r.set_hms(i,n/60,n%60,0,0,r.get_timezone(this._timezone)),i},e}()},"5rJj":function(e,t,i){"use strict";(function(t){var r=i("ogJP").isSameType,n=i("Ocx9").DefaultProperty,o=i("vADo");function s(e,t,i,r){this._map=Object.assign({},this._map,r),t&&(t=this.unpackLevels(t)),n.call(this,e,t,i),this.updateCollectibleProperty()}inherit(s,n),s.prototype.state=function(e,i){(e=e||[]).push("__collectibleLines");var r=t.prototype.state.call(this,e);return i?r:this.packLevels(r)},s.prototype.clone=function(){var e=this.state();this.__collectibleLines&&(e.__collectibleLines=this.__collectibleLines.state());for(var t=new s(this._defaultName,e),i=0;i=0&&!0!==n[t].func(e);t--);}function l(e){e.addEventListener("keypress",a,!1)}function c(e,t){var i={name:e,func:t},r=s(i.name);r>-1?n[r]=i:n.push(i)}function u(e){n.forEach((function(t,i){t.name===e&&n.splice(i,1)}))}function h(e,t){var i={name:e,func:t},r=s(i.name);r>-1&&n.splice(r,1),n.unshift(i)}function d(){return o?null:o=Object(r.randomHashN)(4)}function p(e){if(e!==o)throw Error("Lock id is outdated");o=null}l(window)},"6ptY":function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererSquare",(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._drawItemShape=function(e,t,i){var r=t.pixelRatio,n=Math.max(1,Math.floor(r))%2?.5:0,o=this._lineWidth(t)%2?.5:0,s=Math.round(i.height/2*r);(n+s)%1!=o%1&&(s+=.5);var a=Math.round(i.x*r)+n,l=Math.round((i.y+i.vertOffset)*r)+n,c=a-s,u=l-s,h=a+s,d=l+s;e.rect(c,u,h-c,d-u)},t.prototype._calcBoundingBox=function(t){var i=t.height,r=Math.round(i/2),n=t.x-r,s=t.vertOffset,a=t.y+s-r,l=n,c=n+i,u=a,h=a+i,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.a)},"6sst":function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayStudyPriceLineAxisView",(function(){return n}));var r=i("mrSG"),n=function(e){function t(t){var i=e.call(this)||this;return i._study=t,i}return Object(r.__extends)(t,e),t.prototype._value=function(){return this._study.lastValueData("",!0)},t.prototype._priceLineColor=function(e){return e},t.prototype._lineWidth=function(){return 1},t.prototype._isVisible=function(){ var e=this._study.model().properties().scalesProperties.showSeriesLastValue.value();return this._study.properties().childs().showPriceLine.value()&&e},t}(i("TmNs").PriceLineAxisView)},"6xeX":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tooltip=void 0;var r=function(){function e(e,t){for(var i=0;i2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e.hasOwnProperty("text")){var s=r&&(0,n.forceLTRStr)(e.text)||e.text;if(e.hasOwnProperty("color")&&i){var a=document.createElement("span");a.style.cssText="color: "+e.color,o.html(a,s),t.appendChild(a)}else o.html(t,s)}else{var l=r&&(0,n.forceLTRStr)(e)||e;o.html(t,l)}return t}function p(e,t){if(Array.isArray(e)&&2===e.length){var i=document.createElement("dl");i.appendChild(d(e[0],document.createElement("dt"))),i.appendChild(d(e[1],document.createElement("dd"),!0,!0)),t.appendChild(i)}else if(e.hasOwnProperty("br")&&e.br)t.appendChild(document.createElement("br"));else{var r=document.createElement("dl");r.appendChild(d(e,document.createElement("dt"))),t.appendChild(r),e.hasOwnProperty("listItem")&&r.classList.add("list-item")}}function f(e,t){var i=(0,n.forceLTRStr)(e.text);e.attr=e.attr||{};var r=document.createElement("a");o.attr(r,"href",e.href),o.addClass(r,e.class),o.attr(r,e.attr.name,e.attr.value),o.html(r,i),t.appendChild(r)}function _(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if("string"==typeof e){var r=(0,n.forceLTRStr)(e),s=document.createElement("h2");o.html(s,r),t.appendChild(s)}else if(e.hasOwnProperty("lines"))for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{},i=t.direction,r=void 0===i?"top":i,n=t.clickable,o=void 0!==n&&n,s=t.width;l(this,e),this._direction=r,this._tooltipShown=!1,this._tooltipX=void 0,this._tooltipY=void 0,this._tooltipItems=null,this._width=void 0!==s?s:200,this._tooltip=document.createElement("div"),this._tooltip.classList.add("tv-chart-events-source__tooltip"),this._tooltip.style.position="absolute",this._tooltip.style.width=this._width+"px",this._tooltipContent=document.createElement("div"),this._tooltipContent.classList.add("tv-chart-events-source__tooltip__content"),this._tooltip.appendChild(this._tooltipContent),o&&this._tooltip.classList.add("tv-chart-events-source__tooltip--clickable")}return r(e,[{key:"show",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.items,i=void 0===t?[]:t,r=e.x,n=void 0===r?0:r,s=e.y,a=void 0===s?0:s,l=e.wrapElement,c=void 0===l?null:l,u=e.timeOffset,d=void 0===u?"":u,p=e.leftBorderColor,f=void 0===p?null:p;if(c&&!h(i)){var m=o.contentWidth(c),y=o.contentHeight(c),g=!1,v=!1;if(this._tooltipShown||(c.appendChild(this._tooltip),this._tooltipShown=!0,g=!0,v=!0),n===this._tooltipX&&a===this._tooltipY||(g=!0),g){var S=Math.max(Math.min(n-this._width/2,m-this._width-10),0);this._tooltip.style.left=Math.round(S)+"px",this._tooltip.style.bottom=Math.round(y-a+10)+"px"}if(this._tooltipItems||(v=!0),!v)for(var b=i.length;b--;)if(this._tooltipItems[b]!==i[b]){v=!0;break}if(v){var w=void 0;if(i.length<=1)w=i;else{for(var P={},C=i.length;C--;){var x=i[C].importance;null==x&&(x=-1),P[x]||(P[x]=[]),P[x].push(i[C])}var T=Object.keys(P).sort((function(e,t){return e-t}));if(T.length<=1)w=P[T[0]];else{w=[];for(var L=T.length;L--;)for(var I=P[T[L]],M=I.length;M--;)w.push(I[M])}}this._tooltipContent.innerHTML="";for(var O=w.length;O--;){var A=w[O],k="" ;A.hasOwnProperty("importance")?("string"==typeof A.importance&&("earnings"===A.importance?k="--importance-earnings":"splits"===A.importance?k="--importance-splits":"dividends"===A.importance?k="--importance-dividends":"list"===A.importance&&(k="--importance-list")),0===A.importance?k="--importance-normal":A.importance>0&&(k="--importance-high")):f||(k="--importance-none");var E="tv-chart-events-source__tooltip__item";k&&(E+=" "+E+k);var D=document.createElement("div");o.attr(D,"class",E),f&&(D.style.borderLeftColor=f),_(A,D,d),this._tooltipContent.appendChild(D)}this._tooltipItems=i}"bottom"===this._direction&&(this._tooltip.style.bottom=Math.round(y-a-o.contentHeight(this._tooltipContent)+10)+"px")}}},{key:"hide",value:function(){this._tooltipShown&&(this._tooltip.parentElement&&this._tooltip.parentElement.removeChild(this._tooltip),this._tooltipShown=!1)}},{key:"isOpened",value:function(){return this._tooltipShown}},{key:"getElem",value:function(){return this._tooltip}}]),e}()},"704P":function(e,t,i){"use strict";(function(e){var r=i("Ss5c").LineDataSource,n=i("jkoZ"),o=i("Ocx9").DefaultProperty,s=i("k9/m").PlotRowSearchMode,a=i("s1Gx").sortSourcesPreOrdered.LineToolExecution;function l(e,t){this._pane=e,this._timeScale=t}function c(e){this._line=e}function u(e,t){this._adapter=new c(this),this._constructor="LineToolExecution";var n=t||u.createProperties();this.customization={forcePriceAxisLabel:!1,disableSelection:!0,disableErasing:!0},r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("tjxb").ExecutionPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}l.prototype._cachedByBarIndexOrderedExecutions={},l.recreateOrderedByBarsSourcesCache=function(e){l.clearOrderedByBarsSourcesCache();for(var t=l.prototype,i=e.orderedSources(),r=0;rf.lastBar()||i=0;--m){var y=_[m];if(y instanceof u&&y._adapter._index===i&&y._adapter.getDirection()===n){if(y===e._line)break;var g=y._adapter._height();r=o?r+g:r-g}}return{x:t.indexToCoordinate(i),y:r}},c.prototype._height=function(){var e=this.getArrowHeight(),t=this.getArrowSpacing();this.getText()&&n.fontHeight(this.getFont());return e+t+0+10}, c.prototype.getIndex=function(){return this._line._model.timeScale().baseIndex()-this._line.points()[0].index},c.prototype.setIndex=function(e){var t=this._line._model.timeScale().baseIndex()-Math.abs(e);this._line.startMoving({logical:this._line.points()[0]});var i=TradingView.merge({},this._line.points()[0]);return i.index=t,this._line.move({logical:i}),this._line.endMoving(),this},c.prototype.getTime=function(){return this._unixtime},c.prototype.setTime=function(e){var t=this._line._model.mainSeries();return this._unixtime=ChartApiInstance.alignTimePoint?ChartApiInstance.alignTimePoint(e,t.interval(),t.symbolInfo()):e,this._line.restorePoints([{offset:0,price:this.getPrice(),time_t:this._unixtime}],[]),this._line.createServerPoints(),this},c.prototype.getPrice=function(){return this._line.points().length>0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0},c.prototype.setPrice=function(e){return this._line.points().length>0&&(this._line.points()[0].price=e),this._line._timePoint.length>0&&(this._line._timePoint[0].price=e),this},c.prototype.getText=function(){return this._line.properties().text.value()},c.prototype.setText=function(e){return this._line.properties().text.setValue(e||""),this._line.updateAllViewsAndRedraw(),this},c.prototype.getArrowHeight=function(){return this._line.properties().arrowHeight.value()},c.prototype.setArrowHeight=function(e){return this._line.properties().arrowHeight.setValue(e||5),this},c.prototype.getArrowSpacing=function(){return this._line.properties().arrowSpacing.value()},c.prototype.setArrowSpacing=function(e){return this._line.properties().arrowSpacing.setValue(e||1),this},c.prototype.getDirection=function(){return this._line.properties().direction.value()},c.prototype.setDirection=function(e){return this._line.properties().direction.setValue(e||"buy"),this},c.prototype.getArrowColor=function(){var e=this._line.properties();return"buy"===this.getDirection()?e.arrowBuyColor.value():e.arrowSellColor.value()},c.prototype.setArrowColor=function(e){return"buy"===this.getDirection()?this.setArrowBuyColor(e):this.setArrowSellColor(e),this},c.prototype.setArrowBuyColor=function(e){return this._line.properties().arrowBuyColor.setValue(e),this},c.prototype.setArrowSellColor=function(e){return this._line.properties().arrowSellColor.setValue(e),this},c.prototype.getTextColor=function(){return n.getColorFromProperties(this._line.properties().textColor,this._line.properties().textTransparency)},c.prototype.setTextColor=function(e){return n.setColorToProperties(e,this._line.properties().textColor,this._line.properties().textTransparency),this},c.prototype.getFont=function(){return n.getFontFromProperties(this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic)},c.prototype.setFont=function(e){return n.setFontToProperties(e,this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic),this}, c.prototype.setTooltip=function(e){return null==e?e="":e+="",this._line.properties().tooltip.setValue(e),this},c.prototype.getTooltip=function(){return this._line.properties().tooltip.value()},c.prototype.remove=function(){this._line._model.removeSource(this._line),delete this._line},c.prototype.getPoints=function(){return this._line.points()},inherit(u,r),u.prototype.zorder=function(){return a},u.POINTS_COUNT=1,u.prototype.pointsCount=function(){return u.POINTS_COUNT},u.prototype.translatedType=function(){return"Execution"},u.prototype.name=function(){return"Execution"},u.prototype.hasContextMenu=function(){return!1},u.prototype.state=function(){return null},u.prototype.updateAllViews=function(){return this._isVisible()?r.prototype.updateAllViews.call(this):null},u.prototype.priceAxisViews=function(e,t){return this._isVisible()?r.prototype.priceAxisViews.call(this,e,t):null},u.prototype._isVisible=function(){return this._model.properties().tradingProperties.showExecutions.value()},u.prototype.paneViews=function(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showExecutions.value()?r.prototype.paneViews.call(this):null},u.prototype.userEditEnabled=function(){return!1},u.prototype.showInObjectTree=function(){return!1},u.prototype.getInputsPropertyPage=function(){return null},u.prototype.cloneable=function(){return!1},u.prototype.copiable=function(){return!1},u.createProperties=function(e){var t=new o("linetoolexecution",e,!1,!1);return u._configureProperties(t),t},u._configureProperties=function(e){r._configureProperties(e)},t.ExecutionsPositionController=l,t.LineToolExecution=u}).call(this,i("Kxc7"))},"7Fue":function(e,t,i){"use strict";i.d(t,"a",(function(){return o})),i.d(t,"b",(function(){return s}));var r=i("mrSG"),n=["horizlines","vertlines","lines","hlines","textmarks","shapemarks","backgrounds","polygons","trendchannels","hhists","dwglabels","dwglines"];function o(e){return!n.some((function(t){return e[t]().size>0}))}function s(e){var t=new Map;return e.forEach((function(e,i){e.forEach((function(e){var n=Object(r.__assign)(Object(r.__assign)({},e),{styleId:i}),o=e.firstBarTime,s=t.get(o);void 0===s&&(s=new Set,t.set(o,s)),s.add(n)}))})),t}},"7KDR":function(e,t,i){"use strict";i.r(t),i.d(t,"Action",(function(){return c})),i.d(t,"ActionAsync",(function(){return u})),i.d(t,"Separator",(function(){return h}));var r=i("mrSG"),n=i("zRdu"),o=i("aIyQ"),s=i.n(o),a=i("/3z9"),l=i("0waE"),c=function(){function e(e,t){void 0===t&&(t=l.guid()),this.type=n.a.Action,this._destroyed=!1,this._binding=null,this.id=t,this._onUpdate=new s.a,this._options=e,this.update(e)}return e.prototype.execute=function(){this._options.checkable&&this.update({checked:!this._options.checked}),this._options.onExecute&&this._options.onExecute(this)},e.prototype.getLabel=function(){return this._options.label||""},e.prototype.getSubItems=function(){return this._options.subItems||[]},e.prototype.isDisabled=function(){return!0===this._options.disabled}, e.prototype.isActive=function(){return!0===this._options.active},e.prototype.isCheckable=function(){return!0===this._options.checkable},e.prototype.isChecked=function(){return!0===this._options.checked},e.prototype.getPayload=function(){return this._options.payload},e.prototype.update=function(e){this._destroyed||(this._unbindShortcut(),e.hotkeyHash&&(this._options.shortcutHint=Object(a.humanReadableHash)(e.hotkeyHash)),this._options=Object.assign(this._options,e),this._bindShortcut(),this._onUpdate.fire(this))},e.prototype.onUpdate=function(){return this._onUpdate},e.prototype.getState=function(){return{label:this.getLabel(),disabled:this.isDisabled(),active:this.isActive(),subItems:this.getSubItems(),checkable:this.isCheckable(),checked:this.isChecked(),doNotCloseOnClick:this._options.doNotCloseOnClick||!1,shortcutHint:this._options.shortcutHint,hint:this._options.hint,icon:this._options.icon,iconChecked:this._options.iconChecked,toolbox:this._options.toolbox,showToolboxOnHover:this._options.showToolboxOnHover||!1,statName:this._options.statName,name:this._options.name}},e.prototype.getBinding=function(){return this._binding},e.prototype.setBinding=function(e){this._binding=e},e.prototype.destroy=function(){this._destroyed=!0,this._onUpdate.destroy(),null!==this._binding&&this._binding.destroy(),this._unbindShortcut()},e.prototype._bindShortcut=function(){var e=this;if(this._options.hotkeyGroup&&this._options.hotkeyHash){var t="string"==typeof this._options.label?this._options.label:this._options.name;this._hotkeyAction=this._options.hotkeyGroup.add({hotkey:this._options.hotkeyHash,desc:t,handler:function(){return e.execute()},isDisabled:function(){return e.isDisabled()}})}},e.prototype._unbindShortcut=function(){this._hotkeyAction&&(this._hotkeyAction.destroy(),delete this._hotkeyAction)},e}(),u=function(e){function t(t,i){var r=e.call(this,{},i)||this;return r.type=n.a.ActionAsync,r._loader=t,r._loaded=!1,r}return Object(r.__extends)(t,e),t.prototype.loadOptions=function(){var e=this;return this._loadingPromise||(this._loadingPromise=this._loader().then((function(t){e.update(t),e._loaded=!0}))),this._loadingPromise},t.prototype.isLoaded=function(){return this._loaded},t}(c),h=function(){function e(e,t){void 0===t&&(t=l.guid()),this.type=n.a.Separator,this.id=t,this._hint=e}return e.prototype.getHint=function(){return this._hint},e}()},"7MZv":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showTooManyStudiesNotice=function(e){"number"!=typeof e&&(e=TradingView.STUDY_COUNT_LIMIT);(0,r.showNoticeDialog)({title:window.t("Warning"),content:window.t("Studies limit exceeded: {0} studies per layout.\nPlease, remove some studies.").format(e)})};var r=i("brCa")},"7RN7":function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"a",(function(){return n}));var r=52,n=5},"7dm8":function(e,t,i){"use strict";i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return o})),i.d(t,"c",(function(){return s})),i.d(t,"d",(function(){return a})),i.d(t,"e",(function(){return l})) ;var r=i("ocLq"),n=function(){function e(){}return e.prototype.init=function(e,t){e.new_sym(t(1),r.Std.period(e),r.Std.period(e)),this._source=t(0),this._scaleFactor1=1,this._scaleFactor2=1},e.prototype.main=function(e,t){var i=e.symbol.time,n=r.Std[this._source](e);e.select_sym(1);var o=r.Std[this._source](e),s=e.new_unlimited_var(o),a=e.new_unlimited_var(e.symbol.time);if(e.select_sym(0),isNaN(i))return null;var l=a.indexOf(i);-1!==l&&a.get(l)!==i&&(l=-1);var c=l<0?NaN:s.get(l);return[this._doCalculation(this._scaleFactor1,n,this._scaleFactor2,c)]},e}(),o={styles:{plot1:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:2,inputs:{source:"close",symbol2:""}},s=[{defval:"close",id:"source",name:"Source",options:["open","high","low","close","hl2","hlc3","ohlc4"],type:"text"},{id:"symbol2",name:"Symbol",type:"symbol",confirm:!0}],a=[{id:"plot1",type:"line"}],l={plot1:{title:"Plot",histogramBase:0}}},"7ktv":function(e,t,i){"use strict";i.r(t),i.d(t,"PriceDataSource",(function(){return a}));var r=i("mrSG"),n=i("fgLi"),o=i("aIyQ"),s=i.n(o),a=function(e){function t(t){var i=e.call(this)||this;return i._formatterChanged=new s.a,i._priceStepChanged=new s.a,i._currencyChanged=new s.a,i._metaInfo=null,i._priceStep=null,i._model=t,i}return Object(r.__extends)(t,e),t.prototype.firstValue=function(){return null},t.prototype.barColorer=function(){return null},t.prototype.base=function(){return 0},t.prototype.model=function(){return this._model},t.prototype.currencyChanged=function(){return this._currencyChanged},t.prototype.isCurrencySource=function(){return!0},t.prototype.priceRange=function(e,t){return null},t.prototype.isDraggable=function(){return!this._metaInfo||!this._metaInfo.linkedToSeries},t.prototype.priceLineColor=function(e){return e},t.prototype.formatterChanged=function(){return this._formatterChanged},t.prototype.priceStep=function(e){return this._priceStep},t.prototype.priceStepChanged=function(){return this._priceStepChanged},t.prototype.hasStateForAlert=function(){return!1},t.prototype.isIncludedInAutoScale=function(){return!0},t}(n.DataSource)},"7nsU":function(e,t,i){"use strict";i.r(t),i.d(t,"showConfirmInputsDialog",(function(){return r}));i("YFKU");function r(e,t,r,n,o){void 0===o&&(o="default"),Promise.all([i.e("react"),i.e(2),i.e(3),i.e(4),i.e(6),i.e(7),i.e(8),i.e(9),i.e(11),i.e(16),i.e(20),i.e(24),i.e(28),i.e(56),i.e(90),i.e(0),i.e(1),i.e(5),i.e(13),i.e(17),i.e(18),i.e(19),i.e(27),i.e(50),i.e("new-confirm-inputs-dialog")]).then(i.bind(null,"iqv3")).then((function(i){var s=new i.ConfirmInputsDialogRenderer(function(e){if("symbol"===e)return window.t("Add Symbol");return window.t("Confirm Inputs")}(o),e,t,o,r,n);return s.show(),s}))}},"7qI1":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolRectangle",(function(){return h}));var r=i("mrSG"),n=i("YFKU"),o=i("hayr"),s=i("Ocx9"),a=i("tc+8"),l=i.n(a),c=i("Ss5c"),u=Object(n.t)("Rectangle"),h=function(e){function t(r,n){var o=this,s=n||t.createProperties() ;return(o=e.call(this,r,s)||this)._constructor="LineToolRectangle",i.e("lt-pane-views").then(function(e){var t=[new(0,i("GW0y").RectanglePaneView)(o,r)];o._setPaneViews(t)}.bind(null,i)).catch(void 0),o}return Object(r.__extends)(t,e),t.prototype.pointsCount=function(){return 2},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.translatedType=function(){return u},t.prototype.name=function(){return"Rectangle"},t.prototype.setPoint=function(t,i,r){if(t<2)e.prototype.setPoint.call(this,t,i,r);else{if(r&&r.shift()&&this.properties().childs().snapTo45Degrees){var n=this.points()[0],o=this.points()[1],s={price:2===t?n.price:o.price,index:2===t?o.index:n.index};this._snapPoint45Degree(i,s)}3===t?(this._points[0].price=i.price,this._points[1].index=i.index):(this._points[1].price=i.price,this._points[0].index=i.index),this.normalizePoints()}},t.prototype.getStylesPropertyPage=function(){return o.propertyPages.LineToolRectangleStylesPropertyPage},t.prototype.template=function(){var t=e.prototype.template.call(this);return t.text=this.properties().childs().text.value(),t},t.createProperties=function(e){var i=new s.DefaultProperty("linetoolrectangle",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,"K4wI")).then((function(e){return e.RectangleDefinitionsViewModel}))},t.prototype._applyTemplateImpl=function(t){e.prototype._applyTemplateImpl.call(this,t),this.properties().childs().text.setValue(t.text)},t._configureProperties=function(e){c.LineDataSource._configureProperties(e),e.hasChild("text")||e.addChild("text",new l.a("")),e.addExclusion("text")},t}(c.LineDataSource)},"7qT/":function(e,t,i){"use strict";function r(e,t){return 100*(t-e)/Math.abs(e)}i.d(t,"a",(function(){return r}))},"8C8C":function(e,t,i){"use strict";i.r(t),i.d(t,"RestoreFactoryDefaultsUndoCommand",(function(){return n}));var r=i("mrSG"),n=function(e){function t(t,i,r){void 0===r&&(r="Restore Defaults");var n=e.call(this,r)||this;return n._chartModel=t,n._defaultProperty=i,n._state=i.state(),n}return Object(r.__extends)(t,e),t.prototype.redo=function(){this._chartModel.restoreFactoryDefaults(this._defaultProperty)},t.prototype.undo=function(){this._defaultProperty.mergeAndFire(this._state),this._chartModel.mainSeries().onChartStyleChanged()},t}(i("RDU5").UndoCommand)},"8OdW":function(e,t,i){"use strict";i.r(t),i.d(t,"MINUTE_SPAN",(function(){return r})),i.d(t,"HOUR_SPAN",(function(){return n})),i.d(t,"DAY_SPAN",(function(){return o})),i.d(t,"WEEK_SPAN",(function(){return s})),i.d(t,"MONTH_SPAN",(function(){return a})),i.d(t,"YEAR_SPAN",(function(){return l})),i.d(t,"DEFAULT_BAR_SPACING",(function(){return c}));var r=20,n=30,o=40,s=50,a=60,l=70,c=6},"8Uy/":function(e,t,i){"use strict";i.r(t),i.d(t,"LINESTYLE_SOLID",(function(){return r})),i.d(t,"LINESTYLE_DOTTED",(function(){return n})),i.d(t,"LINESTYLE_DASHED",(function(){return o})),i.d(t,"LINESTYLE_LARGE_DASHED",(function(){ return s})),i.d(t,"LINESTYLE_SPARSE_DOTTED",(function(){return a})),i.d(t,"LINESTYLE_SMALL_DASHED",(function(){return l}));var r=0,n=1,o=2,s=3,a=4,l=5},"8aff":function(e,t,i){"use strict";i.r(t),i.d(t,"CompareStudyPriceAxisView",(function(){return o}));var r=i("mrSG"),n=i("oXaB"),o=function(e){function t(t,i){var r=e.call(this)||this;return r._studyCompare=t,r._data=i,r}return Object(r.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var r=this._studyCompare.lastValueData(this._data.plotIndex,!1);if(!r.noData){i.background=r.color,i.color=this.generateTextColor(r.color),i.coordinate=r.coordinate,i.floatCoordinate=r.floatCoordinate;var o=this._studyCompare.model().properties().scalesProperties;o.showSeriesLastValue.value()&&(e.text=this._axisText(r),e.visible=!0),t.text="",(o.showSymbolLabels.value()||o.seriesLastValueMode.value()===n.PriceAxisLastValueMode.LastPriceAndPercentageValue)&&(t.text=this._paneText(r),t.visible=t.text.length>0)}},t.prototype._paneText=function(e){var t="",i=this._studyCompare.model().properties().scalesProperties;i.showSymbolLabels.value()&&(t+=this._studyCompare.symbol()+" ");var r=this._studyCompare.priceScale();return null!==r&&i.showSeriesLastValue.value()&&i.seriesLastValueMode.value()===n.PriceAxisLastValueMode.LastPriceAndPercentageValue&&(t+=r.isPercentage()?e.formattedPriceAbsolute:e.formattedPricePercentage),t.trim()},t.prototype._axisText=function(e){var t=this._studyCompare.model().properties().scalesProperties,i=this._studyCompare.priceScale();return t.seriesLastValueMode.value()!==n.PriceAxisLastValueMode.LastPriceAndPercentageValue||null===i?e.text:i.isPercentage()?e.formattedPricePercentage:e.formattedPriceAbsolute},t}(i("KcY8").a)},"8gnj":function(e,t,i){"use strict";(function(t){var r=i("ESp1").HeikenAshi,n=i("LxhU").Interval,o=function(){var e=i("ocLq"),o=i("IiTo"),s=e.Symbol,a=e.StudyEngine,l=e.BarBuilder,c=e.BarSet;function u(e){this.host=e,this.cache={}}function h(e){var t=e.indexOf(",");return-1===t?e:e.slice(0,t)}function d(e){return e.has_empty_bars||e.force_session_rebuild}function p(e){return"string"==typeof e&&"="===e[0]}function f(e){if(!p(e))return{symbol:e};var t;try{t=JSON.parse(e.slice(1))}catch(i){return{symbol:e}}return t.type&&(0===t.type.indexOf("BarSetHeikenAshi@tv-basicstudies-")?t.builder=new r:console.error("unknown builder type: "+t.type)),"string"!=typeof t.symbol&&(t.session=t.symbol.session||t.session,t.currencyCode=t.symbol.currencyCode||t.currencyCode,t.symbol=t.symbol.symbol),t}u.prototype.getCache=function(e){return this.cache[e]},u.prototype.putCache=function(e,t){this.cache[e]=t},u.prototype.subscribe=function(e,t,i,r,n,o,s,a,l,c,u){var h=function(e,t,i,r,n,o,s,a){var l=d(n)?"_":"";return o+e+i+(t||"")+r+l+s+"_"+a}(e,t,i,r,a,l,n,u),p=this.getCache(h);return p||(p=this.createItem(e,t,i,r,a,c,l,n,u),this.putCache(h,p)),p.listeners.addListener(o,s),{key:h,listener:o}},u.prototype.unsubscribe=function(e){var t=this.getCache(e.key);t&&t.listeners.removeListener(e.listener)}, u.prototype.removeUnused=function(){var e=[];for(var t in this.cache){if(this.cache[t])0===this.cache[t].listeners.listenersCount()&&e.push(t)}if(0!==e.length){for(var i=0;i=0;l--){var c=+a[l];if(o%c==0)return c+(r.isSeconds?"S":"")}return""}return o+(r.isSeconds?"S":"")},u.prototype.createItem=function(e,t,i,r,o,s,a,c,u){var p=new y,g=f(e);if(t=g.currencyCode||t,g.builder)return new m(p,g.symbol,t,i,r,g.builder,o,s,a);var v=h(i),S=this.rebuildFrom(v,h(r),o),b=d(o);if(!n.isEqual(v,S)||b){var w=o.has_empty_bars,P=Object.assign({},o);return b&&(P.has_empty_bars=!1,P.force_session_rebuild=!1),new m(p,g.symbol,t,i,S,new l(i,w),P,s,a,c,u)}var C=g.session&&"extended"!==g.session,x={currency:t};return new _(p,g.symbol,x,i,r,C,this.host,o,s,c,u)};var _=function(e,t,i,r,n,o,s,a,l,c,u){this.listeners=e,this.host=s;var d=this;this.host.resolve(t,i,(function(e){o&&e.regular_session&&(e.session=e.regular_session);var i=d.calculateFromTo(e,c||n||r,t,l,u);d.subs=d.host.subscribe(e,h(r),i,(function(e){d.listeners.fire(e)}),(function(e){d.listeners.onError(e)}))}),(function(e){d.listeners.onError(e)}))};_.prototype.stop=function(){this.subs&&this.host.unsubscribe(this.subs)},_.prototype.calculateFromTo=function(e,i,r,n,a){var l,c,u,h=s.parsePeriod(i),d=(new Date).valueOf(),p=e.expired&&t.cal_to_utc(t.get_timezone(e.timezone),new Date(1e3*e.expiration_date))||d;if(""===h.resolution)c=h.interval,u="D";else if("S"===h.resolution)c=10*h.interval,u="";else{c=12*("D"===h.resolution?1:"W"===h.resolution?5:30)*h.interval,u="M"}if(h.range)c=h.range.interval,u=h.range.resolution;else if(this.host.calculateHistoryDepth){var f=this.host.calculateHistoryDepth(i,u,c);f&&(c=f.intervalBack||c,u=void 0===f.resolutionBack?u:f.resolutionBack)}var _=e.sessionString||e.session;if(l=o.alignPeriodsBack(_,e.holidays,e.corrections,u,c,1,p),n&&n.getRangeExtensionTime){var m=n.getRangeExtensionTime();m&&(l=Math.min(1e3*m,l))}var y=Math.ceil(1.5*a);return n&&n.getRangeExtensionCount&&(y+=n.getRangeExtensionCount()),y>0&&(l=o.alignPeriodsBack(_,e.holidays,e.corrections,h.resolution,h.interval,y,l)),{from:l,to:p+6e4}};var m=function(e,t,i,r,n,o,s,l,c,u,h){if(this.listeners=e,this.isRecalculated=!1,""===n)return console.error("unsupported resolution for rebuild: "+r),void this.listeners.onError("unsupported resolution for rebuild: "+r);this.symbolInfo=s ;var d=this;this.engine=new a({tickerid:t,currencyCode:i,period:n,periodBase:r,body:o,sessionId:c,symbolInfo:s,rangeExtension:l,periodForInitialRange:u,additionalBarsCount:h,recalc:function(e,t){d._recalc(t)},out:function(e,t){d._out(e,t)},nonseriesOut:function(e,t){d._nonseriesOut(e,t)},setNoMoreData:function(){d.barset&&(d.barset.endOfData=!0)},onErrorCallback:function(e){d.listeners.onError(e)}})};m.prototype.stop=function(){this.engine?this.engine.stop():console.error("Internal library error 0x1")},m.prototype._recalc=function(e){this.isRecalculated&&console.error("recalc called twice!"),this.barset||(this.barset=new c(this.symbolInfo)),e&&(this.barset.nextTime=e.nextTime,this.barset.endOfData=e.endOfData),this.listeners.fire(this.barset),this.isRecalculated=!0},m.prototype._nonseriesOut=function(e,t){var i=Object.assign({},t);i.nonseries=!0,i.data=t.bars,delete i.bars,i.barsetSize=this.barset?this.barset.count():0,i.lastBar=this.barset?this.barset.bar(this.barset.count()-1):null,this.listeners.fire(i,!0)},m.prototype._out=function(e,t){var i=t[0];if(!isNaN(i)){var r={time:i,open:t[1],high:t[2],low:t[3],close:t[4],volume:t[5],updatetime:t[6]},n=t[7];this.barset||(this.barset=new c(e.info));var o=t[8];if(o instanceof Array)for(var s=0;s=1;--t){var r=this._ticker.slice(0,t);if(e(r)){this._root=r,this._contract=this._ticker.slice(t);break}}},m.prototype.exchange=function(e){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._exchange;null==e?delete this._exchange:this._exchange=e+""},m.prototype.ticker=function(e){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._ticker;null==e?delete this._ticker:this._ticker=e+"",delete this._root,delete this._contract},m.prototype.root=function(e){if(this.hasOwnProperty("_root")||this.parseAsFutures(),!(arguments.length>0))return this._root;null==e?delete this._root:(this._root=e+"",this._root&&(this._ticker=this._root+(this._contract||"")))},m.prototype.contract=function(e){if(this.hasOwnProperty("_contract")||this.parseAsFutures(),!(arguments.length>0))return this._root;null==e?delete this._contract:(this._contract=e+"",this._root&&(this._ticker=this._root+this._contract))},r(y,n),y.prototype.toString=function(){return this.hasOwnProperty("_normalizedValue")?this._normalizedValue:this.value},y.prototype.parse=function(){this._normalizedValue=this.value.replace(/^0+|\.0*$/g,"").replace(/(\.\d*?)0+$/,"$1").replace(/^(\.|$)/,"0$1")},g.prototype.toString=function(){return this.value},r(v,m),v.prototype.isIncomplete=!0,v.prototype.incompleteSuggest=function(){if("'"!==this.value)return String("'")},r(S,y),S.prototype.isIncomplete=!0;var b=new RegExp(e.map((function(e){return"("+("string"==typeof e.pattern?e.pattern.replace(/[\^\$\(\)\[\]\{\}\*\+\?\|\\]/g,"\\$&"):e.pattern.source)+")"})).concat(".").join("|"),"g");function w(t,i){var r,n=[];e:for(;r=b.exec(t);){for(var s=e.length;s--;)if(r[s+1]){if(e[s].ctor){var a=new e[s].ctor(r[s+1]);a._offset=r.index,n.push(a)}continue e}var l=new g(r[0]);l._offset=r.index,n.push(l)}if(i&&i.recover){var c;for(s=n.length;s--;){var u=n[s];if(u instanceof y||u instanceof m){if(void 0!==c){var h=new m(""),d=n.splice(s,c-s+1,h);h.value=d.map((function(e){return e.value})).join("")}c=s}else u instanceof o||(c=void 0)}}return n}function P(e){ for(var t=[],i=0;io.precedence&&(r[r.length-1].minPrecedence=o.precedence);else if(o instanceof s)r.push(t={minPrecedence:1/0,openBraceIndex:n});else if(o instanceof a){var c=e[(t=r.pop()).openBraceIndex-1],u=e[n+1];u instanceof l&&!(u.precedence<=t.minPrecedence)||!(!(c instanceof l)||c.precedencet.minPrecedence&&(r[r.length-1].minPrecedence=t.minPrecedence))}}for(n=i.length;n--;)e.splice(i[n],1);return e}function x(e){if("string"!=typeof e)throw new TypeError("expression must be a string");return(e=w(e)).filter((function(e){return e instanceof m})).map((function(e){return e.exchange()})).filter((function(e){return e}))}function T(e){return 1!==(e=x(e)).length?null:e[0]}function L(e,t){return(e=x(e)).some((function(e){return t.includes((e||"").toUpperCase())}))}function I(e){return e.join("")}return{tokenize:w,validate:function(e){if(t.enabled("charting_library_base"))return{currentState:"var"};for(var i="init",r={warnings:[],errors:[],isEmpty:!0},n=[],c=0;ct[t.length-1].time+i)return null;var r=t[Object(a.lowerbound)(t,e.x-i,(function(e,t){return e.timer.time+i)return null;var n=Object(l.selectionTolerance)(this._barWidth),o=Math.min(r.high,r.low),s=Math.max(r.high,r.low),u=this._data.fontSize;return o-n-u<=e.y&&e.y<=o+n||s-n<=e.y&&e.y<=s+n+u?new c.HitTestResult(c.HitTestResult.REGULAR):null},t.prototype._drawImpl=function(e){if(null!==this._data&&null!==this._barWidth){e.save(),e.translate(.5,.5),e.textAlign="center",e.fillStyle=this._data.labelColor,e.font=Object(o.makeFont)(this._data.fontSize,this._data.font);for(var t=this._data.bars,i=this._data.inverted,r=0;r5},t.prototype._getLabelWidth=function(e){return this._widthsCache.measureText(this._context,e)},t}(s.SeriesBarCandlesPaneView)},"9QkW":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 Wedge");function c(){o.call(this)}function u(e,t){this._constructor="LineToolFibSpeedResistanceArcs";var n=t||u.createProperties();r.call(this,e,n),e._fibWedgeLabelsCache||(e._fibWedgeLabelsCache=new c),i.e("lt-pane-views").then(function(e){var t=i("1SUO").FibWedgePaneView;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.isSynchronizable=function(){return!1},u.prototype.levelsCount=function(){return u.LevelsCount},u.prototype.getCache=function(){return this._model._fibWedgeLabelsCache||(this._model._fibWedgeLabelsCache=new c),this._model._fibWedgeLabelsCache},u.prototype.pointsCount=function(){return 3},u.prototype.translatedType=function(){return l},u.prototype.name=function(){return"Fib Wedge"},u.prototype.hasEditableCoordinates=function(){return!1},u.prototype.setPoint=function(e,t){if(r.prototype.setPoint.call(this,e,t),!this._recursiveGuard){if(this._recursiveGuard=!0,2===e){var i=this.pointToScreenPoint(this._points[0])[0],n=this.pointToScreenPoint(this._points[1])[0],o=(l=this.pointToScreenPoint(this._points[2])[0]).subtract(i).length(),s=n.subtract(i).normalized();n=i.add(s.scaled(o));var a=this.screenPointToPoint(n);this._properties.points[1].price.setValue(a.price),this._properties.points[1].bar.setValue(a.index)}else{i=this.pointToScreenPoint(this._points[0])[0],n=this.pointToScreenPoint(this._points[1])[0] ;var l=this.pointToScreenPoint(this._points[2])[0],c=n.subtract(i).length();s=l.subtract(i).normalized();l=i.add(s.scaled(c));a=this.screenPointToPoint(l);this._properties.points[2].price.setValue(a.price),this._properties.points[2].bar.setValue(a.index)}this._recursiveGuard=!1}},u.prototype.addPoint=function(e){if(2===this._points.length){var t=this.pointToScreenPoint(this._points[0])[0],i=this.pointToScreenPoint(this._points[1])[0],n=this.pointToScreenPoint(e)[0],o=i.subtract(t).length(),s=n.subtract(t).normalized();n=t.add(s.scaled(o));var a=this.ownerSource().firstValue(),l=this.priceScale().coordinateToPrice(n.y,a);e={index:Math.round(this._model.timeScale().coordinateToIndex(n.x)),price:l}}return r.prototype.addPoint.call(this,e)},u.prototype.processErase=function(e,t){var i="level"+t,r=this.properties()[i].visible;e.setProperty(r,!1,"Erase level line")},u.prototype.getInputsPropertyPage=function(){return null},u.prototype.getStylesPropertyPage=function(){return s.LineToolFibWedgeStylesPropertyPage},u.createProperties=function(e){var t=new n("linetoolfibwedge",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("6mGk").FibWedgeDefinitionsViewModel}.bind(null,i)).catch(i.oe)},u._configureProperties=function(e){r._configureProperties(e)},t.LineToolFibWedge=u},"9dnG":function(e,t){e.exports=''},"9iCb":function(e,t,i){"use strict";i.r(t),i.d(t,"applyOverridesToStudy",(function(){return u})),i.d(t,"applyOverridesToStudyDefaults",(function(){return h}));var r,n,o=i("Eyy1"),s=i("23IT"),a=i("uOxu"),l=Object(a.getLogger)("Chart.Model.StudyPropertiesOverrider");function c(e,t,i,o){var s=i.split(".");if(0!==s.length&&0!==s[0].length){var a,c,u=(a=s[0],{name:(c=a.split(":"))[0],type:2===c.length?c[1]:null}),h=u.name,d=u.type,p=null!==d,f=!p||"band"===d,_=!p||"area"===d,m=!p||"input"===d,y=!p||"plot"===d?n.getPlotIdByTitle(e,h):null,g=f?n.getBandIndexByName(e,h):null,v=_?n.getFilledAreaIdByTitle(e,h):null,S=m?n.getInputByName(e,h):null,b=t.hasOwnProperty(h);if((null!==y?1:0)+(null!==g?1:0)+(null!==v?1:0)+(null!==S?1:0)+(b?1:0)>1)l.logWarn("Study '"+e.description+"' has ambiguous identifier '"+h+"'");else{var w=s[1];if(null!==y){if(1===s.length)return void l.logWarn("Path of sub-property of '"+h+"' plot for study '"+e.description+"' must be not empty");var P=s.slice(1);r.applyPlotProperty(e,t,y,P,o)}else if(null!==S)r.applyInputValue(t,S,o);else if(null!==g){if(void 0===w)return void l.logWarn("Property name of '"+h+"' band for study '"+e.description+"' must be set");r.applyBandProperty(t,g,w,o)}else if(null!==v){if(void 0===w)return void l.logWarn("Property name of '"+h+"' area for study '"+e.description+"' must be set") ;r.applyFilledAreaProperty(t,v,w,o)}else b?r.setRootProperty(t,s,o):l.logWarn("Study '"+e.description+"' has no plot or input '"+h+"'")}}}function u(e,t){var i=e.properties(),r=i.state();for(var n in t)t.hasOwnProperty(n)&&c(e.metaInfo(),r,n,t[n]);i.mergeAndFire(r)}function h(e,t,i){for(var r in e)if(e.hasOwnProperty(r)){var o=r.indexOf(".");if(-1!==o){var s=r.substr(0,o),a=n.getMetaInfoByDescription(t,s);if(null!==a){var u=i(a);null!==u?c(a,u,r.substr(o+1),e[r]):l.logWarn("Cannot apply overrides for study "+s)}else l.logWarn("There is no such study "+s)}}}!function(e){var t={line:s.LineStudyPlotStyle.Line,histogram:s.LineStudyPlotStyle.Histogram,cross:s.LineStudyPlotStyle.Cross,area:s.LineStudyPlotStyle.Area,columns:s.LineStudyPlotStyle.Columns,circles:s.LineStudyPlotStyle.Circles,line_with_breaks:s.LineStudyPlotStyle.LineWithBreaks,area_with_breaks:s.LineStudyPlotStyle.AreaWithBreaks};e.applyPlotProperty=function(e,i,r,n,a){if(void 0!==i.styles){var c=n[0];if("color"!==c){var u=i.styles[r];if(void 0!==u&&u.hasOwnProperty(c)){if("plottype"===c){var h=t[String(a)];if(void 0===h)return void l.logWarn("Unsupported plot type for plot: "+a);a=h}u[c]=a}else l.logWarn("Study plot does not have property '"+c+"'")}else{!function(e,t,i,r,n){if(void 0!==e.styles)if(null===t&&!isNaN(r)&&r>0)l.logWarn("Study plot does not have color #"+r);else{if(0===r||isNaN(r))Object(o.ensureDefined)(e.styles[i]).color=String(n),r=0;null!==t&&(Object(o.ensureDefined)(t.colors[r]).color=String(n))}else l.logWarn("Study does not have styles")}(i,function(e,t,i){if(void 0===e.plots)return null;for(var r=0,n=e.plots;r1?parseInt(n[1]):NaN,a)}}else l.logWarn("Study does not have styles")},e.applyBandProperty=function(e,i,r,n){if(void 0!==e.bands){var o=e.bands[i];if(void 0!==o&&o.hasOwnProperty(r)){if("plottype"===r){var s=t[String(n)];if(void 0===s)return void l.logWarn("Unsupported plot type for band: "+n);n=s}o[r]=n}else l.logWarn("Study band does not have property '"+r+"'")}else l.logWarn("Study does not have bands")},e.applyFilledAreaProperty=function(e,t,i,r){if(void 0!==e.filledAreasStyle){var n=e.filledAreasStyle[t];void 0!==n&&n.hasOwnProperty(i)?n[i]=r:l.logWarn("Study area does not have property '"+i+"'")}else l.logWarn("Study does not have areas")},e.applyInputValue=function(e,t,i){void 0!==e.inputs&&e.inputs.hasOwnProperty(t)?e.inputs[t]=i:l.logWarn("Study does not have input '"+t+"'")},e.setRootProperty=function(e,t,i){if(0!==t.length){for(var r=e,n=0,o=t.slice(0,-1);n=this.chartsCount())throw Error("Incorrect index: "+e);return this._getChartWidgetApi(this._chartWidgetCollection.getAll()[e])},S.prototype.getSymbolInterval=function(e){var t={symbol:n.symbol.value(),interval:n.interval.value()};return e&&e(t),t},S.prototype.saveChart=function(e){var t=this;this._saveChartService.whenReadyToSave((function(){var i=t._saveChartService.saveToJSON();return e&&e(JSON.parse(i.content))}))},S.prototype.loadChart=function(e){this._chartApiInstance.disconnect(),this._chartWidgetCollection.loadContent(e.json),this._chartWidgetCollection.purgeUnusedWidgets(),e.extendedData&&(this._chartWidgetCollection.metaInfo.id.setValue(e.extendedData.uid),this._chartWidgetCollection.metaInfo.uid.setValue(e.extendedData.uid),this._chartWidgetCollection.metaInfo.name.setValue(e.extendedData.name)),this._chartApiInstance.connect(),n.symbol.setValue(this.activeChart().symbol()),a.emit("chart_loaded")},S.prototype.getStudiesList=function(){return this._chartApiInstance.allStudiesMetadata().filter((function(e){return!e.is_hidden_study})).map((function(e){return e.description}))},S.prototype.getSavedCharts=function(e){h.getCharts(e)},S.prototype.loadChartFromServer=function(e){h.loadChart(e)},S.prototype.saveChartToServer=function(e,t,i){this._saveChartService.saveChartSilently(e,t,i)},S.prototype.removeChartFromServer=function(e,t){h.removeChart(e,t)},S.prototype.getIntervals=function(){var e=[],t=u.getCustomResolutions();return null!==this._chartApiInstance&&(e=this._chartApiInstance.defaultResolutions()),u.mergeResolutions(e,t)},S.prototype.closePopupsAndDialogs=function(){for(var e=document.querySelectorAll("._tv-dialog-title-close"),t=0;t0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0},c.prototype.setPrice=function(e){if(this._line.points().length>0){var t=this._line.points()[0];t.price=e,this._line._points[0]=t,this._line.normalizePoints(),this._line.updateAllViewsAndRedraw()}return this._line._timePoint.length>0&&(this._line._timePoint[0].price=e),this},c.prototype.getText=function(){return this._data.bodyText},c.prototype.setText=function(e){return this._data.bodyText=e||"",this._line.updateAllViewsAndRedraw(),this},c.prototype.setTooltip=function(e){return this._line.properties().tooltip.setValue(u(e)),this},c.prototype.getTooltip=function(){return this._line.properties().tooltip.value()},c.prototype.setModifyTooltip=function(e){return this._line.properties().modifyTooltip.setValue(u(e)),this},c.prototype.getModifyTooltip=function(){return this._line.properties().modifyTooltip.value()},c.prototype.setCancelTooltip=function(e){return this._line.properties().cancelTooltip.setValue(u(e)),this},c.prototype.getCancelTooltip=function(){return this._line.properties().cancelTooltip.value()},c.prototype.getQuantity=function(){return this._data.quantityText},c.prototype.setQuantity=function(e){return this._data.quantityText=e||"",this._line.updateAllViewsAndRedraw(),this},c.prototype.getExtendLeft=function(){var e=this._line.properties().extendLeft.value();return"inherit"===e?this._line._model.properties().tradingProperties.extendLeft.value():e},c.prototype.setExtendLeft=function(e){return this._line.properties().extendLeft.setValue(e),this},c.prototype.getLineLength=function(){var e=this._line.properties().lineLength.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineLength.value():e},c.prototype.setLineLength=function(e){return this._line.properties().lineLength.setValue(Math.max(0,Math.min(e,100))),this},c.prototype.getLineColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.lineActiveBuyColor.value():e.lineInactiveBuyColor.value():this._active?e.lineActiveSellColor.value():e.lineInactiveSellColor.value()},c.prototype.setLineColor=function(e){return"buy"===this._direction?this._active?this.setLineActiveBuyColor(e):this.setLineInactiveBuyColor(e):this._active?this.setLineActiveSellColor(e):this.setLineInactiveSellColor(e), this},c.prototype.setLineActiveBuyColor=function(e){return this._line.properties().lineActiveBuyColor.setValue(e),this},c.prototype.setLineInactiveBuyColor=function(e){return this._line.properties().lineInactiveBuyColor.setValue(e),this},c.prototype.setLineActiveSellColor=function(e){return this._line.properties().lineActiveSellColor.setValue(e),this},c.prototype.setLineInactiveSellColor=function(e){return this._line.properties().lineInactiveSellColor.setValue(e),this},c.prototype.getLineStyle=function(){var e=this._line.properties().lineStyle.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineStyle.value():e},c.prototype.setLineStyle=function(e){return this._line.properties().lineStyle.setValue(e),this},c.prototype.getLineWidth=function(){var e=this._line.properties().lineWidth.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineWidth.value():e},c.prototype.setLineWidth=function(e){return this._line.properties().lineWidth.setValue(e),this},c.prototype.getBodyBorderColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.bodyBorderActiveBuyColor.value():e.bodyBorderInactiveBuyColor.value():this._active?e.bodyBorderActiveSellColor.value():e.bodyBorderInactiveSellColor.value()},c.prototype.setBodyBorderColor=function(e){return"buy"===this._direction?this._active?this.setBodyBorderActiveBuyColor(e):this.setBodyBorderInactiveBuyColor(e):this._active?this.setBodyBorderActiveSellColor(e):this.setBodyBorderInactiveSellColor(e),this},c.prototype.setBodyBorderActiveBuyColor=function(e){return this._line.properties().bodyBorderActiveBuyColor.setValue(e),this},c.prototype.setBodyBorderInactiveBuyColor=function(e){return this._line.properties().bodyBorderInactiveBuyColor.setValue(e),this},c.prototype.setBodyBorderActiveSellColor=function(e){return this._line.properties().bodyBorderActiveSellColor.setValue(e),this},c.prototype.setBodyBorderInactiveSellColor=function(e){return this._line.properties().bodyBorderInactiveSellColor.setValue(e),this},c.prototype.getBodyBackgroundColor=function(){return o.getColorFromProperties(this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency)},c.prototype.setBodyBackgroundColor=function(e){return o.setColorToProperties(e,this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency),this},c.prototype.getBodyTextColor=function(){var e=this._line.properties();return"limit"===this._mode?this._active?e.bodyTextActiveLimitColor.value():e.bodyTextInactiveLimitColor.value():"stop"===this._mode?this._active?e.bodyTextActiveStopColor.value():e.bodyTextInactiveStopColor.value():"buy"===this._direction?this._active?e.bodyTextActiveBuyColor.value():e.bodyTextInactiveBuyColor.value():this._active?e.bodyTextActiveSellColor.value():e.bodyTextInactiveSellColor.value()},c.prototype.setBodyTextColor=function(e){ return"limit"===this._mode?this._active?this.setBodyTextActiveLimitColor(e):this.setBodyTextInactiveLimitColor(e):"stop"===this._mode?this._active?this.setBodyTextActiveStopColor(e):this.setBodyTextInactiveStopColor(e):"buy"===this._direction?this._active?this.setBodyTextActiveBuyColor(e):this.setBodyTextInactiveBuyColor(e):this._active?this.setBodyTextActiveSellColor(e):this.setBodyTextInactiveSellColor(e),this},c.prototype.setBodyTextInactiveLimitColor=function(e){return this._line.properties().bodyTextInactiveLimitColor.setValue(e),this},c.prototype.setBodyTextActiveLimitColor=function(e){return this._line.properties().bodyTextActiveLimitColor.setValue(e),this},c.prototype.setBodyTextInactiveStopColor=function(e){return this._line.properties().bodyTextInactiveStopColor.setValue(e),this},c.prototype.setBodyTextActiveStopColor=function(e){return this._line.properties().bodyTextActiveStopColor.setValue(e),this},c.prototype.setBodyTextInactiveBuyColor=function(e){return this._line.properties().bodyTextInactiveBuyColor.setValue(e),this},c.prototype.setBodyTextActiveBuyColor=function(e){return this._line.properties().bodyTextActiveBuyColor.setValue(e),this},c.prototype.setBodyTextInactiveSellColor=function(e){return this._line.properties().bodyTextInactiveSellColor.setValue(e),this},c.prototype.setBodyTextActiveSellColor=function(e){return this._line.properties().bodyTextActiveSellColor.setValue(e),this},c.prototype.getBodyFont=function(){return o.getFontFromProperties(this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic)},c.prototype.setBodyFont=function(e){return o.setFontToProperties(e,this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic),this},c.prototype.getQuantityBorderColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.quantityBorderActiveBuyColor.value():e.quantityBorderInactiveBuyColor.value():this._active?e.quantityBorderActiveSellColor.value():e.quantityBorderInactiveSellColor.value()},c.prototype.setQuantityBorderColor=function(e){return"buy"===this._direction?this._active?this.setQuantityBorderActiveBuyColor(e):this.setQuantityBorderInactiveBuyColor(e):this._active?this.setQuantityBorderActiveSellColor(e):this.setQuantityBorderInactiveSellColor(e),this},c.prototype.setQuantityBorderActiveBuyColor=function(e){return this._line.properties().quantityBorderActiveBuyColor.setValue(e),this},c.prototype.setQuantityBorderInactiveBuyColor=function(e){return this._line.properties().quantityBorderInactiveBuyColor.setValue(e),this},c.prototype.setQuantityBorderActiveSellColor=function(e){return this._line.properties().quantityBorderActiveSellColor.setValue(e),this},c.prototype.setQuantityBorderInactiveSellColor=function(e){return this._line.properties().quantityBorderInactiveSellColor.setValue(e),this},c.prototype.getQuantityBackgroundColor=function(){var e=this._line.properties() ;return"buy"===this._direction?this._active?e.quantityBackgroundActiveBuyColor.value():e.quantityBackgroundInactiveBuyColor.value():this._active?e.quantityBackgroundActiveSellColor.value():e.quantityBackgroundInactiveSellColor.value()},c.prototype.setQuantityBackgroundColor=function(e){return"buy"===this._direction?this._active?this.setQuantityBackgroundActiveBuyColor(e):this.setQuantityBackgroundInactiveBuyColor(e):this._active?this.setQuantityBackgroundActiveSellColor(e):this.setQuantityBackgroundInactiveSellColor(e),this},c.prototype.setQuantityBackgroundActiveBuyColor=function(e){return this._line.properties().quantityBackgroundActiveBuyColor.setValue(e),this},c.prototype.setQuantityBackgroundInactiveBuyColor=function(e){return this._line.properties().quantityBackgroundInactiveBuyColor.setValue(e),this},c.prototype.setQuantityBackgroundActiveSellColor=function(e){return this._line.properties().quantityBackgroundActiveSellColor.setValue(e),this},c.prototype.setQuantityBackgroundInactiveSellColor=function(e){return this._line.properties().quantityBackgroundInactiveSellColor.setValue(e),this},c.prototype.getQuantityTextColor=function(){return o.getColorFromProperties(this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency)},c.prototype.setQuantityTextColor=function(e){return o.setColorToProperties(e,this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency),this},c.prototype.getQuantityFont=function(){return o.getFontFromProperties(this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic)},c.prototype.setQuantityFont=function(e){return o.setFontToProperties(e,this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic),this},c.prototype.getCancelButtonBorderColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.cancelButtonBorderActiveBuyColor.value():e.cancelButtonBorderInactiveBuyColor.value():this._active?e.cancelButtonBorderActiveSellColor.value():e.cancelButtonBorderInactiveSellColor.value()},c.prototype.setCancelButtonBorderColor=function(e){return"buy"===this._direction?this._active?this.setCancelButtonBorderActiveBuyColor(e):this.setCancelButtonBorderInactiveBuyColor(e):this._active?this.setCancelButtonBorderActiveSellColor(e):this.setCancelButtonBorderInactiveSellColor(e),this},c.prototype.setCancelButtonBorderActiveBuyColor=function(e){return this._line.properties().cancelButtonBorderActiveBuyColor.setValue(e),this},c.prototype.setCancelButtonBorderInactiveBuyColor=function(e){return this._line.properties().cancelButtonBorderInactiveBuyColor.setValue(e),this},c.prototype.setCancelButtonBorderActiveSellColor=function(e){return this._line.properties().cancelButtonBorderActiveSellColor.setValue(e),this},c.prototype.setCancelButtonBorderInactiveSellColor=function(e){ return this._line.properties().cancelButtonBorderInactiveSellColor.setValue(e),this},c.prototype.getCancelButtonBackgroundColor=function(){return o.getColorFromProperties(this._line.properties().cancelButtonBackgroundColor,this._line.properties().cancelButtonBackgroundTransparency)},c.prototype.setCancelButtonBackgroundColor=function(e){return o.setColorToProperties(e,this._line.properties().cancelButtonBackgroundColor,this._line.properties().cancelButtonBackgroundTransparency),this},c.prototype.getCancelButtonIconColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.cancelButtonIconActiveBuyColor.value():e.cancelButtonIconInactiveBuyColor.value():this._active?e.cancelButtonIconActiveSellColor.value():e.cancelButtonIconInactiveSellColor.value()},c.prototype.setCancelButtonIconColor=function(e){return"buy"===this._direction?this._active?this.setCancelButtonIconActiveBuyColor(e):this.setCancelButtonIconInactiveBuyColor(e):this._active?this.setCancelButtonIconActiveSellColor(e):this.setCancelButtonIconInactiveSellColor(e),this},c.prototype.setCancelButtonIconActiveBuyColor=function(e){return this._line.properties().cancelButtonIconActiveBuyColor.setValue(e),this},c.prototype.setCancelButtonIconInactiveBuyColor=function(e){return this._line.properties().cancelButtonIconInactiveBuyColor.setValue(e),this},c.prototype.setCancelButtonIconActiveSellColor=function(e){return this._line.properties().cancelButtonIconActiveSellColor.setValue(e),this},c.prototype.setCancelButtonIconInactiveSellColor=function(e){return this._line.properties().cancelButtonIconInactiveSellColor.setValue(e),this},c.prototype.block=function(){this._blocked=!0,this._line.updateAllViewsAndRedraw()},c.prototype.unblock=function(){this._blocked=!1,this._line.updateAllViewsAndRedraw()},c.prototype.isFunction=function(e){return"function"==typeof e},c.prototype.onCancel=function(e,t){return t?this.isFunction(t)&&(this._onCancelData=e,this._onCancelCallback=t):this.isFunction(e)&&(this._onCancelCallback=e),this},c.prototype.callOnCancel=function(){this.isFunction(this._onCancelCallback)&&this._onCancelCallback.call(this,this._onCancelData)},c.prototype.isOnCancelCallbackPresent=function(){return this.isFunction(this._onCancelCallback)},c.prototype.onModify=function(e,t){return t?this.isFunction(t)&&(this._onModifyData=e,this._onModifyCallback=t):this.isFunction(e)&&(this._onModifyCallback=e),this},c.prototype.callOnModify=function(){this.isFunction(this._onModifyCallback)&&this._onModifyCallback.call(this,this._onModifyData)},c.prototype.onMove=function(e,t){return t?this.isFunction(t)&&(this._onMoveData=e,this._onMoveCallback=t):this.isFunction(e)&&(this._onMoveCallback=e),this},c.prototype.callOnMove=function(){this.isFunction(this._onMoveCallback)&&this._onMoveCallback.call(this,this._onMoveData)},c.prototype.onContextMenu=function(e,t){return t?this.isFunction(t)&&(this._onContextMenuData=e,this._onContextMenuCallback=t):this.isFunction(e)&&(this._onContextMenuCallback=e),this}, c.prototype.shouldShowContextMenu=function(){return this.isFunction(this._onContextMenuCallback)},c.prototype.callOnContextMenu=function(){if(this.isFunction(this._onContextMenuCallback))return this._onContextMenuCallback.call(this,this._onContextMenuData)},c.prototype.remove=function(){this._line._model.removeSource(this._line),delete this._line},inherit(h,r),h.prototype.zorder=function(){return l},h.prototype.setPoint=function(e,t,i){this._points[e]=t,this.normalizePoints()},h.prototype.addPoint=function(e,t){return this._points.push(e),this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0},h.prototype.translatedType=function(){return"Order"},h.prototype.name=function(){return"Order"},h.prototype.endMoving=function(e){var t=this._startMovingPoint&&this._currentMovingPoint&&this._startMovingPoint.price!==this._currentMovingPoint.price;r.prototype.endMoving.call(this),!e&&t&&this._adapter.callOnMove()},h.prototype.createPriceAxisView=function(e){var t={pointIndex:e,backgroundPropertyGetter:this._adapter.getLineColor.bind(this._adapter)};return this._priceAxisView=new n(this,t),this._priceAxisView},h.prototype.paneViews=function(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showOrders.value()?s.prototype.paneViews.call(this):null},h.prototype.priceAxisViews=function(t,i){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showOrders.value()?s.prototype.priceAxisViews.call(this,t,i):null},h.prototype.hasContextMenu=function(){return this._adapter.shouldShowContextMenu()},h.prototype.contextMenuItems=function(){return this._adapter.callOnContextMenu()},h.prototype.onlyYMoving=function(){return!0},h.prototype.movable=function(){return Boolean(this._adapter._onMoveCallback)},h.createProperties=function(e){var t=new a("linetoolorder",e,!1,!1);return h._configureProperties(t),t},h._configureProperties=function(e){r._configureProperties(e)},t.LineToolOrder=h}).call(this,i("Kxc7"))},B8p3:function(e,t,i){"use strict";i.r(t),i.d(t,"setHandler",(function(){return a}));var r=i("Eyy1"),n=null,o=-1/0,s="";function a(e){null!==e?(null===n&&document.addEventListener("keydown",l),n=e):(n=null,document.removeEventListener("keydown",l))}function l(e){if(!e.defaultPrevented){var t=e.ctrlKey||e.metaKey||e.altKey;"Shift"!==e.key||t||e.repeat?(s="",o=-1/0):e.timeStamp-o<350&&s===e.code?(e.preventDefault(),s="",o=-1/0,Object(r.ensureNotNull)(n)()):(o=e.timeStamp,s=e.code)}}},BBCR:function(e,t){e.exports=''},BHQF:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetch=function(e,t){return window.fetch(e,t)};(0,i("uOxu").getLogger)("Fetch")}, BOPY:function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("f6yo").pointInCircle,o=i("VdBB").HitTestResult,s=i("zDbI").CHART_FONT_FAMILY,a=i("cPgM").ScaledPaneRenderer;function l(e,t){this.source=e,this._rendererFactory=t}function c(e,t){a.call(this),this._barWidth=e.barWidth,this._plates=e.plates,this._tooltip=e.tooltip,this._model=t}function u(){this._layout=[],this._currentId=void 0,this.tooltipHovered=!1}l.prototype.update=function(){},l.prototype.renderer=function(e,t){return this._rendererFactory(this.source)},inherit(c,a),c.prototype._drawImpl=function(e){e.save();for(var t=0;t6&&(e.textAlign="center",e.textBaseline="middle",e.font="bold "+t.labelFontSize+"px "+s,e.fillStyle=t.labelFontColor,e.fillText(t.label,t.x,t.y))},c.prototype.hitTest=function(e){ for(var t,i=this._plates.length-1;i>=0;--i)if(t=this._hitTestDot(this._plates[i],e))return t;return null},c.prototype._hitTestDot=function(e,t){var i=this._dotTransform(e),s=new r(i.x,i.y);return n(t,s,Math.max(i.radius,8))?new o(o.REGULAR,e):null},u.prototype._createLayout=function(){throw new Error("Child class must override this member")},u.prototype._updatePlate=function(e){throw new Error("Child class must override this member")},u.prototype._getContainer=function(e){return this._container&&this._context===e||(this._context=e,this._container=$(e.canvas).parent()),this._container},u.prototype._plateArrowSize=14,u.prototype.showPlate=function(e,t){if(this._currentId!==e.id||!this._layout||0===this._layout.length||null==this._layout[0].parentNode){this._currentId=e.id,this._createLayout(),this._getContainer(t).append(this._layout);var i=this;this._layout.hover((function(){i.tooltipHovered=!0,$(this).stop(!0).fadeTo(0,1)}),(function(){i.tooltipHovered=!1}))}var r=Math.round(e.barWidth/2);r>15&&(r=15),r<10&&(r=10),this._updatePlate(e);var n=t.canvas.getBoundingClientRect(),o=e.x-this._layout.outerWidth()]+(>|$)/g,"")}function n(e){var t=/([^&=]+)=?([^&]*)/g,i={};if(!e)return i;for(var n=t.exec(e);n;)i[r(n[1])]=r(n[2]),n=t.exec(e);return i}i.d(t,"a",(function(){return a}));var o=["mobileapp","mobileapp_new"];function s(e){if(0===location.search.length)return e;var t=n(window.location.search.substring(1));return o.forEach((function(i){void 0!==t[i]&&(e[i]=t[i])})),e}function a(e,t,i){void 0===e&&(e={}),void 0===t&&(t=""),void 0===i&&(i=!0);var r="/chart/";e.chartId&&(r=""+r+e.chartId+"/",delete e.chartId),i&&(e=s(e));var n=function(e){var t=[];for(var i in e)e.hasOwnProperty(i)&&null!=e[i]&&t.push({key:i,pair:encodeURIComponent(i)+"="+encodeURIComponent(e[i])});return t.sort((function(e,t){return e.key>t.key?1:e.key]+)>)/gi,""):e},TradingView.encodeSpread=function(e){return encodeURIComponent(e)},TradingView.clean=function(e,t,i){var r=[["&","&"],["<","<"],[">",">"],['"',"""],["'","'"],["'","'"]],n=e;if(!e||!e.replace)return n;for(var o=0;o'},Daqx:function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var r=["Z","Y","X","W","V","U","T","S"],n=["A","B","C","D","E","F","G","H"],o=function(){function e(e){this.label=e}return e.prototype.equals=function(e){return null!==e&&this.label===e.label},e}();function s(e,t){var i="left"===e?r:n;return new o(t=0&&o.setLastBarClosed(!1)}r(o)}}(e,i,o),s)},unsubscribe:function(e){return t._cachedDatafeed.unsubscribe(e)},calculateHistoryDepth:this._externalDatafeed.calculateHistoryDepth?this._externalDatafeed.calculateHistoryDepth.bind(this._externalDatafeed):void 0})};function y(e,t){null!=e.graphicsCmds&&null!=e.graphicsCmds.create&&null!=e.graphicsCmds.create.vertlines&&e.graphicsCmds.create.vertlines.forEach((function(e){e.data.forEach(t)}))}function g(e,t){for(var i=e.length,r=t.length,n=0,o=0;o=r?e[o]=t[r-1].index:e[o]=t[n].index}}m.createDWMAligner=function(e,t){return c.isDWM(e)?l.createAligner(e,t,!0):null},m.prototype._barsCoefficients=function(e,t){if(void 0===o.parseSymbol(e).type)return{};var i=e+t;return this._barsCoefficientsCache[i]||(this._barsCoefficientsCache[i]={}),this._barsCoefficientsCache[i]},m.prototype.destroy=function(){this._cachedDatafeed.destroy(),this._externalDatafeed=null,this._pointsetsManager.pointsetsCreated().unsubscribeAll(this)},m.prototype.purgeCache=function(){this._endOfData={},this._resolveRequests={},this._sessionsLastDataCache={},this._studiesCache={}},m.prototype.purgeDataCache=function(){this._cachedDatafeed.purgeCache()},m.prototype._logMessage=function(e){t.enabled("charting_library_debug_mode")&&console.log(e)},m.prototype._extendRange=function(e,t){this._rangeExtensionData[e]||this.purgeRangeExtensionData(e),void 0===this._rangeExtensionData[e].summary&&(this._rangeExtensionData[e].summary=0),this._rangeExtensionData[e].summary+=t},m.prototype.on=function(e,t){return this._callbacks.hasOwnProperty(e)||(this._callbacks[e]=[]),this._callbacks[e].push(t),this},m.prototype._fireEvent=function(e,t,i){if(this._callbacks.hasOwnProperty(e)){for(var r=this._callbacks[e],n=0;nm[a].value[0];l?m.push({index:_(r),value:[r].concat(n)}):m[a].value=[r].concat(n),p||u([m[m.length-1]],l,m.length,y,i)}(e,t,l)}, nonseriesOut:function(e,t){d(t,l)},setNoMoreData:function(){v=!0},recalc:function(e,i){p=!1,m.endOfData=v,t.error&&null!==t.error()||c(m,g>0?y:void 0,l,i)}});if(!S._studiesCache[e]||!S._studiesCache[e][o])throw Error("This should never happen");S._studiesCache[e][o].engine=f}catch(b){if(!b.studyError)throw b;h(b.message)}else h("Unsupported resolution. Did you forget to set has_intraday to true?")},w=function(e){h(e)},P=function(){return S._studiesCache[e]&&S._studiesCache[e][o]&&S._studiesCache[e][o].activeResolve===f};S._studiesCache[e][o].activeResolve=f,this.resolveSymbol(i,(function(){P()&&b.apply(S,arguments)}),(function(){P()&&w.apply(S,arguments)}))},m.prototype._createStudy=function(e,t,i,r,n,o,s){var a=this;function l(i,s,l){i=_(i),TradingView.ChartapiMessagerInstances[r].onDataUpdate(n,o,a._convertBarsTimeToUnix(i),s,l,a._extendedRange(e,t)),TradingView.ChartapiMessagerInstances[r].onStudyCompleted(n,o)}s=function(e){if(Array.isArray(e))return e;for(var t=[],i=a._studiesCache[r][n].metainfo.inputs,o=0;o0?1e3*p[0].value[0]:void 0;if(c.nextTime&&(!f||c.nextTime=0&&l&&e.lastBar){for(var c=[],d=0;d<=a;d++)c.push(n+.001*d);var p=e.lastBar.slice(0);p[0]=p[0]/1e3,TradingView.ChartapiMessagerInstances[r].onTimescaleUpdate(o,s,[{index:l-1,value:p}],t,l-1,c);var f=l+a,_=1e3*Math.trunc(c[a]);h(t,f,_),u.rebuildExtrapolatedData(r,t.full_name,i,t,_)}u._updateProjectionData(r,o,s,e)}))},m.prototype.onMoreTickmarksRequested=function(e,t,i,r,n){this._extrapolationManager.storage(e,i.full_name,r).onTickmarksNeeded(i,n)},m.prototype.removePointset=function(e){this._pointsetsManager.removePointset(e)},m.prototype.rebuildExtrapolatedData=function(e,t,i,r,n){this._extrapolationManager.storage(e,r.full_name,i).rebuild(n,r)},m.prototype.createPointset=function(e,t,i,r,n,o){var s=this._extrapolationManager.storage(e,r.full_name,n);this._pointsetsManager.createPointset(t,i,o,s,r,e)},m.prototype.studiesMetadata=function(){return 0===this._metainfoCache.length&&(this._metainfoCache=JSServer.studyLibrary.map((function(e){return e.metainfo})),this._metainfoCache.push({palettes:{},inputs:[],plots:[{id:"open",type:"line"},{id:"high",type:"line"},{id:"low",type:"line"},{id:"close",type:"line"},{id:"volume",type:"line"}],graphics:{},_metainfoVersion:48,description:"Unnamed Study",format:{type:"inherit"},is_hidden_study:!0,is_price_study:!1,shortDescription:"Unnamed Study",description_localized:"Unnamed Study",id:"BarSetHeikenAshi@tv-prostudies",shortId:"BarSetHeikenAshi",packageId:"tv-basicstudies",version:"13",fullId:"BarSetHeikenAshi@tv-basicstudies-13",productId:"tv-basicstudies",name:"BarSetHeikenAshi@tv-basicstudies"})),this._metainfoCache},m.prototype.searchSymbols=function(e,t,i,r){this._logMessage("Symbol search requested: search string `{0}`, exchange: `{1}`, type `{2}`".format(e,t,i));var n=this;this._externalDatafeed.searchSymbols(e,t,i,(function(e){n._logMessage("Symbol search response: {0}".format(JSON.stringify(e))),r(e)}))},m.prototype.resolveSymbol=function(e,t,i){o.isSymbolEncoded(e)||console.error("Expect to get symbol encoded string, but got the following instead: "+e);var r=o.parseSymbol(e),n={currency:r.currencyCode};this._resolveSymbolByName(r.symbol,n,t,i)},m.prototype._resolveSymbolByName=function(e,t,i,r){var n,o=t&&t.currency,s=e+(o?"_#_"+o:"");this._resolveRequests[s]?n=this._resolveRequests[s]:(n=this._resolveSymbolInternal(e,o||void 0),this._resolveRequests[s]=n),n.then(i).catch(r)},m.prototype._resolveSymbolInternal=function(e,i){var r=this;return new Promise(function(n,o){this._logMessage("Symbol resolve requested: `{0}` ".format(e));var s=!0;this._externalDatafeed.resolveSymbol(e,(function(i){ s&&console.warn("`resolveSymbol` should return result asynchronously. Use `setTimeout` with 0 interval to execute the callback function."),r._logMessage("Symbol resolved: `{0}`, SymbolInfo in server response {1}".format(e,JSON.stringify(i))),function(e){if(e.base_name||(e.base_name=[e.name]),e.legs||(e.legs=[e.name]),e.exchange||(e.exchange=e["exchange-listed"]),e.full_name||(e.full_name=e.symbol||(e.exchange?e.exchange+":"+e.name:e.name)),e.pro_name||(e.pro_name=e.full_name),e.data_status||(e.data_status="streaming"),e.ticker||(e.ticker=e.symbol||e.name),!e.session&&e["session-regular"]&&(e.session=e["session-regular"]),!e.minmov&&e.minmovement&&(e.minmov=e.minmovement),e.supported_resolutions)for(var t=0;th)){var d=0,p=a.valueAt(h)[TradingView.TIME_PLOT];if(pe&&n.logNormal("Study inputs migration is done, studyId: "+this._studyId+", inputs: "+JSON.stringify(r)),r},o.prototype._findMigration=function(e){for(var t=-1,i=this._maxFromVers,r=0;r=0||t.indexOf(e)>=0},o._applyInputChangedMinMaxRule=function(e,t){if("adjustValIfNeeded"!==t.action)throw new Error("Unknown action "+t.action+" for rule with type "+t.type);var i=e[t.inputId];return it.maxVal&&(e[t.inputId]=t.maxVal),n.logNormal("Input "+t.inputId+"="+i+" adjusted to value "+e[t.inputId]),e},o._applyInputChangedOptionsRule=function(e,t){if(!(["text"].indexOf(t.inputType)>=0&&"resetToDefValIfNeeded"===t.action))throw new Error("Unexpected rule.inputType="+t.inputType+" in rule.action="+t.action);var i=e[t.inputId];return t.options.indexOf(i)<0&&(e[t.inputId]=t.defVal,n.logNormal("Input "+t.inputId+"="+i+" reset to default value "+t.defVal)),e},e.exports=o},Eyy1: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))},t.ensureNever=function(e){}},F58L:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyTemplates",(function(){return p}));var r=i("zUrt"),n=i("PC8g"),o=i("aIyQ"),s=i.n(o),a=i("hY0g"),l=i.n(a),c=i("oNDq"),u=i("uOxu"),h=Object(u.getLogger)("Platform.StudyTemplates"),d={confirmDelete:window.t("Do you really want to delete Study Template '{0}' ?")},p=function(){function e(e){var t=this;this._chartWidgetCollection=e.chartWidgetCollection,this._favoriteStudyTemplatesService=e.favoriteStudyTemplatesService,window.loginStateChange.subscribe(null,r.backend.invalidateStudyTemplatesList),this._list=new l.a([]),this._onChange=new s.a,this._list.subscribe((function(){return t._onChange.fire()}))}return e.prototype.findRecordByName=function(e){return this._list.value().find((function(t){return t.name===e}))||null},e.prototype.showSaveAsDialog=function(){var e=this,t=this._chartWidgetCollection.activeChartWidget.value().model();Promise.all([i.e("react"),i.e(3),i.e(4),i.e(6),i.e(7),i.e(9),i.e(11),i.e(16),i.e(20),i.e(41),i.e(46),i.e(79),i.e(0),i.e(5),i.e(13),i.e(17),i.e("study-template-dialog")]).then(i.bind(null,"IDfV")).then((function(i){new i.StudyTemplateSaver({controller:t,onSave:function(t){e._list.setValue(t)}}).show()}))},e.prototype.applyTemplate=function(e){var t=this,i=this.findRecordByName(e);null!==i?window.runOrSignIn((function(){var e=t._chartWidgetCollection.activeChartWidget.value(),o=function(t){Object(n.trackEvent)("GUI","Load Study Template"),e.model().applyStudyTemplate(JSON.parse(t.content),i.name)} ;void 0!==i.id?i.is_default?r.backend.getStandardStudyTemplateContentById(i.id,o):r.backend.getStudyTemplateContentById(i.id,o):r.backend.getStudyTemplateContent(i.name,o)}),{source:"Study templates apply"}):h.logNormal("Template "+name+" not found in cache")},e.prototype.deleteStudyTemplate=function(e){var t=this.findRecordByName(e);null!==t?this._removeTemplate(t):h.logNormal("Template "+e+" not found in cache")},e.prototype.list=function(){return this._list.value()},e.prototype.getOnChange=function(){return this._onChange},e.prototype.refreshStudyTemplateList=function(e){var t=this;r.backend.getStudyTemplatesList((function(i){t._list.setValue(i),void 0!==e&&e()}))},e.prototype._removeTemplate=function(e){var t=this;window.runOrSignIn((function(){Object(c.createConfirmDialog)({type:"modal",content:document.createTextNode(d.confirmDelete.format(e.name))}).then((function(i){i.on("action:yes",(function(i){var n=function(){t.refreshStudyTemplateList((function(){var r=t.list();t._list.setValue(r.filter((function(t){return t!==e}))),t._favoriteStudyTemplatesService&&t._favoriteStudyTemplatesService.remove(e.name),i.actionLoader("yes","stop"),i.close()}))};i.actionLoader("yes","start"),r.backend.invalidateStudyTemplatesList(),void 0!==e.id?r.backend.removeStudyTemplateById(e.id,n):r.backend.removeStudyTemplate(e.name,n)})),i.open()}))}),{source:"Study templates delete"})},e}()},FBsw:function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayPriceAxisView",(function(){return s}));var r=i("mrSG"),n=i("KcY8"),o=i("oXaB"),s=function(e){function t(t){var i=e.call(this)||this;return i._source=t,i}return Object(r.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var r=this._source.lastValueData("close",!1);if(!r.noData){var n=this._source.model(),s=this._source.priceScale();if(null!==s&&n.isPriceScaleVisible(s)){i.background=r.color,i.color=this.generateTextColor(r.color),i.coordinate=r.coordinate,i.floatCoordinate=r.floatCoordinate;var a=this._source.model().properties().scalesProperties;a.showSeriesLastValue.value()&&(e.text=this._text(r),e.visible=!0),t.text="",(a.showSymbolLabels.value()||a.seriesLastValueMode.value()===o.PriceAxisLastValueMode.LastPriceAndPercentageValue)&&(t.text=this._paneText(r),t.visible=t.text.length>0)}}},t.prototype._paneText=function(e){var t="",i=this._source.model().properties().scalesProperties;i.showSymbolLabels.value()&&(t+=this._source.symbol()+" ");var r=this._source.priceScale();return null!==r&&i.showSeriesLastValue.value()&&i.seriesLastValueMode.value()===o.PriceAxisLastValueMode.LastPriceAndPercentageValue&&(t+=r.isPercentage()?e.formattedPriceAbsolute:e.formattedPricePercentage),t.trim()},t.prototype._text=function(e){var t=this._source.model().properties().scalesProperties,i=this._source.priceScale();return t.seriesLastValueMode.value()!==o.PriceAxisLastValueMode.LastPriceAndPercentageValue||null===i?e.text:i.isPercentage()?e.formattedPricePercentage:e.formattedPriceAbsolute},t}(n.a)},FBuY:function(e,t,i){"use strict";i.r(t), i.d(t,"TVXWindowEvents",(function(){return r}));i("HbRj");var r,n=i("uOxu"),o=i("VVxS"),s=Object(n.getLogger)("XWindowEvents");!function(e){var t,i="tvxwevents.",r={};window.BroadcastChannel?((t=new BroadcastChannel("tvxwevents")).addEventListener("message",(function(e){var t=e.data,i=t.event,n=t.value;r[i]&&r[i].forEach((function(e){e(n)}))})),function(){for(var e=[],t=performance.now(),r=0;r=this._actualCapacity){this._actualCapacity++;var i=new c.Size(this._currentWidth,this._rowHeight*this._actualCapacity);this._canvas.unsubscribeCanvasConfigured(this._dprChangeHandler);var r=this._canvas;this._canvas=Object(c.resizeCanvasPreservingContent)(this._canvas,i),r.destroy(),this._canvas.subscribeCanvasConfigured(this._dprChangeHandler),this._ctx=Object(c.getPrescaledContext2D)(this._canvas.canvas),this._ctx.font=u+"px "+a.CHART_FONT_FAMILY,p.logDebug("TrendLineCache. Expanding cache to "+this._actualCapacity+" items")}return t},e.prototype._effectiveState=function(e){var t=e.properties(),i={p1:Object.assign({},e.points()[0]),p2:Object.assign({},e.points()[1]),props:e.properties(), showBars:t.showBarsRange.value(),showTimeRange:t.showDateTimeRange.value(),showDistance:t.showDistance.value(),showPriceRange:t.showPriceRange.value(),showAngle:t.showAngle.value(),dark:e.model().isDark(),priceRange:void 0,barSpacing:void 0};return!0===i.showAngle&&(i.priceRange=Object(r.ensureNotNull)(Object(r.ensureNotNull)(e.priceScale()).priceRange()).state(),i.barSpacing=e.model().timeScale().barSpacing()),i},e.prototype._effectiveStatesEquals=function(e,t){if(null!==e&&null===t)return!1;if(null===e&&null!==t)return!1;var i=Object(r.ensureNotNull)(e),n=Object(r.ensureNotNull)(t);if(f(i.p1,n.p1))return!1;if(f(i.p2,n.p2))return!1;if(i.dark!==n.dark)return!1;if(i.showBars!==n.showBars)return!1;if(i.showTimeRange!==n.showTimeRange)return!1;if(i.showDistance!==n.showDistance)return!1;if(i.showPriceRange!==n.showPriceRange)return!1;if(i.showAngle!==n.showAngle)return!1;if(i.showAngle&&n.showAngle){if(i.priceRange.min!==n.priceRange.min)return!1;if(i.priceRange.max!==n.priceRange.max)return!1;if(i.barSpacing!==n.barSpacing)return!1}return!0},e.prototype._repaintSource=function(e,t,i){this._ctx.save(),this._ctx.translate(.5,this.topByRow(t)+.5),i.points[0]=new n.Point(0,0),i.offsetX=0,i.offsetY=0,delete i.horzAlign,delete i.vertAlign,this._ctx.clearRect(0,0,this._currentWidth,this.rowHeight(t));var o=new s.TrendLineStatsRenderer(i,{widths:[]}).draw(this._ctx);Object(r.ensureDefined)(this._sourcesToRow.get(e)).width=o.width,this._ctx.restore()},e.prototype._recreateCanvas=function(){this._canvas.unsubscribeCanvasConfigured(this._dprChangeHandler),this._canvas.destroy(),this._canvas=Object(c.createDisconnectedBoundCanvas)(document,new c.Size(this._currentWidth,this._rowHeight*this._actualCapacity)),this._canvas.subscribeCanvasConfigured(this._dprChangeHandler),this._sourcesToRow.clear(),this._rowsToSources.clear(),this._ctx=Object(c.getPrescaledContext2D)(this._canvas.canvas),this._needRecreateCanvas=!1},e}()},FVma:function(e,t,i){"use strict";(function(e){var r=i("aO4+").Point,n=i("2kV1").StudyStatusView,o=i("it7y").StudyDataWindowView,s=i("Qq0B").NonSeriesStudy,a=i("dUDn").StandardPivotPointsPriceAxisView,l=i("KtbP").PanePriceAxisView,c=i("l4sv").HorizontalLineRenderer,u=i("loH8"),h=i("VdBB").HitTestResult,d=i("Zy3/").CompositeRenderer,p=i("k9/m").PlotRowSearchMode,f=i("hayr").propertyPages,_=i("ikwP"),m=_.getPretransformedContext2D,y=_.Size,g=_.createDisconnectedBoundCanvas;function v(e,t,i){this._prices=[],this._recreateCanvasAndContext(new y(0,0)),this.reset({font:e,fontSize:t,backColors:i}),this._priceAxisFontSize=11}function S(e,t){this._model=e,this._source=t,this._pivots=[],this._textCache={}}function b(e,t){this._source=e,this._model=e._model,this._prices=[],this._invidated=!0,this._cache=t,this._visiblePivots=new Set}function w(e,t,i,r){s.call(this,e,t,i,r);for(var n=["P","S1/R1","S2/R2","S3/R3","S4/R4","S5/R5"],o=this.properties().levelsStyle.visibility,a=0;as)){var h={},d=this._source.properties().levelsStyle.visibility;d.P.value()&&this.mergeLabel(h,e[l].p,"P"),d["S1/R1"].value()&&(this.mergeLabel(h,e[l].s1,"S1"),this.mergeLabel(h,e[l].r1,"R1")),d["S2/R2"].value()&&(this.mergeLabel(h,e[l].s2,"S2"),this.mergeLabel(h,e[l].r2,"R2")),d["S3/R3"].value()&&(this.mergeLabel(h,e[l].s3,"S3"),this.mergeLabel(h,e[l].r3,"R3")),d["S4/R4"].value()&&(this.mergeLabel(h,e[l].s4,"S4"),this.mergeLabel(h,e[l].r4,"R4")), d["S5/R5"].value()&&(this.mergeLabel(h,e[l].s5,"S5"),this.mergeLabel(h,e[l].r5,"R5"));var p=i.indexToCoordinate(c),f=i.indexToCoordinate(u);for(var _ in h){var m=parseFloat(_),y=r.priceToCoordinate(m,a);this._pivots.push({x1:p,x2:f,y,label:h[_].text,labelIds:h[_].ids,src:e[l]})}}}}}},S.prototype.renderer=function(){this._invalidated&&(this._updateImpl(),this._invalidated=!1);for(var e=new d,t=this._source.properties().levelsStyle.colors,i=this._source.properties().levelsStyle.widths,n=this._source.visiblePivots(),o=0;o0){var g=this._cache._labelRectByIndex(y+11),v={left:Math.round(_.x-g.width+f),top:Math.round(_.y-g.height/2),width:g.width,height:g.height};f+=g.width/2;var S=this._cache._canvasBinding.canvas,b=new u(S,g,v,this._cache._canvasBinding.pixelRatio);e.append(b)}g=this._cache._labelRectByIndex(y),v={left:Math.round(_.x-g.width+f),top:Math.round(_.y-g.height/2),width:g.width,height:g.height};f+=g.width;S=this._cache._canvasBinding.canvas,b=new u(S,g,v,this._cache._canvasBinding.pixelRatio);e.append(b)}}}return e},b.prototype.visiblePivots=function(){return this._visiblePivots},b.prototype._updateImpl=function(){if(this._visiblePivots.clear(),!this._model.timeScale().isEmpty()&&!this._source.priceScale().isEmpty()){var e=this._model.timeScale().visibleBarsStrictRange();if(null!==e&&this._source.customData()&&this._source.customData().pivots){var t=this._model.mainSeries(),i=this._source.priceScale(),r=t.bars().search(e.lastBar(),p.NearestLeft);if(null!==r){for(var n=r.index,o=this._source.customData().pivots,s=this._source._indexes,a=this._source.properties(),l=this._source.firstValue(),c=0;c=n||d)){this._visiblePivots.add(o[c]);var f=["p","s1","r1","s2","r2","s3","r3","s4","r4","s5","r5"];this._prices=[];for(var _=0;_i)){var l=[],c=this._properties.levelsStyle.visibility;c.P.value()&&l.push(r[s].p),c["S1/R1"].value()&&l.push(r[s].s1,r[s].r1),c["S2/R2"].value()&&l.push(r[s].s2,r[s].r2),c["S3/R3"].value()&&l.push(r[s].s3,r[s].r3), c["S4/R4"].value()&&l.push(r[s].s4,r[s].r4),c["S5/R5"].value()&&l.push(r[s].s5,r[s].r5);for(var u=0;u-1,L=T&&navigator.userAgent.toLowerCase().indexOf("windows")>-1,I=navigator.userAgent.toLowerCase().indexOf("chrome")>-1&&-1===navigator.userAgent.toLowerCase().indexOf("edge"),M=function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}return!1}(),O=window.urlParams||{},A=(window.initData,null);function k(e,t,i){var r=(0,p.createDisconnectedBoundCanvas)(document,new p.Size(t,i));return(0,p.getPrescaledContext2D)(r.canvas).drawImage(e,0,0,t,i),r}function E(e,t){return function(){i.e("ie-fallback-logos").then(function(){A=i("j1nX"),e.call(t)}.bind(null,i)).catch(i.oe)}}function D(e){return!S||e>500}var V=function(){function e(t){var i=t.layout,r=void 0===i?"site_branding":i,n=t.symbol,o=void 0===n?"":n,s=t.model,l=t.onReadyCallback;_(this,e),this._model=s,this._image=null,this._imageReady=!1,this._needDisplayImage=!1,this._imageWidth=22,this._imageHeight=13,this._layout=r,this._symbol=o,this.showAnimatedBranding=a.enabled("show_animated_logo")||"widget_branding"===this._layout,this.show=!0,this.width=100,this.height=14,this._bottomShift=0,this._brandCircleSize=32,this._animatedWidth=this._brandCircleSize,this._animatedOpacity=0,this.width=this.showAnimatedBranding?this._brandCircleSize:100,this.height=14,this._fillColor=c.color.brandNew,this._colorOldBlue=c.color.brandNew2,this._colorOldGray=c.color.black30,this._strokeColor=c.color.black255,this._brandCircleShadowColor=c.color.black0,this._strokeWidth=4,this._fontSize=this.showAnimatedBranding?11:14,this._font="px "+v,this._txt="TradingView",this._onReadyCallback=l,this._upscaleRatio=I?1:2,this._verticalTextShift=T?this.showAnimatedBranding?2:4:0,this._strokeCanv=null,this._fillCanv=null,M&&(this._init=E(this._init,this)),this._init()}return n(e,[{key:"_init",value:function(){this._checkLayout(),this.show&&(this._updateStrokeColor(),this.showAnimatedBranding?(this._loadImage(g,"tvLogo"),this._createFillText()):this._loadImage(g,"tvLogo"),this._model.properties().paneProperties.background.subscribe(this,this._updateStrokeColor),this._model.onChartThemeLoaded().subscribe(this,this._updateStrokeColor))}},{key:"_updateStrokeColor",value:function(){var e=(0,u.getLuminance)(this._model.properties().paneProperties.background.value());this._strokeCanv=null,this._fillCanv=null,e>.2?(this._brandCircleColor=c.color.black255,this._animatedColorBg=c.color.black255,this._brandCircleShadowOpacity=.09, this._strokeOpacity=.8):(this._brandCircleColor=c.color.black27,this._animatedColorBg=c.color.black27,this._brandCircleShadowOpacity=.09,this._strokeOpacity=.1)}},{key:"_loadImage",value:function(e,t){var i=this;if(this._needDisplayImage){if(this._image={canvas:new Image},this.showAnimatedBranding&&(this._imageWhite={canvas:new Image}),M)this._image.canvas.src=A.fallbackImages[t+"Blue"],this.showAnimatedBranding&&(this._imageWhite.canvas.src=A.fallbackImages[t+"White"]);else{var r=e.replace(/fill="#[\da-f]{6}"/i,'fill="#FFFFFF"');this._image.canvas.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e),this.showAnimatedBranding&&(this._imageWhite.canvas.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(r))}this._image.canvas.addEventListener("load",(function(){L&&(i._image=k(i._image.canvas,i._imageWidth,i._imageHeight)),i._imageReady=!0,"function"==typeof i._onReadyCallback&&i._onReadyCallback()}))}}},{key:"_checkLayout",value:function(){switch(this._layout){case"widget_branding":case"widget_referral_branding":case"widget_custom_branding":case"fundamental_branding":case"fundamental_custom_branding":case"library_custom_branding":case"library_branding":this.show=!0;break;case"site_branding":this.show=!CheckMobile.any();break;case"widget_custom_no_powered_branding":case"fundamental_custom_no_powered_branding":case"library_custom_no_powered_branding":this.show=!1}switch(this._layout){case"library_branding":this._needDisplayImage=!0,this._txt=window.t(w);break;case"library_custom_branding":this._txt=window.t(x)}}},{key:"_drawTextStroke",value:function(e){if(!this._strokeCanv){this._strokeCanv=(0,p.createDisconnectedBoundCanvas)(document,new p.Size(0,0));var t=(0,p.getPretransformedContext2D)(this._strokeCanv),i=Math.round(this._strokeWidth*this._upscaleRatio);t.font=this._fontSize*this._upscaleRatio+this._font,this._textWidth=t.measureText(this._txt).width+2;var r=this._textWidth+2*i,n=(this._fontSize+2*i)*this._upscaleRatio;r%2==0&&(r+=1,n+=1),this._strokeCanv.resizeCanvas({width:r,height:n}),(t=(0,p.getPretransformedContext2D)(this._strokeCanv)).textBaseline="top",t.textAlign="start",t.font=this._fontSize*this._upscaleRatio+this._font,t.strokeStyle=this._strokeColor,t.lineWidth=this._strokeWidth*this._upscaleRatio,t.lineJoin="round",t.strokeText(this._txt,i,this._verticalTextShift)}e.save(),e.globalAlpha=this._strokeOpacity,e.drawImage(this._strokeCanv.canvas,0,0,this._strokeCanv.canvas.width,this._strokeCanv.canvas.height,0,0,this._strokeCanv.canvas.width/this._upscaleRatio/this._strokeCanv.pixelRatio,this._strokeCanv.canvas.height/this._upscaleRatio/this._strokeCanv.pixelRatio),e.restore()}},{key:"_drawTextFill",value:function(e){this._createFillText(),e.save(),e.drawImage(this._fillCanv.canvas,0,0,this._fillCanv.canvas.width,this._fillCanv.canvas.height,0,0,this._fillCanv.canvas.width/this._upscaleRatio/this._fillCanv.pixelRatio,this._fillCanv.canvas.height/this._upscaleRatio/this._fillCanv.pixelRatio),e.restore()}},{key:"_createFillText",value:function(){if(null===this._fillCanv){this._fillCanv=(0, p.createDisconnectedBoundCanvas)(document,new p.Size(0,0));var e=(0,p.getPretransformedContext2D)(this._fillCanv),t=Math.round(this._strokeWidth*this._upscaleRatio);e.font=this._fontSize*this._upscaleRatio+this._font,void 0===this._textWidth&&(this._textWidth=Math.round(e.measureText(this._txt).width)+2),this._setSizeFillTextCanvas(t),(e=(0,p.getPretransformedContext2D)(this._fillCanv)).textBaseline="top",e.textAlign="start",e.font=this._fontSize*this._upscaleRatio+this._font,e.fillStyle=this._fillColor,e.fillText(this._txt,t,this._verticalTextShift)}}},{key:"_updateFillTextWithColor",value:function(e){var t=Math.round(this._strokeWidth*this._upscaleRatio);this._setSizeFillTextCanvas(t);var i=(0,p.getPretransformedContext2D)(this._fillCanv);i.clearRect(0,0,this._fillCanv.canvas.width,this._fillCanv.canvas.height),i.textBaseline="top",i.textAlign="start",i.font=this._fontSize*this._upscaleRatio+this._font,i.fillStyle=e,i.fillText(this._txt,t,this._verticalTextShift)}},{key:"_setSizeFillTextCanvas",value:function(e){var t=this._textWidth+2*e,i=(this._fontSize+2*e)*this._upscaleRatio;t%2==0&&(t+=1,i+=1),this._fillCanv.resizeCanvas({width:t,height:i})}},{key:"_drawFillTextCropWidth",value:function(e,t,i){this._fillCanv?this._updateFillTextWithColor(i):this._createFillText(),e.save(),e.drawImage(this._fillCanv.canvas,0,0,t*this._upscaleRatio*this._fillCanv.pixelRatio,this._fillCanv.canvas.height,0,0,t,this._fillCanv.canvas.height/this._upscaleRatio/this._fillCanv.pixelRatio),e.restore()}},{key:"_drawBgCircle",value:function(e){e.save(),e.beginPath(),e.fillStyle=this._brandCircleShadowColor,e.globalAlpha=this._brandCircleShadowOpacity,e.arc(this._imageWidth/2,this._imageHeight/2,this._brandCircleSize/2+1,0,2*Math.PI),e.fill(),e.closePath(),e.restore(),e.save(),e.beginPath(),e.fillStyle=this._brandCircleColor,e.arc(this._imageWidth/2,this._imageHeight/2,this._brandCircleSize/2,0,2*Math.PI,!1),e.fill(),e.closePath(),e.restore()}},{key:"_drawFillRectWithRoundedCorner",value:function(e,t,i,r,n,o,s){e.save(),(0,d.drawRoundRect)(e,t-1,i-1,r+2,n+2,o),e.globalAlpha=this._brandCircleShadowOpacity,e.fillStyle=this._brandCircleShadowColor,e.fill(),e.closePath(),e.restore(),e.save(),(0,d.drawRoundRect)(e,t,i,r,n,o),e.fillStyle=s,e.fill(),e.closePath(),e.restore()}},{key:"_drawImageWithColor",value:function(e){e.save(),e.globalAlpha=this._animatedOpacity,e.drawImage(this._imageWhite.canvas,0,-.5,this._imageWidth,this._imageHeight),e.restore(),e.save(),e.globalAlpha=1-this._animatedOpacity,e.drawImage(this._image.canvas,0,-.5,this._imageWidth,this._imageHeight),e.restore()}},{key:"bottomShift",value:function(){return this._bottomShift}},{key:"hasAnimation",value:function(){return this.showAnimatedBranding}},{key:"minimizedAnimationWidth",value:function(){return this._brandCircleSize}},{key:"maximizedAnimationWidth",value:function(){return this._createFillText(),this._fillCanv.canvas.width/this._upscaleRatio/this._fillCanv.pixelRatio+this._brandCircleSize-3}},{key:"animatedDrawStep",value:function(e,t){this._animatedWidth=t ;var i=this._animatedWidtho&&(e.translate(this._imageWidth/2+n,.5),this._drawFillTextCropWidth(e,this._animatedWidth-o,this._animatedColorText)),e.restore(),this.width=this._animatedWidth,this.height=this._brandCircleSize,this._bottomShift=this._brandCircleSize-this._imageHeight}}else if("widget_custom_branding"===this._layout||"fundamental_custom_branding"===this._layout){var s="12px "+v;e.font=s;var a=e.measureText(this._txt).width+2;this.width=a+e.measureText("TradingView").width+2,e.save(),e.globalAlpha=.7,e.fillStyle=this._colorOldGray,e.fillText(this._txt,0,12),e.fillStyle=this._colorOldBlue,e.fillText("TradingView",a,12),e.restore()}else if(function(e){return!b||e>480}(t))if(this._needDisplayImage&&this._imageReady){e.save();var l=(this._brandCircleSize-this._imageWidth)/2;e.translate(l,0),this._drawBgCircle(e),e.drawImage(this._image,0,-.5,this._imageWidth,this._imageHeight);var c=12+(I?-.5:0);e.translate(this._imageWidth+c,-.5);var u=D(t);u&&(this._drawTextStroke(e),this._drawTextFill(e)),e.restore(),this.width=this._imageWidth+l,this.width+=u?c+this._strokeCanv.canvas.width/this._upscaleRatio/this._strokeCanv.pixelRatio:l,this.height=this._brandCircleSize,this._bottomShift=this._brandCircleSize-this._imageHeight}else{e.save(),e.translate(I?-.5:0,-.5);var h=D(t);h&&(this._drawTextStroke(e),this._drawTextFill(e)),e.restore(),h&&(this.width=this._strokeCanv.canvas.width/this._upscaleRatio/this._strokeCanv.pixelRatio)}}}]),e}(),B=function(){function e(t){var i=t.layout,r=void 0===i?"site_branding":i,n=t.src,o=t.onReadyCallback;_(this,e),this._img=new Image,this._ready=!1,this.show=!1,this.width=0,this.height=0,this._layout=r,this._src=n,this._onReadyCallback=o,M&&(this._init=E(this._init,this)),this._init()}return n(e,[{key:"_init",value:function(){var e=this;if(this._checkLayout(),this.show){var t=this._src.match(/(\w+)\.svg/);if(M&&t&&2===t.length){var i=t[1];this._img.src=A.fallbackImages[i],this._img.addEventListener("load",(function(){var t=A.logoSizes ;i in t?(e.width=t[i].width,e.height=t[i].height):(e.width=135,e.height=25),e._ready=!0,"function"==typeof e._onReadyCallback&&e._onReadyCallback()}))}else this._img.src=this._src,this._img.addEventListener("load",(function(){e.width=Math.round(e._img.width),e.height=Math.round(e._img.height),L&&(e._img=k(e._img,e.width,e.height).canvas),e._ready=!0,"function"==typeof e._onReadyCallback&&e._onReadyCallback()}))}}},{key:"_checkLayout",value:function(){switch(this._layout){case"widget_custom_branding":case"widget_custom_no_powered_branding":case"fundamental_custom_branding":case"fundamental_custom_no_powered_branding":case"library_custom_branding":case"library_custom_no_powered_branding":this.show=!0;break;case"site_branding":case"widget_branding":case"widget_referral_branding":case"fundamental_branding":case"library_branding":this.show=!1}}},{key:"draw",value:function(e){this._ready&&e.drawImage(this._img,0,0,this.width,this.height)}}]),e}();t.Branding=function(){function e(t,i,r){var n=this;_(this,e),this._model=t,this._mainSeries=this._model.mainSeries(),this._canvasWidth=0,this._showAllowance=i,this._showForPro=r,this._paneHeight=0,this._left=13,this._bottom=16,this._layout="site_branding",this._needToShow=!0,this._customLogoSrc="",this._customLogoLink="",this._checkLayout(),"widget_custom_branding"!==this._layout&&"fundamental_custom_branding"!==this._layout||(this._left=8,this._bottom=5);var o=function(){n._needToShow?"site_branding"===n._layout?n._showBranding=window.innerWidth>=768:n._showBranding=!0:n._showBranding=!1};this._resizeHandlerDelayed=y(o,200),o(),window.addEventListener("resize",this._resizeHandlerDelayed),this._monitorCanvas=(0,p.createDisconnectedBoundCanvas)(document,new p.Size(0,0)),this._monitorCanvas.subscribeCanvasConfigured((function(){n._init()})),this._model.isSnapshot()?this._init():(this._mainSeries.dataEvents().symbolResolved().subscribe(this,this._init),null!==this._mainSeries.symbolInfo()&&this._init()),this._cubicBezier=new c.CubicBezier(.4,.01,.22,1)}return n(e,[{key:"destroy",value:function(){window.removeEventListener("resize",this._resizeHandlerDelayed)}},{key:"_init",value:function(){var e=this,t=this._mainSeries.symbolInfo()||{};this._powBy=new V({layout:this._layout,symbol:t.name,model:this._model,onReadyCallback:function(){return e._model.fullUpdate()}}),this._custom=new B({layout:this._layout,src:this._customLogoSrc,onReadyCallback:function(){return e._model.fullUpdate()}}),this._openAnimation=null,this._closeAnimation=null}},{key:"_checkLayout",value:function(){if(a.enabled("widget"));else if(a.enabled("charting_library")||a.enabled("amp_terminal")||a.enabled("cqg_terminal")||a.enabled("trading_terminal")){var e=JSON.parse(O.logo)||{};e.image?(this._customLogoSrc=e.image,this._customLogoLink=e.link,this._needToShow=a.enabled("widget_logo"),a.enabled("link_to_tradingview")?this._layout="library_custom_branding":this._layout="library_custom_no_powered_branding"):(this._layout="library_branding",this._needToShow=a.enabled("widget_logo"))}else this._layout="site_branding"}},{ key:"_startOpenAnimation",value:function(){null===this._openAnimation&&(null!==this._closeAnimation&&(this._closeAnimation.stop(),this._closeAnimation=null),this._openAnimation=(0,h.doAnimate)({from:this._currentStateForAnimation(),to:this._openedStateForAnimation(),duration:200,easing:this._cubicBezier.easingFunc,onStep:this._animatedDrawStep.bind(this)}))}},{key:"_startCloseAnimation",value:function(){null===this._closeAnimation&&(null!==this._openAnimation&&(this._openAnimation.stop(),this._openAnimation=null),this._closeAnimation=(0,h.doAnimate)({from:this._currentStateForAnimation(),to:this._closedStateForAnimation(),duration:200,easing:this._cubicBezier.easingFunc,onStep:this._animatedDrawStep.bind(this)}))}},{key:"_currentStateForAnimation",value:function(){return this._powBy.width}},{key:"_closedStateForAnimation",value:function(){return this._powBy.minimizedAnimationWidth()}},{key:"_openedStateForAnimation",value:function(){return this._powBy.maximizedAnimationWidth()}},{key:"_animatedDrawStep",value:function(e,t){this._powBy.animatedDrawStep(e,t),this._model.lightUpdate()}},{key:"_hasAnimation",value:function(){return this._powBy.hasAnimation()}},{key:"updateAllViews",value:function(){}},{key:"priceAxisViews",value:function(){return[]}},{key:"onClickOutside",value:function(){}},{key:"hasContextMenu",value:function(){return!1}},{key:"hitTest",value:function(e){var t=this;return!this._showBranding||a.enabled("logo_without_link")?null:this._powBy&&"widget_custom_no_powered_branding"!==this._layout&&"fundamental_custom_no_powered_branding"!==this._layout&&(0,s.pointInBox)(e,(0,o.box)(new o.Point(this._left,this._paneHeight-Math.max(this._powBy.height,void 0!==this._custom?this._custom.height:0)-this._bottom),new o.Point(this._left+Math.max(this._powBy.width,void 0!==this._custom?this._custom.width:0),this._paneHeight-this._bottom)))?new l.HitTestResult(l.HitTestResult.CUSTOM,{mouseClickHandler:function(){"site_branding"!==t._layout&&(window.open(t.tvUrl(),"_blank").opener=null)},mouseEnterHandler:function(){t._hasAnimation()&&t._startOpenAnimation()},mouseLeaveHandler:function(){t._hasAnimation()&&t._startCloseAnimation()}}):null}},{key:"tvUrl",value:function(){var e="https://www.tradingview.com/";if(this._customLogoLink)return this._customLogoLink;if("library_branding"===this._layout||"library_custom_branding"===this._layout){var t=void 0;switch(!0){case a.enabled("charting_library"):t="library";break;case a.enabled("trading_terminal"):case a.enabled("amp_terminal"):case a.enabled("cqg_terminal"):t="trading-terminal"}return e+="/"===e[e.length-1]?"?":"&",e+="utm_source="+window.location.origin+"&utm_medium=library"+(t?"&utm_campaign="+t:"")}return e}},{key:"draw",value:function(e,t){var i=this;if(this._showBranding){var r=0;O.utm=!0,(0,p.drawScaled)(e,t.pixelRatio,(function(){e.translate(-.5,-.5),i._powBy&&i._powBy.show&&(r=i._powBy.height-i._powBy.bottomShift(),e.save(),e.translate(i._left,i._paneHeight-i._bottom-r),i._powBy.draw(e,t,i._canvasWidth),e.restore()),i._custom&&i._custom.show&&(e.save(), e.translate(i._left,i._paneHeight-i._bottom-r-i._custom.height),i._custom.draw(e,t),e.restore())}))}}},{key:"renderer",value:function(e,t){return this._paneHeight=e,this._canvasWidth=t,{draw:this.draw.bind(this),hitTest:this.hitTest.bind(this)}}},{key:"paneViews",value:function(e){if(TradingView.printing)return[];if(!this._showAllowance())return[];if("site_branding"===this._layout&&!this._showForPro&&window.user&&window.user.is_pro)return[];var t=a.enabled("move_logo_to_main_pane");return t&&e.isMainPane()||!t&&e.isLast()||e.isMaximized()?[{renderer:this.renderer.bind(this)}]:[]}}]),e}()},GUQs:function(e,t,i){"use strict";function r(e){e.cancelable&&e.preventDefault()}function n(e){return function(t){r(t),e()}}i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return n}))},GVHu:function(e,t,i){"use strict";(function(e,r,n){var o=i("Eyy1"),s=o.assert,a=o.ensureNotNull,l=i("hsV8").unpackNonSeriesData,c=i("38az").StudyBarColorer,u=i("l4sv").HorizontalLineRenderer,h=i("AXy7"),d=h.BandPaneView,p=h.BandBackgroundPaneView,f=h.HlineFillPaneView,_=i("hezA").StudyPriceAxisView,m=i("KtbP").PanePriceAxisView,y=i("I9zs"),g=y.StudyPaneView,v=y.StudyBackgroundPaneView,S=y.StudyPlotShapesPaneView,b=y.StudyPlotCharsPaneView,w=y.StudyPlotArrowsPaneView,P=y.StudyPlotBarsPaneView,C=y.StudyPlotCandlesPaneView,x=i("x40+"),T=x.PlotFillPaneView,L=x.AreaBackgroundPaneView,I=i("it7y").StudyDataWindowView,M=i("8qoI").StudyLegendView,O=i("2kV1").StudyStatusView,A=i("jenN"),k=A.emptyStudyGraphics,E=A.loadStudyGraphics,D=A.saveStudyGraphics,V=A.LiveStudyGraphics,B=A.createGraphicsPaneViews,R=A.createGraphicsPriceAxisViews,N=i("XzZr").ChartApiInterface,F=i("aO4+").Point,j=i("Ocx9").DefaultProperty,W=i("kcTO").PriceFormatter,z=i("nEwK").VolumeFormatter,H=i("zXvd").NumericFormatter,U=i("GH0z").PercentageFormatter,Y=i("k9/m"),G=Y.PlotList,q=Y.PlotRowSearchMode,K=Y.mergeMinMax,Z=i("972a").MarkLocation,J=i("0YCj"),X=(i("cBZt").extractStudyId,i("TcSq").extractPineId,i("FQhm")),Q=i("23IT"),$=Q.LineStudyPlotStyle,ee=i("hayr").propertyPages,te=i("TmNs").StudyPriceLineAxisView,ie=i("w4Ji").studyPlotFunctionMap,re=i("w4Ji").studyEmptyPlotValuePredicate,ne=i("jy4L").makeNextStudyId,oe=i("Kxc7"),se=i("IcDj").StudyBase,ae=i("uOxu").getLogger("Chart.Study"),le=(Number(window.TELEMETRY_SERVER_TIME_DIFF_THRESHOLD),oe.enabled("datasource_copypaste"));function ce(e,t,i,r){this._study=e,this.m_series=t,this.m_model=i,this._plotName=r,this._visible=!1,this._points=[new F(0,0)],this._invalidated=!0,this._lineRenderer=new u}function ue(e,t,i){var r=new j(t,i,!0);r.addExclusion("visible"),r.addExclusion("precision"),r.addExclusion("minTick");for(var n=0;nv+1){var x=m[v+1];if(null!=x){var T=S.valToIndex?S.valToIndex[x]:x;g.color=y.colors[T].color.value()}else g.color=C}else g.color=C;return g.floatCoordinate=this.priceScale().priceToCoordinate(w,P),g.coordinate=g.floatCoordinate,g.item=m,g},de.prototype.isFailed=function(){return this._failed},de.prototype.isLoading=function(){return this._loading},de.prototype.series=function(){return this._series},de.prototype.model=function(){return this._model},de.prototype.currency=function(){var e=this.metaInfo();return Boolean(e)&&e.is_price_study?this.parentSource().currency():null},de.prototype._invalidateLastNonEmptyPlotRowCache=function(){this._lastNonEmptyPlotRowCache={}},de.prototype.clearData=function(){this._invalidateLastNonEmptyPlotRowCache(), this.m_data.clear(),this._graphics.clear&&this._graphics.clear(),this._plotOffsets={}},de.prototype.onTagsChanged=function(){return this._tagsChanged},de.prototype.properties=function(){return this._properties},de.prototype.state=function(e,t){var i={type:TradingView.className(this.constructor),id:this.id(),state:this.properties().state(),zorder:this.zorder()};this.metaInfo()instanceof J?i.metaInfo=TradingView.clone(this.metaInfo().state()):(i.metaInfo=TradingView.clone(this.metaInfo()),i.metaInfo.id=J.parseIdString(i.metaInfo.id+(i.metaInfo.version?"-"+i.metaInfo.version:"")).fullId),e&&(i.data=this.data().state(),i.data.symbols=this._resolvedSymbols,i.data.graphics=D(this.graphics()),i.data.plotOffsets=this._plotOffsets),this.ownerSource()&&(i.ownerSource=this.ownerSource().id());for(var r=0;r=0?s:0}}return this._isChildStudy&&J.patchChildStudyMetaInfoState(i),i},de.prototype._plotsForAlert=function(){var e=this,t=this._metaInfo,i=[Q.isLinePlot,Q.isShapesPlot,Q.isCharsPlot,Q.isArrowsPlot,Q.isOhlcPlot,Q.isAlertConditionPlot];return t.plots.map((function(e,t){return e.pinePlotIndex=t,e})).filter((function(e){return i.some((function(t){return t(e)}))})).map((function(i){var r={id:i.id,type:i.type,pinePlotIndex:i.pinePlotIndex,offset:e.offset(i.id)};return t.styles&&void 0!==t.styles[i.id]&&(r.title=t.styles[i.id].title||"",r.text=t.styles[i.id].text||""),i.target&&t.ohlcPlots&&t.ohlcPlots[i.target]&&(r.ohlcTitle=t.ohlcPlots[i.target].title),r}))},de.prototype._collectDepsForAlert=function(){throw new Error("Not implemented")},de.prototype.idForAlert=function(){return se.prototype.idForAlert.call(this)},de.prototype.dependenciesForAlerts=function(){throw new Error("Not implemented")},de.prototype._hasAvailableAlertPlots=function(){return!1},de.prototype._hasAlertablePlots=function(){return(this.metaInfo().plots||[]).some((function(e){return"line"===e.type}))},de.prototype._hasAlertConditions=function(){if(this.metaInfo().plots.some(Q.isAlertConditionPlot))return!0;var e=this.stateForAlert();return!(!e.alerts||!e.alerts.conditions)},de.prototype._isAlertFeatureEnabled=function(){return!1},de.prototype.hasStateForAlert=function(){return this._isAlertFeatureEnabled()&&(this.metaInfo().isTVScript?this._hasAlertConditions()||this._hasAvailableAlertPlots()&&!this.isFailed():this._hasAlertablePlots()&&!this.isFailed())},de.prototype.stateForAlert=function(){throw new Error("Not implemented")},de.prototype.isSavedInStudyTemplates=function(){for(var e=0;e0)return!0;for(var e in this._metaInfo.graphics)for(var t in this._metaInfo.graphics[e]){var i=this.properties().graphics[e][t];if(!i.visible||i.visible.value())return!0}return!!this._metaInfo.isTVScriptStrategy},de.prototype.start=function(e,t){var i=this._model.mainSeries();if(i.isStarted()){this._isChildStudy&&this._source.isHibernated()&&this._source.start();var r=!this._isChildStudy&&!this.hasChildren()&&!this.isVisible() ;!this._chartApi||!this._chartApi.connected()||r&&!0!==t||this._allSymbolsAreResolved().then(function(){this._startAfterSymbolsResolved(e,t)}.bind(this)).catch(function(e){ae.logError("ERROR: "+this._debugId()+" start failed, "+e),delete this._restarting}.bind(this))}else i.dataEvents().completed().subscribe(this,(function(){this.start(e,t)}),!0)},de.prototype._getStudyIdWithLatestVersion=function(){var e=J.cutDollarHash(this._metaInfo.id),t=e;return e.indexOf("@tv-scripting")>=0?t+="-101!":t+="-"+this._metaInfo.version,t},de.prototype._startAfterSymbolsResolved=function(e,t){if(!this.isStarted()||this._restarting){if(this._isChildStudy){if(!this._source.isStarted()||this._source.isRestarting())return void this._source.onStart.subscribe(this,this._startAfterSymbolsResolved,!0);J.setChildStudyMetaInfoPropertiesSourceId(this._metaInfo,this._source.sourceId(),this._properties)}if(this._studyId=ne(),delete this._restarting,this._allInputsAreValid()){this._inputs=this.inputs({keepOptionalSymbolsEmpty:!0});var i=this._getStudyIdWithLatestVersion();if(this._incrementTurnaround(),this._chartApi.createStudy(this._studyId,this._turnaround,this._isChildStudy?this._source.sourceId():this._series._seriesId,i,this._inputs,this._handler,this._isChildStudy),this._studyName=i,this._subscribeExtendedHours(),this.onStart.fire(),!0===e&&this._children)for(var r=0;r=e){var i=a(this._series.bars().lastIndex())-e;t=a(this._series.bars().valueAt(i))[TradingView.TIME_PLOT]}return t},de.prototype._titleInputs=function(e,t){return this.inputs({symbolsForDisplay:!0,skipHiddenInputs:!0,skipFakeInputs:!1,fakeInputsForDisplay:!0,asObject:!1,skippedGroups:[],noExchanges:e,noResolution:t})},de.prototype.inputsForAlert=function(){var e=this.offset(),t=this.inputs();return e&&t.push(e),t},de.prototype.inputs=function(e){var t={symbolsForDisplay:!1,symbolsForChartApi:!0,skipHiddenInputs:!1,skipFakeInputs:!1,skipBooleanInputs:oe.enabled("dont_show_boolean_study_arguments"),asObject:!0,skippedGroups:[],skippedInputs:[],noExchanges:!1,noResolution:!1,keepOptionalSymbolsEmpty:!1};return TradingView.merge(t,e),this._buildInputs(t)},de.prototype.inputsForAlertState=function(){return this.inputs()},de.prototype._buildInputs=function(e){s(!!e,"options not set");var t={};try{t=this._prepareInputs(e)}catch(r){ae.logWarn("Failed to prepare study inputs: "+r)}if(e.asObject){var i={};return Object.keys(t).forEach((function(e){null!=t[e]&&(i[e]=t[e])})),i}i=[];return Object.keys(t).forEach((function(e){null!=t[e]&&i.push(t[e])})),i},de.prototype._prepareInputs=function(e){s(!!e,"options not set");for(var t={},i=0;i=0?a:s}return s}return this._metaInfo.isTVScript||this._metaInfo.pine?"text"===i?this._metaInfo.defaults.inputs.text:"pineId"===i?this._metaInfo.scriptIdPart:"pineVersion"===i?this._metaInfo.pine?this._metaInfo.pine.version:"-1":this._properties.inputs[i].value():this._properties.inputs[i].value()},de.prototype._rebindToSource=function(e,t){var i=this.parentSource();if(this._isChildStudy){var r;this._source.unsetChild(this),delete this._nonPriceParent;var n=null;if(e===this._model.mainSeries())this._source.currencyChanged().unsubscribeAll(this),delete this._source,delete this._isChildStudy,delete this._ownerSource,r=this._series._seriesId,n=N.REBIND_STUDY_CHILD_TO_STANDALONE,this._series.currencyChanged().subscribe(this,this._onSourceCurrencyChanged);else{if(!(e instanceof de))return ae.logError("Unable to rebind study to source of this type"),!1;this._ownerSource=e,this._source.currencyChanged().unsubscribeAll(this),this._source=e,this._source.currencyChanged().subscribe(this,this._onSourceCurrencyChanged),r=this._source.sourceId(),this._source.setChild(this),this._source.isHibernated()&&this._source.start()}this._incrementTurnaround(),this._chartApi.rebindStudy(this._studyId,this._turnaround,r,this._studyName,t,this._handler,n)}else{if(!(e instanceof de))return ae.logError("Unable to rebind study to source of this type"),!1;var o=e.isHibernated();o&&e.start();var s=!1;if(this._canCreateStudyWithRebindType(N.REBIND_STUDY_STANDALONE_TO_CHILD)&&(this._incrementTurnaround(),s=this._chartApi.rebindStudy(this._studyId,this._turnaround,e.sourceId(),this._studyName,t,this._handler,N.REBIND_STUDY_STANDALONE_TO_CHILD)),!s)return o&&e.stop(),!1;this._isChildStudy=!0,this._ownerSource=e,this._source=e,this._source.setChild(this),this._childStudyByRebind.fire(),this._series.currencyChanged().unsubscribeAll(this),this._source.currencyChanged().subscribe(this,this._onSourceCurrencyChanged)} var a=this.m_priceScale,l=e.priceScale();if(a!==l){var c=this._model.paneForSource(this),u=this._model.paneForSource(e);c===u&&u.move(this,l,!0)}return i.formatterChanged().unsubscribe(this,this._onSourceFormatterChanged),this.parentSource().formatterChanged().subscribe(this,this._onSourceFormatterChanged),i.priceStepChanged().unsubscribe(this,this._onSourcePriceStepChanged),this.parentSource().priceStepChanged().subscribe(this,this._onSourcePriceStepChanged),i.currencyChanged().unsubscribeAll(this),this._recreatePriceFormattingDependencies(),!0},de.prototype.childStudyByRebind=function(){return this._childStudyByRebind},de.prototype._changeInputsImpl=function(e,t){var i=this.source(),r=this._properties.inputs&&this._properties.inputs.state(),n=J.getSourceIdByInputs(this._metaInfo.inputs,r),o=!0;if(n)if("high"===n||"open"===n||"low"===n||"close"===n||"hl2"===n||"ohl3"===n||"ohlc4"===n)i=this._model.mainSeries();else for(var s=this._model.dataSources(),a=0;a0?" ("+t+")":"")},de.prototype._titleInParts=function(e,t,i,r){var n="";n=e?this._metaInfo.shortDescription||this._properties.shortDescription&&this._properties.shortDescription.value()||"Study":this._metaInfo.description||this._properties.description&&this._properties.description.value()||"Study",t=t||{};var o=[window.t(n)],s=[];if(!i){var a=this._getMTFResolutionInputTitle();if(null!==a&&a.length>0&&o.push(a),(s=this._titleInputs(r,!0)||[]).length>0){var l={};if(this._isChildStudy)for(var c=0;c=0&&this._source){ var p=this._source.metaInfo(),f=this._source.title(e,null,!0,r);if(1===p.plots.length)l[d]=f;else{var _=d.split("$")[1],m=p.plots[_].id,y=p.styles&&p.styles[m]&&p.styles[m].title||m;l[d]=f+": "+y}}break}}var g=this;s=s.map((function(e){var i=isNumber(e)?g._numericFormatter.format(e):l&&l[e]||e;return t[i]&&(i=t[i]),i}))}}return[o.join(" · "),s]},de.prototype._getMTFResolutionInputTitle=function(){for(var e=0;e0?window.t(t):""},de.prototype._handleStudyError=function(e){delete this._loadingStartTime,this._failed=!0,this._loading=!1,this.clearData();e.params[2];this._status=this._getStatusTextOnStudyError(e.params[2]),this._statusView.update(),this._model.updateSource(this)},de.prototype.onData=function(e){switch(e.method){case"study_loading":this._status=window.t("loading..."),this._failed=!1,this._loading=!0,this._statusView.update(),this._model.updateSource(this),this._loadingStartTime=(new Date).getTime();break;case"study_error":this._handleStudyError(e);break;case"study_completed":if(!this._checkTurnaround(e.params[1]))return;this._studyModified&&(this.clearData(),this._studyModified=!1);var t="chartSession:"+this._chartApi._sessionid,i=(new Date).getTime()-this._loadingStartTime;ae.logDebug(t+", Study "+this._metaInfo.description+" loading took "+i+" ms"),delete this._loadingStartTime,this._loading=!1,this._status="",this._statusView.update();var r=this._model.paneForSource(this);this._model.recalculatePane(r),this._updateSources(),this._model.fullUpdate();break;case"study_deleted":break;case"data_update":if(e.params.customId!==this.sourceId()||!this._checkTurnaround(e.params.turnaround))return;s(!!e.params.nonseries,"data.params.nonseries is missing"),this._onDataUpdate(e.params.plots,e.params.nonseries)}},de.prototype._onDataUpdate=function(e,t){this._studyModified&&(this.clearData(),this._studyModified=!1);var i=l(t.d);return this._ongoingDataUpdate=this._ongoingDataUpdate.then((function(){return i}),(function(){return i})).then(this._onDataUnpacked.bind(this,e,t.indexes)),this._ongoingDataUpdate},de.prototype._onDataUnpacked=function(e,t,i){this._isDestroyed||("nochange"!==t&&this._processPlotOffsets(i),this.transformData(e),this._mergeData(e),null!==i&&(i.indexes_replace?(s("nochange"!==t), this._graphics.replaceIndexesTo(t)):("nochange"!==t&&this._graphics.replaceIndexesTo(t),void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),this._onDataUpdated(e,i,t))},de.prototype._onDataUpdated=function(e,t,i){if(this.hasBarColorer()&&e.length>0){var r=this.barColorer().firstColoredBar(e[0].index);this._model.mainSeries().invalidateBarStylesCache(r)}null!==t&&this._postProcessGraphics();var n=this._model.paneForSource(this);this._model.recalculatePane(n),this._updateSources()},de.prototype.transformData=function(e){},de.prototype.moveData=function(e){this._ongoingDataUpdate=this._ongoingDataUpdate.then(function(){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.move(e)}.bind(this))},de.prototype.replaceData=function(e,t,i){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.remove(e+1),this.m_data.addTail(i,t)},de.prototype._updateSources=function(){this._model.updateSource(this),this.hasBarColorer()&&this._model.updateSource(this._model.mainSeries())},de.processPlotOffsets=function(e,t){t&&t.indexes_replace||(e._plotOffsets=t&&t.offsets||{})},de.prototype._processPlotOffsets=function(e){de.processPlotOffsets(this,e)},de.prototype._mergeData=function(e){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.merge(e)},de.prototype._postProcessGraphics=function(){this._priceAxisViews=[].concat(this._priceAxisViewsBase,R(this))},de.prototype._getNonPriceParent=function(){if(this._nonPriceParent)return this._nonPriceParent;for(var e=this.source();e instanceof de;){var t=e.metaInfo();if(!t.is_price_study||"Compare@tv-basicstudies"===t.id)return this._nonPriceParent=e,e;e=e.source()}},de.prototype.firstValue=function(e){if(!this._isChildStudy&&"Compare@tv-basicstudies"===this._metaInfo.id||!this._metaInfo.is_price_study){var t=this._model.timeScale().visibleBarsStrictRange();if(null===t)return null;var i=t.firstBar(),r=t.lastBar(),n=null,o=this,s=o._metaInfo.plots;return null===n&&this.data().range(i,r).each((function(t,i){for(var r=0;r=0){var m=this.properties().styles[h].histogramBase.value(),y=this.m_data.minMaxOnRangeCached(e,t,[f]);isNumber(m)&&null!==y&&(l=K(l,{min:m,max:m}),l=K(l,y))}else a.push(f)}}}var g=this.m_data.minMaxOnRangeCached(e,t,a);if(g=K(l,g),i){a=[{name:"low",offset:0},{name:"high",offset:0}];var v=this.series().data().bars().minMaxOnRangeCached(e,t,a);g=K(g,v)}if(null!==g&&(o=new n(g.min,g.max)),s.bands)for(c=0;c=0&&(e="_v"+this._metaInfo.pine.version),{symbol:this.series().actualSymbol(),resolution:this.series().interval(),study:this._metaInfo.shortId+e}},de.prototype._sendTelemetryReport=function(e,t,i){void 0===i&&(i=this._getTelemetryAdditionalData());var r=Object.assign(t,{additional:i});telemetry.sendChartReport(e,r)},de.prototype._sendTelemetryCounter=function(e,t){this._sendTelemetryReport(e,{count:1},t)},de.prototype._sendTelemetryTiming=function(e,t,i){this._sendTelemetryReport(e,{value:t},i)},de.prototype.destroy=function(){this._isDestroyed=!0,this._legendView&&this._legendView.destroy(),null!==this._definitionsViewModel&&(this._definitionsViewModel.destroy(),this._definitionsViewModel=null), this.parentSource().formatterChanged().unsubscribe(this,this._onSourceFormatterChanged),this.parentSource().priceStepChanged().unsubscribe(this,this._onSourcePriceStepChanged),this._properties.listeners().unsubscribe(this,this.changeStyles),this._properties.visible.listeners().unsubscribe(this,this.visibleChanged),this._properties.visible.listeners().unsubscribe(this,this.processHibernate);for(var e=0;e= 1");var l=TradingView.clone(defaults("study"));he(l,t);var c=J.getStudyPropertyRootName(t),u=TradingView.clone(defaults(c,o));t.isTVScript&&t.TVScriptSourceCode!==u.TVScriptSourceCode&&(u=TradingView.clone(TradingView.factoryDefaults(c,o)));TradingView.merge(l,u),r&&(s(!(r instanceof e),"propsState should not be an instance of Property"),TradingView.merge(l,r)) ;var h=TradingView.clone(t),d={};a.mergeInputsObjPart(d,h.defaults.inputs),a.mergeInputsObjPart(d,l.inputs),l.inputs=d,delete h.inputs,delete h.defaults.inputs;var p={};if(TradingView.merge(p,h.defaults),TradingView.merge(p,TradingView.factoryDefaults(c)),TradingView.merge(p,l),TradingView.merge(p,h),delete p.defaults,l=p,null!==n){var f=n.model().studiesColorRotatorFactory().getColorRotator(t);"Overlay@tv-basicstudies"===t.id?l.lineStyle.color=f.getColor(l.lineStyle.color,t):TradingView.merge(l,function(e,t){for(var i in e.styles){var r=e.styles[i].color;r&&(e.styles[i].color=t.getColor(r))}return e}(l,f))}r&&TradingView.merge(l.styles,r.styles);return l}(t,r,n,o),u=J.getSourceInputIds(t);if(u.length>0){var h=u[0];l instanceof de?c.inputs[h]="{pid}$0":void 0!==c.inputs[h]&&-1!==c.inputs[h].indexOf("$")&&(c.inputs[h]="close")}return ue(t,a,c)}(t,r,n,o,J.getStudyPropertyRootName(t),a)},t.prepareStudyPropertiesForLoadChart=function(e,t,r,n,o,s){return function(e,t,r,n,o,s,a){var l=function(e,t,r,n,o){var s=i("K4L1");e.version&&r.version&&e.version!==r.version&&ae.logWarn("Serialized metaInfo version "+e.version+" is not equal to the saved state version "+r.version);var a=TradingView.clone(defaults("study"));TradingView.merge(a,TradingView.factoryDefaults(J.getStudyPropertyRootName(e))),he(a,e),TradingView.merge(a,r),a=o.updateStudyState(a,e,t);var l=TradingView.clone(t||e);if(l&&J.versionOf(l)>=1){var c={};s.mergeInputsObjPart(c,l.defaults.inputs),s.mergeInputsObjPart(c,a.inputs),a.inputs=c,delete l.inputs,delete l.defaults.inputs;var u={};TradingView.merge(u,l.defaults),TradingView.merge(u,TradingView.factoryDefaults(J.getStudyPropertyRootName(l))),TradingView.merge(u,a),delete l.defaults,TradingView.merge(u,l),a=u}return a}(e,t,r,0,o);return ue(t||e,s,l)}(e,t,r,0,o,J.getStudyPropertyRootName(e))}}).call(this,i("tc+8"),i("aIyQ"),i("Qb4w").PriceRange)},GVQo:function(e,t,i){"use strict";i.r(t),i.d(t,"get",(function(){return n})),i.d(t,"set",(function(){return o}));var r=i("VVxS");function n(){try{return JSON.parse(r.TVLocalStorage.getItem("application-clipboard"))}catch(e){return null}}function o(e){try{r.TVLocalStorage.setItem("application-clipboard",JSON.stringify(e))}catch(t){}}},GhVi:function(e,t,i){"use strict";(function(t){function i(){this._marksByIndex={},this._marksBySpan=[],this.changed=new t}i.prototype.reset=function(){this._marksByIndex={},this._marksBySpan=[],delete this.minIndex,delete this.maxIndex,delete this._cache,this.changed.fire()},i.prototype.minIndex=void 0,i.prototype.maxIndex=void 0,i.prototype.merge=function(e){for(var t=this._marksBySpan,i={},r=0;r=o||(this.maxIndex=o),t[s]||(t[s]=[]),t[s].push(n),i[s]=!0}for(s=t.length;s--;)t[s]&&(t[s].length||delete t[s],i[s]&&t[s].sort(this._sortByIndexAsc));delete this._cache,this.changed.fire()}, i.prototype._removeTickmark=function(e){var t=e.index;if(this._marksByIndex[t]===e){delete this._marksByIndex[t],t<=this.minIndex&&this.minIndex++,t>=this.maxIndex&&this.maxIndex--,this.maxIndex2;){if(1e3*this._marksByIndex[t].time===e)return t;if(1e3*this._marksByIndex[i].time===e)return i;var r=Math.round((t+i)/2);1e3*this._marksByIndex[r].time>e?i=r:t=r}return t},i.prototype.build=function(e,t){var i=Math.ceil(t/e);if(this._maxbar===i&&this._cache)return this._cache;this._maxbar=i;for(var r=[],n=this._marksBySpan.length;n--;)if(this._marksBySpan[n]){var o=r;r=[];for(var s=o.length,a=0,l=this._marksBySpan[n],c=l.length,u=1/0,h=-1/0,d=0;d=i&&f-h>=i&&(r.push(p),h=f)}for(;a_?"labelled":"sided",y=Object(c.a)(t,_).label,g=f[t][m].format({label:y});return new a.Action({checkable:!1,disabled:!d,label:g,statName:n,payload:e,onExecute:i})},e.prototype._onDetachLeft=function(e){var t=e.getPayload(),i=this._chartWidget.model().model(),n=Object(r.ensureNotNull)(i.paneForSource(t));this._chartWidget.model().detachToLeft(t,n)},e.prototype._onDetachRight=function(e){var t=e.getPayload(),i=this._chartWidget.model().model(),n=Object(r.ensureNotNull)(i.paneForSource(t));this._chartWidget.model().detachToRight(t,n)},e.prototype._createActionScaleDetachLeft=function(e){return this._createActionScaleDetach(e,"left",this._onDetachLeft.bind(this),"ToggleScaleLeft")},e.prototype._createActionScaleDetachRight=function(e){return this._createActionScaleDetach(e,"right",this._onDetachRight.bind(this),"ToggleScaleRight")},e.prototype._onMoveToScale=function(e){var t=e.getPayload();if(t.datasource.priceScale()!==t.priceScale){var i=this._chartWidget.model().model(),n=Object(r.ensureNotNull)(i.paneForSource(t.datasource));this._chartWidget.model().moveToScale(t.datasource,n,t.priceScale,t.undoText)}},e.prototype._createMoveToScaleAction=function(e,t,i,r){var n=e.priceScale()===t;return new a.Action({checkable:!0,checked:n,label:i,statName:"ToggleScale",payload:{datasource:e,priceScale:t,undoText:r},onExecute:this._onMoveToScale.bind(this)})},e.prototype._onNoScale=function(e){ var t=e.getPayload().datasource,i=this._chartWidget.model().model(),n=Object(r.ensureNotNull)(i.paneForSource(t));n.isOverlay(t)||this._chartWidget.model().detachNoScale(t,n)},e.prototype._createActionNoScale=function(e){var t=this._chartWidget.model().model(),i=Object(r.ensureNotNull)(t.paneForSource(e)),n=i.actionNoScaleIsEnabled(e);return new a.Action({checkable:!0,checked:i.isOverlay(e),label:G,disabled:!n,statName:"ToggleNoScale",payload:{datasource:e},onExecute:this._onNoScale.bind(this)})},e.prototype._createActionScaleItems=function(e){var t=this,i=[],n=this._chartWidget.model().model(),o=Object(r.ensureNotNull)(n.paneForSource(e)),s=n.priceScaleSlotsCount().totallySlots>1,l=o.rightPriceScales(),u=o.leftPriceScales(),h=this._createActionScaleDetachRight(e),d=this._createActionScaleDetachLeft(e),p=l.length+u.length+(null===h?0:1)+(null===d?0:1)>2,f={right:{hidden:{checked:{labelled:I,sided:M},unchecked:{labelled:O,sided:A}},visible:{checked:{labelled:k,sided:E},unchecked:{labelled:D,sided:V}}},left:{hidden:{checked:{labelled:I,sided:B},unchecked:{labelled:O,sided:R}},visible:{checked:{labelled:k,sided:N},unchecked:{labelled:D,sided:F}}}},_={left:o.visibleLeftPriceScales(),right:o.visibleRightPriceScales()},m=function(t,i){var r=("right"===i?l:u)[t],n=_[i].includes(r)?"visible":"hidden",o=e.priceScale()===r?"checked":"unchecked",a=s?"labelled":"sided",h=f[i],d={labelled:h.visible.unchecked.labelled,sided:h.visible.unchecked.sided},p=Object(c.a)(i,t).label;return{actionText:h[n][o][a].format({label:p}),undoText:d[a].format({label:p})}};return i.push.apply(i,l.map((function(i,r){var n=m(r,"right");return t._createMoveToScaleAction(e,i,n.actionText,n.undoText)}))),null!==h&&i.push(h),p&&(l.length>0||null!==h)&&i.push(new a.Separator),i.push.apply(i,u.map((function(i,r){var n=m(r,"left");return t._createMoveToScaleAction(e,i,n.actionText,n.undoText)}))),null!==d&&i.push(d),p&&(u.length>0||null!==d)&&i.push(new a.Separator),i.push(this._createActionNoScale(e)),i},e.prototype._createVisualOrderAction=function(e){var t=this._chartWidget.model(),r=t.availableZOrderOperations(e),n=[new a.Action({label:Q,statName:"BringToFront",disabled:!r.bringToFrontEnabled,onExecute:function(){return t.bringToFront(e)}}),new a.Action({label:$,statName:"SendToBack",disabled:!r.sendToBackEnabled,onExecute:function(){return t.sendToBack(e)}}),new a.Action({label:ee,statName:"BringForward",disabled:!r.bringForwardEnabled,onExecute:function(){return t.bringForward(e)}}),new a.Action({label:te,statName:"SendBackward",disabled:!r.sendBackwardEnabled,onExecute:function(){return t.sendBackward(e)}})];return new a.Action({label:ie,icon:i("9dnG"),statName:"VisualOrder",subItems:n})},e.prototype._createActionMergeUp=function(e){var t=this._chartWidget.model();return t.model().isMergeUpAvailableForSource(e)?new a.Action({label:K,statName:"MergeUp",onExecute:function(){return t.mergeSourceUp(e)}}):null},e.prototype._createActionUnmergeUp=function(e){var t=this._chartWidget.model();return t.model().isUnmergeAvailableForSource(e)?new a.Action({ label:Z,statName:"UnmergeUp",onExecute:function(){return t.unmergeSourceUp(e)}}):null},e.prototype._createActionMergeDown=function(e){var t=this._chartWidget.model();return t.model().isMergeDownAvailableForSource(e)?new a.Action({label:J,statName:"MergeDown",onExecute:function(){return t.mergeSourceDown(e)}}):null},e.prototype._createActionUnmergeDown=function(e){var t=this._chartWidget.model();return t.model().isUnmergeAvailableForSource(e)?new a.Action({label:X,statName:"UnmergeDown",onExecute:function(){return t.unmergeSourceDown(e)}}):null},e.prototype._mergeContentMenuItems=function(e){return[this._createActionMergeUp(e),this._createActionUnmergeUp(e),this._createActionMergeDown(e),this._createActionUnmergeDown(e)].filter(o.notNull)},e.prototype._createActionMove=function(e){var t=this._mergeContentMenuItems(e);return t.length>0?new a.Action({label:q,icon:i("BBCR"),subItems:t}):null},e.prototype._contextMenuActionsForSeries=function(e){var t=[],i=e.properties().visible.value(),n=this._chartWidget.model().model(),o=(Object(r.ensureNotNull)(n.paneForSource(e)),this._chartWidget.actions());if(this._isReadOnly())t.push(i?this._createActionHide(e):this._createActionShow(e)),t.push(new a.Separator),t.push(this._createActionScale(e));else{0,t.length>0&&!(t[t.length-1]instanceof a.Separator)&&t.push(new a.Separator),s.enabled("symbol_info")&&t.push(o.showSymbolInfoDialog),t.length>0&&!(t[t.length-1]instanceof a.Separator)&&t.push(new a.Separator),t.push(this._createVisualOrderAction([e]));var l=this._createActionMove(e);null!==l&&t.push(l),t.push(this._createActionScale(e)),t.push(i?this._createActionHide(e):this._createActionShow(e)),t.push(new a.Separator),t.push(o.showPriceLine),t.push(new a.Separator),window.widgetbar&&(!window.widgetbar._customization||window.widgetbar._customization.watchlist)&&o.addToWatchlist&&t.push(o.addToWatchlist),s.enabled("text_notes")&&t.push(o.addToTextNotes),t[t.length-1]instanceof a.Separator||t.push(new a.Separator),t[t.length-1]instanceof a.Separator&&t.pop()}return t},e.prototype._createActionAddChildStudy=function(e){var t=this,r=this._chartWidget.model().model();return new a.Action({label:re.format({studyTitle:e.title(!0)}),icon:i("CwKc"),statName:"ApplyIndicator",onExecute:function(){var i=t._chartWidget.showIndicators(Object(u.isStudy)(e)?e:void 0);if(i&&Object(u.isStudy)(e)){var n=function(){trackEvent("SOS","Apply SOS","Apply by RC menu")},o=r.studyInserted();o.subscribe(t,n),i.visibilityChanged.subscribe(t,(function(e){e||o.unsubscribe(t,n)}),!0)}}})},e.prototype._createActionAddFundamentals=function(e){return null},e.prototype._createActionShowSymbolInfoDialog=function(e){return new a.Action({label:window.t("Symbol Info..."),icon:i("1pHB"),checkable:!1,statName:"SymbolInfo",onExecute:function(){var t=e.symbol(),i=e.symbolInfo();Object(S.showSymbolInfoDialog)(t,{symbolInfo:i})}})},e.prototype._createActionRemove=function(e){var t=this;return new a.Action({label:ne,icon:i("PgQx"),statName:"RemoveSelectedObject",onExecute:function(){return t._chartWidget.removeDataSources([e])} })},e.prototype._createActionShowProperties=function(e){var t=this;return new a.Action({label:oe,icon:i("MXV9"),statName:"EditSelectedObject",onExecute:function(){return t._chartWidget.showSourceProperties(e)}})},e.prototype._contextMenuActionsForStudy=function(e){var t=this,i=(this._chartWidget.actions(),e.properties().visible.value()),r=[];if(!e.userEditEnabled())return r;if(this._chartWidget.readOnly())r.push(i?this._createActionHide(e):this._createActionShow(e)),r.push(new a.Separator),e.constructor instanceof d.NonSeriesStudy||r.push(this._createActionScale(e));else{if(s.enabled("study_on_study")&&e.canHaveChildren()&&r.push(this._createActionAddChildStudy(e)),r.length>0&&!(r[r.length-1]instanceof a.Separator)&&r.push(new a.Separator),s.enabled("symbol_info")&&(e instanceof v.study_Compare||e instanceof g.study_Overlay)&&null!==e.symbolInfo()&&(r.push(this._createActionShowSymbolInfoDialog(e)),r.push(new a.Separator)),r.push(this._createVisualOrderAction([e])),!(e.constructor instanceof d.NonSeriesStudy)){var n=this._createActionMove(e);null!==n&&r.push(n),r.push(this._createActionScale(e))}r.push(new a.Separator);var o=e.metaInfo();if(r[r.length-1]instanceof a.Separator||r.push(new a.Separator),e.copiable()){var l=new a.Action({label:le,shortcutHint:Object(f.humanReadableHash)(f.Modifiers.Mod+67),statName:"Copy",onExecute:function(){t._chartWidget.onAppClipboardCopy([e])}});r.push(l)}r.push(i?this._createActionHide(e):this._createActionShow(e)),r.push(this._createActionRemove(e)),r.push(new a.Separator),s.enabled("property_pages")&&new p.a(o).hasUserEditableOptions()&&r.push(this._createActionShowProperties(e)),r[r.length-1]instanceof a.Separator&&r.pop()}return r},e.prototype._createEditAlertDrawingAction=function(e){return new a.Action({label:w.format(e.title()),icon:TbbiEditAlertSvg,statName:"EditAlert",onExecute:function(){window.runOrSignIn((function(){e.editAlert("pane_context_menu_edit_alert")}),{source:"Alert edit from pane context menu"})}})},e.prototype._createLineToolTemplateAction=function(e){var t=this;if(!window.lineToolPropertiesToolbar)return null;var i=window.lineToolPropertiesToolbar.templatesList();return void 0===i?null:new a.ActionAsync((function(){var r=[],n=new a.Action({label:ae,statName:"SaveAs",onExecute:function(){i.showSaveDialog((function(t){var r=JSON.stringify(e.template());i.saveTemplate(t,r)}))}});r.push(n);var o=new a.Action({label:se,statName:"ApplyDefault",onExecute:function(){t._chartWidget.model().restorePropertiesForSource(e),window.lineToolPropertiesToolbar.onSourceChanged(e)}});return r.push(o),new Promise((function(e){i.templatesLoaded().then((function(){var e=i.getData();e.length>0&&r.push(new a.Separator),e.forEach((function(e,t){var n=new a.Action({label:e,statName:"ApplyTemplate",onExecute:function(){return i.loadTemplate(e)},toolbox:{type:_.ToolboxType.Delete,action:function(){i.deleteAction(e)}},showToolboxOnHover:!0});r.push(n)}))}),(function(e){b.logWarn(e)})).then((function(){e({label:ue,statName:"Template",subItems:r})}))}))}))}, e.prototype._createActionToggleLockObject=function(e){var t=this,r=e.properties().frozen.value();return new a.Action({label:r?he:de,statName:"ToggleLockSelectedObject",checkable:!0,icon:i(r?"fs3R":"qckB"),onExecute:function(){return t._chartWidget.toggleLockSelectedObject()}})},e.prototype._contextMenuActionsForLineTool=function(e){var t=this,r=[],n=this._chartWidget.actions(),o=(this._chartWidget.model().model(),function(){r.push(t._createVisualOrderAction(e))}),l=function(){var n=e.filter((function(e){return e.cloneable()}));if(n.length>0){var o=new a.Action({label:ce,icon:i("K8V9"),shortcutHint:Object(f.humanReadableModifiers)(f.Modifiers.Mod)+"Drag",doNotBindShortcut:!0,statName:"Clone",onExecute:function(){return t._chartWidget.model().cloneLineTools(n,!1)}},"Clone");r.push(o)}return!!n.length},c=function(){var i=e.filter((function(e){return e.copiable()}));if(i.length>0){var n=new a.Action({label:le,shortcutHint:Object(f.humanReadableHash)(f.Modifiers.Mod+67),statName:"Copy",onExecute:function(){return t._chartWidget.onAppClipboardCopy(i)}},"Copy");r.push(n)}return!!i.length};if(1===e.length){var u=e[0];if(this._chartWidget.readOnly())r.push(n.lineHide);else if(u.userEditEnabled()){if(s.enabled("alerts")&&!this._chartWidget.onWidget())if(u.hasAlert&&u.hasAlert.value())r.push(this._createEditAlertDrawingAction(u)),r.push(new a.Separator);else;if(!s.enabled("charting_library_base")){var h=this._createLineToolTemplateAction(u);null!==h&&r.push(h)}o(),we(this._options,"objectTree")&&n.paneObjectTree&&r.push(n.paneObjectTree),r.push(new a.Separator);var d=l();if((d=d=c()||d)&&r.push(new a.Separator),r.push(this._createActionToggleLockObject(u)),r.push(n.lineHide),r.push(n.lineRemove),r.push(new a.Separator),s.enabled("property_pages")&&Object(m.hasStylesPropertyPage)(u)&&r.push(n.format),u.additionalActions){r.push(new a.Separator);var p=u.additionalActions(this._chartWidget.model());r.push.apply(r,p)}}}else we(this._options,"objectTree")&&n.paneObjectTree&&r.push(n.paneObjectTree),o(),r.push(new a.Separator),l(),c(),r.push(new a.Separator),r.push(n.lineHide),r.push(n.lineRemove);return r},e.prototype._createEarningsShow=function(){return null},e.prototype._createDividendsShow=function(){return null},e.prototype._createSplitsShow=function(){return null},e.prototype._contextMenuActionsForESD=function(){return[]},e.prototype._contextMenuActionsForPublishedTimeline=function(e){var t=this,i=this._chartWidget.actions(),r=[];if(r.push(i.lineHide),window.is_authenticated){var n=e.properties().filter,o=new a.Action({checked:n.value()===PublishedChartsFilter.None,checkable:!0,label:pe,statName:"ToggleAllIdeas",onExecute:function(){return t._chartWidget.model().setProperty(n,PublishedChartsFilter.None,pe)}}),s=new a.Action({checked:n.value()===PublishedChartsFilter.Following,checkable:!0,label:fe,statName:"ToggleIdeasOfPeopleAndUser",onExecute:function(){return t._chartWidget.model().setProperty(n,PublishedChartsFilter.Following,fe)}}),l=new a.Action({checked:n.value()===PublishedChartsFilter.Private,checkable:!0,label:_e, statName:"ToggleUserIdeas",onExecute:function(){return t._chartWidget.model().setProperty(n,PublishedChartsFilter.Private,_e)}});r.push(new a.Separator,o,s,l)}return r},e.prototype._contextMenuActionsForTradingDrawings=function(e){return e.contextMenuItems()},e.prototype._createAlertToggleHorzLineLabelAction=function(e){var t=this,i=getGlobalAlertSettingsProperty().childs().line.childs().visible,r=i.value()?x:C;return new a.Action({checkable:!0,label:P,checked:i.value(),statName:"ToggleExtendAlertLine",onExecute:function(){return t._chartWidget.model().setProperty(i,!i.value(),r)}})},e.prototype._contextMenuActionsForAlertLabel=function(e){var t=e.alert(),i=[];return t.get("active")?i.push(AlertActionCreator.stopAlert(t)):i.push(AlertActionCreator.restartAlert(t,"alert_label_context_menu_restart")),i.push(AlertActionCreator.editAlert(t,"alert_label_context_menu_edit")),i.push(AlertActionCreator.deleteAlert(t)),i.push(new a.Separator),i.push(this._createAlertToggleHorzLineLabelAction(e)),i},e.prototype._contextMenuActionsForChartEvents=function(e){var t=this,i=[];if(s.enabled("property_pages")){var r=new a.Action({label:me,statName:"Format",onExecute:function(){return t._chartWidget.showGeneralChartProperties(h.TabNames.eventsAndAlerts)}});i.push(r)}var n=new a.Action({label:ye,statName:"HideEvents",onExecute:function(){return t._chartWidget.model().setProperty(e.properties().visible,!1,ye)}});return i.push(n),i},e}()},Hm6r:function(e,t,i){"use strict";i.r(t),i.d(t,"CrosshairTimeAxisView",(function(){return o}));var r=i("mrSG"),n=i("cgFQ"),o=function(e){function t(t,i,r){void 0===r&&(r=!1);var n=e.call(this,t)||this;return n._indexProvider=i,n._highlighted=r,n}return Object(r.__extends)(t,e),t.prototype._getBgColor=function(){return this._highlighted?this._model.isDark()?"#1E88E5":"#2196F3":"#4c525e"},t.prototype._getIndex=function(){return this._model.crossHairSource().visible?this._indexProvider():null},t}(n.a)},Hr11:function(e,t,i){"use strict";i.r(t),i.d(t,"lessThan",(function(){return o})),i.d(t,"greaterThan",(function(){return s})),i.d(t,"clamp",(function(){return a})),i.d(t,"sign",(function(){return l})),i.d(t,"isBaseDecimal",(function(){return c})),i.d(t,"greaterOrEqual",(function(){return u})),i.d(t,"equal",(function(){return h})),i.d(t,"log10",(function(){return d})),i.d(t,"defComparator",(function(){return p})),i.d(t,"min",(function(){return f})),i.d(t,"max",(function(){return _})),i.d(t,"ceiledEven",(function(){return m}));var r=i("uOxu"),n=Object(r.getLogger)("Common.MathEx");function o(e,t){return e<=t}function s(e,t){return e>=t}function a(e,t,i){return Math.min(Math.max(e,t),i)}function l(e){return e<0?-1:e>0?1:0}function c(e){if(e<0)return n.logDebug("MathEx.isBaseDecimal: argument less zero"),!1;for(var t=e;t>1;t/=10)if(t%10!=0)return!1;return!0}function u(e,t,i){return t-e<=i}function h(e,t,i){return Math.abs(e-t)t?1:0}function f(e,t){ if(void 0===t&&(t=p),e.length<1)throw Error("array is empty");for(var i=e[0],r=0;r0&&(i=e[r]);return i}function m(e){var t=Math.ceil(e);return t%2!=0?t-1:t}},HySD:function(e,t,i){"use strict";i.r(t),i.d(t,"ResizerDetacherState",(function(){return s}));var r=i("Eyy1"),n=i("hY0g"),o=i.n(n),s=function(){function e(e){var t=this;this._alive=new o.a,this._container=new o.a,this._width=new o.a,this._height=new o.a,this._fullscreen=new o.a,this._detachable=new o.a,this._fullscreenable=new o.a,this._visible=new o.a,this._availWidth=new o.a,this._availHeight=new o.a,this._owner=new o.a,this._ownersStack=[],this.owner=this._owner.readonly(),this._bridge={alive:this._alive.readonly(),container:this._container.readonly(),width:this._width.readonly(),height:this._height.readonly(),fullscreen:this._fullscreen.readonly(),detachable:this._detachable.readonly(),fullscreenable:this._fullscreenable.readonly(),visible:this._visible.readonly(),availWidth:this._availWidth.readonly(),availHeight:this._availHeight.readonly(),remove:function(){var e=t._owner.value();e&&e.remove&&e.remove()},negotiateWidth:function(e){var i=t._owner.value();i&&i.negotiateWidth&&i.negotiateWidth(e)},negotiateHeight:function(e){var i=t._owner.value();i&&i.negotiateHeight&&i.negotiateHeight(e)},requestFullscreen:function(){var e=t._owner.value();e&&e.requestFullscreen&&e.requestFullscreen()},exitFullscreen:function(){var e=t._owner.value();e&&e.exitFullscreen&&e.exitFullscreen()},detach:function(e){var i=t._owner.value();i&&i.detach&&i.detach(e)},attach:function(){var e=t._owner.value();e&&e.attach&&e.attach()}},e&&this.pushOwner(e)}return e.prototype.bridge=function(){return this._bridge},e.prototype.pushOwner=function(e){if(e.alive.value()){for(var t=0,i=this._ownersStack;t=t;i--)this._unsubscribeOwner(this._ownersStack[i],!0);this._ownersStack.length=t,t>0?this._subscribeOwner(this._ownersStack[t-1]):(this._alive.setValue(!1),this._owner.deleteValue())},e}()},I4UZ:function(e,t,i){"use strict";i.r(t),i.d(t,"HeaderToolbarBootloader",(function(){return s}));var r=i("mrSG"),n=i("yMne"),o=i("YuHv"),s=function(e){function t(t,i){var r=e.call(this)||this;return r._toolsBootloader=t,r._headerProps=i,r._headerProps.resizerBridge.negotiateHeight(n.HEADER_TOOLBAR_HEIGHT_EXPANDED),r._headerProps.resizerBridge.container.value().appendChild(Object(o.a)()),r}return Object(r.__extends)(t,e),t.prototype._startLoading=function(){var e=this;return Promise.all([this._toolsBootloader.load(),this._loadHeaderToolbar()]).then((function(t){var i=t[0];return new(0,t[1])(e._headerProps.resizerBridge.container.value(),Object(r.__assign)(Object(r.__assign)({},e._headerProps),{tools:i}))}))},t.prototype._loadHeaderToolbar=function(){return Promise.all([i.e("react"),i.e(43),i.e(44),i.e(73),i.e(12),i.e(15),i.e(40),i.e("header-toolbar")]).then(i.bind(null,"KMbc")).then((function(e){return e.HeaderToolbarRenderer}))},t}(i("cZRT").a)},I9zs:function(e,t,i){"use strict";var r=i("Eyy1").assert,n=i("aO4+").Point,o=i("eJTA"),s=o.rgbToHsl,a=o.hslToRgb,l=o.rgbToHexString,c=o.parseRgb,u=o.parseRgba,h=i("VdBB").HitTestResult,d=i("vq8G").SelectionRenderer,p=i("29fS").PaneRendererBars,f=i("cO0S").PaneRendererHistogram,_=i("Ndyb").PaneRendererColumns,m=i("gyZD").PaneRendererLine,y=i("u0yd").PaneRendererArea,g=i("/hKg").PaneRendererCandles,v=i("dBsn").PaneRendererCross,S=i("OYox").PaneRendererCircles,b=i("6Fc/").PaneRendererArrowsUpDownItem,w=i("6Fc/").PaneRendererArrowsUpDown,P=i("gTEF").SelectionRendererArrowsUpDown,C=i("f3xO").PaneRendererUnicodeChar,x=i("gVWb").PaneRendererBackground,T=i("Zp8I").PaneRendererStepLine,L=i("Zy3/").CompositeRenderer,I=i("ga+R"),M=i("Hr11").clamp,O=i("Nu4p"),A=i("23IT"),k=A.LineStudyPlotStyle,E=A.PlotSymbolSize,D=i("972a").MarkLocation,V=i("G3Rl").memoize,B=i("Tmoa"),R=i("k9/m").PlotRowSearchMode,N=i("Kxc7"),F=i("Zp/P"),j=i("Kmdw"),W=i("akof"),z=i("+q2u"),H=i("fxzW"),U=i("P+Pi"),Y=i("IOzl"),G=i("6ptY"),q=i("PF2b"),K=i("V0al");function Z(e,t,i,r){this.m_study=e,this.m_series=t,this.m_model=i,this._plotName=r,this.m_items=[],this._invalidated=!0,this._isMarkersEnabled=N.enabled("source_selection_markers");var n=this.m_study.metaInfo().plots;this._colorer=null,this._palette=null,this._paletterProps=null,this._plotIndex=0;for(var o=0;o=0&&e0?(t-=r,i+=r):(t+=r,i-=r);var o=this.m_study.getMinFirstBarIndexForPlot(this._plotName);if(!(o>i)){t=Math.max(o,t);var s=this.m_study.properties().styles[this._plotName],a=s.plottype.value(),l=[k.Line,k.Area,k.Circles,k.Cross].indexOf(a)>=0,c=this.m_study.data(),u=this.m_study.firstValue();if(l&&c._length()>0){for(var d=c._bsearch(t);Z.isIndexValid(d,c)&&void 0===c._valueAt(d)[this._plotIndex+1];)d-=1;t=Z.isIndexValid(d,c)?c._indexAt(d):t;for(var p=c._bsearch(i);Z.isIndexValid(p,c)&&void 0===c._valueAt(p)[this._plotIndex+1];)p+=1;i=Z.isIndexValid(p,c)?c._indexAt(p):i}var f=c.range(t,i),_=this.m_study.priceScale(),m=M(this._getTranspValue(),0,100),y={},g=function(e,t){var i=e+"@"+t;return y[i]||(this._plotName&&"vol"===this._plotName?y[i]=B.generateColor(e,t):y[i]=B.generateColor(e,t,!0)),y[i]}.bind(this);if(f.each(function(e,t){e+=r,e=Math.floor(e);var i=null==(h=t[this._plotIndex+1]);if(l&&i)return!1;var o=new n(e,h=i?NaN:h);o.timePointIndex=e;var a=void 0!==t[this._colorer+1]||this._palette&&this._palette.addDefaultColor;if(this._colorer&&a){var c,u,h=t[this._colorer+1];if(o.style={},null!=h){c=this._palette.valToIndex?this._palette.valToIndex[h]:h;var d=(u=this._paletterProps.colors[c]).color.value();o.style.color=B.isHexColor(d)?g(d,m):d}else{d=s.color.value();o.style.color=g(d,100)}var p=void 0!==c?u.width.value():s.linewidth.value(),f=void 0!==c?u.style.value():s.linestyle.value();o.style.width=p,o.style.style=f}return this.m_items.push(o),!1}.bind(this)),_.pointsArrayToCoordinates(this.m_items,u),this.m_model.timeScale().indexesToCoordinates(this.m_items),s.histogramBase&&(this._histogramBase=this.m_study.priceScale().priceToCoordinate(s.histogramBase.value(),u)),this.m_model.selection().isSelected(this.m_study)){var v=I(t,i);this._selectionData={points:[],bgColor:this.m_model.backgroundColor().value(),visible:!0},this._selectionData.hittestResult=h.REGULAR;for(var S=0;S0?(a-=c,l+=c):(a+=c,l-=c);var u=this._study.getMinFirstBarIndexForPlot(this._plotName);if(!(u>l))a=Math.max(u,a),this._study.data().range(a,l).each(function(e,t){e+=c;var r=t[this._plotIndex+1],a=new n(Math.floor(e)-.5),l=isNumber(s)?s:50;l=Math.min(l,100),l=Math.max(l,0);if(null!=r){var u=o.valToIndex?o.valToIndex[r]:r ;a.color=B.generateColor(i[u].color.value(),l)}else a.color=null;return this._items.push(a),!1}.bind(this)),this._model.timeScale().indexesToCoordinates(this._items)}},J.prototype.renderer=function(){if(this._study.properties().styles[this._plotName].visible&&this._study.properties().styles[this._plotName].visible.value()&&this._scalesReady()){this._invalidated&&(this._updateImpl(),this._invalidated=!1);var e={items:this._items,y:0,h:this._study.priceScale().height(),w:this._model.timeScale().barSpacing()},t=new L;return t.append(new x(e)),t}},X.prototype.items=function(){return this.m_items},X.prototype.update=function(){this.m_invalidated=!0},X.prototype._scalesReady=function(){var e=this.m_model.timeScale(),t=this.m_study.priceScale();return e&&t&&!e.isEmpty()&&!t.isEmpty()},X.prototype._updateImpl=function(){if(this.m_items=[],this._scalesReady()){var e=this.m_model.timeScale(),t=this.m_study.priceScale(),i=e.visibleBarsStrictRange();if(null!==i){var r=this.m_series.nearestIndex(i.firstBar(),R.NearestRight),n=this.m_series.nearestIndex(i.lastBar(),R.NearestLeft),o=this.m_study.offset(this.m_plotName);o>0?(r-=o,n+=o):(r+=o,n-=o);var s=this.m_study.getMinFirstBarIndexForPlot(this.m_plotName);if(!(s>n)){r=Math.max(s,r);var a=this.m_study.data(),l=this.m_study.firstValue(),c=a.range(r,n),u=this._getTranspValue(),d=I(r,n),p=this.m_model.selection().isSelected(this.m_study);this.m_selectionData=p?{points:[],hittestResult:h.REGULAR,vertOffset:0,isDark:this.m_model.isDark(),bgColor:this.m_model.backgroundColor().value(),visible:!0}:null;var f,_,m=this.m_series.properties().style.value(),y=m===TradingView.Series.STYLE_LINE?"lineStyle":m===TradingView.Series.STYLE_AREA?"areaStyle":null;y?(f=this.m_series.properties()[y].priceSource.value(),_=f):(f="high",_="low");var g=this.m_study.priceScale().isInverted(),v=t.coordinateToPrice(t.height()*t.topMargin(),l),S=t.coordinateToPrice(t.height()*(1-t.bottomMargin()),l);this._topCoord=g?S:v,this._bottomCoord=g?v:S,c.each(function(e,t){var i=Math.floor(e+o);if(null==(l=t[this.m_plotIndex+1]))return!1;var r=this._createItem(i,l,f,_);if(null!=r){var n=void 0!==t[this._colorer+1]||this._palette&&this._palette.addDefaultColor;if(this._colorer&&n){var s,a,l=t[this._colorer+1];if(r.style={},null!=l){var c=this._palette.valToIndex?this._palette.valToIndex[l]:l;s=this._paletterProps.colors[c].color.value(),a=u>9?u-10:0,r.style.color=B.generateColor(s,u)}else s=this.m_study.properties().styles[this.m_plotName].color.value(),a=100,r.style.color=B.generateColor(s,100);r.style.borderColor=B.generateColor(s,a)}var h=void 0!==t[this._textColorer+1]||this._textPalette&&this._textPalette.addDefaultColor;if(this._textColorer&&h){var m;l=t[this._textColorer+1];if(r.style||(r.style={}),null!=l){c=this._textPalette.valToIndex?this._textPalette.valToIndex[l]:l;m=this._textPaletterProps.colors[c].color.value(),r.style.textColor=B.generateColor(m,u)}else m=this.m_study.properties().styles[this.m_plotName].textColor.value(),r.style.textColor=B.generateColor(m,100)} return p&&-1!==d.indexOf(e)&&this.m_selectionData.points.push(r),this.m_items.push(r),!1}}.bind(this)),this._convertItemsToCoordinates()}}}},X.prototype._updateRenderer=function(){this._updateImpl();var e=this.m_model.timeScale(),t={},i=this._getTranspValue(),r=e.barSpacing(),n=this._calculateShapeHeight(r),o=this.m_study.properties().styles[this.m_plotName].location.value(),s=this._calculateVerticalOffset(o,n+n/2);t.barSpacing=r,t.items=this.m_items,t.color=B.generateColor(this.m_study.properties().styles[this.m_plotName].color.value(),i),t.height=n,t.vertOffset=s;var a=this.m_study.properties().styles[this.m_plotName].plottype.value(),l=O.plotShapesData[a],c=new L;l&&c.append(new TradingView[l.paneRendererClass](t)),this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&null!==this.m_selectionData&&(this.m_selectionData.vertOffset=s,c.append(new d(this.m_selectionData))),this.m_renderer=c},X.prototype._getSeriesVal=function(e,t){e=e||"close";var i=null;try{i=this.m_series[e](t)}catch(r){}return i},X.prototype._getTranspValue=function(){var e=0;this.m_study.properties().transparency&&(e=this.m_study.properties().transparency.value(),e=isNumber(e)?e:50);var t=this.m_study.properties().styles[this.m_plotName];return t.transparency&&(e=t.transparency.value(),e=isNumber(e)?e:50),M(e,0,100)},X.prototype._createItem=function(e,t,i,r){var o=this.m_study.properties().styles[this.m_plotName].location.value();if(!t&&o!==D.Absolute)return null;switch(o){case D.AboveBar:var s=this._getSeriesVal(i,e);if(void 0===s||null==s)return null;var a=s;break;case D.BelowBar:var l=this._getSeriesVal(r,e);if(void 0===l||null==l)return null;a=l;break;case D.Top:a=this._topCoord;break;case D.Bottom:a=this._bottomCoord;break;case D.Absolute:a=t;break;default:throw new Error("Bad value: "+o)}return new n(e,a)},X.prototype._convertItemsToCoordinates=function(){var e=this.m_model.timeScale(),t=this.m_study.priceScale();e.indexesToCoordinates(this.m_items),t.pointsArrayToCoordinates(this.m_items,this.m_study.firstValue())},X.prototype._calculateVerticalOffset=function(e,t){var i=0;switch(e){case D.AboveBar:case D.Bottom:i=-t;break;case D.BelowBar:case D.Top:i=t}return this.m_study.priceScale().isInverted()&&(i*=-1),i},X.prototype._calculateShapeHeight=function(e,t){var i=e;switch(t){case E.Tiny:i=.3*e;break;case E.Small:i=.6*e;break;case E.Normal:i=e;break;case E.Large:i=1.5*e;break;case E.Huge:i=2*e}return i},X.prototype.renderer=function(){if(this.m_study.properties().styles[this.m_plotName].visible&&this.m_study.properties().styles[this.m_plotName].visible.value()&&this._scalesReady())return this.m_invalidated&&(this._updateRenderer(),this.m_invalidated=!1),this.m_renderer},inherit(Q,X),Q.prototype._updateRenderer=function(e){this._updateImpl();var t,i=this.m_model.timeScale(),r={},n=this._getTranspValue(),o=i.barSpacing();if(e.size){var s=e.size.value();t=this._calculateShapeHeight(25,s)}else t=Math.round(o/2) ;var a=e.location.value(),l=B.generateColor(e.color.value(),n),c=n>19?n-10:0,u=this._calculateVerticalOffset(a,Math.round(1.5*t));r.barSpacing=o,r.items=this.items(),r.color=l,r.borderColor=B.generateColor(e.color.value(),c),r.height=t,r.vertOffset=u;var h=e.plottype.value(),p=O.plotShapesData[h],f=new L,_=e.text?e.text.value():void 0;if(void 0!==_&&""!==_.trim()){var m=_.trim().replace(/\\n/gm,"\n");m=TradingView.cleanButAmpersand(m,!0),r.text=m,r.fontSize=12;var y=e.textColor?e.textColor.value():void 0;r.textColor=y?B.generateColor(y,n):l}null!=p&&f.append(new TradingView[p.paneRendererClass](r)),this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&null!==this.m_selectionData&&(this.m_selectionData.vertOffset=u,f.append(new d(this.m_selectionData))),this.m_renderer=f},Q.prototype.renderer=function(){var e=this.m_study.properties().styles[this.m_plotName];if(e.visible&&e.visible.value()&&this._scalesReady())return this.m_invalidated&&(this._updateRenderer(e),this.m_invalidated=!1),this.m_renderer},inherit($,Q),$.prototype.renderer=function(){var e=this.m_study.properties().styles[this.m_plotName];if(e.visible&&e.visible.value()&&this._scalesReady()){var t=this.m_model.timeScale();this.m_invalidated&&(this._updateImpl(),this.m_invalidated=!1);var i,r={},n=this._getTranspValue(),o=t.barSpacing();if(e.size){var s=e.size.value();i=this._calculateShapeHeight(50,s)}else i=Math.round(o);var a=e.location.value(),l=B.generateColor(e.color.value(),n),c=this._calculateVerticalOffset(a,i);r.items=this.items(),r.barSpacing=o,r.char=e.char.value(),r.height=i,r.vertOffset=c,r.color=l;var u=new L,h=e.text?e.text.value():void 0;if(void 0!==h&&""!==h.trim()){var p=h.trim().replace(/\\n/gm,"\n");p=TradingView.cleanButAmpersand(p,!0),r.text=p,r.fontSize=12;var f=e.textColor?e.textColor.value():void 0;r.textColor=f?B.generateColor(f,n):l}return u.append(new C(r)),this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&null!==this.m_selectionData&&(this.m_selectionData.vertOffset=c,u.append(new d(this.m_selectionData))),u}},inherit(ee,X),ee.prototype.renderer=function(){if(this.m_study.properties().styles[this.m_plotName].visible&&this.m_study.properties().styles[this.m_plotName].visible.value()&&this._scalesReady()){this.m_invalidated&&(this._updateImpl(),this.m_invalidated=!1);var e={},t=M(this._getTranspValue(),0,100),i=this.m_model.timeScale().barSpacing();e.items=this.m_items,e.barSpacing=i,e.colorup=B.generateColor(this.m_study.properties().styles[this.m_plotName].colorup.value(),t),e.colordown=B.generateColor(this.m_study.properties().styles[this.m_plotName].colordown.value(),t);var r=u(e.colorup),n=r?100*(1-r[3]):0,o=u(e.colordown),s=o?100*(1-o[3]):0;e.colorBorderUp=B.generateColor("#000000",n),e.colorBorderDown=B.generateColor("#000000",s),e.minHeight=this.m_study.properties().styles[this.m_plotName].minHeight.value(),e.maxHeight=this.m_study.properties().styles[this.m_plotName].maxHeight.value();var a=new L;if(a.append(new w(e)), this.m_model.selection().isSelected(this.m_study)&&null!==this.m_selectionData){var l=this.m_selectionData;l.barSpacing=i,a.append(new P(l))}return a}},ee.prototype._createItem=function(e,t,i,r){if(0!==t){Math.abs(t)>this._maxAbsValue&&(this._maxAbsValue=Math.abs(t));var n,o=t>0;if(o){var s=this._getSeriesVal(r,e);if(void 0===s||null==s)return null;n=s}else{var a=this._getSeriesVal(i,e);if(void 0===a||null==a)return null;n=a}return new b(e,n,t,o)}},ee.prototype._convertItemsToCoordinates=function(){var e=this.m_model.timeScale(),t=this.m_study.priceScale();e.indexesToCoordinates(this.m_items),t.pointsArrayToCoordinates(this.m_items,this.m_study.firstValue());var i=Math.abs(this.m_study.properties().styles[this.m_plotName].minHeight.value()),r=Math.abs(this.m_study.properties().styles[this.m_plotName].maxHeight.value());if(i>r){var n=i;i=r,r=n}for(var o=(r-i)/this._maxAbsValue,s=this.m_items,a=0;ai)){t=Math.max(r,t);var o=this.m_study.data(),s=this.m_study.firstValue(),a=o.range(t,i),l=this.m_study.properties().ohlcPlots[this.m_plotName],c={};if(a.each(function(e,t){e=Math.floor(e);for(var i=!0,r={},n=TradingView.OPEN_PLOT;n<=TradingView.CLOSE_PLOT;++n){var o=t[this._ohlcPlotIndexes[n]+1];if(null==o){i=!1;break}r[n]=o}if(!i)return!1;var s=r[TradingView.OPEN_PLOT],a=r[TradingView.CLOSE_PLOT],u=Math.max(s,r[TradingView.HIGH_PLOT],r[TradingView.LOW_PLOT],a),h=Math.min(s,r[TradingView.HIGH_PLOT],r[TradingView.LOW_PLOT],a),d={};d.time=Math.round(e),d.open=s,d.high=u,d.low=h,d.close=a;var p=this._colorer?null!=t[this._colorer+1]?this._plotValueToPaletteColor(t[this._colorer+1]):"rgba(0, 0, 0, 0)":l.color.value();return d.color=function(e,t){var i=e+"@"+t;return c[i]||(c[i]=B.generateColor(e,t)),c[i]}(p,0),d.hollow=null,this.m_bars.push(d),!1}.bind(this)),this.m_study.priceScale().barPricesToCoordinates(this.m_bars,s),this.m_model.timeScale().barIndexesToCoordinates(this.m_bars),this.m_model.selection().isSelected(this.m_study)){var u=I(t,i);this._selectionData={points:[],hittestResult:h.REGULAR,isDark:this.m_model.isDark(),bgColor:this.m_model.backgroundColor().value(),visible:!0};for(var d=0;di){var s=n(e,i,t,r,o);return s.count=-s.count,s}return a(e,t,1,(function(e,t){return t>i||0!==r&&e>r}),o)}function o(e,t,i,r){void 0===r&&(r=!1);var n=i<0?-1:1;return a(e,t,n,(function(e,t){return e>=i*n}),r)}function s(e,t,i){var r=i<0?-1:1;return a(e,t,r,(function(e,t){return e>=i*r}),!0).times}function a(e,t,i,n,o){var s=0,a=t;e.moveTo(a);for(var l=0,c=Number.MAX_VALUE,u=!1,h=t,d=[];!n(s,a);){if(l>15)throw new Error("Internal error 0x10 while extrapolating.");var p=e.indexOfBar(a);if(p===r.SessionStage.PRE_SESSION&&1===i)a=e.startOfBar(0),e.moveTo(a);else if(p===r.SessionStage.PRE_SESSION&&-1===i)a=e.startOfBar(r.SessionStage.PRE_SESSION)-1,e.moveTo(a);else if(p===r.SessionStage.POST_SESSION&&1===i)a=e.startOfBar(r.SessionStage.POST_SESSION),e.moveTo(a);else{if(p===r.SessionStage.POST_SESSION&&-1===i)throw new Error("Internal error 0x12 while extrapolating.");var f=e.startOfBar(p);if(f>t&&i>0||t>f&&i<0){if(u&&c===f)throw new Error("Internal error 0x11 while extrapolating.");u=!0,c=f,l=0,s++,h=f,o&&d.push(h)}if(0===p&&-1===i)a=f-1;else{a=e.startOfBar(p+i);var _=e.startOfBar(r.SessionStage.POST_SESSION);a>_&&(e.moveTo(_),a=e.startOfBar(0))}}l++}return{time:h,times:d,count:s}}},IMMp:function(e){ e.exports=JSON.parse('{"color-bg-primary":"color-cold-gray-850","color-bg-primary-hover":"color-cold-gray-800","color-bg-secondary":"color-cold-gray-900","color-bg-highlight":"color-cold-gray-900","color-bg-scroll-buttons":"color-cold-gray-800","color-legacy-bg-scroll-buttons":"color-cold-gray-550","color-legacy-bg-widget":"color-cold-gray-900","color-text-primary":"color-cold-gray-200","color-text-secondary":"color-cold-gray-500","color-text-tertiary":"color-cold-gray-400","color-text-disabled":"color-cold-gray-650","color-divider":"color-cold-gray-700","color-divider-hover":"color-cold-gray-800","color-box-shadow":"color-black","color-active-hover-text":"color-gull-gray","color-alert-text":"color-loblolly","color-border":"color-bright-gray","color-border-chat-fields":"color-bright-gray","color-border-hover":"color-trout-1","color-border-table":"color-cold-gray-800","color-brand":"color-tv-blue-700","color-brand-active":"color-tv-blue-600","color-brand-hover":"color-tv-blue-600","color-button-hover-bg":"color-mirage-3","color-chart-page-bg":"color-cold-gray-800","color-common-tooltip-bg":"color-cold-gray-650","color-danger":"color-ripe-red-600","color-depthrenderer-fill-style":"color-catskill-white","color-depthrenderer-stroke-style":"color-trout-1","color-disabled-border-and-color":"color-ebony-clay","color-disabled-input":"color-bright-gray","color-empty-container-message":"color-slate-gray","color-highlight-new":"color-dark-slate-blue","color-icons":"color-slate-gray","color-input-bg":"color-charade","color-input-textarea-readonly":"color-trout-1","color-input-publish-bg":"color-mirage-1","color-item-active-blue":"color-blue-dianne","color-item-hover-active-bg":"color-charade","color-item-hover-bg":"color-ebony-clay","color-item-hover-blue":"color-blue-dianne","color-item-selected-blue":"color-blue-dianne","color-item-active-text":"color-cold-gray-200","color-item-active-bg":"color-tv-blue-700","color-link":"color-tv-blue-700","color-link-hover":"color-tv-blue-600","color-link-active":"color-tv-blue-600","color-list-item":"color-slate-gray","color-list-nth-child-bg":"color-mirage-3","color-news-highlight":"color-charade","color-pane-bg":"color-mirage-1","color-pane-secondary-bg":"color-cold-gray-850","color-placeholder":"color-trout-2","color-popup-menu-item-hover-bg":"color-cold-gray-800","color-popup-menu-separator":"color-cold-gray-700","color-row-hover-active-bg":"color-ebony-clay","color-sb-scrollbar-body-bg":"color-trout-2","color-screener-header-bg":"color-mirage-3","color-screener-header-bg-hover":"color-ebony-clay","color-screener-description":"color-loblolly","color-section-separator-border":"color-bright-gray","color-separator-table-chat":"color-bright-gray","color-success":"color-minty-green-700","color-success-hover":"color-minty-green-600","color-success-active":"color-minty-green-500","color-tag-active-bg":"color-bright-gray","color-tag-hover-bg":"color-charade","color-text-regular":"color-loblolly","color-toolbar-button-text":"color-cold-gray-500","color-toolbar-button-text-hover":"color-cold-gray-450","color-toolbar-button-text-active":"color-tv-blue-700","color-toolbar-button-text-active-hover":"color-tv-blue-600","color-toolbar-button-background-hover":"color-cold-gray-800","color-toolbar-button-background-secondary-hover":"color-cold-gray-750","color-toolbar-toggle-button-background-active":"color-tv-blue-700","color-toolbar-toggle-button-background-active-hover":"color-tv-blue-600","color-toolbar-interactive-element-text-normal":"color-cold-gray-300","color-toolbar-interactive-element-text-hover":"color-cold-gray-250","color-toolbar-opened-element-bg":"color-cold-gray-800","color-tooltip-bg":"color-bright-gray","color-tv-button-checked":"color-slate-gray","color-tv-dialog-caption":"color-athens-gray-2","color-tv-dropdown-item-hover-bg":"color-charade","color-underlined-text":"color-gull-gray","color-widget-pages-bg":"color-cold-gray-900","color-warning":"color-tan-orange-700","color-forex-icon":"color-white","color-list-item-active-bg":"color-medium-blue","color-list-item-hover-bg":"color-ebony-clay","color-list-item-text":"color-loblolly","color-price-axis-label-back":"color-cold-gray-800","color-price-axis-label-text":"color-cold-gray-500","color-price-axis-gear":"color-cold-gray-500","color-price-axis-gear-hover":"color-cold-gray-400","color-price-axis-highlight":"color-cold-gray-800","color-bid":"color-tv-blue-700","color-scroll-bg":"color-cold-gray-750","color-scroll-border":"color-cold-gray-850","color-widget-border":"color-cold-gray-800","color-scroll-buttons-arrow":"color-white","color-control-intent-default":"color-cold-gray-650","color-control-intent-success":"color-minty-green-600","color-control-intent-primary":"color-tv-blue-700","color-control-intent-warning":"color-tan-orange-500","color-control-intent-danger":"color-ripe-red-700","color-growing":"color-minty-green-600","color-falling":"color-ripe-red-600","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-500","color-replay-mode":"color-tv-blue-700","color-replay-mode-icon":"color-tv-blue-50","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-500","color-list-item-bg-highlighted":"color-tv-blue-a900","color-list-item-bg-selected":"color-tv-blue-a800"}') },IOzl:function(e,t,i){"use strict";i.r(t);var r,n=i("mrSG"),o=i("aO4+"),s=i("Eyy1"),a=i("2WC2"),l=i("gBDZ"),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype.setData=function(e,t){this._setBaseData(e,t);for(var i=0,r=this._items;i=0?e.vertOffset:e.vertOffset-e.shapeHeight},t}(c),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._calcBoundingBox=function(e){var t=e.x-e.shapeWidth/2,i=e.x+e.shapeWidth/2,r=e.y-e.shapeHeight+e.vertOffset,n=e.y+e.vertOffset,s=new o.Point(t,r),a=new o.Point(i,n);return Object(o.box)(s,a)},t.prototype._drawItemShape=function(e,t,i){var n=t.pixelRatio,o=this._lineWidth(t)%2?.5:0,s=Math.max(1,Math.floor(n))%2?.5:0,a=this._getArrowSize(i),l=Math.round(a*n);(s+l)%1!=o%1&&(l+=.5);var c=Math.round(i.shapeWidth/2*n);(s+c)%1!=o%1&&(c+=.5);var u=Math.round(i.x*n)+s,h=Math.round((i.y+i.vertOffset)*n)+o,d=u+l,p=Math.round((i.y+i.vertOffset-a)*n)+o,f=u-l,_=u+c,m=Math.round((i.y+i.vertOffset-i.shapeHeight)*n)+o,y=u-c;e.moveTo(d,p),e.lineTo(u,h),e.lineTo(f,p),i.shapeWidth<=2*a?(e.lineTo(y,p),this._drawCorner(e,y,m,r.leftUp,n),this._drawCorner(e,_,m,r.rightUp,n),e.lineTo(_,p)):(this._drawCorner(e,y,p,r.leftDown,n),this._drawCorner(e,y,m,r.leftUp,n),this._drawCorner(e,_,m,r.rightUp,n),this._drawCorner(e,_,p,r.rightDown,n)),e.lineTo(d,p)},t.prototype._getVerticalTextOffset=function(e){return-e.shapeHeight/2-this._getArrowSize(e)/2},t.prototype._calcVertOffset=function(e){return Math.sign(e.vertOffset)<=0?e.vertOffset:e.vertOffset+e.shapeHeight},t}(c),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._calcBoundingBox=function(e){var t=e.x,i=e.x+e.shapeWidth,r=e.y-e.shapeHeight/2+e.vertOffset,n=e.y+e.shapeHeight/2+e.vertOffset,s=new o.Point(t,r),a=new o.Point(i,n);return Object(o.box)(s,a)},t.prototype._drawItemShape=function(e,t,i){var n=t.pixelRatio,o=this._lineWidth(t)%2?.5:0,s=this._getArrowSize(i),a=this._hasText(i),l=a?i.shapeHeight/2:s,c=Math.round(i.x*n)+o,u=Math.round((i.y+i.vertOffset)*n)+o,h=Math.round((i.x+s)*n)+o,d=Math.round((i.y+i.vertOffset+s)*n)+o,p=Math.round((i.y+i.vertOffset-s)*n)+o,f=Math.round((i.y+i.vertOffset-l)*n)+o,_=Math.round((i.x+i.shapeWidth)*n)+o,m=Math.round((i.y+i.vertOffset+l)*n)+o;e.moveTo(h,d),e.lineTo(c,u),e.lineTo(h,p),a?this._drawCorner(e,h,f,r.leftUp,n):e.lineTo(h,f),this._drawCorner(e,_,f,r.rightUp,n),this._drawCorner(e,_,m,r.rightDown,n),a?this._drawCorner(e,h,m,r.leftDown,n):e.lineTo(h,m),e.lineTo(h,d)},t.prototype._getHorizontalTextOffset=function(e){return e.shapeWidth/2+this._getArrowSize(e)/2},t}(c),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._calcBoundingBox=function(e){var t=e.x-e.shapeWidth,i=e.x,r=e.y-e.shapeHeight/2+e.vertOffset,n=e.y+e.shapeHeight/2+e.vertOffset,s=new o.Point(t,r),a=new o.Point(i,n);return Object(o.box)(s,a)},t.prototype._drawItemShape=function(e,t,i){ var n=t.pixelRatio,o=this._lineWidth(t)%2?.5:0,s=this._getArrowSize(i),a=this._hasText(i),l=a?i.shapeHeight/2:s,c=Math.round(i.x*n)+o,u=Math.round((i.y+i.vertOffset)*n)+o,h=Math.round((i.x-s)*n)+o,d=Math.round((i.y+i.vertOffset-s)*n)+o,p=Math.round((i.y+i.vertOffset+s)*n)+o,f=Math.round((i.y+i.vertOffset-l)*n)+o,_=Math.round((i.x-i.shapeWidth)*n)+o,m=Math.round((i.y+i.vertOffset+l)*n)+o;e.moveTo(h,d),e.lineTo(c,u),e.lineTo(h,p),a?this._drawCorner(e,h,m,r.rightDown,n):e.lineTo(h,m),this._drawCorner(e,_,m,r.leftDown,n),this._drawCorner(e,_,f,r.leftUp,n),a?this._drawCorner(e,h,f,r.rightUp,n):e.lineTo(h,f),e.lineTo(h,d)},t.prototype._getHorizontalTextOffset=function(e){return-e.shapeWidth/2-this._getArrowSize(e)/2},t}(c),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._calcBoundingBox=function(e){var t=e.x-e.shapeWidth/2,i=e.x+e.shapeWidth/2,r=e.y-e.shapeHeight/2+e.vertOffset,n=e.y+e.shapeHeight/2+e.vertOffset,s=new o.Point(t,r),a=new o.Point(i,n);return Object(o.box)(s,a)},t.prototype._drawItemShape=function(e,t,i){var n=t.pixelRatio,o=this._lineWidth(t)%2?.5:0,s=i.shapeHeight/2,a=i.shapeWidth/2,l=Math.round(i.x*n)+o,c=Math.round((i.x-a)*n)+o,u=Math.round((i.x+a)*n)+o,h=Math.round((i.y+i.vertOffset-s)*n)+o,d=Math.round((i.y+i.vertOffset+s)*n)+o;e.moveTo(l,h),this._drawCorner(e,u,h,r.rightUp,n),this._drawCorner(e,u,d,r.rightDown,n),this._drawCorner(e,c,d,r.leftDown,n),this._drawCorner(e,c,h,r.leftUp,n),e.lineTo(l,h)},t}(c)},IVMC:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.reduce((function(e,t,i){return~e.indexOf(t)||e.push(t),e}),[])},e.exports=t.default},IWXC:function(e,t,i){"use strict";i.r(t),i.d(t,"getQuoteSessionInstance",(function(){return s})),i.d(t,"setQuoteSessionInstance",(function(){return a})),i.d(t,"getQuoteSessionNoEnsure",(function(){return l})),i.d(t,"destroyQuoteSessions",(function(){return c}));var r=i("hGf4"),n=i.n(r),o={};function s(e){return void 0===e&&(e="full"),o[e]||a(e,new n.a(e)),o[e]}function a(e,t){void 0===e&&(e="full"),o[e]=t}function l(e){return void 0===e&&(e="full"),o[e]}function c(){for(var e in o)if(o.hasOwnProperty(e)){var t=o[e];void 0!==t&&t.destroy(),delete o[e]}}},Ialn:function(e,t,i){"use strict";i.r(t),i.d(t,"isRtl",(function(){return n})),i.d(t,"stripLTRMarks",(function(){return s})),i.d(t,"startWithLTR",(function(){return a})),i.d(t,"forceLTRStr",(function(){return l})),i.d(t,"forceLTRStrSsr",(function(){return c})),i.d(t,"forceRTLStr",(function(){return u})),i.d(t,"getLTRScrollLeft",(function(){return h})),i.d(t,"getLTRScrollLeftOffset",(function(){return d})),i.d(t,"detectAutoDirection",(function(){return _}));var r=i("oYVD"),n=function(){return"rtl"===window.document.dir},o=new RegExp("‎|‪|‫|‬","g");function s(e){return""!==e&&n()&&null!=e?e.replace(o,""):e}function a(e){return""!==e&&n()&&null!=e?"‎"+e:e}function l(e){return""!==e&&n()&&null!=e?"‪"+e+"‬":e}function c(e){return"‪"+e+"‬"}function u(e){return""!==e&&n()&&null!=e?"‫"+e+"‬":e} function h(e){return Object(r.getNormalizedScrollLeft)(e,"rtl")}function d(e,t){var i=Object(r.detectScrollType)();if("indeterminate"===i)return 0;switch(i){case"negative":t=e.clientWidth-e.scrollWidth+t;break;case"reverse":t=e.scrollWidth-e.clientWidth-t}return t}var p=/[^\u0000-\u0040\u005B-\u0060\u007B-\u00BF\u00D7\u00F7\u02B9-\u02FF\u2000-\u200E\u2010-\u2029\u202C\u202F-\u2BFF]/,f=/[\u0590-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC]/;function _(e){var t=p.exec(e);return t?f.test(t[0])?"rtl":"ltr":""}},IcDj:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyBase",(function(){return d}));var r=i("mrSG"),n=(i("Eyy1"),i("aIyQ")),o=i.n(n),s=i("7ktv"),a=i("5fI3"),l=i("jy4L"),c=i("YWnQ"),u=i("/tGj"),h=window.t("Invalid Symbol"),d=function(e){function t(i,r,n,s){var a=e.call(this,i)||this;return a.onStart=new o.a,a._symbolsResolved=new o.a,a._statusChanged=new o.a,a._paneViews=[],a._resolvedSymbols={},a._isChildStudy=!1,a._loading=!0,a._failed=!1,a._status="",a._studyId=null,a._chartApi=i.chartApi(),a._properties=r,a._metaInfo=s,a._series=a._model.mainSeries(),n instanceof t?(a._source=n,a._isChildStudy=!0,a._source.setChild(a),a._source.currencyChanged().subscribe(a,a._onSourceCurrencyChanged)):a._series.currencyChanged().subscribe(a,a._onSourceCurrencyChanged),a}return Object(r.__extends)(t,e),t.prototype.destroy=function(){this._source&&this._source.currencyChanged().unsubscribeAll(this),this._series&&this._series.currencyChanged().unsubscribeAll(this)},t.prototype.isSymbolInvalid=function(){return this._status===h},t.prototype.getSymbolString=function(e){return Object(a.encodeExtendedSymbol)(this._getSymbolObject(e))},t.prototype.onStatusChanged=function(){return this._statusChanged},t.prototype.symbolsResolved=function(){return this._symbolsResolved},t.prototype._allSymbolsAreResolved=function(){for(var e=this,t=[],i=this.metaInfo(),r=0;r=this._sessionEndMs?u.SessionStage.POST_SESSION:d(r.time_seconds_diff(e,this._sessionStartMs)/this._periodSec)},t.prototype.startOfBar=function(e){if(e===u.SessionStage.PRE_SESSION){var t=r.get_cal_from_unix_timestamp_ms(this._session.timezone,this._sessionStartMs-1),i=this._session.spec.alignToNearestSessionEnd(t,-1);return r.cal_to_utc(this._session.timezone,i)}if(e===u.SessionStage.POST_SESSION)return this._sessionEndMs;if(e<0)throw new Error("Negative offset is not supported");return this._sessionStartMs+r.time_seconds(this._periodSec*e)},t.prototype.endOfBar=function(e){if(e<0)throw new Error("Index cannot be negative");var t=this.startOfBar(e)+1e3*this._periodSec;return t>this._sessionEndMs?this._sessionEndMs:t},t.prototype.isLastBar=function(e,t){return t>=this._sessionStartMs+r.time_seconds(this._periodSec*(e+1)-1)},t.prototype.moveTo=function(e){ var t=this._session.timezone,i=r.utc_to_cal(t,e),n=this._session.spec.alignToSessionStart(i);this._sessionStartMs=r.cal_to_utc(t,i),r.add_minutes(i,n),this._sessionEndMs=r.cal_to_utc(t,i)},t.prototype.moveNext=function(){this.moveTo(this._sessionEndMs)},t}(f),m=i("OBgQ");function y(e,t){var i=r.clone(t),n=e.businessDaysToCalendarDays(i,1);n>1&&r.add_date(i,n-1);var o=e.leftBorderOfDailyBar(i);if(null===o)throw new Error("Cannot calculate left border of daily bar");return r.cal_to_utc(r.get_timezone(e.timezone()),o)}var g=function(e){function t(t,i,r,n,o){void 0===o&&(o=!1);var s=e.call(this)||this;return s._periodStart=-Number.MAX_VALUE,s._periodEnd=-Number.MAX_VALUE,s._periodLastBarStart=-Number.MAX_VALUE,s._periodStartDay=new m.a(0,0,0),s._periodEndDay=new m.a(0,0,0),s._period=r,s._sessionTgt=t,s._builder=n,s._useBusinessDays=o,s._sessionSrc=o?new p("Etc/UTC","24x7"):i||t,s}return Object(c.__extends)(t,e),t.prototype.builder=function(){return this._builder},t.prototype.alignTimeIfPossible=function(e){return this.tradingDayToSessionStart(e)},t.prototype.tradingDayToSessionStart=function(e){return this.moveTo(e),this.startOfBar(0)},t.prototype.indexOfBar=function(e){if(this._useBusinessDays){var t=m.a.fromCalendar(r.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e));return t.before(this._periodStartDay)?u.SessionStage.PRE_SESSION:this._periodEndDay.before(t)?u.SessionStage.POST_SESSION:0}return e=this._periodEnd?u.SessionStage.POST_SESSION:0},t.prototype.startOfBar=function(e){if(e===u.SessionStage.PRE_SESSION){var t=r.get_cal_from_unix_timestamp_ms(this._sessionTgt.timezone,this._periodStart-1),i=this._sessionTgt.spec.alignToNearestSessionEnd(t,-1);return r.cal_to_utc(this._sessionTgt.timezone,i)-1}return e===u.SessionStage.POST_SESSION||e>0?this._periodEnd:e===u.SessionStage.LASTBAR_SESSION?this._periodLastBarStart:this._periodStart},t.prototype.moveTo=function(e){var t=r.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e);this._sessionSrc.spec.correctTradingDay(t);var i=r.get_year(t),n=this._indexOfPeriodInYear(t),o=n+this._period,s=this._sessionTgt.spec,a=this._sessionTgt.timezone,l=this._builder.startOfPeriod(a,n,i);this._periodStart=y(s,l);var c=r.clone(l),u=s.businessDaysToCalendarDays(c,1);u>1&&r.add_date(c,u-1),this._periodStartDay=m.a.fromCalendar(c);var h=this._builder.startOfPeriod(a,o,i);this._periodEnd=y(s,h);var d=r.clone(h);for(r.add_date(d,-1);s.isCalWeekEnd(d);)r.add_date(d,-1);this._periodEndDay=m.a.fromCalendar(d),r.add_date(h,-1),function(e,t){for(;e.isCalWeekEnd(t);)r.add_date(t,-1)}(this._sessionTgt.spec,h),this._periodLastBarStart=y(s,h),(this._periodLastBarStart=this._periodLastBarStart},t.prototype.currentRange=function(){ return{from:this._periodStartDay,to:this._periodEndDay}},t.prototype.indexOfBarInYear=function(e){var t=r.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e),i=r.get_year(t),n=this._builder.indexOfPeriod(t),o=this._sessionTgt.timezone,s=this._builder.startOfPeriod(o,n,i),a=y(this._sessionTgt.spec,s);return s=r.get_cal_from_unix_timestamp_ms(r.get_timezone("Etc/UTC"),a),i=0&&(n-=7),d((n+i)/7))}var b=function(){function e(){}return e.prototype.indexOfPeriod=function(e){return r.get_day_of_year(e)-1},e.prototype.startOfPeriod=function(e,t,i){var n=r.days_per_year(i);return r.get_cal(r.get_timezone("Etc/UTC"),i,r.JANUARY,1+Math.min(t,n))},e}(),w=function(e){function t(t){var i=e.call(this)||this;return i._sessionsSpec=t,i}return Object(c.__extends)(t,e),t.prototype.indexOfPeriod=function(t){return e.prototype.indexOfPeriod.call(this,t)-function(e,t){var i=S(e,t),n=r.get_cal(r.get_timezone("Etc/UTC"),r.get_year(t),r.JANUARY,1);r.add_date(n,7*i);var o=i*e.weekEndsCount()+e.holidaysFromYearStart(n),s=r.get_day_of_year(t)-r.get_day_of_year(n);return o+s-e.calendarDaysToBusinessDays(n,s)}(this._sessionsSpec,t)},t.prototype.startOfPeriod=function(t,i,n){var o=7-this._sessionsSpec.weekEndsCount(),s=Math.max(0,d(i/o)-1),a=r.get_cal(r.get_timezone("Etc/UTC"),n,r.JANUARY,1),l=r.get_days_per_year(a);if(r.add_date(a,7*s),(i-=o*s-this._sessionsSpec.holidaysFromYearStart(a))>0){var c=this._sessionsSpec.businessDaysToCalendarDays(a,i);r.add_date(a,c)}var u=r.get_day_of_year(a)-1;return nr.get_days_per_year(n)?this.startOfPeriod(e,0,i+1):(r.add_date(n,s),n)},e}(),x=function(){function e(){}return e.prototype.indexOfPeriod=function(e){return r.get_month(e) },e.prototype.startOfPeriod=function(e,t,i){if(t<0){var n=d((11-t)/12);i-=n,t+=12*n}else t>r.DECEMBER&&(i++,t=r.JANUARY);return r.get_cal(r.get_timezone("Etc/UTC"),i,t,1)},e}();function T(e,t,i,r){void 0===r&&(r=!1);var n=o.Interval.parse(e),s=n.multiplier();return n.kind()===o.ResolutionKind.Minutes?new _(60*s,t):n.kind()===o.ResolutionKind.Seconds?new _(s,t):n.kind()===o.ResolutionKind.Range?new _(60*s,t):new g(t,i,s,function(e,t){switch(e){case o.ResolutionKind.Days:return new P(t);case o.ResolutionKind.Weeks:return new C(t);case o.ResolutionKind.Months:return new x}throw new Error("Unknown dwm resolution: "+e)}(n.kind(),t),r)}function L(e,t,i,r,n,a,l){var c,u,h=new p("Etc/UTC",e,t,i),d=o.Interval.parse(n+r),f=d.isDWM();f?(u=s(d,l),c=864e5):(u=d.inMilliseconds(),c=60*h.spec.findSession(0,0,0).getEntry().length()*1e3);var _=c/u,m=(f?7:7-h.spec.weekEndsCount())*_;return as.startOffset()+s.length()&&n===s.dayOfWeek()-1&&(n++,o-=1440),n===s.dayOfWeek()&&o>=s.startOffset()&&o0&&e.stroke(),this._data.fillBackground&&(e.fillStyle=this.getColor(),e.fill())}},e}()},InMJ:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("Ocx9").DefaultProperty,o=i("hayr").propertyPages,s=window.t("Flat Bottom");function a(e,t){this._constructor="LineToolFlatBottom";var n=t||a.createProperties();r.call(this,e,n),this.version=a.version,i.e("lt-pane-views").then(function(e){var t=i("gr7S").FlatBottomPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,r),a.version=1,a.prototype.pointsCount=function(){return 3},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Flat Bottom"},a.prototype.hasEditableCoordinates=function(){return!1},a.prototype.addPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),r.prototype.addPoint.call(this,e)},a.prototype.setLastPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),r.prototype.setLastPoint.call(this,e)},a.prototype.setPoint=function(e,t,i){if(i&&i.shift()&&1===e){this._snapPoint45Degree(t,this.points()[0])}if(2===e)this._points[1].index=t.index;else if(3===e)return this._points[0].index=t.index,void(this._points[2].price=t.price);r.prototype.setPoint.call(this,e,t)},a.prototype.canHasAlert=function(){return!0},a.prototype._getAlertPlots=function(){var e=this._points[0],t=this._points[1],i=[];e.index<=t.index?(i.push(e),i.push(t)):(i.push(t),i.push(e));var r=this._points[2];r.time=t.time,r.index=t.index;var n,o,s,a,l={price:r.price,time:e.time,index:e.index},c=[];r.index<=l.index?(c.push(r),c.push(l)):(c.push(l),c.push(r)),i[0].price>c[0].price?(n=i,o=c):c[0].price>i[0].price||c[1].price>i[1].price?(n=c,o=i):(n=i,o=c);var u=this.properties().extendLeft.value(),h=this.properties().extendRight.value();return e.index<=t.index?(s=u,a=h):(s=h,a=u), [this._linePointsToAlertPlot(n,"Upper",s,a),this._linePointsToAlertPlot(o,"Lower",u,a)]},a.prototype.getInputsPropertyPage=function(){return null},a.prototype.getStylesPropertyPage=function(){return o.LineToolFlatBottomStylesPropertyPage},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("vm8R").GeneralTrendFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetoolflatbottom",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolFlatBottom=a},IzGk:function(e,t,i){"use strict";i.r(t),i.d(t,"translatedIntervalString",(function(){return n}));i("YFKU");var r=i("pPtI");function n(e){var t=Object(r.getTranslatedResolutionModel)(e,!0);return null===t?e:t.multiplier+(t.mayOmitShortKind?"":t.shortKind)}},J2xC:function(e,t,i){e.exports={"css-value-header-toolbar-height":"38px"}},JOqt:function(e,t,i){"use strict";i.r(t),i.d(t,"debounce",(function(){return r}));var r=function(e,t){var i,r,n=0;function o(){e.apply(r,i)}return function(){r=this,i=arguments,clearTimeout(n),n=setTimeout(o,t)}}},JT5O:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyMarket",(function(){return o}));var r=i("aIyQ"),n=i.n(r),o=function(){function e(e,t){this.visibilityChanged=new n.a,this._dialogPromise=null,this._dialog=null,this._chartWidgetCollection=e,this._options=t}return e.prototype.isVisible=function(){return null!==this._dialog&&this._dialog.isVisible()},e.prototype.show=function(e){var t;null===this._dialog&&this._requestDialog(e),null===(t=this._dialog)||void 0===t||t.open(e)},e.prototype.hide=function(){var e;null===(e=this._dialog)||void 0===e||e.hide()},e.prototype.onCustomScriptModified=function(){var e;null===(e=this._dialog)||void 0===e||e.updateUserStudies()},e.prototype.resetAllPages=function(){var e;null===(e=this._dialog)||void 0===e||e.resetAllStudies()},e.prototype._requestDialog=function(e){var t=this;if(null===this._dialogPromise){var r=void 0;r=Promise.all([i.e("react"),i.e(3),i.e(4),i.e(6),i.e(7),i.e(9),i.e(11),i.e(16),i.e(32),i.e(63),i.e(64),i.e(72),i.e(0),i.e(5),i.e(13),i.e("study-market")]).then(i.bind(null,"zbLM")).then((function(e){return new e.IndicatorsLibraryContainer(t._chartWidgetCollection,t._options)})),this._dialogPromise=r.then((function(i){t._dialog=i,t._dialog.getVisibilityChanged().subscribe(null,(function(e){t.visibilityChanged.fire(e)})),t._dialog.open(e)}))}return this._dialogPromise},e}()},JcHK:function(e,t,i){"use strict";function r(e){return e.getAll().some((function(e){return e.isInitialized()}))}function n(e,t){var i=e.getAll(),r=function(){t(),i.forEach((function(e){e.chartWidgetInitialized.unsubscribe(null,r)}))};i.forEach((function(e){e.chartWidgetInitialized.subscribe(null,r,!0)}))}i.r(t),i.d(t,"isAnyChartWidgetInitialized",(function(){return r})),i.d(t,"waitAnyChartWidgetInitialized",(function(){return n}))},JjUe:function(e,t,i){"use strict";i.r(t), i.d(t,"OverlayDataWindowView",(function(){return S}));var r=i("mrSG"),n=i("ivNn"),o=i("4miz"),s=i("GH0z"),a=i("k9/m"),l=i("7qT/"),c=i("Ialn"),u=i("qFKp"),h=i("38az"),d=i("e92V"),p=i("mMWL"),f=i("Tmoa"),_=u.CheckMobile.any(),m=_&&!0,y=new s.PercentageFormatter,g=window.t("n/a"),v=g+" ("+g+"%)",S=function(e){function t(t,i){var r=e.call(this)||this;return r._invalidated=!0,r._study=t,r._model=i,r._items.push(new o.a(window.t("Open"),"")),r._items.push(new o.a(window.t("High"),"")),r._items.push(new o.a(window.t("Low"),"")),r._items.push(new o.a(window.t("Close"),"")),r._items.push(new o.a("","")),r._items.push(new o.a("","")),r._items.push(new o.a(window.t("Change"),"")),r.update(),r}return Object(r.__extends)(t,e),t.prototype.items=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items},t.prototype.update=function(){this._invalidated=!0},t.prototype._updateImpl=function(){if(this._header=this._study.title(),this._items[0].setValue(g),this._items[1].setValue(g),this._items[2].setValue(g),this._items[3].setValue(g),this._items[6].setValue(v),!this._model.timeScale().isEmpty()&&0!==this._study.data().size()){for(var e=this._showLastPriceAndChangeOnly(),t=0,i=this._items;t=0?0:1,basedOnPrevClose:n.change>=0?0:1}}}else{var o=this._study.data().search(i-1,a.PlotRowSearchMode.NearestLeft,1),s=o&&o.value[4]||null;if(null!==s)return{values:{change:e-s,percentChange:Object(l.a)(s,e)},priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=s?0:1}}}return{priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=t?0:1}}},t.prototype._color=function(e,t,i){ var r=Object(f.resetTransparency)(h.SeriesBarColorer.upColor(this._study.properties())),n=Object(f.resetTransparency)(h.SeriesBarColorer.downColor(this._study.properties()));if(i&&!m)return t.priceDirection?r:n;var o=this._study.properties().childs().style.value();if(10===o){var s=this._study.barColorer().barStyle(e,!1);return null!=s.barBorderColor?Object(f.resetTransparency)(s.barBorderColor):Object(f.resetTransparency)(s.barColor)}var a=!1;return 0===o?a=this._study.properties().childs().barStyle.childs().barColorsOnPrevClose.value():1===o?a=this._study.properties().childs().candleStyle.childs().barColorsOnPrevClose.value():9===o&&(a=!0),a?0===t.priceDirection.basedOnPrevClose?r:n:0===t.priceDirection.basedOnCurrentBar?r:n},t}(o.b)},JmuD:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)},t.hasProperty=function(e,t){return t in e}},K4L1:function(e,t,i){"use strict";var r=i("Eyy1").assert,n=i("lCO3").Version,o=i("uOxu").getLogger("Chart.Study.Versioning"),s=i("Wt0y"),a=i("0YCj"),l=i("TcSq").extractPineId,c=i("Si3H").migrateMetaInfoAndPropState;function u(e,t){if(!e)throw new Error("No studies metainfo");var r=i("EyEd");if(this._studiesMetainfo=e,!t)throw new Error("No studies migrations");this._studiesMigrations=t,this._migrations={};for(var n=0;n=22)return t;for(var i={},r=0,n=0;;){var o=t[n];if(void 0===o)break;var s=t[o.id];o.isFake&&(o.id="in_"+r++),i[n]=o,i[o.id]=s,n++}return i}]}u.prototype.updateMetaInfo=function(e){if(!e)return e;r(!e.isTVScript,"This method should update only built-in java indicators metaInfo. For Pine indicators use updateMetaInfoAsync");for(var t=null,i=this._studiesMetainfo,n=0;n=12&&l<=26){var c={};for(s=0;s=12&&c<=26){var h=n.columns;n.columns=[];for(var d=0;dt&&o.logWarn("Bad integer input max value in metaInfo id="+e.id+" title="+e.description))}},u._fixInputsMaxValue=function(e,t){if(!TradingView.isAbsent(t)){var i=u.INPUT_MAX_VALUE;if(t.inputs)for(var r=0;ri&&(a.max=i))}if(e&&e.inputs){var n=u.splitInputs(e.inputs),o=n.arr;for(var s in o){var a;"integer"===(a=o[s]).type&&(a.max&&a.max>i&&(a.max=i))}e.inputs=TradingView.merge(n.obj,n.arr)}}}, u.prototype.patchPropsStateAndMetaInfo=function(e,t,i){"Script$BOOKER"!==t.productId||t.alerts||delete e.alerts,u._fixInputsOrder(e,t),u._fixInputsMaxValue(e,t);var r=u.splitInputs(e.inputs);e.inputs=r.obj;var n=a.versionOf(t);ni&&(i=n))}e[i+1]=t},u.splitInputs=function(e){var t={},i={};for(var r in e)isNumber(parseInt(r,10))?t[r]=e[r]:i[r]=e[r];return{arr:t,obj:i}},u.findInputKeyById=function(e,t){var i=null;for(var r in e)if(isNumber(parseInt(r,10))&&e[r].id===t){i=r;break}return i},u.getInputKeyById=function(e,t){var i=u.findInputKeyById(e,t);if(!i)throw new Error("Cannot find input with id: "+t);return i},e.exports=u},K8V9:function(e,t){e.exports=''},K9GE:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dur=350,t.easingFunc={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:(4-2*e)*e-1},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){ return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};var r=function(){function e(e,t,i,r){this._mX1=e,this._mY1=t,this._mX2=i,this._mY2=r}return e.prototype.easingFunc=function(e){return this._mX1===this._mY1&&this._mX2===this._mY2?e:this._calcBezier(this._getTForX(e))},e.prototype._a=function(e,t){return 1-3*t+3*e},e.prototype._b=function(e,t){return 3*t-6*e},e.prototype._c=function(e){return 3*e},e.prototype._calcBezier=function(e){return((this._a(this._mY1,this._mY2)*e+this._b(this._mY1,this._mY2))*e+this._c(this._mY1))*e},e.prototype._getSlope=function(e){return 3*this._a(this._mX1,this._mX2)*e*e+2*this._b(this._mX1,this._mX2)*e+this._c(this._mX1)},e.prototype._getTForX=function(e){for(var t=e,i=0;i<4;++i){var r=this._getSlope(t);if(0===r)return t;t-=(this._calcBezier(t)-e)/r}return t},e}();t.CubicBezier=r,t.color={black0:"#000",black20:"#2b2d36",black25:"#2b2e37",black27:"#2f3241",black30:"#212121",black70:"#4A4A4A",black80:"#535353",black100:"#646464",black110:"#757575",black140:"#8A8A8A",black170:"#ADAEB0",black180:"#b4b4b4",black200:"#C8C8C8",black220:"#DADDE0",black230:"#ECECEC",black240:"#F2F2F2",black248:"#F8F8F8",black255:"#FFF",brand:"#3BB3E4",brandHover:"#3BABD8",brandActive:"#3898C2",brandDown:"#049DDC",brand220:"#3BB3E0",brand255:"#3BB3FF",brandNew:"#37A6EF",brandNew2:"#2196F3",spinner:"#00A2E2",brandMedium80:"#3C4650",brandMedium90:"#465a6e",brandMedium100:"#627384",brandMedium120:"#758696",brandMedium150:"#94959C",brandMedium190:"#9DB2BD",brandMedium220:"#E9EFF2",brandMedium230:"#EAECEF",brandMedium240:"#F1F3F6",brandDark:"#2A2C39",brandDark50:"#252733",brandDark45:"#20222D",brandDarkText:"#6A6B74",danger:"#FF4A68",dangerHover:"#F24965",dangerDown:"#FF173E",success:"#3CBC98",success55:"#37BC9B",success250:"#00FFC0",successHover:"#38B395",successDown:"#00A97F",attention:"#FFC84A",attention50:"#F89E30",growing:"#37bc9b",falling:"#ff4a68"}},KUek:function(e,t,i){"use strict";i.r(t);var r,n,o=i("Eyy1"),s=i("aIyQ"),a=i.n(s),l=i("k9/m"),c=i("hsV8"),u=i("jy4L"),h=i("w4Ji"),d=i("jenN"),p=i("uOxu"),f=Object(p.getLogger)("Chart.StudyDataSource");!function(e){e[e.Undefined=0]="Undefined",e[e.Loading=1]="Loading",e[e.Completed=2]="Completed",e[e.Error=3]="Error"}(r||(r={})),function(e){e[e.Idle=0]="Idle",e[e.AwaitingConnection=1]="AwaitingConnection",e[e.AwaitingParent=2]="AwaitingParent",e[e.AwaitingFirstDataUpdate=3]="AwaitingFirstDataUpdate",e[e.Active=4]="Active"}(n||(n={}));var _=function(){function e(e,t,i,o){this._inputs=null,this._status=n.Idle,this._studyId=null,this._turnaroundCounter=1,this._studyStatus={type:r.Undefined},this._studyStatusChanged=new a.a,this._graphics=new d.LiveStudyGraphics,this._dataCleared=new a.a,this._dataUpdated=new a.a, this._boundOnGatewayIsConnectedChanged=this._onGatewayIsConnectedChanged.bind(this),this._ongoingDataUpdate=Promise.resolve(),this._gateway=e,this._metaInfo=o,this._series=t,this._turnaroundPrefix=i,this._plots=new l.PlotList(Object(h.studyPlotFunctionMap)(o),h.studyEmptyPlotValuePredicate),this._gateway.isConnected().subscribe(this._boundOnGatewayIsConnectedChanged)}return e.prototype.destroy=function(){this.stop(),this._gateway.isConnected().unsubscribe(this._boundOnGatewayIsConnectedChanged),this._dataUpdated.destroy(),this._dataCleared.destroy(),this._studyStatusChanged.destroy()},e.prototype.metaInfo=function(){return this._metaInfo},e.prototype.inputs=function(){return this._inputs},e.prototype.setInputs=function(e){this._inputs=e,null!==this._studyId&&(this._turnaroundCounter++,this._onStudyStatusChangedTo({type:r.Undefined}),this._gateway.modifyStudy(this._studyId,this._turnaround(),e,this._onMessage.bind(this)),this._status===n.Active&&this._changeStatusTo(n.AwaitingFirstDataUpdate))},e.prototype.isStarted=function(){return this._status!==n.Idle},e.prototype.isActive=function(){return this._status===n.Active},e.prototype.start=function(){this.isStarted()?f.logNormal("start: data source is already started, nothing to do"):(Object(o.assert)(null!==this._inputs,"Inputs should be defined when starting a study data source"),this._gateway.isConnected().value()?this._createStudy():this._changeStatusTo(n.AwaitingConnection))},e.prototype.stop=function(){this.isStarted()?(null!==this._studyId&&(this._gateway.removeStudy(this._studyId),this._studyId=null,this._onStudyStatusChangedTo({type:r.Undefined})),this._changeStatusTo(n.Idle)):f.logNormal("stop: data source is already stopped, nothing to do")},e.prototype.studyId=function(){return this._studyId},e.prototype.studyStatus=function(){return this._studyStatus},e.prototype.studyStatusChanged=function(){return this._studyStatusChanged},e.prototype.plots=function(){return this._plots},e.prototype.graphics=function(){return this._graphics},e.prototype.clearData=function(){this._plots.clear(),this._graphics.clear(),this._dataCleared.fire()},e.prototype.stopAndStealData=function(){Object(o.assert)(this._status===n.Active,"Couldn't steal data from non-active data source"),this.stop();var e=this._plots,t=this._graphics.extract();return this._plots=new l.PlotList(Object(h.studyPlotFunctionMap)(this._metaInfo),h.studyEmptyPlotValuePredicate),{plots:e,graphics:t}},e.prototype.dataCleared=function(){return this._dataCleared},e.prototype.dataUpdated=function(){return this._dataUpdated},e.prototype._changeStatusTo=function(e){Object(o.assert)(this._status!==e,"Source and destination status should be distinct"),f.logNormal("Status changed from "+n[this._status]+" to "+n[e]),this._status=e},e.prototype._createStudy=function(){var e=this._series.seriesId();null!=e?this._createStudyUsingParentId(e):(this._changeStatusTo(n.AwaitingParent),this._series.dataEvents().completed().subscribe(this,this._onSeriesCompleted,!0))},e.prototype._createStudyUsingParentId=function(e){ Object(o.assert)(this._status!==n.Active,'Status should not be "Active" when creating a study'),Object(o.assert)(this._studyStatus.type===r.Undefined,'Study status should be "Undefined" when creating a study'),Object(o.assert)(null===this._studyId,"Study id should be empty when creating a study"),this._studyId=Object(u.makeNextStudyId)(),this._gateway.createStudy(this._studyId,this._turnaround(),e,this._metaInfo.fullId+"!",Object(o.ensureNotNull)(this._inputs),this._onMessage.bind(this)),this._changeStatusTo(n.AwaitingFirstDataUpdate)},e.prototype._onGatewayIsConnectedChanged=function(e){e?this._onGatewayConnected():this._onGatewayDisconnected()},e.prototype._onGatewayConnected=function(){this._status===n.AwaitingConnection&&this._createStudy()},e.prototype._onGatewayDisconnected=function(){this._status!==n.Idle&&this._status!==n.AwaitingConnection&&(this._studyId=null,this._changeStatusTo(n.AwaitingConnection),this._studyStatus.type!==r.Undefined&&this._onStudyStatusChangedTo({type:r.Undefined})),this._turnaroundCounter=1},e.prototype._onSeriesCompleted=function(){this._status===n.AwaitingParent&&this._createStudyUsingParentId(Object(o.ensure)(this._series.seriesId()))},e.prototype._onStudyStatusChangedTo=function(e){var t=this._studyStatus;this._studyStatus=e,f.logNormal("Study status type changed from "+r[t.type]+" to "+r[e.type]),this._studyStatusChanged.fire(t,e)},e.prototype._onMessage=function(e){if("data_update"===e.method){var t=e.params,i=t.customId,r=t.turnaround,n=t.plots,o=t.nonseries;i===this._studyId&&this._checkTurnaround(r)&&this._onDataUpdate(n,o)}else if("study_loading"===e.method){var s=e.params,a=(i=s[0],r=s[1],s[2]);i===this._studyId&&this._checkTurnaround(r)&&this._onStudyLoading(a)}else if("study_completed"===e.method){var l=e.params;i=l[0],r=l[1],a=l[2];i===this._studyId&&this._checkTurnaround(r)&&this._onStudyCompleted(a)}else if("study_error"===e.method){var c=e.params,u=(i=c[0],r=c[1],c[2]),h=c[3];a=c[4];i===this._studyId&&this._checkTurnaround(r)&&this._onStudyError(u,h,a)}},e.prototype._onDataUpdate=function(e,t){var i=Object(c.unpackNonSeriesData)(t.d);return this._ongoingDataUpdate=this._ongoingDataUpdate.then((function(){return i}),(function(){return i})).then(this._onDataUnpacked.bind(this,e,t.indexes)),this._ongoingDataUpdate},e.prototype._onDataUnpacked=function(e,t,i){this._status!==n.Idle&&(this._status===n.AwaitingFirstDataUpdate&&(this._changeStatusTo(n.Active),this.clearData()),this._mergePlots(e),null!==i&&(i.indexes_replace?(Object(o.assert)("nochange"!==t),this._graphics.replaceIndexesTo(t)):("nochange"!==t&&this._graphics.replaceIndexesTo(t),void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),this._dataUpdated.fire(e,i,t))},e.prototype._onStudyLoading=function(e){this._onStudyStatusChangedTo({type:r.Loading,startTime:Date.now()})},e.prototype._onStudyError=function(e,t,i){this.clearData(),this._onStudyStatusChangedTo({type:r.Error,reason:e})},e.prototype._onStudyCompleted=function(e){this._onStudyStatusChangedTo({ type:r.Completed})},e.prototype._mergePlots=function(e){this._plots.merge(e)},e.prototype._turnaround=function(){return""+this._turnaroundPrefix+this._turnaroundCounter},e.prototype._checkTurnaround=function(e){var t=this._turnaround();return e===t||e===this._series.turnaround()||e===this._series.turnaround()+"_"+t},e}(),m=i("kcTO"),y=i("Ocx9"),g=i("Kxc7");i.d(t,"sessionsPreferencesDefault",(function(){return S})),i.d(t,"Sessions",(function(){return b}));var v=new m.PriceFormatter,S={graphics:{backgrounds:{outOfSession:{color:"#2196F3",transparency:92,visible:!1}},vertlines:{sessBreaks:{color:"#4985e7",style:2,visible:!1,width:1}}}},b=function(){function e(e,t){var i=this;this._studySource=null,this._paneViews=[],this._metaInfo=null,this._destroyed=!1,this._isStarted=!1,this._loadedGraphics=null,this._model=e,this._doubleClickHandler=t;var r=e.mainSeries();this._properties=new y.DefaultProperty("sessions"),this._removeDuplicateProperties(),this._properties.subscribe(this,this._onPropertiesChanged),e.studyMetaInfoRepository().findById({type:"java",studyId:"Sessions@tv-basicstudies"}).then((function(t){i._destroyed||null===i._loadedGraphics&&(i._setMetaInfo(t),null!==i._metaInfo&&(i._studySource=new _(e.chartApi(),r,"sessions_",i._metaInfo),i._createPaneViews(),i._studySource.dataCleared().subscribe(i,i.updateAllViews),i._studySource.dataUpdated().subscribe(i,i.updateAllViews),i._studySource.setInputs({}),i._processHibernate()))})),e.timeScale().onReset().subscribe(this,this._clearData),e.timeScale().logicalRangeChanged().subscribe(this,this.updateAllViews),e.mainSeries().properties().extendedHours.subscribe(this,this._updateVisibleOutOfSessionBackground),e.mainSeries().properties().interval.subscribe(this,this._processHibernate),this._updateVisibleOutOfSessionBackground(e.mainSeries().properties().extendedHours)}return e.prototype.start=function(){this._isStarted=!0,this._processHibernate()},e.prototype.restart=function(){this._clearData(),g.enabled("stop_study_on_restart")&&this.stop(),this.start()},e.prototype.isStarted=function(){return this._isStarted},e.prototype.stop=function(){this._isStarted=!1,null!==this._studySource&&this._studySource.stop()},e.prototype.paneViews=function(e){return e.containsMainSeries()?this._paneViews:[]},e.prototype.priceAxisViews=function(e,t){return[]},e.prototype.updateAllViews=function(){this._paneViews.forEach((function(e){return e.update()}))},e.prototype.destroy=function(){this._destroyed=!0,null!==this._studySource&&(this._studySource.dataCleared().unsubscribe(this,this.updateAllViews),this._studySource.dataUpdated().unsubscribe(this,this.updateAllViews),this._studySource.destroy(),this._studySource=null),this._model.timeScale().logicalRangeChanged().unsubscribe(this,this.updateAllViews),this._model.timeScale().onReset().unsubscribe(this,this._clearData),this._model.mainSeries().properties().extendedHours.unsubscribe(this,this._updateVisibleOutOfSessionBackground),this._model.mainSeries().properties().interval.unsubscribe(this,this._processHibernate), this._properties.unsubscribe(this,this._onPropertiesChanged)},e.prototype.series=function(){return this._model.mainSeries()},e.prototype.priceScale=function(){return this.series().priceScale()},e.prototype.graphics=function(){return this._loadedGraphics||Object(o.ensureNotNull)(this._studySource).graphics()},e.prototype.properties=function(){return this._properties},e.prototype.graphicsInfo=function(){return Object(o.ensureNotNull)(this._metaInfo).graphics},e.prototype.firstValue=function(e){return this._model.mainSeries().firstValue()},e.prototype.formatter=function(){return v},e.prototype.state=function(e){var t={properties:this._properties.state()};return e&&null!==this._metaInfo&&(t.data={graphics:Object(d.saveStudyGraphics)(this.graphics()),metaInfo:this._metaInfo}),t},e.prototype.restoreState=function(e,t){this._properties.mergeAndFire(e.properties),this._removeDuplicateProperties(),this._updateVisibleOutOfSessionBackground(this._model.mainSeries().properties().extendedHours),void 0!==e.data&&t&&(this._loadStudyGraphics(e.data.graphics),this._setMetaInfo(e.data.metaInfo),this._createPaneViews())},e.prototype.restoreOldState=function(e,t){var i={properties:{graphics:e.state.graphics}};void 0!==e.data&&void 0!==e.metaInfo&&t&&(i.data={metaInfo:e.metaInfo,graphics:e.data.graphics}),this.restoreState(i,t)},e.prototype.applyPreferences=function(e){this._properties.mergePreferences(e)},e.prototype.metaInfo=function(){return Object(o.ensureNotNull)(this._metaInfo)},e.prototype._loadStudyGraphics=function(e){if(void 0!==e.backgrounds){var t=e.backgrounds.findIndex((function(e){return"inSession"===e.styleId}));e.backgrounds.splice(t,1)}this._loadedGraphics=Object(d.loadStudyGraphics)(e)},e.prototype._setMetaInfo=function(e){void 0!==e.graphics.backgrounds&&void 0!==e.graphics.backgrounds.inSession&&delete e.graphics.backgrounds.inSession,this._metaInfo=e},e.prototype._updateVisibleOutOfSessionBackground=function(e){this._outOfSessionVisibilityProperty().setValue(e.value())},e.prototype._clearData=function(){null!==this._studySource&&this._studySource.clearData()},e.prototype._createPaneViews=function(){var e=this,t={mouseDoubleClickHandler:this._doubleClickHandler};Object(d.createGraphicsPaneViews)(this,this._model,t).then((function(t){e._paneViews=t,e._model.lightUpdate()}))},e.prototype._onPropertiesChanged=function(){this._processHibernate(),this.updateAllViews()},e.prototype._processHibernate=function(){if(null!==this._studySource){var e=this._canBeHibernated(),t=this._isHibernated(),i=this._studySource.isStarted();!t&&e&&i?this._studySource.stop():!t||e||i||this._studySource.start()}},e.prototype._canBeHibernated=function(){return this._model.mainSeries().isDWM()||!this._outOfSessionVisibilityProperty().value()&&!this._vertLinesVisibleProperty().value()},e.prototype._isHibernated=function(){return this._isStarted&&(null===this._studySource||!this._studySource.isStarted())},e.prototype._outOfSessionVisibilityProperty=function(){ return this._properties.childs().graphics.childs().backgrounds.childs().outOfSession.childs().visible},e.prototype._vertLinesVisibleProperty=function(){return this._properties.childs().graphics.childs().vertlines.childs().sessBreaks.childs().visible},e.prototype._removeDuplicateProperties=function(){this._properties.hasChild("properties")&&(this._properties.removeProperty("properties"),Object(y.saveDefaultProperties)(!0),this._properties.childChanged("",null),Object(y.saveDefaultProperties)(!1))},e}()},KcY8:function(e,t,i){"use strict";var r=i("mrSG"),n=i("aO4+"),o=i("f6yo"),s=i("Tmoa"),a=i("Ialn"),l=i("8Uy/"),c=i("jFln"),u=i("ikwP"),h=i("VdBB"),d=i("qFKp").CheckMobile.any()?10:0,p=function(){function e(e,t){this.setData(e,t)}return e.prototype.setData=function(e,t){this._data=Object(r.__assign)({},e),this._commonData=Object(r.__assign)({},t)},e.prototype.draw=function(e,t,i,r,n,o){if(this._data.visible){e.font=t.font;var h,d=Math.floor((this._data.tickVisible?t.tickLength:0)*o),p=Math.floor((this._data.borderVisible?t.borderSize:0)*o),f=Math.floor(t.paddingTop*o),_=Math.floor(t.paddingBottom*o),m=Math.floor(t.paddingInner*o),y=Math.floor(t.paddingOuter*o),g=this._data.text,v=Math.round(t.baselineOffset*o),S=void 0!==this._data.labelIcon,b=Math.max(1,Math.floor(o)),w=Math.floor(t.fontSize*o)+f+_;if(w%2!=b%2&&(w+=1),S)h=w;else{var P=Math.ceil(i.measureText(e,g));h=Math.round(P*o)+d+p+m+y}var C=this._commonData.coordinate;this._commonData.fixedCoordinate&&(C=this._commonData.fixedCoordinate);var x,T,L="right"===n,I=this._getOffsetScaled(L,r,o),M=Math.ceil(r*o),O=L?M:0,A=O;e.fillStyle=Object(s.resetTransparency)(this._commonData.background),e.lineWidth=1,Object(c.setLineStyle)(e,l.LINESTYLE_SOLID),e.lineCap="butt";var k=Math.round(C*o)-Math.floor(.5*o),E=Math.floor(k+b/2-w/2),D=E+w;if(g||S){if(L?(x=O-d,T=(A=O-h)+y):(A=O+h,x=O+d,T=O+p+d+m),O+=I,A+=I,x+=I,e.beginPath(),e.moveTo(O,E),e.lineTo(A,E),e.lineTo(A,D),e.lineTo(O,D),e.fill(),0!==I&&this._data.fillOffset){e.fillStyle=t.paneBackgroundColor;var V=L?Math.ceil(r*o)+1:0;e.beginPath(),e.moveTo(O,E),e.lineTo(V,E),e.lineTo(V,D),e.lineTo(O,D),e.fill()}if(S){switch(this._data.labelIcon){case 0:this._drawPlusIcon(e,O,A,E,k,D,b)}return}this._data.tickVisible&&(e.fillStyle=this._commonData.color,e.fillRect(O,k,x-O,b)),e.textAlign="left",e.fillStyle=this._commonData.color,Object(u.drawScaled)(e,o,(function(){e.fillText(g,(T+I)/o,(D-_-v)/o)}))}if(this._data.secondLine){var B=Math.ceil(i.measureText(e,this._data.secondLine)*o)+m+y;e.fillStyle=Object(s.resetTransparency)(this._commonData.background),this._data.text&&(E+=w+b,D+=w+b),L?(O=(A=Math.min(A,M-B))+B,T=A+y):(A=(O=Math.max(A-B,p))+B,T=O+m),O+=I,A+=I,e.beginPath(),e.moveTo(O,E),e.lineTo(A,E),e.lineTo(A,D),e.lineTo(O,D),e.fill(),e.textAlign="left",e.fillStyle=this._commonData.color;var R=this._data.secondLine;Object(u.drawScaled)(e,o,(function(){e.fillText(Object(a.startWithLTR)(R),(T+I)/o,(D-_-v)/o)}))}}},e.prototype.height=function(e,t){if(!this._data.visible)return 0;var i=e.fontSize+e.paddingTop+e.paddingBottom ;return this._data.secondLine&&t?2*i+1:i},e.prototype.hitTest=function(e){var t=this._data.hitTestData;if(void 0===t)return null;var i=this._data.offset,r=Object(n.box)(new n.Point(t.xl+i-d,t.y-d),new n.Point(t.xl+i+t.containerWidth+d,t.y+t.containerHeight+d)),s=t.left&&Object(o.pointInBox)(e,r),a=Object(n.box)(new n.Point(t.xr-i-d,t.y-d),new n.Point(t.xr-i+t.containerWidth+d,t.y+t.containerHeight+d)),l=t.right&&Object(o.pointInBox)(e,a);if(s||l){var c=s?"left":"right";return new h.HitTestResult(h.HitTestResult.CUSTOM,{mouseClickHandler:void 0===t.mouseClickHandler?void 0:t.mouseClickHandler.bind(this,e,c),tooltip:t.tooltip})}return null},e.prototype._getOffsetScaled=function(e,t,i){var r=e?-1:1,n=0===this._data.offset?0:r*this._data.offset,o=0===n?0:r*Math.max(1,Math.round(Math.abs(n)*i));return e&&t*i%1!=0&&(o=r*(Math.abs(o)+1)),o},e.prototype._drawPlusIcon=function(e,t,i,r,n,o,s){e.fillStyle=this._commonData.color;var a=Math.abs(t-i),l=Math.round(.5*a);l%2!=s%2&&(l+=1);var c=Math.floor((a-l)/2),u=Math.min(t,i),h=u+Math.floor(a/2-s/2);e.fillRect(u+c,n,l,s),e.fillRect(h,r+c,s,l)},e}();i.d(t,"a",(function(){return f}));var f=function(){function e(e){this._commonRendererData={coordinate:0,color:"#FFF",background:"#000"},this._axisRendererData={text:"",visible:!1,tickVisible:!0,borderVisible:!0,offset:0},this._paneRendererData={text:"",visible:!1,tickVisible:!1,borderVisible:!1,offset:1,fillOffset:!0},this._invalidated=!0,this._axisRenderer=new(e||p)(this._axisRendererData,this._commonRendererData),this._paneRenderer=new(e||p)(this._paneRendererData,this._commonRendererData)}return e.prototype.text=function(){return this._axisRendererData.text},e.prototype.secondLineText=function(){return this._axisRendererData.secondLine},e.prototype.background=function(){return this._commonRendererData.background},e.prototype.color=function(){return this.generateTextColor(this.background())},e.prototype.generateTextColor=function(e){return Object(s.colorFromBackground)(e)},e.prototype.coordinate=function(){return this._updateRendererDataIfNeeded(),this._commonRendererData.coordinate},e.prototype.floatCoordinate=function(){return this._updateRendererDataIfNeeded(),this._commonRendererData.floatCoordinate||this._commonRendererData.coordinate},e.prototype.update=function(){this._invalidated=!0},e.prototype.height=function(e,t){return void 0===t&&(t=!1),Math.max(this._axisRenderer.height(e,t),this._paneRenderer.height(e,t))},e.prototype.getFixedCoordinate=function(){return this._commonRendererData.fixedCoordinate||0},e.prototype.setFixedCoordinate=function(e){this._commonRendererData.fixedCoordinate=e},e.prototype.isVisible=function(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible||this._paneRendererData.visible},e.prototype.isAxisLabelVisible=function(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible},e.prototype.isPaneLabelVisible=function(){return this._updateRendererDataIfNeeded(),this._paneRendererData.visible},e.prototype.renderer=function(){ return this._updateRendererDataIfNeeded(),this._axisRenderer.setData(this._axisRendererData,this._commonRendererData),this._paneRenderer.setData(this._paneRendererData,this._commonRendererData),this._axisRenderer},e.prototype.paneRenderer=function(){return this._updateRendererDataIfNeeded(),this._axisRenderer.setData(this._axisRendererData,this._commonRendererData),this._paneRenderer.setData(this._paneRendererData,this._commonRendererData),this._paneRenderer},e.prototype.setPaneRendererLabelIcon=function(e){this._paneRendererData.labelIcon=e},e.prototype._updateRendererDataIfNeeded=function(){this._invalidated&&(this._updateRendererData(this._axisRendererData,this._paneRendererData,this._commonRendererData),this._invalidated=!1)},e}()},Ke3L:function(e,t,i){"use strict";i.r(t),i.d(t,"ProjectionSeriesPriceAxisView",(function(){return l}));var r=i("mrSG"),n=i("Eyy1"),o=i("k9/m"),s=i("TQMj"),a=i("oXaB"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.lastPrice=function(){return this._getSource().data().lastProjectionPrice},t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var r=this._getData().model,s=this._getSource(),l=s.priceScale(),c=r.timeScale(),u=this.lastPrice();if(!c.isEmpty()&&!l.isEmpty()&&void 0!==u){var h=c.visibleBarsStrictRange();if(null!==h){var d=h.firstBar(),p=h.lastBar(),f=s.data(),_=f.search(p,o.PlotRowSearchMode.NearestLeft);if(null!==_){var m=s.nearestIndex(d,o.PlotRowSearchMode.NearestRight);if(void 0!==m){var y=s.model().properties().scalesProperties,g=Object(n.ensureNotNull)(f.valueAt(m))[TradingView.CLOSE_PLOT],v=i.background,S=y.showSeriesLastValue.value(),b=!1,w=!1,P=!1,C=s.lastValueData(TradingView.CLOSE_PLOT,!1),x=s.properties();if(8===x.style.value()&&x.haStyle.showRealLastPrice.value()){var T=s.lastValueData(TradingView.CLOSE_PLOT,!0);if(T.noData||T.color===i.background||(v=T.color),!T.noData&&!C.noData){var L=T.index===C.index;b=L&&y.showSymbolLabels.value(),w=y.seriesLastValueMode.value()===a.PriceAxisLastValueMode.LastPriceAndPercentageValue,S=S&&L,P=L&&this._isCountdownEnabled()&&x.showCountdown.value()}}else{v=s.barColorer().barStyle(_.index,!0).barColor}i.background=v,i.color=this.generateTextColor(v),i.coordinate=l.priceToCoordinate(u,g),e.visible=S||P,C.noData||(C.text=l.formatPrice(u,g),C.formattedPriceAbsolute=l.formatPriceAbsolute(u),C.formattedPricePercentage=l.formatPricePercentage(u,g),e.text=this._axisFirstLineText(C,S,w),e.secondLine=P?this._countdownText():"",t.text=this._paneText(C,S,b,w)),t.visible=b||S&&w}}}}},t}(s.SeriesPriceAxisView)},Kmdw:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererArrowUp",(function(){return l})),i.d(t,"PaneRendererArrowDown",(function(){return c}));var r=i("mrSG"),n=i("2WC2"),o=i("aO4+"),s=i("Hr11"),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._sign=0,t._thinArrow=!1,t._thinArrowLineWidth=0,t._headHeight=0,t._arrowWidth=0,t}return Object(r.__extends)(t,e),t.prototype.setData=function(e,t){ this._setBaseData(e,t)},t.prototype._drawItemShape=function(e,t,i){var r=t.pixelRatio,n=this._lineWidth(t)%2?.5:0,o=this._sign,a=this._arrowWidth,l=this._headHeight,c=Math.abs(i.height),u=Math.round(i.x*r)+n,h=i.vertOffset,d=Math.round((i.y+h+o*c/2)*r)+n,p=Object(s.ceiledEven)(a*r),f=p/2,_=Math.round(c*r),m=Math.round(l*r);e.translate(u,d),this._thinArrow?(e.moveTo(0,0),e.lineTo(-f,-f*o),e.moveTo(0,0),e.lineTo(f,-f*o),e.moveTo(0,0),e.lineTo(0,-_*o),e.moveTo(-f,-_*o),e.lineTo(f,-_*o)):(e.moveTo(0,0),_0&&(this._kind=e,this._multiplier=t)}return e.prototype.kind=function(){return this._kind},e.prototype.multiplier=function(){return this._multiplier},e.prototype.isValid=function(){return this.kind()!==r.Invalid&&this.multiplier()>0},e.prototype.isDWM=function(){return this.isValid()&&!this.isRange()&&!this.isIntraday()},e.prototype.isIntraday=function(){var e=c.has(this.kind());return this.isValid()&&!this.isRange()&&e},e.prototype.isSeconds=function(){return this.kind()===r.Seconds},e.prototype.isMinutes=function(){return this.kind()===r.Minutes},e.prototype.isMinuteHours=function(){return this.kind()===r.Minutes&&d(this.multiplier())},e.prototype.isDays=function(){return this.kind()===r.Days},e.prototype.isWeeks=function(){return this.kind()===r.Weeks},e.prototype.isMonths=function(){return this.kind()===r.Months},e.prototype.isRange=function(){return this.kind()===r.Range},e.prototype.isTimeBased=function(){return!this.isRange()},e.prototype.letter=function(){return this.isValid()&&this.kind()!==r.Minutes?this.kind()[0].toUpperCase():""},e.prototype.value=function(){return this.isValid()?this.kind()===r.Minutes?this.multiplier()+"":this.multiplier()+this.letter():""},e.prototype.isEqualTo=function(t){if(!(t instanceof e))throw new Error("Argument is not an Interval");return!(!this.isValid()||!t.isValid())&&(this.kind()===t.kind()&&this.multiplier()===t.multiplier())},e.prototype.inMilliseconds=function(e){if(void 0===e&&(e=Date.now()),!this.isValid()||this.isRange())return NaN;if(this.isMonths()){var t=new Date(e);return t.setUTCMonth(t.getUTCMonth()+(this.multiplier()||1)),+t-e}var i=this.multiplier();return a[this.kind()]*i},e.isEqual=function(t,i){return e.parse(t).isEqualTo(e.parse(i))},e.parse=function(t){t=(t+"").toUpperCase().split(",")[0];var i=o.exec(t);return null!==i?"H"===i[2]?new e(r.Minutes,60*h(i[1])):new e(l[i[2]],h(i[1])):null!==(i=s.exec(t))?new e(r.Minutes,h(i[1])):new e(r.Invalid,0)},e.kind=function(t){return e.parse(t).kind()},e.isValid=function(t){return e.parse(t).isValid()},e.isDWM=function(t){return e.parse(t).isDWM()},e.isIntraday=function(t){return e.parse(t).isIntraday()},e.isSeconds=function(t){return e.parse(t).isSeconds() },e.isMinutes=function(t){return e.parse(t).isMinutes()},e.isMinuteHours=function(t){return e.parse(t).isMinuteHours()},e.isDays=function(t){return e.parse(t).isDays()},e.isWeeks=function(t){return e.parse(t).isWeeks()},e.isMonths=function(t){return e.parse(t).isMonths()},e.isRange=function(t){return e.parse(t).isRange()},e.isTimeBased=function(t){return e.parse(t).isTimeBased()},e.normalize=function(t){var i=e.parse(t);return i.isValid()?i.value():null},e}();function h(e){return 0===e.length?1:parseInt(e,10)}function d(e){return e>=60&&!(e%60)}},"M7/j":function(e,t,i){"use strict";i.r(t),i.d(t,"itemsRangeIsValid",(function(){return h})),i.d(t,"splitItems",(function(){return d})),i.d(t,"PaneRendererBaseline",(function(){return p}));var r=i("mrSG"),n=i("aO4+"),o=i("hBTJ"),s=i("GEp6"),a=i("Zp/P"),l=i("Y7w9"),c=i("cPgM"),u=i("VdBB");function h(e){if(0===e.length)return!1;var t=e.findIndex((function(e){return Object(a.coordinateIsValid)(e.y)}));if(-1===t)return!1;for(var i=e.length-1;i>t&&!Object(a.coordinateIsValid)(e[i].y);)i--;return!(t>=i)}function d(e,t){for(var i=[],r=[],s=null,l=0;l=t&&r.push(c),s=c;else{if(null===s)continue;c=s}if(Object(a.coordinateIsValid)(u.y)&&(c.y>t&&u.yt))if(Math.abs(c.x-u.x)<1){var h=new n.Point(c.x,t);i.push(h),r.push(h)}else{var d=Object(o.intersectLineSegments)(c,u,new n.Point(c.x,t),new n.Point(u.x,t));if(null!==d){h=c.add(u.subtract(c).scaled(d));i.push(h),r.push(h)}}}return{topItems:i,bottomItems:r}}var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._data=null,t}return Object(r.__extends)(t,e),t.prototype.setData=function(e){this._data=e},t.prototype.hitTest=function(e){if(null===this._data)return null;for(var t=this._data,i=t.items,r=t.topLineWidth,o=t.bottomLineWidth,c=Object(a.selectionTolerance)((r+o)/2),h=Object(l.lowerbound)(i,e,(function(e,t){return e.x<=t.x})),d=Math.max(1,h-1),p=Math.min(i.length-1,h+1),f=d;f<=p;++f){var _=i[f-1],m=i[f];if(Object(s.distanceToSegment)(new n.Point(_.x,_.y),new n.Point(m.x,m.y),new n.Point(e.x,e.y)).distance<=c)return new u.HitTestResult(u.HitTestResult.REGULAR)}return null},t.prototype._drawImpl=function(e){if(null!==this._data){var t=this._data,i=t.items,r=t.baseLevelCoordinate,n=t.bottom,o=t.bottomFillColor1,s=t.bottomFillColor2,a=t.topFillColor1,l=t.topFillColor2,c=t.topLineColor,u=t.bottomLineColor,p=t.topLineWidth,f=t.bottomLineWidth;if(h(i)){var _=d(i,r),m=_.topItems,y=_.bottomItems;e.lineCap="round",e.lineJoin="round",e.translate(.5,.5),0!==m.length&&(e.beginPath(),e.moveTo(m[0].x,r),this._makeLine(e,m,!0,0),e.closePath(),e.fillStyle=this._makeLinearGradient(e,a,l,r-n,r),e.fill(),e.beginPath(),this._makeLine(e,m,!1,0),e.lineWidth=p,e.strokeStyle=c,e.stroke()),0!==y.length&&(e.beginPath(),e.moveTo(y[0].x,r),this._makeLine(e,y,!0,1),e.closePath(),e.fillStyle=this._makeLinearGradient(e,o,s,r,r+n),e.fill(),e.beginPath(),this._makeLine(e,y,!1,1),e.lineWidth=f,e.strokeStyle=u,e.stroke())}}}, t.prototype._makeLine=function(e,t,i,r){if(null!==this._data){var n=t.findIndex((function(e){return Object(a.coordinateIsValid)(e.y)}));if(-1!==n)for(var o,s=this._data,l=s.barSpacing,c=s.baseLevelCoordinate,u=.25*l,h=t.length,d=n;d=c&&p.y>=c){e.moveTo(p.x,p.y);continue}}else if(o&&o.y<=c&&p.y<=c){e.moveTo(p.x,p.y);continue}if(o&&Object(a.coordinateIsValid)(o.y))e.lineTo(p.x,p.y),i&&!Object(a.coordinateIsValid)(f.y)&&e.lineTo(p.x,c);else if(f&&Object(a.coordinateIsValid)(f.y))i?(d!==n&&e.lineTo(p.x,c),e.lineTo(p.x,p.y)):e.moveTo(p.x,p.y);else if(i){if(0===d)continue;d!==n&&e.lineTo(p.x-u,c),e.lineTo(p.x-u,p.y),e.lineTo(p.x+u,p.y),e.lineTo(p.x+u,c)}else e.moveTo(p.x-u,p.y),e.lineTo(p.x+u,p.y);o=p}}}},t.prototype._makeLinearGradient=function(e,t,i,r,n){var o=e.createLinearGradient(0,r,0,n);return o.addColorStop(0,t),o.addColorStop(1,i),o},t}(c.ScaledPaneRenderer)},MA5A:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolCrossLine",(function(){return u}));var r=i("mrSG"),n=i("Ocx9"),o=i("p1SQ"),s=i("GmZZ"),a=i("Ss5c"),l=i("hayr"),c=window.t("Cross Line"),u=function(e){function t(r,n){var a=e.call(this,r,n||t.createProperties())||this;return a._constructor="LineToolCrossLine",a._priceAxisView=new o.LineToolHorzLinePriceAxisView(a),a._timeAxisView=new s.LineToolVertLineTimeAxisView(a),i.e("lt-pane-views").then(function(e){var t=i("amUF").CrossLinePaneView;a._setPaneViews([new t(a,a._model)])}.bind(null,i)).catch(void 0),a}return Object(r.__extends)(t,e),t.prototype.pointsCount=function(){return 1},t.prototype.translatedType=function(){return c},t.prototype.name=function(){return"Cross Line"},t.prototype.priceAxisViews=function(e,t){return this.isSourceHidden()?null:t===this.priceScale()&&this.properties().showPrice.value()&&this._model.paneForSource(this)===e?[this._priceAxisView]:null},t.prototype.timeAxisViews=function(){return this.isSourceHidden()?null:this.properties().showTime.value()?[this._timeAxisView]:null},t.prototype.updateAllViews=function(){e.prototype.updateAllViews.call(this),this._priceAxisView.update(),this._timeAxisView.update()},t.prototype.canHasAlert=function(){return!1},t.prototype.getInputsPropertyPage=function(){return l.propertyPages.LineToolCrossLineInputsPropertyPage},t.prototype.getStylesPropertyPage=function(){return l.propertyPages.LineToolCrossLineStylesPropertyPage},t.prototype.lineColor=function(){return this.properties().linecolor.value()},t.prototype.lineWidth=function(){return this.properties().linewidth.value()},t.prototype.lineStyle=function(){return this.properties().linestyle.value()},t.createProperties=function(e){var i=new n.DefaultProperty("linetoolcrossline",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,"xrdl")).then((function(e){return e.CrossLineDefinitionsViewModel}))},t._configureProperties=function(e){a.LineDataSource._configureProperties(e)},t }(a.LineDataSource)},MROS:function(e,t,i){"use strict";i.r(t),i.d(t,"ModelSelection",(function(){return o}));var r=i("Y7w9"),n=i("CW80"),o=function(){function e(){this._items=[],this._set=new Set}return e.prototype.isEmpty=function(){return 0===this._items.length},e.prototype.add=function(e){this._items.length>0&&!Object(n.isLineTool)(this._items[0])&&this.clear(),Object(n.isLineTool)(e)||this.clear();var t=Object(r.lowerbound)(this._items,e,(function(e,t){return e.zorder()i&&this._priceScaleIsPrice(e.rightPriceScales()[i],t))return e.rightPriceScales()[i];if(e.leftPriceScales().length>i&&this._priceScaleIsPrice(e.leftPriceScales()[i],t))return e.leftPriceScales()[i]}return null},e.prototype._targetPriceScaleIndex=function(e,t){if(e.mainSource()===t.mainSeries())return 0},e.prototype._tryToGetDesiredPriceScale=function(e,t,i,r){switch(i){case"left":return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("left"):e.createPriceScaleAtPosition("overlay");case"right":return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("right"):e.createPriceScaleAtPosition("overlay");case"as-series":return void 0!==r?Object(n.ensureNotNull)(r.priceScale()):e.isMainPane()?Object(n.ensureNotNull)(Object(n.ensureNotNull)(e.mainDataSource()).priceScale()):this.createNewPriceScaleIfPossible(e);case"overlay":return e.createPriceScaleAtPosition("overlay")}},e}(),a=function(e){function t(t){return e.call(this,t)||this}return Object(r.__extends)(t,e),t.prototype.apply=function(e){if(e.containsMainSeries()){var t=Object(n.ensureNotNull)(Object(n.ensureNotNull)(e.mainDataSource()).priceScale());e.movePriceScale(t,"right",0)}for(var i=e.model();e.leftPriceScales().length>e.rightPriceScales().length;){t=e.leftPriceScales()[e.leftPriceScales().length-1];e.movePriceScale(t,"right",this._targetPriceScaleIndex(t,i))}for(;e.rightPriceScales().length-e.leftPriceScales().length>1;){t=e.rightPriceScales()[e.rightPriceScales().length-1];e.movePriceScale(t,"left",this._targetPriceScaleIndex(t,i))}},t.prototype.createNewPriceScaleIfPossible=function(e){if(!this.canCreateNewPriceScale(e))return e.createPriceScaleAtPosition("overlay");var t=e.leftPriceScales().length=0;--a)if(Math.floor(o/n[a].divisor)!==Math.floor(s/n[a].divisor))return n[a].span}, TradingView.ChartapiMessagerInstances=[],e.exports=l}).call(this,i("jCNj"))},"N+BX":function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("Ocx9").DefaultProperty,o=i("hayr").propertyPages,s=window.t("Double Curve");function a(e,t){this._constructor="LineToolBezierCubic";var n=t||a.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("a6on").BezierCubicPaneView;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"Double Curve"},a.prototype.controlPoints=function(){var e=this.pointToScreenPoint(this.points()[0])[0],t=this.pointToScreenPoint(this.points()[1])[0],i=t.subtract(e).scaled(.5).transposed().scaled(.3),r=e.add(t).scaled(.33),n=e.add(t).scaled(.67),o=r.add(i),s=n.subtract(i);return[this.screenPointToPoint(o),this.screenPointToPoint(s)]},a.prototype.setLastPoint=function(e,t){r.prototype.setLastPoint.call(this,e,t),this._controlPoints=this.controlPoints()},a.prototype.addPoint=function(e,t,i){var n=r.prototype.addPoint.call(this,e,t,!0);if(n){var o=this.controlPoints();delete this._controlPoints,this._points.push(o[0]),this._points.push(o[1]),i||(this.normalizePoints(),this.createServerPoints()),this._createPointProperty(2),this._createPointProperty(3)}return n},a.prototype.restorePoints=function(e,t,i){r.prototype.restorePoints.call(this,e,t,i),this._createPointProperty(2),this._createPointProperty(3)},a.prototype.getStylesPropertyPage=function(){return o.LineToolBezierStylesPropertyPage},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("b4fl").GeneralBezierDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetoolbeziercubic",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolBezierCubic=a},N1UO:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyApi",(function(){return h}));var r=i("mrSG"),n=(i("YFKU"),i("Eyy1")),o=i("9iCb"),s=i("xo8u"),a=i("gaBL"),l=i("HGup"),c=i("jRfx"),u=i("/ToI"),h=function(){function e(e,t){this._study=e,this._undoModel=t,this._model=t.model()}return e.prototype.isUserEditEnabled=function(){return this._study.userEditEnabled()},e.prototype.setUserEditEnabled=function(e){this._study.setUserEditEnabled(e)},e.prototype.getInputsInfo=function(){return this._study.metaInfo().inputs.map((function(e){return Object(r.__assign)(Object(r.__assign)({},e),{localizedName:void 0!==e.name?window.t(e.name,{context:"input"}):""})}))},e.prototype.getInputValues=function(){var e=this._study.inputs();return Object.keys(e).map((function(t){return{id:t,value:e[t]}}))},e.prototype.setInputValues=function(e){for(var t=this.getInputValues(),i=function(e){void 0!==t.find((function(t){return t.id===e.id }))?r._study.properties().inputs[e.id].setValue(e.value):console.warn('There is no such input: "'+e.id+'"')},r=this,n=0,o=e;n0&&(i.drawImage(a.leftAxis.canvas,l,n),l+=a.leftAxis.canvas.width),i.drawImage(a.canvas,l,n),l+=a.canvas.width,a.rightAxis.contentWidth>0&&i.drawImage(a.rightAxis.canvas,l,n),"pane"===a.type){var d=17*r;i.fillStyle=e.colors.text,a.mainSeriesText&&h+d0&&(i.drawImage(e.timeAxis.lhsStub.canvas,l,n),l+=e.timeAxis.lhsStub.canvas.width),i.drawImage(e.timeAxis.canvas,l,n),l+=e.timeAxis.canvas.width, e.timeAxis.rhsStub.contentWidth>0&&i.drawImage(e.timeAxis.rhsStub.canvas,l,n)}i.restore()}function y(e){return Object(r.__awaiter)(this,void 0,void 0,(function(){var t,i,l,c,u,d,f,y,g,v,S,b,w,P,C,x,T;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:for(t=p[e.layout],i=e.charts.map((function(e){return function(e){for(var t=e.panes[0],i=t.canvas.width+t.leftAxis.canvas.width+t.rightAxis.canvas.width,r=0,o=0,s=e.panes;o=i&&l<=n){var c=a.y ;if(e.y>=Math.min(c,this._data.histogramBase)&&e.y<=Math.max(c,this._data.histogramBase))return new r.HitTestResult(r.HitTestResult.REGULAR)}}return null},e.prototype._fillPrecalculatedCache=function(e){if(null!==this._data&&0!==this._data.items.length){var t=Math.ceil(this._data.barSpacing*e)<=1?0:Math.max(1,Math.floor(e)),i=Math.round(this._data.barSpacing*e)-t;this._precalculatedCache=new Array(this._data.items.length);for(var r=0;ru.center?u.right=c.left-t-1:c.left=u.right+t+1))}var h=Math.ceil(this._data.barSpacing*e);for(r=0;r0&&h<4)for(r=0;rh&&(c.roundedCenter>c.center?c.right-=1:c.left+=1)}}else this._precalculatedCache=[]},e}()},NhkU:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("5rJj"),o=i("hayr").propertyPages,s=i("ytGH").LineToolWidthsProperty,a=window.t("Pitchfan");function l(e,t){this._constructor="LineToolPitchfan";var n=t||l.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("l5Au").PitchfanLinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);for(var o=[this._properties.child("median").child("linewidth")],a=0;a<=l.LevelsCount;a++)o.push(this._properties.child("level"+a).child("linewidth"));this._widthsProperty=new s(o)}inherit(l,r),l.LevelsCount=8,l.prototype.levelsCount=function(){return l.LevelsCount},l.prototype.pointsCount=function(){return 3},l.prototype.translatedType=function(){return a},l.prototype.name=function(){return"Pitchfan"},l.prototype.processErase=function(e,t){var i="level"+t,r=this.properties()[i].visible;e.setProperty(r,!1,"Erase level line")},l.prototype.getStylesPropertyPage=function(){return o.LineToolPitchfanStylesPropertyPage},l.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("D+Nk").PitchBaseDefinitionsViewModel}.bind(null,i)).catch(i.oe)},l.createProperties=function(e){var t=new n("linetoolpitchfan",e,!1,{range:[0,8]});return l._configureProperties(t),t},l._configureProperties=function(e){r._configureProperties(e)},t.LineToolPitchfan=l},NsVT:function(e,t,i){"use strict";i.r(t);var r=i("hY0g"),n=i.n(r),o=i("HySD");function s(e,t){for(var i=0,r=0,n=t;r0&&t.push({min:o,max:s})}return t.sort((function(e,t){return e.min-t.min||e.max-t.max})),t}function l(e,t){if(e.length!==t.length)return!1;for(var i=e.length;i--;){if(e[i].min!==t[i].min)return!1;if(e[i].max!==t[i].max)return!1}return!0}var c=i("+GxX"),u=i("Kxc7");i.d(t,"ChartPage",(function(){return d}));var h=u.enabled("no_min_chart_width"),d=function(){function e(e){var t=this;this._processVisibility=function(e){var i=e.container.value();return t._affectsLayout(e.name)?(i&&i.classList.toggle("js-hidden",!1),!0):(i&&i.classList.toggle("js-hidden",!0),!1)},this._setWidth=function(e,i){var r=i;t._fullscreenArea!==e.name&&(e.availWidth.setValue(i),e.canNegotiate.width&&(r=s(i,e.negotiations.width)));var n=e.container.value();return n&&(n.style.width=r+"px"),e.width.setValue(r),r},this._setHeight=function(e,i){var r=i;t._fullscreenArea!==e.name&&(e.availHeight.setValue(i),e.canNegotiate.height&&(r=s(i,e.negotiations.height)));var n=e.container.value();return n&&(n.style.height=r+"px"),e.height.setValue(r),r};var i=e.container.value();if(!i)throw new Error("bridge.container.value() must be an element");this._container=i,this._availableAreas=["left","tradingpanel","right","top","bottom","center","topleft","extratop"],this._areas={},this._bridge=e,this._width=e.width,this._height=e.height,this._width.subscribe((function(){return t.recalculate()})),this._height.subscribe((function(){return t.recalculate()})),this._bridge.visible.subscribe((function(){return t._updateVisibility()})),this._bridge.fullscreen.subscribe((function(){return t._onParentFullscreenChange()})),this.recalculate()}return e.prototype.allocate=function(e){var t=this,i=e&&e.areaName;if(-1===this._availableAreas.indexOf(i))throw new Error("unknown options.areaName");this.free(i);var r=this._createDOM(i),s={name:i,canNegotiate:{width:"left"===i||"right"===i||"tradingpanel"===i||"topleft"===i,height:"top"===i||"bottom"===i||"topleft"===i||"extratop"===i},negotiations:{width:[],height:[]},remove:function(){for(var e in t._areas)t._areas[e]===s&&t.free(e)},negotiateWidth:function(e){if(s.canNegotiate.width){var i=a(e);l(s.negotiations.width,i)||(s.negotiations.width=i,t.recalculate())}},negotiateHeight:function(e){if(s.canNegotiate.height){var i=a(e);l(s.negotiations.height,i)||(s.negotiations.height=i,t.recalculate())}},requestFullscreen:function(){t._fullscreenArea||("right"!==i&&"center"!==i||(t._fullscreenArea=i),"center"===i&&t._bridge.requestFullscreen(),t._updateFullscreen())},exitFullscreen:function(){i===t._fullscreenArea&&(t._fullscreenArea=void 0,"center"===i&&t._bridge.exitFullscreen(),t._updateFullscreen())},width:new n.a,height:new n.a,availWidth:new n.a,availHeight:new n.a,alive:new n.a(!0),container:new n.a(r),visible:new n.a(!0),fullscreen:new n.a(!0),rdState:new o.ResizerDetacherState};return s.rdState.pushOwner(s),this._areas[i]=s,s.rdState.owner.subscribe((function(e){ var r=s.container.value();if(e!==s)r&&(r.innerHTML="",r.parentElement&&r.parentElement.removeChild(r));else{for(var n=null,o=t._availableAreas.indexOf(i);o--;){var a=t._availableAreas[o];if(t._affectsLayout(a)){n=t._areas[a].container.value();break}}r&&(n&&r.parentElement?r.insertAdjacentElement("afterend",n):t._container.appendChild(r))}t.recalculate()}),{callWithLast:!0}),s.rdState.bridge()},e.prototype.free=function(e){var t=this._areas[e];if(t){this._areas[e]=void 0;var i=t.container.value();i&&i.parentElement&&i.parentElement.removeChild(i),t.alive.setValue(!1)}},e.prototype.recalculate=function(){var e={};this._recalcSingleRunToken=e;var t=this._areas.topleft,i=this._areas.left,r=this._areas.tradingpanel,n=this._areas.right,o=this._areas.top,s=this._areas.bottom,a=this._areas.center,l=this._areas.extratop,c=this._width.value(),u=this._height.value(),d=0,p=0,f=0,_=0,m=0,y=0,g=0,v=0;(e===this._recalcSingleRunToken&&l&&this._processVisibility(l)&&(v=this._setHeight(l,u),this._setWidth(l,c)),e===this._recalcSingleRunToken&&t&&this._processVisibility(t))&&(g=this._setHeight(t,u),(y=this._setWidth(t,c))&&(y+=4),(L=t.container.value())&&(L.style.top=v+"px"));e===this._recalcSingleRunToken&&i&&this._processVisibility(i)&&((L=i.container.value())&&(L.style.top=g+v+"px"),this._setHeight(i,u-g-v),(f=this._setWidth(i,c))&&(f+=4));if(e===this._recalcSingleRunToken&&r&&this._processVisibility(r)){this._setHeight(r,u);var S=c-f;h||(S-=300),m=this._setWidth(r,S)}if(e===this._recalcSingleRunToken&&n&&this._processVisibility(n)){this._setHeight(n,u-v);S=c-f-m;h||(S-=300),_=this._setWidth(n,S),(L=n.container.value())&&(L.style.top=v+"px")}var b=m+_,w=b?4:0;if(e===this._recalcSingleRunToken&&o&&this._processVisibility(o)){var P=Math.max(y,f);(L=o.container.value())&&(L.style.left=P+"px",L.style.top=v+"px");S=c-P-m-_-w;this._setWidth(o,S),d=this._setHeight(o,u)}var C=0,x=c-f-m-_-w;if(e===this._recalcSingleRunToken&&s&&this._processVisibility(s)){(L=s.container.value())&&(L.style.left=f+"px",L.classList.toggle("no-border-top-left-radius",!f),L.classList.toggle("no-border-top-right-radius",!b)),this._setWidth(s,x);var T=u-d-v;C=Math.min(300,T-0),p=this._setHeight(s,T)+4}if(e===this._recalcSingleRunToken&&a&&this._processVisibility(a)){var L;(L=a.container.value())&&(L.style.left=f+"px",L.style.top=d+v+"px",L.classList.toggle("no-border-bottom-left-radius",!p||!f),L.classList.toggle("no-border-bottom-right-radius",!b||!p)),this._setWidth(a,x);T=u-d-p-v;this._setHeight(a,Math.max(T,C))}e===this._recalcSingleRunToken&&r&&this._affectsLayout("tradingpanel")&&((L=r.container.value())&&(L.style.right=_+"px",L.style.top=v+"px"));e===this._recalcSingleRunToken&&this._updateVisibility()},e.prototype._affectsLayout=function(e){var t=this._areas[e];if(!t)return!1;if(t.rdState.owner.value()!==t)return!1;if(this._fullscreenArea&&this._fullscreenArea!==e)return p(e);if(this._width.value()<=567||this._height.value()<=445){var i=["center","top","left","topleft","extratop"];if(Object(c.isFeatureEnabled)("mobile_show_bottom_panel")&&i.push("bottom"), !i.includes(e))return!1}return!0},e.prototype._updateVisibility=function(){for(var e=this._bridge.visible.value(),t=0;te.year||this.year===e.year&&this.month>e.month||this.year===e.year&&this.month===e.month&&this.day>e.day?1:this.year===e.year&&this.month===e.month&&this.day===e.day?0:-1},e.prototype.before=function(e){return-1===this.compareTo(e)},e.prototype.toCalendar=function(e){return r.get_cal(r.get_timezone("Etc/UTC"),this.year,this.month-1,this.day)},e.prototype.addDays=function(t){var i=this.toCalendar(r.get_timezone("Etc/UTC"));return r.add_date(i,t),e.fromCalendar(i)},e.fromCalendar=function(t){return new e(r.get_year(t),r.get_month(t)+1,r.get_day_of_month(t))},e}()},OH2X:function(e,t,i){"use strict";t.LineToolFibRetracement=i("t2ex").LineToolFibRetracement,t.LineToolFibChannel=i("xnA2").LineToolFibChannel,t.LineToolFibSpeedResistanceArcs=i("Yjuu").LineToolFibSpeedResistanceArcs,t.LineToolProjection=i("68at").LineToolProjection,t.LineToolTrendBasedFibExtension=i("ZtA1").LineToolTrendBasedFibExtension,t.LineToolElliott=i("xz+e").LineToolElliott,t.LineToolFibCircles=i("4bfY").LineToolFibCircles,t.LineToolVertLine=i("n40Z").LineToolVertLine,t.LineToolCrossLine=i("MA5A").LineToolCrossLine,t.LineToolBarsPattern=i("2bPF").LineToolBarsPattern,t.LineToolTrendBasedFibTime=i("yUly").LineToolTrendBasedFibTime,t.LineToolFibTimeZone=i("FsE7").LineToolFibTimeZone,t.LineToolCircleLines=i("tG6Q").LineToolCircleLines,t.LineToolDateRange=i("WkYF").LineToolDateRange,t.LineToolPriceRange=i("RDDl").LineToolPriceRange,t.LineToolDateAndPriceRange=i("UCMi").LineToolDateAndPriceRange,t.LineToolParallelChannel=i("qcGP").LineToolParallelChannel,t.LineToolTrendAngle=i("nW7S").LineToolTrendAngle,t.LineToolTrendLine=i("WPQD").LineToolTrendLine,t.LineToolInfoLine=i("yi8X").LineToolInfoLine,t.LineToolArrowMark=i("TohL").LineToolArrowMark,t.LineToolExecution=i("704P").LineToolExecution,t.LineToolPitchfan=i("NhkU").LineToolPitchfan,t.LineToolGannSquare=i("Z0Sh").LineToolGannSquare,t.LineToolFibSpeedResistanceFan=i("zZ5f").LineToolFibSpeedResistanceFan,t.LineToolGannComplex=i("nd9+").LineToolGannComplex,t.LineToolGannFixed=i("TBaH").LineToolGannFixed,t.LineToolGannFan=i("4u8j").LineToolGannFan,t.LineToolFibWedge=i("9QkW").LineToolFibWedge,t.LineToolPitchfork=i("aDyP").LineToolPitchfork,t.LineToolDisjointAngle=i("oIoN").LineToolDisjointChannel,t.LineToolFlatBottom=i("InMJ").LineToolFlatBottom,t.LineToolIcon=i("icPo").LineToolIcon,t.LineToolRotatedRectangle=i("Az04").LineToolRotatedRectangle,t.LineToolFibSpiral=i("i80N").LineToolFibSpiral,t.LineToolHeadAndShoulders=i("aILO").LineToolHeadAndShoulders,t.LineToolTriangle=i("isVH").LineToolTriangle,t.LineToolTrianglePattern=i("lNN+").LineToolTrianglePattern,t.LineTool5PointsPattern=i("NJRZ").LineTool5PointsPattern,t.LineToolThreeDrivers=i("PYn8").LineToolThreeDrivers,t.LineToolABCD=i("pKDv").LineToolABCD, t.LineToolPolyline=i("hP9j").LineToolPolyline,t.LineToolPrediction=i("Wh6B").LineToolPrediction,t.LineToolPriceLabel=i("zqZp").LineToolPriceLabel,t.LineToolArrowMarker=i("wiuq").LineToolArrowMarker,t.LineToolNote=i("gLxC").LineToolNote,t.LineToolNoteAbsolute=i("gLxC").LineToolNoteAbsolute,t.LineToolBrush=i("+hLl").LineToolBrush,t.LineToolArc=i("0Pxc").LineToolArc,t.LineToolCallout=i("odCa").LineToolCallout,t.LineToolBalloon=i("me8f").LineToolBalloon,t.LineToolText=i("V3Oj").LineToolText,t.LineToolHorzLine=i("/DxK").LineToolHorzLine,t.LineToolHorzRay=i("CJIV").LineToolHorzRay,t.LineToolRectangle=i("7qI1").LineToolRectangle,t.LineToolEllipse=i("V086").LineToolEllipse,t.LineToolTimeCycles=i("kIXa").LineToolTimeCycles,t.LineToolSineLine=i("bv/X").LineToolSineLine,t.LineToolGhostFeed=i("XUCF").LineToolGhostFeed,t.LineToolBezierQuadro=i("Xyly").LineToolBezierQuadro,t.LineToolBezierCubic=i("N+BX").LineToolBezierCubic,t.LineToolArrow=i("QQu0").LineToolArrow,t.LineToolRay=i("5ZUI").LineToolRay,t.LineToolExtended=i("CHw2").LineToolExtended,t.LineToolSchiffPitchfork=i("v5F8").LineToolSchiffPitchfork,t.LineToolSchiffPitchfork2=i("XFad").LineToolSchiffPitchfork2,t.LineToolInsidePitchfork=i("EqoR").LineToolInsidePitchfork,t.LineToolTextAbsolute=i("V3Oj").LineToolTextAbsolute,t.LineToolArrowMarkLeft=i("TohL").LineToolArrowMarkLeft,t.LineToolArrowMarkRight=i("TohL").LineToolArrowMarkRight,t.LineToolArrowMarkUp=i("TohL").LineToolArrowMarkUp,t.LineToolArrowMarkDown=i("TohL").LineToolArrowMarkDown,t.LineToolFlagMark=i("aIha").LineToolFlagMark,t.LineToolCypherPattern=i("bTqm").LineToolCypherPattern,t.LineToolElliottImpulse=i("xz+e").LineToolElliottImpulse,t.LineToolElliottTriangle=i("xz+e").LineToolElliottTriangle,t.LineToolElliottTripleCombo=i("xz+e").LineToolElliottTripleCombo,t.LineToolElliottCorrection=i("xz+e").LineToolElliottCorrection,t.LineToolElliottDoubleCombo=i("xz+e").LineToolElliottDoubleCombo,t.LineToolRiskRewardLong=i("tDUI").LineToolRiskRewardLong,t.LineToolRiskRewardShort=i("tDUI").LineToolRiskRewardShort,t.LineToolPosition=i("ziJ5").LineToolPosition,t.LineToolOrder=i("B4/o").LineToolOrder},"OK+B":function(e,t,i){"use strict";var r=i("Eyy1").assert,n=i("eJTA"),o=n.rgba,s=n.rgbaToString,a=n.parseRgb,l=i("+GxX").isFeatureEnabled,c=i("cWHH"),u=i("1Wlv").PriceScale,h=i("8sOK").StudyStub,d=i("CW80"),p=d.createLineTool,f=d.createLineToolProperties,_=d.createStudyLineToolProperties,m=d.isLineToolName,y=d.isStudyLineToolName,g=i("Ss5c").LineDataSource,v=i("OH2X").LineToolBarsPattern,S=i("OH2X").LineToolCallout,b=i("HLXm"),w=i("GVHu"),P=w.Study,C=w.prepareStudyPropertiesForLoadChart,x=i("3ClC").createStudy,T=i("qJq3").Series,L=i("dfhE"),I=i("n5al"),M=i("0YCj"),O=i("Kxc7"),A=i("uOxu").getLogger("Chart.Serialization"),k=i("OH2X").LineToolParallelChannel,E=i("OH2X").LineToolTrendAngle,D=i("OH2X").LineToolGhostFeed,V=i("OH2X").LineToolElliott,B=i("7ktv").PriceDataSource,R=i("iDOr").Pane,N=i("Tmoa"),F=i("jofe").createDeferredPromise,j=i("ApcL").preferencesByWhiteList,W=(A=i("uOxu").getLogger("Chart.Serialization"), i("mPvX").LineToolsGroupModel);c.version=2,c.prototype.state=function(e,t,i){for(var r={panes:[]},n=0;n1&&n.push(l)),s=(s+1)%t.length}return n},c.prototype.restoreState=function(e,t,i){new z(this).reset();var r={};if(e.panes)if(Array.isArray(e.panes)){if(!(e.panes.length<1)){if(this._shouldBeSavedEvenIfHidden=void 0===e.shouldBeSavedEvenIfHidden||e.shouldBeSavedEvenIfHidden,e.chartProperties&&!e.chartProperties.timezone&&(e.chartProperties.timezone=e.timezone),e.chartProperties){var n=TradingView.factoryDefaults("chartproperties").scalesProperties;TradingView.merge(n,e.chartProperties.scalesProperties),!("showLastValue"in n)||"showSeriesLastValue"in n||"showStudyLastValue"in n||(n.showSeriesLastValueProperty=n.showLastValue,n.showStudyLastValueProperty=n.showLastValue),"showSeriesLastValue"in n&&(r.showSeriesLastValueProperty=!0),"showStudyLastValue"in n&&(r.showStudyLastValueProperty=!0),e.chartProperties.paneProperties.vertGridProperties=e.chartProperties.paneProperties.vertGridProperties||TradingView.clone(e.chartProperties.paneProperties.gridProperties),e.chartProperties.paneProperties.horzGridProperties=e.chartProperties.paneProperties.horzGridProperties||TradingView.clone(e.chartProperties.paneProperties.gridProperties),this._properties.paneProperties.mergeAndFire(e.chartProperties.paneProperties),this._properties.scalesProperties.mergeAndFire(n),e.chartProperties.timezone&&this._properties.timezone.setValue(e.chartProperties.timezone), e.chartProperties.chartEventsSourceProperties&&this._properties.chartEventsSourceProperties&&this._properties.chartEventsSourceProperties.mergeAndFire(e.chartProperties.chartEventsSourceProperties),this._timeScale.restoreState(e.timeScale,t),this._updateDateTimeFormatter()}if(e.timeScale&&this._timeScale.restoreState(e.timeScale,t),!this.readOnly()){var o=this._getExceedingChildStudies(e.panes);if(o.length)for(var s=e.panes.length-1;s>=0;--s){for(var a=(h=e.panes[s]).sources.length-1;a>=0;--a){var l=h.sources[a];~o.indexOf(l)&&h.sources.splice(a,1)}h.sources.length||e.panes.splice(s,1)}}var c=e.panes;this.panes()[0].restoreState(c[0],t,e.version,r,i,!0);var u=1;for(s=1;sm&&f%100==0?{lines_limit_exceeded:!0,line_tools_count:f}:(this._dataSourceCollectionChanged.fire(),{})}A.logDebug("ChartModel.restoreState: invalid state")}else A.logDebug("ChartModel.restoreState: invalid state");else A.logDebug("ChartModel.restoreState: invalid state")},R.prototype.state=function(e,t,i,r,n){var o={},s=new Map;function a(e){if(s.has(e))return s.get(e);var o=null,a=i&&!e.isSavedInStudyTemplates()||!e.state||!(o=e.state(t,n))||!e.isSavedInChart(t)||r&&e.isActualSymbol&&!e.isActualSymbol()?null:o;return s.set(e,a),a}if(e){o.sources=[];for(var l=0;l1e200){var m=h-1;A.logWarn("Datasource zorder has bad value: "+f.zorder+" Resetting it to "+m),f.zorder=m}else if(!this.isZOrderAvailable(f.zorder)){l&&"MainSeries"===_&&this._model.mainSeries().zorder()===f.zorder||(f.zorder=d+1)}s[O=f.id]=f.ownerSource,_&&("MainSeries"===_?this._restoreMainSeries(f,t,l,r,n,o):_.toLowerCase().startsWith("study")?this._restoreStudy(f,t,r,o):TradingView.isInherited(TradingView[_],g)?this.restoreLineTool(f,t,void 0,o):TradingView[_]&&TradingView[_].createFromState&&this._restoreSpecialSource(f,t,o)),h=Math.min(h,f.zorder),d=Math.max(d,f.zorder)}}}var y,v,S=new Set,b=this;function w(e){var t=defaults("chartproperties").paneProperties.axisProperties,i=new u(b.model().properties().scalesProperties,t);return i.restoreState(e.state),e.sources.forEach((function(e){var r=b.dataSourceForId(e);r&&function(e,t,i){S.add(e),void 0!==i.m_showSymbolLabels&&e instanceof T&&b.model().properties().scalesProperties.showSymbolLabels.setValue(i.m_showSymbolLabels), e.setPriceScale(t),t.addDataSource(e)}(r,i,t)})),0===i.dataSources().length?null:i}if(e.leftAxisesState)y=e.leftAxisesState.map(w).filter((function(e){return null!==e}));else{var C=w({state:e.leftAxisState,sources:e.leftAxisSources});y=null!==C?[C]:[]}if(this._leftPriceScales.slice().forEach(function(e){this.removePriceScale(e)}.bind(this)),this._leftPriceScales=[],y.forEach((function(e){b._placePriceScale(e,"left")})),e.rightAxisesState)v=e.rightAxisesState.map(w).filter((function(e){return null!==e}));else{var x=w({state:e.rightAxisState,sources:e.rightAxisSources});v=null!==x?[x]:[]}this._rightPriceScales.forEach(function(e){this.removePriceScale(e)}.bind(this)),this._rightPriceScales=[],v.forEach((function(e){b._placePriceScale(e,"right")})),this._currentPriceScaleRatio=e.priceScaleRatio||e.leftPriceScaleRatio||e.rightPriceScaleRatio||null;for(p=0;p=t||!i._shouldExtrapolateMore()?null:r(i.newBarBuilder(e),n,t,!0).times}))},s.prototype._ensureExtrapolatedToTime=function(e,t){var i=this;return this._extrapolateData(e,(function(r){if(r>=t||!i._shouldExtrapolateMore())return null;var o=n(i.newBarBuilder(e),r,t,2e3,!0);return o.times[o.length-1]e?this._extrapolatedBarsCache=[]:this._lastRealBarTime!==t&&this._extrapolatedBarsCache.shift(e-this._lastRealBarIndex)),this._lastRealBarIndex=e,this._lastRealBarTime=t;for(var i=0;i'},PoSe:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,i){var r,n,o,s=null,a=0;i=i||{};var l=function(){a=!1===i.leading?0:Date.now(),s=null,o=e.apply(r,n),s||(r=n=null)};return function(){var c=Date.now();a||!1!==i.leading||(a=c);var u=t-(c-a);return r=this,n=arguments,u<=0||u>t?(s&&(clearTimeout(s),s=null),a=c,o=e.apply(r,n),s||(r=n=null)):s||!1===i.trailing||(s=setTimeout(l,u)),o}}, e.exports=t.default},Q19o:function(e,t,i){"use strict";(function(t,r){var n=i("Eyy1").ensureNotNull,o=i("jA0t"),s=i("9iCb").applyOverridesToStudy,a=i("0YCj"),l=i("5JMW"),c=l.LineDataSourceApi,u=l.isLineToolRiskReward,h=i("N1UO").StudyApi,d=i("ltKl").SeriesApi,p=i("QrSB").SelectionApi,f=i("mf9N").PaneApi,_=i("IiTo"),m=i("LxhU").Interval,y=i("jCNj"),g=i("2jXJ").supportedLineTools,v=i("7MZv").showTooManyStudiesNotice,S=i("ogJP").isNumber,b=i("ogJP").inherit,w=i("vu5c").onSeriesCompletedOrErrorReceived,P=i("CW80").createLineToolProperties,C=i("96Yh"),x=C.lineToolEntityInfo,T=C.studyEntityInfo,L=i("lReN").LineToolsGroupControllerApi,I=i("ocrj").RemoveSourcesCommand,M=i("FDyI").ChartWidgetApiBase,O=i("mMWL"),A=function(e,i){M.call(this,e),this._panes=new WeakMap,this._studies=new WeakMap,this._lineDataSources=new WeakMap,this._activateChart=i,this._selectionApi=null,this._visibleBarsChanged=new t,this._chartWidget.onAboutToBeDestroyed().subscribe(this,this._destroy,!0),this._chartWidget.withModel(this,(function(){this._chartWidget.model().timeScale().visibleBarsStrictRangeChanged().subscribe(this,this._onVisibleBarsChanged)}))};function k(e,t){return t.map((function(t){return e.dataSourceForId(t)}))}function E(e,t){var i=r.utc_to_cal(t.timezone,1e3*e),n=t.spec.correctTradingDay(i);return r.set_hms(n,0,0,0,0,y.get_timezone("Etc/UTC")),n.getTime()/1e3}b(A,M),A.prototype._getPaneApi=function(e){var t=this._panes.get(e);return void 0===t&&(t=new f(e,this._chartWidget),this._panes.set(e,t)),t},A.prototype._getStudyApi=function(e){var t=this._studies.get(e);return void 0===t&&(t=new h(e,this._chartWidget.model()),this._studies.set(e,t)),t},A.prototype._getLineDataSourceApi=function(e){var t=this._lineDataSources.get(e);return void 0===t&&(t=new c(e,this._chartWidget.model().model(),{apiPointsToDataSource:this._convertUserPointsToDataSource.bind(this),dataSourcePointsToPriced:function(e){var t=this._chartWidget.model().mainSeries().syncModel(),i=this._chartWidget.model().timeScale();return e.map((function(e){var r=i.normalizeBarIndex(e.index);return{price:e.price,time:t.projectTime(r.time_t,r.offset)}}))}.bind(this)}),this._lineDataSources.set(e,t)),t},A.prototype._makeSubscriptionFromDelegate=function(e){return{subscribe:e.subscribe.bind(e),unsubscribe:e.unsubscribe.bind(e),unsubscribeAll:e.unsubscribeAll.bind(e)}},A.prototype.executeActionById=function(e){this._chartWidget.executeActionById(e)},A.prototype.getCheckableActionState=function(e){return this._chartWidget.getCheckableActionState(e)},A.prototype.setZoomEnabled=function(e){this._chartWidget.model().model().setZoomEnabled(e)},A.prototype.setScrollEnabled=function(e){this._chartWidget.model().model().setScrollEnabled(e)},A.prototype.refreshMarks=function(){this._chartWidget.refreshMarks()},A.prototype.clearMarks=function(){this._chartWidget.clearMarks()},A.prototype.symbol=function(){return this._chartWidget.getSymbol()},A.prototype.symbolExt=function(){var e=this._chartWidget.model().mainSeries().symbolInfo();return e?{symbol:e.name,full_name:e.full_name, exchange:e.exchange,description:e.description,type:e.type}:null},A.prototype.resolution=function(){return this._chartWidget.model().mainSeries().properties().interval.value()},A.prototype.setSymbol=function(e,t){if(e!==this.symbol()){var i=this._chartWidget.model().mainSeries().dataEvents();t&&w(i,(function(e){e||t()})),this._activateChart(),this._chartWidget.setSymbol(e)}},A.prototype.resetData=function(){this._chartWidget.model().mainSeries().rerequestData()},A.prototype.setResolution=function(e,t){var i=m.normalize(e);if(null!==i&&i!==this.resolution()){var r=this._chartWidget.model().mainSeries().dataEvents();t&&w(r,(function(e){e||t()})),this._activateChart(),this._chartWidget.setResolution(i)}},A.prototype.setEntityVisibility=function(e,t){console.warn("`setEntityVisibility` is deprecated. Use shape/study API instead");var i=this._chartWidget.model().model().dataSourceForId(e);if(i){var r=i.properties();r&&r.visible&&r.visible.setValue(t)}},A.prototype.getAllStudies=function(){return this._chartWidget.model().model().allStudies().map(T)},A.prototype.availableZOrderOperations=function(e){var t=k(this._chartWidget.model().model(),e);return this._chartWidget.model().availableZOrderOperations(t)},A.prototype.sendToBack=function(e){var t=k(this._chartWidget.model().model(),e);this._chartWidget.model().sendToBack(t)},A.prototype.bringToFront=function(e){var t=k(this._chartWidget.model().model(),e);this._chartWidget.model().bringToFront(t)},A.prototype.insertAfter=function(e,t){var i=this._chartWidget.model().model(),r=k(i,e),n=i.dataSourceForId(t);this._chartWidget.model().insertAfter(r,n)},A.prototype.insertBefore=function(e,t){var i=this._chartWidget.model().model(),r=k(i,e),n=i.dataSourceForId(t);this._chartWidget.model().insertBefore(r,n)},A.prototype.bringForward=function(e){var t=k(this._chartWidget.model().model(),e);this._chartWidget.model().bringForward(t)},A.prototype.sendBackward=function(e){var t=k(this._chartWidget.model().model(),e);this._chartWidget.model().sendBackward(t)},A.prototype.showPropertiesDialog=function(e){var t=this._chartWidget.model().model().dataSourceForId(e);if(null===t)throw new Error("Study or shape "+e+" does not exist");this._chartWidget.showChartPropertiesForSource(t)},A.prototype.getAllShapes=function(){return this._chartWidget.model().model().allLineTools().map(x).filter((function(e){return null!==e.name}))},A.prototype.removeAllShapes=function(){this._chartWidget.removeAllDrawingTools()},A.prototype.removeAllStudies=function(){this._chartWidget.removeAllStudies()},A.prototype.removeEntity=function(e,t){var i=this._chartWidget.model().chartModel().dataSourceForId(e);i?t&&t.disableUndo?new I(this._chartWidget.model().chartModel(),[i],"").redo():this._chartWidget.model().removeSource(i,!0,!0):console.warn("Can't find a source with id: "+e)},A.prototype.removeEntityWithUndo=function(e){var t=this._chartWidget.model().chartModel().dataSourceForId(e);this._chartWidget.model().removeSource(t,!1)},A.prototype.selection=function(){ return null===this._selectionApi&&(this._selectionApi=new p(this._chartWidget.model().model())),this._selectionApi},A.prototype.createStudyTemplate=function(e){return this._chartWidget.model().model().studyTemplate(e.saveSymbol,e.saveInterval)},A.prototype.drawOnAllCharts=function(e){O.drawOnAllCharts.setValue(e)},A.prototype.applyStudyTemplate=function(e){this._chartWidget.model().applyStudyTemplate(e,""+1e3*Math.random())},A.prototype.setVisibleRange=function(e,t){if(void 0!==e&&e.from&&e.to&&!isNaN(e.from)&&!isNaN(e.to)){var i=[parseInt(e.from),parseInt(e.to)],r=this._alignPoints(i),n=r[0],o=r[1],s=void 0!==t&&"function"==typeof t,a=new Promise(function(e){this._chartWidget.setVisibleTimeRange(n,o,s?{}:t,e)}.bind(this));return s&&(console.warn("setVisibleRange now returns a Promise object and don't accept callback as the last argument"),a.then(t)),a}console.warn("Wrong time range: "+JSON.stringify(e)+'. Expected an object with "from" and "to" numeric values.')},A.prototype._getSession=function(){var e=this._chartWidget.model().mainSeries().symbolInfo();return new _.SessionInfo(e.timezone,e.session,e.holidays,e.corrections)},A.prototype.getVisibleRange=function(){var e={from:0,to:0},t=this._chartWidget.model().timeScale(),i=t.visibleBarsStrictRange();if(null===i)return e;var r=this._chartWidget.model().mainSeries(),o=r.syncModel();if(null===o)return e;var s=n(r.data().last()),a=i.lastBar()-s.index,l=a<=0?t.indexToTimePoint(i.lastBar()):o.projectTime(s.value[TradingView.TIME_PLOT],a);if(e.from=+t.indexToTimePoint(Math.max(0,i.firstBar()))||0,e.to=+l||0,m.isDWM(r.interval())){var c=this._getSession();e.from=E(e.from,c),e.to=E(e.to,c)}return e},A.prototype.getTimeScaleLogicalRange=function(){return this._chartWidget.model().timeScale().logicalRange()},A.prototype.getVisiblePriceRange=function(){return console.warn("`getVisiblePriceRange` is deprecated. Use Price Scale API instead"),this._chartWidget.model().mainSeries()?this._chartWidget.model().mainSeries().priceScale().priceRangeInPrice():null},A.prototype.scrollPosition=function(){return this._chartWidget.model().timeScale().rightOffset()},A.prototype.defaultScrollPosition=function(){return this._chartWidget.model().timeScale().defaultRightOffsetProperty().value()},A.prototype._createTradingPrimitive=function(e,t){var i=this;var r,o,s=this._chartWidget.model().model(),a=s.paneForSource(s.mainSeries());return(t?s:this._chartWidget.model()).createLineTool(a,(r=TradingView.CLOSE_PLOT,{index:(o=n(i._chartWidget.model().mainSeries().bars().last())).index,price:o.value[r]}),e)._adapter},A.prototype.createOrderLine=function(e){e=e||{};return this._createTradingPrimitive("LineToolOrder",e.disableUndo)},A.prototype.createPositionLine=function(e){e=e||{};return this._createTradingPrimitive("LineToolPosition",e.disableUndo)},A.prototype.createExecutionShape=function(e){e=e||{};return this._createTradingPrimitive("LineToolExecution",e.disableUndo)},A.prototype.createShape=function(e,t){return this.createMultipointShape([e],t)},A.prototype._alignPoints=function(e){ var t=this._chartWidget.model().model(),i=t.mainSeries(),r=i.interval();if(t.timeScale().isEmpty()||!m.isDWM(r))return e;var n=_.createAligner(r,i.symbolInfo(),!0);return null===n?e:e.map((function(e){return e?(n.moveTo(1e3*e),n.startOfBar(0)/1e3):e}))},A.prototype._convertUserPointsToDataSource=function(e){var t=this._chartWidget.model().model(),i=t.mainSeries(),r=t.timeScale().points(),n=i.data();if(t.timeScale().isEmpty())return null;var o=e.map((function(e){return e.time})),s=this._alignPoints(o);function a(e,t,o){var s=r.closestIndexLeft(e)||0,a={index:s},l=r.valueAt(s);if(e>l&&s===r.lastIndex()){var c=i.syncModel().distance(l,e);c.success&&(a.index=a.index+c.result)}if(S(t))a.price=t;else{var u=o?["open","high","low","close"].indexOf(o)+1:1;u<=0&&(u=1),a.price=n.valueAt(s)[u]}return a}for(var l=[],c=0;c2)throw new Error("Wrong points count for "+t.shape+". Required 1 or 2");2===l.length&&(p.startChanging(1,l[1]),p.setPoint(1,l[1]),p.endChanging())}else{var f=p.pointsCount();if(f!==l.length&&-1!==f)throw new Error("Wrong points count for "+t.shape+". Required "+f);for(var _=1;_this._minValue&&e.maxValue()5;if(c||!t){if(c&&!this._moveExceededManhattanDistance&&t){var u=.5*s,h=a>=u&&!this._options.treatVertTouchDragAsPageScroll,d=u>a&&!this._options.treatHorzTouchDragAsPageScroll;h||d||(this._preventDragProcess=!0)}c&&(this._moveExceededManhattanDistance=!0,this._cancelClick=!0,t&&this._clearLongTapTimeout()),this._preventDragProcess||(this._processEvent(i,this._handler.pressedMouseMoveEvent),t&&Object(o.a)(e))}}}},e.prototype._mouseUpHandler=function(e){if(!("button"in e)||0===e.button){var t=this._makeCompatEvent(e);this._clearLongTapTimeout(),this._mouseMoveStartPosition=null,this._mousePressed=!1,this._unsubscribeRoot&&(this._unsubscribeRoot(),this._unsubscribeRoot=null);var i=l(e);if(i&&this._mouseLeaveHandler(e),this._processEvent(t,this._handler.mouseUpEvent),i?++this._tapCount:++this._clickCount,this._clickTimeoutId&&(this._clickCount>1||this._tapCount>1))Math.abs(this._clickPosition.x-t.localX)+Math.abs(this._clickPosition.y-t.localY)<(i?15:5)&&!this._cancelClick&&this._processEvent(t,this._handler.mouseDoubleClickEvent),this._resetClickTimeout();else this._cancelClick||this._processEvent(t,this._handler.mouseClickEvent);if(l(e)&&(0===this._tapCount&&Object(o.a)(e),this._mouseLeaveHandler(e),0===e.touches.length&&this._longTapActive&&(this._longTapActive=!1,Object(o.a)(e))),r.isFF)this._target.ownerDocument.documentElement.removeEventListener("mouseleave",this._onFirefoxOutsideMouseUp)}},e.prototype._clearLongTapTimeout=function(){null!==this._longTapTimeoutId&&(clearTimeout(this._longTapTimeoutId),this._longTapTimeoutId=null)},e.prototype._mouseDownHandler=function(e){if(!("button"in e)||0===e.button){var t=this._target.ownerDocument.documentElement;r.isFF&&t.addEventListener("mouseleave",this._onFirefoxOutsideMouseUp);var i=this._makeCompatEvent(e);this._cancelClick=!1,this._moveExceededManhattanDistance=!1,this._preventDragProcess=!1,l(e)&&this._mouseEnterHandler(e),this._mouseMoveStartPosition={x:i.pageX,y:i.pageY},this._unsubscribeRoot&&(this._unsubscribeRoot(),this._unsubscribeRoot=null);var n=this._mouseMoveWithDownHandler.bind(this),o=this._mouseUpHandler.bind(this);this._unsubscribeRoot=function(){t.removeEventListener("touchmove",n),t.removeEventListener("touchend",o),t.removeEventListener("mousemove",n),t.removeEventListener("mouseup",o)},t.addEventListener("touchmove",n,{passive:!1}),t.addEventListener("touchend",o,{passive:!1}),this._clearLongTapTimeout(),l(e)&&1===e.touches.length?this._longTapTimeoutId=setTimeout(this._longTapHandler.bind(this,e),240):(t.addEventListener("mousemove",n),t.addEventListener("mouseup",o)),this._mousePressed=!0,this._processEvent(i,this._handler.mouseDownEvent),this._clickTimeoutId||(this._clickCount=0,this._tapCount=0,this._clickTimeoutId=setTimeout(this._resetClickTimeout.bind(this),500),this._clickPosition={x:i.localX,y:i.localY})}},e.prototype._init=function(){var e=this ;this._target.addEventListener("mouseenter",this._mouseEnterHandler.bind(this)),this._target.addEventListener("touchcancel",this._clearLongTapTimeout.bind(this));var t=this._target.ownerDocument,i=function(t){e._handler.mouseDownOutsideEvent&&(t.target&&e._target.contains(t.target)||e._handler.mouseDownOutsideEvent())};this._unsubscribeOutsideEvents=function(){t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",i)},t.addEventListener("mousedown",i),t.addEventListener("touchstart",i,{passive:!0}),this._target.addEventListener("mouseleave",this._mouseLeaveHandler.bind(this)),this._target.addEventListener("contextmenu",this._longTapHandler.bind(this)),this._target.addEventListener("touchstart",this._mouseDownHandler.bind(this),{passive:!0}),Modernizr.mobiletouch||this._target.addEventListener("mousedown",this._mouseDownHandler.bind(this)),this._initPinch(),this._target.addEventListener("touchmove",(function(){}),{passive:!1})},e.prototype._initPinch=function(){var e=this;void 0===this._handler.pinchStartEvent&&void 0===this._handler.pinchEvent&&void 0===this._handler.pinchEndEvent||(this._target.addEventListener("touchstart",(function(t){return e._checkPinchState(t.touches)}),{passive:!0}),this._target.addEventListener("touchmove",(function(t){if(2===t.touches.length&&null!==e._startPinchMiddlePoint&&void 0!==e._handler.pinchEvent){var i=a(t.touches[0],t.touches[1])/e._startPinchDistance;e._handler.pinchEvent(e._startPinchMiddlePoint,i),Object(o.a)(t)}}),{passive:!1}),this._target.addEventListener("touchend",(function(t){e._checkPinchState(t.touches)})))},e.prototype._checkPinchState=function(e){1===e.length&&(this._pinchPrevented=!1),2!==e.length||this._pinchPrevented||this._longTapActive?this._stopPinch():this._startPinch(e)},e.prototype._startPinch=function(e){var t=this._target.getBoundingClientRect()||{left:0,top:0};this._startPinchMiddlePoint={x:(e[0].clientX-t.left+(e[1].clientX-t.left))/2,y:(e[0].clientY-t.top+(e[1].clientY-t.top))/2},this._startPinchDistance=a(e[0],e[1]),void 0!==this._handler.pinchStartEvent&&this._handler.pinchStartEvent(),this._clearLongTapTimeout()},e.prototype._stopPinch=function(){null!==this._startPinchMiddlePoint&&(this._startPinchMiddlePoint=null,void 0!==this._handler.pinchEndEvent&&this._handler.pinchEndEvent())},e.prototype._mouseLeaveHandler=function(e){this._unsubscribeMousemove&&this._unsubscribeMousemove();var t=this._makeCompatEvent(e);this._processEvent(t,this._handler.mouseLeaveEvent)},e.prototype._longTapHandler=function(e){l(e)||Object(o.a)(e);var t=this._makeCompatEvent(e);this._processEvent(t,this._handler.longTapEvent),this._processEvent(t,this._handler.contextMenuEvent),this._cancelClick=!0,this._longTapActive=!0},e.prototype._processEvent=function(e,t){t&&t.call(this._handler,e)},e.prototype._makeCompatEvent=function(e){var t;t="touches"in e&&e.touches.length?e.touches[0]:"changedTouches"in e&&e.changedTouches.length?e.changedTouches[0]:e;var i=this._target.getBoundingClientRect()||{left:0,top:0};return{clientX:t.clientX,clientY:t.clientY, pageX:t.pageX,pageY:t.pageY,screenX:t.screenX,screenY:t.screenY,localX:t.clientX-i.left,localY:t.clientY-i.top,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,type:e.type.startsWith("mouse")?"mouse":"touch",target:t.target,view:e.view,preventDefault:function(){Object(o.a)(e)}}},e}();function a(e,t){var i=e.clientX-t.clientX,r=e.clientY-t.clientY;return Math.sqrt(i*i+r*r)}function l(e){return Boolean(e.touches)}},Si3H:function(e,t,i){"use strict";i.r(t);var r=i("Eyy1"),n=i("0YCj"),o=i.n(n),s=i("ogJP"),a=function(){function e(){}return e.prototype.targetMetaInfoVersion=function(){return 47},e.prototype.migrateMetaInfo=function(e){var t=e,i=e;if(i._metainfoVersion=47,t.defaults&&void 0!==t.defaults.precision){var r=t.defaults&&t.defaults.precision,n=Object(s.isNumber)(r)?r:parseInt(r);0===n?i.format={type:"volume"}:isFinite(n)?i.format={type:"price",precision:n}:i.format={type:"inherit"},delete t.defaults.precision}else i.format={type:"inherit"}},e.prototype.migratePropState=function(e){},e}(),l=i("mrSG"),c=function(){function e(){}return e.prototype.targetMetaInfoVersion=function(){return 50},e.prototype.migrateMetaInfo=function(e){var t=e,i=e;if(i._metainfoVersion=50,void 0!==t.defaults&&void 0!==t.defaults.ohlcPlots&&void 0!==t.ohlcPlots)for(var n=t.ohlcPlots,o=t.defaults.ohlcPlots,s=Object(r.ensureDefined)(Object(r.ensureDefined)(i.defaults).ohlcPlots),a=0,c=Object.keys(o);a=n.targetMetaInfoVersion()||(n.migrateMetaInfo(e),void 0!==t&&n.migratePropState(t),Object(r.assert)(e._metainfoVersion===n.targetMetaInfoVersion()))}))}u.sort((function(e,t){return e.targetMetaInfoVersion()-t.targetMetaInfoVersion()}))},SqfW:function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return a}));var r=i("mrSG"),n=i("tqok"),o=i("hsV8");function s(e,t){if(e.index>=t.length)return null;var i=t[e.index];return i===n.a?null:{startPrice:e.startPrice,endPrice:e.endPrice,index:i,extendTop:e.extendTop,extendBottom:e.extendBottom}}function a(e,t,i){var n=Object(o.ensureTimePointIndexIndex)(i.indexOf(e.index));return Object(r.__assign)(Object(r.__assign)({id:t},e),{index:n})}},Ss5c:function(e,t,i){"use strict";(function(e){ var r=i("Eyy1").ensureDefined,n=i("aO4+").Point,o=i("4TVt").LineToolPriceAxisView,s=i("fJhV").LineDataSourceTimeAxisView,a=i("fgLi").DataSource,l=i("mMWL"),c=i("LxhU"),u=c.Interval,h=c.ResolutionKind,d=i("pPtI").getServerInterval,p=i("uOxu").getLogger("Chart.LineDataSource"),f=i("FQhm"),_=i("aIyQ"),m=i("hayr").propertyPages,y=i("WkOR").areEqualSymbols,g=i("Kxc7"),v=i("ytGH").LineToolWidthsProperty,S=g.enabled("datasource_copypaste");function b(t,i){a.call(this),this._model=t,this._properties=i,this._pointAdded=new _,this._pointChanged=new _,this._onTemplateApplying=new _,this._onTemplateApplied=new _,this._paneViews=[],this._points=[],this._fixedPoints=[],this._timePoint=[],this._currentPointsetId=null,this._properties.hasChild("symbol")||this._properties.addChild("symbol",new e(t.mainSeries().symbol())),this._properties.hasChild("interval")||this._properties.addChild("interval",new e(t.mainSeries().interval())),this.calcIsActualSymbol(),this._properties.intervalsVisibilities.listeners().subscribe(this,b.prototype.calcIsActualSymbol);var r=this;if(this._properties.listeners().subscribe(this,(function(){r.propertiesChanged()})),this._createPointsProperties(),this.m_priceAxisViews=[],this.m_timeAxisViews=[],this.pointsCount()>0)for(var n=0;n=i.multiplier()&&(t=e.key)})),t},b.prototype.calcIsActualSymbol=function(){var e=this._properties.symbol,t=this._model.mainSeries(),i=e.value();if(this._isActualSymbol=t.symbolSameAsCurrent(i),this._isActualSymbol){var r=t.symbol();y(i,r)||(p.logWarn('Possible drawing "migrating" detected from "'+i+'" to "'+r+'"'),p.logWarn("Series symbolInfo: "+JSON.stringify(t.symbolInfo())),p.logWarn((new Error).stack)),e.setValue(r)}this.calcIsActualInterval(),this.calcIsActualCurrency()},b.prototype.calcIsActualCurrency=function(){if(this._model.currencyLabelEnabled()){var e=this.ownerSource();if(null===e)return void(this._isActualCurrency=!1);var t=this._properties.currencyId.value();if(null!==t)this._isActualCurrency=t===this.ownerSource().symbolSource().currency();else{var i=e.symbolSource().symbolInfo();this._isActualCurrency=null!==i&&i.currency_code===i.original_currency_code}}else this._isActualCurrency=!0},b.prototype.calcIsActualInterval=function(){var e=this._properties,t=this._model.mainSeries(),i=u.parse(t.interval()),r=e.intervalsVisibilities;if(this._isActualInterval=!1,i.isSeconds()&&i.multiplier()<60){var n=r.seconds.value(),o=r.secondsFrom.value(),s=r.secondsTo.value();this._isActualInterval=n&&i.multiplier()>=o&&i.multiplier()<=s}if(i.isSeconds()&&i.multiplier()>=60){var a=Math.floor(i.multiplier()/60);n=r.minutes.value(),o=r.minutesFrom.value(),s=r.minutesTo.value();this._isActualInterval=n&&a>=o&&a<=s}if(i.isMinutes()&&i.multiplier()<60){n=r.minutes.value(),o=r.minutesFrom.value(),s=r.minutesTo.value();this._isActualInterval=n&&i.multiplier()>=o&&i.multiplier()<=s}if(i.isMinutes()&&i.multiplier()>=60){var l=Math.floor(i.multiplier()/60);n=r.hours.value(),o=r.hoursFrom.value(),s=r.hoursTo.value();this._isActualInterval=n&&l>=o&&l<=s}if(i.isDays()){n=r.days.value(),o=r.daysFrom.value(),s=r.daysTo.value();this._isActualInterval=n&&i.multiplier()>=o&&i.multiplier()<=s}if(i.isWeeks()&&(this._isActualInterval=r.weeks.value()),i.isMonths()&&(this._isActualInterval=r.months.value()),i.isRange()&&(this._isActualInterval=r.ranges.value()),!this._isActualInterval&&this._model.selection().isSelected(this)){var c=this;this._model.selectionMacro((function(e){e.removeSourceFromSelection(c)}))}},b.PointIndexProperty=function(t,i){e.call(this),this._lineSource=t,this._pointIndex=i},inherit(b.PointIndexProperty,e),b.PointIndexProperty.prototype.value=function(){return this._lineSource.points()[this._pointIndex].index},b.PointIndexProperty.prototype.setValue=function(e){var t=this._lineSource.points()[this._pointIndex];t.index=e,this._lineSource.setPoint(this._pointIndex,t),this._lineSource._model.updateSource(this._lineSource),this._listeners.fire(this),this._lineSource.endChanging(!0),this._lineSource._syncMultichartState(),this._lineSource._properties.lastUpdateTime.setValue((new Date).valueOf())},b.prototype._syncMultichartState=function(){var e={points:this._timePoint,interval:this._model.mainSeries().interval()} ;this.linkKey&&this.isSynchronizable()&&l.finishChangingLineTool({model:this._model,linkKey:this.linkKey,symbol:this._model.mainSeries().symbol(),finalState:e})},b.prototype._createPointProperty=function(e){var t=this._properties.points;t.addProperty(e);var i=t[e];i.addChild("price",new b.PointPriceProperty(this,e)),i.addChild("bar",new b.PointIndexProperty(this,e))},b.prototype._createPointsProperties=function(){this._properties.addProperty("points");for(var e=0;e0&&(this._points=e)},b.prototype.restorePoints=function(e,t,i){this._timePoint=e,this._points=t, i||this.denormalizeTimePoints()},b.prototype.restoreExternalPoints=function(e){this.properties().interval.setValue(e.interval),this._timePoint=e.points,this.isActualSymbol()?this.createServerPoints():this.clearServerPoints()},b.prototype.restoreExternalState=function(e){this.properties().merge(e)},b.prototype.restorePositionPercents=function(e){this._positionPercents=e},b.prototype.getLinkKey=function(){return this.linkKey||null},b.prototype.updateAllViewsAndRedraw=function(){this.updateAllViews(),this._model.updateSource(this)},b.prototype.propertiesChanged=function(e){this.calcIsActualInterval(),this.updateAllViewsAndRedraw(),e||this._syncLineStyleIfNeeded()},b.prototype._syncLineStyleIfNeeded=function(){if(!this._syncLineStyleMuted&&this.linkKey){var e=this.properties().state(this._syncStateExclusions);delete e.interval,l.changeLineStyle({linkKey:this.linkKey,state:e,model:this._model})}},b.prototype._muteSyncLineStyle=function(){this._syncLineStyleMuted=!0},b.prototype._unmuteSyncLineStyleWithoutApplyingChanges=function(){this.propertiesChanged(),this._syncLineStyleMuted=!1},b.prototype.points=function(){for(var e=[],t=0;t=2&&this._properties.snapTo45Degrees&&this._snapPoint45Degree(i,this.points()[this.points().length-2]),i},b.prototype.addPoint=function(e,t,i){var r=this._preparePoint(e,t);return this._addPointIntenal(r,t,i)},b.prototype._addPointIntenal=function(e,t,i){this._points.push(e);var r=this._points.length===this.pointsCount();return r?(this._lastPoint=null,i||(this.normalizePoints(),this.createServerPoints())):this._lastPoint=e,this._pointAdded.fire(this._points.length-1),r},b.prototype.addFixedPoint=function(e){this._fixedPoints.push(e);var t=this._fixedPoints.length===this.pointsCount();return t&&this.calcPositionPercents(),t},b.prototype.calcPositionPercents=function(){if(!this.priceScale()||this.priceScale().isEmpty())return[];this._positionPercents=[];for(var e=0;e=0;--t)e.push(this._paneViews[t]);return e},b.prototype._setPaneViews=function(e){this._paneViews=e,this._model.lightUpdate()},b.prototype.dataWindowView=function(){return null},b.prototype.statusView=function(){return null},b.prototype.isSourceHidden=function(){return!this._properties.visible.value()||l.hideAllDrawings().value()&&this.canBeHidden()||!this._isActualInterval||!this._isActualSymbol||!this._isActualCurrency},b.prototype.isSynchronizable=function(){return!0},b.prototype.priceAxisViews=function(e,t){if(t!==this.priceScale()||this.isSourceHidden())return null;if(this._model.lineBeingEdited()===this){var i=this._model.linePointBeingEdited();if(i0&&(o=-o),o},t.prototype._reversePoints=function(){var e=this._points,t=e[0],i=e[1];this._points[0]=i, this._points[1]=t,this.normalizePoints(),this.restart()},t}(o.LineDataSource)},TMWk:function(e,t,i){"use strict";var r=i("Eyy1").assert,n=i("ogJP").clone,o=i("GVHu").Study,s=i("k9/m").PlotList,a=i("w4Ji").studyPlotFunctionMap,l=i("w4Ji").studyEmptyPlotValuePredicate;function c(e,t,i,r){o.call(this,e,t,i,r),this._underlyingData=new s(a(r),l)}inherit(c,o),c.prototype.clearData=function(){o.prototype.clearData.call(this),this._underlyingData.clear()},c.prototype._mergeData=function(e){this._invalidateLastNonEmptyPlotRowCache();var t=this._underlyingData.firstIndex();this._underlyingData.merge(e),t!==this._underlyingData.firstIndex()&&(this.m_data=new s(a(this._metaInfo),l));var i=this.m_data.lastIndex();this._underlyingData.range(i,this._underlyingData.lastIndex()).each(function(e,t){return this.m_data.add(e,n(t)),!1}.bind(this)),this._plotsForStrategyProcessing().forEach((function(e){this._createStrategy(e.strategy,e.strategyIndex,e.targetIndex,i).rebuildData(this.m_data)}),this)},c.prototype._plotsForStrategyProcessing=function(){var e=["dataoffset"],t=[];return this._metaInfo.plots.forEach((function(i,n){if(e.indexOf(i.type)>-1){var o=null;this._metaInfo.plots.forEach((function(e,t){e.id===i.target&&(o=t)})),r(o>=0,"target plot not found for strategy plot "+i.id);var s={strategy:i.type,strategyIndex:n,targetIndex:o};t.push(s)}}),this),t},c.prototype._createStrategy=function(e,t,i,r){return new c["Strategy_"+e](t,i,r)},c.Strategy_dataoffset=function(e,t,i){this._strategyPlotIndex=e,this._targetPlotIndex=t,this._startIndex=i},c.Strategy_dataoffset.prototype.rebuildData=function(e){var t=this._targetPlotIndex+1,i=this._strategyPlotIndex+1,r=null,n=null;e.range(this._startIndex||e.firstIndex(),e.lastIndex()).each((function(o,s){var a=s[t],l=s[i]?Math.round(s[i]):null;if(s[t]=null,s[i]=null,!l||l>0)return!1;var c=o+l,u={pointIndex:c,value:a};if(n){if(n.pointIndex!==u.pointIndex){c>=0&&(e.valueAt(c)[t]=a);var h=!1;r&&(h=r.value<=n.value&&n.value<=a||r.value>=n.value&&n.value>=a),h?n.pointIndex>=0&&(e.valueAt(n.pointIndex)[t]=null):r=n,n=u}}else n=u;return!1}))},t.study_ScriptWithDataOffset=c},TQMj:function(e,t,i){"use strict";i.r(t);var r=i("mrSG"),n=i("Eyy1"),o=i("LxhU"),s=i("KcY8"),a=i("Kxc7"),l=i("oXaB");function c(e){return e<10?"0"+e:e.toString()}i.d(t,"SeriesPriceAxisView",(function(){return f}));var u=a.enabled("countdown"),h=a.enabled("price_scale_always_last_bar_value"),d=[0,1,2,3,9,8],p=a.enabled("force_exchange_as_title"),f=function(e){function t(t,i){var r=e.call(this)||this;return r._source=t,r._data=i,r}return Object(r.__extends)(t,e),t.prototype._getSource=function(){return this._source},t.prototype._getData=function(){return this._data},t.prototype._isCountdownEnabled=function(){return u},t.prototype._countdownText=function(){var e=o.Interval.parse(this._source.interval());if(e.isDWM()||e.isSeconds()&&1===e.multiplier())return"" ;var t=1e3*Object(n.ensure)(Object(n.ensureNotNull)(this._source.data().bars().last()).value[0]),i=o.Interval.parse(this._source.interval()).inMilliseconds(),r=t.valueOf()+i,s=Math.round((r-this._currentTime())/1e3);if(s<=0)return"";var a=null;(s=Math.min(s,i/1e3))>=3600&&(a=c(Math.floor(s/3600))),s%=3600;var l=c(Math.floor(s/60));s%=60;var u=c(Math.floor(s));return null!==a?a+":"+l+":"+u:l+":"+u},t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var r=this._source.properties();if(12!==r.style.value()){var n=this._data.model.properties().scalesProperties,o=n.showSeriesLastValue.value(),s=u&&-1!==d.indexOf(r.style.value())&&r.showCountdown.value(),a=n.showSymbolLabels.value(),c=n.seriesLastValueMode.value()===l.PriceAxisLastValueMode.LastPriceAndPercentageValue,p=this._source.lastValueData(void 0,h);if(!p.noData){var f=8===r.style.value();if((o||s||a)&&f&&r.haStyle.showRealLastPrice.value()){var _=this._source.lastValueData(void 0,!1),m=this._source.lastValueData(void 0,!0);_.noData||m.noData||_.index!==m.index||(o=!1,s=!1,a=!1)}if(o||s){var y=this._axisFirstLineText(p,o,c),g=s?this._countdownText():"";0===y.length?(e.text=g,e.secondLine=""):(e.text=y,e.secondLine=g),0===y.length&&0===g.length||(e.visible=!0)}(a||c)&&(t.text=this._paneText(p,o,a,c),t.visible=t.text.length>0),i.background=this._source.priceLineColor(p.color),i.color=this.generateTextColor(i.background),i.coordinate=p.coordinate,i.floatCoordinate=p.floatCoordinate}}},t.prototype._paneText=function(e,t,i,r){var n="";if(p){var o=this._source.symbolInfo();n+=o?o.exchange+" ":""}else if(i){var s=this._source.getSymbolName();s.length>40&&(s=s.substr(0,37)+"..."),n+=s+" "}return t&&r&&(n+=this._source.priceScale().isPercentage()?e.formattedPriceAbsolute:e.formattedPricePercentage),n.trim()},t.prototype._axisFirstLineText=function(e,t,i){return t?i?this._source.priceScale().isPercentage()?e.formattedPricePercentage:e.formattedPriceAbsolute:e.text:""},t.prototype._currentTime=function(){return Date.now()+1e3*this._source.serverTimeOffset()},t}(s.a)},TTFo:function(e,t,i){"use strict";i.r(t),i.d(t,"fromPercent",(function(){return o})),i.d(t,"toPercent",(function(){return s})),i.d(t,"toPercentRange",(function(){return a})),i.d(t,"fromIndexedTo100",(function(){return l})),i.d(t,"toIndexedTo100",(function(){return c})),i.d(t,"toIndexedTo100Range",(function(){return u})),i.d(t,"toLog",(function(){return h})),i.d(t,"fromLog",(function(){return d}));var r=i("Qb4w"),n=i("Hr11");function o(e,t){return t<0&&(e=-e),e/100*t+t}function s(e,t){var i=100*(e-t)/t;return t<0?-i:i}function a(e,t){var i=s(e.minValue(),t),n=s(e.maxValue(),t);return new r.PriceRange(i,n)}function l(e,t){return t<0&&(e=-e),(e-=100)/100*t+t}function c(e,t){var i=100*(e-t)/t+100;return t<0?-i:i}function u(e,t){var i=c(e.minValue(),t),n=c(e.maxValue(),t);return new r.PriceRange(i,n)}function h(e){var t=Math.abs(e);if(t<1e-8)return 0;var i=Object(n.log10)(t+1e-4)+4;return e<0?-i:i}function d(e){var t=Math.abs(e);if(t<1e-8)return 0;var i=Math.pow(10,t-4)-1e-4;return e<0?-i:i}}, TcSq:function(e,t,i){"use strict";function r(e){return e===n(e)}function n(e){var t=e.indexOf("$"),i=e.indexOf("@");return t<0&&i>=0?null:e.substring(Math.max(t+1,0),i>=0?i:e.length)}function o(e){return e.startsWith("PUB;")}function s(e){return e.startsWith("USER;")}function a(e){return e.startsWith("STD;")}function l(e){return e.includes("Candlestick%1Pattern%1")}i.r(t),i.d(t,"isPineIdString",(function(){return r})),i.d(t,"extractPineId",(function(){return n})),i.d(t,"isPublishedPineId",(function(){return o})),i.d(t,"isCustomPineId",(function(){return s})),i.d(t,"isStandardPineId",(function(){return a})),i.d(t,"isCandleStickId",(function(){return l}))},TlGQ:function(e,t,i){"use strict";i.r(t),i.d(t,"visitObject",(function(){return o}));var r=i("ogJP");function n(e,t,i){return Object(r.isArray)(e)?function(e,t,i){return e.map((function(e){var r=n(e,t,i),o=t(r);return void 0!==o?o:r}))}(e,t,i):Object(r.isObject)(e)&&(Object(r.isHashObject)(e)||i&&i.visitInstances)?function(e,t,i){var r={};return Object.keys(e).forEach((function(o){var s=n(e[o],t,i),a=t(s);r[o]=void 0!==a?a:s})),r}(e,t,i):e}function o(e,t,i){var r=n(e,t,i),o=t(r);return void 0!==o?o:r}},TmNs:function(e,t,i){"use strict";i.r(t);var r=i("mrSG"),n=i("KcY8"),o=i("Eyy1"),s=i("jFln"),a=i("8Uy/"),l=i("gAom"),c=function(){function e(e,t){this.setData(e,t)}return e.prototype.setData=function(e,t){this._data=e,this._commonData=t},e.prototype.draw=function(e,t,i,r,n,c){if(this._data.visible){var u=this._commonData.coordinate;void 0!==this._commonData.fixedCoordinate&&(u=this._commonData.fixedCoordinate),e.lineWidth=Math.max(1,Math.floor(Object(o.ensureDefined)(this._data.linewidth)*c)),e.lineCap="butt",Object(s.setLineStyle)(e,void 0===this._data.linestyle?a.LINESTYLE_DOTTED:this._data.linestyle),e.strokeStyle=this._commonData.color,Object(l.drawHorizontalLine)(e,Math.round(u*c),0,Math.ceil(r*c))}},e.prototype.height=function(e,t){return 0},e}();i.d(t,"PriceLineAxisView",(function(){return u})),i.d(t,"SeriesPriceLineAxisView",(function(){return h})),i.d(t,"StudyPriceLineAxisView",(function(){return d}));var u=function(e){function t(){return e.call(this,c)||this}return Object(r.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){if(t.visible=!1,e.visible=!1,this._isVisible()){var r=this._value();r.noData||(i.background="",i.color=this._priceLineColor(r.color),i.coordinate=r.coordinate,i.floatCoordinate=r.floatCoordinate,e.linewidth=this._lineWidth(),e.visible=!0)}},t}(n.a),h=function(e){function t(t){var i=e.call(this)||this;return i._series=t,i}return Object(r.__extends)(t,e),t.prototype._value=function(){return this._series.lastValueData(void 0,!0)},t.prototype._priceLineColor=function(e){return this._series.priceLineColor(e)},t.prototype._lineWidth=function(){return this._series.properties().priceLineWidth.value()},t.prototype._isVisible=function(){var e=this._series.model().properties().scalesProperties.showSeriesLastValue.value();return this._series.properties().showPriceLine.value()&&e},t}(u),d=function(e){function t(t,i){ var r=e.call(this)||this;return r._study=t,r._plotname=i,r}return Object(r.__extends)(t,e),t.prototype._value=function(){return this._study.lastValueData(this._plotname,!0)},t.prototype._lineWidth=function(){return this._study.properties().styles[this._plotname].linewidth.value()},t.prototype._priceLineColor=function(e){return e},t.prototype._isVisible=function(){var e=this._study.model().properties().scalesProperties.showStudyLastValue.value();return this._study.properties().styles[this._plotname].trackPrice.value()&&e},t}(u)},Tmoa:function(e,t,i){"use strict";i.r(t),i.d(t,"generateColor",(function(){return n})),i.d(t,"alphaToTransparency",(function(){return o})),i.d(t,"transparencyToAlpha",(function(){return s})),i.d(t,"resetTransparency",(function(){return a})),i.d(t,"getLuminance",(function(){return l})),i.d(t,"isHexColor",(function(){return c})),i.d(t,"colorFromBackground",(function(){return u}));var r=i("eJTA");function n(e,t,i){if(t=t||0,!c(e))return i?Object(r.rgbaToString)(Object(r.rgba)(Object(r.parseRgb)(e),Object(r.normalizeAlphaComponent)(s(t)))):e;var n=Object(r.parseRgb)(e),o=n[0],a=n[1],l=n[2],u=Object(r.normalizeAlphaComponent)(s(t));return Object(r.rgbaToString)([o,a,l,u])}function o(e){return 100*(1-e)}function s(e){if(e<0||e>100)throw new Error("invalid transparency");return 1-e/100}function a(e){return c(e)?e:Object(r.rgbaToString)(Object(r.rgba)(Object(r.parseRgb)(e),Object(r.normalizeAlphaComponent)(1)))}function l(e){var t=Object(r.parseRgb)(e).map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e){return 0===e.indexOf("#")}function u(e){return"black"===Object(r.rgbToBlackWhiteString)(Object(r.parseRgb)(e),150)?"white":"black"}},TohL:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolArrowMark",(function(){return f})),i.d(t,"LineToolArrowMarkLeft",(function(){return _})),i.d(t,"LineToolArrowMarkUp",(function(){return m})),i.d(t,"LineToolArrowMarkRight",(function(){return y})),i.d(t,"LineToolArrowMarkDown",(function(){return g}));var r=i("mrSG"),n=i("YFKU"),o=i("hayr"),s=i("Ocx9"),a=i("Ss5c"),l=i("tc+8"),c=i.n(l),u=Object(n.t)("Arrow Mark Left"),h=Object(n.t)("Arrow Mark Up"),d=Object(n.t)("Arrow Mark Right"),p=Object(n.t)("Arrow Mark Down"),f=function(e){function t(r,n,o){var s=this,a=n||t.createProperties(null,o);return(s=e.call(this,r,a)||this)._textPaneView=null,i.e("lt-pane-views").then(function(e){var t=[new(0,i("ct+2").ArrowMarkPaneView)(s,r)];s._setPaneViews(t)}.bind(null,i)).catch(void 0),s}return Object(r.__extends)(t,e),t.prototype.paneViews=function(){var t=e.prototype.paneViews.call(this);return null!==t&&this._textPaneView&&t.push(this._textPaneView),t},t.prototype.pointsCount=function(){return 1},t.prototype.getStylesPropertyPage=function(){return o.propertyPages.LineToolArrowMarkStylesPropertyPage},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.createProperties=function(e,i){var r=new s.DefaultProperty(i,e);return t._configureProperties(r),r},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"5sLb")).then((function(e){return e.ArrowMarkDefinitionsViewModel}))},t.prototype._applyTemplateImpl=function(t){e.prototype._applyTemplateImpl.call(this,t),this.properties().childs().text.setValue(t.text)},t._configureProperties=function(e){a.LineDataSource._configureProperties(e),e.hasChild("text")||e.addChild("text",new c.a("")),e.addExclusion("text")},t.version=2,t}(a.LineDataSource),_=function(e){function t(t,i){var r=e.call(this,t,i,"linetoolarrowmarkleft")||this;return r._constructor="LineToolArrowMarkLeft",r}return Object(r.__extends)(t,e),t.prototype.direction=function(){return"left"},t.prototype.translatedType=function(){return u},t.prototype.name=function(){return"Arrow Mark Left"},t.prototype.textAlignParams=function(){return{horzAlign:"left",vertAlign:"middle",offsetX:22,offsetY:3}},t.createProperties=function(e){return f.createProperties(e,"linetoolarrowmarkleft")},t}(f),m=function(e){function t(t,i){var r=e.call(this,t,i,"linetoolarrowmarkup")||this;return r._constructor="LineToolArrowMarkUp",r}return Object(r.__extends)(t,e),t.prototype.direction=function(){return"up"},t.prototype.translatedType=function(){return h},t.prototype.name=function(){return"Arrow Mark Up"},t.prototype.textAlignParams=function(){return{horzAlign:"center",vertAlign:"top",offsetX:0,offsetY:20}},t.createProperties=function(e){return f.createProperties(e,"linetoolarrowmarkup")},t}(f),y=function(e){function t(t,i){var r=e.call(this,t,i,"linetoolarrowmarkright")||this;return r._constructor="LineToolArrowMarkRight",r}return Object(r.__extends)(t,e),t.prototype.direction=function(){return"right"},t.prototype.translatedType=function(){return d},t.prototype.name=function(){return"Arrow Mark Right"},t.prototype.textAlignParams=function(){return{horzAlign:"right",vertAlign:"middle",offsetX:22,offsetY:3,forceTextAlign:!0}},t.createProperties=function(e){return f.createProperties(e,"linetoolarrowmarkright")},t}(f),g=function(e){function t(t,i){var r=e.call(this,t,i,"linetoolarrowmarkdown")||this;return r._constructor="LineToolArrowMarkDown",r}return Object(r.__extends)(t,e),t.prototype.direction=function(){return"down"},t.prototype.translatedType=function(){return p},t.prototype.name=function(){return"Arrow Mark Down"},t.prototype.textAlignParams=function(){return{horzAlign:"center",vertAlign:"bottom",offsetX:0,offsetY:20}},t.createProperties=function(e){return f.createProperties(e,"linetoolarrowmarkdown")},t}(f)},TrvT:function(e,t,i){"use strict";i.r(t),i.d(t,"CompareDataWindowView",(function(){return u}));var r=i("mrSG"),n=i("it7y"),o=i("e92V"),s=i("mMWL"),a=i("qFKp"),l=i("ogJP"),c=a.CheckMobile.any(),u=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r._studyCompare=t,r}return Object(r.__extends)(t,e), t.prototype._updateImpl=function(){e.prototype._updateImpl.call(this),this._items[0].setTitle(this._studyCompare.guiPlotName(""))},t.prototype._hideValues=function(){return!1},t.prototype._currentIndex=function(){var e,t=this._model.crossHairSource().lockedIndex;return c&&(null===this._model.crossHairSource().pane&&void 0===t||Object(o.a)(s.tool.value())||null!==this._model.lineBeingEdited())?e=this._study.data().lastIndex():(e=this._model.crossHairSource().appliedIndex(),Object(l.isNumber)(e)||(e=this._study.data().lastIndex())),e},t}(n.StudyDataWindowView)},TzTt:function(e,t,i){"use strict";var r;function n(e,t){var i,n;return i=null==t?document.documentElement:9===t.nodeType?t.documentElement:t,r&&(n=r.get(i)),n||((n=i.ownerDocument.createRange()).selectNodeContents(i),r&&r.set(i,n)),n.createContextualFragment(e)}function o(e,t){var i,r=n(e,t);if("firstElementChild"in r)i=r.firstElementChild;else{i=null;for(var o=0;o0?"+"+(o-o%1)+n:0===o?"":String(o-o%1+n))}}},"U0+/":function(e,t,i){"use strict";i.r(t),i.d(t,"StudyMetaInfoRepository",(function(){return u}));i("YFKU");var r=i("Eyy1"),n=i("0YCj"),o=i.n(n),s=i("Si3H"),a=i("lCO3"),l=i("uOxu"),c=Object(l.getLogger)("Chart.Studies.StudyMetaInfoRepository",{color:"#606"}),u=function(){function e(e){this._nextRequestNumber=1,this._rawStudiesMetaInfo=[],this._isReady=!1,this._metaInfoQueryQueue=[],this._javaMetaInfoQueryQueue=[],this._javaStudiesMetaInfo=[],this._pineMetaInfoCache=[],this._studiesMigrations=[],this._gateway=e}return e.prototype.requestMetaInfo=function(){var e=this;this._requestStarted();var t=this._makeNextRequestId();return c.logNormal("Requesting metainfo #"+t),new Promise((function(i){c.logNormal("Requesting studies metadata #"+t),e._gateway.requestMetadata(t,(function(r){c.logNormal("Requesting studies metadata #"+t+" finished");var n=r.params[1].metainfo.slice();e._processLibraryMetaInfo(n),e._requestFinished(),i()}))}))},e.prototype.findById=function(e){if(!this._isReady)return this._enqueueMetaInfoQuery(e);var t=this._findStudyMetaInfo(e);return null!==t?Promise.resolve(t):"pine"===e.type?this._compilePine(e):Promise.reject("unexpected study id="+e.studyId+" with type="+e.type)},e.prototype.findByIdSync=function(e){return this._findStudyMetaInfo(e)},e.prototype.isReady=function(){return this._isReady},e.prototype.findAllJavaStudies=function(){return this._isReady?Promise.resolve(this._javaStudiesMetaInfo):this._enqueueJavaMetaInfoQuery()},e.prototype.getInternalMetaInfoArray=function(){return this._javaStudiesMetaInfo},e.prototype.getMigrations=function(){return this._studiesMigrations}, e.prototype.addPineMetaInfo=function(e){return d(this._pineMetaInfoCache,e)},e.prototype._processMigrations=function(e){throw new Error("not implemented")},e.prototype._processSiteMetaInfo=function(e,t){throw new Error("not implemented")},e.prototype._processLibraryMetaInfo=function(e){for(var t=0,i=e;tr?1:i50)){var i=0,r=v(this._position1,this._position2,this._maxSpeed),n=g(this._position1,this._position2),o=[r],s=[n];if(i+=n,null!==this._position3){var a=v(this._position2,this._position3,this._maxSpeed);if(Math.sign(a)===Math.sign(r)){var l=g(this._position2,this._position3);if(o.push(a),s.push(l),i+=l,null!==this._position4){var c=v(this._position3,this._position4,this._maxSpeed);if(Math.sign(c)===Math.sign(r)){var u=g(this._position3,this._position4);o.push(c),s.push(u),i+=u}}}}for(var h,d,p=0,f=0;f=0&&e.h>=0,"Try to set invalid size to PaneWidget "+JSON.stringify(e)),this._size.equals(e)||(this._size=e,this._canvasBinding.resizeCanvas({width:e.w,height:e.h}),this._topCanvasBinding.resizeCanvas({width:e.w,height:e.h}),this._paneCell.style.width=e.w+"px",this._paneCell.style.height=e.h+"px",this._div.style.width=e.w+"px",this._div.style.height=e.h+"px",this._rowElement.classList.toggle("js-hidden",0===e.h),null!==this._legendWidget&&this._legendWidget.updateWidgetModeBySize(e),null!==this._paneControls&&this._paneControls.updateWidgetModeByWidth(e.w))},e.prototype.width=function(){return this._size.w},e.prototype.height=function(){return this._size.h},e.prototype.backgroundColor=function(){return this._chartModel().backgroundColor().value()},e.prototype.showContextMenuForSelection=function(e){var t=this._chartUndoModel().selection();if(!t.isEmpty()){var i=t.sources().filter((function(e){return e.hasContextMenu()}));this.showContextMenuForSources(i,e)}},e.prototype.showContextMenuForSources=function(e,t,i){if(!e.length)return Promise.resolve(null);var r=e[0],n=Object(a.merge)(Object(a.clone)(this._options.contextMenu),i||{}),o=new T.ActionsProvider(this._chart,n);if(r===this._chartUndoModel().crossHairSource())return r.handleContextMenuEvent(t),Promise.resolve(null) ;var s=o.contextMenuActionsForSources(e);return 0===s.length?Promise.resolve(null):L.ContextMenuManager.createMenu(s).then((function(e){return e.show(t),e}))},e.prototype.state=function(){return Object(r.ensureNotNull)(this._state)},e.prototype.hasState=function(){return null!==this._state},e.prototype.setState=function(e){this._state!==e&&(this.hasState()&&(this.state().onDestroyed().unsubscribeAll(this),this.state().dataSourcesCollectionChanged().unsubscribeAll(this)),this._state=e,this.hasState()&&(this.state().onDestroyed().subscribe(this,this._onStateDestroyed,!0),this.state().dataSourcesCollectionChanged().subscribe(this,this._onDataSourcesCollectionChanged),this.updatePriceAxisWidgets()))},e.prototype.getScreenshotData=function(){return{type:"pane",leftAxis:this._lhsPriceAxisesContainer.getScreenshotData(),rightAxis:this._rhsPriceAxisesContainer.getScreenshotData(),content:this._canvasBinding.canvas.toDataURL(),canvas:this._canvasBinding.canvas,contentWidth:this._size.w,contentHeight:this._size.h,studies:[]}},e.prototype.hardResetCanvas=function(){this._size.equals(new _.Size(0,0))||(Object(_.hardResizeCanvas)(this._canvasBinding,this._size),Object(_.hardResizeCanvas)(this._topCanvasBinding,this._size),this._lhsPriceAxisesContainer.hardResetCanvas(),this._rhsPriceAxisesContainer.hardResetCanvas())},e.prototype.updatePriceAxisWidgets=function(){if(this.hasState()){var e=this._chartModel(),t=e.paneForSource(e.mainSeries());if(t){var i=e.priceScaleSlotsCount(),r=this.state(),n=r.visibleLeftPriceScales(),o=r.visibleRightPriceScales();this._lhsPriceAxisesContainer.setScales(n,i.left,t.leftPriceScales().length,i.left+i.right),this._rhsPriceAxisesContainer.setScales(o,i.right,t.rightPriceScales().length,i.left+i.right)}}},e.prototype.update=function(){this.hasState()&&(this._lhsPriceAxisesContainer.update(),this._rhsPriceAxisesContainer.update(),null!==this._legendWidget&&this._legendWidget.update(),this.updateControls())},e.prototype.updateControls=function(){this.hasState()&&null!==this._paneControls&&this._paneControls.update()},e.prototype.updateThemedColors=function(e){this._themedColor=e,this._updateByThemedColors()},e.prototype.statusWidget=function(){return this._legendWidget},e.prototype.getElement=function(){return this._rowElement},e.prototype.canvasElement=function(){return this._canvasBinding.canvas},e.prototype.hasCanvas=function(e){return this._canvasBinding.canvas===e||this._topCanvasBinding.canvas===e},e.prototype.pinchStartEvent=function(){this._options.handleScale.pinch&&(this._terminateActiveAnimations(),this._prevPinchScale=1,this._pinching=!0,this._wasPinched=!0)},e.prototype.pinchEvent=function(e,t){if(this._options.handleScale.pinch){var i=5*(t-this._prevPinchScale);this._prevPinchScale=t,this._chartModel().zoomTime(e.x,i,!0),this._prevPinchScale=t}},e.prototype.pinchEndEvent=function(){this._pinching=!1},e.prototype.mouseClickEvent=function(e){if(this.hasState()){ var t=this._dataSourceAtPoint(e.localX,e.localY),i=this._chartUndoModel(),n=t&&t.source,o=t&&!t.isCustom&&null!==t.source?t.source.id():null;if(this._lastClickedSourceId!==o){if(null!==this._lastClickedSourceId){var a=i.model().dataSourceForId(this._lastClickedSourceId);a&&a.onClickOutside&&(a.onClickOutside(e),i.model().updateSource(a))}this._lastClickedSourceId=o}if(!this._isSelectBarModeEnabled()||this.trackingModeEnabled()&&!this._exitTrackingModeOnNextTry||i.crossHairSource().trySelectCurrentBar(),t&&t.hittest&&t.hittest.result()===c.HitTestResult.CUSTOM){var l=t.hittest.data().mouseClickHandler;l&&(l(e),i.model().updateSource(Object(r.ensureNotNull)(n)))}this._isSelectBarModeEnabled()||t&&t.source===i.crossHairSource()||this._tryExitTrackingMode(),n instanceof f.BarsMarksContainer&&t&&Object(r.ensureNotNull)(t.hittest).data()&&n.onClicked(Object(r.ensureNotNull)(t.hittest).data()),n&&Object(h.isLineTool)(n)&&Object(s.emit)("drawing_event",n.id(),"click")}},e.prototype.exitTrackingMode=function(){null!==this._state&&null!==this._startTrackPoint&&(this._exitTrackingModeOnNextTry=!0,this._tryExitTrackingMode())},e.prototype.trackingModeEnabled=function(){return null!==this._state&&null!==this._startTrackPoint},e.prototype._topCanvasRenderParams=function(){return{pixelRatio:this._topCanvasBinding.pixelRatio,phisicalWidth:this._topCanvasBinding.canvas.width,phisicalHeight:this._topCanvasBinding.canvas.height,cssWidth:this._chartModel().timeScale().width(),cssHeight:this.height()}},e.prototype._canvasRenderParams=function(){return{pixelRatio:this._canvasBinding.pixelRatio,phisicalWidth:this._canvasBinding.canvas.width,phisicalHeight:this._canvasBinding.canvas.height,cssWidth:this._chartModel().timeScale().width(),cssHeight:this.height()}},e.prototype._tryExitTrackingMode=function(){this._exitTrackingModeOnNextTry&&(this._startTrackPoint=null,this._clearCursorPosition())},e.prototype._clearCursorPosition=function(){this._chartModel().clearCurrentPosition()},e.prototype._dataSourceAtPoint=function(e,t){var i=null,r=null,o=null;if(!this.hasState())return null;var s=this.state(),a=s.height(),l=s.width(),c=!1,h=function(e,t,n,s){var a=o?o.result():0;e.result()>a&&(o=e,i=t,r=n,c=s)},d=this._canvasRenderParams(),p=new n.Point(e,t);this._hitTestCustomSources(d,s.customSources(u.CustomSourceLayer.Foreground),p,h);for(var f=s.hitTestSources(),_=this._chartUndoModel(),m=f.length;0=0;--g){var b;if((x=S[g].renderer(a,l))&&x.hitTest)(b=x.hitTest(p,d))&&h(b,v,x,!1)}if(this.containsMainSeries()){var w=_.barsMarksSources();for(m=0;m=0;--l){var c=t[l],u=c.paneViews(o);if(0!==u.length)for(var h=u.length-1;h>=0;--h){var d=u[h].renderer(s,a);if(null!==d){var p=d.hitTest(i,e);null!==p&&n(p,c,d,!0)}}}},e.prototype._tryStartMovingLineTool=function(e,t,i,o){if(null===t.source||!t.source.movable()||null!==this._startTrackPoint)return!1;if(!this._preventSourceChange){var s=this._chartUndoModel(),a=Object(r.ensureNotNull)(Object(r.ensureNotNull)(this._state).mainDataSource()).firstValue(),l=Object(r.ensureNotNull)(t.source.priceScale()).coordinateToPrice(e.localY,Object(r.ensureNotNull)(a)),c=D(t.source)?s.selection().sources():[t.source],u=new n.Point(e.localX,e.localY),h={index:o,price:l};return this._startMoveLineToolParams={source:c,startPoint:{logical:h,screen:u},data:t.hittest&&t.hittest.data(),envState:i},!0}return this._startMoveLineToolParams=null,!1},e.prototype._chartModel=function(){return this._chart.model().model()},e.prototype._chartUndoModel=function(){return this._chart.model()},e.prototype._externalPaneXCoord=function(e,t){t+=this._div.getBoundingClientRect().left+document.body.scrollLeft;var i=Object(r.ensureNotNull)(this._chart.paneByState(e)),n=i._div.getBoundingClientRect().left+document.body.scrollLeft;return i._correctXCoord(t-n)},e.prototype._externalPaneYCoord=function(e,t){t+=this._div.getBoundingClientRect().left+document.body.scrollTop;var i=Object(r.ensureNotNull)(this._chart.paneByState(e)),n=i._div.getBoundingClientRect().left+document.body.scrollTop;return i._correctYCoord(t-n)},e.prototype._correctXCoord=function(e){return Math.max(0,Math.min(e,this._size.w-1))},e.prototype._correctYCoord=function(e){return Math.max(0,Math.min(e,this._size.h-1))},e.prototype._processScroll=function(e){if(this._chart.model().model().scrollEnabled()){var t=Date.now();this._startScrollingPos||this._preventScroll()||(this._startScrollingPos={x:e.clientX,y:e.clientY,timestamp:t,localX:e.localX,localY:e.localY}),null!==this._scrollXAnimation&&this._scrollXAnimation.addPosition(e.localX,t),null!==this._scrollYAnimation&&this._scrollYAnimation.addPosition(e.localY,t);var i=this._chartUndoModel(),r=this.state().defaultPriceScale();if(this._startScrollingPos&&!this._isScrolling&&(this._startScrollingPos.x!==e.clientX||this._startScrollingPos.y!==e.clientY))return i.beginUndoMacro("scroll").setCustomFlag("doesnt_affect_save",!0),null===this._scrollXAnimation&&R&&(this._scrollXAnimation=new S(.2,3.2,-.0026,15),this._scrollXAnimation.addPosition(this._startScrollingPos.localX,this._startScrollingPos.timestamp),this._scrollXAnimation.addPosition(e.localX,t)),this._scrollYAnimation,i.selection().isEmpty()||(r=i.selection().sources()[0].priceScale()), null===r||r.isEmpty()||(this._scrollPriceScale=r,i.startScrollPrice(this.state(),r,e.localY)),i.startScrollTime(e.localX),this._isScrolling=!0,void this.setCursorForTool();this._isScrolling&&(null!==this._scrollPriceScale&&i.scrollPriceTo(this.state(),this._scrollPriceScale,e.localY),i.scrollTimeTo(e.localX))}},e.prototype._finishScroll=function(){var e=this._chartUndoModel();e.endScrollTime(),null!==this._scrollPriceScale&&e.endScrollPrice(this.state(),this._scrollPriceScale),e.endUndoMacro(),this._isScrolling=!1,this._startScrollingPos=null,this._scrollPriceScale=null,this.setCursorForTool()},e.prototype._endScroll=function(e){var t=this;if(!this._isScrolling)return!1;var i=this._isScrolling&&this._scrollUndoCommandInStack();if(this._isScrolling){var r=Date.now();null!==this._scrollXAnimation&&this._scrollXAnimation.start(e.localX,r),null!==this._scrollYAnimation&&this._scrollYAnimation.start(e.localY,r);var n=this._chartUndoModel();if((null===this._scrollXAnimation||this._scrollXAnimation.finished(r))&&(null===this._scrollYAnimation||this._scrollYAnimation.finished(r)))return this._finishScroll(),i;var o=this._scrollXAnimation,s=this._scrollYAnimation,a=function(){if(null!==o&&!o.terminated()||null!==s&&!s.terminated()){var e=Date.now(),i=null===o||o.finished(e),r=null===s||s.finished(e);null===o||o.terminated()||n.scrollTimeTo(o.getPosition(e)),null===s||s.terminated()||null===t._scrollPriceScale||n.scrollPriceTo(t.state(),t._scrollPriceScale,s.getPosition(e)),i&&r?t._finishScroll():requestAnimationFrame(a)}};requestAnimationFrame(a)}return i},e.prototype._terminateActiveAnimations=function(){var e=Date.now(),t=null===this._scrollXAnimation||this._scrollXAnimation.finished(e),i=null===this._scrollYAnimation||this._scrollYAnimation.finished(e);null===this._scrollXAnimation&&null===this._scrollYAnimation||t&&i||this._finishScroll(),null!==this._scrollXAnimation&&(this._scrollXAnimation.terminate(),this._scrollXAnimation=null),null!==this._scrollYAnimation&&(this._scrollYAnimation.terminate(),this._scrollYAnimation=null)},e.prototype._preventScroll=function(){return B&&this._longTap||this._contextMenuOpenedOnLastMouseDown||Object(h.isLineToolName)(d.tool.value())||Boolean(this._chartUndoModel().lineBeingCreated())||null!==this._startTrackPoint},e.prototype._isSelectBarModeEnabled=function(){return this._chartUndoModel().crossHairSource().selectBarMode().value()},e.prototype._finishTool=function(e){var t=this._chartUndoModel(),i=d.tool.value();if(Object(d.resetToCursor)(),this._preventCrossHairMove()&&this._clearCursorPosition(),t.selectionMacro((function(t){t.addSourceToSelection(e)})),Object(M.c)(i)){var r=t.createUndoCheckpoint();this._chart.showChartPropertiesForSource(e,O.TabNames.text,void 0,r)}Object(I.trackDrawingCreated)(e)},e.prototype._updateByThemedColors=function(){null!==this._legendWidget&&this._legendWidget.updateThemedColors(this._themedColor),null!==this._paneControls&&this._paneControls.updateThemedColors(this._themedColor)},e.prototype._scrollUndoCommandInStack=function(){ var e=this._chartUndoModel().undoHistory().undoStack();if(e.isEmpty())return!1;var t=e.head();if(!(t instanceof p.a))return!1;if(t.isEmpty())return!1;var i=t.commands()[0];return i instanceof x.PriceScaleChangeUndoCommand||i instanceof C.a},e.prototype._onStateDestroyed=function(){this.setState(null)},e.prototype._getHideNotMainSourcesValue=function(){return!this._chart.isActive()&&!this._chart.crossHairSyncEnabled()},e.prototype._onDataSourcesCollectionChanged=function(){this._startMoveLineToolParams=null,null!==this._legendWidget&&this._legendWidget.updateLayout()},e.prototype._loadAndCreateLegendWidget=function(){var e=this;Promise.all([i.e(68),i.e(12),i.e("chart-widget-gui")]).then(i.bind(null,"sAH5")).then((function(t){if(!e._isDestroyed){var i=t.LegendWidget,r=Object(l.deepExtend)({},e._options.legendWidget);r.canShowSourceCode=!e._chart.onWidget(),r.readOnlyMode=r.readOnlyMode||e._chart.readOnly(),r.statusesWidgets={sourceStatusesEnabled:e._options.sourceStatusesWidgetEnabled,marketStatusEnabled:e._options.marketStatusWidgetEnabled,marketStatus:e._options.marketStatusWidget||{},dataUpdateModeEnabled:e._options.chartWarningWidgetEnabled,dataUpdateMode:e._options.chartWarningWidget||{}};var n=new w.a(e._getHideNotMainSourcesValue());e._hideNotMainSourcesInLegendSpawn=Object(P.a)((function(){return{}}),e._chart.chartWidgetCollection().activeChartWidget,e._chart.chartWidgetCollection().lock.crosshair),e._hideNotMainSourcesInLegendSpawn.subscribe((function(){n.setValue(e._getHideNotMainSourcesValue())})),e._legendWidget=new i(e._chartUndoModel(),e,e._chart.backgroundBasedTheme(),n,r,{showContextMenuForSelection:e.showContextMenuForSelection.bind(e),showContextMenuForSources:e.showContextMenuForSources.bind(e),updateActions:e._chart.updateActions.bind(e._chart),showChartPropertiesForSource:e._chart.showChartPropertiesForSource.bind(e._chart),showGeneralChartProperties:e._chart.showGeneralChartProperties.bind(e._chart),showObjectsTreeDialog:e._chart.showObjectsTreeDialog.bind(e._chart)}),e._div.appendChild(e._legendWidget.getElement()),e._legendWidget.updateLayout(),e._legendWidget.updateWidgetModeBySize(e._size),e._legendWidget.updateThemedColors(e._themedColor)}}))},e.prototype._loadAndCreatePaneControlsWidget=function(){var e=this;Promise.all([Promise.all([i.e(68),i.e(12),i.e("chart-widget-gui")]).then(i.bind(null,"lvAK")),Promise.all([i.e(68),i.e(12),i.e("chart-widget-gui")]).then(i.bind(null,"bdgK"))]).then((function(t){var i=t[0],r=t[1];if(!e._isDestroyed){var n=i.PaneControlsWidget;e._paneControls=new n(e._chartUndoModel(),e,{backgroundThemeName:e._chart.backgroundBasedTheme()},{toggleMaximizePane:e._chart.toggleMaximizePane.bind(e._chart)},e._div),e._paneControls.updateWidgetModeByWidth(e._size.w),e._paneControls.updateThemedColors(e._themedColor),e._paneControlsResizeObserver=new r.default(e._handleRestrictLegendWidth.bind(e)),e._paneControlsResizeObserver.observe(e._paneControls.getElement())}}))},e.prototype._handleRestrictLegendWidth=function(e){if(null!==this._legendWidget&&null!==this._paneControls){ var t=this._legendWidget.getElement(),i=e[e.length-1].contentRect.width;t.style.maxWidth=0!==i?"calc(100% - "+(i+k+E)+"px)":""}},e}()},UJLt:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SaveRenameDialog=void 0;var r=function(){function e(e,t){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},i=t.fields,r=t.confirm,n=t.manager,s=t.title,a=void 0===s?"":s,l=t.destroyOnClose,c=void 0===l||l,u=t.modal,h=void 0!==u&&u;o(this,e),this._form=document.createElement("div"),this._fields=i,this._appendFieldsToForm(),this._title=a,this._destroyOnClose=c,this._modal=h,this._manager=n,this._isConfirmDialogOpened=!1,r&&(this._needCheckConfirm=!0,this._shouldShowConfirm=r.shouldShowDialog,this._getConfirmMessage=r.getMessage)}return r(e,[{key:"setField",value:function(e,t){this._fields.find((function(t){return t.name===e})).value=t}},{key:"show",value:function(){var e=this,t=this._createDialog();return new Promise((function(i){t.then((function(t){t.on("action:submit",(function(t){return e._onSubmit(t,i)})),t.open(),t.on("beforeClose",e._unmountFields.bind(e)),e._fields[0].select()}))}))}},{key:"_appendFieldsToForm",value:function(){var e=this;this._fields.forEach((function(t){t.appendTo(e._form)}))}},{key:"_createDialog",value:function(){var e=this;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(r){var n=i("YDhE").createDialog;t(n({type:e._modal?"modal":"popup",title:e._title,content:$(e._form),actionsWrapTemplate:'
',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, n.createConfirmDialog)({type:"modal",content:document.createTextNode(i),manager:e._manager}).then((function(i){i.on("action:yes",(function(e){t(s),e.close()})),i.on("afterClose",(function(){t(a),e._isConfirmDialogOpened=!1})),i.open()}))}))}))}},{key:"_validate",value:function(){return this._fields.find((function(e){return!e.valid}))}},{key:"_collectValues",value:function(){return this._fields.reduce((function(e,t){return e[t.name]=t.value,e}),{})}},{key:"_unmountFields",value:function(){this._fields.forEach((function(e){e.unmount&&e.unmount()}))}}]),e}()},ULlu:function(e,t,i){"use strict";function r(e){return e[0]}function n(e,t,i){return"string"!=typeof t?e:null==i?(e.removeAttribute(t),e):(e.setAttribute(t,String(i)),e)}function o(e,t){return"string"==typeof t&&e.classList.add(t),e}function s(e,t){return void 0===t||(null===t&&(e.innerHTML=""),"string"!=typeof t&&"number"!=typeof t||(e.innerHTML=String(t))),e}function a(e){var t=window.getComputedStyle(e);return[t.paddingLeft,t.paddingRight].reduce((function(e,t){return e-Number((t||"").replace("px",""))}),e.clientWidth)}function l(e){var t=window.getComputedStyle(e);return[t.paddingTop,t.paddingBottom].reduce((function(e,t){return e-Number((t||"").replace("px",""))}),e.clientHeight)}function c(e,t){var i;i=function(i){return i(e).trigger(t)},window.jQuery&&i(window.jQuery)}i.r(t),i.d(t,"unwrap",(function(){return r})),i.d(t,"attr",(function(){return n})),i.d(t,"addClass",(function(){return o})),i.d(t,"html",(function(){return s})),i.d(t,"contentWidth",(function(){return a})),i.d(t,"contentHeight",(function(){return l})),i.d(t,"trigger",(function(){return c}))},UlDV:function(e,t,i){"use strict";i.r(t),i.d(t,"RestrictedToolsetBootloader",(function(){return n}));var r=i("mrSG"),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype._startLoading=function(){return Promise.all([i.e("react"),i.e(2),i.e(3),i.e(6),i.e(8),i.e(22),i.e(23),i.e(25),i.e(26),i.e(32),i.e(43),i.e(46),i.e(58),i.e(62),i.e(65),i.e(66),i.e(0),i.e(1),i.e(10),i.e(12),i.e(15),i.e(49),i.e("restricted-toolset")]).then(i.bind(null,"miV2")).then((function(e){return e.getRestrictedToolSet()}))},t}(i("cZRT").a)},UqOQ:function(e,t,i){"use strict";i.d(t,"a",(function(){return c}));var r=i("mrSG"),n=i("aIyQ"),o=i.n(n),s=i("0waE");function a(e){return e.properties().visible.value()}function l(e){return!a(e)}var c=function(){function e(e,t,i){this._onChanged=new o.a,this._lineToolsSet=new Set,this._lineTools=Object(r.__spreadArrays)(e),this._lineToolsSet=new Set(this._lineTools),this._name=t,this.id=i||Object(s.randomHashN)(6)}return e.prototype.lineTools=function(){return this._lineTools},e.prototype.name=function(){return this._name},e.prototype.setName=function(e){var t=this;this._doAndFireOnChange((function(){t._name=e}))},e.prototype.isActualSymbol=function(){return this._lineTools.length>0&&this._lineTools[0].isActualSymbol()&&this._lineTools[0].isActualCurrency()},e.prototype.containsLineTool=function(e){return this._lineToolsSet.has(e)}, e.prototype.addLineTools=function(e){var t=this;this._doAndFireOnChange((function(){var i;e.forEach((function(e){return t._lineToolsSet.add(e)})),(i=t._lineTools).push.apply(i,e)}))},e.prototype.excludeLineTool=function(e){var t=this;this._doAndFireOnChange((function(){t._lineToolsSet.delete(e);var i=t._lineTools.indexOf(e);t._lineTools.splice(i,1)}))},e.prototype.excludeLineTools=function(e){var t=this;this._doAndFireOnChange((function(){var i=new Set(e);e.forEach((function(e){return t._lineToolsSet.delete(e)})),t._lineTools=t._lineTools.filter((function(e){return!i.has(e)}))}))},e.prototype.state=function(){return{id:this.id,name:this._name,tools:this._lineTools.map((function(e){return e.id()}))}},e.prototype.visibility=function(){var e=this._lineTools.some(a),t=this._lineTools.some(l);return e&&!t?"Visible":t&&!e?"Invisible":"Partial"},e.prototype.locked=function(){var e=this._lineTools.some((function(e){return e.properties().frozen.value()})),t=this._lineTools.some((function(e){return!e.properties().frozen.value()}));return e&&!t?"Locked":t&&!e?"Unlocked":"Partial"},e.prototype.onChanged=function(){return this._onChanged},e.fromState=function(t,i){for(var r=[],n=0,o=i.tools;n0?new e(r,i.name,i.id):null},e.prototype._doAndFireOnChange=function(e){var t=this.visibility(),i=this.locked();e();var r={visibilityChanged:this.visibility()!==t,lockedChanged:i!==this.locked()};this._onChanged.fire(r)},e}()},V086:function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("GEp6").distanceToLine,o=i("Ss5c").LineDataSource,s=i("Ocx9").DefaultProperty,a=i("hayr").propertyPages,l=window.t("Ellipse");function c(e,t){this._constructor="LineToolEllipse";var r=t||c.createProperties();o.call(this,e,r),this.version=c.version,i.e("lt-pane-views").then(function(e){var t=i("obU/").EllipsePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(c,o),c.prototype.startChanging=function(e,t){if(o.prototype.startChanging.call(this,e,t),0===e||1===e){var i=this.pointToScreenPoint(this._points[0])[0],r=this.pointToScreenPoint(this._points[1])[0],s=this.pointToScreenPoint(this._points[2])[0];this._dist=n(i,r,s).distance||0}},c.prototype._preparePoint=function(e,t){var i=this._preparePointInternal(e,t,!1);return t&&t.shift()&&this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[1],this._points[0],i),i},c.prototype._preparePointInternal=function(e,t,i){var n=Object.assign({},e);if(t&&t.shift()){var s=this.points().length;if(!this._fakePointAdded&&3===s&&!i)return n;if(this._fakePointAdded||2===s||i){this._snapPoint45Degree(e,this._points[0]),this._fakePointAdded?this._points[1]=e:i||(this._fakePointAdded=!0,o.prototype._addPointIntenal.call(this,e));var a=this.pointToScreenPoint(this._points[0])[0],l=this.pointToScreenPoint(this._points[1])[0],c=l.x-a.x,u=l.y-a.y,h=Math.sqrt(c*c+u*u)/2,d=l.subtract(a),p=a.add(l).scaled(.5),f=new r(-d.y,d.x);f=f.normalized();var _=p.add(f.scaled(h)) ;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){ 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.time0){var r=" ["+u(e[0].time)+" ... "+u(e[e.length-1].time)+"]";i._logMessage("Receiving bars: total "+e.length+" bars in "+r+", requested range: "+s)}else i._logMessage("Receiving bars: barset is empty, requested range: "+s);i._requesting=!1,i._processBars(e,t)}}),(function(e){i._destroyed||(a?i._logMessage("getBars callback is already called before",!0):(a=!0,i._requesting=!1,i._errorMessage=e||null,i._processPendingSubscribers()))}),r)}},e.prototype._processBars=function(e,t){this._checkBars(e),this._alignBarsTime(e),e.length>0?(this._emptyResponsesCount=0,this._processFullBarset(e,t)):(this._emptyResponsesCount+=1,this._processEmptyBarset(t)),this._processPendingSubscribers()},e.prototype._processEmptyBarset=function(t){t&&t.nextTime?(this._logMessage("Next time received: `{0}`".format(u(1e3*t.nextTime))),this._addGap(t.nextTime),this._leftDate=Math.min(this._leftDate||e._now()/1e3,t.nextTime+1)):t&&t.noData?(this._logMessage("EOD received"),this._setEndOfData()):this._logMessage("nextTime or noData should present in metainfo when empty barset is returned"),50===this._emptyResponsesCount&&(this._logMessage("EOD detected due 50 empty responses in a row"),this._setEndOfData())},e.prototype._setEndOfData=function(){this._endOfData=!0,this._cache.bars.length&&(this._leftDate=this._cache.bars[0].time/1e3)},e.prototype._processFullBarset=function(e,t){var i=e[0].time;null!==this._leftDate&&i<1e3*this._leftDate&&this._logMessage("Returned more data than needed"),this._putToCache(e)?null!==this._leftDate&&this._cache.bars.length&&this._leftDate>this._cache.bars[0].time/1e3&&(this._leftDate=this._cache.bars[0].time/1e3):this._logMessage("Incremental update failed. Starting full update. Returned data should be in the requested range.",!0),t&&t.nextTime?console.warn("nextTime should be set when there is no data in the requested period only"):t&&t.noData&&console.warn("noData should be set when there is no data in the requested period and earlier only")},e.prototype._addGap=function(t){if(!this._gaps.find((function(e){return e.from===t}))){var i=(this._cache.bars.length?this._cache.bars[0].time:e._now())/1e3;this._gaps.push({from:t,to:i})}},e.prototype._inGapNextTime=function(e){var t=this._gaps.find((function(t){return t.frome}));return t?t.from:null},e.prototype._getNextSubscriptionId=function(){return this._nextSubscriptionId++},e.prototype._checkBars=function(e,t){if(void 0===t&&(t=!1),l.enabled("charting_library_debug_mode"))for(var i=function(i){if(e[i].time<=e[i-1].time){ var n="Wrong bars time: time {0} of bar {1} should be more than time {2} of bar {3}".format(e[i].time,i,e[i-1].time,i-1);t&&r._dwmAligner&&(n+="\nCheck that you provide DWM bars without time part, i.e. 00:00 GMT"),console.error(n)}["high","low","open","close","time"].some((function(t){return"number"!=typeof e[i][t]||!isFinite(e[i][t])}))&&console.error("Wrong bars values: all OHLC values should be numbers")},r=this,n=1;n=this._cache.bars[0].time){var t=this._cache.bars[this._cache.bars.length-1].time===e[e.length-1].time;if(this._cache.bars=[],!t)return this._leftDate=null,!1;this._logMessage("Received history up to now instead of incremental update. Return exactly what is requested.")}return this._cache.bars=Object(r.__spreadArrays)(e,this._cache.bars),this._checkBars(this._cache.bars,!0),!0},e.prototype._putToCacheNewBar=function(e){var t=this._cache.bars.length,i=e.time,r=0===t?NaN:this._cache.bars[t-1].time;0===t||r=0&&!function(){try{return/^(192|172|10)\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]/.test(location.hostname)||/^.*((?:\.local)|localhost)$/.test(location.hostname)}catch(e){return!1}}()&&setTimeout((function(){try{var e=function(){var e=0;return JSON.parse(urlParams.logo).image&&(e="C",r.enabled("link_to_tradingview")||(e="D")),e}();window.ga&&(0!==e&&window.ga("send","event","s",e),urlParams.utm||window.ga("send","event","l"))}catch(t){}}),3e4)}},Wh6B:function(e,t,i){"use strict";var r=i("Eyy1").ensureNotNull,n=i("Ss5c").LineDataSource,o=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=i("08i5"),l=window.t("Forecast");function c(e,t){this._constructor="LineToolPrediction";var r=t||c.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("Ay2m").PredictionPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(c,n),c.prototype.isSynchronizable=function(){return!1},c.prototype.status=function(){return this._properties.status.value()},c.prototype.setStatus=function(e){return this._properties.status.setValue(e)},c.prototype.pointsCount=function(){return 2},c.prototype.translatedType=function(){return l},c.prototype.name=function(){return"Forecast"},c.prototype.restorePoints=function(e,t,i){n.prototype.restorePoints.call(this,e,t,i),this.checkAlert()}, c.prototype.checkAlert=function(){if(!(this._points.length<2||this._model.mainSeries().bars().isEmpty())){var e=this._points[1];if(this.status())e.index>this._model.timeScale().baseIndex()&&this.setStatus(a.AlertStatus.Waiting);else{var t=this._model.mainSeries().bars().valueAt(e.index);if(null!==t){var i=this.direction();if(i===a.Direction.Up&&t[TradingView.HIGH_PLOT]>=e.price)this.setStatus(a.AlertStatus.Success);else if(i===a.Direction.Down&&t[TradingView.LOW_PLOT]<=e.price)this.setStatus(a.AlertStatus.Success);else{var n=r(this._model.mainSeries().bars().lastIndex());e.index!==n&&this.setStatus(a.AlertStatus.Failure)}}}}},c.prototype.addPoint=function(e){var t=n.prototype.addPoint.call(this,e);return t&&this.checkAlert(),t},c.prototype.endChanging=function(){n.prototype.endChanging.call(this),this.setStatus(a.AlertStatus.Waiting),this.checkAlert()},c.prototype.onData=function(e){n.prototype.onData.call(this,e),this.checkAlert()},c.prototype.endMoving=function(){n.prototype.endMoving.call(this),this.setStatus(a.AlertStatus.Waiting),this.checkAlert()},c.prototype.direction=function(){if(this.points().length<2)return a.Direction.Up;var e=this.points()[0];return this.points()[1].price>e.price?a.Direction.Up:a.Direction.Down},c.prototype.getStylesPropertyPage=function(){return s.LineToolPredictionStylesPropertyPage},c.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Pwwq").PredictionDefinitionsViewModel}.bind(null,i)).catch(i.oe)},c.prototype.cloneable=function(){return!1},c.createProperties=function(e){var t=new o("linetoolprediction",e);return c._configureProperties(t),t},c._configureProperties=function(e){n._configureProperties(e),e.merge({status:a.AlertStatus.Waiting})},t.LineToolPrediction=c},WkOR:function(e,t,i){"use strict";i.r(t),i.d(t,"areEqualSymbols",(function(){return o})),i.d(t,"includesEqualSymbol",(function(){return s}));var r=i("Kxc7"),n=r.enabled("uppercase_instrument_names");function o(e,t){return void 0===e?void 0===t:void 0!==t&&(n?e.toUpperCase()===t.toUpperCase():e===t)}function s(e,t){return e.some((function(e){return o(t,e)}))}},WkYF:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("Ocx9").DefaultProperty,o=i("hayr").propertyPages,s=window.t("Date Range");function a(e,t){this._constructor="LineToolDateRange";var n=t||a.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("3xLB").DateRangePaneView;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"Date Range"},a.prototype.getStylesPropertyPage=function(){return o.LineToolDateRangeStylesPropertyPage},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Ax76").GeneralDatePriceRangeDefinitionsViewModel }.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetooldaterange",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolDateRange=a},WmDe:function(e,t,i){"use strict";TradingView.PublishedChartsTimeline=function(){},TradingView.LinearRegressionPaneView=function(){},TradingView.study_PivotPointsStandard=function(){},TradingView.study_PivotPointsHighLow=function(){},TradingView.study_ZigZag=function(){},TradingView.study_LinearRegression=function(){},TradingView.study_ElliottWave=function(){},TradingView.ESDStudyBase=function(){},TradingView.Pro=function(){this.hasPackage=function(){return!1}},window.user={is_pro:!1,settings:{}},TradingView.Pro.prototype.isPaidPro=function(){return!1},TradingView.Pro.prototype.hasActivePackages=function(){return!1},TradingView.Pro.prototype.isSupportAvailable=function(){return!1},TradingView.Pro.prototype.getStudies=function(){return[]},TradingView.Pro.prototype.getProduct=function(){return{}},TradingView.Pro.prototype.getStudiesOrder=function(){return[]},TradingView.AlertLabel=function(){},TradingView.getDataVendorString=function(){},TradingView.study_VbPVisible=function(){},TradingView.study_VbPSessions=function(){},TradingView.study_ESD$TV_DIVIDENDS=function(){},TradingView.study_ESD$TV_SPLITS=function(){},TradingView.study_ESD$TV_EARNINGS=function(){},TradingView.MockupRequestedCache=function(e){e&&e([])},TradingView.MockupRequestedCache.invalidate=function(){},TradingView.LinetoolTemplatesList=function(){}},Wo0S:function(e,t,i){e.exports={"common-tooltip":"common-tooltip-s2GEoMlT","common-tooltip--hidden":"common-tooltip--hidden-Z0EAvXgv","common-tooltip--horizontal":"common-tooltip--horizontal-13imOC5w","common-tooltip--farther":"common-tooltip--farther-2yXMAkHF","common-tooltip--vertical":"common-tooltip--vertical-mcRoucek","common-tooltip-farther":"common-tooltip-farther-XoKytD99","common-tooltip--no-pointer-events":"common-tooltip--no-pointer-events-3nL0Vygu","common-tooltip--direction_normal":"common-tooltip--direction_normal-3u9ejKM2","common-tooltip__body":"common-tooltip__body-356XFpBj","common-tooltip__button-container":"common-tooltip__button-container-3EjyKV3s","common-tooltip__body--no-buttons":"common-tooltip__body--no-buttons-3quqi1Sv","common-tooltip__button":"common-tooltip__button-1rnQgujz","common-tooltip--direction_reversed":"common-tooltip--direction_reversed-XN-JUTdr","common-tooltip__ear-holder":"common-tooltip__ear-holder-yIJjpvgu","common-tooltip__ear-holder--below":"common-tooltip__ear-holder--below-1rmzWejA","common-tooltip__ear-holder--above":"common-tooltip__ear-holder--above-1D8FkNkw","common-tooltip__ear-holder--before":"common-tooltip__ear-holder--before-oXq5sFXr","common-tooltip__ear-holder--after":"common-tooltip__ear-holder--after-BnAcuW1N","common-tooltip__body--with-hotkey":"common-tooltip__body--with-hotkey-2wXRtgYZ","common-tooltip__body--width_wide":"common-tooltip__body--width_wide-3oG604Li", "common-tooltip__body--width_narrow":"common-tooltip__body--width_narrow-34hrFTFo","common-tooltip__body--no-padding":"common-tooltip__body--no-padding-2vVe6Xco","common-tooltip__hotkey-block":"common-tooltip__hotkey-block-2gS_uAOl","common-tooltip__hotkey-block--divider":"common-tooltip__hotkey-block--divider-rQ38KmpQ","common-tooltip__hotkey-text":"common-tooltip__hotkey-text-1eb7dyCg","common-tooltip__hotkey-button":"common-tooltip__hotkey-button-1XJ40e4D","common-tooltip__plus-sign":"common-tooltip__plus-sign-3CKSupKp"}},Wt0y:function(e,t,i){"use strict";function r(e){void 0===e&&(e=location.host);return-1!==["i18n.tradingview.com","partial.tradingview.com","www.tradingview.com","wwwcn.tradingview.com"].indexOf(e)||-1!==["d33t3vvu2t2yu5.cloudfront.net","dwq4do82y8xi7.cloudfront.net","s.tradingview.com","s3.tradingview.com"].indexOf(e)||e.match(/^[a-z]{2}\.tradingview\.com/)||e.match(/prod-[^.]+.tradingview.com/)?"battle":-1!==e.indexOf("tradingview.com")?"staging":e.match(/webcharts/)?"staging_local":(e.match(/^localhost(:\d+)?$/),"local")}function n(){return"local"===r()}function o(){return"battle"===r()}function s(){return!o()}i.r(t),i.d(t,"environment",(function(){return r})),i.d(t,"isLocal",(function(){return n})),i.d(t,"isProd",(function(){return o})),i.d(t,"isDebug",(function(){return s}))},XAms:function(e,t,i){"use strict";function r(e){e.preventDefault()}i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return o}));var n=["input:not([type])",'input[type="text"]','input[type="email"]','input[type="password"]','input[type="search"]','input[type="number"]','input[type="url"]',"textarea","a[href]",'*[contenteditable="true"]'];function o(e){var t=e.target;t&&!t.closest(n.join(", "))&&e.preventDefault()}},XFad:function(e,t,i){"use strict";var r=i("5rJj"),n=i("aDyP").LineToolPitchfork,o=window.t("Schiff Pitchfork");function s(e,t){var i=t||s.createProperties();n.call(this,e,i),this._constructor="LineToolSchiffPitchfork2"}inherit(s,n),s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Schiff Pitchfork"},s.createProperties=function(e){var t=new r("linetoolschiffpitchfork2",e,!1,{range:[0,8]});return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolSchiffPitchfork2=s},XPit:function(e,t,i){"use strict";i.r(t),i.d(t,"TimePointIndexSearchMode",(function(){return r})),i.d(t,"seriesPlotFunctionMap",(function(){return l})),i.d(t,"barFunction",(function(){return c})),i.d(t,"SeriesData",(function(){return u}));var r,n=i("Eyy1"),o=i("k9/m");!function(e){e[e.FromLeft=-1]="FromLeft",e[e.FromRight=1]="FromRight"}(r||(r={}));var s={open:function(e){return e[1]},high:function(e){return e[2]},low:function(e){return e[3]},close:function(e){return e[4]},hl2:function(e){return(e[2]+e[3])/2},hlc3:function(e){return(e[2]+e[3]+e[4])/3},ohlc4:function(e){return(e[1]+e[2]+e[3]+e[4])/4}},a=["open","high","low","close","hl2","hlc3","ohlc4"];function l(){var e=new Map;return a.forEach((function(t,i){e.set(t,c(t))})),e}function c(e){return s[e]} var u=function(){function e(){this.m_bars=new o.PlotList(l()),this.m_nsBars=new o.PlotList(l())}return e.prototype.bars=function(){return this.m_bars},e.prototype.nsBars=function(){return this.m_nsBars},e.prototype.size=function(){return this.m_bars.size()+this.m_nsBars.size()},e.prototype.each=function(e){this.m_bars.each(e),this.m_nsBars.each(e)},e.prototype.clear=function(){this.m_bars.clear(),this.m_nsBars.clear(),this.lastProjectionPrice=void 0},e.prototype.isEmpty=function(){return this.m_bars.isEmpty()&&this.m_nsBars.isEmpty()},e.prototype.first=function(){return this.m_bars.isEmpty()?this.m_nsBars.first():this.m_bars.first()},e.prototype.last=function(){return this.m_nsBars.isEmpty()?this.m_bars.last():this.m_nsBars.last()},e.prototype.search=function(e,t){return this.nsBars().isEmpty()?this.bars().search(e,t):this.bars().isEmpty()||Object(n.ensureNotNull)(this.nsBars().firstIndex())<=e?this.nsBars().search(e,t):this.bars().search(e,t)},e.prototype.valueAt=function(e){var t=this.search(e);return null!==t?t.value:null},e.prototype.plotValueToTimePointIndex=function(e,t,i){if(i===r.FromRight){var n=function(i,r){var n=r[t];return null!=n&&e>=n};return null!==(o=this.m_bars.findLast(n))?o.index:null!==(s=this.m_nsBars.findLast(n))?s.index:this.m_bars.firstIndex()}if(i===r.FromLeft){var o,s,a=function(i,r){var n=r[t];return null!=n&&e<=n};return null!==(o=this.m_bars.findFirst(a))?o.index:null!==(s=this.m_nsBars.findFirst(a))?s.index:this.m_bars.lastIndex()}throw new Error("plotValueToTimePointIndex: unsupported search mode")},e}()},XUCF:function(e,t,i){"use strict";var r=i("Hr11").sign,n=i("Ss5c").LineDataSource,o=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Ghost Feed");function l(e,t,i){this._source=e,this._index=t,this._bars=i||[]}function c(e,t,r){this._constructor="LineToolGhostFeed";var o=t||c.createProperties();if(o._source=this,!r){var s=Math.round(this.calculateATR(e));o.averageHL.setValue(s)}n.call(this,e,o),this._segments=[],o.averageHL.listeners().subscribe(this,c.prototype.regenerate),o.variance.listeners().subscribe(this,c.prototype.regenerate),o.points||o.addProperty("points"),this._currentAverageHL=this._properties.averageHL.value(),this._currentVariance=this._properties.variance.value(),this._currentInterval=e.mainSeries().interval(),this.properties().onRestoreFactoryDefaults().subscribe(this,this._handleRestoringFactoryDefaults),i.e("lt-pane-views").then(function(e){var t=i("dMkl").GhostFeedPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}l.prototype.setBars=function(e){this._bars=e||[]},l.prototype.clone=function(e){return new l(e,this._index,TradingView.clone(this._bars))},l.prototype.createBar=function(){var e=this._source.properties().averageHL.value(),t=this._source.properties().variance.value()/100,i=this._source._model.mainSeries().base(),r=Math.random(),n=e*(1-2*r)*t,o=e*(1+(.5-(r=Math.random()))*t),s=n-o/2,a=s+o;return{o:(s+Math.random()*o)/i,h:a/i,l:s/i,c:(s+Math.random()*o)/i}},l.prototype.generate=function(){ this._bars=[];var e=this._source.points(),t=e[this._index],i=e[this._index+1];if(t&&i&&t.index!==i.index){this._avgHL=this._source.properties().averageHL.value(),this._variance=this._source.properties().variance.value()/100;for(var n=this._index?t.index+1:t.index,o=r(i.index-t.index),s=n;s!==i.index;s+=o)this._bars.push(this.createBar())}},l.prototype.bars=function(){return this._bars},l.prototype.setSize=function(e){if(e0&&this._points[this._points.length-1].index===e.index){this._lastPoint=null,this.normalizePoints(),this.createServerPoints();for(var t=0;t1&&this.generateBars(this._points.length-2),i||this._finished},c.prototype.finish=function(){this._finished=!0,this._lastPoint=null,this.normalizePoints(),this.createServerPoints()},c.prototype.setPoint=function(e,t,i){if(n.prototype.setPoint.call(this,e,t,i),e>0){var r=this.points()[e-1],o=t.index-r.index;this._segments[e-1].setSize(Math.abs(o))}if(e>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), 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(){ 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;r0){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=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;i0)},t.box=function(e,t){return{min:n(Math.min(e.x,t.x),Math.min(e.y,t.y)),max:n(Math.max(e.x,t.x),Math.max(e.y,t.y))}},t.equalBoxes=function(e,t){return o(e.min,t.min)&&o(e.max,t.max)}},akof:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererCircleShape",(function(){return a}));var r=i("mrSG"),n=i("2WC2"),o=i("aO4+"),s=2*Math.PI,a=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.max(t.width,t.height)/2,r=t.x,n=t.vertOffset,o=t.y+n;e.moveTo(r+i,o),e.arc(r,o,i,0,s,!1)},t.prototype._calcBoundingBox=function(t){ var i=Math.max(t.width,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)},b1GK:function(e,t,i){"use strict";function r(){}i.r(t),i.d(t,"addPerfMark",(function(){return s}));var n=console.timeStamp?console.timeStamp.bind(console):r,o=window.performance&&performance.mark?performance.mark.bind(performance):r;function s(e){n(e),o(e)}},bJYc:function(e,t,i){"use strict";i.r(t),i.d(t,"SetPropertyUndoCommand",(function(){return s}));var r=i("mrSG"),n=i("RDU5"),o=i("Ocx9"),s=function(e){function t(t,i,r,n,o){var s=e.call(this,r)||this;return s._targetObj=t,s._newValue=i,s._oldValue=s._targetObj.value(),s._model=n,o&&s.setCustomFlag("doesnt_affect_save",!0),s}return Object(r.__extends)(t,e),t.prototype.redo=function(){Object(o.saveDefaultProperties)(!0),this._targetObj.setValue(this._newValue),Object(o.saveDefaultProperties)(!1),this._model.recalculateAllPanes(),this._model.lightUpdate()},t.prototype.undo=function(){Object(o.saveDefaultProperties)(!0),this._targetObj.setValue(this._oldValue),Object(o.saveDefaultProperties)(!1),this._model.recalculateAllPanes(),this._model.lightUpdate()},t}(n.UndoCommand)},bKFv:function(e,t,i){"use strict";var r;i.r(t),i.d(t,"StatsPosition",(function(){return r})),function(e){e[e.Left=0]="Left",e[e.Center=1]="Center",e[e.Right=2]="Right"}(r||(r={}))},bOGh:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var r=i("mrSG"),n=function(e){function t(t){var i=e.call(this,t,!1)||this;return i._subcommands=[],i}return Object(r.__extends)(t,e),t.prototype.addCommand=function(e){this._subcommands.push(e)},t.prototype.isEmpty=function(){return 0===this._subcommands.length},t.prototype.redo=function(){for(var e=0;e=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)}, 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.coordinate0),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(), 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, 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){ 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)this.timeScale().points().firstIndex()&&t.firstBar()=t.start&&o<=t.end+i&&e.push(n)}),this),e},p.prototype.getPublishedPlates=function(){var e={},t=this;return is_authenticated?(this.getVisibleRangePlates().forEach((function(i){i.is_public&&(t.pinnedTooltips[i.id]||i.user__id===user.id)&&(e[i.id]=i)})),e):e},p.prototype._maxPlatesPerBar=10,p.prototype.filterDisplayedPlates=function(e){return e=e.reduce(function(e,t){var i=this._getIndex(t.tickmark);return e[i]=e[i]||[],e[i].push(t),e}.bind(this),{}),e=Object.keys(e).reduce(function(t,i){var r=e[i];return r=(r=r.sort((function(e,t){return t.views_count-e.views_count}))).slice(0,this._maxPlatesPerBar),t.concat(r)}.bind(this),[])},p.prototype._layout=function(e){switch(e){default:case 0:return"up";case 1:return"down";case 2:return"up";case 3:case 4:case 5:case 6:return"up"}},p.prototype._theme=function(e){switch(e){default:case 0:return"neutral";case 1:return"green";case 2:return"red";case 3:return"yellow";case 4:return"blue";case 5:return"green";case 6:return"red"}},p.prototype._offset=function(e,t,i){var r;switch(e){default:case"up":r=null===i?t[TradingView.HIGH_PLOT]:i(t);break;case"down":r=null===i?t[TradingView.LOW_PLOT]:i(t)} return this.priceScale().priceToCoordinate(r,this.ownerSource().firstValue())},p.prototype._getIndex=function(e){return this.timeScale().timePointToIndex(e)},p.prototype.getViewData=function(){return{barWidth:this.barWidth(),plates:this.getPlatesViewData(),tooltip:this._tooltip}},p.prototype.barWidth=function(){return this.timeScale().barSpacing()},p.prototype.getPlatesViewData=function(){var e=this._model.mainSeries();if(e.data().isEmpty())return[];for(var t=h(e.style())?e.barFunction():null,i=this.filterDisplayedPlates(this.getVisibleRangePlates()),r=this,n={},o=this._model.lastHittestData(),s=(i=(i=i.map(function(e){var i=this._getIndex(e.tickmark),s=this._getBar(i);if(null===s)return!1;var a,l=this._layout(e.direction),c=this._theme(e.direction),u=o&&o.id===e.id,h=this.timeScale().indexToCoordinate(i),d=this._offset(l,s,t),p=this.priceScale().isInverted();return i in n||(n[i]={up:0,down:0}),a=n[i][l]++,TradingView.merge({id:e.id,x:h,y:d,yInverted:p,order:a,direction:l,theme:c,hovered:u,pinned:!0===r.pinnedTooltips[e.id],user__id:e.user__id,label:e.label,labelFontColor:e.labelFontColor||"#444",minSize:e.minSize||5},this._plateViewData(e))}.bind(this))).filter((function(e){return!!e}))).filter((function(e){return!0===e.hovered})),a=0;athis._loadedRange.end&&(e.start=this._loadedRange.end)),e},p.prototype._rangeUnion=function(e,t){return e=Object.assign({},e),t&&(e.start=Math.min(t.start,e.start),e.end=Math.max(t.end,e.end)),e},p.prototype._pushGetDataStack=function(e){s(e.start)&&s(e.end)?(this._getDataTimeout&&clearTimeout(this._getDataTimeout),this._collectedRange=this._rangeUnion(e,this._collectedRange),this._getDataTimeout=setTimeout(function(){this._getData(this._collectedRange),this._getDataTimeout=this._collectedRange=null}.bind(this),300)):d.logError("Wrong tickmark range")},p.prototype.roundRange=function(e){return{start:Math.round(e.start),end:Math.round(e.end)}},p.prototype.refreshData=function(){this.getData(this._lastRange)},p.prototype.getData=function(e){s(e.start)&&s(e.end)?(this._lastRange=e,(e=Object.assign({},e)).end=this._maxDate,this._pushGetDataStack(e)):d.logError("Wrong range")},p.prototype._abortAllRequests=function(){this._requests.forEach((function(e){e.abort()})), this._requests=[],this._getDataTimeout&&clearTimeout(this._getDataTimeout),this._getDataTimeout=this._collectedRange=null},p.prototype.clearMarks=function(){this._abortAllRequests(),this._marks={},this._loadedRange=null},t.BarsMarksContainer=p}).call(this,i("Kxc7"),i("tc+8"),i("aIyQ"))},fYB8:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneSeparator",(function(){return a}));var r=i("Eyy1"),n=i("Hr11"),o=i("S8xo"),s=i("ikwP"),a=(i("bc0y"),function(){function e(e,t,i,r){if(this._handleEl=null,this._startY=0,this._deltaY=0,this._totalHeight=0,this._totalStretch=0,this._prevStretchA=0,this._minPaneHeight=0,this._maxPaneHeight=0,this._pixelStretchFactor=0,this._mouseEventHandler=null,this._chart=e,this._paneA=e.paneWidgets()[t],this._paneB=e.paneWidgets()[i],this._row=document.createElement("tr"),this._row.style.height="1px",this._cell=document.createElement("td"),this._row.appendChild(this._cell),this._cell.classList.add("pane-separator"),this._cell.setAttribute("colspan","3"),this._cell.style.background=(this._chart.properties().childs().scalesProperties.childs().lineColor.value()||"").toString(),this._cell.addEventListener("click",(function(){})),r)this._mouseEventHandler=null;else{var n=document.createElement("div");n.classList.add("handle"),this._cell.appendChild(n),this._mouseEventHandler=new o.MouseEventHandler(n,this,{treatVertTouchDragAsPageScroll:!1,treatHorzTouchDragAsPageScroll:!0}),this._handleEl=n}}return e.prototype.destroy=function(){null!==this._mouseEventHandler&&this._mouseEventHandler.destroy(),this._row.parentElement&&this._row.parentElement.removeChild(this._row)},e.prototype.getElement=function(){return this._row},e.prototype.hide=function(){this._row.classList.add("js-hidden")},e.prototype.show=function(){this._row.classList.remove("js-hidden")},e.prototype.mouseDownEvent=function(e){this._startY=e.pageY,this._deltaY=0,this._totalHeight=this._paneA.height()+this._paneB.height(),this._totalStretch=this._paneA.state().stretchFactor()+this._paneB.state().stretchFactor(),this._prevStretchA=this._paneA.state().stretchFactor(),this._minPaneHeight=30,this._maxPaneHeight=this._totalHeight-this._minPaneHeight,this._pixelStretchFactor=this._totalStretch/this._totalHeight,Object(r.ensureNotNull)(this._handleEl).classList.add("i-active")},e.prototype.pressedMouseMoveEvent=function(e){this._deltaY=e.pageY-this._startY;var t=this._paneA.height(),i=Object(n.clamp)(t+this._deltaY,this._minPaneHeight,this._maxPaneHeight)*this._pixelStretchFactor,r=this._totalStretch-i;this._paneA.state().setStretchFactor(i),this._paneB.state().setStretchFactor(r),this._chart.adjustSize(),this._paneA.height()!==t&&(this._startY=e.pageY),this._chart.model().model().fullUpdate()},e.prototype.mouseUpEvent=function(e){this._chart.model().addPaneStretchFactorUndoCommand(this._paneA.state(),this._paneB.state(),this._prevStretchA,this._paneA.state().stretchFactor()),this._startY=0,this._deltaY=0,this._totalHeight=0,this._totalStretch=0,this._minPaneHeight=0,this._maxPaneHeight=0,this._pixelStretchFactor=0, Object(r.ensureNotNull)(this._handleEl).classList.remove("i-active")},e.prototype.update=function(){this._cell.style.background=this._color().toString()},e.prototype.paint=function(){},e.prototype.image=function(){var e=this._paneA.leftPriceAxisesContainer().getWidth(),t=this._paneA.width(),i=this._paneA.rightPriceAxisesContainer().getWidth(),r=this._color(),n=Object(s.createDisconnectedCanvas)(document,new s.Size(e,1)),o=Object(s.getPrescaledContext2D)(n);o.fillStyle=r,o.fillRect(0,0,e,1);var a=Object(s.createDisconnectedCanvas)(document,new s.Size(t,1)),l=Object(s.getPrescaledContext2D)(a);l.fillStyle=r,l.fillRect(0,0,t,1);var c=Object(s.createDisconnectedCanvas)(document,new s.Size(i,1)),u=Object(s.getPrescaledContext2D)(c);return u.fillStyle=r,u.fillRect(0,0,i,1),{type:"separator",leftAxis:{content:n.toDataURL(),canvas:n,contentWidth:e,contentHeight:1},rightAxis:{content:c.toDataURL(),canvas:c,contentWidth:i,contentHeight:1},content:a.toDataURL(),canvas:a,contentWidth:t,contentHeight:1}},e.height=function(){return 1},e.prototype._color=function(){return this._chart.properties().childs().scalesProperties.childs().lineColor.value()||""},e}())},fgLi:function(e,t,i){"use strict";i.r(t),i.d(t,"DataSource",(function(){return l}));var r=i("hY0g"),n=i.n(r),o=i("0waE"),s=i("aIyQ"),a=i.n(s),l=function(){function e(){this.hasAlert=new n.a(!1),this._zorder=0,this.m_priceScale=null,this._id=Object(o.randomHashN)(6),this._ownerSource=null,this._userEditEnabled=!0,this._onPriceScaleChanged=new a.a,this._ownerSourceChanged=new a.a}return e.prototype.id=function(){return this._id},e.prototype.preferNoScale=function(){return!1},e.prototype.idForAlert=function(){return this._id},e.prototype.setId=function(e){this._id=e},e.prototype.zorder=function(){return this._zorder},e.prototype.setZorder=function(e){"number"==typeof e&&this._zorder!==e&&(this._zorder=e)},e.prototype.title=function(){throw new Error("Implement this fun in a subclass")},e.prototype.priceScale=function(){return this.m_priceScale},e.prototype.setPriceScale=function(e){this.m_priceScale=e,this._onPriceScaleChanged.fire()},e.prototype.ownerSource=function(){return this._ownerSource},e.prototype.setOwnerSource=function(e){this._ownerSource=e,this._ownerSourceChanged.fire()},e.prototype.ownerSourceChanged=function(){return this._ownerSourceChanged},e.prototype.isSavedInChart=function(e){return!0},e.prototype.isSavedInStudyTemplates=function(){return!0},e.prototype.isRemovedByStudyTemplates=function(){return!0},e.prototype.hasContextMenu=function(){return!0},e.prototype.showInObjectTree=function(){return!0},e.prototype.setUserEditEnabled=function(e){this._userEditEnabled=e},e.prototype.userEditEnabled=function(){return this._userEditEnabled},e.prototype.canBeHidden=function(){return this.userEditEnabled()},e.prototype.isUserDeletable=function(){return this.userEditEnabled()},e.prototype.canHasAlert=function(){return!1},e.prototype.properties=function(){throw new Error("Implement this fun in a subclass")},e.prototype.isVisible=function(){ return this.properties().visible.value()},e.prototype.statusView=function(){return null},e.prototype.dataWindowView=function(){return null},e.prototype.legendView=function(){return null},e.prototype.marketStatusModel=function(){return null},e.prototype.dataUpdatedModeModel=function(){return null},e.prototype.dataProblemModel=function(){return null},e.prototype.priceAxisViews=function(e,t){return null},e.prototype.updateAllViews=function(){},e.prototype.paneViews=function(){return null},e.prototype.isFailed=function(){return!1},e.prototype.isLoading=function(){return!1},e.prototype.isChildStudy=function(){return!1},e.prototype.hasChildren=function(){return!1},e.prototype.canHaveChildren=function(){return!1},e.prototype.onClickOutside=function(){},e.prototype.getInputsPropertyPage=function(){return null},e.prototype.getStylesPropertyPage=function(){return null},e.prototype.getDisplayPropertyPage=function(){return null},e.prototype.getVisibilitiesPropertyPage=function(){return null},e.prototype.getStrategyPropertyPage=function(){return null},e.prototype.getSourceIcon=function(){return null},e.prototype.state=function(e){throw new Error("Implement this fun in a subclass")},e.prototype.onPriceScaleChanged=function(){return this._onPriceScaleChanged},e.prototype.doesMovingAffectsUndo=function(){return!0},e.prototype.copiable=function(){return!1},e.prototype.cloneable=function(){return!1},e.prototype.movable=function(){return!1},e.prototype.isIncludedInAutoScale=function(){return!1},e.prototype.priceRange=function(e,t){return null},e.prototype.autoScaleInfo=function(e,t){return{range:this.priceRange(e,t)}},e}()},fs3R:function(e,t){e.exports=''},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&&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
\n\t\t\t
\n\t\t
\n\t\t
\n\t
\n',L='\n\t
\n',I='\n\t
\n',M=Object(y.b)(T),O=Object(y.b)(L),A=Object(y.b)(I);function k(e){return e.querySelector("."+S["common-tooltip__body"])}var E=i("lxNp");i.d(t,"showOnElement",(function(){return N})),i.d(t,"show",(function(){return F})),i.d(t,"updateTooltipText",(function(){return j})),i.d(t,"hide",(function(){return W}));var D=!1,V=null,B=null;Modernizr.mobiletouch||document.addEventListener("mouseover",(function(e){for(var t=e.target,i=e.currentTarget,r=function(e,t,i){var r=[];for(;e&&e!==t;)e.classList&&e.classList.contains(i)&&r.push(e),e=e.parentElement||(n=e.parentNode)&&(n.nodeType===Node.ELEMENT_NODE?n:null);var n;return r}(t,i,"apply-common-tooltip"),n=function(t){if("buttons"in e){if(1&e.buttons)return"continue"}else if(1===e.which)return"continue";var i=function(){return N(t)};if(i()){var r=function(){t.removeEventListener("common-tooltip-update",i),t.removeEventListener("mouseleave",r),t.removeEventListener("mousedown",r),document.removeEventListener("scroll",r), B&&(B.destroy(),B=null),W()};return t.addEventListener("common-tooltip-update",i),t.addEventListener("mouseleave",r),t.addEventListener("mousedown",r),document.addEventListener("scroll",r),null===B&&(B=Object(E.createGroup)({desc:"Tooltip"})).add({desc:"Hide",hotkey:27,handler:r}),"break"}},o=0,s=r;o2;){var d=Math.round((h+u)/2);this.items[d].x<=e.x?u=d:h=d}u=Math.max(1,u-1),h=Math.min(this.items.length-1,h+1);for(var p=u;p<=h;++p)if(t=this.items[p-1],i=this.items[p],a=t.x,l=i.x,n(new r(a,t.y),new r(l,i.y),new r(e.x,e.y)).distance<=c)return this.hittest?this.hittest:new s(s.REGULAR);return null},t.PaneRendererLine=TradingView.PaneRendererLine=l},h24c:function(e,t,i){"use strict";i.r(t),i.d(t,"parseIntervalValue",(function(){return c})),i.d(t,"intervalIsSupported",(function(){return u})),i.d(t,"canShowSpreadActions",(function(){return h})),i.d(t,"globalKeypressMatches",(function(){return d})),i.d(t,"skipAccept",(function(){return p})),i.d(t,"syncSymbolSearch",(function(){return f})),i.d(t,"setLinkingResolution",(function(){return _}));var r=i("Kxc7"),n=i("pPtI"),o=i("PT1i"),s=i("LxhU"),a=i("ePL1"),l=new RegExp("^"+a.types.QUANDL,"i");function c(e){var t=/^[,\s]*(\d*)\s*([hdwms]?)\s*$/i.exec(e)||[],i=~~t[1],r=t[2]&&t[2].toUpperCase()||null,n={qty:!i&&r?1:i,unit:r};return n.error=!i&&!r, n.intraday=!(n.error||n.unit&&"H"!==n.unit),n}function u(e){if(r.enabled("allow_supported_resolutions_set_only")){var t=s.Interval.normalize(e);return null!==t&&Object(n.isAvailable)(t)}var i=c(e);if(i.error)return!1;if(i.intraday)return o.linking.intraday.value();var a=o.linking.supportedResolutions.value();return!a||null!==i.unit&&!!~a.indexOf(i.unit)}function h(){return!1}function d(e){return!e.ctrlKey&&(!e.metaKey&&(!!e.charCode&&(!(!e.which||e.which<=32)&&(null===e.target||!/^(input|textarea)$/i.test(e.target.tagName)))))}function p(e,t){return!t&&(e===o.linking.symbol.value()||e===o.linking.seriesShortSymbol.value())}function f(e,t){var i=o.linking.symbol.value()||"";i=function(e,t){if(!t)return e;if(l.test(e)){var i=e.split(/\//);i.length&&(e=i[i.length-1])}else e=o.linking.seriesShortSymbol.value()||e;return e}(i,t),e.val(i)}function _(e){Object(n.setLastUsedResolution)(e),o.linking.interval.setValue(e)}},hBTJ:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i("Eyy1"),n=i("aO4+"),o=i("GEp6"),s=i("f6yo");function a(e,t){var i=e.A,r=t.A,o=e.B,s=t.B,a=e.C,l=t.C,c=i*s-r*o;if(Math.abs(c)<1e-6)return null;var u=(o*l-s*a)/c,h=(r*a-i*l)/c;return new n.Point(u,h)}function l(e,t,i,r){var n=function(e,t,i,r){var n=t.subtract(e),o=r.subtract(i),s=n.x*o.y-n.y*o.x;if(Math.abs(s)<1e-6)return null;var a=e.subtract(i);return(a.y*o.x-a.x*o.y)/s}(e,t,i,r);if(null===n)return null;var s=t.subtract(e).scaled(n).add(e),a=o.distanceToSegment(i,r,s);return Math.abs(a.distance)<1e-6?n:null}function c(e,t){for(var i=0,r=e;i0&&n.equalPoints(e[e.length-1],t))&&(e.push(t),!0)}function h(e,t){for(var i=[],r=0;r=3?i:null}t.intersectLineSegmentAndBox=function(e,t){var i=e[0].x,r=e[0].y,o=e[1].x,s=e[1].y,a=t.min.x,l=t.min.y,c=t.max.x,u=t.max.y;function h(e,t,i,r,n,o){var s=0;return en&&(s|=2),to&&(s|=8),s}for(var d=h(i,r,a,l,c,u),p=h(o,s,a,l,c,u),f=!1,_=0;;){if(_>1e3)throw new Error("Cohen - Sutherland algorithm: infinity loop");if(_++,!(d|p)){f=!0;break}if(d&p)break;var m=d||p,y=void 0,g=void 0;8&m?(y=i+(o-i)*(u-r)/(s-r),g=u):4&m?(y=i+(o-i)*(l-r)/(s-r),g=l):2&m?(g=r+(s-r)*(c-i)/(o-i),y=c):(g=r+(s-r)*(a-i)/(o-i),y=a),m===d?d=h(i=y,r=g,a,l,c,u):p=h(o=y,s=g,a,l,c,u)}return f?n.equalPoints(n.point(i,r),n.point(o,s))?n.point(i,r):n.lineSegment(n.point(i,r),n.point(o,s)):null},t.intersectLines=a,t.intersectLineSegments=l,t.intersectLineAndBox=function(e,t){var i=t.min.x,o=t.min.y,s=t.max.x,a=t.max.y;if(0===e.A){var l=-e.C/e.B;return o<=l&&l<=a?n.lineSegment(n.point(i,l),n.point(s,l)):null}if(0===e.B){var u=-e.C/e.A;return i<=u&&u<=s?n.lineSegment(n.point(u,o),n.point(u,a)):null}var h=[],d=function(t){var i=function(e,t){ return-(e.C+e.A*t)/e.B}(e,t);o<=i&&i<=a&&c(h,new n.Point(t,i))},p=function(t){var r=function(e,t){return-(e.C+e.B*t)/e.A}(e,t);i<=r&&r<=s&&c(h,new n.Point(r,t))};switch(d(i),p(o),d(s),p(a),h.length){case 0:return null;case 1:return h[0];case 2:return n.equalPoints(h[0],h[1])?h[0]:n.lineSegment(h[0],h[1])}return r.assert(!1,"We should have at most two intersection points"),null},t.intersectRayAndBox=function(e,t,i){var r=l(e,t,i.min,new n.Point(i.max.x,i.min.y)),o=l(e,t,new n.Point(i.max.x,i.min.y),i.max),a=l(e,t,i.max,new n.Point(i.min.x,i.max.y)),c=l(e,t,new n.Point(i.min.x,i.max.y),i.min),u=[];if(null!==r&&r>=0&&u.push(r),null!==o&&o>=0&&u.push(o),null!==a&&a>=0&&u.push(a),null!==c&&c>=0&&u.push(c),0===u.length)return null;u.sort((function(e,t){return e-t}));var h=s.pointInBox(e,i)?u[0]:u[u.length-1];return e.addScaled(t.subtract(e),h)},t.intersectPolygonAndHalfplane=h,t.intersectPolygons=function(e,t){for(var i=e,r=0;r0){var a=this._points[this._points.length-1],l=this._model.timeScale().indexToCoordinate(a.index),c=a.price,u=this.priceScale().priceToCoordinate(c,o);if(new r(t,s).subtract(new r(l,u)).length()<5)return this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0;var h=this._points[0],d=this._model.timeScale().indexToCoordinate(h.index),p=h.price,f=this.priceScale().priceToCoordinate(p,o);if(new r(t,s).subtract(new r(d,f)).length()<5)return this._properties.filled.setValue(!0),this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0}return n.prototype.addPoint.call(this,e)},l.prototype.setPoint=function(e,t){if(n.prototype.setPoint.call(this,e,t),!(this._model.timeScale().isEmpty()||this.priceScale().isEmpty()||e!==this._points.length-1&&0!==e)){ var i=this.ownerSource().firstValue(),o=this._model.timeScale().indexToCoordinate(t.index),s=this.priceScale().priceToCoordinate(t.price,i),a=e===this._points.length-1?this._points[0]:this._points[this._points.length-1],l=this._model.timeScale().indexToCoordinate(a.index),c=this.priceScale().priceToCoordinate(a.price,i);new r(o,s).subtract(new r(l,c)).length()<5&&this._properties.filled.setValue(!0)}},l.prototype.getInputsPropertyPage=function(){return null},l.prototype.getStylesPropertyPage=function(){return s.LineToolPolylineStylesPropertyPage},l.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("91EF").PolylinesDefinitionsViewModel}.bind(null,i)).catch(i.oe)},l.createProperties=function(e){var t=new o("linetoolpolyline",e);return l._configureProperties(t),t},l._configureProperties=function(e){n._configureProperties(e),e.addExclusion("filled")},t.LineToolPolyline=l},hY0g:function(e,t,i){"use strict";(function(e){function t(){}function i(e){if(!(this instanceof i))return new i(e);arguments.length>0&&(this._value=e),this._listeners=[]}i.prototype.value=function(){return this._owner?this._owner._value:this._value},i.prototype.setValue=function(e,t){var i=this._owner?this._owner:this;if("function"==typeof i.hook&&(e=i.hook(e)),i.writeLock)return i._value;if(!t&&i._value===e&&i.hasOwnProperty("_value"))return e;i._value=e;for(var r=i._listeners.slice(),n=0,o=0;o=1&&t<=15?"1D":"1W"}throw new Error("Unexpected resolution type: "+e.symbol.resolution)}(e);case"Daily":return"1D";case"Weekly":return"1W";case"Monthly":return"1M";case"Yearly":return"12M";default:throw new Error("No such pivTimeFrame: "+t)}}var u={name:"Pivot Points Standard",metainfo:{_metainfoVersion:44,defaults:{inputs:{kind:"Traditional",lookBack:15,pivTimeFrame:"Auto",showHistoricalPivots:!0},precision:"4"},description:"Pivot Points Standard",id:"PivotPointsStandard@tv-basicstudies-80",inputs:[{defval:"Traditional",id:"kind",name:"Type",options:["Traditional","Fibonacci","Woodie","Classic","DeMark","Camarilla"],type:"text"},{defval:!0,id:"showHistoricalPivots",name:"Show historical pivots",type:"bool"},{defval:"Auto",id:"pivTimeFrame",name:"Pivots Timeframe",options:["Auto","Daily","Weekly","Monthly","Yearly"],type:"text"},{defval:15,id:"lookBack",max:5e3,min:2,name:"Number of Pivots Back",type:"integer"}],is_price_study:!0,linkedToSeries:!0,shortDescription:"Pivots"},constructor:function(){function e(){this._secondaryRes="1D",this._firstMainSeriesBarTime=NaN}return e.prototype.init=function(e,t){var i=t(0),n=t(1),o=t(2),a=t(3);this._data=new s,this._firstMainSeriesBarTime=NaN,this._kindPP=function(e){switch(e){case"Traditional":return 0;case"Fibonacci":return 1;case"Woodie":return 2;case"Classic":return 3;case"DeMark":return 4;case"Camarilla":return 5;default:throw new Error("Unknown kind "+e)}}(i),this._showHistoricalPivots=n,this._historicalPivotsToKeep=a,this._pivTimeFrame=o,this._isValidResolution=function(e,t){return(!r.Std.isdaily(e)||"Daily"!==t)&&((!r.Std.isweekly(e)||"Daily"!==t&&"Weekly"!==t)&&(!r.Std.ismonthly(e)||"Daily"!==t&&"Weekly"!==t&&"Monthly"!==t))}(e,this._pivTimeFrame),this._isValidResolution||r.Std.error("You cannot see this pivot timeframe on this resolution"),this._isValidResolution&&(this._secondaryRes=c(e,this._pivTimeFrame));var l=""===e.symbol.resolution?String(Math.max(30,2*e.symbol.interval)):e.symbol.period;e.new_sym(e.symbol.tickerid,this._secondaryRes,this._secondaryRes,l)},e.prototype.main=function(e){if(!this._isValidResolution)return null;if(e.symbol.time)return isNaN(this._firstMainSeriesBarTime)&&(this._firstMainSeriesBarTime=e.symbol.time,this._removeUnusedPivots()),e.symbol.isLastBar&&e.symbol.isNewBar?this._createResponse():null;e.select_sym(1);var t=e.new_var(r.Std.open(e)),i=e.new_var(r.Std.high(e)),n=e.new_var(r.Std.low(e)),s=e.new_var(r.Std.close(e)),a=e.new_var(r.Std.time(e)),c=this._data,u=t.get(0),h=a.get(0),d=t.get(1),p=i.get(1),f=n.get(1),_=s.get(1),m=e.symbol.isLastBar;if(0!==c.pivots.length&&e.symbol.isNewBar){var y=c.pivots[c.pivots.length-1] ;y.endIndex__t!==h&&(y.endIndex__t=h)}if(0===e.symbol.index||!e.symbol.isNewBar)return e.select_sym(0),null;var g=function(e,t,i,n,s,a,l,c){var u=new o,h=NaN,d=i-n;switch(c){case 0:h=(i+n+s)/3,u.p=h,u.r1=2*h-n,u.s1=2*h-i,u.r2=h+(i-n),u.s2=h-(i-n),u.r3=2*h+(i-2*n),u.s3=2*h-(2*i-n),u.r4=3*h+(i-3*n),u.s4=3*h-(3*i-n),u.r5=4*h+(i-4*n),u.s5=4*h-(4*i-n);break;case 1:h=(i+n+s)/3,u.p=h,u.r1=h+.382*d,u.s1=h-.382*d,u.r2=h+.618*d,u.s2=h-.618*d,u.r3=h+d,u.s3=h-d;break;case 2:h=(i+n+2*e)/4,u.p=h,u.r1=2*h-n,u.s1=2*h-i,u.r2=h+d,u.s2=h-d,u.r3=i+2*(h-n),u.s3=n-2*(i-h),u.r4=u.r3+d,u.s4=u.s3-d;break;case 3:h=(i+n+s)/3,u.p=h,u.r1=2*h-n,u.s1=2*h-i,u.r2=h+d,u.s2=h-d,u.r3=h+2*d,u.s3=h-2*d,u.r4=h+3*d,u.s4=h-3*d;break;case 4:var p=NaN;h=(p=r.Std.equal(t,s)?i+n+2*s:r.Std.greater(s,t)?2*i+n+s:2*n+i+s)/4,u.p=h,u.r1=p/2-n,u.s1=p/2-i;break;case 5:h=(i+n+s)/3,u.p=h,u.r1=s+1.1*d/12,u.s1=s-1.1*d/12,u.r2=s+1.1*d/6,u.s2=s-1.1*d/6,u.r3=s+1.1*d/4,u.s3=s-1.1*d/4,u.r4=s+1.1*d/2,u.s4=s-1.1*d/2;break;default:throw new Error("Unknown kind")}return u.startIndex__t=a,u.endIndex__t=l,u}(u,d,p,f,_,h,l(e,h),this._kindPP);return e.select_sym(0),this._showHistoricalPivots||(c.pivots=[]),c.pivots.push(g),c.pivots.length>this._historicalPivotsToKeep&&c.pivots.shift(),m?this._createResponse():null},e.prototype._createResponse=function(){return 0===this._data.pivots.length?null:{nonseries:!0,type:"non_series_data",data:{data:this._data}}},e.prototype._removeUnusedPivots=function(){var e=this,t=Math.max(this._data.pivots.findIndex((function(t){return t.startIndex__t>e._firstMainSeriesBarTime}))-1,0);t>0&&this._data.pivots.splice(0,t)},e}()}},"i/Bj":function(e,t,i){"use strict";function r(e){if(void 0===e)return null;var t=e.match(/(delayed_streaming)_([\d]{1,4})/);return null===t?null:{mode:t[1],interval:parseInt(t[2])}}i.r(t),i.d(t,"parseUpdateMode",(function(){return r}))},i126:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyColorRotatorFactory",(function(){return u}));var r=i("eJTA"),n=i("Tmoa"),o=i("HGP3"),s=i("3ClC"),a=["color-sky-blue-400","color-banana-yellow-700","color-deep-blue-500","color-grapes-purple-a700","color-iguana-green-500","color-minty-green-a700","color-ripe-red-a200","color-berry-pink-200","color-tv-blue-a100","color-tan-orange-a200","color-sky-blue-a400","color-deep-blue-a100","color-grapes-purple-400","color-iguana-green-a700","color-minty-green-200","color-ripe-red-200","color-berry-pink-a200","color-ripe-red-500","color-grapes-purple-500","color-deep-blue-400","color-tv-blue-a200","color-sky-blue-500","color-iguana-green-400","color-minty-green-400","color-banana-yellow-600","color-tan-orange-500","color-berry-pink-400","color-ripe-red-300","color-grapes-purple-300","color-deep-blue-300","color-tv-blue-300","color-sky-blue-300","color-iguana-green-300","color-minty-green-300","color-banana-yellow-400","color-tan-orange-300","color-berry-pink-300","color-tan-orange-a700"],l=function(){function e(e){this._offset=0,this._offset=e}return e.prototype.getColor=function(e){if(0===this._offset)return e ;var t=a[(this._offset-1)%a.length],i=o.colorsPalette[t],s=Object(n.isHexColor)(e)?1:Object(r.parseRgba)(e)[3];return Object(n.generateColor)(i,Object(n.alphaToTransparency)(s))},e}(),c=function(){function e(e,t){this._offset=e,this._modelStartOffset=t}return e.prototype.getColor=function(e){if(Object(n.isHexColor)(e)){var t=Object(r.parseRgb)(e);return Object(r.rgbToHexString)(Object(r.shiftRgb)(t,this._offset,this._modelStartOffset))}var i=Object(r.parseRgba)(e);return Object(r.rgbaToString)(Object(r.shiftRgba)(i,this._offset,this._modelStartOffset))},e}();var u=function(){function e(e){this._chartModel=e}return e.prototype.getColorRotator=function(e){var t=Object(s.studyColorRotationMode)(e),i=this._calcDefaultColorsOffset(e);switch(t){case"loop":return new l(i);case"shift":var r=this._chartModel.getStudyShiftColorStartOffset();return new c(i,r)}},e.prototype._calcDefaultColorsOffset=function(e){var t=0;return this._chartModel.dataSources().filter(s.isStudy).forEach((function(i){var r,n,o=i.metaInfo().id===e.id,s=(r=i.metaInfo(),n=e,(r.pine?r.pine.version:void 0)===(n.pine?n.pine.version:void 0));o&&s&&t++})),t},e}()},i1o5:function(e,t,i){"use strict";var r;i.r(t),i.d(t,"InvalidationLevel",(function(){return r})),i.d(t,"InvalidateMask",(function(){return n})),function(e){e[e.Cursor=1]="Cursor",e[e.Light=2]="Light",e[e.Full=3]="Full"}(r||(r={}));var n=function(){function e(e){this._panesOrderChanged=!1,this._invalidatedPanes=new Map,this._invalidationLevel=e||r.Cursor}return e.prototype.invalidatePane=function(e,t){var i=this._invalidatedPanes.get(e)||r.Cursor;this._invalidatedPanes.set(e,Math.max(i,t))},e.prototype.invalidatePanesOrder=function(){this._panesOrderChanged=!0},e.prototype.invalidateAll=function(e){this._invalidationLevel=Math.max(this._invalidationLevel,e)},e.prototype.fullInvalidation=function(){return this._invalidationLevel},e.prototype.invalidateForPane=function(e){var t=this._invalidatedPanes.get(e)||r.Cursor;return Math.max(t,this._invalidationLevel)},e.prototype.merge=function(e){var t=this;this._invalidationLevel=Math.max(this._invalidationLevel,e._invalidationLevel),this._panesOrderChanged=this._panesOrderChanged||e._panesOrderChanged,e._invalidatedPanes.forEach((function(e,i){var n=t._invalidatedPanes.get(i)||r.Cursor;t._invalidatedPanes.set(i,Math.max(n,e))}))},e.prototype.panesOrderInvalidated=function(){return this._panesOrderChanged},e.prototype.exclude=function(e){this._invalidationLevel<=e&&(this._invalidationLevel=0);var t=[];this._invalidatedPanes.forEach((function(i,r){i<=e&&t.push(i)}));for(var i=0,r=t;ie.left){var t=n(this._leftPriceScales,this.mainDataSource().priceScale());return t.splice(e.left),t}return this._leftPriceScales},v.prototype.visibleRightPriceScales=function(){var e=this._model.priceScaleSlotsCount();if(this._rightPriceScales.length>e.right){var t=n(this._rightPriceScales,this.mainDataSource().priceScale()) ;return t.splice(e.right),t}return this._rightPriceScales},v.prototype.timeScale=function(){return this.m_timeScale},v.prototype.dataSources=function(){return this.m_dataSources},v.prototype.isOverlay=function(e){var t=e.priceScale();return"overlay"===this.priceScalePosition(t)},v.prototype._processMainSourceChange=function(){var e;if(null===this.m_mainDataSource)for(var t=0;te)&&(e=r)}}return null===e&&(e=this.getZOrderMinMax().minZOrder-1),this.m_dataSources.forEach((function(t){t.zorder()>e&&t.setZorder(t.zorder()+1)})),e+1},v.prototype.beginInsertManyLineDataSources=function(){this._isInInsertManyDataSourcesState=!0,this._lastLineDataSourceZOrder=null},v.prototype.endInsertManyLineDataSources=function(){this._isInInsertManyDataSourcesState=!1,this._lastLineDataSourceZOrder=null},v.prototype.addDataSource=function(e,t,i){var r;u(e)&&!i?(r=null!==this._lastLineDataSourceZOrder?this._lastLineDataSourceZOrder:this._newZOrderForLineTool(),this._isInInsertManyDataSourcesState&&(this._lastLineDataSourceZOrder=r)):r=this.getZOrderMinMax().minZOrder-1,this.insertDataSource(e,t,r)},v.prototype.insertDataSource=function(e,t,i){t||(t=this.findSuitableScale(e)),this._addSourceToCollections(e);var r=!1;(e===this._model.mainSeries()||null===this.m_mainDataSource)&&(this.m_mainDataSource=e,r=!0),t.addDataSource(e,this._isInInsertManyDataSourcesState),e.setPriceScale(t),e.onTagsChanged&&e.onTagsChanged().subscribe(this,v.prototype.onSourceTagsChanged),e.setZorder(i),r&&this._processMainSourceChange(),this._tagsChanged.fire(),TradingView.isInherited(e.constructor,l)&&this.recalculatePriceScale(t),this._invalidateSourcesCache()},v.prototype.priceScalePosition=function(e){return this._leftPriceScales.includes(e)?"left":this._rightPriceScales.includes(e)?"right":"overlay"},v.prototype.createPriceScaleAtPosition=function(e,t){var i=this._properties.axisProperties.state();i.autoScale=!0;var r=new d(this._model.properties().scalesProperties,i);return r.setHeight(this.height()),r.setTopMargin(this._defaultTopMargin()), r.setBottomMargin(this._defaultBottomMargin()),this._placePriceScale(r,e,t),r},v.prototype._placePriceScale=function(e,t,i){if("overlay"!==t){var n="left"===t?this._leftPriceScales:this._rightPriceScales,o=void 0===i?n.length:i;n.splice(o,0,e),e.modeChanged().subscribe(this,this._onPriceScaleModeChanged.bind(this,e)),e.internalHeightChanged().subscribe(this,this._recalculatePriceScaleByScaleRatio.bind(this,e)),e.priceRangeChanged().subscribe(this,this._recalculateTimeScaleByScaleRatio.bind(this,e)),e.priceRangeChanged().subscribe(this,this._onPriceScaleSetMinMaxPriceRange.bind(this,e)),e.isLockScale()&&(r(null===this._lockedPriceScale),this._lockedPriceScale=e,this._currentPriceScaleRatio=null),this._onPriceScalesChanged.fire()}},v.prototype.removePriceScale=function(e){e.modeChanged().unsubscribeAll(this),e.priceRangeChanged().unsubscribeAll(this),e.internalHeightChanged().unsubscribeAll(this),e===this._lockedPriceScale&&(this._lockedPriceScale=null,this._currentPriceScaleRatio=null);var t=this._leftPriceScales.indexOf(e);-1!==t&&this._leftPriceScales.splice(t,1);var i=this._rightPriceScales.indexOf(e);-1!==i&&this._rightPriceScales.splice(i,1),this._onPriceScalesChanged.fire()},v.prototype.removeDataSource=function(e,t,i){var r=this.m_dataSources.indexOf(e);if(-1!==r){0,this._removeSourceFromCollections(r,i),e!==this.m_mainDataSource||t||(this.m_mainDataSource=null);var n=e.priceScale();if(n&&n.dataSources().indexOf(e)>=0&&n.removeDataSource(e),n&&null===n.mainSource()){var o=n.dataSources().length;0!==o&&c.logError("Invalid priceScale state: empty mainSource but non-empty data sources="+o),this.removePriceScale(n)}e.onTagsChanged&&e.onTagsChanged().unsubscribe(this,v.prototype.onSourceTagsChanged),e instanceof l&&!t&&this._processMainSourceChange(),this._tagsChanged.fire(),n&&e instanceof l&&this.recalculatePriceScale(n),this._invalidateSourcesCache()}else c.logDebug("removeDataSource: invalid data source")},v.prototype.startScalePrice=function(e,t){e.startScale(t)},v.prototype.scalePriceTo=function(e,t){e.scaleTo(t),this.updateAllViews()},v.prototype.endScalePrice=function(e){e.endScale()},v.prototype.startScrollPrice=function(e,t){e.startScroll(t)},v.prototype.scrollPriceTo=function(e,t){e.scrollTo(t),this.updateAllViews()},v.prototype.endScrollPrice=function(e){e.endScroll()},v.prototype.setPriceAutoScale=function(e,t){e.setMode({autoScale:t}),this.timeScale().isEmpty()?e.setPriceRange(null):this.recalculatePriceScale(e)},v.prototype.restorePriceScaleState=function(e,t){e.restoreState(t),this.updateAllViews()},v.prototype._updateCustomSourceAllViews=function(e){e.paneViews(this).length>0&&e.updateAllViews()},v.prototype.updateAllViews=function(){for(var e=0;e0&&!this.timeScale().isEmpty()){var i=this.timeScale().visibleBarsStrictRange();e.recalculatePriceRange(i)}e.updatePaneViews()}},v.prototype.resetPriceScale=function(e){var t=this.timeScale().visibleBarsStrictRange();e.isLockScale()||e.setMode({autoScale:!0}),e.recalculatePriceRange(t),this.updateAllViews()},v.prototype.recalculate=function(){this.recalculatePriceScale(this.m_rightPriceScale),this.recalculatePriceScale(this.m_leftPriceScale);for(var e=0;ei&&(i=n.zorder())}return{minZOrder:t,maxZOrder:i}},v.prototype.isZOrderAvailable=function(e){for(var t=0;t0&&t<0){var s=i[r-1].zorder(),a=e.zorder();i[r-1].setZorder(a),e.setZorder(s)}else if(r0){var l=i[r+1].zorder();a=e.zorder();i[r+1].setZorder(a),e.setZorder(l)}this._invalidateSourcesCache(),this._dataSourcesCollectionChanged.fire()},v.prototype.onSourceTagsChanged=function(){this._tagsChanged.fire()},v.prototype.onDestroyed=function(){return this._destroyed},v.prototype.clearSeries=function(e){for(var t=this.m_dataSources.length-1;t>=0;t--)TradingView.isInherited(this.m_dataSources[t].constructor,TradingView.Series)&&this._removeSourceFromCollections(t,e)},v.prototype.nonOverlayPricesSourcesCount=function(){return this.m_dataSources.filter((function(e){return(!e.properties().linkedToSeries||!e.properties().linkedToSeries.value())&&(TradingView.isInherited(e.constructor,l)&&e.showInObjectTree()&&!this.isOverlay(e))}),this).length},v.prototype.canHaveMoreNoScaleSources=function(){return this.nonOverlayPricesSourcesCount()>1},v.prototype.actionNoScaleIsEnabled=function(e){return!(!this.isOverlay(e)&&TradingView.isInherited(e.constructor,l))||this.canHaveMoreNoScaleSources()},v.prototype.executionsPositionController=function(){return this._executionsPositionController||(this._executionsPositionController=new o(this,this._model.timeScale())),this._executionsPositionController},v.prototype.isLast=function(){var e=this._model.panes();return e[e.length-1]===this},v.prototype.setMaximized=function(e){this._maximized=e},v.prototype.isMaximized=function(){return this._maximized},v.prototype.isMainPane=function(){var e=this._model.mainSeries(),t=!1;return this.m_dataSources.forEach((function(i){t||(t=i===e)})),this._isMainPane=t,t},v.prototype.properties=function(){return this._properties},v.prototype._mainSourceVisiblePriceRange=function(e){var t=this.m_timeScale.visibleBarsStrictRange();return null!==t?e.mainSource().priceRange(t.firstBar(),t.lastBar()):new a(-.5,.5)},v.prototype.priceScaleRatio=function(){return this._currentPriceScaleRatio},v.prototype.applyPriceScaleRatio=function(e,t){ null!==this._lockedPriceScale&&this._lockedPriceScale!==e||this._currentPriceScaleRatio===t||!this.isMainPane()||null===this._lockedPriceScale&&e!==this.mainDataSource().priceScale()||(this._setNewPriceRangeByScaleRatio(e,t,this._mainSourceVisiblePriceRange(e),!0,!0),null!==this._lockedPriceScale?this._tryToApplyNewPriceScaleRatio():e.isLog()||this._model.mainSeriesScaleRatioPropertyOnChanged())},v.prototype._mainSeriesPaneScaleRatioOnChange=function(){this.isMainPane()&&this._model.mainSeriesScaleRatioPropertyOnChanged()},v.prototype._applyOldScaleRatioToPriceScale=function(){if(this._isRecalculatingScales||null===this._currentPriceScaleRatio)return!1;this._isRecalculatingScales=!0,this._setNewPriceRangeByScaleRatio(this._lockedPriceScale,this._currentPriceScaleRatio,this._mainSourceVisiblePriceRange(this._lockedPriceScale)),this._isRecalculatingScales=!1},v.prototype._applyOldScaleRatioToTimeScale=function(){if(this._isRecalculatingScales||null===this._currentPriceScaleRatio)return!1;this._isRecalculatingScales=!0,this._setNewBarSpacingByScaleRatio(),this._isRecalculatingScales=!1},v.prototype._tryToApplyNewPriceScaleRatio=function(){var e=p(this.m_timeScale,this._lockedPriceScale);this._currentPriceScaleRatio===e||this._lockedPriceScale.isLog()||(this._priceScaleRatioChanged.fire(this._currentPriceScaleRatio,e),this._currentPriceScaleRatio=e)},v.prototype._recalculatePriceScaleByScaleRatio=function(e){this.isMainPane()&&e===this._lockedPriceScale&&(null!==this._currentPriceScaleRatio?this._applyOldScaleRatioToPriceScale():this._tryToApplyNewPriceScaleRatio())},v.prototype._recalculateTimeScaleByScaleRatio=function(e){e===this._lockedPriceScale&&(null!==this._currentPriceScaleRatio?this._applyOldScaleRatioToTimeScale():this._tryToApplyNewPriceScaleRatio())},v.prototype._setNewPriceRangeByScaleRatio=function(e,t,i,r,n){var o=f(e,this.m_timeScale.barSpacing(),t);e.setPriceRange(null!==o?o:i,r,n)},v.prototype._setMinMaxPriceRange=function(){var e=f(this._lockedPriceScale,this.m_timeScale.maxBarSpacing(),this._currentPriceScaleRatio),t=f(this._lockedPriceScale,this.m_timeScale.minBarSpacing(),this._currentPriceScaleRatio);null!==e&&this._lockedPriceScale.setMaxPriceRange(e),null!==t&&this._lockedPriceScale.setMinPriceRange(t)},v.prototype._onPriceScaleSetMinMaxPriceRange=function(e){e===this._lockedPriceScale&&this._setMinMaxPriceRange()},v.prototype._setNewBarSpacingByScaleRatio=function(){var e=this.m_timeScale.getValidBarSpacing(_(this._lockedPriceScale,this._currentPriceScaleRatio));this.m_timeScale.isValidBarSpacing(e)&&this.m_timeScale.setBarSpacing(e)},v.prototype._onPriceScaleModeChanged=function(e,t,i){if(i.lockScale&&(this._lockedPriceScale!==e&&null!==this._lockedPriceScale&&this._lockedPriceScale.setMode({lockScale:!1}),this._lockedPriceScale=e,this._currentPriceScaleRatio=p(this.m_timeScale,e)),t.lockScale&&!i.lockScale&&(this._lockedPriceScale=null,this._currentPriceScaleRatio=null),t.percentage!==i.percentage||t.indexedTo100!==i.indexedTo100){var r=this.timeScale().visibleBarsStrictRange() ;null!==r&&(e.recalculatePriceRange(r),e.updatePaneViews())}},v.prototype.lineToolsForArea=function(e){var t=this.m_height,i=this.m_width,r=this.logicalRectToPixels(e);return this.m_dataSources.filter((function(e){return u(e)})).filter((function(e){return(e.paneViews()||[]).some((function(e){var n=e.renderer(t,i,!0);return n&&n.doesIntersectWithBox&&n.doesIntersectWithBox(r)}))}))},v.prototype.getPriceScaleById=function(e){var t=this.m_dataSources.find((function(t){return null!==t.priceScale()&&t.priceScale().id()===e}));return void 0===t?null:t.priceScale()},v.prototype.setPriceScaleSelectionStrategy=function(e){this._priceScaleSelectionStrategy=e,e.apply(this)},v.prototype.movePriceScale=function(e,t,i){var r=this.priceScalePosition(e);if(r!==t)this.removePriceScale(e),this._placePriceScale(e,t,i),this._invalidateSourcesCache();else if(void 0!==i&&"overlay"!==r){var n="left"===r?this._leftPriceScales:this._rightPriceScales,o=n.indexOf(e);n.splice(o,1),n.splice(i,0,e)}},v.prototype.onPriceScalesChanged=function(){return this._onPriceScalesChanged},v.prototype.priceScaleIndex=function(e,t){switch(t){case"left":return this.leftPriceScales().indexOf(e);case"right":return this.rightPriceScales().indexOf(e)}},v.prototype.findTargetPriceAxisViews=function(e,t,i,r){if(this._model.paneForSource(e)!==this)return null;if(t===e.priceScale())return i;if("overlay"===this.priceScalePosition(e.priceScale()))return t===this.defaultPriceScale()?i:null;var n=this.priceScalePosition(t);if(n!==this.priceScalePosition(e.priceScale()))return null;var o="left"===n?this.leftPriceScales():this.rightPriceScales();return o.indexOf(t)0&&(h=2*Math.PI-h),0===e&&(h+=Math.PI),this._properties.angle.setValue(h)}else{var d=this._startChangeWidth,p=s.subtract(o).length();if(this._origScale*dx?a.PlotRowSearchMode.NearestLeft:a.PlotRowSearchMode.Exact,L=this._study.nearestIndex(C,T);if(void 0!==L){var I=y[b];if(void 0===I&&(I=this._study.getMinFirstBarIndexForPlot(b),Number.isFinite(I)&&(y[b]=I)),!(I>L)){var M=this._study.data().last(),O=this._study.data().valueAt(L)||(null!==M?M.value:null);if(null!==O){var A=O[P+1];if(Object(n.isNumber)(A)){S.setValue(m.format(A));var k=this._study.properties().styles[b].color.value();h=o[P];Object(l.isOhlcPlot)(h)&&(b=h.target||b,k=this._study.properties().ohlcPlots[b].color.value());var E=k;if(s[b]&&O.length>s[b].index+1){var D=O[s[b].index+1],V=s[b].palette;if(null!=D&&void 0!==V){var B=s[b].paletterProps,R=V.valToIndex?V.valToIndex[D]:D ;E=B.colors[void 0!==R?R:D].color.value()}}E=Object(d.resetTransparency)(E),S.setColor(E)}}}}}}}},t.prototype._currentIndex=function(){var e=this._model.crossHairSource().lockedIndex;return void 0!==e?e:null!==this._model.crossHairSource().pane?this._model.crossHairSource().appliedIndex():this._study.data().lastIndex()},t}(o.b)},ivNn:function(e,t,i){"use strict";function r(e){return Math.round(1e10*e)/1e10}Object.defineProperty(t,"__esModule",{value:!0}),t.isNumber=function(e){return"number"==typeof e&&isFinite(e)},t.isInteger=function(e){return"number"==typeof e&&e%1==0},t.isNaN=function(e){return!(e<=0||e>0)},t.fixComputationError=r,t.alignTo=function(e,t){var i=e/t,n=Math.floor(i),o=i-n;return o>2e-10?r(o>.5?(n+1)*t:n*t):e}},j1f4:function(e,t,i){"use strict";i.r(t);var r=i("K9GE");for(var n in r)"default"!==n&&function(e){i.d(t,e,(function(){return r[e]}))}(n)},jA0t:function(e,t,i){"use strict";var r=function(){var e={};function t(e){return e.is_price_study}function i(e,t){var i=t.slice(0).toLowerCase();if(e){for(var r=0;rt){if((n=o-1)0&&e-t[r-1]<=n)return n;return 0},n.prototype.is_valid=function(){return!this._invalid},n._offset=function(e,t,i){var r=o(e,i);return-1===r?0:t[r]};var s=function(e){return 0|e},a=function(e){return 60*e*1e3};function l(e){return e%4==0&&(e%100!=0||e%400==0)}var c={0:0,1:31,2:59,3:90,4:120,5:151,6:181,7:212,8:243,9:273,10:304,11:334},u={SUNDAY:1,MONDAY:2,TUESDAY:3,WEDNESDAY:4,THURSDAY:5,FRIDAY:6,SATURDAY:7,JANUARY:0,FEBRUARY:1,MARCH:2,APRIL:3,MAY:4,JUNE:5,JULY:6,AUGUST:7,SEPTEMBER:8,OCTOBER:9,NOVEMBER:10,DECEMBER:11,YEAR:1,MONTH:2,WEEK_OF_YEAR:3,DAY_OF_MONTH:5,DAY_OF_YEAR:6,DAY_OF_WEEK:7,HOUR_OF_DAY:11,MINUTE:12,SECOND:13,minutesPerDay:1440,secondsPerDay:a(1440),get_minutes_from_hhmm:function(e){return-1!==e.indexOf(":")&&(e=e.split(":").join("")),e%100+60*s(e/100)},get_year:function(e){return e.getUTCFullYear()},get_month:function(e){return e.getUTCMonth()},get_hours:function(e){return e.getUTCHours()},get_minutes:function(e){return e.getUTCMinutes()},get_seconds:function(e){return e.getUTCSeconds()},get_day_of_month:function(e){return e.getUTCDate()},get_day_of_week:function(e){return e.getUTCDay()+1},get_day_of_year:function(e){var t=e.getUTCMonth(),i=c[t];return t>u.JANUARY+1&&l(e.getUTCFullYear())&&(i+=1),i+e.getUTCDate()},get_week_of_year:function(e){var t=new Date(Date.UTC(e.getUTCFullYear(),0,1)).getUTCDay(),i=0===t?1:8-t,r=u.get_day_of_year(e)-i;return Math.ceil(r/7)+1},get_minutes_from_midnight:function(e){return 60*u.get_hours(e)+u.get_minutes(e)},set_hms:function(e,t,i,r,n,o){e.setUTCHours(t),e.setUTCMinutes(i),e.setUTCSeconds(r),e.setUTCMilliseconds(n),u.correct_time(e,o)},correct_time:function(e,t){var i=e.getTime(),r=t.correction_loc(i);e.setTime(i+r)},add_days_considering_dst:function(e,t,i){var r=e.offset_utc(t),n=this.clone(t);this.add_date(n,i);var o=e.offset_utc(n);return n.setTime(n.getTime()+r-o),n},add_date:function(e,t){e.setTime(e.getTime()+t*u.secondsPerDay)},add_minutes:function(e,t){e.setTime(e.getTime()+a(t))},clone:function(e){return new Date(e.getTime())},get_days_per_year:function(e){var t=e.getUTCFullYear();return this.days_per_year(t)},days_per_year:function(e){return l(e)?366:365},get_part:function(e,t){switch(t){case u.YEAR:return u.get_year(e);case u.MONTH:return u.get_month(e);case u.DAY_OF_MONTH:return u.get_day_of_month(e);case u.WEEK_OF_YEAR:return u.get_week_of_year(e);case u.DAY_OF_WEEK:return u.get_day_of_week(e);case u.HOUR_OF_DAY:return u.get_hours(e);case u.MINUTE:return u.get_minutes(e);case u.DAY_OF_YEAR:return u.get_day_of_year(e);case u.SECOND:return u.get_seconds(e);default:return e.getTime()}},time_minutes:a,time_seconds:function(e){return 1e3*e},time_minutes_diff:function(e,t){return s((s(e/1e3)-s(t/1e3))/60)},time_seconds_diff:function(e,t){return s(s(e/1e3)-s(t/1e3))},utc_to_cal:function(e,t){var i=e.offset_utc(t);return new Date(t+i)},get_cal:function(e,t,i,r,n,o,s){var a=new Date(Date.UTC(t,i,r,n||0,o||0,s||0)),l=e.offset_utc(+a);return new Date(a.valueOf()-l)},get_cal_from_unix_timestamp_ms:function(e,t){ return new Date(t+e.offset_utc(t))},get_cal_utc:function(e,t,i){return new Date(Date.UTC(e,t,i))},cal_to_utc:function(e,t){var i=t.getTime();return i-e.offset_loc(i)},get_timezone:function(e){return new n(e)},shift_day:function(e,t){var i=e-1;return(i+=t)>6?i%=7:i<0&&(i=(7+i%7)%7),i+1}};e.exports=u},jFln:function(e,t,i){"use strict";var r=i("Hr11"),n=r.greaterThan,o=r.lessThan,s=window.CanvasEx=i("8Uy/");s.computeDashPattern=function(e){return[[e.lineWidth,2*e.lineWidth],[5*e.lineWidth,6*e.lineWidth],[6*e.lineWidth,6*e.lineWidth],[e.lineWidth,4*e.lineWidth],[2*e.lineWidth,e.lineWidth]][e.lineStyle-1]},s.drawLine=function(e,t,i,r,n){isFinite(t)&&isFinite(r)&&isFinite(i)&&isFinite(n)&&(e.lineStyle!==s.LINESTYLE_SOLID?s.drawDashedLine(e,t,i,r,n):s.drawSolidLine(e,t,i,r,n))},s.drawArrow=function(e,t,i,r,n,o){if(o=void 0===o?2:o,isFinite(t)&&isFinite(r)&&isFinite(i)&&isFinite(n)){var s=Math.round(o/2);e.beginPath(),e.moveTo(r,n),e.lineTo(t,i),e.moveTo(t+o,i+o),e.lineTo(t-o,i+o),e.moveTo(t-s,i+s),e.lineTo(t+s,i+s),e.stroke()}},s.drawSolidLine=function(e,t,i,r,n){e.beginPath(),e.moveTo(t,i),e.lineTo(r,n),e.stroke()},s.setLineStyle=function(e,t){e.lineStyle=t;var i=[];t!==s.LINESTYLE_SOLID&&(i=s.computeDashPattern(e)),s.setLineDash(e,i)},s.setLineDash=function(e,t){"function"==typeof e.setLineDash?e.setLineDash(t):void 0!==e.mozDash?e.mozDash=t:void 0!==e.webkitLineDash&&(e.webkitLineDash=t)},s.drawPoly=function(e,t,i){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var r=0;r0&&(c.thereYet=o,c.cap=Math.max),t-r>0&&(l.thereYet=o,l.cap=Math.max),e.moveTo(t,i);for(var u=t,h=i,d=0,p=!0;!l.thereYet(u,r)||!c.thereYet(h,s);){var f=Math.atan2(s-i,r-t),_=a[d];u=l.cap(r,u+Math.cos(f)*_),h=c.cap(s,h+Math.sin(f)*_),p?e.lineTo(u,h):e.moveTo(u,h),d=(d+1)%a.length,p=!p}},s.setFont=function(e,t){if(e.font!==t)try{e.font=t}catch(i){}}, "undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.setFont=function(e){s.setFont(this,e)},CanvasRenderingContext2D.prototype.lineStyle=s.LINESTYLE_SOLID),e.exports=s},jJ9X:function(e,t,i){},jRfx:function(e,t,i){"use strict";i.d(t,"c",(function(){return s})),i.d(t,"a",(function(){return a})),i.d(t,"b",(function(){return l}));var r=i("mrSG"),n=i("Eyy1"),o=function(e){function t(t,i,r){var n=e.call(this,t,i,r)||this;return n._restorePane=!1,n}return Object(r.__extends)(t,e),t.prototype.redo=function(){var e=this,t=this._chartModel.panes().length,i=this._chartModel.panes()[this._targetPaneIndex()],r=Object(n.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),o=this._chartModel.children(r,!0);o.forEach((function(t){return e._chartModel.detachSource(t)})),this._restorePane=this._chartModel.detachSource(r);var s=i.findSuitableScale(r);if(i.addDataSource(r,s,!1),o.forEach((function(e){return i.addDataSource(e,s,!1)})),r===this._chartModel.mainSeries()){var a=i.priceScalePosition(s);i.movePriceScale(s,a,0)}this._chartModel.fullUpdate(),t!==this._chartModel.panes().length&&this._chartModel.setShouldBeSavedEvenIfHidden(!0)},t.prototype.undo=function(){var e,t=this;e=this._restorePane?this._chartModel.createPane(this._initialPaneIndex):this._chartModel.panes()[this._initialPaneIndex];var i=Object(n.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),r=this._chartModel.children(i,!0);r.forEach((function(e){return t._chartModel.detachSource(e)})),this._chartModel.detachSource(i);var o=e.getPriceScaleById(this._initialPriceScaleId);null===o&&(o=e.createPriceScaleAtPosition(this._initialPriceScalePosition,this._initialPriceScaleIndex)),e.addDataSource(i,o,!0),r.forEach((function(t){return e.addDataSource(t,o,!1)})),this._chartModel.fullUpdate()},t}(i("3u3j").a),s=function(e){function t(t,i,r){return e.call(this,t,i,r)||this}return Object(r.__extends)(t,e),t.prototype._targetPaneIndex=function(){return this._initialPaneIndex-1},t}(o),a=function(e){function t(t,i,r){return e.call(this,t,i,r)||this}return Object(r.__extends)(t,e),t.prototype._targetPaneIndex=function(){return this._initialPaneIndex+1},t}(o),l=function(e){function t(t,i,r,n){var o=e.call(this,t,i,n)||this;return o._targetPane=r,o}return Object(r.__extends)(t,e),t.prototype._targetPaneIndex=function(){return this._targetPane},t}(o)},jTis:function(e,t,i){"use strict";var r;i.r(t),i.d(t,"CalloutConsts",(function(){return r})),function(e){e[e.RoundRadius=8]="RoundRadius",e[e.TextMargins=2]="TextMargins",e[e.MinWidth=100]="MinWidth"}(r||(r={}))},jenN:function(e,t,i){"use strict";i.r(t),i.d(t,"createGraphicsPaneViews",(function(){return l})),i.d(t,"createGraphicsPriceAxisViews",(function(){return u}));var r=i("uOxu"),n=i("7Fue");i.d(t,"isStudyGraphicsEmpty",(function(){return n.a}));var o=i("xWfy");i.d(t,"StaticStudyGraphics",(function(){return o.a})),i.d(t,"emptyStudyGraphics",(function(){return o.b})),i.d(t,"loadStudyGraphics",(function(){return o.c})),i.d(t,"saveStudyGraphics",(function(){return o.d})) ;var s=i("qySK");i.d(t,"LiveStudyGraphics",(function(){return s.a}));var a=Object(r.getLogger)("Chart.StudyGraphics");function l(e,t,r){return new Promise((function(n){i.e("study-pane-views").then(function(o){var s=Object.keys(e.graphicsInfo());s.sort((function(e,t){return c(e)-c(t)})),n(s.map((function(n){var o={backgrounds:null,hhists:null,horizlines:null,hlines:null,lines:null,polygons:null,shapemarks:null,textmarks:null,trendchannels:null,vertlines:i("psYU").VertLinePaneView,dwglabels:null,dwglines:null}[n];return null===o?(a.logWarn(n+" is not supported by this build of graphics subsystem, skipping"),null):new o(e,t,r)})).filter((function(e){return null!==e})))}.bind(null,i)).catch(void 0)}))}function c(e){switch(e){case"polygons":return-100;case"trendchannels":return-90;default:return 0}}function u(e){for(var t=Object.keys(e.graphicsInfo()),i=[],r=function(e){return a.logWarn(e+" is not supported by this build of graphics subsystem, skipping"),"continue"},n=0,o=t;n0&&t.setValue(a.family),i.setValue(a.size),r.setValue(a.bold),s.setValue(a.italic)):o.logError("Invalid font: "+e)},fontHeight:function(e){if(!this._fontHeightCache[e]){var t=document.createElement("span");t.appendChild(document.createTextNode("height")),document.body.appendChild(t),t.style.cssText="font: "+e+"; white-space: nowrap; display: inline;";var i=t.offsetHeight;document.body.removeChild(t),this._fontHeightCache[e]=Math.ceil(i)}return this._fontHeightCache[e]},drawPolyHoverOrPress:function(e,t,i,r){r?(e.save(),e.fillStyle="rgba(0, 0, 0, 0.15)",CanvasEx.drawPoly(e,t,!0),e.restore()):i&&(e.save(),e.fillStyle="rgba(0, 0, 0, 0.1)",CanvasEx.drawPoly(e,t,!0),e.restore())},repaint:function(e){e.lightUpdate()},roundToMinTick:function(e,t){var i=1/e.mainSource().base();return i*Math.round(t/i)}};e.exports=s},jofe:function(e,t,i){"use strict";function r(){var e,t;return{promise:new Promise((function(i,r){e=i,t=r})),reject:t,resolve:e}}i.r(t),i.d(t,"createDeferredPromise",(function(){ return r}))},jpZi:function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var r=i("mrSG"),n=i("Eyy1"),o=(i("YFKU"),i("HbRj"),i("RDU5")),s=window.t("Exclude line tools from group {group}"),a=function(e){function t(t,i,r){var n=e.call(this,s.format({group:i.name()}))||this;return n._model=t,n._groupId=i.id,n._groupName=i.name(),n._lineToolsIds=r.map((function(e){return e.id()})),n}return Object(r.__extends)(t,e),t.prototype.redo=function(){var e=this,t=Object(n.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId)),i=this._lineToolsIds.map((function(t){return e._model.dataSourceForId(t)}));t.excludeLineTools(i),0===t.lineTools().length&&this._model.lineToolsGroupModel().removeGroup(t)},t.prototype.undo=function(){var e=this,t=this._lineToolsIds.map((function(t){return e._model.dataSourceForId(t)})),i=this._model.lineToolsGroupModel().groupForId(this._groupId);null!==i?i.addLineTools(t):this._model.lineToolsGroupModel().createGroup(t,this._groupName,this._groupId)},t}(o.UndoCommand)},jy4L:function(e,t,i){"use strict";i.r(t),i.d(t,"makeNextSymbolId",(function(){return n})),i.d(t,"makeNextStudyId",(function(){return s}));var r=0;function n(){return"ss_"+ ++r}var o=0;function s(){return"st"+ ++o}},k4w6:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var r=i("l4sv"),n=i("8Uy/"),o=function(){function e(e){this._lineRendererData={y:0,color:"rgba(0, 0, 0, 0)",linewidth:1,linestyle:n.LINESTYLE_SOLID,visible:!1},this._lineRenderer=new r.HorizontalLineRenderer,this._invalidated=!0,this._series=e,this._model=e.model(),this._lineRenderer.setData(this._lineRendererData)}return e.prototype.update=function(){this._invalidated=!0},e.prototype.renderer=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._lineRenderer},e}()},"k9/m":function(e,t,i){"use strict";i.r(t),i.d(t,"PlotRowSearchMode",(function(){return r})),i.d(t,"PlotList",(function(){return c})),i.d(t,"mergeMinMax",(function(){return u})),i.d(t,"mergePlotRows",(function(){return h}));var r,n=i("Eyy1"),o=i("Y7w9"),s=i("tqok"),a=i("uOxu"),l=Object(a.getLogger)("Chart.PlotList");!function(e){e[e.NearestLeft=-1]="NearestLeft",e[e.Exact=0]="Exact",e[e.NearestRight=1]="NearestRight"}(r||(r={}));var c=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this._items=[],this._start=0,this._end=0,this._shareRead=!1,this._minMaxCache=new Map,this._rowSearchCache=new Map,this._rowSearchCacheWithoutEmptyValues=new Map,this._plotFunctions=e||new Map,this._emptyValuePredicate=t}return e.prototype.clear=function(){this._items=[],this._start=0,this._end=0,this._shareRead=!1,this._minMaxCache.clear(),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear()},e.prototype.first=function(){return this.size()>0?this._items[this._start]:null},e.prototype.last=function(){return this.size()>0?this._items[this._end-1]:null},e.prototype.firstIndex=function(){return this.size()>0?this._indexAt(this._start):null},e.prototype.lastIndex=function(){return this.size()>0?this._indexAt(this._end-1):null },e.prototype.size=function(){return this._end-this._start},e.prototype.isEmpty=function(){return 0===this.size()},e.prototype.contains=function(e){return null!==this._search(e,r.Exact)},e.prototype.valueAt=function(e){var t=this.search(e);return null!==t?t.value:null},e.prototype.add=function(e,t){if(this._shareRead)return l.logDebug("add: readonly collection modification attempt"),!1;var i={index:e,value:t},n=this._search(e,r.Exact);return this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear(),null===n?(this._items.splice(this._lowerbound(e),0,i),this._start=0,this._end=this._items.length,!0):(this._items[n]=i,!1)},e.prototype.search=function(e,t,i){void 0===t&&(t=r.Exact);var n=void 0!==i?this._rowSearchCacheWithoutEmptyValues:this._rowSearchCache,o=void 0!==i?1e4*(t+1)+i:t,s=n.get(e);if(void 0!==s){var a=s.get(o);if(void 0!==a)return a}var l=this._search(e,t,i);if(null===l)return null;var c={index:this._indexAt(l),value:this._valueAt(l)};return void 0===s&&(s=new Map,n.set(e,s)),s.set(o,c),c},e.prototype.fold=function(e,t){for(var i=t,r=this._start;r=i;--r){var n=this._indexAt(r),o=this._valueAt(r);if(e(n,o))return{index:n,value:o}}return null},e.prototype.each=function(e){for(var t=this._start;tthis._items[this._items.length-1].index?this._append(e):1===e.length&&e[0].index===this._items[this._items.length-1].index?(this._updateLast(e[0]),e[0]):this._merge(e)},e.prototype.addTail=function(e,t){void 0===t&&(t=!1);var i=0;t&&this._end-this._start>0&&(i=1,this._items[this._end-this._start-1].value=e[0].value);for(var r=i;r0?i[0]:null},e.prototype.state=function(){return{start:this._start,end:this._end,data:this._items,shareread:this._shareRead}},e.prototype.restoreState=function(e){e?(this._start=e.start,this._end=e.end,this._shareRead=e.shareread,this._items=e.data,this._minMaxCache.clear(),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear()):this.clear()},e.prototype._indexAt=function(e){return this._items[e].index},e.prototype._valueAt=function(e){return this._items[e].value},e.prototype._length=function(){return this._items.length},e.prototype._search=function(e,t,i){var n=this._bsearch(e);if(null===n&&t!==r.Exact)switch(t){case r.NearestLeft:return this._searchNearestLeft(e,i);case r.NearestRight:return this._searchNearestRight(e,i);default:throw new TypeError("Unknown search mode")}if(void 0===i||null===n||t===r.Exact)return n;switch(t){case r.NearestLeft:return this._nonEmptyNearestLeft(n,i);case r.NearestRight:return this._nonEmptyNearestRight(n,i);default:throw new TypeError("Unknown search mode")}},e.prototype._nonEmptyNearestRight=function(e,t){for(var i=Object(n.ensure)(this._emptyValuePredicate),r=Object(n.ensure)(t);e=this._start&&i(this._valueAt(e),r);)e-=1;return ethis._start&&(i-=1);var r=i!==this._end&&this._indexAt(i)e}),this._start,this._end)},e.prototype._plotMinMax=function(e,t,i){var r=null,n=this._plotFunctions.get(i);if(void 0===n)throw new Error('Plot "'+i+'" is not registered');for(var o=e;or.max&&(r.max=s)))}return r},e.prototype._invalidateCacheForRow=function(e){var t=Math.floor(e.index/30);this._minMaxCache.forEach((function(e){return e.delete(t)}))},e.prototype._prepend=function(e){return Object(n.assert)(!this._shareRead,"collection should not be readonly"),Object(n.assert)(0!==e.length,"plotRows should not be empty"),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear(),this._minMaxCache.clear(),this._items=e.concat(this._items),this._start=0,this._end=this._items.length,e[0]},e.prototype._append=function(e){return Object(n.assert)(!this._shareRead,"collection should not be readonly"),Object(n.assert)(0!==e.length,"plotRows should not be empty"),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear(),this._minMaxCache.clear(),this._items=this._items.concat(e),this._start=0,this._end=this._items.length,e[0]},e.prototype._updateLast=function(e){Object(n.assert)(!this.isEmpty(),"plot list should not be empty");var t=this._items[this._end-1];Object(n.assert)(t.index===e.index,"last row index should match new row index"),this._invalidateCacheForRow(e),this._rowSearchCache.delete(e.index),this._rowSearchCacheWithoutEmptyValues.delete(e.index),this._items[this._end-1]=e},e.prototype._merge=function(e){return Object(n.assert)(0!==e.length,"plot rows should not be empty"),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear(),this._minMaxCache.clear(),this._items=h(this._items,e),this._start=0,this._end=this._items.length,e[0]},e.prototype._minMaxOnRangeCachedImpl=function(e,t,i){if(this.isEmpty())return null;var r=null,o=Object(n.ensureNotNull)(this.firstIndex()),s=Object(n.ensureNotNull)(this.lastIndex()),a=Math.max(e,o),l=Math.min(t,s),c=30*Math.ceil(a/30),h=Math.max(c,30*Math.floor(l/30));r=u(r,this._minMaxOnRange(a,Math.min(c,t,l),i));var d=this._minMaxCache.get(i);void 0===d&&(d=new Map,this._minMaxCache.set(i,d));for(var p=Math.max(c+1,a);pt[s].index?s++:(o++,s++,n--);return n}(e,t),r=new Array(i),n=0,o=0,s=e.length,a=t.length,l=0;nt[o].index?(r[l]=t[o],o++):(r[l]=t[o],n++,o++),l++;for(;n16)throw new TypeError("invalid length");if(0===t)return e.toString();return("0000000000000000"+e.toString()).slice(-t)}var d=function(){function e(e,t,i,r){if(this.type="price",t||(t=1),Object(n.isNumber)(e)&&Object(n.isInteger)(e)||(e=100),e<0)throw new TypeError("invalid base");this._priceScale=e,this._minMove=t,this._minMove2=r,i&&void 0!==r&&r>0&&2!==r&&4!==r&&8!==r?a.logDebug("invalid minmove2"):(this._fractional=i,this.calculateDecimal())}return e.prototype.isFractional=function(){return!!this._fractional},e.prototype.state=function(){return{fractional:this._fractional,fractionalLength:this._fractionalLength,minMove:this._minMove,minMove2:this._minMove2,priceScale:this._priceScale}},e.prototype.calculateDecimal=function(){if(this._fractionalLength=0,this._priceScale>0&&this._minMove>0){var e=this._priceScale;for(this._fractional&&this._minMove2&&(e/=this._minMove2);e>1;)e/=10,this._fractionalLength++}},e.prototype.format=function(e,t,i,r,n){void 0===r&&(r=!0),void 0===n&&(n=!0);var s,a="";return e<0?(a=!1===r?"":"−",e=-e):e&&!0===t&&(a="+"),s=this._fractional?a+this._formatAsFractional(e,i):a+this._formatAsDecimal(e,i),n?Object(o.forceLTRStr)(s):s},e.prototype.parse=function(e){return e=(e=Object(o.stripLTRMarks)(e)).replace("−","-"),this._fractional?this._minMove2?this._parseAsDoubleFractional(e):this._parseAsSingleFractional(e):this._parseAsDecimal(e)},e.prototype.hasForexAdditionalPrecision=function(){return!this._fractional&&10===this._minMove2},e.serialize=function(e){return e.state()},e.deserialize=function(t){return new e(t.priceScale,t.minMove,t.fractional,t.minMove2)},e.prototype._formatAsDecimal=function(e,t){var i;t=t||0;var r,n=1/(i=this._fractional?Math.pow(10,this._fractionalLength||0):Math.pow(10,t)*this._priceScale/this._minMove);if(i>1)r=Math.floor(e);else{var o=Math.floor(Math.round(e/n)*n);r=0===Math.round((e-o)/n)?o:o+n}var s="";if(i>1){var a=+(Math.round(e*i)-r*i).toFixed(this._fractionalLength);a>=i&&(a-=i,r+=1);var l=void 0!==this._fractionalLength?this._fractionalLength:NaN;s=c.decimalSign+h(+a.toFixed(this._fractionalLength)*this._minMove,l+t),s=this._removeEndingZeros(s,t)}return r.toString()+s},e.prototype._getFractPart=function(e,t){var i=[0,5],r=[0,2,5,7];return 2===t?void 0===i[e]?-1:i[e]:4===t?void 0===r[e]?-1:r[e]:e},e.prototype._formatAsFractional=function(e,t){var i=this._priceScale/this._minMove,r=Math.floor(e),n=t?Math.floor(e*i)-r*i:Math.round(e*i)-r*i;n===i&&(n=0,r+=1);var o="";if(t){var s=(e-r-n/i)*i;o=h(s=Math.round(s*Math.pow(10,t)),t),o=this._removeEndingZeros(o,t)}if(!this._fractionalLength)throw new Error("_fractionalLength is not calculated");var a="";if(this._minMove2){var l=n%this._minMove2,u=h(n=(n-l)/this._minMove2,this._fractionalLength),d=this._getFractPart(l,this._minMove2);a=u+c.decimalSignFractional+d }else a=h((n=this._getFractPart(n,this._priceScale))*this._minMove,this._fractionalLength);return r.toString()+c.decimalSignFractional+a+o},e.prototype._removeEndingZeros=function(e,t){for(var i=0;i=n||o<0)return{error:u.fraction,res:!1};var s=r+o/n;return i&&(s=-s),{value:s,res:!0,suggest:this.format(s)}}return{error:u.custom,res:!1}},e.prototype._parseAsDoubleFractional=function(e){var t=new RegExp(/^(\-?)[0-9]+$/).exec(e);if(t)return{value:h=parseFloat(e),res:!0,suggest:this.format(h)};if(t=new RegExp("^(-?)([0-9]+)\\"+c.decimalSignFractional+"([0-9]+)\\"+c.decimalSignFractional+"([0-9]+)$").exec(e)){var i=!!t[1],r=parseInt(t[2]),n=void 0!==this._minMove2?this._minMove2:NaN,o=this._priceScale/n,s=this._minMove2,a=this._patchFractPart(parseInt(t[3]),o),l=this._patchFractPart(parseInt(t[4]),s);if(a>=o||a<0)return{error:u.fraction,res:!1};if(void 0!==s&&l>=s||l<0)return{error:u.secondFraction,res:!1};var h=void 0!==s?r+a/o+l/(o*s):NaN;return i&&(h=-h),{value:h,res:!0,suggest:this.format(h)}}return{error:u.custom,res:!1}},e}()},l4sv:function(e,t,i){"use strict";i.r(t),i.d(t,"HorizontalLineRenderer",(function(){return s}));var r=i("VdBB"),n=i("jFln"),o=i("gAom"),s=function(){function e(){this._data=null,this._hitTest=new r.HitTestResult(r.HitTestResult.REGULAR)}return e.prototype.setData=function(e){this._data=e},e.prototype.setHitTest=function(e){this._hitTest=e},e.prototype.hitTest=function(e){if(null===this._data||!1===this._data.visible)return null;var t=Math.abs(e.y-this._data.y)<=3+this._data.linewidth/2,i=void 0===this._data.left||this._data.left-e.x<=3,r=void 0===this._data.right||e.x-this._data.right<=3;return t&&i&&r?this._hitTest:null},e.prototype.draw=function(e,t){if(null!==this._data&&!1!==this._data.visible&&!(this._data.y<-this._data.linewidth/2||this._data.y>t.cssHeight+this._data.linewidth/2)){var i=t.pixelRatio;e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=Math.max(1,Math.floor(this._data.linewidth*i)),void 0!==this._data.linestyle&&Object(n.setLineStyle)(e,this._data.linestyle) ;var r=void 0!==this._data.left?Math.max(this._data.left,0):0,s=void 0!==this._data.right?Math.min(this._data.right,t.cssWidth):t.cssWidth,a=Math.round(this._data.y*i),l=Math.floor(r*i),c=Math.ceil(s*i);Object(o.drawHorizontalLine)(e,a,l,c)}},e}()},l7mP:function(e,t,i){"use strict";function r(e,t,r){void 0===t&&(t={}),Promise.all([i.e("react"),i.e(4),i.e(22),i.e(38),i.e(41),i.e(60),i.e(78),i.e(0),i.e(52),i.e("take-chart-image-dialog-impl")]).then(function(n){i("fMMV").getImageOfChart(e,t,r)}.bind(null,i)).catch(void 0)}function n(e,t,r){void 0===t&&(t={}),Promise.all([i.e("react"),i.e(4),i.e(22),i.e(38),i.e(41),i.e(60),i.e(78),i.e(0),i.e(52),i.e("take-chart-image-dialog-impl")]).then(function(n){i("fMMV").getImageOfChartSilently(e,t,r)}.bind(null,i)).catch(void 0)}i.r(t),i.d(t,"getImageOfChart",(function(){return r})),i.d(t,"getImageOfChartSilently",(function(){return n}))},lA7n:function(e,t,i){"use strict";i.r(t);var r=i("Kxc7"),n=i("mrSG"),o=function(e){function t(t,i){return e.call(this,t,i,"FAVORITE_CHARTS_CHANGED","loadChartDialog.favorites",{})||this}return Object(n.__extends)(t,e),t}(i("ulZB").b),s=i("zUrt"),a=i("FBuY"),l=i("Vdly"),c=i("/z0S");i.d(t,"LoadChartService",(function(){return u}));var u=function(){function e(e){var t=this;void 0===e&&(e=null),this._favoriteChartsService=new o(a.TVXWindowEvents,l),this._chartWidgetCollection=null,this._promise=null,this._getChartEntry=function(e){return{id:e.id,url:e.url,title:e.name,symbol:e.short_symbol,interval:e.interval,toolsCount:0,modified:e.modified_iso,active:function(){return t._isActiveChart(e.id)},openAction:function(){return s.backend.loadChart(e)},deleteAction:function(){return new Promise((function(i){s.backend.removeChart(e.image_url,(function(){t._deleteChart(e.id),i()}))}))},favoriteAction:t._updateFavorites}},this._updateFavorites=function(e){return t._favoriteChartsService.set(e)},this._isActiveChart=function(e){return null!==t._chartWidgetCollection&&e===t._chartWidgetCollection.metaInfo.id.value()},this._deleteChart=function(e){t._isActiveChart(e)&&(r.enabled("saveload_storage_customization")?null!==t._chartWidgetCollection&&t._chartWidgetCollection.clearChartMetaInfo():location.href="/chart/"+location.search)},this._chartWidgetCollection=e}return e.prototype.showLoadDialog=function(){Object(c.a)(this._showLoadDialog.bind(this),{source:"Load chart",sourceMeta:"Chart"})},e.prototype._showLoadDialog=function(){var e=this;(r.enabled("saveload_requires_authentication")&&!window.is_authenticated?Promise.resolve([]):new Promise((function(e){s.backend.getCharts((function(t){e(t)}))}))).then((function(t){return t.map(e._getChartEntry)})).then((function(t){var r=e._promise=Promise.all([i.e("react"),i.e(2),i.e(3),i.e(4),i.e(6),i.e(7),i.e(8),i.e(9),i.e(11),i.e(26),i.e(32),i.e(63),i.e(71),i.e(0),i.e(1),i.e(5),i.e(18),i.e(34),i.e("load-chart-dialog")]).then(i.bind(null,"AMW5")).then((function(i){e._promise===r&&i.showLoadChartDialog(t,e._favoriteChartsService,e._chartWidgetCollection)}))}))},e}()},lCO3:function(e,t,i){"use strict";i.r(t), i.d(t,"Version",(function(){return n}));var r=i("Eyy1"),n=function(){function e(e,t){this._major=e,this._minor=t}return e.prototype.major=function(){return this._major},e.prototype.minor=function(){return this._minor},e.prototype.isZero=function(){return 0===this._major&&0===this._minor},e.prototype.toString=function(){return this._major+"."+this._minor},e.prototype.compareTo=function(e){return this._majore._major?1:this._minore._minor?1:0},e.prototype.isLess=function(e){return this.compareTo(e)<0},e.prototype.isLessOrEqual=function(e){return this.compareTo(e)<=0},e.prototype.isEqual=function(e){return 0===this.compareTo(e)},e.prototype.isGreater=function(e){return this.compareTo(e)>0},e.prototype.isGreaterOrEqual=function(e){return this.compareTo(e)>=0},e.parse=function(t){if(t instanceof e)return new e(t.major(),t.minor());if("number"==typeof t)return Object(r.assert)(Math.floor(t)===t,"Version should not be a float number"),new e(t,0);if("string"==typeof t){var i=t.split(".");if(1===i.length){var n=parseInt(i[0],10);return Object(r.assert)(!isNaN(n),"Bad version string: "+t),new e(n,0)}if(2===i.length){n=parseInt(i[0],10);Object(r.assert)(!isNaN(n),"Bad version string: "+t);var o=parseInt(i[1],10);return Object(r.assert)(!isNaN(o),"Bad version string: "+t),new e(n,o)}throw new Error("Bad version string (one dot expected): "+t)}throw new Error("Bad version: "+t)},e.ZERO=new e(0,0),e}()},lJvs:function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("vAx0").ESDPaneView,o=i("fTGZ").BarsMarksContainer,s=i("mMWL"),a=i("FQhm"),l=i("6xeX").Tooltip,c=i("zDbI").CHART_FONT_FAMILY;function u(e){o.call(this,e);var t=this;s.hideMarksOnBars().subscribe(this,(function(){t._properties.visible.setValue(!s.hideMarksOnBars().value())})),this._paneView=new h(e,this)}function h(e,t){n.call(this,e,t,void 0,void 0),this.source=t,this.stylesCache={},this.templatesCache={},this._lollipops={},this._createLollipops()}inherit(u,o),u.prototype._initialize=function(e){this._properties.visible.setValue(!0)},u.prototype.userEditEnabled=function(){return!1},u.prototype._constructor="UserDefinedTimescaleMarks",u.prototype._plateViewData=function(e){return{text:e.text}},u.prototype.onClicked=function(e){a.emit("onTimescaleMarkClick",e.id)},u.prototype.clearMarks=function(){o.prototype.clearMarks.call(this),this._paneView.clearCaches(),this.onNeedRepaint.fire()},u.prototype._getData=function(e){var t=this._model.mainSeries().symbolInfo();if(t){var i=this.roundRange(this._rangeDifference(e)),r=this,n=this._model.mainSeries().properties().interval.value();ChartApiInstance.getTimescaleMarks(t,i.start,i.end,(function(t){t.forEach((function(e){r._marks[e.id]=e}),r),r._loadedRange=r._rangeUnion(e,r._loadedRange),r.onNeedRepaint.fire()}),n)}},u.prototype.updatePlateData=function(e,t){return t.barWidth=this.barWidth(),t.text=e.text,t.tooltipMargin=-1*Math.max(e.minSize/2,.4*this.barWidth()),t},u.prototype.hasContextMenu=function(){return!1},u.prototype.paneViews=function(){ return this._properties.visible.value()?[this._paneView]:[]},u.prototype.onClickOutside=function(e){this._paneView.onClickOutside(e)},inherit(h,n),h.prototype._createLollipops=function(){var e=this.source._model.timeScale(),t=n.prototype._getY.call(this.source),i=this.source._model.lastHittestData(),o=this;Object.keys(this.source._marks).forEach((function(n){var s=this.source._marks[n],a=s.id;o._lollipops[a]={id:a,basePoint:new r(e.indexToCoordinate(e.timePointToIndex(s.tickmark))+1,t),hovered:i&&i.id===a||a===o.getLastClickedLollipopId(),barY:null,label:s.label,color:s.color,items:s.tooltip,tooltip:o._lollipops.hasOwnProperty(a)?o._lollipops[a].tooltip:new l,visible:!0}}),this)},h.prototype.clearCaches=function(){this.closeTooltips(),this.clearLastClicked(),this._lollipops={}},h.prototype.update=function(){this._createLollipops(),this._invalidated=!1},h.prototype.renderer=function(){return this.update(),n.prototype.renderer.call(this)},h.prototype._generateTemplateStyle=function(e,t,i){var r=e+t+i;if(!(r in this.stylesCache)){var n="default"!==e,o={strokeStyle:t,lineWidth:1,fillStyle:"white",barLine:{lineStyle:CanvasEx.LINESTYLE_DASHED},lollipop:{width:32,height:96,circleHeight:16,radius:12,lineWidth:1.5,fillStyle:n?t:"white",fillCircle:n,strokeStyle:"#E2745B",text:{label:i,strokeStyle:n?"white":t,font:"normal 12px "+c}}};this.stylesCache[r]=o}return this.stylesCache[r]},h.prototype.getTemplate=function(e,t){var i=e+t.color+t.label;return i in this.templatesCache||(this.templatesCache[i]=this.createTemplate(this._generateTemplateStyle(e,t.color,t.label))),this.templatesCache[i]},h.prototype.getStyle=function(e,t){return this._generateTemplateStyle(e,t.color,t.label)},h.prototype.createText=function(e,t){"string"==typeof e.items?t.addTextLine(e.items):Array.isArray(e.items)&&e.items.forEach((function(e){t.addTextLine(e)}))},h.prototype.hasTooltip=function(e){return!!e.tooltip&&e.tooltip.length},e.exports=u},"lNN+":function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("Ocx9").DefaultProperty,o=i("hayr").propertyPages,s=window.t("Triangle Pattern");function a(e,t){this._constructor="LineToolTrianglePattern";var n=t||a.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("Jej9").LineToolTrianglePatternPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,r),a.prototype.pointsCount=function(){return 4},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Triangle Pattern"},a.prototype.getStylesPropertyPage=function(){return o.LineToolTrianglePatternStylesPropertyPage},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("linetooltrianglepattern",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolTrianglePattern=a}, lReN:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolsGroupControllerApi",(function(){return s}));var r=i("s1Gx"),n=i("Eyy1"),o=i("CW80"),s=function(){function e(e,t){this._controller=e,this._model=t}return e.prototype.createGroupFromSelection=function(){return this._controller.createGroupFromSelection().id},e.prototype.removeGroup=function(e){var t=Object(n.ensureDefined)(this._groupById(e));this._controller.removeGroup(t)},e.prototype.groups=function(){return this._controller.groups().map((function(e){return e.id}))},e.prototype.shapesInGroup=function(e){var t=Object(n.ensureDefined)(this._groupById(e));return Object(r.sortSources)(t.lineTools()).map((function(e){return e.id()}))},e.prototype.excludeShapeFromGroup=function(e,t){var i=Object(n.ensureDefined)(this._groupById(e)),r=Object(n.ensureNotNull)(this._model.dataSourceForId(t));Object(n.assert)(Object(o.isLineTool)(r),"Passed shapeId is not a line tool"),this._controller.excludeLineToolFromGroup(i,r)},e.prototype.availableZOrderOperations=function(e){var t=Object(n.ensureDefined)(this._groupById(e));return this._controller.availableZOrderOperations(t)},e.prototype.bringToFront=function(e){var t=Object(n.ensureDefined)(this._groupById(e));this._controller.bringToFront(t)},e.prototype.bringForward=function(e){var t=Object(n.ensureDefined)(this._groupById(e));this._controller.bringForward(t)},e.prototype.sendBackward=function(e){var t=Object(n.ensureDefined)(this._groupById(e));this._controller.sendBackward(t)},e.prototype.sendToBack=function(e){var t=Object(n.ensureDefined)(this._groupById(e));this._controller.sendToBack(t)},e.prototype.insertAfter=function(e,t){var i=Object(n.ensureDefined)(this._groupById(e)),r=Object(n.ensureNotNull)(this._groupById(t)||this._model.dataSourceForId(t));this._controller.insertAfter(i,r)},e.prototype.insertBefore=function(e,t){var i=Object(n.ensureDefined)(this._groupById(e)),r=Object(n.ensureNotNull)(this._groupById(t)||this._model.dataSourceForId(t));this._controller.insertBefore(i,r)},e.prototype.groupVisibility=function(e){return Object(n.ensureDefined)(this._groupById(e)).visibility()},e.prototype.setGroupVisibility=function(e,t){var i=Object(n.ensureDefined)(this._groupById(e));this._controller.setGroupVisibility(i,t)},e.prototype.groupLock=function(e){return Object(n.ensureDefined)(this._groupById(e)).locked()},e.prototype.setGroupLock=function(e,t){var i=Object(n.ensureDefined)(this._groupById(e));this._controller.setGroupLock(i,t)},e.prototype.getGroupName=function(e){return Object(n.ensureDefined)(this._groupById(e)).name()},e.prototype.setGroupName=function(e,t){var i=Object(n.ensureDefined)(this._groupById(e));this._controller.setGroupName(i,t)},e.prototype.canBeGroupped=function(e){var t=this,i=e.map((function(e){return Object(n.ensureNotNull)(t._model.dataSourceForId(e))}));return!i.some((function(e){return!Object(o.isLineTool)(e)}))&&this._controller.canBeGroupped(i)},e.prototype._groupById=function(e){return this._controller.groups().find((function(t){return t.id===e}))},e}()},lTLF:function(e,t,i){ "use strict";i.r(t);var r=i("Hr11"),n=function(){function e(e,t){if(this._base=e,this._integralDividers=t,Object(r.isBaseDecimal)(this._base))this._fractionalDividers=[2,2.5,2];else{this._fractionalDividers=[];for(var i=this._base;1!==i;){if(i%2==0)this._fractionalDividers.push(2),i/=2;else{if(i%5!=0)throw new Error("unexpected base");this._fractionalDividers.push(2),this._fractionalDividers.push(2.5),i/=5}if(this._fractionalDividers.length>100)throw new Error("something wrong with base")}}}return e.prototype.tickSpan=function(e,t,i){for(var n=0===this._base?0:1/this._base,o=Math.pow(10,Math.max(0,Math.ceil(Object(r.log10)(e-t)))),s=0,a=this._integralDividers[0];;){var l=Object(r.greaterOrEqual)(o,n,1e-9)&&o>n+1e-9,c=Object(r.greaterOrEqual)(o,i*a,1e-9),u=Object(r.greaterOrEqual)(o,1,1e-9);if(!(l&&c&&u))break;o/=a,a=this._integralDividers[++s%this._integralDividers.length]}if(o<=n+1e-9&&(o=n),o=Math.max(1,o),this._fractionalDividers.length>0&&Object(r.equal)(o,1,1e-9))for(s=0,a=this._fractionalDividers[0];Object(r.greaterOrEqual)(o,i*a,1e-9)&&o>n+1e-9;)o/=a,a=this._fractionalDividers[++s%this._fractionalDividers.length];return o},e}();i.d(t,"PriceTickMarkBuilder",(function(){return o}));var o=function(){function e(e,t,i,r){this._marks=[],this._priceScale=e,this._base=t,this._coordinateToLogicalFunc=i,this._logicalToCoordinateFunc=r}return e.prototype.base=function(){return this._base},e.prototype.setBase=function(e){if(e<0)throw new Error("base < 0");this._base=e},e.prototype.tickSpan=function(e,t,i){if(void 0===i&&(i=0),ei&&(c=u);var h=a.tickSpan(e,t,o);h>i&&(c=Math.min(c,h));var d=l.tickSpan(e,t,o);return d>i&&(c=Math.min(c,d)),c>0?c:e-t},e.prototype.rebuildTickMarks=function(){var e=this._priceScale;if(this._marks=[],!e.isEmpty()){var t=e.mainSource();if(null!==t){var i=t.firstValue();null===i&&(i=0);var r=e.height(),n=this._coordinateToLogicalFunc(r-1,i),o=this._coordinateToLogicalFunc(0,i),s=Math.max(n,o),a=Math.min(n,o);if(s!==a){var l=this.tickSpan(s,a),c=s%l;c+=c<0?l:0;for(var u=s>=a?1:-1,h=null,d=e.formatter(),p=NaN,f=s-c;f>a;f-=l){f===p&&(l=this.tickSpan(s,a,l)),p=f;var _=this._logicalToCoordinateFunc(f,i);null!==h&&Math.abs(_-h)0;){var s=e._groups[o];if(!s.isDisabled()){if(s.handleHotkey(i,t))return;if(s.modal)return}}}},this._keyUpListener=function(t){var i=Object(r.hashFromEvent)(t);e._pressedKeys.setValue(i)},this._blurEvent=function(){e._pressedKeys.setValue(0)},this._mouseEvent=function(t){var i=Object(r.modifiersFromEvent)(t),n=255&e._pressedKeys.value();e._pressedKeys.setValue(i|n)}}return e.prototype.listen=function(e){e.addEventListener("keydown",this._keyDownListener),e.addEventListener("keyup",this._keyUpListener),e.addEventListener("blur",this._blurEvent),e.addEventListener("mousemove",this._mouseEvent)},e.prototype.unlisten=function(e){e.removeEventListener("keydown",this._keyDownListener), e.removeEventListener("keyup",this._keyUpListener),e.removeEventListener("blur",this._blurEvent),e.removeEventListener("mousemove",this._mouseEvent)},e.prototype.registerGroup=function(e){this._groups.push(e)},e.prototype.unregisterGroup=function(e){for(var t=this._groups.length;t--;)this._groups[t]===e&&this._groups.splice(t,1)},e.prototype.promoteGroup=function(e){for(var t=this._groups.length-1,i=this._groups.length;i--;){if(this._groups[i]===e)return void(i!==t&&(this._groups.splice(i,1),this._groups.splice(t,0,e)));this._groups[i].modal&&(t=i-1)}},e.prototype.pressedKeys=function(){return this._pressedKeys},e}(),l=i("PC8g"),c=function(){function e(e,t){this._group=e,this.hotkey=t.hotkey,this.handler=t.handler,this.desc=t.desc,this.element=t.element||null,t.isDisabled?"function"==typeof t.isDisabled?this.isDisabled=t.isDisabled:this.isDisabled=function(){return!0}:this.isDisabled=function(){return!1}}return e.prototype.destroy=function(){this._group&&(this._group.remove(this),this._group=null)},e}(),u=function(){function e(e,t){this._actions=[],this._manager=e,this.modal=!(!t||!t.modal),t&&(this.desc=t.desc),t&&t.isDisabled?"function"==typeof t.isDisabled?this.isDisabled=t.isDisabled:this.isDisabled=function(){return!0}:this.isDisabled=function(){return!1},this._manager.registerGroup(this)}return e.prototype.add=function(e){var t=new c(this,e);return this._actions.push(t),t},e.prototype.remove=function(e){for(var t=this._actions.length;t-- >0;)this._actions[t]===e&&this._actions.splice(t,1)},e.prototype.handleHotkey=function(e,t){for(var i=this._actions.length;i-- >0;){var n=this._actions[i];if(n.hotkey===e&&((!n.element||t.target&&n.element.contains(t.target))&&!n.isDisabled()))return n.handler(t),t.preventDefault(),Object(l.trackEvent)("Keyboard Shortcuts",Object(r.humanReadableHash)(e)),!0}return!1},e.prototype.promote=function(){this._manager.promoteGroup(this)},e.prototype.destroy=function(){this._actions.length=0,this._manager.unregisterGroup(this)},e}();i.d(t,"pressedKeys",(function(){return d})),i.d(t,"createGroup",(function(){return p})),i.d(t,"registerWindow",(function(){return f})),i.d(t,"unregisterWindow",(function(){return _})),i.d(t,"Modifiers",(function(){return r.Modifiers}));var h=new a,d=h.pressedKeys();function p(e){return new u(h,e)}function f(e){h.listen(e)}function _(e){h.unlisten(e)}f(window)},"m/cY":function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var r=i("tc+8"),n=i.n(r);function o(e){return new n.a(e)}},mE5r:function(e,t,i){"use strict";i.r(t);var r=i("mrSG"),n=i("Eyy1"),o=i("ikwP"),s=i("i1o5"),a=i("aO4+"),l=i("XlJ7"),c=i("EsvI"),u=i("OsWk"),h=i("rL76"),d=i("zDbI"),p=parseInt(h.labelheight),f=parseInt(h.bottommargin);function _(e){return e/11}var m=function(){function e(){this._wrapper=document.createElement("div"),this._element=document.createElement("div"),this._labelElement=document.createElement("div"),this._gearElement=document.createElement("div"),this._currentScale=1,this._info=null,this._mode="auto",this._wrapper.appendChild(this._element), this._wrapper.classList.add(h.wrapper),this._element.classList.add(h.label),this._labelElement.className=h.symbol,this._element.appendChild(this._labelElement),this._gearElement.className=h.gear,this._gearElement.innerHTML=u,this._element.appendChild(this._gearElement)}return e.prototype.getElement=function(){return this._wrapper},e.prototype.setMode=function(e){this._mode!==e&&(this._mode=e)},e.prototype.align=function(e,t){var i=_(t);Math.abs(i-this._currentScale)>.1&&(this._currentScale=i,Math.abs(this._currentScale-1)>.1?this._element.style.transform="scale("+this._currentScale+")":(this._currentScale=1,this._element.style.transform=""))},e.prototype.drawLabelForScreenshot=function(e,t){if(null!==this._info&&"gear"!==this._mode){var i=Object(l.makeFont)(t.fontSize,d.CHART_FONT_FAMILY);e.fillStyle=c.themes[t.theme].getThemedColor("color-price-axis-label-back"),e.globalAlpha=.5,e.beginPath();var r=_(t.fontSize)*p/2,n=Object(a.point)(t.offset+t.width/2,t.height/2);e.arc(n.x,n.y,r,0,2*Math.PI,!0),e.fill(),e.globalAlpha=1,e.fillStyle=c.themes[t.theme].getThemedColor("color-price-axis-label-text"),e.textAlign="center",e.font=i,e.textBaseline="middle",e.fillText(this._info.label,n.x,n.y)}},e.prototype.setAxisNameInfo=function(e){this._info=e,null!==e&&(this._labelElement.textContent=e.label)},e.height=function(e){return(p+f)*e},e}(),y=i("aIyQ"),g=i.n(y),v=i("S8xo"),S=i("5VQP"),b=i("ljE9"),w={enableTooltip:!0,showLabels:!0,enableMenu:!0,enableHighlight:!0},P=function(){function e(e,t,i,n,s){var a=this;this._invalidated=!0,this._size=new o.Size(0,0),this._offset=0,this._axisInfo=null,this._onLabelHovered=new g.a,this._highlighted=!1,this._labelMode="auto",this._fixedLabelMode=null,this._canvasConfiguredHandler=function(){return a.update()},this._isLeft="left"===e,this._rendererOptionsProvider=n.rendererOptionsProvider,this._sourcesTitlesProvider=n.sourcesTitlesProvider,this._contextMenuItemsProvider=n.contextMenuItemsProvider,this._backgroundBasedTheme=n.backgroundBasedTheme,this._getBackgroundColor=n.getBackgroundColor,this._properties=t,this._axisInfo=i,this._labelOptions=Object(r.__assign)(Object(r.__assign)({},w),s),this._properties.lineColor.subscribe(this,this._onPropertyChanged),this._cell=document.createElement("div"),this._cell.classList.add(h["price-axis-stub"]),this._labelOptions.enableTooltip&&this._cell.classList.add("apply-common-tooltip"),this._cell.style.width="25px",this._cell.style.height="100%",this._cell.style.position="absolute",this._cell.style.left="0",this._cell.style.overflow="hidden",this._labelOptions.showLabels?(this._label=new m,this._label.setAxisNameInfo(this._axisInfo),this._cell.appendChild(this._label.getElement()),this._labelOptions.enableTooltip&&Object(b.b)(this._cell,"text",(function(e){return a._tooltipContent()}))):this._label=null,this._mouseEventHandler=new v.MouseEventHandler(this._cell,this,{treatHorzTouchDragAsPageScroll:!0,treatVertTouchDragAsPageScroll:!0}),this._canvasBinding=Object(o.createBoundCanvas)(this._cell,new o.Size(16,16)), this._canvasBinding.subscribeCanvasConfigured(this._canvasConfiguredHandler);var l=this._canvasBinding.canvas;l.style.position="absolute",l.style.left="0",l.style.top="0"}return e.prototype.destroy=function(){this._canvasBinding.unsubscribeCanvasConfigured(this._canvasConfiguredHandler),this._canvasBinding.destroy(),this._properties.lineColor.unsubscribe(this,this._onPropertyChanged),this._mouseEventHandler.destroy(),$(this._cell).remove()},e.prototype.mouseEnterEvent=function(e){null!==this._label&&"symbol"!==this._labelMode&&this._labelOptions.enableHighlight&&this._setHighlighted(!0)},e.prototype.mouseLeaveEvent=function(e){"symbol"!==this._labelMode&&this._setHighlighted(!1)},e.prototype.mouseClickEvent=function(e){var t=this;e.preventDefault(),null===this._fixedLabelMode&&"symbol"!==this._labelMode&&this._labelOptions.enableMenu&&this._labelOptions.showLabels?(this._fixedLabelMode=this._labelMode,this.setLabelMode("gear"),S.ContextMenuManager.createMenu(this._contextMenuItemsProvider(),{statName:"PriceScaleLabelContextMenu"},(function(){t.setLabelMode(Object(n.ensureNotNull)(t._fixedLabelMode)),t._fixedLabelMode=null})).then((function(e){return e.show((function(e,i){var r=t._cell.getBoundingClientRect();return{clientX:t._isLeft?r.left:r.right-e,clientY:r.top-Math.min(i,r.top),overrideHeight:r.topthis._axises.length&&this._axises.lengthu;){var h=Object(n.ensureDefined)(this._stubs.pop());h.onLabelHovered().unsubscribeAll(this),this._cell.removeChild(h.getElement()),h.destroy()}for(var d=function(){ var e=p._labelsOptions.showLabels?Object(C.a)(p._side,p._stubs.length):null,t=p._stubs.length,i=new P(p._side,p._stubProperties,e,p._stubParams(t),p._labelsOptions);i.onLabelHovered().subscribe(p,(function(t){o._labelsOptions.showLabels&&o._labelsOptions.enableHighlight&&o._onLabelHovered.fire(Object(n.ensureNotNull)(e),t)})),p._stubs.push(i),p._cell.appendChild(i.getElement())},p=this;this._stubs.length=t.scrollWidth||t.setAttribute("title",t.textContent||""))}),!0),document.addEventListener("mouseenter",(function(e){var t=e.target;if(t instanceof HTMLElement&&t.matches(".apply-overflow-tooltip")){if(t.matches(".apply-overflow-tooltip--check-children")){for(var i=!1,r=t.children,n=0;n1,"Unable to change pane's height if there is only one pane");var n=i.indexOf(this._pane);Object(r.assert)(-1!==n,"Invalid pane index");var o=new l(t,n,e);this._chartWidget.model().undoHistory().pushUndoCommand(o)},e.prototype.moveTo=function(e){var t=this.paneIndex();t!==e&&(Object(r.assert)(e>=0&&eM.MOVEPOINT_BACKGROUND;TradingView.isMobile.any()&&e.hittest&&e.hittest.result()===M.MOVEPOINT_BACKGROUND&&(n=!0),this._preventSourceChange&&(n=!1),i.selectionMacro((function(i){n?(t.control()||i.selection().isSelected(e.source)||i.clearSelection(),t.control()&&i.selection().isSelected(e.source)?(r=e.source,i.removeSourceFromSelection(e.source)):e.source instanceof w&&i.addSourceToSelection(e.source,e.hittest&&e.hittest.data()),i.selection().sources().length>1&&f("GUI","Multiselect","Click Select")):t.control()||i.clearSelection()}))}return r},z.prototype._tryStartChangingLineTool=function(e,t,i,r){if(null!==this._startTrackPoint)return!1;if(!this._preventSourceChange&&t.hittest&&t.source instanceof w&&t.hittest.result()===M.CHANGEPOINT){var n=this._chartUndoModel(),o=this._state.mainDataSource().firstValue(),s=t.source.priceScale().coordinateToPrice(e.localY,o);return n.selectionMacro((function(e){e.clearSelection(),e.addSourceToSelection(t.source)})),s=n.model().magnet().align(s,r,this._state),this._startChangeLineToolParams={source:t.source,startPoint:{index:r,price:s},screenPoint:{x:e.localX,y:e.localY},data:t.hittest.data().pointIndex,envState:i},!0}return this._startChangeLineToolParams=null,!1},z.prototype._tryHandleEraserMouseDown=function(e,t){if(e.source&&"eraser"===I.tool.value()&&(!(n=e.source)||!n.customization||!n.customization.disableErasing)){var i=this._chartUndoModel();if(e.source instanceof h||e.source instanceof o){var r=e.hittest.eraseMarker();return t.control()&&void 0!==r&&e.source.processErase?e.source.processErase(i,r):i.removeSource(e.source),!0}}var n;return!1},z.prototype._tryStartCloning=function(e,t,i,r){if(i.control()){var o=this._chartUndoModel().selection().sources().filter((function(e){return e.cloneable()}));if(r&&r.cloneable()&&o.push(r),o.length>0)return this._clonningAtMoveLineTools=o,this._startCloningPoint=new n(e.localX,e.localY),!0}return!1},z.prototype.mouseDownEvent=function(e){if(this._longTap=!1,this._contextMenuOpenedOnLastMouseDown=!1,this._exitTrackingModeOnNextTry=null!==this._startTrackPoint,this.hasState()){this._terminateActiveAnimations();var t=this._chart.trackingModePaneWidget();if(null!==t&&t!==this){var i=this._chartModel().crossHairSource().currentPoint();this._chart.exitTrackingMode(),this.startTrackingMode(new n(e.localX,e.localY),new n(i.x,e.localY),new g(e))} document.activeElement!==document.body&&document.activeElement!==document.documentElement?document.activeElement&&document.activeElement.blur?document.activeElement.blur():document.body.focus():document.getSelection?document.getSelection().removeAllRanges():document.selection&&document.selection.clear(),k.emit("mouse_down",{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY}),this._updateCommonTooltip(null);var o=this._chartUndoModel(),s=new g(e);o.mainSeries().clearGotoDateResult(),this.hideInplaceEditor();var a=this._state.defaultPriceScale();if(!a.isEmpty()&&!o.timeScale().isEmpty()){var l=o.crossHairSource();if(!TradingView.supportTouch()||"LineToolBrush"===I.tool.value()){var c=o.lineBeingCreated(),u=null!==c?o.paneForSource(c):null;null!==u&&u!==this._state?this._setCursorPositionOnExternalPane(u,e.localX,e.localY,s):this._setCursorPosition(e.localX,e.localY,s)}var d=this._state.mainDataSource().firstValue(),f=a.coordinateToPrice(e.localY,d),_=this._chartModel().timeScale().coordinateToIndex(e.localX);if(l.startMeasurePoint()&&l.endMeasurePoint()&&l.clearMeasure(),s.shift()&&I.toolIsCursor(I.tool.value())&&o.selection().isEmpty()&&I.tool.setValue("measure"),!(this._tryStartMeasure(e,l,s,f,_)||this._tryFinishMeasure(e,l)||this._tryFinishZoom(e)||this._tryStartZoom(e,f,_,s))){null!==this._startTrackPoint&&(this._initCrossHairPosition=l.currentPoint(),this._startTrackPoint=new n(e.localX,e.localY));var m=this._dataSourceAtPoint(e.localX,e.localY);if(TradingView.supportTouch()&&(this._preventSourceChange=null===m.source||!o.selection().isSelected(m.source)),this._isSelectBarModeEnabled()||this._isScrolling||!p(I.tool.value())&&!o.lineBeingCreated()){if(m.hittest&&m.hittest.result()===M.CUSTOM)(y=m.hittest.data().mouseDownHandler)&&y(e);if(!this._chart.readOnly()){var y;if(m&&m.hittest&&m.hittest.result()===M.CUSTOM_MOVE)if(y=m.hittest.data().pressedMouseMoveHandler)return void(m.isCustom?y(e):o.startCustomMoving(m.source,new n(e.localX,e.localY),y));var v=this._handleSelectionMouseDownAndGetJustDeselectedSource(m,s);if(this._tryHandleEraserMouseDown(m,s))return;var S=m.source&&TradingView.isInherited(m.source.constructor,h)&&m.source.isLocked();if(!(this._lockDrawingsProperty.value()||S)&&m&&!m.isCustom){if(m.source&&m.source.userEditEnabled&&!m.source.userEditEnabled())return;if(this._tryStartChangingLineTool(e,m,s,_))return;if(m.hittest&&this.checkMovepoint(m.hittest.result())){if(this._tryStartCloning(e,m,s,v))return;if(this._tryStartMovingLineTool(e,m,s,_))return}}if(m.source&&m.source instanceof b&&m.source.isDraggable())return void(this._chart.draggingSource=m.source)}m.hittest&&m.hittest.result()===M.REGULAR||(this._processing=!0)}else(!r.enabled("charting_library_base")||_>=0)&&(s.shift()||o.selectionMacro((function(e){e.clearSelection()})),this._mouseDownEventForLineTool(e,s,_,f))}}}},z.prototype.drawRightThere=function(e){if(p(e)){var t=this._chartUndoModel(),i=t.crossHairSource(),r=t.model().magnet().align(i.price,i.index,this._state) ;t.createLineTool(this.state(),{index:i.index,price:r},e)}},z.prototype._mouseDownEventForLineTool=function(e,t,i,r){if(this.hasState()){var o=this._chartUndoModel(),s=!1,a=null,l=e.localX,c=e.localY,u=o.model().crossHairSource(),h=I.tool.value();if(I.hideAllDrawings().setValue(!1),I.lockDrawings().setValue(!1),TradingView.supportTouch()&&p(h)&&"LineToolBrush"!==h&&!o.lineBeingCreated()&&(this._startTouchPoint=new n(l,c),this._initCrossHairPosition=u.currentPoint()),!o.lineBeingCreated()||o.lineBeingCreated()instanceof d){if(!TradingView.supportTouch()||"LineToolBrush"===h){var f={index:i,price:o.model().magnet().align(r,i,this._state)};a=o.createLineTool(this._state,f,h),o.lineBeingCreated()||(s=!0)}}else{var _=o.lineBeingCreated().ownerSource().firstValue();if(TradingView.supportTouch()){if(!this._startTouchPoint){this._startTouchPoint=new n(l,c);var m=o.lineBeingCreated().points(),y=m[m.length-1],g=o.timeScale().indexToCoordinate(y.index),v=(r=y.price,o.lineBeingCreated().priceScale().priceToCoordinate(r,_));return void(this._lastDrawingPoint=new n(g,v))}}else{a=o.lineBeingCreated();var S=o.paneForSource(a);if(S!==this._state){l=this._externalPaneXCoord(S,e.localX),c=this._externalPaneYCoord(S,e.localY),r=a.priceScale().coordinateToPrice(c,_),i=Math.round(o.timeScale().coordinateToIndex(l));s=o.coninueCreatingLine({index:i,price:r},t)}else r=o.model().magnet().align(r,i,this._state),s=o.coninueCreatingLine({index:i,price:r},t)}}a&&o.selectionMacro((function(e){e.addSourceToSelection(a)})),s&&(this._finishTool(a),e.preventDefault())}},z.prototype._equalsCursorCache=function(e,t){return I.toolIsCursor(e.tool)?e.tool===t.tool&&e.theme===t.theme&&e.crosshair===t.crosshair:e.tool===t.tool&&e.theme===t.theme},z.prototype._setCursorClassName=function(e){var t="";e&&(t="pane--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._paneCell.classList.remove(this._currentCursorClassName),t&&this._paneCell.classList.add(t),this._currentCursorClassName=t,this._paneCell.style.cursor)},z.prototype.setCursorForTool=function(e,t,i){var r=I.tool.value();if(t&&t.control()&&e)this._setCursorClassName("pointer");else if(void 0===i){if(I.toolIsCursor(r)){if(this._chart.draggingSource||this._isScrolling||this._chartUndoModel()&&this._chartUndoModel().sourcesBeingMoved().length)return void this._setCursorClassName("grabbing");if(e&&this._options.sourceSelectionEnabled)return void this._setCursorClassName("pointer")}if("eraser"!==r)if("zoom"!==r){var n=I.cursorTool.value();"dot"!==n?"arrow"!==n?this._setCursorClassName(""):this._setCursorClassName("default"):this._setCursorClassName("dot")}else this._setCursorClassName("zoom-in");else this._setCursorClassName("eraser")}else switch(i){case R.VerticalResize:this._setCursorClassName("ns-resize");break;case R.HorizontalResize:this._setCursorClassName("ew-resize");break;case R.Default:this._setCursorClassName("default");break;case R.Pointer:this._setCursorClassName("pointer")}},z.prototype.setDragToAnotherPaneCursor=function(){this._setCursorClassName("grabbing")}, z.prototype._updateCommonTooltip=function(e){var t=this._lastCommonTooltipData,i=null;if(e&&e.hittest){var r=e.hittest.data();r&&(i=r.tooltip||null)}if(null!=t||null!=i){if(null==i||""===i.text)return this._lastCommonTooltipData=null,void B.hide();if(!t||i.text!==t.text||i.rect.x!==t.rect.x||i.rect.y!==t.rect.y||i.rect.w!==t.rect.w||i.rect.h!==t.rect.h){this._lastCommonTooltipData=i;var n=TradingView.clone(i),o=this._paneCell.getBoundingClientRect();n.rect.x+=o.left,n.rect.y+=o.top,B.show(n)}}},z.prototype._processMouseMoveForCustomHandler=function(e,t){var i=e.hittest&&e.hittest.result()===M.CUSTOM;if(i&&(null===this._prevHoveredHittest||this._prevHoveredHittest.renderer!==e.renderer)){var r=e.hittest.data().mouseEnterHandler;r&&r(t),this._prevHoveredHittest=e}if(i){var n=e.hittest.data().mouseMoveHandler;n&&n(t)}if(null!==this._prevHoveredHittest&&this._prevHoveredHittest.renderer!==e.renderer){var o=this._prevHoveredHittest.hittest.data().mouseLeaveHandler;o&&o(t),this._prevHoveredHittest=null}},z.prototype.mouseMoveEvent=function(e){if(this.hasState()){var t=this._dataSourceAtPoint(e.localX,e.localY);this._processMouseMoveForCustomHandler(t,e);var i=this._chartUndoModel();if(i){var r=e.localX,n=e.localY,o=new g(e);if(null===this._firstZoomPoint){var s=!1;if(!(this._chart.readOnly()||this._editDialog&&this._editDialog.isVisible())){var l=I.tool.value(),c=null;if(!this._processing&&(I.toolIsCursor(l)||"eraser"===l||o.control()||!i.lineBeingCreated())){var u=t&&t.source;s=!!u&&-1!==W.indexOf(u.toolname),t.hittest&&t.hittest.result()>M.MOVEPOINT_BACKGROUND?(c=t.source,t.source&&a(t.source)&&("eraser"!==l||t.source.constructor!==TradingView.Series)?i.setHoveredSource(t.source,t.hittest.data()):i.setHoveredSource(null)):i.setHoveredSource(null)}if(this._options.sourceSelectionEnabled)if(this._isSelectBarModeEnabled())this._setCursorClassName("pointer");else{var h=t.hittest&&t.hittest.data()&&t.hittest.data().cursorType;this.setCursorForTool(c,o,null===h?void 0:h)}if(this._updateCommonTooltip(t),null!==t&&null!==t.hittest&&t.hittest.result()===M.CUSTOM_MOVE)switch(h=(t.hittest.data()||{}).cursorType){case R.VerticalResize:this._setCursorClassName("ns-resize")}}if(this._preventCrossHairMove()&&this._clearCursorPosition(),i.crossHairSource().setLinesShouldBeHidden(s),this._chart.readOnly()&&this._options.sourceSelectionEnabled&&(null!==t.source&&a(t.source)?i.setHoveredSource(t.source,t.hittest.data()):i.setHoveredSource(null,null)),i.lineBeingCreated()){var d=i.lineBeingCreated(),p=i.paneForSource(d);if(p!==this._state)return void this._setCursorPositionOnExternalPane(p,r,n,o)}l=I.tool.value();TradingView.supportTouch()||this._setCursorPosition(r,n,o)}else this._processMouseMoveWhileZoom(e,o)}}},z.prototype._startChangeOrMoveLineToolIfNeeded=function(){if(null!==this._startChangeLineToolParams){var e=this._startChangeLineToolParams;this._chartUndoModel().startChangingLinetool(e.source,e.startPoint,e.data,e.envState)}if(null!==this._startMoveLineToolParams){e=this._startMoveLineToolParams ;this._chartUndoModel().startMovingSources(e.source,e.startPoint,e.data,e.envState)}this._startMoveLineToolParams=null,this._startChangeLineToolParams=null},z.prototype.pressedMouseMoveEvent=function(e){if(this.hasState()&&!this._pinching){this._startChangeOrMoveLineToolIfNeeded(),this._touchMove=!0,this._preventSourceChange=!1;var t=new g(e),i=this._chartUndoModel(),o=i.crossHairSource(),s=e.localX,a=e.localY;if(null!==this._firstZoomPoint)return this._processMouseMoveWhileZoom(e),void(this._firstZoomPoint.draggingMode=!0);if(!TradingView.supportTouch()&&"touchmove"!==e.type||!o.startMeasurePoint()){var l=I.tool.value();if(TradingView.supportTouch()&&this._startTouchPoint&&p(l)&&"LineToolBrush"!==l&&!i.lineBeingCreated()&&!this._isSelectBarModeEnabled()){this._chart.justActivated()&&(this._initCrossHairPosition=o.currentPoint());var c=this._initCrossHairPosition,u=new n(s,a).subtract(this._startTouchPoint),h=c.add(u);this._setCursorPosition(h.x,h.y,t)}else if(!TradingView.supportTouch()||!i.lineBeingCreated()||i.lineBeingCreated()instanceof d){if(null!==this._startTrackPoint){this._exitTrackingModeOnNextTry=!1;c=this._initCrossHairPosition,u=new n(s,a).subtract(this._startTrackPoint),h=c.add(u);this._setCursorPosition(h.x,h.y,t)}else this._preventCrossHairMove()||this._setCursorPosition(s,a,t);var f=I.tool.value(),_=this._isSelectBarModeEnabled();if(!p(f)||"LineToolBrush"===l||_||t.control()){if("LineToolBrush"===f&&!_){if((A=this._state.defaultPriceScale()).isEmpty())return;var m=i.lineBeingCreated();if(!m)return;var y=new n(e.localX,e.localY),v=m.ownerSource().firstValue();return y.price=A.coordinateToPrice(e.localY,v),y.index=Math.round(i.timeScale().coordinateToIndex(e.localX)),void((!r.enabled("charting_library_base")||y.index>=0)&&i.coninueCreatingLine(y))}if(this._chart.draggingSource){var S=e.target,b=this._chart.paneByCanvas(S);b&&(b!==this?b.setDragToAnotherPaneCursor():b.setCursorForTool());var w=this._chart.timeAxisByCanvas(S);w&&w.setCursor("grabbing")}if(!i.timeScale().isEmpty()){var P=this._options.handleScroll;if(P.pressedMouseMove&&"touch"!==e.type||(P.horzTouchDrag||P.vertTouchDrag)&&"mouse"!==e.type)if(i.customMoveBeingProcessed())i.processCustomMove(new n(s,a));else{if(i.lineBeingEdited()){var C=Math.round(i.timeScale().coordinateToIndex(s));return(!r.enabled("charting_library_base")||C>=0)&&i.changeLinePoint({x:s,y:a},t),void this.setCursorForTool()}var x=this;if(i.sourcesBeingMoved().length)i.sourcesBeingMoved().forEach((function(o){var l=o.priceScale();if(!l.isEmpty()){var c=(o.ownerSource()||x._state.mainDataSource()).firstValue(),u=i.timeScale().coordinateToIndex(e.localX),h=l.coordinateToPrice(e.localY,c);if(x.setCursorForTool(),r.enabled("charting_library_base"))if(i.sourcesBeingMoved().some((function(e){return!e.onlyYMoving()}))){var d=o.points();if(0!==d.length)if(d.reduce((function(e,t){return t.index8){var L=this._clonningAtMoveLineTools,M=this.cloneLineTools(L,!0).map((function(e){return i.model().dataSourceForId(e)}));i.selectionMacro((function(e){e.clearSelection(),M.forEach((function(t){e.addSourceToSelection(t)}))}));var O=new n(e.localX,e.localY),A=M[0].priceScale(),k=(v=this._state.mainDataSource().firstValue(),{index:i.timeScale().coordinateToIndex(e.localX),price:A.coordinateToPrice(e.localY,v)});i.startMovingSources(M,{logical:k,screen:O},t),this._clonningAtMoveLineTools=null,this._startCloningPoint=null}}else{var E=I.toolIsMeasure(f)||o.startMeasurePoint()&&o.endMeasurePoint();this._chart.readOnly()||!t.control()||p(f)||E?(this._processScroll(e),this._preventScroll()&&!this._preventCrossHairMove()&&null===this._startTrackPoint&&this._setCursorPosition(e.localX,e.localY,new g(e))):this._isSelecting||(o.startSelection(this._state),this._isSelecting=!0)}}}}}else if(this._startTouchPoint){var D=i.lineBeingCreated(),V=i.paneForSource(D);if(V!==this._state)return void this._setCursorPositionOnExternalPane(V,e.localX,e.localY,t);var B=e.localX-this._startTouchPoint.x,R=e.localY-this._startTouchPoint.y,N=this._lastDrawingPoint.x+B,F=this._lastDrawingPoint.y+R;this._setCursorPosition(N,F,t)}}else this._setCursorPosition(s,a,t)}},z.prototype._processMouseUpForCustomHandler=function(e){var t=this._dataSourceAtPoint(e.localX,e.localY);if(t.hittest&&t.hittest.result()===M.CUSTOM){var i=t.hittest.data().mouseUpHandler;i&&i(e)}},z.prototype.mouseUpEvent=function(e){if(this.hasState()){var t=null!==this._startTrackPoint,i=this._wasPinched;this._wasPinched=!1,this._longTap=!1,this._startMoveLineToolParams=null,this._startChangeLineToolParams=null,this._processMouseUpForCustomHandler(e),this._clonningAtMoveLineTools=null;var r=this;delete this._isSelecting;var n=this._chartUndoModel(),o=n.model().crossHairSource();if(o.selection()&&null===this._firstZoomPoint){var s=this._state.lineToolsForArea(o.selection());n.selectionMacro((function(e){s.forEach((function(t){e.addSourceToSelection(t)}))})),o.clearSelection(),f("GUI","Multiselect","Area Select")}k.emit("mouse_up",{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY});var a=this._touchMove;delete this._touchMove;var l=new g(e),c=I.tool.value();if(TradingView.supportTouch()&&!a&&"LineToolBrush"!==c&&p(c)&&!n.lineBeingCreated()){if(this._chart.justActivated())return;if(o.pane!==this._state)return void this._setCursorPosition(e.localX,e.localY,l);var u=o.currentPoint(),h=this._state.defaultPriceScale(),_=this._state.mainDataSource().firstValue(),m=h.coordinateToPrice(u.y,_),y={index:R=Math.round(n.timeScale().coordinateToIndex(u.x)),price:m},v=n.createLineTool(this._state,y,c);return n.selectionMacro((function(e){e.addSourceToSelection(v)})),n.lineBeingCreated()||(this._finishTool(v),e.preventDefault()),void delete this._startTouchPoint} if(!n.lineBeingCreated()||n.lineBeingCreated()instanceof d||!this._startTouchPoint){if(null!==this._firstZoomPoint&&this._firstZoomPoint.draggingMode)this._finishZoom(e);else if(!TradingView.supportTouch()&&"touchend"!==e.type||!this._tryFinishMeasure(e,o)){if(this._processing=!1,n.customMoveBeingProcessed()&&n.endCustomMoving(),n.lineBeingEdited())return n.endChangingLinetool(),void(this._preventCrossHairMove()&&this._clearCursorPosition());if("LineToolBrush"!==c||this._isSelectBarModeEnabled()){if(n.sourcesBeingMoved().length)return n.endMovingSource(),n.sourcesBeingMoved().forEach((function(e){r.setCursorForTool(e)})),void n.invalidate(O.cursor());if(!this._chart.readOnly()){var S=this._dataSourceAtPoint(e.localX,e.localY),b=e.localX>=0&&e.localXM.MOVEPOINT_BACKGROUND||TradingView.isMobile.any())&&n.selectionMacro((function(e){e.clearSelection(),e.addSourceToSelection(S.source)}));delete this._touchMove}else{var B=n.lineBeingCreated();if(null!==B&&F(B),n.finishLineTool(),(h=this._state.defaultPriceScale()).isEmpty())return;if(!B)return;_=B.ownerSource().firstValue(),m=h.coordinateToPrice(e.localY,_);var R=Math.round(n.timeScale().coordinateToIndex(e.localX));n.coninueCreatingLine({index:R,price:m})}}}else{var N=!1;if(delete this._startTouchPoint,!a){var j=(v=n.lineBeingCreated()).points()[v.points().length-1],m=j.price;N=n.coninueCreatingLine({index:j.index,price:m},new g(e)),delete this._lastDrawingPoint}N&&(this._finishTool(v),e.preventDefault())}}},z.prototype.mouseLeaveEvent=function(e){if(this.hasState()){var t=this._chartUndoModel();if(t){if(TradingView.isMobile.any()||this._clearCursorPosition(),t.setHoveredSource(null),null!==this._prevHoveredHittest){var i=this._prevHoveredHittest.hittest.data().mouseLeaveHandler;i&&i(e),this._prevHoveredHittest=null}this._updateCommonTooltip(null),"function"==typeof this.onMouseLeave&&this.onMouseLeave(this)}}},z.prototype.showEditDialogForSource=function(e){if(this._options.propertyPagesEnabled&&(!e.userEditEnabled||e.userEditEnabled()))if(e===this._chartUndoModel().mainSeries())this._chart.showGeneralChartProperties(_.style);else{ var t=this;this._chart.showChartPropertiesForSource(e).then((function(e){t._editDialog=e}))}},z.prototype.processDoubleClickOnSource=function(e){this.showEditDialogForSource(e)},z.prototype.mouseDoubleClickEvent=function(e){if(this.hasState()){var t=!this._chart.readOnly()&&!p(I.tool.value())&&this._dataSourceAtPoint(e.localX,e.localY),i=t&&t.hittest&&t.source;if(i&&t.hittest.result()<=M.MOVEPOINT_BACKGROUND&&!TradingView.isMobile.any()&&(i=null),i&&!a(i)&&(i=null),t.isCustom){if(t.hittest.result()===M.CUSTOM){var r=t.hittest.data().mouseDoubleClickHandler;void 0!==r&&r(e)}}else i?this.processDoubleClickOnSource(i):this._chart.readOnly()||p(I.tool.value())||this._chartUndoModel().lineBeingCreated()||!this._chartUndoModel().selection().isEmpty()||this._chart.toggleMaximizePane(this)}},z.prototype.longTapEvent=function(e){this._longTap=!0,null===this._startTrackPoint&&this._trackingModeShouldBeActive()&&this.startTrackingMode(new n(e.localX,e.localY),new n(e.localX,e.localY),new g(e))},z.prototype.startTrackingMode=function(e,t,i){this._startChangeLineToolParams=null,this._startMoveLineToolParams=null,this._chartUndoModel().selectionMacro((function(e){e.clearSelection()})),this._startTrackPoint=e,this._exitTrackingModeOnNextTry=!1,this._setCursorPosition(t.x,t.y,i),this._initCrossHairPosition=this._chartModel().crossHairSource().currentPoint()},z.prototype.contextMenuEvent=function(e){var t=this._chartUndoModel();if(!t.crossHairSource().startMeasurePoint()||j){if(!this._pinching&&(null===this._firstZoomPoint||j||this.cancelZoom(),!this.hideInplaceEditor())){if(!I.toolIsCursor(I.tool.value())&&!this._isSelectBarModeEnabled()){if(TradingView.isMobile.any())return;return I.resetToCursor(!0),this.setCursorForTool(),void(t.lineBeingCreated()&&t.cancelCreatingLine())}if(this._options.contextMenuEnabled){var i=this._dataSourceAtPoint(e.localX,e.localY),r=i?i.source:null;if(null!==this._startTrackPoint){if(this._preventSourceChange)return;this._clearCursorPosition()}this._contextMenuOpenedOnLastMouseDown=!0,this._contextMenuX=e.localX,this._contextMenuY=e.localY;var n=i&&i.hittest?i.hittest.result():0,o=n>=M.REGULAR||n>=M.MOVEPOINT_BACKGROUND&&TradingView.isMobile.any();if(i.isCustom){if(o&&i.hittest.result()===M.CUSTOM){var s=i.hittest.data().contextMenuHandler;void 0!==s&&s(e)}}else{this._chart.updateActions();var l=!1,c=this;t.selectionMacro((function(t){null!==r&&o?(!t.selection().isSelected(r)&&r instanceof w&&(t.clearSelection(),t.addSourceToSelection(r)),l=r.hasContextMenu()):(c._options.contextMenu.general&&c._contextMenu(e).then((function(t){t.show(e)})),t.clearSelection())})),l&&(a(r)?c.showContextMenuForSelection(e):c.showContextMenuForSources([r],e)),this.paint()}}}}else t.crossHairSource().clearMeasure()},z.prototype._contextMenu=function(e){function t(e){return e instanceof x}var i=this._initActions(e),r=this._customActions();i=i.filter((function(e){return null!==e})),r.remove.forEach((function(e){for(var t=0;t0;o--)t(n[o])&&t(n[o-1])&&n.splice(o,1);return n.length&&t(n[0])&&n.splice(0,1),n.length&&t(n[n.length-1])&&n.splice(n.length-1,1),L.createMenu(n,{statName:"ChartContextMenu"})},z.prototype.createRemoveMenu=function(){var e=this._chart.actions();return new C({label:window.t("Remove"),statName:"Remove",subItems:[e.paneRemoveAllStudies,e.paneRemoveAllDrawingTools,e.paneRemoveAllStudiesDrawingTools]})},z.prototype._initActions=function(e){var t=this,i=this._chart.actions(),n=[];if(r.enabled("datasource_copypaste")){var o=V.get(),s=((o||{}).sources||[]).filter((function(e){return"study"===e.type||"drawing"===e.type}));if(o&&s.length){var a=new C({label:window.t("Paste %s").replace("%s",window.t(o.title||o.type)),shortcutHint:T.humanReadableHash(T.Modifiers.Mod+86),statName:"Paste",onExecute:function(){t._chart.onAppClipboardPaste(t.state())}});n.push(a)}}return n.length&&n.push(new x),n.push(i.chartReset),n.push(new x),n[n.length-1]instanceof x||n.push(new x),window.widgetbar&&(!window.widgetbar._customization||window.widgetbar._customization.watchlist)&&i.addToWatchlist&&n.push(i.addToWatchlist),r.enabled("text_notes")&&n.push(i.addToTextNotes),n[n.length-1]instanceof x||n.push(new x),n.push(this._createLockTimeAxisAction(e)),n.push(new x),r.enabled("charting_library_base")||n.push(i.applyColorTheme),n[n.length-1]instanceof x||n.push(new x),this._chart.applyIndicatorsToAllChartsAvailable()&&(n.push(i.applyStudiesToAllCharts),n.push(new x)),n.push(i.paneRemoveAllDrawingTools),n.push(i.paneRemoveAllStudies),n.push(new x),pro.hasPackage("mtp-mtpredictor")&&this.state().containsMainSeries()&&n.push(S(this._chart,this._state,this._contextMenuX,this._contextMenuY),new x),n.push(i.hideAllMarks),n.push(new x),r.enabled("show_chart_property_page")&&n.push(i.chartProperties),n[n.length-1]instanceof x&&n.pop(),n},z.prototype._customActions=function(){var e={top:[],bottom:[],remove:[]},t=this._chartUndoModel().timeScale(),i=this._state&&this._state.defaultPriceScale();if(!r.enabled("custom_items_in_context_menu"))return e;var n,o=t.isEmpty()?void 0:t.indexToUserTime(t.coordinateToIndex(this._contextMenuX));if(i&&!i.isEmpty()){var s=this._state.mainDataSource().firstValue();n=i.coordinateToPrice(this._contextMenuY,s)}return k.emit("onContextMenu",{unixtime:o?o/1e3:void 0,price:n,callback:function(t){[].concat(t).forEach((function(t){var i;t.text&&(t.text.length>1&&"-"===t.text[0]?e.remove.push(t.text.slice(1)):(i="-"===t.text?new x:new C({label:t.text,onExecute:t.click}),t.position&&"top"===t.position?e.top.push(i):e.bottom.push(i)))}))}}),e},z.prototype._timeAxisMenu=function(){if(this._chartUndoModel().timeScale().isEmpty())return null;var e=this._chart.getTimeScale();return new C({label:window.t("Time Scale"),subItems:e.getContextMenuActions(),statName:"TimeScale"})},z.prototype.toggleLockTimeAxis=function(e,t){if("boolean"!=typeof t&&(t=!I.lockTimeAxis().value()),t){var i=this._chartUndoModel().timeScale(),r=i.coordinateToIndex(e),n=i.points().roughTime(r) ;I.lockTimeAxisTime.setValue(n)}I.lockTimeAxis().setValue(t)},z.prototype._createLockTimeAxisAction=function(e){var t=I.lockTimeAxis().value();return new C({label:window.t("Lock Vertical Line On Time Axis"),statName:"ToggleLockCursorInTime",checkable:!0,checked:t,onExecute:this.toggleLockTimeAxis.bind(this,e.localX,!t)})},z.prototype._createHVLineAction=function(e,t){var i=this;return new C({label:"vertical"===(t="vertical"===t?"vertical":"horizontal")?window.t("Create Vertical Line"):window.t("Create Horizontal Line"),statName:"vertical"===t?"CreateVerticalLine":"CreateHorizontalLine",onExecute:function(){var r=y(i._state),n=r.mainDataSource().firstValue(),o=i._chartUndoModel().timeScale().coordinateToIndex(e.localX),s=r.defaultPriceScale().coordinateToPrice(e.localY,n),a=i._chartUndoModel().createLineTool(r,{index:o,price:s},"vertical"===t?"LineToolVertLine":"LineToolHorzLine");i._finishTool(a)}})},z.prototype.cloneLineTools=function(e,t){return this._chartUndoModel().cloneLineTools(e,t)},z.prototype.setPriceAxisSizes=function(e,t,i){this._priceAxisesContainer(e).setSizes(t,i)},z.prototype.update=function(){this._lhsPriceAxisesContainer.update(),this._rhsPriceAxisesContainer.update(),null!==this._legendWidget&&this._legendWidget.update(),this.updateControls()},z.prototype.updateControls=function(){null!==this._paneControls&&this._paneControls.update()},z.prototype.drawBackground=function(e,t,i){E(e,0,0,Math.ceil(i.pixelRatio*this._size.w)+1,Math.ceil(i.pixelRatio*this._size.h)+1,t)},z.prototype.drawGrid=function(e,t){for(var i=y(this._state),r=this._chartUndoModel().gridSource().paneViews(i),n=i.height(),o=i.width(),s=0;s=0;d--)h[d].createDrawingsCaches();var p=this._state.customSources(N.Foreground),f=this._state.customSources(N.Background);for(d=0;d=0;d--)h[d].clearDrawingCaches()},z.prototype._drawCustomSource=function(e,t,i){for(var r=this.state(),n=r.height(),o=r.width(),s=e.paneViews(r),a=0;aA.Cursor&&this._state&&this.recalculatePriceScale(),this._lhsPriceAxisesContainer.paint(e),this._rhsPriceAxisesContainer.paint(e),e!==A.Cursor){var i=this._canvasBinding.canvas.getContext("2d") ;i.setTransform(1,0,0,1,0,0);var r=this._canvasRenderParams();this.drawBackground(i,this.backgroundColor(),r),this._state&&(this.drawGrid(i,r),this.drawWatermark(i,r),this.drawSources(i,r),this.drawBarsMarks(i,r,t))}if(this._state){var n=this._topCanvasBinding.canvas.getContext("2d");n.setTransform(1,0,0,1,0,0);r=this._topCanvasRenderParams();n.clearRect(0,0,Math.ceil(this._size.w*r.pixelRatio),Math.ceil(this._size.h*r.pixelRatio)),this.drawCrossHair(n,r),this.drawActiveLineTool(n,r)}}},z.prototype._priceAxisesContainer=function(e){return c.isLeft(e)?this._lhsPriceAxisesContainer:this._rhsPriceAxisesContainer},z.prototype.createActionLockScale=function(e){if(!(e instanceof TradingView.Series))return null;var t=u(e.priceScale(),this._chartUndoModel().model().mainSeriesScaleRatio()),i=new C({checkable:e.priceScale().isLockScale(),label:window.t("Lock Scale")+" "+t,statName:"LockScale"});return i._binding=new m(i,e.priceScale().properties().lockScale,this._chartUndoModel(),"Lock Scale",(function(){var t={lockScale:this.value()};this._undoModel.setPriceScaleMode(t,e.priceScale(),this._undoText)})),i},z.prototype._updateCrosshairOnZoom=function(){if(I.lockTimeAxis().value()){var e=this._chartUndoModel().crossHairSource();e.setPosition(e.index,e.price,this.state())}},z.prototype.leftPriceAxisesContainer=function(){return this._lhsPriceAxisesContainer},z.prototype.rightPriceAxisesContainer=function(){return this._rhsPriceAxisesContainer},z.prototype._tryStartMeasure=function(e,t,i,r,n){return!(!I.toolIsMeasure(I.tool.value())||t.startMeasurePoint())&&(this._preventCrossHairMove()||this._setCursorPosition(e.localX,e.localY,i),r=this._chartModel().magnet().align(r,n,this._state),t.startMeasuring({price:r,index:n},this._state),!0)},z.prototype._tryFinishMeasure=function(e,t){if(t.startMeasurePoint()&&!t.endMeasurePoint()){var i=t.price,r=t.index;return i=this._chartModel().magnet().align(i,r,this._state),t.finishMeasure({price:i,index:r}),I.resetToCursor(),this._preventCrossHairMove()&&this._clearCursorPosition(),!0}return!1},z.prototype._tryFinishZoom=function(e){return null!==this._firstZoomPoint&&(this._finishZoom(e),!0)},z.prototype._tryStartZoom=function(e,t,i,r){var n=this._chart.model().model().zoomEnabled();if("zoom"===I.tool.value()&&n){var o=this._chartUndoModel(),s=o.timeScale().indexToCoordinate(i)-.5*o.timeScale().barSpacing();return this._firstZoomPoint={price:t,index:i,x:s,y:e.localY},this._preventCrossHairMove()||this._setCursorPosition(e.localX,e.localY,r),this._chartModel().crossHairSource().startSelection(this._state),!0}return!1},z.prototype.highlightedPriceAxis=function(){return this._highlightedPriceAxis},e.exports.PaneWidget=z}).call(this,i("hY0g"),i("Kxc7"))},mpWx:function(e,t,i){"use strict";function r(e,t){for(var i=Promise.reject(),r=0;r0,this._precision=e}return e.prototype.state=function(){return{precision:this._precision}},e.prototype.format=function(e){ if(!Object(n.isNumber)(e))return s;var t="";return e<0&&(t="-",e=-e),e>=1e100?window.t("N/A"):(!this._fractionalValues||e>=995?e=Math.round(e):this._fractionalValues&&(e=+e.toFixed(this._precision)),e<995?t+this._formatNumber(e):e<999995?t+this._formatNumber(e/1e3)+"K":e<999999995?(e=1e3*Math.round(e/1e3),t+this._formatNumber(e/1e6)+"M"):(e=1e6*Math.round(e/1e6),t+this._formatNumber(e/1e9)+"B"))},e.prototype.parse=function(e){if("---"===e)return{error:"not a number",res:!1,value:NaN};var t={K:1e3,M:1e6,B:1e9},i=e.slice(-1);if(t.hasOwnProperty(i)){var r=this._numericFormatter.parse(e.slice(0,-1));return Object(n.isNumber)(r)?{res:!0,value:r*t[i]}:{error:"not a number",res:!1,value:NaN}}r=this._numericFormatter.parse(e);return Object(n.isNumber)(r)?{res:!0,value:r}:{error:"not a number",res:!1,value:NaN}},e.serialize=function(e){return e.state()},e.deserialize=function(t){return new e(t.precision)},e.prototype._formatNumber=function(e){return this._fractionalValues&&(e=Object(o.fixComputationError)(e)),this._numericFormatter.format(e).replace(/(\.[1-9]*)0+$/,(function(e,t){return t}))},e}()},nW7S:function(e,t,i){"use strict";(function(e){var r=i("aO4+").Point,n=i("Ss5c").LineDataSource,o=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages,a=window.t("Trend Angle");function l(e,t){var r=t||l.createProperties();n.call(this,e,r),this._constructor="LineToolTrendAngle",this._properties.addChild("angle",new l.AngleProperty(this)),i.e("lt-pane-views").then(function(e){var t=i("XHET").TrendAnglePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(l,n),l.prototype.isSynchronizable=function(){return!1},l.AngleProperty=function(t){e.call(this),this._lineSource=t},inherit(l.AngleProperty,e),l.AngleProperty.prototype.value=function(){var e=180*this._lineSource._angle/Math.PI;return Math.round(e)},l.AngleProperty.prototype.setValue=function(e){var t=e*Math.PI/180;this._lineSource._angle=t;var i=this._lineSource.pointToScreenPoint(this._lineSource.points()[0])[0],n=Math.cos(this._lineSource._angle),o=-Math.sin(this._lineSource._angle),s=new r(n,o),a=i.addScaled(s,this._lineSource._distance),l=this._lineSource.screenPointToPoint(a);this._lineSource._points[1]=l,this._lineSource._model.updateSource(this._lineSource),this._lineSource.updateAllViews(),this._lineSource._model.updateSource(this._lineSource)},l.prototype.pointsCount=function(){return 2},l.prototype.translatedType=function(){return a},l.prototype.name=function(){return"Trend Angle"},l.prototype._calculateAngle=function(){var e=this.pointToScreenPoint(this.points()[0])[0],t=this.pointToScreenPoint(this.points()[1])[0],i=t.subtract(e);i.length()>0?(i=i.normalized(),this._angle=Math.acos(i.x),i.y>0&&(this._angle=-this._angle),this._distance=t.subtract(e).length()):delete this._angle,this.properties().hasOwnProperty("angle")&&this.properties().angle.listeners().fire(this.properties().angle)},l.prototype.addPoint=function(e,t){var i=n.prototype.addPoint.call(this,e,t);return i&&this._calculateAngle(),i}, l.prototype.setLastPoint=function(e,t){n.prototype.setLastPoint.call(this,e,t),this.points().length>1&&this._calculateAngle()},l.prototype.axisPoints=function(){if(this.points().length<2)return[];var e=[this.points()[0]],t=this.pointToScreenPoint(this.points()[0])[1],i=Math.cos(this._angle)*this._distance,n=-Math.sin(this._angle)*this._distance,o=t.add(new r(i,n)),s=this.screenPointToPoint(o);return e.push(s),e},l.prototype.setPoint=function(e,t,i){n.prototype.setPoint.call(this,e,t,i),this.points().length>1&&1===e&&this._calculateAngle()},l.prototype.restoreData=function(e){this._angle=e.angle,this._distance=e.distance},l.prototype.state=function(e){var t=n.prototype.state.call(this,e);return t.angle=this._angle,t.distance=this._distance,t},l.prototype.cloneData=function(e){this._angle=e._angle,this._distance=e._distance},l.prototype.canHasAlert=function(){return!0},l.prototype._getAlertPlots=function(){return[this._linePointsToAlertPlot(this._points,null,this.properties().extendLeft.value(),this.properties().extendRight.value())]},l.prototype.getInputsPropertyPage=function(){return s.LineToolTrendAngleInputsPropertyPage},l.prototype.getStylesPropertyPage=function(){return s.LineToolTrendAngleStylesPropertyPage},l.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("o1gc").TrendAngleDefinitionsViewModel}.bind(null,i)).catch(i.oe)},l.createProperties=function(e){var t=new o("linetooltrendangle",e);return l._configureProperties(t),t},l._configureProperties=function(e){n._configureProperties(e)},t.LineToolTrendAngle=l}).call(this,i("tc+8"))},"nd9+":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolGannComplex",(function(){return p}));var r=i("mrSG"),n=i("aO4+"),o=i("Eyy1"),s=i("T6Of"),a=i("Ss5c"),l=i("FaJS"),c=i("hayr"),u=i("LAp3"),h=i("ytGH"),d=window.t("Gann Square"),p=function(e){function t(r,n){var o=e.call(this,r,n||t.createProperties())||this;o.version=2,o._constructor="LineToolGannComplex",o._scaleRatioFormatter=new s.LimitedPrecisionNumericFormatter(7),i.e("lt-pane-views").then(function(e){var t=i("X4Cb").GannComplexPaneView;o._setPaneViews([new t(o,o.model())])}.bind(null,i)).catch(void 0);var a=o.properties();o._adjustScaleRatio(a),a.subscribe(o,o._adjustScaleRatio),a.childs().scaleRatio.subscribe(o,o._correctFirstPoint),o._syncStateExclusions=["scaleRatio"],a.addExclusion("scaleRatio"),o.properties().onRestoreFactoryDefaults().subscribe(o,o._handleRestoringFactoryDefaults),o._onTemplateApplying.subscribe(o,o._handleTemplateApplying),o._onTemplateApplied.subscribe(o,o._correctFirstPoint);for(var l=[],c=o.properties().childs(),u=c.levels.childCount(),d=0;d=this.pointsCount()?setTimeout((function(){return r._migratePoint()})):this._timePoint.length>=this.pointsCount()&&this._pointAdded.subscribe(this,this._migratePoint))},t.prototype.destroy=function(){var e=this.properties();e.unsubscribe(this,this._adjustScaleRatio),e.childs().scaleRatio.unsubscribe(this,this._correctFirstPoint),this.properties().onRestoreFactoryDefaults().unsubscribe(this,this._handleRestoringFactoryDefaults),this._onTemplateApplying.unsubscribe(this,this._handleTemplateApplying),this._onTemplateApplied.unsubscribe(this,this._correctFirstPoint)},t.prototype.pointsCount=function(){return 2},t.prototype.translatedType=function(){return d},t.prototype.name=function(){return"Gann Square"},t.prototype.addPoint=function(t,i,r){this._points.length>1&&this._points.pop();var n=e.prototype.addPoint.call(this,t,i,r),s=this.priceScale();return!Object(o.ensureNotNull)(s).isLog()&&n&&this._correctFirstPoint(),n},t.prototype.setPoint=function(t,i,r,n){e.prototype.setPoint.call(this,t,i,r,n),void 0!==r&&r.shift()?this._correctPoint(t):this._correctScaleRatio()},t.prototype.setLastPoint=function(t,i){var r=this.priceScale();Object(o.ensureNotNull)(r).isLog()||(this._points[1]=t,this._correctPoint(1)),e.prototype.setLastPoint.call(this,t,i)},t.prototype.getStylesPropertyPage=function(){return c.propertyPages.LineToolGannComplexStylesPropertyPage},t.prototype.isReversed=function(){return this.properties().childs().reverse.value()},t.prototype.levelsCount=function(){return this.properties().childs().levels.childCount()},t.prototype.levels=function(){for(var e=[],t=this.properties().childs(),i=t.levels.childCount(),r=0;r0,s=r.index-n.index>0,a=o&&!s||!o&&s?-1:1;0===e&&(a=-a),r.price=n.price+a*t*i,this._pointChanged.fire(e)}this.normalizePoints()}}},t.prototype._correctFirstPoint=function(){this._correctPoint(this.isReversed()?0:1)},t.prototype._handleRestoringFactoryDefaults=function(){this.properties().childs().scaleRatio.setValue(this._getAdjustedScaleRatio())},t.prototype._handleTemplateApplying=function(e){""===e.scaleRatio&&(e.scaleRatio=this._getAdjustedScaleRatio())},t.prototype._migratePoint=function(){if(!(this.points().length0){n=n.normalized();var o=Math.acos(n.x);return n.y>0&&(o=-o),o}return null},t}(a.LineDataSource)},nda6:function(e,t,i){"use strict";i.r(t),i.d(t,"TimeSpanFormatter",(function(){return r}));i("YFKU");var r=function(){function e(){}return e.prototype.format=function(e){var t=e<0;e=Math.abs(e);var i=Math.floor(e/86400);e-=86400*i;var r=Math.floor(e/3600);e-=3600*r;var n=Math.floor(e/60);e-=60*n;var o="";return i&&(o+=i+window.t("d",{context:"dates"})+" "),r&&(o+=r+window.t("h",{context:"dates"})+" "),n&&(o+=n+window.t("m",{context:"dates"})+" "),e&&(o+=e+window.t("s",{context:"dates"})+" "),t&&(o="-"+o),o.trim()},e}()},nqXy:function(e,t,i){"use strict";i.r(t),i.d(t,"MouseWheelHelper",(function(){return r}));var r=function(){function e(){this._totalDeltaX=0,this._totalDeltaY=0,this._prevWheelTime=0}return e.prototype.processWheel=function(e){e.timeStamp-this._prevWheelTime>100&&this._reset(),this._totalDeltaX+=e.deltaX,this._totalDeltaY+=e.deltaY,this._prevWheelTime=e.timeStamp;var t={deltaX:e.deltaX,deltaY:e.deltaY};return 0===this._totalDeltaX||0===this._totalDeltaY||(Math.abs(this._totalDeltaX)>=Math.abs(3*this._totalDeltaY)&&(t.deltaY=0),Math.abs(this._totalDeltaY)>=Math.abs(3*this._totalDeltaX)&&(t.deltaX=0)),t},e.prototype._reset=function(){this._totalDeltaX=0,this._totalDeltaY=0},e}()},oIoN:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("Ocx9").DefaultProperty,o=i("hayr").propertyPages,s=window.t("Disjoint Channel");function a(e,t){this._constructor="LineToolDisjointAngle";var n=t||a.createProperties();r.call(this,e,n),this.version=a.version,i.e("lt-pane-views").then(function(e){var t=i("pBAL").DisjointChannelPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,r),a.version=1,a.prototype.pointsCount=function(){return 3},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Disjoint Channel"},a.prototype.hasEditableCoordinates=function(){return!1},a.prototype.addPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),r.prototype.addPoint.call(this,e)},a.prototype.setLastPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),r.prototype.setLastPoint.call(this,e)},a.prototype.setPoint=function(e,t,i){var n=.5*(this._points[1].price+this._points[2].price);if(i&&i.shift()&&1===e){this._snapPoint45Degree(t,this.points()[0])}if(e<3&&r.prototype.setPoint.call(this,e,t),0!==e&&2!==e)if(1===e){var o=this._points[1].price-n;this._points[2].price=this._points[1].price-2*o}else if(3===e){o=t.price-this._points[2].price;this._points[0].price=this._points[1].price-o,this._points[0].index=t.index}},a.prototype.canHasAlert=function(){return!0},a.prototype._getAlertPlots=function(){var e=this._points[0],t=this._points[1],i=[];e.index<=t.index?(i.push(e), i.push(t)):(i.push(t),i.push(e));var r=this._points[2];r.time=t.time,r.index=t.index;var n,o,s,a,l={price:r.price+(t.price-e.price),time:e.time,index:e.index},c=[];r.index<=l.index?(c.push(r),c.push(l)):(c.push(l),c.push(r)),i[0].price>c[0].price?(n=i,o=c):c[0].price>i[0].price||c[1].price>i[1].price?(n=c,o=i):(n=i,o=c);var u=this.properties().extendLeft.value(),h=this.properties().extendRight.value();return e.index<=t.index?(s=u,a=h):(s=h,a=u),[this._linePointsToAlertPlot(n,"Upper",s,a),this._linePointsToAlertPlot(o,"Lower",s,a)]},a.prototype.getInputsPropertyPage=function(){return null},a.prototype.getStylesPropertyPage=function(){return o.LineToolDisjointChannelStylesPropertyPage},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("vm8R").GeneralTrendFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetooldisjointangle",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolDisjointChannel=a},oNDq:function(e,t,i){"use strict";i.r(t),i.d(t,"createConfirmDialog",(function(){return o}));var r=i("mrSG"),n=(i("YFKU"),{actions:[{key:13,name:"yes",text:window.t("Yes"),type:"success"},{method:"close",name:"no",text:window.t("No"),type:"default"}],actionsWrapTemplate:'
',content:window.t("Are you sure?"),contentWrapTemplate:'

',destroyOnClose:!0,title:window.t("Confirmation"),width:400,dataset:{"dialog-type":"confirm-dialog"}});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)}))}},oWyD:function(e,t,i){},oXaB:function(e,t,i){"use strict";var r;i.r(t),i.d(t,"PriceAxisLastValueMode",(function(){return r})),function(e){e[e.LastPriceAndPercentageValue=0]="LastPriceAndPercentageValue",e[e.LastValueAccordingToScale=1]="LastValueAccordingToScale"}(r||(r={}))},ocLq:function(e,t,i){"use strict";(function(t){var r=i("5B3K").StudyError,n=i("Y7w9"),o=i("ogJP").inherit,s=i("E6p6").SessionStage,a=function(){var e="undefined"!=typeof window?window:t,a=e.PineJsCalendar?e.PineJsCalendar:i("jCNj"),l=i("IiTo"),c=i("IDnv").extrapolateBarsFrontToTime,u={};function h(e,t,i,r,n){var o=n,s=0;if(isNaN(e.get(t-1)))return{index:NaN,value:NaN};for(var a=0;a1&&(this._currentIndex.set(o),this._currentValue.set(s),this._pivotIndex.set(a))}function p(e,t,i){this._deviation=e;var r=i.new_var(u.high(i)),n=i.new_var(u.low(i));r.get(2*t+1),n.get(2*t+1),this._pivotHigh=new d(t,t,d.HIGH,r,i),this._pivotLow=new d(t,t,d.LOW,n,i),this._lastVal=i.new_var(NaN),this._lastIndex=i.new_var(-1),this._lastType=i.new_var(),this._index=u.n(i),this._isNewBar=i.symbol.isNewBar,this._isBarClosed=i.symbol.isBarClosed;var o=this._lastIndex.get(1),s=this._lastVal.get(1),a=this._lastType.get(1);this._index>1&&this.addPivot(o,s,a),this.processPivot(this._pivotHigh),this.processPivot(this._pivotLow)}function f(e){this.symbol=e,this.vars=[],this.vars_index=0,this.ctx=[],this.ctx_index=0}function _(e){this.mindepth=0,this.original=NaN,this.modified=!1,this.symbol=e}function m(e){_.call(this,e),this.hist=new Float64Array(2e3),this.hist_pos=-1}function y(e,t,i,r,n,o,s){this.periodBase=r,this.tickerid=e,this.currencyCode=t,this.period=i,this.index=-1,this.time=NaN,this.open=NaN,this.high=NaN,this.low=NaN,this.close=NaN,this.volume=NaN,this.updatetime=NaN,this.isNewBar=!1,this.isBarClosed=!1,this.session=new l.SessionInfo("Etc/UTC","24x7"),this.other_sessions={},this.script=n,this.ticker=y.parseTicker(e);var a=y.parsePeriod(i);this.resolution=a.resolution,this.interval=a.interval,this.bb_cache={},this.minTick=o,this.periodForInitialRange=s}function g(e,t,i,r,n,o,s,a,l,c,u){this.body=s,this.symbols=[],this.runner=o,this.inputCallback=l,this.out=a,this.nonseriesOut=u,this.ctx=new f(this.add_sym(e,t,i,r,c,n)),this.init()}function v(e){this.symbols=[],this.barsets=[],this.subscription=[],this.host=e,this.isRecalculated=!1,this.start()}function S(e){this.runner=new v(e)}function b(e,t){this.info=e,this.bars=t||[],this.isBarClosed=!0}function w(e,t){this.period=e,this.generateEmptyBars=!!t}function P(){}return u.max_series_default_size=10001,u.n=function(e){return e.symbol.index+1},u.nz=function(e,t){return t=t||0,isFinite(e)?e:t},u.na=function(e){return 0===arguments.length?NaN:isNaN(e)?1:0},u.isZero=function(e){return Math.abs(e)<=1e-10},u.toBool=function(e){return isFinite(e)&&!u.isZero(e)},u.eq=function(e,t){return u.isZero(e-t)},u.neq=function(e,t){return!u.eq(e,t)},u.ge=function(e,t){return u.isZero(e-t)||e>t},u.gt=function(e,t){return!u.isZero(e-t)&&e>t},u.lt=function(e,t){return!u.isZero(e-t)&&e1e-10},u.less=function(e,t){return t-e>1e-10},u.max=Math.max,u.min=Math.min,u.pow=Math.pow,u.abs=Math.abs,u.log=Math.log,u.log10=function(e){return Math.log(e)/Math.LN10},u.sqrt=Math.sqrt,u.sign=function(e){return isNaN(e)?NaN:u.isZero(e)?0:e>0?1:-1},u.exp=Math.exp, u.sin=Math.sin,u.cos=Math.cos,u.tan=Math.tan,u.asin=Math.asin,u.acos=Math.acos,u.atan=Math.atan,u.floor=Math.floor,u.ceil=Math.ceil,u.round=Math.round,u.avg=function(e,t,i,r,n,o){if(2===arguments.length)return(e+t)/2;for(var s=0,a=0;a=0;--o){var s=t[o];if(!(s>=i.startOfBar(0))){i.moveTo(s);var a=t[o+1];r.push(a)}}r.reverse()}return r},u.iff=function(e,t,i){return u.not(e)?i:t},u.rising=function(e,t){for(var i=1;ie.get(0))return 0;return 1},u.falling=function(e,t){for(var i=1;i=0;n--){r+=(t-n)*e.get(n)}return 2*r/(t*(t+1))},u.vwma=function(e,t,i){var r=i.new_var(u.volume(i)),n=i.new_var(e.get(0)*u.volume(i));return u.sma(n,t,i)/u.sma(r,t,i)},u.swma=function(e,t){return(e.get(0)+2*e.get(1)+2*e.get(2)+e.get(3))/6},u.lowestbars=function(e,t,i){return-h(e,t,0,(function(e,t){return u.lt(e,t)}),Number.MAX_VALUE).index},u.lowest=function(e,t,i){return h(e,t,0,(function(e,t){return u.lt(e,t)}),Number.MAX_VALUE).value},u.highestbars=function(e,t,i){return-h(e,t,0,(function(e,t){return u.gt(e,t)}),Number.MIN_VALUE).index},u.highest=function(e,t,i){return h(e,t,0,(function(e,t){return u.gt(e,t)}),Number.MIN_VALUE).value},u.cum=function(e,t){var i=t.new_var(),r=u.nz(i.get(1))+e;return i.set(r),r},u.accdist=function(e){var t=u.high(e),i=u.low(e),r=u.close(e),n=u.volume(e);return u.cum(r===t&&r===i||t===i?0:n*(2*r-i-t)/(t-i),e)},u.correlation=function(e,t,i,r){var n=u.sma(e,i,r),o=u.sma(t,i,r),s=r.new_var(e.get()*t.get());return(u.sma(s,i,r)-n*o)/Math.sqrt(u.variance2(e,n,i)*u.variance2(t,o,i))},u.stoch=function(e,t,i,r,n){var o=u.highest(t,r),s=u.lowest(i,r);return u.fixnan(100*(e.get()-s)/(o-s),n)},u.tsi=function(e,t,i,r){var n=r.new_var(u.change(e)),o=r.new_var(u.abs(u.change(e))),s=r.new_var(u.ema(n,i,r)),a=r.new_var(u.ema(o,i,r));return u.ema(s,t,r)/u.ema(a,t,r)},u.cross=function(e,t,i){if(isNaN(e)||isNaN(t))return!1;var r,n=i.new_var((r=e-t)<0?-1:0===r?0:1);return!isNaN(n.get(1))&&n.get(1)!==n.get()},u.linreg=function(e,t,i){for(var r=0,n=0,o=0,s=0,a=0;athis._currentValue.get():ithis._areaRight},d.prototype.update=function(){if(this._isNewBar&&this.isPivotFound()&&this.reset(),this.processPoint(this._index),this.isRightSideOk(this._index)){if(-1===this._pivotIndex.get()){for(var e=!0,t=0;tthis._deviation&&this.addPivot(e,t,i);else(i===d.HIGH?t>r:t0&&i.set(e),i},f.prototype.new_unlimited_var=function(e){var t=this.vars;t.length<=this.vars_index&&t.push(new m(this.symbol));var i=t[this.vars_index++];return arguments.length>0&&i.set(e),i},f.prototype.new_ctx=function(){return this.ctx.length<=this.ctx_index&&this.ctx.push(new f(this.symbol)),this.ctx[this.ctx_index++]},f.prototype.prepare=function(e){this.ctx_index=0,this.vars_index=0;for(var t=0;te&&(e=i)}return e},f.prototype.stop=function(){this.symbol=null,this.vars=null},_.prototype.valueOf=function(){return this.get(0)},_.prototype.get=function(e){return isNaN(e)&&(e=0),e=e||0,this.hist?e>=this.hist.length?(console.error("not enough depth: "+this),NaN):this._get(e):(this.mindepth=u.max(this.mindepth,e),NaN)},_.prototype._get=function(e){var t=this.hist_pos-e;return t<0&&(t+=this.hist.length),this.hist[t]},_.prototype.set=function(e){this.hist&&(this.hist[this.hist_pos]=e,this.modified=!0)},_.prototype.prepare=function(e){e===this.symbol&&(e.isNewBar?(this.original=this.get(0),!this.modified&&this.hist||this.add_hist()):this.set(this.original),this.modified=!1)},_.prototype.add_hist=function(){if(!this.hist){var e=u.na(this.mindepth)?u.max_series_default_size:u.max(this.mindepth+1,1);e=Math.round(e);for(var t=new Array(e),i=0;i=0){var r=i.split(",");t=y.parsePeriod(r[1]),i=r[0]}var n=!1,o=!1,s=i[i.length-1];-1==="DWM".indexOf(s)&&("S"===s?o=!0:(n=!0,s=""));var a=parseInt(n?i:i.length>1?i.slice(0,i.length-1):1);return{resolution:s,interval:a,pureResolution:[a,s].join(""),isIntraday:n,isSeconds:o,range:t}},y.newBarBuilder=function(e,t,i){var r=y.parsePeriod(e);return l.newBarBuilder(r.interval+r.resolution,t,i)},y.newSession=function(e){return new l.SessionInfo(e.timezone,e.session,e.holidays,e.corrections)},y.prototype.set_symbolinfo=function(e){for(var t in e||console.error("WARN: symbolinfo isn't defined for "+this.tickerid),this.info=e,this.timezone=a.get_timezone(e.timezone),this.session.init(e.timezone,e.session,e.holidays,e.corrections),this.other_sessions)this.other_sessions.hasOwnProperty(t)&&this.other_sessions[t].init(e.timezone,e.session,e.holidays,e.corrections)},y.prototype.get_session=function(e){if(!e)return this.session;var t=this.other_sessions[e];return t||(t=new l.SessionInfo("Etc/UTC","24x7"),this.other_sessions[e]=t),t},y.prototype.isdwm=function(){return""!==this.resolution&&"S"!==this.resolution},y.prototype.enable_dwm_aligning=function(e,t){this.dwm_aligner=y.newBarBuilder(this.period,e,t)},y.prototype.bartime=function(e,t){var i=this.time;if(e){var r=e;t&&(r+=t);var n=this.bb_cache[r];if(!n){var o=this.get_session(t);n=y.newBarBuilder(e,o),this.bb_cache[r]=n}i=n.alignTime(i)}if(!this.isdwm()||isNaN(i))return i;var s=a.utc_to_cal(this.timezone,i);return this.session.spec.correctTradingDay(s),a.cal_to_utc(this.timezone,s)},y.prototype.lastbar=function(e){if(!isNaN(e.time)){var t=e.time;this.dwm_aligner&&(this.dwm_aligner.moveTo(t),t=this.dwm_aligner.startOfBar(0));var i=this.time!==t;i&&this.index>=0&&!this.isBarClosed&&(this.isNewBar=!1,this.isBarClosed=!0,this.script.calc(this)),this.time=t,this.open=e.open,this.high=e.high,this.low=e.low,this.close=e.close,this.volume=e.volume,this.updatetime=e.updatetime,this.isNewBar=i,this.isBarClosed=e.isBarClosed,this.isLastBar=e.isLastBar,this.isNewBar&&this.index++,this.script.calc(this)}},g.prototype.calc=function(e){var t=this.ctx,i=this.body;t.prepare(e);var r=i.main(t,this.inputCallback),n=this;this.out&&r&&(!isNaN(t.symbol.time)||r.nonseries)&&(r.nonseries?("projection"===r.type&&(r.projectionTime=t.symbol.time),this.nonseriesOut(t.symbol,r)):r.bars?r.bars.forEach((function(e){n.out(t.symbol,e)})):this.out(t.symbol,r))},g.prototype.init=function(){var e=this.ctx,t=this.body;t.init&&t.init(e,this.inputCallback),t.main(e,this.inputCallback)},g.prototype.add_sym=function(e,t,i,r,n,o){var s=this.runner.add_sym(e,t,i,r,this,n,o);return this.symbols.push(s),s.isdwm()&&this.symbols.length>1&&s.enable_dwm_aligning(this.symbols[0].session,s.session),s},g.prototype.maxAdditionalDepth=function(){return this.ctx.maxAdditionalDepth()},g.prototype.stop=function(){this.symbols=null,this.ctx.stop(), this.ctx=null},g.prototype.get_sym=function(e){return this.symbols[e]},v.prototype.add_sym=function(e,t,i,r,n,o,s){var a=new y(e,t,i,r,n,o,s);return this.symbols.push(a),a},v.prototype.get_sym=function(e){return this.symbols[e]},v.prototype.out=function(e,t){if(this.nonseriesUpdate){var i=Object.assign({},this.nonseriesUpdate);t.splice(0,0,e.time),i.lastBar=t,this.host.nonseriesOut(e,i)}else this.host.out(e,t)},v.prototype.start=function(){var e=this.host;this._script=new g(e.tickerid,e.currencyCode,e.period,e.periodBase||e.period,e.periodForInitialRange,this,e.body,this.out.bind(this),e.input,e.symbolInfo.minmov/e.symbolInfo.pricescale,e.nonseriesOut);var t=this,i=[],r=this.symbols,n=(e.additionalBarsCount||0)+t._script.maxAdditionalDepth();function o(r,o){var s=v.feed.subscribe(r.tickerid,r.currencyCode,r.period,r.periodBase,r.periodForInitialRange,(function(i){"series"===(i.nonseries?"nonseries":"series")?t.update(o,i):i.lastBar?(t.nonseriesUpdate=i,i.lastBar.isLastBar=!0,t.symbols[0].lastbar(i.lastBar),t.nonseriesUpdate=null):e.nonseriesOut(r,i)}),e.onErrorCallback,e.symbolInfo,e.sessionId,e.rangeExtension,n);i.push(s)}for(var s=0;s=0;i--)for(var r=e[i],n=this.barsets[i],o=n.count(),s=0;s=0;i--){var r=this._chartModel.restoreSource(this._restorePanes[i],this._paneIndexes[i],this._paneStates[i],this._sourceStates[i],this._priceScalePositionIds[i]);t.push(r)}t.some((function(i,r){return i.id()!==e._sourceIds[t.length-r-1]}))&&u.logError("Source was restored improperly - source ids does not match"),this._excludeLineToolsUndoCommands.forEach((function(e){return e.undo()}))},t}(o.UndoCommand)},odCa:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("fgLi").DataSource,o=i("tc+8"),s=i("Ocx9").DefaultProperty,a=i("hayr").propertyPages,l=i("jTis").CalloutConsts,c=window.t("Callout");function u(e,t){this._constructor="LineToolCallout";var n=t||u.createProperties();r.call(this,e,n),this._barOffset=0,this._timeScale=e.timeScale(),i.e("lt-pane-views").then(function(e){var t=i("B4Hi").CalloutPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(u,r),u.prototype.pointsCount=function(){return 2},u.prototype.translatedType=function(){return c},u.prototype.name=function(){return"Callout"},u.prototype.correctPoints=function(e){var t=this._currentMovingPoint.index-this._startMovingPoint.index,i=this._currentMovingPoint.price-this._startMovingPoint.price,r=e[1];r.index+=t,r.price+=i,e[1]=r},u.prototype.addPoint=function(e){var t=r.prototype.addPoint.call(this,e);return t&&this._calculateBarOffset(),t},u.prototype._calculateBarOffset=function(){this.points().length>1&&(this._barOffset=this.points()[1].index-this.points()[0].index)},u.prototype.setLastPoint=function(e){r.prototype.setLastPoint.call(this,e),2===this.points().length&&this._calculateBarOffset()},u.prototype.setPoint=function(e,t){switch(e){case 0:r.prototype.setPoint.call(this,e,t),this._calculateBarOffset();break;case 1:var i=this.properties();if(!i.wordWrapWidth)return;var n=this._points,o=this._dragStartLeftEdgeIndex,s=Math.round((t.index-o)/2);if(isFinite(o)&&isFinite(s)){n[1]={index:o+s,price:n[1].price},this._calculateBarOffset(),this.normalizePoints();var a=this._timeScale.indexToCoordinate(o+2*s)-this._timeScale.indexToCoordinate(o)-l.RoundRadius-l.TextMargins;if(!isFinite(a))return;i.wordWrapWidth.setValue(Math.max(l.MinWidth,a));break}n[1]=t,this._calculateBarOffset(),this.normalizePoints()}},u.prototype.startDragPoint=function(e,t){var i=this.properties();1===e&&i.wordWrap&&i.wordWrap.value()&&(this._dragStartLeftEdgeIndex=2*this.points()[1].index-t.index)},u.prototype.move=function(e,t,i){r.prototype.move.call(this,e,t,i),this._calculateBarOffset()},u.prototype.state=function(e){var t=r.prototype.state.call(this,e);return t.barOffset=this._barOffset,t},u.prototype.restoreData=function(e){e.barOffset?this._barOffset=e.barOffset:this._calculateBarOffset(),this._calculatePoint2()},u.prototype.setPriceScale=function(e){n.prototype.setPriceScale.call(this,e),e&&e.priceRange()&&this._calculatePoint2()},u.prototype.template=function(){var e=r.prototype.template.call(this) ;return e.text=this.properties().childs().text.value(),e},u.prototype._applyTemplateImpl=function(e){r.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text)},u.prototype._calculatePoint2=function(){if(!(this._model.lineBeingEdited()===this||this._model.sourcesBeingMoved().includes(this)||this._points.length<2)){var e=this.points()[0],t=this.points()[1];this._points[1]={price:t.price,index:e.index+this._barOffset}}},u.prototype.getStylesPropertyPage=function(){return a.LineToolCalloutStylesPropertyPage},u.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("xhf0").CalloutDefinitionsViewModel}.bind(null,i)).catch(i.oe)},u.createProperties=function(e){var t=new s("linetoolcallout",e);return u._configureProperties(t),t},u._configureProperties=function(e){r._configureProperties(e),e.hasChild("text")||e.addChild("text",new o(window.t("Text"))),e.addExclusion("text")},t.LineToolCallout=u},oiZD:function(e,t,i){"use strict";i.r(t);var r=i("hY0g"),n=i.n(r);i.d(t,"watchedTheme",(function(){return o})),i.d(t,"setTheme",(function(){return s}));var o=new n.a;function s(e){o.setValue(e)}o.subscribe((function(e){!function(e,t){void 0===t&&(t=window);for(var i="theme-"+e,r=t.document.documentElement.classList,n=0,o=Array.from(r);no){var s=Object(n.extrapolateBarsFrontToTime)(this._barBuilder(),o||1e3*e,1e3*t,2e3,!0);this._extrapolatedData=this._extrapolatedData.concat(s.times),i=this._extrapolatedData.length}if((o=this._extrapolatedData[i-1])<1e3*t)return{success:!1};var a=this._extrapolatedData.indexOf(1e3*t);return-1===a?{success:!1}:{success:!0,result:a}},e.prototype.projectTime=function(e,t){if(!this.isValid())return e;var i=this._extrapolatedData.length,r=i>0?this._extrapolatedData[0]:null,o=null!==r?this._extrapolatedData[i-1]:null;if(1e3*e!==r&&(this._extrapolatedData=[1e3*e],r=null,o=null),null===r||t>=i){var s=Object(n.extrapolateBarsFrontByCount)(this._barBuilder(),o||1e3*e,t-i+1,!0) ;this._extrapolatedData=this._extrapolatedData.concat(s.times),i=this._extrapolatedData.length}return ii.zorder()}));if(0===r.length)throw new Error("Cannot bring forward source that alreadt on back");var n=r[0];if(Object(f.isLineTool)(n)){var o=e.model().lineToolsGroupModel().groupForLineTool(n);if(null!==o){var s=o.lineTools();n=s[s.length-1]}}return n}var E=function(e){function t(t,i,r){return e.call(this,t,r,k(i,r),"Send "+r[0].title()+" backward")||this}return Object(r.__extends)(t,e),t}(T);function D(e,t){return Object(n.ensureNotNull)(e.paneForSource(t.lineTools()[0]))}var V=function(e){function t(t,i){return e.call(this,t,i.lineTools(),O(D(t,i),i.lineTools()),"Send Group "+i.name()+" backward")||this}return Object(r.__extends)(t,e),t}(I),B=function(e){function t(t,i){return e.call(this,t,i.lineTools(),k(D(t,i),i.lineTools()),"Bring Group "+i.name()+" backward")||this}return Object(r.__extends)(t,e),t}(T),R=i("ogJP"),N=function(e){function t(t,i,r){var n=e.call(this,"Rearrange panes")||this;return n._chartModel=t,n._index=i,Object(R.isNumber)(r)?n._dstIndex=r:n._dstIndex="up"===r?i-1:i+1,n}return Object(r.__extends)(t,e),t.prototype.redo=function(){this._checkIndices()&&this._chartModel.movePane(this._index,this._dstIndex)},t.prototype.undo=function(){this._checkIndices()&&this._chartModel.movePane(this._dstIndex,this._index)},t.prototype._checkIndices=function(){var e=this._chartModel.panes().length;return this._index>=0&&this._index=0&&this._dstIndext.zorder()?e:t}),i[0]),o=r,s=t.lineToolsGroupModel().groupForLineTool(r);if(null!==s){var a=s.lineTools();o=a[a.length-1]}this._environment.beginUndoMacro(ne);var l=new Map,c=new Set;i.forEach((function(i){var r=e._groupForLineTool(i);if(null!==r){var o=l.get(r)||[];o.push(i),l.set(r,o);var s=Object(n.ensureNotNull)(t.paneForSource(i));c.add(s)}})),Object(n.assert)(c.size<=1,"All selected sources should be on the same pane"),l.forEach((function(i,r){var n=new y.a(t,r,i);e._environment.pushUndoCommand(n)}));var u=new Q(t,Object(b.sortSources)(i));this._environment.pushUndoCommand(u);var h=new L(t,i,o);this._environment.pushUndoCommand(h), this._environment.endUndoMacro();var d=Object(n.ensureNotNull)(u.createdGroupId());return Object(n.ensureNotNull)(t.lineToolsGroupModel().groupForId(d))},e.prototype.removeGroup=function(e){var t=this._environment.model(),i=e.lineTools();this._environment.beginUndoMacro(oe.format({name:e.name()}));var r=new J(t,e,"");this._environment.pushUndoCommand(r);var o=new m.RemoveSourcesCommand(t,i,"");this._environment.pushUndoCommand(o),i.forEach((function(e){null!==e.getLinkKey()&&Object(re.removeLineTool)({model:t,linkKey:Object(n.ensureNotNull)(e.getLinkKey())})})),this._environment.endUndoMacro()},e.prototype.groups=function(){return this._environment.model().lineToolsGroupModel().groups()},e.prototype.excludeLineToolFromGroup=function(e,t){var i=this._environment.model(),r=new y.a(i,e,[t]);this._environment.pushUndoCommand(r)},e.prototype.addLineToolToGroup=function(e,t){var i=this._environment.model(),r=i.lineToolsGroupModel().groupForLineTool(t);if(r!==e){var n=se.format({lineTool:t.title(),name:e.name()});this._environment.beginUndoMacro(n),null!==r&&this._environment.pushUndoCommand(new y.a(i,r,[t])),this._environment.pushUndoCommand(new ee(i,e,[t])),this._environment.endUndoMacro()}},e.prototype.bringToFront=function(e){var t=this._environment.model(),i=new C(t,e.lineTools());this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.sendToBack=function(e){var t=this._environment.model(),i=new x(t,e.lineTools());this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.bringForward=function(e){var t=this._environment.model(),i=new B(t,e);this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.sendBackward=function(e){var t=this._environment.model(),i=new V(t,e);this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.insertAfter=function(e,t){var i,r=this._environment.model();if(t instanceof Z.a){var n=t.lineTools();i=n[n.length-1]}else i=t;var o=new L(r,e.lineTools(),i);this._environment.pushUndoCommand(o),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.insertBefore=function(e,t){var i,r=this._environment.model();t instanceof Z.a?i=t.lineTools()[0]:i=t;var n=new M(r,e.lineTools(),i);this._environment.pushUndoCommand(n),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.availableZOrderOperations=function(e){var t=this._environment.model(),i=e.lineTools(),r=i[0],o=i[i.length-1],s=Object(n.ensureNotNull)(t.paneForSource(i[0])).allOrderedSourcesWithoutSpecial(),a=s[0],l=s[s.length-1];return{bringForwardEnabled:o!==l,bringToFrontEnabled:o!==l,sendBackwardEnabled:r!==a,sendToBackEnabled:r!==a}},e.prototype.setGroupVisibility=function(e,t){var i=this,r=(t?ae:le).format({group:e.name()}),n=this._environment.model();this._environment.beginUndoMacro(r),e.lineTools().forEach((function(e){var r=e.properties().visible,o=new te.SetPropertyUndoCommand(r,t,"",n) ;i._environment.pushUndoCommand(o)})),this._environment.endUndoMacro()},e.prototype.setGroupLock=function(e,t){var i=this,r=(t?ce:ue).format({group:e.name()}),n=this._environment.model();this._environment.beginUndoMacro(r),e.lineTools().forEach((function(e){var r=e.properties().frozen,o=new te.SetPropertyUndoCommand(r,t,"",n);i._environment.pushUndoCommand(o)})),this._environment.endUndoMacro()},e.prototype.setGroupName=function(e,t){var i=this._environment.model(),r=he.format({group:e.name(),newName:t}),n=new ie(i,e,t,r);this._environment.pushUndoCommand(n)},e.prototype.canBeGroupped=function(e){var t=this._environment.model();return new Set(e.map((function(e){return t.paneForSource(e)}))).size<=1},e.prototype._groupForLineTool=function(e){return this._environment.model().lineToolsGroupModel().groups().find((function(t){return t.containsLineTool(e)}))||null},e}(),pe=i("3ClC"),fe=i("pQ+n"),_e=window.t("Apply study template {template}"),me=function(e){function t(t,i,r){var n=e.call(this,_e.format({template:r}))||this;return n._model=t,n._templateContent=i,n._initialState=t.studyTemplate(!0,!0),n._initialGroupsState=t.lineToolsGroupModel().state(),n}return Object(r.__extends)(t,e),t.prototype.redo=function(){var e=this._merge(this._templateContent).filter(f.isLineTool);this._model.lineToolsGroupModel().removeLineTools(e),this._model.mainSeries().onChartStyleChanged();var t=this._model.mainSeries().properties();Object(z.preparePriceAxisProperties)(t),this._model.recalcVisibleRangeStudy(this._model.dataSources(),!0),this._model.setShouldBeSavedEvenIfHidden(!0)},t.prototype.undo=function(){this._merge(this._initialState),this._model.mainSeries().onChartStyleChanged()},t.prototype._merge=function(e){var t=this._model,i=t.mainSeries();if(i.priceScale().properties().childs().lockScale.setValue(!1),this._initialState.symbol&&e.symbol&&i.properties().symbol.setValue(e.symbol),this._initialState.symbol&&e.interval){var r=Object(z.getChartStyleByResolution)(e.interval,i.properties().style.value());i.setChartStyleWithIntervalIfNeeded(r,e.interval)}for(var n=t.panes(),o=[],s=n.length;s--;)for(var a=(m=n[s]).containsMainSeries(),l=(v=m.dataSources()).length;l--;){var c=v[l];(!a||Object(pe.isStudy)(c)&&c.isRemovedByStudyTemplates())&&o.push(c)}t.resetDeferredStudies();for(var u=Object(fe.a)(t,o),h=0;h1?"Remove drawings group":"Remove "+e[0].title();this.removeSources(e,!1,t)}},t.prototype.removeSources=function(e,t,i,r){var o=this;r||(e=e.filter((function(e){return e.isUserDeletable()})));var s=this._model(),a=s.lineToolsGroupModel();this.beginUndoMacro(i),s.selectionMacro((function(r){var l=new Map;e.forEach((function(e){if(Object(f.isLineTool)(e)){var t=a.groupForLineTool(e);if(null!==t){var i=l.get(t)||[];i.push(e),l.set(t,i)}null!==e.getLinkKey()&&Object(re.removeLineTool)({model:o.model(),linkKey:Object(n.ensureNotNull)(e.getLinkKey())})}})),l.forEach((function(e,t){var i=new y.a(s,t,e);o._pushUndoCommand(i)}));var c=new m.RemoveSourcesCommand(s,e,i),u=c.removedIds();o._pushUndoCommand(c),!t&&u.length>0&&(1===u.length?o.emitEvent("removeSource",[u[0]]):o.emitEvent("removeSources",[u]))})),this.endUndoMacro()},t.prototype.mergeSourceUp=function(e){var t=new S.c(this._model(),e,"Merge up");this._mergeUnmergeSource(e,t)},t.prototype.mergeSourceDown=function(e){var t=new S.a(this._model(),e,"Merge down");this._mergeUnmergeSource(e,t)},t.prototype.mergeToPane=function(e,t){var i=this._model().panes().indexOf(t),r=new S.b(this._model(),e,i,"Merge to pane");this._mergeUnmergeSource(e,r)}, t.prototype.unmergeSourceUp=function(e){var t=new v.c(this._model(),e,"Unmerge up");this._mergeUnmergeSource(e,t)},t.prototype.unmergeSourceDown=function(e){var t=new v.a(this._model(),e,"Unmerge down");this._mergeUnmergeSource(e,t)},t.prototype.unmergeToNewBottomPane=function(e){var t=new v.b(this._model(),e,"Unmerge to new bottom pane");this._mergeUnmergeSource(e,t)},t.prototype.availableZOrderOperations=function(e){var t=this._model().lineToolsGroupModel(),i=e.filter(f.isLineTool),r=i.map((function(e){return t.groupForLineTool(e)}));Object(n.assert)(new Set(r).size<=1,"Cannot move line tools from different group");for(var o=0===r.length?null:r[0],s={bringForwardEnabled:!1,bringToFrontEnabled:!1,sendBackwardEnabled:!1,sendToBackEnabled:!1},a=new Set(i),l=function(e){if(Object(f.isLineTool)(e)&&null!==o){var t=Object(b.sortSources)(o.lineTools().filter((function(t){return!a.has(t)||t===e})));return s=Ee(s,{bringForwardEnabled:e!==t[t.length-1],bringToFrontEnabled:e!==t[t.length-1],sendBackwardEnabled:e!==t[0],sendToBackEnabled:e!==t[0]}),"continue"}var i=Object(n.ensureNotNull)(c._model().paneForSource(e)).allOrderedSourcesWithoutSpecial();if(0===i.length)return"continue";var r=e.zorder(),l=i[0].zorder(),u=i[i.length-1].zorder();s=Ee(s,{bringForwardEnabled:r!==u,bringToFrontEnabled:r!==u,sendBackwardEnabled:r!==l,sendToBackEnabled:r!==l})},c=this,u=0,h=Object(b.sortSources)(e);u20&&(this._pushUndoCommand(new F.a(this.model(),this._initialTimeScrollState,"Scroll Time")),this._initialTimeScrollPos=null,this._initialTimeScrollState=null,t=!0),this.model().scrollTimeTo(e),t},t.prototype.endScrollTime=function(){this.model().endScrollTime(),this._initialTimeScrollPos=null,this._initialTimeScrollState=null},t.prototype.startScaleTime=function(e){var t=this.timeScale(),i={rightOffset:t.rightOffset(),barSpacing:t.barSpacing()};this._pushUndoCommand(new F.a(this.model(),i,"Scale Time")),this.model().startScaleTime(e)},t.prototype.scaleTimeTo=function(e){this.model().scaleTimeTo(e)},t.prototype.endScaleTime=function(){this.model().endScaleTime()},t.prototype.resetTimeScale=function(){var e=this.timeScale(),t={rightOffset:e.rightOffset(),barSpacing:e.barSpacing()};this._pushUndoCommand(new F.a(this.model(),t,"Reset Time Scale")),this.model().resetTimeScale()},t.prototype.rearrangePanes=function(e,t){var i=new N(this._model(),e,t);this._pushUndoCommand(i)},t.prototype.movePane=function(e,t){var i=new N(this._model(),e,t);this._pushUndoCommand(i)},t.prototype.pasteLineTool=function(e,t){var i=new be(this.model(),t,e);this._pushUndoCommand(i) ;var r=i.source();return i.needCopyToOtherCharts()&&this.copyToOtherCharts([r]),r},t.prototype.setPriceScaleCurrency=function(e,t){var i=new we.a(e,t,this.chartWidget(),"Change currency");this._pushUndoCommand(i)},t.prototype.setMainSeriesSymbol=function(e){if(this.mainSeries().symbol()!==e){var t=!1;if(this._model().currencyLabelEnabled()&&null!==this.mainSeries().currency()){var i=this._model().availableCurrenciesSet(),r=this.mainSeries().priceScale().currency(i);t=null===r||!r.readOnly&&(null===r.selectedCurrency||r.allCurrenciesAreOriginal||1===r.symbolSourceCount)}this._pushUndoCommand(new Ce(e,this.chartWidget(),t))}},t.prototype.copyToOtherCharts=function(e){var t=this,i=this.mainSeries(),o=i.syncModel(),s=this.timeScale();if(o)for(var a=0,l=e;a0&&(u[0].x===u[1].x?Object(c.drawVerticalLine)(e,Math.round(u[0].x*r),u[0].y*r,u[1].y*r):u[0].y===u[1].y?Object(c.drawHorizontalLine)(e,Math.round(u[0].y*r),u[0].x*r,u[1].x*r):Object(o.drawLine)(e,u[0].x*r,u[0].y*r,u[1].x*r,u[1].y*r)),i.overlayLineEndings&&this._drawEnds(e,l,i.linewidth,r)}},e.prototype.hitTest=function(e,t){var i=this._data;if(null===i)return null;if("points"in i&&i.points.length<2)return null;if("floatPoints"in i&&i.floatPoints.length<2)return null;var r=u.CheckMobile.any()?24:3,n="floatPoints"in i?i.floatPoints:i.points,o=n[0],s=n[1],l=this._extendAndClipLineSegment(o,s,t);if(null!==l&&Object(a.distanceToSegment)(l[0],l[1],e).distance<=r)return this._hittest;return null}, e.prototype._extendAndClipLineSegment=function(e,t,i){var r=Object(s.ensureNotNull)(this._data);return Object(l.extendAndClipLineSegment)(e,t,i.cssWidth,i.cssHeight,r.extendleft,r.extendright)},e.prototype._drawEnds=function(e,t,i,n){var o=t[0],a=t[1],l=Object(s.ensureNotNull)(this._data);switch(l.leftend){case r.LineEnd.Arrow:d(a,o,e,i,n);break;case r.LineEnd.Circle:h(o,e,i,Object(s.ensureDefined)(l.endstyle),n)}switch(l.rightend){case r.LineEnd.Arrow:d(o,a,e,i,n);break;case r.LineEnd.Circle:h(a,e,i,Object(s.ensureDefined)(l.endstyle),n)}},e}()},pKDv:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("Ocx9").DefaultProperty,o=i("hayr").propertyPages,s=window.t("ABCD Pattern");function a(e,t){this._constructor="LineToolABCD";var n=t||a.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("bFMU").ABCDPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,r),a.prototype.pointsCount=function(){return 4},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"ABCD Pattern"},a.prototype.getStylesPropertyPage=function(){return o.LineToolABCDPatternStylesPropertyPage},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("y4pE").AbcdPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetoolabcd",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolABCD=a},pPtI:function(e,t,i){"use strict";i.r(t),i.d(t,"normalizeIntervalString",(function(){return m})),i.d(t,"isAvailable",(function(){return y})),i.d(t,"setLastUsedResolution",(function(){return g})),i.d(t,"getRangeResolution",(function(){return v})),i.d(t,"getTimeBasedResolution",(function(){return S})),i.d(t,"getDefaultResolution",(function(){return b})),i.d(t,"getResolutionByChartStyle",(function(){return w})),i.d(t,"getServerInterval",(function(){return P})),i.d(t,"isResolutionMultiplierValid",(function(){return C})),i.d(t,"getMaxResolutionValue",(function(){return T})),i.d(t,"getResolutionsFromSettings",(function(){return L})),i.d(t,"convertResolutionsFromSettings",(function(){return I})),i.d(t,"mergeResolutions",(function(){return M})),i.d(t,"sortResolutions",(function(){return O})),i.d(t,"getCustomResolutions",(function(){return E})),i.d(t,"getTranslatedResolution",(function(){return D})),i.d(t,"getTranslatedResolutionModel",(function(){return V}));i("bSeV"),i("YFKU");var r,n,o,s=i("LxhU"),a=i("n5al"),l=i("Vdly"),c=i("PT1i"),u=i("IVMC"),h=i.n(u),d=i("ogJP"),p=((r={})[s.ResolutionKind.Seconds]=60,r[s.ResolutionKind.Minutes]=1440,r[s.SpecialResolutionKind.Hours]=24,r[s.ResolutionKind.Days]=365,r[s.ResolutionKind.Weeks]=52,r[s.ResolutionKind.Months]=12,r[s.ResolutionKind.Range]=1e3,r[s.ResolutionKind.Invalid]=NaN,r),f=((n={})[s.ResolutionKind.Seconds]=1,n[s.ResolutionKind.Minutes]=2,n[s.SpecialResolutionKind.Hours]=3,n[s.ResolutionKind.Days]=4, n[s.ResolutionKind.Weeks]=5,n[s.ResolutionKind.Months]=6,n[s.ResolutionKind.Range]=7,n[s.ResolutionKind.Invalid]=8,n),_=((o={})[s.ResolutionKind.Invalid]="",o[s.ResolutionKind.Seconds]=window.t("s",{context:"interval_short"}),o[s.ResolutionKind.Minutes]=window.t("m",{context:"interval_short"}),o[s.SpecialResolutionKind.Hours]=window.t("h",{context:"interval_short"}),o[s.ResolutionKind.Days]=window.t("D",{context:"interval_short"}),o[s.ResolutionKind.Weeks]=window.t("W",{context:"interval_short"}),o[s.ResolutionKind.Months]=window.t("M",{context:"interval_short"}),o[s.ResolutionKind.Range]=window.t("R",{context:"interval_short"}),o);function m(e){return s.Interval.parse(e).value()}function y(e){if(s.Interval.isRange(e))return!0;var t=m(e),i=c.linking.supportedResolutions.value(),r=!1;void 0!==i?r=-1!==i.map(m).indexOf(t):r=!0;return(c.linking.intraday.value()||s.Interval.isDWM(e))&&r}function g(e){s.Interval.isValid(e)&&(s.Interval.isRange(e)?l.setValue("chart.lastUsedRangeResolution",e):l.setValue("chart.lastUsedTimeBasedResolution",e))}function v(e){var t=l.getValue("chart.lastUsedRangeResolution");if(void 0!==t&&s.Interval.isRange(t))return t;for(var i="100R",r=0,n=e;r0},ue.prototype.onTagsChanged=function(){return this._tagsChanged},ue.prototype.onSymbolIntervalChanged=function(){return this._symbolIntervalChanged},ue.prototype.onIntervalChanged=function(){return this._intervalChanged},ue.prototype.onStatusChanged=function(){return this._onStatusChanged},ue.prototype.onStyleChanged=function(){return this._onStyleChanged},ue.prototype.onRestarted=function(){return this._onRestarted},ue.prototype.onBoxSizeChanged=function(){return this._boxSizeChanged},ue.prototype.status=function(){return this._status},ue.prototype.isDWM=function(){if(null!==this._isDWMCached)return this._isDWMCached;var e=G.parse(this._properties.interval.value());if(e.isDWM())this._isDWMCached=!0;else{var t=e.isSeconds()?e.multiplier():60*e.multiplier();this._isDWMCached=!(t<216e3)}return this._isDWMCached},ue.prototype.lastPriceLabelFixedCoordinate=function(){return this._priceAxisViews[0]._fixedCoordinate},ue.prototype.createPaneView=function(){this._paneView=null,this._projectionBarsPaneView=null,this._waterlineView=null,this._priceLineView=this.hasClosePrice()?new X(this):null;var e=this._properties.style.value();switch(e){case ue.STYLE_BARS:this._paneView=new y(this,this.m_model);break;case ue.STYLE_CANDLES:this._paneView=new m(this,this.m_model);break;case ue.STYLE_LINE:this._paneView=new f(this,this.m_model);break;case ue.STYLE_AREA:this._paneView=new p(this,this.m_model);break;case ue.STYLE_HEIKEN_ASHI:this._paneView=new g(this,this.m_model);break;case ue.STYLE_HOLLOW_CANDLES:this._paneView=new _(this,this.m_model);break;case ue.STYLE_BASELINE:this._paneView=new v(this,this.m_model),this._waterlineView=new b(this);break;case ue.STYLE_HILO:this._paneView=new S(this,this.m_model);break;default:throw Error("Unknown chart style assigned: "+e)}},ue.prototype._clearStylePlot=function(e,t){if(0!==e.size()){var i=t||o(e.firstIndex()),r=o(e.lastIndex())+1;e.range(i,r).each((function(e,t){t[TradingView.STYLE_PLOT]=null}))}},ue.prototype.invalidateBarStylesCache=function(e){F.logDebug("Invalidate style cache starting from "+e),this._clearStylePlot(this.m_data.m_bars,e),this._clearStylePlot(this.m_data.m_nsBars)}, ue.prototype.invalidateBarColorerCache=function(){delete this._barColorerCache,this.invalidateBarStylesCache()},ue.prototype.barColorer=function(){if(this._barColorerCache)return this._barColorerCache;for(var e=null,t=this.m_model.dataSources().length-1;t>=0;t--){var i=this.m_model.dataSources()[t];if(i.metaInfo&&TradingView.isInherited(i.constructor,TradingView.Study)&&i.hasBarColorer()&&i.properties().visible.value()){var r=i.barColorer();null===e?e=r:e.pushBackBarColorer(r)}}return null===e?e=new x(this):e.pushBackBarColorer(new x(this)),this._barColorerCache=e,this._barColorerCache},ue.prototype.properties=function(){return this._properties},ue.prototype._barsState=function(e){var t=e.state();return t.data.forEach((function(e){e.value.splice(7,1)})),t},ue.prototype.state=function(e){var t={type:this===this.m_model.mainSeries()?"MainSeries":TradingView.className(this.constructor),id:this.id(),state:this.properties().state(),zorder:this.zorder(),haStyle:this._haStyle,renkoStyle:this._renkoStyle,pbStyle:this._pbStyle,kagiStyle:this._kagiStyle,pnfStyle:this._pnfStyle,rangeStyle:this._rangeStyle};return this._symbolInfo&&this._symbolInfo.ticker&&(t.state.symbol=this._symbolInfo.ticker),e&&(t.bars=this._barsState(this.m_data.m_bars),t.nsBars=this._barsState(this.m_data.m_nsBars),t.symbolInfo=this._symbolInfo,t.rtPrice=this.data().lastProjectionPrice),t.boxSize=this.data().boxSize,t.reversalAmount=this.data().reversalAmount,t.currencyId=this.properties().currencyId.value(),t},ue.prototype.restoreState=function(e,t){t&&this._setStatus(ue.STATUS_SNAPSHOT),this._properties.mergeAndFire(e.state),e.currencyId&&this.properties().currencyId.setValue(e.currencyId),this._prevChartStyle=this.properties().style.value(),this.createPaneView(),t&&this.restoreData(e.bars,e.nsBars,e.symbolInfo,e.rtPrice,e.boxSize,e.reversalAmount)},ue.prototype.hasStateForAlert=function(){return!1},ue.prototype.stateForAlert=function(){throw new Error("Not implemented")},ue.prototype.idForAlert=function(){return s.prototype.idForAlert.call(this)},ue.prototype.restoreData=function(e,t,i,r,n,o){this._status=ue.STATUS_SNAPSHOT,this.m_data.m_bars.restoreState(e),this.m_data.m_nsBars.restoreState(t),this.updateSymbolInfo(i,!1),this.m_data.lastProjectionPrice=r,this.m_data.boxSize=n,n||(this.properties().style.value()===ue.STYLE_PNF?this.m_data.boxSize=this.properties().pnfStyle.inputs.boxSize.value():this.properties().style.value()===ue.STYLE_RENKO&&(this.m_data.boxSize=this.properties().renkoStyle.inputs.boxSize.value())),this.m_data.reversalAmount=o,o||this.properties().style.value()===ue.STYLE_KAGI&&(this.m_data.reversalAmount=this.properties().kagiStyle.inputs.reversalAmount.value()),this._loading=!1},ue.prototype.setProperties=function(e){e.timeframe||e.merge({timeframe:""}),e.shortName||e.merge({shortName:""}),e.currencyId||e.addChild("currencyId",new r(null)),this._properties=e,this._properties.symbol.listeners().subscribe(this,ue.prototype.changeSymbol),this._properties.interval.listeners().subscribe(this,ue.prototype.changeInterval), this._properties.currencyId.listeners().subscribe(this,ue.prototype.changeCurrency),this._properties.timeframe.listeners().subscribe(this,ue.prototype.changeTimeFrame),this._properties.listeners().subscribe(this,ue.prototype.changeProperties)},ue.prototype.changeSymbol=function(){this.setSymbolIntervalCurrencyDelayed(),this.m_model.checkLineToolSelection()},ue.prototype.changeInterval=function(){this.setSymbolIntervalCurrencyDelayed()},ue.prototype.changeCurrency=function(){this.setSymbolIntervalCurrencyDelayed(),this.m_model.checkLineToolSelection(),this._currencyChanged.fire()},ue.prototype.changeTimeFrame=function(){B("GUI","Change timeframe")},ue.prototype.title=function(){return this.properties().symbol.value()+", "+R(this.properties().interval.value())},ue.prototype.changeProperties=function(e){e!==this._properties.symbol&&e!==this._properties.interval&&e!==this._properties.timeframe&&(this._tagsChanged.fire(),this.createPaneView(),this.updateAllViews(),this.m_model.updateSource(this),ie.emit("series_properties_changed",this._id))},ue.prototype._makeNextSymbolId=function(){return"symbol_"+this._nextSymbolId++},ue.prototype._makeNextSeriesId=function(){return"s"+this._nextSeriesId++},ue.prototype.onData=function(e){var t=this;switch(e.method){case"symbol_resolved":if(e.params[0]!==this._symbolId){F.logNormal("command for old symbol. Expected:"+this._symbolId+", actual"+e.params[0]);break}this.updateSymbolInfo(e.params[1],!1),this.m_model.updateSource(this),this._dataEvents.fireSymbolResolved(this._symbolInfo),this.m_model.realignLineTools(),TradingView.onWidget()||(B("Symbol",e.params[1].listed_exchange,e.params[1].name),B("Symbol Type",e.params[1].type,e.params[1].listed_exchange));var i=this.symbolInfo().minmov/this.symbolInfo().pricescale,r=this.properties();r.style.value()===ue.STYLE_RENKO&&r.renkoStyle.inputs.boxSize.value()=3&&(this._priceOffset=e[2].price-e[0].price)},a.prototype.setPoint=function(e,t,i){i&&i.shift()&&e<2&&this._snapPoint45Degree(t,this.points()[1-e]),r.prototype.setPoint.call(this,e,t,i),2===e&&this.calculatePriceDiff();var n=this.points()[0];this._points[2].index=n.index,this._points[2].price=n.price+this._priceOffset},a.prototype.pointsCount=function(){return 3},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Parallel Channel"},a.prototype.hasEditableCoordinates=function(){return!1},a.prototype.addPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[0]),r.prototype.addPoint.call(this,e,t)},a.prototype.fixAfterRestorePriceAxis=function(){this.priceScale().isLog()||delete this._priceOffset},a.prototype.cloneData=function(e){this._priceOffset=e._priceOffset},a.prototype.restoreData=function(e){ e.priceOffset&&(this._priceOffset=e.priceOffset)},a.prototype.state=function(e){var t=r.prototype.state.call(this,e);return t.priceOffset=this._priceOffset,t},a.prototype.canHasAlert=function(){return!0},a.prototype._getAlertPlots=function(){var e=[].concat(this._points).splice(0,2);function t(e,t){return e.index<=t.index?[e,t]:[t,e]}var i,r,n,o,s=t((e=e.concat([{price:e[0].price+this._priceOffset,time:e[0].time,index:e[0].index},{price:e[1].price+this._priceOffset,time:e[1].time,index:e[1].index}]))[0],e[1]),a=t(e[2],e[3]);this._priceOffset<0?(r=a,i=s):(r=s,i=a);var l=this.properties().extendLeft.value(),c=this.properties().extendRight.value();return e[0].index<=e[1].index?(n=l,o=c):(n=c,o=l),[this._linePointsToAlertPlot(i,"Upper",n,o),this._linePointsToAlertPlot(r,"Lower",n,o)]},a.prototype.getInputsPropertyPage=function(){return null},a.prototype.getStylesPropertyPage=function(){return o.LineToolParallelChannelStylesPropertyPage},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("VkdP").ParallelChannelDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetoolparallelchannel",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolParallelChannel=a},qckB:function(e,t){e.exports=''},qgcf:function(e,t,i){"use strict";i.r(t),i.d(t,"calculateLabelPosition",(function(){return f})),i.d(t,"wordWrap",(function(){return m})),i.d(t,"TextRenderer",(function(){return M}));var r,n=i("aO4+"),o=i("GEp6"),s=i("Eyy1"),a=i("f6yo"),l=i("Ialn"),c=i("VdBB"),u=i("jFln"),h=i("ogJP"),d=i("ikwP"),p=i("8Uy/");function f(e,t,i,r,o){var s=.5*(t.x+i.x),a=i.y;return t.y>i.y?(a-=e.height/2+r.y,a=Math.max(e.height/2,a)):(a+=e.height/2+r.y,a=Math.min(o-e.height/2,a)),new n.Point(s,a)}function _(){var e=document.createElement("canvas");e.width=0,e.height=0,r=Object(s.ensureNotNull)(e.getContext("2d"))}function m(e,t,i){r||_(),i=Object(h.isString)(i)?parseInt(i):i;var n=(e+="").split(/[^\S\r\n]*(?:\r\n|\r|\n|$)/);if(n[n.length-1]||n.pop(),!Object(h.isNumber)(i)||!isFinite(i)||i<=0)return n;r.font=t;for(var o=[],s=0;s0&&r.measureText(c.slice(0,3*--d-1).join("")).width>i;);if(d>0)o.push(c.slice(0,3*d-1).join("")),c.splice(0,3*d);else{var p=c[0]+(c[1]||"");if(u=1===u?1:~~(i/r.measureText(p).width*p.length), r.measureText(p.substr(0,u)).width<=i)for(;r.measureText(p.substr(0,u+1)).width<=i;)u++;else for(;u>1&&r.measureText(p.substr(0,--u)).width>i;);u<1&&(u=1),o.push(p.substr(0,u)),c[0]=p.substr(u),c[1]=""}if(r.measureText(c.join("")).width<=i){o.push(c.join(""));break}}}return o}function y(e,t,i){if(0===i)return e.clone();var r=(e.x-t.x)*Math.cos(i)-(e.y-t.y)*Math.sin(i)+t.x,o=(e.x-t.x)*Math.sin(i)+(e.y-t.y)*Math.cos(i)+t.y;return new n.Point(r,o)}function g(e,t){return t+2*P(e)+2*b(e)}function v(e,t){return x(e)*t+C(e)*(t-1)+2*w(e)+2*S(e)}function S(e){return void 0!==e.boxPaddingVert?Math.ceil(e.boxPaddingVert*L(e)):void 0!==e.boxPadding?Math.ceil(e.boxPadding*L(e)):~~(x(e)/3)}function b(e){return void 0!==e.boxPaddingHorz?Math.ceil(e.boxPaddingHorz*L(e)):void 0!==e.boxPadding?Math.ceil(e.boxPadding*L(e)):~~(x(e)/3)}function w(e){return Math.ceil((e.backgroundVertInflate||0)*L(e))}function P(e){return Math.ceil((e.backgroundHorzInflate||0)*L(e))}function C(e){return(e.padding||0)*L(e)}function x(e){return Math.ceil(T(e)*L(e))}function T(e){return e.fontsize||e.fontSize||30}function L(e){var t=Math.min(1,Math.max(.2,Math.min(e.scaleX||1,e.scaleY||1)));if(1===t)return t;var i=T(e);return Math.ceil(t*i)/i}function I(e,t,i){var r=t%2?.5:0;return{left:Math.round(e.boxLeft*i)+r,right:Math.round((e.boxLeft+e.boxWidth)*i)+r,top:Math.round(e.boxTop*i)+r,bottom:Math.round((e.boxTop+e.boxHeight)*i)+r}}var M=function(){function e(e,t){this._data=null,this._internalData=null,this._boxSize=null,this._linesInfo=null,this._fontInfo=null,this._hittest=t||new c.HitTestResult(c.HitTestResult.MOVEPOINT),void 0!==e&&this.setData(e)}return e.prototype.setData=function(e){!function(e,t){if(null===e||null===t)return null===e==(null===t);if(void 0===e.points!=(void 0===t.points))return!1;if(void 0!==e.points&&void 0!==t.points){if(e.points.length!==t.points.length)return!1;for(var i=0;ih?(t=new n.Point(l+h/2,c+h/2),i=new n.Point(l+u-h/2,c+h/2),r=h/2):(t=new n.Point(l+u/2,c+u/2),i=new n.Point(l+u/2,c+h-u/2),r=u/2);var p=y(t,d,s),f=y(i,d,s);return Object(o.distanceToSegment)(p,f,e).distance<=r?this._hittest:null},e.prototype.doesIntersectWithBox=function(e){return null!==this._data&&void 0!==this._data.points&&0!==this._data.points.length&&Object(a.pointInBox)(this._data.points[0],e)},e.prototype.measure=function(){if(null===this._data)return{width:0,height:0};var e=this._getBoxSize();return{width:e.boxWidth,height:e.boxHeight}},e.prototype.setPoints=function(e,t){Object(s.ensureNotNull)(this._data).points=e,this._hittest=t||new c.HitTestResult(c.HitTestResult.MOVEPOINT)},e.prototype.fontStyle=function(e){return null===this._data?"":this._getFontInfo().fontStyle},e.prototype.wordWrap=function(e,t,i){return m(e,i||this.fontStyle(),t)},e.prototype.draw=function(e,t){if(null!==this._data&&void 0!==this._data.points&&0!==this._data.points.length){var i=t.pixelRatio,r=this._getInternalData(),n=this._getRotationPoint().scaled(i);e.save(),e.translate(n.x,n.y),e.rotate(this._data.angle||0),e.translate(-n.x,-n.y);var o=this._getFontInfo().fontSize;if(e.textBaseline=r.textBaseLine,e.textAlign=r.textAlign,e.font=this.fontStyle(),this._data.backgroundColor||this._data.borderColor||this._data.highlightBorder&&this._data.wordWrapWidth){var s=Math.round(~~Math.max(o/12,1)*i);if(this._data.backgroundRoundRect){var a=I(r,s,i),l=a.left,c=a.right,h=a.top,f=a.bottom;Object(u.drawRoundRect)(e,l,h,c-l,f-h,this._data.backgroundRoundRect*i),this._data.backgroundColor&&(e.fillStyle=this._data.backgroundColor,e.fill()),this._data.borderColor&&(e.strokeStyle=this._data.borderColor,e.lineWidth=s,e.stroke())}else{if(this._data.backgroundColor){e.fillStyle=this._data.backgroundColor;var _=I(r,s,i),m=(l=_.left,c=_.right,_.top);f=_.bottom;e.fillRect(l,m,c-l,f-m)}if(this._data.borderColor||this._data.highlightBorder){var y=void 0;this._data.borderColor?(e.strokeStyle=this._data.borderColor,e.lineWidth=s,y=I(r,s,i)):(e.strokeStyle=this._data.color,Object(u.setLineStyle)(e,p.LINESTYLE_DASHED),e.lineWidth=Math.max(1,Math.floor(i)),y=I(r,e.lineWidth,i)),e.beginPath(),e.moveTo(y.left,y.top),e.lineTo(y.left,y.bottom),e.lineTo(y.right,y.bottom),e.lineTo(y.right,y.top),e.lineTo(y.left,y.top),e.stroke()}}}e.fillStyle=this._data.color;for(var g=r.textStart,v=r.textTop,S=C(this._data),b=Math.floor(.05*o),w=function(t){Object(d.drawScaled)(e,i,(function(){return e.fillText(t,g,v+b)})),v+=o+S},P=0,x=this._getLinesInfo().lines;Pi&&(t=t.slice(0,i))}this._linesInfo={linesMaxWidth:g(e,this._getLinesMaxWidth(t)),lines:t}}return this._linesInfo},e.prototype._getFontInfo=function(){if(null===this._fontInfo){var e=Object(s.ensureNotNull)(this._data),t=x(e),i=(e.bold?"bold ":"")+(e.italic?"italic ":"")+t+"px "+e.font;this._fontInfo={fontStyle:i,fontSize:t}}return this._fontInfo},e.prototype._getBoxSize=function(){if(null===this._boxSize){var e=this._getLinesInfo(),t=Object(s.ensureNotNull)(this._data);this._boxSize={boxWidth:g(t,e.linesMaxWidth),boxHeight:v(t,e.lines.length)}}return this._boxSize},e.prototype._getRotationPoint=function(){var e,t,i=this._getInternalData(),r=i.boxLeft,o=i.boxTop,a=i.boxWidth,l=i.boxHeight,c=Object(s.ensureNotNull)(this._data),u=c.horzAlign,h=c.vertAlign;switch(u){case"center":e=r+a/2;break;case"left":e=r;break;case"right":e=r+a}switch(h){case"middle":t=o+l/2;break;case"top":t=o;break;case"bottom":t=o+l}return new n.Point(e,t)},e}()},qySK:function(e,t,i){"use strict";i.d(t,"b",(function(){return l})),i.d(t,"a",(function(){return c}));var r=i("Eyy1"),n=i("JmuD"),o=i("SqfW"),s=i("7Fue"),a=i("xWfy");function l(e){if(!Object(n.isObject)(e))throw new Error("Graphics commands should be wrapped in an object");if(Object(n.hasProperty)(e,"create"),Object(n.hasProperty)(e,"erase")){var t=e.erase;Object(r.assert)(Array.isArray(t),"Collection of erase commands should be array");for(var i=0,o=t;ii?i/m:1,f+=g.lineHeight*g.zoom}}var y=Math.max((e-f)/2,0);for(_=0;_=n}},s9sR:function(e,t,i){"use strict";i.r(t),i.d(t,"SetResolutionUndoCommand",(function(){return a}));var r=i("mrSG"),n=i("RDU5"),o=i("LxhU"),s=i("n5al"),a=function(e){function t(t,i,r,n){var o=e.call(this,n)||this;return o._property=t,o._value=i,o._prevValue=t.value(), o._chartWidget=r,o}return Object(r.__extends)(t,e),t.prototype.redo=function(){this._chartWidget.screen.show(),this._property.setValue(this._value),this._handleResolution(this._value)},t.prototype.undo=function(){this._chartWidget.screen.show(),this._property.setValue(this._prevValue),this._handleResolution(this._prevValue)},t.prototype._handleResolution=function(e){var t=this._chartWidget.model().mainSeries().properties(),i=t.style.value(),r=Object(s.isRangeStyle)(i),n=o.Interval.isRange(e);!r&&n?t.style.setValue(11):r&&!n&&t.style.setValue(Object(s.getLastUsedStyle)())},t}(n.UndoCommand)},sEk5:function(e,t,i){"use strict";var r=i("fTGZ").BarsMarksContainer,n=i("BOPY").BarMarkTooltip,o=i("mMWL");function s(e){r.call(this,e);var t=this;o.hideMarksOnBars().subscribe(this,(function(){t._properties.visible.setValue(!o.hideMarksOnBars().value())}))}function a(e){n.call(this)}inherit(s,r),s.prototype._initialize=function(e){this._properties.visible.setValue(!0)},s.prototype.userEditEnabled=function(){return!1},s.prototype._constructor="UserDefinedBarsMarks",s.prototype._plateViewData=function(e){var t={text:e.text};return"object"==typeof e.color&&(t.theme="user_defined_theme",t.overridedTheme={},t.overridedTheme.border=e.color.border,t.overridedTheme.background=e.color.background),t},s.prototype.onClicked=function(e){var t=e.id;this._marks[t].onClicked()},s.prototype.clearMarks=function(){r.prototype.clearMarks.call(this),this.onNeedRepaint.fire()},s.prototype._getData=function(e){var t=this._model.mainSeries().symbolInfo();if(t){var i=this.roundRange(this._rangeDifference(e)),r=this,n=this._model.mainSeries().properties().interval.value();ChartApiInstance.getMarks(t,i.start,i.end,(function(t){t.forEach((function(e){r._marks[e.id]=e}),r),r._loadedRange=r._rangeUnion(e,r._loadedRange),r.onNeedRepaint.fire()}),n)}},s.prototype._createTooltip=function(){return new a},s.prototype.updatePlateData=function(e,t){return t.barWidth=this.barWidth(),t.text=e.text,t.tooltipMargin=-1*Math.max(e.minSize/2,.4*this.barWidth()),t},s.prototype.hasContextMenu=function(){return!1},s.prototype.calcIsActualCurrency=function(){this._isActualCurrency=!0},inherit(a,n),a.prototype._createLayout=function(){this._layout=$('
'),this._layout_text=$('
').appendTo(this._layout)},a.prototype._updatePlate=function(e){this._currentId=e.id,this._layout.css("border-color",e.theme.border),this._layout.css("margin-top",e.tooltipMargin+"px"),this._layout_text.html(e.text),this._layout.append(this._layout_text)},e.exports=s},sJA2:function(e,t,i){"use strict";i.r(t);var r=i("EsvI"),n=i("oiZD");i.d(t,"ThemesApi",(function(){return o}));var o=function(){function e(e){this._opts=e}return e.prototype.isStdTheme=function(){return Promise.resolve(Object(r.isStdTheme)(Object(r.extractThemeFromModel)(this._getActiveChartModel())))},e.prototype.setStdTheme=function(e,t,i){return void 0===t&&(t=!0),Object(r.loadTheme)(e,!0,!1,this._opts.chartWidgetCollection,t,i).then((function(){}))}, e.prototype.setStdThemeForLayout=function(e,t){void 0===t&&(t=!0),Object(n.setTheme)(e),t&&Object(r.syncTheme)()},e.prototype.getCurrentThemeName=function(){return Object(r.getCurrentTheme)().name},e.prototype._getActiveChartModel=function(){return this._getActiveChartWidget().model()},e.prototype._getActiveChartWidget=function(){return this._opts.chartWidgetCollection.activeChartWidget.value()},e}()},t2ex:function(e,t,i){"use strict";var r=i("5rJj"),n=i("xUGI"),o=i("Ss5c").LineDataSource,s=i("hayr").propertyPages,a=i("ytGH").LineToolWidthsProperty,l=window.t("Fib Retracement");function c(e){n.call(this,e)}function u(e,t){this._constructor="LineToolFibRetracement";var r=t||u.createProperties();o.call(this,e,r),this.version=u.version,this._properties._stateVersion=1,e._fibRetracementLabelsCache||(e._fibRetracementLabelsCache=new c(r.fibLevelsBasedOnLogScale)),i.e("lt-pane-views").then(function(e){var t=i("R7Bt").FibRetracementPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);var n=[this._properties.child("trendline").child("linewidth"),this._properties.child("levelsStyle").child("linewidth")];this._widthsProperty=new a(n)}inherit(c,n),c.prototype.levelsCount=function(){return u.LevelsCount},inherit(u,o),u.version=2,u.LevelsCount=24,u.prototype.levelsCount=function(){return u.LevelsCount},u.prototype.stop=function(){o.prototype.stop.call(this),this._model._fibRetracementLabelsCache.removeSource(this.id())},u.prototype.pointsCount=function(){return 2},u.prototype.translatedType=function(){return l},u.prototype.name=function(){return"Fib Retracement"},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.LineToolFibRetracementStylesPropertyPage},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.createProperties=function(e){var t=new r("linetoolfibretracement",e,!1,{range:[1,24],names:["coeff","color","visible"]});return u._configureProperties(t),t},u._configureProperties=function(e){o._configureProperties(e)},u.prototype.fibLevelsBasedOnLogScale=function(){return this.properties().fibLevelsBasedOnLogScale.value()&&this.priceScale().isLog()},t.LineToolFibRetracement=u},tBG4:function(e,t,i){"use strict";i.r(t);var r=i("mrSG"),n=i("nBJD"),o=(i("Eyy1"),i("IzGk"));function s(e){var t="QUANDL"===(e=e||{}).exchange,i={symbolDescription:"",interval:"",exchange:"",chartStyle:"",extended:"",provider:""};e.description&&t?2===e.description.split("/").length?i.symbolDescription=e.description.split("/")[1]:e.description.split("'").filter((function(e){return e.length})).forEach((function(e){var t=[];t=e&&("/"===e[0]||/\d+\/\(?/.test(e))?[e]:e.split("/").filter((function(e){return e.length })),i.symbolDescription+=t[2===t.length?1:0]})):e.description?i.symbolDescription=e.description:i.symbolDescription=e.symbol;if(e.interval&&(i.interval=Object(o.translatedIntervalString)(e.interval)),t&&e.description){var r=/[\w_]+\/[\w_]+/.exec(e.description);r&&r[0]?i.provider=r[0].split("/")[0]:i.provider=e.description.split("/")[0]}return e.exchange&&(i.exchange=e.exchange),i.chartStyle=function(e){return e.inputs,8===e.style?window.t("Heikin Ashi"):""}(e),e.extended&&(i.extended=window.t("ext",{context:"shorthand_for_extended_session"})),i}var a=i("RqCd");i.d(t,"SeriesStatusView",(function(){return l}));var l=function(e){function t(i,r,n){var o=e.call(this,r)||this;return o._invalidated=!0,o._series=i,o._statusViewProperties=n,o._series.onRestarted().subscribe(o,t.prototype.invalidate),o._series.dataEvents().symbolResolved().subscribe(o,t.prototype.invalidate),o._series.dataEvents().completed().subscribe(o,t.prototype.invalidate),o._series.onBoxSizeChanged().subscribe(o,t.prototype.invalidate),o._statusViewProperties.childs().symbolTextSource.listeners().subscribe(o,t.prototype.invalidate),o}return Object(r.__extends)(t,e),t.prototype.invalidate=function(){this._invalidated=!0,this.update()},t.prototype.getSeriesPrecision=function(){var e=4,t=this._series.symbolInfo();return t&&t.pricescale&&(e=Math.round(Math.log(t.pricescale)/Math.log(10))),e},t.prototype.round=function(e){var t=this.getSeriesPrecision(),i=Math.round(e*Math.pow(10,t))/Math.pow(10,t);return i?i.toString():""},t.prototype.update=function(){var e,t;this._invalidated&&(this._bold=!1,this._size=this._statusViewProperties.childs().fontSize.value()+"px",this._text=(e=this._getTitleGenerationOptions(),((t=s(e)).symbolDescription+(t.interval?", "+t.interval:"")+function(e,t){return void 0===t&&(t=", "),(e.provider?""+t+e.provider:"")+(e.exchange?""+t+e.exchange:"")+(e.chartStyle?""+t+e.chartStyle:"")+(e.extended?""+t+e.extended:"")}(t)).replace(/\'/g,"")),this._invalidated=!1)},t.prototype.getSplitTitle=function(){return e=this._getTitleGenerationOptions(),t=s(e),i=t.symbolDescription.replace(/\'/g,""),n=function(e){var t=[];return e.provider&&t.push(e.provider),e.exchange&&t.push(e.exchange),e.chartStyle&&t.push(e.chartStyle),e.extended&&t.push(e.extended),t}(t).map((function(e){return e.replace(/\'/g,"")})),Object(r.__spreadArrays)([i,t.interval||""],n);var e,t,i,n},t.prototype._getTitleGenerationOptions=function(){var e=this._series.symbolInfo();return{description:"ticker"===this._statusViewProperties.childs().symbolTextSource.value()?e&&e.name||void 0:Object(a.getTranslatedSymbolDescription)({pro_name:e&&e.pro_name||void 0,short_name:e&&e.name||void 0,description:e&&e.description||void 0,short_description:e&&e.short_description||void 0,local_description:e&&e.local_description||void 0,language:e&&e.language||void 0}),exchange:this._statusViewProperties.childs().showExchange.value()&&e&&e.exchange||void 0,symbol:this._series.symbol(),interval:this._statusViewProperties.childs().showInterval.value()?this._series.interval():void 0, style:this._series.properties().childs().style.value(),inputs:this._series.getInputsProperties().state(),boxSize:this._series.data().boxSize,reversalAmount:this._series.data().reversalAmount}},t}(n.a)},tDUI:function(e,t,i){"use strict";(function(e){var r=i("Eyy1").ensureNotNull,n=i("Ss5c").LineDataSource,o=i("gMtF").LineToolRiskRewardPriceAxisView,s=i("mMWL"),a=i("Ocx9").DefaultProperty,l=i("zXvd").NumericFormatter,c=i("hayr").propertyPages,u=i("wGNx").RiskRewardPointIndex,h=i("ogJP").isNumber,d=window.t("Risk/Reward"),p=window.t("Risk/Reward short");function f(t,r){var s=r;if(n.call(this,t,s),!r.stopLevel&&!r.profitLevel){var a=t.timeScale().visibleBarsStrictRange(),c=a.firstBar(),u=a.lastBar(),h=t.mainSeries().priceRange(c,u),d=t.mainSeries().priceScale();if(d.isLog()){var p=d.logicalToPrice(h.minValue()),_=d.logicalToPrice(h.maxValue());h=new e(p,_)}if(h&&!h.isEmpty()){var m=Math.round(.2*h.length()*t.mainSeries().base());s.merge({stopLevel:m,profitLevel:m})}}var y=this;s.stopLevel.listeners().subscribe(this,this.recalculate),s.stopLevel.listeners().subscribe(null,(function(){y.properties().stopPrice._listeners.fire(y.properties().stopPrice)})),s.profitLevel.listeners().subscribe(this,this.recalculate),s.profitLevel.listeners().subscribe(null,(function(){y.properties().targetPrice._listeners.fire(y.properties().targetPrice)})),s.addChild("entryPrice",new f.PriceProperty(this,0)),s.addChild("stopPrice",new f.StopPriceProperty(this)),s.addChild("targetPrice",new f.TargetPriceProperty(this)),s.addProperty("riskSize",250),s.addProperty("qty",0),s.addProperty("amountTarget",s.accountSize.value()),s.addProperty("amountStop",s.accountSize.value()),this._riskInPercentsFormatter=new l(2),this._riskInMoneyFormatter=new l,s.risk.subscribe(this,this._recalculateRiskSize),s.accountSize.subscribe(this,this._recalculateRiskSize),s.riskDisplayMode.subscribe(this,this._recalculateRisk),s.riskDisplayMode.subscribe(this,this._recalculateRiskSize),s.entryPrice.subscribe(this,this._recalculateRiskSize),s.stopPrice.subscribe(this,this._recalculateRiskSize),s.profitLevel.subscribe(this,this._recalculateRiskSize),s.profitLevel.subscribe(this,this._syncPriceLevels.bind(this,!1)),s.stopLevel.subscribe(this,this._recalculateRiskSize),s.stopLevel.subscribe(this,this._syncPriceLevels.bind(this,!1)),s.qty.subscribe(this,this._recalculateRiskSize),"percents"===s.riskDisplayMode.value()&&s.risk.value()>100&&s.riskDisplayMode.setValueSilently("money"),this._syncStateExclusions=["points","entryPrice","stopPrice","targetPrice","stopLevel","profitLevel","riskSize","qty","amountTarget","amountStop","risk","accountSize"],this.version=f.version,this._entryPriceAxisView=new o(this,{colorProperty:s.linecolor,priceProperty:s.entryPrice}),this._stopPriceAxisView=new o(this,{colorProperty:s.stopBackground,priceProperty:s.stopPrice}),this._profitPriceAxisView=new o(this,{colorProperty:s.profitBackground,priceProperty:s.targetPrice}),i.e("lt-pane-views").then(function(e){var t=i("u+oH").RiskRewardPaneView;this._setPaneViews([new t(this,this._model)]) }.bind(this).bind(null,i)).catch(i.oe)}function _(e,t){this._constructor="LineToolRiskRewardShort";var i=t||_.createProperties();f.call(this,e,i);var r=this.properties();r.entryPrice.subscribe(this,this._recalculateQty),r.stopPrice.subscribe(this,this._recalculateQty),r.riskSize.subscribe(this,this._recalculateQty),r.entryPrice.subscribe(this,this._recalculateAmount),r.profitLevel.subscribe(this,this._recalculateAmount),r.stopLevel.subscribe(this,this._recalculateAmount),r.accountSize.subscribe(this,this._recalculateAmount),r.riskSize.subscribe(this,this._recalculateAmount),r.qty.subscribe(this,this._recalculateAmount)}function m(e,t){this._constructor="LineToolRiskRewardLong";var i=t||m.createProperties();f.call(this,e,i);var r=this.properties();r.entryPrice.subscribe(this,this._recalculateQty),r.stopPrice.subscribe(this,this._recalculateQty),r.riskSize.subscribe(this,this._recalculateQty),r.entryPrice.subscribe(this,this._recalculateAmount),r.profitLevel.subscribe(this,this._recalculateAmount),r.stopLevel.subscribe(this,this._recalculateAmount),r.accountSize.subscribe(this,this._recalculateAmount),r.riskSize.subscribe(this,this._recalculateAmount),r.qty.subscribe(this,this._recalculateAmount)}inherit(f,n),f.prototype.riskFormatter=function(e){return"percents"===e?this._riskInPercentsFormatter:this._riskInMoneyFormatter},f.prototype.getRiskStep=function(e){return"percents"===e?.01:1},f.prototype._roundValue=function(e){return parseFloat(e.toFixed(2))},f.prototype.hasEditableCoordinates=function(){return!1},f.prototype._recalculateRisk=function(){var e=this.properties(),t=e.riskDisplayMode.value(),i=e.riskSize.value(),r=e.accountSize.value(),n=e.risk.value();n="percents"===t?this._roundValue(i/r*100):this._roundValue(r/100*n),this._riskInChange=!0,e.risk.setValue(this.riskFormatter(t).format(n)),this._riskInChange=!1},f.prototype._recalculateRiskSize=function(){if(!this._riskInChange){var e=this.properties(),t=e.risk.value(),i=e.riskDisplayMode.value(),r=e.accountSize.value();"percents"===i?e.riskSize.setValue(t/100*r):t>r?(e.risk.setValue(r),e.riskSize.setValue(r)):e.riskSize.setValue(t)}},f.version=2,f.prototype.lastBarData=function(){var e=this._model.mainSeries().bars().firstIndex(),t=this._model.mainSeries().bars().lastIndex();if(null===e||null===t||isNaN(e)||isNaN(t))return null;var i=this.points();if(4===i.length){var n=i[u.ActualClose];return n.index=1){var r=[];if(r.push(this._points[0]),o={price:(o=this._points[0]).price,index:o.index+50},r.push(o),this._points[1]&&r.push(this._points[1]),this._points[2]&&r.push(this._points[2]),this._points=r,this._timePoint.length>=1){var n=[],o=this._timePoint[0];n.push(o);var s={price:o.price,time_t:o.time_t,offset:o.offset+50};n.push(s),this._timePoint[1]&&r.push(this._points[1]), this._timePoint[2]&&r.push(this._points[2]),this._timePoint=n}}},f.prototype.checkAlert=function(){this.recalculate()},f.prototype.priceAxisViews=function(e,t){return this.isSourceHidden()||t!==this.priceScale()||this._model.paneForSource(this)!==e?null:[this._entryPriceAxisView,this._stopPriceAxisView,this._profitPriceAxisView]},f.prototype.updateAllViews=function(){this.isActualSymbol()&&this._properties.visible.value()&&(s.hideAllDrawings().value()&&this.userEditEnabled()||(n.prototype.updateAllViews.call(this),this._entryPriceAxisView.update(),this._stopPriceAxisView.update(),this._profitPriceAxisView.update()))},f.prototype.restoreExternalState=function(e){if(e=Object.assign({},e),this.isActualSymbol())delete e.stopLevel,delete e.profitLevel;else{if(h(e.entryPrice))this._timePoint[0].price=e.entryPrice;delete e.entryPrice,delete e.stopPrice,delete e.targetPrice}this.properties().merge(e)},f.prototype._changeEntryPoint=function(e){var t=this.properties().stopPrice.value(),i=this.properties().targetPrice.value(),r=1/this._model.mainSeries().base(),o=Math.min(t,i)+r,s=Math.max(t,i)-r;e.price=Math.max(o,Math.min(s,this._roundPrice(e.price))),n.prototype.setPoint.call(this,0,e),this.properties().stopPrice.setValue(t),this.properties().targetPrice.setValue(i)},f.prototype.setPoint=function(e,t,i,r){if(this.isActualSymbol()){switch(this._muteSyncLineStyle(),e){case 0:this._changeEntryPoint(t);break;case 2:this.properties().stopPrice.setValue(this.preparseStopPrice(t.price));break;case 3:this.properties().targetPrice.setValue(this.preparseProfitPrice(t.price));break;case 1:t.price=this._roundPrice(t.price),n.prototype.setPoint.call(this,1,t),this.recalculate()}this._unmuteSyncLineStyleWithoutApplyingChanges(),this._syncPriceLevels(r)}},f.prototype._syncPriceLevels=function(e){if(!e&&this.linkKey){var t=this.properties(),i={entryPrice:t.entryPrice.value(),stopPrice:t.stopPrice.value(),targetPrice:t.targetPrice.value(),stopLevel:t.stopLevel.value(),profitLevel:t.profitLevel.value()};s.changeLineStyle({linkKey:this.linkKey,state:i,model:this._model})}},f.PriceProperty=function(e,t){n.PointPriceProperty.call(this,e,t)},inherit(f.PriceProperty,n.PointPriceProperty),f.PriceProperty.prototype.setValue=function(e){var t=this._lineSource.points()[this._pointIndex];t.price=parseFloat(e),this._lineSource.setPoint(this._pointIndex,t),this._lineSource.recalculate(),this._lineSource._model.updateSource(this._lineSource),this._listeners.fire(this),this._lineSource.endChanging(),this._lineSource._syncPriceLevels()},f.PriceProperty.prototype.state=function(){return this.value()},f.PriceProperty.prototype.merge=function(e,t){return this.setValue(e),t?[]:null},f.StopPriceProperty=function(e){f.PriceProperty.call(this,e,1)},inherit(f.StopPriceProperty,f.PriceProperty),f.StopPriceProperty.prototype.value=function(){var e=this._lineSource.stopPrice(),t=this._lineSource.ownerSource().formatter();return t.parse(t.format(e)).value},f.StopPriceProperty.prototype.setValue=function(e){ var t=Math.round(Math.abs(e-this._lineSource.entryPrice())*this._lineSource._model.mainSeries().base());this._lineSource.properties().stopLevel.setValue(t),this._lineSource._syncPriceLevels()},f.TargetPriceProperty=function(e){f.PriceProperty.call(this,e,2)},inherit(f.TargetPriceProperty,f.PriceProperty),f.TargetPriceProperty.prototype.value=function(){var e=this._lineSource.profitPrice(),t=this._lineSource.ownerSource().formatter();return t.parse(t.format(e)).value},f.TargetPriceProperty.prototype.setValue=function(e){var t=Math.round(Math.abs(e-this._lineSource.entryPrice())*this._lineSource._model.mainSeries().base());this._lineSource.properties().profitLevel.setValue(t),this._lineSource._syncPriceLevels()},f.prototype.pointsCount=function(){return 1},f.prototype.translatedType=function(){return""},f.prototype.name=function(){return"Risk/Reward"},f.prototype.addPoint=function(e){e.price=this._roundPrice(e.price),n.prototype.addPoint.call(this,e,null,!0);var t={price:e.price,index:e.index+50};n.prototype._addPointIntenal.call(this,t,null,!0);var i=this.calculateActualEntry(e,t);i&&(n.prototype._addPointIntenal.call(this,i,null,!0),(t=this.findClosePoint(i,t))&&n.prototype._addPointIntenal.call(this,t,null,!0));return this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0},f.prototype.setOwnerSource=function(e){n.prototype.setOwnerSource.call(this,e),this._model.mainSeries().symbolInfo()&&(this._recalculateAmount(),this._recalculateQty())},f.prototype._roundPrice=function(e){var t=this._model.mainSeries().base();return Math.round(e*t)/t},f.prototype.recalculate=function(){if(this.properties().interval.value()===this._model.mainSeries().interval()&&0!==this.points().length){var e=this.properties().targetPrice.value(),t=this.properties().stopPrice.value(),i=[this._points[0],this._points[1]],r=this.calculateActualEntry(this.points()[0],this.points()[1]);if(r){i.push(r);var n=this.findClosePoint(r,this.points()[1]);n&&i.push(n)}this._points=i,e!==this.properties().targetPrice.value()&&this.properties().targetPrice._listeners.fire(this.properties().targetPrice),t!==this.properties().stopPrice.value()&&this.properties().stopPrice._listeners.fire(this.properties().stopPrice)}},f.prototype.start=function(){n.prototype.start.call(this),this.recalculate()},f.prototype.startMoving=function(e,t,i){e.logical.price=this._roundPrice(e.logical.price),n.prototype.startMoving.call(this,e,t,i)},f.prototype.move=function(e,t,i){e.logical.price=this._roundPrice(e.logical.price),n.prototype.move.call(this,e,t,i),this.recalculate(),this._entryPriceAxisView.update()},f.prototype.correctPoints=function(e){return!!this.isActualSymbol()&&n.prototype.correctPoints.call(this,[e[0],e[1]])},f.prototype.entryPrice=function(){return this.points()[0].price},f.prototype.findClosePoint=function(e,t){for(var i=this._model.mainSeries().bars(),n=r(i.firstIndex()),o=Math.max(e.index,n),s=r(i.lastIndex()),a=o;a<=Math.min(s,t.index);a++){var l=r(i.valueAt(a)),c=this.checkStopPrice(l);if(null!=c)return{index:a,price:c}}return null}, f.prototype.calculateActualEntry=function(e,t){for(var i=this._model.mainSeries().bars(),n=r(i.firstIndex()),o=Math.max(e.index,n),s=e.price,a=r(i.lastIndex()),l=o;l<=Math.min(a,t.index);l++){var c=r(i.valueAt(l));if(c[TradingView.HIGH_PLOT]>=s&&c[TradingView.LOW_PLOT]<=s)return{index:l,price:s}}return null},f.prototype.axisPoints=function(){if(!this._points[u.ActualEntry])return[];var e=this._points[u.ActualEntry],t=null;if(4===this._points.length)t=this._points[u.ActualClose];else{var i=this.lastBarData();if(!i)return[];t={index:i.index,price:i.closePrice}}return[e,t]},f.prototype.getInputsPropertyPage=function(){return c.LineToolRiskRewardInputsPropertyPage},f.prototype.getStylesPropertyPage=function(){return c.LineToolRiskRewardStylesPropertyPage},f.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("RYNR").RiskRewardDefinitionsViewModel}.bind(null,i)).catch(i.oe)},f.prototype.template=function(){var e=this.properties(),t=n.prototype.template.call(this);return t.stopLevel=e.stopLevel.value(),t.profitLevel=e.profitLevel.value(),t},f.prototype._applyTemplateImpl=function(e){n.prototype._applyTemplateImpl.call(this,e);var t=this.properties();void 0!==e.stopLevel&&t.stopLevel.setValue(e.stopLevel),void 0!==e.profitLevel&&t.profitLevel.setValue(e.profitLevel)},f.prototype.getOrderTemplate=function(){return null},f.prototype._propertiesStateExclusions=function(){return["entryPrice","stopPrice","targetPrice"]},f._configureProperties=function(e){n._configureProperties(e),e.addExclusion("stopLevel"),e.addExclusion("profitLevel")},f.prototype._roundQty=function(e){var t=this._model.mainSeries().symbolInfo();return"bitcoin"===t.type||"crypto"===t.type?Math.round(1e3*e)/1e3:Math.floor(e)},inherit(_,f),_.prototype._recalculateQty=function(){if(0!==this.points().length){var e=this.properties(),t=e.entryPrice.value(),i=e.stopPrice.value(),r=e.riskSize.value(),n=this._model.mainSeries().pointValue(),o=this._roundQty(r/(Math.abs(i-t)*n));e.qty.setValue(o)}},_.prototype._recalculateAmount=function(){if(0!==this.points().length){var e=this.properties(),t=e.accountSize.value(),i=e.entryPrice.value(),r=e.qty.value(),n=e.stopPrice.value(),o=e.targetPrice.value(),s=this._model.mainSeries().pointValue(),a=this._roundValue(t+(i-o)*r*s),l=this._roundValue(t-(n-i)*r*s);e.amountTarget.setValue(a),e.amountStop.setValue(l)}},_.prototype.translatedType=function(){return p},_.prototype.name=function(){return"Risk/Reward short"},_.prototype.stopPrice=function(){return this.entryPrice()+this.properties().stopLevel.value()/this._model.mainSeries().base()},_.prototype.profitPrice=function(){return this.entryPrice()-this.properties().profitLevel.value()/this._model.mainSeries().base()},_.prototype.calculatePL=function(e){return this.entryPrice()-e},_.prototype.preparseStopPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()+1/this._model.mainSeries().base();return Math.max(e,t)},_.prototype.preparseProfitPrice=function(e){ e=this._roundPrice(e);var t=this.entryPrice()-1/this._model.mainSeries().base();return Math.min(e,t)},_.prototype.checkStopPrice=function(e){var t=this.stopPrice(),i=this.profitPrice();return e[TradingView.HIGH_PLOT]>=t?this.stopPrice():e[TradingView.LOW_PLOT]<=i?this.profitPrice():null},_.prototype._orderSide=function(){throw new Error("not supported")},_.createProperties=function(e){var t=new a("linetoolriskrewardshort",e);return _._configureProperties(t),t},_._configureProperties=function(e){f._configureProperties(e)},inherit(m,f),m.prototype._recalculateQty=function(){if(0!==this.points().length){var e=this.properties(),t=e.entryPrice.value(),i=e.stopPrice.value(),r=e.riskSize.value(),n=this._model.mainSeries().pointValue(),o=this._roundQty(r/(Math.abs(t-i)*n));e.qty.setValue(o)}},m.prototype._recalculateAmount=function(){if(0!==this.points().length){var e=this.properties(),t=e.accountSize.value(),i=e.entryPrice.value(),r=e.qty.value(),n=e.stopPrice.value(),o=e.targetPrice.value(),s=this._model.mainSeries().pointValue(),a=this._roundValue(t+(o-i)*r*s),l=this._roundValue(t-(i-n)*r*s);e.amountTarget.setValue(a),e.amountStop.setValue(l)}},m.prototype.stopPrice=function(){return this.entryPrice()-this.properties().stopLevel.value()/this._model.mainSeries().base()},m.prototype.profitPrice=function(){return this.entryPrice()+this.properties().profitLevel.value()/this._model.mainSeries().base()},m.prototype.calculatePL=function(e){return e-this.entryPrice()},m.prototype.preparseStopPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()-1/this._model.mainSeries().base();return Math.min(e,t)},m.prototype.preparseProfitPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()+1/this._model.mainSeries().base();return Math.max(e,t)},m.prototype.checkStopPrice=function(e){var t=this.stopPrice(),i=this.profitPrice();return e[TradingView.LOW_PLOT]<=t?this.stopPrice():e[TradingView.HIGH_PLOT]>=i?this.profitPrice():null},m.prototype.translatedType=function(){return d},m.prototype.name=function(){return"Risk/Reward long"},m.prototype._orderSide=function(){throw new Error("not supported")},m.createProperties=function(e){var t=new a("linetoolriskrewardlong",e);return m._configureProperties(t),t},m._configureProperties=function(e){f._configureProperties(e)},t.LineToolRiskRewardLong=m,t.LineToolRiskRewardShort=_}).call(this,i("Qb4w").PriceRange)},tG6Q:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("Ocx9").DefaultProperty,o=i("hayr").propertyPages,s=window.t("Cyclic Lines");function a(e,t){this._constructor="LineToolCircleLines";var n=t||a.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("GS+0").LineToolCircleLinesPaneView;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"Cyclic Lines"},a.prototype.getStylesPropertyPage=function(){return o.LineToolCircleLinesStylesPropertyPage}, 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("linetoolcirclelines",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolCircleLines=a},tWVy:function(e,t,i){"use strict";i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return o}));var r=i("aIyQ"),n=new(i.n(r).a);function o(){n.fire()}},"tc+8":function(e,t,i){"use strict";(function(t){function i(e){if(this._listeners=new t,this._childs=[],this._muteChildChanges=!1,void 0!==e)if(this.isPrimitiveType(e))this._value=e;else for(var i in e)this.addProperty(i,e[i])}i.prototype.merge=function(e,t){var i=null;if(t)var r=(i=[]).length;if(null==e)return i;if(this.isPrimitiveType(e))return t&&this._value!==e&&i.push(this),this._value=e,i;if(Array.isArray(e))for(var n=0;nr&&i.push(this),i},i.prototype.mergeAndFire=function(e){var t=this.merge(e,!0);this._muteChildChanges=!0,t.forEach((function(e){e._muteChildChanges=!0})),t.forEach((function(e){e._muteChildChanges=!1,e.listeners().fire(e)})),this._muteChildChanges=!1,t.length>0&&this.listeners().fire(this)},i.prototype.state=function(e){var t=this._value;void 0===t&&(t={});for(var i=0;i=0},i.prototype.addChild=function(e,t){this[e]=t,-1===this._childs.indexOf(e)&&this._childs.push(e),t.listeners().subscribe(this,i.prototype.childChanged)}, i.prototype.childChanged=function(e,t){this._muteChildChanges||this.listeners().fire(this)},i.prototype.subscribe=function(e,t){this.listeners().subscribe(e,t,!1)},i.prototype.unsubscribe=function(e,t){this.listeners().unsubscribe(e,t)},i.prototype.unsubscribeAll=function(e){this.listeners().unsubscribeAll(e)},i.prototype.childs=function(){return this},e.exports=i}).call(this,i("aIyQ"))},teHb:function(e,t,i){"use strict";i.r(t),i.d(t,"ratioStudyItem",(function(){return s}));var r=i("mrSG"),n=i("7dm8"),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype._doCalculation=function(e,t,i,r){return e*t/(i*r)},t}(n.a),s={name:"Ratio",metainfo:{_metainfoVersion:15,defaults:n.b,plots:n.d,styles:n.e,description:"Ratio",shortDescription:"Ratio",is_price_study:!1,inputs:n.c,id:"Ratio@tv-basicstudies-1"},constructor:o}},tqok:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var r=-2e6},tzRX:function(e,t){e.exports=''},"u+0B":function(e,t,i){"use strict";i.r(t),i.d(t,"TextWidthCache",(function(){return n}));var r=/[2-9]/g,n=function(){function e(e){void 0===e&&(e=50),this._actualSize=0,this._usageTick=1,this._oldestTick=1,this._tick2Labels={},this._cache={},this._maxSize=e}return e.prototype.reset=function(){this._actualSize=0,this._cache={},this._usageTick=1,this._oldestTick=1,this._tick2Labels={}},e.prototype.measureText=function(e,t,i){var n=i||r,o=String(t).replace(n,"0");if(this._cache[o])return this._cache[o].width;if(this._actualSize===this._maxSize){var s=this._tick2Labels[this._oldestTick];delete this._tick2Labels[this._oldestTick],delete this._cache[s],this._oldestTick++,this._actualSize--}var a=e.measureText(o).width;return 0===a&&t.length?0:(this._cache[o]={width:a,tick:this._usageTick},this._tick2Labels[this._usageTick]=o,this._actualSize++,this._usageTick++,a)},e}()},u0yd:function(e,t,i){"use strict";var r=i("Zp/P").coordinateIsValid,n=i("gyZD").PaneRendererLine;function o(e){e.forceLineColor=!1,n.call(this,e),this.color1=e.color1,this.color2=e.color2,this.bottom=e.bottom,this.isSeries=!!e.isSeries,this._simpleMode=e.simpleMode}inherit(o,n),o.prototype._drawImpl=function(e){if(0!==this.items.length){e.lineCap="square",e.strokeStyle=this.lineColor,e.lineWidth=this.lineWidth,e.lineStyle=this.lineStyle,e.lineWidth=1;for(var t=0;t=0&&!r(this.items[i].y);)i--;if(!(t>=i)){e.translate(.5,.5) ;for(var o={},s=this.items,a=t;a<=i;a++){var l=s[a];if(h=l.style?l.style.color:this.lineColor,a=1&&(r+=8*(1+encodeURIComponent(e[i]).length),!(i-1>0&&r+8*(1+encodeURIComponent(e[i-1]).length)>t));i--);return e.slice(i)}(y(e,t).map(g),75497472)}function S(e,t,i,n){if(t!==c||n.id!==u){var o=new Date;if(e<=r.NORMAL&&function(e,t,i,r,n){var o={id:s,message:String(t),subSystemId:r,timestamp:Number(e)};s+=1,i.push(o),void 0!==n&&i.length>n&&i.splice(0,1)}(o,t,i,n.id,n.maxCount),e<=d&&(!n.highRate||_())&&(!l||n.id.match(l))){var a=o.toISOString()+":"+n.id+":"+t;switch(e){case r.DEBUG:console.debug(a);break;case r.INFO:case r.NORMAL:n.color?console.log("%c"+a,"color: "+n.color):console.log(a);break;case r.WARNING:console.warn(a);break;case r.ERROR:console.error(a)}c=t,u=n.id,h&&clearTimeout(h),h=setTimeout((function(){c=null,u=null,h=NaN}),1e3)}}}function b(e,t){void 0===t&&(t={});var i=[];a.push(i);var n=Object.assign(t,{id:e});function o(e){return function(t){return S(e,t,i,n)}}return{logDebug:o(r.DEBUG),logError:o(r.ERROR),logInfo:o(r.INFO),logNormal:o(r.NORMAL),logWarn:o(r.WARNING)}}var w=b("logger"),P=n.lon=function(e,t){m(r.DEBUG),w.logNormal("Debug logging enabled"),p=Boolean(e),l=t||null,x()},C=n.loff=function(){m(r.INFO),w.logInfo("Debug logging disabled")};function x(){try{o&&(localStorage.setItem("tv.logger.logHighRate",String(p)),localStorage.setItem("tv.logger.loglevel",String(d)))}catch(e){w.logWarn("Cannot save logger state (level: "+d+", high-rate: "+p+") to localStorage: "+e.message)}}!function(){p=!!o&&"true"===localStorage.getItem("tv.logger.logHighRate");var e=parseInt(o&&localStorage.getItem("tv.logger.loglevel")||"");Number.isNaN(e)&&(e=r.WARNING),m(e), w.logNormal("Init with settings - level: "+d+", high-rate: "+p)}(),n.performance&&n.performance.now?w.logNormal("Sync logger and perf times, now is "+n.performance.now()):w.logWarn("Perf time is not available")},uPb3:function(e,t,i){"use strict";(function(e,r){i("xrEm");var n=i("u+0B").TextWidthCache,o=i("7KDR").Separator,s=i("5VQP").ContextMenuManager,a=i("i1o5").InvalidationLevel,l=i("ikwP"),c=l.createBoundCanvas,u=l.getContext2D,h=l.drawScaled,d=l.hardResizeCanvas,p=l.clearRect,f=l.fillRect,_=l.Size,m=i("S8xo").MouseEventHandler,y=i("PC8g").trackEvent,g=i("XlJ7").makeFont,v=i("8OdW"),S=i("CW80").isLineTool,b=i("mE5r").PriceAxisesContainer,w=i("1IXQ").PriceAxisWidget,P=i("3/8U").axesHighlightColor,C=i("zDbI").CHART_FONT_FAMILY,x={contextMenuEnabled:!0,timezoneMenuEnabled:!0,pressedMouseMoveScale:!0};function T(t,i,r,n,s){this._options=Object.assign({},x,i),this.chart=t,this._properties=t.properties().scalesProperties,this.contextMenu=null,this._element=document.createElement("tr"),this._backgroundBasedTheme=s;var a=t.model().model().rendererOptionsProvider(),l=this.backgroundColor.bind(this);function u(){throw new Error("Time axis does not support real price scales")}var h=this;var d={titlesProvider:r,stubContextMenuProvider:function(e,t){var i=h.getContextMenuActions(!0),r=n(e,t);return r[r.length-1]===h.chart.actions().scalesProperties?Array.prototype.splice.apply(r,[r.length-2,0,new o].concat(i)):(r.push(new o),r=r.concat(i)),r},backgroundBasedTheme:s,rendererOptionsProvider:a,getBackgroundColor:l};this._onLabelHovered=new e,this._lhsStubContainer=new b(this._properties,w.LHS,u,d,this._options.priceAxisLabelsOptions),this._lhsStubContainer.onLabelHovered().subscribe(this,function(e,t){this._onLabelHovered.fire(e,t)}.bind(this)),this._rhsStubContainer=new b(this._properties,w.RHS,u,d,this._options.priceAxisLabelsOptions),this._rhsStubContainer.onLabelHovered().subscribe(this,function(e,t){this._onLabelHovered.fire(e,t)}.bind(this)),this._element.appendChild(this._lhsStubContainer.getElement()),this._cell=document.createElement("td"),this._element.appendChild(this._cell),this._cell.classList.add("chart-markup-table","time-axis"),this._cell.style.height="25px",this._dv=document.createElement("div"),this._dv.style.width="100%",this._dv.style.height="100%",this._dv.style.position="relative",this._dv.style.overflow="hidden",this._cell.appendChild(this._dv),this._canvasConfiguredHandler=function(){this.chart.model().model().lightUpdate()}.bind(this),this._canvasBinding=c(this._dv,new _(16,16)),this._canvasBinding.subscribeCanvasConfigured(this._canvasConfiguredHandler);var p=this._canvasBinding.canvas;p.style.position="absolute",p.style.zIndex="1",p.style.left="0",p.style.top="0",this._topCanvasConfiguredHandler=function(){this.chart.model().model().lightUpdate()}.bind(this),this._topCanvasBinding=c(this._dv,new _(16,16)),this._topCanvasBinding.subscribeCanvasConfigured(this._topCanvasConfiguredHandler);var f=this._topCanvasBinding.canvas;f.style.position="absolute",f.style.zIndex="2",f.style.left="0",f.style.top="0", this._element.appendChild(this._rhsStubContainer.getElement()),this.restoreDefaultCursor(),this.update(),this._minVisibleSpan=v.MINUTE_SPAN,this._mouseEventHandler=new m(this._topCanvasBinding.canvas,this,{treatVertTouchDragAsPageScroll:!0,treatHorzTouchDragAsPageScroll:!1}),this.size=new _(0,0)}T.prototype.destroy=function(){this._mouseEventHandler.destroy(),this._topCanvasBinding.unsubscribeCanvasConfigured(this._topCanvasConfiguredHandler),this._topCanvasBinding.destroy(),this._canvasBinding.unsubscribeCanvasConfigured(this._canvasConfiguredHandler),this._canvasBinding.destroy(),this._rhsStubContainer.onLabelHovered().unsubscribeAll(this),this._lhsStubContainer.onLabelHovered().unsubscribeAll(this),this._lhsStubContainer.destroy(),this._rhsStubContainer.destroy(),this.chart.properties().paneProperties.background.unsubscribeAll(this)},T.prototype.getElement=function(){return this._element},T.prototype.hasCanvas=function(e){return this._canvasBinding.canvas===e||this._topCanvasBinding.canvas===e},T.prototype._BORDER_SIZE=1,T.prototype._OFFSET_SIZE=1,T.prototype._TICK_LENGTH=3,T.prototype.onLabelHovered=function(){return this._onLabelHovered},T.prototype.backgroundColor=function(){return this.chart.model().model().backgroundColor().value()},T.prototype.lineColor=function(){return this._properties.lineColor.value()},T.prototype.textColor=function(){return this._properties.textColor.value()},T.prototype.fontSize=function(){return this._properties.fontSize.value()},T.prototype.baseFont=function(){return g(this.fontSize(),C,"")},T.prototype.baseBoldFont=function(){return g(this.fontSize(),C,"bold")},T.prototype.rendererOptions=function(){this._rendererOptions||(this._rendererOptions={borderSize:this._BORDER_SIZE,offsetSize:this._OFFSET_SIZE,tickLength:this._TICK_LENGTH,fontSize:NaN,font:"",widthCache:new n});var e=this._rendererOptions;if(e.fontSize!==this.fontSize()){var t=this.fontSize();e.fontSize=t,e.font=this.baseFont(),e.font=g(this.fontSize(),C,""),e.paddingTop=Math.ceil(t/2.5),e.paddingBottom=e.paddingTop,e.paddingHorizontal=Math.ceil(t/2),e.baselineOffset=Math.round(this.fontSize()/5),e.widthCache.reset()}return this._rendererOptions},T.prototype._zoomAvailable=function(){return!this.chart.model().timeScale().isEmpty()&&this.chart.model().model().zoomEnabled()&&this._options.pressedMouseMoveScale},T.prototype.mouseDownEvent=function(e){if(this._mousedown||!this._zoomAvailable())return!0;this._mousedown=!0;var t=this.chart.model();t.timeScale().isEmpty()||t.startScaleTime(e.localX)},T.prototype.mouseDownOutsideEvent=function(e){this._zoomAvailable()&&this._mousedown&&(this._mousedown=!1,this.chart.model().endScaleTime(),this.restoreDefaultCursor())},T.prototype.pressedMouseMoveEvent=function(e){if(this._zoomAvailable()){var t=this.chart.model(),i=!1,r=(new Date).valueOf();if(this._lastScrollScaleTime)r-this._lastScrollScaleTime<100&&(i=!0);i||(t.scaleTimeTo(e.localX),this._lastScrollScaleTime=r)}},T.prototype.mouseUpEvent=function(e){this._zoomAvailable()&&(this._mousedown=!1,this.chart.model().endScaleTime(), this.restoreDefaultCursor())},T.prototype.contextMenuEvent=function(e){this._options.contextMenuEnabled&&this._createContextMenu().then((function(t){t.show(e)}))},T.prototype.mouseEnterEvent=function(e){this.chart.model().model().zoomEnabled()&&this.setCursor("ew-resize")},T.prototype.mouseLeaveEvent=function(e){this.restoreDefaultCursor()},T.prototype._createContextMenu=function(){return s.createMenu(this.getContextMenuActions(),{statName:"TimeScaleContextMenu"})},T.prototype.getContextMenuActions=function(e){var t=this.chart;t.updateActions();var i=t.actions(),n=[];return e||n.push(i.timeScaleReset,new o),this._options.timezoneMenuEnabled&&n.push(i.applyTimeZone),n.push(i.sessionBreaks),r.enabled("charting_library_base")||n.push(i.extendedHours),n},T.prototype.mouseClickEvent=function(e){},T.prototype.mouseDoubleClickEvent=function(e){y("GUI","Double click time scale"),this.chart.model().resetTimeScale()},T.prototype.optimalHeight=function(){var e=this.rendererOptions();return Math.ceil(e.offsetSize+e.borderSize+e.tickLength+e.fontSize+e.paddingTop+e.paddingBottom)},T.prototype.setSizes=function(e,t,i){this.size&&this.size.equals(e)||(this.size=e,this._canvasBinding.resizeCanvas({width:e.w,height:e.h}),this._topCanvasBinding.resizeCanvas({width:e.w,height:e.h}),this._cell.style.width=e.w+"px",this._cell.style.height=e.h+"px"),this._lhsStubContainer.setSizes(e.h,t),this._rhsStubContainer.setSizes(e.h,i)},T.prototype._spanIndex=function(e){for(var t=[v.MINUTE_SPAN,v.HOUR_SPAN,v.DAY_SPAN,v.MONTH_SPAN,v.YEAR_SPAN],i=t.length-1;i>0;){if(t[i]<=e)return i;i--}return i},T.prototype._spanOffset=function(e,t){if(t0&&this._hightlightBackground(e,r,t)}var n=i.model().crossHairSource();n.startMeasurePoint()&&this._hightlightBackground(e,n.measurePoints(),t)}},T.prototype.drawTickMarks=function(e,t){var i=this.chart.model().timeScale().marks();if(i&&0!==i.length){var r=i.reduce((function(e,t){return e.span>t.span?e:t}),i[0]).span;r>30&&r<40&&(r=30),e.save(),e.strokeStyle=this.lineColor() ;var n=this.rendererOptions(),o=n.borderSize+n.tickLength+n.paddingTop+n.fontSize-n.baselineOffset;e.textAlign="center",e.fillStyle=this.lineColor();var s=Math.max(1,Math.floor(t)),a=Math.floor(.5*t),l=Math.round(n.tickLength*t);e.beginPath();for(var c=i.length;c--;){var u=Math.round(i[c].coord*t);e.rect(u-a,0,s,l)}e.fill(),e.fillStyle=this.textColor();var d=this;h(e,t,(function(){e.font=d.baseFont();for(var t=0;t=r&&e.fillText(n.label,n.coord,o)}})),e.restore()}},T.prototype.drawBackLabels=function(e,t){e.save();var i=new Set,r=this.chart.model(),n=r.dataSources();r.selection().sources().forEach((function(e){i.add(e)})),r.hoveredSource()&&i.add(r.hoveredSource()),r.sourcesBeingMoved().forEach((function(e){i.add(e)}));var o=r.lineBeingEdited()||r.lineBeingCreated();o&&i.add(o),i.add(this.chart.model().crossHairSource()),n=n.concat(r.model().customSources());for(var s=this.rendererOptions(),a=0;a=s)&&(r={value:s,view:o})}}})),i.view&&t.push(i.view),r.view&&t.push(r.view),t},T.prototype._addViewsOrMaxMin=function(e,t){e.length<=1?e.forEach((function(e){if(e.timeAxisViews){var i=e.timeAxisViews();i&&i.length&&t.push(i)}})):t.push(this._minMaxViews(e))},T.prototype.drawCrossHairLabel=function(e,t){e.save(),e.clearRect(0,0,Math.ceil(this.size.w*t)+1,Math.ceil(this.size.h*t)+1);var i,r=this.chart.model(),n=[],o=r.lineBeingEdited()||r.lineBeingCreated();o&&o.timeAxisViews&&((i=o.timeAxisViews())&&i.length&&n.push(i));(this._addViewsOrMaxMin(r.sourcesBeingMoved(),n),this._addViewsOrMaxMin(r.selection().sources(),n),r.hoveredSource()&&!r.selection().isSelected(r.hoveredSource()))&&(r.hoveredSource().timeAxisViews&&(i=r.hoveredSource().timeAxisViews())&&i.length&&n.push(i));(i=r.crossHairSource().timeAxisViews())&&i.length&&n.push(i);var s=this.rendererOptions();n.forEach((function(i){i.forEach((function(i){e.save(),i.renderer().draw(e,s,t),e.restore()}))})),e.restore()},T.prototype.hardResetCanvas=function(){this.size&&(d(this._canvasBinding,this.size),d(this._topCanvasBinding,this.size))},T.prototype.paint=function(e){if(0!==e)if(e!==a.Cursor){var t=u(this._canvasBinding.canvas),i=this._canvasBinding.pixelRatio;if(this.drawBackground(t,i),this.chart.model()){this.drawTickMarks(t,i),this.drawBackLabels(t,i),this.chart.model().crossHairSource().updateAllViews();r=u(this._topCanvasBinding.canvas);this.drawCrossHairLabel(r,i)}this._lhsStubContainer.paint(e),this._rhsStubContainer.paint(e)}else{var r=u(this._topCanvasBinding.canvas) ;this.drawCrossHairLabel(r,this._topCanvasBinding.pixelRatio)}},T.prototype.restoreDefaultCursor=function(){this.setCursor("")},T.prototype.setCursor=function(e){var t="";"grabbing"!==e&&"ew-resize"!==e||(t="time-axis--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._cell.classList.remove(this._currentCursorClassName),t&&this._cell.classList.add(t),this._currentCursorClassName=t,this._cell.style.cursor)},T.prototype.updatePriceAxisStubs=function(){var e=this.chart.model().model(),t=this.chart.isMaximizedPane()?this.chart.maximizedPaneWidget().state():e.paneForSource(e.mainSeries());if(t){var i=e.priceScaleSlotsCount();this._lhsStubContainer.setScales([],i.left,t.leftPriceScales().length,i.left+i.right),this._rhsStubContainer.setScales([],i.right,t.rightPriceScales().length,i.left+i.right)}},T.prototype.getScreenshotData=function(){var e={};return e.content=this._canvasBinding.canvas.toDataURL(),e.canvas=this._canvasBinding.canvas,e.contentWidth=this.size.w,e.contentHeight=this.size.h,e.lhsStub=this._lhsStubContainer.getScreenshotData(),e.rhsStub=this._rhsStubContainer.getScreenshotData(),e},t.TimeAxisWidget=T}).call(this,i("aIyQ"),i("Kxc7"))},"uXw/":function(e,t,i){"use strict";(function(t){var r=i("IiTo"),n=i("LxhU").Interval,o=i("Y7w9").lowerbound,s=i("aIyQ"),a=function(){var e={},a=new Map,l=null,c=new s,u="undefined"!=typeof window?window:t,h=u.PineJsCalendar?u.PineJsCalendar:i("jCNj");function d(){a.forEach((function(t,i){var r=t.symbol,n=t.symbolInfo,o=t.pointsets,s=r;e.hasOwnProperty(s)||(e[s]=[]);var a=function(e,t,i){for(var r=0,n=null,o=0;o0){var c=t.getOffsetSinceLastRealBar(e,l[0],l[1]);c>r&&(r=c,n=l)}}return n}(n,i,o);null!==a&&i.ready()&&i.ensureExtrapolatedTo(n,a[0],a[1]);for(var l=0;l=o)return 0;var c=new r.SessionInfo(e.timezone,e.session,e.holidays,e.corrections),u=_(e,a,c,i,o);if(u>=1e3)return u;return s.findDistanceInBars(i,o,e)}(s,a,t,e[0].value[0]/1e3,i);var l=o(e,1e3*t,(function(e,t){return e.value[0]4*(7-i.spec.weekEndsCount())){d=_/7*(7-i.spec.weekEndsCount())}else{for(var m=0,y={},g=p;g.valueOf()<=f.valueOf();g=h.add_days_considering_dst(i.timezone,g,1)){void 0===y[S=h.get_day_of_week(g)]&&(y[S]=i.spec.isWeekEnd(S)),y[S]&&m++}d=_-m}if(t.isDays())o=Math.ceil(d/t.multiplier());else{var v=t.isSeconds()?t.multiplier():60*t.multiplier();if(_<1)if(i.spec.findSession(i.spec.getWeekIndex(p),h.get_day_of_week(p),h.get_minutes_from_midnight(p)).getEntry()===i.spec.findSession(i.spec.getWeekIndex(f),h.get_day_of_week(f),h.get_minutes_from_midnight(f)).getEntry())return Math.ceil((n-r)/v);var S=i.spec.entries()[0].dayOfWeek(),b=60*i.spec.entries().reduce((function(e,t){return e+(t.dayOfWeek()===S?t.length():0)}),0);o=Math.ceil(d*b/v)}}return o}function m(e,t,i){var n=r.createAligner(t,i);return null!==n&&(e=e.map((function(e){return n.alignTimeIfPossible(1e3*e)/1e3}))),e}return{createPointset:function(e,t,i,r,n,o){var s={guid:e,points:i},c=a.get(r);void 0===c&&(c={symbol:t,symbolInfo:n,session:o,pointsets:[]},a.set(r,c)),c.pointsets.push(s),null===l&&(l=setTimeout(d,0))},removePointset:function(t){var i=[];a.forEach((function(e,r){for(var n=e.pointsets,o=0;o0;)this.removeProperty(this._childs[0]);this._initValues=[];for(var t=0;tl&&t1?u(e[n],t.slice(1),i):(e[n]&&e[n].setValue?e[n].setValue(i):e[n]=i,!0))}function h(e){i||p.logWarn("Path `"+e+"` does not exist.")}}function y(e,t,i,r){window.__defaultsOverrides&&m(e,t,i,window.__defaultsOverrides,r)} function g(){var e=/^linetool.+/;Object.keys(TradingView.defaultProperties).forEach((function(t){e.test(t)&&y(TradingView.defaultProperties[t],null,!1,t)}))}function v(e,t){return t?function(e,t){var i=_(e);if(!window._UNIT_TESTS){var r=TradingView.clone(TVSettings.getJSON(e,null));if(function(e){var t=new Set(["linetoolregressiontrend"]);return e.startsWith("study_")||t.has(e)}(e)&&r&&function(e){if(!e)return!1;e=e.toString();var t=new RegExp("\\d+").exec(e);return null!==t&&t[0]===e}(r.version)){var n=r.inputs,o=t.updateStudyInputs(r.id,r.version,"last",n,null);r.inputs=o;var s=t.updateStudyState(r,r);r=s}TradingView.merge(i,r)}return i}(e,t):function(e){var t=_(e);if(!window._UNIT_TESTS){var i=TradingView.clone(TVSettings.getJSON(e,null));i&&TradingView.merge(t,i)}return t}(e)}v.create=function(e,t){if(t){var i=_(e);TradingView.defaultProperties[e]=Object.assign(t,i)}},v.remove=function(e){TradingView.defaultProperties[e]=void 0},TradingView.saveDefaults=function(e,t){TVSettings.setJSON(e,t)},TradingView.factoryDefaults=_,window.applyDefaultOverridesToLinetools=g,window.applyDefaultsOverrides=y,window.applyPropertiesOverrides=m,window.defaults=v,t.applyDefaultOverridesToLinetools=g,t.applyDefaultsOverrides=y,t.applyPropertiesOverrides=m,t.defaults=v,t.factoryDefaults=_,t.saveDefaults=TradingView.saveDefaults},wamh:function(e,t,i){"use strict";i.r(t),i.d(t,"ChangeToolBarsThemeUndoCommand",(function(){return s}));var r=i("mrSG"),n=i("EsvI"),o=i("oiZD"),s=function(e){function t(t,i,r){void 0===r&&(r=!0);var n=e.call(this,"Apply Toolbars Theme")||this;return n._prevThemeName=t,n._themeName=i,n._syncState=r,n}return Object(r.__extends)(t,e),t.prototype.undo=function(){Object(n.isStdThemeName)(this._prevThemeName)&&(Object(o.setTheme)(this._prevThemeName),this._syncState&&Object(n.syncTheme)())},t.prototype.redo=function(){Object(n.isStdThemeName)(this._themeName.toLowerCase())&&(Object(o.setTheme)(this._themeName.toLowerCase()),this._syncState&&Object(n.syncTheme)())},t}(i("RDU5").UndoCommand)},wi9r:function(e,t,i){"use strict";(function(e){var t=i("0waE").randomHash;function r(e){this._chartApi=e,this._sessionid="qs_"+t(),this._sessionstarted=!1}r.prototype.destroy=function(){this._sessionstarted&&(this._chartApi.quoteDeleteSession(this._sessionid),this._sessionid=null,this._sessionstarted=!1)},r.prototype.connected=function(){return this._chartApi.connected()},r.prototype.connect=function(e){this._globalHandler=e,this._chartApi.createSession(this._sessionid,this),this._chartApi.connect()},r.prototype.disconnect=function(){this._chartApi.disconnect()},r.prototype.quoteAddSymbols=function(e,t){e=[].concat(e),t&&t.forcePermission&&(e=e.concat({flags:["force_permission"]})),this._chartApi.quoteAddSymbols(this._sessionid,e)},r.prototype.quoteRemoveSymbols=function(e){this._chartApi.quoteRemoveSymbols(this._sessionid,e)},r.prototype.quoteFastSymbols=function(e){this._chartApi.quoteFastSymbols(this._sessionid,e)},r.prototype.quoteSetFields=function(e){this._chartApi.quoteSetFields(this._sessionid,e)}, r.prototype.onMessage=function(e){switch(e.method){case"connected":this._sessionstarted||(this._chartApi.quoteCreateSession(this._sessionid),this._sessionstarted=!0);break;case"disconnected":this._sessionstarted=!1}this._globalHandler(e)},r.prototype.quoteHibernateAll=function(e){this._chartApi.quoteHibernateAll(this._sessionid)},TradingView.QuoteSession=r,e&&e.exports&&(e.exports=r)}).call(this,i("YuTi")(e))},wiuq:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolArrowMarker",(function(){return c}));var r=i("mrSG"),n=i("Ss5c"),o=i("Ocx9"),s=i("tc+8"),a=i.n(s),l=window.t("Arrow Marker"),c=function(e){function t(r,n){var o=e.call(this,r,n||t.createProperties())||this;return o._constructor="LineToolArrowMarker",i.e("lt-pane-views").then(function(e){var t=i("Qa6j").ArrowMarkerPaneView;o._setPaneViews([new t(o,o.model())])}.bind(null,i)).catch(void 0),o}return Object(r.__extends)(t,e),t.prototype.pointsCount=function(){return 2},t.prototype.name=function(){return"Trend Line"},t.prototype.translatedType=function(){return l},t.prototype.getStylesPropertyPage=function(){},t.createProperties=function(e){var i=new o.DefaultProperty("linetoolarrowmarker",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,"FxV7")).then((function(e){return e.ArrowMarkerDefinitionsViewModel}))},t._configureProperties=function(e){n.LineDataSource._configureProperties(e),e.hasChild("text")||e.addChild("text",new a.a("")),e.addExclusion("text")},t}(n.LineDataSource)},wjVR:function(e,t,i){"use strict";i.r(t),i.d(t,"ChartWidgetBase",(function(){return f}));var r=i("mrSG"),n=i("Eyy1"),o=i("ogJP"),s=i("CW80"),a=i("3ClC"),l=i("i1o5"),c=i("GVHu"),u=i("mMWL"),h=i("KnF9"),d={addToWatchlistEnabled:!0,sourceSelectionEnabled:!0,propertyPagesEnabled:!0,paneContextMenuEnabled:!0,priceScaleContextMenuEnabled:!0,currencyLabelEnabled:!1,goToDateEnabled:!1,marketStatusWidgetEnabled:!0,chartWarningWidgetEnabled:!0,paneControlsEnabled:!0,isSymbolAvailable:function(e){return Promise.resolve(!0)},legendWidgetEnabled:!0,chartEventsEnabled:!0,esdEnabled:!1,croppedTickMarks:!0,handleScale:{mouseWheel:!0,pinch:!0,axisPressedMouseMove:!0},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!0}};function p(e,t,i){var r=t.mainSeries().syncModel(),n=e.mainSeries().syncModel(),o=i;null!==r&&null!==n&&(o=e.createSyncPoint(r,n).sourceTimeToTargetTime(i));return e.timeScale().points().roughIndex(o,n&&n.distance.bind(n))}var f=function(){function e(e,t){this.activePaneWidget=null,this._model=null,this._paneWidgets=[],this._maximizedPaneWidget=null,this._timeAxisWidget=null,this._paneSeparators=[],this._timeAxisSeparator=null,this._isDestroyed=!1,this._id=t,this._options=Object(o.merge)(Object(o.clone)(d),e),this._subscribeToDrawingState()}return e.prototype.destroy=function(){this._isDestroyed=!0},e.prototype.id=function(){return this._id},e.prototype.timeAxisHeight=function(){ return null!==this._timeAxisWidget?this._timeAxisWidget.size.h:0},e.prototype.images=function(){var e=this;window.TradingView.printing=!0;var t=this.model().selection().sources();this.model().selectionMacro((function(e){return e.clearSelection()}));var i,r=function(t){t.paint(l.InvalidationLevel.Light,e.onWidget());var i=t.getScreenshotData();i.containsMainSeries=t.containsMainSeries(),i.studies=[];for(var r=0,o=t.state().dataSources();rn)){var s,a=this.m_series.bars().range(i,n),l=this.m_series.priceScale(),c=this.m_series.barColorer(),u={};if(a.each((function(i,r){var n,o={};(o.time=Math.round(i),e(r,o))&&(u.value=r,n=r[TradingView.STYLE_PLOT]?r[TradingView.STYLE_PLOT]:c.barStyle(i,!1,u),r[TradingView.STYLE_PLOT]=n,u.previousValue=r,o.color=n.barColor,o.borderColor=n.barBorderColor,o.wickColor=n.barWickColor,o.hollow=n.isBarHollow,t.m_bars.push(o))}),this),0!==this.m_bars.length&&(s=this.m_series.firstValue(),l.barPricesToCoordinates(this.m_bars,s)),this.m_model.timeScale().barIndexesToCoordinates(this.m_bars),this.m_model.selection().isSelected(this.m_series)){var h=p(i,n);this._selectionData={points:[],bgColor:this.m_model.backgroundColor().value(),visible:!0},this._selectionData.hittestResult=o.REGULAR;for(var d=0;d=t&&e.y<=i||e.y<=t&&e.y>=i))return new n(n.REGULAR);return null},h.prototype._drawImpl=function(e){if(null!==this._data){var t=this._data.isHlineFill;if(t||0!==this._data.points1.length&&0!==this._data.points2.length){var i=this._data.timePoints,r=this._data.points1,n=this._data.points2,s=this._data.colors,l=isNumber(this._data.transparency)?this._data.transparency:50;l=Math.min(l,100),l=Math.max(l,0);for(var c,u={},h=[],d=.25*this._data.getBarSpacing(),p=0;p0&&null!==c){var m=u[c]||[];m.push(h),u[c]=m}h=_?[f]:[]}}for(var y in u){var g=u[y];e.beginPath();for(var v=0;v=0;P--)e.lineTo(S[P].timePoint,S[P].point2)}else{var C=S[0].point2;e.lineTo(b+d,w),e.lineTo(b+d,C),e.lineTo(b-d,C),e.lineTo(b-d,w)}}e.closePath(),e.fillStyle=a.generateColor(y,l), e.fill()}}}},d.prototype.update=function(){this._invalidated=!0},d.prototype._plotNames=function(){return this._source.metaInfo().plots.map((function(e){return e.id}))},d.prototype._plotIndex1=function(){return null===this._plIndex1&&(this._plIndex1=this._plotNames().indexOf(this._plotAId())+1),this._plIndex1},d.prototype._plotIndex2=function(){return null===this._plIndex2&&(this._plIndex2=this._plotNames().indexOf(this._plotBId())+1),this._plIndex2},d.prototype._updateImpl=function(){if(this._points1=[],this._points2=[],this._colorsMap&&(this._colors=[]),this._timePoints=[],this._visible()){var e=this._source.priceScale(),t=this._source._model.timeScale();if(e&&!e.isEmpty()&&!this._source._model.timeScale().isEmpty()&&!this._source._series.bars().isEmpty()){if(this._isHlineFill){var i=this._source.firstValue(),r=this._source.properties().bands[this._bandAKey],n=this._source.properties().bands[this._bandBKey];this._level1=e.priceToCoordinate(r.value.value(),i),this._level2=e.priceToCoordinate(n.value.value(),i)}var o=this._source._model.timeScale().visibleBarsStrictRange();if(null!==o){var s=this._source._series.nearestIndex(o.firstBar(),c.NearestRight),a=this._source._series.nearestIndex(o.lastBar(),c.NearestLeft);if(!((s=this._correctStartBarIndex(s))>a)){var l=this._source.data().range(s,a);if(l.size()>0){var u=l.firstIndex(),h=l.lastIndex(),d=this._source.offset(this._plotAId()),p=this._source.offset(this._plotBId()),f=Math.max(d,p),_=Math.min(d,p),m=u+f,y=this._source.data().firstIndex();u>y&&(m=uv+_&&hh?u+f:m,b=m;b<=g;++b){if(this._timePoints.push(t.indexToCoordinate(S++)),this._colors){var w=this._source.data().valueAt(b-_);if(null!==w){var P=w[this._colorPlotOffset+1];null==P?this._colors.push(null):this._colors.push(this._colorValues[this._colorsMap[P]].color.value())}}if(!this._isHlineFill){var C=this._source.data().valueAt(b-d),x=this._source.data().valueAt(b-p);if(null!==C&&null!==x){var T=C[this._plotIndex1()],L=x[this._plotIndex2()];this._points1.push(T),this._points2.push(L)}}}}i=this._source.firstValue();e.pricesArrayToCoordinates(this._points1,i),e.pricesArrayToCoordinates(this._points2,i)}}}}},d.prototype.renderer=function(){this._invalidated&&(this._updateImpl(),this._invalidated=!1);var e={};return e.points1=this._points1,e.points2=this._points2,e.timePoints=this._timePoints,e.getBarSpacing=this._getBarSpacing,e.backcolor=this._color(),e.transparency=this._transparency(),e.isHlineFill=this._isHlineFill,e.level1=this._level1,e.level2=this._level2,this._colors&&(e.colors=this._colors),this._areaRenderer.setData(e),this._areaRenderer},d.prototype._plotAId=function(){r(!1,"Pure virtual call!")},d.prototype._plotBId=function(){r(!1,"Pure virtual call!")},d.prototype._color=function(){r(!1,"Pure virtual call!")},d.prototype._transparency=function(){r(!1,"Pure virtual call!")},d.prototype._visible=function(){r(!1,"Pure virtual call!")},d.prototype._correctStartBarIndex=function(e){return e}, inherit(p,d),p.prototype._plotAId=function(){return this._source.properties().area[0].name.value()},p.prototype._plotBId=function(){return this._source.properties().area[1].name.value()},p.prototype._color=function(){return this._source.properties().areaBackground.backgroundColor.value()},p.prototype._transparency=function(){var e=this._source.properties().areaBackground.transparency.value();return l(e,0,100)},p.prototype._visible=function(){return this._source.properties().areaBackground.fillBackground.value()},inherit(f,d),f.prototype._initBandIndexes=function(e,t){this._bandAKey=null,this._bandBKey=null;for(var i=0;i0)e[e.length-1].addCommand(r);else{i.clear();var n=t.head(),o=n&&n.text();n&&n.canMerge(r)?n.merge(r):t.push(r);var a=r.text();""!==a&&a!==o&&h.logNormal("DO: "+a)}r.executeOnPush()&&r.redo(),e.length||s.fire(c())}function c(){var e=t.head(),r=i.head();return{enableUndo:!t.isEmpty(),undoText:void 0===e?void 0:e.text(),enableRedo:!i.isEmpty(),redoText:void 0===r?void 0:r.text()}}return{beginUndoMacro:function(t){var i=new o.a(t);return e.push(i),i},clearStack:function(){t.clear(),i.clear(),s.fire(c())},createUndoCheckpoint:function(){return{lastActualCommand:t.isEmpty()?null:t.head()}},endUndoMacro:function(){var t=Object(r.ensureDefined)(e.pop());t.isEmpty()||l(t)},pushUndoCommand:l,redo:function(){if(i.isEmpty())return!1;var e=i.pop();return!!e&&(e.redo(),t.push(e),h.logNormal("REDO: "+e.text()),s.fire(c()),!0)},redoStack:function(){return i},setWatchedValue:function(e,t,i){if(e.value()!==t){var r=new a(e,t,i);l(r),r.redo()}},undo:function(){if(t.isEmpty())return!1;var e=t.pop();return!!e&&(e.undo(),i.push(e),h.logNormal("UNDO: "+e.text()),s.fire(c()),!0)},undoStack:function(){return t},undoToCheckpoint:function(e){for(;!t.isEmpty()&&e.lastActualCommand!==t.head();)t.pop().undo();i.clear(),s.fire(c())},state:c,onChange:function(){return s}}}},xUGI:function(e,t,i){"use strict";var r=i("GH0z").PercentageFormatter,n=i("zXvd").NumericFormatter,o=i("zDbI").CHART_FONT_FAMILY,s=i("d1Pk").fibLevelPrice,a=i("ikwP").createDisconnectedBoundCanvas,l=i("ikwP").getPrescaledContext2D,c=i("ikwP").resizeCanvasPreservingContent,u=i("ikwP").Size;function h(e){this._fibLevelsBasedOnLogScaleProperty=e,this._sourcesToRow={},this._rowsToSources={},this._currentSymbol="",this._actualCapacity=1,this._actualWidth=1,this._numericFormatter=new n,this._percentageFormatter=new r,this._canvas=a(document,new u(this._actualWidth,h.ROW_HEIGHT*this._actualCapacity)),this._cache=l(this._canvas.canvas)}h.prototype.destroy=function(){this._canvas.destroy(),this._cache=null},h.prototype.levelsCount=function(){return 0},h.prototype.topByRow=function(e){return e*h.ROW_HEIGHT},h.prototype.rowHeight=function(e){return h.ROW_HEIGHT},h.prototype.devicePixelRatio=function(){return this._canvas&&this._canvas.pixelRatio||0},h.prototype._recreateCanvas=function(e,t){this._canvas=c(this._canvas,new u(e,t)),this._cache=l(this._canvas.canvas),this._cache.font="12px "+o},h.prototype.canvas=function(){return this._canvas.canvas},h.ROW_HEIGHT=14,h.prototype.points=function(e){return[e.points()[0],e.points()[1]]},h.prototype.startPoint=function(e,t){ var i=t?e.points()[0].price:e.points()[1].price;if(!this._calculateLogLevels(e))return{price:i};var r=e.ownerSource().firstValue();return{price:i,coordinate:e.priceScale().priceToCoordinate(i,r)}},h.prototype.priceRange=function(e,t){var i=this.points(e),r=i[0],n=i[1],o=t?n.price-r.price:r.price-n.price;if(!this._calculateLogLevels(e))return{price:o};var s=e.priceScale(),a=e.ownerSource().firstValue(),l=s.priceToCoordinate(r.price,a),c=s.priceToCoordinate(n.price,a);return{price:o,coordinate:t?c-l:l-c}},h.prototype.sourceIsReady=function(e){return e.points().length>=2},h.prototype._calculateLogLevels=function(e){return e.fibLevelsBasedOnLogScale&&e.fibLevelsBasedOnLogScale()},h.prototype._calculateWidth=function(e){if(!this.sourceIsReady(e))return null;var t=l(this.canvas());t.font="12px "+o;var i=!!e.properties().showPrices&&e.properties().showPrices.value(),r=!!e.properties().coeffsAsPercents&&e.properties().coeffsAsPercents.value(),n=e.properties().showCoeffs.value(),a=this.points(e),c=a[0],u=a[1];if(!c||!u)return null;var h=e.ownerSource().firstValue();if(null===h)return 0;var d=!1,p=e.properties();p.reverse&&p.reverse.value()&&(d=p.reverse.value());for(var f=this.startPoint(e,d),_=this.priceRange(e,d),m=this._calculateLogLevels(e),y=0,g=[],v=1;v<=this.levelsCount();v++){var S=p["level"+v].coeff.value(),b="";if(n&&(b+=r?this._percentageFormatter.format(Math.round(1e4*S)/100):this._numericFormatter.format(S)),i){var w=e.priceScale(),P=s(f,_,S,w,h,m);b+="("+w.formatPrice(P,h)+")"}var C={text:b,left:y,width:t.measureText(b).width+4};g.push(C),y+=C.width}return{totalWidth:y,cells:g}},h.prototype._effectiveState=function(e){var t={},i=e.properties();i.showPrices&&(t.showPrices=i.showPrices.value()),i.coeffsAsPercents&&(t.coeffsAsPercents=i.coeffsAsPercents.value()),t.showCoeffs=i.showCoeffs.value();var r=e.priceScale();r&&(r.formatter().state&&(t.formatter=e.priceScale().formatter().state()),t.logLevels=this._calculateLogLevels(e)),i.reverse&&(t.reverse=i.reverse.value()),t.p1=e.points()[0],t.p2=e.points()[1],3===e.points().length&&(t.p3=e.points()[2]),t.items=[];for(var n=1;n<=this.levelsCount();n++){var o=i["level"+n],s={coeff:o.coeff.value(),color:o.color.value()};t.items.push(s)}return t},h.prototype._findEmptyRow=function(e){for(var t=0;this._rowsToSources[t];)t++;return this._rowsToSources[t]=e,t>=this._actualCapacity&&(this._actualCapacity++,this._recreateCanvas(this._actualWidth,h.ROW_HEIGHT*this._actualCapacity)),t},h.prototype._repaintSource=function(e,t,i){var r=h.ROW_HEIGHT*i.row,n=l(this.canvas());n.clearRect(0,r,this._actualWidth,h.ROW_HEIGHT),n.textBaseline="bottom",n.font="12px "+o,r+=h.ROW_HEIGHT;for(var s=0;sthis._actualWidth&&(this._recreateCanvas(o.totalWidth,h.ROW_HEIGHT*this._actualCapacity),this._actualWidth=o.totalWidth);i=this._sourcesToRow[e.id()];this._repaintSource(o,n,i),this._sourcesToRow[e.id()].effectiveState=n,this._sourcesToRow[e.id()].preparedCells=o}else this._sourcesToRow[e.id()].effectiveState=null}return this._sourcesToRow[e.id()]},e.exports=h},xWfy:function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return l})),i.d(t,"d",(function(){return c}));var r=i("tqok"),n=i("SqfW"),o=i("7Fue"),s=function(){function e(e,t){if(this._indexes=[],this._horizlines=new Map,this._vertlines=new Map,this._lines=new Map,this._hlines=new Map,this._textmarks=new Map,this._shapemarks=new Map,this._backgrounds=new Map,this._polygons=new Map,this._trendchannels=new Map,this._hhists=new Map,this._dwglabels=new Map,this._dwglines=new Map,"data"===e){var i=t;this._indexes=i.indexes,this._vertlines=(s=i.vertlines,a=this._indexes,l=n.b,c=new Map,s.forEach((function(e,t){var i=c.get(t)||new Set;e.forEach((function(e){var t=l(e,a);null!==t&&i.add(t)})),c.set(t,i)})),c)}else if("state"===e){var r=t;this._indexes=r.indexes||[],this._vertlines=function(e,t,i){var r=new Map;if(void 0===e)return r;for(var n=function(e){var n=e.styleId,o=r.get(n)||new Set;e.data.forEach((function(e){var r=i(e,t);null!==r&&o.add(r)})),r.set(n,o)},o=0,s=e;o0?a:void 0),c}},xdS3:function(e,t,i){},xnA2:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("5rJj"),o=i("xUGI"),s=i("hayr").propertyPages,a=window.t("Fib Channel");function l(){o.call(this)}function c(e,t){this._constructor="LineToolFibChannel";var n=t||c.createProperties();r.call(this,e,n),this.version=c.version,e._fibChannelLabelsCache||(e._fibChannelLabelsCache=new l),i.e("lt-pane-views").then(function(e){var t=i("CR3a").FibChannelPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(l,o),l.prototype.levelsCount=function(){return c.LevelsCount},inherit(c,r),c.LevelsCount=24,c.version=2,c.prototype.levelsCount=function(){return c.LevelsCount},c.prototype.migrateVersion=function(e,t,i){i.properties.removeProperty("reverse")},c.prototype.pointsCount=function(){return 3},c.prototype.translatedType=function(){return a},c.prototype.name=function(){return"Fib Channel" },c.prototype.processErase=function(e,t){var i="level"+t,r=this.properties()[i].visible;e.setProperty(r,!1,"Erase level line")},c.prototype.getStylesPropertyPage=function(){return s.LineToolFibChannelStylesPropertyPage},c.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)},c.createProperties=function(e){var t=new n("linetoolfibchannel",e,!1,{range:[1,24],names:["coeff","color","visible"]});return c._configureProperties(t),t},c._configureProperties=function(e){r._configureProperties(e)},t.LineToolFibChannel=c},xo8u:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var r=i("mrSG"),n=i("Eyy1"),o=function(e){function t(t,i,r,o){var s=e.call(this,o)||this;s._newSourcesCurrencies=new Map,s._oldSourcesCurrencies=new Map,s._showFade=!1,s._chartWidget=r;for(var a=r.model().mainSeries(),l=0,c=t.seriesLikeSources();l0&&(r=Object.assign({},this._points[0]),this._points.unshift(r))}},f.prototype.applyTemplate=function(e){delete e.background,delete e.backgroundColor,delete e.showBackground,r.prototype.applyTemplate.call(this,e)},f.prototype.translatedType=function(){return"Elliott Labels"},f.prototype.name=function(){return"Elliott Labels"},f.prototype.additionalActions=function(e){var t=this;return[new n({label:window.t("Degree"),subItems:a.map((function(i){var r=p.filter((function(e){return e.value===i}))[0];return new n({label:r.title,checkable:!0,checked:t.properties().degree.value()===i,onExecute:function(){e.setProperty(t.properties().degree,i,"Change Elliott Degree")}})}))})]},f.prototype.label=function(e){var t=a.length-this.properties().degree.value()-1,i=Math.floor(t/3);return{group:i,bold:!!(i%2),decoration:["","brackets","circle"][t%3],label:this.labelsGroup()[i][e]}},f.prototype.getStylesPropertyPage=function(){return s.LineToolElliottStylesPropertyPage},f.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("UHSU").ElliottPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},f.prototype.availableDegreesValues=function(){return p},f.prototype.getDegrees=function(){return p.map((function(e){return e.title}))}, f.createProperties=function(e){var t=new o("linetoolelliott",e);return f._configureProperties(t),t},f._configureProperties=function(e){r._configureProperties(e)},inherit(_,f),_.prototype.pointsCount=function(){return 6},_._configureProperties=function(e){f._configureProperties(e)},inherit(m,_),m._labelsGroups=[["0","1","2","3","4","5"],["0","i","ii","iii","iv","v"],["0","1","2","3","4","5"],["0","I","II","III","IV","V"],["0","1","2","3","4","5"]],m.prototype.translatedType=function(){return l},m.prototype.name=function(){return"Elliott Impulse Wave (12345)"},m.prototype.labelsGroup=function(){return m._labelsGroups},m.createProperties=function(e){var t=new o("linetoolelliottimpulse",e);return m._configureProperties(t),t},m._configureProperties=function(e){_._configureProperties(e)},inherit(y,_),y._labelsGroups=[["0","A","B","C","D","E"],["0","a","b","c","d","e"],["0","A","B","C","D","E"],["0","a","b","c","d","e"],["0","A","B","C","D","E"]],y.prototype.translatedType=function(){return c},y.prototype.name=function(){return"Elliott Triangle Wave (ABCDE)"},y.prototype.labelsGroup=function(){return y._labelsGroups},y.createProperties=function(e){var t=new o("linetoolelliotttriangle",e);return y._configureProperties(t),t},y._configureProperties=function(e){_._configureProperties(e)},inherit(g,_),g._labelsGroups=[["0","W","X","Y","X","Z"],["0","w","x","y","x","z"],["0","W","X","Y","X","Z"],["0","w","x","y","x","z"],["0","W","X","Y","X","Z"]],g.prototype.translatedType=function(){return u},g.prototype.name=function(){return"Elliott Triple Combo Wave (WXYXZ)"},g.prototype.labelsGroup=function(){return g._labelsGroups},g.createProperties=function(e){var t=new o("linetoolelliotttriplecombo",e);return g._configureProperties(t),t},g._configureProperties=function(e){_._configureProperties(e)},inherit(v,f),v.prototype.pointsCount=function(){return 4},v._configureProperties=function(e){f._configureProperties(e)},inherit(S,v),S._labelsGroups=[["0","A","B","C"],["0","a","b","c"],["0","A","B","C"],["0","a","b","c"],["0","A","B","C"]],S.prototype.translatedType=function(){return h},S.prototype.name=function(){return"Elliott Correction Wave (ABC)"},S.prototype.labelsGroup=function(){return S._labelsGroups},S.createProperties=function(e){var t=new o("linetoolelliottcorrection",e);return S._configureProperties(t),t},S._configureProperties=function(e){v._configureProperties(e)},inherit(b,v),b._labelsGroups=[["0","W","X","Y"],["0","w","x","y"],["0","W","X","Y"],["0","w","x","y"],["0","W","X","Y"]],b.prototype.translatedType=function(){return d},b.prototype.name=function(){return"Elliott Double Combo Wave (WXY)"},b.prototype.labelsGroup=function(){return b._labelsGroups},b.createProperties=function(e){var t=new o("linetoolelliottdoublecombo",e);return b._configureProperties(t),t},b._configureProperties=function(e){v._configureProperties(e)},t.LineToolElliott=f,t.LineToolElliottImpulse=m,t.LineToolElliottTriangle=y,t.LineToolElliottTripleCombo=g,t.LineToolElliottCorrection=S,t.LineToolElliottDoubleCombo=b},xzdg:function(e,t,i){"use strict" ;i.r(t);var r=i("Eyy1"),n=i("YFKU"),o=i("7KDR"),s=i("ikwP"),a=i("ogJP"),l=i("jFln"),c=i("u+0B"),u=i("XlJ7"),h=i("PC8g"),d=i("zDbI"),p=i("Hr11"),f=i("Kxc7").enabled("charting_library_debug_mode"),_=function(){function e(e,t,i,r){this._textWidthCache=new c.TextWidthCache(200),this._fontSize=0,this._color="",this._font="",this._keys=[],this._hash=new Map,this._fontSize=e,this._color=t,this._font=Object(u.makeFont)(e,i,r)}return e.prototype.destroy=function(){delete this._textWidthCache,this._keys=[],this._hash.clear()},e.prototype.paintTo=function(e,t,i,r,n){var o=this._getLabelImage(e,t);if("left"!==n){var a=Object(s.getCanvasDevicePixelRatio)(e.canvas);i-=Math.floor(o.textWidth*a)}r-=Math.ceil(o.height/2),e.drawImage(o.canvas,i,r,o.width,o.height)},e.prototype.getLabelHeight=function(e,t){return this._getLabelImage(e,t).height},e.prototype._getLabelImage=function(e,t){var i,n=this;if(this._hash.has(t))i=Object(r.ensureDefined)(this._hash.get(t));else{if(this._keys.length>=200){var o=Object(r.ensureDefined)(this._keys.shift());this._hash.delete(o)}var a=Object(s.getCanvasDevicePixelRatio)(e.canvas),l=Math.ceil(this._fontSize/4.5),c=Math.round(this._fontSize/10),u=Math.ceil(this._textWidthCache.measureText(e,t)),h=Object(p.ceiledEven)(Math.round(u+2*l)),d=Object(p.ceiledEven)(this._fontSize+2*l),_=Object(s.createDisconnectedCanvas)(document,new s.Size(h,d),a);i={text:t,textWidth:Math.round(Math.max(1,u)),width:Math.floor(h*a),height:Math.floor(d*a),canvas:_},0!==u?(this._keys.push(i.text),this._hash.set(i.text,i)):f&&console.log('Canvas 2d context measureText return zero width for "'+t+'" text'),e=Object(s.getContext2D)(i.canvas),Object(s.drawScaled)(e,a,(function(){e.font=n._font,e.fillStyle=n._color,e.fillText(t,0,d-l-c)}))}return i},e}(),m=i("ljE9"),y=i("+cnz"),g=i("CxTi"),v=function(){function e(){var e=this;this._width=null,this._currencyInfo=null,this._fontSize=0,this._currencyLabelWrapper=document.createElement("div"),this._currencyLabelWrapper.className=g["price-axis-currency-label-wrapper"],this._currencyLabel=document.createElement("span"),this._currencyLabel.className=g["price-axis-currency-label"],this._currencyLabel.classList.add("apply-common-tooltip"),Object(m.b)(this._currencyLabel,"text",(function(t){return e._tooltipContent()})),this._currencyText=document.createElement("span"),this._currencyText.className=g["price-axis-currency-label-text"],this._currencyLabel.appendChild(this._currencyText),this._arrowDown=document.createElement("span"),this._arrowDown.className=g["price-axis-currency-label-arrow-down"],this._arrowDown.innerHTML=y,this._currencyLabel.appendChild(this._arrowDown),this._currencyLabelWrapper.appendChild(this._currencyLabel)}return e.prototype.element=function(){return this._currencyLabelWrapper},e.prototype.labelElement=function(){return this._currencyLabel},e.prototype.isVisible=function(){return!this._currencyLabel.classList.contains("js-hidden")},e.prototype.width=function(){if(null!==this._width)return this._width;var e=this._currencyLabel.getBoundingClientRect() ;return this._width=e.right-e.left+1+8,this._width},e.prototype.drawLabel=function(e,t,i,r){var n=this._currencyText.textContent;if(null!==n){var o=Math.round(t/2*i),a=this._currencyLabel.getBoundingClientRect(),c=Object(p.ceiledEven)(a.width*i/2),h=this._currencyLabel.style,f=Math.round(this.labelTop()*i),_=Math.round(a.height*i),m=Math.round(Number(g.css_value_currency_label_radius)*i);Object(l.drawRoundRect)(e,o-c,f,2*c,_,m),e.fillStyle=h.backgroundColor,e.fill();var y=Math.max(1,Math.floor(i));e.lineWidth=y,e.strokeStyle=r?g.css_value_border_color_dark:g.css_value_border_color_light,Object(l.drawRoundRect)(e,o-c+y/2,f+y/2,2*c-y,_-y,m),e.stroke(),e.fillStyle=h.color,e.font=Object(u.makeFont)(this._fontSize,d.CHART_FONT_FAMILY),e.textBaseline="middle",e.textAlign="center",Object(s.drawScaled)(e,i,(function(){return e.fillText(n,o/i,(f+_/2)/i)}))}},e.prototype.show=function(){this._currencyLabel.classList.remove("js-hidden"),this._width=null},e.prototype.hide=function(){this._currencyLabel.classList.add("js-hidden")},e.prototype.setCurrencyInfo=function(e){if(null!==this._currencyInfo&&this._currencyInfo.selectedCurrency===e.selectedCurrency&&this._currencyInfo.readOnly===e.readOnly&&this._currencyInfo.originalCurrencies.size===e.originalCurrencies.size)return this._currencyInfo=e,!1;this._currencyInfo=e;var t=null===e.selectedCurrency?Object(n.t)("Mixed"):e.selectedCurrency;return this._currencyText.textContent!==t&&(this._currencyText.textContent=t,this._width=null),this._arrowDown.classList.contains("js-hidden")!==e.readOnly&&(this._arrowDown.classList.toggle("js-hidden",e.readOnly),this._currencyLabel.classList.toggle(g.readonly,e.readOnly),this._width=null),!0},e.prototype.updateColors=function(e,t){var i=this._currencyLabel.style;i.background=e,i.color=t},e.prototype.currencyInfo=function(){return this._currencyInfo},e.prototype.setFontSize=function(e){this._fontSize=e,this._currencyLabel.style.fontSize=e+"px",this._width=null},e.prototype.setLineHeight=function(e){this._currencyLabel.style.lineHeight=e+"px"},e.prototype.labelTop=function(){return Number(g.css_value_currency_label_top)},e.prototype._tooltipContent=function(){return null===this._currencyInfo?"":null===this._currencyInfo.selectedCurrency?Array.from(this._currencyInfo.currencies).join(", "):""},e}(),S=i("mrSG");i.d(t,"PriceAxisWidgetBase",(function(){return w}));var b={contextMenuEnabled:!0,currencyLabelEnabled:!1,contextMenu:{general:!0,source:!0},pressedMouseMoveScale:!0,croppedTickMarks:!0},w=function(){function e(e,t,i,r,n){var o=this;this._priceScale=null,this._widthCache=new c.TextWidthCache(50),this._tickmarksCache=new _(12,"#000",d.CHART_FONT_FAMILY,""),this._color=null,this._fontSize=null,this._currencyFontSize=0,this._currencyLabelWidth=null,this._isVisible=!0,this._updateTimeout=null,this._currencyMenu=null,this._prevOptimalWidth=0,this._size=null,this._destroyed=!1,this._pane=e,this._undoModel=t,this._properties=i,this._options=Object(a.merge)(Object(a.clone)(b),r),this._rendererOptionsProvider=n, this._cell=document.createElement("div"),this._cell.className="price-axis",this._cell.style.width="25px",this._cell.style.left="0",this._canvasConfiguredHandler=function(){o._recreateTickMarksCache(o._rendererOptionsProvider.options()),o._undoModel.model().lightUpdate()},this._canvasBinding=Object(s.createBoundCanvas)(this._cell,new s.Size(16,16)),this._canvasBinding.subscribeCanvasConfigured(this._canvasConfiguredHandler);var l=this._canvasBinding.canvas;l.style.position="absolute",l.style.zIndex="1",l.style.left="0",l.style.top="0",this._topCanvasConfiguredHandler=function(){return o._undoModel.model().lightUpdate()},this._topCanvasBinding=Object(s.createBoundCanvas)(this._cell,new s.Size(16,16)),this._topCanvasBinding.subscribeCanvasConfigured(this._topCanvasConfiguredHandler);var u=this._topCanvasBinding.canvas;u.style.position="absolute",u.style.zIndex="2",u.style.left="0",u.style.top="0",this._options.currencyLabelEnabled?(this._currencyLabel=new v,this._cell.appendChild(this._currencyLabel.element()),this._currencyLabel.labelElement().addEventListener("click",(function(e){return o._showCurrenciesContextMenu(e)}))):this._currencyLabel=null,this._properties.childs().fontSize.subscribe(this,this._onFontSizeChanged)}return e.prototype.getElement=function(){return this._cell},e.prototype.onOptimalWidthNeedToBeRecalculated=function(){var e=this,t=this.optimalWidth();this._prevOptimalWidth0&&(e=Math.max(this._widthCache.measureText(i,n[0].label),this._widthCache.measureText(i,n[n.length-1].label)));for(var o=this.backLabels(!0),a=o.length;a--;){var c=this._widthCache.measureText(i,o[a].text());e=Math.max(e,c);var u=o[a].secondLineText();u&&(e=Math.max(e,this._widthCache.measureText(i,u)))}}var h=0;this._isCurrencyLabelVisible()&&(null===this._currencyLabelWidth&&(this._currencyLabelWidth=Object(r.ensureNotNull)(this._currencyLabel).width()),h=this._currencyLabelWidth);var d=Math.max(h,Math.ceil(t.borderSize+t.tickLength+t.paddingInner+t.paddingOuter+e));return d+=d%2},e.prototype.getImage=function(){var e=Object(r.ensureNotNull)(this._size),t=Object(s.createDisconnectedCanvas)(document,e);if(Object(s.getPrescaledContext2D)(t).drawImage(this._canvasBinding.canvas,0,0,e.w,e.h),null!==this._currencyLabel&&this._currencyLabel.isVisible()){var i=this._undoModel.model().isDark();this._currencyLabel.drawLabel(Object(s.getContext2D)(t),e.w,Object(s.getCanvasDevicePixelRatio)(t),i)}return t},e.prototype.priceScale=function(){return Object(r.ensureNotNull)(this._priceScale)},e.prototype.setPriceScale=function(e){ this._priceScale!==e&&(null!==this._priceScale&&this._priceScale.onMarksChanged().unsubscribe(this,this.onOptimalWidthNeedToBeRecalculated),this._priceScale=e,null!==e&&e.onMarksChanged().subscribe(this,this.onOptimalWidthNeedToBeRecalculated))},e.prototype.isVisible=function(){return this._isVisible},e.prototype.setVisible=function(e){(e=!!e)!==this._isVisible&&(this._cell.style.display=e?"table-cell":"none",this._isVisible=e)},e.prototype.destroy=function(){null!==this._currencyMenu&&(this._currencyMenu.close(),this._currencyMenu=null),this._topCanvasBinding.unsubscribeCanvasConfigured(this._topCanvasConfiguredHandler),this._topCanvasBinding.destroy(),this._canvasBinding.unsubscribeCanvasConfigured(this._canvasConfiguredHandler),this._canvasBinding.destroy(),null!==this._priceScale&&this._priceScale.onMarksChanged().unsubscribe(this,this.onOptimalWidthNeedToBeRecalculated),this._priceScale=null,this._updateTimeout&&(clearTimeout(this._updateTimeout),this._updateTimeout=null),this._properties.childs().fontSize.unsubscribe(this,this._onFontSizeChanged),this._destroyed=!0},e.prototype.backgroundColor=function(){return this._pane.state().model().backgroundColor().value()},e.prototype.lineColor=function(){return this._properties.childs().lineColor.value()},e.prototype.textColor=function(){return this._properties.childs().textColor.value()},e.prototype.fontSize=function(){return this._properties.childs().fontSize.value()},e.prototype.baseFont=function(){return Object(u.makeFont)(this.fontSize(),d.CHART_FONT_FAMILY,"")},e.prototype.rendererOptions=function(){var e=this._rendererOptionsProvider.options();return this._color===e.color&&this._fontSize===e.fontSize||(this._recreateTickMarksCache(e),this._color=e.color),this._fontSize!==e.fontSize&&(this._widthCache.reset(),this._fontSize=e.fontSize,this._currencyLabelWidth=null,this._currencyFontSize=0,this.onOptimalWidthNeedToBeRecalculated()),e},e.prototype._isCurrencyLabelVisible=function(){return null!==this._currencyLabel&&this._currencyLabel.isVisible()},e.prototype._updateCurrencyLabel=function(){if(null!==this._currencyLabel){var e=this.priceScale().currency(this._undoModel.model().availableCurrenciesSet());null!==e&&this._properties.childs().showCurrency.value()?(this._currencyLabel.show(),this._currencyLabel.updateColors(this.backgroundColor(),this.textColor()),this._currencyLabel.setCurrencyInfo(e)&&(this._currencyLabelWidth=null,this.onOptimalWidthNeedToBeRecalculated())):this._currencyLabel.hide(),this._updateCurrencyLabelFont()}},e.prototype._currencyLabelLineHeight=function(){var e=this.rendererOptions();return Math.floor(this.fontSize()+e.paddingTop+e.paddingBottom)},e.prototype._updateCurrencyLabelFont=function(){if(null!==this._currencyLabel){var e=this.fontSize();e!==this._currencyFontSize&&(this._currencyLabel.setFontSize(e),this._currencyLabel.setLineHeight(this._currencyLabelLineHeight()),this._currencyFontSize=e,this._currencyLabelWidth=null,this.onOptimalWidthNeedToBeRecalculated())}},e.prototype._recreateTickMarksCache=function(e){ this._tickmarksCache.destroy(),this._tickmarksCache=new _(e.fontSize,e.color,d.CHART_FONT_FAMILY,"")},e.prototype._hasAlertLabel=function(){return!1},e.prototype._currenciesActions=function(){var e=this,t=Object(r.ensureNotNull)(this._currencyLabel).currencyInfo();if(null===t||t.readOnly)return[];var i=[],s=function(e,t,i,r){return new o.Action({label:e,checkable:!0,checked:t,onExecute:i,statName:r})},a=t.selectedCurrency,l=t.originalCurrencies;if(l.size>1){var c=s(Object(n.t)("Mixed"),null===t.selectedCurrency,(function(){return e._undoModel.setPriceScaleCurrency(e.priceScale(),null)}),"Mixed");i.push(c)}if(null!==a){var u=s(a,!0,(function(){return e._undoModel.setPriceScaleCurrency(e.priceScale(),a)}),a);i.push(u)}var h=Array.from(this._pane.state().model().availableCurrenciesSet()),d=h.filter((function(e){return e!==a&&l.has(e)}));d.sort();for(var p=function(r){i.push(s(r,t.selectedCurrency===r,(function(){return e._undoModel.setPriceScaleCurrency(e.priceScale(),r)}),r))},f=0,_=d;f<_.length;f++){p(_[f])}(null!==a||d.length>0)&&i.push(new o.Separator);var m=h.filter((function(e){return e!==a&&!l.has(e)}));m.sort();for(var y=function(r){i.push(s(r,t.selectedCurrency===r,(function(){return e._undoModel.setPriceScaleCurrency(e.priceScale(),r)}),r))},g=0,v=m;gt.cssWidth+this._data.linewidth/2)){var i=t.pixelRatio;e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=Math.max(1,Math.floor(this._data.linewidth*i)),void 0!==this._data.linestyle&&Object(n.setLineStyle)(e,this._data.linestyle);var r=void 0!==this._data.top?Math.max(this._data.top,0):0,s=void 0!==this._data.bottom?Math.min(this._data.bottom,t.cssHeight):t.cssHeight,a=Math.round(this._data.x*i),l=Math.floor(r*i),c=Math.ceil(s*i) ;Object(o.drawVerticalLine)(e,a,l,c)}},e}()},"z61+":function(e,t,i){"use strict";i.d(t,"a",(function(){return f}));var r,n=i("mrSG"),o=i("Eyy1"),s=i("0YCj"),a=i.n(s),l=i("23IT"),c=i("ogJP"),u=i("uOxu"),h=i("W5mg"),d=i("Ecpn"),p=Object(u.getLogger)("Platform.GUI.PropertyDialog.Indicators.MetaInfo"),f=function(){function e(e){this._metaInfo=e}return e.prototype.hasUserEditableInputs=function(){return this._metaInfo.inputs.some(h.a)},e.prototype.getUserEditableInputs=function(){return this._metaInfo.inputs.filter(h.a)},e.prototype.hasUserEditableProperties=function(){return a.a.isScriptStrategy(this._metaInfo)},e.prototype.hasUserEditableStyles=function(){var e=this._metaInfo;return this.getUserEditablePlots().length>0||void 0!==e.bands||void 0!==e.filledAreas||Object(d.a)(e.shortId)||a.a.isScriptStrategy(this._metaInfo)||Object.values(e.graphics).some((function(e){return void 0!==e}))},e.prototype.getUserEditablePlots=function(){var e=new Set,t=this._metaInfo;return t.plots.filter((function(i){if(Object(l.isColorerPlot)(i)||Object(l.isTextColorerPlot)(i)||Object(l.isDataOffsetPlot)(i)||Object(l.isOhlcColorerPlot)(i)||Object(l.isAlertConditionPlot)(i))return!1;if(Object(l.isOhlcPlot)(i)){var r=i.target;if(e.has(r))return!1;e.add(r);var n=Object(o.ensureDefined)(t.ohlcPlots);return!Object(o.ensureDefined)(n[r]).isHidden}var s=t.styles?t.styles[i.id]:void 0;return void 0===s||!s.isHidden}))},e.prototype.hasUserEditableOptions=function(){return this.hasUserEditableInputs()||this.hasUserEditableProperties()||this.hasUserEditableStyles()},e.prototype.getStrategyProperties=function(){for(var e,t=this._metaInfo,i=t.inputs.filter(m),r=Object(n.__assign)({},_),s=0,a=i;s=1e-15&&e<1?e.toFixed(15).replace(/\.?0+$/,""):String(e)},e}()},zZ2k:function(e,t,i){"use strict";i.r(t);var r=i("mrSG"),n=i("Eyy1"),o=i("fgLi"),s=i("hY0g"),a=i.n(s),l=i("KcY8"),c=function(e){function t(t,i,r){var n=e.call(this)||this;return n._source=t,n._priceScale=i,n._priceProvider=r,n}return Object(r.__extends)(t,e),t.prototype.setHitTestData=function(e){this._hitTestData=e},t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var r=this._priceScale.mainSource(),n=null!==r?r.firstValue():null;if(this._isVisible()&&!this._priceScale.isEmpty()&&null!==n){var o=this._priceProvider(this._priceScale);null!==o&&(i.background=this._bgColor(),i.color=this.generateTextColor(i.background),i.coordinate=this._priceScale.priceToCoordinate(o,n),e.text=this._priceScale.formatPrice(o,n),e.visible=!0,t.visible=!0,t.hitTestData=this._hitTestData)}},t}(l.a),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype._isVisible=function(){return this._source.visible&&null!==this._source.pane},t.prototype._bgColor=function(){return"#4c525e"},t}(c),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype._isVisible=function(){return null!==this._source.measurePane()},t.prototype._bgColor=function(){return this._source.model().isDark()?"#1E88E5":"#2196F3"},t}(c),d=i("mMWL"),p=i("qFKp"),f=i("Tmoa"),_=i("8Uy/"),m=i("jFln"),y=i("VdBB"),g=i("gAom"),v=function(){function e(e){this._data=e}return e.prototype.hitTest=function(e){return void 0===this._data.mouseClickHandler?null:new y.HitTestResult(y.HitTestResult.CUSTOM,{mouseClickHandler:this._data.mouseClickHandler})},e.prototype.draw=function(e,t){var i=t.pixelRatio,r=this._data.vertLinesVisible,n=this._data.horzLinesVisible;if(r||n){e.save(),e.lineWidth=Math.max(1,Math.floor(this._data.lineWidth*i)),e.strokeStyle=this._data.color,e.fillStyle=this._data.color,e.lineCap="butt",Object(m.setLineStyle)(e,this._data.lineStyle);var o=Math.round(this._data.x*i),s=Math.round(this._data.y*i),a=Math.ceil(this._data.w*i),l=Math.ceil(this._data.h*i);r&&o>=0&&Object(g.drawVerticalLine)(e,o,0,l),n&&s>=0&&Object(g.drawHorizontalLine)(e,s,0,a),this._data.drawCenter&&(e.beginPath(),e.arc(o,s,Math.round(3*i),0,2*Math.PI,!0),e.fillStyle=this._data.color,e.fill()),e.restore()}},e }(),S=i("CW80"),b=function(){function e(e,t,i){this._rendererData={},this._renderer=new v(this._rendererData),this._source=e,this._pane=t,this._horzVisible=i}return e.prototype.update=function(){},e.prototype.renderer=function(e,t){var i=this._source.visible&&this._source.areLinesVisible,r=Object(d.lockTimeAxis)().value(),n=this._rendererData;if(!i||null===this._pane)return null;n.horzLinesVisible=i&&this._horzVisible,n.vertLinesVisible=i||r;var o,s=this._source.model(),a=this._source.properties(),l=this._source.selectBarMode().value()&&this._source.isOnHoveredChartWidget(),c=p.CheckMobile.any()&&Object(S.isLineToolName)(s.currentTool())&&!l;o=c?s.isDark()?"#1E88E5":"#2196F3":a.childs().color.value();var u=a.childs().transparency.value();return!c&&u>0&&(o=Object(f.generateColor)(o,u)),n.color=o,n.lineWidth=a.childs().width.value(),n.lineStyle=a.childs().style.value(),n.drawCenter=c&&this._pane===this._source.pane,n.w=this._pane.width(),n.h=this._pane.height(),n.x=void 0!==this._source.lockedX&&isFinite(this._source.lockedX)&&this._source.lockedX||this._source.x,n.y=this._source.y,l&&(n.vertLinesVisible=!0,n.lineStyle=_.LINESTYLE_SOLID,n.lineWidth=2,n.color="#ff0000"),this._renderer},e}(),w=i("IjC5"),P=function(){function e(e){this._renderer=new w.RectangleRenderer,this._rectangle=null,this._crosshair=e}return e.prototype.update=function(){var e=this._crosshair.selection();null!==e&&null!==this._crosshair.pane?this._rectangle=this._crosshair.pane.logicalRectToPixels(e):this._rectangle=null},e.prototype.renderer=function(e,t){if(!this._rectangle)return null;var i=this._crosshair.model().isDark(),r={backcolor:i?"rgba(21, 101, 192, 0.3)":"rgba(33, 150, 243, 0.3)",color:i?"rgba(21, 101, 192, 0.8)":"rgba(33, 150, 243, 0.8)",fillBackground:!0,linewidth:1,points:[this._rectangle.min,this._rectangle.max]};return this._renderer.setData(r),this._renderer},e}(),C=i("aO4+"),x=i("Ialn"),T=i("GH0z"),L=i("5C6T"),I=i("nda6"),M=i("pJOz"),O=i("qgcf"),A=i("Zy3/"),k=i("a7Ha"),E=i("zDbI"),D=window.t("{0} bars"),V=new I.TimeSpanFormatter,B=function(){function e(e,t){this._pipFormatter=null,this._lastSymbolInfo=null,this._horzTrenRenderer=new M.TrendLineRenderer,this._vertTrenRenderer=new M.TrendLineRenderer,this._bgRenderer=new w.RectangleRenderer,this._labelRenderer=new O.TextRenderer,this._p1=null,this._p2=null,this._label=null,this._source=e,this._pane=t}return e.prototype.update=function(){var e=this._source.measurePoints(),t=e[0],i=e[1];if(void 0===i)return this._p1=null,void(this._p2=null);var r=Object(n.ensureNotNull)(this._source.measurePane()),o=t.price,s=i.price,a=i.price-o,l=i.index-t.index,c=Object(x.forceLTRStr)(""+l),u=Object(n.ensureNotNull)(r.mainDataSource()),h=Object(n.ensureNotNull)(u.formatter()).format(a);if(Math.abs(o)>1e-8){var d=a/Math.abs(o);h+=" ("+(new T.PercentageFormatter).format(100*d)+")"}var p=Object(x.forceLTRStr)(h);this._label=p+"\n"+D.format(c) ;var f=Object(n.ensureNotNull)(u.firstValue()),m=this._source.model().timeScale().indexToCoordinate(t.index),y=this._source.model().timeScale().indexToCoordinate(i.index),g=r.defaultPriceScale().priceToCoordinate(o,f),v=r.defaultPriceScale().priceToCoordinate(s,f);this._p1=new C.Point(m,g),this._p2=new C.Point(y,v);var S=this._source.model().timeScale().indexToUserTime(t.index),b=this._source.model().timeScale().indexToUserTime(i.index),w=null;if(null!==S&&null!==b){var P=this._pane.model().mainSeries().symbolInfo();null!==P&&P!==this._lastSymbolInfo&&(this._pipFormatter=new L.PipFormatter(P.pricescale,P.minmov,P.type,P.minmove2),this._lastSymbolInfo=P),w=(b.valueOf()-S.valueOf())/1e3}var I=this._pipFormatter?this._pipFormatter.format(a):null,M=null!==I?" , "+I:"",A=null!==w?V.format(w):null,B=null!==A?", "+Object(x.startWithLTR)(A):"";this._label=Object(x.forceLTRStr)(p+M)+"\n"+D.format(c)+B;var R=s=50?k.LineEnd.Arrow:k.LineEnd.Normal};this._horzTrenRenderer.setData(H);var U,Y,G=Math.round(W.x);H={points:[U=new C.Point(G,this._p1.y),Y=new C.Point(G,this._p2.y)],color:N,linewidth:1,linestyle:_.LINESTYLE_SOLID,extendleft:!1,extendright:!1,leftend:k.LineEnd.Normal,rightend:Math.abs(U.y-Y.y)>=50?k.LineEnd.Arrow:k.LineEnd.Normal};this._vertTrenRenderer.setData(H);var q,K={x:0,y:10},Z=.5*(this._p1.x+this._p2.x),J=this._p2.y,X=new C.Point(Z,J),Q=(q=Object(n.ensureNotNull)(this._label),{points:[X],text:q,color:"#FFFFFF",horzAlign:"center",vertAlign:"middle",font:E.CHART_FONT_FAMILY,offsetX:K.x,offsetY:K.y,bold:!1,italic:!1,fontsize:12,padding:8,highlightBorder:!1,backgroundColor:F,backgroundTransparency:10,backgroundVertInflate:5,backgroundHorzInflate:5,backgroundRoundRect:4});this._labelRenderer.setData(Q);var $=this._labelRenderer.measure(),ee=Object(O.calculateLabelPosition)($,this._p1,this._p2,K,this._pane.height());this._labelRenderer.setPoints([ee])},e.prototype.renderer=function(){if(null===this._p1||null===this._p2)return null;var e=new A.CompositeRenderer;return e.append(this._bgRenderer),e.append(this._horzTrenRenderer),e.append(this._vertTrenRenderer),e.append(this._labelRenderer),e},e}(),R=function(e){function t(t){var i=e.call(this)||this;return i._data=t,i}return Object(r.__extends)(t,e),t.prototype.hitTest=function(e){return null},t.prototype._drawImpl=function(e){e.translate(this._data.x-this._data.width/2,this._data.y-this._data.height/2),e.strokeStyle="rgba(153,153,153,.3)",e.lineWidth=2,e.beginPath(),this._drawShackle(e),e.stroke(),e.closePath(),e.strokeStyle="rgba(153,153,153,.7)",e.lineWidth=1,e.beginPath(), e.rect(0,this._data.height-this._data.bodyHeight+.5,this._data.width,this._data.bodyHeight),e.closePath(),e.stroke(),e.translate(0,-1),e.strokeStyle="#777",e.beginPath(),this._drawShackle(e),e.stroke(),e.closePath(),e.fillStyle="rgba(255,255,255,.7)",e.beginPath(),e.rect(1,this._data.height-this._data.bodyHeight+1.5,this._data.width-2,this._data.bodyHeight-2),e.fill(),e.beginPath(),e.rect(.5,this._data.height-this._data.bodyHeight+1,this._data.width-1,this._data.bodyHeight-1),e.stroke(),e.closePath(),e.fillStyle="#777",e.fillRect(this._data.width/2-.5,this._data.height-this._data.bodyHeight/2,1,2)},t.prototype._drawShackle=function(e){var t=(this._data.width-3)/2,i=this._data.height-this._data.bodyHeight;e.moveTo(1.5,t),e.arc(this._data.width/2,t,t,Math.PI,2*Math.PI),i>t&&(e.moveTo(1.5,t),e.lineTo(1.5,i),e.moveTo(this._data.width-1.5,t),e.lineTo(this._data.width-1.5,i))},t}(i("cPgM").ScaledPaneRenderer),N=function(){function e(e,t,i){this._horzVisible=!1,this._source=e,this._pane=t,this._axis=i||"x"}return e.prototype.update=function(){},e.prototype.renderer=function(e,t){var i=this._source.visible&&this._source.areLinesVisible,r=Object(d.lockTimeAxis)().value(),o=i&&this._horzVisible,s=i||r;if("y"===this._axis&&!o||!s)return null;var a="y"===this._axis?this._pane.width()-4.5:Object(n.ensureDefined)(this._source.lockedX)+1,l="y"===this._axis?this._source.y:this._pane.height()-5.5-1;return new R({x:a,y:l,width:9,height:11,bodyHeight:7})},e}();i.d(t,"CrosshairBase",(function(){return j}));var F={menuEnabled:!1,menuForMainSourceOnly:!1,disableTradingMenuActions:!1},j=function(e){function t(t,i){var r=e.call(this)||this;r._measurePane=null,r._startMeasurePoint=null,r._endMeasurePoint=null,r._lastValidMeasurePoint=null,r._isOnHoveredChartWidget=!1,r._selectBarMode=new a.a(!1),r._selectionPane=null,r._selectionView=new P(r),r._selectionStartPoint=null,r._measurePaneView=null,r._timeLockPaneView=null,r._priceAxisViews=new Map,r._panePriceAxisViews=new Map,r._startMeasurePriceAxisViews=new Map,r._endMeasurePriceAxisViews=new Map,r._model=t,r._options=Object.assign({},F,i||{}),r._linesShouldBeHidden=r._model.readOnly();var o=function(e){return function(t){return t===Object(n.ensureNotNull)(r._measurePane).defaultPriceScale()?e():null}};return r._currentPosPriceProvider=function(e){var t=Object(n.ensureNotNull)(r.pane);if(e===t.defaultPriceScale())return r.price;var i=Object(n.ensureNotNull)(t.defaultPriceScale().mainSource()).firstValue();if(null===i)return null;var o=t.defaultPriceScale().priceToCoordinate(r.price,i),s=Object(n.ensureNotNull)(e.mainSource()).firstValue();return null===s?null:e.coordinateToPrice(o,s)},r._startMeasurePriceProvider=o((function(){return Object(n.ensureNotNull)(r._startMeasurePoint).price})),r._endMeasurePriceProvider=o((function(){return Object(n.ensureNotNull)(r._lastMeasurePoint()).price})),r}return Object(r.__extends)(t,e),t.prototype.startMeasurePoint=function(){return this._startMeasurePoint||null},t.prototype.endMeasurePoint=function(){return this._endMeasurePoint||null}, t.prototype.measurePane=function(){return this._measurePane||null},t.prototype.startMeasuring=function(e,t){this._startMeasurePoint=e,this._measurePane=t},t.prototype.finishMeasure=function(e){this._endMeasurePoint=e},t.prototype.clearMeasure=function(){delete this._measurePane,delete this._startMeasurePoint,delete this._endMeasurePoint,delete this._lastValidMeasurePoint,this._model.lightUpdate()},t.prototype.measurePoints=function(){this.updateAllViews();var e=[Object(n.ensureNotNull)(this._startMeasurePoint)],t=this._lastMeasurePoint();return null!==t&&e.push(t),e},t.prototype.startSelection=function(e){this._selectionStartPoint=this.currentLogicalPoint(),this._selectionPane=e},t.prototype.clearSelection=function(){this._selectionStartPoint=null,this._selectionPane=null},t.prototype.selection=function(){return this._selectionStartPoint?{p1:this._selectionStartPoint,p2:this.currentLogicalPoint()}:null},t.prototype.currentLogicalPoint=function(){return{index:this.appliedIndex(),price:this.price}},t.prototype.priceAxisViews=function(e,t){var i=[];return this._selectBarMode.value()&&this._isOnHoveredChartWidget||this.pane!==e||i.push(this._createPriceAxisViewOnDemand(this._priceAxisViews,this._panePriceAxisViews,e,t,this._currentPosPriceProvider,u,!0)),this._startMeasurePoint&&i.push(this._createPriceAxisViewOnDemand(this._startMeasurePriceAxisViews,null,e,t,this._startMeasurePriceProvider,h)),this._lastMeasurePoint()&&i.push(this._createPriceAxisViewOnDemand(this._endMeasurePriceAxisViews,null,e,t,this._endMeasurePriceProvider,h)),i},t.prototype.timeAxisViews=function(){var e=[];return this._linesShouldBeHidden||!this.visible&&!Object(d.lockTimeAxis)().value()||e.push(this._timeAxisView),this._startMeasurePoint&&e.push(this._startMeasureTimeAxisView),this._lastMeasurePoint()&&e.push(this._endMeasureTimeAxisView),e},t.prototype.paneViews=function(e){if(void 0===e)return null;var t=this._selectBarMode.value()&&this._isOnHoveredChartWidget,i=e===this.pane&&!t,r=[new b(this,e,i)];return e===this._selectionPane&&r.push(this._selectionView),e===this._measurePane&&(null===this._measurePaneView&&(this._measurePaneView=new B(this,e)),this._measurePaneView.update(),r.push(this._measurePaneView)),Object(d.lockTimeAxis)().value()&&(null===this._timeLockPaneView&&(this._timeLockPaneView=new N(this,e)),r.push(this._timeLockPaneView)),r},t.prototype.updateAllViews=function(){this._priceAxisViews.forEach((function(e){e.forEach((function(e){return e.update()}))})),this._panePriceAxisViews.forEach((function(e){e.forEach((function(e){return e.update()}))})),this._startMeasurePoint&&(this._startMeasurePriceAxisViews.forEach((function(e){e.forEach((function(e){return e.update()}))})),this._startMeasureTimeAxisView.update()),this._lastMeasurePoint()&&(this._endMeasurePriceAxisViews.forEach((function(e){e.forEach((function(e){return e.update()}))})),this._endMeasureTimeAxisView.update()),this._timeAxisView.update(),this._selectionView.update(),this._dataWindowView.update()},t.prototype._lastMeasurePoint=function(){ return this._endMeasurePoint?this._endMeasurePoint:(null!==this.pane&&this._measurePane===this.pane&&(this._lastValidMeasurePoint={price:this._model.magnet().align(this.price,this.index,this.pane),index:this.index}),this._lastValidMeasurePoint||null)},t.prototype._createPriceAxisViewOnDemand=function(e,t,i,r,n,o,s){var a=this;void 0===s&&(s=!1);var l=e.get(i),c=null!==t?t.get(i):void 0;void 0===l&&(l=new Map,e.set(i,l),s&&i.onDestroyed().subscribe(this,(function(){return a._onPaneDestroyed(i)})));var u=l.get(r);if(void 0===u){if(u=new o(this,r,n),l.set(r,u),void 0!==c){var h=new CrosshairMenuView(u,this,r,this._model,{menuForMainSourceOnly:this._options.menuForMainSourceOnly});c.set(r,h)}s&&r.lastSourceRemoved().subscribe(this,(function(){return a._onPriceScaleCleared(r)}))}return u},t.prototype._onPaneDestroyed=function(e){e.onDestroyed().unsubscribeAll(this),this._priceAxisViews.delete(e),this._panePriceAxisViews.delete(e),this._startMeasurePriceAxisViews.delete(e),this._endMeasurePriceAxisViews.delete(e)},t.prototype._onPriceScaleCleared=function(e){e.lastSourceRemoved().unsubscribeAll(this),this._priceAxisViews.forEach((function(t){return t.delete(e)})),this._panePriceAxisViews.forEach((function(t){return t.delete(e)})),this._startMeasurePriceAxisViews.forEach((function(t){return t.delete(e)})),this._endMeasurePriceAxisViews.forEach((function(t){return t.delete(e)}))},t}(o.DataSource)},zZ5f:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("5rJj"),o=i("hayr").propertyPages,s=window.t("Fib Speed Resistance Fan");function a(e,t){this._constructor="LineToolFibSpeedResistanceFan";var n=t||a.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("xp9B").FibSpeedResistanceFanPaneView;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"Fib Speed Resistance Fan"},a.prototype.processErase=function(e,t){var i="h"===t.type?"hlevel"+t.index:"vlevel"+t.index,r=this.properties()[i].visible;e.setProperty(r,!1,"Erase level line")},a.prototype.getStylesPropertyPage=function(){return o.LineToolFibSpeedResistanceFanStylesPropertyPage},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("2PB4").FibSpeedResistanceFanDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){void 0!==e&&void 0===e.reverse&&(e.reverse=!0);var t=new n("linetoolfibspeedresistancefan",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.LineToolFibSpeedResistanceFan=a},ziJ5:function(e,t,i){"use strict";(function(e){ var r=i("QIuV"),n=i("Ss5c").LineDataSource,o=i("RTYN").PositionAveragePriceAxisView,s=i("jkoZ"),a=i("Ocx9").DefaultProperty,l=i("kcTO").PriceFormatter,c=i("s1Gx").sortSourcesPreOrdered.LineToolPosition;function u(e){this._line=e,this._data={bodyText:"position",quantityText:"0"},this._closeEnabled=!0,this._direction="buy",this._profitState="neutral"}function h(e){return null==e?e="":e+="",e}function d(e,t){this._adapter=new u(this),this._constructor="LineToolPosition";var n=t||d.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("GzSs").PositionPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);var o=e.mainSeries().symbolInfo(),s=null!==o?o.pricescale:100,a=null!==o&&o.fractional?o.minmov:1,c=null!==o&&o.fractional,h=null!==o?o.minmove2:void 0;this._formatter=new l(s,a,c,h)}u.prototype.setDirection=function(e){return this._direction=e,this._line.updateAllViewsAndRedraw(),this},u.prototype.setProfitState=function(e){return this._profitState=e,this._line.updateAllViewsAndRedraw(),this},u.prototype.getPrice=function(){return this._line.points().length>0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0},u.prototype.setPrice=function(e){if(this._line.points().length>0){var t=this._line.points()[0];t.price=e,this._line._points[0]=t,this._line.normalizePoints(),this._line.updateAllViewsAndRedraw()}return this._line._timePoint.length>0&&(this._line._timePoint[0].price=e),this},u.prototype.getText=function(){return this._data.bodyText},u.prototype.setText=function(e){return this._data.bodyText=e||"",this._line.updateAllViewsAndRedraw(),this},u.prototype.setTooltip=function(e){return this._line.properties().tooltip.setValue(h(e)),this},u.prototype.getTooltip=function(){return this._line.properties().tooltip.value()},u.prototype.setProtectTooltip=function(e){return this._line.properties().protectTooltip.setValue(h(e)),this},u.prototype.getProtectTooltip=function(){return this._line.properties().protectTooltip.value()},u.prototype.setCloseTooltip=function(e){return this._line.properties().closeTooltip.setValue(h(e)),this},u.prototype.getCloseTooltip=function(){return this._line.properties().closeTooltip.value()},u.prototype.setReverseTooltip=function(e){return this._line.properties().reverseTooltip.setValue(h(e)),this},u.prototype.getReverseTooltip=function(){return this._line.properties().reverseTooltip.value()},u.prototype.getQuantity=function(){return this._data.quantityText},u.prototype.setQuantity=function(e){return this._data.quantityText=e||"",this._line.updateAllViewsAndRedraw(),this},u.prototype.getExtendLeft=function(){var e=this._line.properties().extendLeft.value();return"inherit"===e?this._line._model.properties().tradingProperties.extendLeft.value():e},u.prototype.setExtendLeft=function(e){return this._line.properties().extendLeft.setValue(e),this},u.prototype.getLineLength=function(){var e=this._line.properties().lineLength.value() ;return"inherit"===e?this._line._model.properties().tradingProperties.lineLength.value():e},u.prototype.setLineLength=function(e){return this._line.properties().lineLength.setValue(Math.max(0,Math.min(e,100))),this},u.prototype.getLineColor=function(){var e=this._line.properties();return("buy"===this._direction?e.lineBuyColor:e.lineSellColor).value()},u.prototype.setLineColor=function(e){return"buy"===this._direction?this.setLineBuyColor(e):this.setLineSellColor(e),this},u.prototype.setLineBuyColor=function(e){return this._line.properties().lineBuyColor.setValue(e),this},u.prototype.setLineSellColor=function(e){return this._line.properties().lineSellColor.setValue(e),this},u.prototype.getLineStyle=function(){var e=this._line.properties().lineStyle.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineStyle.value():e},u.prototype.setLineStyle=function(e){return this._line.properties().lineStyle.setValue(e),this},u.prototype.getLineWidth=function(){var e=this._line.properties().lineWidth.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineWidth.value():e},u.prototype.setLineWidth=function(e){return this._line.properties().lineWidth.setValue(e),this},u.prototype.getBodyBorderColor=function(){var e=this._line.properties();return("buy"===this._direction?e.bodyBorderBuyColor:e.bodyBorderSellColor).value()},u.prototype.setBodyBorderColor=function(e){return"buy"===this._direction?this.setBodyBorderBuyColor(e):this.setBodyBorderSellColor(e),this},u.prototype.setBodyBorderBuyColor=function(e){return this._line.properties().bodyBorderBuyColor.setValue(e),this},u.prototype.setBodyBorderSellColor=function(e){return this._line.properties().bodyBorderSellColor.setValue(e),this},u.prototype.getBodyBackgroundColor=function(){return s.getColorFromProperties(this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency)},u.prototype.setBodyBackgroundColor=function(e){return s.setColorToProperties(e,this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency),this},u.prototype.getBodyTextColor=function(){var e=this._line.properties();return("positive"===this._profitState?e.bodyTextPositiveColor:"negative"===this._profitState?e.bodyTextNegativeColor:e.bodyTextNeutralColor).value()},u.prototype.setBodyTextColor=function(e){return"positive"===this._profitState?this.setBodyTextPositiveColor(e):"negative"===this._profitState?this.setBodyTextNegativeColor(e):this.setBodyTextNeutralColor(e),this},u.prototype.setBodyTextPositiveColor=function(e){return this._line.properties().bodyTextPositiveColor.setValue(e),this},u.prototype.setBodyTextNegativeColor=function(e){return this._line.properties().bodyTextNegativeColor.setValue(e),this},u.prototype.setBodyTextNeutralColor=function(e){return this._line.properties().bodyTextNeutralColor.setValue(e),this},u.prototype.getBodyFont=function(){ return s.getFontFromProperties(this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic)},u.prototype.setBodyFont=function(e){return s.setFontToProperties(e,this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic),this},u.prototype.getQuantityBorderColor=function(){var e=this._line.properties();return("buy"===this._direction?e.quantityBorderBuyColor:e.quantityBorderSellColor).value()},u.prototype.setQuantityBorderColor=function(e){return"buy"===this._direction?this.setQuantityBorderBuyColor(e):this.setQuantityBorderSellColor(e),this},u.prototype.setQuantityBorderBuyColor=function(e){return this._line.properties().quantityBorderBuyColor.setValue(e),this},u.prototype.setQuantityBorderSellColor=function(e){return this._line.properties().quantityBorderSellColor.setValue(e),this},u.prototype.getQuantityBackgroundColor=function(){var e=this._line.properties();return("buy"===this._direction?e.quantityBackgroundBuyColor:e.quantityBackgroundSellColor).value()},u.prototype.setQuantityBackgroundColor=function(e){return"buy"===this._direction?this.setQuantityBackgroundBuyColor(e):this.setQuantityBackgroundSellColor(e),this},u.prototype.setQuantityBackgroundBuyColor=function(e){return this._line.properties().quantityBackgroundBuyColor.setValue(e),this},u.prototype.setQuantityBackgroundSellColor=function(e){return this._line.properties().quantityBackgroundSellColor.setValue(e),this},u.prototype.getQuantityTextColor=function(){return s.getColorFromProperties(this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency)},u.prototype.setQuantityTextColor=function(e){return s.setColorToProperties(e,this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency),this},u.prototype.getQuantityFont=function(){return s.getFontFromProperties(this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic)},u.prototype.setQuantityFont=function(e){return s.setFontToProperties(e,this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic),this},u.prototype.getReverseButtonBorderColor=function(){var e=this._line.properties();return("buy"===this._direction?e.reverseButtonBorderBuyColor:e.reverseButtonBorderSellColor).value()},u.prototype.setReverseButtonBorderColor=function(e){return"buy"===this._direction?this.setReverseButtonBorderBuyColor(e):this.setReverseButtonBorderSellColor(e),this},u.prototype.setReverseButtonBorderBuyColor=function(e){return this._line.properties().reverseButtonBorderBuyColor.setValue(e),this},u.prototype.setReverseButtonBorderSellColor=function(e){return this._line.properties().reverseButtonBorderSellColor.setValue(e),this}, u.prototype.getReverseButtonBackgroundColor=function(){return s.getColorFromProperties(this._line.properties().reverseButtonBackgroundColor,this._line.properties().reverseButtonBackgroundTransparency)},u.prototype.setReverseButtonBackgroundColor=function(e){return s.setColorToProperties(e,this._line.properties().reverseButtonBackgroundColor,this._line.properties().reverseButtonBackgroundTransparency),this},u.prototype.getReverseButtonIconColor=function(){var e=this._line.properties();return("buy"===this._direction?e.reverseButtonIconBuyColor:e.reverseButtonIconSellColor).value()},u.prototype.setReverseButtonIconColor=function(e){return"buy"===this._direction?this.setReverseButtonIconBuyColor(e):this.setReverseButtonIconSellColor(e),this},u.prototype.setReverseButtonIconBuyColor=function(e){return this._line.properties().reverseButtonIconBuyColor.setValue(e),this},u.prototype.setReverseButtonIconSellColor=function(e){return this._line.properties().reverseButtonIconSellColor.setValue(e),this},u.prototype.getCloseButtonBorderColor=function(){var e=this._line.properties();return("buy"===this._direction?e.closeButtonBorderBuyColor:e.closeButtonBorderSellColor).value()},u.prototype.setCloseButtonBorderColor=function(e){return"buy"===this._direction?this.setCloseButtonBorderBuyColor(e):this.setCloseButtonBorderSellColor(e),this},u.prototype.setCloseButtonBorderBuyColor=function(e){return this._line.properties().closeButtonBorderBuyColor.setValue(e),this},u.prototype.setCloseButtonBorderSellColor=function(e){return this._line.properties().closeButtonBorderSellColor.setValue(e),this},u.prototype.getCloseButtonBackgroundColor=function(){return s.getColorFromProperties(this._line.properties().closeButtonBackgroundColor,this._line.properties().closeButtonBackgroundTransparency)},u.prototype.setCloseButtonBackgroundColor=function(e){return s.setColorToProperties(e,this._line.properties().closeButtonBackgroundColor,this._line.properties().closeButtonBackgroundTransparency),this},u.prototype.getCloseButtonIconColor=function(){var e=this._line.properties();return("buy"===this._direction?e.closeButtonIconBuyColor:e.closeButtonIconSellColor).value()},u.prototype.setCloseButtonIconColor=function(e){return"buy"===this._direction?this.setCloseButtonIconBuyColor(e):this.setCloseButtonIconSellColor(e),this},u.prototype.setCloseButtonIconBuyColor=function(e){return this._line.properties().closeButtonIconBuyColor.setValue(e),this},u.prototype.setCloseButtonIconSellColor=function(e){return this._line.properties().closeButtonIconSellColor.setValue(e),this},u.prototype.block=function(){this._blocked=!0,this._line.updateAllViewsAndRedraw()},u.prototype.unblock=function(){this._blocked=!1,this._line.updateAllViewsAndRedraw()},u.prototype.isFunction=function(e){return"function"==typeof e},u.prototype.onReverse=function(e,t){return t?this.isFunction(t)&&(this._onReverseData=e,this._onReverseCallback=t):this.isFunction(e)&&(this._onReverseCallback=e),this},u.prototype.callOnReverse=function(){ this.isFunction(this._onReverseCallback)&&this._onReverseCallback.call(this,this._onReverseData)},u.prototype.isOnReverseCallbackPresent=function(){return this.isFunction(this._onReverseCallback)},u.prototype.onClose=function(e,t){return t?this.isFunction(t)&&(this._onCloseData=e,this._onCloseCallback=t):this.isFunction(e)&&(this._onCloseCallback=e),this},u.prototype.setCloseEnabled=function(e){return this._closeEnabled===e||(this._closeEnabled=e,this._onCloseCallback&&this._line.updateAllViewsAndRedraw()),this},u.prototype.isCloseEnabled=function(){return this._closeEnabled},u.prototype.callOnClose=function(){this.isFunction(this._onCloseCallback)&&this._closeEnabled&&this._onCloseCallback.call(this,this._onCloseData)},u.prototype.isOnCloseCallbackPresent=function(){return this._closeEnabled&&this.isFunction(this._onCloseCallback)},u.prototype.onModify=function(e,t){return t?this.isFunction(t)&&(this._onModifyData=e,this._onModifyCallback=t):this.isFunction(e)&&(this._onModifyCallback=e),this},u.prototype.callOnModify=function(){this.isFunction(this._onModifyCallback)&&this._onModifyCallback.call(this,this._onModifyData)},u.prototype.onContextMenu=function(e,t){return t?this.isFunction(t)&&(this._onContextMenuData=e,this._onContextMenuCallback=t):this.isFunction(e)&&(this._onContextMenuCallback=e),this},u.prototype.shouldShowContextMenu=function(){return this.isFunction(this._onContextMenuCallback)},u.prototype.callOnContextMenu=function(){if(this.isFunction(this._onContextMenuCallback))return this._onContextMenuCallback.call(this,this._onContextMenuData)},u.prototype.remove=function(){this._line._model.removeSource(this._line),delete this._line},inherit(d,r),d.prototype.zorder=function(){return c},d.prototype.setPoint=function(e,t,i){this._points[e]=t,this.normalizePoints()},d.prototype.addPoint=function(e,t){return this._points.push(e),this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0},d.prototype.translatedType=function(){return"Position"},d.prototype.name=function(){return"Position"},d.prototype.createPriceAxisView=function(e){return this._priceAxisView=new o(this,{pointIndex:e,backgroundPropertyGetter:this._adapter.getLineColor.bind(this._adapter)}),this._priceAxisView},d.prototype.paneViews=function(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showPositions.value()?n.prototype.paneViews.call(this):null},d.prototype.priceAxisViews=function(t,i){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showPositions.value()?n.prototype.priceAxisViews.call(this,t,i):null},d.prototype.hasContextMenu=function(){return this._adapter.shouldShowContextMenu()},d.prototype.contextMenuItems=function(){return this._adapter.callOnContextMenu()},d.prototype.formatter=function(){return this._formatter},d.createProperties=function(e){var t=new a("linetoolposition",e,!1,!1);return d._configureProperties(t),t},d._configureProperties=function(e){r._configureProperties(e)}, t.LineToolPosition=d}).call(this,i("Kxc7"))},zoPk:function(e,t,i){"use strict";function r(e){var t,i;return e.hasChild("val")&&e.hasChild("res")?{val:null===(t=e.childs())||void 0===t?void 0:t.val.value(),res:null===(i=e.childs())||void 0===i?void 0:i.res.value()}:{}}i.r(t),i.d(t,"timeFramePropertyState",(function(){return r}))},zqZp:function(e,t,i){"use strict";var r=i("Ss5c").LineDataSource,n=i("Ocx9").DefaultProperty,o=i("hayr").propertyPages,s=window.t("Price Label");function a(e,t){this._constructor="LineToolPriceLabel";var n=t||a.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("Ni7V").PriceLabelPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,r),a.prototype.pointsCount=function(){return 1},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Price Label"},a.prototype.getStylesPropertyPage=function(){return o.LineToolPriceLabelStylesPropertyPage},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("hQgR").PriceLabelDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetoolpricelabel",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolPriceLabel=a}},[["u8U4","runtime","vendors"]]]);