(window.webpackJsonp=window.webpackJsonp||[]).push([["library"],{"+6ja":function(e,t,i){"use strict";function n(e){for(var t=0;t0&&(t=this._points[this._points.length-1],i=this.pointToScreenPoint(t)[1],this.pointToScreenPoint(e)[1].subtract(i).length()<2)?this._finished:(o.prototype.addPoint.call(this,e),this._finished))},n.prototype.restorePoints=function(e,t,i){o.prototype.restorePoints.call(this,e,t,i),this._finished=!0},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return s.LineToolBrushStylesPropertyPage},t.LineToolBrush=n},"//lt":function(e,t,i){"use strict";var n;i.r(t),i.d(t,"PaneCursorType",function(){return n}),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"}(n||(n={}))},"/3z9":function(e,t,i){"use strict";function n(e){var t=0;return e.shiftKey&&(t+=1024),e.altKey&&(t+=512),e.ctrlKey&&(t+=256),e.metaKey&&(t+=2048),t}function o(e){return n(e)|e.keyCode}function r(e){var t="";return 256&e&&(t+=l?"^":"Ctrl + "),512&e&&(t+=l?"⌥":"Alt + "),1024&e&&(t+=l?"⇧":"Shift + "),2048&e&&(t+=l?"⌘":"Win + "),t}function s(e){var t=r(e),i=255&e;return t+=i in u?u[i]:i>>>4==7?"F"+(i%16+1):String.fromCharCode(i)}var a,l,c,u;i.r(t),i.d(t,"isMacKeyboard",function(){return l}),i.d(t,"Modifiers",function(){return c}),i.d(t,"modifiersFromEvent",function(){return n}),i.d(t,"hashFromEvent",function(){return o}),i.d(t,"humanReadableModifiers",function(){return r}),i.d(t,"humanReadableHash",function(){return s}),a=i("qFKp"),l=Object(a.isMac)()||a.CheckMobile.iOS(),function(e){e[e.Alt=512]="Alt",e[e.Shift=1024]="Shift",e[e.Mod=l?2048:256]="Mod",e[e.Control=256]="Control",e[e.Meta=2048]="Meta"}(c||(c={})),u={9:"⇥",27:"Esc"}},"/5ju":function(e,t,i){"use strict";function n(e,t,i,n){return r.__awaiter(this,void 0,void 0,function(){var o;return r.__generator(this,function(r){return o=new s.SaveRenameDialog({fields:[new a.InputField({name:g,label:e+":",error:t,maxLength:64})],title:i}),void 0!==n&&o.setField(g,n),[2,o.show().then(function(e){return e[g]})]})})}function o(){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){return[2,new Promise(function(e){ c.enabled("saved_charts_count_restriction")&&window.is_authenticated&&!window.user.is_pro?Object(l.getChartsCount)(function(t){e(t<5)}):e(!0)})]})})}var r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S;i.r(t),i.d(t,"SaveChartService",function(){return S}),r=i("mrSG"),s=i("UJLt"),a=i("hkLy"),l=i("lhgw"),c=i("Kxc7"),u=i("tITk"),h=i("hY0g"),d=i.n(h),p=i("FQhm"),_=i("htUT"),f=i("/z0S"),m=i("BxxN"),y={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"})},g="chart-title",v=6e4,S=function(){function e(e,t){this._autosaveTimer=null,this._watchedAutoSaveEnabled=new d.a,this._toggleAutoSaveEnabledHandler=this._toggleAutoSaveEnabled.bind(this),this._chartWidgetCollection=e,this._chartSaver=t,this._chartChangesWatcher=new _.ChartChangesWatcher(e.undoHistory,t,p),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 r.__awaiter(this,void 0,void 0,function(){var e,t;return r.__generator(this,function(i){switch(i.label){case 0:return e=this._chartWidgetCollection,[4,o()];case 1:return i.sent()?[4,function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){return[2,n(y.labelRename,y.error,y.titleCopy,y.valueCopy.format(e))]})})}(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(f.a)(this.cloneChart.bind(this),{source:"Clone chart"})},e.prototype.renameChart=function(){var e=this;Object(f.a)(function(){return r.__awaiter(e,void 0,void 0,function(){var e,t;return r.__generator(this,function(i){switch(i.label){case 0:return e=this._chartWidgetCollection,[4,function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){return[2,n(y.labelRename,y.error,y.titleRename,e)]})})}(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 r.__awaiter(this,void 0,void 0,function(){var s,a,l;return r.__generator(this,function(c){switch(c.label){case 0:return s=this._chartWidgetCollection,a=s.metaInfo.name.value(),[4,o()];case 1:return c.sent()?[4,function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){return[2,n(y.labelRename,y.error,y.titleNew,e)]})})}(a)]:[3,3];case 2:return l=c.sent(),s.metaInfo.name.setValue(l),this._doSave(e,t,i),[3,5];case 3:return[3,5];case 4:c.sent().open(),c.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 n=this,o=window.saver.isSaveInProcess(),r=this._chartChangesWatcher.hasChanges(),s=!!this._chartWidgetCollection.metaInfo.id.value();window.is_authenticated&&(o||!r&&s)||Object(f.a)(function(){null!=n._chartWidgetCollection.metaInfo.id.value()?n.saveExistentChart(e,t,i):n.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(f.a)(function(){e?Object(u.trackEvent)("Autosave","On"):Object(u.trackEvent)("Autosave","Off"),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;c.enabled("saveload_storage_customization")?(t.metaInfo.uid.deleteValue(),t.metaInfo.id.deleteValue(),t.metaInfo.name.setValue(e),this._doSave()):window.open(Object(m.a)({clone:t.metaInfo.uid.value(),name:e}),"_blank")},e.prototype._doSave=function(e,t,i){var n=this._chartWidgetCollection;void 0!==e&&e(),this._chartSaver.saveChartSilently(function(e){var i;Object(u.trackEvent)("GUI","Save Chart Layout"),i=n.metaInfo.uid.value(),"/chart/"===location.pathname&&(location.href="/chart/"+i),void 0!==t&&t(e)},function(){void 0!==i&&i()})},e.prototype._startAutosave=function(){var e=this;c.enabled("charts_auto_save")&&null===this._autosaveTimer&&(this._autosaveTimer=setTimeout(function(){e._autosaveTimer=null,e._chartWidgetCollection.metaInfo.id.value()&&e._doSave()},v))},e.prototype._stopAutosave=function(){null!==this._autosaveTimer&&(clearInterval(this._autosaveTimer),this._autosaveTimer=null)},e}()},"/DxK":function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolHorzLine";var n=t||new a("linetoolhorzline");n.hasChild("text")||n.addChild("text",new s("")),n.addExclusion("text"),this._priceAxisView=new r(this),o.call(this,e,n),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)}var o=i("Ss5c").LineDataSource,r=i("p1SQ").LineToolHorzLinePriceAxisView,s=i("tc+8"),a=i("Ocx9").DefaultProperty,l=i("hayr").propertyPages;inherit(n,o),n.prototype.state=function(e){var t=o.prototype.state.call(this,e);return t.points&&0!==t.points.length&&(t.points[0].offset=0),t},n.prototype.pointsCount=function(){return 1},n.prototype.title=function(){return"Horizontal Line"},n.prototype.name=function(){ return"Horizontal Line"},n.prototype.priceAxisViews=function(e,t){return this.isSourceHidden()?null:t===this.priceScale()&&this.properties().showPrice.value()&&this._model.paneForSource(this)===e?[this._priceAxisView]:null},n.prototype.updateAllViews=function(){o.prototype.updateAllViews.call(this),this._priceAxisView.update()},n.prototype.canHasAlert=function(){return!0},n.prototype._getAlertPlots=function(){return[this.points()[0].price]},n.prototype.getInputsPropertyPage=function(){return l.LineToolHorzLineInputsPropertyPage},n.prototype.getStylesPropertyPage=function(){return l.LineToolHorzLineStylesPropertyPage},t.LineToolHorzLine=n},"/McG":function(e){e.exports={content:{chartProperties:{scalesProperties:{textColor:"#50535E",lineColor:"#50535E",backgroundColor:"#ffffff"},paneProperties:{gridProperties:{color:"#e1ecf2"},background:"#ffffff"}},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.05)",topFillColor2:"rgba( 38, 166, 154, 0.05)",bottomFillColor1:"rgba( 239, 83, 80, 0.05)",bottomFillColor2:"rgba( 239, 83, 80, 0.05)",topLineColor:"rgba( 38, 166, 154, 1)",bottomLineColor:"rgba( 239, 83, 80, 1)"},areaStyle:{transparency:95,color1:"#2196f3",color2:"#2196f3",linecolor:"#2196f3",linewidth:3,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:3,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";var n,o,r,s,a;i.r(t),i.d(t,"MoveToNewPriceScaleUndoCommand",function(){return s}),i.d(t,"MoveToExistingPriceScaleUndoCommand",function(){return a}),n=i("mrSG"),o=i("Eyy1"),r=function(e){function t(t,i,n,o){var r=e.call(this,t,i,o)||this;return r._sourcePaneRemoved=!1,r._targetPaneIndex=t.panes().indexOf(n),r}return n.__extends(t,e),t.prototype.redo=function(){ var e,t,i,n,r=this._chartModel.panes()[this._initialPaneIndex],s=this._chartModel.panes()[this._targetPaneIndex],a=r!==s,l=this._targetPriceScale(s),c=Object(o.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),u=this._chartModel.children(c,!0);for(e=0,t=u;e1),a.fullscreen.setValue(ue===a));return k(),R(),function(){for(var e=Ye.count,t=e,i=0;i1)}(),t(),qe.value()<1&&r>0&&ze[r-1].rdState.bridge().attach(),!0}function R(){var e,t=Math.min(Ye.count,ze.length)-1;t<0?We.deleteValue():((e=je)<0&&(e=0),e>t&&(e=t),We.setValue(ze[e].chartWidget))}function F(){var e,t;for(e=ze.length;e--;)t=e===je, ze[e].body.value().toggleClass("active",t).toggleClass("inactive",!t)}function N(){}function W(e){var t=e.mainSeries().properties();t.style.subscribe(null,H),H(t.style),e.model().onSelectedSourceChanged().subscribe(null,z),z(e.selection().sources())}function H(e){Pe.setValue(e.value())}function z(){var e=Ce.model();xe.setValue(e.selection().sources())}function j(e){var t,i,n,o=!1;for(t=0;t=o[e].count?e:"s"}function J(e,t){var i,n;if(te=Boolean(t),Q=[],e){for(e.charts||(e={layout:"s",charts:[e]}),Ge=K(e.layout||"s"),i=0;i0)X();else{var e=function(){X(),t.model().mainSeries().dataEvents().barReceived().unsubscribe(null,e),t.model().mainSeries().dataEvents().completed().unsubscribe(null,e)};t.model().mainSeries().dataEvents().barReceived().subscribe(null,e),t.model().mainSeries().dataEvents().completed().subscribe(null,e)}})}}),s()&&(Ee=l.tool.setValue,l.tool.setValue=function(){De.selectedSources.value()&&De.activeChartWidget.value().model().lineBeingCreated()&&De.activeChartWidget.value().model().cancelCreatingLine(),Ee.apply(l.tool,arguments)}),Promise.all(ze.map(function(e){return m(e.chartWidget.modelCreated())})).then(function(){return Promise.all(ze.map(function(e){return m(e.chartWidget.model().mainSeries().dataEvents().symbolResolved())}))}).then(function(){window.saver&&window.is_authenticated&&Oe.widgetOptions.justCloned&&window.saver.saveChartSilently()}).catch(w.logError.bind(w))}}).call(this,i("aIyQ"))},"/YGI":function(e,t,i){"use strict" ;var n,o,r,s,a;i.r(t),n=i("mrSG"),o=i("0YCj"),r=i.n(o),function(e){e.StudyCannotBeChild="cannot_be_child",e.StubWasRemoved="stub_was_removed"}(s||(s={})),i.d(t,"StudyInserter",function(){return a}),a=function(){function e(e,t,i){this._parentSource=void 0,this._propsState=void 0,this._preferredPriceScale=void 0,this._paneSize=void 0,this._forceOverlay=!1,this._studyMetaInfoRepository=t,this._inserterImpl=i,this._studyIdOrMetainfoStub=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.setForceOverlay=function(e){this._forceOverlay=e},e.prototype.setPropertiesState=function(e){this._propsState=e},e.prototype.insert=function(e){return n.__awaiter(this,void 0,void 0,function(){var t,i,o,r,a;return n.__generator(this,function(l){switch(l.label){case 0:return c=this._inserterImpl,t=void 0!==c.createStub&&void 0!==c.removeStub?this._inserterImpl.createStub():null,this._studyIdOrMetainfoStub,[4,this._studyMetaInfoRepository.findById(this._studyIdOrMetainfoStub)];case 1:return i=l.sent(),null===t||this._inserterImpl.removeStub(t)?this._canApplyStudyToParent(i)?(o=n.__assign({},i.defaults.inputs),void 0===e?[3,3]:[4,e(o,i.inputs,i)]):[2,Promise.reject(s.StudyCannotBeChild)]:[2,Promise.reject(s.StubWasRemoved)];case 2:return a=l.sent(),[3,4];case 3:a={},l.label=4;case 4:return r=a,[2,this._insertStudy(i,r)]}var c})})},e.prototype._insertStudy=function(e,t){return this._inserterImpl.createStudy(e,t,this._propsState,this._forceOverlay,this._parentSource,this._preferredPriceScale,this._paneSize)},e.prototype._canApplyStudyToParent=function(e){return void 0===this._parentSource||r.a.canBeChild(e)},e}()},"/b+7":function(e,t){e.exports=''},"/jjs":function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"Magnet",function(){return r}),n=i("Eyy1"),o=i("4o++"),r=function(){function e(e,t){this._magnetProperty=e,this._magnetModeProperty=t}return e.prototype.align=function(e,t,i){var r,s,a,l,c,u,h,d,p,_,f=e;return this._magnetProperty.value()?null===(r=i.mainDataSource())?f:r!==(s=r.model().mainSeries())?f:(a=s.priceScale(),l=s.bars(),a.isEmpty()||!l.contains(t)?f:null===(c=l.valueAt(t))?f:(u=[c[1],c[2],c[3],c[4]],h=Object(n.ensure)(s.firstValue()),d=u.map(function(e){return{y:a.priceToCoordinate(e,h), price:e}}),p=a.priceToCoordinate(e,h),d.sort(function(e,t){var i=Math.abs(e.y-p),n=Math.abs(t.y-p);return i-n}),_=d[0],(this._magnetModeProperty.value()===o.MagnetMode.StrongMagnet||Math.abs(_.y-p)<50)&&(f=_.price),f)):f},e}()},"/kal":function(e,t){e.exports=''},"/mDy":function(e,t,i){},"/pi9":function(e){e.exports={"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-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-light-pink":"#ffecef","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-active-hover-text":"color-black","color-alert-bg":"color-white","color-alert-text":"color-black","color-border-table":"color-athens-gray-3","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-ebony-clay", "color-common-tooltip-text":"color-athens-gray-1","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-popup-bg":"color-white","color-popup-head-text":"color-cold-gray-900","color-popup-text":"color-cold-gray-900","color-popup-text-subline":"color-cold-gray-500","color-popup-menu-item-hover-bg":"color-cold-gray-100","color-popup-menu-separator":"color-catskill-white","color-replay-data-mode":"color-radical-red","color-screener-header-bg":"color-athens-gray-2","color-screener-description":"color-trout-2","color-success":"color-keppel-1","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-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-right-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-growing":"color-minty-green-400","color-falling":"color-ripe-red-400","color-label-long":"color-success","color-label-short":"color-danger","color-label-education":"color-sunglow","color-label-neutral":"color-gull-gray","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-index-page-bg":"#f9fafb","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-footer-chart-panel-bg":"#f1f3f6","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-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-separator-widget":"#e9eff2","color-tag-active-bg":"#cfdce3","color-tag-hover-bg":"#dce6ea","color-text-regular":"#4a4a4a","color-text-secondary":"#b4b4b4","color-tv-button-checked":"#757575","color-white-theme-tooltip-text":"#333333","color-white-theme-tooltip-border":"#d6d6d6","color-brand-dark":"#2a2c39","color-seeking-alpha-brand":"#ff7200","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-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-900":"#B71C1C","color-ripe-red-a200":"#FF5252","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-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-900":"#311B92","color-deep-blue-a100":"#b388ff","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-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-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-900":"#006064","color-sky-blue-a400":"#00e5ff"}},"/z0S":function(e,t,i){"use strict";function n(e,t){o.enabled("saveload_requires_authentication")?window.runOrSignIn(e,t):e()}var o;i.d(t,"a",function(){return n}),o=i("Kxc7")},"08i5":function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"AlertStatus",function(){return n}),i.d(t,"Direction",function(){return o}),function(e){e[e.Waiting=0]="Waiting",e[e.Success=1]="Success",e[e.Failure=2]="Failure"}(n||(n={})),function(e){e[e.Up=1]="Up",e[e.Down=2]="Down"}(o||(o={}))},"0F0w":function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h,d,p,_;i.r(t),n=i("mrSG"),o=i("aIyQ"),r=i.n(o),s=i("Eyy1"),a=i("hY0g"),l=i.n(a),c=i("0waE"),u=i("uOxu"),h=Object(u.getLogger)("ChartApi.AbstractSession"),d="",p=function(){function e(e,t,i){this._isConnected=new l.a(!1),this._state=0,this._isConnectForbidden=!1,this._sessionId=d,this._sessionIdChanged=new r.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!==d,"sessionId must not be invalid"),this._logNormal("Disconnecting session..."),this._forbidConnectWhile(function(){e._chartApi.connected()&&e._sendRemoveSession(),e._processDestroyingOnServer()}))},e.prototype.onMessage=function(e){var t,i;switch(e.method){case"connected":return void this._onChartApiConnected();case"disconnected":return void this._onChartApiDisconnected();case"critical_error":return t=String(e.params[0]),i=String(e.params[1]),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(d)},e.prototype._forbidConnectWhile=function(e){this._isConnectForbidden=!0,e(),this._isConnectForbidden=!1},e}(),i.d(t,"ChartSession",function(){return _}),Object(u.getLogger)("ChartSession"),_=function(e){function t(t,i){void 0===i&&(i=!1);var n=e.call(this,t,"cs",!1)||this;return n._sessionDisabled=!1,n._handler=null,n._criticalError=new r.a,n._disableStatistics=i,n}return n.__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.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,n,o,r){return this._getChartApi().createSeries(this.sessionId(),e,t,i,n,o,r)},t.prototype.modifySeries=function(e,t,i,n,o){return this._getChartApi().modifySeries(this.sessionId(),e,t,i,n,o)},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,n=function(){return i._getChartApi().requestMetadata(i.sessionId(),e,t)};n()},t.prototype.isCanCreateStudy=function(e){return this._getChartApi().isCanCreateStudy(e)},t.prototype.createStudy=function(e,t,i,n,o,r,s){return this._getChartApi().createStudy(this.sessionId(),e,t,i,n,o,r,s)},t.prototype.rebindStudy=function(e,t,i,n,o,r,s){return this._getChartApi().rebindStudy(this.sessionId(),e,t,i,n,o,r,s)},t.prototype.modifyStudy=function(e,t,i,n){return this._getChartApi().modifyStudy(this.sessionId(),e,t,i,n)},t.prototype.removeStudy=function(e,t,i){return this._getChartApi().removeStudy(this.sessionId(),e,t,i)},t.prototype.createPointset=function(e,t,i,n,o,r){return this._getChartApi().createPointset(this.sessionId(),e,t,i,n,o,r)},t.prototype.modifyPointset=function(e,t,i,n){return this._getChartApi().modifyPointset(this.sessionId(),e,t,i,n)},t.prototype.removePointset=function(e){return this._getChartApi().removePointset(this.sessionId(),e)},t.prototype.setVisibleTimeRange=function(e,t,i,n,o){this._getChartApi().setVisibleTimeRange(e,this.sessionId(),t,i,n,o)},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}(p)},"0Pxc":function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolArc";var o=t||new d("linetoolarc");h.call(this,e,o),this.version=n.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)}var o=i("aO4+").Point,r=i("GEp6").distanceToLine,s=i("hfHJ"),a=s.rotationMatrix,l=s.scalingMatrix,c=s.translationMatrix,u=s.transformPoint,h=i("Ss5c").LineDataSource,d=i("Ocx9").DefaultProperty,p=i("hayr").propertyPages;inherit(n,h),n.prototype.startChanging=function(e,t){var i,n,s,a,l,c;h.prototype.startChanging.call(this,e,t),0!==e&&1!==e||(i=this.pointToScreenPoint(this._points[0])[0],n=this.pointToScreenPoint(this._points[1])[0],s=this.pointToScreenPoint(this._points[2])[0],this._dist=r(i,n,s).distance,a=n.subtract(i),l=new o(-a.y,a.x),c=i.add(n).scaled(.5),s.subtract(c).dotProduct(l)<0&&(this._dist=-this._dist))},n.prototype.pointsCount=function(){return 3},n.prototype.title=function(){return"Arc"},n.prototype.name=function(){return"Arc"},n.prototype.setPoint=function(e,t){var i,n,s,h,d,p,_,f,m,y,g,v,S=Object.assign({},t),b=this.pointToScreenPoint(this._points[0])[0],w=this.pointToScreenPoint(this._points[1])[0],P=this.pointToScreenPoint(this._points[2])[0];switch(e){case 0:b=this.pointToScreenPoint(S)[0],i=w.subtract(b),n=b.add(w).scaled(.5),s=(s=new o(-i.y,i.x)).normalized(),P=n.add(s.scaled(this._dist)),P=this.screenPointToPoint(P),this._points[0]=S,this._points[2]=P;break;case 1:h=r(b,w,P).distance,i=(w=this.pointToScreenPoint(S)[0]).subtract(b),n=b.add(w).scaled(.5),s=(s=new o(-i.y,i.x)).normalized(),P=n.add(s.scaled(this._dist)),P=this.screenPointToPoint(P),this._points[1]=S,this._points[2]=P;break;case 2:S=this.pointToScreenPoint(S)[0],h=r(b,w,S).distance,i=w.subtract(b),n=b.add(w).scaled(.5),s=(s=new o(-i.y,i.x)).normalized(),P=n.add(s.scaled(h)),d=n.add(s.scaled(-h)),p=i.length(),_=i.x/p,f=i.y/p,m=Math.acos(_),f<0&&(m=-m),y=c(-n.x,-n.y),S=u(y,S),g=u(y,P),y=a(-m),S=u(y,S),g=u(y,g),y=l(1,p/(2*h)),S=u(y,S),g=u(y,g),v=S.y*g.y>=0?new o(P.x,P.y):new o(d.x,d.y),v=this.screenPointToPoint(v),this._points[2]=v}this.normalizePoints()},n.version=2,n.prototype.migrateVersion=function(e,t,i){var n,o;1===e&&2===this._points.length&&(n=(2*this._points[0].price+3*this._points[1].price)/5,this._points.append({price:n,index:this._points[1].index})),1===e&&2===this._timePoint.length&&(o={price:n=(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(o))},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return p.LineToolArcStylesPropertyPage},t.LineToolArc=n},"0YCj":function(e,t,i){"use strict";(function(e,t){function n(e){TradingView.merge(this,{palettes:{},inputs:[],plots:[],graphics:{},defaults:{}}),TradingView.merge(this,e);var t=e.fullId||e.id;TradingView.merge(this,n.parseIdString(t)),this.name=this.id}i("Eyy1").assert;var o=i("uOxu").getLogger("Chart.Study.MetaInfo"),r=i("9iCb").applyOverridesToStudyDefaults,s=i("lCO3").Version,a=null;n.VERSION_STUDY_ARG_SOURCE=41,n.METAINFO_FORMAT_VERSION_SOS_V2=42,n.VERSION_PINE_PROTECT_TV_4164=43,n.CURRENT_METAINFO_FORMAT_VERSION=46,n.VERSION_NEW_STUDY_PRECISION_FORMAT=46, n.CHILD_STUDY_ALLOWED_PLOT_TYPES=["line"],n.canPlotBeSourceOfChildStudy=function(e){return n.CHILD_STUDY_ALLOWED_PLOT_TYPES.includes(e)},n.CHILD_STUDY_EXCLUDE_IDS=["CorrelationCoefficient@tv-basicstudies","Correlation - Log@tv-basicstudies-1"],n.CHILD_STUDY_PARENT_EXCLUDE_IDS=[],n.FilledArea={},n.FilledArea.TYPE_PLOTS="plot_plot",n.FilledArea.TYPE_HLINES="hline_hline",n.versionOf=function(e){var t="_metainfoVersion"in e&&isNumber(e._metainfoVersion)?e._metainfoVersion:0;return t<0&&o.logError("Metainfo format version cannot be negative: "+t),t},n.parseIdString=function(e){var t,i,n,o,r={};if(-1===e.indexOf("@"))r.shortId=e,r.packageId="tv-basicstudies",r.id=e+"@"+r.packageId,r.version=1;else if(t=e.split("@"),r.shortId=t[0],3===(i=t[1].split("-")).length)r.packageId=i.slice(0,2).join("-"),r.id=r.shortId+"@"+r.packageId,r.version=i[2];else if(1===i.length&&"decisionbar"===i[0])r.packageId="les-"+i[0],r.id=r.shortId+"@"+r.packageId,r.version=1;else{if(1!==i.length)throw new Error("unexpected study id:"+e);r.packageId="tv-"+i[0],r.id=r.shortId+"@"+r.packageId,r.version=1}return r.fullId=r.id+"-"+r.version,"tv-scripting"===r.packageId&&(0===(n=r.shortId).indexOf("Script$")||0===n.indexOf("StrategyScript$"))?(o=n.indexOf("_"),r.productId=o>=0?n.substring(0,o):r.packageId):r.productId=r.packageId,r},n.getPackageName=function(e){return(/^[^@]+@([^-]+-[^-]+)/.exec(e||"")||[0,"tv-basicstudies"])[1]},n.cutDollarHash=function(e){var t=e.indexOf("$"),i=e.indexOf("@");return-1===t?e:e.substr(0,t)+(i>=0?e.substr(i):"")},n.hasUserIdSuffix=function(e){return/^USER;[\d\w]+;\d+$/.test(e)},n.isStandardPine=function(e){return/^(Strategy)?Script\$STD;.*@tv-scripting$/.test(e)},n.getSourceIdByInputs=function(e,t){var i,o,r;if(!Array.isArray(e)||!t)return null;for(i=0;i0&&(l=a.replace(/^[^\$]+/,i),o.inputs[s.id].setValue(l))},n.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},n.prototype.parseValue=function(e,t){return"bool"===e?TradingView.parseBool(t):t},n.prototype.defaultInputs=function(){var e,t=[];for(e=0;e0?e[0].id:null}, n.findStudyMetaInfoByDescription=function(e,t){if(e){for(var i=0;ii[0].price?(n=h,o=i):i[0].price>h[0].price?(n=i,o=h):i[1].price>h[1].price?(n=i,o=h):(n=h,o=i),a=this.properties().extendLeft.value(),l=this.properties().extendRight.value(),c.index<=u.index?(r=a,s=l):(r=l,s=a),[this._linePointsToAlertPlot(n,"Upper",r,s),this._linePointsToAlertPlot(o,"Lower",r,s)]},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return s.LineToolDisjointAngleStylesPropertyPage},t.LineToolDisjointAngle=n},"1IXQ":function(e,t,i){"use strict";(function(t){function n(e,t,i,o,r,s,a){this._options=Object.assign({},M,r),this._pane=e, this._priceScale=null,this._isLeft=n.isLeft(o),this._properties=t,this._rendererOptionsProvider=i,this._axisInfo=s,this._backgroundBasedTheme=a,this._size=null,this._offset=0,this._cell=document.createElement("div"),this._cell.className="price-axis",this._cell.style.width="25px",this._cell.style.left="0",this.canvas=S(this._cell,new b(16,16)),this.canvas.style.position="absolute",this.canvas.style.zIndex="1",this.canvas.style.left="0",this.canvas.style.top="0",this.ctx=this.canvas.getContext("2d"),this.top_canvas=S(this._cell,new b(16,16)),this.top_canvas.style.position="absolute",this.top_canvas.style.zIndex="2",this.top_canvas.style.left="0",this.top_canvas.style.top="0",this.top_ctx=this.top_canvas.getContext("2d"),this.restoreDefaultCursor(),this.update(),this._updateTimeout=null,this._mouseEventHandler=new w($(this.top_canvas),this,!0),this.contextMenu=null,this.actions=null,this._isVisible=!0,this._widthCache=new l(50),this._tickmarksCache=new p(11,"Arial","","#000"),this._color=null,this._fontSize=null,this._prevOptimalWidth=0,this._highlighted=!1}function o(e){var t=new I(e);return function(e,i){return isNumber(i)&&!e.isLog()?t.format(i):""}}var r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,x,C,T,I,L,A,k,M,E,V;i("jJ9X"),r=i("aO4+"),s=r.Point,a=i("qFKp").CheckMobile,l=i("u+0B").TextWidthCache,c=i("7KDR"),u=c.Action,h=c.Separator,d=i("5VQP").ContextMenuManager,p=i("I5CP"),_=i("i1o5").InvalidationLevel,f=i("ikwP"),m=f.resizeCanvas,y=f.hardResizeCanvas,g=f.clearRect,v=f.fillRect,S=f.addCanvasTo,b=f.Size,w=i("S8xo").MouseEventHandler,P=i("tITk").trackEvent,x=i("XlJ7").makeFont,C=i("YmeR").ActionBinder,T=i("uOxu").getLogger("Chart.PriceAxisWidget"),I=i("T6Of").LimitedPrecisionNumericFormatter,L=i("CW80").isLineTool,A=0,k=i("EsvI").themes,M={contextMenuEnabled:!0},E=window.t("Merge All Scales Into One"),n.LHS="left",n.RHS="right",n.isLeft=function(e){return e===n.LHS||e!==n.RHS&&(T.logDebug("PriceAxisWidget.isLeft: wrong side"),!1)},n.prototype.destroy=function(){null!==this.actions&&this.actions.reset&&this.actions.reset.destroy(),this._mouseEventHandler.destroy(),null!==this._priceScale&&this._priceScale.onMarksChanged().unsubscribe(this,this.onMarksChanged),this._priceScale=null,this._updateTimeout&&(clearTimeout(this._updateTimeout),this._updateTimeout=null),$(this.top_canvas).remove(),this._destroyed=!0},n.prototype.getElement=function(){return this._cell},n.prototype.backgroundColor=function(){return this._pane.chart().properties().paneProperties.background.value()},n.prototype.lineColor=function(){return this._properties.lineColor.value()},n.prototype.textColor=function(){return this._properties.textColor.value()},n.prototype.fontSize=function(){return this._properties.fontSize.value()},n.prototype.baseFont=function(){return x(this.fontSize(),"Arial","")},n.prototype._hasAlertLabel=function(){return!1},n.prototype.rendererOptions=function(){var e=this._rendererOptionsProvider.options();return this._color===e.color&&this._fontSize===e.fontSize||(this._tickmarksCache.reset(e.fontSize,"Arial","",e.color), this._color=e.color),this._fontSize!==e.fontSize&&(this._widthCache.reset(),this._fontSize=e.fontSize),this._hasAlertLabel()&&(e=Object.assign({},e,{paddingInner:Math.max(e.paddingInner,A)})),e},n.prototype.dataSourceAtPoint=function(e,t){function i(e,t){var i=f?f.result():0;e.result()>i&&(f=e,_=t)}var n,o,r,a,l,c,u,h,d=this._grouppedSources(),p=d.sources.concat(Array.from(d.topLevelSources)).concat(this._pane.state().customSources()),_=null,f=null;if(!this._priceScale)return null;for(n=new s(e,t),o=this._pane.state(),r=p.length-1;r>=0;--r)if((l=(a=p[r]).priceAxisViews(o,this._priceScale))&&0!==l.length)for(c=l.length-1;c>=0;--c)null!==(u=l[c].renderer())&&void 0!==u.hitTest&&null!==(h=u.hitTest(n,this._size.w,this._isLeft?"left":"right"))&&i(h,a);return _},n.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)},n.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))})},n.prototype.mouseMoveEvent=function(e){this._priceScale&&(this.dataSourceAtPoint(e.localX,e.localY)?this._setCursorClassName("pointer"):this._setCursorClassName(""))},n.prototype.mouseDownEvent=function(e){var t,i,n;if(0===e.button||Modernizr.mobiletouch){if(t=this._pane.chart().model().model().zoomEnabled(),this.priceScale().isEmpty()||!t)return;i=this._pane.chart().model(),n=this._pane.state(),this._mousedown=!0,i.startScalePrice(n,this.priceScale(),e.localY)}},n.prototype.pressedMouseMoveEvent=function(e){var t,i,n;(0===e.button||Modernizr.mobiletouch)&&(t=this._pane.chart().model(),i=this._pane.state(),n=this.priceScale(),this.setCursor("ns-resize"),t.scalePriceTo(i,n,e.localY))},n.prototype.mouseDownOutsideEvent=function(e){var t,i=this._pane.chart().model(),n=this._pane.state();n&&(t=this.priceScale(),this._mousedown&&(this._mousedown=!1,i.endScalePrice(n,t),this.restoreDefaultCursor()))},n.prototype.mouseUpEvent=function(e){var t=this._pane.chart().model(),i=this._pane.state(),n=this.priceScale();this._mousedown=!1,t.endScalePrice(i,n),this.restoreDefaultCursor()},n.prototype._initActions=function(e){var t,o;this._pane.state()&&null===this.actions&&(this.actions={},t=this,o=this._pane.chart().model(),this.actions.reset=new u({label:window.t("Reset Price Scale"),icon:i("LdoW"),shortcut:"Alt+R",shortcutHint:"Alt + R",statName:"ResetScale",onExecute:n.prototype.reset.bind(this)}),this.actions.setAutoScale=new u({label:window.t("Auto (Fits Data To Screen)"),checkable:!0,checked:!0,statName:"ToggleAutoScale",onExecute:function(){o.togglePriceScaleAutoScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setPercentage=new u({label:window.t("Percent",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isPercentage(),statName:"TogglePercantage", onExecute:function(){o.togglePriceScalePercentageScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setIndexedTo100=new u({label:window.t("Indexed to 100",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isIndexedTo100(),statName:"ToggleIndexedTo100",onExecute:function(){o.togglePriceScaleIndexedTo100ScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setLog=new u({label:window.t("Logarithmic",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isLog(),statName:"ToggleLogScale",onExecute:function(){o.togglePriceScaleLogScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setRegular=new u({label:window.t("Regular",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isRegular(),statName:"ToggleRegularScale",onExecute:function(){o.setPriceScaleRegularScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.alignLabels=new u({label:window.t("No Overlapping Labels",{context:"scale_menu"}),checkable:!0,checked:!1,statName:"TogglePreciseLabels"}),this.actions.alignLabels.binding=new C(this.actions.alignLabels,this.priceScale().properties().alignLabels,this._pane.chart().model(),"No Overlapping Labels"),this.actions.invertScale=new u({label:window.t("Invert Scale",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isInverted(),statName:"Invert Scale",onExecute:function(){o.invertPriceScale(t.priceScale()),t._updateScalesActions()}}),this._updateScalesActions())},n.prototype._logAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().logSeriesScale:this.actions.setLog},n.prototype._percentageAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().percentSeriesScale:this.actions.setPercentage},n.prototype._indexedTo100Action=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().indexedTo100SeriesScale:this.actions.setIndexedTo100},n.prototype._autoScaleAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().autoSeriesScale:this.actions.setAutoScale},n.prototype._regularScaleAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().regularSeriesScale:this.actions.setRegular},n.prototype._lockScaleAction=function(){var e=this._pane.chart().actions().lockSeriesScale,t=V(this.priceScale(),this._pane.chart().model().model().mainSeriesScaleRatio());return e.update({shortcutHint:t}),e},n.prototype._invertAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().invertSeriesScale:this.actions.invertScale},n.prototype._isMainSeriesAxis=function(){return this.priceScale().hasSeries()},n.prototype._updateMainSeriesScalesActions=function(){this._isMainSeriesAxis()&&null!==this.actions&&this._updateScalesActions()},n.prototype._updateScalesActions=function(){var e=this.priceScale(),t=this._isMainSeriesAxis(),i=e.mainSource().properties(),n=t&&e.isLockScale(),o=t&&i.style.value()===TradingView.Series.STYLE_PNF;this.actions.setRegular.update({checked:e.isRegular(),disabled:n||o}), this.actions.setPercentage.update({checked:e.isPercentage(),disabled:n||o}),this.actions.setIndexedTo100.update({checked:e.isIndexedTo100(),disabled:n||o}),this.actions.setLog.update({checked:e.isLog(),disabled:n||o}),this.actions.setAutoScale.update({checked:e.isAutoScale(),disabled:e.properties().autoScaleDisabled.value()})},n.prototype.mouseDoubleClickEvent=function(e){var t=this.dataSourceAtPoint(e.localX,e.localY);t?this._pane.processDoubleClickOnSource(t):(this.reset(),P("GUI","Double click price scale"))},n.prototype.contextMenuEvent=function(e,t){var i;if(this._options.contextMenuEnabled){if(null!==(i=this.dataSourceAtPoint(e.localX,e.localY)))return void this._pane.chart().model().selectionMacro(function(t){t.selection().isSelected(i)||(t.clearSelection(),t.addSourceToSelection(i)),this._pane.showContextMenuForSelection(e)}.bind(this));this._createContextMenu().then(function(t){t.show(e)})}},n.prototype._createContextMenu=function(){return d.createMenu(this.getContextMenuActions(),{statName:"PriceScaleContextMenu"})},n.prototype._createMergeScalesAction=function(){var e,t=this._pane.chart().actions(),i=this._pane.chart().model().model(),n=i.priceScaleSlotsCount();return n.left+n.right===1?0===n.left?t.moveScaleToLeft:t.moveScaleToRight:((e=[]).push(t.mergeLeftScalesAction),e.push(t.mergeRightScalesAction),new u({label:E,subItems:e}))},n.prototype.getContextMenuActions=function(){var e,i;return this._initActions(),e=this._pane.chart().actions(),(i=[]).push(this.actions.reset,new h,this._autoScaleAction()),this._isMainSeriesAxis()&&i.push(this._lockScaleAction()),i.push(e.scaleSeriesOnly,this._invertAction(),new h,this._regularScaleAction(),this._percentageAction(),this._indexedTo100Action(),this._logAction(),new h),a.any()||(i.push(this._createMergeScalesAction()),i.push(new h)),t.enabled("fundamental_widget")||i.push(new u({label:window.t("Labels"),subItems:[e.showSymbolLabelsAction,e.showSeriesLastValue,e.showStudyPlotNamesAction,e.showStudyLastValue,this.actions.alignLabels]})),t.enabled("countdown")&&i.push(e.showCountdown),!TradingView.onWidget()&&t.enabled("show_chart_property_page")&&t.enabled("chart_property_page_scales")&&e.scalesProperties&&i.push(new h,e.scalesProperties),i},n.prototype._sameSideSources=function(){var e=this._isLeft?"left":"right";return this._pane.state().orderedSources(e)},n.prototype._grouppedSources=function(){var e,t,i=this._pane,n=i.chart().model(),o=this._sameSideSources().slice(),r=i.state(),s=this.priceScale(),a=new Set,l=n.lineBeingEdited()||n.lineBeingCreated();if(l&&a.add(l),n.sourcesBeingMoved().forEach(function(e){a.add(e)}),n.selection().sources().forEach(function(e){a.add(e)}),n.hoveredSource()&&a.add(n.hoveredSource()),s===r.defaultPriceScale())for(e=this._pane.state().dataSources(),t=0;t0&&(e=Math.max(this._widthCache.measureText(i,n[0].label),this._widthCache.measureText(i,n[n.length-1].label))),r=(o=this.backLabels(!0)).length;r--;)(s=this._widthCache.measureText(i,o[r].text()))>e&&(e=s);return Math.ceil(t.offsetSize+t.borderSize+t.tickLength+t.paddingInner+t.paddingOuter+e)},n.prototype.setSizeAndOffset=function(e,t){if(e.w<0||e.h<0)throw new Error("Try to set invalid size to PriceAxisWidget "+JSON.stringify(e));null!==this._size&&this._size.equals(e)||(this._size=e,m(this.canvas,e),m(this.top_canvas,e),this._cell.style.width=e.w+"px",this._cell.style.height=e.h+"px",this._cell.style.minWidth=e.w+"px"),this._offset!==t&&(this._offset=t,this._cell.style.left=t+"px")},n.prototype.getWidth=function(){return this._size.w},n.prototype.getImage=function(){return this.canvas},n.prototype.update=function(){},n.prototype._hightlightBackground=function(e,t,i){var n,o,r,s,a,l,c;if(i){for(n=t[0].price,o=t[0].price,r=1;r0&&this._hightlightBackground(e,o,this.priceScale().mainSource()),(r=i.model().crossHairSource()).startMeasurePoint()&&this._hightlightBackground(e,r.measurePoints())},n.prototype.drawBorder=function(e){var t,i;e.save(),e.fillStyle=this.lineColor(),t=this.rendererOptions().borderSize,this._isLeft?(e.translate(-.5,-.5),i=this._size.w-t-1):(e.translate(.5,-.5),i=0),e.fillRect(i,0,t,this._size.h),e.restore()},n.prototype.drawTickMarks=function(e){var t,i,n,o,r,s;if(e.save(),e.strokeStyle=this.lineColor(),t=this.priceScale().marks(),e.fillStyle=this.textColor(),e.setFont(this.baseFont()),i=this,e.translate(-.5,-.5),n=this.rendererOptions(),i._isLeft){for(e.fillStyle=i.lineColor(),e.beginPath(),o=this._size.w-n.offsetSize-n.borderSize-n.tickLength,r=t.length;r--;)e.rect(o,t[r].coord,n.tickLength,1);for(e.fill(), r=t.length;r--;)this._tickmarksCache.paintTo(e,t[r].label,o-n.paddingInner,t[r].coord,"right")}else{for(e.fillStyle=i.lineColor(),e.beginPath(),s=n.borderSize+n.offsetSize,r=t.length;r--;)e.rect(s,t[r].coord,n.tickLength,1);for(e.fill(),r=t.length;r--;)this._tickmarksCache.paintTo(e,t[r].label,s+n.tickLength+n.paddingInner,t[r].coord,"left")}e.restore()},n.prototype._alignLabels=function(){function e(e){var t,i,n,r,a;for(t=0;t0&&(y=n[0].floatCoordinate())}}var t,i,n,o,r,s,a,l,c,u,h,d,p,_,f,m,y=this._size.h/2,g=[],v=this.priceScale(),S=v.orderedSources().slice(),b=this._pane,w=b.state(),P=this.rendererOptions(),x=v===w.defaultPriceScale();if(x)for(t=this._pane.state().dataSources(),i=0;iy}),a.sort(function(e,t){return t.floatCoordinate()-e.floatCoordinate()}),a.length&&l.length&&l.push(a[0]),l.sort(function(e,t){return e.floatCoordinate()-t.floatCoordinate()}),c=g.length,i=0;if-p&&u.setFixedCoordinate(f-p);for(m=1;m=a)&&(r={value:a,view:s})}),o.view&&n.push(o.view),r.view&&n.push(r.view),n},n.prototype._isFromSameSide=function(e){return(this._isLeft?this._pane.state().leftPriceScales():this._pane.state().rightPriceScales()).includes(e)},n.prototype._addViewsOrMaxMin=function(e,t){var i,n=this._pane.state(),o=this.priceScale();o!==n.defaultPriceScale()&&(e=e.filter(function(e){return n.isOverlay(e)||this._isFromSameSide(e.priceScale())}.bind(this))),0!==e.length&&(1===e.length?(i=e[0].priceAxisViews(n,o))&&i.length&&t.push(i):t.push(this._minMaxViews(e)))},n.prototype.drawCrossHairLabel=function(e){ var t,i,n,o,r,s=this._pane.chart().model().model(),a=this._pane.state(),l=this.priceScale(),c=[],u=this._pane.state(),h=this.priceScale()===a.defaultPriceScale(),d=s.lineBeingEdited()||s.lineBeingCreated();d&&(d.priceScale()===l||h&&a.isOverlay(d))&&(t=d.priceAxisViews(u,l))&&t.length&&c.push(t),this._addViewsOrMaxMin(s.sourcesBeingMoved(),c),this._addViewsOrMaxMin(s.selection().sources(),c),(i=s.hoveredSource())&&(n=a.customSources().includes(i)?l:i.priceScale(),!s.selection().isSelected(i)&&(this._isFromSameSide(n)||h&&a.isOverlay(i))&&(t=s.hoveredSource().priceAxisViews(u,l))&&t.length&&c.push(t)),(t=s.crossHairSource().priceAxisViews(u,l))&&t.length&&c.push(t),o=this.rendererOptions(),r=this._isLeft?"right":"left",c.forEach(function(t){t.forEach(function(t){e.save(),t.renderer().draw(e,o,this._widthCache,this._size.w,r),e.restore()},this)},this)},n.prototype.priceScale=function(){return this._priceScale},n.prototype.isVisible=function(){return this._isVisible},n.prototype.setVisible=function(e){(e=!!e)!==this._isVisible&&(this._cell.style.display=e?"table-cell":"none",this._isVisible=e)},n.prototype.setAutoScale=function(e){var t=this._pane.state,i=this.priceScale(),n=this._pane.chart().model();n.setPriceAutoScale(t,i,e)},n.prototype.reset=function(){var e=this._pane.state(),t=this.priceScale(),i=this._pane.chart().model();i.resetPriceScale(e,t)},n.prototype.hardResetCanvas=function(){null!==this._size&&(y(this.canvas,this._size),y(this.top_canvas,this._size))},n.prototype._isMainPane=function(){return this._pane.state().containsMainSeries()},n.prototype.paint=function(e){this._isVisible&&e&&(this.top_ctx.clearRect(-.5,-.5,this._size.w,this._size.h),e===_.Cursor?this.drawCrossHairLabel(this.top_ctx):(this._alignLabels(),this.drawBackground(this.ctx),this.drawBorder(this.ctx),this._pane.state()&&(this.drawTickMarks(this.ctx),this.drawBackLabels(this.ctx),this.drawCrossHairLabel(this.top_ctx))))},n.prototype.restoreDefaultCursor=function(){this.setCursor("")},n.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)},n.prototype.onMarksChanged=function(){var e,t=this.optimalWidth();this._prevOptimalWidth100)throw new Error("something wrong with base")}}function r(e,t,i,n){this.m_marks=[],this.m_base=t,this.m_priceScale=e,this._currentFormatBase=0,this._coordinateToLogicalFunc=i,this._logicalToCoordinateFunc=n}function s(t,i){var o;l.call(this),i=Object.assign({},a,i),this._properties=new e(i),this._scalesProperties=t,this.m_height=0,this._internalHeightCache=null,this._internalHeightChanged=new n,this.m_priceRange=null,this._priceRangeChanged=new n,this.m_dataSources=[],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},o=this,this._coordinateToLogicalFunc=function(e,t){return o._coordinateToLogical(e,t)},this._logicalToCoordinateFunc=function(e,t,i){return o._logicalToCoordinate(e,t,i)},this.m_markBuilder=new r(this,100,this._coordinateToLogicalFunc,this._logicalToCoordinateFunc),this._modeChanged=new n,this._properties.isInverted.listeners().subscribe(this,s.prototype._onIsInvertedChanged),this._sourcesForAutoscale=null,this._sourcesToUpdateViews=null,this._hasSeries=!1,o=this,this._properties.listeners().subscribe(null,function(){o.mainSource()&&o.mainSource().model()&&o.mainSource().model().fullUpdate()}),this._scalesProperties.listeners().subscribe(this,function(){this._marksCache=null}),this.setId(f())}var a,l=i("Yj6H").PriceScaleBase,c=i("Ss5c").LineDataSource,u=i("7ktv").PriceDataSource,h=i("qJq3").Series,d=i("kcTO").PriceFormatter,p=i("GH0z").PercentageFormatter,_=i("Qb4w").PriceRange,f=i("0waE").randomHash,m=i("3ClC").isStudy,y=i("Hr11"),g=i("TTFo"),v=g.fromPercent,S=g.toPercent,b=g.toPercentRange,w=g.fromIndexedTo100,P=g.toIndexedTo100,x=g.toIndexedTo100Range,C=g.fromLog,T=g.toLog,I=new p,L=new d(100,1);o.prototype.TICK_SPAN_EPSILON=1e-9,o.prototype.tickSpan=function(e,t,i){var n,o=0===this.m_base?0:1/this.m_base,r=this.TICK_SPAN_EPSILON,s=Math.pow(10,Math.max(0,Math.ceil(y.log10(e-t)))),a=0;for(a=0,n=this.m_integralDividers[0];s>o+r&&y.greaterOrEqual(s,o,r)&&y.greaterOrEqual(s,i*n,r)&&y.greaterOrEqual(s,1,r);++a,n=this.m_integralDividers[a%this.m_integralDividers.length])s/=n;if(s<=o+r&&(s=o),s=Math.max(1,s),this.m_fractionalDividers.length>0&&y.equal(s,1,r))for(a=0,n=this.m_fractionalDividers[0];s>o+r&&y.greaterOrEqual(s,i*n,r);++a,n=this.m_fractionalDividers[a%this.m_fractionalDividers.length])s/=n;return s},r.prototype.TICK_DENSITY=2.5,r.prototype.base=function(){return this.m_base}, r.prototype.setBase=function(e){if(e<0)throw new RangeError("base < 0");this.m_base=e},r.prototype.fontHeight=function(){return this.m_priceScale.fontSize()},r.prototype.tickSpan=function(e,t){var i,n,r,s,a,l;if(e=s?1:-1,u=null,h=_.formatter(),d=r-l;d>s;d-=a)p=this._logicalToCoordinateFunc(d,t,!0),null!==u&&Math.abs(p-u)30)throw new RangeError("invalid margin");this.m_topMargin!==e&&(this.m_topMargin=e,this._invalidateInternalHeightCache(),this._marksCache=null)},s.prototype.bottomPixelMargin=function(){return this.isInverted()?this.m_topMargin*this.height()+this._topPixelMargin:this.m_bottomMargin*this.height()+this._bottomPixelMargin},s.prototype.bottomMargin=function(){return this.m_bottomMargin},s.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)}, s.prototype.internalHeight=function(){if(this._internalHeightCache)return this._internalHeightCache;var e=this.height()-this.topPixelMargin()-this.bottomPixelMargin();return this._internalHeightCache=e,e},s.prototype._invalidateInternalHeightCache=function(){this._internalHeightCache=null,this._internalHeightChanged.fire()},s.prototype.internalHeightChanged=function(){return this._internalHeightChanged},s.prototype.priceRange=function(){return this.makeSureItIsValid(),this.m_priceRange},s.prototype.priceRangeChanged=function(){return this._priceRangeChanged},s.prototype.setPriceRange=function(e,t,i){var n,o,r;if(!(e instanceof _))throw new TypeError("incorrect price range");return n=this.m_priceRange,!!(t||null===n&&null!==e||null!==n&&!n.equals(e))&&(o=null!==this.m_maxPriceRange&&this.m_maxPriceRange.containsStrictly(e),r=null!==this.m_minPriceRange&&e.containsStrictly(this.m_minPriceRange),!(this.isLockScale()&&!t&&(o||r))&&(this._marksCache=null,this.m_priceRange=e,void(i||this._priceRangeChanged.fire(n,e))))},s.prototype.isEmpty=function(){return this.makeSureItIsValid(),0===this.m_height||!this.m_priceRange||this.m_priceRange.isEmpty()},s.prototype.invertedCoordinate=function(e){return this.isInverted()?e:this.height()-1-e},s.prototype.priceToLogical=function(e){return this.isLog()&&e?T(e):e},s.prototype.logicalToPrice=function(e){return this.isLog()?C(e):e},s.prototype._logicalToCoordinate=function(e,t,i){var n,o;return this.makeSureItIsValid(),this.isEmpty()?0:(e=this.priceToLogical(e),n=this.bottomPixelMargin()+(this.internalHeight()-1)*(e-this.priceRange().minValue())/(this.priceRange().maxValue()-this.priceRange().minValue()),o=this.invertedCoordinate(n),i?o:Math.round(o))},s.prototype.priceToCoordinate=function(e,t,i){return this.isPercentage()?e=S(e,t):this.isIndexedTo100()&&(e=P(e,t)),this._logicalToCoordinate(e,t,i)},s.prototype.pointsArrayToCoordinates=function(e,t){var i,n,o,r,s,a,l,c,u,h;if(this.makeSureItIsValid(),i=this.bottomPixelMargin(),n=this.priceRange().minValue(),o=this.priceRange().maxValue(),r=this.internalHeight()-1,s=this.isInverted(),a=r/(o-n),this.isPercentage())for(l=0;l0||Math.abs(r-this._bottomPixelMargin)>0)&&(this._bottomPixelMargin=r,this._topPixelMargin=o,this._marksCache=null,this._invalidateInternalHeightCache()),e?(e.minValue()===e.maxValue()&&(e=new _(e.minValue()-.5,e.maxValue()+.5)),this.setPriceRange(e)):this.m_priceRange||this.setPriceRange(new _(-.5,.5)),this._invalidatedForRange.isValid=!0}},s.prototype.sourcesToUpdateViews=function(){var e,t;if(!this._sourcesToUpdateViews)for(this._sourcesToUpdateViews=[],e=0;e0&&void 0!==arguments[0]?arguments[0]:"keydown",i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._event=t,this._preventDefault=i}return n(e,[{key:"regHandlers",value:function(e){this._handlers=e}},{key:"watchOn",value:function(e){this._listener=this._regListener(),this._watchingEl=e,e.addEventListener(this._event,this._listener)}},{key:"stopWatching",value:function(){this._watchingEl.removeEventListener(this._event,this._listener)}},{key:"_regListener",value:function(){var e=this;return function(t){var i=t.which,n=e._getHandler(i);t.stopPropagation(),n(t)}}},{key:"_getHandler",value:function(e){var t=this,i=t._handlers[e],n=function(){},o=function(e){t._preventDefault&&e.preventDefault(),i(e)};return i?o:n}}]),e}()},"1mZ4":function(e,t,i){"use strict";function n(e){this._data=e}function o(e,t){this._data=e,this._model=t,this.radius=this._data.radius||o.OUTER_RADIUS}function r(e){n.call(this,e)}var s=i("VdBB").HitTestResult,a=i("6a0U").PaneRendererArrowsUpDown,l=i("f6yo").pointInBox;i("qFKp"),n.RADIUS=3.5,n.prototype.tolerance=2,n.prototype.draw=function(e){var t,i,n,o;if(this._data)for(e.strokeStyle="#6B6B6B",e.fillStyle="#D6D6D6",t=this._data.vertOffset||0,i=0;i'},"2+aH":function(e,t,i){"use strict";(function(e){function n(t,i,n){var r,s,a,l,c,u;n=n||{},n=Object.assign({},E,n),r=this,m.call(this),this._properties=i,this._model=t,this._dataWindowView=new h(this,t),this._priceAxisViews=new Map,this._startMeasurePriceAxisViews=new Map,this._endMeasurePriceAxisViews=new Map,s=function(e,t){return function(i){var n,o=t(),r=e();return i===this.pane.defaultPriceScale()?{price:r,coordinate:o}:(n=i.mainSource().firstValue(),{price:i.coordinateToPrice(o,n),coordinate:o})}.bind(this)}.bind(this),a=function(e,t){return function(){return{time:this._model.timeScale().indexToUserTime(e()),coordinate:t()} }.bind(this)}.bind(this),this._currentPosPriceProvider=s(function(){return this.price}.bind(this),function(){return this.y}.bind(this)),this._startMeasurePriceProvider=s(function(){return this._startMeasurePoint.price}.bind(this),function(){return this._startMeasurePoint.y}.bind(this)),this._endMeasurePriceProvider=s(function(){return this._endMeasurePoint.price}.bind(this),function(){return this._endMeasurePoint.y}.bind(this)),l=a(function(){return this.appliedIndex()}.bind(this),function(){return this.appliedX()}.bind(this)),c=a(function(){return this._startMeasurePoint.index}.bind(this),function(){return this._startMeasurePoint.x}.bind(this)),u=a(function(){return this._endMeasurePoint.index}.bind(this),function(){return this._endMeasurePoint.x}.bind(this)),this._timeAxisView=new d(this,t,l),this._startMeasureTimeAxisView=new d(this,t,c),this._endMeasureTimeAxisView=new d(this,t,u),this._selectionRect=null,this._selectionPane=null,this.visible=!0,t.readOnly()?this.areLinesVisible=!0:y.cursorTool.subscribe(function(e){r.areLinesVisible="arrow"!==e},{callWithLast:!0}),this._movedDelegate=new e,this._subscribed=!1,this._linesShouldBeHidden=this._model.readOnly(),this._selectBarMode=new L(!1),this._barSelectedDelegate=new e,this._mouseClickBoundedHandler=this._mouseClickHandler.bind(this),this._isOnHoveredChartWidget=!1,this._selectionView=new o(this,t)}function o(e,t){this._source=e,this._model=t,this._rectangle=null,this._renderer=new f}function r(e,t){this._source=e,this._pane=t,this._pipFormatter=null,this._lastSymbolInfo=null,this._horzTrenRenderer=new p,this._vertTrenRenderer=new p,this._bgRenderer=new f,this._labelRenderer=new _({})}function s(e,t,i,n){this.source=e,this.pane=t,this._horzVisible=i,this._mouseClickHandler=n}function a(e,t,i){this.source=e,this.pane=t,this._axis=i||"x"}var l=i("aO4+").Point,c=i("CW80").isLineToolName,u=i("KEYX").CrossHairPriceAxisView,h=i("te6v"),d=i("p1Ci"),p=i("pJOz").TrendLineRenderer,_=i("qgcf").TextRenderer,f=i("IjC5").RectangleRenderer,m=i("fgLi").DataSource,y=i("mMWL"),g=i("Cqax").PaneRendererCrossHair,v=i("N7ud").PaneRendererCrossHairLock,S=i("Zy3/").CompositeRenderer,b=i("GH0z").PercentageFormatter,w=i("nda6").TimeSpanFormatter,P=i("5C6T").PipFormatter,x=i("Tmoa"),C=i("a7Ha").LineEnd,T=i("8Uy/"),I=i("ogJP").isNaN,L=i("hY0g"),A=i("Ialn"),k=A.forceLTRStr,M=A.startWithLTR,E={menuEnabled:!1,menuForMainSourceOnly:!1};inherit(n,m),n.prototype.index=0,n.prototype.price=NaN,n.prototype.pane=null,n.prototype.color="white",n.prototype.style="",n.prototype.customization={disableSelection:!0},n.prototype.properties=function(){return this._properties},n.prototype.moved=function(){return this._movedDelegate},n.prototype.saveOriginCoord=function(e,t){this._originX=e,this._originY=t},n.prototype.clearOriginCoord=function(){this._originX=NaN,this._originY=NaN},n.prototype.setPosition=function(e,t,i){this._subscribed||(this._model.mainSeries().onRestarted().subscribe(this,n.prototype.clearMeasure),this._subscribed=!0),this.setLockedPosition(i),this.visible=!0,this._tryToUpdateViews(e,t,i) },n.prototype.startSelection=function(e){this._selectionStartPoint=this.currentLogicalPoint(),this._selectionPane=e},n.prototype.clearSelection=function(){this._selectionStartPoint=null,this._selectionPane=null},n.prototype.selection=function(){return this._selectionStartPoint?{p1:this._selectionStartPoint,p2:this.currentLogicalPoint()}:null},n.prototype.selectionPane=function(){return this._selectionPane},n.prototype.update=function(){var e,t,i,n,o,r;this.visible?(e=this._priceScaleByPane(this.pane),t=this._originX||this.x,i=this._originY||this.y,n=this._model.timeScale().coordinateToIndex(t),o=NaN,null!==e&&(r=this.pane.mainDataSource().firstValue(),o=e.coordinateToPrice(i,r)),this._tryToUpdateViews(n,o,this.pane)):this._setIndexToLastSeriesBarIndex()},n.prototype._priceScaleByPane=function(e){return e&&!e.defaultPriceScale().isEmpty()?e.defaultPriceScale():null},n.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}))},n.prototype._tryToUpdateData=function(e,t,i){var n,o=this.x,r=this.y,s=this.price,a=this.index,l=this.pane,c=this._priceScaleByPane(i);return this.index=e,this.x=I(e)?NaN:this._model.timeScale().indexToCoordinate(e),null!==c?(this.pane=i,this.price=t,n=i.mainDataSource().firstValue(),this.y=c.priceToCoordinate(t,n)):(this.pane=null,this.price=NaN,this.y=NaN),o!==this.x||r!==this.y||a!==this.index||s!==this.price||l!==this.pane},n.prototype.setLockedPosition=function(e){delete this.lockedIndex,delete this.lockedX,e!==this._measurePane&&y.lockTimeAxis().value()&&(this.lockedIndex=this._model.timeScale().points().roughIndex(y.lockTimeAxisTime.value()),this.lockedX=this._model.timeScale().indexToCoordinate(this.lockedIndex))},n.prototype.clearPosition=function(){this.visible=!1,this._setIndexToLastSeriesBarIndex(),this.price=NaN,this.x=NaN,this.y=NaN,this.pane=null,this.clearOriginCoord()},n.prototype._setIndexToLastSeriesBarIndex=function(){var e=this._model.mainSeries().bars().lastIndex();this.index=null!==e?e:NaN},n.prototype.measureStartY=function(){var e=this._startMeasurePoint.price,t=this._measurePane,i=t.mainDataSource().firstValue();return t.defaultPriceScale().priceToCoordinate(e,i)},n.prototype.measureStartX=function(){return this._model.timeScale().indexToCoordinate(this._startMeasurePoint.index)},n.prototype.measureEndY=function(){var e=this._endMeasurePoint.price,t=this._measurePane,i=t.mainDataSource().firstValue();return t.defaultPriceScale().priceToCoordinate(e,i)},n.prototype.measureEndX=function(){return this._model.timeScale().indexToCoordinate(this._endMeasurePoint.index)},n.prototype.paneViews=function(e){var t=this._selectBarMode.value()&&this._isOnHoveredChartWidget,i=e===this.pane&&!t,n=[new s(this,e,i,this._mouseClickBoundedHandler)];return e===this._selectionPane&&n.push(this._selectionView),e===this._measurePane&&(this._measurePaneView||(this._measurePaneView=new r(this,e)),this._measurePaneView.update(), n.push(this._measurePaneView)),y.lockTimeAxis().value()&&n.push(this._timeLockPaneView=this._timeLockPaneView||new a(this,e)),n},n.prototype.dataWindowView=function(){return this._dataWindowView},n.prototype._createPriceAxisViewOnDemand=function(e,t,i){var n=e.get(t);return void 0===n&&(n=new u(this,t,i),e.set(t,n)),n},n.prototype.priceAxisViews=function(e,t){var i;return!this._linesShouldBeHidden&&this.visible&&this.pane===e||(this._priceAxisViews.clear(),this._startMeasurePriceAxisViews.clear(),this._endMeasurePriceAxisViews.clear()),i=[],this._selectBarMode.value()&&this._isOnHoveredChartWidget||this.pane!==e||i.push(this._createPriceAxisViewOnDemand(this._priceAxisViews,t,this._currentPosPriceProvider)),this._startMeasurePoint&&i.push(this._createPriceAxisViewOnDemand(this._startMeasurePriceAxisViews,t,this._startMeasurePriceProvider)),this._endMeasurePoint&&i.push(this._createPriceAxisViewOnDemand(this._endMeasurePriceAxisViews,t,this._endMeasurePriceProvider)),i},n.prototype.timeAxisView=function(){if(this._linesShouldBeHidden||!this.visible&&!y.lockTimeAxis().value())return null;var e=[this._timeAxisView];return this._startMeasurePoint&&e.push(this._startMeasureTimeAxisView),this._endMeasurePoint&&e.push(this._endMeasureTimeAxisView),e},n.prototype.updateAllViews=function(){this._priceAxisViews.forEach(function(e){e.update()}),this._startMeasurePoint&&(this._startMeasurePriceAxisViews.forEach(function(e){e.update()}),this._startMeasureTimeAxisView.update()),this._endMeasurePoint&&(this._endMeasurePriceAxisViews.forEach(function(e){e.update()}),this._endMeasureTimeAxisView.update()),this._timeAxisView.update(),this._selectionView.update()},n.prototype.startMeasurePoint=function(){return this._startMeasurePoint},n.prototype.startMeasuring=function(e,t){this._startMeasurePoint=e,this._measurePane=t},n.prototype.finishMeasure=function(e){this._endMeasurePoint=e},n.prototype.endMeasurePoint=function(){return this._endMeasurePoint},n.prototype.clearMeasure=function(e){delete this._measurePane,delete this._startMeasurePoint,delete this._endMeasurePoint,delete this._lastValidMeasurePoint,this._model.lightUpdate()},n.prototype.measurePoints=function(){this.updateAllViews();var e=[this._startMeasurePoint];return this._endMeasurePoint?e.push(this._endMeasurePoint):(this._measurePane===this.pane&&(this._lastValidMeasurePoint={x:this.x,y:this.y,rawPrice:this.price,price:this.price,index:this.index}),this._lastValidMeasurePoint&&e.push(this._lastValidMeasurePoint)),e},n.prototype.currentLogicalPoint=function(){return{index:this.appliedIndex(),price:this.price}},n.prototype.currentPoint=function(){return new l(this.x,this.y)},n.prototype.appliedIndex=function(){return isFinite(this.lockedIndex)&&this.lockedIndex||this.index},n.prototype.appliedX=function(){return isFinite(this.lockedX)&&this.lockedX||this.x},n.prototype.selectBarMode=function(){return this._selectBarMode},n.prototype.toggleSelectBarMode=function(){this._setSelectBarModeState(!this._selectBarMode.value())},n.prototype.onBarSelected=function(){ return this._barSelectedDelegate},n.prototype._setSelectBarModeState=function(e){this._selectBarMode.setValue(e),this._model.lightUpdate()},n.prototype._mouseClickHandler=function(){var e,t=this._model.mainSeries().bars();t.contains(this.index)&&null!==(e=this._model.timeScale().indexToTimePoint(this.index))&&(this._setSelectBarModeState(!1),this._barSelectedDelegate.fire(e))},n.prototype.handleContextMenuEvent=function(){this._selectBarMode.value()&&this._setSelectBarModeState(!1)},n.prototype.setOnHoveredChartWidget=function(e){this._isOnHoveredChartWidget=e},n.prototype.isOnHoveredChartWidget=function(){return this._isOnHoveredChartWidget},n.prototype.setLinesShouldBeHidden=function(e){this._linesShouldBeHidden=e},n.prototype.linesShouldBeHidden=function(){return this._linesShouldBeHidden},o.prototype.update=function(){var e=this._source.selection();e&&this._source.pane?this._rectangle=this._source.pane.logicalRectToPixels(e):this._rectangle=null},o.prototype.renderer=function(){return this._rectangle?(this._renderer.setData({backcolor:"#BADAFF",color:"#D3E7FF",fillBackground:!0,linewidth:1,transparency:60,points:[this._rectangle.min,this._rectangle.max]}),this._renderer):null},r.prototype.update=function(){var e,t,i,n,o,r,s,a,c,u,h,d,p,_,f,m,y,g,v,S,x,C,T;if(this._source._endMeasurePoint)e=this._source._endMeasurePoint.price,t=this._source._endMeasurePoint.index;else if(this._source._measurePane===this._source.pane)e=this._source.price,t=this._source.index;else{if(!this._source._lastValidMeasurePoint)return;e=this._source._lastValidMeasurePoint.rawPrice,t=this._source._lastValidMeasurePoint.index}i=e-this._source._startMeasurePoint.price,n=t-this._source._startMeasurePoint.index,o=k(n),r=this._source._startMeasurePoint.price,a=(s=this._source._measurePane.mainDataSource()).formatter().format(i),this._source._startMeasurePoint.price&&(c=i/this._source._startMeasurePoint.price,a+=" ("+(new b).format(100*c)+")"),u=k(a),this._label=u+"\n"+window.t("{0} bars").format(o),r=this._source._model._magnet.align(r,this._source._startMeasurePoint.index,this._source._measurePane),e=this._source._model._magnet.align(e,t,this._source._measurePane),h=s.firstValue(),d=this._source._model.timeScale().indexToCoordinate(this._source._startMeasurePoint.index),p=this._source._model.timeScale().indexToCoordinate(t),_=this._source._measurePane.defaultPriceScale().priceToCoordinate(r,h),f=this._source._measurePane.defaultPriceScale().priceToCoordinate(e,h),this._p1=new l(d,_),this._p2=new l(p,f),m=this._source._model.timeScale().indexToUserTime(this._source._startMeasurePoint.index),y=this._source._model.timeScale().indexToUserTime(t),(g=this._pane.model().mainSeries().symbolInfo())&&g!==this._lastSymbolInfo&&(this._pipFormatter=new P(g.pricescale,g.minmov,g.type,g.minmove2),this._lastSymbolInfo=g),m&&y&&(v=(y.valueOf()-m.valueOf())/1e3,x=(S=this._pipFormatter?this._pipFormatter.format(i):"")?" , "+S:S,C=(new w).format(v),T=M(C),this._label=k(u+x)+"\n"+window.t("{0} bars").format(o)+", "+T)},r.prototype.renderer=function(){ var e,t,i,n,o,r,s,a,c,u,h,d=new S,p={};return p.points=[this._p1,this._p2],p.width=this._source._model.timeScale().width(),p.height=this._source._measurePane.defaultPriceScale().height(),p.color="#D3E7FF",p.linewidth=0,p.fillBackground=!0,p.transparency=60,p.backcolor="#BADAFF",this._bgRenderer.setData(p),d.append(this._bgRenderer),e=this._p1.add(this._p2).scaled(.5),t={points:[new l(this._p1.x,e.y),new l(this._p2.x,e.y)],width:p.width,height:p.height,color:"#363c4e",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED,extendleft:!1,extendright:!1,leftend:C.Normal,rightend:C.Arrow},this._horzTrenRenderer.setData(t),d.append(this._horzTrenRenderer),t={points:[new l(e.x,this._p1.y),new l(e.x,this._p2.y)],width:p.width,height:p.height,color:"#363c4e",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED,extendleft:!1,extendright:!1,leftend:C.Normal,rightend:C.Arrow},this._vertTrenRenderer.setData(t),d.append(this._vertTrenRenderer),i=0,n=10,o=function(e,t){return{points:[t],text:e,color:"#FFFFFF",horzAlign:"left",vertAlign:"middle",font:"Arial",offsetX:i,offsetY:n,bold:!1,italic:!1,fontsize:12,padding:5,highlightBorder:!1,backgroundColor:x.generateColor("#5b85bf",10),backgroundTransparency:10,backgroundVertInflate:5,backgroundHorzInflate:5,backgroundRoundRect:4}},r=.5*(this._p1.x+this._p2.x),s=this._p2.y,a=new l(r,s),c=o(this._label,a),this._labelRenderer.setData(c),u=this._labelRenderer.measure(),h={x:r+c.backgroundHorzInflate+u.textBgPadding-u.width/u.textBgPadding,y:this._p1.y>this._p2.y?a.y-u.height-2*u.textBgPadding-n>0?s-u.height-n+u.textBgPadding:n-2*u.textBgPadding:a.y+u.height+u.textBgPadding+n>p.height?p.height-u.height-n:s+u.textBgPadding},this._labelRenderer.setPoints([new l(h.x,h.y)]),d.append(this._labelRenderer),d},s.prototype.update=function(){},s.prototype.renderer=function(){var e,t,i,n,o,r,s={},a=this.source.visible&&this.source.areLinesVisible,l=y.lockTimeAxis().value();return s.horzLinesVisible=a&&this._horzVisible,s.vertLinesVisible=a||l,t=(e=this.pane._model.readOnly())?defaults("chartproperties.paneProperties.crossHairProperties"):null,i=this.source.selectBarMode().value()&&this.source.isOnHoveredChartWidget(),o=(n=TradingView.isMobile.any()&&c(this.source._model.currentTool())&&!i)?"#a000a0":e?t.color:this.pane._model.properties().paneProperties.crossHairProperties.color.value(),r=e?t.transparency:this.pane._model.properties().paneProperties.crossHairProperties.transparency.value(),!n&&r>0&&(o=x.generateColor(o,r)),s.color=o,s.lineWidth=e?t.width:this.pane._model.properties().paneProperties.crossHairProperties.width.value(),s.lineStyle=e?t.style:this.pane._model.properties().paneProperties.crossHairProperties.style.value(),s.drawCenter=n&&this.pane===this.source.pane,s.w=this.pane.width(),s.h=this.pane.height(),s.x=isFinite(this.source.lockedX)&&this.source.lockedX||this.source.x,s.y=this.source.y,i&&(s.x=Math.max(0,this.source.x-1),s.vertLinesVisible=!0,s.lineStyle=T.LINESTYLE_SOLID,s.mouseClickHandler=this._mouseClickHandler,s.lineWidth=2,s.color="#ff0000"),new g(s)},a.prototype.update=function(){}, a.prototype.renderer=function(){var e,t,i,n,o=this.source.visible&&this.source.areLinesVisible,r=y.lockTimeAxis().value(),s=o&&this._horzVisible,a=o||r;if(("y"!==this._axis||s)&&a)return e=9,t=11,i="y"===this._axis?this.pane.width()-e/2:this.source.lockedX+1,n="y"===this._axis?this.source.y:this.pane.height()-t/2-1,new v({x:i,y:n,width:e,height:t,bodyHeight:7})},t.CrossHair=n}).call(this,i("aIyQ"))},"23IT":function(e,t,i){"use strict";function n(e){return"line"===e.type}function o(e){return"shapes"===e.type}function r(e){return"chars"===e.type}function s(e){return"arrows"===e.type}function a(e){return"dataoffset"===e.type}function l(e){return"ohlc_open"===e.type}function c(e){return"ohlc_high"===e.type}function u(e){return"ohlc_low"===e.type}function h(e){return"ohlc_close"===e.type}function d(e){return l(e)||c(e)||u(e)||h(e)}function p(e){return"colorer"===e.type}function _(e){return"bar_colorer"===e.type}function f(e){return"bg_colorer"===e.type}function m(e){return"text_colorer"===e.type}function y(e){return"ohlc_colorer"===e.type}function g(e){return"ohlc_bars"===e.plottype}function v(e){return"ohlc_candles"===e.plottype}var S,b;i.r(t),i.d(t,"LineStudyPlotStyle",function(){return S}),i.d(t,"isLinePlot",function(){return n}),i.d(t,"isShapesPlot",function(){return o}),i.d(t,"isCharsPlot",function(){return r}),i.d(t,"isArrowsPlot",function(){return s}),i.d(t,"isDataOffsetPlot",function(){return a}),i.d(t,"isOhlcOpenPlot",function(){return l}),i.d(t,"isOhlcHighPlot",function(){return c}),i.d(t,"isOhlcLowPlot",function(){return u}),i.d(t,"isOhlcClosePlot",function(){return h}),i.d(t,"isOhlcPlot",function(){return d}),i.d(t,"isColorerPlot",function(){return p}),i.d(t,"isBarColorerPlot",function(){return _}),i.d(t,"isBgColorerPlot",function(){return f}),i.d(t,"isTextColorerPlot",function(){return m}),i.d(t,"isOhlcColorerPlot",function(){return y}),i.d(t,"isOhlcPlotStyleBars",function(){return g}),i.d(t,"isOhlcPlotStyleCandles",function(){return v}),i.d(t,"PlotSymbolSize",function(){return b}),function(e){e[e.Line=0]="Line",e[e.Histogram=1]="Histogram",e[e.Cross=3]="Cross",e[e.Area=4]="Area",e[e.Columns=5]="Columns",e[e.Circles=6]="Circles",e[e.LineWithBreaks=7]="LineWithBreaks",e[e.AreaWithBreaks=8]="AreaWithBreaks",e[e.StepLine=9]="StepLine"}(S||(S={})),function(e){e.Auto="auto",e.Tiny="tiny",e.Small="small",e.Normal="normal",e.Large="large",e.Huge="huge"}(b||(b={}))},"2Fqk":function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"CompareLegendView",function(){return r}),n=i("mrSG"),o=i("TrvT"),r=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._additional=null,n._showStudyValues=i.properties().paneProperties.legendProperties.showStudyValues,n._showStudyValues.subscribe(n,n.update),n}return n.__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 }(o.CompareDataWindowView)},"2OVc":function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"InsertStudyCommand",function(){return a}),n=i("mrSG"),o=i("Eyy1"),r=i("RDU5"),s=i("tITk"),a=function(e){function t(t,i,n,o,r,s,a){var l=e.call(this,a)||this;return l._studyId=null,l._chartModel=t,l._studyMetaInfo=i,l._props=o,l._addAsOverlay=r,l._parentId=null==s?null:s.id(),l._inputs=n,l}return n.__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._props,this._addAsOverlay,e);null===this._studyId?this._studyId=t.id():t.setId(this._studyId),t.childStudyByRebind().subscribe(null,function(){return Object(s.trackEvent)("SOS","Apply SOS","Rebind SOS")})},t.prototype.undo=function(){var e=Object(o.ensureNotNull)(this._chartModel.dataSourceForId(Object(o.ensureNotNull)(this._studyId)));this._chartModel.removeSource(e)},t.prototype.insertedStudy=function(){return this._chartModel.dataSourceForId(Object(o.ensureNotNull)(this._studyId))},t}(r.UndoCommand)},"2bPF":function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolBarsPattern";var r=t||new s("linetoolbarspattern");o.call(this,e,r),r.mirrored.listeners().subscribe(this,n.prototype.mirror),r.flipped.listeners().subscribe(this,n.prototype.flip),r.addExclusion("mirrored"),r.addExclusion("flipped"),this._scaleCoeff=1,this.version=n.version,this._pattern=[],this._properties.mode.listeners().subscribe(this,n.prototype.onModeChanged),i.e("lt-pane-views").then(function(e){var t=i("c6sA").BarsPatternPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("7KDR").Action,s=i("Ocx9").DefaultProperty,a=i("k9/m").PlotRowSearchMode,l=i("hayr").propertyPages,c=i("Ye2/").LineToolBarsPatternMode;inherit(n,o),n.version=2,n.prototype.onModeChanged=function(){var e=this.patternPriceDiff();e*=this._pressCoeff,this._points[1].price=this._timePoint[1].price=this._points[0].price+e},n.prototype.additionalActions=function(e){var t=this;return[new r({checked:this.properties().mirrored.value(),checkable:!0,label:window.t("Mirrored"),payload:{target:this},onExecute:function(t){var i=t.getPayload(),n=i.target;e.setProperty(n.properties().mirrored,!n.properties().mirrored.value(),"Bats Pattern Mirroring"),n.updateAllViews(),n._model.updateSource(n)}}),new r({checked:this.properties().flipped.value(),checkable:!0,label:window.t("Flipped"),payload:{target:this},onExecute:function(t){var i=t.getPayload(),n=i.target;e.setProperty(n.properties().flipped,!n.properties().flipped.value(),"Bats Pattern Flipping"),n.updateAllViews(),n._model.updateSource(n)}}),new r({checkable:!0,label:window.t("Restore Size"),onExecute:function(i){var n=t.points()[0],o=t.patternPriceDiff(),r=n.price+o,s=n.index+t._pattern.length-1;e.startChangingLinetool(t,{price:r,index:s},1,{}),e.changeLinePoint({price:r,index:s},{}),e.endChangingLinetool()}})]},n.prototype.pointsCount=function(){return 2}, n.prototype.state=function(e){var t=o.prototype.state.call(this,e);return t.pattern=this._pattern,t},n.prototype.restoreData=function(e){e.pattern&&(this._pattern=e.pattern)},n.prototype.title=function(){return"Bars Pattern"},n.prototype.name=function(){return"Bars Pattern"},n.prototype.cloneData=function(e){this._pattern=TradingView.clone(e._pattern)},n.prototype.mirror=function(){var e,t,i,n,o,r=this._pattern,s=r[0][TradingView.HIGH_PLOT],a=Math.min(r[0][TradingView.LOW_PLOT],r[0][TradingView.HIGH_PLOT]),l=Math.max(r[0][TradingView.LOW_PLOT],r[0][TradingView.HIGH_PLOT]);for(e=1;ethis.points()[1].index&&(this._points[0].price=this._points[1].price),this._pattern=[],p=y;p<=d;p++)_=this._model.mainSeries().data().valueAt(p),this._pattern.push(TradingView.clone(_));this._pattern.length>0&&(f=this.patternPriceDiff(),this._points[1].price=this._points[0].price+f,this._points[1].index=this._points[0].index+(d-y),this.normalizePoints(),this.createServerPoints())}return l},n.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),o.prototype.setPoint.call(this,e,t,i)},n.prototype.migrateVersion=function(e,t,i){if(1===e&&this._pattern.length>0){var n=this.patternPriceDiff();2===this._timePoint.length&&(this._timePoint[1].price=this._timePoint[0].price+n),2===this._points.length&&(this._points[1].price=this._points[0].price+n)}},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return l.LineToolBarsPatternStylesPropertyPage},t.LineToolBarsPattern=n},"2cgs":function(e,t,i){"use strict";var n=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,o){return n.Std.or(n.Std.and(n.Std.eq(e,t),n.Std.eq(e,i)),n.Std.eq(t,i))?0:(2*e-i-t)/(t-i)*o},this.main=function(e,t){var i;return this._context=e,this._input=t,i=this.f_0(n.Std.close(this._context),n.Std.high(this._context),n.Std.low(this._context),n.Std.volume(this._context)),[n.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(n.Std.open(t)),o=t.new_var(n.Std.high(t)),r=t.new_var(n.Std.low(t)),s=t.new_var(n.Std.close(t)),a=n.Std.abs(o-s.get(1)),l=n.Std.abs(r-s.get(1)),c=n.Std.abs(o-r),u=n.Std.abs(s.get(1)-i.get(1)),h=n.Std.max(a,l),d=n.Std.iff(a>=n.Std.max(l,c),a-.5*l+.25*u,n.Std.iff(l>=n.Std.max(a,c),l-.5*a+.25*u,c+.25*u));return n.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 n.Std.cum(i,t)},this.main=function(e,t){var i;return this._context=e,this._input=t,i=this._input(0),[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 n.Std.gt(e,t)},this.f_1=function(e,t){return n.Std.lt(e,t)},this.f_2=function(e,t){return 0===t?e:e/t},this.main=function(e,t){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=this._input(0),o=this.f_0(n.Std.close(this._context),n.Std.open(this._context)),r=this._context.new_var(o),s=n.Std.sum(r,i,this._context),a=this.f_1(n.Std.close(this._context),n.Std.open(this._context)),l=this._context.new_var(a),c=n.Std.sum(l,i,this._context),[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){var i,o,r,s,a;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._input(1),s=this._input(2),a=this._context.new_var(i),[n.Std.alma(a,o,r,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){var i,o,r,s,a,l,c,u,h;return this._context=e,this._input=t,i=this._input(0),o=n.Std.high(this._context),r=i+1,s=this._context.new_var(o),a=n.Std.highestbars(s,r,this._context),l=this.f_0(a,i),c=n.Std.low(this._context),u=this._context.new_var(c),h=n.Std.lowestbars(u,r,this._context),[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,[n.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(n.Std.high(this._context)),i=n.Std.change(t),o=this._context.new_var(n.Std.low(this._context)),r=-n.Std.change(o),s=this._context.new_var(n.Std.tr(void 0,this._context)),a=n.Std.rma(s,e,this._context),l=this._context.new_var(n.Std.and(n.Std.gt(i,r),n.Std.gt(i,0))?i:0),c=n.Std.fixnan(100*n.Std.rma(l,e,this._context)/a,this._context),u=this._context.new_var(n.Std.and(n.Std.gt(r,i),n.Std.gt(r,0))?r:0),h=n.Std.fixnan(100*n.Std.rma(u,e,this._context)/a,this._context);return[c,h]},this.f_1=function(e,t){var i=this.f_0(e),o=i[0],r=i[1],s=o+r,a=this._context.new_var(n.Std.abs(o-r)/(n.Std.eq(s,0)?1:s)),l=100*n.Std.rma(a,t,this._context);return[l]},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){var i,o,r;return this._context=e,this._input=t,i=this._input(0),o=n.Std.tr(this._context),r=this._context.new_var(o),[n.Std.rma(r,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 n.Std.le(e,0)?0:1},this.main=function(e,t){var i,o,r,s,a,l,c,u,h;return this._context=e,this._input=t,i=n.Std.hl2(this._context),o=this._context.new_var(i),r=n.Std.sma(o,5,this._context),s=this._context.new_var(i),a=n.Std.sma(s,34,this._context),c=l=this.f_0(r,a),u=this._context.new_var(l),h=n.Std.change(u),[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,n){return(e-t)/(i-n)},this.main=function(e,t){return this._context=e,this._input=t,[this.f_0(n.Std.close(this._context),n.Std.open(this._context),n.Std.high(this._context),n.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){var i,o,r,s,a,l,c,u;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._input(1),s=this._context.new_var(i),a=n.Std.sma(s,o,this._context),l=this._context.new_var(i),c=n.Std.stdev(l,o,this._context),u=this.f_0(r,c),[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){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._input(1),s=this._context.new_var(i),a=n.Std.sma(s,o,this._context),l=this._context.new_var(i),c=n.Std.stdev(l,o,this._context),u=this.f_0(r,c),h=this.f_1(a,u),d=this.f_2(a,u),[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){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._input(1),s=this._context.new_var(i),a=n.Std.sma(s,o,this._context),l=this._context.new_var(i),c=n.Std.stdev(l,o,this._context),u=this.f_0(r,c),h=this.f_1(a,u),d=this.f_2(a,u),[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,o){return n.Std.or(n.Std.and(n.Std.eq(e,t),n.Std.eq(e,i)),n.Std.eq(t,i))?0:(2*e-i-t)/(t-i)*o},this.f_1=function(e,t){return e/t},this.main=function(e,t){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=this._input(0),o=this.f_0(n.Std.close(this._context),n.Std.high(this._context),n.Std.low(this._context),n.Std.volume(this._context)),r=this._context.new_var(o),s=n.Std.sum(r,i,this._context),a=n.Std.volume(this._context),l=this._context.new_var(a),c=n.Std.sum(l,i,this._context),[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){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=n.Std.accdist(this._context),s=this._context.new_var(r),a=n.Std.ema(s,i,this._context),l=this._context.new_var(r),c=n.Std.ema(l,o,this._context),[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){var i,o;return this._context=e,this._input=t,i=this._context.new_var(n.Std.high(this._context)-n.Std.low(this._context)),o=this._context.new_var(n.Std.ema(i,this.period,this._context)),[n.Std.roc(o,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){var i,o,r,s,a,l,c,u,h,d,p,_,f,m;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=this._input(2),s=n.Std.high(this._context),a=this._context.new_var(s),l=n.Std.highest(a,i,this._context),c=n.Std.atr(i,this._context),u=this.f_0(l,o,c),h=this._context.new_var(s),d=n.Std.lowest(h,i,this._context),p=this.f_1(d,o,c),_=this._context.new_var(u),f=n.Std.highest(_,r,this._context),m=this._context.new_var(p),[n.Std.lowest(m,r,this._context),f]}}},{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 n.Std.ge(e,0)?e:0},this.f_1=function(e){return n.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){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=this._input(0),o=n.Std.close(this._context),r=this._context.new_var(o),s=n.Std.change(r),a=this.f_0(s),l=this.f_1(s),c=this._context.new_var(a),u=n.Std.sum(c,i,this._context),h=this._context.new_var(l),d=n.Std.sum(h,i,this._context),[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=n.Std.close(this._context),t=n.Std.hlc3(this._context),i=this._context.new_var(n.Std.high(this._context)),o=n.Std.highest(i,30,this._context),r=n.Std.lowest(i,30,this._context),s=25/(o-r)*r,a=this._context.new_var(e),l=this._context.new_var(n.Std.ema(a,34,this._context)),c=(l.get(1)-l.get(0))/t*s,u=n.Std.sqrt(1+c*c),h=n.Std.round(180*n.Std.acos(1/u)/3.141592653589793),d=n.Std.iff(n.Std.gt(c,0),-h,h),p=n.Std.and(n.Std.gt(d,-2.14),n.Std.le(d,-.71))?7:8,_=n.Std.and(n.Std.gt(d,-3.57),n.Std.le(d,-2.14))?6:p,f=n.Std.and(n.Std.gt(d,-5),n.Std.le(d,-3.57))?5:_,m=n.Std.le(d,-5)?4:f,y=n.Std.and(n.Std.lt(d,2.14),n.Std.ge(d,.71))?3:m,g=n.Std.and(n.Std.lt(d,3.57),n.Std.ge(d,2.14))?2:y,v=n.Std.and(n.Std.lt(d,5),n.Std.ge(d,3.57))?1:g,S=n.Std.ge(d,5)?0:v;return[1,S]},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,o){return 100*n.Std.log10(e/(t-i))/o},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d,p;return this._context=e,this._input=t,i=this._input(0),o=n.Std.atr(1,this._context),r=this._context.new_var(o),s=n.Std.sum(r,i,this._context),a=n.Std.high(this._context),l=this._context.new_var(a),c=n.Std.highest(l,i,this._context),u=n.Std.low(this._context),h=this._context.new_var(u),d=n.Std.lowest(h,i,this._context),p=n.Std.log10(i),[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){var i,o,r,s,a,l;return this._context=e,this._input=t,i=n.Std.hlc3(this._context),o=this._input(0),r=this._context.new_var(i),s=n.Std.sma(r,o,this._context),a=this._context.new_var(i),l=n.Std.dev(a,o,this._context),[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 o=i.new_var(n.Std.max(n.Std.change(e),0));return n.Std.rma(o,t,i)},this.f_2=function(e,t,i){var o=i.new_var(-n.Std.min(n.Std.change(e),0));return n.Std.rma(o,t,i)},this.f_3=(e=0,function(t){var i=t.get(0),o=t.get(1);return e=i===o?0:i>o?n.Std.nz(e)<=0?1:n.Std.nz(e)+1:n.Std.nz(e)>=0?-1:n.Std.nz(e)-1,this._context.new_var(e)}),this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._context.new_var(i),r=this._input(0),s=this._input(1),a=this._input(2),l=n.Std.rsi(this.f_1(o,r,this._context),this.f_2(o,r,this._context)),c=this.f_3(o),u=n.Std.rsi(this.f_1(c,s,this._context),this.f_2(c,s,this._context)),h=this._context.new_var(n.Std.roc(o,1)),d=n.Std.percentrank(h,a),[n.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){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=this._input(2),s=n.Std.close(this._context),a=this._context.new_var(s),l=n.Std.roc(a,o),c=this._context.new_var(s),u=n.Std.roc(c,r),h=this.f_0(l,u),d=this._context.new_var(h),[n.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),n.Std.period(this._context),n.Std.period(this._context))},this.main=function(e,t){var i,o,r,s,a,l,c,u,h;return this._context=e,this._input=t,i=this._context.new_unlimited_var(this._context.symbol.time),this._input(0),n.Std.period(this._context),o=n.Std.close(this._context),r=this._input(1),this._context.select_sym(1),s=this._context.new_unlimited_var(this._context.symbol.time),a=n.Std.close(this._context),l=this._context.new_unlimited_var(a),this._context.select_sym(0),c=l.adopt(s,i,0),u=this._context.new_var(o),h=this._context.new_var(c),[n.Std.correlation(u,h,r,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),n.Std.period(this._context),n.Std.period(this._context)),this._context.new_sym(this._input(1),n.Std.period(this._context),n.Std.period(this._context)),this.period=this._input(2)},this.correlationLog=function(e,t,i,o){var r=n.Std.sma(e,i,o),s=n.Std.sma(t,i,o),a=o.new_var(e.get()*t.get());return(n.Std.sma(a,i,o)-r*s)/Math.sqrt(n.Std.variance2(e,r,i)*n.Std.variance2(t,s,i))},this.main=function(e,t){var i,o,r,s,a,l,c;return this._context=e,this._input=t,this._context.select_sym(1),i=this._context.new_var(this._context.symbol.time),this._context.select_sym(2),o=this._context.new_var(n.Std.close(this._context)),r=this._context.new_var(n.Std.log(o.get()/o.get(1))),s=this._context.new_var(this._context.symbol.time),this._context.select_sym(1),a=this._context.new_var(n.Std.close(this._context)),l=this._context.new_var(n.Std.log(a.get()/a.get(1))),c=this._context.new_var(r.adopt(s,i,0)),[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),o=this._context.new_var(n.Std.close(this._context)),r=this._context.new_var(n.Std.sma(o,e,this._context)),s=this._context.new_var(n.Std.close(this._context)),a=s.get(i)-r,l=n.Std.close(this._context)-r.get(i),c=t?a:l,u=-i,h=t?u:0;return[c,h]},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 n.Std.and(n.Std.gt(e,t),n.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 n.Std.abs(e-t)/(n.Std.eq(i,0)?1:i)},this.f_5=function(e){return 100*e},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,x,C,T,I,L;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=n.Std.high(this._context),s=this._context.new_var(r),a=n.Std.change(s),l=n.Std.low(this._context),c=this._context.new_var(l),u=n.Std.change(c),h=this.f_0(u),d=n.Std.tr(this._context),p=this._context.new_var(d),_=n.Std.rma(p,i,this._context),f=this.f_1(a,h),m=this._context.new_var(f),y=n.Std.rma(m,i,this._context),g=this.f_2(y,_),v=n.Std.fixnan(g,this._context),S=this.f_1(h,a),b=this._context.new_var(S),w=n.Std.rma(b,i,this._context),P=this.f_2(w,_),x=n.Std.fixnan(P,this._context),C=this.f_3(v,x),T=this.f_4(v,x,C),I=this._context.new_var(T),L=n.Std.rma(I,o,this._context),[v,x,this.f_5(L)]}}},{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){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=this._input(0),o=n.Std.low(this._context),r=this._context.new_var(o),s=n.Std.lowest(r,i,this._context),a=n.Std.high(this._context),l=this._context.new_var(a),[s,c=n.Std.highest(l,i,this._context),n.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){var i,o,r,s,a,l;return this._context=e,this._input=t,i=this._input(0),o=n.Std.close(this._context),r=this._context.new_var(o),s=n.Std.ema(r,i,this._context),a=this._context.new_var(s),l=n.Std.ema(a,i,this._context),[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,n,o){return e*t*(i-n)/o},this.main=function(e,t){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=n.Std.hl2(this._context),s=this._context.new_var(r),a=n.Std.change(s), l=this.f_0(i,a,n.Std.high(this._context),n.Std.low(this._context),n.Std.volume(this._context)),c=this._context.new_var(l),[n.Std.sma(c,o,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){var i,o,r,s,a,l;return this._context=e,this._input=t,i=this._input(0),o=n.Std.close(this._context),r=this._context.new_var(o),s=n.Std.change(r),a=this.f_0(s,n.Std.volume(this._context)),l=this._context.new_var(a),[n.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:n.Std.na()},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=n.Std.close(this._context),s=this._context.new_var(r),a=n.Std.ema(s,i,this._context),l=this._context.new_var(r),u=a,h=c=n.Std.ema(l,o,this._context),d=n.Std.cross(a,c,this._context),[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){var i,o;return this._context=e,this._input=t,i=this._context.new_var(n.Std[this._input(4)](this._context)),o=n.Std.sma(i,this._input(0),this._context),"Exponential"===this._input(3)?o=n.Std.ema(i,this._input(0),this._context):"Weighted"===this._input(3)&&(o=n.Std.wma(i,this._input(0),this._context)),[this.f_0(o,this._input(1)/100),o,this.f_1(o,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){var i,o,r,s,a,l,c,u,h;for(this._context=e,this._input=t,i=this._context.new_var(n.Std.close(this._context)),s=0,a=0,l=0;lthis._context.new_var(i).get(1)?1:0,[100*n.Std.sma(this._context.new_var(o),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 n.Std.gt(e,0)?t:n.Std.lt(i,0)?-t:0*t},this.main=function(e,t){var i,o,r;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._context.new_var(i),r=n.Std.change(o),[this.f_0(r,n.Std.volume(this._context),r)]}}},{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 n.Std.gt(e,0)?t:n.Std.lt(i,0)?-t:0*t},this.main=function(e,t){var i,o,r,s;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._context.new_var(i),r=n.Std.change(o),s=this.f_0(r,n.Std.volume(this._context),r),[n.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){var i,o,r;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=this._input(2),[n.Std.sar(i,o,r,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){var i,o,r,s,a,l,c,u;return this._context=e,this._input=t,i=n.Std.high(this._context),o=this._context.new_var(i),r=n.Std.low(this._context),s=this._context.new_var(r),a=this._input(0),l=this._input(1),[{value:c=n.Std.highest(o,a,this._context),offset:l},{value:u=n.Std.lowest(s,a,this._context),offset:l},{value:n.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){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._input(1),s=this._context.new_var(i),a=n.Std.sma(s,o,this._context),l=this._context.new_var(i),c=n.Std.sma(l,r,this._context),[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(n.Std.close(this._context)),t=n.Std.cum(n.Std.change(e)/e.get(1)*n.Std.volume(this._context),this._context);return[t]},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){var i,o;return this._context=e,this._input=t,i=this._context.new_var(n.Std.close(this._context)),o=this._input(0),[100*(i.get(0)-i.get(o))/i.get(o)]}}},{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 n.Std.max(e,0)},this.f_1=function(e){return-n.Std.min(e,0)},this.f_2=function(e,t){return n.Std.eq(e,0)?100:n.Std.eq(t,0)?0:100-100/(1+t/e)},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._context.new_var(i),s=n.Std.change(r),a=this.f_0(s),l=this._context.new_var(a),c=n.Std.rma(l,o,this._context),u=this.f_1(s),h=this._context.new_var(u),d=n.Std.rma(h,o,this._context),[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){var i,o,r,s,a,l,c,u,h,d,p,_,f;return this._context=e,this._input=t,i=this._input(0),o=this.f_0(n.Std.close(this._context),n.Std.open(this._context)),r=this._context.new_var(o),s=n.Std.swma(r,this._context),a=this._context.new_var(s),l=n.Std.sum(a,i,this._context),c=this.f_0(n.Std.high(this._context),n.Std.low(this._context)),u=this._context.new_var(c),h=n.Std.swma(u,this._context),d=this._context.new_var(h),p=n.Std.sum(d,i,this._context),_=this.f_1(l,p),f=this._context.new_var(_),[_,n.Std.swma(f,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 n.Std.le(e,0)?0:t},this.f_1=function(e,t){return n.Std.gt(e,0)?0:t},this.f_2=function(e,t){return e/(e+t)*100},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d,p,_;return this._context=e,this._input=t,i=this._input(0),o=n.Std.close(this._context),r=this._context.new_var(o),s=n.Std.stdev(r,i,this._context),a=this._context.new_var(o),l=n.Std.change(a),c=this.f_0(l,s),u=this._context.new_var(c),h=n.Std.ema(u,14,this._context),d=this.f_1(l,s),p=this._context.new_var(d),_=n.Std.ema(p,14,this._context),[this.f_2(h,_)]}}},{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){var i,o,r,s,a,l,c,u;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=this._input(2),s=n.Std.close(this._context),a=this._context.new_var(s),l=n.Std.tsi(a,i,o,this._context),c=this._context.new_var(l),[l,u=n.Std.ema(c,r,this._context),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=n.Std[this._input(1)](this._context),i=this._context.new_var(t),o=n.Std.sma(i,e,this._context),r=this._context.new_var(),s=(r.get(1)*(e-1)+t)/e;return r.set(n.Std.na(r.get(1))?o:s),[r.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){var i,o,r;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=this._context.new_var(n.Std.close(this._context)),[n.Std.stdev(r,i,this._context)*o]}}},{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){var i,o,r,s,a,l,c,u,h,d,p,_,f;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=this._input(2),s=n.Std.close(this._context),a=n.Std.high(this._context),l=n.Std.low(this._context),c=this._context.new_var(s),u=this._context.new_var(a),h=this._context.new_var(l),d=n.Std.stoch(c,u,h,i,this._context),p=this._context.new_var(d),_=n.Std.sma(p,o,this._context),f=this._context.new_var(_),[_,n.Std.sma(f,r,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 o=i.new_var(n.Std.max(n.Std.change(e),0));return n.Std.rma(o,t,i)},this.f_2=function(e,t,i){var o=i.new_var(-n.Std.min(n.Std.change(e),0));return n.Std.rma(o,t,i)},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d,p,_,f,m;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._input(1),s=this._input(2),a=this._input(3),l=this._context.new_var(i),c=n.Std.rsi(this.f_1(l,o,this._context),this.f_2(l,o,this._context)),u=this._context.new_var(c),h=this._context.new_var(c),d=this._context.new_var(c),p=n.Std.stoch(u,h,d,r,this._context),_=this._context.new_var(p),f=n.Std.sma(_,s,this._context),m=this._context.new_var(f),[f,n.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 n.Std.log(e)},this.f_1=function(e){return 1e4*e},this.main=function(e,t){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=this._input(0),o=this.f_0(n.Std.close(this._context)),r=this._context.new_var(o),s=n.Std.ema(r,i,this._context),a=this._context.new_var(s),l=n.Std.ema(a,i,this._context),c=this._context.new_var(l),u=n.Std.ema(c,i,this._context),h=this._context.new_var(u),d=n.Std.change(h),[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){var i,o,r,s,a,l,c,u;return this._context=e,this._input=t,i=this._input(0),o=n.Std.close(this._context),r=this._context.new_var(o),s=n.Std.ema(r,i,this._context),a=this._context.new_var(s),l=n.Std.ema(a,i,this._context),c=this._context.new_var(l),u=n.Std.ema(c,i,this._context),[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){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=this._input(2),s=n.Std.close(this._context),a=this._context.new_var(s),l=n.Std.tsi(a,o,i,this._context),c=this._context.new_var(l),[l,n.Std.ema(c,r,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(){var e,t,i,o,r=this._context.new_var(n.Std.close(this._context)),s=n.Std.sum(r,this.period,this._context),a=0,l=0;for(e=0;e0?1:-1:i/(o=Math.sqrt(o))},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,[n.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 o=this._context.new_var(e),r=this._context.new_var(t),s=n.Std.sum(o,i,this._context)/n.Std.sum(r,i,this._context);return[s]},this.f_1=function(){var e=this._input(0),t=this._input(1),i=this._input(2),o=this._context.new_var(n.Std.close(this._context)),r=n.Std.max(n.Std.high(this._context),o.get(1)),s=this._context.new_var(n.Std.close(this._context)),a=n.Std.min(n.Std.low(this._context),s.get(1)),l=n.Std.close(this._context)-a,c=r-a,u=this.f_0(l,c,e),h=this.f_0(l,c,t),d=this.f_0(l,c,i),p=100*(4*u[0]+2*h[0]+d[0])/7;return[p]},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 o=this.variance(e,t,i);return n.Std.sqrt(o)},this.variance=function(e,t,i){var o=n.Std.sma(e,t,i);return this.variance2(e,o,t)},this.variance2=function(e,t,i){var n,o,r=0;for(n=0;n0&&(t=.12*this.square(o.get()-a.get(1))/this.marketClosedPercentage+.88*t/(1-this.marketClosedPercentage)),t/=e,t*=this.secondsPerYear,i=this._context.new_var(t),100*Math.sqrt(n.Std.sum(i,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){var i,n=this.bars.length-this.period,o=this.bars[n];for(i=n+1;io&&(o=this.bars[i]);return o},this.computeATR=function(){var e=n.Std.high(this._context)-n.Std.low(this._context),t=n.Std.high(this._context)-this.bars[this.bars.length-2],i=this.bars[this.bars.length-2]-n.Std.low(this._context);return this.tr=Math.max(e,t,i),"Exponential"===this.maMethod?this.atr=n.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(){var e,t,i,o;return n.Std.close(this._context)===this.bars[this.bars.length-1]?this.lastSar:(this.bars.push(n.Std.close(this._context)),1===this.count?(this.atr=n.Std.high(this._context)-n.Std.low(this._context),this.sic=n.Std.close(this._context)):this.countthis.sic&&(this.sic=n.Std.close(this._context))):this.count===this.period?(e=n.Std.high(this._context)-n.Std.low(this._context),t=n.Std.high(this._context)-this.bars[this.bars.length-2],i=this.bars[this.bars.length-2]-n.Std.low(this._context),this.atr+=Math.max(e,t,i),this.atr*=1/this.period,n.Std.close(this._context)>this.sic&&(this.sic=n.Std.close(this._context)),this.position="LONG",this.nextsar=this.sic-this.atr*this.atrMult):(o=this.nextsar,"LONG"===this.position?n.Std.close(this._context)o?(this.position="LONG",this.sic=n.Std.close(this._context),this.nextsar=this.sic-this.computeATR()):(this.position="SHORT",this.sic=Math.min(n.Std.close(this._context),this.sic),this.nextsar=this.sic+this.computeATR())),this.lastSar=o),this.count++,o)},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){var i,o,r;return this._context=e,this._input=t,i=e.new_var(),o=e.new_var(),(r=this._context.symbol.time)&&(null===this._isNewSession&&(this._isNewSession=n.Std.createNewSessionCheck(e)),this._isNewSession(r)&&(this.f_1(i),this.f_1(o))),i.set(n.Std.nz(i.get(1))+n.Std.hlc3(this._context)*n.Std.volume(this._context)),o.set(n.Std.nz(o.get(1))+n.Std.volume(this._context)),[i.get(0)/o.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){var i,o,r;return this._context=e,this._input=t,i=n.Std.close(this._context),o=this._input(0),r=this._context.new_var(i),[n.Std.vwma(r,o,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){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=n.Std.volume(this._context),s=this._context.new_var(r),a=n.Std.ema(s,i,this._context),l=this._context.new_var(r),c=n.Std.ema(l,o,this._context),[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(n.Std.low(this._context)),i=this._context.new_var(n.Std.abs(n.Std.high(this._context)-t.get(1))),o=n.Std.sum(i,e,this._context),r=this._context.new_var(n.Std.high(this._context)),s=this._context.new_var(n.Std.abs(n.Std.low(this._context)-r.get(1))),a=n.Std.sum(s,e,this._context),l=this._context.new_var(n.Std.atr(1,this._context)),c=n.Std.sum(l,e,this._context),u=o/c,h=a/c;return[u,h]},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){var i,o,r,s,a,l,c;return this._context=e,this._input=t,i=this._input(0),o=n.Std.high(this._context),r=this._context.new_var(o),s=n.Std.highest(r,i,this._context),a=n.Std.low(this._context),l=this._context.new_var(a),c=n.Std.lowest(l,i,this._context),[this.f_0(n.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){var i,o,r,s,a,l,c,u,h,d;return this._context=e,this._input=t,i=this._input(0),o=this._input(1),r=this._input(2),s=n.Std.hl2(this._context),a=this._context.new_var(s),l=n.Std.ema(a,i,this._context),c=this._context.new_var(s),u=n.Std.ema(c,o,this._context),h=this._context.new_var(s),d=n.Std.ema(h,r,this._context),[{value:l,offset:8},{value:u,offset:5},{value:d,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(n.Std.high(this._context)),i=n.Std.or(n.Std.and(n.Std.and(n.Std.lt(t.get(e+2),t.get(e)),n.Std.lt(t.get(e+1),t.get(e))),n.Std.and(n.Std.lt(t.get(e-1),t.get(e)),n.Std.lt(t.get(e-2),t.get(e)))),n.Std.or(n.Std.or(n.Std.and(n.Std.lt(t.get(e+3),t.get(e)),n.Std.and(n.Std.and(n.Std.lt(t.get(e+2),t.get(e)),n.Std.eq(t.get(e+1),t.get(e))),n.Std.and(n.Std.lt(t.get(e-1),t.get(e)),n.Std.lt(t.get(e-2),t.get(e))))),n.Std.and(n.Std.and(n.Std.lt(t.get(e+4),t.get(e)),n.Std.lt(t.get(e+3),t.get(e))),n.Std.and(n.Std.and(n.Std.eq(t.get(e+2),t.get(e)),n.Std.le(t.get(e+1),t.get(e))),n.Std.and(n.Std.lt(t.get(e-1),t.get(e)),n.Std.lt(t.get(e-2),t.get(e)))))),n.Std.or(n.Std.and(n.Std.and(n.Std.lt(t.get(e+5),t.get(e)),n.Std.and(n.Std.lt(t.get(e+4),t.get(e)),n.Std.eq(t.get(e+3),t.get(e)))),n.Std.and(n.Std.and(n.Std.eq(t.get(e+2),t.get(e)),n.Std.le(t.get(e+1),t.get(e))),n.Std.and(n.Std.lt(t.get(e-1),t.get(e)),n.Std.lt(t.get(e-2),t.get(e))))),n.Std.and(n.Std.and(n.Std.and(n.Std.lt(t.get(e+6),t.get(e)),n.Std.lt(t.get(e+5),t.get(e))),n.Std.and(n.Std.eq(t.get(e+4),t.get(e)),n.Std.le(t.get(e+3),t.get(e)))),n.Std.and(n.Std.and(n.Std.eq(t.get(e+2),t.get(e)),n.Std.le(t.get(e+1),t.get(e))),n.Std.and(n.Std.lt(t.get(e-1),t.get(e)),n.Std.lt(t.get(e-2),t.get(e)))))))),o=this._context.new_var(n.Std.low(this._context)),r=n.Std.or(n.Std.and(n.Std.and(n.Std.gt(o.get(e+2),o.get(e)),n.Std.gt(o.get(e+1),o.get(e))),n.Std.and(n.Std.gt(o.get(e-1),o.get(e)),n.Std.gt(o.get(e-2),o.get(e)))),n.Std.or(n.Std.or(n.Std.and(n.Std.gt(o.get(e+3),o.get(e)),n.Std.and(n.Std.and(n.Std.gt(o.get(e+2),o.get(e)),n.Std.eq(o.get(e+1),o.get(e))),n.Std.and(n.Std.gt(o.get(e-1),o.get(e)),n.Std.gt(o.get(e-2),o.get(e))))),n.Std.and(n.Std.and(n.Std.gt(o.get(e+4),o.get(e)),n.Std.gt(o.get(e+3),o.get(e))),n.Std.and(n.Std.and(n.Std.eq(o.get(e+2),o.get(e)),n.Std.ge(o.get(e+1),o.get(e))),n.Std.and(n.Std.gt(o.get(e-1),o.get(e)),n.Std.gt(o.get(e-2),o.get(e)))))),n.Std.or(n.Std.and(n.Std.and(n.Std.gt(o.get(e+5),o.get(e)),n.Std.and(n.Std.gt(o.get(e+4),o.get(e)),n.Std.eq(o.get(e+3),o.get(e)))),n.Std.and(n.Std.and(n.Std.eq(o.get(e+2),o.get(e)),n.Std.ge(o.get(e+1),o.get(e))),n.Std.and(n.Std.gt(o.get(e-1),o.get(e)),n.Std.gt(o.get(e-2),o.get(e))))),n.Std.and(n.Std.and(n.Std.and(n.Std.gt(o.get(e+6),o.get(e)),n.Std.gt(o.get(e+5),o.get(e))),n.Std.and(n.Std.eq(o.get(e+4),o.get(e)),n.Std.ge(o.get(e+3),o.get(e)))),n.Std.and(n.Std.and(n.Std.eq(o.get(e+2),o.get(e)),n.Std.ge(o.get(e+1),o.get(e))),n.Std.and(n.Std.gt(o.get(e-1),o.get(e)),n.Std.gt(o.get(e-2),o.get(e))))))));return[r,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){function n(e,t,i,n,r,s){e?(this._control=e,this._property=t,this._applyOnFly=i,this._undoModel=n,this._undoText=r,this._doesNotAffectSave=!1,t&&(this._formatters=[],this._changed=!1,this.setValue(t.value()),t.listeners().subscribe(this,this.propertyChanged))):o.logDebug("Missing control")}var o=i("uOxu").getLogger("Chart.PropertyPage.Binding") ;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 n});var n={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"},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";var n,o,r,s,a,l;i.r(t),i.d(t,"StudyStatusView",function(){return l}),n=i("mrSG"),o=i("nBJD"),r=i("8sOK"),s={NONE:"Default"},a="#ff0000",l=function(e){function t(t,i){var n=e.call(this,i)||this;return n._source=t,n}return n.__extends(t,e),t.prototype.color=function(){return this._source instanceof r.StudyStub?e.prototype.color.call(this):this._source.isFailed()||this._source.metaInfo&&this._source.metaInfo().isTVScriptStub?a:e.prototype.color.call(this)},t.prototype.update=function(){this._source.isFailed()?this._text=this._source.title(!0,s)+": "+this._source.status():this._text=this._source.title(!0,s)+" "+this._source.status()},t}(o.a)},"38az":function(e,t,i){"use strict";function n(){this.backColorers=[]}function o(e){n.call(this),this._series=e}function r(e,t){n.call(this),this._study=e,this._plotIndex=t}var s=i("k9/m").PlotRowSearchMode;n.prototype.barStyle=function(e,t,i){var n,o={};for(n=this.backColorers.length-1;n>=0;n--)this.backColorers[n].applyBarStyle(e,t,o,i);return this.applyBarStyle(e,t,o,i),o}, 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.prototype.applyBarStyle=function(e,t,i,n){var o,r,s,a,l,c,u,h,d,p,_,f,m,y,g;switch(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,(o=this._series.properties()).style.value()){case TradingView.Series.STYLE_LINE:i.barColor=o.lineStyle.color.value();break;case TradingView.Series.STYLE_AREA:i.barColor=o.areaStyle.linecolor.value();break;case TradingView.Series.STYLE_BARS:a=r=o.barStyle.upColor.value(),l=s=o.barStyle.downColor.value(),c=this.findBar(e,!1,n),o.barStyle.barColorsOnPrevClose.value()?(u=this.findPrevBar(e,!1,n),i.barColor=u[TradingView.CLOSE_PLOT]<=c[TradingView.CLOSE_PLOT]?r:s,i.barBorderColor=u[TradingView.CLOSE_PLOT]<=c[TradingView.CLOSE_PLOT]?a:l):(i.barColor=c[TradingView.OPEN_PLOT]<=c[TradingView.CLOSE_PLOT]?r:s,i.barBorderColor=c[TradingView.OPEN_PLOT]<=c[TradingView.CLOSE_PLOT]?a:l);break;case TradingView.Series.STYLE_CANDLES:r=o.candleStyle.upColor.value(),s=o.candleStyle.downColor.value(),a=o.candleStyle.borderUpColor?o.candleStyle.borderUpColor.value():o.candleStyle.borderColor.value(),l=o.candleStyle.borderDownColor?o.candleStyle.borderDownColor.value():o.candleStyle.borderColor.value(),h=o.candleStyle.wickUpColor?o.candleStyle.wickUpColor.value():o.candleStyle.wickColor.value(),d=o.candleStyle.wickDownColor?o.candleStyle.wickDownColor.value():o.candleStyle.wickColor.value(),c=this.findBar(e,!1,n),p=o.candleStyle.barColorsOnPrevClose.value()?(u=this.findPrevBar(e,!1,n))[TradingView.CLOSE_PLOT]<=c[TradingView.CLOSE_PLOT]:c[TradingView.OPEN_PLOT]<=c[TradingView.CLOSE_PLOT],i.barColor=p?r:s,i.barBorderColor=p?a:l,i.barWickColor=p?h:d;break;case TradingView.Series.STYLE_HOLLOW_CANDLES:r=o.hollowCandleStyle.upColor.value(),s=o.hollowCandleStyle.downColor.value(),a=o.hollowCandleStyle.borderUpColor?o.hollowCandleStyle.borderUpColor.value():o.hollowCandleStyle.borderColor.value(),l=o.hollowCandleStyle.borderDownColor?o.hollowCandleStyle.borderDownColor.value():o.hollowCandleStyle.borderColor.value(),h=o.hollowCandleStyle.wickUpColor?o.hollowCandleStyle.wickUpColor.value():o.hollowCandleStyle.wickColor.value(),d=o.hollowCandleStyle.wickDownColor?o.hollowCandleStyle.wickDownColor.value():o.hollowCandleStyle.wickColor.value(),c=this.findBar(e,!1,n),(u=this.findPrevBar(e,!1,n))[TradingView.CLOSE_PLOT]<=c[TradingView.CLOSE_PLOT]?(i.barColor=r,i.barBorderColor=a,i.barWickColor=h):(i.barColor=s,i.barBorderColor=l,i.barWickColor=d),c[TradingView.OPEN_PLOT]<=c[TradingView.CLOSE_PLOT]?i.isBarHollow=!0:i.isBarHollow=!1;break;case TradingView.Series.STYLE_HEIKEN_ASHI:r=o.haStyle.upColor.value(),s=o.haStyle.downColor.value(),a=o.haStyle.borderUpColor.value(),l=o.haStyle.borderDownColor.value(),h=o.haStyle.wickUpColor.value(),d=o.haStyle.wickDownColor.value(),c=this.findBar(e,t,n), p=o.haStyle.barColorsOnPrevClose.value()?(u=this.findPrevBar(e,t,n))[TradingView.CLOSE_PLOT]<=c[TradingView.CLOSE_PLOT]:c[TradingView.OPEN_PLOT]<=c[TradingView.CLOSE_PLOT],i.barColor=p?r:s,i.barBorderColor=p?a:l,i.barWickColor=p?h:d;break;case TradingView.Series.STYLE_BASELINE:c=this.findBar(e,t,n),_=o.baselineStyle,f=this._series.priceScale(),m=Math.round(f.height()*(Math.abs(100-_.baseLevelPercentage.value())/100)),y=this._series.firstValue(),g=f.coordinateToPrice(m,y),c[TradingView.CLOSE_PLOT]>g?i.barColor=o.baselineStyle.topLineColor.value():i.barColor=o.baselineStyle.bottomLineColor.value();break;case TradingView.Series.STYLE_HILO:i.barColor=o.hiloStyle.color.value(),i.barBorderColor=o.hiloStyle.borderColor.value()}return i},o.prototype.getSeriesBars=function(e){return e?this._series.nsBars():this._series.bars()},o.prototype._findBarFieldValue=function(e,t,i){var n=this.getSeriesBars(i).valueAt(e);if(null!==n)return n[t]},o.prototype.findBar=function(e,t,i){return i?i.value:this.getSeriesBars(t).valueAt(e)||[]},o.prototype.findPrevBar=function(e,t,i){var n;return i&&i.previousValue?i.previousValue:null!==(n=this._series.bars()._search(e,s.Exact))&&n>0?this._series.bars()._valueAt(n-1):[]},inherit(r,n),r.prototype.applyBarStyle=function(e,t,i){var n,o,r,s,a,l,c,u,h,d,p,_;return i||(i={}),t?i:(n=this._study.properties()).visible.value()?(o=this._study.metaInfo(),(r=this._study.data())&&0!==r.size()?(s=o.plots[this._plotIndex],this._study.getMinFirstBarIndexForPlot(s.id)>e?i:(a=n.styles[s.id]).visible&&!a.visible.value()?i:(l=this._study.offset(s.id),null===(c=r.valueAt(e-l))?i:null==(u=c[this._plotIndex+1])?i:(u=Math.round(u),h=o.plots[this._plotIndex].palette,d=n.palettes[h],p=o.palettes[h].valToIndex?o.palettes[h].valToIndex[u]:u,_=d.colors[p].color.value(),i.barColor=_,i.upColor=_.color,i.downColor=_.color,i))):i):i},t.SeriesBarColorer=o,t.StudyBarColorer=r},"3ClC":function(e,t,i){"use strict";function n(e,t){return void 0===t&&(t="shift"),{studyConstructor:e,colorRotationMode:t}}function o(e){return e instanceof h.Study}function r(e){return e instanceof StudyStrategy}function s(e){return"study_"+(e.classId||e.shortId)}function a(e,t,i,n){var o;return new((o=s(n))in m?m[o].studyConstructor:h.Study)(e,t,i,n)}function l(e){var t=s(e);return t in m?m[t].colorRotationMode:1!==e.plots.length?"shift":void 0===e.pine?"loop":u.a.isStandardPine(e.id)?"loop":"shift"}var c,u,h,d,p,_,f,m,y;for(y in i.r(t),i.d(t,"isStudy",function(){return o}),i.d(t,"isStudyStrategy",function(){return r}),i.d(t,"createStudy",function(){return a}),i.d(t,"studyColorRotationMode",function(){return l}),c=i("0YCj"),u=i.n(c),h=i("GVHu"),i.n(h),d=i("FVma"),i.n(d),p=i("cKqi"),i.n(p),_=i("0gbU"),i.n(_),f=i("TMWk"),i.n(f),m={study_PivotPointsStandard:n(d.study_PivotPointsStandard),study_Overlay:n(p.study_Overlay,"loop"),study_Compare:n(_.study_Compare,"loop"),study_ScriptWithDataOffset:n(f.study_ScriptWithDataOffset)})m.hasOwnProperty(y)&&(TradingView[y]=m[y].studyConstructor)},"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]}}},"3mf1":function(e,t,i){"use strict";i.r(t),i.d(t,"availableIcons",function(){return n});var n=function(){var e,t,i=[];for(e=(i=(i=(i=(i=i.concat([61536,61537,61538,61539])).concat([61725,61726])).concat([61575,61576,61796,61797])).concat([61779,61780,61781,61782,61783,61784,61785,61786])).slice(0),t=61440;t<=61846;t++)-1===i.indexOf(t)&&(t%16==15&&61487!==t||t>=61620&&t<=61630||61718!==t&&61719!==t&&61472!==t&&61619!==t&&e.push(t));return e}()},"3u3j":function(e,t,i){"use strict";var n,o,r,s;i.d(t,"a",function(){return s}),n=i("mrSG"),o=i("Eyy1"),r=i("RDU5"),s=function(e){function t(t,i,n){var r,s,a=e.call(this,n)||this;return a._chartModel=t,a._sourceId=i.id(), r=Object(o.ensureNotNull)(i.priceScale()),a._initialPriceScaleId=r.id(),s=Object(o.ensureNotNull)(t.paneForSource(i)),a._initialPriceScalePosition=s.priceScalePosition(r),a._initialPriceScaleIndex=s.priceScaleIndex(r,a._initialPriceScalePosition),a._initialPaneIndex=t.panes().indexOf(s),a}return n.__extends(t,e),t}(r.UndoCommand)},"4TVt":function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"LineToolPriceAxisView",function(){return s}),n=i("mrSG"),o=i("Eyy1"),r=i("KcY8"),s=function(e){function t(t,i){var n=e.call(this)||this;return n._activeBackground="#0F6DBF",n._background="#5592C9",n._active=!1,n._source=t,n._data=i,n}return n.__extends(t,e),t.prototype.setActive=function(e){this._active=e},t.prototype.setBackground=function(e){this._background=e},t.prototype._updateRendererData=function(e,t,i){var n,o,r,s,a,l,c,u;e.visible=!1,(n=this._source.model()).timeScale()&&!n.timeScale().isEmpty()&&(null===(o=this._source.priceScale())||o.isEmpty()||(n.selection().isSelected(this._source)||this._source.isForcedDrawPriceAxisLabel())&&null!==n.timeScale().visibleBarsStrictRange()&&(r=this._source.axisPoints(),s=this._data.pointIndex,r.length<=s||(a=r[s],isFinite(a.price)&&null!==(c=null!==(l=this._source.ownerSource())?l.firstValue():null)&&(u=this._active?this._activeBackground:this._background,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=o.priceToCoordinate(a.price,c),e.text=this._formatPrice(a.price,c),e.visible=!0))))},t.prototype._formatPrice=function(e,t){return Object(o.ensureNotNull)(this._source.priceScale()).formatPrice(e,t)},t}(r.a)},"4bfY":function(e,t,i){"use strict";function n(){a.call(this)}function o(e,t){this._constructor="LineToolFibCircles";var o=t||this.createPropertiesObject("linetoolfibcircles");r.call(this,e,o),e._fibCirclesLabelsCache||(e._fibCirclesLabelsCache=new n),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)}var r=i("Ss5c").LineDataSource,s=i("5rJj"),a=i("xUGI"),l=i("hayr").propertyPages;inherit(n,a),n.prototype.levelsCount=function(){return o.LevelsCount},inherit(o,r),o.LevelsCount=11,o.prototype.levelsCount=function(){return o.LevelsCount},o.prototype.pointsCount=function(){return 2},o.prototype.title=function(){return"Fib Circles"},o.prototype.name=function(){return"Fib Circles"},o.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},o.prototype.createPropertiesObject=function(e,t,i){return new s(e,t,i,{range:[1,11]})},o.prototype.getStylesPropertyPage=function(){return l.LineToolFibCirclesStylesPropertyPage},t.LineToolFibCircles=o},"4kQX":function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"TimeFormatter",function(){return o}),n=i("kcTO"),o=function(){function e(e){this._formatStr=e||"%h:%m:%s"} return e.prototype.format=function(e){return n.customFormatters.timeFormatter?n.customFormatters.timeFormatter.format(e):this._formatStr.replace("%h",Object(n.numberToStringWithLeadingZero)(e.getUTCHours(),2)).replace("%m",Object(n.numberToStringWithLeadingZero)(e.getUTCMinutes(),2)).replace("%s",Object(n.numberToStringWithLeadingZero)(e.getUTCSeconds(),2))},e.prototype.formatLocal=function(e){return n.customFormatters.timeFormatter?n.customFormatters.timeFormatter.formatLocal?n.customFormatters.timeFormatter.formatLocal(e):n.customFormatters.timeFormatter.format(e):this._formatStr.replace("%h",Object(n.numberToStringWithLeadingZero)(e.getHours(),2)).replace("%m",Object(n.numberToStringWithLeadingZero)(e.getMinutes(),2)).replace("%s",Object(n.numberToStringWithLeadingZero)(e.getSeconds(),2))},e}()},"4miz":function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"DataWindowItem",function(){return n}),i.d(t,"DataWindowView",function(){return o}),n=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}(),o=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 n;i.r(t),i.d(t,"MagnetMode",function(){return n}),function(e){e[e.WeakMagnet=0]="WeakMagnet",e[e.StrongMagnet=1]="StrongMagnet"}(n||(n={}))},"4u8j":function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolGannFan";var n=t||this.createPropertiesObject("linetoolgannfan");o.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)}var o=i("Ss5c").LineDataSource,r=i("5rJj"),s=i("hayr").propertyPages;inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return"Gann Fan"},n.prototype.name=function(){return"Gann Fan"},n.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},n.prototype.createPropertiesObject=function(e,t,i){return new r(e,t,i,{range:[1,9]})},n.prototype.getStylesPropertyPage=function(){return s.LineToolGannFanStylesPropertyPage},t.LineToolGannFan=n},"5/lF":function(e,t,i){"use strict";function n(e,t,i){this._textSizeCache=t,this._data=e,this._fontSize=e.fontsize?e.fontsize:e.fontSize?e.fontSize:12,this._lineSpacing="number"==typeof this._data.lineSpacing&&this._data.lineSpacing?this._data.lineSpacing:0, e.lines=this._lines=c.prototype.wordWrap.call(this,e.text,e.wordWrapWidth),this._hittest=i||new u(u.MOVEPOINT)}var o,r=i("aO4+"),s=r.Point,a=r.box,l=i("f6yo").pointInBox,c=i("qgcf").TextRenderer,u=i("VdBB").HitTestResult,h=i("jFln").drawRoundRect,d={priceRange:{width:15,height:14,data:[134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,134,134,138,255,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,134,134,138,255,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255]},barsRange:{width:16,height:15, data:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,134,134,138,255,134,134,138,255,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,136,136,136,56,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,136,136,136,56,134,134,138,255,134,134,138,255,136,136,136,56,134,134,138,255,0,0,0,0,0,0,0,0,134,134,138,255,134,134,138,255,0,0,0,0,0,0,0,0,134,134,138,255,134,134,138,255,0,0,0,0,0,0,0,0,134,134,138,255,136,136,136,56,134,134,138,255,134,134,138,255,136,136,136,56,134,134,138,255,0,0,0,0,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,0,0,0,0,134,134,138,255,136,136,136,56,134,134,138,255,134,134,138,255,136,136,136,56,134,134,138,255,0,0,0,0,0,0,0,0,134,134,138,255,134,134,138,255,0,0,0,0,0,0,0,0,134,134,138,255,134,134,138,255,0,0,0,0,0,0,0,0,134,134,138,255,136,136,136,56,134,134,138,255,134,134,138,255,137,137,137,74,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,137,137,137,74,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,134,134,138,255,134,134,138,255,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},angle:{width:14,height:12, data:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,130,130,134,76,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,130,130,134,76,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,130,130,134,76,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,130,130,134,76,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,130,130,134,76,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,130,130,134,76,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,130,130,134,76,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,130,130,134,76,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,130,130,134,76,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,130,130,134,76,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255,134,134,138,255]}};n.prototype._preRender=function(){var e,t,i,n,r,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w;if(!this._preRendered){var P;if(o||((P=document.createElement("canvas")).width=0,P.height=0,o=P.getContext("2d"),P=null),t=e=this._data.points[0].x+(this._data.offsetX||0),n=i=this._data.points[0].y+(this._data.offsetY||0),c=((r=this._fontSize)+(l=this._lineSpacing))*this._lines.length-l,o.textBaseline="top",o.font=this.fontStyle(),u=[],this._data.wordWrapWidth)for(h=this._data.wordWrapWidth,d=0;ds?(console.warn("Too many variables-link in HEX-color search: "+i[0]),null):e(r,i)):null}(e);r[e]=Object(o.ensureNotNull)(t)}),l=r},"6a0U":function(e,t,i){"use strict";function n(e){this.items=e.items,this.barSpacing=e.barSpacing,this.colorUp=e.colorup,this.colorDn=e.colordown,this.colorBorderUp=e.colorBorderUp,this.colorBorderDown=e.colorBorderDown,this.width=this._calculateWidth(e.barSpacing),this.minHeight=e.minHeight,this.vertOffset=this._calculateVerticalOffset(e.barSpacing)}function o(e,t,i,n){this.x=e,this.y=t,this.height=i,this.isUp=n}var r=i("aO4+").Point,s=i("VdBB").HitTestResult;n.prototype._calculateVerticalOffset=function(e){return Math.round((e||0)/4)},n.prototype._calculateMinHeight=function(e){return this.width||this._calculateWidth(e)},n.prototype._calculateWidth=function(e){e=e||this.barSpacing;return Math.round(e/2)},n.prototype.draw=function(e){var t,i,n,o,r,s,a,l=this.width,c=l<4,u=Math.max(parseInt(l/2),1),h=Math.round(this.width/2),d=Math.round(this.width);for(e.translate(1,1),t=0,i=this.items.length;t=0&&!0!==p[t].func(e);t--);}function r(e){e.addEventListener("keypress",o,!1)}function s(e,t){var i={name:e,func:t},o=n(i.name);o>-1?p[o]=i:p.push(i)}function a(e){p.forEach(function(t,i){t.name===e&&p.splice(i,1)})}function l(e,t){var i={name:e,func:t},o=n(i.name);o>-1&&p.splice(o,1),p.unshift(i)}function c(){return _?null:_=Object(d.randomHashN)(4)}function u(e){if(e!==_)throw Error("Lock id is outdated");_=null}var h,d,p,_;i.r(t),i.d(t,"listen",function(){return r}),i.d(t,"registerListener",function(){return s}),i.d(t,"removeListener",function(){return a}),i.d(t,"pushBackListener",function(){return l}),i.d(t,"disable",function(){return c}),i.d(t,"enable",function(){return u}),h=i("P5fv"),d=i("0waE"),p=[],_=null,r(window)},"6sst":function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"OverlayStudyPriceLineAxisView",function(){return r}),n=i("mrSG"),o=i("TmNs"),r=function(e){function t(t){var i=e.call(this)||this;return i._study=t,i}return n.__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,t=e.showSeriesLastValue.value();return this._study.properties().showPriceLine.value()&&t},t}(o.PriceLineAxisView)},"6xeX":function(e,t,i){"use strict";function n(e){return"string"==typeof e&&0!==e.trim().length}function o(e,t){var i,n,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return e.hasOwnProperty("text")?(i=r&&(0,c.forceLTRStr)(e.text)||e.text,e.hasOwnProperty("color")&&o?t.append($("",{style:"color: "+e.color}).html(i)):t.html(i)):(n=r&&(0,c.forceLTRStr)(e)||e,t.html(n))}function r(e,t){if(Array.isArray(e)&&2===e.length)$("
").append(o(e[0],$("
")),o(e[1],$("
"),!0,!0)).appendTo(t);else if(e.hasOwnProperty("br")&&e.br)$("
").appendTo(t);else{var i=$("
").append(o(e,$("
"))).appendTo(t);e.hasOwnProperty("listItem")&&i.addClass("list-item")}}function s(e,t){var i=(0,c.forceLTRStr)(e.text);e.attr=e.attr||{},$("").attr("href",e.href).html(i).addClass(e.class).attr(e.attr.name,e.attr.value).appendTo(t)}function a(e,t){var i,n,o,a,l,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if("string"==typeof e)i=(0,c.forceLTRStr)(e), $("

").html(i).appendTo(t);else if(e.hasOwnProperty("lines"))for(n=0;n").html(e.lines[n].line).appendTo(t):r(e.lines[n].line,t):e.lines[n].hasOwnProperty("link")&&s(e.lines[n].link,t);else e.hasOwnProperty("title")&&$("

").html(e.title).appendTo(t),e.hasOwnProperty("actual")&&(o=e.actual&&(0,c.forceLTRStr)(e.actual),$("
").append($("
").text($.t("Actual")+": "),$("
").html(o||"—")).appendTo(t)),e.hasOwnProperty("forecast")&&(a=e.forecast&&(0,c.forceLTRStr)(e.forecast),$("
").append($("
").text($.t("Forecast")+": "),$("
").html(a||"—")).appendTo(t)),e.hasOwnProperty("previous")&&(l=e.previous&&(0,c.forceLTRStr)(e.previous),$("
").append($("
").text($.t("Previous")+": "),$("
").html(l||"—")).appendTo(t)),e.hasOwnProperty("timestamp")&&$("
").append($("
").text($.t("Date")+": "),$("
").html(function(e,t){var i=new Date(e+t),n=Math.round(Math.abs(t)/6e4),o="UTC";return 0!==n&&(o+=t>0?"+":"-",o+=Math.floor(n/60),n%60&&(o+=":"+n%60)),i.getUTCFullYear()+"-"+("0"+(i.getUTCMonth()+1)).slice(-2)+"-"+("0"+i.getUTCDate()).slice(-2)+" "+("0"+i.getUTCHours()).slice(-2)+":"+("0"+i.getUTCMinutes()).slice(-2)+" ("+o+")"}(e.timestamp,u)||"—")).appendTo(t)}var l,c;Object.defineProperty(t,"__esModule",{value:!0}),t.Tooltip=void 0,l=function(){function e(e,t){var i,n;for(i=0;i0&&void 0!==arguments[0]?arguments[0]:{},i=t.direction,n=void 0===i?"top":i,o=t.clickable,r=void 0!==o&&o,s=t.wide,a=void 0!==s&&s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._direction=n,this._tooltipShown=!1,this._tooltipX=void 0,this._tooltipY=void 0,this._tooltipItems=null,this._width=a?250:200,this._$tooltip=$("
").addClass("tv-chart-events-source__tooltip").css({position:"absolute",width:this._width+"px"}),this._$tooltipContent=$("
").addClass("tv-chart-events-source__tooltip__content").appendTo(this._$tooltip),r&&this._$tooltip.addClass("tv-chart-events-source__tooltip--clickable")}return l(e,[{key:"show",value:function(){var e,t,i,o,r,s,l,c,u,h,d,p,_,f,m,y,g,v,S,b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},w=b.items,P=void 0===w?[]:w,x=b.x,C=void 0===x?0:x,T=b.y,I=void 0===T?0:T,L=b.wrapElement,A=void 0===L?null:L,k=b.timeOffset,M=void 0===k?"":k,E=b.leftBorderColor,V=void 0===E?null:E;if(A&&!function(e){var t,i,o,r,s;if(!e||0===e.length)return!0;for(t=0;t0&&(g="--importance-high")):V||(g="--importance-none"),v="tv-chart-events-source__tooltip__item",g&&(v+=" "+v+g),S=$("
").attr("class",v),V&&S.css("border-left-color",V),a(y,S,M),S.appendTo(this._$tooltipContent);this._tooltipItems=P}"bottom"===this._direction&&this._$tooltip.css({bottom:Math.round(t-I-this._$tooltipContent.height()+10)})}}},{key:"hide",value:function(){this._tooltipShown&&(this._$tooltip.detach(),this._tooltipShown=!1)}},{key:"isOpened",value:function(){return this._tooltipShown}},{key:"getElem",value:function(){return this._$tooltip.get(0)}}]),e}()},"704P":function(e,t,i){"use strict";(function(e){function n(e,t){this._pane=e,this._timeScale=t}function o(e){this._line=e}function r(e,t){this._adapter=new o(this),this._constructor="LineToolExecution";var n=t||new l("linetoolexecution",void 0,!1,!1);this.customization={forcePriceAxisLabel:!1,disableSelection:!0,disableErasing:!0},s.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)}var s=i("Ss5c").LineDataSource,a=i("jkoZ"),l=i("Ocx9").DefaultProperty,c=i("k9/m").PlotRowSearchMode;n.prototype._cachedByBarIndexOrderedExecutions={},n.recreateOrderedByBarsSourcesCache=function(e){var t,i,o,r,s;for(n.clearOrderedByBarsSourcesCache(),t=n.prototype,i=e.orderedSources(),o=0;ou.lastBar()||i=0;--d)if((p=h[d])instanceof r&&p._adapter._index===i&&p._adapter.getDirection()===m){if(p===e._line)break;_=p._adapter._height(),f=y?f+_:f-_}return{x:t.indexToCoordinate(i),y:f}},o.prototype._height=function(){var e=this.getArrowHeight(),t=this.getArrowSpacing(),i=0;return this.getText()&&a.fontHeight(this.getFont()),e+t+i+10},o.prototype.getIndex=function(){var e=this._line._model.timeScale(),t=e.baseIndex(),i=this._line.points()[0].index;return t-i},o.prototype.setIndex=function(e){var t,i=this._line._model.timeScale(),n=i.baseIndex(),o=n-Math.abs(e);return this._line.startMoving({logical:this._line.points()[0]}),(t=TradingView.merge({},this._line.points()[0])).index=o,this._line.move({logical:t}),this._line.endMoving(),this},o.prototype.getTime=function(){return this._unixtime},o.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},o.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},o.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},o.prototype.getText=function(){return this._line.properties().text.value()},o.prototype.setText=function(e){return this._line.properties().text.setValue(e||""),this._line.updateAllViewsAndRedraw(),this},o.prototype.getArrowHeight=function(){return this._line.properties().arrowHeight.value()},o.prototype.setArrowHeight=function(e){return this._line.properties().arrowHeight.setValue(e||5),this},o.prototype.getArrowSpacing=function(){return this._line.properties().arrowSpacing.value()},o.prototype.setArrowSpacing=function(e){return this._line.properties().arrowSpacing.setValue(e||1),this},o.prototype.getDirection=function(){return this._line.properties().direction.value()},o.prototype.setDirection=function(e){return this._line.properties().direction.setValue(e||"buy"),this},o.prototype.getArrowColor=function(){var e=this._line.properties();return"buy"===this.getDirection()?e.arrowBuyColor.value():e.arrowSellColor.value()},o.prototype.setArrowColor=function(e){return"buy"===this.getDirection()?this.setArrowBuyColor(e):this.setArrowSellColor(e),this},o.prototype.setArrowBuyColor=function(e){return this._line.properties().arrowBuyColor.setValue(e),this},o.prototype.setArrowSellColor=function(e){return this._line.properties().arrowSellColor.setValue(e),this},o.prototype.getTextColor=function(){return a.getColorFromProperties(this._line.properties().textColor,this._line.properties().textTransparency)},o.prototype.setTextColor=function(e){ return a.setColorToProperties(e,this._line.properties().textColor,this._line.properties().textTransparency),this},o.prototype.getFont=function(){return a.getFontFromProperties(this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic)},o.prototype.setFont=function(e){return a.setFontToProperties(e,this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic),this},o.prototype.setTooltip=function(e){return null==e?e="":e+="",this._line.properties().tooltip.setValue(e),this},o.prototype.getTooltip=function(){return this._line.properties().tooltip.value()},o.prototype.remove=function(){this._line._model.removeSource(this._line),delete this._line},inherit(r,s),r.POINTS_COUNT=1,r.prototype.pointsCount=function(){return r.POINTS_COUNT},r.prototype.title=function(){return"Execution"},r.prototype.name=function(){return"Execution"},r.prototype.hasContextMenu=function(){return!1},r.prototype.state=function(){return null},r.prototype.updateAllViews=function(){return this._isVisible()?s.prototype.updateAllViews.call(this):null},r.prototype.priceAxisViews=function(e,t){return this._isVisible()?s.prototype.priceAxisViews.call(this,e,t):null},r.prototype._isVisible=function(){return this._model.properties().tradingProperties.showExecutions.value()},r.prototype.paneViews=function(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showExecutions.value()?s.prototype.paneViews.call(this):null},r.prototype.userEditEnabled=function(){return!1},r.prototype.showInObjectTree=function(){return!1},r.prototype.getInputsPropertyPage=function(){return null},t.ExecutionsPositionController=n,t.LineToolExecution=r}).call(this,i("Kxc7"))},"7Fue":function(e,t,i){"use strict";function n(e){return!h.some(function(t){return e[t]().size>0})}function o(e,t,i,n){var o,r,s;if(void 0!==t)for(o=function(t){var o,r=t.styleId;void 0!==i&&Object(l.assert)(r in i,"Every style used by graphics primitive should be declared in study metainfo"),o=null,e.forEach(function(e,t){t===r&&(o=e[0])}),null===o&&(o={indexes:n,items:[]},e.set(r,[o])),o.items=o.items.concat(t.data)},r=0,s=t;r=d.length?u.logError("Cannot find index "+r.firstBarTime+" in study timescale indexes"):(s=a.__assign({},r,{styleId:t}),l=d[r.firstBarTime],void 0===(c=n.get(l))?n.set(l,{indexes:d,items:[s]}):c.items.push(s))}),t=n,o.set("histBars",t)}var a,l,c,u,h;i.d(t,"d",function(){return h}),i.d(t,"c",function(){return n}),i.d(t,"b",function(){return o}),i.d(t,"a",function(){return r}), i.d(t,"e",function(){return s}),a=i("mrSG"),l=i("Eyy1"),c=i("uOxu"),u=Object(c.getLogger)("Chart.StudyGraphics"),h=["horizlines","vertlines","lines","hlines","textmarks","shapemarks","backgrounds","polygons","trendchannels","hhists"]},"7KDR":function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h;i.r(t),i.d(t,"Action",function(){return c}),i.d(t,"ActionAsync",function(){return u}),i.d(t,"Separator",function(){return h}),n=i("mrSG"),o=i("zRdu"),r=i("aIyQ"),s=i.n(r),a=i("Bruo"),l=i("0waE"),u=function(e){function t(t){var i=e.call(this,{})||this;return i.type=o.a.ActionAsync,i._loader=t,i._loaded=!1,i}return n.__extends(t,e),t.prototype.loadOptions=function(){var e=this;return this._loadingPromise?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=function(){function e(e){this.type=o.a.Action,this.id=l.guid(),this._destroyed=!1,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(),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||this._options.shortcut,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.destroy=function(){this._destroyed=!0,this._onUpdate.destroy(),this._unbindShortcut()},e.prototype._shouldBindShortcut=function(){return!this._options.disabled&&void 0!==this._options.shortcut&&!this._options.doNotBindShortcut},e.prototype._bindShortcut=function(){var e=this;this._shouldBindShortcut()&&a.bind(this._options.shortcut,function(t){t&&t.preventDefault(),e.execute()})},e.prototype._unbindShortcut=function(){this._shouldBindShortcut()&&a.unbind(this._options.shortcut)},e}()),h=function(){function e(e){this.type=o.a.Separator,this.id=l.guid(),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,n.showNoticeDialog)({title:window.t("Warning"),content:window.t("Studies limit exceeded: {0} studies per layout.\nPlease, remove some studies.").format(e)})};var n=i("brCa")},"7RN7":function(e,t,i){"use strict";var n,o;i.d(t,"b",function(){return n}),i.d(t,"a",function(){return o}),n=52,o=5},"7dm8":function(e,t,i){"use strict";var n,o,r,s,a,l;i.d(t,"a",function(){return o}),i.d(t,"b",function(){return r}),i.d(t,"c",function(){return s}),i.d(t,"d",function(){return a}),i.d(t,"e",function(){return l}),n=i("ocLq"),o=function(){function e(){}return e.prototype.init=function(e,t){e.new_sym(t(1),n.Std.period(e),n.Std.period(e)),this._source=t(0),this._scaleFactor1=1,this._scaleFactor2=1},e.prototype.main=function(e,t){var i,o,r,s,a,l=e.symbol.time,c=n.Std[this._source](e);return e.select_sym(1),i=n.Std[this._source](e),o=e.new_unlimited_var(i),r=e.new_unlimited_var(e.symbol.time),e.select_sym(0),isNaN(l)?null:(-1!==(s=r.indexOf(l))&&r.get(s)!==l&&(s=-1),a=s<0?NaN:o.get(s),[this._doCalculation(this._scaleFactor1,c,this._scaleFactor2,a)])},e}(),r={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";var n,o,r,s,a;i.r(t),i.d(t,"PriceDataSource",function(){return a}),n=i("mrSG"),o=i("fgLi"),r=i("aIyQ"),s=i.n(r),(a=function(e){function t(t){var i=e.call(this)||this;return i._formatterChanged=new s.a,i._metaInfo=null,i._model=t,i}return n.__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.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.autoScaleInfo=function(e,t){return{range:this.priceRange(e,t)}},t}(o.DataSource)).prototype.superclass=o.DataSource},"7qI1":function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolRectangle";var n=t||new r("linetoolrectangle");o.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("GW0y").RectanglePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages;inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return"Rectangle"},n.prototype.name=function(){return"Rectangle"},n.prototype.setPoint=function(e,t,i){var n,r,s ;e<2?o.prototype.setPoint.call(this,e,t,i):(i&&i.shift()&&this._properties.snapTo45Degrees&&(n=this.points()[0],r=this.points()[1],s={price:2===e?n.price:r.price,index:2===e?r.index:n.index},this._snapPoint45Degree(t,s)),3===e?(this._points[0].price=t.price,this._points[1].index=t.index):(this._points[1].price=t.price,this._points[0].index=t.index),this.normalizePoints())},n.prototype.getStylesPropertyPage=function(){return s.LineToolRectangleStylesPropertyPage},t.LineToolRectangle=n},"7qT/":function(e,t,i){"use strict";function n(e,t){return 100*(t-e)/Math.abs(e)}i.d(t,"a",function(){return n})},"8C8C":function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"RestoreFactoryDefaultsUndoCommand",function(){return r}),n=i("mrSG"),o=i("RDU5"),r=function(e){function t(t,i,n){void 0===n&&(n="Restore Defaults");var o=e.call(this,n)||this;return o._chartModel=t,o._defaultProperty=i,o._state=i.state(),o}return n.__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}(o.UndoCommand)},"8OdW":function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i.d(t,"MINUTE_SPAN",function(){return n}),i.d(t,"HOUR_SPAN",function(){return o}),i.d(t,"DAY_SPAN",function(){return r}),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}),n=20,o=30,r=40,s=50,a=60,l=70,c=6},"8Uy/":function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"LINESTYLE_SOLID",function(){return n}),i.d(t,"LINESTYLE_DOTTED",function(){return o}),i.d(t,"LINESTYLE_DASHED",function(){return r}),i.d(t,"LINESTYLE_LARGE_DASHED",function(){return s}),i.d(t,"LINESTYLE_SPARSE_DOTTED",function(){return a}),n=0,o=1,r=2,s=3,a=4},"8aff":function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"CompareStudyPriceAxisView",function(){return s}),n=i("mrSG"),o=i("oXaB"),r=i("KcY8"),s=function(e){function t(t,i){var n=e.call(this)||this;return n._studyCompare=t,n._data=i,n}return n.__extends(t,e),t.prototype._updateRendererData=function(e,t,i){var n,r;e.visible=!1,t.visible=!1,(n=this._studyCompare.lastValueData(this._data.plotIndex,!1)).noData||(i.background=n.color,i.color=this.generateTextColor(n.color),i.coordinate=n.coordinate,i.floatCoordinate=n.floatCoordinate,(r=this._studyCompare.model().properties().scalesProperties).showSeriesLastValue.value()&&(e.text=this._axisText(n),e.visible=!0),t.text="",(r.showSymbolLabels.value()||r.seriesLastValueMode.value()===o.PriceAxisLastValueMode.LastPriceAndPercentageValue)&&(t.text=this._paneText(n),t.visible=t.text.length>0))},t.prototype._paneText=function(e){var t,i="",n=this._studyCompare.model().properties().scalesProperties;return n.showSymbolLabels.value()&&(i+=this._studyCompare.symbol()+" "), null!==(t=this._studyCompare.priceScale())&&n.showSeriesLastValue.value()&&n.seriesLastValueMode.value()===o.PriceAxisLastValueMode.LastPriceAndPercentageValue&&(i+=t.isPercentage()?e.formattedPriceAbsolute:e.formattedPricePercentage),i.trim()},t.prototype._axisText=function(e){var t=this._studyCompare.model().properties().scalesProperties,i=this._studyCompare.priceScale();return t.seriesLastValueMode.value()!==o.PriceAxisLastValueMode.LastPriceAndPercentageValue||null===i?e.text:i.isPercentage()?e.formattedPricePercentage:e.formattedPriceAbsolute},t}(r.a)},"8gnj":function(e,t,i){"use strict";(function(t){var n=i("ESp1").HeikenAshi,o=i("LxhU").Interval,r=function(){function e(e){this.host=e,this.cache={}}function r(e){var t=e.indexOf(",");return-1===t?e:e.slice(0,t)}function s(e){return e.has_empty_bars||e.force_session_rebuild}function a(e){return"string"==typeof e&&"="===e[0]}function l(e){if(!a(e))return{symbol:e};var t;try{t=JSON.parse(e.slice(1))}catch(t){return{symbol:e}}return t.type&&(0===t.type.indexOf("BarSetHeikenAshi@tv-basicstudies-")?t.builder=new n:console.error("unknown builder type: "+t.type)),"string"!=typeof t.symbol&&(t.session=t.symbol.session||t.session,t.symbol=t.symbol.symbol),t}var c,u,h,d=i("ocLq"),p=i("ufy5"),_=d.Symbol,f=d.StudyEngine,m=d.BarBuilder,y=d.BarSet;return e.prototype.getCache=function(e){return this.cache[e]},e.prototype.putCache=function(e,t){this.cache[e]=t},e.prototype.subscribe=function(e,t,i,n,o,r,a,l,c,u){var h=function(e,t,i,n,o,r,a){return o+e+t+i+(s(n)?"_":"")+r+"_"+a}(e,t,i,a,l,n,u),d=this.getCache(h);return d||(d=this.createItem(e,t,i,a,c,l,n,u),this.putCache(h,d)),d.listeners.addListener(o,r),{key:h,listener:o}},e.prototype.unsubscribe=function(e){var t=this.getCache(e.key);t&&t.listeners.removeListener(e.listener)},e.prototype.removeUnused=function(){var e,t,i,n,o=[];for(e in this.cache)this.cache[e]&&0===this.cache[e].listeners.listenersCount()&&o.push(e);if(0!==o.length){for(t=0;t=0;r--)if(n%(s=+o[r])==0)return s+(a.isSeconds?"S":"");return""}return n+(a.isSeconds?"S":"")},e.prototype.createItem=function(e,t,i,n,a,d,p,_){var f,y,g,v,S,b,w=new h,P=l(e);return P.builder?new u(w,P.symbol,t,i,P.builder,n,a,d):(f=r(t),y=this.rebuildFrom(f,r(i),n),g=s(n),!o.isEqual(f,y)||g?(v=n.has_empty_bars,S=Object.assign({},n),g&&(S.has_empty_bars=!1,S.force_session_rebuild=!1), new u(w,P.symbol,t,y,new m(t,v),S,a,d,p,_)):(b=P.session&&"extended"!==P.session,new c(w,P.symbol,t,i,b,this.host,n,a,p,_)))},(c=function(e,t,i,n,o,s,a,l,c,u){this.listeners=e,this.host=s;var h=this;this.host.resolve(t,function(e){o&&e.regular_session&&(e.session=e.regular_session);var s=h.calculateFromTo(e,c||n||i,t,l,u);h.subs=h.host.subscribe(e,r(i),s,function(e){h.listeners.fire(e)},function(e){h.listeners.onError(e)})},function(e){h.listeners.onError(e)})}).prototype._createDWMAligner=function(e,i){var n=t.get_timezone(i.timezone),o=new p.Session;return o.init(n,i.session),_.newBarBuilder(e,o,o)},c.prototype.stop=function(){this.subs&&this.host.unsubscribe(this.subs)},c.prototype.calculateFromTo=function(e,i,n,o,r){var s,a,l,c,u,h,d,f=_.parsePeriod(i),m=(new Date).valueOf(),y=e.expired&&t.cal_to_utc(t.get_timezone(e.timezone),new Date(1e3*e.expiration_date))||m;return""===f.resolution?(a=f.interval,l="D"):"S"===f.resolution?(a=10*f.interval,l=""):(a=12*("D"===f.resolution?1:"W"===f.resolution?5:30)*f.interval,l="M"),f.range?(a=f.range.interval,l=f.range.resolution):this.host.calculateHistoryDepth&&(c=this.host.calculateHistoryDepth(i,l,a))&&(a=c.intervalBack||a,l=void 0===c.resolutionBack?l:c.resolutionBack),u=e.sessionString||e.session,s=p.alignPeriodsBack(u,l,a,1,y),o&&o.getRangeExtensionTime&&(h=o.getRangeExtensionTime())&&(s=Math.min(1e3*h,s)),d=Math.ceil(1.5*r),o&&o.getRangeExtensionCount&&(d+=o.getRangeExtensionCount()),d>0&&(s=p.alignPeriodsBack(u,f.resolution,f.interval,d,s)),{from:s,to:y+6e4}},(u=function(e,t,i,n,o,r,s,a,l,c){if(this.listeners=e,this.isRecalculated=!1,""===n)return console.error("unsupported resolution for rebuild: "+i),void this.listeners.onError("unsupported resolution for rebuild: "+i);this.symbolInfo=r;var u=this;this.engine=new f({tickerid:t,period:n,periodBase:i,body:o,sessionId:a,symbolInfo:r,rangeExtension:s,periodForInitialRange:l,additionalBarsCount:c,recalc:function(e,t){u._recalc(t)},out:function(e,t){u._out(e,t)},nonseriesOut:function(e,t){u._nonseriesOut(e,t)},setNoMoreData:function(){u.barset&&(u.barset.endOfData=!0)},onErrorCallback:function(e){u.listeners.onError(e)}})}).prototype.stop=function(){this.engine?this.engine.stop():console.error("Internal library error 0x1")},u.prototype._recalc=function(e){this.isRecalculated&&console.error("recalc called twice!"),this.barset||(this.barset=new y(this.symbolInfo)),e&&(this.barset.nextTime=e.nextTime,this.barset.endOfData=e.endOfData),this.listeners.fire(this.barset),this.isRecalculated=!0},u.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)},u.prototype._out=function(e,t){var i,n,o,r,s,a,l,c=t[0];if(!isNaN(c)){if(i={time:c,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 y(e.info)),(o=t[8])instanceof Array)for(r=0;rl.precedence&&(i[i.length-1].minPrecedence=l.precedence):l instanceof r?i.push(n={minPrecedence:1/0,openBraceIndex:o}):l instanceof s&&(c=e[(n=i.pop()).openBraceIndex-1],(u=e[o+1])instanceof a&&!(u.precedence<=n.minPrecedence)||!(!(c instanceof a)||c.precedencen.minPrecedence&&(i[i.length-1].minPrecedence=n.minPrecedence)));for(o=t.length;o--;)e.splice(t[o],1);return e}function b(e){if("string"!=typeof e)throw new TypeError("expression must be a string");return(e=g(e)).filter(function(e){return e instanceof p}).map(function(e){return e.exchange()}).filter(function(e){return e})}function w(e){return 1!==(e=b(e)).length?null:e[0]}function P(e,t){return(e=b(e)).some(function(e){return t.includes((e||"").toUpperCase())})}function x(e){return e.join("")}var C,T,I,L=[{pattern:"(",ctor:r},{pattern:")",ctor:s},{pattern:"+",ctor:l},{pattern:"-",ctor:c},{pattern:"*",ctor:u},{pattern:"/",ctor:h},{pattern:"^",ctor:d},{pattern:/\d+(?:\.\d*|(?![a-zA-Z0-9_!:\.&]))|\.\d+/,ctor:_},{pattern:/\./,ctor:y},{pattern:t.enabled("charting_library_base")?/[a-zA-Z0-9_\u0370-\u1FFF_\u2E80-\uFFFF^][a-zA-Z0-9_\u0020\u0370-\u1FFF_\u2E80-\uFFFF_!:\.&]*|'.+?'/:/[a-zA-Z0-9_\u0370-\u1FFF_\u2E80-\uFFFF][a-zA-Z0-9_\u0020\u0370-\u1FFF_\u2E80-\uFFFF_!|:\.&]*|'.+?'/,ctor:p},{pattern:/'[^']*/,ctor:m},{pattern:/[\0-\x20\s]+/,ctor:o}];return n.prototype.toString=function(){return this.value},e(o,n),e(r,n),r.prototype.value="(",e(s,n),s.prototype.value=")",e(a,n),e(l,a),l.prototype.value="+",l.prototype.precedence=0,l.prototype.commutative=!0,e(c,a),c.prototype.value="-",c.prototype.precedence=0,c.prototype.commutative=!1,e(u,a),u.prototype.value="*",u.prototype.precedence=1,u.prototype.commutative=!0,e(h,a),h.prototype.value="/",h.prototype.precedence=1,h.prototype.commutative=!1,e(d,a),d.prototype.value="^",d.prototype.precedence=2,d.prototype.commutative=!1,C=/^'?(?:([A-Z0-9_]+):)?(.*?)'?$/i,T=/[\+\-\/\*]/,e(p,n),p.prototype.toString=function(){if(this.hasOwnProperty("_ticker")){var e=T.test(this._ticker)?"'":"";return e+(this._exchange?this._exchange+":":"")+this._ticker+e}return this.value},p.prototype.parse=function(){var e=C.exec(this.value);e[1]&&(this._exchange=e[1]),this._ticker=e[2]},p.prototype.parseAsFutures=function(){var e,t,n;for(this.hasOwnProperty("_ticker")||this.parse(),e=function(e){return i.some(function(t){return t.t===e})},t=2;t>=1;--t)if(e(n=this._ticker.slice(0,t))){this._root=n,this._contract=this._ticker.slice(t);break}},p.prototype.exchange=function(e){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._exchange ;null===e||void 0===e?delete this._exchange:this._exchange=e+""},p.prototype.ticker=function(e){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._ticker;null===e||void 0===e?delete this._ticker:this._ticker=e+"",delete this._root,delete this._contract},p.prototype.root=function(e){if(this.hasOwnProperty("_root")||this.parseAsFutures(),!(arguments.length>0))return this._root;null===e||void 0===e?delete this._root:(this._root=e+"",this._root&&(this._ticker=this._root+(this._contract||"")))},p.prototype.contract=function(e){if(this.hasOwnProperty("_contract")||this.parseAsFutures(),!(arguments.length>0))return this._root;null===e||void 0===e?delete this._contract:(this._contract=e+"",this._root&&(this._ticker=this._root+this._contract))},e(_,n),_.prototype.toString=function(){return this.hasOwnProperty("_normalizedValue")?this._normalizedValue:this.value},_.prototype.parse=function(){this._normalizedValue=this.value.replace(/^0+|\.0*$/g,"").replace(/(\.\d*?)0+$/,"$1").replace(/^(\.|$)/,"0$1")},f.prototype.toString=function(){return this.value},e(m,p),m.prototype.isIncomplete=!0,m.prototype.incompleteSuggest=function(){if("'"!==this.value)return String("'")},e(y,_),y.prototype.isIncomplete=!0,I=new RegExp(L.map(function(e){return"("+("string"==typeof e.pattern?e.pattern.replace(/[\^\$\(\)\[\]\{\}\*\+\?\|\\]/g,"\\$&"):e.pattern.source)+")"}).concat(".").join("|"),"g"),{tokenize:g,validate:function(e){var i,n,l,c,u,h,d,m,y;if(t.enabled("charting_library_base"))return{currentState:"var"};for(n="var",l="operator",c=i="init",u={warnings:[],errors:[],isEmpty:!0},h=[],d=0;dt[t.length-1].time+i?null:(n=t[Object(l.lowerbound)(t,e.x-i,function(e,t){return e.timen.time+i?null:(o=Object(c.selectionTolerance)(this._barWidth),r=Math.min(n.high,n.low),s=Math.max(n.high,n.low),r-o-(a=this._data.fontSize)<=e.y&&e.y<=r+o?new u.HitTestResult(u.HitTestResult.REGULAR):s-o<=e.y&&e.y<=s+o+a?new u.HitTestResult(u.HitTestResult.REGULAR):null)))},e}(),d=i("sBR6"),p=i("Zy3/"),_=i("1mZ4"),f=i("u+0B"),i.d(t,"SeriesHiLoPaneView",function(){return m}),m=function(e){function t(t,i){var n,o=e.call(this,t,i)||this;return o._widthsCache=new f.TextWidthCache,o._labelsRenderer=new h,o._candlesRenderer=new d.PaneRendererCandles,o._canvas=document.createElement("canvas"),o._context=Object(r.ensureNotNull)(o._canvas.getContext("2d")),n=t.properties(),o._context.font=Object(s.makeFont)(n.hiloStyle.fontSize.value(),"Trebuchet MS"),o}return o.__extends(t,e),t.prototype.renderer=function(e,t,i){var n,o,r,s,a,l,u;return this._invalidated&&(n=this._series().formatter(),o=this._needLabels(),this._updateImpl(this._barUpdater.bind(this,n,o)),this._invalidated=!1),r=this._series().properties().hiloStyle,s=this._model().timeScale().barSpacing(),a=this._needLabels()&&this._bars().every(function(e){return e.highLabelWidth<=s&&e.lowLabelWidth<=s}),l={bars:this._bars(),drawWick:!1,barSpacing:s,drawBorder:r.showBorders.value(),barBorderWidth:1,barWidth:Object(c.optimalHiLoWidth)(s),font:"Trebuchet MS",fontSize:r.fontSize.value(),labelColor:r.labelColor.value(),inverted:this._series().priceScale().isInverted(),labelsPadding:3},u=new p.CompositeRenderer,this._candlesRenderer.setData(l),u.append(this._candlesRenderer),a&&(this._labelsRenderer.setData(l),u.append(this._labelsRenderer)),this._model().selection().isSelected(this._series())&&this._isMarkersEnabled&&u.append(new _.SelectionRenderer(this._selectionData)),u},t.prototype.topPixelMargin=function(){return this._margin()},t.prototype.bottomPixelMargin=function(){return this._margin()},t.prototype._margin=function(){var e=this._series().properties().hiloStyle;return e.showLabels.value()?e.fontSize.value()+6:0},t.prototype._barUpdater=function(e,t,i,o){var r=i[2],s=i[3];return!(!n(r)||!n(s))&&(o.high=o.open=r,o.low=o.close=s,t&&(o.highLabel=e.format(r),o.highLabelWidth=this._getLabelWidth(o.highLabel),o.lowLabel=e.format(s),o.lowLabelWidth=this._getLabelWidth(o.lowLabel)),!0)},t.prototype._needLabels=function(){var e=this._model().timeScale().barSpacing(),t=this._series().properties().hiloStyle.showLabels.value();return t&&e>5},t.prototype._getLabelWidth=function(e){return this._widthsCache.measureText(this._context,e)},t}(a.SeriesBarCandlesPaneView)}, "9QkW":function(e,t,i){"use strict";function n(){a.call(this)}function o(e,t){this._constructor="LineToolFibSpeedResistanceArcs";var o=t||this.createPropertiesObject("linetoolfibwedge");r.call(this,e,o),e._fibWedgeLabelsCache||(e._fibWedgeLabelsCache=new n),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)}var r=i("Ss5c").LineDataSource,s=i("5rJj"),a=i("xUGI"),l=i("hayr").propertyPages;inherit(n,a),n.prototype.levelsCount=function(){return o.LevelsCount},inherit(o,r),o.LevelsCount=11,o.prototype.getCache=function(){return this._model._fibWedgeLabelsCache||(this._model._fibWedgeLabelsCache=new n),this._model._fibWedgeLabelsCache},o.prototype.pointsCount=function(){return 3},o.prototype.title=function(){return"Fib Wedge"},o.prototype.name=function(){return"Fib Wedge"},o.prototype.setPoint=function(e,t){var i,n,o,s,a,l,c;r.prototype.setPoint.call(this,e,t),this._recursiveGuard||(this._recursiveGuard=!0,2===e?(i=this.pointToScreenPoint(this._points[0])[0],n=this.pointToScreenPoint(this._points[1])[0],s=(o=this.pointToScreenPoint(this._points[2])[0]).subtract(i).length(),a=n.subtract(i).normalized(),n=i.add(a.scaled(s)),l=this.screenPointToPoint(n),this._properties.points[1].price.setValue(l.price),this._properties.points[1].bar.setValue(l.index)):(i=this.pointToScreenPoint(this._points[0])[0],n=this.pointToScreenPoint(this._points[1])[0],o=this.pointToScreenPoint(this._points[2])[0],c=n.subtract(i).length(),a=o.subtract(i).normalized(),o=i.add(a.scaled(c)),l=this.screenPointToPoint(o),this._properties.points[2].price.setValue(l.price),this._properties.points[2].bar.setValue(l.index)),this._recursiveGuard=!1)},o.prototype.addPoint=function(e){var t,i,n,o,s,a,l;return 2===this._points.length&&(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)),a=this.ownerSource().firstValue(),l=this.priceScale().coordinateToPrice(n.y,a),e={index:Math.round(this._model.timeScale().coordinateToIndex(n.x)),price:l}),r.prototype.addPoint.call(this,e)},o.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},o.prototype.createPropertiesObject=function(e,t,i){return new s(e,t,i,{range:[1,11]})},o.prototype.getInputsPropertyPage=function(){return null},o.prototype.getStylesPropertyPage=function(){return l.LineToolFibWedgeStylesPropertyPage},t.LineToolFibWedge=o},"9dnG":function(e,t){e.exports=''},"9iCb":function(e,t,i){"use strict";function n(e,t,i,n){var o,r,s,a,l,d,p,_,f,m,y,g,v,S,b,w,P=i.split(".");if(0!==P.length&&0!==P[0].length)if(b=P[0],r=(o={name:(w=b.split(":"))[0],type:2===w.length?w[1]:null}).name, l=!(a=null!==(s=o.type))||"band"===s,d=!a||"area"===s,p=!a||"input"===s,_=!a||"plot"===s?h.getPlotIdByTitle(e,r):null,f=l?h.getBandIndexByName(e,r):null,m=d?h.getFilledAreaIdByTitle(e,r):null,y=p?h.getInputByName(e,r):null,g=t.hasOwnProperty(r),(null!==_?1:0)+(null!==f?1:0)+(null!==m?1:0)+(null!==y?1:0)+(g?1:0)>1)c.logWarn("Study '"+e.description+"' has ambiguous identifier '"+r+"'");else if(v=P[1],null!==_){if(1===P.length)return void c.logWarn("Path of sub-property of '"+r+"' plot for study '"+e.description+"' must be not empty");S=P.slice(1),u.applyPlotProperty(e,t,_,S,n)}else if(null!==y)u.applyInputValue(t,y,n);else if(null!==f){if(void 0===v)return void c.logWarn("Property name of '"+r+"' band for study '"+e.description+"' must be set");u.applyBandProperty(t,f,v,n)}else if(null!==m){if(void 0===v)return void c.logWarn("Property name of '"+r+"' area for study '"+e.description+"' must be set");u.applyFilledAreaProperty(t,m,v,n)}else g?u.setRootProperty(t,P,n):c.logWarn("Study '"+e.description+"' has no plot or input '"+r+"'")}function o(e,t){var i,o=e.properties(),r=o.state();for(i in t)t.hasOwnProperty(i)&&n(e.metaInfo(),r,i,t[i]);o.mergeAndFire(r)}function r(e,t,i){var o,r,s,a,l;for(o in e)e.hasOwnProperty(o)&&-1!==(r=o.indexOf("."))&&(s=o.substr(0,r),null!==(a=h.getMetaInfoByDescription(t,s))?null!==(l=i(a.id))?n(a,l,o.substr(r+1),e[o]):c.logWarn("Cannot apply overrides for study "+s):c.logWarn("There is no such study "+s))}var s,a,l,c,u,h;i.r(t),i.d(t,"applyOverridesToStudy",function(){return o}),i.d(t,"applyOverridesToStudyDefaults",function(){return r}),s=i("Eyy1"),a=i("23IT"),l=i("uOxu"),c=Object(l.getLogger)("Chart.Model.StudyPropertiesOverrider"),function(e){var t={line:a.LineStudyPlotStyle.Line,histogram:a.LineStudyPlotStyle.Histogram,cross:a.LineStudyPlotStyle.Cross,area:a.LineStudyPlotStyle.Area,columns:a.LineStudyPlotStyle.Columns,circles:a.LineStudyPlotStyle.Circles,line_with_breaks:a.LineStudyPlotStyle.LineWithBreaks,area_with_breaks:a.LineStudyPlotStyle.AreaWithBreaks};e.applyPlotProperty=function(e,i,n,o,r){var l,u,h;if(void 0!==i.styles)if("color"!==(l=o[0]))if(void 0!==(u=i.styles[n])&&u.hasOwnProperty(l)){if("plottype"===l){if(void 0===(h=t[String(r)]))return void c.logWarn("Unsupported plot type for plot: "+r);r=h}u[l]=r}else c.logWarn("Study plot does not have property '"+l+"'");else!function(e,t,i,n,o){void 0!==e.styles?null===t&&!isNaN(n)&&n>0?c.logWarn("Study plot does not have color #"+n):((0===n||isNaN(n))&&(Object(s.ensureDefined)(e.styles[i]).color=String(o),n=0),null!==t&&(Object(s.ensureDefined)(t.colors[n]).color=String(o))):c.logWarn("Study does not have styles")}(i,function(e,t,i){var n,o,r,s;if(void 0===e.plots)return null;for(n=0,o=e.plots;n1?parseInt(o[1]):NaN,r);else c.logWarn("Study does not have styles")},e.applyBandProperty=function(e,i,n,o){var r,s ;if(void 0!==e.bands)if(void 0!==(r=e.bands[i])&&r.hasOwnProperty(n)){if("plottype"===n){if(void 0===(s=t[String(o)]))return void c.logWarn("Unsupported plot type for band: "+o);o=s}r[n]=o}else c.logWarn("Study band does not have property '"+n+"'");else c.logWarn("Study does not have bands")},e.applyFilledAreaProperty=function(e,t,i,n){if(void 0!==e.filledAreasStyle){var o=e.filledAreasStyle[t];void 0!==o&&o.hasOwnProperty(i)?o[i]=n:c.logWarn("Study area does not have property '"+i+"'")}else c.logWarn("Study does not have areas")},e.applyInputValue=function(e,t,i){void 0!==e.inputs&&e.inputs.hasOwnProperty(t)?e.inputs[t]=i:c.logWarn("Study does not have input '"+t+"'")},e.setRootProperty=function(e,t,i){var n,o,r,s,a;if(0!==t.length){for(n=e,o=0,r=t.slice(0,-1);o=this.chartsCount())throw Error("Incorrect index: "+e);return this._getChartWidgetApi(this._chartWidgetCollection.getAll()[e])},o.prototype.getSymbolInterval=function(e){var t={symbol:r.symbol.value(),interval:r.interval.value()};return e&&e(t),t},o.prototype.saveChart=function(e){var t=this;this._saveChartService.whenReadyToSave(function(){var i=t._saveChartService.saveToJSON();return e&&e(JSON.parse(i.content))})},o.prototype.loadChart=function(e){this._chartApiInstance.purgeCache(),this._chartApiInstance._studyEngine.stopSources(),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)),r.symbol.setValue(this.activeChart().symbol()),l.emit("chart_loaded")},o.prototype.getStudiesList=function(){return this._chartApiInstance.allStudiesMetadata().filter(function(e){return!e.is_hidden_study}).map(function(e){return e.description})},o.prototype.getSavedCharts=function(e){d.getCharts(e)},o.prototype.loadChartFromServer=function(e){d.loadChart(e)},o.prototype.saveChartToServer=function(e,t,i){this._saveChartService.saveChartSilently(e,t,i)},o.prototype.removeChartFromServer=function(e,t){d.removeChart(e,t)},o.prototype.getIntervals=function(){var e=[],t=h.getCustomResolutions();return null!==this._chartApiInstance&&(e=this._chartApiInstance.defaultResolutions()),h.mergeResolutions(e,t)},o.prototype.closePopupsAndDialogs=function(){var e,t,n=document.querySelectorAll("._tv-dialog-title-close");for(e=0;e0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0},n.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},n.prototype.getText=function(){return this._data.bodyText},n.prototype.setText=function(e){return this._data.bodyText=e||"",this._line.updateAllViewsAndRedraw(),this},n.prototype.setTooltip=function(e){return this._line.properties().tooltip.setValue(o(e)),this},n.prototype.getTooltip=function(){return this._line.properties().tooltip.value()},n.prototype.setModifyTooltip=function(e){return this._line.properties().modifyTooltip.setValue(o(e)),this},n.prototype.getModifyTooltip=function(){return this._line.properties().modifyTooltip.value()},n.prototype.setCancelTooltip=function(e){return this._line.properties().cancelTooltip.setValue(o(e)),this},n.prototype.getCancelTooltip=function(){return this._line.properties().cancelTooltip.value()},n.prototype.getQuantity=function(){return this._data.quantityText},n.prototype.setQuantity=function(e){return this._data.quantityText=e||"",this._line.updateAllViewsAndRedraw(),this},n.prototype.getExtendLeft=function(){var e=this._line.properties().extendLeft.value();return"inherit"===e?this._line._model.properties().tradingProperties.extendLeft.value():e},n.prototype.setExtendLeft=function(e){return this._line.properties().extendLeft.setValue(e),this},n.prototype.getLineLength=function(){var e=this._line.properties().lineLength.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineLength.value():e},n.prototype.setLineLength=function(e){return this._line.properties().lineLength.setValue(Math.max(0,Math.min(e,100))),this},n.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()},n.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},n.prototype.setLineActiveBuyColor=function(e){return this._line.properties().lineActiveBuyColor.setValue(e),this},n.prototype.setLineInactiveBuyColor=function(e){return this._line.properties().lineInactiveBuyColor.setValue(e),this},n.prototype.setLineActiveSellColor=function(e){return this._line.properties().lineActiveSellColor.setValue(e),this},n.prototype.setLineInactiveSellColor=function(e){return this._line.properties().lineInactiveSellColor.setValue(e),this},n.prototype.getLineStyle=function(){var e=this._line.properties().lineStyle.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineStyle.value():e},n.prototype.setLineStyle=function(e){return this._line.properties().lineStyle.setValue(e),this},n.prototype.getLineWidth=function(){var e=this._line.properties().lineWidth.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineWidth.value():e},n.prototype.setLineWidth=function(e){return this._line.properties().lineWidth.setValue(e),this}, n.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()},n.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},n.prototype.setBodyBorderActiveBuyColor=function(e){return this._line.properties().bodyBorderActiveBuyColor.setValue(e),this},n.prototype.setBodyBorderInactiveBuyColor=function(e){return this._line.properties().bodyBorderInactiveBuyColor.setValue(e),this},n.prototype.setBodyBorderActiveSellColor=function(e){return this._line.properties().bodyBorderActiveSellColor.setValue(e),this},n.prototype.setBodyBorderInactiveSellColor=function(e){return this._line.properties().bodyBorderInactiveSellColor.setValue(e),this},n.prototype.getBodyBackgroundColor=function(){return l.getColorFromProperties(this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency)},n.prototype.setBodyBackgroundColor=function(e){return l.setColorToProperties(e,this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency),this},n.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()},n.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},n.prototype.setBodyTextInactiveLimitColor=function(e){return this._line.properties().bodyTextInactiveLimitColor.setValue(e),this},n.prototype.setBodyTextActiveLimitColor=function(e){return this._line.properties().bodyTextActiveLimitColor.setValue(e),this},n.prototype.setBodyTextInactiveStopColor=function(e){return this._line.properties().bodyTextInactiveStopColor.setValue(e),this},n.prototype.setBodyTextActiveStopColor=function(e){return this._line.properties().bodyTextActiveStopColor.setValue(e),this},n.prototype.setBodyTextInactiveBuyColor=function(e){return this._line.properties().bodyTextInactiveBuyColor.setValue(e),this},n.prototype.setBodyTextActiveBuyColor=function(e){ return this._line.properties().bodyTextActiveBuyColor.setValue(e),this},n.prototype.setBodyTextInactiveSellColor=function(e){return this._line.properties().bodyTextInactiveSellColor.setValue(e),this},n.prototype.setBodyTextActiveSellColor=function(e){return this._line.properties().bodyTextActiveSellColor.setValue(e),this},n.prototype.getBodyFont=function(){return l.getFontFromProperties(this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic)},n.prototype.setBodyFont=function(e){return l.setFontToProperties(e,this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic),this},n.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()},n.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},n.prototype.setQuantityBorderActiveBuyColor=function(e){return this._line.properties().quantityBorderActiveBuyColor.setValue(e),this},n.prototype.setQuantityBorderInactiveBuyColor=function(e){return this._line.properties().quantityBorderInactiveBuyColor.setValue(e),this},n.prototype.setQuantityBorderActiveSellColor=function(e){return this._line.properties().quantityBorderActiveSellColor.setValue(e),this},n.prototype.setQuantityBorderInactiveSellColor=function(e){return this._line.properties().quantityBorderInactiveSellColor.setValue(e),this},n.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()},n.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},n.prototype.setQuantityBackgroundActiveBuyColor=function(e){return this._line.properties().quantityBackgroundActiveBuyColor.setValue(e),this},n.prototype.setQuantityBackgroundInactiveBuyColor=function(e){return this._line.properties().quantityBackgroundInactiveBuyColor.setValue(e),this},n.prototype.setQuantityBackgroundActiveSellColor=function(e){return this._line.properties().quantityBackgroundActiveSellColor.setValue(e),this},n.prototype.setQuantityBackgroundInactiveSellColor=function(e){return this._line.properties().quantityBackgroundInactiveSellColor.setValue(e), this},n.prototype.getQuantityTextColor=function(){return l.getColorFromProperties(this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency)},n.prototype.setQuantityTextColor=function(e){return l.setColorToProperties(e,this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency),this},n.prototype.getQuantityFont=function(){return l.getFontFromProperties(this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic)},n.prototype.setQuantityFont=function(e){return l.setFontToProperties(e,this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic),this},n.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()},n.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},n.prototype.setCancelButtonBorderActiveBuyColor=function(e){return this._line.properties().cancelButtonBorderActiveBuyColor.setValue(e),this},n.prototype.setCancelButtonBorderInactiveBuyColor=function(e){return this._line.properties().cancelButtonBorderInactiveBuyColor.setValue(e),this},n.prototype.setCancelButtonBorderActiveSellColor=function(e){return this._line.properties().cancelButtonBorderActiveSellColor.setValue(e),this},n.prototype.setCancelButtonBorderInactiveSellColor=function(e){return this._line.properties().cancelButtonBorderInactiveSellColor.setValue(e),this},n.prototype.getCancelButtonBackgroundColor=function(){return l.getColorFromProperties(this._line.properties().cancelButtonBackgroundColor,this._line.properties().cancelButtonBackgroundTransparency)},n.prototype.setCancelButtonBackgroundColor=function(e){return l.setColorToProperties(e,this._line.properties().cancelButtonBackgroundColor,this._line.properties().cancelButtonBackgroundTransparency),this},n.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()},n.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}, n.prototype.setCancelButtonIconActiveBuyColor=function(e){return this._line.properties().cancelButtonIconActiveBuyColor.setValue(e),this},n.prototype.setCancelButtonIconInactiveBuyColor=function(e){return this._line.properties().cancelButtonIconInactiveBuyColor.setValue(e),this},n.prototype.setCancelButtonIconActiveSellColor=function(e){return this._line.properties().cancelButtonIconActiveSellColor.setValue(e),this},n.prototype.setCancelButtonIconInactiveSellColor=function(e){return this._line.properties().cancelButtonIconInactiveSellColor.setValue(e),this},n.prototype.block=function(){this._blocked=!0,this._line.updateAllViewsAndRedraw()},n.prototype.unblock=function(){this._blocked=!1,this._line.updateAllViewsAndRedraw()},n.prototype.isFunction=function(e){return"function"==typeof e},n.prototype.onCancel=function(e,t){return t?this.isFunction(t)&&(this._onCancelData=e,this._onCancelCallback=t):this.isFunction(e)&&(this._onCancelCallback=e),this},n.prototype.callOnCancel=function(){this.isFunction(this._onCancelCallback)&&this._onCancelCallback.call(this,this._onCancelData)},n.prototype.isOnCancelCallbackPresent=function(){return this.isFunction(this._onCancelCallback)},n.prototype.onModify=function(e,t){return t?this.isFunction(t)&&(this._onModifyData=e,this._onModifyCallback=t):this.isFunction(e)&&(this._onModifyCallback=e),this},n.prototype.callOnModify=function(){this.isFunction(this._onModifyCallback)&&this._onModifyCallback.call(this,this._onModifyData)},n.prototype.onMove=function(e,t){return t?this.isFunction(t)&&(this._onMoveData=e,this._onMoveCallback=t):this.isFunction(e)&&(this._onMoveCallback=e),this},n.prototype.callOnMove=function(){this.isFunction(this._onMoveCallback)&&this._onMoveCallback.call(this,this._onMoveData)},n.prototype.onContextMenu=function(e,t){return t?this.isFunction(t)&&(this._onContextMenuData=e,this._onContextMenuCallback=t):this.isFunction(e)&&(this._onContextMenuCallback=e),this},n.prototype.shouldShowContextMenu=function(){return this.isFunction(this._onContextMenuCallback)},n.prototype.callOnContextMenu=function(){if(this.isFunction(this._onContextMenuCallback))return this._onContextMenuCallback.call(this,this._onContextMenuData)},n.prototype.remove=function(){this._line._model.removeSource(this._line),delete this._line},n.prototype.shouldShowModifyOrder=function(){return!!this._onModifyCallback},inherit(r,s),r.prototype.setPoint=function(e,t,i){this._points[e]=t,this.normalizePoints()},r.prototype.addPoint=function(e,t){return this._points.push(e),this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0},r.prototype.title=function(){return"Order"},r.prototype.name=function(){return"Order"},r.prototype.endMoving=function(e){var t=this._startMovingPoint&&this._currentMovingPoint&&this._startMovingPoint.price!==this._currentMovingPoint.price;s.prototype.endMoving.call(this),!e&&t&&this._adapter.callOnMove()},r.prototype.createPriceAxisView=function(e){var t={pointIndex:e,backgroundPropertyGetter:this._adapter.getLineColor.bind(this._adapter)} ;return this._priceAxisView=new a(this,t),this._priceAxisView},r.prototype.paneViews=function(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showOrders.value()?c.prototype.paneViews.call(this):null},r.prototype.priceAxisViews=function(t,i){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showOrders.value()?c.prototype.priceAxisViews.call(this,t,i):null},r.prototype.hasContextMenu=function(){return this._adapter.shouldShowContextMenu()},r.prototype.contextMenuItems=function(){return this._adapter.callOnContextMenu()},r.prototype.onlyYMoving=function(){return!0},r.prototype.movable=function(){return Boolean(this._adapter._onMoveCallback)},t.LineToolOrder=r}).call(this,i("Kxc7"))},BBCR:function(e,t){e.exports=''},BHQF:function(e,t,i){"use strict";var n,o;Object.defineProperty(t,"__esModule",{value:!0}),t.fetch=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=window.fetch(e,t);return n.then(function(n){if(!n.ok){var r="";t.method&&(r+=t.method.toUpperCase()+" "),r+=e,r+=". Status "+n.status,n.statusText&&(r+=". "+n.statusText),n.headers.via&&(r+=". Via: "+n.headers.via),i.logBodyOnError&&"string"==typeof t.body&&(r+=". Body: "+t.body.slice(0,1024)),o.logError(r)}return n},function(i){var n="";t.method&&(n+=t.method.toUpperCase()+" "),n+=e,navigator.onLine?n+=". "+i:n+=". User is offline.",o.logError(n)}),n},n=i("uOxu"),o=(0,n.getLogger)("Fetch")},BOPY:function(e,t,i){"use strict";function n(e,t){this.source=e,this._rendererFactory=t}function o(e,t){this._barWidth=e.barWidth,this._plates=e.plates,this._tooltip=e.tooltip,this._model=t}function r(){this._layout=[],this._currentId=void 0,this.tooltipHovered=!1}var s=i("aO4+").Point,a=i("f6yo").pointInCircle,l=i("VdBB").HitTestResult;n.prototype.update=function(){},n.prototype.renderer=function(e,t,i){return this._rendererFactory(this.source)},o.prototype.draw=function(e){e.save();for(var t=0;t6&&(e.textAlign="center",e.textBaseline="middle",e.font="bold "+t.labelFontSize+"px Arial",e.fillStyle=t.labelFontColor,e.fillText(t.label,t.x,t.y))},o.prototype.hitTest=function(e){var t,i;for(i=this._plates.length-1;i>=0;--i)if(t=this._hitTestDot(this._plates[i],e))return t;return null},o.prototype._hitTestDot=function(e,t){var i=this._dotTransform(e),n=new s(i.x,i.y);return a(t,n,Math.max(i.radius,8))?new l(l.REGULAR,e):null},r.prototype._createLayout=function(){throw new Error("Child class must override this member")},r.prototype._updatePlate=function(e){throw new Error("Child class must override this member")},r.prototype._getContainer=function(e){return this._container&&this._context===e||(this._context=e,this._container=$(e.canvas).parent()),this._container},r.prototype._plateArrowSize=14,r.prototype.showPlate=function(e,t){var i,n,o,r,s,a,l,c;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),i=this,this._layout.hover(function(){i.tooltipHovered=!0,$(this).stop(!0).fadeTo(0,1)},function(){i.tooltipHovered=!1})),(n=Math.round(e.barWidth/2))>15&&(n=15),n<10&&(n=10),this._updatePlate(e),o=t.canvas.getBoundingClientRect(),r=e.x-this._layout.outerWidth()]+(>|$)/g,"")}function o(e){var t,i=/([^&=]+)=?([^&]*)/g,o={};if(!e)return o;for(t=i.exec(e);t;)o[n(t[1])]=n(t[2]),t=i.exec(e) ;return o}function r(e){if(0===location.search.length)return e;var t=o(window.location.search.substring(1));return a.forEach(function(i){void 0!==t[i]&&(e[i]=t[i])}),e}function s(e,t,i){var n,o;return void 0===e&&(e={}),void 0===t&&(t=""),void 0===i&&(i=!0),n="/chart/",e.chartId&&(n=""+n+e.chartId+"/",delete e.chartId),i&&(e=r(e)),o=function(e){var t,i=[];for(t in e)e.hasOwnProperty(t)&&null!=e[t]&&i.push({key:t,pair:encodeURIComponent(t)+"="+encodeURIComponent(e[t])});return i.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 n,o,r,s=[["&","&"],["<","<"],[">",">"],['"',"""],["'","'"],["'","'"]],a=e;if(!e||!e.replace)return a;for(n=0;n=0?new r(t,i,n):new r(t,i)}function o(e){return e in _}function r(e){return e instanceof p.LineDataSource}function s(e){var t=!1;return t}function a(e){return!1}function l(e){for(var t in _)if(_[t]===e)return t;return Object(h.assert)(!1,"Trying to get classname of unknown line tool"),null}function c(e,t,i){var o,r,s,a,c,p,_=Object(h.ensureNotNull)(l(t.constructor)),f=t.properties().clone();return f.visible.setValue(!0),o=Object(h.ensureNotNull)(t.ownerSource()),(r=n(_,e,f)).setOwnerSource(o),s=t.fixedPoints(),(i?s.map(function(e){return e.add(new d.Point(20,20))}):s).forEach(function(e){return r.addFixedPoint(e)}),a=t.normalizedPoints(),c=i?function(e,t){var i=Object(h.ensureNotNull)(t.priceScale()),n=Object(h.ensureNotNull)(t.firstValue());return e.map(function(e){var t=e.price,o=i.priceToCoordinate(t,n)-40,r=i.coordinateToPrice(o,n);return u.__assign({},e,{price:r})})}(a,o):a,p=t.points(),r.restorePoints(c,p),r.cloneData&&r.cloneData(t),r.checkAlert&&r.checkAlert(),r}var u,h,d,p,_;i.r(t),i.d(t,"createLineTool",function(){return n}),i.d(t,"isLineToolName",function(){return o}),i.d(t,"isLineTool",function(){return r}),i.d(t,"isStudyLineToolName",function(){return s}),i.d(t,"isStudyLineTool",function(){return a}),i.d(t,"lineToolClassName",function(){return l}),i.d(t,"cloneLineTool",function(){return c}),u=i("mrSG"),h=i("Eyy1"),d=i("aO4+"),p=i("Ss5c"),_=i("OH2X")},Cqax:function(e,t,i){"use strict";function n(e){this.data=e}var o=i("VdBB").HitTestResult;n.prototype.draw=function(e){var t,i,n,o,r,s,a,l;this.data&&(t=this.data.vertLinesVisible,i=this.data.horzLinesVisible,(t||i)&&(e.lineStyle=this.data.lineStyle,e.lineWidth=this.data.lineWidth,e.strokeStyle=this.data.color,e.fillStyle=this.data.color,n=e.lineStyle===CanvasEx.LINESTYLE_DASHED||e.lineStyle===CanvasEx.LINESTYLE_DOTTED||e.lineStyle===CanvasEx.LINESTYLE_SPARSE_DOTTED,o=this.data.lineWidth%2==0?.5:0,r=this.data.x+1+o,s=this.data.y+o,a=this.data.w,l=this.data.h,t&&r>=0&&(n?CanvasEx.drawDashedLineVertical(e,r,0,l):CanvasEx.drawSolidLine(e,r,0,r,l)),i&&s>=0&&(n?CanvasEx.drawDashedLineHorizontal(e,0,s,a):CanvasEx.drawSolidLine(e,0,s,a,s)),this.data.drawCenter&&(e.beginPath(),e.arc(r,s,3,0,2*Math.PI,!0),e.fillStyle=this.data.color,e.fill())))},n.prototype.hitTest=function(e){ return this.data.mouseClickHandler?new o(o.CUSTOM,{mouseClickHandler:this.data.mouseClickHandler}):null},t.PaneRendererCrossHair=TradingView.PaneRendererCrossHair=n},CwKc:function(e,t){e.exports=''},"CzJ+":function(e,t,i){"use strict";function n(e,t){return e.compareTo(t)<0}function o(e){return e>=48&&e<=57}function r(e){return 4===e.length&&o(e.charCodeAt(0))&&o(e.charCodeAt(1))&&o(e.charCodeAt(2))&&o(e.charCodeAt(3))}function s(e,t){return e.compareTo(t)}var a,l,c,u,h,d,p,_;i.r(t),i.d(t,"SessionEntry",function(){return p}),i.d(t,"ExchangeSession",function(){return _}),a=i("jCNj"),l=i("Y7w9"),c=i("uOxu"),u=Object(c.getLogger)("Chart.Model.ExchangeSession"),h=[a.MONDAY,a.TUESDAY,a.WEDNESDAY,a.THURSDAY,a.FRIDAY],d=[a.SUNDAY,a.MONDAY,a.TUESDAY,a.WEDNESDAY,a.THURSDAY,a.FRIDAY,a.SATURDAY],p=function(){function e(e,t,i){this._dayOfWeek=e,this._start=t,this._length=i}return e.prototype.start=function(){return this._start},e.prototype.alignedStart=function(){return this._start+a.minutesPerDay*this.sessionStartDaysOffset()},e.prototype.sessionStartDaysOffset=function(){return this._start>=0?0:this._start%a.minutesPerDay==0?-Math.ceil(this._start/a.minutesPerDay):-Math.floor(this._start/a.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 en?1:-1},e}(),_=function(){function e(e){void 0===e&&(e="0000-0000");var t=this;this._entries=[],this._firstDayOfWeek=a.MONDAY,this._weekEndsCount=null,"24x7"===e.toLowerCase()?d.forEach(function(e){t.addSessionEntry(e,0,0,0,0)}):this._parseSpec(e),this._entries.sort(s)}return e.prototype.entries=function(){return this._entries},e.prototype.firstDayOfWeek=function(){return this._firstDayOfWeek},e.prototype.addSessionEntry=function(e,t,i,n,o){0===i&&(i=a.minutesPerDay),n===o&&i<=t&&(n+=1),n>0&&(t-=n*a.minutesPerDay),o>0&&(i-=o*a.minutesPerDay);var r=i-t;this._entries.push(new p(e,t,r))},e.prototype.isWeekEnd=function(e){var t=Object(l.lowerbound)(this._entries,new p(e,0,0),function(e,t){return e.dayOfWeek()this._entries.length-1||this._entries[t].dayOfWeek()!==e},e.prototype.weekEndsCount=function(){if(null===this._weekEndsCount){var e={};this._entries.forEach(function(t){e[t.dayOfWeek()]=1}),this._weekEndsCount=7-Object.keys(e).reduce(function(t,i){return t+(e[+i]||0) },0)}return this._weekEndsCount},e.prototype.hasWeekEnds=function(){return this.weekEndsCount()>0},e.prototype.indexOfSessionEntry=function(e,t){var i,o=Object(l.lowerbound)(this._entries,new p(e,t,0),n);return o2?(u.logError("Only one `first day` specification expected @ session "+e),e):1===n.length?e:(t=n[0].indexOf("-")>=0?NaN:parseInt(n[0]),i=1,isNaN(t)&&(i=0,t=parseInt(n[1])),ta.SATURDAY?(u.logError("Unexpected day index @ session: "+e+"; day index "+t),e):(this._firstDayOfWeek=t,n[i]))},e}()},DX9F:function(e,t,i){"use strict";function n(e){o.call(this,e)}var o=i("c0/O").PaneRendererAbstractShape;inherit(n,o),n.prototype.drawShape=function(e){var t,i,n,o,r,s,a,l,c=this.width,u=this.height,h=u/2,d=this._vertOffset,p=3,_=(c-p)/3,f=!1;for(i=0, n=this.items.length;i'},Daqx:function(e,t,i){"use strict";function n(e,t){var i="left"===e?o:r,n=t=r?e[i]=t[r-1].index:e[i]=t[s].index}}var l,c,u,h,d=i("rQHv"),p=i("ocLq"),_=i("8gnj"),f=i("Ofm5"),m=i("uXw/"),y=i("ufy5"),g=i("LxhU").Interval,v=i("FQhm"),S=i("TlGQ").visitObject,b=i("ogJP").isObject;i("2cgs"),i("MrEN"),l=i("WIS0").DatafeedRequestsCachedProcessor,c=i("+6ja").timezoneIsAvailable,u=-5e6,(h=function(e){var t=this;this._studiesCache={},this._sessionsLastDataCache={},this._metainfoCache=[],this._barsCoefficientsCache={},this._extrapolationManager=f,this._externalDatafeed=e,this._datafeedConfiguration=null,this._marketStatusWatchers={},this._resolveRequests={}, this._callbacks={},this._serverTimeOffset=0,t._logMessage("Datafeed settings received: {0}".format(JSON.stringify(window.configurationData))),t._datafeedConfiguration=t._adoptConfigurationData(window.configurationData),t._fireEvent("configuration_received"),t._externalDatafeed.getServerTime&&t._externalDatafeed.getServerTime(function(e){t._serverTimeOffset=e-(new Date).valueOf()/1e3}),this._pointsetsManager=m,this._rangeExtensionData={},this._quotesInfo=[],this._depthInfo=[],this._fullNameSymbolInfoMap={},this._endOfData={},this._computeStudyCounter=0,this._cachedDatafeed=new l(e,h.createDWMAligner),this._extendedRange=function(e){return t._rangeExtensionData[e]&&t._rangeExtensionData[e].summary},this._extendedRangeForStudy=function(e){var i=t._rangeExtensionData[e];return i?(i.summary||0)+(i.realtimeBarsCount||0):0},this._extendedTime=function(e){return t._rangeExtensionData[e]&&t._rangeExtensionData[e].time},_.setupFeed({resolve:function(e,i,n){t._resolveSymbolByName(e,i,n)},subscribe:function(e,i,n,o,s){return t._cachedDatafeed.subscribe(e,i,n,function(e,i,n){return function(o){var s,a;o&&o.count()&&(s=r(i,e),a=1e3*t.getCurrentUTCTime(),s.moveTo(a),s.indexOfBar(a)>=0&&o.setLastBarClosed(!1)),n(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})}).createDWMAligner=function(e,i,n){var o=t.get_timezone(i),r=new y.Session;return r.init(o,n),y.createDWMAligner(e,r)},h.prototype._barsCoefficients=function(e,t){if(void 0===_.parseSymbol(e).type)return{};var i=e+t;return this._barsCoefficientsCache[i]||(this._barsCoefficientsCache[i]={}),this._barsCoefficientsCache[i]},h.prototype.destroy=function(){this._cachedDatafeed.destroy(),this._externalDatafeed=null},h.prototype.purgeCache=function(){this._endOfData={},this._resolveRequests={}},h.prototype.purgeDataCache=function(){this._cachedDatafeed.purgeCache()},h.prototype._logMessage=function(e){n.enabled("charting_library_debug_mode")&&console.log(e)},h.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},h.prototype.on=function(e,t){return this._callbacks.hasOwnProperty(e)||(this._callbacks[e]=[]),this._callbacks[e].push(t),this},h.prototype._fireEvent=function(e,t,i){var n,o;if(this._callbacks.hasOwnProperty(e)){for(n=this._callbacks[e],o=0;oy[r].value[0])?y.push({index:(l=_,p=a(),l0?g:void 0,a,i)}}),!b._studiesCache[e]||!b._studiesCache[e][o])throw Error("This should never happen") ;b._studiesCache[e][o].engine=c}catch(e){if(!e.studyError)throw e;h(e.message)}else h("Unsupported resolution. Did you forget to set has_intraday to true?")},P=function(e){h(e)},x=function(){return b._studiesCache[e]&&b._studiesCache[e][o]&&b._studiesCache[e][o].activeResolve===m};b._studiesCache[e][o].activeResolve=m,this.resolveSymbol(i,function(){x()&&w.apply(b,arguments)},function(){x()&&P.apply(b,arguments)})},h.prototype._createStudy=function(e,t,i,n,r,l,c){function u(i,s,a){i=o(i),TradingView.ChartapiMessagerInstances[n].onDataUpdate(r,l,p._convertBarsTimeToUnix(i),s,a,p._extendedRange(e,t)),TradingView.ChartapiMessagerInstances[n].onStudyCompleted(r,l)}var h,d,p=this;c=function(e){var t,i,o;if(Array.isArray(e))return e;for(t=[],i=p._studiesCache[n][r].metainfo.inputs,o=0;o0?1e3*d[0].value[0]:void 0,h.nextTime&&(!p||h.nextTime

=0&&u&&e.lastBar){for(h=[],d=0;d<=c;d++)h.push(s+.001*d) ;(p=e.lastBar.slice(0))[0]=p[0]/1e3,TradingView.ChartapiMessagerInstances[i].onTimescaleUpdate(o,r,[{index:u-1,value:p}],n,u-1,h),a(n,u+c,_=1e3*Math.trunc(h[c])),l.rebuildExtrapolatedData(i,n.full_name,t,n,_)}l._updateProjectionData(i,o,r,e)})},h.prototype.onMoreTickmarksRequested=function(e,t,i,n,o){this._extrapolationManager.storage(e,i.full_name,n).onTickmarksNeeded(i,o)},h.prototype.removePointset=function(e){this._pointsetsManager.removePointset(e)},h.prototype.rebuildExtrapolatedData=function(e,t,i,n,o){this._extrapolationManager.storage(e,n.full_name,i).rebuild(o,n)},h.prototype.createPointset=function(e,t,i,n,o,r){var s=this._extrapolationManager.storage(e,n.full_name,o);this._pointsetsManager.createPointset(t,i,o,r,s,n)},h.prototype.studiesMetadata=function(){return 0===this._metainfoCache.length&&(this._metainfoCache=JSServer.studyLibrary.map(function(e){return e.metainfo})),this._metainfoCache},h.prototype.searchSymbols=function(e,t,i,n){this._logMessage("Symbol search requested: search string `{0}`, exchange: `{1}`, type `{2}`".format(e,t,i));var o=this;this._externalDatafeed.searchSymbols(e,t,i,function(e){o._logMessage("Symbol search response: {0}".format(JSON.stringify(e))),n(e)})},h.prototype.resolveSymbol=function(e,t,i){_.isSymbolEncoded(e)||console.error("Expect to get symbol encoded string, but got the following instead: "+e);var n=_.parseSymbol(e).symbol;this._resolveSymbolByName(n,t,i)},h.prototype._resolveSymbolByName=function(e,t,i){var n;this._resolveRequests[e]?n=this._resolveRequests[e]:(n=this._resolveSymbolInternal(e),this._resolveRequests[e]=n),n.then(t).catch(i)},h.prototype._resolveSymbolInternal=function(e){var t=this;return new Promise(function(i,o){this._logMessage("Symbol resolve requested: `{0}` ".format(e));var r=!0;this._externalDatafeed.resolveSymbol(e,function(o){r&&console.warn("`resolveSymbol` should return result asynchronously. Use `setTimeout` with 0 interval to execute the callback function."),t._logMessage("Symbol resolved: `{0}`, SymbolInfo in server response {1}".format(e,JSON.stringify(o))),function(e){var t,i;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(t=0;tp||(a=0,(l=h.valueAt(p)[TradingView.TIME_PLOT])e&&r.logNormal("Study inputs migration is done, studyId: "+this._studyId+", inputs: "+JSON.stringify(n)),n},n.prototype._findMigration=function(e){var t,i,n=-1,o=this._maxFromVers;for(t=0;t=0||t.indexOf(e)>=0},n._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),r.logNormal("Input "+t.inputId+"="+i+" adjusted to value "+e[t.inputId]),e},n._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,r.logNormal("Input "+t.inputId+"="+i+" reset to default value "+t.defVal)),e},e.exports=n},Eyy1:function(e,t,i){"use strict";function n(e){if(void 0===e)throw new Error("Value is undefined");return e}function o(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=n,t.ensureNotNull=o,t.ensure=function(e){return o(n(e))}},F58L:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h,d;i.r(t),i.d(t,"StudyTemplates",function(){return d}),n=i("lhgw"),o=i("tITk"),r=i("aIyQ"),s=i.n(r),a=i("hY0g"),l=i.n(a),c=i("oNDq"),u=i("Vdly"),h={confirmDelete:window.t("Do you really want to delete Study Template '{0}' ?")},d=function(){function e(e){var t=this;this._chartWidgetCollection=e.chartWidgetCollection,this._favoriteStudyTemplatesService=e.favoriteStudyTemplatesService,window.loginStateChange.subscribe(null,n.invalidateStudyTemplatesList),this._list=new l.a([]),this._onChange=new s.a,this._list.subscribe(function(){return t._onChange.fire()})}return e.prototype.showSaveAsDialog=function(){var e=this,t=this._chartWidgetCollection.activeChartWidget.value();Promise.all([i.e("react"),i.e(1),i.e(18),i.e(52),i.e(0),i.e("study-template-dialog")]).then(i.bind(null,"IDfV")).then(function(i){new(0,i.StudyTemplateSaver)({chartWidget:t,onSave:function(t){e._list.setValue(t)}}).show()})},e.prototype.applyTemplate=function(e){var t=this;window.runOrSignIn(function(){var i=t._chartWidgetCollection.activeChartWidget.value();u.setValue("defaultStudyTemplate",e),Object(n.getStudyTemplateContent)(e,function(t){Object(o.trackEvent)("GUI","Load Study Template"),i.model().model().restoreStudyTemplate(JSON.parse(t.content),e)})},{source:"Study templates apply"})}, e.prototype.deleteStudyTemplate=function(e){var t=this;window.runOrSignIn(function(){Object(c.createConfirmDialog)({type:"modal",content:h.confirmDelete.format(e)}).then(function(i){i.on("action:yes",function(i){i.actionLoader("yes","start"),Object(n.invalidateStudyTemplatesList)(),Object(n.removeStudyTemplate)(e,function(){var n,o=t.list();t._list.setValue(o.filter(function(t){return t.name!==e})),t._favoriteStudyTemplatesService&&(n=t._favoriteStudyTemplatesService.get(),t._favoriteStudyTemplatesService.set(n.filter(function(t){return t!==e}))),setTimeout(function(){i.actionLoader("yes","stop"),i.close()},0)})}),i.open()})},{source:"Study templates delete"})},e.prototype.list=function(){return this._list.value()},e.prototype.plainList=function(e){var t=this.list();return("default"===e?t.filter(function(e){return Boolean(e.is_default)}):t.filter(function(e){return!Boolean(e.is_default)})).map(function(e){return e.name})},e.prototype.getOnChange=function(){return this._onChange},e.prototype.refreshStudyTemplateList=function(e){var t=this;Object(n.getStudyTemplatesList)(function(i){t._list.setValue(i),void 0!==e&&e()})},e}()},FBsw:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"OverlayPriceAxisView",function(){return s}),n=i("mrSG"),o=i("KcY8"),r=i("oXaB"),s=function(e){function t(t){var i=e.call(this)||this;return i._source=t,i}return n.__extends(t,e),t.prototype._updateRendererData=function(e,t,i){var n,o,s,a;e.visible=!1,t.visible=!1,(n=this._source.lastValueData("close",!1)).noData||(o=this._source.model(),null!==(s=this._source.priceScale())&&o.isPriceScaleVisible(s)&&(i.background=n.color,i.color=this.generateTextColor(n.color),i.coordinate=n.coordinate,i.floatCoordinate=n.floatCoordinate,(a=this._source.model().properties().scalesProperties).showSeriesLastValue.value()&&(e.text=this._text(n),e.visible=!0),t.text="",(a.showSymbolLabels.value()||a.seriesLastValueMode.value()===r.PriceAxisLastValueMode.LastPriceAndPercentageValue)&&(t.text=this._paneText(n),t.visible=t.text.length>0)))},t.prototype._paneText=function(e){var t,i="",n=this._source.model().properties().scalesProperties;return n.showSymbolLabels.value()&&(i+=this._source.symbol()+" "),null!==(t=this._source.priceScale())&&n.showSeriesLastValue.value()&&n.seriesLastValueMode.value()===r.PriceAxisLastValueMode.LastPriceAndPercentageValue&&(i+=t.isPercentage()?e.formattedPriceAbsolute:e.formattedPricePercentage),i.trim()},t.prototype._text=function(e){var t=this._source.model().properties().scalesProperties,i=this._source.priceScale();return t.seriesLastValueMode.value()!==r.PriceAxisLastValueMode.LastPriceAndPercentageValue||null===i?e.text:i.isPercentage()?e.formattedPricePercentage:e.formattedPriceAbsolute},t}(o.a)},FBuY:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"TVXWindowEvents",function(){return r}),i("HbRj"),n=i("uOxu"),o=Object(n.getLogger)("XWindowEvents"),function(e){var t="tvxwevents.",i={};window.addEventListener("storage",function(e){if(null!==e.newValue){var n=e.key;n&&n.startsWith(t)&&(n=n.substr(t.length), i[n]&&i[n].forEach(function(t){t.call(e.newValue,e.newValue)}))}}),e.on=function(e,t){i[e]||(i[e]=[]),i[e].push(t)},e.off=function(e,t){if(i[e]){var n=i[e].indexOf(t);-1!==n&&(1===i[e].length?delete i[e]:i[e].splice(n,1))}},e.current=function(e){return TVLocalStorage.getItem(t+e)},e.emit=function(e,i){if(void 0===i&&(i=(new Date).valueOf()),i!==TVLocalStorage.getItem(t+e))try{TVLocalStorage.setItem(t+e,i)}catch(e){o.logError(e.message)}}}(r||(r={}))},FDyI:function(e,t,i){"use strict";i.r(t),i.d(t,"ChartWidgetApiBase",function(){return n});var n=function(){function e(e){this._chartWidget=e}return e.prototype.exportData=function(e){var t=this;return i.e("export-data").then(i.bind(null,"SIoL")).then(function(i){return i.exportData(t._chartWidget.model().model(),e)})},e}()},FIi8:function(e,t,i){"use strict";function n(e){var t,i=[];for(t=1;ts)))for(f in h={},(d=this._source.properties().levelsStyle.visibility).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")),p=i.indexToCoordinate(c),_=i.indexToCoordinate(u),h)m=parseFloat(f),y=n.priceToCoordinate(m,a),this._pivots.push({x1:p,x2:_,y:y,label:h[f].text,labelIds:h[f].ids})},o.prototype.renderer=function(){var e,t,i,n,o,r,s,l,c,u,h,d,p,_,f,S;for(this._invalidated&&(this._updateImpl(),this._invalidated=!1),e=new v,t=this._source.properties().levelsStyle.colors,i=this._source.properties().levelsStyle.widths,n=0;n0&&(p=this._cache._labelRectByIndex(d+11),_={left:r.x-p.width+u, top:Math.round(r.y-p.height/2),width:p.width,height:p.height},u+=p.width/2,f=this._cache._canvas,S=new y(f,p,_),e.append(S)),p=this._cache._labelRectByIndex(d),_={left:r.x-p.width+u,top:Math.round(r.y-p.height/2),width:p.width,height:p.height},u+=p.width,f=this._cache._canvas,S=new y(f,p,_),e.append(S);return e},r.prototype._updateImpl=function(){var e,t,i,n,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v;if(!this._model.timeScale().isEmpty()&&!this._source.priceScale().isEmpty()&&null!==(e=this._model.timeScale().visibleBarsStrictRange())&&this._source.customData()&&this._source.customData().pivots&&(t=this._model.mainSeries(),i=this._source.priceScale(),null!==(n=t.bars().search(e.lastBar(),S.NearestLeft)))){for(o=n.index,r=this._source.customData().pivots,s=this._source._indexes,a=this._source.properties(),l=this._source.firstValue(),c=0;c=o&&u<=o||!d))for(p=["p","s1","r1","s2","r2","s3","r3","s4","r4","s5","r5"],this._prices=[],_=0;_i)))for(l=[],(c=this._properties.levelsStyle.visibility).P.value()&&l.push(n[s].p),c["S1/R1"].value()&&l.push(n[s].s1,n[s].r1),c["S2/R2"].value()&&l.push(n[s].s2,n[s].r2),c["S3/R3"].value()&&l.push(n[s].s3,n[s].r3),c["S4/R4"].value()&&l.push(n[s].s4,n[s].r4),c["S5/R5"].value()&&l.push(n[s].s5,n[s].r5),u=0;ux}var a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,x,C,T,I,L,A,k,M,E,V,D,O,B,R,F,N,W,H,z,j,U,q,Y,G,K,J,Z,X,Q,$,ee;Object.defineProperty(t,"__esModule",{value:!0}),t.Branding=void 0,a=function(){return function(e,t){if(Array.isArray(e))return e ;if(Symbol.iterator in Object(e))return function(e,t){var i,n,o=[],r=!0,s=!1,a=void 0;try{for(i=e[Symbol.iterator]();!(r=(n=i.next()).done)&&(o.push(n.value),!t||o.length!==t);r=!0);}catch(e){s=!0,a=e}finally{try{!r&&i.return&&i.return()}finally{if(s)throw a}}return o}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function e(e,t){var i,n;for(i=0;i-1,U=j&&navigator.userAgent.toLowerCase().indexOf("windows")>-1,q=navigator.userAgent.toLowerCase().indexOf("chrome")>-1&&-1===navigator.userAgent.toLowerCase().indexOf("edge"),$=window.navigator.userAgent,ee=$.indexOf("MSIE "),Y=ee>0?parseInt($.substring(ee+5,$.indexOf(".",ee)),10):$.indexOf("Trident/")>0&&(Q=$.indexOf("rv:"),parseInt($.substring(Q+3,$.indexOf(".",Q)),10)),G=window.urlParams||{},window.initData,K=window.hidpiCanvasRatio||1,J=null,Z=function(){function e(t){var i=t.layout,o=void 0===i?M:i,s=t.symbol,a=void 0===s?"":s,l=t.model,c=t.onReadyCallback;n(this,e),this._model=l,this._image=null,this._imageReady=!1,this._needDisplayImage=!1,this._imageWidth=22,this._imageHeight=13,this._layout=o,this._symbol=a,this.showAnimatedBranding=d.enabled("show_animated_logo")||this._layout===E,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=_.color.brandNew,this._colorOldBlue=_.color.brandNew2,this._colorOldGray=_.color.black30,this._strokeColor=_.color.black255,this._brandCircleShadowColor=_.color.black0,this._strokeWidth=4,this._fontSize=this.showAnimatedBranding?11:14,this._font='px "Trebuchet MS", Arial, sans-serif',this._txt="TradingView",this._onReadyCallback=c,this._upscaleRatio=q?1:2,this._verticalTextShift=j?this.showAnimatedBranding?2:4:0,this._strokeCanv=null,this._fillCanv=null, Y&&(this._init=r(this._init,this)),this._init()}return l(e,[{key:"_init",value:function(){this._checkLayout(),this.show&&(this._updateStrokeColor(),this.showAnimatedBranding?(this._loadImage(S,"tvLogo"),this._createFillText()):this._loadImage(S,"tvLogo"),this._model.properties().paneProperties.background.subscribe(this,this._updateStrokeColor),this._model.onChartThemeLoaded().subscribe(this,this._updateStrokeColor))}},{key:"_updateStrokeColor",value:function(){var e=(0,f.getLuminance)(this._model.properties().paneProperties.background.value());this._strokeCanv=null,this._fillCanv=null,e>z?(this._brandCircleColor=_.color.black255,this._animatedColorBg=_.color.black255,this._brandCircleShadowOpacity=.09,this._strokeOpacity=.8):(this._brandCircleColor=_.color.black27,this._animatedColorBg=_.color.black27,this._brandCircleShadowOpacity=.09,this._strokeOpacity=.1)}},{key:"_loadImage",value:function(e,t){var i,n=this;this._needDisplayImage&&(this._image=new Image,this.showAnimatedBranding&&(this._imageWhite=new Image),Y?(this._image.src=J.fallbackImages[t+"Blue"],this.showAnimatedBranding&&(this._imageWhite.src=J.fallbackImages[t+"White"])):(i=e.replace(/fill="#[\da-f]{6}"/i,'fill="#FFFFFF"'),this._image.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e),this.showAnimatedBranding&&(this._imageWhite.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i))),this._image.addEventListener("load",function(){U&&(n._image=o(n._image,n._imageWidth,n._imageHeight)),n._imageReady=!0,"function"==typeof n._onReadyCallback&&n._onReadyCallback()}))}},{key:"_checkLayout",value:function(){switch(this._layout){case E:case V:case D:case B:case R:case W:case N:this.show=!0;break;case M:case O:case F:case H:this.show=!1}switch(this._layout){case N:this._needDisplayImage=!0,this._txt=window.t(I);break;case W:this._txt=window.t(k)}}},{key:"_drawTextStroke",value:function(e){var t,i;this._strokeCanv||(this._strokeCanv=document.createElement("canvas"),t=this._strokeCanv.getContext("2d"),i=Math.round(this._strokeWidth*this._upscaleRatio),t.font=this._fontSize*this._upscaleRatio+this._font,this._textWidth=t.measureText(this._txt).width,this._strokeCanv.width=(this._textWidth+2*i)*K,this._strokeCanv.height=(this._fontSize+2*i)*this._upscaleRatio*K,this._strokeCanv.width%2==0&&(this._strokeCanv.width+=1,this._strokeCanv.height+=1),t.textBaseline="top",t.textAlign="start",t.font=this._fontSize*this._upscaleRatio+this._font,t.strokeStyle=this._strokeColor,t.lineWidth=this._strokeWidth*this._upscaleRatio*K,t.lineJoin="round",t.strokeText(this._txt,i,this._verticalTextShift)),e.save(),e.globalAlpha=this._strokeOpacity,e.drawImage(this._strokeCanv,0,0,this._strokeCanv.width,this._strokeCanv.height,0,0,this._strokeCanv.width/this._upscaleRatio/K,this._strokeCanv.height/this._upscaleRatio/K),e.restore()}},{key:"_drawTextFill",value:function(e){this._createFillText(),e.save(),e.drawImage(this._fillCanv,0,0,this._fillCanv.width,this._fillCanv.height,0,0,this._fillCanv.width/this._upscaleRatio/K,this._fillCanv.height/this._upscaleRatio/K), e.restore()}},{key:"_createFillText",value:function(){var e,t;null===this._fillCanv&&(this._fillCanv=document.createElement("canvas"),e=this._fillCanv.getContext("2d"),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)),this._setSizeFillTextCanvas(t),e.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),i=this._fillCanv.getContext("2d");this._setSizeFillTextCanvas(t),i.clearRect(0,0,this._fillCanv.width,this._fillCanv.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){this._fillCanv.width=(this._textWidth+2*e)*K,this._fillCanv.height=(this._fontSize+2*e)*this._upscaleRatio*K,this._fillCanv.width%2==0&&(this._fillCanv.width+=1,this._fillCanv.height+=1)}},{key:"_drawFillTextCropWidth",value:function(e,t,i){this._fillCanv?this._updateFillTextWithColor(i):this._createFillText(),e.save(),e.drawImage(this._fillCanv,0,0,t*this._upscaleRatio*K,this._fillCanv.height,0,0,t,this._fillCanv.height/this._upscaleRatio/K),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,n,o,r,s){e.save(),(0,y.drawRoundRect)(e,t-1,i-1,n+2,o+2,r),e.globalAlpha=this._brandCircleShadowOpacity,e.fillStyle=this._brandCircleShadowColor,e.fill(),e.closePath(),e.restore(),e.save(),(0,y.drawRoundRect)(e,t,i,n,o,r),e.fillStyle=s,e.fill(),e.closePath(),e.restore()}},{key:"_drawImageWithColor",value:function(e){e.save(),e.globalAlpha=this._animatedOpacity,e.drawImage(this._imageWhite,0,-.5,this._imageWidth,this._imageHeight),e.restore(),e.save(),e.globalAlpha=1-this._animatedOpacity,e.drawImage(this._image,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._fillCanv.width/this._upscaleRatio/K+this._brandCircleSize-3}},{key:"animatedDrawStep",value:function(e,t){var i,n,o,r,s,l,c,u,h,d,p,_,f,m,y,v;this._animatedWidth=t, i=this._animatedWidthr&&(e.translate(this._imageWidth/2+o,.5),this._drawFillTextCropWidth(e,this._animatedWidth-r,this._animatedColorText)),e.restore(),this.width=this._animatedWidth,this.height=this._brandCircleSize,this._bottomShift=this._brandCircleSize-this._imageHeight):this._layout===D||this._layout===R?(a='12px "Trebuchet MS", Arial, sans-serif',e.font=a,l=e.measureText(this._txt).width,this.width=l+e.measureText("TradingView").width,e.save(),e.globalAlpha=.7,e.fillStyle=this._colorOldGray,e.fillText(this._txt,0,12),e.fillStyle=this._colorOldBlue,e.fillText("TradingView",l,12),e.restore()):function(e){return!P||e>C}(t)&&(this._needDisplayImage&&this._imageReady?(e.save(),c=(this._brandCircleSize-this._imageWidth)/2,e.translate(c,0),this._drawBgCircle(e),e.drawImage(this._image,0,-.5,this._imageWidth,this._imageHeight),u=12+(q?-.5:0),e.translate(this._imageWidth+u,-.5),(h=s(t))&&(this._drawTextStroke(e),this._drawTextFill(e)),e.restore(),this.width=this._imageWidth+c,this.width+=h?u+this._strokeCanv.width/this._upscaleRatio/K:c,this.height=this._brandCircleSize,this._bottomShift=this._brandCircleSize-this._imageHeight):(e.save(),e.translate(q?-.5:0,-.5),(d=s(t))&&(this._drawTextStroke(e),this._drawTextFill(e)),e.restore(),d&&(this.width=this._strokeCanv.width/this._upscaleRatio/K)))}}]),e}(),X=function(){function e(t){var i=t.layout,o=void 0===i?M:i,s=t.src,a=t.onReadyCallback;n(this,e),this._img=new Image,this._ready=!1,this.show=!1,this.width=0,this.height=0,this._layout=o,this._src=s,this._onReadyCallback=a,Y&&(this._init=r(this._init,this)),this._init()}return l(e,[{key:"_init",value:function(){var e,t,i=this;this._checkLayout(),this.show&&(e=this._src.match(/(\w+)\.svg/),Y&&e&&2===e.length?(t=e[1],this._img.src=J.fallbackImages[t],this._img.addEventListener("load",function(){var e=J.logoSizes;t in e?(i.width=e[t].width,i.height=e[t].height):(i.width=135,i.height=25),i._ready=!0,"function"==typeof i._onReadyCallback&&i._onReadyCallback() })):(this._img.src=this._src,this._img.addEventListener("load",function(){i.width=Math.round(i._img.width),i.height=Math.round(i._img.height),U&&(i._img=o(i._img,i.width,i.height)),i._ready=!0,"function"==typeof i._onReadyCallback&&i._onReadyCallback()})))}},{key:"_checkLayout",value:function(){switch(this._layout){case D:case O:case R:case F:case W:case H:this.show=!0;break;case M:case E:case V:case B:case N: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){var o,r=this;n(this,e),this._model=t,this._mainSeries=this._model.mainSeries(),this._canvasWidth=0,this._showAllowance=i,this._paneHeight=0,this._left=13,this._bottom=24,this._layout=M,this._needToShow=!0,this._customLogoSrc="",this._customLogoLink="",this._checkLayout(),this._layout!==D&&this._layout!==R||(this._left=8,this._bottom=5),o=function(){r._needToShow?r._layout===M?r._showBranding=window.innerWidth>=768:r._showBranding=!0:r._showBranding=!1},this._resizeHandlerDelayed=v(o,200),o(),window.addEventListener("resize",this._resizeHandlerDelayed),this._model.isSnapshot()?this._init():this._mainSeries.dataEvents().symbolResolved().subscribe(this,this._init),this._cubicBezier=new _.CubicBezier(.4,.01,.22,1)}return l(e,[{key:"destroy",value:function(){window.removeEventListener("resize",this._resizeHandlerDelayed)}},{key:"_init",value:function(){var e=this,t=this._mainSeries.symbolInfo()||{};this._powBy=new Z({layout:this._layout,symbol:t.name,model:this._model,onReadyCallback:function(){return e._model.fullUpdate()}}),this._custom=new X({layout:this._layout,src:this._customLogoSrc,onReadyCallback:function(){return e._model.fullUpdate()}}),this._openAnimation=null,this._closeAnimation=null}},{key:"_checkLayout",value:function(){if(d.enabled("widget"));else if(d.enabled("charting_library")||d.enabled("amp_terminal")||d.enabled("cqg_terminal")||d.enabled("trading_terminal")){var e=JSON.parse(G.logo)||{};e.image?(this._customLogoSrc=e.image,this._customLogoLink=e.link,this._needToShow=d.enabled("widget_logo"),d.enabled("link_to_tradingview")?this._layout=W:this._layout=H):(this._layout=N,this._needToShow=d.enabled("widget_logo"))}else this._layout=M}},{key:"_startOpenAnimation",value:function(){null===this._openAnimation&&(null!==this._closeAnimation&&(this._closeAnimation.stop(),this._closeAnimation=null),this._openAnimation=(0,m.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,m.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||d.enabled("logo_without_link")?null:this._powBy&&this._layout!==M&&this._layout!==O&&this._layout!==F&&(0,u.pointInBox)(e,(0,c.box)(new c.Point(this._left,this._paneHeight-Math.max(this._powBy.height,void 0!==this._custom?this._custom.height:0)-this._bottom),new c.Point(this._left+Math.max(this._powBy.width,void 0!==this._custom?this._custom.width:0),this._paneHeight-this._bottom)))?new p.HitTestResult(p.HitTestResult.CUSTOM,{mouseUpHandler:function(){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,t="https://www.tradingview.com/";if(this._customLogoLink)return this._customLogoLink;if(this._layout===N||this._layout===W){switch(e=void 0,!0){case d.enabled("charting_library"):e="library";break;case d.enabled("trading_terminal"):case d.enabled("amp_terminal"):case d.enabled("cqg_terminal"):e="trading-terminal"}return t+="/"===t[t.length-1]?"?":"&",t+="utm_source="+window.location.origin+"&utm_medium=library"+(e?"&utm_campaign="+e:"")}return t}},{key:"draw",value:function(e){if(this._showBranding){var t=0;G.utm=!0,this._powBy&&this._powBy.show&&(t=this._powBy.height-this._powBy.bottomShift(),e.save(),e.translate(this._left,this._paneHeight-this._bottom-t),this._powBy.draw(e,this._canvasWidth),e.restore()),this._custom&&this._custom.show&&(e.save(),e.translate(this._left,this._paneHeight-this._bottom-t-this._custom.height),this._custom.draw(e),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(!this._showAllowance())return[];var t=d.enabled("move_logo_to_main_pane");return t&&e.isMainPane()||!t&&e.isLast()||e.isMaximized()?[{renderer:this.renderer.bind(this)}]:[]}}]),e}()},GVHu:function(e,t,i){"use strict";(function(t,n,o,r){function s(e,t,i,n){this._study=e,this.m_series=t,this.m_model=i,this._plotName=n,this._visible=!1,this._points=[new Y(0,0)],this._invalidated=!0,this._lineRenderer=new m}function a(e,t,n,o,r){var s,a,c,u,h=i("K4L1");return e.version&&n.version&&e.version!==n.version&&he.logWarn("Serialized metaInfo version "+e.version+" is not equal to the saved state version "+n.version),s=TradingView.clone(defaults("study")), TradingView.merge(s,TradingView.factoryDefaults("study_"+e.id)),l(s,e),TradingView.merge(s,n),s=r.updateStudyState(s,e,t),(a=TradingView.clone(t||e))&&ne.versionOf(a)>=1&&(c={},h.mergeInputsObjPart(c,a.defaults.inputs),h.mergeInputsObjPart(c,s.inputs),s.inputs=c,delete a.inputs,delete a.defaults.inputs,u={},TradingView.merge(u,a.defaults),TradingView.merge(u,TradingView.factoryDefaults("study_"+a.id)),TradingView.merge(u,s),delete a.defaults,TradingView.merge(u,a),s=u),s}function l(e,t){var i,n,o,r;if(t.plots)for(i=0;im+1&&void 0!==(P=_[m+1])&&null!==P?(x=y.valToIndex?y.valToIndex[P]:P,f.color=g.colors[x].color.value()):f.color=w,f.floatCoordinate=this.priceScale().priceToCoordinate(S,b,!0),f.coordinate=Math.round(f.floatCoordinate),f.item=_,f):C},c.prototype.isFailed=function(){return this._failed},c.prototype.series=function(){return this._series},c.prototype.model=function(){return this._model},c.prototype._invalidateLastNonEmptyPlotRowCache=function(){this._lastNonEmptyPlotRowCache={}},c.prototype.clearData=function(){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.clear(),this._graphics.clear&&this._graphics.clear(),this._plotOffsets={}},c.prototype.onTagsChanged=function(){return this._tagsChanged},c.prototype.properties=function(){return this._properties},c.prototype.state=function(e){var t,i,n,o,r=TradingView.className(this.constructor),s={type:r,id:this.id(),state:this.properties().state(),zorder:this.zorder()};for(this.metaInfo()instanceof ne?s.metaInfo=TradingView.clone(this.metaInfo().state()):(s.metaInfo=TradingView.clone(this.metaInfo()),s.metaInfo.id=ne.parseIdString(s.metaInfo.id+(s.metaInfo.version?"-"+s.metaInfo.version:"")).fullId),e&&(s.data=this.data().state(),s.data.symbols=this._resolvedSymbols,s.data.graphics=H(this.graphics()),s.data.plotOffsets=this._plotOffsets),this.ownerSource()&&(s.ownerSource=this.ownerSource().id()),t=0;t=0?o:0));return this._isChildStudy&&ne.patchChildStudyMetaInfoState(s),s},c.prototype._plotsForAlert=function(){ var e=this,t=this._metaInfo,i=[re.isLinePlot,re.isShapesPlot,re.isCharsPlot,re.isArrowsPlot,re.isOhlcPlot];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 n={id:i.id,type:i.type,pinePlotIndex:i.pinePlotIndex,offset:e.offset(i.id)};return t.styles&&void 0!==t.styles[i.id]&&(n.title=t.styles[i.id].title||""),i.target&&t.ohlcPlots&&t.ohlcPlots[i.target]&&(n.ohlcTitle=t.ohlcPlots[i.target].title),n})},c.prototype.isSavedInStudyTemplates=function(){for(var e=0;e0)return!0;for(e in this._metaInfo.graphics)for(t in this._metaInfo.graphics[e])if(!(i=this.properties().graphics[e][t]).visible||i.visible.value())return!0;return!!this._metaInfo.isTVScriptStrategy},c.prototype.start=function(e,t){var i,n=this._model.mainSeries();n.isStarted()?(this._isChildStudy&&this._source.isHibernated()&&this._source.start(),i=!this._isChildStudy&&!this.hasChildren()&&!this.isVisible(),!this._chartApi||!this._chartApi.connected()||i&&!0!==t||this._allSymbolsAreResolved().then(function(){this._startAfterSymbolsResolved(e,t)}.bind(this)).catch(function(e){he.logError("ERROR: "+this._debugId()+" start failed, "+e),delete this._restarting}.bind(this))):n.dataEvents().completed().subscribe(this,function(){this.start(e,t)},!0)},c.prototype._getStudyIdWithLatestVersion=function(){var e=ne.cutDollarHash(this._metaInfo.id),t=e;return e.indexOf("@tv-scripting")>=0?t+="-101!":t+="-"+this._metaInfo.version,t},c.prototype._startAfterSymbolsResolved=function(e,t){var i,n;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);ne.setChildStudyMetaInfoPropertiesSourceId(this._metaInfo,this._source.sourceId(),this._properties)}if(this._studyId=c.makeNextStudyId(), delete this._restarting,this._allInputsAreValid()&&(this._inputs=this.inputs(),i=this._getStudyIdWithLatestVersion(),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(this._studyId),!0===e&&this._children))for(n=0;n=e&&(t=p(this._series.bars().lastIndex())-e,i=p(this._series.bars().valueAt(t))[TradingView.TIME_PLOT]),i},c.prototype.getSymbolString=function(e){return this._series&&this._series.extendedHours.value()?"="+JSON.stringify({symbol:e,session:"extended"}):e},c.prototype._titleInputs=function(){return this.inputs({symbolsForDisplay:!0,skipHiddenInputs:!0,skipFakeInputs:!1,fakeInputsForDisplay:!0,asObject:!1,skippedGroups:[]})},c.prototype.inputsForAlert=function(){var e=this.offset(),t=this.inputs();return e&&t.push(e),t},c.prototype.inputs=function(e){var t={symbolsForDisplay:!1,symbolsForChartApi:!0,skipHiddenInputs:!1,skipFakeInputs:!1,skipBooleanInputs:o.enabled("dont_show_boolean_study_arguments"),asObject:!0,skippedGroups:[]};return TradingView.merge(t,e),this._buildInputs(t)},c.prototype._buildInputs=function(e){var t,i;d(!!e,"options not set"),t={};try{t=this._prepareInputs(e)}catch(e){he.logWarn("Failed to prepare study inputs: "+e)}return e.asObject?(i={},Object.keys(t).forEach(function(e){null!=t[e]&&(i[e]=t[e])}),i):(i=[],Object.keys(t).forEach(function(e){null!=t[e]&&i.push(t[e])}),i)},c.prototype._prepareInputs=function(e){var t,i,n,o;for(d(!!e,"options not set"),t={},i=0;i=0?r:o), o):this._metaInfo.isTVScript||this._metaInfo.pine?"text"===s?this._metaInfo.defaults.inputs.text:"pineId"===s?this._metaInfo.scriptIdPart:"pineVersion"===s?this._metaInfo.pine?this._metaInfo.pine.version:"-1":this._properties.inputs[s].value():this._properties.inputs[s].value()},c.prototype._rebindToSource=function(e,t){var i,n,o,r,s,a,l,u,h,d=this.parentSource();if(this._isChildStudy){if(this._source.unsetChild(this),delete this._nonPriceParent,n=null,e===this._model.mainSeries()){for(o=this._model.studiesMetaData(),s=0;s0){if(r={},this._isChildStudy)for(s=0;s=0&&this._source&&(u=this._source.metaInfo(),h=this._source.title(e,null,!0),1===u.plots.length?r[c]=h:(d=c.split("$")[1],p=u.plots[d].id,_=u.styles&&u.styles[p]&&u.styles[p].title||p,r[c]=h+": "+_));break}f=this,n+=" ("+(o=o.map(function(e){var i=isNumber(e)?f._numericFormatter.format(e):r&&r[e]||e;return t[i]&&(i=t[i]),i})).join(", ")+")"}return n},c.prototype.invalidateTitleCache=function(e){if(this._titleCache={},!0===e&&this._children)for(var t=0;t0&&(this._status=window.t(t)),this._statusView.update(),this._model.updateSource(this);break;case"study_completed":if(!this._checkTurnaround(e.params[1]))return;i="chartSession:"+r._chartApi._sessionid,n=(new Date).getTime()-this._loadingStartTime,he.logDebug(i+", Study "+this._metaInfo.description+" loading took "+n+" ms"),delete this._loadingStartTime,this._status="",this._statusView.update(),o=this._model.paneForSource(this),this._model.recalculatePane(o),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;d(!!e.params.nonseries,"data.params.nonseries is missing"),this._onDataUpdate(e.params.plots,e.params.nonseries)}},c.prototype._onDataUpdate=function(e,t){this._studyModified&&(this.clearData(),this._studyModified=!1),_(t.d).then(function(i){"nochange"!==t.indexes&&this._processPlotOffsets(i),this.transformData(e),this._mergeData(e),null!==i&&(i.indexes_replace?(d("nochange"!==t.indexes),this._graphics.replaceIndexesTo(t.indexes)):("nochange"!==t.indexes&&this._graphics.replaceIndexesTo(t.indexes), void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),this._onDataUpdated(e,i,t.indexes)}.bind(this))},c.prototype._onDataUpdated=function(e,t,i){this.hasBarColorer()&&e.length>0&&this._model.mainSeries().invalidateBarStylesCache(e[0].index),null!==t&&this._postProcessGraphics();var n=this._model.paneForSource(this);this._model.recalculatePane(n),this._updateSources()},c.prototype.transformData=function(e){},c.prototype.moveData=function(e){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.move(e)},c.prototype.replaceData=function(e,t,i){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.remove(e+1),this.m_data.addTail(i,t)},c.prototype._updateSources=function(){this._model.updateSource(this),this.hasBarColorer()&&this._model.updateSource(this._model.mainSeries())},c.processPlotOffsets=function(e,t){t&&t.indexes_replace||(e._plotOffsets=t&&t.offsets||{})},c.prototype._processPlotOffsets=function(e){c.processPlotOffsets(this,e)},c.prototype._mergeData=function(e){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.merge(e)},c.prototype._postProcessGraphics=function(){this._priceAxisViews=[].concat(this._priceAxisViewsBase,U(this))},c.prototype._getNonPriceParent=function(){var e,t;if(this._nonPriceParent)return this._nonPriceParent;for(e=this.source();e instanceof c;){if(!(t=e.metaInfo()).is_price_study||"Compare@tv-basicstudies"===t.id)return this._nonPriceParent=e,e;e=e.source()}},c.prototype.firstValue=function(e){var t,i,n,o,r,s;return!this._isChildStudy&&"Compare@tv-basicstudies"===this._metaInfo.id||!this._metaInfo.is_price_study?null===(t=this._model.timeScale().visibleBarsStrictRange())?null:(i=t.firstBar(),n=t.lastBar(),0===this.data().size()?null:(o=null,r=this,this.data().range(i,n).each(function(t,i){var n,s,a;for(n=1;n=0){if(y=n.properties().styles[h].histogramBase.value(),!isNumber(y))continue;c=te(c,{min:y,max:y})}a.push(f)}if(g=n.m_data.minMaxOnRangeCached(e,t,a),g=te(c,g),s&&(a=[{name:"low",offset:0},{name:"high",offset:0}],v=n.series().data().bars().minMaxOnRangeCached(e,t,a),g=te(g,v)),null!==g&&(i=new r(g.min,g.max)),o.bands)for(u=0;u=0&&(e="_v"+this._metaInfo.pine.version),{symbol:this.series().actualSymbol(),resolution:this.series().interval(),study:this._metaInfo.shortId+e}},c.prototype._sendTelemetryReport=function(e,t,i){void 0===i&&(i=this._getTelemetryAdditionalData());var n=Object.assign(t,{additional:i});telemetry.sendChartReport(e,n)},c.prototype._sendTelemetryCounter=function(e,t){this._sendTelemetryReport(e,{count:1},t)},c.prototype._sendTelemetryTiming=function(e,t,i){this._sendTelemetryReport(e,{value:t},i)},c.prototype.destroy=function(){var e,t,i,n,o,r ;for(this._legendView&&this._legendView.destroy(),this.parentSource().formatterChanged().unsubscribe(this,this._onSourceFormatterChanged),this._properties.listeners().unsubscribe(this,this.changeStyles),this._properties.visible.listeners().unsubscribe(this,this.visibleChanged),this._properties.visible.listeners().unsubscribe(this,this.processHibernate),e=0;e= 1");return l(s=TradingView.clone(defaults("study")),e),a=ne.getStudyPropertyRootName(e),c=TradingView.clone(defaults(a,r)),e.isTVScript&&e.TVScriptSourceCode!==c.TVScriptSourceCode&&(c=TradingView.clone(TradingView.factoryDefaults(a,r))),TradingView.merge(s,c),n&&(d(!(n instanceof t),"propsState should not be an instance of Property"),TradingView.merge(s,n)),u=TradingView.clone(e),h={},f.mergeInputsObjPart(h,u.defaults.inputs),f.mergeInputsObjPart(h,s.inputs),s.inputs=h,delete u.inputs,delete u.defaults.inputs,p={},TradingView.merge(p,u.defaults),TradingView.merge(p,TradingView.factoryDefaults("study_"+u.id)),TradingView.merge(p,s),TradingView.merge(p,u),delete p.defaults,s=p,null!==o&&(_=o.model().studiesColorRotatorFactory().getColorRotator(e), "Overlay@tv-basicstudies"===e.id?s.lineStyle.color=_.getColor(s.lineStyle.color,e):TradingView.merge(s,function(e,t){var i,n;for(i in e.styles)(n=e.styles[i].color)&&(e.styles[i].color=t.getColor(n));return e}(s,_))),n&&TradingView.merge(s.styles,n.styles),s}(e,n,o,r),m=ne.getSourceInputIds(e);for(m.length>0&&(u=m[0],a instanceof c?f.inputs[u]="{pid}$0":void 0!==f.inputs[u]&&-1!==f.inputs[u].indexOf("$")&&(f.inputs[u]="close")),(h=new G(s,f,!0)).addExclusion("visible"),h.addExclusion("precision"),h.addExclusion("minTick"),p=0;p=n||(this.maxIndex=n),s[o]||(s[o]=[]),s[o].push(i),a[o]=!0}for(o=s.length;o--;)s[o]&&(s[o].length||delete s[o],a[o]&&s[o].sort(this._sortByIndexAsc));delete this._cache,this.changed.fire()},i.prototype._removeTickmark=function(e){var t,i,n=e.index;this._marksByIndex[n]===e&&(delete this._marksByIndex[n],n<=this.minIndex&&this.minIndex++,n>=this.maxIndex&&this.maxIndex--,this.maxIndex2;){if(1e3*this._marksByIndex[i].time===e)return i;if(1e3*this._marksByIndex[n].time===e)return n;t=Math.round((i+n)/2),1e3*this._marksByIndex[t].time>e?n=t:i=t}return i},i.prototype.build=function(e,t){var i,n,o,r,s,a,l,c,u,h,d,p,_,f,m=Math.ceil(t/e);if(this._maxbar===m&&this._cache)return this._cache;for(this._maxbar=m,i=[],n=this._marksBySpan.length;n--;)if(this._marksBySpan[n]){for(o=i,i=[],r=o.length,s=0,l=(a=this._marksBySpan[n]).length,c=1/0,u=-1/0,h=0;h=m&&p-u>=m&&(i.push(d),u=p)}for(;s=t}function r(e,t,i){return Math.min(Math.max(e,t),i)}function s(e){return e<0?-1:e>0?1:0}function a(e){if(e<0)return f.logDebug("MathEx.isBaseDecimal: argument less zero"),!1;for(var t=e;t>1;t/=10)if(t%10!=0)return!1;return!0}function l(e,t,i){return t-e<=i}function c(e,t,i){return Math.abs(e-t)t?1:0}function d(e,t){var i,n;if(void 0===t&&(t=h),e.length<1)throw Error("array is empty");for(i=e[0],n=0;n0&&(i=e[n]);return i}var _,f;i.r(t),i.d(t,"lessThan",function(){return n}),i.d(t,"greaterThan",function(){return o}),i.d(t,"clamp",function(){return r}),i.d(t,"sign",function(){return s}),i.d(t,"isBaseDecimal",function(){return a}),i.d(t,"greaterOrEqual",function(){return l}),i.d(t,"equal",function(){return c}),i.d(t,"log10",function(){return u}),i.d(t,"defComparator",function(){return h}),i.d(t,"min",function(){return d}),i.d(t,"max",function(){return p}),_=i("uOxu"),f=Object(_.getLogger)("Common.MathEx")},HySD:function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"ResizerDetacherState",function(){return a}),n=i("Eyy1"),o=i("hY0g"),r=i.n(o),s=i("P5fv"), a=function(){function e(e){var t=this;this._alive=new r.a,this._body=new r.a,this._width=new r.a,this._height=new r.a,this._fullscreen=new r.a,this._detachable=new r.a,this._fullscreenable=new r.a,this._visible=new r.a,this._availWidth=new r.a,this._availHeight=new r.a,this._owner=new r.a,this._ownersStack=[],this.owner=this._owner.readonly(),this._bridge={alive:this._alive.readonly(),body:this._body.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){var t,i,n,o;if(e.alive.value()){for(t=0,i=this._ownersStack;t=i;t--)this._unsubscribeOwner(this._ownersStack[t],!0);this._ownersStack.length=i,i>0?this._subscribeOwner(this._ownersStack[i-1]):(this._alive.setValue(!1),this._owner.deleteValue())},e}()},I4UZ:function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"HeaderToolbarBootloader",function(){return a}),n=i("mrSG"),o=i("yMne"),r=i("YuHv"),s=i("cZRT"),a=function(e){function t(t,i){var n=e.call(this)||this ;return n._toolsBootloader=t,n._headerProps=i,n._headerProps.resizerBridge.negotiateHeight(o.HEADER_TOOLBAR_HEIGHT_EXPANDED),n._headerProps.resizerBridge.body.value()[0].appendChild(Object(r.a)(["border-right","border-left"],["bottom-left-radius","bottom-right-radius"])),n}return n.__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.body.value()[0],n.__assign({},e._headerProps,{tools:i}))})},t.prototype._loadHeaderToolbar=function(){return Promise.all([i.e("react"),i.e(22),i.e(38),i.e(46),i.e(5),i.e(30),i.e("header-toolbar")]).then(i.bind(null,"KMbc")).then(function(e){return e.HeaderToolbarRenderer})},t}(s.a)},I5CP:function(e,t,i){"use strict";(function(t){function n(e,t,i,n){this.reset(e,t,i,n)}var o=i("XlJ7").makeFont,r=i("u+0B").TextWidthCache,s=t.enabled("charting_library_debug_mode");n.prototype.maxCount=200,n.prototype.reset=function(e,t,i,n){this._textWidthCache=new r(this.maxCount),this._fontSize=e,this._color=n,this._font=o(e,t,i),this._keys=[],this._hash={}},n.prototype.paintTo=function(e,t,i,n,o){var r=this.getLabelImage(e,t);"left"!==o&&(i-=r.textWidth),n-=Math.floor(r.height/2),e.drawImage(r.canvas,i,n)},n.prototype.getLabelImage=function(e,t){var i,n,o,r,a;return Object.prototype.hasOwnProperty.call(this._hash,t)?i=this._hash[t]:(this._keys.length>=this.maxCount&&(n=this._keys.shift(),delete this._hash[n]),i={text:t,textWidth:0,width:0,height:0,canvas:document.createElement("canvas")},o=Math.ceil(this._fontSize/4.5),r=Math.round(this._fontSize/10),a=Math.ceil(this._textWidthCache.measureText(e,t)),i.textWidth=Math.round(Math.max(1,a)),i.width=Math.round(a+2*o),i.height=this._fontSize+2*o,0!==a?(this._keys.push(i.text),this._hash[i.text]=i):s&&console.log('Canvas 2d context measureText return zero width for "'+t+'" text'),i.canvas.width=i.width,i.canvas.height=i.height,(e=i.canvas.getContext("2d")).font=this._font,e.fillStyle=this._color,e.fillText(t,0,i.height-o-r)),i},e.exports=n}).call(this,i("Kxc7"))},I9zs:function(e,t,i){"use strict";function n(e,t,i,n){var o,r;for(this.m_study=e,this.m_series=t,this.m_model=i,this._plotName=n,this.m_items=[],this._invalidated=!0,this._isMarkersEnabled=J.enabled("source_selection_markers"),o=this.m_study.metaInfo().plots,this._colorer=null,this._palette=null,this._paletterProps=null,this._plotIndex=0,r=0;r=0&&e0?(t-=o,i+=o):(t+=o,i-=o),(r=this.m_study.getMinFirstBarIndexForPlot(this._plotName))>i))){if(t=Math.max(r,t),a=(s=this.m_study.properties().styles[this._plotName]).plottype.value(),l=[j.Line,j.Area,j.Circles,j.Cross].indexOf(a)>=0,c=this.m_study.data(),u=this.m_study.firstValue(),l&&c._length()>0){for(h=c._bsearch(t);n.isIndexValid(h,c)&&void 0===c._valueAt(h)[this._plotIndex+1];)h-=1;for(t=n.isIndexValid(h,c)?c._indexAt(h):t,d=c._bsearch(i);n.isIndexValid(d,c)&&void 0===c._valueAt(d)[this._plotIndex+1];)d+=1;i=n.isIndexValid(d,c)?c._indexAt(d):i}if(_=c.range(t,i),f=this.m_study.priceScale(),m=W(this._getTranspValue(),0,100),y={},g=function(e,t){var i=e+"@"+t;return y[i]||(this._plotName&&"vol"===this._plotName?y[i]=G.generateColor(e,t):y[i]=G.generateColor(e,t,!0)),y[i]}.bind(this),_.each(function(e,t){var i,n,r,a,c,u,h,d,_;return e+=o,e=Math.floor(e),i=(n=void 0===(i=t[this._plotIndex+1])||null===i)?NaN:i,(!l||!n)&&(r=new p(e,i),a=void 0!==t[this._colorer+1]||this._palette&&this._palette.addDefaultColor,this._colorer&&a&&(i=t[this._colorer+1],r.style={},null!=i?(c=this._palette.valToIndex?this._palette.valToIndex[i]:i,h=(u=this._paletterProps.colors[c]).color.value(),r.style.color=G.isHexColor(h)?g(h,m):h):(h=s.color.value(),r.style.color=g(h,100)),d=void 0!==c?u.width.value():s.linewidth.value(),_=void 0!==c?u.style.value():s.linestyle.value(),r.style.width=d,r.style.style=_),this.m_items.push(r),!1)}.bind(this)),f.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))for(v=N(t,i),this._selectionData={points:[]},this._selectionData.hittestResult=S.REGULAR,b=0;b0?(s-=l,a+=l):(s+=l,a-=l),(c=this._study.getMinFirstBarIndexForPlot(this._plotName))>a||(s=Math.max(c,s),this._study.data().range(s,a).each(function(e,t){var i,s,a,c;return e+=l,i=t[this._plotIndex+1],s=new p(Math.floor(e)-.5),a=isNumber(r)?r:50,a=Math.min(a,100),a=Math.max(a,0),null!=i?(c=o.valToIndex?o.valToIndex[i]:i,s.color=G.generateColor(n[c].color.value(),a)):s.color=null,this._items.push(s),!1}.bind(this)),this._model.timeScale().indexesToCoordinates(this._items)))},o.prototype.renderer=function(){var e,t;if(this._study.properties().styles[this._plotName].visible&&this._study.properties().styles[this._plotName].visible.value()&&this._scalesReady())return this._invalidated&&(this._updateImpl(),this._invalidated=!1),e={items:this._items,y:0,h:this._study.priceScale().height(),w:Math.ceil(this._model.timeScale().barSpacing())},(t=new F).append(new O(e)),t},r.prototype.items=function(){return this.m_items},r.prototype.update=function(){this.m_invalidated=!0},r.prototype._scalesReady=function(){var e=this.m_model.timeScale(),t=this.m_study.priceScale();return e&&t&&!e.isEmpty()&&!t.isEmpty()},r.prototype._updateImpl=function(){var e,t,i,n,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v;this.m_items=[],this._scalesReady()&&(e=this.m_model.timeScale(),t=this.m_study.priceScale(),null!==(i=e.visibleBarsStrictRange())&&(n=this.m_series.nearestIndex(i.firstBar(),K.NearestRight),o=this.m_series.nearestIndex(i.lastBar(),K.NearestLeft),(r=this.m_study.offset(this.m_plotName))>0?(n-=r,o+=r):(n+=r,o-=r),(s=this.m_study.getMinFirstBarIndexForPlot(this.m_plotName))>o||(n=Math.max(s,n),a=this.m_study.data(),l=this.m_study.firstValue(),c=a.range(n,o),u=this._getTranspValue(),h=N(n,o),d=this.m_model.selection().isSelected(this.m_study),this.m_selectionData=d?{points:[],hittestResult:S.REGULAR,vertOffset:0}:null,(_=(p=this.m_series.properties().style.value())===TradingView.Series.STYLE_LINE?"lineStyle":p===TradingView.Series.STYLE_AREA?"areaStyle":null)?(f=this.m_series.properties()[_].priceSource.value(),m=f):(f="high",m="low"),y=this.m_study.priceScale().isInverted(),g=t.coordinateToPrice(t.height()*t.topMargin(),l),v=t.coordinateToPrice(t.height()*(1-t.bottomMargin()),l),this._topCoord=y?v:g,this._bottomCoord=y?g:v,c.each(function(e,t){var i,n,o,s,a,l,c,p=Math.floor(e+r),_=t[this.m_plotIndex+1];return null!==_&&void 0!==_&&(void 0!==(i=this._createItem(p,_,f,m))&&null!==i?(n=void 0!==t[this._colorer+1]||this._palette&&this._palette.addDefaultColor, this._colorer&&n&&(_=t[this._colorer+1],i.style={},null!=_?(s=this._palette.valToIndex?this._palette.valToIndex[_]:_,o=this._paletterProps.colors[s].color.value(),i.style.color=G.generateColor(o,u)):(o=this.m_study.properties().styles[this.m_plotName].color.value(),i.style.color=G.generateColor(o,100)),a=u>9?u-10:0,i.style.borderColor=G.generateColor(o,a)),l=void 0!==t[this._textColorer+1]||this._textPalette&&this._textPalette.addDefaultColor,this._textColorer&&l&&(_=t[this._textColorer+1],i.style||(i.style={}),null!=_?(s=this._textPalette.valToIndex?this._textPalette.valToIndex[_]:_,c=this._textPaletterProps.colors[s].color.value(),i.style.textColor=G.generateColor(c,u)):(c=this.m_study.properties().styles[this.m_plotName].textColor.value(),i.style.textColor=G.generateColor(c,100))),d&&-1!==h.indexOf(e)&&this.m_selectionData.points.push(i),this.m_items.push(i),!1):void 0)}.bind(this)),this._convertItemsToCoordinates())))},r.prototype._getSeriesVal=function(e,t){var i;e=e||"close",i=null;try{i=this.m_series[e](t)}catch(e){}return i},r.prototype._getTranspValue=function(){var e,t=0;return this.m_study.properties().transparency&&(t=this.m_study.properties().transparency.value(),t=isNumber(t)?t:50),(e=this.m_study.properties().styles[this.m_plotName]).transparency&&(t=e.transparency.value(),t=isNumber(t)?t:50),W(t,0,100)},r.prototype._createItem=function(e,t,i,n){var o,r,s,a=this.m_study.properties().styles[this.m_plotName].location.value();if(!t&&a!==q.Absolute)return null;switch(a){case q.AboveBar:if(void 0===(o=this._getSeriesVal(i,e))||null==o)return null;r=o;break;case q.BelowBar:if(void 0===(s=this._getSeriesVal(n,e))||null==s)return null;r=s;break;case q.Top:r=this._topCoord;break;case q.Bottom:r=this._bottomCoord;break;case q.Absolute:r=t;break;default:throw new Error("Bad value: "+a)}return new p(e,r)},r.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())},r.prototype._calculateVerticalOffset=function(e,t){var i=0;switch(e){case q.AboveBar:case q.Bottom:i=-t;break;case q.BelowBar:case q.Top:i=t}return this.m_study.priceScale().isInverted()&&(i*=-1),i},r.prototype._calculateShapeHeight=function(e,t){var i=e;switch(t){case U.Tiny:i=.3*e;break;case U.Small:i=.6*e;break;case U.Normal:i=e;break;case U.Large:i=1.5*e;break;case U.Huge:i=2*e}return i},r.prototype.renderer=function(){var e,t,i,n,o,r,s,a,l,c;if(this.m_study.properties().styles[this.m_plotName].visible&&this.m_study.properties().styles[this.m_plotName].visible.value()&&this._scalesReady())return e=this.m_model.timeScale(),this.m_invalidated&&(this._updateImpl(),this.m_invalidated=!1),t={},i=this._getTranspValue(),n=e.barSpacing(),o=this._calculateShapeHeight(n),r=this.m_study.properties().styles[this.m_plotName].location.value(),s=this._calculateVerticalOffset(r,o+o/2),t.barSpacing=n,t.items=this.m_items,t.color=G.generateColor(this.m_study.properties().styles[this.m_plotName].color.value(),i), t.height=o,t.vertOffset=s,a=this.m_study.properties().styles[this.m_plotName].plottype.value(),l=H.plotShapesData[a],c=new F,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 w(this.m_selectionData))),c},inherit(s,r),s.prototype.renderer=function(){var e,t,i,n,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S=this.m_study.properties().styles[this.m_plotName];if(S.visible&&S.visible.value()&&this._scalesReady())return e=this.m_model.timeScale(),this.m_invalidated&&(this._updateImpl(),this.m_invalidated=!1),t={},i=this._getTranspValue(),n=e.barSpacing(),S.size?(r=S.size.value(),o=this._calculateShapeHeight(25,r)):o=Math.round(n/2),s=S.location.value(),a=G.generateColor(S.color.value(),i),l=i>19?i-10:0,c=this._calculateVerticalOffset(s,Math.round(1.5*o)),t.barSpacing=n,t.items=this.items(),t.color=a,t.borderColor=G.generateColor(S.color.value(),l),t.height=o,t.vertOffset=c,u=S.plottype.value(),h=H.plotShapesData[u],d=new F,void 0!==(p=S.text?S.text.value():void 0)&&""!==p.trim()&&(_=p.trim().replace(/\\n/gm,"\n"),_=TradingView.cleanButAmpersand(_,!0),f=!1,m=!1,y="Arial",g=12,t.textCache=new R(_,f,m,y,g),v=S.textColor?S.textColor.value():void 0,t.textColor=v?G.generateColor(v,i):a),null!=h&&d.append(new TradingView[h.paneRendererClass](t)),this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&null!==this.m_selectionData&&(this.m_selectionData.vertOffset=c,d.append(new w(this.m_selectionData))),d},inherit(a,s),a.prototype.renderer=function(){var e,t,i,n,o,r,s,a,l,c,u,h,d,p,_,f,m,y=this.m_study.properties().styles[this.m_plotName];if(y.visible&&y.visible.value()&&this._scalesReady())return e=this.m_model.timeScale(),this.m_invalidated&&(this._updateImpl(),this.m_invalidated=!1),t={},i=this._getTranspValue(),n=e.barSpacing(),y.size?(r=y.size.value(),o=this._calculateShapeHeight(50,r)):o=Math.round(n),s=y.location.value(),a=G.generateColor(y.color.value(),i),l=this._calculateVerticalOffset(s,o),t.items=this.items(),t.char=y.char.value(),t.height=o,t.vertOffset=l,t.color=a,c=new F,void 0!==(u=y.text?y.text.value():void 0)&&""!==u.trim()&&(h=u.trim().replace(/\\n/gm,"\n"),h=TradingView.cleanButAmpersand(h,!0),d=!1,p=!1,_="Arial",f=12,t.textCache=new R(h,d,p,_,f),m=y.textColor?y.textColor.value():void 0,t.textColor=m?G.generateColor(m,i):a),c.append(new D(t)),this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&null!==this.m_selectionData&&(this.m_selectionData.vertOffset=l,c.append(new w(this.m_selectionData))),c},inherit(l,r),l.prototype.renderer=function(){var e,t,i,n,o,r,s,a,l;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._updateImpl(),this.m_invalidated=!1),e={},t=W(this._getTranspValue(),0,100),i=this.m_model.timeScale().barSpacing(),e.items=this.m_items,e.barSpacing=i, e.colorup=G.generateColor(this.m_study.properties().styles[this.m_plotName].colorup.value(),t),e.colordown=G.generateColor(this.m_study.properties().styles[this.m_plotName].colordown.value(),t),o=(n=v(e.colorup))?100*(1-n[3]):0,s=(r=v(e.colordown))?100*(1-r[3]):0,e.colorBorderUp=G.generateColor("#000000",o),e.colorBorderDown=G.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(),(a=new F).append(new V(e)),this.m_model.selection().isSelected(this.m_study)&&null!==this.m_selectionData&&((l=this.m_selectionData).barSpacing=i,a.append(new P(l))),a},l.prototype._createItem=function(e,t,i,n){var o,r,s,a;if(0!==t){if(Math.abs(t)>this._maxAbsValue&&(this._maxAbsValue=Math.abs(t)),o=t>0){if(void 0===(s=this._getSeriesVal(n,e))||null==s)return null;r=s}else{if(void 0===(a=this._getSeriesVal(i,e))||null==a)return null;r=a}return new E(e,r,t,o)}},l.prototype._convertItemsToCoordinates=function(){var e,t,i,n,o,r,s,a,l=this.m_model.timeScale(),c=this.m_study.priceScale();for(l.indexesToCoordinates(this.m_items),c.pointsArrayToCoordinates(this.m_items,this.m_study.firstValue()),(e=Math.abs(this.m_study.properties().styles[this.m_plotName].minHeight.value()))>(t=Math.abs(this.m_study.properties().styles[this.m_plotName].maxHeight.value()))&&(i=e,e=t,t=i),n=(t-e)/this._maxAbsValue,o=this.m_items,r=0;ri)&&(t=Math.max(n,t),o=this.m_study.data(),r=this.m_study.firstValue(),s=o.range(t,i),a=0,l=this.m_study.properties().ohlcPlots[this.m_plotName],c={},u=function(e,t){var i=e+"@"+t;return c[i]||(c[i]=G.generateColor(e,t)),c[i]},s.each(function(e,t){var i,n,o,r,s,c,h,d,p,_,v,S,b,w,P;for(e=Math.floor(e),i=!0,n={},o=TradingView.OPEN_PLOT;o<=TradingView.CLOSE_PLOT;++o){if(void 0===(r=t[this._ohlcPlotIndexes[o]+1])||null===r){i=!1;break}n[o]=r}return!!i&&(s=n[TradingView.OPEN_PLOT],c=n[TradingView.CLOSE_PLOT],h=Math.max(s,n[TradingView.HIGH_PLOT],n[TradingView.LOW_PLOT],c),d=Math.min(s,n[TradingView.HIGH_PLOT],n[TradingView.LOW_PLOT],c),(p={}).time=Math.round(e),p.open=s,p.high=h,p.low=d,p.close=c,_=l.color.value(),v=void 0!==t[this._colorer+1]||this._palette&&this._palette.addDefaultColor,this._colorer&&v&&null!=(r=t[this._colorer+1])&&(S=this._palette.valToIndex?this._palette.valToIndex[r]:r,_=this._paletterProps.colors[S].color.value()),p.color=u(_,a),w=(b=f(g(_)))[2]>.25?b[2]-.26:b[2]+.75,P=m(b[0],b[1],w),p.borderColor=u(y(P),a),p.hollow=null,this.m_bars.push(p),!1)}.bind(this)), this.m_study.priceScale().barPricesToCoordinates(this.m_bars,r),this.m_model.timeScale().barIndexesToCoordinates(this.m_bars),this.m_model.selection().isSelected(this.m_study))))for(h=N(t,i),this._selectionData={points:[],hittestResult:S.REGULAR},d=0;d0&&e.stroke(),this._data.fillBackground&&(e.fillStyle=this.getColor(),e.fill()))},e.prototype.hitTest=function(e){var t,i,n,a,l,c,u,h,d;return null===this._data||this._data.points.length<2||this._data.nohittest?null:(i=(t=this._data.points)[0],n=t[1],a=new s.Point(n.x,i.y),l=new s.Point(i.x,n.y),Object(o.distanceToSegment)(i,a,e).distance<=3?this._hitTestResult:Object(o.distanceToSegment)(a,n,e).distance<=3?this._hitTestResult:Object(o.distanceToSegment)(n,l,e).distance<=3?this._hitTestResult:Object(o.distanceToSegment)(l,i,e).distance<=3?this._hitTestResult:this._data.fillBackground&&(c=Math.min(i.x,n.x),u=Math.max(i.x,n.x),h=Math.min(i.y,n.y),d=Math.max(i.y,n.y),i=new s.Point(c,h),n=new s.Point(u,d),Object(r.pointInBox)(e,Object(s.box)(i,n)))?this._backHitTestResult:null)},e.prototype.getColor=function(){var e=Object(l.ensure)(this._data);return Object(a.generateColor)(e.backcolor,e.transparency,this._forceOverrideTransparency)},e}()},InMJ:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolFlatBottom";var s=t||new r("linetoolflatbottom");o.call(this,e,s),this.version=n.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)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages;inherit(n,o),n.version=1,n.prototype.pointsCount=function(){return 3}, n.prototype.title=function(){return"Flat Bottom"},n.prototype.name=function(){return"Flat Bottom"},n.prototype.addPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),o.prototype.addPoint.call(this,e)},n.prototype.setLastPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),o.prototype.setLastPoint.call(this,e)},n.prototype.setPoint=function(e,t,i){if(i&&i.shift()&&1===e){this._snapPoint45Degree(t,this.points()[0])}e<3?o.prototype.setPoint.call(this,e,t):this._points[0].index=t.index},n.prototype.canHasAlert=function(){return!0},n.prototype._getAlertPlots=function(){var e,t,i,n,o,r,s,a,l,c=this._points[0],u=this._points[1],h=[];return c.index<=u.index?(h.push(c),h.push(u)):(h.push(u),h.push(c)),(e=this._points[2]).time=u.time,e.index=u.index,t={price:e.price,time:c.time,index:c.index},i=[],e.index<=t.index?(i.push(e),i.push(t)):(i.push(t),i.push(e)),h[0].price>i[0].price?(n=h,o=i):i[0].price>h[0].price?(n=i,o=h):i[1].price>h[1].price?(n=i,o=h):(n=h,o=i),a=this.properties().extendLeft.value(),l=this.properties().extendRight.value(),c.index<=u.index?(r=a,s=l):(r=l,s=a),[this._linePointsToAlertPlot(n,"Upper",r,s),this._linePointsToAlertPlot(o,"Lower",a,s)]},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return s.LineToolFlatBottomStylesPropertyPage},t.LineToolFlatBottom=n},IzGk:function(e,t,i){"use strict";function n(e){var t=(""+e).match(/(.*)([DWM])/);return t?t[1]+window.t(t[2],{context:"interval_short"}):e}i.r(t),i.d(t,"translatedIntervalString",function(){return n});i("YFKU")},"J+KI":function(e,t,i){"use strict";var n=function(){function e(e){var t=$.Event(r+":"+e);return $(window).trigger(t,{AppClipboard:l}),t}function t(t){var i,n;if((document.activeElement===document.body||document.activeElement===document.documentElement)&&(n=function(e){switch(e){case"c67":case"m67":case"c45":return"copy";case"c86":case"m86":case"s45":return"paste";case"c88":case"m88":case"s46":return"cut"}}(i=function(e){var t=[];return e.shiftKey&&t.push("s"),e.ctrlKey&&t.push("c"),e.metaKey&&t.push("m"),e.altKey&&t.push("a"),t.push(e.keyCode),t.join("")}(t)))){if("keydown"===t.type)s[i]=!0;else if(s[i])return;if(document.getSelection){if(!document.getSelection().isCollapsed)return}else if(document.selection&&"None"!==document.selection.type)return;t.isDefaultPrevented()||e(n).isDefaultPrevented()&&t.preventDefault()}}function i(t){(t=t.originalEvent||t).key===o&&e("change")}function n(){TVLocalStorage.getItem(o)&&(TVLocalStorage.removeItem(o),e("change"))}var o="application-clipboard",r="appclip",s={},a=!1,l={init:function(){a||($(document).on("keypress keydown",t),$(window).on("storage",i),a=!0)},set:function(t){if(null==t)return n();var i=JSON.stringify(t);i!==TVLocalStorage.getItem(o)&&(TVLocalStorage.setItem(o,i),e("change"))},get:function(){try{return JSON.parse(TVLocalStorage.getItem(o))}catch(e){return null}},clear:n, destroy:function(){$(document).off("keypress keydown",t),$(window).off("storage",i),$(window).off(r+":copy"),$(window).off(r+":paste"),$(window).off(r+":cut"),$(window).off(r+":change"),a=!1}};return l}();e.exports=n},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 n});var n=function(e,t){function i(){e.apply(o,n)}var n,o,r=0;return function(){o=this,n=arguments,clearTimeout(r),r=setTimeout(i,t)}}},JT5O:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"StudyMarket",function(){return s}),n=i("aIyQ"),o=i.n(n),r=i("mpWx"),s=function(){function e(e,t){this.visibilityChanged=new o.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=this;return null===this._dialog?this._requestDialog().then(function(){return t.show(e)}):this._dialog.show(e)},e.prototype.hide=function(){null!==this._dialog&&this._dialog.hide()},e.prototype.onCustomScriptModified=function(){null!==this._dialog&&this._dialog.onCustomScriptModified()},e.prototype.resetAllPages=function(){null!==this._dialog&&this._dialog.resetAllPages()},e.prototype.updateFavorites=function(){null!==this._dialog&&this._dialog.updateFavorites()},e.prototype.getDialog=function(){return this._dialog},e.prototype._requestDialog=function(){var e=this,t=function(t,n){Promise.all([i.e(1),i.e("dialogs-core"),i.e(2),i.e(20),i.e(34),i.e(54),i.e(0),i.e("create-dialog"),i.e("study-market")]).then(function(n){var o=i("24k8").StudyMarketDialog;t(new o(e._chartWidgetCollection,e._options))}.bind(null,i)).catch(n)};return null===this._dialogPromise&&(this._dialogPromise=Object(r.retries)(function(){return new Promise(t)},2).then(function(t){e._dialogPromise=null,e._dialog=t,e._dialog.visibilityChanged.subscribe(null,function(t){e.visibilityChanged.fire(t)})})),this._dialogPromise},e}()},JUkB:function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i.d(t,"PaneRendererStepLine",function(){return c}),n=i("VdBB"),o=i("aO4+"),r=i("jFln"),s=i("Y7w9"),a=i("GEp6"),l=i("Zp/P"),c=function(){function e(){this._data=null}return e.prototype.setData=function(e){this._data=e},e.prototype.draw=function(e){var t,i,n,o,s,a,l,c,u,h;if(null!==this._data&&0!==this._data.items.length){for(i=(t=this._data).lineWidth,n=t.lineStyle,o=t.lineColor,s=t.items,e.save(),e.lineCap="square",e.strokeStyle=o,e.lineWidth=i,i%2==0&&e.translate(-.5,-.5),void 0!==n&&Object(r.setLineStyle)(e,n),e.beginPath(),e.moveTo(s[0].x,s[0].y),a=s.length,l=0;l=1?null!=b&&(C=b<=S?t:i):C=y<=S?t:i,void 0!==C))))for(I=0,L=this._items;I=22)return t;for(i={},n=0,o=0;void 0!==(r=t[o]);)s=t[r.id],r.isFake&&(r.id="in_"+n++),i[o]=r,i[r.id]=s,o++;return i}]}var o=i("Eyy1").assert,r=i("lCO3").Version,s=i("uOxu").getLogger("Chart.Study.Versioning"),a=i("Wt0y"),l=i("0YCj"),c=i("TcSq").extractPineId,u=i("Si3H").migrateMetaInfoAndPropState;n.prototype.updateMetaInfo=function(e){var t,i,n;if(!e)return e;for(o(!e.isTVScript,"This method should update only built-in java indicators metaInfo. For Pine indicators use updateMetaInfoAsync"),t=null,i=this._studiesMetainfo,n=0;n=12&&a<=26){for(c={},r=0;r=12&&u<=26)for(h=r.columns,r.columns=[],d=0;do&&s.logWarn("Bad integer input max value in metaInfo id="+e.id+" title="+e.description)},n._fixInputsMaxValue=function(e,t){var i,o,r,s,a,l;if(!TradingView.isAbsent(t)){if(i=n.INPUT_MAX_VALUE,t.inputs)for(o=0;oi&&(r.max=i);if(e&&e.inputs){for(l in a=(s=n.splitInputs(e.inputs)).arr)"integer"===(r=a[l]).type&&r.max&&r.max>i&&(r.max=i);e.inputs=TradingView.merge(s.obj,s.arr)}}},n.prototype.patchPropsStateAndMetaInfo=function(e,t,i){var o,r,s,a,h,d,p,_,f,m,y,g,v,S,b,w,P,x,C;if("Script$BOOKER"!==t.productId||t.alerts||delete e.alerts,n._fixInputsOrder(e,t),n._fixInputsMaxValue(e,t),o=n.splitInputs(e.inputs),e.inputs=o.obj,(r=l.versionOf(t))o&&(o=n);e[o+1]=t},n.splitInputs=function(e){var t,i={},n={};for(t in e)isNumber(parseInt(t,10))?i[t]=e[t]:n[t]=e[t];return{arr:i,obj:n}},n.findInputKeyById=function(e,t){var i,n=null;for(i in e)if(isNumber(parseInt(i,10))&&e[i].id===t){n=i;break}return n},n.getInputKeyById=function(e,t){var i=n.findInputKeyById(e,t);if(!i)throw new Error("Cannot find input with id: "+t);return i},e.exports=n},K8V9:function(e,t){e.exports=''},KEYX:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"CrossHairPriceAxisView",function(){return r}),n=i("mrSG"),o=i("KcY8"),r=function(e){function t(t,i,n){var o=e.call(this)||this;return o._background="#4c525e",o._source=t,o._priceScale=i,o._valueProvider=n,o}return n.__extends(t,e),t.prototype._updateRendererData=function(e,t,i){var n,o,r;e.visible=!1,o=null!==(n=this._priceScale.mainSource())?n.firstValue():null,this._source.visible&&!this._priceScale.isEmpty()&&null!==o&&(i.background=this._background,i.color=this.generateTextColor(this._background),r=this._valueProvider(this._priceScale),i.coordinate=r.coordinate,e.text=this._priceScale.formatPrice(r.price,o),e.visible=!0)},t}(o.a)}, KUek:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,x,C,T;i.r(t),n=i("Eyy1"),o=i("0YCj"),r=i.n(o),s=i("mrSG"),a=i("aIyQ"),l=i.n(a),c=i("k9/m"),u=i("hsV8"),h=i("GVHu"),d=i("w4Ji"),p=i("jenN"),_=i("uOxu"),f=Object(_.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"}(m||(m={})),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"}(y||(y={})),g=function(){function e(e,t,i,n){this._inputs=null,this._status=y.Idle,this._studyId=null,this._turnaroundCounter=1,this._studyStatus={type:m.Undefined},this._studyStatusChanged=new l.a,this._graphics=new p.LiveStudyGraphics,this._dataCleared=new l.a,this._dataUpdated=new l.a,this._boundOnGatewayIsConnectedChanged=this._onGatewayIsConnectedChanged.bind(this),this._gateway=e,this._metaInfo=n,this._series=t,this._turnaroundPrefix=i,this._plots=new c.PlotList(Object(d.studyPlotFunctionMap)(n)),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:m.Undefined}),this._gateway.modifyStudy(this._studyId,this._turnaround(),e,this._onMessage.bind(this)))},e.prototype.isStarted=function(){return this._status!==y.Idle},e.prototype.start=function(){this.isStarted()?f.logNormal("start: data source is already started, nothing to do"):(Object(n.assert)(null!==this._inputs,"Inputs should be defined when starting a study data source"),this._gateway.isConnected().value()?this._createStudy():this._changeStatusTo(y.AwaitingConnection))},e.prototype.stop=function(){this.isStarted()?(null!==this._studyId&&(this._gateway.removeStudy(this._studyId),this._studyId=null,this._onStudyStatusChangedTo({type:m.Undefined})),this._changeStatusTo(y.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.stealData=function(){var e,t;return Object(n.assert)(this._status===y.Idle,"Data source should be stopped when stealing data from it"),e=this._plots,t=this._graphics.extract(),this._plots=new c.PlotList(Object(d.studyPlotFunctionMap)(this._metaInfo)),{ plots:e,graphics:t}},e.prototype.dataCleared=function(){return this._dataCleared},e.prototype.dataUpdated=function(){return this._dataUpdated},e.prototype._changeStatusTo=function(e){Object(n.assert)(this._status!==e,"Source and destination status should be distinct"),f.logNormal("Status changed from "+y[this._status]+" to "+y[e]),this._status=e},e.prototype._createStudy=function(){var e=this._series.seriesId();null!=e?this._createStudyUsingParentId(e):(this._changeStatusTo(y.AwaitingParent),this._series.dataEvents().completed().subscribe(this,this._onSeriesCompleted,!0))},e.prototype._createStudyUsingParentId=function(e){Object(n.assert)(this._status!==y.Active,'Status should not be "Active" when creating a study'),Object(n.assert)(this._studyStatus.type===m.Undefined,'Study status should be "Undefined" when creating a study'),Object(n.assert)(null===this._studyId,"Study id should be empty when creating a study"),this._studyId=h.Study.makeNextStudyId(),this._gateway.createStudy(this._studyId,this._turnaround(),e,this._metaInfo.fullId+"!",this._inputs,this._onMessage.bind(this)),this._changeStatusTo(y.AwaitingFirstDataUpdate)},e.prototype._onGatewayIsConnectedChanged=function(e){e?this._onGatewayConnected():this._onGatewayDisconnected()},e.prototype._onGatewayConnected=function(){this._status===y.AwaitingConnection&&this._createStudy()},e.prototype._onGatewayDisconnected=function(){this._status!==y.Idle&&this._status!==y.AwaitingConnection&&(this._studyId=null,this._changeStatusTo(y.AwaitingConnection),this._studyStatus.type!==m.Undefined&&this._onStudyStatusChangedTo({type:m.Undefined})),this._turnaroundCounter=1},e.prototype._onSeriesCompleted=function(){this._status===y.AwaitingParent&&this._createStudyUsingParentId(Object(n.ensure)(this._series.seriesId()))},e.prototype._onStudyStatusChangedTo=function(e){var t=this._studyStatus;this._studyStatus=e,f.logNormal("Study status type changed from "+m[t.type]+" to "+m[e.type]),this._studyStatusChanged.fire(t,e)},e.prototype._onMessage=function(e){var t,i,n,o,r,s,a,l,c,u,h;"data_update"===e.method?(i=(t=e.params).customId,n=t.turnaround,o=t.plots,r=t.nonseries,i===this._studyId&&this._checkTurnaround(n)&&this._onDataUpdate(o,r)):"study_loading"===e.method?(i=(s=e.params)[0],n=s[1],a=s[2],i===this._studyId&&this._checkTurnaround(n)&&this._onStudyLoading(a)):"study_completed"===e.method?(i=(l=e.params)[0],n=l[1],a=l[2],i===this._studyId&&this._checkTurnaround(n)&&this._onStudyCompleted(a)):"study_error"===e.method&&(i=(c=e.params)[0],n=c[1],u=c[2],h=c[3],a=c[4],i===this._studyId&&this._checkTurnaround(n)&&this._onStudyError(u,h,a))},e.prototype._onDataUpdate=function(e,t){return s.__awaiter(this,void 0,void 0,function(){var i;return s.__generator(this,function(o){switch(o.label){case 0:return[4,Object(u.unpackNonSeriesData)(t.d)];case 1:return i=o.sent(),this._status===y.AwaitingFirstDataUpdate&&(this._changeStatusTo(y.Active),this.clearData()),this._mergePlots(e),null!==i&&(i.indexes_replace?(Object(n.assert)("nochange"!==t.indexes), this._graphics.replaceIndexesTo(t.indexes)):("nochange"!==t.indexes&&this._graphics.replaceIndexesTo(t.indexes),void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),this._dataUpdated.fire(e,i,t.indexes),[2]}})})},e.prototype._onStudyLoading=function(e){this._onStudyStatusChangedTo({type:m.Loading,startTime:Date.now()})},e.prototype._onStudyError=function(e,t,i){this.clearData(),this._onStudyStatusChangedTo({type:m.Error,reason:e})},e.prototype._onStudyCompleted=function(e){this._onStudyStatusChangedTo({type:m.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}(),v=i("kcTO"),S=i("Ocx9"),b=i("Kxc7"),i.d(t,"sessionsPreferencesDefault",function(){return C}),i.d(t,"Sessions",function(){return T}),w="Sessions@tv-basicstudies",P="sessions_",x=new v.PriceFormatter,C={graphics:{backgrounds:{inSession:{color:"#6fa8dc",transparency:60,visible:!1},outOfSession:{color:"#ffe599",transparency:60,visible:!1}},vertlines:{sessBreaks:{color:"#4985e7",style:2,visible:!1,width:1}}}},T=function(){function e(e,t){var i,n=this;this._studySource=null,this._paneViews=[],this._metaInfo=null,this._destroyed=!1,this._isStarted=!1,this._loadedGraphics=null,this._model=e,this._doubleClickHandler=t,i=e.mainSeries(),this._properties=new S.DefaultProperty("sessions"),this._properties.subscribe(this,this.updateAllViews),e.studyMetaInfoRepository().findById(w).then(function(t){n._destroyed||null===n._loadedGraphics&&(n._metaInfo=r.a.findStudyMetaInfo(e.studiesMetaData(),w),n._studySource=new g(e.chartApi(),i,P,n._metaInfo),n._createPaneViews(),n._studySource.dataCleared().subscribe(n,n.updateAllViews),n._studySource.dataUpdated().subscribe(n,n.updateAllViews),n._studySource.setInputs({}),n._isStarted&&n._studySource.start())}),e.timeScale().onReset().subscribe(this,this._clearData),e.timeScale().logicalRangeChanged().subscribe(this,this.updateAllViews)}return e.prototype.start=function(){this._isStarted=!0,null!==this._studySource&&this._studySource.start()},e.prototype.restart=function(){this._clearData(),b.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._properties.unsubscribe(this,this.updateAllViews)},e.prototype.series=function(){return this._model.mainSeries()},e.prototype.priceScale=function(){return this.series().priceScale()},e.prototype.graphics=function(){return this._loadedGraphics||Object(n.ensureNotNull)(this._studySource).graphics()},e.prototype.properties=function(){return this._properties},e.prototype.graphicsInfo=function(){return Object(n.ensureNotNull)(this._metaInfo).graphics},e.prototype.firstValue=function(e){return this._model.mainSeries().firstValue()},e.prototype.formatter=function(){return x},e.prototype.state=function(e){var t={properties:this._properties.state()};return e&&null!==this._metaInfo&&(t.data={graphics:Object(p.saveStudyGraphics)(this.graphics()),metaInfo:this._metaInfo}),t},e.prototype.restoreState=function(e,t){this._properties.mergeAndFire(e.properties),void 0!==e.data&&t&&(this._loadedGraphics=Object(p.loadStudyGraphics)(e.data.graphics),this._metaInfo=e.data.metaInfo,this._createPaneViews())},e.prototype.restoreOldState=function(e,t){var i={graphics:e.state.graphics},n={properties:i};void 0!==e.data&&void 0!==e.metaInfo&&t&&(n.data={metaInfo:e.metaInfo,graphics:e.data.graphics}),this.restoreState(n,t)},e.prototype.applyPreferences=function(e){this._properties.mergeAndFire(e)},e.prototype._clearData=function(){null!==this._studySource&&this._studySource.clearData()},e.prototype._createPaneViews=function(){var e=this,t={mouseDoubleClickHandler:this._doubleClickHandler};Object(p.createGraphicsPaneViews)(this,this._model,t).then(function(t){e._paneViews=t,e._model.lightUpdate()})},e}()},"KVq+":function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"TimePoints",function(){return r}),n=i("uOxu"),o=Object(n.getLogger)("Chart.TimePoints"),r=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){var n,r,s,a,l,c,u,h;if(0===i.length)return o.logError("merge: 'values' does not contain any time points"),[];if(t>this._zoffset&&e+t>0)return o.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)}];if((n=e+this._zoffset)<0){if(r=Math.abs(n),i.lengththis._items.length)for(r=c-this._items.length,u=l;uthis._items[this._items.length-1])return t?this._validOffsetToIndex(this._items.length-1):null;for(var i=0;ia?(h=e-a)<500&&null!=t?t(c,h):c+h*u:null)},e.prototype.roughIndex=function(e,t){var i,n,o,r,s,a,l,c,u,h,d,p;return void 0===t&&(t=null),!(i=this._items).length||i.length<2?null:(n=0,o=i.length-1,r=this._validOffsetToIndex(n),s=this._validOffsetToIndex(o),a=i[n],l=i[o],e>=a&&e<=l?this.closestIndexLeft(e):(c=(l-a)/(s-r),el?(u=e-l,(h=Math.trunc(u/c))=s[t=s.length-1])return this._validOffsetToIndex(t);if(e<(n=s[i=0]))return null;if(e===n)return this._validOffsetToIndex(i);for(;t>i+1;)if((r=s[o=i+t>>1])>e)t=o;else{if(!(r=60&&!(e%60)}var r,s,a,l,c,u;i.r(t),i.d(t,"ResolutionKind",function(){return a}),i.d(t,"Interval",function(){return u}),i.d(t,"isHour",function(){return o}),r=/^(\d*)([SHDWMR])$/,s=/^(\d+)$/,function(e){e.Seconds="seconds",e.Minutes="minutes",e.Hours="hours",e.Days="days",e.Weeks="weeks",e.Months="months",e.Range="range",e.Invalid="invalid"}(a||(a={})),(l={})[a.Seconds]=1e3,l[a.Minutes]=60*l[a.Seconds],l[a.Hours]=60*l[a.Minutes],l[a.Days]=24*l[a.Hours],l[a.Weeks]=7*l[a.Days],c={S:a.Seconds,H:a.Hours,D:a.Days,W:a.Weeks,M:a.Months,R:a.Range},u=function(){function e(t,i){if(this._kind=a.Invalid,void 0===i&&t!==a.Invalid)return e.parse(t);this._kind=this._validateResolutionKind(t),this._multiplier=this._kind!==a.Invalid?i:void 0,0===this._multiplier&&(this._kind=a.Invalid,this._multiplier=void 0)}return e.prototype.kind=function(){return this._kind},e.prototype.multiplier=function(){return this._multiplier},e.prototype.isValid=function(){return this.kind()!==a.Invalid},e.prototype.isDWM=function(){return this.isValid()&&!this.isRange()&&!this.isIntraday()},e.prototype.isIntraday=function(){var e=-1!==[a.Seconds,a.Minutes,a.Hours].indexOf(this.kind());return this.isValid()&&!this.isRange()&&e},e.prototype.isSeconds=function(){return this.kind()===a.Seconds},e.prototype.isMinutes=function(){return this.kind()===a.Minutes},e.prototype.isHours=function(){return this.kind()===a.Hours},e.prototype.isDays=function(){return this.kind()===a.Days},e.prototype.isWeeks=function(){return this.kind()===a.Weeks},e.prototype.isMonths=function(){return this.kind()===a.Months},e.prototype.isRange=function(){return this.kind()===a.Range},e.prototype.isTimeBased=function(){return!this.isRange()},e.prototype.letter=function(){return this.isValid()&&this.kind()!==a.Minutes?this.kind()[0].toUpperCase():""},e.prototype.value=function(){return this.isValid()?this.kind()===a.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){var t,i;return void 0===e&&(e=Date.now()), !this.isValid()||this.isRange()?NaN:this.isMonths()?((t=new Date(e)).setUTCMonth(t.getUTCMonth()+(this.multiplier()||1)),+t-e):void 0===(i=this.multiplier())?NaN:l[this.kind()]*i},e.prototype.tryConvertToHighestKind=function(){var t=this.kind(),i=this.multiplier();return t===a.Minutes&&i&&o(i)?new e(a.Hours,i/60):new e(this.kind(),this.multiplier())},e.isEqual=function(t,i){return e.parse(t).isEqualTo(e.parse(i))},e.parse=function(t){t=(t+"").toUpperCase().split(",")[0];var i=r.exec(t);return null!==i?new e(c[i[2]],n(i[1])):null!==(i=s.exec(t))?new e(a.Minutes,n(i[1])):new e(a.Invalid)},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.isHours=function(t){return e.parse(t).isHours()},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=new e(t);return i.isValid()?i.value():null},e.prototype._validateResolutionKind=function(e){return e!==a.Seconds&&e!==a.Minutes&&e!==a.Hours&&e!==a.Days&&e!==a.Weeks&&e!==a.Months&&e!==a.Range&&e!==a.Invalid?a.Invalid:e},e}()},"M7/j":function(e,t,i){"use strict";function n(e){var t,i;if(0===e.length)return!1;if(-1===(t=e.findIndex(function(e){return Object(l.coordinateIsValid)(e.y)})))return!1;for(i=e.length-1;i>t&&!Object(l.coordinateIsValid)(e[i].y);)i--;return!(t>=i)}function o(e,t){var i,n,o,a,c,u=[],h=[],d=null;for(i=0;i=t&&h.push(n),d=n;else{if(null===d)continue;n=d}Object(l.coordinateIsValid)(o.y)&&((n.y>t&&o.yt)&&(Math.abs(n.x-o.x)<1?(a=new r.Point(n.x,t),u.push(a),h.push(a)):null!==(c=Object(s.intersectLineSegments)(n,o,new r.Point(n.x,t),new r.Point(o.x,t)))&&(a=n.add(o.subtract(n).scaled(c)),u.push(a),h.push(a))))}return{topItems:u,bottomItems:h}}var r,s,a,l,c,u,h;i.r(t),i.d(t,"itemsRangeIsValid",function(){return n}),i.d(t,"splitItems",function(){return o}),i.d(t,"PaneRendererBaseline",function(){return h}),r=i("aO4+"),s=i("hBTJ"),a=i("GEp6"),l=i("Zp/P"),c=i("Y7w9"),u=i("VdBB"),h=function(){function e(){this._data=null}return e.prototype.setData=function(e){this._data=e},e.prototype.draw=function(e){var t,i,r,s,a,l,c,u,h,d,p,_,f,m,y;null!==this._data&&(i=(t=this._data).items,r=t.baseLevelCoordinate,s=t.bottom,a=t.bottomFillColor1,l=t.bottomFillColor2,c=t.topFillColor1,u=t.topFillColor2,h=t.topLineColor,d=t.bottomLineColor,p=t.topLineWidth,_=t.bottomLineWidth,n(i)&&(m=(f=o(i,r)).topItems,y=f.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,c,u,r-s,r),e.fill(),e.beginPath(),this._makeLine(e,m,!1,0),e.lineWidth=p,e.strokeStyle=h,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,a,l,r,r+s),e.fill(),e.beginPath(),this._makeLine(e,y,!1,1),e.lineWidth=_,e.strokeStyle=d,e.stroke())))},e.prototype.hitTest=function(e){var t,i,n,o,s,h,d,p,_,f,m;if(null===this._data)return null;for(i=(t=this._data).items,n=t.topLineWidth,o=t.bottomLineWidth,s=Object(l.selectionTolerance)((n+o)/2),h=Object(c.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),_=d;_<=p;++_)if(f=i[_-1],m=i[_],Object(a.distanceToSegment)(new r.Point(f.x,f.y),new r.Point(m.x,m.y),new r.Point(e.x,e.y)).distance<=s)return new u.HitTestResult(u.HitTestResult.REGULAR);return null},e.prototype._makeLine=function(e,t,i,n){var o,r,s,a,c,u,h,d,p,_;if(null!==this._data&&-1!==(o=t.findIndex(function(e){return Object(l.coordinateIsValid)(e.y)})))for(s=(r=this._data).barSpacing,a=r.baseLevelCoordinate,c=.25*s,h=t.length,d=o;d=a&&p.y>=a){e.moveTo(p.x,p.y);continue}}else if(u&&u.y<=a&&p.y<=a){e.moveTo(p.x,p.y);continue}if(u&&Object(l.coordinateIsValid)(u.y))e.lineTo(p.x,p.y),i&&!Object(l.coordinateIsValid)(_.y)&&e.lineTo(p.x,a);else if(_&&Object(l.coordinateIsValid)(_.y))i?(d!==o&&e.lineTo(p.x,a),e.lineTo(p.x,p.y)):e.moveTo(p.x,p.y);else if(i){if(0===d)continue;d!==o&&e.lineTo(p.x-c,a),e.lineTo(p.x-c,p.y),e.lineTo(p.x+c,p.y),e.lineTo(p.x+c,a)}else e.moveTo(p.x-c,p.y),e.lineTo(p.x+c,p.y);u=p}},e.prototype._makeLinearGradient=function(e,t,i,n,o){var r=e.createLinearGradient(0,n,0,o);return r.addColorStop(0,t),r.addColorStop(1,i),r},e}()},MA5A:function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i.d(t,"LineToolCrossLine",function(){return c}),n=i("mrSG"),o=i("Ocx9"),r=i("p1SQ"),s=i("GmZZ"),a=i("Ss5c"),l=i("hayr"),(c=function(e){function t(t,n){var a=e.call(this,t,n||new o.DefaultProperty("linetoolcrossline"))||this;return a._constructor="LineToolCrossLine",a._priceAxisView=new r.LineToolHorzLinePriceAxisView(a),a._timeAxisView=new s.LineToolVertLineTimeAxisView(a,t),i.e("lt-pane-views").then(function(e){var t=i("amUF").CrossLinePaneView;a._setPaneViews([new t(a,a._model)])}.bind(null,i)).catch(i.oe),a}return n.__extends(t,e),t.prototype.pointsCount=function(){return 1},t.prototype.title=function(){return"Cross Line"},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}(a.LineDataSource)).prototype.superclass=a.LineDataSource},MROS:function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"ModelSelection",function(){return o}),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(),this._items.push(e),this._set.add(e)},e.prototype.isSelected=function(e){return this._set.has(e)},e.prototype.sources=function(){return this._items.slice(0)},e.prototype.checkLineToolSelection=function(){this._items.forEach(function(e){return Object(n.isLineTool)(e)&&e.calcIsActualSymbol()}),this._items=this._items.filter(function(e){return!Object(n.isLineTool)(e)||e.isActualSymbol()})},e.prototype.remove=function(e){this._items=this._items.filter(function(t){return t!==e}),this._set.delete(e)},e.prototype.clear=function(){this._items=[],this._set.clear()},e.prototype.notFixedSources=function(){return this._items.filter(function(e){return!Object(n.isLineTool)(e)||!e.isFixed()})},e}()},MWAT:function(e,t,i){"use strict";function n(e){var t=Object(s.ensureDefined)(p.find(function(t){return t.name===e}));return new t.ctor(t)}function o(){return p}var r,s,a,l,c,u,h,d,p;i.r(t),i.d(t,"PriceScaleSelectionStrategyEvenly",function(){return u}),i.d(t,"PriceScaleSelectionStrategyAllRight",function(){return h}),i.d(t,"PriceScaleSelectionStrategyAllLeft",function(){return d}),i.d(t,"createPriceScaleSelectionStrategy",function(){return n}),i.d(t,"allPriceScaleSelectionStrategyInfo",function(){return o}),r=i("mrSG"),s=i("Eyy1"),a=i("GVHu"),l=i("3ClC"),u=function(e){function t(t){return e.call(this,t)||this}return r.__extends(t,e),t.prototype.apply=function(e){var t,i;for(e.containsMainSeries()&&(t=Object(s.ensureNotNull)(Object(s.ensureNotNull)(e.mainDataSource()).priceScale()),e.movePriceScale(t,"right",0)),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().lengtht&&this._priceScaleIsPrice(e.rightPriceScales()[t],i))return e.rightPriceScales()[t];if(e.leftPriceScales().length>t&&this._priceScaleIsPrice(e.leftPriceScales()[t],i))return e.leftPriceScales()[t]}return null},e.prototype._targetPriceScaleIndex=function(e,t){if(e.mainSource()===t.mainSeries())return 0},e.prototype._tryToGetDesiredPriceScale=function(e,t,i,n){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!==n?Object(s.ensureNotNull)(n.priceScale()):e.isMainPane()?Object(s.ensureNotNull)(Object(s.ensureNotNull)(e.mainDataSource()).priceScale()):this.createNewPriceScaleIfPossible(e);case"overlay":return e.createPriceScaleAtPosition("overlay")}},e}()),h=function(e){function t(t){return e.call(this,t)||this}return r.__extends(t,e),t.prototype.apply=function(e){var t=this,i=e.model();e.leftPriceScales().slice(0).forEach(function(n){return e.movePriceScale(n,"right",t._targetPriceScaleIndex(n,i))})},t.prototype.createNewPriceScaleIfPossible=function(e){return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("right"):e.createPriceScaleAtPosition("overlay")},t}(c),d=function(e){function t(t){return e.call(this,t)||this}return r.__extends(t,e),t.prototype.apply=function(e){var t=this,i=e.model();e.rightPriceScales().slice(0).forEach(function(n){return e.movePriceScale(n,"left",t._targetPriceScaleIndex(n,i))})},t.prototype.createNewPriceScaleIfPossible=function(e){ return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("left"):e.createPriceScaleAtPosition("overlay")},t}(c),p=[{name:"left",title:window.t("Stack On The Left"),ctor:d},{name:"right",title:window.t("Stack On The Right"),ctor:h},{name:"auto",title:window.t("Auto"),ctor:u}]},MXV9:function(e,t){e.exports=''},MY2c:function(e,t,i){"use strict";var n,o,r,s,a,l;i.r(t),i.d(t,"UndoStack",function(){return l}),n=i("RDU5"),o=i("aIyQ"),r=i.n(o),s=i("uOxu"),a=Object(s.getLogger)("Common.UndoStack"),l=function(){function e(){this._commands=[],this._onChange=new r.a}return e.prototype.onChange=function(){return this._onChange},e.prototype.isEmpty=function(){return 0===this._commands.length},e.prototype.clear=function(){this._commands.length=0,this._onChange.fire()},e.prototype.push=function(e){if(!(e instanceof n.UndoCommand))throw new TypeError("argument must be an instance of UndoCommand");this._commands.push(e),this._onChange.fire()},e.prototype.pop=function(){if(!this.isEmpty()){var e=this._commands.pop();return this._onChange.fire(),e}a.logDebug("pop: undo stack is empty")},e.prototype.head=function(){if(!this.isEmpty())return this._commands[this._commands.length-1]},e}()},MbIA:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"DateTimeFormatter",function(){return s}),n=i("4kQX"),o=i("gQ5K"),r={dateFormat:"yyyy-MM-dd",timeFormat:"%h:%m:%s",dateTimeSeparator:" "},s=function(){function e(e){void 0===e&&(e={});var t=Object.assign({},r,e);this._dateFormatter=new o.DateFormatter(t.dateFormat),this._timeFormatter=new n.TimeFormatter(t.timeFormat),this._separator=t.dateTimeSeparator}return e.prototype.format=function(e){return""+this._dateFormatter.format(e)+this._separator+this._timeFormatter.format(e)},e.prototype.formatLocal=function(e){return""+this._dateFormatter.formatLocal(e)+this._separator+this._timeFormatter.formatLocal(e)},e}()},MrEN:function(e,t,i){"use strict";(function(t){var n=i("ufy5"),o=i("LxhU").Interval,r=i("aIyQ"),s=i("Kxc7"),a=function(e,t){this._server=e,this._session=t,this._timezone=null,this._timezoneId="",this._isDWM=!1,this._resolution=null, this.seriesCompleted=new r,this.seriesError=new r,this._lastBarTimes={}};a.prototype.lastBarTime=function(e){return this._lastBarTimes[e]},a.prototype._userTimezone=function(){return this._timezone},a.prototype.setTimezone=function(e){this._timezone="exchange"===e?"exchange":t.get_timezone(e),this._timezoneId=e},a.prototype.timezone=function(){return this._timezoneId},a.prototype.setResolution=function(e){this._isDWM=o.isDWM(e),this._resolution=e},a.prototype.onRequestMetadata=function(e,t){this._server.receiveLocalResponse({method:"studies_metadata",params:[this._session,e,{errors:[],hash:"",metainfo:t,migrations:[]}]})},a.prototype.onSymbolResolved=function(e,t){this._server.receiveLocalResponse({method:"symbol_resolved",params:[this._session,e,t]})},a.prototype.onSymbolError=function(e,t){this._server.receiveLocalResponse({method:"symbol_error",params:[this._session,e,t]})},a.prototype.onStudyError=function(e,t,i){this._server.receiveLocalResponse({method:"study_error",params:[this._session,e,t,i]})},a.prototype.onSeriesLoading=function(e,t){this._server.receiveLocalResponse({method:"series_loading",params:[this._session,e,t]})},a.prototype.onSeriesCompleted=function(e,t,i){this._server.receiveLocalResponse({method:"series_completed",params:[this._session,e,i,t]}),this.seriesCompleted.fire(e,t)},a.prototype.onSeriesError=function(e,t){this._server.receiveLocalResponse({method:"series_error",params:[this._session,e,t]}),this.seriesError.fire(e,t)},a.prototype.onSeriesClearData=function(e,t){var i={};i[e]={series:[],turnaround:t},this._server.receiveLocalResponse({method:"timescale_update",params:[this._session,i,{index:0,zoffset:0,changes:[],marks:[],index_diff:[]}]})},a.prototype.onStudyCompleted=function(e,t){this._server.receiveLocalResponse({method:"study_completed",params:[this._session,e,t]})},a.prototype.onStudyLoading=function(e,t){this._server.receiveLocalResponse({method:"study_loading",params:[this._session,e,t]})},a.prototype._calcMarksTime=function(e,i,o,r,a){var l,c,u,h,d,p=t.get_timezone(i),_=this;if(this._isDWM&&!s.enabled("disable_resolution_rebuild"))for((d=new n.Session).init(p,o),h=0;h=0;--s)if(Math.floor(o/l[s].divisor)!==Math.floor(r/l[s].divisor))return l[s].span},TradingView.ChartapiMessagerInstances=[],e.exports=a}).call(this,i("jCNj"))},"N+BX":function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolBezierCubic";var n=t||new r("linetoolbeziercubic");o.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)} var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages;inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return"Double Curve"},n.prototype.name=function(){return"Double Curve"},n.prototype.controlPoints=function(){var e=this.pointToScreenPoint(this.points()[0])[0],t=this.pointToScreenPoint(this.points()[1])[0],i=t.subtract(e).scaled(.5),n=i.transposed().scaled(.3),o=e.add(t).scaled(.33),r=e.add(t).scaled(.67),s=o.add(n),a=r.subtract(n);return[this.screenPointToPoint(s),this.screenPointToPoint(a)]},n.prototype.setLastPoint=function(e,t){o.prototype.setLastPoint.call(this,e,t),this._controlPoints=this.controlPoints()},n.prototype.addPoint=function(e,t,i){var n,r=o.prototype.addPoint.call(this,e,t,!0);return r&&(n=this.controlPoints(),delete this._controlPoints,this._points.push(n[0]),this._points.push(n[1]),i||(this.normalizePoints(),this.createServerPoints()),this._createPointProperty(2),this._createPointProperty(3)),r},n.prototype.restorePoints=function(e,t,i){o.prototype.restorePoints.call(this,e,t,i),this._createPointProperty(2),this._createPointProperty(3)},n.prototype.getStylesPropertyPage=function(){return s.LineToolBezierStylesPropertyPage},t.LineToolBezierCubic=n},N1UO:function(e,t,i){"use strict";var n,o,r,s,a,l;i.r(t),i.d(t,"StudyApi",function(){return l}),n=i("mrSG"),i("YFKU"),o=i("Eyy1"),r=i("9iCb"),s=i("HGup"),a=i("jRfx"),l=function(){function e(e,t){this._study=e,this._model=t}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 n.__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){var t,i,n=this.getInputValues(),o=function(e){void 0!==n.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;for(t=0,i=e;ti&&(e.moveTo(1.5,i),e.lineTo(1.5,n),e.moveTo(this._data.width-1.5,i),e.lineTo(this._data.width-1.5,n))},n.prototype.draw=function(e){var t,i,n,o;e.translate(this._data.x-this._data.width/2,this._data.y-this._data.height/2),t="rgba(153,153,153,.3)",i="rgba(153,153,153,.7)",n="#777",o="rgba(255,255,255,.7)",e.strokeStyle=t,e.lineWidth=2,e.beginPath(),this._drawShackle(e),e.stroke(),e.closePath(),e.strokeStyle=i,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=n,e.beginPath(),this._drawShackle(e),e.stroke(),e.closePath(),e.fillStyle=o,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=n,e.fillRect(this._data.width/2-.5,this._data.height-this._data.bodyHeight/2,1,2)},t.PaneRendererCrossHairLock=TradingView.PaneRendererCrossHairLock=n},NAul:function(e,t,i){"use strict";function n(e,t){return t-o(e,t)}function o(e,t){var i=new Date(t);return function(e,t){var i=t.multiplier()||0;switch(t.kind()){case a.ResolutionKind.Months:!function(e,t){r(e,Math.floor(t/12));var i=e.getUTCMonth()-t%12;i<0&&(r(e,1),i+=12);e.setUTCMonth(i);for(;e.getUTCMonth()!==i;)s(e,1)}(e,i);break;case a.ResolutionKind.Weeks:!function(e,t){s(e,7*t)}(e,i);break;case a.ResolutionKind.Days:s(e,i);break;default:throw new Error("Unsupported resolution type")}}(i,e),i.getTime()}function r(e,t){var i=e.getUTCMonth();e.setUTCFullYear(e.getUTCFullYear()-t),e.getUTCMonth()!==i&&s(e,1)}function s(e,t){e.setTime(e.getTime()-864e5*t)}i.r(t),i.d(t,"periodBackInMsecs",function(){return n}),i.d(t,"subtractPeriod",function(){return o});var a=i("LxhU")},NJRZ:function(e,t,i){"use strict";function n(e,t){this._constructor="LineTool5PointsPattern";var n=t||new r("linetool5pointspattern");o.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("6MfG").Pattern5PaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages;inherit(n,o),n.prototype.pointsCount=function(){return 5},n.prototype.title=function(){return"XABCD Pattern"},n.prototype.name=function(){ return"XABCD Pattern"},n.prototype.getStylesPropertyPage=function(){return s.LineToolLineTool5PointsPatternStylesPropertyPage},t.LineTool5PointsPattern=n},NhkU:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolPitchfan";var n=t||this.createPropertiesObject("linetoolpitchfan");o.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)}var o=i("Ss5c").LineDataSource,r=i("5rJj"),s=i("hayr").propertyPages;inherit(n,o),n.prototype.pointsCount=function(){return 3},n.prototype.title=function(){return"Pitchfan"},n.prototype.name=function(){return"Pitchfan"},n.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},n.prototype.createPropertiesObject=function(e,t,i){return new r(e,t,i,{range:[0,8]})},n.prototype.getStylesPropertyPage=function(){return s.LineToolPitchfanStylesPropertyPage},t.LineToolPitchfan=n},NsVT:function(e,t,i){"use strict";function n(e,t){var i,n,o,r,s,a,l=0;for(i=0,n=t;i0&&s.push({min:o,max:r});return s.sort(function(e,t){return e.min-t.min||e.max-t.max}),s}function r(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}function s(e){var t=u.enabled("side_toolbar_in_fullscreen_mode");return"center"===e||"left"===e&&t}var a,l,c,u,h,d;i.r(t),i("P5fv"),a=i("hY0g"),l=i.n(a),c=i("HySD"),u=i("Kxc7"),i.d(t,"ChartPage",function(){return d}),h=u.enabled("no_min_chart_width"),d=function(){function e(e){var t=this;if(this._$body=$(e.body.value()),0===this._$body.size())throw new Error("bridge.body.value() must be an element or not empty jQuery object");this._availableAreas=["left","tradingpanel","right","top","bottom","center"],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,i,n=this,s=e&&e.areaName;if(-1===this._availableAreas.indexOf(s))throw new Error("unknown options.areaName");return this.free(s),t=this._createDOM(s),(i={canNegotiate:{width:"left"===s||"right"===s||"tradingpanel"===s,height:"top"===s||"bottom"===s},negotiations:{width:[],height:[]},remove:function(){for(var e in n._areas)n._areas[e]===i&&n.free(e)},negotiateWidth:function(e){if(i.canNegotiate.width){var t=o(e);r(i.negotiations.width,t)||(i.negotiations.width=t,n.recalculate())}}, negotiateHeight:function(e){if(i.canNegotiate.height){var t=o(e);r(i.negotiations.height,t)||(i.negotiations.height=t,n.recalculate())}},requestFullscreen:function(){n._fullscreenArea||("right"!==s&&"center"!==s||(n._fullscreenArea=s),"center"===s&&n._bridge.requestFullscreen(),n._updateFullscreen())},exitFullscreen:function(){s===n._fullscreenArea&&(n._fullscreenArea=void 0,"center"===s&&n._bridge.exitFullscreen(),n._updateFullscreen())},width:new l.a,height:new l.a,availWidth:new l.a,availHeight:new l.a,alive:new l.a(!0),body:new l.a(t),visible:new l.a(!0),fullscreen:new l.a(!0),rdState:new c.ResizerDetacherState}).rdState.pushOwner(i),this._areas[s]=i,i.rdState.owner.subscribe(function(e){var t,o,r,a=i.body.value();if(e!==i)a.empty().detach();else{for(t=null,o=n._availableAreas.indexOf(s);o--;)if(r=n._availableAreas[o],n._affectsLayout(r)){t=n._areas[r].body.value();break}t?a.insertAfter(t):a.appendTo(n._$body)}n.recalculate()},{callWithLast:!0}),i.rdState.bridge()},e.prototype.free=function(e){var t=this._areas[e];t&&(this._areas[e]=void 0,$(t.body.value()).remove(),t.alive.setValue(!1))},e.prototype.recalculate=function(){var e,t,i,o,r,s,a,l,c,u,d,p,_,f={};for(this._recalcSingleRunToken=f,e={width:this._width.value(),height:this._height.value()},t=0,i=0;i").addClass("layout__area--"+e).css("position","absolute");return"bottom"===e?t.css("bottom",0):t.css("top",0),"right"===e||"tradingpanel"===e?t.css("right",0):t.css("left",0),t},e}()},Nu4p:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"plotShapesData",function(){return n}),i("YFKU"),n={shape_arrow_down:{guiName:window.t("Arrow Down"),id:"shape_arrow_down",paneRendererClass:"PaneRendererArrowDown",pineName:"shape.arrowdown",icon:"arrow_down"},shape_arrow_up:{guiName:window.t("Arrow Up"),id:"shape_arrow_up",paneRendererClass:"PaneRendererArrowUp",pineName:"shape.arrowup",icon:"arrow_up"},shape_circle:{guiName:window.t("Circle"),id:"shape_circle",paneRendererClass:"PaneRendererCircleShape",pineName:"shape.circle",icon:"circle"},shape_cross:{guiName:window.t("Cross"),id:"shape_cross",paneRendererClass:"PaneRendererCrossShape",pineName:"shape.cross",icon:"cross"},shape_diamond:{guiName:window.t("Diamond"),id:"shape_diamond",paneRendererClass:"PaneRendererDiamond",pineName:"shape.diamond",icon:"diamond"},shape_flag:{guiName:window.t("Flag"),id:"shape_flag",paneRendererClass:"PaneRendererFlagShape",pineName:"shape.flag",icon:"flag"},shape_label_down:{guiName:window.t("Label Down"),id:"shape_label_down",paneRendererClass:"PaneRendererLabelDown",pineName:"shape.labeldown",icon:"label_down"},shape_label_up:{guiName:window.t("Label Up"),id:"shape_label_up",paneRendererClass:"PaneRendererLabelUp",pineName:"shape.labelup",icon:"label_up"},shape_square:{guiName:window.t("Square"),id:"shape_square",paneRendererClass:"PaneRendererSquare",pineName:"shape.square",icon:"square"},shape_triangle_down:{guiName:window.t("Triangle Down"),id:"shape_triangle_down",paneRendererClass:"PaneRendererTriangleApexDown",pineName:"shape.triangledown",icon:"triangle_down"},shape_triangle_up:{guiName:window.t("Triangle Up"),id:"shape_triangle_up",paneRendererClass:"PaneRendererTriangleApexUp",pineName:"shape.triangleup",icon:"triangle_up"},shape_xcross:{guiName:window.t("X Cross"),id:"shape_xcross",paneRendererClass:"PaneRendererXCross",pineName:"shape.xcross",icon:"x_cross"}}},OH2X:function(e,t,i){"use strict";for(var n={LineToolFibRetracement:i("t2ex").LineToolFibRetracement,LineToolFibChannel:i("xnA2").LineToolFibChannel,LineToolFibSpeedResistanceArcs:i("Yjuu").LineToolFibSpeedResistanceArcs,LineToolProjection:i("68at").LineToolProjection,LineToolTrendBasedFibExtension:i("ZtA1").LineToolTrendBasedFibExtension,LineToolElliott:i("xz+e").LineToolElliott,LineToolFibCircles:i("4bfY").LineToolFibCircles,LineToolTrading:i("QIuV"), LineToolVertLine:i("n40Z").LineToolVertLine,LineToolCrossLine:i("MA5A").LineToolCrossLine,LineToolBarsPattern:i("2bPF").LineToolBarsPattern,LineToolTrendBasedFibTime:i("yUly").LineToolTrendBasedFibTime,LineToolFibTimeZone:i("FsE7").LineToolFibTimeZone,LineToolCircleLines:i("tG6Q").LineToolCircleLines,LineToolDateRange:i("WkYF").LineToolDateRange,LineToolPriceRange:i("RDDl").LineToolPriceRange,LineToolDateAndPriceRange:i("UCMi").LineToolDateAndPriceRange,LineToolParallelChannel:i("qcGP").LineToolParallelChannel,LineToolTrendAngle:i("nW7S").LineToolTrendAngle,LineToolTrendLine:i("WPQD").LineToolTrendLine,LineToolInfoLine:i("yi8X").LineToolInfoLine,LineToolArrowMark:i("TohL").LineToolArrowMark,LineToolExecution:i("704P").LineToolExecution,LineToolPitchfan:i("NhkU").LineToolPitchfan,LineToolGannSquare:i("Z0Sh").LineToolGannSquare,LineToolFibSpeedResistanceFan:i("zZ5f").LineToolFibSpeedResistanceFan,LineToolGannComplex:i("nd9+").LineToolGannComplex,LineToolGannFixed:i("TBaH").LineToolGannFixed,LineToolGannFan:i("4u8j").LineToolGannFan,LineToolFibWedge:i("9QkW").LineToolFibWedge,LineToolPitchfork:i("aDyP").LineToolPitchfork,LineToolDisjointAngle:i("0xda").LineToolDisjointAngle,LineToolFlatBottom:i("InMJ").LineToolFlatBottom,LineToolIcon:i("icPo").LineToolIcon,LineToolRotatedRectangle:i("Az04").LineToolRotatedRectangle,LineToolFibSpiral:i("i80N").LineToolFibSpiral,LineToolHeadAndShoulders:i("aILO").LineToolHeadAndShoulders,LineToolTriangle:i("isVH").LineToolTriangle,LineToolTrianglePattern:i("lNN+").LineToolTrianglePattern,LineTool5PointsPattern:i("NJRZ").LineTool5PointsPattern,LineToolThreeDrivers:i("PYn8").LineToolThreeDrivers,LineToolABCD:i("pKDv").LineToolABCD,LineToolRiskReward:i("tDUI").LineToolRiskReward,LineToolPolyline:i("hP9j").LineToolPolyline,LineToolPrediction:i("Wh6B").LineToolPrediction,LineToolPriceLabel:i("zqZp").LineToolPriceLabel,LineToolNote:i("gLxC").LineToolNote,LineToolNoteAbsolute:i("gLxC").LineToolNoteAbsolute,LineToolBrush:i("+hLl").LineToolBrush,LineToolArc:i("0Pxc").LineToolArc,LineToolCallout:i("odCa").LineToolCallout,LineToolBalloon:i("me8f").LineToolBalloon,LineToolText:i("V3Oj").LineToolText,LineToolHorzLine:i("/DxK").LineToolHorzLine,LineToolHorzRay:i("CJIV").LineToolHorzRay,LineToolRectangle:i("7qI1").LineToolRectangle,LineToolEllipse:i("V086").LineToolEllipse,LineToolTimeCycles:i("kIXa").LineToolTimeCycles,LineToolSineLine:i("bv/X").LineToolSineLine,LineToolGhostFeed:i("XUCF").LineToolGhostFeed,LineToolBezierQuadro:i("Xyly").LineToolBezierQuadro,LineToolBezierCubic:i("N+BX").LineToolBezierCubic,LineToolArrow:i("QQu0").LineToolArrow,LineToolRay:i("5ZUI").LineToolRay,LineToolExtended:i("CHw2").LineToolExtended,LineToolSchiffPitchfork:i("v5F8").LineToolSchiffPitchfork,LineToolSchiffPitchfork2:i("XFad").LineToolSchiffPitchfork2,LineToolInsidePitchfork:i("EqoR").LineToolInsidePitchfork,LineToolTextAbsolute:i("V3Oj").LineToolTextAbsolute,LineToolArrowMarkLeft:i("TohL").LineToolArrowMarkLeft,LineToolArrowMarkRight:i("TohL").LineToolArrowMarkRight,LineToolArrowMarkUp:i("TohL").LineToolArrowMarkUp, LineToolArrowMarkDown:i("TohL").LineToolArrowMarkDown,LineToolFlagMark:i("aIha").LineToolFlagMark,LineToolCypherPattern:i("bTqm").LineToolCypherPattern,LineToolElliottImpulse:i("xz+e").LineToolElliottImpulse,LineToolElliottTriangle:i("xz+e").LineToolElliottTriangle,LineToolElliottTripleCombo:i("xz+e").LineToolElliottTripleCombo,LineToolElliottCorrection:i("xz+e").LineToolElliottCorrection,LineToolElliottDoubleCombo:i("xz+e").LineToolElliottDoubleCombo,LineToolRiskRewardLong:i("tDUI").LineToolRiskRewardLong,LineToolRiskRewardShort:i("tDUI").LineToolRiskRewardShort,LineToolPosition:i("ziJ5").LineToolPosition,LineToolOrder:i("B4/o").LineToolOrder},o=Object.keys(n),r=o.length;r--;)TradingView[o[r]]=n[o[r]];e.exports=n},"OK+B":function(e,t,i){"use strict";var n,o=i("Eyy1").assert,r=i("eJTA"),s=r.rgba,a=r.rgbaToString,l=r.parseRgb,c=i("+GxX").isFeatureEnabled,u=i("cWHH"),h=i("1Wlv").PriceScale,d=i("8sOK").StudyStub,p=i("CW80"),_=p.createLineTool,f=p.isLineToolName,m=p.isStudyLineToolName,y=i("Ss5c").LineDataSource,g=i("OH2X").LineToolBarsPattern,v=i("OH2X").LineToolCallout,S=i("HLXm"),b=i("GVHu"),w=b.Study,P=b.prepareStudyPropsStateForLoadChart,x=b.prepareStudyPropertiesForLoadChart,C=i("3ClC").createStudy,T=i("qJq3").Series,I=i("dfhE"),L=i("n5al"),A=i("Ocx9").DefaultProperty,k=i("0YCj"),M=i("Kxc7"),E=i("uOxu").getLogger("Chart.Serialization"),V=i("OH2X").LineToolParallelChannel,D=i("OH2X").LineToolTrendAngle,O=i("OH2X").LineToolGhostFeed,B=i("OH2X").LineToolElliott,R=i("7ktv").PriceDataSource,F=i("iDOr").Pane,N=i("Tmoa"),W=i("jofe").createDeferredPromise,H=i("ApcL").preferencesByWhiteList;E=i("uOxu").getLogger("Chart.Serialization"),u.version=2,u.prototype.state=function(e,t){var i,n,o,r={panes:[]};for(i=0;in&&o.push(l)),s=(s+1)%c.length;return o},u.prototype.restoreState=function(e,t,i){var o,r,s,a,l,c,u,h,d,p,_,f,m,g;if(new n(this).reset(),o={},e.panes)if(Array.isArray(e.panes)){if(!(e.panes.length<1)){if(e.chartProperties&&!e.chartProperties.timezone&&(e.chartProperties.timezone=e.timezone),e.chartProperties&&(r=TradingView.factoryDefaults("chartproperties").scalesProperties,TradingView.merge(r,e.chartProperties.scalesProperties),!("showLastValue"in r)||"showSeriesLastValue"in r||"showStudyLastValue"in r||(r.showSeriesLastValueProperty=r.showLastValue,r.showStudyLastValueProperty=r.showLastValue),"showSeriesLastValue"in r&&(o.showSeriesLastValueProperty=!0),"showStudyLastValue"in r&&(o.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.merge(e.chartProperties.paneProperties),this._properties.scalesProperties.merge(r),e.chartProperties.timezone&&this._properties.timezone.setValue(e.chartProperties.timezone),e.chartProperties.chartEventsSourceProperties&&this._properties.chartEventsSourceProperties&&this._properties.chartEventsSourceProperties.merge(e.chartProperties.chartEventsSourceProperties),this.m_timeScale.restoreState(e.timeScale,t),this._updateDateTimeFormatter()),e.timeScale&&this.m_timeScale.restoreState(e.timeScale,t),!this.readOnly()&&(s=this._getExceedingChildStudies(e.panes)).length)for(a=e.panes.length-1;a>=0;--a){for(c=(l=e.panes[a]).sources.length-1;c>=0;--c)u=l.sources[c],~s.indexOf(u)&&l.sources.splice(c,1);l.sources.length||e.panes.splice(a,1)}for(h=e.panes,this.panes()[0].restoreState(h[0],t,e.version,o,i),d=1,a=1;ag&&f%100==0?{lines_limit_exceeded:!0,line_tools_count:f}:(e.sessions&&this.sessions().restoreState(e.sessions,t),{})}E.logDebug("ChartModel.restoreState: invalid state")}else E.logDebug("ChartModel.restoreState: invalid state");else E.logDebug("ChartModel.restoreState: invalid state")},F.prototype.state=function(e,t,i,n){ function o(e){var o,r;return u.has(e)?u.get(e):(o=null,r=i&&!e.isSavedInStudyTemplates()||!e.state||!(o=e.state(t))||!e.isSavedInChart(t)||n&&e.isActualSymbol&&!e.isActualSymbol()?null:o,u.set(e,r),r)}function r(e){return null!==u.get(e)}var s,a,l,c={},u=new Map;if(e)for(c.sources=[],s=0;s1e200?(m=u-1,E.logWarn("Datasource zorder has bad value: "+_.zorder+" Resetting it to "+m),_.zorder=m):this.isZOrderAvailable(_.zorder)||l&&"MainSeries"===f&&this._model.mainSeries().zorder()===_.zorder||(_.zorder=d+1),s[g=_.id]=_.ownerSource,f&&("MainSeries"===f?this._restoreMainSeries(_,t,l,n,o):f.toLowerCase().startsWith("study")?this._restoreStudy(_,t,n):TradingView.isInherited(TradingView[f],y)?this._restoreLineTool(_,t):TradingView[f]&&TradingView[f].createFromState&&this._restoreSpecialSource(_,t)),u=Math.min(u,_.zorder),d=Math.max(d,_.zorder))}for(v=new Set,S=this,b=e.leftAxisesState?e.leftAxisesState.map(r).filter(function(e){return null!==e}):null!==(P=r({state:e.leftAxisState,sources:e.leftAxisSources}))?[P]:[],this._leftPriceScales.slice().forEach(function(e){this.removePriceScale(e)}.bind(this)),this._leftPriceScales=[],b.forEach(function(e){S._placePriceScale(e,"left")}),x=e.rightAxisesState?e.rightAxisesState.map(r).filter(function(e){return null!==e}):null!==(C=r({state:e.rightAxisState,sources:e.rightAxisSources}))?[C]:[],this._rightPriceScales.forEach(function(e){this.removePriceScale(e)}.bind(this)),this._rightPriceScales=[],x.forEach(function(e){S._placePriceScale(e,"right")}),this._currentPriceScaleRatio=e.priceScaleRatio||e.leftPriceScaleRatio||e.rightPriceScaleRatio||null,p=0;pt?1:e=t||!i._shouldExtrapolateMore()?null:o.extrapolateBarsFrontByCount(i.newBarBuilder(e),n,t)})},r.prototype._ensureExtrapolatedToTime=function(e,t){var i=this;return this._extrapolateData(e,function(n){var r,s;return n>=t||!i._shouldExtrapolateMore()?null:(r=2e3,(s=o.extrapolateBarsFrontToTime(i.newBarBuilder(e),n,t,r))[s.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=e.scrollWidth||$(e).attr("title",$(e).text())}),$(document).on("mouseenter",".apply-overflow-tooltip",function(){var e,t,i,o,s=$(this);if(s.is(".apply-overflow-tooltip--check-children")){for(e=!1,t=s.children(),i=0;i'},PoSe:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,i){var n,o,r,s,a=null,l=0;return i=i||{},s=function(){l=!1===i.leading?0:Date.now(),a=null,r=e.apply(n,o),a||(n=o=null)},function(){var c,u=Date.now();return l||!1!==i.leading||(l=u),n=this,o=arguments,(c=t-(u-l))<=0||c>t?(a&&(clearTimeout(a),a=null),l=u,r=e.apply(n,o),a||(n=o=null)):a||!1===i.trailing||(a=setTimeout(s,c)),r}},e.exports=t.default},Q19o:function(e,t,i){"use strict";(function(t,n,o){function r(e,t){var i=o.utc_to_cal(t.timezone,1e3*e),n=t.spec.correctTradingDay(i) ;return o.set_hms(n,0,0,0,0,v.get_timezone("Etc/UTC")),n.getTime()/1e3}var s=i("Eyy1").ensureNotNull,a=i("jA0t"),l=i("9iCb").applyOverridesToStudy,c=i("0YCj"),u=i("5JMW").LineDataSourceApi,h=i("N1UO").StudyApi,d=i("ltKl").SeriesApi,p=i("QrSB").SelectionApi,_=i("mf9N").PaneApi,f=i("Ocx9").DefaultProperty,m=i("3mf1").availableIcons,y=i("ufy5"),g=i("LxhU").Interval,v=i("jCNj"),S=i("2jXJ").supportedLineTools,b=i("7MZv").showTooManyStudiesNotice,w=i("ogJP").isNumber,P=i("ogJP").inherit,x=i("vu5c").onSeriesCompletedOrErrorReceived,C=i("FDyI").ChartWidgetApiBase,T=function(e,i){C.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)})};P(T,C),T.prototype._getPaneApi=function(e){var t=this._panes.get(e);return void 0===t&&(t=new _(e,this._chartWidget),this._panes.set(e,t)),t},T.prototype._getStudyApi=function(e){var t=this._studies.get(e);return void 0===t&&(t=new h(e,this._chartWidget.model().model()),this._studies.set(e,t)),t},T.prototype._getLineDataSourceApi=function(e){var t=this._lineDataSources.get(e);return void 0===t&&(t=new u(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 n=i.normalizeBarIndex(e.index);return{price:e.price,time:t.projectTime(n.time_t,n.offset)}})}.bind(this)}),this._lineDataSources.set(e,t)),t},T.prototype._makeSubscriptionFromDelegate=function(e){return{subscribe:e.subscribe.bind(e),unsubscribe:e.unsubscribe.bind(e),unsubscribeAll:e.unsubscribeAll.bind(e)}},T.prototype.executeActionById=function(e){this._chartWidget.executeActionById(e)},T.prototype.getCheckableActionState=function(e){return this._chartWidget.getCheckableActionState(e)},T.prototype.setZoomEnabled=function(e){this._chartWidget.model().model().setZoomEnabled(e)},T.prototype.setScrollEnabled=function(e){this._chartWidget.model().model().setScrollEnabled(e)},T.prototype.refreshMarks=function(){this._chartWidget.refreshMarks()},T.prototype.clearMarks=function(){this._chartWidget.clearMarks()},T.prototype.symbol=function(){return this._chartWidget.getSymbol()},T.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},T.prototype.resolution=function(){return this._chartWidget.model().mainSeries().properties().interval.value()},T.prototype.setSymbol=function(e,t){if(e!==this.symbol()||n.enabled("same_data_requery")){var i=this._chartWidget.model().mainSeries().dataEvents();t&&x(i,function(e){e||t()}),this._activateChart(), this._chartWidget.setSymbol(e)}},T.prototype.resetData=function(){this._chartWidget.model().mainSeries().rerequestData()},T.prototype.setResolution=function(e,t){if((e=e.toUpperCase())!==this.resolution()){var i=this._chartWidget.model().mainSeries().dataEvents();t&&x(i,function(e){e||t()}),this._activateChart(),this._chartWidget.setResolution(e)}},T.prototype.setEntityVisibility=function(e,t){var i,n;console.warn("`setEntityVisibility` is deprecated. Use shape/study API instead"),(i=this._chartWidget.model().model().dataSourceForId(e))&&(n=i.properties())&&n.visible&&n.visible.setValue(t)},T.prototype.getAllStudies=function(){return this._chartWidget.model().model().allStudies().map(function(e){return{id:e.id(),name:e._metaInfo.description}})},T.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)},T.prototype.getAllShapes=function(){return this._chartWidget.model().model().allLineTools().map(function(e){return{id:e.id(),name:function(e){var t,i,n=Object.keys(S),o=n.length;for(t=0;t_&&(u=m.syncModel().distance(_,a)).success&&(p.index=p.index+u.result),w(l)?p.price=l:((h=c?["open","high","low","close"].indexOf(c)+1:1)<=0&&(h=1),p.price=v.valueAt(d)[h]),p));return o},T.prototype.createMultipointShape=function(e,t,i){var n,o,r,s,a,l,c,u,h=t.disableUndo?this._chartWidget.model().model():this._chartWidget.model(),d=this._chartWidget.model().model(),p=d.mainSeries();if(!d.timeScale().isEmpty()){if(n=d.paneForSource(p),o=this._convertUserPointsToDataSource(e), (r=S[t.shape]||S.flag).onlySelectable)throw new Error('Cannot create "'+t.shape+'" shape');if("LineToolPolyline"===r.name)o[0].price===o[o.length-1].price&&o[0].index===o[o.length-1].index||o.push(o[0]);else if("LineToolIcon"===r.name){if(t.icon=t.icon||t.overrides&&t.overrides.icon,!t.hasOwnProperty("icon"))throw new Error("icon must be specified in options");if(-1===m.indexOf(t.icon))throw new Error("icon value must be valid");t.overrides=t.overrides||{},t.overrides.icon=t.icon}if(s=new f(r.name.toLowerCase()),t.overrides)for(a in t.overrides)s[a]?s[a].setValue(t.overrides[a]):("LineToolRiskRewardLong"===(_=r.name)||"LineToolRiskRewardShort"===_)&&-1!==["profitLevel","stopLevel"].indexOf(a)&&s.addProperty(a,t.overrides[a]);var _;if(void 0!==(c=(l=h.createLineTool(n,o[0],r.name,s)).properties()).text&&t.text&&c.text.setValue(t.text),l.pointsCount()!==o.length&&-1!==l.pointsCount())throw Error("Wrong points count for "+t.shape+". Required "+l.pointsCount());for(u=1;uthis._minValue&&e.maxValue()5,this._moveExceededManhattanDistance?(this._cancelClick=!0,i&&this._clearContextMenuTimeout()):i&&(t=!0),e.button===a||t||this._processEvent(e,this._handler.pressedMouseMoveEvent),this._preventDefaultIfNeeded(e)},e.prototype._mouseUpHandler=function(e){void 0===e.button&&(e.button=0),this._fixMouseTouchEvent(e,e.originalEvent),Modernizr.mobiletouch&&this._clearContextMenuTimeout(),this._mouseMoveStartPosition=null,l=!1;var t=e.target.ownerDocument.documentElement;$(t).off("mousemove.chartgui"),$(t).off("mouseup.chartgui"),Modernizr.mobiletouch||e.originalEvent.touches?($(t).off("touchmove.chartgui"),$(t).off("touchend.chartgui"),this._mouseLeaveHandler(e)):($(t).off("mousemove.chartgui touchmove.chartgui"),$(t).off("mouseup.chartgui touchend.chartgui")),e.button!==a&&(this._processEvent(e,this._handler.mouseUpEvent),++this._clickCount,this._clickTimeoutId&&this._clickCount>1?(this._processEvent(e,this._handler.mouseDoubleClickEvent),this._resetClickTimeout()):this._cancelClick||this._processEvent(e,this._handler.mouseClickEvent)),this._preventDefaultIfNeeded(e),Modernizr.mobiletouch&&this._mouseLeaveHandler(e)},e.prototype._clearContextMenuTimeout=function(){null!==this._touchContextMenuTimeout&&(clearTimeout(this._touchContextMenuTimeout),this._touchContextMenuTimeout=null)},e.prototype._mouseDownHandler=function(e){void 0===e.button&&(e.button=0),this._cancelClick=!1,this._moveExceededManhattanDistance=!1,this._fixMouseTouchEvent(e,e.originalEvent),Modernizr.mobiletouch&&(this._lastTouchPosition.x=e.pageX,this._lastTouchPosition.y=e.pageY,this._mouseEnterHandler(e)),this._mouseMoveStartPosition={x:e.pageX,y:e.pageY};var t=e.target.ownerDocument.documentElement;if(Modernizr.mobiletouch?($(t).off("touchmove.chartgui"),$(t).off("touchend.chartgui"),$(t).on("touchmove.chartgui",this._mouseMoveWithDownHandler.bind(this)),$(t).on("touchend.chartgui",this._mouseUpHandler.bind(this)),this._clearContextMenuTimeout(),this._touchContextMenuTimeout=setTimeout(this._contextMenuHandler.bind(this,e),500)):($(t).off("mousemove.chartgui touchmove.chartgui"),$(t).off("mouseup.chartgui touchend.chartgui"),$(t).on("mousemove.chartgui touchmove.chartgui",this._mouseMoveWithDownHandler.bind(this)),$(t).on("mouseup.chartgui touchend.chartgui",this._mouseUpHandler.bind(this))),l=!0, e.button!==a&&(this._processEvent(e,this._handler.mouseDownEvent),this._clickTimeoutId||(this._clickCount=0,this._clickTimeoutId=setTimeout(this._resetClickTimeout.bind(this),500))),this._preventDefaultIfNeeded(e),this._preventDefault)try{window.focus()}catch(e){}},e.prototype._init=function(){var e=this;this._$target.mouseenter(this._mouseEnterHandler.bind(this)),this._$target.on("touchcancel",this._clearContextMenuTimeout.bind(this)),this._$target.on("touchstartoutside mousedownoutside",function(t){e._handler.mouseDownOutsideEvent&&e._handler.mouseDownOutsideEvent(t,e._$target)}),this._$target.mouseleave(this._mouseLeaveHandler.bind(this)),this._$target.contextMenu&&this._$target.contextMenu(this._contextMenuHandler.bind(this)),Modernizr.mobiletouch?this._$target.on("touchstart.chartgui",this._mouseDownHandler.bind(this)):this._$target.on("mousedown.chartgui touchstart.chartgui",this._mouseDownHandler.bind(this)),Modernizr.touch&&this._initGestureEvents()},e.prototype._mouseLeaveHandler=function(e){this._$target.off("mousemove.chartgui touchmove.chartgui"),this._processEvent(e,this._handler.mouseLeaveEvent),this._preventDefaultIfNeeded(e)},e.prototype._contextMenuHandler=function(e){this._processEvent(e,this._handler.contextMenuEvent),this._preventDefaultIfNeeded(e),this._cancelClick=!0},e.prototype._processEvent=function(e,t){t&&t.call(this._handler,function(e,t){var i=e[0].getBoundingClientRect();return t.localX=t.clientX-i.left,t.localY=t.clientY-i.top,t}(this._$target,e),this._$target)},e.prototype._preventDefaultIfNeeded=function(e){this._preventDefault&&e.preventDefault()},e.prototype._initGestureEvents=function(){var e=this,t=[this._handler.gestureStartEvent,this._handler.gestureChangeEvent,this._handler.gestureEndEvent];t.some(Boolean)&&(new r.a).load().then(function(t){e._isDestroyed||(e._hammerManager=new t(e._$target.get(0)),e._hammerManager.get("pinch").set({enable:!0}),e._hammerManager.on("pinchstart",function(t){e._handler.gestureStartEvent&&e._handler.gestureStartEvent(t,e._$target),e._clearContextMenuTimeout()}),e._hammerManager.on("pinchmove",function(t){e._handler.gestureChangeEvent&&e._handler.gestureChangeEvent(t,e._$target)}),e._hammerManager.on("pinchend pinchcancel",function(t){e._handler.gestureEndEvent&&e._handler.gestureEndEvent(t,e._$target)}))})},e.prototype._fixMouseTouchEvent=function(e,t){var i;if(t.touches&&0!==t.touches.length)i=t.touches[0];else{if(!t.changedTouches||0===t.changedTouches.length)return;i=t.changedTouches[0]}e.pageX=i.pageX,e.pageY=i.pageY,e.localX=i.pageX,e.localY=i.pageY,e.clientX=i.clientX,e.clientY=i.clientY},e}()},SXwY:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var i=function i(n){var o=i.cache,r=""+(t?t.apply(this,arguments):n);return o.hasOwnProperty(r)||(o[r]=e.apply(this,arguments)),o[r]};return i.cache={},i},e.exports=t.default},Si3H:function(e,t,i){"use strict";function n(e,t){if(!e.isTVScriptStubToCompile){var i=s.a.versionOf(e);c.forEach(function(n){ i<0||i>=n.targetMetaInfoVersion()||(n.migrateMetaInfo(e),void 0!==t&&n.migratePropState(t),Object(o.assert)(e._metainfoVersion===n.targetMetaInfoVersion()))})}}var o,r,s,a,l,c;i.r(t),o=i("Eyy1"),r=i("0YCj"),s=i.n(r),a=i("ogJP"),l=function(){function e(){}return e.prototype.targetMetaInfoVersion=function(){return 47},e.prototype.migrateMetaInfo=function(e){var t,i,n=e,o=e;o._metainfoVersion=47,n.defaults&&void 0!==n.defaults.precision?(t=n.defaults&&n.defaults.precision,0===(i=Object(a.isNumber)(t)?t:parseInt(t))?o.format={type:"volume"}:isFinite(i)?o.format={type:"price",precision:i}:o.format={type:"inherit"},delete n.defaults.precision):o.format={type:"inherit"}},e.prototype.migratePropState=function(e){},e}(),i.d(t,"migrateMetaInfoAndPropState",function(){return n}),(c=[new l]).sort(function(e,t){return e.targetMetaInfoVersion()-t.targetMetaInfoVersion()})},Ss5c:function(e,t,i){"use strict";(function(e){function n(e,t){a.call(this),this._linetool=e,this._pointindex=t,this._model=e._model,this._text="",this._coordinate=0,this._background="#5592C9",this._activeBackground="#0F6DBF",this._borderColor="#2E84A6",this._color="white",this._visible=!1,this._invalidated=!0,this._renderer=new l}function o(e,t){var i,r,s;if(c.call(this),this._model=e,this._properties=t,this._pointAdded=new y,this._pointChanged=new y,this._onTemplateApplying=new y,this._onTemplateApplied=new y,t.visible&&t.frozen||this._properties.merge(defaults("linetool")),i=defaults("linetoolvisibilities"),t.intervalsVisibilities)for(r in i.intervalsVisibilities)this._properties.intervalsVisibilities[r]||this._properties.intervalsVisibilities.addProperty(r,i.intervalsVisibilities[r]);else this._properties.merge(i);if(this._paneViews=[],this._points=[],this._fixedPoints=[],this._timePoint=[],this._currentPointsetId=null,this._properties.symbol||this._properties.merge({symbol:e.mainSeries().symbol()}),this._properties.interval||this._properties.merge({interval:e.mainSeries().interval()}),this._properties.addExclusion&&(this._properties.addExclusion("symbol"),this._properties.addExclusion("symbolInfo"),this._properties.addExclusion("points"),this._properties.addExclusion("interval"),this._properties.addExclusion("visible"),this._properties.addExclusion("lastUpdateTime")),this.calcIsActualSymbol(),this._properties.intervalsVisibilities.listeners().subscribe(this,o.prototype.calcIsActualSymbol),this._properties.listeners().subscribe(this,this.propertiesChanged),this._createPointsProperties(),this.m_priceAxisViews=[],this.m_timeAxisViews=[],this.pointsCount()>0)for(s=0;s=i.multiplier()&&(t=e.key)}),t},o.prototype.calcIsActualSymbol=function(){var e,t=this._properties.symbol,i=this._model.mainSeries(),n=t.value();this._isActualSymbol=i.symbolSameAsCurrent(n),this._isActualSymbol&&(e=i.symbol(),v(n,e)||(f.logWarn('Possible drawing "migrating" detected from "'+n+'" to "'+e+'"'),f.logWarn("Series symbolInfo: "+JSON.stringify(i.symbolInfo())),f.logWarn((new Error).stack)),t.setValue(e)),this.calcIsActualInterval()},o.prototype.calcIsActualInterval=function(){var e,t,i,n,o,r=this._properties,s=this._model.mainSeries(),a=d.parse(s.interval()),l=r.intervalsVisibilities;this._isActualInterval=!1,a.isSeconds()&&a.multiplier()<60&&(e=l.seconds.value(),t=l.secondsFrom.value(),i=l.secondsTo.value(), this._isActualInterval=e&&a.multiplier()>=t&&a.multiplier()<=i),a.isSeconds()&&a.multiplier()>=60&&(n=Math.floor(a.multiplier()/60),e=l.minutes.value(),t=l.minutesFrom.value(),i=l.minutesTo.value(),this._isActualInterval=e&&n>=t&&n<=i),a.isMinutes()&&a.multiplier()<60&&(e=l.minutes.value(),t=l.minutesFrom.value(),i=l.minutesTo.value(),this._isActualInterval=e&&a.multiplier()>=t&&a.multiplier()<=i),a.isMinutes()&&a.multiplier()>=60&&(o=Math.floor(a.multiplier()/60),e=l.hours.value(),t=l.hoursFrom.value(),i=l.hoursTo.value(),this._isActualInterval=e&&o>=t&&o<=i),a.isHours()&&(e=l.hours.value(),t=l.hoursFrom.value(),i=l.hoursTo.value(),this._isActualInterval=e&&a.multiplier()>=t&&a.multiplier()<=i),a.isDays()&&(e=l.days.value(),t=l.daysFrom.value(),i=l.daysTo.value(),this._isActualInterval=e&&a.multiplier()>=t&&a.multiplier()<=i),a.isWeeks()&&(this._isActualInterval=l.weeks.value()),a.isMonths()&&(this._isActualInterval=l.months.value()),a.isRange()&&(this._isActualInterval=l.ranges.value()),!this._isActualInterval&&this._model.selection().isSelected(this)&&this._model.removeSourceFromSelection(this)},o.PointIndexProperty=function(t,i){e.call(this),this._lineSource=t,this._pointIndex=i},inherit(o.PointIndexProperty,e),o.PointIndexProperty.prototype.value=function(){return this._lineSource.points()[this._pointIndex].index},o.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())},o.prototype._syncMultichartState=function(){var e={points:this._timePoint,interval:this._model.mainSeries().interval()};this.linkKey&&!this.properties().singleChartOnly&&u.finishChangingLineTool({model:this._model,linkKey:this.linkKey,symbol:this._model.mainSeries().symbol(),finalState:e})},o.prototype._createPointProperty=function(e){var t,i=this._properties.points;i.addProperty(e),(t=i[e]).addChild("price",new o.PointPriceProperty(this,e)),t.addChild("bar",new o.PointIndexProperty(this,e))},o.prototype._createPointsProperties=function(){this._properties.addProperty("points");for(var e=0;e0&&(this._points=i)},o.prototype.restorePoints=function(e,t,i){this._timePoint=e,this._points=t,i||this.denormalizeTimePoints()},o.prototype.restoreExternalPoints=function(e){this.properties().interval.setValue(e.interval),this._timePoint=e.points,this.denormalizeTimePoints(),this.isActualSymbol()?this.createServerPoints():this.clearServerPoints()},o.prototype.restorePositionPercents=function(e){this._positionPercents=e},o.prototype.updateAllViewsAndRedraw=function(){this.updateAllViews(),this._model.updateSource(this)},o.prototype.propertiesChanged=function(){if(this.calcIsActualInterval(),this.updateAllViewsAndRedraw(),this.linkKey){var e=this.properties().state(this._syncStateExclusions);delete e.interval,u.changeLineStyle({linkKey:this.linkKey,state:e,model:this._model})}},o.prototype.points=function(){var e,t,i=[];for(e=0;e=2&&this._properties.snapTo45Degrees&&this._snapPoint45Degree(i,this.points()[this.points().length-2]),i},o.prototype.addPoint=function(e,t,i){var n=this._preparePoint(e,t);return this._addPointIntenal(n,t,i)},o.prototype._addPointIntenal=function(e,t,i){this._points.push(e);var n=this._points.length===this.pointsCount();return n?(this._lastPoint=null,i||(this.normalizePoints(),this.createServerPoints())):this._lastPoint=e,this._pointAdded.fire(this._points.length-1),n},o.prototype.addFixedPoint=function(e){this._fixedPoints.push(e);var t=this._fixedPoints.length===this.pointsCount();return t&&this.calcPositionPercents(),t},o.prototype.calcPositionPercents=function(){var e,t,i,n;if(!this.priceScale()||this.priceScale().isEmpty())return[];for(this._positionPercents=[],e=0;e=0;--t)e.push(this._paneViews[t]);return e},o.prototype._setPaneViews=function(e){this._paneViews=e,this._model.lightUpdate()},o.prototype.dataWindowView=function(){return null},o.prototype.statusView=function(){return null},o.prototype.isSourceHidden=function(){ return!this._properties.visible.value()||u.hideAllDrawings().value()&&this.canBeHidden()||!this._isActualInterval||!this._isActualSymbol},o.prototype.priceAxisViews=function(e,t){var i,n,o;return t!==this.priceScale()||this.isSourceHidden()?null:this._model.lineBeingEdited()===this&&(i=this._model.linePointBeingEdited())0?this._stepY+this._padding:-this._stepY-this._padding):(this._padding=0,this._shapeWidth=2*this._stepX,this._shapeHeight=2.5*this._stepY)}function o(e){n.call(this,e,!0)}function r(e){n.call(this,e,!1)}var s=i("aO4+").Point,a=i("VdBB").HitTestResult,l=i("c0/O").PaneRendererAbstractShape ;inherit(n,l),n.prototype.drawShape=function(e){var t,i,n,o,r,s,a,l,c=!1,u=this._isUp?1:-1,h=Math.round(this._shapeWidth/2)-.5,d=Math.round(this._shapeHeight)-.5,p=0;for(0!==this._vertOffset&&this._vertOffset<0===this._isUp&&(p=-u*Math.round(d+this._stepY)),i=0,n=this.items.length;ip&&h_&&d0&&(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}(r.LineDataSource)).prototype.superclass=r.LineDataSource},TMWk:function(e,t,i){"use strict";function n(e,t,i,n){s.call(this,e,t,i,n),this._underlyingData=new a(l(n))}var o=i("Eyy1").assert,r=i("ogJP").clone,s=i("GVHu").Study,a=i("k9/m").PlotList,l=i("w4Ji").studyPlotFunctionMap;inherit(n,s),n.prototype.clearData=function(){s.prototype.clearData.call(this),this._underlyingData.clear()},n.prototype._mergeData=function(e){var t,i;this._invalidateLastNonEmptyPlotRowCache(),t=this._underlyingData.firstIndex(),this._underlyingData.merge(e),t!==this._underlyingData.firstIndex()&&(this.m_data=new a(l(this._metaInfo))),i=this.m_data.lastIndex(),this._underlyingData.range(i,this._underlyingData.lastIndex()).each(function(e,t){return this.m_data.add(e,r(t)),!1}.bind(this)),this._plotsForStrategyProcessing().forEach(function(e){this._createStrategy(e.strategy,e.strategyIndex,e.targetIndex,i).rebuildData(this.m_data)},this)},n.prototype._plotsForStrategyProcessing=function(){var e=["dataoffset"],t=[];return this._metaInfo.plots.forEach(function(i,n){var r,s,a=e.indexOf(i.type)>-1;a&&(r=null,this._metaInfo.plots.forEach(function(e,t){e.id===i.target&&(r=t)}),o(r>=0,"target plot not found for strategy plot "+i.id),s={strategy:i.type,strategyIndex:n,targetIndex:r},t.push(s))},this),t},n.prototype._createStrategy=function(e,t,i,o){return new n["Strategy_"+e](t,i,o)},n.Strategy_dataoffset=function(e,t,i){this._strategyPlotIndex=e,this._targetPlotIndex=t,this._startIndex=i}, n.Strategy_dataoffset.prototype.rebuildData=function(e){var t=this._targetPlotIndex+1,i=this._strategyPlotIndex+1,n=null,o=null;e.range(this._startIndex||e.firstIndex(),e.lastIndex()).each(function(r,s){var a,l,c,u=s[t],h=s[i]?Math.round(s[i]):null;return s[t]=null,s[i]=null,!(!h||h>0)&&(l={pointIndex:a=r+h,value:u},o?o.pointIndex!==l.pointIndex&&(a>=0&&(e.valueAt(a)[t]=u),c=!1,n&&(c=n.value<=o.value&&o.value<=u||n.value>=o.value&&o.value>=u),c?o.pointIndex>=0&&(e.valueAt(o.pointIndex)[t]=null):n=o,o=l):o=l,!1)})},t.study_ScriptWithDataOffset=n},TQMj:function(e,t,i){"use strict";function n(e){return("0"+e).slice(-2)}var o,r,s,a,l,c,u,h,d,p,_,f;i.r(t),i.d(t,"SeriesPriceAxisView",function(){return f}),o=i("mrSG"),r=i("Eyy1"),s=i("LxhU"),a=i("KcY8"),l=i("Kxc7"),c=i("oXaB"),u=i("dfhE"),h=l.enabled("countdown"),d=l.enabled("price_scale_always_last_bar_value"),p=[u.STYLE_BARS,u.STYLE_CANDLES,u.STYLE_LINE,u.STYLE_AREA,u.STYLE_HOLLOW_CANDLES,u.STYLE_HEIKEN_ASHI],_=l.enabled("force_exchange_as_title"),f=function(e){function t(t,i){var n=e.call(this)||this;return n._source=t,n._data=i,n}return o.__extends(t,e),t.prototype._getSource=function(){return this._source},t.prototype._getData=function(){return this._data},t.prototype._isCountdownEnabled=function(){return h},t.prototype._countdownText=function(){var e,t,i,o,a,l,c,u,h;return this._source.isDWM()?"":(e=1e3*Object(r.ensure)(Object(r.ensureNotNull)(this._source.data().bars().last()).value[0]),t=1e3*this._source.serverTimeOffset(),i=s.Interval.parse(this._source.interval()).inMilliseconds(),o=e.valueOf()+i,a=(new Date).valueOf()+t,(l=Math.round((o-a)/1e3))<=0?"":(c=null,(l=Math.min(l,i/1e3))>=3600&&(c=n(Math.floor(l/3600))),l%=3600,u=n(Math.floor(l/60)),l%=60,h=n(Math.floor(l)),null!==c?c+":"+u+":"+h:u+":"+h))},t.prototype._updateRendererData=function(e,t,i){var n,o,r,s,a,l,_,f,m,y,g,v;e.visible=!1,t.visible=!1,(n=this._source.properties()).style.value()!==u.STYLE_HILO&&(r=(o=this._data.model.properties().scalesProperties).showSeriesLastValue.value(),s=h&&-1!==p.indexOf(n.style.value())&&n.showCountdown.value(),a=o.showSymbolLabels.value(),l=o.seriesLastValueMode.value()===c.PriceAxisLastValueMode.LastPriceAndPercentageValue,(_=this._source.lastValueData(void 0,d)).noData||(f=n.style.value()===u.STYLE_HEIKEN_ASHI,(r||s||a)&&f&&n.haStyle.showRealLastPrice.value()&&(m=this._source.lastValueData(void 0,!1),y=this._source.lastValueData(void 0,!0),m.noData||y.noData||m.index!==y.index||(r=!1,s=!1,a=!1)),(r||s)&&(g=this._axisFirstLineText(_,r,l),v=s?this._countdownText():"",0===g.length?(e.text=v,e.secondLine=""):(e.text=g,e.secondLine=v),0===g.length&&0===v.length||(e.visible=!0)),(a||l)&&(t.text=this._paneText(_,r,a,l),t.visible=t.text.length>0),i.background=this._source.priceLineColor(_.color),i.color=this.generateTextColor(i.background),i.coordinate=_.coordinate,i.floatCoordinate=_.floatCoordinate))},t.prototype._paneText=function(e,t,i,n){var o,r="";return _?r+=(o=this._source.symbolInfo())?o.exchange+" ":"":i&&(r+=this._source.firstShortName()+" "), t&&n&&(r+=this._source.priceScale().isPercentage()?e.formattedPriceAbsolute:e.formattedPricePercentage),r.trim()},t.prototype._axisFirstLineText=function(e,t,i){return t?i?this._source.priceScale().isPercentage()?e.formattedPricePercentage:e.formattedPriceAbsolute:e.text:""},t}(a.a)},TTFo:function(e,t,i){"use strict";function n(e,t){return t<0&&(e=-e),e/100*t+t}function o(e,t){var i=100*(e-t)/t;return t<0?-i:i}function r(e,t){var i=o(e.minValue(),t),n=o(e.maxValue(),t);return new h.PriceRange(i,n)}function s(e,t){return e-=100,t<0&&(e=-e),e/100*t+t}function a(e,t){var i=100*(e-t)/t+100;return t<0?-i:i}function l(e,t){var i=a(e.minValue(),t),n=a(e.maxValue(),t);return new h.PriceRange(i,n)}function c(e){var t,i=Math.abs(e);return i<1e-8?0:(t=Object(d.log10)(i+1e-4)+4,e<0?-t:t)}function u(e){var t,i=Math.abs(e);return i<1e-8?0:(t=Math.pow(10,i-4)-1e-4,e<0?-t:t)}var h,d;i.r(t),i.d(t,"fromPercent",function(){return n}),i.d(t,"toPercent",function(){return o}),i.d(t,"toPercentRange",function(){return r}),i.d(t,"fromIndexedTo100",function(){return s}),i.d(t,"toIndexedTo100",function(){return a}),i.d(t,"toIndexedTo100Range",function(){return l}),i.d(t,"toLog",function(){return c}),i.d(t,"fromLog",function(){return u}),h=i("Qb4w"),d=i("Hr11")},TcSq:function(e,t,i){"use strict";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)}i.r(t),i.d(t,"extractPineId",function(){return n})},TlGQ:function(e,t,i){"use strict";function n(e,t,i){return Object(r.isArray)(e)?function(e,t,i){return e.map(function(e){var o=n(e,t,i),r=t(o);return void 0!==r?r:o})}(e,t,i):Object(r.isObject)(e)&&(Object(r.isHashObject)(e)||i&&i.visitInstances)?function(e,t,i){var o={};return Object.keys(e).forEach(function(r){var s=n(e[r],t,i),a=t(s);o[r]=void 0!==a?a:s}),o}(e,t,i):e}function o(e,t,i){var o=n(e,t,i),r=t(o);return void 0!==r?r:o}var r;i.r(t),i.d(t,"visitObject",function(){return o}),r=i("ogJP")},TmNs:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h;i.r(t),n=i("mrSG"),o=i("KcY8"),r=i("Eyy1"),s=i("jFln"),a=i("8Uy/"),l=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,n,o){if(this._data.visible){var l=this._commonData.coordinate;void 0!==this._commonData.fixedCoordinate&&(l=this._commonData.fixedCoordinate),e.lineWidth=Object(r.ensureDefined)(this._data.linewidth),e.lineCap="square",Object(s.setLineStyle)(e,void 0===this._data.linestyle?a.LINESTYLE_DOTTED:this._data.linestyle),e.strokeStyle=this._commonData.color,e.beginPath(),e.moveTo(0,l),e.lineTo(n,l),e.stroke()}},e.prototype.height=function(e,t){return 0},e}(),i.d(t,"PriceLineAxisView",function(){return c}),i.d(t,"SeriesPriceLineAxisView",function(){return u}),i.d(t,"StudyPriceLineAxisView",function(){return h}),c=function(e){function t(){return e.call(this,l)||this}return n.__extends(t,e),t.prototype._updateRendererData=function(e,t,i){if(t.visible=!1,e.visible=!1,this._isVisible()){var n=this._value();n.noData||(i.background="", i.color=this._priceLineColor(n.color),i.coordinate=n.coordinate,i.floatCoordinate=n.floatCoordinate,e.linewidth=this._lineWidth(),e.visible=!0)}},t}(o.a),u=function(e){function t(t){var i=e.call(this)||this;return i._series=t,i}return n.__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,t=e.showSeriesLastValue.value();return this._series.properties().showPriceLine.value()&&t},t}(c),h=function(e){function t(t,i){var n=e.call(this)||this;return n._study=t,n._plotname=i,n}return n.__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,t=e.showStudyLastValue.value();return this._study.properties().styles[this._plotname].trackPrice.value()&&t},t}(c)},Tmoa:function(e,t,i){"use strict";function n(e,t,i){var n,o,s,a,u;return t=t||0,l(e)?(o=(n=Object(c.parseRgb)(e))[0],s=n[1],a=n[2],u=Object(c.normalizeAlphaComponent)(r(t)),Object(c.rgbaToString)([o,s,a,u])):i?Object(c.rgbaToString)(Object(c.rgba)(Object(c.parseRgb)(e),Object(c.normalizeAlphaComponent)(r(t)))):e}function o(e){return 100*(1-e)}function r(e){if(e<0||e>100)throw new Error("invalid transparency");return 1-e/100}function s(e){return l(e)?e:Object(c.rgbaToString)(Object(c.rgba)(Object(c.parseRgb)(e),Object(c.normalizeAlphaComponent)(1)))}function a(e){var t=Object(c.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 l(e){return 0===e.indexOf("#")}var c;i.r(t),i.d(t,"generateColor",function(){return n}),i.d(t,"alphaToTransparency",function(){return o}),i.d(t,"transparencyToAlpha",function(){return r}),i.d(t,"resetTransparency",function(){return s}),i.d(t,"getLuminance",function(){return a}),i.d(t,"isHexColor",function(){return l}),c=i("eJTA")},TohL:function(e,t,i){"use strict";function n(e,t){var n=t||new u("linetoolarrowmark");n.hasChild("text")||n.addChild("text",new c("")),n.addExclusion("text"),l.call(this,e,n),i.e("lt-pane-views").then(function(t){var n=i("mr3a").TextPaneView,o=i("5Dp4").MarkPaneView,r=[new o(this,e,this.image,this.width,this.height,this.offsetX,this.offsetY)],s=this._createTextPaneView(n);null!==s&&r.push(s),this._setPaneViews(r)}.bind(this).bind(null,i)).catch(i.oe)}function o(e,t){this._constructor="LineToolArrowMarkLeft",n.call(this,e,t)}function r(e,t){this._constructor="LineToolArrowMarkUp",n.call(this,e,t)}function s(e,t){this._constructor="LineToolArrowMarkRight",n.call(this,e,t)}function a(e,t){this._constructor="LineToolArrowMarkDown", n.call(this,e,t)}var l=i("Ss5c").LineDataSource,c=i("tc+8"),u=i("Ocx9").DefaultProperty,h=i("hayr").propertyPages;inherit(n,l),n.prototype.width=21,n.prototype.height=21,n.prototype.offsetX=0,n.prototype.offsetY=0,n.prototype.paneViews=function(){var e=l.prototype.paneViews.call(this);return null!==e&&this._textPaneView&&e.push(this._textPaneView),e},n.prototype.pointsCount=function(){return 1},n.prototype.title=function(){return"Arrow Mark"},n.prototype.name=function(){return"Arrow Mark"},n.prototype.getStylesPropertyPage=function(){return h.LineToolArrowMarkStylesPropertyPage},n.prototype._createTextPaneView=function(e){return null},inherit(o,n),o.prototype.image=new Image,o.prototype.image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAB50lEQVR4AWMgETAKKAgIAGkQ5mCgAmCWdtTWV4yxvgFkWwKxOKUGssr5Gccrx9t+Vk6w+w/kxwKxIrmGMTKIivIohFvONKsI+e/cl/ofamgGECuTYyCTqJ2mqlK01Vnr+uj/HjNy/1v1J8AMzSTHUBYZP6MgpTjb97bNsf9dpmf9N++J/W/UEQEztAiIbUEGo2EpIObE8C4oVuVDzLuBmv869aT8t5+c+t+0K/q/YXs4GGsWeIAMRscwy/yhBiO8K2ijJKcYZXXYuj7qv/u0nP/W/Yn/jTsjQYYRwliDhUXKy8BVKdbmuW1T7H+3Gdn/LXrjQN4FaSDLUBa5MItyoOAvp67k/45T0pC9S56hSrHWhY4tif9D5pUDXZjz36w7Blkx+S5VDLNoBUWMY3fKfwdExMAw+WEq7Wvkoxhn+waUhFwRSYhcQxGxL26jpqQYbX3CBpjY3aeDYj+BothHpFNxcW75cIvJpmXB/516Uv/bT0r5b9IVRUY6xQSssr6GkcAc9dGuNe6/y7RMMnMUJmCWcNTSBgbHZeuG6P+eM/P+W/VRlPcRwSGoJMgvH265yKIq/L9LfzqKoZSXp0Em6cDy9BvU0Dhyy1PM4PAwMFWKs7kFZFsBsQQDlQAjr4a0MJAWxFdHAQAcI3sGHsO1dgAAAABJRU5ErkJggg==",o.prototype.offsetX=1,o.prototype.offsetY=-10,o.prototype.title=function(){return"Arrow Mark Left"},o.prototype.name=function(){return"Arrow Mark Left"},o.prototype._createTextPaneView=function(e){var t=new e(this,this._model,22,-3,"middle","left");return t.disableSelection(),t},inherit(r,n),r.prototype.image=new Image,r.prototype.image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAACBklEQVR4AWMgErAoxVoXgmgGKgEWxTCLVseWxP9yYRbl1DCYSdrXyEc5we5vyLzy/0D6l5SXgStInFwDGcVt1JQU42zfOHan/HebkfPfqSv5v1KszXNBGyU5kDzpRoqLcytGW5+wbY797zA59b9Zd8x/xylp/22bYv8rRlkdBqrgINVIVvlwi8k29dH/Xadn/Tftiv5v2B4Opt1mZP+3ro/6Lx9i3k1K+DLL+hpGmpYF/3efnvPfvCcWZCAcW/TG/XeflvMfFM4yfkZBxIQvo4SjlrZSnO1Hp57U/9b9Cf+NOiKQDQXxgeKJ/516Uv4D1b0XtdNUxRu+gkqC/MBwvGzXGvffflLKf+POSISBCAwWtweGMyi8laKtzjKIivLgCUfLRdYN0f9dpmX+N+mKghiCieHh6wIMb2tguCuEW84E6ccIR7kgk3SLqvD/njPzYOFICIPVeczI/W9WEfJfzs84HmQOIhw9DEyV422/ufSn/7fqg4cjIQxWZwUMd+e+1P9A/Z+lHbX1weHLqyEtrBRncwsYm/+RsWaBBz4DwfLoehRjrG8IKAgIgOMHiK2AOA6IM6G4CKgIr6EgeZA6qPoMII4FYksgFmCA5gwJIFYEYmUotiXSUFuYHqh+cXw5TZlIQ5WxaR4mhuLBZBkqBcT+oJjFg/3B6kgAnFANyniwFEQdJgAAOuN7Bp7MBuYAAAAASUVORK5CYII=",r.prototype.offsetX=-9,r.prototype.offsetY=0,r.prototype.title=function(){return"Arrow Mark Up"},r.prototype.name=function(){return"Arrow Mark Up"},r.prototype._createTextPaneView=function(e){var t=new e(this,this._model,0,18,"top","center");return t.disableSelection(),t},inherit(s,n),s.prototype.image=new Image, s.prototype.image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAB60lEQVR4AWPAAziAWJBXQ1oYSDMyUAlIALGVUpzNLQkPA1Mgm5kahioCcZxygt1/5Xjbb3JBJulAPiulhioDcSbIUJf+9P8WVeH/5cMtFwkqCfKDgoNiQ636Ev57zsz7b90Q/V8x2vqyhKOWNqHg4ARiKZAhaNgWiItAhhp1RPw374n97zIt879da9x/pTjbj7K+hpE4gwNqoD9IMzasWeDx37A9HIxNuqL+209K+e/Uk/rftCwYGBwWkxnExbkRwYHpTZBGgti4M/K/dX/Cf/fpOf9t6sHBcULcRk0JaAYT6YYiMDw4XKdn/bdtjv2vGGf7RtrXyAdoDguZhiKwaVf0f4fJqf8du1NAQfVXMcyiFWQwmYYisFl3zH+3GTn/Q+aV/3dsSfyvFGtdSLFLHaek/XfqSga59JdcmEU5yKVkh6lFbxzQhdn/bZtiga6zeS7lZeAKMpCC2E/87z4t5791fdR/xSirw4I2SnKg2CcxnSK8aw+MGKceSMTIh5h3Q0szRvJzFCQJgXLUexk/oyCQd8nP+8DE7jEjF+jd6P9K0VZnRe00VWHeJcfQDJChzn2p/80qQv4rhFvOZBAV5QF5l5LyNBZann6W8zOOp0Z5Kg7Eloox1jekHbX1qVLyQ2NVQEBBQIBU7wIAOFZ7BmG7RzYAAAAASUVORK5CYII=",s.prototype.offsetX=-19,s.prototype.offsetY=-10,s.prototype.title=function(){return"Arrow Mark Right"},s.prototype.name=function(){return"Arrow Mark Right"},s.prototype._createTextPaneView=function(e){var t=new e(this,this._model,-22,-3,"middle","right",!0);return t.disableSelection(),t},inherit(a,n),a.prototype.image=new Image,a.prototype.image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAB/UlEQVR4AWPAATj3Wij8J4RB6hhIAFIgTS9a8nBhmKFSpBiqDNJ0P80PF4YZqkyyobfD7HDh4WJolaKY+G5zhXvoMXva2xifoWB5dD07zeTvFKvxioDMFY6RFUgEGvzzQVk8OGafVib9v5fkhc9QkDxIHVj9vaKY/7vM5b+HS/JFA80TAhnKA8TGZSoiS057GYFiFqzhTpQTPkNB8iB1YPUnPQz+5ykKzQGaYwjE3CBDmUCuBWKHabqSZ0656oI0EY1B6idoSx4F6reDupIJFrTMQCwtxsYcvNZY5uU5T0OiDDwLdOFKI9knvMzM/kD9kmBz0AAbEKs6iHAX7zSX/3nF3xyvgZd8Tf9vM5P/ZiXAmQdNBazYEgIjEHOBwiVHXmjWcSctnAbeDLH5f8xR83+SjNBEoHo9sD4owGWwIBDb9mtJHMIVviDxDg3x3UB11kDMD9ZHADCDwkeAmdlvhZHMI2C4oRh4xl3//1IDmbvszAxeQHXiUPWEATR8lE0EubJB4QYMP7CBF31M/m82k/usy8uRCpRXAKsjEXCCwiteVqD/qIPG/+tBVv/3WCj8C5Pi7wCKawMxBwMZgBEaXlbtGuI7T7ro/G9QFdsI5JsDMR/+cCQcvuLsLAzubRoSa4FsJyAWBSdwsgEifKVBXoYmcBYGagCoQZzEGggAoyq6zKXuV5gAAAAASUVORK5CYII=",a.prototype.offsetX=-9,a.prototype.offsetY=-18,a.prototype.title=function(){return"Arrow Mark Down"},a.prototype.name=function(){return"Arrow Mark Down"},a.prototype._createTextPaneView=function(e){var t=new e(this,this._model,0,-23,"bottom","center");return t.disableSelection(),t},s.prototype.version=o.prototype.version=a.prototype.version=r.prototype.version=2,t.LineToolArrowMark=n,t.LineToolArrowMarkLeft=o,t.LineToolArrowMarkRight=s,t.LineToolArrowMarkUp=r,t.LineToolArrowMarkDown=a},TrvT:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"CompareDataWindowView",function(){return r}),n=i("mrSG"),o=i("it7y"),r=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._studyCompare=t,n}return n.__extends(t,e),t.prototype._updateImpl=function(){e.prototype._updateImpl.call(this),this._items[0].setTitle(this._studyCompare.guiPlotName(""))},t}(o.StudyDataWindowView)},TzTt:function(e,t,i){"use strict";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,o,r,s=n(e,t);if("firstElementChild"in s)i=s.firstElementChild;else for(i=null,o=0;o0?"+"+(r-r%1)+n:0===r?"":String(r-r%1+n))}}var o;i.d(t,"a",function(){return n}),o=i("jCNj")},"U0+/":function(e,t,i){"use strict";var n,o,r,s,a,l;i.r(t),i.d(t,"StudyMetaInfoRepository",function(){return l}),i("YFKU"),n=i("Eyy1"),o=i("0YCj"),r=i.n(o),s=i("uOxu"),a=Object(s.getLogger)("Chart.Studies.StudyMetaInfoRepository",{color:"#606"}),l=function(){function e(e){this._nextRequestNumber=1,this._rawStudiesMetaInfo=[],this._metaInfoStubs=[],this._metaInfoReceived=!1,this._onRawMetaReceivedDfd=null,this._tvScriptsRequestDfd=null,this._isReady=!1,this._metaInfoQueryQueue=[],this._fullMetaInfoQueryQueue=[],this._studiesMetaInfo=[],this._studiesMigrations=[],this._studyScriptingPkgVers=null,this._gateway=e}return e.prototype.getStudyScriptingPkgVers=function(){return this._studyScriptingPkgVers},e.prototype.requestMetaInfo=function(){var e,t=this;return this._requestStarted(),e=this._makeNextRequestId(),a.logNormal("Requesting metainfo #"+e),new Promise(function(i){a.logNormal("Requesting studies metadata #"+e),t._gateway.requestMetadata(e,function(n){var o;a.logNormal("Requesting studies metadata #"+e+" finished"),o=n.params[1].metainfo.slice(),t._processLibraryMetaInfo(o),t._requestFinished(),i()})})},e.prototype.requestAlertsMetaInfo=function(){throw new Error("not supported")},e.prototype.findById=function(e){var t,i;if(!this._isReady)return this._enqueueMetaInfoQuery(e);if(null!==(t=this._findStudyMetaInfo(e)))return Promise.resolve(t);if(void 0!==(i=this._metaInfoStubs.find(function(t){return t.metaInfoId===e})))return this._compileStub(i);throw new ReferenceError("unexpected study id:"+e)},e.prototype.findStubByPineId=function(e){return this._metaInfoStubs.find(function(t){return t.scriptIdPart===e})||null},e.prototype.compileStub=function(e){return this._compileStub(e)},e.prototype.isReady=function(){return this._isReady},e.prototype.findAll=function(){return this._isReady?Promise.resolve(this._studiesMetaInfo):this._enqueueFullMetaInfoQuery()},e.prototype.getAllStubs=function(){return this._metaInfoStubs},e.prototype.getInternalMetaInfoArray=function(){return this._studiesMetaInfo},e.prototype.getMigrations=function(){return this._studiesMigrations},e.prototype._processMigrations=function(e){throw new Error("not implemented")},e.prototype._addPineMetaInfo=function(e){throw new Error("not implemented")},e.prototype._processSiteMetaInfo=function(e,t){throw new Error("not implemented")},e.prototype._processLibraryMetaInfo=function(t){ for(var i=0;in?1:i=0&&e.h>=0,"Try to set invalid size to PaneWidget "+JSON.stringify(e)),this._size.equals(e)||(this._size=e,Object(l.resizeCanvas)(this._canvas,e),Object(l.resizeCanvas)(this._topCanvas,e),this._ctx=Object(o.ensureNotNull)(this._canvas.getContext("2d")),this._paneCell.style.width=e.w+"px",this._paneCell.style.height=e.h+"px",this._rowElement.classList.toggle("js-hidden",0===e.h))},e.prototype.width=function(){return this._size.w},e.prototype.height=function(){return this._size.h},e.prototype.getScreenshotData=function(){return{leftAxis:this._lhsPriceAxisesContainer.getScreenshotData(),rightAxis:this._rhsPriceAxisesContainer.getScreenshotData(),content:this._canvas.toDataURL(),contentWidth:this._size.w, contentHeight:this._size.h}},e.prototype.hardResetCanvas=function(){this._size.equals(new l.Size(0,0))||(Object(l.hardResizeCanvas)(this._canvas,this._size),Object(l.hardResizeCanvas)(this._topCanvas,this._size),this._lhsPriceAxisesContainer.hardResetCanvas(),this._rhsPriceAxisesContainer.hardResetCanvas())},e.prototype.updatePriceAxisWidgets=function(){var e,t,i,n,o;this._state&&(t=(e=this._chartModel()).paneForSource(e.mainSeries()))&&(i=e.priceScaleSlotsCount(),n=this._state.visibleLeftPriceScales(),o=this._state.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.getElement=function(){return this._rowElement},e.prototype.canvasElement=function(){return this._canvas},e.prototype.hasCanvas=function(e){return this._canvas===e||this._topCanvas===e},e.prototype._dataSourceAtPoint=function(e,t){var i,n,o,s,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,x,C,T,I=null,L=null,A=null;if(!this._state)return null;for(i=this._state.height(),n=this._state.width(),o=!1,s=function(e,t,i,n){var r=A?A.result():0;e.result()>r&&(A=e,I=t,L=i,o=n)},l=new r.Point(e,t),this._hitTestCustomSources(this._state.customSources(a.CustomSourceLayer.Foreground),l,s),c=this._state.hitTestSources(),u=this._chartUndoModel(),h=c.length;0=0;--f)(m=v[f].renderer(i,n))&&m.hitTest&&(y=m.hitTest(l))&&s(y,g,m,!1);if(this.containsMainSeries()){for(S=u.barsMarksSources(),h=0;h=0;--n)if(0!==(s=(r=e[n]).paneViews(h)).length)for(a=s.length-1;a>=0;--a)l=r===_,null!==(c=s[a].renderer(d,p,l))&&null!==(u=c.hitTest(t))&&i(u,r,c,!0)},e.prototype._tryStartMovingLineTool=function(e,t,i,s){var a,l,c,u,h,d;return!(null===t.source||!t.source.movable()||null!==this._startTrackPoint)&&(this._preventSourceChange?(this._startMoveLineToolParams=null,!1):(a=this._chartUndoModel(),l=Object(o.ensureNotNull)(Object(o.ensureNotNull)(this._state).mainDataSource()).firstValue(), c=Object(o.ensureNotNull)(t.source.priceScale()).coordinateToPrice(e.localY,Object(o.ensureNotNull)(l)),u=n(t.source)?a.selection().sources():[t.source],h=new r.Point(e.localX,e.localY),d={index:s,price:c},this._startMoveLineToolParams={source:u,startPoint:{logical:d,screen:h},data:t.hittest&&t.hittest.data(),envState:i},!0))},e.prototype._chartModel=function(){return this._chart.model().model()},e.prototype._chartUndoModel=function(){return this._chart.model()},e.prototype._onStateDestroyed=function(){this._state&&this._state.onDestroyed().unsubscribe(this,this._onStateDestroyed),this._state=null},e}()},UJLt:function(e,t,i){"use strict";var n,o,r,s,a;Object.defineProperty(t,"__esModule",{value:!0}),t.SaveRenameDialog=void 0,n=function(){function e(e,t){var i,n;for(i=0;i0&&void 0!==arguments[0]?arguments[0]:{},i=t.fields,n=t.confirm,o=t.title,r=void 0===o?"":o,s=t.destroyOnClose,a=void 0===s||s,l=t.modal,c=void 0!==l&&l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._$form=$("

"),this._fields=i,this._appendFieldsToForm(),this._title=r,this._destroyOnClose=a,this._modal=c,this._isConfirmDialogOpened=!1,n&&(this._needCheckConfirm=!0,this._shouldShowConfirm=n.shouldShowDialog,this._getConfirmMessage=n.getMessage)}return n(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(),i=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[a].select()})});return i}},{key:"_appendFieldsToForm",value:function(){var e=this;this._fields.forEach(function(t){t.appendTo(e._$form)})}},{key:"_createDialog",value:function(){var e=this,t=470,n=13;return new Promise(function(o){Promise.all([i.e(1),i.e("dialogs-core"),i.e(2),i.e(0),i.e("create-dialog")]).then(function(r){var s=i("YDhE").createDialog;o(s({type:e._modal?"modal":"popup",title:e._title,content:e._$form,actionsWrapTemplate:'
',width:t,destroyOnClose:e._destroyOnClose,isClickOutFn:function(){if(e._isConfirmDialogOpened)return!1},actions:[{name:"submit",type:"primary",text:$.t("Save"),key:n,addClass:"js-submit-button"},{name:"cancel",type:"default",text:$.t("Cancel"),method:"close",addClass:"js-cancel-button"}]}))}.bind(null,i)).catch(i.oe)})}},{key:"_onSubmit",value:function(e,t){var i=this,n=this._validate();if(n)e.error(n.error),n.focus();else{if(!this._needCheckConfirm)return t(this._collectValues(),e),void e.close() ;Promise.resolve(this._shouldShowConfirm(this._collectValues())).then(function(n){if(!n)return t(i._collectValues(),e),void e.close();i._showConfirmDialog().then(function(n){n===s&&(e.focus(),i._fields[a].focus()),n===r&&(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,o.createConfirmDialog)({type:"modal",content:i}).then(function(i){i.on("action:yes",function(e){t(r),e.close()}),i.on("afterClose",function(){t(s),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}()},UlDV:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"RestrictedToolsetBootloader",function(){return r}),n=i("mrSG"),o=i("cZRT"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype._startLoading=function(){return Promise.all([i.e("react"),i.e(8),i.e(11),i.e(22),i.e(31),i.e(37),i.e(41),i.e(5),i.e(3),i.e(25),i.e("restricted-toolset")]).then(i.bind(null,"miV2")).then(function(e){return e.getRestrictedToolSet()})},t}(o.a)},UxRM:function(e,t,i){"use strict";function n(e){this.items=e.items,this.barSpacing=e.barSpacing,this.lineColor=e.lineColor,this.lineWidth=e.lineWidth,this.lineStyle=e.lineStyle}var o=i("aO4+").Point,r=i("GEp6").distanceToSegment,s=i("Zp/P").selectionTolerance,a=i("VdBB").HitTestResult;n.prototype.draw=function(e){var t,i,n,o,r,s,a,l,c=!1;for(n=0;ne.price?1:-1,e.price=this.screenPointToPoint({x:n.x,y:o.y+l}).price},n.prototype.addPoint=function(e,t,i){var n=s.prototype.addPoint.call(this,e,t,i);return n&&(this._fakePointAdded=!1),n},n.prototype.setPoint=function(e,t,i){var n,s,a,l,c=Object.assign({},t),u=this.pointToScreenPoint(this._points[0])[0],h=this.pointToScreenPoint(this._points[1])[0],d=this.pointToScreenPoint(this._points[2])[0];switch(e){case 0:if(i&&i.shift()){this._snapPoint45Degree(c,this._points[1]),this._points[0]=c,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}u=this.pointToScreenPoint(c)[0],n=h.subtract(u),s=u.add(h).scaled(.5),a=(a=new o(-n.y,n.x)).normalized(),d=s.add(a.scaled(this._dist)),d=this.screenPointToPoint(d),this._points[0]=c,this._points[2]=d;break;case 1:if(i&&i.shift()){this._snapPoint45Degree(c,this._points[0]),this._points[1]=c,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}n=(h=this.pointToScreenPoint(c)[0]).subtract(u),s=u.add(h).scaled(.5),a=(a=new o(-n.y,n.x)).normalized(),d=s.add(a.scaled(this._dist)),d=this.screenPointToPoint(d),this._points[1]=c,this._points[2]=d;break;case 2:case 3:c=this.pointToScreenPoint(c)[0],l=r(u,h,c).distance,n=h.subtract(u),s=u.add(h).scaled(.5),a=(a=new o(-n.y,n.x)).normalized(),d=s.add(a.scaled(l)),d=this.screenPointToPoint(d),this._points[2]=d}this.normalizePoints()},n.prototype.pointsCount=function(){return 3},n.prototype.title=function(){return"Ellipse"}, n.prototype.name=function(){return"Ellipse"},n.version=2,n.prototype.migrateVersion=function(e,t,i){var n,o,r;1===e&&2===this._points.length&&(n=this._points[0].price,o=.5*(this._points[0].price+this._points[1].price),this._points[0]={price:o,index:this._points[0].index},this._points[1]={price:o,index:this._points[1].index},this._points.push({price:n,index:this._points[0].index})),1===e&&2===this._timePoint.length&&(n=this._timePoint[0].price,o=.5*(this._timePoint[0].price+this._timePoint[1].price),this._timePoint[0].price=o,this._timePoint[1].price=o,r={price:n,offset:this._timePoint[0].offset,time_t:this._timePoint[0].time_t},this._timePoint.push(r))},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return l.LineToolEllipseStylesPropertyPage},t.LineToolEllipse=n},V3Oj:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolText";var n=t||new l("linetooltext");n.hasChild("text")||n.addChild("text",new a(window.t("Text"))),n.addExclusion("text"),r.call(this,e,n),this._timeScale=e.timeScale(),this._barSpacing=e.timeScale().barSpacing(),i.e("lt-pane-views").then(function(e){var t=i("mr3a").TextPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}function o(e,t){var i=t||new l("linetooltextabsolute");i.locked.value()||i.locked.setValue(!0),n.call(this,e,i)}var r=i("Ss5c").LineDataSource,s=i("fgLi").DataSource,a=i("tc+8"),l=i("Ocx9").DefaultProperty,c=i("hayr").propertyPages;inherit(n,r),n.MIN_WIDTH=100,n.prototype.setPoint=function(e,t){var i,o,r=this.properties();if(0===e&&r.wordWrapWidth&&r.wordWrapWidth.value()){if(i=r.locked&&r.locked.value()?this.fixedPoints()[0].x:this._timeScale.indexToCoordinate(this.points()[0].index),o=this._timeScale.indexToCoordinate(t.index)-i-~~(r.fontsize.value()/6),!isFinite(o))return;r.wordWrapWidth.setValue(Math.max(n.MIN_WIDTH,o))}},n.prototype.pointsCount=function(){return 1},n.prototype.title=function(){return window.t("Text",{context:"tool"})},n.prototype.name=function(){return"Text"},n.prototype.setPriceScale=function(e){s.prototype.setPriceScale.call(this,e),e&&e.priceRange()&&(this._priceDencity=e.height()/e.priceRange().length(),this._isPriceDencityLog=e.isLog())},n.prototype.restoreSize=function(){this._barSpacing=this._model.timeScale().barSpacing(),this._priceDencity=this.priceScale().height()/this.priceScale().priceRange().length(),this.updateAllViews(),this._model.updateSource(this)},n.prototype.applyTemplate=function(e){delete e.locked,delete e.text,r.prototype.applyTemplate.call(this,e)},inherit(o,n),o.prototype.title=function(){return window.t("Anchored Text")},o.prototype.name=function(){return"Anchored Text"},n.prototype.state=function(e){var t=r.prototype.state.call(this,e);return e&&(t.state.fixedSize=!1),t},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return c.LineToolTextStylesPropertyPage},t.LineToolText=n,t.LineToolTextAbsolute=o},VNzU:function(e,t,i){"use strict";function n(e){return"s"===e} function o(e){return!n(e)}var r,s,a,l;i.r(t),r=i("mrSG"),i("Dq3s"),i.d(t,"layouts",function(){return l}),i.d(t,"isSingleLayout",function(){return n}),i.d(t,"isMultipleLayout",function(){return o}),s={s:{title:"1 chart",count:1,sizer:function(e,t){if(0!==t)throw new RangeError("invalid index");return e}}},a={},l=r.__assign({},s,a)},VVxS:function(e,t,i){"use strict";var n,o=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()};o.prototype.length=0,o.prototype.isAvailable=!1,o.prototype.localStorage={"tvlocalstorage.available":"false"},o.prototype._updateLength=function(){var e,t;if(this.isAvailable)this.length=this.localStorage.length;else{for(t in e=0,this.localStorage)this.localStorage.hasOwnProperty(t)&&e++;this.length=e}},o.prototype.key=function(e){return this.isAvailable?this.localStorage.key(e):Object.keys(this.localStorage)[e]},o.prototype.getItem=function(e){return this.isAvailable?this.localStorage.getItem(e):this.localStorage[e]},o.prototype.setItem=function(e,t){this.isAvailable?this.localStorage.setItem(e,t):this.localStorage[e]=t,this._updateLength()},o.prototype.removeItem=function(e){this.isAvailable?this.localStorage.removeItem(e):delete this.localStorage[e],this._updateLength()},o.prototype.clear=function(){this.isAvailable?this.localStorage.clear():this.localStorage={},this._updateLength()},(n=function(e){this.storage=e}).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 o,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 n});var n=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,t){var n,o,r,s,a,l;i("qFKp"),n=i("dTSQ").regExpEscape,o=i("FBuY").TVXWindowEvents,r=i("VVxS").TVLocalStorage,s=i("aIyQ"),a=["s.tradingview.com","betacdn.tradingview.com"],l=window.TVSettings=function(){function t(e){return w+"."+e}function i(e,t){var i;return i=P[e],window.is_authenticated&&!k||null!=i||(i=P[e]),null==i?t:i}function c(e,t,i){i=i||{};var n=""+t;return P[e]!==n&&(P[e]=n,d(e)),i.forceFlush&&!T&&(T=setTimeout(function(){T=void 0,p()},b)),l}function u(e,t){return t=t||{},null!=P[e]&&(delete P[e],d(e)),t.forceFlush&&p(),l}function h(){C=void 0,x.length&&p()}function d(e){if(M)null==P[e]?M.removeValue(e):M.setValue(e,P[e]);else if(!window.is_authenticated||k)try{ null==P[e]?r.removeItem(t(e)):r.setItem(t(e),P[e])}catch(e){}else x.push(e),C||(C=setTimeout(h,S));o.emit("settings",JSON.stringify({key:e,value:P[e]}))}function p(t){e.enabled("widget")||window.is_authenticated&&!k&&x.length}function _(){return Object.keys(P)}function f(e){for(var t=0;t=0;i--)e.test(o[i])&&r.push(o[i]),e.lastIndex=0;return r},sync:function(t){M?m(M.initialSettings||{}):window.is_authenticated&&!k?m(t||{}):(function(){var e,t,i,n;if(TradingView.onWidget()&&a.includes(window.location.host))for(e="tradingview.",t=r.length;t--;)0===(i=r.key(t)).indexOf(e)&&(n=i.replace(e,w+"."),r.setItem(n,r.getItem(i)), r.removeItem(i))}(),function(){var t,i,n,o,s;for(P={},t=w+".",i=!e.enabled("save_chart_properties_to_local_storage"),n=r.length;n--;)(o=r.key(n))&&o.substring(0,t.length)===t&&(s=o.substring(t.length),i&&!f(s)||(P[s]=r.getItem(o)))}()),L.fire()},onSync:L,setSettingsAdapter:function(e){M=e}})}(),t&&t.exports&&(t.exports=l)}).call(this,i("Kxc7"),i("YuTi")(e))},VfPj:function(e,t,i){"use strict";function n(e){this._items=e.items,this._y=e.y,this._h=e.h,this._w=e.w}n.prototype.draw=function(e){},n.prototype.drawBackground=function(e){var t,i,n;for(e.save(),e.translate(-.5,-.5),t=0;tc[c.length-1].time+u)return null;for(t=null,i=0;i0?this._logMessage("Bars to return for request {0}: total {1} bars in [{2} ... {3}] ".format(e.key,s.count(),o(s.bars[0].time),o(s.bars[s.count()-1].time))):this._logMessage("Request {0}. Nothing to return.".format(e.key)),t.barset=s,(i=this._inGapNextTime(r.from))?(this._logMessage("Request {0} is in gap, nextTime = {1}".format(e.key,o(1e3*i))),s.nextTime=i):0===s.count()&&(n=this._cache.bars.length&&this._cache.bars[this._cache.bars.length-1].time/1e3)&&r.from>n&&(this._logMessage("Request {0} is in gap, nextTime = {1}".format(e.key,o(1e3*n))),s.nextTime=n||void 0),this._endOfData&&null!==this._leftDate&&e.range.from<=this._leftDate&&(s.endOfData=!0),e.onHistoryCallback(s)},e.prototype._createBarset=function(e){var t=Object(s.lowerbound)(this._cache.bars,1e3*e,function(e,t){return e.time0?(this._emptyResponsesCount=0,this._processFullBarset(e,t)):(this._emptyResponsesCount+=1,this._processEmptyBarset(t)),this._processPendingSubscribers()},e.prototype._processEmptyBarset=function(t){this._logMessage("Receiving bars: barset is empty"),t&&t.nextTime?(this._logMessage("Next time received: `{0}`".format(o(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,n=e[e.length-1].time;this._logMessage("Receiving bars: total {0} bars in [{1} ... {2}] ".format(e.length,o(i),o(n))),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){var i,n=this._gaps.find(function(e){return e.from===t});n||(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){var i,n;if(void 0===t&&(t=!1),l.enabled("charting_library_debug_mode"))for(i=1;i=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=e.concat(this._cache.bars),this._checkBars(this._cache.bars,!0),!0},e.prototype._putToCacheNewBar=function(e){var t=this._cache.bars.length,i=e.time,n=0===t?NaN:this._cache.bars[t-1].time,r=0===t||n=this._actualCapacity&&(this._actualCapacity++,TradingView.resizeCanvas(this._canvas,this._currentWidth,this._rowHeight*this._actualCapacity),this._ctx=this._canvas.getContext("2d"),c.logDebug("TrendLineCache. Expanging cache to "+this._actualCapacity+" items")),t},n.prototype._effectiveState=function(e){var t,i={};return i.p1=Object.assign({},e.points()[0]),i.p2=Object.assign({},e.points()[1]),t=e.properties(),i.showBars=t.showBarsRange.value(),i.showTimeRange=t.showDateTimeRange.value(),i.showDistance=t.showDistance.value(),i.showPriceRange=t.showPriceRange.value(),i.showAngle=t.showAngle.value(),i.color=t.textcolor.value(),i.showAngle&&(i.priceRange=e.priceScale().priceRange().state(),i.barSpacing=e._model.timeScale().barSpacing()),i},n.prototype._effectiveStatesEquals=function(e,t){var i=function(e,t){return!(!e&&!t)&&(!(!e||t)||(!(e||!t)||(e.index!==t.index||e.price!==t.price)))};if(e&&!t)return!1;if(!e&&t)return!1;if(i(e.p1,t.p1))return!1;if(i(e.p2,t.p2))return!1;if(e.color!==t.color)return!1;if(e.showBars!==t.showBars)return!1;if(e.showTimeRange!==t.showTimeRange)return!1;if(e.showDistance!==t.showDistance)return!1;if(e.showPriceRange!==t.showPriceRange)return!1;if(e.showAngle!==t.showAngle)return!1;if(e.showAngle){if(e.priceRange.min!==t.priceRange.min)return!1;if(e.priceRange.max!==t.priceRange.max)return!1;if(e.barSpacing!==t.barSpacing)return!1}return!0},n.prototype.removeSource=function(e){if(this._sourcesToRow[e]){var t=this._sourcesToRow[e].row;this._ctx.save(),this._ctx.clearRect(0,this.topByRow(t),this._currentWidth,this.rowHeight(t)),this._ctx.restore(),delete this._sourcesToRow[e],delete this._rowsToSources[t]}},n.prototype._repaintSource=function(e,t,i){var n;this._ctx.save(),this._ctx.translate(0,this.topByRow(t)+.5),i.points[0]=new r(0,0),i.offsetX=0,i.offsetY=0,delete i.horzAlign,delete i.vertAlign,this._ctx.clearRect(0,0,this._currentWidth,this.rowHeight(t)),n=new u(i,{}).draw(this._ctx),this._sourcesToRow[e].width=n.width,this._ctx.restore()},n.prototype.updateSource=function(e,t){var i,n,o,r,s,a=e.properties().symbol.value() ;return this._currentSymbol!==a&&(c.logDebug("TrendLineCache. Clearing canvas because of changing symbol from "+this._currentSymbol+" to "+a),this._currentSymbol=a,this._sourcesToRow={},this._rowsToSources={}),i=e.id(),this._sourcesToRow[i]||(n=this._findEmptyRow(i),this._sourcesToRow[i]={effectiveState:null,row:n}),o=this._sourcesToRow[e.id()].effectiveState,r=this._effectiveState(e),this._effectiveStatesEquals(o,r)||(n=this._sourcesToRow[e.id()],s=t(),this._repaintSource(i,n.row,s),this._sourcesToRow[i].effectiveState=r),this._sourcesToRow[i]},inherit(o,s),o.prototype.stop=function(){s.prototype.stop.call(this),this._model._trendLineStatsCache.removeSource(this.id())},o.prototype.pointsCount=function(){return 2},o.prototype.title=function(){return"Trend Line"},o.prototype.name=function(){return"Trend Line"},o.prototype.canHasAlert=function(){return!0},o.prototype._getAlertPlots=function(){return[this._linePointsToAlertPlot(this._points,null,this.properties().extendLeft.value(),this.properties().extendRight.value())]},o.prototype.getStylesPropertyPage=function(){return l.LineToolTrendLineStylesPropertyPage},t.LineToolTrendLine=o},Wc1E:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h,d;i.r(t),i.d(t,"DataModeIndicator",function(){return d}),n=i("mrSG"),i("YFKU"),i("HbRj"),o=i("quTg"),r=i("r8Gw"),s={connecting:"tv-data-mode--connecting",delayed:"tv-data-mode--delayed",delayed_streaming:"tv-data-mode--delayed",endofday:"tv-data-mode--endofday",forbidden:"tv-data-mode--forbidden",realtime:"tv-data-mode--realtime",snapshot:"tv-data-mode--snapshot",loading:"tv-data-mode--loading",replay:"tv-data-mode--replay"},a={connecting:window.t("Connecting"),delayed:window.t("Delayed"),delayed_streaming:window.t("Delayed"),endofday:window.t("End of Day"),forbidden:window.t("Instrument is not allowed"),realtime:window.t("Real-time"),snapshot:window.t("Snapshot"),loading:"",replay:window.t("Replay Mode")},l={connecting:window.t("C",{context:"data_mode_connecting_letter"}),delayed:window.t("D",{context:"data_mode_delayed_letter"}),delayed_streaming:window.t("D",{context:"data_mode_delayed_streaming_letter"}),endofday:window.t("E",{context:"data_mode_end_of_day_letter"}),forbidden:window.t("F",{context:"data_mode_forbidden_letter"}),realtime:window.t("R",{context:"data_mode_realtime_letter"}),snapshot:window.t("S",{context:"data_mode_snapshot_letter"}),loading:"",replay:window.t("R",{context:"data_mode_replay_letter"})},u={streaming:"realtime"},h={classMap:s,classSuffix:"",data:{values:{update_mode:"connecting"}},labelMap:a,modeInterval:c=600,short:!1,shortLabelMap:l,showTooltip:!0,tooltipType:"custom"},d=function(e){function t(t){var i=e.call(this,t)||this;return i._quoteSessionPrefix="data-mode-indicator",i._componentClass="tv-data-mode",i._init(t),i}return n.__extends(t,e),t.prototype.getLabel=function(){return!0===this._shortMode?this._shortLabelMap[this._value]||"":e.prototype.getLabel.call(this)},t.prototype.setMode=function(e,t){this.update({values:{update_mode:e,update_mode_seconds:t}})},t.prototype.hide=function(){ this._el.classList.add("i-hidden")},t.prototype.show=function(){this._el.classList.remove("i-hidden")},t.prototype.getTooltipText=function(){var e="",t=this.getValue();if(""===t)return e;switch(t){case"delayed":e=window.t("Quotes are delayed by {0} min and updated every 30 seconds");break;case"delayed_streaming":e=window.t("Quotes are delayed by {0} min");break;default:e=this._labelMap[t]||e}return["delayed","delayed_streaming"].includes(t)&&(e=e.format(Math.round(this._modeInterval/60))),e},t.prototype._init=function(t){void 0===t&&(t={});var i=Object.assign({},h,t);this._modeInterval=i.modeInterval||c,this._shortLabelMap=i.shortLabelMap||l,e.prototype._init.call(this,i),this._render()},t.prototype._getValueFromData=function(e){var t;return t=void 0!==e.values&&void 0!==e.values.update_mode?e.values.update_mode:this.getValue(),u[t]||t},t.prototype._updateValue=function(t,i){void 0!==t.values&&void 0!==t.values.update_mode_seconds&&(this._modeInterval=t.values.update_mode_seconds),e.prototype._updateValue.call(this,t,i)},t}(r.a)},"Wh/T":function(e,t,i){"use strict";var n=i("Kxc7");window.onload=function(){location.hostname.indexOf(".")>=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,t=JSON.parse(urlParams.logo);return t.image&&(e="C",n.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(e){}},3e4)}},Wh6B:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolPrediction";var n=t||new s("linetoolprediction");n.merge({status:l.AlertStatus.Waiting}),r.call(this,e,n),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)}var o=i("Eyy1").ensureNotNull,r=i("Ss5c").LineDataSource,s=i("Ocx9").DefaultProperty,a=i("hayr").propertyPages,l=i("08i5");inherit(n,r),n.prototype.status=function(){return this._properties.status.value()},n.prototype.setStatus=function(e){return this._properties.status.setValue(e)},n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return"Forecast"},n.prototype.name=function(){return"Forecast"},n.prototype.restorePoints=function(e,t,i){r.prototype.restorePoints.call(this,e,t,i),this.checkAlert()},n.prototype.checkAlert=function(){var e,t,i,n;this._points.length<2||this._model.mainSeries().bars().isEmpty()||(e=this._points[1],this.status()?e.index>this._model.timeScale().baseIndex()&&this.setStatus(l.AlertStatus.Waiting):null!==(t=this._model.mainSeries().bars().valueAt(e.index))&&((i=this.direction())===l.Direction.Up&&t[TradingView.HIGH_PLOT]>=e.price?this.setStatus(l.AlertStatus.Success):i===l.Direction.Down&&t[TradingView.LOW_PLOT]<=e.price?this.setStatus(l.AlertStatus.Success):(n=o(this._model.mainSeries().bars().lastIndex()), e.index!==n&&this.setStatus(l.AlertStatus.Failure))))},n.prototype.addPoint=function(e){var t=r.prototype.addPoint.call(this,e);return t&&this.checkAlert(),t},n.prototype.endChanging=function(){r.prototype.endChanging.call(this),this.setStatus(l.AlertStatus.Waiting),this.checkAlert()},n.prototype.onData=function(e){r.prototype.onData.call(this,e),this.checkAlert()},n.prototype.endMoving=function(){r.prototype.endMoving.call(this),this.setStatus(l.AlertStatus.Waiting),this.checkAlert()},n.prototype.direction=function(){var e;return this.points().length<2?l.Direction.Up:(e=this.points()[0],this.points()[1].price>e.price?l.Direction.Up:l.Direction.Down)},n.prototype.getStylesPropertyPage=function(){return a.LineToolPredictionStylesPropertyPage},t.LineToolPrediction=n},WkOR:function(e,t,i){"use strict";function n(e,t){return void 0===e?void 0===t:void 0!==t&&(s?e.toUpperCase()===t.toUpperCase():e===t)}function o(e,t){return e.some(function(e){return n(t,e)})}var r,s;i.r(t),i.d(t,"areEqualSymbols",function(){return n}),i.d(t,"includesEqualSymbol",function(){return o}),r=i("Kxc7"),s=r.enabled("uppercase_instrument_names")},WkYF:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolDateRange";var n=t||new r("linetooldaterange");o.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)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages;inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return"Date Range"},n.prototype.name=function(){return"Date Range"},n.prototype.getStylesPropertyPage=function(){return s.LineToolDateRangeStylesPropertyPage},t.LineToolDateRange=n},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.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 n(e){var t;return void 0===e&&(e=location.host),t=["d33t3vvu2t2yu5.cloudfront.net","dwq4do82y8xi7.cloudfront.net","s.tradingview.com","s3.tradingview.com"],-1!==["i18n.tradingview.com","partial.tradingview.com","www.tradingview.com","wwwcn.tradingview.com"].indexOf(e)||-1!==t.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 o(){return"local"===n()}function r(){return"battle"===n()}function s(){return!r()}i.r(t),i.d(t,"environment",function(){return n}),i.d(t,"isLocal",function(){return o}),i.d(t,"isProd",function(){return r}),i.d(t,"isDebug",function(){return s})},XAms:function(e,t,i){"use strict";function n(e){e.preventDefault()}function o(e){var t=e.target;t&&!t.closest(r.join(", "))&&e.preventDefault()}i.d(t,"a",function(){return n}),i.d(t,"b",function(){return o}) ;var r=["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"]']},XFad:function(e,t,i){"use strict";function n(e,t){var i=t||this.createPropertiesObject("linetoolschiffpitchfork2");r.call(this,e,i),this._constructor="LineToolSchiffPitchfork2"}var o=i("5rJj"),r=i("aDyP").LineToolPitchfork;inherit(n,r),n.prototype.title=function(){return window.t("Schiff Pitchfork")},n.prototype.name=function(){return"Schiff Pitchfork"},n.prototype.createPropertiesObject=function(e,t,i){return new o(e,t,i,{range:[0,8]})},t.LineToolSchiffPitchfork2=n},XPit:function(e,t,i){"use strict";function n(){var e=new Map;return c.forEach(function(t,i){e.set(t,o(t))}),e}function o(e){return l[e]}var r,s,a,l,c,u;i.r(t),i.d(t,"TimePointIndexSearchMode",function(){return a}),i.d(t,"seriesPlotFunctionMap",function(){return n}),i.d(t,"barFunction",function(){return o}),i.d(t,"SeriesData",function(){return u}),r=i("Eyy1"),s=i("k9/m"),function(e){e[e.FromLeft=-1]="FromLeft",e[e.FromRight=1]="FromRight"}(a||(a={})),l={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}},c=["open","high","low","close","hl2","hlc3","ohlc4"],u=function(){function e(){this.m_bars=new s.PlotList(n()),this.m_nsBars=new s.PlotList(n())}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()?this.nsBars().search(e,t):Object(r.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){var n,o,r,s;if(i===a.FromRight)return n=function(i,n){var o=n[t];return void 0!==o&&null!==o&&e>=o},null!==(o=this.m_bars.findLast(n))?o.index:null!==(r=this.m_nsBars.findLast(n))?r.index:this.m_bars.firstIndex();if(i===a.FromLeft)return s=function(i,n){var o=n[t];return void 0!==o&&null!==o&&e<=o},null!==(o=this.m_bars.findFirst(s))?o.index:null!==(r=this.m_nsBars.findFirst(s))?r.index:this.m_bars.lastIndex();throw new Error("plotValueToTimePointIndex: unsupported search mode")},e}()}, XUCF:function(e,t,i){"use strict";function n(e,t,i){this._source=e,this._index=t,this._bars=i||[]}function o(e,t,n){var r,l;this._constructor="LineToolGhostFeed",t?(r=t)._source=this:r=new a("linetoolghostfeed"),n||(l=Math.round(this.calculateATR(e)),r.averageHL.setValue(l)),s.call(this,e,r),this._segments=[],r.averageHL.listeners().subscribe(this,o.prototype.regenerate),r.variance.listeners().subscribe(this,o.prototype.regenerate),r.points||r.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)}var r=i("Hr11").sign,s=i("Ss5c").LineDataSource,a=i("Ocx9").DefaultProperty,l=i("hayr").propertyPages;n.prototype.setBars=function(e){this._bars=e||[]},n.prototype.clone=function(e){return new n(e,this._index,TradingView.clone(this._bars))},n.prototype.createBar=function(){var e,t,i,n=this._source.properties().averageHL.value(),o=this._source.properties().variance.value()/100,r=this._source._model.mainSeries().base(),s=Math.random(),a=n*(1-2*s)*o;return i=(t=a-(e=n*(1+(.5-(s=Math.random()))*o))/2)+e,{o:(t+Math.random()*e)/r,h:i/r,l:t/r,c:(t+Math.random()*e)/r}},n.prototype.generate=function(){var e,t,i,n,o,s;if(this._bars=[],t=(e=this._source.points())[this._index],i=e[this._index+1],t&&i&&t.index!==i.index)for(this._avgHL=this._source.properties().averageHL.value(),this._variance=this._source.properties().variance.value()/100,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())},n.prototype.bars=function(){return this._bars},n.prototype.setSize=function(e){if(e0&&this._points[this._points.length-1].index===e.index){for(this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),t=0;t1&&this.generateBars(this._points.length-2),i||this._finished},o.prototype.finish=function(){this._finished=!0,this._lastPoint=null,this.normalizePoints(),this.createServerPoints()},o.prototype.setPoint=function(e,t,i){var n,o;s.prototype.setPoint.call(this,e,t,i),e>0&&(n=this.points()[e-1],o=t.index-n.index,this._segments[e-1].setSize(Math.abs(o))),e>1)],t)?(n=a+1,r-=s+1):r=s;return n}function r(e,t,i,r){return void 0===i&&(i=0),void 0===r&&(r=e.length),o(e,t,n,i,r)}function s(e,t,i,n,o){var r,s,a;for(void 0===n&&(n=0),void 0===o&&(o=e.length),r=o-n;0>1)])?r=s:(n=a+1,r-=s+1);return n}function a(e,t,i,o){return void 0===i&&(i=0),void 0===o&&(o=e.length),s(e,t,n,i,o)}function l(e,t){return e.filter(function(e){return!t.includes(e)})}function c(e,t){var i=e.indexOf(t);return i<0?e.slice():[t].concat(e.slice(0,i)).concat(e.slice(i+1))}i.r(t),i.d(t,"lowerbound",function(){return o}),i.d(t,"lowerbound_int",function(){return r}),i.d(t,"upperbound",function(){return s}),i.d(t,"upperbound_int",function(){return a}),i.d(t,"subtract",function(){return l}),i.d(t,"moveToHead",function(){return c})},YCFM:function(e,t,i){},"Ye2/":function(e,t,i){"use strict";var n;i.r(t),i.d(t,"LineToolBarsPatternMode",function(){return n}),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"}(n||(n={}))},Yj6H:function(e,t,i){"use strict";var n,o,r,s,a,l;i.r(t),i.d(t,"PriceScaleBase",function(){return l}),n=i("Eyy1"),o=i("aIyQ"), r=i.n(o),s=i("Qb4w"),a=i("TTFo"),l=function(){function e(){this._marksCache=null,this._onMarksChanged=new r.a}return e.prototype.onMarksChanged=function(){return this._onMarksChanged},e.prototype.priceRangeInPrice=function(){var e,t,i;return this.isEmpty()?null:null===(e=this.mainSource())?null:(t=Object(n.ensureNotNull)(e.firstValue()),i=this.height(),{from:this.coordinateToPrice(i-1,t),to:this.coordinateToPrice(0,t)})},e.prototype.setPriceRangeInPrice=function(e){var t,i,n,o,r,l,c;this.isPercentage()||this.isIndexedTo100()||(i=(t=this.isInverted())?this.bottomMargin():this.topMargin(),n=t?this.topMargin():this.bottomMargin(),r=(o=this.isLog())?Object(a.toLog)(e.from):e.from,r+=n*(c=(l=o?Object(a.toLog)(e.to):e.to)-r),l-=i*c,this.setMode({autoScale:!1}),this.setPriceRange(new s.PriceRange(r,l)),this._marksCache=null,this._onMarksChanged.fire())},e}()},Yjuu:function(e,t,i){"use strict";function n(){a.call(this)}function o(e,t){this._constructor="LineToolFibSpeedResistanceArcs";var o=t||this.createPropertiesObject("linetoolfibspeedresistancearcs");r.call(this,e,o),e._fibSpeedResistanceArcsLabelsCache||(e._fibSpeedResistanceArcsLabelsCache=new n),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)}var r=i("Ss5c").LineDataSource,s=i("5rJj"),a=i("xUGI"),l=i("hayr").propertyPages;inherit(n,a),n.prototype.levelsCount=function(){return o.LevelsCount},inherit(o,r),o.LevelsCount=11,o.prototype.levelsCount=function(){return o.LevelsCount},o.prototype.pointsCount=function(){return 2},o.prototype.title=function(){return"Fib Speed Resistance Arcs"},o.prototype.name=function(){return"Fib Speed Resistance Arcs"},o.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},o.prototype.createPropertiesObject=function(e,t,i){return new s(e,t,i,{range:[1,11]})},o.prototype.getStylesPropertyPage=function(){return l.LineToolFibSpeedResistanceArcsStylesPropertyPage},t.LineToolFibSpeedResistanceArcs=o},YlKu:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"ApplyLineToolTemplateUndoCommand",function(){return r}),n=i("mrSG"),o=i("RDU5"),r=function(e){function t(t,i,n){var o=e.call(this,n)||this;return o._source=t,o._newState=i,o._oldState=t.properties().state(),o}return n.__extends(t,e),t.prototype.redo=function(){this._source.applyTemplate(this._newState)},t.prototype.undo=function(){this._source.applyTemplate(this._oldState)},t}(o.UndoCommand)},YmeR:function(e,t,i){function n(e,t,i,n,s){i?(o.call(this,e,t,!0,i,n),s?e.update({onExecute:s.bind(this)}):e.update({onExecute:this.onActionCallback.bind(this)})):r.logDebug("Missed undo model")}var o=i("2h0C").Binding,r=i("uOxu").getLogger("Chart.PropertyPage.ActionBinder");inherit(n,o),n.prototype.onActionCallback=function(e){this._undoModel.setProperty(this._property,this.value(),this._undoText)},n.prototype.value=function(){return this.control().isChecked()},n.prototype.setValue=function(e){this.control().update({ checked:Boolean(e)})},t.ActionBinder=n},YuHv:function(e,t,i){"use strict";function n(e,t){var i,n;return void 0===e&&(e=[]),void 0===t&&(t=[]),i=document.createElement("div"),n=document.createElement("div"),i.appendChild(n),i.classList.add(o.container),n.classList.add(o.inner),e.forEach(function(e){i.classList.add(o[e])}),t.forEach(function(e){i.classList.add(o[e])}),i}var o;i.d(t,"a",function(){return n}),o=i("AWC/")},Z0Sh:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolGannSquare";var n=t||this.createPropertiesObject("linetoolgannsquare");s.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)}var o,r,s=i("Ss5c").LineDataSource,a=i("5rJj"),l=i("hayr").propertyPages;inherit(n,s),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return"Gann Box"},n.prototype.name=function(){return"Gann Box"},o=[4.5,9,11.25,18,22.5,36,45],r=function(){for(var e=[],t=1e10,i=o.length-1,n=1,r=0,s=0;st?1:0}),e}(),n.prototype._alignPriceOnPattern=function(e,t){var i,n,r,s,a,l,c=Math.round(1e6*(e.price-t.price))/1e6;if(0===c)return t.price;for(i=o[0],n=o[o.length-1],r=1,s=Math.abs(c);s=0&&!(o[l]*r=0?a:-a),e},n.prototype._alignTimeOnPattern=function(e,t){var i,n=e.index-t.index;if(0===n)return 0;for(i=r.length-2;i>=0&&!(r[i]0?1:0,e.index=t.index+r[i],e},n.prototype._alignPointsFixedIncrement=function(e,t){return this._alignTimeOnPattern(e,t),this._alignPriceOnPattern(e,t),e},n.prototype._preparePoint=function(e,t){return t&&t.shift()&&0!==this._points.length&&this._alignPointsFixedIncrement(e,this._points[0]),s.prototype._preparePoint.call(this,e,t)},n.prototype.setPoint=function(e,t,i){if(i&&i.shift()){var n=0===e?this._points[1]:this._points[0];this._alignPointsFixedIncrement(t,n)}s.prototype.setPoint.call(this,e,t,i)},n.prototype.createPropertiesObject=function(e,t,i){return new a(e,t,i,{range:[1,7],prefixes:["h","v"],names:["coeff","color","visible"]})},n.prototype.getStylesPropertyPage=function(){return l.LineToolGannSquareStylesPropertyPage},t.LineToolGannSquare=n},Z8aO:function(e,t,i){"use strict";var n,o,r,s,a,l;i.r(t),i.d(t,"SeriesPriceLinePaneView",function(){return l}),n=i("mrSG"),o=i("aO4+"),r=i("k4w6"),s=i("8Uy/"),a=i("dfhE"),l=function(e){function t(t){var i=e.call(this,t)||this;return i._lineRendererData.linestyle=s.LINESTYLE_DOTTED,i}return n.__extends(t,e),t.prototype._updateImpl=function(){if(this._lineRendererData.visible=!1,this._series.properties().showPriceLine.value()&&this._series.properties().style.value()!==a.STYLE_HILO){var e=this._series.lastValueData(void 0,!0);e.noData||(this._lineRendererData.visible=!0,this._lineRendererData.points=[new o.Point(0,e.coordinate)], this._lineRendererData.color=this._series.priceLineColor(e.color),this._lineRendererData.width=this._model.timeScale().width(),this._lineRendererData.height=this._series.priceScale().height(),this._lineRendererData.linewidth=this._series.properties().priceLineWidth.value())}},t}(r.a)},ZAbA:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"SeriesDataEvents",function(){return r}),n=i("aIyQ"),o=i.n(n),r=function(){function e(){this._completed=new o.a,this._error=new o.a,this._symbolError=new o.a,this._symbolResolved=new o.a,this._seriesError=new o.a,this._symbolNotPermitted=new o.a,this._symbolGroupNotPermitted=new o.a,this._extendedHoursNotPermitted=new o.a,this._chartTypeNotPermitted=new o.a,this._intradaySpreadNotPermitted=new o.a,this._intradayExchangeNotPermitted=new o.a,this._customIntervalNotPermitted=new o.a,this._tickMarksRangeChanged=new o.a,this._barReceived=new o.a,this._messageReceived=new o.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.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.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}()},ZJKN:function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"BarsRange",function(){return o}),n=i("Eyy1"),o=function(){function e(e,t){Object(n.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";function n(){return r.getValue(c,l.defaultDateFormat)}function o(){u.setValue(l.defaultDateFormat),r.remove(c)}var r,s,a,l,c,u;i.r(t),i.d(t,"dateFormatProperty",function(){return u}),i.d(t,"removeSettingsValue",function(){return o}),r=i("Vdly"),s=i("tc+8"),a=i.n(s),l=i("e1ZQ"),c="date_format",u=new a.a(n()),r.onSync.subscribe(null,function(){return u.setValue(n())}),u.listeners().subscribe(null,function(){return r.setValue(c,u.value())})},"Zo2/":function(e,t,i){"use strict";(function(t,n){function o(e){var i,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w;this._options=Object.assign({},ye,e),i=this,this._guid=ee(),this._startSpinner(this._options.body.value()),o=this._options.content,r=this._options.readOnly,this._backgroundBasedTheme=new t("light"),this._removeMaximizeHotkey=null,r||(k.init(),s=function(e,t,i){var n=t.mainSeries().syncModel(),o=e.mainSeries().syncModel(),r=i;return n&&o&&(r=e._createSyncPoint(n,o).sourceTimeToTargetTime(i)),e.timeScale().points().roughIndex(r,o&&o.distance.bind(o))},k.createdLineTool.subscribe(null,function(e){var t,n,o;i._model&&(t=i._model.model(),e.model!==t&&(n=t.paneForSource(i._model.model().mainSeries()),o={index:s(t,e.model,e.point.timeStamp),price:e.point.price},i._model.createLineTool(n,o,e.linetool,e.properties,e.linkKey)))}),k.continuedLineTool.subscribe(null,function(e){var t,n,o;i._model&&(t=i._model.model(),e.model!==t&&(n={index:s(t,e.model,e.point.timeStamp),price:e.point.price},(o=i._model.lineBeingCreated())&&i._model.model().coninueCreatingLine(n,e.envState,!!e.finalState)&&e.finalState&&o.restoreExternalPoints(e.finalState)))}),k.cancelledLineTool.subscribe(null,function(e){if(i._model){var t=i._model.model();e.model!==t&&i._model.model().cancelCreatingLine()}}),k.beenSetLineToolLastPoint.subscribe(null,function(e){var t,n,o;i._model&&(t=i._model.model(),e.model!==t&&(n=t.lineBeingCreated())&&n.linkKey===e.linkKey&&(o={index:s(t,e.model,e.point.timeStamp),price:e.point.price},n.setLastPoint(o), n.updateAllViews(),t.invalidate(N.light())))}),k.startedMovingLineTool.subscribe(null,function(e){var t,n,o,r;i._model&&(t=i._model.model(),e.model!==t&&(n=function(e){return t.dataSources().filter(function(t){return t.linkKey===e})[0]},(o=e.linkKeys.map(function(e){return n(e)}).filter(function(e){return!!e})).length&&(r={index:s(t,e.model,e.point.timeStamp),price:e.point.price},i._model.model().startMovingSources(o,{logical:r},null,e.envState))))}),k.movedLineTool.subscribe(null,function(e){var t,n,o;i._model&&(t=i._model.model(),e.model!==t&&(n=function(t){return e.linkKeys.some(function(e){return t.linkKey===e})},t.sourcesBeingMoved().filter(function(e){return n(e)}).length&&(o={index:s(t,e.model,e.point.timeStamp),price:e.point.price},i._model.model().moveSources({logical:o},e.envState))))}),k.finishedMovingLineTool.subscribe(null,function(e){var t,n,o;i._model&&(t=i._model.model(),e.model!==t&&(n=t.sourcesBeingMoved()).length&&(o=function(t){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.controlBar||p.enabled("control_bar"))&&Promise.all([i.e(58),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._model&&this._adjustSize()}}.bind(this).bind(null,i)).catch(i.oe),this._containsData||this.createIndicatorImage(), this._options.noMouseWheelScroll||(this._jqMainDiv.mousewheel(this._onMousewheel.bind(this)),$.data(this._jqMainDiv[0],"mousewheel-page-height",100)),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.length=0,this._paneSeparators.length=0,this._update(N.full()))},o.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)},o.prototype._endRequestActive=function(){var e=this;this._justActivated&&setTimeout(function(){e._justActivated=!1},0)},o.prototype._requestActive=function(){this._beginRequestActive(),this._endRequestActive()},o.prototype.justActivated=function(){return this._justActivated},o.prototype._onMousewheel=function(e){var t,i,n,o,r,s,a,l;if(this.model().model().zoomEnabled()&&(TradingView.onWidget()||!parent||parent===window||!parent.IS_DEMO_PAGE)&&this.model()&&!this.noScroll&&!this.model().timeScale().isEmpty())return t=e.deltaFactor||100,i=e.deltaX*(t/100),n=e.deltaY*(t/100),o=e.pageX-5,r=this._paneWidgets[0].leftPriceAxisesContainer().getWidth(),s=this._timeAxisWidget.size.w,r&&(o=Math.max(0,o-r)),o=Math.min(o,s),a=p.enabled("right_bar_stays_on_scroll")?1:2*(o/s-.5),l=Math.min(1,Math.abs(n)),n>0?this.model().zoomIn(a,l):n<0&&this.model().zoomOut(a,l),i&&this.model().scrollChart(-80*i),!1},o.prototype.getStudyScriptingPkgVers=function(){return this._metaInfoRepository.getStudyScriptingPkgVers()},o.prototype.setTimezone=function(e){e&&K(e)?this._properties.timezone.setValue(e):console.warn("Incorrect timezone: "+JSON.stringify(e))},o.prototype.getTimezone=function(){return this._properties.timezone.value()},o.prototype.refreshMarks=function(){this.model().barsMarksSources().forEach(function(e){e.refreshData()})},o.prototype.clearMarks=function(){this.model().barsMarksSources().forEach(function(e){e.clearMarks()})},o.prototype.metaInfoRepository=function(){return this._metaInfoRepository},o.prototype._init=function(){var e,t,i=this;this.model()&&this.model().mainSeries().clearData(),this.initColors(),this._makeDefaultGui(),e=function(){i._checkObsoleteTimezone(),i._chartSession&&i._chartSession.connected()&&this._model.restart(),this._content&&(this.initColors(),this._updateGui(),this.update());var e=i._model.mainSeries();e.marketStatus.subscribe(function(t){ i.indicatorImage&&i._updateDataAndMarketStatus(t,e.status(),e.quoteData.update_mode_seconds)},{callWithLast:!0}),this._resizeHandler=function(){this._adjustSize(),this._model&&this._model.mainSeries().requestMoreData(),this.paint(),this.checkCompactMode(),this.resizeIndicator()}.bind(this),this._resizeHandler(),this._jqParent.append(this._jqMainDiv),this._spinner&&(this._spinner.stop(),delete this._spinner),_("chrome_canvas_fix")&&navigator.userAgent.match(/windows.+chrome/i)&&$(window).on("visibilitychange:chart_"+this._guid,function(e,t){if(t){for(var n=0;n'),this.$shield=$('
').appendTo(this.$element),this.$element.appendTo(t),this._showed=!1,this._cw.withModel(this,this._connectToModel)},o.LoadingScreen.prototype._connectToModel=function(){this._cw.model().mainSeries().dataEvents().messageReceived().subscribe(this,function(e){switch(e.method){case"symbol_error":e.params[1]!==d.PERMISSION_DENIED&&this.hide();break;case"series_error":p.enabled("hide_loading_screen_on_series_error")&&this.hide();break;case"series_completed":this.hide()}})},o.LoadingScreen.prototype.show=function(){this._cw._inLoadingState=!0,this._showed||(this._showed=!0,this._show())},o.LoadingScreen.prototype._show=function(){var e=this._cw.properties().paneProperties.background.value();this.$shield.css("background",e),this.$element.addClass("fade")},o.LoadingScreen.prototype.hide=function(){delete this._cw._inLoadingState,this._showed&&this._hide()},o.LoadingScreen.prototype._hide=function(){this._showed=!1,this.$element.removeClass("fade")},o.LoadingScreen.prototype.$canvas=null,o.LoadingScreen.prototype.context=null,o.LoadingScreen.prototype.isShown=function(){return this._showed},o.prototype.unsetActivePaneWidget=function(){this.activePaneWidget=!1},o.prototype.setActivePaneWidget=function(e){this.activePaneWidget=e},o.prototype.maximizedPaneWidget=function(){return this._maximizedPaneWidget},o.prototype.isMaximizedPane=function(){return null!==this._maximizedPaneWidget},o.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.updateIndicatorImagePosition(),this.updateCrossHairPositionIfNeeded()}},o.prototype._makePaneWidgetsAndSeparators=function(){var e,t,i,n,o=this._model.panes(),r=o.length,l=this._paneWidgets.length;for(e=r;e0&&(i=new a(this,e-1,e),this._paneSeparators.push(i),this._timeAxisWidget?i.jqRow.insertBefore(this._timeAxisWidget.getElement()):i.jqRow.appendTo(this._elMainTable)),this._timeAxisWidget?this._elMainTable.insertBefore(t.getElement(),this._timeAxisWidget.getElement()):this._elMainTable.appendChild(t.getElement());for(null!==this._timeAxisSeparator&&this._timeAxisSeparator.destroy(),this._timeAxisSeparator=new a(this,this._paneWidgets.length-1,0,!0),this._timeAxisSeparator.jqRow.insertBefore(this._timeAxisWidget.getElement()),e=0;e0;)for(i=(t=this._content.panes[e].sources).length;i-- >0;)if("MainSeries"===t[i].type)return t[i].state},o.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()}))},o.prototype.createSessionBreaksActions=function(e){var t=new L({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},o.prototype.updateActionForIntradayOnly=function(e){!e||!e instanceof L||e.update({disabled:!this.model().mainSeries().isIntradayInterval()})},o.prototype.withModel=function(e,t){ this.model()?t.call(e):this.modelCreated().subscribe(e,t,!0)},o.prototype.containsVolume=function(){return this.model().dataSources().some(function(e){return e instanceof w&&"Volume"===e.metaInfo().shortId})},o.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)})},o.prototype.containsStudy=function(e){return this.containsStudyByPredicate(function(t){return t.id===e||t.fullId===e})},o.prototype.isSmall=function(){return this._width()<550||this._height()<300},o.prototype.onWidget=function(){return this._onWidget},o.prototype.onCmeWidget=function(){return"cme"===this.widgetCustomer()},o.prototype.widgetCustomer=function(){return this._widgetCustomer},o.prototype._width=function(){return this._options.width.value()},o.prototype._height=function(){return this._options.height.value()},o.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()},o.prototype.chartSession=function(){return this._chartSession},o.prototype.maxLhsPriceAxisWidth=0,o.prototype.maxRhsPriceAxisWidth=0,o.prototype.GUIResetScales=function(){Q("GUI","Reset Scales");var e=this.model();e&&e.resetScales()},o.prototype.onLineCancelled=function(){k.resetToCursor()},o.prototype.createIndicatorImage=function(){var e=this;this._indicatorBindingPriceAxisName="right",this._indicatorImageMargin="marginRight",this.indicatorImage=this._jqParent[0].getElementsByClassName("chart-status-picture")[0],this.indicatorImage?this.indicatorImage.innerHTML="":(this.indicatorImage=this._jqParent.prop("ownerDocument").createElement("span"),this.indicatorImage.className="chart-status-picture",this._jqParent.append(this.indicatorImage)),this._options.marketStatusWidgetEnabled&&(this.indicatorText=$(''),this.indicatorText.appendTo(this.indicatorImage),this.indicatorDot&&this.indicatorDot.stop(),this.indicatorDot=new ne({el:this.indicatorText.find(".js-market-status")[0],classSuffix:"--for-chart"}),this.indicatorDot.start(),p.enabled("display_data_mode")&&($('').appendTo(this.indicatorText),this.dataModeIndicator&&this.dataModeIndicator.stop(),this.dataModeIndicator=new oe({el:this.indicatorText.find(".js-data-mode")[0],classSuffix:"--for-chart"}),this.dataModeIndicator.start())),e.withModel(null,function(){var t=e._model.mainSeries();t.onStatusChanged().subscribe(null,e.updateIndicatorImage.bind(e)),t.marketStatus.subscribe(e.updateIndicatorImage.bind(e)),e.updateIndicatorImage(),e.checkCompactMode(),e._model.onRearrangePanes().subscribe(null,function(){e.resetIndicatorSize(),e.resizeIndicator()})}), this._indicatorPriceAxisWidthChanged=this.getPriceAxisWidthChangedByName(this._indicatorBindingPriceAxisName),this._indicatorPriceAxisWidthChanged.subscribe(this,this.updateIndicatorImagePosition),this.updateIndicatorImagePosition()},o.prototype._updateDataWarningIndicator=function(){},o.prototype.updateIndicatorImage=function(){var e,t,i,n=this,o=this._model;o&&(t=(e=o.mainSeries()).status(),i=e.quoteData?e.quoteData.update_mode_seconds:null,n._updateDataAndMarketStatus(e.marketStatus.value(),t,i))},o.prototype.checkCompactMode=function(){this._jqMainDiv.toggleClass("i-compact",this._width()<=400),this.indicatorImage&&(this._indicatorWidth=this.indicatorImage.clientWidth)},o.prototype.getDataTextStatus=function(e){var t;switch(e){case d.STATUS_LOADING:case d.STATUS_RESOLVING:t="loading";break;case d.STATUS_INVALID_SYMBOL:t="invalid";break;case d.STATUS_NO_BARS:t="forbidden";break;case d.STATUS_DELAYED:t="delayed";break;case d.STATUS_DELAYED_STREAMING:t="delayed_streaming";break;case d.STATUS_EOD:case d.STATUS_PULSE:t="endofday";break;case d.STATUS_OFFLINE:t="connecting";break;case d.STATUS_SNAPSHOT:t="snapshot";break;case d.STATUS_READY:t="realtime";break;case d.STATUS_REPLAY:t="replay";break;default:t=e}return t},o.prototype._updateDataAndMarketStatus=function(e,t){var i;void 0!==this.indicatorText&&(i=this.getDataTextStatus(t),t===d.STATUS_LOADING||t===d.STATUS_RESOLVING?this.indicatorDot.setStatus("loading"):t===d.STATUS_INVALID_SYMBOL?this.indicatorDot.reset():i===t&&se.logWarn("unhandled data mode "+i),p.enabled("display_data_mode")&&this.dataModeIndicator.setMode(i),!["loading","invalid","replay"].includes(i)&&e?this.indicatorDot.setStatus(e,!0):"invalid"===i?this.indicatorDot.setStatus("invalid",!0):"replay"===i&&this.indicatorDot.setStatus("replay"),this.resizeIndicator())},o.prototype.resetIndicatorSize=function(){var e,t;if(this._paneWidgets[0]&&this._paneWidgets[0].statusWidget()&&ae)for(e=0;e650?(this.indicatorDot.setTooltipEnabled(!1),this.indicatorDot.disableShortMode()):n>550?(this.indicatorDot.setTooltipEnabled(!1), this.indicatorDot.disableShortMode()):(this.indicatorDot.setTooltipEnabled(!1),this.indicatorDot.enableShortMode())),p.enabled("display_data_mode")&&this.dataModeIndicator&&(n>650?(this.dataModeIndicator.setTooltipEnabled(!1),this.dataModeIndicator.disableShortMode()):n>550?(this.dataModeIndicator.setTooltipEnabled(!0),this.dataModeIndicator.enableShortMode()):(this.dataModeIndicator.setTooltipEnabled(!1),this.dataModeIndicator.enableShortMode()))},o.prototype.updateIndicatorImagePosition=function(){this.indicatorImage&&(this.indicatorImage.style[this._indicatorImageMargin]=this.getPriceAxisMaxWidthByName(this._indicatorBindingPriceAxisName)+"px")},o.prototype._getMainSeriesPaneWidget=function(){for(var e=0;e=3},inherit(o,r),o.version=2,o.LevelsCount=24, o.prototype.levelsCount=function(){return o.LevelsCount},o.prototype.stop=function(){r.prototype.stop.call(this),this._model._trendBasedFibExtensionLabelsCache.removeSource(this.id())},o.prototype.pointsCount=function(){return 3},o.prototype.title=function(){return"Trend-Based Fib Extension"},o.prototype.name=function(){return"Trend-Based Fib Extension"},o.prototype.migrateVersion=function(e,t,i){1===e&&this.properties().extendLines.setValue(!0)},o.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},o.prototype.createPropertiesObject=function(e,t,i){return new s(e,t,i,{range:[0,8]})},o.prototype.getStylesPropertyPage=function(){return l.LineToolTrendBasedFibExtensionStylesPropertyPage},t.LineToolTrendBasedFibExtension=o},"Zy3/":function(e,t,i){"use strict";i.r(t),i.d(t,"CompositeRenderer",function(){return n});var n=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.draw=function(e){for(var t=0;t=0;t--)null!==(i=this._renderers[t].hitTest(e))&&(null===n||i.result()>n.result())&&(n=i);return n},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 n;i.r(t),i.d(t,"LineEnd",function(){return n}),function(e){e[e.Normal=0]="Normal",e[e.Arrow=1]="Arrow",e[e.Circle=2]="Circle"}(n||(n={}))},a9Kt:function(e,t){e.exports=''},aDyP:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolPitchfork";var i=t||this.createPropertiesObject("linetoolpitchfork");o.call(this,e,i),this._properties.style.listeners().subscribe(this,n.prototype._recreatePaneView),this._recreatePaneView()}var o=i("Ss5c").LineDataSource,r=i("5rJj"),s=i("7KDR").Action,a=i("hayr").propertyPages,l=i("rCHB").LineToolPitchforkStyle,c=null;inherit(n,o),n.prototype.additionalActions=function(){var e,t,i=[],n=["Original","Modified Schiff","Inside","Schiff"];for(e=0;e<4;e++)t=new s({checked:this.properties().style.value()===e,checkable:!0,label:window.t(n[e]),payload:{target:this,value:e},onExecute:function(e){ var t=e.getPayload(),i=t.target,n=t.value;i.properties().style.setValue(n),i.updateAllViews(),i._model.updateSource(i)}}),i.push(t);return[i[0],i[3],i[1],i[2]]},n.prototype._recreatePaneView=function(){if(null!==c){var e=[];this._properties.style.value()===l.Original?e=[new c.PitchforkLinePaneView(this,this._model)]:this._properties.style.value()===l.Schiff?e=[new c.SchiffPitchforkLinePaneView(this,this._model)]:this._properties.style.value()===l.Schiff2?e=[new c.SchiffPitchfork2LinePaneView(this,this._model)]:this._properties.style.value()===l.Inside&&(e=[new c.InsidePitchforkLinePaneView(this,this._model)]),this._setPaneViews(e)}else i.e("lt-pane-views").then(function(e){null===c&&(c=i("cT+B")),this._recreatePaneView()}.bind(this).bind(null,i)).catch(i.oe)},n.prototype.pointsCount=function(){return 3},n.prototype.title=function(){return window.t("Pitchfork")},n.prototype.name=function(){return"Pitchfork"},n.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},n.prototype.createPropertiesObject=function(e,t,i){return new r(e,t,i,{range:[0,8]})},n.prototype.getStylesPropertyPage=function(){return a.LineToolPitchforkStylesPropertyPage},t.LineToolPitchfork=n},aILO:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolHeadAndShoulders";var n=t||new r("linetoolheadandshoulders");o.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)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages;inherit(n,o),n.prototype.pointsCount=function(){return 7},n.prototype.title=function(){return"Head and Shoulders"},n.prototype.name=function(){return"Head and Shoulders"},n.prototype.getStylesPropertyPage=function(){return s.LineToolLineTool5PointsPatternStylesPropertyPage},t.LineToolHeadAndShoulders=n},aIha:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolFlagMark";var n=t||new s("linetoolflagmark");r.call(this,e,n),i.e("lt-pane-views").then(function(t){var n=i("5Dp4").MarkPaneView,r=new n(this,e,this.image,25,25,-8,-21);r.setAnchors(new o(0,0)),this._setPaneViews([r])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("aO4+").Point,r=i("Ss5c").LineDataSource,s=i("Ocx9").DefaultProperty;inherit(n,r),n.prototype.image=new Image,n.prototype.image.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAsElEQVR4AWMYWcDExOS/YUd4hWF7+H90bNAePpO2liDwJTxyi2htyVXLvlBOWlry2bAtVIumwWXQERFF4zgJ20iPiP8JDCpLeqSuJ6ZdoRJ0SMIRx7QbQtmItgSXnGFbRCzMEnIzK8ISWgL6WzJqibGxsYaFhYUC7SxBWMQPNMjazMxMjebBZWhoKAq00NHc3FyL5nFiaWkpDTTYz8jISI/mEW9qaqoExGFgS+gFRgEAaE0hWxrw50oAAAAASUVORK5CYII=",n.prototype.pointsCount=function(){return 1},n.prototype.title=function(){return"Flag Mark"},n.prototype.name=function(){return"Flag Mark"},n.prototype.version=2,t.LineToolFlagMark=n},aIyQ:function(e,t,i){"use strict";(function(e){function t(){this._listeners=[]}function n(e){return!e.singleshot} i("uOxu").getLogger("Common.Delegate");t.prototype.subscribe=function(e,t,i){var n={object:e,member:t,singleshot:!!i};this._listeners.push(n)},t.prototype.unsubscribe=function(e,t){var i,n;for(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,t,i,o=this._listeners;for(this._listeners=this._listeners.filter(n),e=o.length,t=0;t0)},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)}},b1GK:function(e,t,i){"use strict";function n(){}function o(e){r(e),s(e)}var r,s;i.r(t),i.d(t,"addPerfMark",function(){return o}),r=console.timeStamp?console.timeStamp.bind(console):n,s=window.performance&&performance.mark?performance.mark.bind(performance):n},bKFv:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"StatsPosition",function(){return n}),function(e){e[e.Left=0]="Left",e[e.Center=1]="Center",e[e.Right=2]="Right"}(n||(n={}))},bOD6:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"TimeScaleVisibleRange",function(){return s}),n=i("ZJKN"),o=i("dfhE"), r=new Map([[o.STYLE_BARS,.1],[o.STYLE_RANGE,.1],[o.STYLE_CANDLES,.35],[o.STYLE_HOLLOW_CANDLES,.35],[o.STYLE_HILO,.35],[o.STYLE_HEIKEN_ASHI,.35]]),s=function(){function e(e,t){this._styleSpecificRanges=new Map,this._logicalRange=e,this._defaultStyle=t}return e.prototype.strictRange=function(e){var t,i;return null===this._logicalRange?null:(void 0===e&&(e=this._defaultStyle),void 0===(t=this._styleSpecificRanges.get(e))&&(i=(r.get(e)||0)/2,t=new n.BarsRange(Math.ceil(this._logicalRange.left()+i),Math.ceil(this._logicalRange.right()-i)),this._styleSpecificRanges.set(e,t)),t)},e.prototype.logicalRange=function(){return this._logicalRange},e.prototype.isValid=function(){return null!==this._logicalRange},e.invalid=function(){return new e(null,o.STYLE_CANDLES)},e}()},bOGh:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"UndoMacroCommand",function(){return r}),n=i("mrSG"),o=i("RDU5"),r=function(e){function t(t){var i=e.call(this,t,!1)||this;return i._subcommands=[],i}return n.__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}(o.UndoCommand)},bSeV:function(e,t){},bTqm:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolCypherPattern";var n=t||new r("linetoolcypherpattern");o.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)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("NJRZ").LineTool5PointsPattern;inherit(n,s),t.LineToolCypherPattern=n},bc0y:function(e,t,i){},beCu:function(e,t,i){"use strict";function n(e){return new a(e)}var o,r,s,a;i.r(t),i.d(t,"doAnimate",function(){return n}),o=i("mrSG"),r=i("j1f4"),s={from:0,duration:250,easing:r.easingFunc.easeOutCubic},a=function(){function e(e){var t,i=this;this._doing=!0,this._options=o.__assign({},s,e),t=performance.now(),window.requestAnimationFrame(function(e){i._animation(t,i._options.from,e)})}return e.prototype.stop=function(){this._doing=!1},e.prototype._animation=function(e,t,i){var n,o,r,s,a,l,c,u,h=this;this._doing?(o=(n=(i=!i||i<1e12?performance.now():i)-e)>=this._options.duration||t===this._options.to,l=this._options.from,c=this._options.to,u=this._options.easing(n/this._options.duration),r=l*(1-u)+c*u,a=(s=o?this._options.to:r)-t,this._options.onStep(a,s),o?this._finishAnimation():window.requestAnimationFrame(function(t){h._animation(e,s,t)})):this._finishAnimation()},e.prototype._finishAnimation=function(){this._options.onComplete&&this._options.onComplete()},e}()},biIa:function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i.d(t,"SeriesWaterlinePaneView",function(){return c}),n=i("mrSG"),o=i("aO4+"),r=i("k4w6"),s=i("//lt"),a=i("VdBB"),l=i("8Uy/"),c=function(e){function t(t){var i=e.call(this,t)||this,n={ cursorType:s.PaneCursorType.VerticalResize,pressedMouseMoveHandler:function(e){var i=t.priceScale(),n=t.properties().baselineStyle,o=i.height(),r=100-e.y/o*100,s=r<0?0:Math.round(10*r)/10;n.baseLevelPercentage.setValue(Math.max(Math.min(s,100),0))}};return i._lineRenderer.setHitTest(new a.HitTestResult(a.HitTestResult.CUSTOM_MOVE,n)),i._lineRendererData.visible=!0,i._lineRendererData.linestyle=l.LINESTYLE_SPARSE_DOTTED,i}return n.__extends(t,e),t.prototype._updateImpl=function(){var e=this._series.properties().baselineStyle,t=Math.abs(100-e.baseLevelPercentage.value());this._lineRendererData.width=this._model.timeScale().width(),this._lineRendererData.height=this._series.priceScale().height(),this._lineRendererData.points=[new o.Point(0,Math.round(this._lineRendererData.height*(t/100)))],this._lineRendererData.color=e.baselineColor.value()},t}(r.a)},brCa:function(e,t,i){"use strict";function n(e){return new Promise(function(t){Promise.all([i.e(1),i.e("dialogs-core"),i.e(2),i.e(0),i.e("create-dialog")]).then(function(n){var o=i("YDhE").createDialog;t(o(r.__assign({},s,e)))}.bind(null,i)).catch(i.oe)})}function o(e){n(e).then(function(e){return e.open()})}var r,s;i.r(t),i.d(t,"createNoticeDialog",function(){return n}),i.d(t,"showNoticeDialog",function(){return o}),r=i("mrSG"),i("YFKU"),s={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]}]}},"bv/X":function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolSineLine";var n=t||new r("linetoolsineline");o.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)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages;inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return"Sine Line"},n.prototype.name=function(){return"Sine Line"},n.prototype.getStylesPropertyPage=function(){return s.LineToolTimeCyclesPropertyPage},t.LineToolSineLine=n},"c0/O":function(e,t,i){"use strict";function n(e){this.items=e.items,this.height=e.height||e.width,this.width=e.width||e.height,this._color=e.color,this._borderColor=e.borderColor,this._vertOffset=e.vertOffset||0,e.textCache&&(this._textCache=e.textCache,this._textColor=e.textColor,this._textVertOffset=this._vertOffset>0?this.height:-this.height,this._textImageWidth=this._textCache.textImageWidth,this._textImageHeight=this._textCache.textImageHeight)}var o=i("aO4+").Point,r=i("VdBB").HitTestResult;n.prototype.draw=function(e){this.drawShape(e),this.drawText(e)},n.prototype.drawShape=function(e){throw new Error("Not implemented")},n.prototype.drawText=function(e){var t,i,n,o,r,s ;if(this._textCache)for(t=0,i=this.items.length;t0?"top":"bottom")},n.prototype.hitTest=function(e,t){var i,n,s,a,l,c,u,h,d,p,_,f=Math.max(this.height,this.width),m=this._vertOffset,y=this._textVertOffset;for(t=t||r.REGULAR,i=0;i0?0:-this._textImageHeight,c=m>0?this._textImageHeight:0,u=e.x,h=e.y,d=n.x-s,p=a+l,_=n.x+s,u>d&&u<_&&h>p&&h\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 o,r,s,a,l;i.r(t),i.d(t,"DEFAULT_SIZE",function(){return s}),i.d(t,"renderSpinnerTemplate",function(){return n}),i.d(t,"Spinner",function(){return l}),o=i("SzKR"),r=i("TzTt"),s="large",a=Object(r.b)(n()),l=function(){function e(e){this._shown=!1,this._el=a.cloneNode(!0),this.setSize(e||s)}return e.prototype.spin=function(e){return this._el.classList.add("tv-spinner--shown"),void 0===this._container&&(this._container=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 n=e[i];void 0!==n&&t._el.style.setProperty(i,n)}),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 n(e){return e.replace(/(@[^-]+-[^-]+).*$/,"$1")}i.r(t),i.d(t,"extractStudyId",function(){return n})},cKqi:function(e,t,i){"use strict";function n(e,t){this._source=e,this._model=t,this._points=[new s(0,0)],this._lineRenderer=new x}function o(e){return null==e[TradingView.OPEN_PLOT]}function r(e,t,i,n){this._waterlineView=null,l.call(this,e,t,i,n),this.m_data=new M(k(),o),this._formatter=null,this._paneView=null;var r=this;this.properties().minTick.listeners().subscribe(null,function(){r._recreateFormatter(),r.updateAllViews(),r._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._updateBarFunction()}var s=i("aO4+").Point,a=i("qJq3").Series,l=i("GVHu").Study,c=i("k9/m").PlotRowSearchMode,u=i("FBsw").OverlayPriceAxisView,h=i("KtbP").PanePriceAxisView,d=i("x0JF"),p=d.SeriesAreaPaneView,_=d.SeriesLinePaneView,f=d.SeriesHollowCandlesPaneView,m=d.SeriesCandlesPaneView,y=d.SeriesBarsPaneView,g=d.SeriesBaselinePaneView,v=i("biIa").SeriesWaterlinePaneView,S=i("2kV1").StudyStatusView,b=i("JjUe").OverlayDataWindowView,w=i("z8/4").OverlayLegendView,P=i("38az").SeriesBarColorer,x=i("l4sv").HorizontalLineRenderer,C=i("hayr").propertyPages,T=i("Kxc7"),I=i("6sst").OverlayStudyPriceLineAxisView,L=i("Qb4w").PriceRange,A=i("XPit").barFunction,k=i("XPit").seriesPlotFunctionMap,M=i("k9/m").PlotList,E=i("n5al").createSeriesFormatter,V=!T.enabled("hide_study_overlay_legend_item"),D=T.enabled("uppercase_instrument_names"),O=i("uOxu").getLogger("Chart.StudyOverlay"),B=T.enabled("study_overlay_compare_legend_option");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 s(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.points=this._points,e.color=this._color,e.linewidth=1,e.linestyle=CanvasEx.LINESTYLE_DOTTED,e.visible=this._visible,this._lineRenderer.setData(e),this._lineRenderer},inherit(r,l),r.prototype._showLastValueOnPriceScale=function(){return this._model.properties().scalesProperties.showSeriesLastValue.value()},r.prototype.symbol=function(){var e,t=this.properties().inputs.symbol.value(),i=this._resolvedSymbols?this._resolvedSymbols[t]:null;return e=i?i.name:t,D?e.toUpperCase():e},r.prototype.lastValueData=function(e,t,i){var n,o,r,s,l,u,h,d,p,_,f,m,y,g={noData:!0};if(this._model.timeScale().isEmpty()||null==this.priceScale()||this.priceScale().isEmpty()||this.data().isEmpty())return g;if(null===(n=this._model.timeScale().visibleBarsStrictRange()))return g;if(!this.properties().visible.value())return g;if(null==(o=this.nearestIndex(n.lastBar(),c.NearestLeft)))return g;if(s=null!==(r=this._lastNonEmptyPlotRow(TradingView.CLOSE_PLOT))&&n.contains(r.index),l=null!==r?r.value:null,null===(u=t||s?l:this.data().valueAt(o)))return g;if(h=this._barFunction(u),!isNumber(h))return g;if(d={noData:!1},i&&(d.price=h),!(p=this.firstValue()))return g;switch(d.text=this.priceScale().formatPrice(h,p),d.text=this.priceScale().formatPrice(h,p),d.formattedPriceAbsolute=this.priceScale().formatPriceAbsolute(h),d.formattedPricePercentage=this.priceScale().formatPricePercentage(h,p), d.floatCoordinate=this.priceScale().priceToCoordinate(h,p,!0),d.coordinate=Math.round(d.floatCoordinate),d.item=u,(_=this.properties()).style.value()){case a.STYLE_BARS:d.color=u[TradingView.OPEN_PLOT]<=u[TradingView.CLOSE_PLOT]?_.barStyle.upColor.value():_.barStyle.downColor.value();break;case a.STYLE_CANDLES:case a.STYLE_HOLLOW_CANDLES:d.color=u[TradingView.OPEN_PLOT]<=u[TradingView.CLOSE_PLOT]?_.candleStyle.upColor.value():_.candleStyle.downColor.value();break;case a.STYLE_LINE:d.color=_.lineStyle.color.value();break;case a.STYLE_AREA:d.color=_.areaStyle.color1.value();break;case a.STYLE_BASELINE:f=_.baselineStyle,m=this.priceScale(),y=Math.round(m.height()*(Math.abs(100-f.baseLevelPercentage.value())/100)),d.color=d.coordinate0),n?{left:0,right:1,totallySlots:e}:{left:1,right:0,totallySlots:e}):{left:o,right:r,totallySlots:o+r}},r.prototype.startScalePrice=function(e,t,i){e.startScalePrice(t,i)},r.prototype.scalePriceTo=function(e,t,i){e.scalePriceTo(t,i),this.mainSeries().priceScale().isLockScale()?this.lightUpdate():this.invalidate(this._paneInvalidationMask(e,L.Light)),this._setScalesResetAvailable(!0)},r.prototype.endScalePrice=function(e,t){e.endScalePrice(t),this.invalidate(this._paneInvalidationMask(e,L.Light))},r.prototype.startScrollPrice=function(e,t,i){e.startScrollPrice(t,i)},r.prototype.scrollPriceTo=function(e,t,i){e.scrollPriceTo(t,i),this.invalidate(this._paneInvalidationMask(e,L.Light))},r.prototype.endScrollPrice=function(e,t){e.endScrollPrice(t),this.invalidate(this._paneInvalidationMask(e,L.Light))},r.prototype.setPriceAutoScale=function(e,t,i){e.setPriceAutoScale(t,i),this.invalidate(this._paneInvalidationMask(e,L.Light))},r.prototype.restorePriceScaleState=function(e,t,i){e.restorePriceScaleState(t,i),this.invalidate(this._paneInvalidationMask(e,L.Light))},r.prototype.resetPriceScale=function(e,t){this._setScalesResetAvailable(!1),e.resetPriceScale(t),this.invalidate(this._paneInvalidationMask(e,L.Light))},r.prototype.updateScales=function(e,t){this._undoModel._chartWidget._updateScalesActions()},r.prototype.startScaleTime=function(e){this.m_timeScale.startScale(e)},r.prototype.mainSeriesScaleRatioProperty=function(){return this._mainSeriesScaleRatioProperty},r.prototype.mainSeriesScaleRatioPropertyOnChanged=function(){this._mainSeriesScaleRatioProperty.listeners().fire(this._mainSeriesScaleRatioProperty)},r.prototype.mainSeriesScaleRatio=function(){return G(this.m_timeScale,this.m_mainSeries.priceScale())},r.prototype.setMainSeriesScaleRatio=function(e){this.paneForSource(this.m_mainSeries).applyPriceScaleRatio(this.m_mainSeries.priceScale(),e)},r.prototype.scaleTimeTo=function(e){this.m_timeScale.scaleTo(e),this.recalculateAllPanes(),this.lightUpdate(),this._setScalesResetAvailable(!0)},r.prototype.endScaleTime=function(){this.m_timeScale.endScale(),this.lightUpdate(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudy(this.dataSources())},r.prototype.startScrollTime=function(e){this.m_timeScale.startScroll(e),this._isTimeScrolling=!0},r.prototype.scrollTimeTo=function(e){this.m_timeScale.scrollTo(e),this.recalculateAllPanes(),this.updateCrossHair(),this.lightUpdate(),this._setScalesResetAvailable(!0)},r.prototype.endScrollTime=function(){this.m_timeScale.endScroll(),this.lightUpdate(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudy(this.dataSources()),this._isTimeScrolling=!1},r.prototype.recalcStudyBasedLineTools=function(){this.dataSources().forEach(function(e){v(e)&&e.recalcStudyIfNeeded&&e.recalcStudyIfNeeded()})},r.prototype.recalcVisibleRangeStudy=function(e,t){ void 0!==this._recalcVRTimerId&&clearTimeout(this._recalcVRTimerId);var i=this;this._recalcVRTimerId=setTimeout(function(){i._recalcVisibleRangeStudy(e,t)},500)},r.prototype._recalcVisibleRangeStudy=function(e,t){var i,n,o,r,s,a,l,c,u,h,d,p,_,f,m,y;if(!this.timeScale().isEmpty()&&(i=this.timeScale().visibleBarsStrictRange(),n=this.mainSeries().nearestData(i.firstBar(),F.NearestRight),o=this.mainSeries().nearestData(i.lastBar(),F.NearestLeft),r=this.mainSeries().bars().lastIndex(),s=n?n.index:void 0,a=o?o.index:void 0,l=s===this._oldStartVisibleIndex,c=a===this._oldEndVisibleIndex,!l||!c||t))for(this._oldStartVisibleIndex=s,this._oldEndVisibleIndex=a,u={first_visible_bar_time:1e3*Math.floor(n&&n.value?n.value[TradingView.TIME_PLOT]:0),last_visible_bar_time:1e3*Math.floor(o&&o.value?o.value[TradingView.TIME_PLOT]:0),subscribeRealtime:o&&o.index===r},h=0;h0&&m.listeners().fire(m)}},r.prototype.onResetScales=function(){return this._resetScales},r.prototype.resetTimeScale=function(){this.m_timeScale.restoreDefault(),this.recalculateAllPanes(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudy(this.dataSources()),this.updateCrossHair(),this.lightUpdate(),this._resetScales.fire(),this._setScalesResetAvailable(!1)},r.prototype.restoreTimeScaleState=function(e){this.m_timeScale.restoreState(e),this.recalculateAllPanes(),this.updateCrossHair(),this.lightUpdate(),this._setScalesResetAvailable(!0)},r.prototype.restoreFactoryDefaults=function(e){e.restoreFactoryDefaults(),this.recalcVisibleRangeStudy(this.dataSources(),!0)},r.prototype.selectionMacro=function(e){var t,i,n=this.selection().sources();e(this),t=J(n,this.selection().sources()),(i=J(this.selection().sources(),n)).concat(n).forEach(function(e){e.updateAllViews()}),TradingView.alertsDispatcher&&(t.filter(function(e){return e.hasAlert.value()}).forEach(function(e){e.getAlert({fromCache:!0}).done(function(e){e&&e.set("selected",!1)})}),i.forEach(function(e){e.hasAlert.value()&&e.getAlert({fromCache:!0}).done(function(e){e&&e.set("selected",!0)})})),this.lightUpdate(),this.setHoveredSource(null),this._selectedSourceChanged.fire()},r.prototype.clearSelection=function(){this._selection.clear()},r.prototype.removeSourceFromSelection=function(e){this._selection.remove(e)},r.prototype.addSourceToSelection=function(e,t){var i=this._selection.isSelected(e);i&&this._lastHittestData===t||e&&e.customization&&e.customization.disableSelection||(this._lastHittestData=t,i||this._selection.add(e))},r.prototype.checkLineToolSelection=function(){this._selection.checkLineToolSelection()},r.prototype.onSelectedSourceChanged=function(){return this._selectedSourceChanged},r.prototype._invalidationMaskForSource=function(e,t){if(void 0===t&&(t=L.Light),-1!==this._allCustomSources.indexOf(e)){var i=new I;return i.invalidateAll(t),i} return this._paneInvalidationMask(this.paneForSource(e),t)},r.prototype.setHoveredSource=function(e,t){if(this.m_hoveredSource!==e||this._lastHittestData!==t){this._lastHittestData=t;var i=null;this.m_hoveredSource&&(this.m_hoveredSource.updateAllViews(),i||(i=new I),TradingView.alertsDispatcher&&this.m_hoveredSource.hasAlert&&this.m_hoveredSource.hasAlert.value()&&this.m_hoveredSource.getAlert({fromCache:!0}).done(function(e){e&&e.set("hovered",!1)}),i.merge(this._invalidationMaskForSource(this.m_hoveredSource,L.Light))),this.m_hoveredSource=e,e&&(e.updateAllViews(),i||(i=new I),i.merge(this._invalidationMaskForSource(e,L.Light)),TradingView.alertsDispatcher&&e.hasAlert&&e.hasAlert.value()&&e.getAlert({fromCache:!0}).done(function(e){e&&e.set("hovered",!0)})),i&&this.invalidate(i)}},r.prototype.selection=function(){return this._selection},r.prototype.hoveredSource=function(){return this.m_hoveredSource},r.prototype.lastHittestData=function(){return this._lastHittestData},r.prototype.invalidate=function(e){this._invalidateHandler&&this._invalidateHandler(e)},r.prototype.dataSources=function(){var e,t,i,n=[];for(n.push(this.m_crossHairSource),e=0;e0)for(s=this.dataSources(),a=0;a0&&(a=n-i,l=s?null:t.rightOffset()-a,!this._options.shiftVisibleRangeOnNewBar&&s&&((u=t.width()/(r.length()+a))>=t.minBarSpacing()?(t.setBarSpacing(u),l=t.rightOffset()+a):o.lastBar()!==i&&(l=t.rightOffset()-a)),null!==l&&t.setRightOffset(l))),t.setBaseIndex(n))},r.prototype.recalculatePane=function(e){e&&e.recalculate()},r.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 C?this.paneForSource(this.m_mainSeries):null},r.prototype.recalculateAllPanes=function(){for(var e=0;e1},r.prototype.isSingleInstanceLineTool=function(e){return"LineStudyMtpRiskReward"===e||"LineStudyMtpAnalysis"===e},r.prototype._externalTimeStamp=function(e){var t=this.mainSeries().syncModel();return this.m_timeScale.points().roughTime(e,t&&t.projectTime.bind(t))},r.prototype.createLineTool=function(e,t,i,n,o){var r,s,a,l,c,h,d,p,_,f,g;return y(i)?(this.isSingleInstanceLineTool(i)&&this._undoModel.removeAllDrawingTools(i),"LineToolExecution"!==i&&ie("drawings","Study_Drawing_"+i),n&&(r=n.state(),s=TradingView.factoryDefaults("linetool"),a=i.toLowerCase(),TradingView.merge(s,TradingView.factoryDefaults(a)),(n=TradingView[i].prototype.createPropertiesObject(a,s)).merge(r)),l=m(i,this,n,null,e.mainDataSource()),n||(n=l.properties()),c=!l.linkKey&&!o,W.drawOnAllCharts().value()?l.linkKey=o||j.randomHash():l.linkKey=o,l.toolname=i,l.setOwnerSource(e.mainDataSource()),h=e.defaultPriceScale(),e.addDataSource(l,h),l.isFixed()?(p=e.mainDataSource().firstValue(),_=this.m_timeScale.indexToCoordinate(t.index),f=h.priceToCoordinate(t.price,p),d=l.addFixedPoint(new u(_,f))):d=l.addPoint(t),d||(this._lineBeingCreated=l,this._paneBeingCreatedLineOn=e),c&&l.enableCurrentIntervalVisibility(),this.fullUpdate(),o||!W.drawOnAllCharts().value()||l.properties().singleChartOnly||(g=this._externalTimeStamp(t.index),W.createLineTool({point:{price:t.price,timeStamp:g},linetool:i,properties:n,symbol:this.mainSeries().symbol(),model:this,linkKey:l.linkKey})),l):null},r.prototype.lineBeingCreated=function(){return this._lineBeingCreated},r.prototype.paneBeingCreatedLineOn=function(){return this._paneBeingCreatedLineOn},r.prototype.coninueCreatingLine=function(e,t,i,n){var o,r,s,a=this._lineBeingCreated.addPoint(e,t,i),l=this._lineBeingCreated;return this._lineBeingCreated.updateAllViews(),o=new I(L.Light),r=null,a&&(r={points:this._lineBeingCreated._timePoint,interval:this.mainSeries().interval()},this._paneBeingCreatedLineOn=null,this._lineBeingCreated=null),this.invalidate(o),n||!W.drawOnAllCharts().value()||l.properties().singleChartOnly||(s=this._externalTimeStamp(e.index),W.continueLineTool({point:{price:e.price,timeStamp:s},envState:t,finalState:r,model:this})),a},r.prototype.cancelCreatingLine=function(){if(this._lineBeingCreated){var e=this._lineBeingCreated;this.removeSource(this._lineBeingCreated),this._lineBeingCreated=null,this._lineCancelled.fire(),W.drawOnAllCharts().value()&&!e.properties().singleChartOnly&&W.cancelLineTool({model:this})}},r.prototype.startChangingLinetool=function(e,t,i,n){var o,r,s;this._lineBeingEdited=e,this._linePointBeingEdited=i,this._lineBeingEdited.startChanging(i,t),o=this.paneForSource(e),this._lineBeingEdited.startDragPoint&&this._lineBeingEdited.startDragPoint(i,t),this._lineBeingEdited.setPoint(i,t,n),this._lineBeingEdited.updateAllViews(),(r=this._paneInvalidationMask(o,L.Light)).force=!0,this.invalidate(r),e.linkKey&&!e.properties().singleChartOnly&&(s=this._externalTimeStamp(t.index), W.startChangingLineTool({linkKey:e.linkKey,model:this,symbol:this.mainSeries().symbol(),point:{price:t.price,timeStamp:s},pointIndex:i,envState:n}))},r.prototype.lineBeingEdited=function(){return this._lineBeingEdited},r.prototype.linePointBeingEdited=function(){return this._linePointBeingEdited},r.prototype.changeLinePoint=function(e,t){var i,n,o,r,s,a=this.paneForSource(this._lineBeingEdited);void 0!==e.x&&void 0!==e.y?(o=this._lineBeingEdited.priceScale(),r=a.mainDataSource().firstValue(),i=o.coordinateToPrice(e.y,r),n=Math.round(this.timeScale().coordinateToIndex(e.x)),i=this._magnet.align(i,n,a),this._lineBeingEdited.setPoint(this._linePointBeingEdited,{price:i,index:n},t)):this._lineBeingEdited.setPoint(this._linePointBeingEdited,e,t),this._lineBeingEdited.updateAllViews(),this.lightUpdate(),this._lineBeingEdited.linkKey&&!this._lineBeingEdited.properties().singleChartOnly&&(s=this._externalTimeStamp(n),W.changeLineTool({linkKey:this._lineBeingEdited.linkKey,model:this,symbol:this.mainSeries().symbol(),point:{price:i,timeStamp:s},envState:t}))},r.prototype.endChangingLinetool=function(e){var t,i=this._lineBeingEdited;this._lineBeingEdited.endChanging(!1,e),this._lineBeingEdited=null,this._linePointBeingEdited=null,this.lightUpdate(),t={points:i._timePoint,interval:this.mainSeries().interval()},i.linkKey&&!i.properties().singleChartOnly&&W.finishChangingLineTool({model:this,linkKey:i.linkKey,symbol:this.mainSeries().symbol(),finalState:t})},r.prototype.startMovingSources=function(e,t,i,n){var o,r,s;this._sourcesBeingMoved=e,this._linePointBeingMoved=i,o=this,this._sourcesBeingMoved.forEach(function(e){var r,s;e.startMoving(t,i,n),r=o.paneForSource(e),(s=o._paneInvalidationMask(r,L.Light)).force=!0,o.invalidate(s)}),(r=e.filter(function(e){return e.linkKey&&!e.properties().singleChartOnly}).map(function(e){return e.linkKey})).length&&(s=o._externalTimeStamp(t.logical.index),W.startMovingLineTool({linkKeys:r,model:o,symbol:o.mainSeries().symbol(),point:{price:t.logical.price,timeStamp:s},envState:n}))},r.prototype.sourcesBeingMoved=function(){return this._sourcesBeingMoved},r.prototype.moveSources=function(e,t){var i,n,o=this;this._sourcesBeingMoved.filter(function(e){return!e.isLocked||!e.isLocked()}).forEach(function(i){i.move(e,o._linePointBeingMoved,t)}),this.lightUpdate(),i=this._sourcesBeingMoved.filter(function(e){return!e.properties().singleChartOnly&&!!e.linkKey}).map(function(e){return e.linkKey}),n=o._externalTimeStamp(e.logical.index),W.moveLineTool({linkKeys:i,model:o,point:{price:e.logical.price,timeStamp:n},envState:t})},r.prototype.endMovingSources=function(e){var t,i,n=this;this._sourcesBeingMoved.forEach(function(t){var i,o=n.paneForSource(t);t.endMoving(e),(i=n._paneInvalidationMask(o,L.Light)).invalidateAll(L.Light),i.force=!0,n.invalidate(i)}),t=this._sourcesBeingMoved.filter(function(e){return!e.properties().singleChartOnly&&!!e.linkKey}).map(function(e){return e.linkKey}),i=this._sourcesBeingMoved.filter(function(e){return!e.properties().singleChartOnly&&!!e.linkKey}).map(function(e){return{ points:e._timePoint,interval:n.mainSeries().interval()}}),t.length&&W.finishMovingLineTool({linkKeys:t,model:n,finalStates:i}),this._sourcesBeingMoved=[],this._linePointBeingMoved=null},r.prototype.finishLineTool=function(e){var t=this.lineBeingCreated();t&&(t.finish&&t.finish(),!e&&W.drawOnAllCharts().value()&&t.linkKey&&!t.properties().singleChartOnly&&W.finishLineTool({linkKey:t.linkKey,model:this}))},r.prototype.calculateDefaultTags=function(){var e,t,i=[],n=this.dataSources();for(e=0;e-1&&this._modelIntervals.splice(t,1)},r.prototype.clearIntervals=function(){for(var e=0;e0?"Forward":"Backward")),this._model=e,this._sourcesIds=t.map(function(e){return e.id()}),this._shift=i}function _(e,t){q.call(this,"Send "+t[0].title()+" to back"),this._model=e,this._sourcesIds=t.map(function(e){return e.id()})}function f(e,t){q.call(this,"Bring "+t[0].title()+" to front"),this._model=e,this._sourcesIds=t.map(function(e){return e.id()})}function m(e,t,i,n){q.call(this,"Rearrange panes"),this._model=e,this._index=t,this._direction=i,this._chart=n}function y(e,t,i,n,o,r){q.call(this,"Zoom"),this._model=e,this._startBar=t,this._endBar=i,this._startPrice=n,this._endPrice=o,this._pane=r}function g(e,t,i){q.call(this,"Zoom"),this._baseCmd=e,this._zoomStack=t,this._inOut=i}function v(e,t,i,n,o){q.call(this,"",!1),this._model=e,this._paneA=t,this._paneB=i,this._prevStretchA=n,this._currStretchA=o}function S(e,t,i){q.call(this,"Apply Chart Theme"),this._model=e,this._newChartProps=TradingView.factoryDefaults("chartproperties"),this._newSeriesProps=TradingView.factoryDefaults("chartproperties.mainSeriesProperties"),this._newSessionProps=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=M({},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,e.timeScale().preserveBarSpacing()&&delete this._newChartProps.scalesProperties.barSpacing,this._newSeriesProps=M({},this._newSeriesProps,t.mainSourceProperties),this._oldChartProps=e.properties().state(),delete this._oldChartProps.paneProperties.topMargin,delete this._oldChartProps.paneProperties.bottomMargin,this._oldSeriesProps=e.properties().state().mainSeriesProperties,this._oldSessionsProps=this._model.sessions().state(),i||(delete this._oldSeriesProps.style,delete this._oldSeriesProps.symbol,delete this._oldSeriesProps.interval,delete this._newSeriesProps.style,delete this._newSeriesProps.symbol,delete this._newSeriesProps.interval)}function b(e,t,i,n){var o;o=(n=n||"")+" Study template",q.call(this,o),this._model=e,this._oldProps=t,this._newProps=i}function w(e,t,i,n,o){q.call(this,e),this._property=t,this._value=i,this._forceSetProperty=o,this._prevValue=t.value(),this._cw=n}function P(e,t){q.call(this,"Stop Sincing Drawing"),this._model=e,this._sourceId=t.id(),this._linkKey=t.linkKey}function x(e,t,i){q.call(this,"Paste Drawing"),this._model=e,this._clipboardData=t,this._paneIndex=this._model.panes().indexOf(i||this._model.paneForSource(this._model.mainSeries()))}function C(e,t){q.call(this,"Paste Indicator"),this._model=e,this._clipboardData=t}function T(e,t){q.call(this,"Move",!1),this._origPoint=e.clone(),this._point=null,this._handler=t} var I=i("aO4+").Point,L=i("CW80"),A=L.isLineTool,k=i("Ss5c").LineDataSource,M=i("FIi8").deepExtend,E=i("OK+B"),V=i("beCu").doAnimate,D=i("onDC").ChartUndoModelBase,O=i("Ocx9"),B=O.saveDefaultProperties,R=i("J+KI"),F=i("qJq3").Series,N=i("GVHu"),W=N.Study,H=i("8sOK").StudyStub,z=i("0waE"),j=i("7MZv").showTooManyStudiesNotice,U=i("MY2c").UndoStack,q=i("RDU5").UndoCommand,Y=i("Ltzl").SaveLineToolStateUndoCommand,G=i("YlKu").ApplyLineToolTemplateUndoCommand,K=i("n33C").SetChartStyleCommand,J=i("s9sR").SetResolutionUndoCommand,Z=i("n5al").preparePriceAxisProperties,X=i("8C8C").RestoreFactoryDefaultsUndoCommand,Q=i("/ToI"),$=Q.MoveToNewPriceScaleUndoCommand,ee=Q.MoveToExistingPriceScaleUndoCommand,te=i("HGup"),ie=te.UnmergeDownUndoCommand,ne=te.UnmergeUpUndoCommand,oe=te.UnmergeToNewBottomPane,re=i("jRfx"),se=re.MergeDownUndoCommand,ae=re.MergeUpUndoCommand,le=re.MergeToTargetPane,ce=i("2OVc").InsertStudyCommand,ue=i("FKaq").SetPriceScaleSelectionStrategyCommand,he=i("ocrj").RemoveSourcesCommand,de=i("n5al").getChartStyleByResolution,pe=i("/YGI").StudyInserter,_e=i("tITk").trackEvent,fe=i("uOxu").getLogger("Chart.ChartUndoModel"),me=i("pQ+n").closeSourcesSet,ye=i("QTwd").RestoreDefaultsPreferencesUndoCommand;inherit(n,D),n.prototype.version=function(){return this.m_model._version},n.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)}},n.prototype.paneForSource=function(e){return this.m_model.paneForSource(e)},n.prototype.createPane=function(e){return this.m_model.createPane(e)},n.prototype.readOnly=function(){return this.m_model.readOnly()},n.prototype.restart=function(){this.m_model.restart()},n.prototype.disconnect=function(){this.m_model.disconnect()},n.prototype.studiesMetaData=function(){return this.m_model.studiesMetaData()},n.prototype.studyVersioning=function(){return this.m_model.studyVersioning()},n.prototype.chartModel=function(){return this._model()},n.prototype._model=function(){return this.m_model},n.prototype.pushUndoCommand=function(e){this._pushUndoCommand(e)},n.prototype._pushUndoCommand=function(e){this.undoHistory.pushUndoCommand(e)},n.prototype.startScalePrice=function(e,t,i){this.pushUndoCommand(new a(this.m_model,e,t,t.state())),this.chartModel().startScalePrice(e,t,i)},n.prototype.scalePriceTo=function(e,t,i){this.chartModel().scalePriceTo(e,t,i)},n.prototype.endScalePrice=function(e,t){this.chartModel().endScalePrice(e,t)},n.prototype.startScrollPrice=function(e,t,i){t.isAutoScale()||(this._initialPriceScrollState=t.state(),this._initialPriceScrollPos=i,this.chartModel().startScrollPrice(e,t,i))},n.prototype.scrollPriceTo=function(e,t,i){t.isAutoScale()||(this._initialPriceScrollPos&&Math.abs(this._initialPriceScrollPos-i)>20&&(this.pushUndoCommand(new a(this.m_model,e,t,this._initialPriceScrollState)),delete this._initialPriceScrollState,delete this._initialPriceScrollPos),this.chartModel().scrollPriceTo(e,t,i))},n.prototype.endScrollPrice=function(e,t){ t.isAutoScale()||(delete this._initialPriceScrollState,delete this._initialPriceScrollPos,this.chartModel().endScrollPrice(e,t))},n.prototype.setPriceAutoScale=function(e,t,i){this.pushUndoCommand(new a(this.m_model,e,t,t.state())),this.chartModel().setPriceAutoScale(e,t,i)},n.prototype.resetPriceScale=function(e,t){this.pushUndoCommand(new a(this.m_model,e,t,t.state())),this.chartModel().resetPriceScale(e,t)},n.prototype.startScaleTime=function(e){this.pushUndoCommand(new l(this.m_model,this.m_model.timeScale().state(),"scale time")),this.chartModel().startScaleTime(e)},n.prototype.scaleTimeTo=function(e){this.chartModel().scaleTimeTo(e)},n.prototype.endScaleTime=function(){this.chartModel().endScaleTime()},n.prototype.startScrollTime=function(e){this._initialTimeScrollState=this.m_model.timeScale().state(),this._initialTimeScrollPos=e,this.chartModel().startScrollTime(e)},n.prototype.scrollTimeTo=function(e){var t=!1;return this._initialTimeScrollPos&&Math.abs(e-this._initialTimeScrollPos)>20&&(this.pushUndoCommand(new l(this.m_model,this._initialTimeScrollState,"scroll time")),delete this._initialTimeScrollPos,delete this._initialTimeScrollState,t=!0),this.chartModel().scrollTimeTo(e),t},n.prototype.gotoTime=function(e,t){var i,n,o=this.timeScale().visibleBarsStrictRange();null!==o&&(i=o.firstBar(),n=this.m_model.timeScale().state(),this.chartModel().gotoTime(e,t),i!==this.timeScale().visibleBarsStrictRange().firstBar()&&this.pushUndoCommand(new l(this.m_model,n,"scroll time")))},n.prototype.endScrollTime=function(){this.chartModel().endScrollTime(),delete this._initialTimeScrollPos,delete this._initialTimeScrollState},n.prototype.resetTimeScale=function(){this.pushUndoCommand(new l(this.m_model,this.m_model.timeScale().state())),this.chartModel().resetTimeScale()},n.prototype.canZoomIn=function(){return this.chartModel().canZoomIn()},n.prototype.canZoomOut=function(){return this.chartModel().canZoomOut()},n.prototype.setWidth=function(e){this.m_model.setWidth(e)},n.prototype.setPaneHeight=function(e,t){this.m_model.setPaneHeight(e,t)},n.prototype.gridSource=function(){return this.m_model.gridSource()},n.prototype.watermarkSource=function(){return this.m_model.watermarkSource()},n.prototype.addAlertsSource=function(e){return this.m_model.addAlertsSource(e)},n.prototype.alertsSources=function(){return this.m_model.alertsSources()},n.prototype.publishedChartsTimelineSource=function(){return this.m_model.publishedChartsTimelineSource()},n.prototype.barsMarksSources=function(){return this.m_model.barsMarksSources()},n.prototype.crossHairSource=function(){return this.m_model.crossHairSource()},n.prototype.model=function(){return this.m_model},n.prototype.chartWidget=function(){return this._chartWidget},n.prototype.mainSeries=function(){return this.m_model.m_mainSeries},n.prototype.mainSeriesScaleRatioProperty=function(){return this.m_model.mainSeriesScaleRatioProperty()},n.prototype.panes=function(){return this.m_model.panes()},n.prototype.timeScale=function(){return this.m_model.timeScale()}, n.prototype.selectionMacro=function(e){return this.m_model.selectionMacro(e)},n.prototype.removeSourceFromSelection=function(e){this.m_model.removeSourceFromSelection(e)},n.prototype.addSourceToSelection=function(e,t){this.m_model.addSourceToSelection(e,t)},n.prototype.clearSelection=function(){this.m_model.clearSelection()},n.prototype.setHoveredSource=function(e,t){this.m_model.setHoveredSource(e,t)},n.prototype.selection=function(){return this.m_model.selection()},n.prototype.onSelectedSourceChanged=function(){return this.m_model.onSelectedSourceChanged()},n.prototype.hoveredSource=function(){return this.m_model.hoveredSource()},n.prototype.activeStrategySource=function(){return this.m_model.activeStrategySource()},n.prototype.invalidate=function(e){this.m_model.invalidate(e)},n.prototype.setCurrentPosition=function(e,t,i,n){this.m_model.setCurrentPosition(e,t,i,n)},n.prototype.setAndSaveCurrentPosition=function(e,t,i,n){this.m_model.setAndSaveCurrentPosition(e,t,i,n)},n.prototype.modifySeries=function(e,t,i){var n=new c(this.m_model,e,t,i);this.pushUndoCommand(n)},n.prototype.canCreateStudy=function(e){return this.model().chartApi().chartApi().isCanCreateStudy(e)},n.prototype.checkIfFeatureAvailable=function(e,t){var i=this.canCreateStudy(),n=t&&t instanceof W;if(!this.readOnly()&&n&&(i=this.canCreateStudy(!0)),i)return!0;n||j()},n.prototype._insertStudy=function(e,t,i,n,o){var r=new ce(this.m_model,e,t,i,n,o,"Insert "+e.description);return this.pushUndoCommand(r),r.insertedStudy()},n.prototype.insertStudyWithoutCheck=function(e){return this._insertStudy(e)},n.prototype.createStudyInserter=function(e,t,i){var n,o,r;return this.checkIfFeatureAvailable(e,t)?(n=this,o={createStudy:function(e,t,i,o,r,s,a){return _e("studies","Study_"+e.id),"Compare@tv-basicstudies"===e.id&&_e("compare","symbol:"+t.symbol),n._insertStudy(e,t,i,o,r)}},void 0!==i&&(o.createStub=function(){return n.m_model.insertStudyStub(i).id()},o.removeStub=function(e){return n.m_model.removeStudyStub(e)}),(r=new pe(e,this.m_model._studiesMetaInfoRepository,o)).setParentSource(t),r):null},n.prototype.setProperty=function(e,t,i,n){if(e&&e.value()!==t){var r=new o(e,t,i,this.m_model,n);this.pushUndoCommand(r),this.emitEvent("setProperty")}},n.prototype.setProperties=function(e,t,i){var n=this;this.beginUndoMacro(i),this.m_model.selectionMacro(function(o){for(var r=0;r0&&(1===o.length?this.emitEvent("removeSource",[o[0]]):this.emitEvent("removeSources",[o]))},n.prototype.removeSelectedSources=function(){var e,t,i,n=this.m_model,o=n.selection().sources();o.length&&0!==o.filter(function(e){return e.isUserDeletable()}).length&&(this.clearSelection(),e=this,t=null,i=o.length>1?"Remove drawings group":"Remove "+o[0].title(),n.selectionMacro(function(n){var r=new he(n,o,i);t=r.removedIds(),e.pushUndoCommand(r)}),t&&(1===t.length?this.emitEvent("removeSource",[t[0]]):this.emitEvent("removeSources",[t])))},n.prototype.removeLineTools=function(e){var t,i,n,o=this.lineBeingCreated();o&&-1!==(t=e.indexOf(o))&&(this.cancelCreatingLine(),e.splice(t,1)),n=(i=new u(this.m_model,e)).removedIds(),this.pushUndoCommand(i),this.emitEvent("removeSources",[n])},n.prototype.detachToRight=function(e,t){var i,n;_e("Chart","Move to new right scale"),i=window.t("Move {title} To New Price Scale").format({title:e.title()}),n=new $(this.m_model,e,t,"right",i),this.pushUndoCommand(n),this.emitEvent("moveSource",[e])},n.prototype.detachToLeft=function(e,t){var i,n;_e("Chart","Move to new left scale"),i=window.t("Move {title} To New Left Scale").format({title:e.title()}),n=new $(this.m_model,e,t,"left",i),this.pushUndoCommand(n),this.emitEvent("moveSource",[e])},n.prototype.detachNoScale=function(e,t){var i,n;_e("Chart","Make source no scale"),i=window.t("Make {title} No Scale (Full Screen)").format({title:e.title()}),n=new $(this.m_model,e,t,"overlay",i),this.pushUndoCommand(n),this.emitEvent("moveSource",[e])},n.prototype.moveToScale=function(e,t,i,n){_e("Chart","Move source to target scale");var o=new ee(this.m_model,e,t,i,n);this.pushUndoCommand(o),this.emitEvent("moveSource",[e])},n.prototype.mergeSourceUp=function(e){var t=new ae(this.m_model,e,"Merge up");this.pushUndoCommand(t),this.emitEvent("mergeSourceUp",[e])},n.prototype.mergeSourceDown=function(e){var t=new se(this.m_model,e,"Merge down");this.pushUndoCommand(t),this.emitEvent("mergeSourceDown",[e])},n.prototype.mergeToPane=function(e,t){var i=this.m_model.panes().indexOf(t),n=new le(this.m_model,e,i,"Merge to pane") ;this.pushUndoCommand(n),this.emitEvent("mergeSourceToPane",[e])},n.prototype.unmergeSourceUp=function(e){var t=new ne(this.m_model,e,"Unmerge up");this.pushUndoCommand(t),this.emitEvent("unmergeSourceUp",[e])},n.prototype.unmergeSourceDown=function(e){var t=new ie(this.m_model,e,"Unmerge down");this.pushUndoCommand(t),this.emitEvent("unmergeSourceDown",[e])},n.prototype.unmergeToNewBottomPane=function(e){var t=new oe(this.m_model,e,"Unmerge to new bottom pane");this.pushUndoCommand(t),this.emitEvent("unmergeSourceToBottom",[e])},n.prototype.createLineTool=function(e,t,i,n,o){var r,s;if("LineToolRegressionTrend"!==i||this.canCreateStudy())return this._createLineCommand=new h(this.m_model,e,i),r=this._createLineCommand.startCreatingLine(t,n,o),s=this._createLineCommand.line(),r&&(this.pushUndoCommand(this._createLineCommand),delete this._createLineCommand),s;j()},n.prototype.lineBeingCreated=function(){return this.m_model.lineBeingCreated()},n.prototype.paneBeingCreatedLineOn=function(){return this.m_model.paneBeingCreatedLineOn()},n.prototype.coninueCreatingLine=function(e,t,i){var n=this._createLineCommand.continueCreatingLine(e,t,i);return n&&(this.pushUndoCommand(this._createLineCommand),delete this._createLineCommand),n},n.prototype.finishLineTool=function(e){this.m_model.finishLineTool(e)},n.prototype.cancelCreatingLine=function(){this.m_model.cancelCreatingLine()},n.prototype.lineCancelled=function(){return this.m_model.lineCancelled()},n.prototype.startChangingLinetool=function(e,t,i,n){this._currentLineChangeCommand=new Y(this.m_model,e,"Change "+i+"point",!1),this.m_model.startChangingLinetool(e,t,i,n)},n.prototype.lineBeingEdited=function(){return this.m_model.lineBeingEdited()},n.prototype.changeLinePoint=function(e,t){this.m_model.changeLinePoint(e,t)},n.prototype.endChangingLinetool=function(e){this.m_model.endChangingLinetool(e),this.pushUndoCommand(this._currentLineChangeCommand),this._currentLineChangeCommand=null},n.prototype.startMovingSources=function(e,t,i,n){e.filter(function(e){return e.doesMovingAffectsUndo()}).length&&(this._currentLineMoveCommand=new d(this.m_model,e,t,i,n)),this.m_model.startMovingSources(e,t,i,n)},n.prototype.sourcesBeingMoved=function(){return this.m_model.sourcesBeingMoved()},n.prototype.moveSources=function(e,t){null!==this._currentLineMoveCommand&&this._currentLineMoveCommand.setPoint(e,t),this.m_model.moveSources(e,t)},n.prototype.endMovingSource=function(e){this.m_model.endMovingSources(e);var t=this._currentLineMoveCommand;return this._currentLineMoveCommand=null,null!==t&&!t.isEmpty()&&(this.pushUndoCommand(t),!0)},n.prototype.dataSources=function(){return this.m_model.dataSources()},n.prototype.orderedDataSources=function(e){return this.m_model.orderedDataSources(e)},n.prototype.dataSourceForId=function(e){return this.m_model.dataSourceForId(e)},n.prototype.state=function(e,t){return this.m_model.state(e,t)},n.prototype.asyncState=function(e){return this.m_model.asyncState(e)},n.prototype.restoreState=function(e,t,i){return this.m_model.restoreState(e,t,i)}, n.prototype.calculateDefaultTags=function(){return this.m_model.calculateDefaultTags()},n.prototype.onTagsChanged=function(){return this.m_model.onTagsChanged()},n.prototype.changeZOrder=function(e,t){var i=new p(this.m_model,e,t);this.pushUndoCommand(i),this.emitEvent("changeZOrder",[e,t])},n.prototype.sendToBack=function(e){var t=new _(this.m_model,e);this.pushUndoCommand(t),this.emitEvent("changeZOrder",[e])},n.prototype.bringToFront=function(e){var t=new f(this.m_model,e);this.pushUndoCommand(t),this.emitEvent("changeZOrder",[e])},n.prototype.removeAllStudies=function(){var e,t,i;for(this.beginUndoMacro("remove all studies"),e=this.m_model.dataSources(),t=0;t0&&t.reverse(),t.forEach(function(t){e._model.changeZOrder(t,e._shift)})},inherit(_,q),_.prototype.undo=function(){var e=this,t=this._sourcesIds.map(function(t){return e._model.dataSourceForId(t)});t.reverse(),e._model.bringToFront(t)},_.prototype.redo=function(){var e=this,t=this._sourcesIds.map(function(t){return e._model.dataSourceForId(t)});e._model.sendToBack(t)},inherit(f,q),f.prototype.undo=function(){var e=this,t=this._sourcesIds.map(function(t){return e._model.dataSourceForId(t)});e._model.sendToBack(t)},f.prototype.redo=function(){var e=this,t=this._sourcesIds.map(function(t){return e._model.dataSourceForId(t)});t.reverse(),e._model.bringToFront(t)},n.prototype.removePane=function(e,t){var i=this.m_model.panes()[t].dataSources().slice();this._removeSources(i,!1,"Remove pane")},n.prototype.rearrangePanes=function(e,t,i){var n=new m(this.model(),t,i,e);this.pushUndoCommand(n),this._onRearrangePanes.fire()}, inherit(m,q),m.prototype.redo=function(){var e=this._model.panes()[this._index];"up"===this._direction&&this._index>0&&(this._model.panes().splice(this._index,1),this._model.panes().splice(this._index-1,0,e)),"down"===this._direction&&this._indexi?i:Math.round(t)}function o(e,t,i){return L.isNaN(t)?e:ti?i:Math.round(1e4*t)/1e4}function r(e){return n(0,e,255)}function s(e){return n(0,e,255)}function a(e){return n(0,e,255)}function l(e){return o(0,e,1)}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 _(e){var t,i=e[0],n=e[1],o=e[2],r=i/255,s=n/255,a=o/255,l=Math.min(r,s,a),c=Math.max(r,s,a),u=0,h=0,d=(l+c)/2;if(l===c)u=0,h=0;else switch(t=c-l,h=d>.5?t/(2-c-l):t/(c+l),c){case r:u=((s-a)/t+(s1&&(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 m(e){var t,i,n,o,l,c=e[0],u=e[1],h=e[2];return 0===u?t=i=n=h:(t=f(l=2*h-(o=h<.5?h*(1+u):h+u-h*u),o,c+1/3),i=f(l,o,c),n=f(l,o,c-1/3)),[r(255*t),s(255*i),a(255*n)]}function y(e){return A[0]*e[0]+A[1]*e[1]+A[2]*e[2]}function g(e,t,i){var n,o;return void 0===i&&(i=.05),o=(n=_(e))[0]+t*i,n[0]=c(o-Math.floor(o)),m(n)}function v(e,t){return t in e}function S(e){var t=M.re.exec(e);return null!==t?M.parse(t):null}function b(e){var t=E.re.exec(e);return null!==t?E.parse(t):null}function w(e){var t=e[0],i=e[1],n=e[2],o=t.toString(16),r=i.toString(16),s=n.toString(16);return"#"+(1===o.length?"0":"")+o+(1===r.length?"0":"")+r+(1===s.length?"0":"")+s}function P(e){var t=V.re.exec(e);return null!==t?V.parse(t):null}function x(e){var t=D.re.exec(e);return null!==t?D.parse(t):null}function C(e){var t,i,n,o,r;if(e=e.toLowerCase(),v(k,e)){if(null!==(t=b(k[e])))return t;throw new Error("Invalid named color definition")}return null!==(i=S(e))?i:null!==(n=b(e))?n:null!==(o=P(e))?o:null!==(r=x(e))?r:null}function T(e){var t=C(e);if(null!==t)return t;throw new Error("Passed color string does not match any of the known color representations")}function I(e){var t,i,n,o,r;if(e=e.toLowerCase(),v(k,e)){if(null!==(t=b(k[e])))return[t[0],t[1],t[2],1];throw new Error("Invalid named color definition")}return null!==(i=S(e))?[i[0],i[1],i[2],1]:null!==(n=b(e))?[n[0],n[1],n[2],1]:null!==(o=P(e))?[o[0],o[1],o[2],1]:null!==(r=x(e))?r:null}var L,A,k,M,E,V,D;Object.defineProperty(t,"__esModule",{value:!0}), L=i("ivNn"),t.normalizeRedComponent=r,t.normalizeGreenComponent=s,t.normalizeBlueComponent=a,t.normalizeAlphaComponent=l,t.rgb=function(e,t,i){return[r(e),s(t),a(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,n){var o,c;return Array.isArray(e)?(n=t,[(o=e)[0],o[1],o[2],l(n)]):(c=t,i=i||0,n=n||0,[r(e),s(c),a(i),l(n)])},t.areEqualRgba=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},t.normalizeHue=c,t.normalizeHslSaturation=u,t.normalizeHsvSaturation=h,t.normalizeLightness=d,t.normalizeValue=p,t.hsl=function(e,t,i){return[c(e),u(t),d(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[c(e),h(t),p(i)]},t.areEqualHsv=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},t.rgbToHsl=_,t.hslToRgb=m,t.rgbToHsv=function(e){var t=e[0],i=e[1],n=e[2],o=t/255,r=i/255,s=n/255,a=Math.min(o,r,s),l=Math.max(o,r,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=((r-s)/c+(r255)throw new Error("invalid threshold value, valid values are [0, 255]");return y(e)>=t?"white":"black"},t.tryParseRgb=C,t.parseRgb=T,t.tryParseRgba=I,t.parseRgba=function(e){var t=I(e);if(null!==t)return t ;throw new Error("Passed color string does not match any of the known color representations")}},ePL1:function(e,t,i){"use strict";i.r(t),i.d(t,"types",function(){return n});var n={ECONOMIC:"economic",QUANDL:"quandl"}},ei7k:function(e,t,i){"use strict";function n(e){return Object(r.clean)(JSON.stringify(e))}function o(e){return JSON.parse(Object(r.clean)(e,!0))}var r;i.d(t,"b",function(){return n}),i.d(t,"a",function(){return o}),r=i("CLNU")},ezzr:function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"LogicalRange",function(){return o}),n=i("Eyy1"),o=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}()},f6yo:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i("hBTJ");t.pointInHalfplane=function(e,t){var i=t.edge,n=i.A*e.x+i.B*e.y+i.C>0;return n===t.isPositive},t.pointInTriangle=function(e,t,i,o){var r=t.add(i).scaled(.5),s=r.add(o).scaled(.5),a=n.intersectLineSegments(t,i,s,e);return null===a&&null===(a=n.intersectLineSegments(i,o,s,e))&&null===(a=n.intersectLineSegments(o,t,s,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){var i,n,o,r=t.length-1,s=!1,a=e.x,l=e.y;for(i=0;i=l||o.y=l)&&n.x+(l-n.y)/(o.y-n.y)*(o.x-n.x)this.timeScale().points().firstIndex()&&e.firstBar()=t.start&&r<=t.end+i&&e.push(o)},this),e},r.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},r.prototype._maxPlatesPerBar=10,r.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 n=e[i];return n=(n=n.sort(function(e,t){return t.views_count-e.views_count})).slice(0,this._maxPlatesPerBar),t.concat(n)}.bind(this),[])},r.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"}},r.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"}},r.prototype._offset=function(e,t,i){var n;switch(e){default:case"up":n=null===i?t[TradingView.HIGH_PLOT]:i(t);break;case"down":n=null===i?t[TradingView.LOW_PLOT]:i(t)}return this.priceScale().priceToCoordinate(n,this.ownerSource().firstValue())},r.prototype._getIndex=function(e){return this.timeScale().timePointToIndex(e)},r.prototype.getViewData=function(){return{barWidth:this.barWidth(),plates:this.getPlatesViewData(),tooltip:this._tooltip}},r.prototype.barWidth=function(){return this.timeScale().barSpacing()},r.prototype.getPlatesViewData=function(){var e,t,i,n,o,r,s,a=this._model.mainSeries();if(a.data().isEmpty())return[];for(e=d(a.style())?a.barFunction():null,t=this.filterDisplayedPlates(this.getVisibleRangePlates()),i=this,n={},o=this._model.lastHittestData(),r=(t=(t=t.map(function(t){var r,s,a,l,c,u,h,d=this._getIndex(t.tickmark),p=this._getBar(d);return null!==p&&(r=this._layout(t.direction),s=this._theme(t.direction),a=o&&o.id===t.id,l=this.timeScale().indexToCoordinate(d),c=this._offset(r,p,e),u=this.priceScale().isInverted(),h=0,d in n||(n[d]={up:0,down:0}),h=n[d][r]++,TradingView.merge({id:t.id,x:l,y:c,yInverted:u,order:h,direction:r,theme:s,hovered:a,pinned:!0===i.pinnedTooltips[t.id],user__id:t.user__id,label:t.label,labelFontColor:t.labelFontColor||"#444",minSize:t.minSize||5},this._plateViewData(t)))}.bind(this))).filter(function(e){return!!e})).filter(function(e){return!0===e.hovered}),s=0;sthis._loadedRange.end&&(e.start=this._loadedRange.end)),e},r.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},r.prototype._pushGetDataStack=function(e){a(e.start)&&a(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)):p.logError("Wrong tickmark range")},r.prototype.roundRange=function(e){ return{start:Math.round(e.start),end:Math.round(e.end)}},r.prototype.refreshData=function(){this.getData(this._lastRange)},r.prototype.getData=function(e){a(e.start)&&a(e.end)?(this._lastRange=e,(e=Object.assign({},e)).end=this._maxDate,this._pushGetDataStack(e)):p.logError("Wrong range")},r.prototype._abortAllRequests=function(){this._requests.forEach(function(e){e.abort()}),this._requests=[],this._getDataTimeout&&clearTimeout(this._getDataTimeout),this._getDataTimeout=this._collectedRange=null},r.prototype.clearMarks=function(){this._abortAllRequests(),this._marks={},this._loadedRange=null},t.BarsMarksContainer=r}).call(this,i("Kxc7"),i("tc+8"),i("aIyQ"))},fgLi:function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i.d(t,"DataSource",function(){return c}),n=i("hY0g"),o=i.n(n),r=i("0waE"),s=i("Ocx9"),a=i("aIyQ"),l=i.n(a),c=function(){function e(){this._zorder=0,this.m_priceScale=null,this._id=Object(r.randomHashN)(6),this._ownerSource=null,this._userEditEnabled=!0,this.hasAlert=new o.a(!1),this._onPriceScaleChanged=new l.a}return e.prototype.createPropertiesObject=function(e,t,i){return new s.DefaultProperty(e,t,i)},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},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.priceAxisViews=function(e,t){return null},e.prototype.updateAllViews=function(){},e.prototype.paneViews=function(){return null},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 Promise.resolve(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.movable=function(){return!1},e}()},fs3R:function(e,t){e.exports=''},g5Qf:function(e,t,i){"use strict";function n(){return a}function o(){null===a&&(a=new Promise(function(e){Promise.all([i.e(7),i.e(10),i.e(20),i.e(49),i.e(4),i.e(9),i.e("line-tools-icons"),i.e(17),i.e(24),i.e("floating-toolbars")]).then(function(t){if(null===s){var n=i("gmn6").FavoriteDrawingToolbar;s=new n({left:window.innerWidth/2,top:r.HEADER_TOOLBAR_HEIGHT_EXPANDED+61}),e(s)}}.bind(null,i)).catch(i.oe)}))}var r,s,a;i.r(t),i.d(t,"getFavoriteDrawingToolbarPromise",function(){return n}),i.d(t,"createFavoriteDrawingToolbar",function(){return o}),i("YFKU"),r=i("yMne"),s=null,a=null},gBDZ:function(e,t,i){"use strict";function n(e,t,i,n,o){var r,s,a,l;for(this._canvasesMap={},this._lines=e.split(/[^\S\r\n]*(?:\r\n|\r|\n)/),this._font=this._fontStyle(t,i,n,o),this._fontSize=o,(r=document.createElement("canvas").getContext("2d")).font=this._font,s=0,a=0;a0&&(t=this._strategySources[this._strategySources.length-1],this.setActiveStrategySource(t)),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.movePaneUp=function(e){this.movePane(e,e-1)},e.prototype.movePaneDown=function(e){this.movePane(e,e+1)},e.prototype.movePane=function(e,t){var i=this._panes[e];this._panes.splice(e,1),this._panes.splice(t,0,i),this.invalidate(l.InvalidateMask.panesOrder())},e.prototype.panes=function(){return this._panes},e.prototype.paneForId=function(e){return this._panes.find(function(t){return t.id()===e})||null},e.prototype.createPane=function(e,t){var i,n,o=this._undoModel.chartWidget();return o.isMaximizedPane()&&o.toggleMaximizePane(),i=this._properties.paneProperties,t&&i.merge(t),n=new u.Pane(this.timeScale(),i,this),void 0!==e?this._panes.splice(e,0,n):this._panes.push(n),n.onTagsChanged().subscribe(this,this.onPaneTagsChanged),this.invalidate(l.InvalidateMask.panesOrder()),n},e.prototype.removePane=function(e){var t,i,n=this._undoModel.chartWidget();n.isMaximizedPane()&&n.toggleMaximizePane(),(t=e).destroy(),-1!==(i=this._panes.indexOf(t))&&this._panes.splice(i,1),this.crossHairSource().pane===e&&this.clearCurrentPosition(),this.invalidate(l.InvalidateMask.panesOrder())},e.prototype.changePanesHeight=function(e,t){var i,o,r,s,a,l,c,u,h,d,p,_,f;if(!(this._panes.length<2)){for(Object(n.assert)(e>=0&&e'+e+""}),o.innerHTML=(t=r.text).format.apply(t,s).replace(/\s\+\s/g,'+'), l.classList.add(V["common-tooltip__body--with-hotkey"]),n&&o.classList.add(V["common-tooltip__hotkey-block--divider"]),l.appendChild(o)),a.addEventListener("contextmenu",E.a),a}function l(e,t){var i,n,o,r,s,a,l,c,d,p,_,f,m,y,g=t.rect;g&&(!function(e,t){var i,n=I.includes(t)?T[t]:"";(i=e.classList).remove.apply(i,I.map(function(e){return T[e]}).filter(function(e){return!!e})),n&&!e.classList.contains(n)&&e.classList.add(n)}(e,t.colorTheme||"default"),t.addClass&&e.classList.add(t.addClass),(i=h(e)).classList.toggle(V["common-tooltip__body--width_wide"],Boolean(t.wide)),i.classList.toggle(V["common-tooltip__body--no-padding"],Boolean(t.noPadding)),i.classList.toggle(V["common-tooltip__body--width_narrow"],Boolean(t.narrow)),i.classList.toggle(V["common-tooltip__body--no-buttons"],!0),e.classList.toggle(V["common-tooltip--no-pointer-events"],!Modernizr.pointerevents),i.style.left=u(0),i.style.width=u(i.clientWidth+(Boolean(t.noPadding)?0:2)),n=document.body.clientWidth,o=window.innerHeight,s=(r=t.vertical)&&g.w<20||!r&&g.h<20,e.classList.toggle(V["common-tooltip--farther"],s),e.classList.toggle(V["common-tooltip--vertical"],r),e.classList.toggle(V["common-tooltip--horizontal"],!r),a=e.querySelector("."+V["common-tooltip__ear-holder"]),l="",r?(e.style.left=u(g.x+g.w),e.style.top=u(g.y-(e.offsetHeight-g.h)/2),c=(e.querySelector(":last-child")||i).getBoundingClientRect().right+D>n,e.classList.toggle(V["common-tooltip--direction_reversed"],c),e.classList.toggle(V["common-tooltip--direction_normal"],!c),l=c?"after":"before",M.IS_RTL?(l=t.otr?"after":l,l=t.otl?"before":l):(l=t.otr?"before":l,l=t.otl?"after":l),a.classList.toggle(V["common-tooltip__ear-holder--before"],"before"===l),a.classList.toggle(V["common-tooltip__ear-holder--after"],"after"===l),"after"===l&&(e.style.left="auto",e.style.right=u(n-g.x))):(d=g.x-(i.offsetWidth-g.w)/2,p=n-D-e.offsetWidth,_=Math.max(D,Math.min(d,p)),e.style.bottom=u(o-g.y),e.style.left=u(_),c=p\n\t\t
\n\t\t\t
\n\t\t
\n\t\t
\n\t
\n',B='\n\t
\n',R='\n\t
\n',F=Object(k.b)(O),N=Object(k.b)(B),W=Object(k.b)(R),i.d(t,"showOnElement",function(){return d}),i.d(t,"show",function(){return p}),i.d(t,"updateTooltipText",function(){return _}),i.d(t,"hide",function(){return f}),H=500,z=!1,j=null,Modernizr.mobiletouch||document.addEventListener("mouseover",function(e){var t,i,n=e.target,o=e.currentTarget,r=function(e,t,i){ for(var n,o=[];e&&e!==t;)e.classList&&e.classList.contains(i)&&o.push(e),e=e.parentElement||(n=e.parentNode)&&(n.nodeType===Node.ELEMENT_NODE?n:null);return o}(n,o,"apply-common-tooltip"),s=function(t){var i,n,o;if("buttons"in e){if(1&e.buttons)return"continue"}else if(1===e.which)return"continue";if((i=function(){return d(t)})())return n=function(){t.removeEventListener("common-tooltip-update",i),t.removeEventListener("mouseleave",n),t.removeEventListener("mousedown",n),document.removeEventListener("scroll",n),f()},o=function(e){27===e.keyCode&&(document.removeEventListener("keydown",o),n())},t.addEventListener("common-tooltip-update",i),t.addEventListener("mouseleave",n),t.addEventListener("mousedown",n),document.addEventListener("scroll",n),document.addEventListener("keydown",o),"break"};for(t=0,i=r;t2;)c=Math.round((p+d)/2),this.items[c].x<=e.x?d=c:p=c;for(d=Math.max(1,d-1),p=Math.min(this.items.length-1,p+1),u=d;u<=p;++u)if(t=this.items[u-1],i=this.items[u],n=t.x,l=i.x,r(new o(n,t.y),new o(l,i.y),new o(e.x,e.y)).distance<=h)return this.hittest?this.hittest:new a(a.REGULAR);return null},t.PaneRendererLine=TradingView.PaneRendererLine=n},h24c:function(e,t,i){"use strict";function n(e){var t,i,n,o;return i=~~(t=/^[,\s]*(\d*)\s*([hdwms]?)\s*$/i.exec(e)||[])[1],n=t[2]&&t[2].toUpperCase()||null,(o={qty:!i&&n?1:i,unit:n}).error=!i&&!n,o.intraday=!(o.error||o.unit&&"H"!==o.unit),o}function o(e){var t,i,o;return h.enabled("allow_supported_resolutions_set_only")?null!==(t=r(e))&&Object(d.isAvailable)(t.toString()):!(i=n(e)).error&&(i.intraday?p.linking.intraday.value():!(o=p.linking.supportedResolutions.value())||null!==i.unit&&!!~o.indexOf(i.unit))}function r(e){var t=n(e),i=t.qty,o=t.unit;return t.error?null:("H"===o&&(i*=60,o=null),i&&!o?String(i):o&&(!i||1===i&&"S"!==o)?o:i+o)}function s(){return!1}function a(e){return!e.ctrlKey&&(!e.metaKey&&(!!e.charCode&&(!(!e.which||e.which<=32)&&(null===e.target||!/^(input|textarea)$/i.test(e.target.tagName)))))}function l(e,t){return!t&&(e===p.linking.symbol.value()||e===p.linking.seriesShortSymbol.value())}function c(e,t){var i=p.linking.symbol.value()||"";i=function(e,t){if(!t)return e;if(f.test(e)){var i=e.split(/\//);i.length&&(e=i[i.length-1])}else e=p.linking.seriesShortSymbol.value()||e;return e}(i,t),e.val(i)}function u(e){Object(d.setLastUsedResolution)(e),p.linking.interval.setValue(e)}var h,d,p,_,f;i.r(t),i.d(t,"parseIntervalValue",function(){return n}),i.d(t,"intervalIsSupported",function(){return o}),i.d(t,"sanitizeIntervalValue",function(){return r}),i.d(t,"canShowSpreadActions",function(){return s}),i.d(t,"globalKeypressMatches",function(){return a}),i.d(t,"skipAccept",function(){return l}),i.d(t,"syncSymbolSearch",function(){return c}),i.d(t,"setLinkingResolution",function(){return u}),h=i("Kxc7"),d=i("pPtI"),p=i("PT1i"),_=i("ePL1"),f=new RegExp("^"+_.types.QUANDL,"i")},hBTJ:function(e,t,i){"use strict";function n(e,t){var i,n,o=e.A,r=t.A,s=e.B,a=t.B,l=e.C,u=t.C,h=o*a-r*s;return Math.abs(h)<1e-6?null:(i=(s*u-a*l)/h,n=(r*l-o*u)/h,new c.Point(i,n))}function o(e,t,i,n){var o,r,s=function(e,t,i,n){var o,r=t.subtract(e),s=n.subtract(i),a=r.x*s.y-r.y*s.x;return Math.abs(a)<1e-6?null:((o=e.subtract(i)).y*s.x-o.x*s.y)/a}(e,t,i,n);return null===s?null:(o=t.subtract(e).scaled(s).add(e),r=u.distanceToSegment(i,n,o),Math.abs(r.distance)<1e-6?s:null)}function r(e,t){var i,n,o;for(i=0,n=e;i0&&c.equalPoints(e[e.length-1],t))&&(e.push(t),!0)}function a(e,t){var i,o,r,a,l,u=[];for(i=0;i=3?u:null}var l,c,u,h;Object.defineProperty(t,"__esModule",{value:!0}),l=i("Eyy1"),c=i("aO4+"),u=i("GEp6"),h=i("f6yo"),t.intersectLineSegmentAndBox=function(e,t){function i(e,t,i,n,o,r){var s=0;return eo&&(s|=2),tr&&(s|=8),s}for(var n,o,r,s=e[0].x,a=e[0].y,l=e[1].x,u=e[1].y,h=t.min.x,d=t.min.y,p=t.max.x,_=t.max.y,f=i(s,a,h,d,p,_),m=i(l,u,h,d,p,_),y=!1,g=0;;){if(g>1e3)throw new Error("Cohen - Sutherland algorithm: infinity loop");if(g++,!(f|m)){y=!0;break}if(f&m)break;o=void 0,r=void 0,8&(n=f||m)?(o=s+(l-s)*(_-a)/(u-a),r=_):4&n?(o=s+(l-s)*(d-a)/(u-a),r=d):2&n?(r=a+(u-a)*(p-s)/(l-s),o=p):(r=a+(u-a)*(h-s)/(l-s),o=h),n===f?f=i(s=o,a=r,h,d,p,_):m=i(l=o,u=r,h,d,p,_)}return y?c.equalPoints(c.point(s,a),c.point(l,u))?c.point(s,a):c.lineSegment(c.point(s,a),c.point(l,u)):null},t.intersectLines=n,t.intersectLineSegments=o,t.intersectLineAndBox=function(e,t){var i,n,o,s,a,u=t.min.x,h=t.min.y,d=t.max.x,p=t.max.y;if(0===e.A)return i=-e.C/e.B,h<=i&&i<=p?c.lineSegment(c.point(u,i),c.point(d,i)):null;if(0===e.B)return n=-e.C/e.A,u<=n&&n<=d?c.lineSegment(c.point(n,h),c.point(n,p)):null;switch(o=[],a=function(t){var i=function(e,t){return-(e.C+e.B*t)/e.A}(e,t);u<=i&&i<=d&&r(o,new c.Point(i,t))},(s=function(t){var i=function(e,t){return-(e.C+e.A*t)/e.B}(e,t);h<=i&&i<=p&&r(o,new c.Point(t,i))})(u),a(h),s(d),a(p),o.length){case 0:return null;case 1:return o[0];case 2:return c.equalPoints(o[0],o[1])?o[0]:c.lineSegment(o[0],o[1])}return l.assert(!1,"We should have at most two intersection points"),null},t.intersectRayAndBox=function(e,t,i){var n,r=o(e,t,i.min,new c.Point(i.max.x,i.min.y)),s=o(e,t,new c.Point(i.max.x,i.min.y),i.max),a=o(e,t,i.max,new c.Point(i.min.x,i.max.y)),l=o(e,t,new c.Point(i.min.x,i.max.y),i.min),u=[];return null!==r&&r>=0&&u.push(r),null!==s&&s>=0&&u.push(s),null!==a&&a>=0&&u.push(a),null!==l&&l>=0&&u.push(l),0===u.length?null:(u.sort(function(e,t){return e-t}),n=h.pointInBox(e,i)?u[0]:u[u.length-1],e.addScaled(t.subtract(e),n))},t.intersectPolygonAndHalfplane=a,t.intersectPolygons=function(e,t){var i,n,o,r,s,l=e;for(i=0;i0){if(t=this._points[this._points.length-1],i=this._model.timeScale().indexToCoordinate(t.index),n=t.price,s=this.priceScale().priceToCoordinate(n,p),new o(h,_).subtract(new o(i,s)).length()0&&(this._value=e),this._listeners=[]}t.prototype.value=function(){return this._owner?this._owner._value:this._value},t.prototype.setValue=function(e,t){var i,n,o,r=this._owner?this._owner:this;if("function"==typeof r.hook&&(e=r.hook(e)),r.writeLock)return r._value;if(!t&&r._value===e&&r.hasOwnProperty("_value"))return e;for(r._value=e,i=r._listeners.slice(),n=0,o=0;o\n\t\t\t\t'+i+'\n\t\t\t\t\n\t\t\t'),this._$input=this._$field.find("input"),this._error=s}return n(e,[{key:"appendTo",value:function(e){e.append(this._$field)}},{key:"focus",value:function(){return this._$input.focus()}},{key:"select",value:function(){return this.focus().select()}},{key:"value",set:function(e){this._$input.val(e)},get:function(){return this._$input.val()}},{key:"name",get:function(){return this._name}},{key:"valid",get:function(){return!!this._$input.val().trim()}},{key:"error",set:function(e){this._error=e},get:function(){return this._error}}]),e}()},hsV8:function(e,t,i){"use strict";function n(e){var t,i;if(""===e)return Promise.resolve(null);if(t=JSON.parse(e),!Object(o.isObject)(t)||"function"==typeof t)return Promise.reject(new Error("Non-object content in the non-series envelope"));if(Object(o.hasProperty)(t,"indexes_replace"))return Promise.resolve({indexes_replace:!0});if(i={indexes_replace:!1},Object(o.hasProperty)(t,"offsets")&&(i.offsets=t.offsets),Object(o.hasProperty)(t,"isUpdate")){if("boolean"!=typeof t.isUpdate)return Promise.reject(new Error('Invalid type of "isUpdate" field'));i.isUpdate=t.isUpdate}return Object(o.hasProperty)(t,"data")&&(i.data=t.data),Object(o.hasProperty)(t,"graphicsCmds")&&(i.graphicsCmds=Object(r.b)(t.graphicsCmds)),Promise.resolve(i)}var o,r;i.r(t),i.d(t,"unpackNonSeriesData",function(){return n}),i("mrSG"),o=i("JmuD"),r=i("qySK")},htUT:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"ChartChangesWatcher",function(){return r}),n=i("aIyQ"),o=i.n(n),r=function(){function e(e,t,i){this._hasChanges=!1,this._undoHistory=e,this._chartSaver=t,this._globalEvents=i,this._onValueChanged=new o.a,this._subscribe()}return e.prototype.destroy=function(){this._unsubscribe(),this._onValueChanged.destroy()},e.prototype.hasChanges=function(){return this._hasChanges},e.prototype.getOnChange=function(){return this._onValueChanged},e.prototype._subscribe=function(){this._globalEvents.subscribe("chart_loaded",this._handleChartLoaded,this),this._undoHistory.undoStack().onChange().subscribe(this,this._handleChangeUndoStack),this._chartSaver.chartSaved().subscribe(this,this._handleChartSaved)},e.prototype._unsubscribe=function(){this._globalEvents.unsubscribe("chart_loaded",this._handleChartLoaded,this),this._undoHistory.undoStack().onChange().unsubscribe(this,this._handleChangeUndoStack),this._chartSaver.chartSaved().unsubscribe(this,this._handleChartSaved)},e.prototype._setChanges=function(e){this._hasChanges=e,this._onValueChanged.fire(e)},e.prototype._handleChartLoaded=function(){this._setChanges(!1)},e.prototype._handleChangeUndoStack=function(){var e=this._undoHistory.undoStack().head();e&&!e.customFlag("doesnt_affect_save")&&this._setChanges(!0)},e.prototype._handleChartSaved=function(e){e&&this._setChanges(!1)},e}()},"hyq/":function(e,t,i){"use strict";function n(e,t){ e.setUTCMonth(e.getUTCMonth()+t)}function o(e,t){var i;return s.Std.ismonthly(e)?((i=new Date(t)).getUTCDay()=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 s,a,l,c,u,h;i.r(t),i.d(t,"pivotPointsStandardStudyItem",function(){return h}),s=i("ocLq"),a=i("LxhU"),l=function(){return function(){this.p=NaN,this.r1=NaN,this.s1=NaN,this.r2=NaN,this.s2=NaN,this.r3=NaN,this.s3=NaN,this.r4=NaN,this.s4=NaN,this.r5=NaN,this.s5=NaN,this.startIndex__t=NaN,this.endIndex__t=NaN}}(),c=function(){return function(){this.pivots=[]}}(),u=function(){function e(){this._secondaryRes="1D",this._firstMainSeriesBarTime=NaN}return e.prototype.init=function(e,t){var i,n=t(0),o=t(1),a=t(2),l=t(3);this._data=new c,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)}}(n),this._showHistoricalPivots=o,this._historicalPivotsToKeep=l,this._pivTimeFrame=a,this._isValidResolution=function(e,t){return!(s.Std.isdaily(e)&&"Daily"===t||s.Std.isweekly(e)&&("Daily"===t||"Weekly"===t)||s.Std.ismonthly(e)&&("Daily"===t||"Weekly"===t||"Monthly"===t))}(e,this._pivTimeFrame),this._isValidResolution||s.Std.error("You cannot see this pivot timeframe on this resolution"),this._isValidResolution&&(this._secondaryRes=r(e,this._pivTimeFrame)),i=""===e.symbol.resolution?String(Math.max(30,2*parseInt(e.symbol.interval))):e.symbol.period,e.new_sym(e.symbol.tickerid,this._secondaryRes,this._secondaryRes,i)},e.prototype.main=function(e){var t,i,n,r,a,c,u,h,d,p,_,f,m,y,g;return this._isValidResolution?e.symbol.time?(isNaN(this._firstMainSeriesBarTime)&&(this._firstMainSeriesBarTime=e.symbol.time,this._removeUnusedPivots()),e.symbol.isLastBar&&e.symbol.isNewBar?this._createResponse():null):(e.select_sym(1),t=e.new_var(s.Std.open(e)),i=e.new_var(s.Std.high(e)),n=e.new_var(s.Std.low(e)),r=e.new_var(s.Std.close(e)),a=e.new_var(s.Std.time(e)),c=this._data,u=t.get(0),h=a.get(0),d=t.get(1),p=i.get(1),_=n.get(1),f=r.get(1),m=e.symbol.isLastBar,0!==c.pivots.length&&e.symbol.isNewBar&&(y=c.pivots[c.pivots.length-1]).endIndex__t!==h&&(y.endIndex__t=h),0!==e.symbol.index&&e.symbol.isNewBar?(g=function(e,t,i,n,o,r,a,c){var u,h=new l,d=NaN,p=i-n;switch(c){case 0:d=(i+n+o)/3,h.p=d,h.r1=2*d-n, h.s1=2*d-i,h.r2=d+(i-n),h.s2=d-(i-n),h.r3=2*d+(i-2*n),h.s3=2*d-(2*i-n),h.r4=3*d+(i-3*n),h.s4=3*d-(3*i-n),h.r5=4*d+(i-4*n),h.s5=4*d-(4*i-n);break;case 1:d=(i+n+o)/3,h.p=d,h.r1=d+.382*p,h.s1=d-.382*p,h.r2=d+.618*p,h.s2=d-.618*p,h.r3=d+p,h.s3=d-p;break;case 2:d=(i+n+2*e)/4,h.p=d,h.r1=2*d-n,h.s1=2*d-i,h.r2=d+p,h.s2=d-p,h.r3=i+2*(d-n),h.s3=n-2*(i-d),h.r4=h.r3+p,h.s4=h.s3-p;break;case 3:d=(i+n+o)/3,h.p=d,h.r1=2*d-n,h.s1=2*d-i,h.r2=d+p,h.s2=d-p,h.r3=d+2*p,h.s3=d-2*p,h.r4=d+3*p,h.s4=d-3*p;break;case 4:u=NaN,d=(u=s.Std.equal(t,o)?i+n+2*o:s.Std.greater(o,t)?2*i+n+o:2*n+i+o)/4,h.p=d,h.r1=u/2-n,h.s1=u/2-i;break;case 5:d=(i+n+o)/3,h.p=d,h.r1=o+1.1*p/12,h.s1=o-1.1*p/12,h.r2=o+1.1*p/6,h.s2=o-1.1*p/6,h.r3=o+1.1*p/4,h.s3=o-1.1*p/4,h.r4=o+1.1*p/2,h.s4=o-1.1*p/2;break;default:throw new Error("Unknown kind")}return h.startIndex__t=r,h.endIndex__t=a,h}(u,d,p,_,f,h,o(e,h),this._kindPP),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.select_sym(0),null)):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}(),h={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:u}},i126:function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i.d(t,"StudyColorRotatorFactory",function(){return c}),n=i("eJTA"),o=i("6Kf3"),r=i("3ClC"), s=["color-tan-orange-a700","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"],a=function(){function e(){this._index=0}return e.prototype.getColor=function(e){var t=s[this._index++%s.length];return o.a[t]},e}(),l=function(){function e(e,t){this._offset=e,this._modelStartOffset=t}return e.prototype.getColor=function(e){return Object(n.shiftColor)(e,this._offset,this._modelStartOffset)},e}(),c=function(){function e(e){this._chartModel=e,this._loopRotator=new a}return e.prototype.getColorRotator=function(e){var t,i,n=Object(r.studyColorRotationMode)(e);switch(n){case"loop":return this._loopRotator;case"shift":return t=this._calcDefaultColorsOffset(e),i=this._chartModel.getStudyShiftColorStartOffset(),new l(t,i)}},e.prototype._calcDefaultColorsOffset=function(e){var t=0;return this._chartModel.dataSources().filter(r.isStudy).forEach(function(i){var n,o,r,s,a=i.metaInfo().id===e.id,l=(n=i.metaInfo(),o=e,r=n.pine?n.pine.version:void 0,s=o.pine?o.pine.version:void 0,r===s),c=a&&l;c&&t++}),t},e}()},i1o5:function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"InvalidationLevel",function(){return n}),i.d(t,"InvalidateMask",function(){return o}),function(e){e[e.Cursor=1]="Cursor",e[e.Light=2]="Light",e[e.Full=3]="Full"}(n||(n={})),o=function(){function e(e){this._panesOrderChanged=!1,this._invalidatedPanes=new Map,this._invalidationLevel=e||n.Cursor}return e.prototype.invalidatePane=function(e,t){var i=this._invalidatedPanes.get(e)||n.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)||n.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 o=t._invalidatedPanes.get(i)||n.Cursor;t._invalidatedPanes.set(i,Math.max(o,e))})},e.prototype.panesOrderInvalidated=function(){ return this._panesOrderChanged},e.prototype.exclude=function(e){var t,i,n,o;for(this._invalidationLevel<=e&&(this._invalidationLevel=0),t=[],this._invalidatedPanes.forEach(function(i,n){i<=e&&t.push(i)}),i=0,n=t;i0?1/0:t<0?-1/0:e.zorder()]}).sort(function(e,t){return e[1]-t[1]||e[2]-t[2]}).map(function(e){return e[0]})},n.prototype._defaultBottomMargin=function(){return.01*this._properties.bottomMargin.value()},n.prototype._defaultTopMargin=function(){return.01*this._properties.topMargin.value()},n.prototype._updateMargins=function(){var e,t,i=this._defaultTopMargin(),n=this._defaultBottomMargin();for(this._leftPriceScales.forEach(function(e){e.setTopMargin(i),e.setBottomMargin(n)}),this._rightPriceScales.forEach(function(e){e.setTopMargin(i),e.setBottomMargin(n)}),e=0;et.left?((e=s(this._leftPriceScales,this.mainDataSource().priceScale())).splice(t.left),e):this._leftPriceScales}, n.prototype.visibleRightPriceScales=function(){var e,t=this._model.priceScaleSlotsCount();return this._rightPriceScales.length>t.right?((e=s(this._rightPriceScales,this.mainDataSource().priceScale())).splice(t.right),e):this._rightPriceScales},n.prototype.timeScale=function(){return this.m_timeScale},n.prototype.dataSources=function(){return this.m_dataSources},n.prototype.isOverlay=function(e){var t=e.priceScale();return"overlay"===this.priceScalePosition(t)},n.prototype._processMainSourceChange=function(){var e,t,i,o,r;if(null===this.m_mainDataSource)for(t=0;tn)&&(n=i));return null===n&&(n=this.getZOrderMinMax().minZOrder-1),this.m_dataSources.forEach(function(e){e.zorder()>n&&e.setZorder(e.zorder()+1)}),n+1},n.prototype.beginInsertManyLineDataSources=function(){this._isInInsertManyDataSourcesState=!0,this._lastLineDataSourceZOrder=null},n.prototype.endInsertManyLineDataSources=function(){this._isInInsertManyDataSourcesState=!1,this._lastLineDataSourceZOrder=null},n.prototype.addDataSource=function(e,t,i){var n;_(e)&&!i?(n=null!==this._lastLineDataSourceZOrder?this._lastLineDataSourceZOrder:this._newZOrderForLineTool(),this._isInInsertManyDataSourcesState&&(this._lastLineDataSourceZOrder=n)):n=this.getZOrderMinMax().minZOrder-1,this.insertDataSource(e,t,n)},n.prototype.insertDataSource=function(e,t,i){t||(t=this.findSuitableScale(e)),this.m_dataSources.push(e);var o=!1;e===this._model.mainSeries()?(this.m_mainDataSource=e,o=!0):null===this.m_mainDataSource&&(this.m_mainDataSource=e,o=!0),t.addDataSource(e,this._isInInsertManyDataSourcesState),e.setPriceScale(t),e.onTagsChanged&&e.onTagsChanged().subscribe(this,n.prototype.onSourceTagsChanged),e.setZorder(i),o&&this._processMainSourceChange(),this._tagsChanged.fire(),TradingView.isInherited(e.constructor,u)&&this.recalculatePriceScale(t),this.invalidateSourcesCache()},n.prototype.priceScalePosition=function(e){return this._leftPriceScales.includes(e)?"left":this._rightPriceScales.includes(e)?"right":"overlay"},n.prototype.createPriceScaleAtPosition=function(e,t){ var i,n=this._properties.axisProperties.state();return n.autoScale=!0,(i=new f(this._model.properties().scalesProperties,n)).setHeight(this.height()),i.setTopMargin(this._defaultTopMargin()),i.setBottomMargin(this._defaultBottomMargin()),this._placePriceScale(i,e,t),i},n.prototype._placePriceScale=function(e,t,i){var n,o;"overlay"!==t&&(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())},n.prototype.removePriceScale=function(e){var t,i;e.modeChanged().unsubscribeAll(this),e.priceRangeChanged().unsubscribeAll(this),e.internalHeightChanged().unsubscribeAll(this),e===this._lockedPriceScale&&(this._lockedPriceScale=null,this._currentPriceScaleRatio=null),-1!==(t=this._leftPriceScales.indexOf(e))&&this._leftPriceScales.splice(t,1),-1!==(i=this._rightPriceScales.indexOf(e))&&this._rightPriceScales.splice(i,1),this._onPriceScalesChanged.fire()},n.prototype.removeDataSource=function(e,t){var i,o,r=this.m_dataSources.indexOf(e);-1!==r?(this.m_dataSources.splice(r,1),e!==this.m_mainDataSource||t||(this.m_mainDataSource=null),(i=e.priceScale())&&i.dataSources().indexOf(e)>=0&&i.removeDataSource(e),i&&null===i.mainSource()&&(0!==(o=i.dataSources().length)&&h.logError("Invalid priceScale state: empty mainSource but non-empty data sources="+o),this.removePriceScale(i)),e.onTagsChanged&&e.onTagsChanged().unsubscribe(this,n.prototype.onSourceTagsChanged),e instanceof u&&!t&&this._processMainSourceChange(),this._tagsChanged.fire(),i&&e instanceof u&&this.recalculatePriceScale(i),this.invalidateSourcesCache()):h.logDebug("removeDataSource: invalid data source")},n.prototype.startScalePrice=function(e,t){e.startScale(t)},n.prototype.scalePriceTo=function(e,t){e.scaleTo(t),this.updateAllViews()},n.prototype.endScalePrice=function(e){e.endScale()},n.prototype.startScrollPrice=function(e,t){e.startScroll(t)},n.prototype.scrollPriceTo=function(e,t){e.scrollTo(t),this.updateAllViews()},n.prototype.endScrollPrice=function(e){e.endScroll()},n.prototype.setPriceAutoScale=function(e,t){e.setMode({autoScale:t}),this.timeScale().isEmpty()?e.setPriceRange(null):this.recalculatePriceScale(e)},n.prototype.restorePriceScaleState=function(e,t){e.restoreState(t),this.updateAllViews()},n.prototype._updateCustomSourceAllViews=function(e){e.paneViews(this).length>0&&e.updateAllViews()},n.prototype.updateAllViews=function(){for(var e=0;e0&&!this.timeScale().isEmpty()&&(i=this.timeScale().visibleBarsStrictRange(),e.recalculatePriceRange(i)),e.updatePaneViews())},n.prototype.resetPriceScale=function(e){var t=this.timeScale().visibleBarsStrictRange();e.isLockScale()||e.setMode({autoScale:!0}),e.recalculatePriceRange(t),this.updateAllViews()},n.prototype.recalculate=function(){var e,t;for(this.recalculatePriceScale(this.m_rightPriceScale),this.recalculatePriceScale(this.m_leftPriceScale),e=0;et&&(t=n.zorder());return{minZOrder:e,maxZOrder:t}},n.prototype.isZOrderAvailable=function(e){var t;for(t=0;t0&&t<0?(o=a[l-1].zorder(),r=e.zorder(),a[l-1].setZorder(r),e.setZorder(o)):l0&&(s=a[l+1].zorder(),r=e.zorder(),a[l+1].setZorder(r),e.setZorder(s)),this.invalidateSourcesCache()},n.prototype.onSourceTagsChanged=function(){this._tagsChanged.fire()},n.prototype.onTagsChanged=function(){return this._tagsChanged},n.prototype.onDestroyed=function(){return this._destroyed},n.prototype.clearSeries=function(){for(var e=this.m_dataSources.length-1;e>=0;e--)TradingView.isInherited(this.m_dataSources[e].constructor,TradingView.Series)&&this.m_dataSources.splice(e,1)},n.prototype.nonOverlayPricesSourcesCount=function(){return this.m_dataSources.filter(function(e){return(!e.properties().linkedToSeries||!e.properties().linkedToSeries.value())&&(TradingView.isInherited(e.constructor,u)&&e.showInObjectTree()&&!this.isOverlay(e))},this).length},n.prototype.canHaveMoreNoScaleSources=function(){return this.nonOverlayPricesSourcesCount()>1},n.prototype.actionNoScaleIsEnabled=function(e){return!(!this.isOverlay(e)&&TradingView.isInherited(e.constructor,u))||this.canHaveMoreNoScaleSources()},n.prototype.executionsPositionController=function(){ return this._executionsPositionController||(this._executionsPositionController=new a(this,this._model.timeScale())),this._executionsPositionController},n.prototype.isLast=function(){var e=this._model.panes(),t=e[e.length-1];return t===this},n.prototype.setMaximized=function(e){this._maximized=e},n.prototype.isMaximized=function(){return this._maximized},n.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},n.prototype.properties=function(){return this._properties},n.prototype._mainSourceVisiblePriceRange=function(e){var t=this.m_timeScale.visibleBarsStrictRange();return null!==t?e.mainSource().priceRange(t.firstBar(),t.lastBar()):new c(-.5,.5)},n.prototype.priceScaleRatio=function(){return this._currentPriceScaleRatio},n.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())},n.prototype._mainSeriesPaneScaleRatioOnChange=function(){this.isMainPane()&&this._model.mainSeriesScaleRatioPropertyOnChanged()},n.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},n.prototype._applyOldScaleRatioToTimeScale=function(){if(this._isRecalculatingScales||null===this._currentPriceScaleRatio)return!1;this._isRecalculatingScales=!0,this._setNewBarSpacingByScaleRatio(),this._isRecalculatingScales=!1},n.prototype._tryToApplyNewPriceScaleRatio=function(){var e=m(this.m_timeScale,this._lockedPriceScale);this._currentPriceScaleRatio===e||this._lockedPriceScale.isLog()||(this._priceScaleRatioChanged.fire(this._currentPriceScaleRatio,e),this._currentPriceScaleRatio=e)},n.prototype._recalculatePriceScaleByScaleRatio=function(e){this.isMainPane()&&e===this._lockedPriceScale&&(null!==this._currentPriceScaleRatio?this._applyOldScaleRatioToPriceScale():this._tryToApplyNewPriceScaleRatio())},n.prototype._recalculateTimeScaleByScaleRatio=function(e){e===this._lockedPriceScale&&(null!==this._currentPriceScaleRatio?this._applyOldScaleRatioToTimeScale():this._tryToApplyNewPriceScaleRatio())},n.prototype._setNewPriceRangeByScaleRatio=function(e,t,i,n,o){var r=y(e,this.m_timeScale.barSpacing(),t);e.setPriceRange(null!==r?r:i,n,o)},n.prototype._setMinMaxPriceRange=function(){var e=y(this._lockedPriceScale,this.m_timeScale.maxBarSpacing(),this._currentPriceScaleRatio),t=y(this._lockedPriceScale,this.m_timeScale.minBarSpacing(),this._currentPriceScaleRatio) ;null!==e&&this._lockedPriceScale.setMaxPriceRange(e),null!==t&&this._lockedPriceScale.setMinPriceRange(t)},n.prototype._onPriceScaleSetMinMaxPriceRange=function(e){e===this._lockedPriceScale&&this._setMinMaxPriceRange()},n.prototype._setNewBarSpacingByScaleRatio=function(){var e=this.m_timeScale.getValidBarSpacing(g(this._lockedPriceScale,this._currentPriceScaleRatio));this.m_timeScale.isValidBarSpacing(e)&&this.m_timeScale.setBarSpacing(e)},n.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=m(this.m_timeScale,e)),t.lockScale&&!i.lockScale&&(this._lockedPriceScale=null,this._currentPriceScaleRatio=null),t.percentage!==i.percentage||t.indexedTo100!==i.indexedTo100){var n=this.timeScale().visibleBarsStrictRange();null!==n&&(e.recalculatePriceRange(n),e.updatePaneViews())}},n.prototype.lineToolsForArea=function(e){var t=this.m_height,i=this.m_width,n=this.logicalRectToPixels(e),o=function(e){return(e.paneViews()||[]).some(function(e){var o=e.renderer(t,i,!0);return o&&o.doesIntersectWithBox&&o.doesIntersectWithBox(n)})};return this.m_dataSources.filter(function(e){return _(e)}).filter(o)},n.prototype.logicalRectToPixels=function(e){var t=this.defaultPriceScale(),i=this.m_timeScale,n=t.mainSource().firstValue(),o=t.priceToCoordinate(e.p1.price,n),r=i.indexToCoordinate(e.p1.index),s=t.priceToCoordinate(e.p2.price,n),a=i.indexToCoordinate(e.p2.index),l=new d(Math.min(r,a),Math.min(o,s)),c=new d(Math.max(r,a),Math.max(o,s));return p(l,c)},n.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()},n.prototype.setPriceScaleSelectionStrategy=function(e){this._priceScaleSelectionStrategy=e,e.apply(this)},n.prototype.movePriceScale=function(e,t,i){var n,o,r=this.priceScalePosition(e);r!==t?(this.removePriceScale(e),this._placePriceScale(e,t,i),this.invalidateSourcesCache()):void 0!==i&&"overlay"!==r&&(o=(n="left"===r?this._leftPriceScales:this._rightPriceScales).indexOf(e),n.splice(o,1),n.splice(i,0,e))},n.prototype.onPriceScalesChanged=function(){return this._onPriceScalesChanged},n.prototype.priceScaleIndex=function(e,t){switch(t){case"left":return this.leftPriceScales().indexOf(e);case"right":return this.rightPriceScales().indexOf(e)}},n.prototype.findTargetPriceAxisViews=function(e,t,i,n){var o,r;return this._model.paneForSource(e)!==this?null:t===e.priceScale()?i:"overlay"===this.priceScalePosition(e.priceScale())?t===this.defaultPriceScale()?i:null:(o=this.priceScalePosition(t))!==this.priceScalePosition(e.priceScale())?null:(r="left"===o?this.leftPriceScales():this.rightPriceScales()).indexOf(t)0&&(c=2*Math.PI-c),0===e&&(c+=Math.PI),this._properties.angle.setValue(c)):(u=this._startChangeWidth,h=r.subtract(o).length(),this._origScale*uP||(C=this._study.data().last(),null!==(T=this._study.data().valueAt(P)||(null!==C?C.value:null))&&(I=T[b+1],Object(o.isNumber)(I)&&(n.setValue(m.format(I)),L=this._study.properties().styles[S].color.value(),p=r[b],Object(l.isOhlcPlot)(p)&&(S=p.target||S,L=this._study.properties().ohlcPlots[S].color.value()),A=L,s[S]&&T.length>s[S].index+1&&(k=T[s[S].index+1],M=s[S].palette,void 0!==k&&null!==k&&void 0!==M&&(E=s[S].paletterProps,V=M.valToIndex?M.valToIndex[k]:k,A=E.colors[void 0!==V?V:k].color.value())),n.setColor(A)))))}},t}(r.DataWindowView)},ivNn:function(e,t,i){"use strict";function n(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=n,t.alignTo=function(e,t){var i=e/t,o=Math.floor(i),r=i-o;return r>2e-10?n(r>.5?(o+1)*t:o*t):e}},j1f4:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"dur",function(){return n}),i.d(t,"easingFunc",function(){return o}),i.d(t,"CubicBezier",function(){return r}),i.d(t,"color",function(){return s}),n=350,o={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}},r=function(){function e(e,t,i,n){this._mX1=e,this._mY1=t,this._mX2=i,this._mY2=n}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){var t,i,n=e;for(t=0;t<4;++t){if(0===(i=this._getSlope(n)))return n;n-=(this._calcBezier(n)-e)/i}return n},e}(),s={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"}},jA0t:function(e,t,i){"use strict";var n=function(){function e(e){return e.is_price_study}function t(e,t){var i,n=t.slice(0).toLowerCase();if(e){for(i=0;it){if((n=o-1)0&&e-i[r-1]<=t?t:0},n.prototype.is_valid=function(){return!this._invalid},n._offset=function(e,t,i){var n=o(e,i);return-1===n?0:t[n]},r=function(e){return 0|e},a=function(e){return 1e3*e},l=function(e,t){return r((r(e/1e3)-r(t/1e3))/60)},c=function(e,t){return r(r(e/1e3)-r(t/1e3))},u={0:0,1:31,2:59,3:90,4:120,5:151,6:181,7:212,8:243,9:273,10:304,11:334},h={SUNDAY:1,MONDAY:2,TUESDAY:3,WEDNESDAY:4,THURSDAY:5,FRIDAY:6,SATURDAY:7,JANUARY:0,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:(s=function(e){return 60*e*1e3})(1440),get_minutes_from_hhmm:function(e){return-1!==e.indexOf(":")&&(e=e.split(":").join("")),e%100+60*r(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,i=e.getUTCMonth(),n=u[i];return i>1&&((t=e.getUTCFullYear())%4==0&&t%100!=0||t%400==0)&&(n+=1),n+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,n=h.get_day_of_year(e),o=n-i;return Math.ceil(o/7)+1},get_minutes_from_midnight:function(e){return 60*h.get_hours(e)+h.get_minutes(e)},set_hms:function(e,t,i,n,o,r){e.setUTCHours(t),e.setUTCMinutes(i),e.setUTCSeconds(n),e.setUTCMilliseconds(o),h.correct_time(e,r)},correct_time:function(e,t){var i=e.getTime(),n=t.correction_loc(i);e.setTime(i+n)},add_days_considering_dst:function(e,t,i){var n,o=e.offset_utc(t),r=this.clone(t);return this.add_date(r,i),n=e.offset_utc(r),r.setTime(r.getTime()+o-n),r},add_date:function(e,t){e.setTime(e.getTime()+t*h.secondsPerDay)},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 e%4!=0||e%100==0&&e%400!=0?365:366},get_part:function(e,t){switch(t){case h.YEAR:return h.get_year(e);case h.MONTH:return h.get_month(e);case h.DAY_OF_MONTH:return h.get_day_of_month(e);case h.WEEK_OF_YEAR:return h.get_week_of_year(e);case h.DAY_OF_WEEK:return h.get_day_of_week(e);case h.HOUR_OF_DAY:return h.get_hours(e);case h.MINUTE:return h.get_minutes(e);case h.DAY_OF_YEAR:return h.get_day_of_year(e);case h.SECOND:return h.get_seconds(e);default:return e.getTime()}},time_minutes:s,time_seconds:a,time_minutes_diff:l,time_seconds_diff:c,utc_to_cal:function(e,t){var i=e.offset_utc(t);return new Date(t+i)},get_cal:function(e,t,i,n){var o=new Date(Date.UTC(t,i,n)),r=e.offset_utc(+o);return new Date(o.valueOf()-r)},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(),n=e.offset_loc(i);return i-n},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=h},jFln:function(e,t,i){"use strict";var n,o,r,s;i("xL1m"),n=i("Hr11"),o=n.greaterThan,r=n.lessThan,s=window.CanvasEx=i("8Uy/"),TradingView.resizeCanvas=function(e,t,i){var n,o,r,s,a,l=e.height,c=e.width;l&&c&&(l/=window.hidpiCanvasRatio||1,c/=window.hidpiCanvasRatio||1,l<1&&(l=1),c<1&&(c=1),(n=document.createElement("canvas")).setAttribute("width",c),n.setAttribute("height",l),o=n.getContext("2d"),r=Math.min(c,t),s=Math.min(l,i),r&&s&&o.drawImage(e,0,0,r,s,0,0,r,s),e.height=i,e.width=t,a=e.getContext("2d"),r&&s&&a.drawImage(n,0,0,r,s,0,0,r,s))},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]][e.lineStyle-1]},s.drawLine=function(e,t,i,n,o){isFinite(t)&&isFinite(n)&&isFinite(i)&&isFinite(o)&&(e.lineStyle===s.LINESTYLE_DASHED||e.lineStyle===s.LINESTYLE_DOTTED||e.lineStyle===s.LINESTYLE_SPARSE_DOTTED?e.drawDashedLine(e,t,i,n,o):s.drawSolidLine(e,t,i,n,o))},s.drawArrow=function(e,t,i,n,o){isFinite(t)&&isFinite(n)&&isFinite(i)&&isFinite(o)&&(e.beginPath(),e.moveTo(n,o),e.lineTo(t,i),e.moveTo(t+2,i+2),e.lineTo(t-2,i+2),e.moveTo(t-1,i+1),e.lineTo(t+1,i+1),e.stroke())},s.drawSolidLine=function(e,t,i,n,o){e.beginPath(),e.moveTo(t,i),e.lineTo(n,o),e.stroke()},s.setLineStyle=function(e,t){e.lineStyle=t;var i=[];t!==s.LINESTYLE_SOLID&&(i=s.computeDashPattern(e)),"function"==typeof e.setLineDash?e.setLineDash(i):void 0!==e.mozDash?e.mozDash=i:void 0!==e.webkitLineDash&&(e.webkitLineDash=i)},s.drawPoly=function(e,t,i){var n,o;for(e.beginPath(),e.moveTo(t[0].x,t[0].y),n=0;n0&&(this.lineStyle=s.lineStyles.pop(),s.originalRestore.call(this))},CanvasRenderingContext2D.prototype.drawDashedLine=function(e,t,i,n,o){e.save() ;var r=s.computeDashPattern(e);if(e.beginPath(),"function"==typeof e.setLineDash)e.setLineDash(r);else if(void 0!==e.mozDash)e.mozDash=r;else{if(void 0===e.webkitLineDash)return e.dashedLineTo(t,i,n,o,r),e.stroke(),void e.restore();e.webkitLineDash=r}e.moveTo(t,i),e.lineTo(n,o),e.stroke(),e.restore()},CanvasRenderingContext2D.prototype.dashedLineTo=function(e,t,i,n,s){var a,l,c,u,h,d,p={thereYet:o,cap:Math.min},_={thereYet:o,cap:Math.min};for(t-n>0&&(_.thereYet=r,_.cap=Math.max),e-i>0&&(p.thereYet=r,p.cap=Math.max),this.moveTo(e,t),a=e,l=t,c=0,u=!0;!p.thereYet(a,i)||!_.thereYet(l,n);)h=Math.atan2(n-t,i-e),d=s[c],a=p.cap(i,a+Math.cos(h)*d),l=_.cap(n,l+Math.sin(h)*d),u?this.lineTo(a,l):this.moveTo(a,l),c=(c+1)%s.length,u=!u}),e.exports=s},jJ9X:function(e,t,i){},jRfx:function(e,t,i){"use strict";var n,o,r,s,a,l;i.r(t),i.d(t,"MergeUpUndoCommand",function(){return s}),i.d(t,"MergeDownUndoCommand",function(){return a}),i.d(t,"MergeToTargetPane",function(){return l}),n=i("mrSG"),o=i("Eyy1"),r=function(e){function t(t,i,n){var o=e.call(this,t,i,n)||this;return o._restorePane=!1,o}return n.__extends(t,e),t.prototype.redo=function(){var e,t,i=this,n=this._chartModel.panes()[this._targetPaneIndex()],r=Object(o.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),s=this._chartModel.children(r,!0);s.forEach(function(e){return i._chartModel.detachSource(e)}),this._restorePane=this._chartModel.detachSource(r),e=n.findSuitableScale(r),n.addDataSource(r,e,!1),s.forEach(function(t){return n.addDataSource(t,e,!1)}),r===this._chartModel.mainSeries()&&(t=n.priceScalePosition(e),n.movePriceScale(e,t,0)),this._chartModel.fullUpdate()},t.prototype.undo=function(){var e,t,i,n,r=this;e=this._restorePane?this._chartModel.createPane(this._initialPaneIndex):this._chartModel.panes()[this._initialPaneIndex],t=Object(o.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),(i=this._chartModel.children(t,!0)).forEach(function(e){return r._chartModel.detachSource(e)}),this._chartModel.detachSource(t),null===(n=e.getPriceScaleById(this._initialPriceScaleId))&&(n=e.createPriceScaleAtPosition(this._initialPriceScalePosition,this._initialPriceScaleIndex)),e.addDataSource(t,n,!0),i.forEach(function(t){return e.addDataSource(t,n,!1)}),this._chartModel.fullUpdate()},t}(i("3u3j").a),s=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return n.__extends(t,e),t.prototype._targetPaneIndex=function(){return this._initialPaneIndex-1},t}(r),a=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return n.__extends(t,e),t.prototype._targetPaneIndex=function(){return this._initialPaneIndex+1},t}(r),l=function(e){function t(t,i,n,o){var r=e.call(this,t,i,o)||this;return r._targetPane=n,r}return n.__extends(t,e),t.prototype._targetPaneIndex=function(){return this._targetPane},t}(r)},jTis:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"CalloutConsts",function(){return n}),function(e){e[e.RoundRadius=8]="RoundRadius",e[e.TextMargins=2]="TextMargins",e[e.MinWidth=100]="MinWidth"}(n||(n={}))},jenN:function(e,t,i){"use strict" ;function n(e,t,n){return new Promise(function(r){i.e("study-pane-views").then(function(s){var a=Object.keys(e.graphicsInfo());a.sort(function(e,t){return o(e)-o(t)}),r(a.map(function(o){var r,s=i("psYU").VertLinePaneView;return null===(r={backgrounds:null,hhists:null,horizlines:null,hlines:null,lines:null,polygons:null,shapemarks:null,textmarks:null,trendchannels:null,vertlines:s}[o])?(u.logWarn(o+" is not supported by this build of graphics subsystem, skipping"),null):new r(e,t,n)}).filter(function(e){return null!==e}))}.bind(null,i)).catch(i.oe)})}function o(e){switch(e){case"polygons":return-100;case"trendchannels":return-90;default:return 0}}function r(e){var t,i,n=Object.keys(e.graphicsInfo()),o=[],r=function(e){return u.logWarn(e+" is not supported by this build of graphics subsystem, skipping"),"continue"};for(t=0,i=n;t0&&t.setValue(a.family),i.setValue(a.size),n.setValue(a.bold),r.setValue(a.italic)):s.logError("Invalid font: "+e)},fontHeight:function(e){var t,i;return this._fontHeightCache[e]||((t=document.createElement("span")).appendChild(document.createTextNode("height")),document.body.appendChild(t),t.style.cssText="font: "+e+"; white-space: nowrap; display: inline;",i=t.offsetHeight,document.body.removeChild(t),this._fontHeightCache[e]=Math.ceil(i)),this._fontHeightCache[e]},drawPolyHoverOrPress:function(e,t,i,n){n?(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=e.mainSource().base(),n=1/i;return n*Math.round(t/n)}};e.exports=a},jofe:function(e,t,i){"use strict";function n(){var e,t,i=new Promise(function(i,n){e=i,t=n});return{promise:i,reject:t,resolve:e}}i.r(t),i.d(t,"createDeferredPromise",function(){return n})},jxrl:function(e,t,i){"use strict";var n,o,r,s,a,l,c=i("FQhm"),u=i("ogJP").parseJSONorNot,h=i("uOxu").getLogger("Chart.SaveloadAdapter.Library"),d=(l=null,(a={}).setCustomAdapter=function(e){l=e,h.logNormal("Use custom save-load adapter")},a.initialize=function(e,t,i,a){n=e,o=t,r=i,s=a},a.updateUser=function(e){o=e},a.getCharts=function(e,t){function i(t){t=t.map(function(e){return{id:e.id,name:e.name,image_url:e.id,modified_iso:e.timestamp,short_symbol:e.symbol,interval:e.resolution}}),e(t)}if(!l)return $.ajax({url:"{0}/{1}/charts?client={2}&user={3}".format(r,encodeURIComponent(s),encodeURIComponent(n),encodeURIComponent(o)),type:"GET",crossDomain:!0}).done(function(e){var n=u(e);if("ok"!==n.status)return h.logWarn("Charts list request failed: "+n.message),void t();i(n.data)}).fail(t);l.getAllCharts().then(i).catch(t)},a.removeChart=function(e,t){l?l.removeChart(e).then(t):$.ajax({url:"{0}/{1}/charts?client={2}&user={3}&chart={4}".format(r,encodeURIComponent(s),encodeURIComponent(n),encodeURIComponent(o),encodeURIComponent(e)),type:"DELETE",crossDomain:!0}).done(function(e){var i=u(e);"ok"!==i.status&&h.logWarn("Chart delete request failed: "+i.message),t()})},a.saveChart=function(e,t,i,a,c,d,p){var _,f=c.id.value(),m={name:e,content:JSON.stringify(a),symbol:t,resolution:i};if(l)return m.id=f,void l.saveChart(m).then(d).catch(p);_="{0}/{1}/charts?client={2}&user={3}".format(r,encodeURIComponent(s),encodeURIComponent(n),encodeURIComponent(o)),void 0!==f&&null!==f&&(_+="&chart="+encodeURIComponent(f)),$.ajax({url:_,data:m,type:"POST",crossDomain:!0}).done(function(e){var t=u(e);if("ok"!==t.status)return h.logWarn("Chart save request failed: "+t.message),void p();d(t.id)}).fail(function(){p()})},a.getChartContent=function(e,t,i){function a(t){var i=JSON.parse(t);return i.uid=e.id,i}l?l.getChartContent(e.id).then(function(e){var i=a(e);t(i)}).catch(i):$.ajax({url:"{0}/{1}/charts?client={2}&user={3}&chart={4}".format(r,encodeURIComponent(s),encodeURIComponent(n),encodeURIComponent(o),encodeURIComponent(e.id)),type:"GET",crossDomain:!0}).done(function(e){var i,n=u(e);"ok"===n.status?(i=a(n.data.content),t(i)):h.logWarn("Chart load request failed: "+n.message)}).fail(function(){i&&i()})},a.loadChart=function(e){a.getChartContent(e,function(e){c.emit("chart_load_requested",e)},function(){h.logWarn("Error loading chart")})},a.removeStudyTemplate=function(e,t){l?l.removeStudyTemplate({name:e}).then(t):$.ajax({url:"{0}/{1}/study_templates?client={2}&user={3}&template={4}".format(r,encodeURIComponent(s),encodeURIComponent(n),encodeURIComponent(o),encodeURIComponent(e)),type:"DELETE",crossDomain:!0}).done(function(e){var i=u(e) ;"ok"!==i.status&&h.logWarn("Chart delete request failed: "+i.message),t()})},a.getStudyTemplateContent=function(e,t){l?l.getStudyTemplateContent({name:e}).then(function(e){t({content:e})}):$.ajax({url:"{0}/{1}/study_templates?client={2}&user={3}&template={4}".format(r,encodeURIComponent(s),encodeURIComponent(n),encodeURIComponent(o),encodeURIComponent(e)),type:"GET",crossDomain:!0}).done(function(e){t(u(e).data)})},a.saveStudyTemplate=function(e,t){var i={name:e.name,content:e.content};l?l.saveStudyTemplate(i).then(t.bind(null,{error:""})).catch(function(e){var i=null!=e?e.toString():"error";t({error:i})}):$.ajax({url:"{0}/{1}/study_templates?client={2}&user={3}".format(r,encodeURIComponent(s),encodeURIComponent(n),encodeURIComponent(o)),type:"POST",crossDomain:!0,data:i}).done(function(e){var i=u(e);"ok"!==i.status&&h.logWarn("Template save request failed: "+i.message),t({error:"ok"===i.status?"":i.status})})},a._templatesCache=null,a.getStudyTemplatesList=function(e){function t(t){t=t.map(function(e){return{is_default:!1,name:e.name}}),a._templatesCache=t,e(t)}a._templatesCache?e(a._templatesCache):(a._templatesCache=[],l?l.getAllStudyTemplates().then(t):$.ajax({url:"{0}/{1}/study_templates?client={2}&user={3}".format(r,encodeURIComponent(s),encodeURIComponent(n),encodeURIComponent(o)),type:"GET",crossDomain:!0}).done(function(e){if(null!==a._templatesCache){var i=u(e);"ok"===i.status?t(i.data):h.logWarn("Templates list request failed: "+i.message)}}))},a.invalidateStudyTemplatesList=function(){a._templatesCache=null},a);e.exports=d},k4w6:function(e,t,i){"use strict";var n,o,r,s;i.d(t,"a",function(){return s}),n=i("aO4+"),o=i("l4sv"),r=i("8Uy/"),s=function(){function e(e){this._lineRendererData={width:0,height:0,points:[new n.Point(0,0)],color:"rgba(0, 0, 0, 0)",linewidth:1,linestyle:r.LINESTYLE_SOLID,visible:!1},this._lineRenderer=new o.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";function n(e,t){return null===e?t:null===t?e:{min:Math.min(e.min,t.min),max:Math.max(e.max,t.max)}}function o(e,t){for(var i=function(e,t){var i=e.length,n=t.length,o=i+n,r=0,s=0;for(;rt[s].index?s++:(r++,s++,o--);return o}(e,t),n=new Array(i),o=0,r=0,s=e.length,a=t.length,l=0;ot[r].index?(n[l]=t[r],r++):(n[l]=t[r],o++,r++),l++;for(;o0?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,c.Exact)},e.prototype.valueAt=function(e){var t=this.search(e);return null!==t?t.value:null},e.prototype.add=function(e,t){var i,n;return this._shareRead?(l.logDebug("add: readonly collection modification attempt"),!1):(i={index:e,value:t},n=this._search(e,c.Exact),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){var n,o,r,s,a;return void 0===t&&(t=c.Exact),void 0!==(o=(n=i?this._rowSearchCacheWithoutEmptyValues:this._rowSearchCache).get(e))&&void 0!==(r=o.get(t))?r:null===(s=this._search(e,t,i))?null:(a={index:this._indexAt(s),value:this._valueAt(s)},void 0===o&&(o=new Map,n.set(e,o)),o.set(t,a),a)},e.prototype.fold=function(e,t){var i,n=t;for(i=this._start;i=r;--i)if(e(n=this._indexAt(i),o=this._valueAt(i)))return{index:n,value:o};return null},e.prototype.each=function(e){var t;for(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){var i,n,o,r;for(void 0===t&&(t=!1),i=0,t&&this._end-this._start>0&&(i=1,this._items[this._end-this._start-1].value=e[0].value),n=i;n0?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!==c.Exact)switch(t){case c.NearestLeft:return this._searchNearestLeft(e,i);case c.NearestRight:return this._searchNearestRight(e,i);default:throw new TypeError("Unknown search mode")}if(!i||null===n||t===c.Exact)return n;switch(t){case c.NearestLeft:return this._nonEmptyNearestLeft(n);case c.NearestRight:return this._nonEmptyNearestRight(n);default:throw new TypeError("Unknown search mode")}},e.prototype._nonEmptyNearestRight=function(e){ for(var t=Object(r.ensureNotNull)(this._emptyValuePredicate);e=this._start&&t(this._valueAt(e));)e-=1;return ethis._start&&(n-=1),i=n!==this._end&&this._indexAt(n)e},this._start,this._end)},e.prototype._plotMinMax=function(e,t,i){var n,o,r=null,s=this._plotFunctions.get(i.name);if(void 0===s)throw new Error('Plot "'+i.name+'" is not registered');for(n=e;nr.max&&(r.max=o)));return r},e.prototype._invalidateCacheForRow=function(e){var t=Math.floor(e.index/u);this._minMaxCache.forEach(function(e){return e.delete(t)})},e.prototype._prepend=function(e){return Object(r.assert)(!this._shareRead,"collection should not be readonly"),Object(r.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(r.assert)(!this._shareRead,"collection should not be readonly"),Object(r.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(r.assert)(!this.isEmpty(),"plot list should not be empty");var t=this._items[this._end-1];Object(r.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(r.assert)(0!==e.length,"plot rows should not be empty"),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear(),this._minMaxCache.clear(),this._items=o(this._items,e),this._start=0,this._end=this._items.length,e[0]},e.prototype._minMaxOnRangeCachedImpl=function(e,t,i){var o,s,a,l,c,h,d,p,_,f,m,y,g,v,S;if(this.isEmpty())return null;for(o=null,s=Object(r.ensureNotNull)(this.firstIndex()),a=Object(r.ensureNotNull)(this.lastIndex()), l=e-i.offset,c=t-i.offset,l=Math.max(l,s),c=Math.min(c,a),h=Math.ceil(l/u)*u,d=Math.max(h,Math.floor(c/u)*u),p=this._lowerbound(l),_=this._upperbound(Math.min(c,h,t)),o=n(o,this._plotMinMax(p,_,i)),void 0===(f=this._minMaxCache.get(i.name))&&(f=new Map,this._minMaxCache.set(i.name,f)),m=Math.max(h+1,l);mt-i.offset&&(o=n),this._plotMinMax(n,o,i)},e}()},kIXa:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolTimeCycles";var n=t||new r("linetooltimecycles");o.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("am+t").TimeCyclesPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages;inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return"Time Cycles"},n.prototype.name=function(){return"Time Cycles"},n.prototype.setPoint=function(e,t,i){var n=Object.assign({},t),o=this._points[0],r=this._points[1];o.price=n.price,r.price=n.price,this._points[e]=n,this.normalizePoints()},n.prototype.addPoint=function(e,t,i){var n,r=o.prototype.addPoint.call(this,e,t,!0);return r&&(n=this._points[0],this._points[1].price=n.price,i||(this.normalizePoints(),this.createServerPoints())),r},n.prototype.getStylesPropertyPage=function(){return s.LineToolTimeCyclesPropertyPage},t.LineToolTimeCycles=n},kSsA:function(e,t,i){"use strict";t.createInputsPropertyPage=function(e,t){var i=e.getInputsPropertyPage();return null==i?null:new i(e.properties(),t,e)},t.createStudyStrategyPropertyPage=function(e,t){var i=e.getStrategyPropertyPage();return null==i?null:new i(e.properties(),t,e)},t.createStylesPropertyPage=function(e,t){var i=e.getStylesPropertyPage();return null==i?null:new i(e.properties(),t,e)},t.createDisplayPropertyPage=function(e,t){var i=e.getDisplayPropertyPage();return null==i?null:new i(e.properties(),t,e)},t.createVisibilitiesPropertyPage=function(e,t){var i=e.getVisibilitiesPropertyPage();return null==i?null:new i(e.properties(),t,e)},t.hasInputsPropertyPage=function(e){return null!==e.getInputsPropertyPage()},t.hasStylesPropertyPage=function(e){return null!==e.getStylesPropertyPage()}},kZlT:function(e,t,i){"use strict";(function(e){function n(t,i){this._options=Object.assign({},L,i),this._model=t,this._scalesProperties=t.properties().scalesProperties,this.m_width=0,this._baseIndex=null,this._defaultRightOffsetProperty=new f(T),this.m_rightOffset=T,this._defaultRightOffsetProperty.listeners().subscribe(this,function(e){this.setRightOffset(e.value())}),this.m_points=new h,this._barSpacingChanged=new e,this.m_barSpacing=C, this._options.preserveBarSpacing&&(this.m_barSpacing=this._scalesProperties.barSpacing.value()||C),this.m_scrollStartPoint=null,this.m_scaleStartPoint=null,this._commonTransitionStartState=null,this.m_tickmarks=new c,this._formattedBySpan={},this._onScroll=new e,this._visibleBars=a.invalid(),this._visibleBarsInvalidated=!0,this._visibleBarsChanged=new e,this._leftEdgeIndex=null,this._logicalRangeChanged=new e,this._resetDelegate=new e,this._model.mainSeries().onStyleChanged().subscribe(this,this._invalidateVisibleBars)}var o=i("Hr11").clamp,r=i("ZJKN").BarsRange,s=i("ezzr").LogicalRange,a=i("bOD6").TimeScaleVisibleRange,l=i("x3oK"),c=i("GhVi"),u=i("kcTO").numberToStringWithLeadingZero,h=i("KVq+").TimePoints,d=i("8OdW"),p=i("uOxu").getLogger("Chart.TimeScale"),_=i("Kxc7"),f=i("tc+8"),m=i("Ocx9").saveDefaultProperties,y=i("j1f4").easingFunc,g=i("beCu").doAnimate,v=i("dfhE"),S=_.enabled("low_density_bars"),b=null,w=50,P=_.enabled("high_density_bars")?.025:.5,x=S?1:5,C=d.DEFAULT_BAR_SPACING,T=10,I=new Map([[v.STYLE_BARS,.9],[v.STYLE_RANGE,.9],[v.STYLE_CANDLES,.8],[v.STYLE_HOLLOW_CANDLES,.8],[v.STYLE_HILO,.8],[v.STYLE_HEIKEN_ASHI,.8]]),L={preserveBarSpacing:!1,lockVisibleTimeRangeOnResize:!1};n.prototype.destroy=function(){this._model.mainSeries().onStyleChanged().unsubscribe(this,this._invalidateVisibleBars)},n.prototype.onReset=function(){return this._resetDelegate},n.prototype.tickMarks=function(){return this.m_tickmarks},n.prototype._invalidateVisibleBars=function(){this._visibleBarsInvalidated=!0},n.prototype.reset=function(){this._visibleBarsInvalidated=!0,this.m_points=new h,this.m_scrollStartPoint=null,this.m_scaleStartPoint=null,this._clearCommonTransitionsStartState(),this.m_tickmarks.reset(),this._leftEdgeIndex=null,this._resetDelegate.fire()},n.prototype.restoreDefault=function(){this._visibleBarsInvalidated=!0,this.setBarSpacing(C),this.resetRightOffset()},n.prototype.restoreRightOffsetPropertyToDefault=function(){this._defaultRightOffsetProperty.setValue(T)},n.prototype.rightOffsetDefaultValue=function(){return T},n.prototype.setLeftEdgeFix=function(e){var t,i;this._leftEdgeIndex=e,(t=this.visibleBarsStrictRange().firstBar()-e)<0&&(i=this.m_rightOffset-t-1,this.scrollToOffsetAnimated(i,500))},n.prototype.baseIndex=function(){return this._baseIndex||0},n.prototype.rightOffset=function(){return this.m_rightOffset},n.prototype.defaultRightOffsetProperty=function(){return this._defaultRightOffsetProperty},n.prototype.rightOffsetForTimePoint=function(e){var t=this.timeToCoordinate(e);return null===t?null:this._rightOffsetForCoordinate(t)},n.prototype._rightOffsetForCoordinate=function(e){return(this.m_width+1-e)/this.m_barSpacing},n.prototype.scrollToRealtime=function(e,t){var i,n,o,r,s=this._defaultRightOffsetProperty.value();if(s<0&&(s=T),e)return i=this,n=this.m_rightOffset,(o=this.maxRightOffset())>0&&s>o&&(s=o),r=this._model,void g({from:n,to:s,duration:1e3,easing:y.easeInOutQuint,onComplete:t,onStep:function(e,t){i._visibleBarsInvalidated=!0,i.m_rightOffset=t,i._correctOffset(),r.recalculateAllPanes(), r.lightUpdate(),r.recalcVisibleRangeStudy(r.dataSources())}});this._visibleBarsInvalidated=!0,this.m_rightOffset=s,this._correctOffset(),void 0!==t&&t()},n.prototype.points=function(){return this.m_points},n.prototype.width=function(){return this.m_width},n.prototype.setWidth=function(e){var t,i;!isFinite(e)||e<=0||this.m_width!==e&&(this._visibleBarsInvalidated=!0,this._options.lockVisibleTimeRangeOnResize&&this.m_width&&(t=this.m_barSpacing*e/this.m_width,this._tryToUpdateBarSpacing(this.m_barSpacing,t)),null!==this._leftEdgeIndex&&this.visibleBarsStrictRange().firstBar()<=this._leftEdgeIndex&&(i=this.m_width-e,this.m_rightOffset-=Math.round(i/this.m_barSpacing)+1),this.m_width=e,this._correctOffset())},n.prototype.barSpacing=function(){return this.m_barSpacing},n.prototype.setBarSpacing=function(e){void 0!==e?(e=this.getValidBarSpacing(e),this._tryToUpdateBarSpacing(this.m_barSpacing,e)&&(this._correctOffset(),this._options.preserveBarSpacing&&(m(!0),this._scalesProperties.barSpacing.setValue(this.m_barSpacing),m(!1)))):p.logDebug("setBarSpacing: invalid argument")},n.prototype._tryToUpdateBarSpacing=function(e,t){return e!==t&&(this._visibleBarsInvalidated=!0,this.m_barSpacing=t,this._barSpacingChanged.fire(e,t),!0)},n.prototype.barSpacingChanged=function(){return this._barSpacingChanged},n.prototype.correctBarSpacing=function(){this.isEmpty()||this.points().size()=l.m_width}var i,n,o,r=this.m_points.closestIndexLeft(e),s=this.m_points.valueAt(r),a=this.indexToCoordinate(r,!0),l=this;return t(a)?null:(i=this.barSpacing(),n=function(){var e=this.baseIndex();return this.m_points.valueAt(e)-this.m_points.valueAt(e-1)}.bind(this)(),t(o=Math.round(a+(e-s)/n*i)+1)?null:o)},n.prototype.alignCoordinate=function(e){if(this.isEmpty())return e;var t=this.coordinateToIndex(e);return this.indexToCoordinate(t)},n.prototype.timePointToIndex=function(e){return this.m_points.indexOf(e,!0)},n.prototype.indexToTimePoint=function(e){return this.m_points.valueAt(e)},n.prototype.indexToUserTime=function(e){return this.m_tickmarks.indexToTime(e)},n.prototype.marks=function(){var e,t,i,n,o,r,s,a,l,c,u;if(this.isEmpty())return null;for(e=this.m_barSpacing,t=5*((this._scalesProperties.fontSize.value()||0)+4),i=Math.round(t/e),n=this.visibleBarsStrictRange(),o=Math.max(n.firstBar(),n.firstBar()-i),r=Math.max(n.lastBar(),n.lastBar()-i),s=this.m_tickmarks.build(e,t),a=[],l=0;l=d.DAY_SPAN?1:0});return a},n.prototype.state=function(e){var t={};return t.m_barSpacing=this.barSpacing(),t.m_rightOffset=e?this.m_rightOffset:this._defaultRightOffsetProperty.value(),e&&(t.points=this.m_points.state(),t.tickmarks=this.m_tickmarks.state(),t.width=this.m_width),t},n.prototype.restoreState=function(e,t){var i,n,o;void 0!==e.m_barSpacing&&void 0!==e.m_rightOffset?(i=e.m_barSpacing,o=(n=e.m_rightOffset<0&&!t?T:e.m_rightOffset)<0?T:Math.round(n),this._defaultRightOffsetProperty.setValue(o),this.m_rightOffset=n,t&&(this.m_points.restoreState(e.points),this.m_tickmarks.restoreState(e.tickmarks),e.width&&this.m_width>0&&(i*=this.m_width/e.width)),this._tryToUpdateBarSpacing(this.m_barSpacing,i),this._correctOffset()):p.logDebug("restoreState: invalid state")},n.prototype.setBaseIndex=function(e){"number"==typeof e?(this._visibleBarsInvalidated=!0,this._baseIndex=e,this._correctOffset()):p.logDebug("setBaseIndex: invalid argument")},n.prototype.setRightOffset=function(e){void 0!==e?(this._visibleBarsInvalidated=!0,this.m_rightOffset=e,this._correctOffset()):p.logDebug("setRightOffset: invalid argument")},n.prototype.resetRightOffset=function(){this.setRightOffset(this._defaultRightOffsetProperty.value())},n.prototype._correctOffset=function(){var e,t=this.maxRightOffset() ;this.m_rightOffset>t&&(this.m_rightOffset=t,this._visibleBarsInvalidated=!0),null!==(e=this.minRightOffset())&&this.m_rightOffsetthis.maxBarSpacing()?this.maxBarSpacing():e},n.prototype.isValidBarSpacing=function(e){return e>=P&&e<=this.maxBarSpacing()},n.prototype.endScale=function(){null!==this.m_scaleStartPoint&&(this.m_scaleStartPoint=null,this._clearCommonTransitionsStartState())},n.prototype.startScroll=function(e){null===this.m_scrollStartPoint&&null===this._commonTransitionStartState&&(this.isEmpty()||(this.m_scrollStartPoint=e,this._saveCommonTransitionsStartState()))},n.prototype.scrollTo=function(e){if(this._visibleBarsInvalidated=!0,null!==this.m_scrollStartPoint){var t=(this.m_scrollStartPoint-e)/this.barSpacing();this.m_rightOffset=this._commonTransitionStartState.rightOffset+t,this._correctOffset(),this._onScroll.fire()}},n.prototype.scrollToOffsetAnimated=function(e,t){var i,n,o,r;if(!isFinite(e))throw new RangeError("offset is required and must be finite number");if(void 0===t&&(t=400),!isFinite(t)||t<=0)throw new RangeError("animationDuration (optional) must be finite positive number");i=this,n=this.m_rightOffset,o=+new Date,r=this._model,function s(){i._visibleBarsInvalidated=!0;var a=(new Date-o)/t;if(a>=1)return i.m_rightOffset=e,i._correctOffset(),i._visibleBarsInvalidated=!0,r.recalculateAllPanes(),void r.lightUpdate();i.m_rightOffset=n+(e-n)*a,i._correctOffset(),r.recalculateAllPanes(),setTimeout(s,20)}()},n.prototype.endScroll=function(){null!==this.m_scrollStartPoint&&(this.m_scrollStartPoint=null,this._clearCommonTransitionsStartState())},n.prototype.update=function(e,t,i,n){this._visibleBarsInvalidated=!0,i.length>0&&this.m_points.merge(e,t,i),this.m_tickmarks.merge(n),this._correctOffset()},n.prototype.addTail=function(e,t,i){var n,o,r;for(this.m_tickmarks.removeTail(t),n=e.params,o=this.m_tickmarks.maxIndex+(i?0:1), r=0;rn?(t=this.m_points.valueAt(n),i=e-n):(t=this.m_points.valueAt(e),i=0),{time_t:t,offset:i}},n.prototype.denormalizeTimePoint=function(e){var t=this.m_points.indexOf(e.time_t);if(null!==t)return t+e.offset},n.prototype.zoomToBarsRange=function(e,t){var i,n,o;t<=e||(i=this.baseIndex(),this.m_rightOffset=t-i,n=I.get(this._model.mainSeries().style())||.6,o=Math.max(t-e+n,x),this.setBarSpacing(this.width()/o),this._visibleBarsInvalidated=!0)},n.prototype.canZoomIn=function(){return this.m_barSpacingP},n.prototype.minBarSpacing=function(){return P},n.prototype.maxBarSpacing=function(){return S?this.width():w},n.prototype.onScroll=function(){return this._onScroll},n.prototype.preserveBarSpacing=function(){return this._options.preserveBarSpacing},n.prototype.visibleBarsStrictRangeChanged=function(){return this._visibleBarsChanged},n.prototype.logicalRangeChanged=function(){return this._logicalRangeChanged},t.TimeScale=n}).call(this,i("aIyQ"))},kcTO:function(e,t,i){"use strict";function n(e,t){if(!Object(o.isNumber)(e))return"n/a";if(!Object(o.isInteger)(t))throw new TypeError("invalid length");if(t<0||t>16)throw new TypeError("invalid length");if(0===t)return e.toString();return("0000000000000000"+e.toString()).slice(-t)}var o,r,s,a,l,c,u,h;i.r(t),i.d(t,"customFormatters",function(){return l}),i.d(t,"formatterOptions",function(){return c}),i.d(t,"numberToStringWithLeadingZero",function(){return n}),i.d(t,"PriceFormatter",function(){return h}),i("YFKU"),o=i("ogJP"),r=i("Ialn"),s=i("uOxu"),a=Object(s.getLogger)("Chart.PriceFormatter"),l={dateFormatter:null,timeFormatter:null},c={decimalSign:".",decimalSignFractional:"'"},u={custom:window.t("Price format is invalid."),fraction:window.t("Fraction part is invalid."), secondFraction:window.t("Second fraction part is invalid.")},h=function(){function e(e,t,i,n){if(this.type="price",t||(t=1),Object(o.isNumber)(e)&&Object(o.isInteger)(e)||(e=100),e<0)throw new TypeError("invalid base");this._priceScale=e,this._minMove=t,this._minMove2=n,i&&void 0!==n&&n>0&&2!==n&&4!==n&&8!==n?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,n,o){var s,a;return void 0===n&&(n=!0),void 0===o&&(o=!0),s="",e<0?(s=!1===n?"":"−",e=-e):e&&!0===t&&(s="+"),a=this._fractional?s+this._formatAsFractional(e,i):s+this._formatAsDecimal(e,i),o?Object(r.forceLTRStr)(a):a},e.prototype.parse=function(e){return e=(e=Object(r.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,o,r,s,a;return t=t||0,i=this._fractional?Math.pow(10,this._fractionalLength||0):Math.pow(10,t)*this._priceScale/this._minMove,o=Math.floor(e),(r=+(Math.round(e*i)-o*i).toFixed(this._fractionalLength))>=i&&(r-=i,o+=1),s="",1!==i&&(a=void 0!==this._fractionalLength?this._fractionalLength:NaN,s=c.decimalSign+n(+r.toFixed(this._fractionalLength)*this._minMove,a+t),s=this._removeEndingZeros(s,t)),o.toString()+s},e.prototype._formatAsFractional=function(e,t){var i,o,r,s,a,l,u,h,d,p=this._priceScale/this._minMove,_=Math.floor(e),f=t?Math.floor(e*p)-_*p:Math.round(e*p)-_*p;if(f===p&&(f=0,_+=1),i="",t&&(o=(e-_-f/p)*p,i=n(o=Math.round(o*Math.pow(10,t)),t),i=this._removeEndingZeros(i,t)),!this._fractionalLength)throw new Error("_fractionalLength is not calculated");return r="",this._minMove2?(s=["0","5"],a=["0","2","5","7"],l=["0","1","2","3","4","5","6","7"],h=n(f=(f-(u=f%this._minMove2))/this._minMove2,this._fractionalLength),d=2===this._minMove2?s[u]:8===this._minMove2?l[u]:a[u],r=h+c.decimalSignFractional+d):r=n(f*this._minMove,this._fractionalLength),_.toString()+c.decimalSignFractional+r+i},e.prototype._removeEndingZeros=function(e,t){for(var i=0;i=o||r<0?{error:u.fraction,res:!1}:(t=n+r/o,i&&(t=-t),{price:t,res:!0,suggest:this.format(t)})):{error:u.custom,res:!1}},e.prototype._parseAsDoubleFractional=function(e){var t,i,n,o,r,s,a,l,h=new RegExp(/^(\-?)[0-9]+$/),d=h.exec(e);return d?{price:t=parseFloat(e),res:!0,suggest:this.format(t)}:(d=new RegExp("^(-?)([0-9]+)\\"+c.decimalSignFractional+"([0-9]+)\\"+c.decimalSignFractional+"([0-9]+)$").exec(e))?(i=!!d[1],n=parseInt(d[2]),o=void 0!==this._minMove2?this._minMove2:NaN,r=this._priceScale/o,s=this._minMove2,a=this._patchFractPart(parseInt(d[3]),r),l=this._patchFractPart(parseInt(d[4]),s),a>=r||a<0?{error:u.fraction,res:!1}:void 0!==s&&l>=s||l<0?{error:u.secondFraction,res:!1}:(t=void 0!==s?n+a/r+l/(r*s):NaN,i&&(t=-t),{price:t,res:!0,suggest:this.format(t)})):{error:u.custom,res:!1}},e}()},l4sv:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"HorizontalLineRenderer",function(){return r}),n=i("VdBB"),o=i("jFln"),r=function(){function e(){this._data=null,this._hitTest=new n.HitTestResult(n.HitTestResult.REGULAR)}return e.prototype.setData=function(e){this._data=e},e.prototype.setHitTest=function(e){this._hitTest=e},e.prototype.draw=function(e){var t,i;null!==this._data&&0!==this._data.points.length&&!1!==this._data.visible&&((t=this._data.points[0].y)<0||t>this._data.height||(i=this._data.width,e.lineCap="square",e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth,void 0!==this._data.linestyle&&Object(o.setLineStyle)(e,this._data.linestyle),Object(o.drawLine)(e,0,t,i,t)))},e.prototype.hitTest=function(e){return null===this._data||!1===this._data.visible?null:0===this._data.points.length?null:Math.abs(e.y-this._data.points[0].y)<=5?this._hitTest:null},e}()},l7mP:function(e,t,i){"use strict";function n(e,t,n){void 0===t&&(t={}),Promise.all([i.e("react"),i.e(12),i.e(16),i.e(18),i.e(19),i.e(33),i.e(51),i.e(13),i.e(26),i.e("take-chart-image-dialog-impl")]).then(function(o){i("fMMV").getImageOfChart(e,t,n)}.bind(null,i)).catch(i.oe)}function o(e,t,n){void 0===t&&(t={}),Promise.all([i.e("react"),i.e(12),i.e(16),i.e(18),i.e(19),i.e(33),i.e(51),i.e(13),i.e(26),i.e("take-chart-image-dialog-impl")]).then(function(o){i("fMMV").getImageOfChartSilently(e,t,n)}.bind(null,i)).catch(i.oe)}i.r(t),i.d(t,"getImageOfChart",function(){return n}),i.d(t,"getImageOfChartSilently",function(){return o})},lA7n:function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h;i.r(t),n=i("Kxc7"),o=i("mrSG"),r=i("ulZB"),s=function(e){function t(t,i){ return e.call(this,t,i,"FAVORITE_CHARTS_CHANGED","loadChartDialog.favorites",{})||this}return o.__extends(t,e),t}(r.b),a=i("lhgw"),l=i("FBuY"),c=i("Vdly"),u=i("/z0S"),i.d(t,"LoadChartService",function(){return h}),h=function(){function e(e){void 0===e&&(e=null);var t=this;this._favoriteChartsService=new s(l.TVXWindowEvents,c),this._chartWidgetCollection=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 Object(a.loadChart)(e)},deleteAction:function(){return new Promise(function(i){Object(a.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)&&(n.enabled("saveload_storage_customization")?null!==t._chartWidgetCollection&&t._chartWidgetCollection.clearChartMetaInfo():location.href="/chart/"+location.search)},this._chartWidgetCollection=e}return e.prototype.showLoadDialog=function(){Object(u.a)(this._showLoadDialog.bind(this),{source:"Load chart",sourceMeta:"Chart"})},e.prototype._showLoadDialog=function(){var e=this;(n.enabled("saveload_requires_authentication")&&!window.is_authenticated?Promise.resolve([]):new Promise(function(e){Object(a.getCharts)(function(t){e(t)})})).then(function(t){return t.map(e._getChartEntry)}).then(function(t){return n=t,o=e._favoriteChartsService.get(),Promise.all([i.e(1),i.e("dialogs-core"),i.e(2),i.e("moment"),i.e(34),i.e(50),i.e(0),i.e("create-dialog"),i.e("load-chart-dialog")]).then(i.bind(null,"E5yG")).then(function(e){new(0,e.LoadChartDialog)(n,o)});var n,o})},e}()},lCO3:function(e,t,i){"use strict";var n,o;i.r(t),i.d(t,"Version",function(){return o}),n=i("Eyy1"),o=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){var i,o,r;if(t instanceof e)return new e(t.major(),t.minor());if("number"==typeof t)return Object(n.assert)(Math.floor(t)===t,"Version should not be a float number"),new e(t,0);if("string"==typeof t){if(1===(i=t.split(".")).length)return o=parseInt(i[0],10), Object(n.assert)(!isNaN(o),"Bad version string: "+t),new e(o,0);if(2===i.length)return o=parseInt(i[0],10),Object(n.assert)(!isNaN(o),"Bad version string: "+t),r=parseInt(i[1],10),Object(n.assert)(!isNaN(r),"Bad version string: "+t),new e(o,r);throw new Error("Bad version string (one dot expected): "+t)}throw new Error("Bad version: "+t)},e.ZERO=new e(0,0),e}()},lGXz:function(e,t,i){"use strict";function n(e){o.call(this,e)}var o=i("c0/O").PaneRendererAbstractShape;inherit(n,o),n.prototype.drawShape=function(e){var t,i,n,o,r,s,a,l,c=!1,u=Math.round(this.height/2);for(i=0,n=this.items.length;i",e).addClass("js-rootresizer__contents").css({position:"relative",width:"100%",height:"100%"}).prependTo(e.body),this._visibilityApi=new a(this._window.document),(i={alive:new o.a(!0),fullscreenable:new o.a(!0),body:new o.a(t),width:new o.a,height:new o.a,availWidth:new o.a,availHeight:new o.a,visible:this._visibilityApi.isVisible,fullscreen:this._fullscreenApi.isFullscreen,remove:function(){i.alive.setValue(!1)},attach:function(){i.alive.setValue(!1),n._window.close()},requestFullscreen:function(){n._requestFullscreen()},exitFullscreen:function(){n._exitFullscreen()}}).alive.subscribe(function(e){e||i!==n._area||n.free()}),this._area=i,this._resizeHandler=function(){var e=i.body.value()[0],t=e.clientWidth||800,n=e.clientHeight||600;i.availHeight.setValue(n),i.availWidth.setValue(t),i.height.setValue(n),i.width.setValue(t)},this._resizeHandler(),$(this._window).on("resize",this._resizeHandler),new r.ResizerDetacherState(i).bridge()},e.prototype.free=function(){if(this._resizeHandler&&($(this._window).off("resize",this._resizeHandler),this._resizeHandler=void 0),this._visibilityApi&&(this._visibilityApi.destroy(),this._visibilityApi=void 0),this._area){var e=this._area;this._area=void 0,e.alive.setValue(!1),e.body.value().remove()}},e.prototype._requestFullscreen=function(){this._fullscreenApi.enter()},e.prototype._exitFullscreen=function(){this._fullscreenApi.exit()},e.prototype._initFullscreen=function(){var e=this,t=this._window.document;this._fullscreenApi.isFullscreen.subscribe(function(i){i?(e._$exitFullscreenButton=$("
",t).addClass("tv-exit-fullscreen-button").text($.t("Exit Full Screen (ESC)")).on("click",function(t){t.preventDefault(), e._exitFullscreen()}).appendTo(t.body),e._onExitFullscreenEsc=function(t){27===t.keyCode&&(t.preventDefault(),e._exitFullscreen())},$(t).on("keyup",e._onExitFullscreenEsc)):(e._$exitFullscreenButton&&(e._$exitFullscreenButton.remove(),e._$exitFullscreenButton=void 0),e._onExitFullscreenEsc&&($(t).off("keyup",e._onExitFullscreenEsc),e._onExitFullscreenEsc=void 0)),e._resizeHandler&&e._resizeHandler()})},e}()},lhgw:function(e,t,i){"use strict";e.exports=i("jxrl")},ljE9:function(e,t,i){"use strict";function n(e,t){var i=r.get(e);return i instanceof Function?i(t):i&&i[t]}function o(e,t,i){var n,o;i instanceof Function?r.set(e,i):((o=void 0===(n=r.get(e))||n instanceof Function?{}:n)[t]=i,r.set(e,o))}i.d(t,"a",function(){return n}),i.d(t,"b",function(){return o});var r=new WeakMap},loH8:function(e,t,i){"use strict";function n(e,t,i){this._cache=e,this._cacheRect=t,this._targetRect=i}var o=i("aO4+"),r=o.Point,s=o.box,a=i("f6yo").pointInBox,l=i("VdBB").HitTestResult;n.prototype.draw=function(e){e.translate(.5,.5),e.drawImage(this._cache,this._cacheRect.left,this._cacheRect.top,this._cacheRect.width,this._cacheRect.height,this._targetRect.left,this._targetRect.top,this._targetRect.width,this._targetRect.height),e.translate(-.5,-.5)},n.prototype.hitTest=function(e){var t=new r(this._targetRect.left,this._targetRect.top),i=t.add(new r(this._targetRect.width,this._targetRect.height));return a(e,s(t,i))?new l(l.REGULAR):null},e.exports=n},ltKl:function(e,t,i){"use strict";var n,o,r,s,a;i.r(t),i.d(t,"SeriesApi",function(){return a}),n=i("Eyy1"),o=i("jRfx"),r=i("HGup"),s=i("/ToI"),a=function(){function e(e,t){this._series=e,this._model=t}return e.prototype.isUserEditEnabled=function(){return this._series.userEditEnabled()},e.prototype.setUserEditEnabled=function(e){this._series.setUserEditEnabled(e)},e.prototype.mergeUp=function(){this._model.isMergeUpAvailableForSource(this._series)&&new o.MergeUpUndoCommand(this._model,this._series,"").redo()},e.prototype.mergeDown=function(){this._model.isMergeDownAvailableForSource(this._series)&&new o.MergeDownUndoCommand(this._model,this._series,"").redo()},e.prototype.unmergeUp=function(){this._model.isUnmergeAvailableForSource(this._series)&&new r.UnmergeUpUndoCommand(this._model,this._series,"").redo()},e.prototype.unmergeDown=function(){this._model.isUnmergeAvailableForSource(this._series)&&new r.UnmergeDownUndoCommand(this._model,this._series,"").redo()},e.prototype.detachToRight=function(){new s.MoveToNewPriceScaleUndoCommand(this._model,this._series,this._pane(),"right","").redo()},e.prototype.detachToLeft=function(){new s.MoveToNewPriceScaleUndoCommand(this._model,this._series,this._pane(),"left","").redo()},e.prototype.detachNoScale=function(){new s.MoveToNewPriceScaleUndoCommand(this._model,this._series,this._pane(),"overlay","").redo()},e.prototype.moveToOtherSourceScale=function(e){var t,i=Object(n.ensureNotNull)(this._model.dataSourceForId(e)),o=Object(n.ensureNotNull)(i.priceScale());o!==this._series.priceScale()&&(t=Object(n.ensureNotNull)(this._model.paneForSource(i)), new s.MoveToExistingPriceScaleUndoCommand(this._model,this._series,t,o,"").redo())},e.prototype.isVisible=function(){return this._series.properties().visible.value()},e.prototype.setVisible=function(e){this._series.properties().visible.setValue(e)},e.prototype.bringToFront=function(){this._model.bringToFront([this._series])},e.prototype.sendToBack=function(){this._model.sendToBack([this._series])},e.prototype.entityId=function(){return this._series.id()},e.prototype._pane=function(){return Object(n.ensureNotNull)(this._model.paneForSource(this._series))},e}()},mE5r:function(e,t,i){"use strict";function n(e){return e/11}var o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,x;i.r(t),o=i("mrSG"),r=i("Eyy1"),s=i("ikwP"),a=i("i1o5"),l=i("aO4+"),c=i("XlJ7"),u=i("EsvI"),h=i("OsWk"),d=i("rL76"),p=parseInt(d.labelheight),_=parseInt(d.bottommargin),f=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(d.wrapper),this._element.classList.add(d.label),this._labelElement.className=d.symbol,this._element.appendChild(this._labelElement),this._gearElement.className=d.gear,this._gearElement.innerHTML=h,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=n(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){var i,o,r;null!==this._info&&"gear"!==this._mode&&(i=Object(c.makeFont)(t.fontSize,"Trebuchet MS"),e.fillStyle=u.themes[t.theme].getThemedColor("color-price-axis-label-back"),e.globalAlpha=.5,e.beginPath(),o=n(t.fontSize)*p/2,r=Object(l.point)(t.offset+t.width/2,t.height/2),e.arc(r.x,r.y,o,0,2*Math.PI,!0),e.fill(),e.globalAlpha=1,e.fillStyle=u.themes[t.theme].getThemedColor("color-price-axis-label-text"),e.textAlign="center",e.font=i,e.textBaseline="middle",e.fillText(this._info.label,r.x,r.y))},e.prototype.setAxisNameInfo=function(e){this._info=e,null!==e&&(this._labelElement.textContent=e.label)},e.height=function(e){return(p+_)*e},e}(),m=i("aIyQ"),y=i.n(m),g=i("S8xo"),v=i("5VQP"),S=i("ljE9"),b={enableTooltip:!0,showLabels:!0,enableMenu:!0,enableHighlight:!0},w=function(){function e(e,t,i,n,r){var a=this;this._invalidated=!0,this._size=new s.Size(0,0),this._offset=0,this._axisInfo=null,this._onLabelHovered=new y.a,this._highlighted=!1,this._labelMode="auto",this._fixedLabelMode=null,this._isLeft="left"===e,this._rendererOptionsProvider=n.rendererOptionsProvider,this._sourcesTitlesProvider=n.sourcesTitlesProvider,this._contextMenuItemsProvider=n.contextMenuItemsProvider, this._backgroundBasedTheme=n.backgroundBasedTheme,this._properties=t,this._axisInfo=i,this._labelOptions=o.__assign({},b,r),this._properties.backgroundColor.subscribe(this,this._onPropertyChanged),this._properties.lineColor.subscribe(this,this._onPropertyChanged),this._cell=document.createElement("div"),this._cell.classList.add(d["price-axis-stub"]),this._labelOptions.enableTooltip&&this._cell.classList.add("apply-common-tooltip","common-tooltip-html"),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 f,this._label.setAxisNameInfo(this._axisInfo),this._cell.appendChild(this._label.getElement()),this._labelOptions.enableTooltip&&Object(S.b)(this._cell,"text",function(e){return a._tooltipContent()})):this._label=null,this._mouseEventHandler=new g.MouseEventHandler($(this._cell),this,!0,!1),this._canvas=Object(s.addCanvasTo)(this._cell,new s.Size(16,16)),this._canvas.style.position="absolute",this._canvas.style.left="0",this._canvas.style.top="0",this._ctx=this._canvas.getContext("2d")}return e.prototype.destroy=function(){this._properties.backgroundColor.unsubscribe(this,this._onPropertyChanged),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.mouseDownEvent=function(e){var t=this;null===this._fixedLabelMode&&"symbol"!==this._labelMode&&this._labelOptions.enableMenu&&this._labelOptions.showLabels?(this._fixedLabelMode=this._labelMode,this.setLabelMode("gear"),v.ContextMenuManager.createMenu(this._contextMenuItemsProvider(),{statName:"PriceScaleLabelContextMenu"},function(){t.setLabelMode(Object(r.ensureNotNull)(t._fixedLabelMode)),t._fixedLabelMode=null}).then(function(e){return e.show(function(e,i){var n=t._cell.getBoundingClientRect();return{clientX:t._isLeft?n.left:n.right-e,clientY:n.top-Math.min(i,n.top),overrideHeight:n.top")},e}(),P=i("Daqx"),i.d(t,"PriceAxisesContainer",function(){return x}),x=function(){function e(e,t,i,n,r,a){this._axises=[],this._stubs=[],this._size=new s.Size(0,0),this._onLabelHovered=new y.a,this._scalesProperties=t,this._priceAxisWidgetFactory=n,this._rendererOptionsProvider=r.rendererOptionsProvider,this._titlesProvider=r.titlesProvider,this._contentMenuProvider=r.contentMenuProvider,this._backgroundBasedTheme=r.backgroundBasedTheme,this._labelsOptions=o.__assign({},b,a),this._stubProperties={lineColor:this._scalesProperties.lineColor,backgroundColor:e,fontSize:t.fontSize},this._side=i,this._cell=document.createElement("td"),this._cell.classList.add("chart-markup-table","price-axis-container"),this._cell.style.width="25px", this._cell.style.position="relative"}return e.prototype.destroy=function(){this.setScales([],0,0,0)},e.prototype.onLabelHovered=function(){return this._onLabelHovered},e.prototype.setScales=function(e,t,i,n){for(var o,s,a,l,c,u,h,d,p=this;e.length>this._axises.length&&this._axises.lengthc;)(u=Object(r.ensureDefined)(this._stubs.pop())).onLabelHovered().unsubscribeAll(this),this._cell.removeChild(u.getElement()),u.destroy();for(h=function(){var e=d._labelsOptions.showLabels?Object(P.getPriceAxisNameInfo)(d._side,d._stubs.length):null,t=d._stubs.length,i=new w(d._side,d._stubProperties,e,d._stubParams(t),d._labelsOptions);i.onLabelHovered().subscribe(d,function(t){p._labelsOptions.showLabels&&p._labelsOptions.enableHighlight&&p._onLabelHovered.fire(Object(r.ensureNotNull)(e),t)}),d._stubs.push(i),d._cell.appendChild(i.getElement())},d=this;this._stubs.length1,"Unable to change pane's height if there is only one pane"),t=r.indexOf(this._pane),Object(n.assert)(-1!==t,"Invalid pane index"),i=new a(o,t,e),this._chartWidget.model().undoHistory.pushUndoCommand(i)},e.prototype.moveTo=function(e){var t=this.paneIndex();t!==e&&(Object(n.assert)(e>=0&&eF.MOVEPOINT_BACKGROUND,TradingView.isMobile.any()&&e.hittest&&e.hittest.result()===F.MOVEPOINT_BACKGROUND&&(i=!0),this._preventSourceChange&&(i=!1),n.selectionMacro(function(n){i?(t.control()||n.selection().isSelected(e.source)||n.clearSelection(),t.control()&&n.selection().isSelected(e.source)?(o=e.source, n.removeSourceFromSelection(e.source)):n.addSourceToSelection(e.source,e.hittest&&e.hittest.data()),n.selection().sources().length>1&&x("GUI","Multiselect","Click Select")):t.control()||n.clearSelection()})),o},o.prototype._tryStartChangingLineTool=function(e,t,i,n){var o,r,s;return!(this._preventSourceChange||!t.hittest||t.hittest.result()!==F.CHANGEPOINT)&&(o=this._chart.model(),r=this._state.mainDataSource().firstValue(),s=t.source.priceScale().coordinateToPrice(e.localY,r),o.selectionMacro(function(e){e.clearSelection(),e.addSourceToSelection(t.source)}),s=o.model().magnet().align(s,n,this._state),o.startChangingLinetool(t.source,{index:n,price:s},t.hittest.data(),i),this._updateTooltip(e.localX,e.localY),!0)},o.prototype._tryHandleEraserMouseDown=function(e,t){var i,n,o;return!(!e.source||"eraser"!==R.tool.value()||(o=e.source,o&&o.customization&&o.customization.disableErasing)||(i=this._chart.model(),!(e.source instanceof y||e.source instanceof l)))&&(n=e.hittest.eraseMarker(),t.control()&&void 0!==n&&e.source.processErase?e.source.processErase(i,n):i.removeSource(e.source),!0)},o.prototype._tryStartCloning=function(e,t,i,n){var o=this._chart.model(),r=t.source.properties();return!!(i.control()&&r.clonable&&r.clonable.value())&&(this._clonningAtMoveLineTools=o.selection().sources(),n&&this._clonningAtMoveLineTools.push(n),this._startCloningPoint=new s(e.localX,e.localY),!0)},o.prototype.mouseDownEvent=function(e){var t,i,o,r,a,l,c,u,h;if(this._state&&(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(),H.emit("mouse_down",{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY}),this._updateCommonTooltip(null),t=this._chart.model(),i=new A(e),t.mainSeries().clearGotoDateResult(),this.hideInplaceEditor(),!(this._state.defaultPriceScale().isEmpty()||t.timeScale().isEmpty()||(o=t.crossHairSource(),TradingView.supportTouch()&&"LineToolBrush"!==R.tool.value()||t.setAndSaveCurrentPosition(e.localX,e.localY,this._state,i),i.control()&&(o.startMeasurePoint()&&o.clearMeasure(),R.resetToCursor(!0)),r=o.price,a=o.index,o.startMeasurePoint()&&o.endMeasurePoint()&&o.clearMeasure(),i.shift()&&R.toolIsCursor(R.tool.value())&&t.selection().isEmpty()&&R.tool.setValue("measure"),this._tryStartMeasure(e,o,i,r,a)||this._tryFinishMeasure(e,o)||this._tryFinishZoom(e)||this._tryStartZoom(e,r,a)))))if(l=this._dataSourceAtPoint(e.localX,e.localY),TradingView.supportTouch()&&(this._preventSourceChange=null===l.source||!t.selection().isSelected(l.source)),this._isSelectBarModeEnabled()||i.control()||!S(R.tool.value())&&!t.lineBeingCreated()){if(l.hittest&&l.hittest.result()===F.CUSTOM&&(c=l.hittest.data().mouseDownHandler)&&c(e),!this._chart.readOnly()){ if(l&&l.hittest&&l.hittest.result()===F.CUSTOM_MOVE&&(c=l.hittest.data().pressedMouseMoveHandler))return void(l.isCustom?c(e):t.startCustomMoving(l.source,new s(e.localX,e.localY),c));if(u=this._handleSelectionMouseDownAndGetJustDeselectedSource(l,i),this._tryHandleEraserMouseDown(l,i))return;if(h=l.source&&TradingView.isInherited(l.source.constructor,y)&&l.source.isLocked(),!(this._lockDrawingsProperty.value()||h)&&l&&!l.isCustom){if(l.source&&l.source.userEditEnabled&&!l.source.userEditEnabled())return;if(this._tryStartChangingLineTool(e,l,i,a))return;if(l.hittest&&this.checkMovepoint(l.hittest.result())){if(this._tryStartCloning(e,l,i,u))return;if(this._tryStartMovingLineTool(e,l,i,a))return}}if(l.source&&l.source instanceof k&&l.source.isDraggable())return void(this._chart.draggingSource=l.source)}l.hittest&&l.hittest.result()===F.REGULAR||(this._processing=!0)}else(!n.enabled("charting_library_base")||a>=0)&&(i.shift()||t.clearSelection(),this._mouseDownEventForLineTool(e,i,a,r))},o.prototype.drawRightThere=function(e){var t,i,n;S(e)&&(i=(t=this._chart.model()).crossHairSource(),n=t.model().magnet().align(i.price,i.index,this._state),t.createLineTool(L(this._state),{index:i.index,price:n},e))},o.prototype._finishTool=function(e){var t,i=this._chart.model(),n=R.tool.value();R.resetToCursor(),this._hideTooltip(),i.selectionMacro(function(t){t.addSourceToSelection(e)}),this._chart.isTextTool(n)&&(t=i.createUndoCheckpoint(),this._chart.showChartPropertiesForSource(e,null,null,t).then(function(e){e.focusOnText()}))},o.prototype._mouseDownEventForLineTool=function(e,t,i,n){var o,r,a,l,c,u,h,d,p,_,f,m,y,v,b;if(this._state){if(o=this._chart.model(),r=!1,a=null,l=e.localX,c=e.localY,u=this._chart.model().model().crossHairSource(),h=R.tool.value(),R.hideAllDrawings().setValue(!1),R.lockDrawings().setValue(!1),TradingView.supportTouch()&&S(h)&&"LineToolBrush"!==h&&!o.lineBeingCreated()&&(this._startTouchPoint=new s(l,c),this._initCrossHairPosition=u.currentPoint()),!o.lineBeingCreated()||o.lineBeingCreated()instanceof g)TradingView.supportTouch()&&"LineToolBrush"!==h||(b={index:i,price:o.model().magnet().align(n,i,this._state)},a=o.createLineTool(this._state,b,h),o.lineBeingCreated()||(r=!0));else if(d=o.lineBeingCreated().ownerSource().firstValue(),TradingView.supportTouch()){if(!this._startTouchPoint)return this._startTouchPoint=new s(l,c),_=(p=o.lineBeingCreated().points())[p.length-1],f=o.timeScale().indexToCoordinate(_.index),n=_.price,m=o.lineBeingCreated().priceScale().priceToCoordinate(n,d),void(this._lastDrawingPoint=new s(f,m))}else a=o.lineBeingCreated(),(y=o.paneForSource(a))!==this._state?(v=this._dv.offset(),l=e.localX+v.left,c=e.localY+v.top,l-=(v=this._chart.paneByState(y)._dv.offset()).left,c-=v.top,n=a.priceScale().coordinateToPrice(c,d),i=Math.round(o.timeScale().coordinateToIndex(l)),r=o.coninueCreatingLine({index:i,price:n},t)):(n=o.model().magnet().align(n,i,this._state),r=o.coninueCreatingLine({index:i,price:n},t));a&&o.selectionMacro(function(e){e.addSourceToSelection(a)}), r?this._finishTool(a):TradingView.supportTouch()&&"LineToolBrush"!==h||this._updateTooltip(e.localX,e.localY)}},o.prototype._equalsCursorCache=function(e,t){return R.toolIsCursor(e.tool)?e.tool===t.tool&&e.theme===t.theme&&e.crosshair===t.crosshair:e.tool===t.tool&&e.theme===t.theme},o.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)},o.prototype.setCursorForTool=function(e,t,i){var n,o=R.tool.value();if(i&&i.control()&&e)this._setCursorClassName("pointer");else{if(R.toolIsCursor(o)){if(this._chart.draggingSource||this._isScrolling||this._chart.model()&&this._chart.model().sourcesBeingMoved().length)return void this._setCursorClassName("grabbing");if(e&&this._options.sourceSelectionEnabled)return void this._setCursorClassName("pointer")}"eraser"!==o?"zoom"!==o?"dot"!==(n=R.cursorTool.value())?"arrow"!==n?this._setCursorClassName(""):this._setCursorClassName("default"):this._setCursorClassName("dot"):this._setCursorClassName("zoom-in"):this._setCursorClassName("eraser")}},o.prototype.setDragToAnotherPaneCursor=function(){this._setCursorClassName("grabbing")},o.prototype.gestureStartEvent=function(e){this._prev_pinch_scale=1,this._pinching=!0},o.prototype.gestureChangeEvent=function(e){var t,i,n=e.center.x-5,o=this._chart.paneWidgets()[0].leftPriceAxisesContainer().getWidth(),r=this._chart.model().timeScale().width();o&&(n=Math.max(0,n-o)),t=2*((n=Math.min(n,r))/r-.5),(i=5*(e.scale-this._prev_pinch_scale))>0?this._chart.model().zoomIn(t,i):i<0&&this._chart.model().zoomOut(t,-i),this._prev_pinch_scale=e.scale},o.prototype.gestureEndEvent=function(e){this._pinching=!1},o.prototype._updateCommonTooltip=function(e){var t,i,n,o=this._lastCommonTooltipData,r=null;if(e&&e.hittest&&(t=e.hittest.data())&&(r=t.tooltip||null),null!=o||null!=r)return null==r||""===r.text?(this._lastCommonTooltipData=null,void Y.hide()):void(o&&r.text===o.text&&r.rect.x===o.rect.x&&r.rect.y===o.rect.y&&r.rect.w===o.rect.w&&r.rect.h===o.rect.h||(this._lastCommonTooltipData=r,i=TradingView.clone(r),n=this._paneCell.getBoundingClientRect(),i.rect.x+=n.left,i.rect.y+=n.top,Y.show(i)))},o.prototype._processMouseMoveForCustomHandler=function(e,t){var i,n,o,r=e.hittest&&e.hittest.result()===F.CUSTOM;!r||null!==this._prevHoveredHittest&&this._prevHoveredHittest.renderer===e.renderer||((i=e.hittest.data().mouseEnterHandler)&&i(t),this._prevHoveredHittest=e),r&&(n=e.hittest.data().mouseMoveHandler)&&n(t),null!==this._prevHoveredHittest&&this._prevHoveredHittest.renderer!==e.renderer&&((o=this._prevHoveredHittest.hittest.data().mouseLeaveHandler)&&o(t),this._prevHoveredHittest=null)},o.prototype.mouseMoveEvent=function(e){var t,i,n,o,r,s,a,l,c,u,d,p,_;if(this._state&&(t=this._dataSourceAtPoint(e.localX,e.localY),this._processMouseMoveForCustomHandler(t,e),i=this._chart.model()))if(n=e.localX,o=e.localY,r=new A(e), this._firstZoomPoint)this._processMouseMoveWhileZoom(e);else{if(s=!1,!(this._chart.readOnly()||this._editDialog&&this._editDialog.isVisible())&&(a=R.tool.value(),l=null,c=null,this._processing||!R.toolIsCursor(a)&&"eraser"!==a&&!r.control()||(s=!!(u=t&&t.source)&&-1!==ee.indexOf(u.toolname),t.hittest&&t.hittest.result()>F.MOVEPOINT_BACKGROUND?(l=t.source,c=t.hittest.result(),t.source&&h(t.source)&&("eraser"!==a||t.source.constructor!==TradingView.Series)?i.setHoveredSource(t.source,t.hittest.data()):i.setHoveredSource(null)):i.setHoveredSource(null)),this._options.sourceSelectionEnabled&&(this._isSelectBarModeEnabled()?this._setCursorClassName("pointer"):this.setCursorForTool(l,c,r)),this._updateCommonTooltip(t),null!==t&&null!==t.hittest&&t.hittest.result()===F.CUSTOM_MOVE))switch((t.hittest.data()||{}).cursorType){case G.VerticalResize:this._setCursorClassName("ns-resize")}if(this._chart.model().crossHairSource().setLinesShouldBeHidden(s),this._chart.readOnly()&&this._options.sourceSelectionEnabled&&(null!==t.source&&h(t.source)?i.setHoveredSource(t.source,t.hittest.data()):i.setHoveredSource(null,null)),this._chart.model().lineBeingCreated()&&(d=this._chart.model().lineBeingCreated(),(p=this._chart.model().paneForSource(d))!==this._state))return n+=(_=this._dv.offset()).left,o+=_.top,n-=(_=this._chart.paneByState(p)._dv.offset()).left,o-=_.top,void i.setAndSaveCurrentPosition(n,o,p,r);a=R.tool.value(),TradingView.supportTouch()&&S(a)||(i.setAndSaveCurrentPosition(n,o,this._state,r),this._updateTooltip(n,o))}},o.prototype._startChangeOrMoveLineToolIfNeeded=function(){var e;null!==this._startChangeLineToolParams&&(e=this._startChangeLineToolParams,this._chartUndoModel().startChangingLinetool(e.source,e.startPoint,e.data,e.envState)),null!==this._startMoveLineToolParams&&(e=this._startMoveLineToolParams,this._chartUndoModel().startMovingSources(e.source,e.startPoint,e.data,e.envState)),this._startMoveLineToolParams=null,this._startChangeLineToolParams=null},o.prototype.pressedMouseMoveEvent=function(e){var t,i,o,r,a,l,c,u,h,d,p,_,f,m,y,v,b,w,P,x,C,T,I,L,k,M,E,V,D,O,B,F,N;if(this._state&&!this._pinching){if(t=this._chart.model().model().scrollEnabled(),this._touchMove=!0,this._preventSourceChange=!1,i=new A(e),this._startChangeOrMoveLineToolIfNeeded(),r=(o=this._chart.model()).crossHairSource(),a=e.localX,l=e.localY,this._firstZoomPoint)return this._processMouseMoveWhileZoom(e),void(this._firstZoomPoint.draggingMode=!0);if(!TradingView.supportTouch()&&"touchmove"!==e.type||!r.startMeasurePoint()){if(c=R.tool.value(),TradingView.supportTouch()&&this._startTouchPoint&&S(c)&&"LineToolBrush"!==c&&!o.lineBeingCreated()&&!this._isSelectBarModeEnabled())return this._chart.justActivated()&&(this._initCrossHairPosition=r.currentPoint()),u=this._initCrossHairPosition,h=new s(a,l).subtract(this._startTouchPoint),d=u.add(h),this._chart.model().setAndSaveCurrentPosition(d.x,d.y,this._state,i),void this._updateTooltip(d.x,d.y);if(!TradingView.supportTouch()||!o.lineBeingCreated()||o.lineBeingCreated()instanceof g){ if(o.setAndSaveCurrentPosition(a,l,this._state,i),this._updateTooltip(a,l),b=R.tool.value(),w=this._isSelectBarModeEnabled(),(!S(b)||"LineToolBrush"===c||w||i.control())&&(0===e.button||Modernizr.mobiletouch)){if("LineToolBrush"===b&&!w){if((P=this._state.defaultPriceScale()).isEmpty())return;if(!(x=this._chart.model().lineBeingCreated()))return;return C=new s(e.localX,e.localY),T=x.ownerSource().firstValue(),C.price=P.coordinateToPrice(e.localY,T),C.index=Math.round(this._chart.model().timeScale().coordinateToIndex(e.localX)),void((!n.enabled("charting_library_base")||C.index>=0)&&this._chart.model().coninueCreatingLine(C))}if(this._chart.draggingSource&&(I=e.target,(L=this._chart.paneByCanvas(I))&&(L!==this?L.setDragToAnotherPaneCursor():L.setCursorForTool()),(k=this._chart.timeAxisByCanvas(I))&&k.setCursor("grabbing")),o.timeScale().isEmpty())return;if(o.customMoveBeingProcessed())return void o.processCustomMove(new s(a,l));if(o.lineBeingEdited())return M=Math.round(this._chart.model().timeScale().coordinateToIndex(a)),(!n.enabled("charting_library_base")||M>=0)&&o.changeLinePoint({x:a,y:l},i),this._updateTooltip(a,l),void this.setCursorForTool();if(E=this,o.sourcesBeingMoved().length)return void o.sourcesBeingMoved().forEach(function(t){var r,c,u,h,d,p,_=t.priceScale();_.isEmpty()||(r=(t.ownerSource()||E._state.mainDataSource()).firstValue(),c=o.timeScale().coordinateToIndex(e.localX),u=_.coordinateToPrice(e.localY,r),E.setCursorForTool(),n.enabled("charting_library_base")&&o.sourcesBeingMoved().some(function(e){return!e.onlyYMoving()})&&0!==(h=t.points()).length&&h.reduce(function(e,t){return t.index8&&(D=this._clonningAtMoveLineTools,O=this.cloneLineTools(D,!0),E=this,B=O.map(function(e){return E._chart.model().model().dataSourceForId(e)}),(o=E._chart.model()).selectionMacro(function(e){e.clearSelection(),B.forEach(function(t){e.addSourceToSelection(t)})}),F=new s(e.localX,e.localY),P=B[0].priceScale(),T=this._state.mainDataSource().firstValue(),N={index:E._chart.model().timeScale().coordinateToIndex(e.localX),price:P.coordinateToPrice(e.localY,T)},o.startMovingSources(B,{logical:N,screen:F},i),this._clonningAtMoveLineTools=null,this._startCloningPoint=null));if(P=this._state.defaultPriceScale(),!this._chart.readOnly()&&(e.ctrlKey&&!J()||e.metaKey&&J())&&1===e.buttons&&!this._chart.readOnly())return void(this._isSelecting||(r.startSelection(this._state),this._isSelecting=!0));!this._startScrollingPos&&t&&(this._startScrollingPos={x:e.clientX,y:e.clientY}),this._startScrollingPos&&(this._startScrollingPos.x===e.clientX&&this._startScrollingPos.y===e.clientY||this._isScrolling||(o.beginUndoMacro("scroll").setCustomFlag("doesnt_affect_save",!0),o.selection().isEmpty()||(P=o.selection().sources()[0].priceScale()), P.isEmpty()||o.startScrollPrice(this._state,P,e.localY),o.startScrollTime(e.localX),this._isScrolling=!0,this.setCursorForTool())),this._isScrolling&&(o.selection().isEmpty()||(P=o.selection().sources()[0].priceScale()),P.isEmpty()||o.scrollPriceTo(this._state,P,e.localY),this._scrollMacroStarted=o.scrollTimeTo(e.localX))}}else this._startTouchPoint&&(p=o.lineBeingCreated(),_=e.localX-this._startTouchPoint.x,f=e.localY-this._startTouchPoint.y,m=this._lastDrawingPoint.x+_,y=this._lastDrawingPoint.y+f,v=this._chart.model().paneForSource(p),o.setAndSaveCurrentPosition(m,y,v,i),this._updateTooltip(m,y))}else this._chart.model().setAndSaveCurrentPosition(a,l,this._state,i)}},o.prototype._processMouseUpForCustomHandler=function(e){var t,i=this._dataSourceAtPoint(e.localX,e.localY);i.hittest&&i.hittest.result()===F.CUSTOM&&(t=i.hittest.data().mouseUpHandler)&&t(e)},o.prototype.mouseUpEvent=function(e){var t,i,n,o,r,s,l,c,u,h,d,p,_,f,m,y,v,w,P,C,T,I,L,k,M,E,V,D,O,B,F,W,z;if(this._state){if(this._startMoveLineToolParams=null,this._startChangeLineToolParams=null,this._processMouseUpForCustomHandler(e),this._clonningAtMoveLineTools=null,t=this,delete this._isSelecting,(n=(i=this._chart.model()).model().crossHairSource()).selection()&&(o=this._state.lineToolsForArea(n.selection()),i.selectionMacro(function(e){o.forEach(function(t){e.addSourceToSelection(t)})}),n.clearSelection(),x("GUI","Multiselect","Area Select")),H.emit("mouse_up",{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY}),r=this._touchMove,delete this._touchMove,s=new A(e),l=R.tool.value(),TradingView.supportTouch()&&!r&&"LineToolBrush"!==l&&S(l)&&!i.lineBeingCreated()){if(this._chart.justActivated())return;return c=n.currentPoint(),u=this._state.defaultPriceScale(),h=this._state.mainDataSource().firstValue(),d=u.coordinateToPrice(c.y,h),_={index:p=Math.round(i.timeScale().coordinateToIndex(c.x)),price:d},f=i.createLineTool(this._state,_,l),i.selectionMacro(function(e){e.addSourceToSelection(f)}),i.lineBeingCreated()||this._finishTool(f),this._updateTooltip(c.x,c.y),void delete this._startTouchPoint}if(i.lineBeingCreated()&&!(i.lineBeingCreated()instanceof g)&&this._startTouchPoint)return m=!1,delete this._startTouchPoint,r||(d=(y=(f=i.lineBeingCreated()).points()[f.points().length-1]).price,m=i.coninueCreatingLine({index:y.index,price:d},new A(e)),delete this._lastDrawingPoint),void(m&&this._finishTool(f));if(this._firstZoomPoint&&this._firstZoomPoint.draggingMode)this._finishZoom(e);else if(!TradingView.supportTouch()&&"touchend"!==e.type||!this._tryFinishMeasure(e,n)){if(0===e.button||TradingView.supportTouch()){if(this._processing=!1,i.customMoveBeingProcessed()&&i.endCustomMoving(),i.lineBeingEdited())return i.endChangingLinetool(),void this._hideTooltip();if("LineToolBrush"===l&&!this._isSelectBarModeEnabled()){if(i.finishLineTool(),(u=this._state.defaultPriceScale()).isEmpty())return;if(!(v=this._chart.model().lineBeingCreated()))return;return h=v.ownerSource().firstValue(),d=u.coordinateToPrice(e.localY,h), p=Math.round(this._chart.model().timeScale().coordinateToIndex(e.localX)),void this._chart.model().coninueCreatingLine({index:p,price:d})}if(i.sourcesBeingMoved().length)return w=!i.endMovingSource()&&!s.shift(),this._hideTooltip(),i.sourcesBeingMoved().forEach(function(e){t.setCursorForTool(e)}),w&&(P=this._dataSourceAtPoint(e.localX,e.localY),i.selectionMacro(function(e){e.clearSelection(),P.source&&(e.addSourceToSelection(P.source),b(P.source)&&H.emit("drawing_event",P.source.id(),"click"))})),void i.invalidate(N.cursor());if(this._chart.readOnly()||(P=this._dataSourceAtPoint(e.localX,e.localY),C=e.localX>=0&&e.localX=1?L():requestAnimationFrame(V)},requestAnimationFrame(V)):L()),this._chart.draggingSource)for(D=e.target,(O=this._chart.paneByCanvas(D))&&O!==this&&(I&&(I=!1,this._chart.model().undoHistory.undo()),this._chart.model().mergeToPane(this._chart.draggingSource,O._state)),this._chart.timeAxisByCanvas(D)&&(I&&(I=!1,this._chart.model().undoHistory.undo()),this._chart.model().unmergeToNewBottomPane(this._chart.draggingSource)),this._chart.draggingSource=null,(B=this._chart.getTimeScale())&&B.restoreDefaultCursor(),P=this._dataSourceAtPoint(e.localX,e.localY),F=this._chart.paneWidgets(),W=0;W=F.REGULAR||o>=F.MOVEPOINT_BACKGROUND&&TradingView.isMobile.any(),i.isCustom?r&&i.hittest.result()===F.CUSTOM&&void 0!==(s=i.hittest.data().contextMenuHandler)&&s(e):(this._chart.updateActions(),a=this._chart.model(),l=!1,c=this,a.selectionMacro(function(t){null!==n&&r?(t.selection().isSelected(n)||(t.clearSelection(),t.addSourceToSelection(n)), l=n.hasContextMenu()):(c._contextMenu(e).then(function(t){t.show(e)}),t.clearSelection())}),l&&(h(n)?c.showContextMenuForSelection(e):c.showContextMenuForSources([n],e)),this.paint()))}},o.prototype._contextMenu=function(e){function t(e){return e instanceof V}var i,n,o=this,r=this._initActions(e),s=o._customActions();for(r=r.filter(function(e){return null!==e}),s.remove.forEach(function(e){for(var t=0;t0;n--)t(i[n])&&t(i[n-1])&&i.splice(n,1);return i.length&&t(i[0])&&i.splice(0,1),i.length&&t(i[i.length-1])&&i.splice(i.length-1,1),B.createMenu(i,{statName:"ChartContextMenu"})},o.prototype.createRemoveMenu=function(){var e=this._chart.actions();return new E({label:window.t("Remove"),statName:"Remove",subItems:[e.paneRemoveAllStudies,e.paneRemoveAllDrawingTools,e.paneRemoveAllStudiesDrawingTools]})},o.prototype._initActions=function(e){var t,i,o,r=this,s=this._chart.actions(),a=[];return n.enabled("datasource_copypaste")&&(i=(((t=q.get())||{}).sources||[]).filter(function(e){return"study"===e.type||"drawing"===e.type}),t&&i.length&&(o=new E({label:window.t("Paste %s").replace("%s",window.t(t.title||t.type)),shortcut:"Ctrl-V",shortcutHint:"Ctrl + V",statName:"Paste",onExecute:function(){r._chart.onAppClipboardPaste(r.state())}}),a.push(o))),a.length&&a.push(new V),a.push(s.chartReset),a.push(new V),a[a.length-1]instanceof V||a.push(new V),window.widgetbar&&(!window.widgetbar._customization||window.widgetbar._customization.watchlist)&&s.addToWatchlist&&a.push(s.addToWatchlist),n.enabled("text_notes")&&a.push(s.addToTextNotes),a[a.length-1]instanceof V||a.push(new V),a.push(this._createLockTimeAxisAction(e)),a.push(new V),a.push(s.paneObjectTree),n.enabled("charting_library_base")||a.push(s.applyColorTheme),a[a.length-1]instanceof V||a.push(new V),a.push(s.paneRemoveAllDrawingTools),a.push(s.paneRemoveAllStudies),a.push(new V),pro.hasPackage("mtp-mtpredictor")&&L(this._state).containsMainSeries()&&a.push(this._createMTPredictorActions(),new V),n.enabled("show_chart_property_page")&&a.push(s.chartProperties),a[a.length-1]instanceof V&&a.pop(),a},o.prototype._customActions=function(){var e,t,i,o={top:[],bottom:[],remove:[]},r=this._chart.model(),s=r.timeScale(),a=this._state&&this._state.defaultPriceScale();return n.enabled("custom_items_in_context_menu")?(e=s.isEmpty()?void 0:s.indexToUserTime(s.coordinateToIndex(this._contextMenuX)),a&&!a.isEmpty()&&(i=this._state.mainDataSource().firstValue(),t=a.coordinateToPrice(this._contextMenuY,i)),H.emit("onContextMenu",{unixtime:e?e/1e3:void 0,price:t,callback:function(e){[].concat(e).forEach(function(e){var t;e.text&&(e.text.length>1&&"-"===e.text[0]?o.remove.push(e.text.slice(1)):(t="-"===e.text?new V:new E({label:e.text,onExecute:e.click}),e.position&&"top"===e.position?o.top.push(t):o.bottom.push(t)))})}}),o):o},o.prototype._timeAxisMenu=function(){if(this._chart.model().timeScale().isEmpty())return null;var e=this._chart.getTimeScale() ;return new E({label:window.t("Time Scale"),subItems:e.getContextMenuActions(),statName:"TimeScale"})},o.prototype._seriesContextMenu=function(e){var t,i=this._chart.actions(),o=e.properties().visible.value(),r=[];return this._chart.readOnly()?(r=[o?i.seriesHide:this.createActionShow(e),new V]).push(this._createActionScale(e)):(!r.length||r[r.length-1]instanceof V||r.push(new V),n.enabled("symbol_info")&&r.push(i.showSymbolInfoDialog),!r.length||r[r.length-1]instanceof V||r.push(new V),r.push(this.createVisualOrderAction(e)),(t=this._createActionMove(e))&&r.push(t),r.push(this._createActionScale(e)),r.push(o?i.seriesHide:this.createActionShow(e)),r.push(new V),r.push(i.showPriceLine),r.push(new V),window.widgetbar&&(!window.widgetbar._customization||window.widgetbar._customization.watchlist)&&i.addToWatchlist&&r.push(i.addToWatchlist),n.enabled("text_notes")&&r.push(i.addToTextNotes),r[r.length-1]instanceof V||r.push(new V),pro.hasPackage("mtp-mtpredictor")&&r.push(this._createMTPredictorActions(),new V),r[r.length-1]instanceof V&&r.pop()),B.createMenu(r)},o.prototype._createActionScaleDetach=function(e,t,i,n){var o,r,s,a,l,c,u,h,d;return this.state().canCreateNewPriceScale()?(o=e.priceScale().canDetachSource(e),r=this._state.priceScalePosition(e.priceScale()),(s=o||r!==t)?(a=this._chart.model().model().priceScaleSlotsCount(),l={left:{labelled:ae,sided:pe},right:{labelled:ae,sided:_e}},c="left"===t?this._state.leftPriceScales().length:this._state.rightPriceScales().length,u=a[t]>c?"labelled":"sided",h=Q(t,c).label,d=l[t][u].format({label:h}),new E({checkable:!1,disabled:!s,label:d,statName:n,payload:e,onExecute:i})):null):null},o.prototype._createActionScaleDetachLeft=function(e){return this._createActionScaleDetach(e,"left",o.prototype.onDetachLeft.bind(this),"ToggleScaleLeft")},o.prototype._createActionScaleDetachRight=function(e){return this._createActionScaleDetach(e,"right",o.prototype.onDetachRight.bind(this),"ToggleScaleRight")},o.prototype._createActionNoScale=function(e){var t=this._chart.model().paneForSource(e),i=t.actionNoScaleIsEnabled(e);return new E({checkable:!0,checked:L(this._state).isOverlay(e),label:window.t("No Scale (Fullscreen)"),disabled:!i,statName:"ToggleNoScale",payload:e,onExecute:o.prototype.onNoScale.bind(this)})},o.prototype._createMoveToScaleAction=function(e,t,i,n){var r=e.priceScale()===t;return new E({checkable:!0,checked:r,label:i,statName:"ToggleScale",payload:{datasource:e,priceScale:t,undoText:n},onExecute:o.prototype.onMoveToScale.bind(this)})},o.prototype.createActionScaleItems=function(e){var t,i,n=[],o=this._chart.model().model().priceScaleSlotsCount(),r=o.totallySlots>1,s=this._state.rightPriceScales(),a=this._state.leftPriceScales(),l=this._createActionScaleDetachRight(e),c=this._createActionScaleDetachLeft(e),u=s.length+a.length+(null===l?0:1)+(null===c?0:1),h=u>2,d={right:{hidden:{checked:{labelled:te,sided:ie},unchecked:{labelled:ne,sided:oe}},visible:{checked:{labelled:re,sided:se},unchecked:{labelled:ae,sided:le}}},left:{hidden:{checked:{labelled:te,sided:ce}, unchecked:{labelled:ne,sided:ue}},visible:{checked:{labelled:re,sided:he},unchecked:{labelled:ae,sided:de}}}},p={left:this._state.visibleLeftPriceScales(),right:this._state.visibleRightPriceScales()},_=function(t,i){var n="right"===i?s:a,o=n[t],l=p[i].includes(o)?"visible":"hidden",c=e.priceScale()===o?"checked":"unchecked",u=r?"labelled":"sided",h=d[i],_={labelled:h.visible.unchecked.labelled,sided:h.visible.unchecked.sided},f=Q(i,t).label,m=h[l][c][u].format({label:f}),y=_[u].format({label:f});return{actionText:m,undoText:y}};for(t=0;t0||null!==l)&&n.push(new V),t=0;t0||null!==c)&&n.push(new V),n.push(this._createActionNoScale(e)),n},o.prototype._createActionScale=function(e){var t=e.priceScale(),n=this._state.priceScalePosition(t),o="left"===n?this._state.leftPriceScales():this._state.rightPriceScales(),r=o.indexOf(t),s=this._chart.model().model().priceScaleSlotsCount(),a=s.totallySlots<2?"dontneedname":"needname",l=Q(n,r).label,c=fe.format({label:l}),u=me,h={"left-needname":c,"left-dontneedname":ye,"right-needname":c,"right-dontneedname":ge,"overlay-needname":u,"overlay-dontneedname":u},d=n+"-"+a,p=h[d];return new E({label:p,icon:i("/kal"),subItems:this.createActionScaleItems(e)})},o.prototype.toggleLockTimeAxis=function(e,t){var i,n,o;"boolean"!=typeof t&&(t=!R.lockTimeAxis().value()),t&&(n=(i=this._chart.model().timeScale()).coordinateToIndex(e),o=i.points().roughTime(n),R.lockTimeAxisTime.setValue(o)),R.lockTimeAxis().setValue(t)},o.prototype._createLockTimeAxisAction=function(e){var t=R.lockTimeAxis().value();return new E({label:window.t("Lock Vertical Line On Time Axis"),statName:"ToggleLockCursorInTime",checkable:!0,checked:t,onExecute:this.toggleLockTimeAxis.bind(this,e.localX,!t)})},o.prototype._createHVLineAction=function(e,t){var i=this;return new E({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 n=L(i._state),o=n.mainDataSource().firstValue(),r=i._chart.model().timeScale().coordinateToIndex(e.localX),s=n.defaultPriceScale().coordinateToPrice(e.localY,o),a=i._chart.model().createLineTool(n,{index:r,price:s},"vertical"===t?"LineToolVertLine":"LineToolHorzLine");i._finishTool(a)}})},o.prototype._createMTPredictorActions=function(){var e=this,t=function(t,i,n){return new E({label:t,onExecute:function(){var t,o,r,s=e._chart.model(),a=s.timeScale(),l=L(e._state),c=l.defaultPriceScale();a.isEmpty()||c.isEmpty()||(n?(t=l.mainDataSource().firstValue(),o=c.coordinateToPrice(e._contextMenuY,t),r=Math.round(a.coordinateToIndex(e._contextMenuX)),s.createLineTool(l,{index:r,price:o},i)):R.tool.setValue(i))}})};return new E({label:window.t("MTPredictor"), subItems:[t(window.t("Apply Manual Risk/Reward"),"LineStudyMtpRiskReward",!1),t(window.t("Apply Manual Decision Point"),"LineStudyMtpDecisionPoint",!0),t(window.t("Analyze Trade Setup"),"LineStudyMtpAnalysis",!0),new E({label:window.t("Apply Elliott Wave"),subItems:[t(window.t("Apply Elliott Wave Intermediate"),"LineStudyMtpElliotWaveMain",!0),t(window.t("Apply Elliott Wave Major"),"LineStudyMtpElliotWaveMajor",!0),t(window.t("Apply Elliott Wave Minor"),"LineStudyMtpElliotWaveMinor",!0)]}),new E({label:window.t("Apply WPT Up Wave"),subItems:[t(window.t("Up Wave 1 or A"),"LineStudyMtpUpWave1OrA",!1),t(window.t("Up Wave 2 or B"),"LineStudyMtpUpWave2OrB",!1),t(window.t("Up Wave C"),"LineStudyMtpUpWaveC",!1),t(window.t("Up Wave 3"),"LineStudyMtpUpWave3",!1),t(window.t("Up Wave 4"),"LineStudyMtpUpWave4",!1),t(window.t("Up Wave 5"),"LineStudyMtpUpWave5",!1)]}),new E({label:window.t("Apply WPT Down Wave"),subItems:[t(window.t("Down Wave 1 or A"),"LineStudyMtpDownWave1OrA",!1),t(window.t("Down Wave 2 or B"),"LineStudyMtpDownWave2OrB",!1),t(window.t("Down Wave C"),"LineStudyMtpDownWaveC",!1),t(window.t("Down Wave 3"),"LineStudyMtpDownWave3",!1),t(window.t("Down Wave 4"),"LineStudyMtpDownWave4",!1),t(window.t("Down Wave 5"),"LineStudyMtpDownWave5",!1)]})]})},o.prototype.createEarningsShow=function(e){var t=this,i=this._chart.model().mainSeries().properties().esdShowEarnings;return new E({label:window.t("Show Earnings"),checkable:!0,checked:i.value(),statName:"ToggleShowEarnings",onExecute:function(e){t._chart.model().setProperty(i,e.isChecked(),"Show Earnings")}})},o.prototype.createDividendsShow=function(e){var t=this,i=this._chart.model().mainSeries().properties().esdShowDividends;return new E({label:window.t("Show Dividends"),checkable:!0,checked:i.value(),statName:"ToggleShowDividends",onExecute:function(e){t._chart.model().setProperty(i,e.isChecked(),"Show Dividends")}})},o.prototype.createSplitsShow=function(e){var t=this,i=this._chart.model().mainSeries().properties().esdShowSplits;return new E({checkable:!0,label:window.t("Show Splits"),checked:i.value(),statName:"ToggleShowSplits",onExecute:function(e){t._chart.model().setProperty(i,e.isChecked(),"Show Splits")}})},o.prototype._studyEsdContextMenu=function(e){var t=[];return this._chart.readOnly()||t.push(this.createDividendsShow(e),this.createSplitsShow(e),this.createEarningsShow(e)),B.createMenu(t)},o.prototype._studyContextMenu=function(e){var t,i,o,r=this,s=this._chart.actions(),a=e.properties().visible.value(),l=[];return e.userEditEnabled()?(this._chart.readOnly()?(l=[a?s.studyHide:this.createActionShow(e),new V],TradingView.isInherited(e.constructor,c)||l.push(this._createActionScale(e))):(n.enabled("study_on_study")&&e.canHaveChildren()&&l.push(this.createActionAddChildStudy(e)),!l.length||l[l.length-1]instanceof V||l.push(new V),l.push(this.createVisualOrderAction(e)),TradingView.isInherited(e.constructor,c)||((t=this._createActionMove(e))&&l.push(t),l.push(this._createActionScale(e))),l.push(new V),(i=e.metaInfo()).pine&&(l.push(s.viewSourceCode), s.viewSourceCode.update({disabled:!1}),ScriptLib.isAuthToGetPineSourceCode(i.scriptIdPart,i.pine.version).done(function(e){e||s.viewSourceCode.update({disabled:!0})}).fail(function(e){K.logError("Failed isAuthToGetPineSourceCode, reason: "+e)})),l[l.length-1]instanceof V||l.push(new V),n.enabled("datasource_copypaste")&&!e.isChildStudy()&&(o=new E({label:window.t("Copy"),shortcut:"Ctrl-C",shortcutHint:"Ctrl + C",statName:"Copy",onExecute:function(){r._chart.onAppClipboardCopy([e])}}),l.push(o)),l.push(a?s.studyHide:this.createActionShow(e)),l.push(s.studyRemove),l.push(new V),n.enabled("property_pages")&&l.push(s.format),l[l.length-1]instanceof V&&l.pop()),B.createMenu(l,{statName:"StudyContextMenu"})):B.createMenu(l)},o.prototype.createLineToolTemplateAction=function(e){var t=this;return window.lineToolPropertiesToolbar?new D(function(){var i,n=window.lineToolPropertiesToolbar.templatesList(),o=[],r=new E({label:window.t("Save As..."),statName:"SaveAs",onExecute:function(){n.showSaveDialog(function(t){var i=JSON.stringify(e.template());n.saveTemplate(t,i)})}});return o.push(r),i=new E({label:window.t("Apply Default"),statName:"ApplyDefault",onExecute:function(){t._chart.model().restorePropertiesForSource(e),window.lineToolPropertiesToolbar.onSourceChanged(e)}}),o.push(i),new Promise(function(e){n.templatesLoaded().then(function(){var e=n.getData();e.length&&o.push(new V),$.each(e,function(e,t){var i=new E({label:t,statName:"ApplyTemplate",onExecute:function(){n.loadTemplate(t)},toolbox:{type:O.Delete,action:function(){n.deleteAction(t)}},showToolboxOnHover:!0});o.push(i)})},function(e){K.logWarn(e)}).then(function(){e({label:window.t("Template"),statName:"Template",subItems:o})})})}):null},o.prototype._createActionToggleLockObject=function(e){var t=e.properties().frozen.value();return new E({label:t?window.t("Unlock"):window.t("Lock"),statName:"ToggleLockSelectedObject",chackable:!0,icon:i(t?"fs3R":"qckB"),onExecute:this._chart.toggleLockSelectedObject.bind(this._chart)})},o.prototype._lineContextMenu=function(e){var t,r,s,a,l,c=[],u=this._chart,h=u.actions(),d=this,p=function(){c.push(d.createVisualOrderAction(e))},_=function(){var t,n=e.filter(function(e){return e.properties().clonable&&e.properties().clonable.value()});return n.length&&(t=new E({label:window.t("Clone"),callbackContext:{target:n},icon:i("K8V9"),shortcutHint:"Ctrl + Drag",doNotBindShortcut:!0,statName:"Clone",onExecute:o.prototype.cloneLineTools.bind(d,n,!1)}),c.push(t)),!!n.length},f=function(){var t,i=e.filter(function(e){return n.enabled("datasource_copypaste")&&!e.properties().blockCopying});return i.length&&(t=new E({label:window.t("Copy"),shortcutHint:"Ctrl + C",statName:"Copy",onExecute:function(){u.onAppClipboardCopy(i)}}),c.push(t)),!!i.length},m=function(){if(n.enabled("support_multicharts")&&u.isMultipleLayout()){var t=new E({label:window.t("Sync To All Charts"),statName:"SyncDrawingToAllCharts",checkable:!0,checked:Boolean(e.some(function(e){return!!e.linkKey})),onExecute:function(e){var t ;u.chartWidgetCollection()&&(t=u.chartWidgetCollection().activeChartWidget.value()),t||(t=u),e.isChecked()?t.copyLineToOtherCharts():t.unlinkSelectedLine()}});return c.push(t),!0}return!1};if(1===e.length){if(t=e[0],u.readOnly())c.push(h.lineHide);else if(t.userEditEnabled()&&(n.enabled("alerts")&&!d.chart().onWidget()&&t.hasAlert.value()&&(c.push(d._createEditAlertDrawingAction(t)),c.push(new V)),n.enabled("charting_library_base")||null!==(r=d.createLineToolTemplateAction(t))&&c.push(r),p(),c.push(h.paneObjectTree),c.push(new V),s=_(),s=f()||s,(s=m(t)||s)&&c.push(new V),c.push(this._createActionToggleLockObject(t)),c.push(h.lineHide),c.push(h.lineRemove),c.push(new V),n.enabled("property_pages")&&Z(t,u.model())&&c.push(h.format),t.additionalActions))for(c.push(new V),a=t.additionalActions(u.model()),l=0;l=0;i--)t[i].createDrawingsCaches();for(n=this._state.customSources(X.Foreground),o=this._state.customSources(X.Background),i=0;i=0;i--)t[i].clearDrawingCaches()},o.prototype._drawCustomSource=function(e,t){ var i,n,o=L(this._state),r=o.height(),s=o.width(),a=this._chart.model(),l=a.hoveredSource()===e,c=e.paneViews(o);for(i=0;iW.Cursor&&this._state&&this.recalculatePriceScale(),this._lhsPriceAxisesContainer.paint(e),this._rhsPriceAxisesContainer.paint(e),e===W.Cursor)this._topCtx.clearRect(-.5,-.5,this._size.w,this._size.h),this.drawCrossHair(this._topCtx),this.drawActiveLineTool(this._topCtx);else{var i=this._ctx;this._topCtx.clearRect(-.5,-.5,this._size.w,this._size.h),this.drawBackground(i,this.backgroundColor()),this._state&&(this.drawGrid(i),this.drawWatermark(i),this.drawSources(i),this.drawBarsMarks(i,t),this.drawCrossHair(this._topCtx),this.drawActiveLineTool(this._topCtx))}},o.prototype._priceAxisesContainer=function(e){return p.isLeft(e)?this._lhsPriceAxisesContainer:this._rhsPriceAxisesContainer},o.prototype.statusWidget=function(){return this._legendWidget},o.prototype.onDetachLeft=function(e){var t=L(this._state),i=e.getPayload();this.chart().model().detachToLeft(i,t)},o.prototype.onDetachRight=function(e){var t=L(this._state),i=e.getPayload();this.chart().model().detachToRight(i,t)},o.prototype.onNoScale=function(e){var t=L(this._state),i=e.getPayload();t.isOverlay(i)||this.chart().model().detachNoScale(i,t)},o.prototype.onMoveToScale=function(e){var t=e.getPayload();t.datasource.priceScale()!==t.priceScale&&this.chart().model().moveToScale(t.datasource,this._state,t.priceScale,t.undoText)},o.prototype.createActionLockScale=function(e){var t,i;return e instanceof TradingView.Series?(t=_(e.priceScale(),this._chart.model().model().mainSeriesScaleRatio()),(i=new E({checkable:e.priceScale().isLockScale(),label:window.t("Lock Scale")+" "+t,statName:"LockScale"}))._binding=new T(i,e.priceScale().properties().lockScale,this._chart.model(),"Lock Scale",function(){var t={lockScale:this.value()};this._undoModel.setPriceScaleMode(t,e.priceScale(),this._undoText)}),i):null},o.prototype.createActionMergeUp=function(e){return this._chart.model().model().isMergeUpAvailableForSource(e)?new E({ label:window.t("Existing Pane Above"),statName:"MergeUp",payload:e,onExecute:o.prototype.onMergeUp.bind(this)}):null},o.prototype.onMergeUp=function(e){var t=e.getPayload();this._chart.model().mergeSourceUp(t)},o.prototype.createActionUnmergeUp=function(e){return this._chart.model().model().isUnmergeAvailableForSource(e)?new E({label:window.t("New Pane Above"),statName:"UnmergeUp",payload:e,onExecute:o.prototype.onUnmergeUp.bind(this)}):null},o.prototype.onUnmergeUp=function(e){var t=e.getPayload();this._chart.model().unmergeSourceUp(t)},o.prototype.createActionMergeDown=function(e){return this._chart.model().model().isMergeDownAvailableForSource(e)?new E({label:window.t("Existing Pane Below"),statName:"MergeDown",payload:e,onExecute:o.prototype.onMergeDown.bind(this)}):null},o.prototype.onMergeDown=function(e){var t=e.getPayload();this._chart.model().mergeSourceDown(t)},o.prototype.createActionUnmergeDown=function(e){return this._chart.model().model().isUnmergeAvailableForSource(e)?new E({label:window.t("New Pane Below"),statName:"UnmergeDown",payload:e,onExecute:o.prototype.onUnmergeDown.bind(this)}):null},o.prototype.onUnmergeDown=function(e){var t=e.getPayload();this._chart.model().unmergeSourceDown(t)},o.prototype._mergeContentMenuItems=function(e){var t=[],i=this.createActionMergeUp(e);return i&&t.push(i),(i=this.createActionUnmergeUp(e))&&t.push(i),(i=this.createActionMergeDown(e))&&t.push(i),(i=this.createActionUnmergeDown(e))&&t.push(i),t},o.prototype.createActionShow=function(e){var t=new E({checkable:!0,label:window.t("Show"),icon:i("6ctS"),statName:"ToggleShow"});return t._binding=new T(t,e.properties().visible,this._chart.model(),t.getLabel()),t._binding.setValue(e.properties().visible.value()),t},o.prototype.createActionAddChildStudy=function(e){var t=this;return new E({label:window.t("Add Indicator on {0}...").format(e.title(!0)),icon:i("CwKc"),statName:"ApplyIndicator",onExecute:function(){var i,n,o=t._chart.showIndicators(e);o&&(i=function(){x("SOS","Apply SOS","Apply by RC menu")},(n=t._chart.model().model().studyInserted()).subscribe(t,i),o.visibilityChanged.subscribe(t,function(e){e||n.unsubscribe(t,i)},!0))}})},o.prototype.bringObjectForward=function(e){var t=this._chart.model().selection().sources();t.length&&this._chart.model().changeZOrder(t,1)},o.prototype.sendObjectToBack=function(e){var t=this._chart.model().selection().sources();t.length&&this._chart.model().sendToBack(t)},o.prototype.bringObjectToFront=function(e){var t=this._chart.model().selection().sources();t.length&&this._chart.model().bringToFront(t)},o.prototype.sendObjectBackward=function(e){var t=this._chart.model().selection().sources();t.length&&this._chart.model().changeZOrder(t,-1)},o.prototype.createVisualOrderAction=function(e){var t,n,r,s,a,l,c=new E({text:window.t("Visual Order"),statName:"VisualOrder"});return c.subActions||(c.subActions=[]),t=new E({text:window.t("Bring to Front"),statName:"BringToFront",onExecute:o.prototype.bringObjectToFront}),c.subActions.push(t),n=new E({text:window.t("Send to Back"), statName:"SendToBack",onExecute:o.prototype.sendObjectToBack}),c.subActions.push(n),r=new E({text:window.t("Bring Forward"),statName:"BringForward",onExecute:o.prototype.bringObjectForward}),c.subActions.push(r),s=new E({text:window.t("Send Backward"),statName:"SendBackward",onExecute:o.prototype.sendObjectBackward}),c.subActions.push(s),a=I(e)?e[0]:e,l=this._chart.model().paneForSource(a).getZOrderMinMax(),new E({label:window.t("Visual Order"),icon:i("9dnG"),statName:"VisualOrder",subItems:[new E({label:window.t("Bring to Front"),statName:"BringToFront",disabled:a.zorder()===l.maxZOrder,onExecute:o.prototype.bringObjectToFront.bind(this)}),new E({label:window.t("Send to Back"),statName:"SendToBack",disabled:a.zorder()===l.minZOrder,onExecute:o.prototype.sendObjectToBack.bind(this)}),new E({label:window.t("Bring Forward"),statName:"BringForward",disabled:a.zorder()===l.maxZOrder,onExecute:o.prototype.bringObjectForward.bind(this)}),new E({label:window.t("Send Backward"),statName:"SendBackward",disabled:a.zorder()===l.minZOrder,onExecute:o.prototype.sendObjectBackward.bind(this)})]})},o.prototype._createActionMove=function(e){var t=this._mergeContentMenuItems(e);return t.length?new E({label:window.t("Move To"),icon:i("BBCR"),subItems:t}):null},o.prototype._updateTooltip=function(e,t){if(!this._rafSet){var i=this;requestAnimationFrame(function(){i._state&&(i._updateTooltipImpl(e,t),i._rafSet=!1)}),this._rafSet=!0}},o.prototype._updateTooltipImpl=function(e,t){function i(i){TradingView[r].getTooltipText&&(i=TradingView[r].getTooltipText(a)||i),n._tooltipSelector.innerHTML=i,n._tooltipSelector.classList.remove("tooltip-selector-hidden");var o=TradingView.isMobile.any()?{left:e-n._tooltipSelector.outerWidth()-16,top:t-n._tooltipSelector.outerHeight()-16}:{left:e+16,top:t+16};n._tooltipSelector.style.left=o.left,n._tooltipSelector.style.top=o.top}var n,o,r,s,a,l;if(this._chart){for(n=this,o=this._chart.paneWidgets(),r=R.tool.value(),s=L(this._state).model(),a=s.lineBeingCreated(),l=o.length-1;l>=0;l--)o[l]._hideTooltip();this._isSelectBarModeEnabled()||(w(r)&&!TradingView.isMobile.any()?i(window.t("Click to set a point")):TradingView.isMobile.any()&&"LineToolBrush"!==r&&S(r)&&!n._chart.model().lineBeingCreated()?i(window.t("1. Slide your finger to select location for first anchor{new_line}2. Tap anywhere to place the first anchor").format({new_line:"
"})):TradingView.isMobile.any()&&"LineToolBrush"!==r&&S(r)&&i(window.t("1. Slide your finger to select location for next anchor{new_line}2. Tap anywhere to place the next anchor").format({new_line:"
"})))}},o.prototype._hideTooltip=function(){this._tooltipSelector.classList.add("tooltip-selector-hidden")},o.prototype._updateCrosshairOnZoom=function(){var e;R.lockTimeAxis().value()&&(e=this._chart.model().crossHairSource()).setPosition(e.index,e.price,L(this._state))},o.prototype._isSelectBarModeEnabled=function(){return this._chart.model().crossHairSource().selectBarMode().value()},o.prototype.leftPriceAxisesContainer=function(){return this._lhsPriceAxisesContainer}, o.prototype.rightPriceAxisesContainer=function(){return this._rhsPriceAxisesContainer},o.prototype._tryStartMeasure=function(e,t,i,n,o){return"measure"===R.tool.value()&&!t.startMeasurePoint()&&!i.control()&&(n=this._chart.model().model().magnet().align(n,o,this._state),t.startMeasuring({price:n,index:o,x:e.localX,y:e.localY},this._state),!0)},o.prototype._tryFinishMeasure=function(e,t){var i,n;return!(!t.startMeasurePoint()||t.endMeasurePoint())&&(i=t.price,n=t.index,i=this._chart.model().model().magnet().align(i,n,this._state),t.finishMeasure({price:i,index:n,x:e.localX,y:e.localY}),R.resetToCursor(),!0)},o.prototype._tryFinishZoom=function(e){return!!this._firstZoomPoint&&(this._finishZoom(e),!0)},o.prototype._tryStartZoom=function(e,t,i){var n,o,r=this._chart.model().model().zoomEnabled();return!("zoom"!==R.tool.value()||!r)&&(o=(n=this._chart.model()).timeScale().indexToCoordinate(i)-.5*n.timeScale().barSpacing(),this._firstZoomPoint={price:t,index:i,x:o,y:e.localY},this._zoomSelector.style.display="block",this._zoomSelector.style.left=o+"px",this._zoomSelector.style.top=e.localY+"px",this._zoomSelector.style.width="0",this._zoomSelector.style.height="0",!0)},o.prototype.highlightedPriceAxis=function(){return this._highlightedPriceAxis},e.exports.PaneWidget=o}).call(this,i("hY0g"),i("Kxc7"))},mpWx:function(e,t,i){"use strict";function n(e,t){var i,n=Promise.reject();for(i=0;i0,this._precision=e}return e.prototype.state=function(){return{precision:this._precision}},e.prototype.format=function(e){if(!Object(o.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){var t,i,n;return"---"===e?{error:"not a number",res:!1,value:NaN}:(t={K:1e3,M:1e6,B:1e9},i=e.slice(-1),t.hasOwnProperty(i)?(n=this._numericFormatter.parse(e.slice(0,-1)),Object(o.isNumber)(n)?{res:!0,value:n*t[i]}:{error:"not a number",res:!1,value:NaN}):(n=this._numericFormatter.parse(e),Object(o.isNumber)(n)?{res:!0,value:n}:{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(r.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){function n(e,t){this._constructor="LineToolTrendAngleLine";var o=t||new s("linetooltrendangle");r.call(this,e,o),this._properties.addProperty("angle"), this._properties.angle=new n.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)}var o=i("aO4+").Point,r=i("Ss5c").LineDataSource,s=i("Ocx9").DefaultProperty,a=i("hayr").propertyPages;inherit(n,r),n.AngleProperty=function(t){e.call(this),this._lineSource=t},inherit(n.AngleProperty,e),n.AngleProperty.prototype.value=function(){var e=this._lineSource._angle,t=180*e/Math.PI;return Math.round(t)},n.AngleProperty.prototype.setValue=function(e){var t,i,n,r,s,a,l=e*Math.PI/180;this._lineSource._angle=l,t=this._lineSource.pointToScreenPoint(this._lineSource.points()[0])[0],i=Math.cos(this._lineSource._angle),n=-Math.sin(this._lineSource._angle),r=new o(i,n),s=t.addScaled(r,this._lineSource._distance),a=this._lineSource.screenPointToPoint(s),this._lineSource._points[1]=a,this._lineSource._model.updateSource(this._lineSource),this._lineSource.updateAllViews(),this._lineSource._model.updateSource(this._lineSource)},n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return"Trend Angle"},n.prototype.name=function(){return"Trend Angle"},n.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)},n.prototype.addPoint=function(e,t){var i=r.prototype.addPoint.call(this,e,t);return i&&this._calculateAngle(),i},n.prototype.setLastPoint=function(e,t){r.prototype.setLastPoint.call(this,e,t),this.points().length>1&&this._calculateAngle()},n.prototype.axisPoints=function(){var e,t,i,n,r,s,a=this.points();return a.length<2?[]:(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,r=t.add(new o(i,n)),s=this.screenPointToPoint(r),e.push(s),e)},n.prototype.setPoint=function(e,t,i){r.prototype.setPoint.call(this,e,t,i),this.points().length>1&&1===e&&this._calculateAngle()},n.prototype.restoreData=function(e){this._angle=e.angle,this._distance=e.distance},n.prototype.state=function(e){var t=r.prototype.state.call(this,e);return t.angle=this._angle,t.distance=this._distance,t},n.prototype.cloneData=function(e){this._angle=e._angle,this._distance=e._distance},n.prototype.canHasAlert=function(){return!0},n.prototype._getAlertPlots=function(){return[this._linePointsToAlertPlot(this._points,null,this.properties().extendLeft.value(),this.properties().extendRight.value())]},n.prototype.getInputsPropertyPage=function(){return a.LineToolTrendAngleInputsPropertyPage},n.prototype.getStylesPropertyPage=function(){return a.LineToolTrendAngleStylesPropertyPage},t.LineToolTrendAngle=n}).call(this,i("tc+8"))},"nd9+":function(e,t,i){"use strict";var n,o,r,s,a,l,c,u,h;i.r(t), i.d(t,"LineToolGannComplex",function(){return h}),n=i("mrSG"),o=i("aO4+"),r=i("Eyy1"),s=i("T6Of"),a=i("Ss5c"),l=i("FaJS"),c=i("hayr"),u=i("LAp3"),(h=function(e){function t(t,n){var o,r=e.call(this,t,null==n?Object(u.a)("linetoolganncomplex"):n)||this;return r.version=2,r._constructor="LineToolGannComplex",r._scaleRatioFormatter=new s.LimitedPrecisionNumericFormatter(7),i.e("lt-pane-views").then(function(e){var t=i("X4Cb").GannComplexPaneView;r._setPaneViews([new t(r,r.model())])}.bind(null,i)).catch(i.oe),o=r.properties(),r._adjustScaleRatio(o),o.subscribe(r,r._adjustScaleRatio),o.scaleRatio.subscribe(r,r._correctFirstPoint),r._syncStateExclusions=["scaleRatio"],o.addExclusion("scaleRatio"),r.properties().onRestoreFactoryDefaults().subscribe(r,r._handleRestoringFactoryDefaults),r._onTemplateApplying.subscribe(r,r._handleTemplateApplying),r._onTemplateApplied.subscribe(r,r._correctFirstPoint),r}return n.__extends(t,e),t.prototype.migrateVersion=function(e,t,i){var n=this;1===e&&(this._points.length>=this.pointsCount()?setTimeout(function(){return n._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.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.title=function(){return"Gann Square"},t.prototype.name=function(){return"Gann Square"},t.prototype.addPoint=function(t,i,n){var o,s;return this._points.length>1&&this._points.pop(),o=e.prototype.addPoint.call(this,t,i,n),s=this.priceScale(),!Object(r.ensureNotNull)(s).isLog()&&o&&this._correctFirstPoint(),o},t.prototype.setPoint=function(t,i,n){e.prototype.setPoint.call(this,t,i,n),void 0!==n&&n.shift()?this._correctPoint(t):this._correctScaleRatio()},t.prototype.setLastPoint=function(t,i){var n=this.priceScale(),o=Object(r.ensureNotNull)(n).isLog();o||(this._points[1]=t,this._correctPoint(1)),e.prototype.setLastPoint.call(this,t,i)},t.prototype.createPropertiesObject=function(e,t,i){return Object(u.a)(e,t,i)},t.prototype.getStylesPropertyPage=function(){return c.propertyPages.LineToolGannComplexStylesPropertyPage},t.prototype.isReversed=function(){return this.properties().reverse.value()},t.prototype.levelsCount=function(){return this.properties().levels.childCount()},t.prototype.levels=function(){var e,t,i=[],n=this.properties(),o=n.levels.childCount();for(e=0;e0,s=n.index-o.index>0,a=r&&!s||!r&&s?-1:1,0===e&&(a=-a),n.price=o.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().scaleRatio.setValue(this._getAdjustedScaleRatio())},t.prototype._handleTemplateApplying=function(e){""===e.scaleRatio&&(e.scaleRatio=this._getAdjustedScaleRatio())},t.prototype._migratePoint=function(){var e,t;this.points().length0?(s=s.normalized(),e=Math.acos(s.x),s.y>0&&(e=-e),e):null},t}(a.LineDataSource)).prototype.superclass=a.LineDataSource},nda6:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"TimeSpanFormatter",function(){return n}),i("YFKU"),n=function(){function e(){}return e.prototype.format=function(e){var t,i,n,o,r=e<0;return e=Math.abs(e),e-=86400*(t=Math.floor(e/86400)),e-=3600*(i=Math.floor(e/3600)),e-=60*(n=Math.floor(e/60)),o="",t&&(o+=t+window.t("d",{context:"dates"})+" "),i&&(o+=i+window.t("h",{context:"dates"})+" "),n&&(o+=n+window.t("m",{context:"dates"})+" "),e&&(o+=e+window.t("s",{context:"dates"})+" "),r&&(o="-"+o),o.trim()},e}()},oNDq:function(e,t,i){"use strict";function n(e){return new Promise(function(t){Promise.all([i.e(1),i.e("dialogs-core"),i.e(2),i.e(0),i.e("create-dialog")]).then(function(n){var r=i("YDhE").createDialog;t(r(o.__assign({},a,e)))}.bind(null,i)).catch(i.oe)})}var o,r,s,a;i.r(t),i.d(t,"createConfirmDialog",function(){return n}),o=i("mrSG"),i("YFKU"),r={key:13,name:"yes",text:window.t("Yes"),type:"success"},s={method:"close",name:"no",text:window.t("No"),type:"default"},a={actions:[r,s],actionsWrapTemplate:'
',content:window.t("Are you sure?"),contentWrapTemplate:'

',destroyOnClose:!0,title:window.t("Confirmation"),width:400,dataset:{"dialog-type":"confirm-dialog"}}},oNU6:function(e,t,i){"use strict";var n,o,r,s,a,l,c;i.r(t),i.d(t,"MarketStatusIndicator",function(){return c}),n=i("mrSG"),i("YFKU"),o=i("0wn8"),r=i("r8Gw"),s={invalid:"tv-market-status--invalid",market:"tv-market-status--market",out_of_session:"tv-market-status--out-of-session",post_market:"tv-market-status--post-market",pre_market:"tv-market-status--pre-market",loading:"tv-market-status--loading",holiday:"tv-market-status--holiday",replay:"tv-market-status--replay"},a={invalid:window.t("Invalid Symbol"),market:window.t("Market Open"),out_of_session:window.t("Market Closed"),post_market:window.t("Post Market"),pre_market:window.t("Pre Market"),loading:window.t("Loading"),holiday:window.t("Holiday"),replay:""},l={classMap:s,classSuffix:"",data:{},extraTitle:"",labelMap:a,short:!1,showTooltip:!0,tooltipType:"custom"},c=function(e){function t(t){var i=e.call(this,t)||this;return i._quoteSessionPrefix="market-status-indicator",i._componentClass="tv-market-status",i._extraTitle="",i._init(t),i}return n.__extends(t,e),t.prototype.setStatus=function(e,t){var i={values:{current_session:e}};this.update(i,t)},t.prototype.getTooltipText=function(){var t=e.prototype.getTooltipText.call(this) ;return""===t?t:(""!==this._extraTitle&&(t=t+", "+this._extraTitle),t)},t.prototype.setExtraTitle=function(e){this._extraTitle=e},t.prototype.reset=function(){this._clearClasses(),this._labelEl.textContent="",this._extraTitle="",this._el.setAttribute("title",""),this._value=""},t.prototype.enableShortMode=function(t){void 0===t&&(t=!0),void 0!==this._labelEl&&this._labelEl.classList.add("i-hidden"),e.prototype.enableShortMode.call(this)},t.prototype.disableShortMode=function(){void 0!==this._labelEl&&this._labelEl.classList.remove("i-hidden"),e.prototype.disableShortMode.call(this)},t.prototype._renderLabel=function(){this._labelEl.textContent=this.getLabel()},t.prototype._getValueFromData=function(e){return void 0!==e.values&&void 0!==e.values.current_session?e.values.current_session:this.getValue()},t.prototype._render=function(){this._renderLabelElement(),this._renderDotElement(),e.prototype._render.call(this)},t.prototype._init=function(t){var i=Object.assign({},l,t);e.prototype._init.call(this,i),this.setExtraTitle(i.extraTitle),this._render()},t.prototype._renderLabelElement=function(){void 0===this._labelEl&&(this._labelEl=document.createElement("span"),this._labelEl.classList.add(this._componentClass+"__label"),this._labelEl.classList.add(this._componentClass+"__label"+this._classSuffix),this._el.appendChild(this._labelEl))},t.prototype._renderDotElement=function(){void 0===this._dotEl&&(this._dotEl=document.createElement("span"),this._dotEl.classList.add(this._componentClass+"__dot"),this._dotEl.classList.add(this._componentClass+"__dot"+this._classSuffix),this._el.appendChild(this._dotEl))},t}(r.a)},oUqy:function(e,t,i){"use strict";function n(e){this.items=e.items,this.barSpacing=e.barSpacing,this.histogramBase=e.histogramBase,this.lineColor=e.lineColor,this.lineWidth=e.lineWidth}var o=i("VdBB").HitTestResult,r=5;n.prototype.draw=function(e){var t,i,n,o,s,a,l,c,u,h,d,p,_,f,m,y;if(0!==this.items.length){for(t=this.barSpacing,i=this.lineColor,n=this.histogramBase,e.translate(.5,.5),o={},s=this.items,a=null,l=0;lr?1:0,a.right=p-f),m={item:c,prev:u,left:p,right:_},d.push(m),a=m,o[h]=d;for(h in o){for(d=o[h],e.fillStyle=h,e.strokeStyle=h,e.lineWidth=1,e.beginPath(),l=0;l=s&&i<=a&&(n=l[t].y,e.y>=Math.min(n,this.histogramBase)&&e.y<=Math.max(n,this.histogramBase)))return new o(o.REGULAR);return null},t.PaneRendererColumns=TradingView.PaneRendererColumns=n},oWyD:function(e,t,i){},oXaB:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"PriceAxisLastValueMode",function(){return n}),function(e){e[e.LastPriceAndPercentageValue=0]="LastPriceAndPercentageValue",e[e.LastValueAccordingToScale=1]="LastValueAccordingToScale"}(n||(n={}))},ocLq:function(e,t,i){"use strict" ;(function(t){var n=i("5B3K").StudyError,o=i("Y7w9"),r=i("ogJP").inherit,s=1e-10,a=function(){function e(e,t,i,n,o){var r,s=o,a=0;if(isNaN(e.get(t-1)))return{index:NaN,value:NaN};for(r=0;r1&&(this._currentIndex.set(r),this._currentValue.set(s),this._pivotIndex.set(a))}function l(e,t,i){var n,o,r,s,l;this._deviation=e,n=i.new_var(w.high(i)),o=i.new_var(w.low(i)),n.get(2*t+1),o.get(2*t+1),this._pivotHigh=new a(t,t,a.HIGH,n,i),this._pivotLow=new a(t,t,a.LOW,o,i),this._lastVal=i.new_var(NaN),this._lastIndex=i.new_var(-1),this._lastType=i.new_var(),this._index=w.n(i),this._isNewBar=i.symbol.isNewBar,this._isBarClosed=i.symbol.isBarClosed,r=this._lastIndex.get(1),s=this._lastVal.get(1),l=this._lastType.get(1),this._index>1&&this.addPivot(r,s,l),this.processPivot(this._pivotHigh),this.processPivot(this._pivotLow)}function c(e){this.symbol=e,this.vars=[],this.vars_index=0,this.ctx=[],this.ctx_index=0}function u(e){this.mindepth=0,this.original=NaN,this.modified=!1,this.symbol=e}function h(e){u.call(this,e),this.hist=new Float64Array(2e3),this.hist_pos=-1}function d(e,t,i,n,o,r){this.periodBase=i,this.tickerid=e,this.period=t,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 b.Session,this.other_sessions={},this.script=n,this.ticker=d.parseTicker(e);var s=d.parsePeriod(t);this.resolution=s.resolution,this.interval=s.interval,this.bb_cache={},this.minTick=o,this.periodForInitialRange=r}function p(e,t,i,n,o,r,s,a,l,u){this.body=r,this.symbols=[],this.runner=o,this.inputCallback=a,this.out=s,this.nonseriesOut=u,this.ctx=new c(this.add_sym(e,t,i,l,n)),this.init()}function _(e){this.symbols=[],this.barsets=[],this.subscription=[],this.host=e,this.isRecalculated=!1,this.start()}function f(e){this.runner=new _(e)}function m(e,t){this.info=e,this.bars=t||[],this.isBarClosed=!0}function y(e,t){this.period=e,this.generateEmptyBars=!!t}function g(){}var v="undefined"!=typeof window?window:t,S=v.PineJsCalendar?v.PineJsCalendar:i("jCNj"),b=i("ufy5"),w={max_series_default_size:10001,n:function(e){return e.symbol.index+1},nz:function(e,t){return t=t||0,isFinite(e)?e:t},na:function(e){return 0===arguments.length?NaN:isNaN(e)?1:0},isZero:function(e){return Math.abs(e)<=1e-10},toBool:function(e){return isFinite(e)&&!w.isZero(e)},eq:function(e,t){return w.isZero(e-t)},neq:function(e,t){return!w.eq(e,t)},ge:function(e,t){return w.isZero(e-t)||e>t},gt:function(e,t){return!w.isZero(e-t)&&e>t},lt:function(e,t){return!w.isZero(e-t)&&es},less:function(e,t){return t-e>s}};return w.max=Math.max,w.min=Math.min,w.pow=Math.pow,w.abs=Math.abs,w.log=Math.log,w.log10=function(e){return Math.log(e)/Math.LN10},w.sqrt=Math.sqrt,w.sign=function(e){return isNaN(e)?NaN:w.isZero(e)?0:e>0?1:-1},w.exp=Math.exp,w.sin=Math.sin,w.cos=Math.cos,w.tan=Math.tan,w.asin=Math.asin,w.acos=Math.acos,w.atan=Math.atan,w.floor=Math.floor,w.ceil=Math.ceil,w.round=Math.round,w.avg=function(e,t,i,n,o,r){var s,a;if(2===arguments.length)return(e+t)/2;for(s=0,a=0;a=0;--r)(s=t[r])>=i.sessionStart||(i.moveTo(s),a=t[r+1],n.push(a));n.reverse()}return n},w.iff=function(e,t,i){return w.not(e)?i:t},w.rising=function(e,t){for(var i=1;ie.get(0))return 0;return 1 },w.falling=function(e,t){for(var i=1;i=0;n--)o+=(t-n)*e.get(n);return 2*o/(t*(t+1))},w.vwma=function(e,t,i){var n=i.new_var(w.volume(i)),o=i.new_var(e.get(0)*w.volume(i));return w.sma(o,t,i)/w.sma(n,t,i)},w.swma=function(e,t){return(e.get(0)+2*e.get(1)+2*e.get(2)+e.get(3))/6},w.lowestbars=function(t,i,n){return-e(t,i,0,function(e,t){return w.lt(e,t)},Number.MAX_VALUE).index},w.lowest=function(t,i,n){return e(t,i,0,function(e,t){return w.lt(e,t)},Number.MAX_VALUE).value},w.highestbars=function(t,i,n){return-e(t,i,0,function(e,t){return w.gt(e,t)},Number.MIN_VALUE).index},w.highest=function(t,i,n){return e(t,i,0,function(e,t){return w.gt(e,t)},Number.MIN_VALUE).value},w.cum=function(e,t){var i=t.new_var(),n=w.nz(i.get(1))+e;return i.set(n),n},w.accdist=function(e){var t=w.high(e),i=w.low(e),n=w.close(e),o=w.volume(e);return w.cum(n===t&&n===i||t===i?0:o*(2*n-i-t)/(t-i),e)},w.correlation=function(e,t,i,n){var o=w.sma(e,i,n),r=w.sma(t,i,n),s=n.new_var(e.get()*t.get()),a=w.sma(s,i,n)-o*r;return a/Math.sqrt(w.variance2(e,o,i)*w.variance2(t,r,i))},w.stoch=function(e,t,i,n,o){var r=w.highest(t,n),s=w.lowest(i,n);return w.fixnan(100*(e.get()-s)/(r-s),o)},w.tsi=function(e,t,i,n){var o=n.new_var(w.change(e)),r=n.new_var(w.abs(w.change(e))),s=n.new_var(w.ema(o,i,n)),a=n.new_var(w.ema(r,i,n)),l=w.ema(s,t,n),c=w.ema(a,t,n);return l/c},w.cross=function(e,t,i){if(isNaN(e)||isNaN(t))return!1;var n,o=i.new_var((n=e-t)<0?-1:0===n?0:1);return!isNaN(o.get(1))&&o.get(1)!==o.get()},w.linreg=function(e,t,i){var n,o,r,s,a=0,l=0,c=0,u=0;for(n=0;nthis._currentValue.get():ithis._areaRight},a.prototype.update=function(){var e,t;if(this._isNewBar&&this.isPivotFound()&&this.reset(),this.processPoint(this._index),this.isRightSideOk(this._index)){if(-1===this._pivotIndex.get()){for(e=!0,t=0;tthis._deviation&&this.addPivot(e,t,i):(i===a.HIGH?t>n:t0&&t.set(e),t},c.prototype.new_unlimited_var=function(e){var t,i=this.vars;return i.length<=this.vars_index&&i.push(new h(this.symbol)),t=i[this.vars_index++],arguments.length>0&&t.set(e),t},c.prototype.new_ctx=function(){return this.ctx.length<=this.ctx_index&&this.ctx.push(new c(this.symbol)),this.ctx[this.ctx_index++]},c.prototype.prepare=function(e){var t,i;for(this.ctx_index=0,this.vars_index=0,t=0;ti&&(i=t);return i},c.prototype.stop=function(){this.symbol=null,this.vars=null},u.prototype.valueOf=function(){return this.get(0)},u.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=w.max(this.mindepth,e),NaN)},u.prototype._get=function(e){var t=this.hist_pos-e;return t<0&&(t+=this.hist.length),this.hist[t]},u.prototype.set=function(e){this.hist&&(this.hist[this.hist_pos]=e,this.modified=!0)},u.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)},u.prototype.add_hist=function(){var e,t,i;if(!this.hist){for(e=w.na(this.mindepth)?w.max_series_default_size:w.max(this.mindepth+1,1),e=Math.round(e),t=new Array(e),i=0;i=0&&(n=t.split(","),i=d.parsePeriod(n[1]),t=n[0]),o=!1,r=!1,s=t[t.length-1],-1==="DWM".indexOf(s)&&("S"===s?r=!0:(o=!0,s="")),{resolution:s,interval:a=parseInt(o?t:t.length>1?t.slice(0,t.length-1):1),pureResolution:[a,s].join(""),isIntraday:o,isSeconds:r,range:i}},d.newBarBuilder=function(e,t,i){var n=d.parsePeriod(e);return b.newBarBuilder(n.interval+n.resolution,t,i)},d.newSession=function(e,t){var i=S.get_timezone(e);return(new b.Session).init(i,t)},d.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=S.get_timezone(e.timezone),this.session.init(this.timezone,e.session),this.other_sessions)this.other_sessions.hasOwnProperty(t)&&this.other_sessions[t].init(this.timezone,t)},d.prototype.get_session=function(e){if(!e)return this.session;var t=this.other_sessions[e];return t||(t=new b.Session,this.other_sessions[e]=t),t},d.prototype.isdwm=function(){return""!==this.resolution&&"S"!==this.resolution},d.prototype.enable_dwm_aligning=function(e,t){this.dwm_aligner=d.newBarBuilder(this.period,e,t)},d.prototype.bartime=function(e,t){var i,n,o,r,s=this.time;return e&&(i=e,t&&(i+=t),(n=this.bb_cache[i])||(o=this.get_session(t),n=d.newBarBuilder(e,o),this.bb_cache[i]=n),s=n.alignTime(s)),!this.isdwm()||isNaN(s)?s:(r=S.utc_to_cal(this.timezone,s),this.session.spec.correctTradingDay(r),S.cal_to_utc(this.timezone,r))},d.prototype.lastbar=function(e){var t,i;isNaN(e.time)||(t=e.time,this.dwm_aligner&&(this.dwm_aligner.moveTo(t),t=this.dwm_aligner.startOfBar(0)),(i=this.time!==t)&&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))},p.prototype.calc=function(e){var t,i,n=this.ctx,o=this.body;n.prepare(e),t=o.main(n,this.inputCallback),i=this,this.out&&t&&(!isNaN(n.symbol.time)||t.nonseries)&&(t.nonseries?("projection"===t.type&&(t.projectionTime=n.symbol.time),this.nonseriesOut(n.symbol,t)):t.bars?t.bars.forEach(function(e){i.out(n.symbol,e)}):this.out(n.symbol,t))},p.prototype.init=function(){var e=this.ctx,t=this.body;t.init&&t.init(e,this.inputCallback), t.main(e,this.inputCallback)},p.prototype.add_sym=function(e,t,i,n,o){var r=this.runner.add_sym(e,t,i,this,n,o);return this.symbols.push(r),r.isdwm()&&this.symbols.length>1&&r.enable_dwm_aligning(this.symbols[0].session,r.session),r},p.prototype.maxAdditionalDepth=function(){return this.ctx.maxAdditionalDepth()},p.prototype.stop=function(){this.symbols=null,this.ctx.stop(),this.ctx=null},p.prototype.get_sym=function(e){return this.symbols[e]},_.prototype.add_sym=function(e,t,i,n,o,r){var s=new d(e,t,i,n,o,r);return this.symbols.push(s),s},_.prototype.get_sym=function(e){return this.symbols[e]},_.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)},_.prototype.start=function(){function e(e,n){var r=_.feed.subscribe(e.tickerid,e.period,e.periodBase,e.periodForInitialRange,function(i){"series"===(i.nonseries?"nonseries":"series")?t.update(n,i):i.lastBar?(t.nonseriesUpdate=i,i.lastBar.isLastBar=!0,t.symbols[0].lastbar(i.lastBar),t.nonseriesUpdate=null):s.nonseriesOut(e,i)},s.onErrorCallback,s.symbolInfo,s.sessionId,s.rangeExtension,o);i.push(r)}var t,i,n,o,r,s=this.host;for(this._script=new p(s.tickerid,s.period,s.periodBase||s.period,s.periodForInitialRange,this,s.body,this.out.bind(this),s.input,s.symbolInfo.minmov/s.symbolInfo.pricescale,s.nonseriesOut),t=this,i=[],n=this.symbols,o=(s.additionalBarsCount||0)+t._script.maxAdditionalDepth(),r=0;r=0;t--)for(i=a[t],o=(n=this.barsets[t]).count(),r=0;r=0;e--)t=this._chartModel.restoreSource(this._restorePanes[e],this._paneIndexes[e],this._paneStates[e],this._sourceStates[e],this._priceScalePositionIds[e]),n.push(t);n.some(function(e,t){return e.id()!==i._sourceIds[n.length-t-1]})&&u.logError("Source was restored improperly - source ids does not match")},t}(r.UndoCommand)},odCa:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolCallout";var n=t||new a("linetoolcallout");n.hasChild("text")||n.addChild("text",new s(window.t("Text"))),n.addExclusion("text"),o.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)}var o=i("Ss5c").LineDataSource,r=i("fgLi").DataSource,s=i("tc+8"),a=i("Ocx9").DefaultProperty,l=i("hayr").propertyPages,c=i("jTis").CalloutConsts;inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return"Callout"},n.prototype.name=function(){return"Callout"},n.prototype.correctPoints=function(e){var t=this._currentMovingPoint.index-this._startMovingPoint.index,i=this._currentMovingPoint.price-this._startMovingPoint.price,n=e[1];n.index+=t,n.price+=i,e[1]=n},n.prototype.addPoint=function(e){var t=o.prototype.addPoint.call(this,e);return t&&this._calculateBarOffset(),t},n.prototype._calculateBarOffset=function(){this.points().length>1&&(this._barOffset=this.points()[1].index-this.points()[0].index)},n.prototype.setLastPoint=function(e){o.prototype.setLastPoint.call(this,e),2===this.points().length&&this._calculateBarOffset()},n.prototype.setPoint=function(e,t){var i,n,r,s,a;switch(e){case 0:o.prototype.setPoint.call(this,e,t),this._calculateBarOffset();break;case 1:if(!(i=this.properties()).wordWrapWidth)return;if(n=this._points,r=this._dragStartLeftEdgeIndex,s=Math.round((t.index-r)/2),isFinite(r)&&isFinite(s)){if(n[1]={index:r+s,price:n[1].price},this._calculateBarOffset(),this.normalizePoints(),a=this._timeScale.indexToCoordinate(r+2*s)-this._timeScale.indexToCoordinate(r)-c.RoundRadius-c.TextMargins,!isFinite(a))return;i.wordWrapWidth.setValue(Math.max(c.MinWidth,a));break}n[1]=t,this._calculateBarOffset(),this.normalizePoints()}},n.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)},n.prototype.move=function(e,t,i){o.prototype.move.call(this,e,t,i),this._calculateBarOffset()},n.prototype.state=function(e){var t=o.prototype.state.call(this,e);return t.barOffset=this._barOffset,t},n.prototype.restoreData=function(e){e.barOffset?this._barOffset=e.barOffset:this._calculateBarOffset(),this._calculatePoint2()},n.prototype.setPriceScale=function(e){r.prototype.setPriceScale.call(this,e),e&&e.priceRange()&&this._calculatePoint2()},n.prototype._calculatePoint2=function(){var e,t ;this._model.lineBeingEdited()===this||this._model.sourcesBeingMoved().includes(this)||this._points.length<2||(e=this.points()[0],t=this.points()[1],this._points[1]={price:t.price,index:e.index+this._barOffset})},n.prototype.getStylesPropertyPage=function(){return l.LineToolCalloutStylesPropertyPage},t.LineToolCallout=n},ohga:function(e,t,i){},okVO:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"SyncModel",function(){return r}),n=i("ufy5"),o=0,r=function(){function e(e,t){this._session=new n.Session,this._extrapolatedData=[],this._modelId=o++,this._builderCache=null,this._resolution=t,this._symbolInfo=e,this._valid=Boolean(e.timezone)&&Boolean(e.session),this._session.init(e.timezone,e.session)}return e.prototype.getSymbolInfo=function(){return this._symbolInfo},e.prototype.getSession=function(){return this._session},e.prototype.getResolution=function(){return this._resolution},e.prototype.uniqueId=function(){return this._modelId},e.prototype.distance=function(e,t){var i,o,r,s,a;return this.isValid()?(r=null!==(o=0!==(i=this._extrapolatedData.length)?this._extrapolatedData[0]:null)?this._extrapolatedData[i-1]:null,1e3*e!==o&&(this._extrapolatedData=[1e3*e],o=null,r=null),(null===o||null!==r&&1e3*t>r)&&(s=Object(n.extrapolateBarsFrontToTime)(this._barBuilder(),r||1e3*e,1e3*t,2e3),this._extrapolatedData=this._extrapolatedData.concat(s),i=this._extrapolatedData.length),(r=this._extrapolatedData[i-1])<1e3*t?{success:!1}:-1===(a=this._extrapolatedData.indexOf(1e3*t))?{success:!1}:{success:!0,result:a}):{success:!1}},e.prototype.projectTime=function(e,t){var i,o,r,s;return this.isValid()?(r=null!==(o=(i=this._extrapolatedData.length)>0?this._extrapolatedData[0]:null)?this._extrapolatedData[i-1]:null,1e3*e!==o&&(this._extrapolatedData=[1e3*e],o=null,r=null),(null===o||t>=i)&&(s=Object(n.extrapolateBarsFrontByCount)(this._barBuilder(),r||1e3*e,t-i+1),this._extrapolatedData=this._extrapolatedData.concat(s),i=this._extrapolatedData.length),i=0&&this._index=0&&this._dstIndex0&&CanvasEx.drawLine(e,r[0].x,r[0].y,r[1].x,r[1].y),this._data.overlayLineEndings&&this.drawEnds(e,o))},n.prototype.drawEnds=function(e,t){var i=t[0],n=t[1];switch(this._data.leftend){case r.Arrow:this.drawArrow(n,i,e,e.lineWidth);break;case r.Circle:this.drawCircle(i,e,e.lineWidth,this._data.endstyle)}switch(this._data.rightend){case r.Arrow:this.drawArrow(i,n,e,e.lineWidth);break;case r.Circle:this.drawCircle(n,e,e.lineWidth,this._data.endstyle)}},n.prototype.hitTest=function(e){var t,i,n,o,r;return null===this._data||this._data.points&&this._data.points.length<2?null:this._data.floatPoints&&this._data.floatPoints.length<2?null:(t=TradingView.isMobile.any()?24:3,n=(i=this._data.floatPoints||this._data.points)[0],o=i[1],null!==(r=this.extendAndClipLineSegment(n,o))&&s(r[0],r[1],e).distance<=t?this._hittest:null)},t.TrendLineRenderer=n},pKDv:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolABCD";var n=t||new r("linetoolabcd");o.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)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages;inherit(n,o),n.prototype.pointsCount=function(){return 4},n.prototype.title=function(){return"ABCD Pattern"},n.prototype.name=function(){return"ABCD Pattern"},n.prototype.getStylesPropertyPage=function(){return s.LineToolABCDPatternStylesPropertyPage},t.LineToolABCD=n},pPtI:function(e,t,i){"use strict";function n(e){return C.Interval.parse(e).value()}function o(e){var t,i;return!!C.Interval.isRange(e)||(e=n(e),i=!1,i=void 0===(t=L.linking.supportedResolutions.value())||-1!==t.map(n).indexOf(e),L.linking.intraday.value()?i:C.Interval.isDWM(e)&&i)}function r(e){C.Interval.isValid(e)&&(C.Interval.isRange(e)?I.setValue("chart.lastUsedRangeResolution",e):I.setValue("chart.lastUsedTimeBasedResolution",e))}function s(e){var t,i=I.getValue("chart.lastUsedRangeResolution");return void 0!==i&&C.Interval.isRange(i)?i:(t=e.filter(function(e){return C.Interval.isRange(e)})).includes("100R")?"100R":t.length>0?t[0]:"100R"}function a(e){var t,i=I.getValue("chart.lastUsedTimeBasedResolution");return void 0!==i&&C.Interval.isTimeBased(i)?i:(t=e.filter(function(e){return C.Interval.isTimeBased(e)})).includes("1D")?"1D":t.length>0?t[0]:"1D"}function l(e){return e?"100R":"1D"}function c(e,t,i){var n=T.isRangeStyle(e),o=C.Interval.isRange(t);return!n&&o?a(i):n&&!o?s(i):t}function u(e){return C.Interval.isRange(e)?"1":e}function h(e){var t=C.Interval.parse(e),i=d(t.kind()),n=t.multiplier();return void 0!==n&&n<=i}function d(e){var t=D[e];return Number.isNaN(t)?1:t}function p(e){return d(C.Interval.kind(e))}function _(e){var t=f(I.getJSON(e,[]));return k()(t.filter(h).map(n))} function f(e){return Array.isArray(e)?e:Object.keys(e)}function m(){var e,t,i,o=[];for(e=0;e0},s.prototype.onTagsChanged=function(){return this._tagsChanged},s.prototype.onSymbolIntervalChanged=function(){return this._symbolIntervalChanged},s.prototype.onIntervalChanged=function(){return this._intervalChanged}, s.prototype.onStatusChanged=function(){return this._onStatusChanged},s.prototype.onStyleChanged=function(){return this._onStyleChanged},s.prototype.onRestarted=function(){return this._onRestarted},s.prototype.onBoxSizeChanged=function(){return this._boxSizeChanged},s.prototype.status=function(){return this._status},s.prototype.isDWM=function(){var e,t;return null!==this._isDWMCached?this._isDWMCached:((e=new X(this._properties.interval.value())).isDWM()?this._isDWMCached=!0:(t=e.isSeconds()?e.multiplier():60*e.multiplier(),this._isDWMCached=!(t<216e3)),this._isDWMCached)},s.prototype.lastPriceLabelFixedCoordinate=function(){return this._priceAxisViews[0]._fixedCoordinate},s.prototype.createPaneView=function(){this._paneView=null,this._projectionBarsPaneView=null,this._waterlineView=null,this._priceLineView=e===s.STYLE_HILO?null:new ne(this);var e=this._properties.style.value();switch(e){case s.STYLE_BARS:this._paneView=new v(this,this.m_model);break;case s.STYLE_CANDLES:this._paneView=new g(this,this.m_model);break;case s.STYLE_LINE:this._paneView=new m(this,this.m_model);break;case s.STYLE_AREA:this._paneView=new f(this,this.m_model);break;case s.STYLE_HEIKEN_ASHI:this._paneView=new S(this,this.m_model);break;case s.STYLE_HOLLOW_CANDLES:this._paneView=new y(this,this.m_model);break;case s.STYLE_BASELINE:this._paneView=new b(this,this.m_model),this._waterlineView=new P(this);break;case s.STYLE_HILO:this._paneView=new w(this,this.m_model);break;default:throw Error("Unknown chart style assigned: "+e)}},s.prototype._clearStylePlot=function(e,t){var i,n;0!==e.size()&&(i=t||a(e.firstIndex()),n=a(e.lastIndex())+1,e.range(i,n).each(function(e,t){t[TradingView.STYLE_PLOT]=null}))},s.prototype.invalidateBarStylesCache=function(e){U.logDebug("Invalidate style cache starting from "+e),this._clearStylePlot(this.m_data.m_bars,e),this._clearStylePlot(this.m_data.m_nsBars)},s.prototype.invalidateBarColorerCache=function(){delete this._barColorerCache,this.invalidateBarStylesCache()},s.prototype.barColorer=function(){var e,t,i,n;if(this._barColorerCache)return this._barColorerCache;for(e=null,t=this.m_model.dataSources().length-1;t>=0;t--)(i=this.m_model.dataSources()[t]).metaInfo&&TradingView.isInherited(i.constructor,TradingView.Study)&&i.hasBarColorer()&&i.properties().visible.value()&&(n=i.barColorer(),null===e?e=n:e.pushBackBarColorer(n));return null===e?e=new I(this):e.pushBackBarColorer(new I(this)),this._barColorerCache=e,this._barColorerCache},s.prototype.properties=function(){return this._properties},s.prototype._barsState=function(e){var t=e.state();return t.data.forEach(function(e){e.value.splice(7,1)}),t},s.prototype.state=function(e,t){var i=this===this.m_model.mainSeries()?"MainSeries":TradingView.className(this.constructor),n={type:i,id:this.id(),state:this.properties().state(t),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&&(n.state.symbol=this._symbolInfo.ticker),e&&(n.bars=this._barsState(this.m_data.m_bars),n.nsBars=this._barsState(this.m_data.m_nsBars),n.symbolInfo=this._symbolInfo,n.rtPrice=this.data().lastProjectionPrice),n.boxSize=this.data().boxSize,n.reversalAmount=this.data().reversalAmount,n},s.prototype.restoreState=function(e,t){t&&this._setStatus(s.STATUS_SNAPSHOT),this._properties.mergeAndFire(e.state),this._prevChartStyle=this.properties().style.value(),this.createPaneView(),t&&this.restoreData(e.bars,e.nsBars,e.symbolInfo,e.rtPrice,e.boxSize,e.reversalAmount)},s.prototype.restoreData=function(e,t,i,n,o,r){this._status=s.STATUS_SNAPSHOT,this.m_data.m_bars.restoreState(e),this.m_data.m_nsBars.restoreState(t),this.updateSymbolInfo(i),this.m_data.lastProjectionPrice=n,this.m_data.boxSize=o,o||(this.properties().style.value()===s.STYLE_PNF?this.m_data.boxSize=this.properties().pnfStyle.inputs.boxSize.value():this.properties().style.value()===s.STYLE_RENKO&&(this.m_data.boxSize=this.properties().renkoStyle.inputs.boxSize.value())),this.m_data.reversalAmount=r,r||this.properties().style.value()===s.STYLE_KAGI&&(this.m_data.reversalAmount=this.properties().kagiStyle.inputs.reversalAmount.value())},s.prototype.setProperties=function(e){e.timeframe||e.merge({timeframe:""}),e.shortName||e.merge({shortName:""}),this._properties=e,this._properties.symbol.listeners().subscribe(this,s.prototype.changeSymbol),this._properties.interval.listeners().subscribe(this,s.prototype.changeInterval),this._properties.timeframe.listeners().subscribe(this,s.prototype.changeTimeFrame),this._properties.listeners().subscribe(this,s.prototype.changeProperties)},s.prototype.changeSymbol=function(){this.setSymbolIntervalDelayed(),this.m_model.checkLineToolSelection()},s.prototype.changeInterval=function(){this.setSymbolIntervalDelayed()},s.prototype.changeTimeFrame=function(){W("GUI","Change timeframe")},s.prototype.title=function(){return this.properties().symbol.value()+", "+H(this.properties().interval.value())},s.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),le.emit("series_properties_changed",this._id))},s.prototype._makeNextSymbolId=function(){return"symbol_"+this._nextSymbolId++},s.prototype._makeNextSeriesId=function(){return"s"+this._nextSeriesId++},s.prototype.onData=function(e){var t,i,n,o,r,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w=this;switch(e.method){case"symbol_resolved":if(e.params[0]!==this._symbolId){U.logNormal("command for old symbol. Expected:"+this._symbolId+", actual"+e.params[0]);break}this.updateSymbolInfo(e.params[1]),this.m_model.updateSource(this),this._dataEvents.fireSymbolResolved(this._symbolInfo),this.m_model.realignLineTools(),TradingView.onWidget()||W("Symbol",e.params[1].listed_exchange,e.params[1].name),t=this.symbolInfo().minmov/this.symbolInfo().pricescale, (i=this.properties()).style.value()===s.STYLE_RENKO&&i.renkoStyle.inputs.boxSize.value()=3&&(this._priceOffset=e[2].price-e[0].price)},n.prototype.setPoint=function(e,t,i){i&&i.shift()&&e<2&&this._snapPoint45Degree(t,this.points()[1-e]),o.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},n.prototype.pointsCount=function(){return 3},n.prototype.title=function(){return"Parallel Channel"},n.prototype.name=function(){return"Parallel Channel"},n.prototype.addPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[0]),o.prototype.addPoint.call(this,e,t)}, n.prototype.fixAfterRestorePriceAxis=function(){this.priceScale().isLog()||delete this._priceOffset},n.prototype.cloneData=function(e){this._priceOffset=e._priceOffset},n.prototype.restoreData=function(e){e.priceOffset&&(this._priceOffset=e.priceOffset)},n.prototype.state=function(e){var t=o.prototype.state.call(this,e);return t.priceOffset=this._priceOffset,t},n.prototype.canHasAlert=function(){return!0},n.prototype._getAlertPlots=function(){function e(e,t){return e.index<=t.index?[e,t]:[t,e]}var t,i,n,o,r,s,a,l,c=[].concat(this._points).splice(0,2);return t=e((c=c.concat([{price:c[0].price+this._priceOffset,time:c[0].time,index:c[0].index},{price:c[1].price+this._priceOffset,time:c[1].time,index:c[1].index}]))[0],c[1]),i=e(c[2],c[3]),this._priceOffset<0?(o=i,n=t):(o=t,n=i),a=this.properties().extendLeft.value(),l=this.properties().extendRight.value(),c[0].index<=c[1].index?(r=a,s=l):(r=l,s=a),[this._linePointsToAlertPlot(n,"Upper",r,s),this._linePointsToAlertPlot(o,"Lower",r,s)]},n.prototype.getInputsPropertyPage=function(){return null},n.prototype.getStylesPropertyPage=function(){return s.LineToolParallelChannelStylesPropertyPage},t.LineToolParallelChannel=n},qckB:function(e,t){e.exports=''},qgcf:function(e,t,i){function n(e,t){this._linesMaxWidth=null,this._hittest=t||new o(o.MOVEPOINT),this._data={},this._fontSize=0,this.setData(e)}var o=i("VdBB").HitTestResult,r=i("ikwP").calcTextHorizontalShift,s=i("f6yo").pointInBox,a=i("jFln").drawRoundRect;n.prototype.setData=function(e){var t,i,n,o=this._data,r=this.fontStyle();this._data=e,this._fontSize=e.fontsize||e.fontSize||30,t=e.text===o.text,i=e.wordWrapWidth===o.wordWrapWidth,n=r===this.fontStyle(),t&&i&&n?(this._data.lines=o.lines,this._lines=o.lines):(this._linesMaxWidth=null,e.lines=this.wordWrap(e.text,e.wordWrapWidth),this._lines=e.lines)},function(){function e(){var e=document.createElement("canvas");e.width=0,e.height=0,t=e.getContext("2d"),e=null}var t;n.prototype.setPoints=function(e,t){this._data.points=e,this._hittest=t||new o(o.MOVEPOINT)},n.prototype._getLinesMaxWidth=function(){var i,n;if(null!==this._linesMaxWidth)return this._linesMaxWidth;if(t||e(),t.textBaseline="alphabetic",t.font=this.fontStyle(),this._data.wordWrapWidth)return this._data.wordWrapWidth;for(i=0,n=0;n0&&t.measureText(u.slice(0,3*--h-1).join("")).width>n;);if(h>0)s.push(u.slice(0,3*h-1).join("")),u.splice(0,3*h);else{if(d=u[0]+(u[1]||""),p=1===p?1:~~(n/t.measureText(d)*d.length),t.measureText(d.substr(0,p)).width<=n)for(;t.measureText(d.substr(0,p+1)).width<=n;)p++;else for(;p>1&&t.measureText(d.substr(0,--p)).width>n;);p<1&&(p=1),s.push(d.substr(0,p)),u[0]=d.substr(p),u[1]=""}if((c=t.measureText(u.join("")).width)<=n){s.push(u.join(""));break}}return s}}(),n.prototype._x=function(){return this._data.points[0].x+this._data.offsetX},n.prototype._y=function(){var e,t=this._fontSize*this._lines.length;switch(this._data.scaleY&&(t*=this._data.scaleY),e=this._data.points[0].y+this._data.offsetY+t,this._data.vertAlign){case"top":break;case"bottom":e-=t;break;case"middle":e-=t/2}return e},n.prototype.fontStyle=function(){return(this._data.bold?"bold ":"")+(this._data.italic?"italic ":"")+this._fontSize+"px "+this._data.font},n.prototype.draw=function(e){var t,i,n,o,s,l,c,u,h,d,p,_,f,m,y,g;if(0!==this._data.points.length){switch(t=this._x(),i=this._y(),n=this._fontSize,this._data.scaleY&&(n*=this._data.scaleY),i-=n*(this._lines.length-1),e.textBaseline="alphabetic",e.font=this.fontStyle(),this._data.horzAlign){case"left":e.textAlign="start";break;case"right":e.textAlign="end";break;case"center":e.textAlign="center"}if(e.translate(t+.5,i+.5),t=0,i=0,n=this._fontSize,this._data.scaleX&&this._data.scaleY&&(o=Math.min(this._data.scaleX,this._data.scaleY),e.scale(o,o)),s=this._getLinesMaxWidth(),l=r(e,s),c=0,this._data.backgroundColor||this._data.borderColor||this._data.highlightBorder&&this._data.wordWrapWidth){switch(u=t,this._data.horzAlign){case"left":break;case"right":u-=s;break;case"center":u-=s/2}h=n*this._lines.length,d=~~(n/6),this._data.backgroundHorzInflate&&(s+=2*this._data.backgroundHorzInflate,u-=this._data.backgroundHorzInflate),this._data.backgroundVertInflate&&(h+=2*this._data.backgroundVertInflate,i+=this._data.backgroundVertInflate),(p={x:Math.floor(u-d),y:Math.floor(i-n),w:Math.ceil(s+2*d),h:Math.ceil(h+2*d)}).w%2!=0&&p.w++,this._data.padding&&(p.h+=this._data.padding,c=this._data.padding),this._data.backgroundVertInflate&&(i+=this._data.backgroundVertInflate),this._data.backgroundRoundRect?(a(e,p.x,p.y,p.w,p.h,this._data.backgroundRoundRect),this._data.backgroundColor&&(e.fillStyle=this._data.backgroundColor,e.fill()),this._data.borderColor&&(_=~~Math.max(n/12,1),e.strokeStyle=this._data.borderColor,e.lineWidth=_,e.stroke())):(this._data.backgroundColor&&(e.fillStyle=this._data.backgroundColor, e.fillRect(p.x,p.y,p.w,p.h)),this._data.borderColor?(_=~~Math.max(n/12,1),e.strokeStyle=this._data.borderColor,e.lineWidth=_,e.strokeRect(p.x-_/2,p.y-_/2,p.w+_,p.h+_)):this._data.highlightBorder&&(e.strokeStyle=this._data.color,e.lineWidth=1,e.beginPath(),y=[3,1],e.dashedLineTo(p.x-.5,m=p.y-.5,f=p.x+p.w+.5,m,y),e.dashedLineTo(f,m,f,m=p.y+p.h+.5,y),e.dashedLineTo(f=p.x-.5,m,p.x+p.w+.5,m,y),e.dashedLineTo(f,p.y-.5,f,m,y),e.stroke()))}for(this._data.backgroundVertInflate&&!this._data.backgroundColor&&(i+=2*this._data.backgroundVertInflate),e.fillStyle=this._data.color,this._data.forceTextAlign&&(e.textAlign=this._data.horzAlign?this._data.horzAlign:"left"),this._data.forceTextAlign||(t+=l),g=0;g=n-r-s&&e.x<=n+i+r+s&&e.y>=o-s&&e.y<=o+this._lines.length*this._fontSize+2*r+s?this._hittest:null)},n.prototype.doesIntersectWithBox=function(e){return 0===this._data.points.length?null:s(this._data.points[0],e)},t.TextRenderer=n},quTg:function(e,t,i){},qySK:function(e,t,i){"use strict";function n(e){var t,i,n,o;if(Object(s.hasProperty)(e,"create"),Object(s.hasProperty)(e,"erase"))for(t=e.erase,Object(r.assert)(Array.isArray(t),"Collection of erase commands should be array"),i=0,n=t;i=0&&t[0].items.splice(i,1)})},o=this;for(t=0,i=e;t0&&Object(a.e)(this)},e.prototype._clearPrimitives=function(){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._hhistsByTimePointIndex.clear()},e}()},r8Gw:function(e,t,i){"use strict";var n,o,r,s,a;i.d(t,"a",function(){return a}),n=i("uOxu"),o=i("0waE"),r=i("IWXC"),i("glKZ"),s=Object(n.getLogger)("GUI.Blocks.AbstractIndicator"),a=function(){function e(e){this._classSuffix="",this._quoteSessionPrefix="abstract-indicator",this._shortMode=!1,this._showTooltip=!0,this._subscribed=!1,this._tooltipType="custom",this._quoteSession=e.quoteSession}return e.prototype.getValue=function(){return this._value},e.prototype.getTooltipText=function(){return this._labelMap[this._value]||""},e.prototype.getLabel=function(){return this._labelMap[this._value]||""},e.prototype.getElement=function(){return this._el},e.prototype.update=function(e,t){this._updateValue(e,t),this._render()},e.prototype.setTooltipEnabled=function(e){void 0===e&&(e=!1),this._showTooltip!==e&&(this._showTooltip=e,this._renderTooltip())},e.prototype.enableShortMode=function(){!0!==this._shortMode&&(this._shortMode=!0,this._render())},e.prototype.disableShortMode=function(){!1!==this._shortMode&&(this._shortMode=!1,this._render())},e.prototype.isShortModeEnabled=function(){return this._shortMode},e.prototype.start=function(){!this._subscribed&&this._symbolName&&(this._quoteSession||(this._quoteSession=Object(r.getQuoteSessionInstance)("simple")),this._quoteSession.subscribe(this._getQuoteSessionId(),this._symbolName,this.update.bind(this)),this._subscribed=!0)},e.prototype.stop=function(){this._subscribed&&this._quoteSession&&this._symbolName&&(this._quoteSession.unsubscribe(this._getQuoteSessionId(),this._symbolName),this._subscribed=!1)},e.prototype._init=function(e){this._el=e.el?e.el:document.createElement("span"),this._el.innerHTML="",this._classMap=e.classMap,this._labelMap=e.labelMap,this._showTooltip=e.showTooltip,this._classSuffix=e.classSuffix,this._symbolName=e.symbol,e.tooltipType&&(this._tooltipType=e.tooltipType),this._quoteSessionGUID=Object(o.guid)(),!0===e.short&&this.enableShortMode(),e.data&&this._updateValue(e.data)},e.prototype._clearClasses=function(){var e=this;Object.values(this._classMap).map(function(t){e._el.classList.remove(""+t),e._el.classList.remove(""+t+e._classSuffix)})},e.prototype._render=function(){this._renderClasses(),this._renderTooltip(),this._renderLabel()},e.prototype._renderLabel=function(){this._el.textContent=this.getLabel()},e.prototype._updateValue=function(e,t){var i=this._getValueFromData(e);(t||i!==this._value)&&(this._value=i)},e.prototype._renderClasses=function(){var e,t,i,n=this._el.classList;for(t in n.add(this._componentClass,this._componentClass+this._classSuffix),e=this._classMap[this._value],this._classMap)(i=this._classMap[t])&&(i===e?n.add(i,i+this._classSuffix):n.remove(i,i+this._classSuffix));!e&&this._value&&s.logWarn("no className for status "+this._value)},e.prototype._renderTooltip=function(){this._el.setAttribute("title",this._showTooltip?this.getTooltipText():""), "custom"===this._tooltipType&&this._el.classList.toggle("apply-common-tooltip",this._showTooltip)},e.prototype._getQuoteSessionId=function(){return this._quoteSessionPrefix+"."+this._quoteSessionGUID},e}(),window.AbstractIndicator=a},rCHB:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"LineToolPitchforkStyle",function(){return n}),function(e){e[e.Original=0]="Original",e[e.Schiff=1]="Schiff",e[e.Inside=2]="Inside",e[e.Schiff2=3]="Schiff2"}(n||(n={}))},rL76:function(e,t,i){e.exports={labelwidth:"19px",labelheight:"19px",bordersize:"2px",bottommargin:"5px",gearheight:"15px",gearwidth:"15px","price-axis-stub":"price-axis-stub-3MoqVLRB-",wrapper:"wrapper-1tN_aWXZ-",label:"label-NpaJWak6-",symbol:"symbol-2JyFiLZ_-",gear:"gear-3B_8TAjc-","fixed-gear":"fixed-gear-IiZPkpoQ-","fixed-symbol":"fixed-symbol-2A_FZK26-"}},rQHv:function(e,t,i){"use strict";(function(t){var n=i("ufy5"),o={},r=function(e,i,r){function s(){var e={};e.symbolname=p,e.status="ok",e.values={},e.values.current_session=h,o[p]=h,TradingView.ChartapiMessagerInstances[_].onQuotesData([_].concat([e]))}function a(){var e;l&&(c?h="out_of_session":(e=n.isTradingNow(new Date,l)?"market":"out_of_session")!==h&&(h=e,s()))}var l,c,u={},h=o[r]||"out_of_session",d=!1,p=r,_=i,f=null;return e(r,function(e){var i,o,r,u;d||(i=e.session,o=e.timezone,r=e.expired,u=t.get_timezone(o),l=(new n.Session).init(u,i),c=r,f=setInterval(a,6e4),a(),s())},function(){}),u.stop=function(){d=!0,f&&clearInterval(f)},u.marketStatus=function(){return h},u};e.exports=r}).call(this,i("jCNj"))},rY0k:function(e,t,i){"use strict";var n=i("IzGk").translatedIntervalString,o=i("RqCd").getTranslatedSymbolDescription,r=i("tc+8"),s=i("Vdly"),a=i("eJTA"),l=a.tryParseRgba,c=a.rgbaToString,u="symbolWatermark",h={visibility:!1,color:"rgba(80, 83, 94, 0.25)"};t.Watermark=function(e){function t(){var e,t,i=s.getJSON(u),n=Object.assign({},h,i);return void 0===i&&(void 0!==s.getJSON("chartproperties")&&void 0!==(e=s.getJSON("chartproperties").symbolWatermarkProperties)&&(t=l(e.color),n=Object.assign(n,e),null!==t&&(0!==t[3]?n.visibility=!0:(t[3]=.25,n.color=c(t)))),delete n.transparency),n}function i(e,t){var i=e.font;return d.hasOwnProperty(i)||(d[i]={}),d[i].hasOwnProperty(t)||(d[i][t]=e.measureText(t).width),d[i][t]}var a,d={},p=new r(t());s.onSync.subscribe(null,function(){p.mergeAndFire(t())}),p.listeners().subscribe(null,function(){s.setJSON(u,p.state())}),this.properties=function(){return p},this.restorePropertiesDefaults=function(){p.mergeAndFire(h)},a={renderer:function(t,r){return{draw:function(s){var a,l,c,u,h,d,_,f,m,y=e.symbolInfo();for(s.fillStyle=p.color.value(),a=y.name,/QUANDL/.test(y.exchange)&&(l=a.split(/\//)).length&&(a=l[l.length-1]),c={description:y.description,short_description:y.short_description,pro_name:y.pro_name,short_name:y.name,local_description:y.local_description,language:y.language},u=[{text:a?a+", "+n(e.interval()):"",font:"96px Verdana, Arial, sans-serif",lineHeight:117,vertOffset:0},{text:o(c)||"",font:"48px Verdana, Arial, sans-serif",lineHeight:58,vertOffset:5}],h=0, d=0;dr?r/f:1,h+=_.lineHeight*_.zoom);for(m=Math.max((t-h)/2,0),d=0;d0;)h=f[u],e.moveTo(h.time,h.low),e.lineTo(h.time,h.high);e.stroke()}for(e.lineWidth=1,d="",p=!1,e.beginPath(),u=f.length;u-- >0;)c=(h=f[u]).time,d!==h.color&&(p&&(e.stroke(),e.beginPath(),p=!1),e.strokeStyle=h.color,d=h.color),e.moveTo(h.time,h.open),e.lineTo(h.time,h.close),p=!0;p&&e.stroke()}else{if(f=f.slice().sort(function(e,t){return e.color>t.color?-1:e.colorc[c.length-1].time+u)return null;for(t=null,i=0;i
'),this._layout_text=$('
').appendTo(this._layout)},o.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=n},sJA2:function(e,t,i){"use strict";var n,o;i.r(t),n=i("EsvI"),i.d(t,"ThemesApi",function(){return o}),o=function(){function e(e){this._opts=e}return e.prototype.isStdTheme=function(){return Promise.resolve(Object(n.isStdTheme)(Object(n.extractThemeFromModel)(this._getActiveChartModel())))},e.prototype.setStdTheme=function(e){return Object(n.loadTheme)(e,!0,!1,this._opts.chartWidgetCollection).then(function(){})},e.prototype.setStdThemeForLayout=function(e,t){ void 0===t&&(t=!0),Object(n.setTheme)(e),t&&Object(n.syncTheme)()},e.prototype.getCurrentThemeName=function(){return Object(n.getCurrentTheme)().name},e.prototype._getActiveChartModel=function(){return this._getActiveChartWidget().model()},e.prototype._getActiveChartWidget=function(){return this._opts.chartWidgetCollection.activeChartWidget.value()},e}()},sWfm:function(e,t,i){"use strict";var n,o,r;i.r(t),i.d(t,"TimeAxisViewRenderer",function(){return r}),n=i("jFln"),o=/[1-9]/g,r=function(){function e(){this._data=null}return e.prototype.setData=function(e){this._data=e},e.prototype.draw=function(e,t){var i,r,s,a,l,c,u,h,d,p,_,f,m,y;null!==this._data&&!1!==this._data.visible&&0!==this._data.text.length&&(e.font=t.font,(i=Math.round(t.widthCache.measureText(e,this._data.text,o)))<=0||(a=(s=i+2*(r=t.paddingHorizontal))/2,l=this._data.width,c=this._data.coordinate,(u=Math.floor(c-a)+.5)<0?(c+=Math.abs(0-u),u=Math.floor(c-a)+.5):u+s>l&&(c-=Math.abs(l-(u+s)),u=Math.floor(c-a)+.5),h=u+s,p=(d=-.5)+t.borderSize+t.paddingTop+t.fontSize+t.paddingBottom,e.fillStyle=this._data.background,e.lineWidth=1,Object(n.drawRoundRect)(e,u,d,h-u,p-d,1),e.fill(),_=Math.round(this._data.coordinate+1),m=(f=d)+t.borderSize+t.tickLength,e.strokeStyle=this._data.color,e.beginPath(),e.moveTo(_,f),e.lineTo(_,m),e.stroke(),y=p-t.baselineOffset-t.paddingBottom,e.textAlign="left",e.fillStyle=this._data.color,e.fillText(this._data.text,u+r,y)))},e}()},sw9I:function(e,t,i){"use strict";function n(e,t,i,o){if(this.chart=e,this.paneA=e.paneWidgets()[t],this.paneB=e.paneWidgets()[i],this.jqRow=$(document.createElement("tr")),this.jqRow.height(n.HEIGHT),this.jqCell=$(document.createElement("td")),this.jqCell.appendTo(this.jqRow),this.jqCell.addClass("pane-separator"),this.jqCell.attr("colspan","3"),this.jqCell.css("background",this.chart.properties().scalesProperties.lineColor.value()),this.jqCell.click(function(){}),o)this._mouseEventHandler=null;else{var s=$('
').appendTo(this.jqCell);this._mouseEventHandler=new r(s,this,!0)}}var o,r;i("bc0y"),o=i("Hr11").clamp,r=i("S8xo").MouseEventHandler,n.prototype.destroy=function(){null!==this._mouseEventHandler&&this._mouseEventHandler.destroy(),this.jqRow.remove()},n.HEIGHT=1,n.prototype.hide=function(){this.jqRow.addClass("js-hidden")},n.prototype.show=function(){this.jqRow.removeClass("js-hidden")},n.prototype.mouseDownEvent=function(e){(0===e.button||Modernizr.mobiletouch)&&(this.startY=e.pageY,this.deltaY=0,this.totalHeight=this.paneA.size().h+this.paneB.size().h,this.totalStretch=this.paneA.stretchFactor()+this.paneB.stretchFactor(),this.prevStretchA=this.paneA.stretchFactor(),this.minPaneHeight=30,this.maxPaneHeight=this.totalHeight-this.minPaneHeight,this.pixelStretchFactor=this.totalStretch/this.totalHeight)},n.prototype.pressedMouseMoveEvent=function(e){var t,i,n;(0===e.button||Modernizr.mobiletouch)&&(e.preventDefault(),this.deltaY=e.pageY-this.startY,t=this.paneA.size().h,i=o(t+this.deltaY,this.minPaneHeight,this.maxPaneHeight)*this.pixelStretchFactor,n=this.totalStretch-i, this.paneA.setStretchFactor(i),this.paneB.setStretchFactor(n),this.chart._adjustSize(),this.paneA.size().h!==t&&(this.startY=e.pageY),this.chart.paint())},n.prototype.mouseUpEvent=function(e){(0===e.button||Modernizr.mobiletouch)&&(this.chart._model.addPaneStretchFactorUndoCommand(this.paneA._state,this.paneB._state,this.prevStretchA,this.paneA.stretchFactor()),this.startY=0,this.deltaY=0,this.totalHeight=0,this.totalStretch=0,this.minPaneHeight=0,this.maxPaneHeight=0,this.pixelStretchFactor=0)},n.prototype.update=function(){this.jqCell.css("background",this.chart.properties().scalesProperties.lineColor.value())},n.prototype.paint=function(){},n.prototype.image=function(){var e={},t=n.HEIGHT,i=this.paneA.leftPriceAxisesContainer().getWidth(),o=this.paneA.size().w,r=this.paneA.rightPriceAxisesContainer().getWidth(),s=$('')[0],a=s.getContext("2d");return a.fillStyle=this.chart.properties().scalesProperties.lineColor.value(),a.fillRect(0,0,i,t),e.leftAxis={content:s.toDataURL(),contentWidth:i,contentHeight:t},(a=(s=$('')[0]).getContext("2d")).fillStyle=this.chart.properties().scalesProperties.lineColor.value(),a.fillRect(0,0,o,t),e.content=s.toDataURL(),e.contentWidth=o,e.contentHeight=t,(a=(s=$('')[0]).getContext("2d")).fillStyle=this.chart.properties().scalesProperties.lineColor.value(),a.fillRect(0,0,r,t),e.rightAxis={content:s.toDataURL(),contentWidth:r,contentHeight:t},e},e.exports=n},t2ex:function(e,t,i){"use strict";function n(){s.call(this)}function o(e,t){this._constructor="LineToolFibRetracement";var r=t||this.createPropertiesObject("linetoolfibretracement");a.call(this,e,r),this.version=o.version,this._properties._stateVersion=1,e._fibRetracementLabelsCache||(e._fibRetracementLabelsCache=new n),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 r=i("5rJj"),s=i("xUGI"),a=i("Ss5c").LineDataSource,l=i("hayr").propertyPages;inherit(n,s),n.prototype.levelsCount=function(){return o.LevelsCount},inherit(o,a),o.version=2,o.LevelsCount=24,o.prototype.levelsCount=function(){return o.LevelsCount},o.prototype.stop=function(){a.prototype.stop.call(this),this._model._fibRetracementLabelsCache.removeSource(this.id())},o.prototype.pointsCount=function(){return 2},o.prototype.title=function(){return"Fib Retracement"},o.prototype.name=function(){return"Fib Retracement"},o.prototype.migrateVersion=function(e,t,i){1===e&&this.properties().extendLines.setValue(!0)},o.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},o.prototype.createPropertiesObject=function(e,t,i){return new r(e,t,i,{range:[1,24],names:["coeff","color","visible"]})},o.prototype.getStylesPropertyPage=function(){return l.LineToolFibRetracementStylesPropertyPage},t.LineToolFibRetracement=o},tBG4:function(e,t,i){"use strict";function n(e){var t,i,n ;return 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,e.interval&&(i.interval=Object(a.translatedIntervalString)(e.interval)),t&&e.description&&((n=/[\w_]+\/[\w_]+/.exec(e.description))&&n[0]?i.provider=n[0].split("/")[0]:i.provider=e.description.split("/")[0]),e.exchange&&(i.exchange=e.exchange),i.chartStyle=function(e){return e.inputs,e.style===l.STYLE_HEIKEN_ASHI?window.t("Heikin Ashi"):""}(e),e.extended&&(i.extended=window.t("ext",{context:"shorthand_for_extended_session"})),i}function o(e){return(e.provider?", "+e.provider:"")+(e.exchange?", "+e.exchange:"")+(e.chartStyle?", "+e.chartStyle:"")+(e.extended?", "+e.extended:"")}var r,s,a,l,c,u;i.r(t),r=i("mrSG"),s=i("nBJD"),i("Eyy1"),a=i("IzGk"),l=i("dfhE"),c=i("RqCd"),i.d(t,"SeriesStatusView",function(){return u}),u=function(e){function t(i,n,o){var r=e.call(this,n)||this;return r._invalidated=!0,r._series=i,r._statusViewProperties=o,r._series.onRestarted().subscribe(r,t.prototype.invalidate),r._series.dataEvents().symbolResolved().subscribe(r,t.prototype.invalidate),r._series.dataEvents().completed().subscribe(r,t.prototype.invalidate),r._series.onBoxSizeChanged().subscribe(r,t.prototype.invalidate),r._statusViewProperties.childs().symbolTextSource.listeners().subscribe(r,t.prototype.invalidate),r}return 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=n(e),(t.symbolDescription+(t.interval?", "+t.interval:"")+o(t)).replace(/\'/g,"")),this._invalidated=!1)},t.prototype.getSplitTitle=function(){return e=this._getTitleGenerationOptions(),t=n(e),i=o(t),r=t.symbolDescription.replace(/\'/g,""),i=i.replace(/\'/g,""),[r,t.interval?", "+t.interval:"",i];var e,t,i,r},t.prototype._getTitleGenerationOptions=function(){var e=this._series.symbolInfo();return{description:"ticker"===this._statusViewProperties.childs().symbolTextSource.value()?e&&e.name||void 0:Object(c.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().style.value(),inputs:this._series.getInputsProperties().state(),boxSize:this._series.data().boxSize,reversalAmount:this._series.data().reversalAmount}},t}(s.a)},tDUI:function(e,t,i){"use strict";(function(e){function n(t,o){var r,s,c,d,p,_,f,m,y,g=o||new u("linetoolriskreward");a.call(this,t,g),this._properties.addExclusion&&(this._properties.addExclusion("stopLevel"),this._properties.addExclusion("profitLevel")),o.stopLevel||o.profitLevel||(s=(r=t.timeScale().visibleBarsStrictRange()).firstBar(),c=r.lastBar(),d=t.mainSeries().priceRange(s,c),(p=t.mainSeries().priceScale()).isLog()&&(_=p.logicalToPrice(d.minValue()),f=p.logicalToPrice(d.maxValue()),d=new e(_,f)),d&&!d.isEmpty()&&(m=Math.round(.2*d.length()*t.mainSeries().base()),g.merge({stopLevel:m,profitLevel:m}))),y=this,g.stopLevel.listeners().subscribe(this,this.recalculate),g.stopLevel.listeners().subscribe(null,function(){y.properties().stopPrice._listeners.fire(y.properties().stopPrice)}),g.profitLevel.listeners().subscribe(this,this.recalculate),g.profitLevel.listeners().subscribe(null,function(){y.properties().targetPrice._listeners.fire(y.properties().targetPrice)}),g.addChild("entryPrice",new n.PriceProperty(this,0)),g.addChild("stopPrice",new n.StopPriceProperty(this)),g.addChild("targetPrice",new n.TargetPriceProperty(this)),g.addProperty("riskSize",250),g.addProperty("qty",0),g.addProperty("amountTarget",g.accountSize.value()),g.addProperty("amountStop",g.accountSize.value()),this._riskInPercentsFormatter=new h(2),this._riskInMoneyFormatter=new h,g.risk.subscribe(this,this._recalculateRiskSize),g.accountSize.subscribe(this,this._recalculateRiskSize),g.riskDisplayMode.subscribe(this,this._recalculateRisk),g.riskDisplayMode.subscribe(this,this._recalculateRiskSize),g.entryPrice.subscribe(this,this._recalculateRiskSize),g.stopPrice.subscribe(this,this._recalculateRiskSize),g.profitLevel.subscribe(this,this._recalculateRiskSize),g.stopLevel.subscribe(this,this._recalculateRiskSize),g.qty.subscribe(this,this._recalculateRiskSize),"percents"===g.riskDisplayMode.value()&&g.risk.value()>100&&g.riskDisplayMode.setValueSilently("money"),this._syncStateExclusions=["entryPrice","stopPrice","targetPrice","riskSize","qty","amountTarget","amountStop","risk","accountSize"],this.version=n.version,this._entryPriceAxisView=new l(this,{colorProperty:g.linecolor,priceProperty:g.entryPrice}),this._stopPriceAxisView=new l(this,{colorProperty:g.stopBackground,priceProperty:g.stopPrice}),this._profitPriceAxisView=new l(this,{colorProperty:g.profitBackground,priceProperty:g.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 o(e,t){var i,o ;this._constructor="LineToolRiskRewardShort",i=t||new u("linetoolriskrewardshort"),n.call(this,e,i),(o=this.properties()).entryPrice.subscribe(this,this._recalculateQty),o.stopPrice.subscribe(this,this._recalculateQty),o.riskSize.subscribe(this,this._recalculateQty),o.entryPrice.subscribe(this,this._recalculateAmount),o.profitLevel.subscribe(this,this._recalculateAmount),o.stopLevel.subscribe(this,this._recalculateAmount),o.accountSize.subscribe(this,this._recalculateAmount),o.riskSize.subscribe(this,this._recalculateAmount),o.qty.subscribe(this,this._recalculateAmount)}function r(e,t){var i,o;this._constructor="LineToolRiskRewardLong",i=t||new u("linetoolriskrewardlong"),n.call(this,e,i),(o=this.properties()).entryPrice.subscribe(this,this._recalculateQty),o.stopPrice.subscribe(this,this._recalculateQty),o.riskSize.subscribe(this,this._recalculateQty),o.entryPrice.subscribe(this,this._recalculateAmount),o.profitLevel.subscribe(this,this._recalculateAmount),o.stopLevel.subscribe(this,this._recalculateAmount),o.accountSize.subscribe(this,this._recalculateAmount),o.riskSize.subscribe(this,this._recalculateAmount),o.qty.subscribe(this,this._recalculateAmount)}var s=i("Eyy1").ensureNotNull,a=i("Ss5c").LineDataSource,l=i("gMtF").LineToolRiskRewardPriceAxisView,c=i("mMWL"),u=i("Ocx9").DefaultProperty,h=i("zXvd").NumericFormatter,d=i("hayr").propertyPages,p=i("wGNx").RiskRewardPointIndex;inherit(n,a),n.prototype.riskFormatter=function(e){return"percents"===e?this._riskInPercentsFormatter:this._riskInMoneyFormatter},n.prototype.getRiskStep=function(e){return"percents"===e?.01:1},n.prototype._roundValue=function(e){return parseFloat(e.toFixed(2))},n.prototype._recalculateRisk=function(){var e=this.properties(),t=e.riskDisplayMode.value(),i=e.riskSize.value(),n=e.accountSize.value(),o=e.risk.value();o="percents"===t?this._roundValue(i/n*100):this._roundValue(n/100*o),this._riskInChange=!0,e.risk.setValue(this.riskFormatter(t).format(o)),this._riskInChange=!1},n.prototype._recalculateRiskSize=function(){var e,t,i,n;this._riskInChange||(t=(e=this.properties()).risk.value(),i=e.riskDisplayMode.value(),n=e.accountSize.value(),"percents"===i?e.riskSize.setValue(t/100*n):t>n?(e.risk.setValue(n),e.riskSize.setValue(n)):e.riskSize.setValue(t))},n.version=2,n.prototype.i18nCache={title:window.t("Risk/Reward")},n.prototype.lastBarData=function(){var e,t,i,n,o=this._model.mainSeries().bars().firstIndex(),r=this._model.mainSeries().bars().lastIndex();return null===o||null===r||isNaN(o)||isNaN(r)?null:4===(e=this.points()).length?(t=e[p.ActualClose]).index=1&&((n=[]).push(this._points[0]),o={price:(o=this._points[0]).price,index:o.index+50},n.push(o),this._points[1]&&n.push(this._points[1]),this._points[2]&&n.push(this._points[2]),this._points=n, this._timePoint.length>=1&&(r=[],o=this._timePoint[0],r.push(o),s={price:o.price,time_t:o.time_t,offset:o.offset+50},r.push(s),this._timePoint[1]&&n.push(this._points[1]),this._timePoint[2]&&n.push(this._points[2]),this._timePoint=r))},n.prototype.checkAlert=function(){this.recalculate()},n.prototype.priceAxisViews=function(e,t){return this.isSourceHidden()?null:t!==this.priceScale()||this._model.paneForSource(this)!==e?null:[this._entryPriceAxisView,this._stopPriceAxisView,this._profitPriceAxisView]},n.prototype.updateAllViews=function(){this.isActualSymbol()&&this._properties.visible.value()&&(c.hideAllDrawings().value()&&this.userEditEnabled()||(a.prototype.updateAllViews.call(this),this._entryPriceAxisView.update(),this._stopPriceAxisView.update(),this._profitPriceAxisView.update()))},n.prototype.setPoint=function(e,t){switch(e){case 0:t.price=this._roundPrice(t.price),a.prototype.setPoint.call(this,e,t),this.recalculate();break;case 1:this.isActualSymbol()&&this.properties().stopPrice.setValue(this.preparseStopPrice(t.price));break;case 2:this.isActualSymbol()&&this.properties().targetPrice.setValue(this.preparseProfitPrice(t.price));break;case 3:t.price=this._roundPrice(t.price),a.prototype.setPoint.call(this,1,t),this.recalculate()}},n.PriceProperty=function(e,t){a.PointPriceProperty.call(this,e,t)},inherit(n.PriceProperty,a.PointPriceProperty),n.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._syncMultichartState()},n.StopPriceProperty=function(e){n.PriceProperty.call(this,e,1)},inherit(n.StopPriceProperty,n.PriceProperty),n.StopPriceProperty.prototype.value=function(){var e=this._lineSource.stopPrice(),t=this._lineSource.ownerSource().formatter(),i=t.parse(t.format(e));return null!=i.price?i.price:i.value},n.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.properties().stopLevel.listeners().fire(this._lineSource.properties().stopLevel)},n.TargetPriceProperty=function(e){n.PriceProperty.call(this,e,2)},inherit(n.TargetPriceProperty,n.PriceProperty),n.TargetPriceProperty.prototype.value=function(){var e=this._lineSource.profitPrice(),t=this._lineSource.ownerSource().formatter(),i=t.parse(t.format(e));return null!=i.price?i.price:i.value},n.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.properties().profitLevel.listeners().fire(this._lineSource.properties().profitLevel)},n.prototype.pointsCount=function(){return 1},n.prototype.title=function(){return this.i18nCache.title}, n.prototype.name=function(){return"Risk/Reward"},n.prototype.addPoint=function(e){var t,i;return e.price=this._roundPrice(e.price),a.prototype.addPoint.call(this,e,null,!0),t={price:e.price,index:e.index+50},a.prototype._addPointIntenal.call(this,t,null,!0),(i=this.calculateActualEntry(e,t))&&(a.prototype._addPointIntenal.call(this,i,null,!0),(t=this.findClosePoint(i,t))&&a.prototype._addPointIntenal.call(this,t,null,!0)),this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0},n.prototype._roundPrice=function(e){var t=this._model.mainSeries().base(),i=Math.round(e*t);return i/t},n.prototype.recalculate=function(){var e,t,i,n,o;this.properties().interval.value()===this._model.mainSeries().interval()&&0!==this.points().length&&(e=this.properties().targetPrice.value(),t=this.properties().stopPrice.value(),i=[this._points[0],this._points[1]],(n=this.calculateActualEntry(this.points()[0],this.points()[1]))&&(i.push(n),(o=this.findClosePoint(n,this.points()[1]))&&i.push(o)),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))},n.prototype.start=function(){a.prototype.start.call(this),this.recalculate()},n.prototype.startMoving=function(e,t,i){e.logical.price=this._roundPrice(e.logical.price),a.prototype.startMoving.call(this,e,t,i)},n.prototype.move=function(e,t,i){e.logical.price=this._roundPrice(e.logical.price),a.prototype.move.call(this,e,t,i),this.recalculate(),this._entryPriceAxisView.update()},n.prototype.correctPoints=function(e){return!!this.isActualSymbol()&&a.prototype.correctPoints.call(this,[e[0],e[1]])},n.prototype.entryPrice=function(){return this.points()[0].price},n.prototype.findClosePoint=function(e,t){var i,n,o,r=this._model.mainSeries().bars(),a=s(r.firstIndex()),l=Math.max(e.index,a),c=s(r.lastIndex());for(i=l;i<=Math.min(c,t.index);i++)if(n=s(r.valueAt(i)),null!=(o=this.checkStopPrice(n)))return{index:i,price:o};return null},n.prototype.calculateActualEntry=function(e,t){var i,n,o=this._model.mainSeries().bars(),r=s(o.firstIndex()),a=Math.max(e.index,r),l=e.price,c=s(o.lastIndex());for(i=a;i<=Math.min(c,t.index);i++)if((n=s(o.valueAt(i)))[TradingView.HIGH_PLOT]>=l&&n[TradingView.LOW_PLOT]<=l)return{index:i,price:l};return null},n.prototype.axisPoints=function(){var e,t,i;if(!this._points[p.ActualEntry])return[];if(e=this._points[p.ActualEntry],t=null,4===this._points.length)t=this._points[p.ActualClose];else{if(!(i=this.lastBarData()))return[];t={index:i.index,price:i.closePrice}}return[e,t]},n.prototype.getInputsPropertyPage=function(){return d.LineToolRiskRewardInputsPropertyPage},n.prototype.getStylesPropertyPage=function(){return d.LineToolRiskRewardStylesPropertyPage},inherit(o,n),o.prototype.i18nCache={title:window.t("Risk/Reward short")},o.prototype._recalculateQty=function(){var e,t,i,n,o;0!==this.points().length&&(t=(e=this.properties()).entryPrice.value(),i=e.stopPrice.value(), n=e.riskSize.value(),o=Math.floor(n/Math.abs(i-t)),e.qty.setValue(o))},o.prototype._recalculateAmount=function(){var e,t,i,n,o,r,s,a;0!==this.points().length&&(t=(e=this.properties()).accountSize.value(),i=e.entryPrice.value(),n=e.qty.value(),o=e.stopPrice.value(),r=e.targetPrice.value(),s=this._roundValue(t+(i-r)*n),a=this._roundValue(t-(o-i)*n),e.amountTarget.setValue(s),e.amountStop.setValue(a))},o.prototype.title=function(){return this.i18nCache.title},o.prototype.name=function(){return"Risk/Reward short"},o.prototype.stopPrice=function(){return this.entryPrice()+this.properties().stopLevel.value()/this._model.mainSeries().base()},o.prototype.profitPrice=function(){return this.entryPrice()-this.properties().profitLevel.value()/this._model.mainSeries().base()},o.prototype.calculatePL=function(e){return this.entryPrice()-e},o.prototype.preparseStopPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()+1/this._model.mainSeries().base();return Math.max(e,t)},o.prototype.preparseProfitPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()-1/this._model.mainSeries().base();return Math.min(e,t)},o.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},r.prototype.i18nCache={title:window.t("Risk/Reward long")},inherit(r,n),r.prototype._recalculateQty=function(){var e,t,i,n,o;0!==this.points().length&&(t=(e=this.properties()).entryPrice.value(),i=e.stopPrice.value(),n=e.riskSize.value(),o=Math.floor(n/Math.abs(t-i)),e.qty.setValue(o))},r.prototype._recalculateAmount=function(){var e,t,i,n,o,r,s,a;0!==this.points().length&&(t=(e=this.properties()).accountSize.value(),i=e.entryPrice.value(),n=e.qty.value(),o=e.stopPrice.value(),r=e.targetPrice.value(),s=this._roundValue(t+(r-i)*n),a=this._roundValue(t-(i-o)*n),e.amountTarget.setValue(s),e.amountStop.setValue(a))},r.prototype.stopPrice=function(){return this.entryPrice()-this.properties().stopLevel.value()/this._model.mainSeries().base()},r.prototype.profitPrice=function(){return this.entryPrice()+this.properties().profitLevel.value()/this._model.mainSeries().base()},r.prototype.calculatePL=function(e){return e-this.entryPrice()},r.prototype.preparseStopPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()-1/this._model.mainSeries().base();return Math.min(e,t)},r.prototype.preparseProfitPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()+1/this._model.mainSeries().base();return Math.max(e,t)},r.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},r.prototype.title=function(){return this.i18nCache.title},r.prototype.name=function(){return"Risk/Reward long"},t.LineToolRiskReward=n,t.LineToolRiskRewardLong=r,t.LineToolRiskRewardShort=o}).call(this,i("Qb4w").PriceRange)},tG6Q:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolCircleLines" ;var n=t||new r("linetoolcirclelines");o.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)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages;inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return"Cyclic Lines"},n.prototype.name=function(){return"Cyclic Lines"},n.prototype.getStylesPropertyPage=function(){return s.LineToolCircleLinesStylesPropertyPage},t.LineToolCircleLines=n},tITk:function(e,t,i){"use strict";function n(e,t,i){var n,s,c;r.enabled("charting_library_base")?function(e,t,i){var n,r,s;for(t=t||e||i||"",n="",r=0;ri&&s.push(this),s},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,i,n,o,r,s=this._value;for(void 0===s&&(s={}),t=0;t=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"))},te6v:function(e,t,i){"use strict";function n(e,t){r.call(this),this._header=null,this._crossHair=e,this._model=t,this._items.push(new s("Date","")),this._items.push(new s("Time","")),this._items.push(new s("Price","")),this._defaultFormatter=new a(100)}var o=i("4miz"),r=o.DataWindowView,s=o.DataWindowItem,a=i("kcTO").PriceFormatter,l=i("gQ5K").DateFormatter,c=i("4kQX").TimeFormatter;inherit(n,r),n.prototype.update=function(){var e,t,i,n,o,r,s=this._model.mainSeries().isDWM();this._items[1].setVisible(!s),this._items[0].setValue("n/a"),this._items[1].setValue("n/a"),this._items[2].setValue("n/a"),this._model.timeScale().isEmpty()||(e=this._crossHair.appliedIndex(),null===(t=this._model.timeScale().indexToUserTime(e))?(this._items[0].setValue("n/a"),s||this._items[1].setValue("n/a")):(this._items[0].setValue((new l).format(t)),s||this._items[1].setValue((new c).format(t))),(i=this._crossHair.pane)&&((n=i.defaultPriceScale()).isEmpty()||(r=(o=n.mainSource())?o.formatter():this._defaultFormatter,this._items[2].setValue(r.format(this._crossHair.price)))))},e.exports=n},teHb:function(e,t,i){"use strict";var n,o,r,s;i.r(t),i.d(t,"ratioStudyItem",function(){return s}),n=i("mrSG"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype._doCalculation=function(e,t,i,n){return e*t/(i*n)},t}((o=i("7dm8")).a),s={name:"Ratio",metainfo:{_metainfoVersion:15,defaults:o.b,plots:o.d,styles:o.e,description:"Ratio",shortDescription:"Ratio",is_price_study:!1,inputs:o.c,id:"Ratio@tv-basicstudies-1"},constructor:r}},toUb:function(e,t,i){"use strict";function n(e){l.call(this,e),this.ch=e.char[0]||" ",this.fontFamily=e.fontFamily||"Arial",this._charCache=new a(this.ch,!1,!1,this.fontFamily,this.height)} var o=i("aO4+").Point,r=i("Zp/P").selectionTolerance,s=i("VdBB").HitTestResult,a=i("gBDZ"),l=i("c0/O").PaneRendererAbstractShape;inherit(n,l),n.prototype.drawShape=function(e){var t,i,n,o,r,s,a=this._vertOffset>0?1:-1;for(t=0,i=this.items.length;t0?"middle":"bottom")},n.prototype.hitTest=function(e){var t,i,n=this._vertOffset,a=r(this.height);for(t=0;t=0&&!o(this.items[i].y);)i--;if(!(t>=i)){for(e.translate(.5,.5),n={},s=this.items,a=t;a<=i;a++)c=(l=s[a]).style?l.style.color:this.lineColor,a").text("body,.chart-controls-bar,#footer-chart-panel{background-color:#"+t+" !important}").appendTo($("head")),new s({bgColor:t,chartWidgetCollection:e,drawingsAccess:urlParams.drawingsAccess?JSON.parse(urlParams.drawingsAccess):void 0,resizerBridge:M.allocate({areaName:"left"}),onClick:n})}return null}(k),X=null,Q=null,window.tradingViewApi=new R(k,window.ChartApiInstance,B,z),m.bindToChartWidgetCollection(k),TradingView.isNaN(urlParams.studyCountLimit)||(TradingView.STUDY_COUNT_LIMIT=Math.max(2,+urlParams.studyCountLimit)),TradingView.isNaN(urlParams.ssreqdelay)||F(Math.max(0,+urlParams.ssreqdelay)),window.ChartApiInstance.connect(),Promise.all([i.e(7),i.e(10),i.e(20),i.e(49),i.e(4),i.e(9),i.e("line-tools-icons"),i.e(17),i.e(24),i.e("floating-toolbars")]).then(function(e){var t=i("tPkB");window.lineToolPropertiesToolbar=new t(k)}.bind(null,i)).catch(i.oe),$(".tv-content").bind("contextmenu",function(e){var t=$(e.originalEvent.target);if(!t.is("input")&&!t.is("textarea"))return!1}),U.resolve(),k.undoHistory.undoStack().onChange().subscribe(null,C(function(){y.emit("onAutoSaveNeeded")},1e3*(urlParams.autoSaveDelay||5),{leading:!1,trailing:!0})),chartWidget.withModel(null,function(){if(ChartApiInstance.on("realtime_tick",function(e){ y.emit("onTick",e)}),G){var t=l.getStdTheme(G);t&&t.content&&void 0===u&&(k.applyTheme(t.content,!1,!1,G,!0),window.applyOverrides(window.__defaultsOverrides))}e.enabled("charting_library_debug_mode")&&y.subscribeToAll(function(){var e=Array.prototype.slice.call(arguments);console.log('Event "{0}", arguments: {1}'.format(e[0],JSON.stringify(e.slice(1))))})}),k.firstWidgetInitialized?t():chartWidget.chartWidgetInitialized.subscribe(null,t,!0),y.subscribe("chart_load_requested",function(e){window.tradingViewApi.loadChart({json:JSON.parse(e.content),extendedData:e})})},window.addEventListener("unload",function(){window.chartWidgetCollection&&(window.chartWidgetCollection.destroy(),window.chartWidgetCollection=null),window.containerElement=null,A(),window.ChartApiInstance&&(window.ChartApiInstance.destroy(),window.ChartApiInstance=null)}),e.enabled("saveload_storage_customization")&&(window.parent[urlParams.uid].saveLoadAdapter?c.setCustomAdapter(window.parent[urlParams.uid].saveLoadAdapter):void 0!==urlParams.chartsStorageUrl&&urlParams.chartsStorageUrl&&void 0!==urlParams.clientId&&urlParams.clientId?c.initialize(urlParams.clientId,urlParams.userId,urlParams.chartsStorageUrl,urlParams.chartsStorageVer||"1.0"):(e.setEnabled("saveload_storage_customization",!1),e.setEnabled("header_saveload",!1))),Q=P(),window.parent[urlParams.uid].loadLastChart&&e.enabled("saveload_storage_customization")?c.getCharts(function(e){if(0!==e.length){var i=e.sort(function(e,t){return t.modified_iso-e.modified_iso})[0];c.getChartContent(i,function(e){var i=JSON.parse(e.content);i.extendedData=e,urlParams.chartContent=JSON.stringify({json:i}),t()},t)}else t()},t):t(),null!=(te=window.parent[window.urlParams.uid].settingsAdapter)?(TVSettings.setSettingsAdapter(te),TVSettings.sync()):e.enabled("use_localstorage_for_settings")&&TVSettings.sync(),ee=P(),Promise.all([ee.promise,Q.promise]).then(function(){if($(window).resize(),$(".loading-indicator").hide(),setTimeout(X,0),e.enabled("14851")&&(Math.random()<=.02||e.enabled("cqg_terminal")||e.enabled("amp_terminal"))){i=window,n=document,o="script",r="ga",i.GoogleAnalyticsObject=r,i.ga=i.ga||function(){(i.ga.q=i.ga.q||[]).push(arguments)},i.ga.l=1*new Date,s=n.createElement(o),a=n.getElementsByTagName(o)[0],s.async=1,s.src="//www.google-analytics.com/analytics.js",a.parentNode.insertBefore(s,a);var t=document.URL.match(new RegExp("(:?.*://)([^/]+)/.*"))[2];ga("create","UA-112911840-1","auto"),ga("set","anonymizeIp",!0),ga("set",{hostname:t,page:t,referrer:t}),ga("send","pageview")}var i,n,o,r,s,a}),ie=!0,window.parent[urlParams.uid].datafeed.onReady(function(e){ie&&console.warn("`onReady` should return result asynchronously. Use `setTimeout` with 0 interval to execute the callback function."),window.configurationData=e,ee.resolve()}),ie=!1,window.getFunctionFromArguments=function(e){return window.parent[urlParams.uid][e]},window.createShortcutAction=(ne={},function(e,t){void 0===ne[e]&&(ne[e]=new u({shortcut:e,onExecute:t}))}),window.initializationFinished=function(){ window.chartWidgetCollection.undoHistory.clearStack()},window.resizeWindow=function(){$(window).resize()},window.headerReady=function(){return J.promise},window.createButton=function(e){if(null===K)throw new Error("Cannot create button: header widget is not ready or is not loaded - use `headerReady` to wait until header is ready");var t=(e=e||{}).align||"left";return K.addButton(t)}}).call(this,i("Kxc7"))},uOxu:function(e,t,i){"use strict";function n(){return w}function o(){return P}function r(e){e=Math.max(d.ERROR,Math.min(d.DEBUG,e)),w=e,c()}function s(e){var t=y.reduce(function(e,t){return e.concat(t)},[]);return t.sort(function(e,t){return e.id-t.id}),"number"==typeof e&&(t=t.slice(-e)),function(e,t){var i,n=0;for(i=e.length-1;i>=1&&(n+=8*(1+encodeURIComponent(e[i]).length),!(i-1>0&&n+8*(1+encodeURIComponent(e[i-1]).length)>t));i--);return e.slice(i)}(t.map(function(e){return new Date(e.timestamp).toISOString()+":"+e.subSystemId+":"+e.message.replace(/"/g,"'")}),_)}function a(e,t,i,n){var r,s;if((t!==v||n.id!==S)&&(r=new Date,e<=d.NORMAL&&function(e,t,i,n,o){var r={id:p,message:String(t),subSystemId:n,timestamp:Number(e)};p+=1,i.push(r),void 0!==o&&i.length>o&&i.splice(0,1)}(r,t,i,n.id,n.maxCount),e<=w&&(!n.highRate||o())&&(!g||n.id.match(g)))){switch(s=r.toISOString()+":"+n.id+":"+t,e){case d.DEBUG:console.debug(s);break;case d.INFO:case d.NORMAL:n.color?console.log("%c"+s,"color: "+n.color):console.log(s);break;case d.WARNING:console.warn(s);break;case d.ERROR:console.error(s)}v=t,S=n.id,b&&clearTimeout(b),b=setTimeout(function(){v=null,S=null,b=NaN},1e3)}}function l(e,t){function i(e){return function(t){return a(e,t,n,o)}}var n,o;return void 0===t&&(t={}),n=[],y.push(n),o=Object.assign(t,{id:e}),{logDebug:i(d.DEBUG),logError:i(d.ERROR),logInfo:i(d.INFO),logNormal:i(d.NORMAL),logWarn:i(d.WARNING)}}function c(){try{h&&(localStorage.setItem(m,String(P)),localStorage.setItem(f,String(w)))}catch(e){x.logWarn("Cannot save logger state (level: "+w+", high-rate: "+P+") to localStorage: "+e.message)}}var u,h,d,p,_,f,m,y,g,v,S,b,w,P,x,C,T;i.r(t),i.d(t,"LOGLEVEL",function(){return d}),i.d(t,"getLogLevel",function(){return n}),i.d(t,"isHighRateEnabled",function(){return o}),i.d(t,"setLogLevel",function(){return r}),i.d(t,"getLogHistory",function(){return s}),i.d(t,"getLogger",function(){return l}),i.d(t,"loggingOn",function(){return C}),i.d(t,"loggingOff",function(){return T}),u="undefined"!=typeof window?window:{},h=!1;try{localStorage.getItem(""),h=!0}catch(e){}!function(e){e[e.ERROR=1]="ERROR",e[e.WARNING=2]="WARNING",e[e.INFO=3]="INFO",e[e.NORMAL=4]="NORMAL",e[e.DEBUG=5]="DEBUG"}(d||(d={})),p=0,_=75497472,f="tv.logger.loglevel",m="tv.logger.logHighRate",y=[],g=null,v=null,S=null,b=NaN,w=d.WARNING,P=!1,x=l("logger"),C=u.lon=function(e,t){r(d.DEBUG),x.logNormal("Debug logging enabled"),P=Boolean(e),g=t||null,c()},T=u.loff=function(){r(d.INFO),x.logInfo("Debug logging disabled")},function(){P=!!h&&"true"===localStorage.getItem(m);var e=parseInt(h&&localStorage.getItem(f)||"");Number.isNaN(e)&&(e=d.WARNING),r(e), x.logNormal("Init with settings - level: "+w+", high-rate: "+P)}(),u.performance&&u.performance.now?x.logNormal("Sync logger and perf times, now is "+u.performance.now()):x.logWarn("Perf time is not available")},uPb3:function(e,t,i){"use strict";(function(e,n){function o(t,i,n,o,r){function s(){throw new Error("Time axis does not support real price scales")}var a,l;this._options=Object.assign({},x,i),this.chart=t,this._properties=t.properties().scalesProperties,this.contextMenu=null,this._element=document.createElement("tr"),a=t.properties().paneProperties.background,l={titlesProvider:n,contentMenuProvider:o,backgroundBasedTheme:r,rendererOptionsProvider:t.model().model().rendererOptionsProvider()},this._onLabelHovered=new e,this._lhsStubContainer=new w(a,this._properties,P.LHS,s,l,this._options.priceAxisLabelsOptions),this._lhsStubContainer.onLabelHovered().subscribe(this,function(e,t){this._onLabelHovered.fire(e,t)}.bind(this)),this._rhsStubContainer=new w(a,this._properties,P.RHS,s,l,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.canvas=f(this._dv,new m(16,16)),this.canvas.style.position="absolute",this.canvas.style.zIndex="1",this.canvas.style.left="0",this.canvas.style.top="0",this.ctx=this.canvas.getContext("2d"),this.top_canvas=f(this._dv,new m(16,16)),this.top_canvas.style.position="absolute",this.top_canvas.style.zIndex="2",this.top_canvas.style.left="0",this.top_canvas.style.top="0",this.top_ctx=this.top_canvas.getContext("2d"),this._element.appendChild(this._rhsStubContainer.getElement()),this.restoreDefaultCursor(),this.update(),this._minVisibleSpan=S.MINUTE_SPAN,this._mouseEventHandler=new y($(this._cell),this,!0)}var r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S,b,w,P,x;i("xrEm"),r=i("u+0B").TextWidthCache,s=i("7KDR"),a=s.Separator,l=i("5VQP").ContextMenuManager,c=i("i1o5").InvalidationLevel,u=i("ikwP"),h=u.resizeCanvas,d=u.hardResizeCanvas,p=u.clearRect,_=u.fillRect,f=u.addCanvasTo,m=u.Size,y=i("S8xo").MouseEventHandler,g=i("tITk").trackEvent,v=i("XlJ7").makeFont,S=i("8OdW"),b=i("CW80").isLineTool,w=i("mE5r").PriceAxisesContainer,P=i("1IXQ").PriceAxisWidget,x={contextMenuEnabled:!0,timezoneMenuEnabled:!0},o.prototype.destroy=function(){this._mouseEventHandler.destroy(),this._rhsStubContainer.onLabelHovered().unsubscribeAll(this),this._lhsStubContainer.onLabelHovered().unsubscribeAll(this),this._lhsStubContainer.destroy(),this._rhsStubContainer.destroy(),$(this._cell).remove()},o.prototype.getElement=function(){return this._element},o.prototype._BORDER_SIZE=1,o.prototype._OFFSET_SIZE=1, o.prototype._TICK_LENGTH=3,o.prototype.onLabelHovered=function(){return this._onLabelHovered},o.prototype.backgroundColor=function(){return this.chart.properties().paneProperties.background.value()},o.prototype.lineColor=function(){return this._properties.lineColor.value()},o.prototype.textColor=function(){return this._properties.textColor.value()},o.prototype.fontSize=function(){return this._properties.fontSize.value()},o.prototype.baseFont=function(){return v(this.fontSize(),"Arial","")},o.prototype.baseBoldFont=function(){return v(this.fontSize(),"Arial","bold")},o.prototype.rendererOptions=function(){var e,t;return this._rendererOptions||(this._rendererOptions={borderSize:this._BORDER_SIZE,offsetSize:this._OFFSET_SIZE,tickLength:this._TICK_LENGTH,fontSize:NaN,font:"",widthCache:new r}),(e=this._rendererOptions).fontSize!==this.fontSize()&&(t=this.fontSize(),e.fontSize=t,e.font=this.baseFont(),e.font=v(this.fontSize(),"'Trebuchet MS', Arial, sans-serif",""),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()),this._rendererOptions},o.prototype.mouseDownEvent=function(e){var t,i=this.chart.model().model().zoomEnabled();if(this._mousedown||!i)return!0;this._mousedown=!0,(t=this.chart.model()).timeScale().isEmpty()||(this.setCursor("ew-resize"),t.startScaleTime(e.localX))},o.prototype.mouseDownOutsideEvent=function(e){var t=this.chart.model();!t.timeScale().isEmpty()&&this._mousedown&&(this._mousedown=!1,t.endScaleTime(),this.restoreDefaultCursor())},o.prototype.pressedMouseMoveEvent=function(e){var t,i,n=this.chart.model();n.timeScale().isEmpty()||(t=!1,i=(new Date).valueOf(),this._lastScrollScaleTime&&i-this._lastScrollScaleTime<100&&(t=!0),t||(n.scaleTimeTo(e.localX),this._lastScrollScaleTime=i))},o.prototype.mouseUpEvent=function(e){this._mousedown=!1;var t=this.chart.model();t.timeScale().isEmpty()||(t.endScaleTime(),this.restoreDefaultCursor())},o.prototype.contextMenuEvent=function(e,t){this._options.contextMenuEnabled&&this._createContextMenu().then(function(t){t.show(e)})},o.prototype._createContextMenu=function(){return l.createMenu(this.getContextMenuActions(),{statName:"TimeScaleContextMenu"})},o.prototype.getContextMenuActions=function(){var e,t,i=this.chart;return i.updateActions(),e=i.actions(),t=n.enabled("charting_library_base")?[e.timeScaleReset,new a,e.applyTimeZone,e.sessionBreaks]:[e.timeScaleReset,new a,e.applyTimeZone,e.sessionBreaks,e.extendedHours],this._options.timezoneMenuEnabled||t.splice(2,1),n.enabled("show_chart_property_page")&&n.enabled("chart_property_page_timezone_sessions")&&e.tmzProperties&&t.push(new a,e.tmzProperties),t},o.prototype.mouseClickEvent=function(e){},o.prototype.mouseDoubleClickEvent=function(e){g("GUI","Double click time scale"),this.chart.model().resetTimeScale()},o.prototype.optimalHeight=function(){var e=this.rendererOptions();return Math.ceil(e.offsetSize+e.borderSize+e.tickLength+e.fontSize+e.paddingTop+e.paddingBottom)}, o.prototype.setSizes=function(e,t,i){this.size&&this.size.equals(e)||(this.size=e,h(this.canvas,e),h(this.top_canvas,e),this.canvas.getContext("2d"),this.top_canvas.getContext("2d"),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)},o.prototype._spanIndex=function(e){for(var t=[S.MINUTE_SPAN,S.HOUR_SPAN,S.DAY_SPAN,S.MONTH_SPAN,S.YEAR_SPAN],i=t.length-1;i>0;){if(t[i]<=e)return i;i--}return i},o.prototype._spanOffset=function(e,t){if(t0&&this._hightlightBackground(e,i),(n=t.model().crossHairSource()).startMeasurePoint()&&this._hightlightBackground(e,n.measurePoints()))},o.prototype.drawTickMarks=function(e){var t,i,n,o,r,s,a,l,c,u,h,d=this.chart.model().timeScale().marks();if(d&&0!==d.length){for((t=d.reduce(function(e,t){return e.span>t.span?e:t},d[0]).span)>30&&t<40&&(t=30),e.save(),e.strokeStyle=this.lineColor(),n=(i=this.rendererOptions()).borderSize+i.tickLength+i.paddingTop+i.fontSize-i.baselineOffset,e.textAlign="center",e.translate(.5,-.5),e.fillStyle=this.lineColor(),e.beginPath(),o=d.length;o--;)e.rect(d[o].coord,0,1,i.tickLength);for(e.fill(),e.fillStyle=this.textColor(),r={},s=this.baseFont(),a=this.baseBoldFont(),o=0;o=t?a:s]||[]).push(d[o]),r[l]=c;for(u in r)for(e.setFont(u),h=r[u],o=0;o=s)&&(n={value:s,view:r})}),i.view&&t.push(i.view),n.view&&t.push(n.view),t},o.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))},o.prototype.drawCrossHairLabel=function(e){var t,i,n,o,r;this.top_ctx.clearRect(-.5,-.5,this.size.w,this.size.h),i=[],(n=(t=this.chart.model()).lineBeingEdited()||t.lineBeingCreated())&&n.timeAxisViews&&(o=n.timeAxisViews())&&o.length&&i.push(o),this._addViewsOrMaxMin(t.sourcesBeingMoved(),i),this._addViewsOrMaxMin(t.selection().sources(),i),t.hoveredSource()&&!t.selection().isSelected(t.hoveredSource())&&t.hoveredSource().timeAxisViews&&(o=t.hoveredSource().timeAxisViews())&&o.length&&i.push(o),(o=t.crossHairSource().timeAxisView())&&o.length&&i.push(o),r=this.rendererOptions(),i.forEach(function(t){t.forEach(function(t){e.save(),t.renderer().draw(e,r),e.restore()})})},o.prototype.hardResetCanvas=function(){this.size&&(d(this.canvas,this.size),d(this.top_canvas,this.size))},o.prototype.paint=function(e){if(0!==e)if(e!==c.Cursor){var t=this.ctx;this.drawBackground(t),this.chart.model()&&(this.drawTickMarks(t),this.drawBackLabels(t),this.chart.model().crossHairSource().updateAllViews(),this.drawCrossHairLabel(this.top_ctx)),this._lhsStubContainer.paint(e),this._rhsStubContainer.paint(e)}else this.drawCrossHairLabel(this.top_ctx)},o.prototype.restoreDefaultCursor=function(){this.setCursor("")},o.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)},o.prototype.updatePriceAxisStubs=function(){var e,t=this.chart.model().model(),i=this.chart.isMaximizedPane()?this.chart.maximizedPaneWidget().state():t.paneForSource(t.mainSeries());i&&(e=t.priceScaleSlotsCount(),this._lhsStubContainer.setScales([],e.left,i.leftPriceScales().length,e.left+e.right),this._rhsStubContainer.setScales([],e.right,i.rightPriceScales().length,e.left+e.right))},o.prototype.getScreenshotData=function(){var e={};return e.content=this.canvas.toDataURL(),e.contentWidth=this.size.w,e.contentHeight=this.size.h,e.lhsStub=this._lhsStubContainer.getScreenshotData(),e.rhsStub=this._rhsStubContainer.getScreenshotData(),e},t.TimeAxisWidget=o}).call(this,i("aIyQ"),i("Kxc7"))},"uXw/":function(e,t,i){"use strict";(function(t){var n=i("ufy5"),o=i("LxhU").Interval,r=function(){function e(e,t){return e}function r(e,t){var i=d.get_timezone(e.timezone),o=new n.Session;return o.init(i,e.session),h.Symbol.newBarBuilder(t,o,o)}function s(e,t,i,n,o){var r,s,l,c=[];for(r=0;r=s)return 0;u=l(e,h,_,i,s);if(u>=1e3)return u;return a.findDistanceInBars(i,s,e)}(s,a,t,e[0].value[0]/1e3,i):(c=n.lower_bound(e,1e3*t,function(e,t){return e.value[0]>t?1:e.value[0]=0&&t4*(7-i.spec.weekEndsCount()))u=c/7*(7-i.spec.weekEndsCount());else{for(h=0,p={},_=a;_.valueOf()<=l.valueOf();_=d.add_days_considering_dst(i.timezone,_,1))void 0===p[f=d.get_day_of_week(_)]&&(p[f]=i.spec.isWeekEnd(f)),p[f]&&h++;u=c-h}if(t.isDays())r=Math.ceil(u/t.multiplier());else{if(m=t.isHours()?60*t.multiplier()*60:t.isSeconds()?t.multiplier():60*t.multiplier(),c<1&&i.spec.findSessionEntry(d.get_day_of_week(a),d.get_minutes_from_midnight(a))===i.spec.findSessionEntry(d.get_day_of_week(l),d.get_minutes_from_midnight(l)))return Math.ceil((o-n)/m);f=i.spec.entries()[0].dayOfWeek(),y=60*i.spec.entries().reduce(function(e,t){return e+(t.dayOfWeek()===f?t.length():0)},0),r=Math.ceil(u*y/m)}}return r}var c={},u="undefined"!=typeof window?window:t,h=i("ocLq"),d=u.PineJsCalendar?u.PineJsCalendar:i("jCNj");return{createPointset:function(t,i,n,o,r,s){var a,l,u,h,d=e(i);for(c.hasOwnProperty(d)||(c[d]=[]),a=[],l=0;l5)throw console.trace(["0x10",new Date(t),"->",new Date(l)]),new Error("Internal error 0x10 while extrapolating.");if((s=e.indexOfBar(l))===T)l=e.startOfBar(0);else if(s===I)l=e.startOfBar(I);else{if((a=e.startOfBar(s))!==t){if(r&&r===a)throw console.trace(["0x11",new Date(t),"->",new Date(a)]),new Error("Internal error 0x11 while extrapolating.");r=a,o=0,n.push(a)}l=e.startOfBar(s+1)}e.moveTo(l),o++}return n}function c(e){if(isNaN(e))return NaN;var t=this.indexOfBar(e);return t===I&&(this.moveTo(e),t=this.indexOfBar(e)),t<0?NaN:this.startOfBar(t)}function u(e,t,i){for(var n,o=k.clone(t);e.isWeekEnd(k.get_day_of_week(o));)k.add_date(o,1);return n=e.bordersOfDailyBar(o,i),k.cal_to_utc(i,n.from)}function h(e,t){this.period=e,this.session=t,this.sessionStart=Number.MIN_VALUE,this.sessionEnd=Number.MIN_VALUE}function d(e,t,i,n){this.period=i,this.sessionTgt=e,this.sessionSrc=t||e,this.builder=n,this.periodStart=-Number.MAX_VALUE,this.periodEnd=-Number.MAX_VALUE,this.periodLastBarStart=-Number.MAX_VALUE}function p(e,t){var i=k.get_day_of_week(t)-e.firstDayOfWeek();return i<0?i+7:i}function _(e,t){var i=t+e.firstDayOfWeek();return i>k.SATURDAY?i-k.SATURDAY:i}function f(e,t){var i=k.get_day_of_year(t)-1,n=p(e,t)-i%7;return 0===n?P(i/7):(n>=0&&(n-=7),P((n+i)/7))}function m(e,t,i){var n,o=0;for(n=t;n=this.sessionEnd?I:P(k.time_seconds_diff(e,this.sessionStart)/this.period)},h.prototype.startOfBar=function(e){if(e===I)return this.sessionEnd;if(e<0)throw new Error("Negative offset is not supported");return this.sessionStart+k.time_seconds(this.period*e)},h.prototype.isLastBar=function(e,t){return t>=this.sessionStart+k.time_seconds(this.period*(e+1)-1)},h.prototype.moveTo=function(e){var t=this.session.timezone,i=k.utc_to_cal(t,e),n=this.session.spec,o=n.alignToSessionStart(i,this.session.timezone);this.sessionStart=k.cal_to_utc(t,i),this.sessionEnd=this.sessionStart+k.time_minutes(o)},d.prototype.alignTime=c,d.prototype.alignTimeIfPossible=function(e){return this.tradingDayToSessionStart(e)},d.prototype.tradingDayToSessionStart=function(e){return this.moveTo(e),this.startOfBar(0)},d.prototype.indexOfBar=function(e){return e=this.periodEnd?I:0},d.prototype.startOfBar=function(e){if(e===I||e>0)return this.periodEnd ;if(e===T)throw new Error("PRE_SESSION is not supported");return this.periodStart},d.prototype.isLastBar=function(e,t){return t>=this.periodLastBarStart},d.prototype.moveTo=function(e){var t,i,n,o,r,s,a,l,c=k.utc_to_cal(this.sessionSrc.timezone,e);c=this.sessionSrc.spec.correctTradingDay(c),t=this.sessionTgt.timezone,-1===(i=this.builder.indexOfPeriod(c,t))&&(i*=this.period),n=P(i/this.period)*this.period,o=k.get_year(c),r=this.sessionTgt.spec,s=this.builder.startOfPeriod(t,n,o),this.periodStart=u(r,s,t),a=n+this.period,l=this.builder.startOfPeriod(t,a,o),this.periodEnd=u(r,l,t),k.add_date(l,-1),this.moveToPrevWorkDay(r,l),this.periodLastBarStart=u(r,l,t),(this.periodLastBarStart=c&&(i++,t=0),o=this,n.prototype.isIncomplete=function(){return 7!==this.calendarDays},r=new Date(Date.UTC(i,k.JANUARY,1)),s=p(this.sessionsSpec,r),l=t<(a=new n(this.sessionsSpec,s)).businessDays?function(e,t){var i,n=0;for(i=e;i<7&&(o.sessionsSpec.isWeekEnd(_(o.sessionsSpec,i))||!(--t<0));++i)n++;return n}(s,t):function(e,t){var i,n,r,s,a=0,l=7-o.sessionsSpec.weekEndsCount(),c=t%l,u=e.isIncomplete()?e.businessDays:0,h=c-u;for(h<0&&(h+=l),i=0;i<7&&h>=0;++i)a+=(n=o.sessionsSpec.isWeekEnd(_(o.sessionsSpec,i)))?1:0,h-=n?0:1;return r=e.weekEnds+a,s=P((t-e.businessDays)/(7-o.sessionsSpec.weekEndsCount())),t+(r+o.sessionsSpec.weekEndsCount()*s)}(a,t),this.uber.startOfPeriod(e,l,i)},S.prototype.indexOfPeriod=function(e){return this.builder().indexOfPeriod(e)},S.prototype.startOfPeriod=function(e,t,i){return this.builder().startOfPeriod(e,t,i)},S.prototype.builder=function(){return this._builder||(this._builder=this.session.spec.hasWeekEnds()?new v(this.session.spec):new g),this._builder},b.prototype.indexOfPeriod=function(e,t){var i=f(this.session.spec,e);return 0===i&&el?this.startOfPeriod(e,0,i+P(a/l)):(n=k.get_cal(e,i,k.JANUARY,1),o=k.add_days_considering_dst(e,n,a),k.utc_to_cal(e,+o))},w.prototype.indexOfPeriod=function(e){return k.get_month(e)}, w.prototype.startOfPeriod=function(e,t,i){var n;return t<0?(i-=n=P((11-t)/12),t+=12*n):t>k.DECEMBER&&(i++,t=k.JANUARY),k.get_cal_utc(i,t,1)},x.prototype.init=function(e,t){return this.timezone="string"==typeof e?k.get_timezone(e):e,this.spec=new n(t),this},C=(new x).init("Etc/UTC","0000-0000:1234567"),{PRE_SESSION:T,POST_SESSION:I,LASTBAR_SESSION:L,newBarBuilder:e,Session:x,alignPeriodsBack:function(e,t,i,n,r){var s,l,c,u,h=(new x).init("Etc/UTC",e),d=""!==t;return d?(l=a(o.parse(i+t),r),s=M.D):(l=60*i*1e3,s=60*h.spec.findSessionEntry(0,0).length()*1e3),c=s/l,n<(u=(d?7:7-h.spec.weekEndsCount())*c)?r-n/c*M.D:r-n/u*M.W},extrapolateBarsFrontByCount:function(e,t,i){return l(e,t,function(e,t){return e.length>=i})},extrapolateBarsFrontToTime:function(e,t,i,n){if("number"!=typeof i||"number"!=typeof t||isNaN(i)||isNaN(t))throw new Error("Cannot extrapolate from "+t+" to "+i);return l(e,t,function(e,t){return t>i||n&&e.length>n})},lower_bound:function(e,t,i){var n,o,r,s,a=e.length;if(0===a)return-1;for(r=P(((n=0)+(o=a-1))/2);;){if(0===(s=i(e[r],t))||s>0){if((o=r-1)r.start()+r.length()&&n===r.dayOfWeek()-1&&(n++,o-=1440),n===r.dayOfWeek()&&o>=r.start()&&o0;)this.removeProperty(this._childs[0]);this._initValues=[];for(var t=0;tl&&t1?s(e[o],t.slice(1),i):(e[o]&&e[o].setValue?e[o].setValue(i):e[o]=i,!0))}function a(e){i||m.logWarn("Path `"+e+"` does not exist.")}var l,c,u,h;if(n)for(l in n)u=r((c=l.split("."))[0]),h=void 0!==o&&o===c[0],0!==c.length&&h&&(u=r((c=c.slice(1))[0])),0!==c.length&&e.hasOwnProperty(u)?s(e,c,n[l])||a(l):h&&a(l)}function o(e,t,i,o){window.__defaultsOverrides&&n(e,t,i,window.__defaultsOverrides,o)}function r(){var e=/^linetool.+/;Object.keys(TradingView.defaultProperties).forEach(function(t){e.test(t)&&o(TradingView.defaultProperties[t],null,!1,t)})}function s(e,t){return t?function(e,t){var i,n,o,r,s=y(e);window._UNIT_TESTS||(i=TradingView.clone(TVSettings.getJSON(e,null)),e.startsWith("study_")&&i&&function(e){if(!e)return!1;e=e.toString();var t=new RegExp("\\d+").exec(e);return null!==t&&t[0]===e}(i.version)&&(n=i.inputs,o=t.updateStudyInputs(i.id,i.version,"last",n,null),i.inputs=o,r=t.updateStudyState(i,i),i=r),TradingView.merge(s,i));return s}(e,t):function(e){var t,i=y(e);window._UNIT_TESTS||(t=TradingView.clone(TVSettings.getJSON(e,null)))&&TradingView.merge(i,t);return i}(e)}var a=i("dfhE"),l=i("rCHB").LineToolPitchforkStyle,c=i("Ye2/").LineToolBarsPatternMode,u=i("23IT").LineStudyPlotStyle,h=i("8OdW"),d=i("oXaB").PriceAxisLastValueMode,p=i("4o++").MagnetMode,_=i("a7Ha").LineEnd,f=i("bKFv").StatsPosition,m=i("uOxu").getLogger("Chart.Defaults"),y=function(e){var t,i,n,s,m,y,g,v,S=function(e,t){return{color:e,visible:t}},b=function(e,t,i){return{coeff:e,color:t,visible:i}},w=function(e,t,i,n,o){return{coeff:e,color:t,visible:i,linestyle:void 0===n?CanvasEx.LINESTYLE_SOLID:n,linewidth:void 0===o?1:o}},P=function(e,t,i){return{color:e,width:i,visible:t}},x=function(e,t,i,n,o){return{color:e,visible:t,width:i,x:n,y:o}},C=function(e,t,i,n,o,r){return{coeff1:e,coeff2:t,color:i,visible:n,linestyle:void 0===o?CanvasEx.LINESTYLE_SOLID:o,linewidth:void 0===r?1:r}};if(void 0===TradingView.defaultProperties){switch(window.locale){case"ar_AE":t="Asia/Dubai";break;case"au":t="Australia/Sydney";break;case"br":t="America/Sao_Paulo";break;case"ca":t="America/Toronto";break;case"de_DE":case"it":t="Europe/Berlin";break;case"es":t="Europe/Madrid";break;case"fa_IR":t="Asia/Tehran";break;case"fr":case"sv_SE":t="Europe/Paris";break;case"he_IL":case"tr":t="Europe/Athens";break;case"hu_HU":case"pl":t="Europe/Warsaw";break;case"id":case"th_TH":case"vi_VN":t="Asia/Bangkok";break;case"in":t="Asia/Kolkata";break;case"ja":case"kr":t="Asia/Tokyo";break;case"ms_MY":t="Asia/Singapore";break;case"ru":t="Europe/Moscow";break;case"uk":t="Europe/London";break;case"zh_CN":case"zh_TW":t="Asia/Shanghai";break;default:t="Etc/UTC"}TradingView.defaultProperties={chartproperties:{timezone:t,priceScaleSelectionStrategyName:"auto",dataWindowProperties:{ background:"rgba( 255, 254, 206, 0.2)",border:"rgba( 96, 96, 144, 1)",font:"Verdana",fontBold:!1,fontItalic:!1,fontSize:10,transparency:80,visible:!0},paneProperties:{background:"#ffffff",gridProperties:{color:"#e1ecf2",style:CanvasEx.LINESTYLE_SOLID},vertGridProperties:{color:"#e1ecf2",style:CanvasEx.LINESTYLE_SOLID},horzGridProperties:{color:"#e1ecf2",style:CanvasEx.LINESTYLE_SOLID},crossHairProperties:{color:"#758696",style:CanvasEx.LINESTYLE_DASHED,transparency:0,width:1},topMargin:10,bottomMargin:8,axisProperties:{autoScale:!0,autoScaleDisabled:!1,lockScale:!1,percentage:!1,percentageDisabled:!1,indexedTo100:!1,log:!1,logDisabled:!1,alignLabels:!0,isInverted:!1},legendProperties:{showStudyArguments:!0,showStudyTitles:!0,showStudyValues:!0,showSeriesTitle:!0,showSeriesOHLC:!0,showLegend:!0,showBarChange:!0,showOnlyPriceSource:!0}},scalesProperties:{backgroundColor:"#ffffff",lineColor:"#50535E",textColor:"#50535E",fontSize:11,scaleSeriesOnly:!1,showSeriesLastValue:!0,seriesLastValueMode:d.LastValueAccordingToScale,showSeriesPrevCloseValue:!1,showStudyLastValue:!1,showSymbolLabels:!1,showStudyPlotLabels:!1,barSpacing:h.DEFAULT_BAR_SPACING},mainSeriesProperties:{style:a.STYLE_CANDLES,esdShowDividends:!0,esdShowSplits:!0,esdShowEarnings:!0,esdShowBreaks:!1,esdBreaksStyle:{color:"rgba( 235, 77, 92, 1)",style:CanvasEx.LINESTYLE_DASHED,width:1},esdFlagSize:2,showCountdown:!0,showInDataWindow:!0,visible:!0,showPriceLine:!0,priceLineWidth:1,priceLineColor:"",baseLineColor:"#B2B5BE",showPrevClosePriceLine:!1,prevClosePriceLineWidth:1,prevClosePriceLineColor:"rgba( 85, 85, 85, 1)",minTick:"default",extendedHours:!1,sessVis:!1,statusViewStyle:{fontSize:16,showExchange:!0,showInterval:!0,symbolTextSource:"description"},candleStyle:{upColor:"#26a69a",downColor:"#ef5350",drawWick:!0,drawBorder:!0,borderColor:"#378658",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"#737375",wickUpColor:"#26a69a",wickDownColor:"#ef5350",barColorsOnPrevClose:!1},hollowCandleStyle:{upColor:"#26a69a",downColor:"#ef5350",drawWick:!0,drawBorder:!0,borderColor:"rgba( 55, 134, 88, 1)",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"rgba( 115, 115, 117, 1)",wickUpColor:"#26a69a",wickDownColor:"#ef5350"},haStyle:{upColor:"#26a69a",downColor:"#ef5350",drawWick:!0,drawBorder:!0,borderColor:"rgba( 55, 134, 88, 1)",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"rgba( 115, 115, 117, 1)",wickUpColor:"#26a69a",wickDownColor:"#ef5350",showRealLastPrice:!1,barColorsOnPrevClose:!1,inputs:{},inputInfo:{}},barStyle:{upColor:"#26a69a",downColor:"#ef5350",barColorsOnPrevClose:!1,dontDrawOpen:!1,thinBars:!0},hiloStyle:{color:"#2196f3",showBorders:!0,borderColor:"#2196f3",showLabels:!0,labelColor:"#2196f3",fontSize:7},lineStyle:{color:"#2196f3",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:3,priceSource:"close",styleType:a.STYLE_LINE_TYPE_SIMPLE},areaStyle:{color1:"#2196f3",color2:"#2196f3",linecolor:"#2196f3",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:3,priceSource:"close",transparency:95},priceAxisProperties:{autoScale:!0, autoScaleDisabled:!1,lockScale:!1,percentage:!1,percentageDisabled:!1,indexedTo100:!1,log:!1,logDisabled:!1,isInverted:!1,alignLabels:!0},renkoStyle:{upColor:"#26a69a",downColor:"#ef5350",borderUpColor:"#26a69a",borderDownColor:"#ef5350",upColorProjection:"rgba( 169, 220, 195, 1)",downColorProjection:"rgba( 245, 166, 174, 1)",borderUpColorProjection:"rgba( 169, 220, 195, 1)",borderDownColorProjection:"rgba( 245, 166, 174, 1)",wickUpColor:"#26a69a",wickDownColor:"#ef5350",inputs:{source:"close",boxSize:3,style:"ATR",atrLength:14,wicks:!0},inputInfo:{source:{name:"Source"},boxSize:{name:"Box size"},style:{name:"Style"},atrLength:{name:"ATR Length"},wicks:{name:"Wicks"}}},pbStyle:{upColor:"#26a69a",downColor:"#ef5350",borderUpColor:"#26a69a",borderDownColor:"#ef5350",upColorProjection:"rgba( 169, 220, 195, 1)",downColorProjection:"rgba( 245, 166, 174, 1)",borderUpColorProjection:"rgba( 169, 220, 195, 1)",borderDownColorProjection:"rgba( 245, 166, 174, 1)",inputs:{source:"close",lb:3},inputInfo:{source:{name:"Source"},lb:{name:"Number of line"}}},kagiStyle:{upColor:"#26a69a",downColor:"#ef5350",upColorProjection:"rgba( 169, 220, 195, 1)",downColorProjection:"rgba( 245, 166, 174, 1)",inputs:{source:"close",style:"ATR",atrLength:14,reversalAmount:1},inputInfo:{source:{name:"Source"},style:{name:"Style"},atrLength:{name:"ATR Length"},reversalAmount:{name:"Reversal amount"}}},pnfStyle:{upColor:"#26a69a",downColor:"#ef5350",upColorProjection:"rgba( 169, 220, 195, 1)",downColorProjection:"rgba( 245, 166, 174, 1)",inputs:{sources:"Close",reversalAmount:3,boxSize:1,style:"ATR",atrLength:14},inputInfo:{sources:{name:"Source"},boxSize:{name:"Box size"},reversalAmount:{name:"Reversal amount"},style:{name:"Style"},atrLength:{name:"ATR Length"}}},baselineStyle:{baselineColor:"rgba( 117, 134, 150, 1)",topFillColor1:"rgba( 38, 166, 154, 0.05)",topFillColor2:"rgba( 38, 166, 154, 0.05)",bottomFillColor1:"rgba( 239, 83, 80, 0.05)",bottomFillColor2:"rgba( 239, 83, 80, 0.05)",topLineColor:"rgba( 38, 166, 154, 1)",bottomLineColor:"rgba( 239, 83, 80, 1)",topLineWidth:3,bottomLineWidth:3,priceSource:"close",transparency:50,baseLevelPercentage:50},rangeStyle:{upColor:"#26a69a",downColor:"#ef5350",thinBars:!0,upColorProjection:"rgba( 169, 220, 195, 1)",downColorProjection:"rgba( 245, 166, 174, 1)",inputs:{range:10,phantomBars:!1},inputInfo:{range:{name:"Range"},phantomBars:{name:"Phantom Bars"}}}},chartEventsSourceProperties:{visible:!0,futureOnly:!0,breaks:{color:"rgba(85, 85, 85, 1)",visible:!1,style:CanvasEx.LINESTYLE_DASHED,width:1}},tradingProperties:{showPositions:!0,showOrders:!0,showExecutions:!0,extendLeft:!0,lineLength:5,lineWidth:1,lineStyle:CanvasEx.LINESTYLE_DASHED},editorFontsList:["Verdana","Courier New","Times New Roman","Arial"],volumePaneSize:"large"},sessions:{graphics:{backgrounds:{inSession:{color:"#6fa8dc",transparency:60,visible:!1},outOfSession:{color:"#ffe599",transparency:60,visible:!1}},vertlines:{sessBreaks:{color:"#4985e7",style:2,visible:!1,width:1}}}},drawings:{magnet:!1,magnetMode:p.WeakMagnet, stayInDrawingMode:!1,drawOnAllCharts:!0,crossHairColor:"#585858",crossHairStyle:CanvasEx.LINESTYLE_DASHED,crossHairWidth:1},linetoolorder:{singleChartOnly:!0,extendLeft:"inherit",lineLength:"inherit",lineColor:"rgba( 255, 0, 0, 1)",lineActiveBuyColor:"rgb(64,148,232)",lineInactiveBuyColor:"rgba(64,148,232,.5)",lineActiveSellColor:"rgb(231,86,86)",lineInactiveSellColor:"rgba(231,86,86,.5)",lineStyle:"inherit",lineWidth:"inherit",bodyBorderActiveBuyColor:"rgb(64,148,232)",bodyBorderInactiveBuyColor:"rgba(64,148,232,.5)",bodyBorderActiveSellColor:"rgb(231,86,86)",bodyBorderInactiveSellColor:"rgba(231,86,86,.5)",bodyBackgroundColor:"rgba( 255, 255, 255, 0.75)",bodyBackgroundTransparency:25,bodyTextInactiveLimitColor:"rgba(38,140,2,.5)",bodyTextActiveLimitColor:"rgb(38,140,2)",bodyTextInactiveStopColor:"rgba(231,86,86,.5)",bodyTextActiveStopColor:"rgb(231,86,86)",bodyTextInactiveBuyColor:"rgba(64,148,232,.5)",bodyTextActiveBuyColor:"rgb(64,148,232)",bodyTextInactiveSellColor:"rgba(231,86,86,.5)",bodyTextActiveSellColor:"rgb(231,86,86)",bodyFontFamily:"Verdana",bodyFontSize:9,bodyFontBold:!0,bodyFontItalic:!1,quantityBorderActiveBuyColor:"rgb(64,148,232)",quantityBorderInactiveBuyColor:"rgba(64,148,232,.5)",quantityBorderActiveSellColor:"rgb(231,86,86)",quantityBorderInactiveSellColor:"rgba(231,86,86,.5)",quantityBackgroundInactiveBuyColor:"rgba(64,148,232,.5)",quantityBackgroundActiveBuyColor:"rgb(64,148,232)",quantityBackgroundInactiveSellColor:"rgba(231,86,86,.5)",quantityBackgroundActiveSellColor:"rgb(231,86,86)",quantityTextColor:"rgba( 255, 255, 255, 1)",quantityTextTransparency:0,quantityFontFamily:"Verdana",quantityFontSize:9,quantityFontBold:!0,quantityFontItalic:!1,cancelButtonBorderActiveBuyColor:"rgb(64,148,232)",cancelButtonBorderInactiveBuyColor:"rgba(64,148,232,.5)",cancelButtonBorderActiveSellColor:"rgb(231,86,86)",cancelButtonBorderInactiveSellColor:"rgba(231,86,86,.5)",cancelButtonBackgroundColor:"rgba( 255, 255, 255, 0.75)",cancelButtonBackgroundTransparency:25,cancelButtonIconActiveBuyColor:"rgb(64,148,232)",cancelButtonIconInactiveBuyColor:"rgba(64,148,232,.5)",cancelButtonIconActiveSellColor:"rgb(231,86,86)",cancelButtonIconInactiveSellColor:"rgba(231,86,86,.5)",tooltip:"",modifyTooltip:"",cancelTooltip:""},linetoolposition:{singleChartOnly:!0,extendLeft:"inherit",lineLength:"inherit",lineBuyColor:"rgb(64,148,232)",lineSellColor:"rgb(231,86,86)",lineStyle:"inherit",lineWidth:"inherit",bodyBorderBuyColor:"rgb(64,148,232)",bodyBorderSellColor:"rgb(231,86,86)",bodyBackgroundColor:"rgba( 255, 255, 255, 0.75)",bodyBackgroundTransparency:25,bodyTextPositiveColor:"rgb(38,140,2)",bodyTextNeutralColor:"rgb(100,100,100)",bodyTextNegativeColor:"rgb(231,86,86)",bodyFontFamily:"Verdana",bodyFontSize:9,bodyFontBold:!0,bodyFontItalic:!1,quantityBorderBuyColor:"rgb(64,148,232)",quantityBorderSellColor:"rgb(231,86,86)",quantityBackgroundBuyColor:"rgb(64,148,232)",quantityBackgroundSellColor:"rgb(231,86,86)",quantityTextColor:"rgba( 255, 255, 255, 1)",quantityTextTransparency:0,quantityFontFamily:"Verdana", quantityFontSize:9,quantityFontBold:!0,quantityFontItalic:!1,reverseButtonBorderBuyColor:"rgb(64,148,232)",reverseButtonBorderSellColor:"rgb(231,86,86)",reverseButtonBackgroundColor:"rgba( 255, 255, 255, 0.75)",reverseButtonBackgroundTransparency:25,reverseButtonIconBuyColor:"rgb(64,148,232)",reverseButtonIconSellColor:"rgb(231,86,86)",closeButtonBorderBuyColor:"rgb(64,148,232)",closeButtonBorderSellColor:"rgb(231,86,86)",closeButtonBackgroundColor:"rgba( 255, 255, 255, 0.75)",closeButtonBackgroundTransparency:25,closeButtonIconBuyColor:"rgb(64,148,232)",closeButtonIconSellColor:"rgb(231,86,86)",tooltip:"",protectTooltip:"",closeTooltip:"",reverseTooltip:""},linetoolexecution:{singleChartOnly:!0,direction:"buy",arrowHeight:8,arrowSpacing:1,arrowBuyColor:"#4094e8",arrowSellColor:"#e75656",text:"",textColor:"rgba( 0, 0, 0, 1)",textTransparency:0,fontFamily:"Verdana",fontSize:10,fontBold:!1,fontItalic:!1,tooltip:""},linetoolicon:{singleChartOnly:!0,clonable:!0,color:"rgba( 61, 133, 198, 1)",size:40,icon:61536,angle:.5*Math.PI,scale:1},linetoolbezierquadro:{clonable:!0,linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,fillBackground:!1,backgroundColor:"rgba( 21, 56, 153, 0.5)",transparency:50,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:_.Normal,rightEnd:_.Normal},linetoolbeziercubic:{clonable:!0,linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,fillBackground:!1,backgroundColor:"rgba( 21, 56, 153, 0.5)",transparency:50,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:_.Normal,rightEnd:_.Normal},linetooltrendline:{clonable:!0,linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:_.Normal,rightEnd:_.Normal,font:"Verdana",textcolor:"rgba( 21, 119, 96, 1)",fontsize:12,bold:!1,italic:!1,snapTo45Degrees:!0,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:f.Right},linetoolinfoline:{clonable:!0,linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:_.Normal,rightEnd:_.Normal,font:"Verdana",textcolor:"rgba( 21, 119, 96, 1)",fontsize:12,bold:!1,italic:!1,snapTo45Degrees:!0,alwaysShowStats:!0,showMiddlePoint:!1,showPriceRange:!0,showBarsRange:!0,showDateTimeRange:!0,showDistance:!0,showAngle:!0,statsPosition:f.Center},linetooltimecycles:{clonable:!0,linecolor:"rgba(21, 153, 128, 1)",linewidth:1,fillBackground:!0,backgroundColor:"rgba(106, 168, 79, 0.5)",transparency:50,linestyle:CanvasEx.LINESTYLE_SOLID},linetoolsineline:{clonable:!0,linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},linetooltrendangle:{singleChartOnly:!0,clonable:!0,linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,snapTo45Degrees:!0,font:"Verdana",textcolor:"rgba( 21, 119, 96, 1)",fontsize:12,bold:!0,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,extendRight:!1,extendLeft:!1,statsPosition:f.Right}, linetooldisjointangle:{clonable:!0,linecolor:"rgba( 18, 159, 92, 1)",linewidth:2,linestyle:CanvasEx.LINESTYLE_SOLID,fillBackground:!0,backgroundColor:"rgba( 106, 168, 79, 0.5)",transparency:50,extendLeft:!1,extendRight:!1,leftEnd:_.Normal,rightEnd:_.Normal,font:"Verdana",textcolor:"rgba( 18, 159, 92, 1)",fontsize:12,bold:!1,italic:!1,showPrices:!1,showPriceRange:!1,showDateTimeRange:!1,showBarsRange:!1},linetoolflatbottom:{clonable:!0,linecolor:"rgba( 73, 133, 231, 1)",linewidth:2,linestyle:CanvasEx.LINESTYLE_SOLID,fillBackground:!0,backgroundColor:"rgba( 21, 56, 153, 0.5)",transparency:50,extendLeft:!1,extendRight:!1,leftEnd:_.Normal,rightEnd:_.Normal,font:"Verdana",textcolor:"rgba( 73, 133, 231, 1)",fontsize:12,bold:!1,italic:!1,showPrices:!1,showPriceRange:!1,showDateTimeRange:!1,showBarsRange:!1},linetoolfibspiral:{counterclockwise:!1,clonable:!0,linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},linetooldaterange:{clonable:!0,linecolor:"rgba( 88, 88, 88, 1)",linewidth:1,font:"Verdana",textcolor:"rgba( 255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba( 91, 133, 191, 0.9)",labelBackgroundTransparency:30,fillBackground:!0,backgroundColor:"rgba( 186, 218, 255, 0.4)",backgroundTransparency:60,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",extendTop:!1,extendBottom:!1},linetoolpricerange:{clonable:!0,linecolor:"rgba( 88, 88, 88, 1)",linewidth:1,font:"Verdana",textcolor:"rgba( 255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba( 91, 133, 191, 0.9)",labelBackgroundTransparency:30,fillBackground:!0,backgroundColor:"rgba( 186, 218, 255, 0.4)",backgroundTransparency:60,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",extendLeft:!1,extendRight:!1},linetooldateandpricerange:{clonable:!0,linecolor:"rgba( 88, 88, 88, 1)",linewidth:1,font:"Verdana",textcolor:"rgba( 255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba( 91, 133, 191, 0.9)",labelBackgroundTransparency:30,fillBackground:!0,backgroundColor:"rgba( 186, 218, 255, 0.4)",backgroundTransparency:60,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)"},linetoolriskrewardshort:{clonable:!0,linecolor:"rgba( 88, 88, 88, 1)",linewidth:1,font:"Verdana",textcolor:"rgba(255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba( 88, 88, 88, 1)",labelBackgroundTransparency:0,fillBackground:!0,stopBackground:"rgba( 255, 0, 0, 0.2)",profitBackground:"rgba( 0, 160, 0, 0.2)",stopBackgroundTransparency:80,profitBackgroundTransparency:80,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",compact:!1,riskDisplayMode:"percents",accountSize:1e3,risk:25},linetoolriskrewardlong:{clonable:!0,linecolor:"rgba( 88, 88, 88, 1)",linewidth:1,font:"Verdana",textcolor:"rgba(255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba( 88, 88, 88, 1)",labelBackgroundTransparency:0,fillBackground:!0,stopBackground:"rgba( 255, 0, 0, 0.2)",profitBackground:"rgba( 0, 160, 0, 0.2)",stopBackgroundTransparency:80, profitBackgroundTransparency:80,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",compact:!1,riskDisplayMode:"percents",accountSize:1e3,risk:25},linetoolarrow:{clonable:!0,linecolor:"rgba( 111, 136, 198, 1)",linewidth:2,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:_.Normal,rightEnd:_.Arrow,font:"Verdana",textcolor:"rgba( 21, 119, 96, 1)",fontsize:12,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:f.Right},linetoolray:{clonable:!0,linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!0,leftEnd:_.Normal,rightEnd:_.Normal,font:"Verdana",textcolor:"rgba( 21, 119, 96, 1)",fontsize:12,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:f.Right},linetoolextended:{clonable:!0,linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!0,extendRight:!0,leftEnd:_.Normal,rightEnd:_.Normal,font:"Verdana",textcolor:"rgba( 21, 119, 96, 1)",fontsize:12,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:f.Right},linetoolhorzline:{clonable:!0,linecolor:"rgba( 128, 204, 219, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showPrice:!0,showLabel:!1,font:"Verdana",textcolor:"rgba( 21, 119, 96, 1)",fontsize:12,bold:!1,italic:!1,horzLabelsAlign:"center",vertLabelsAlign:"top"},linetoolhorzray:{clonable:!0,linecolor:"rgba( 128, 204, 219, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showPrice:!0,showLabel:!1,font:"Verdana",textcolor:"rgba( 21, 119, 96, 1)",fontsize:12,bold:!1,italic:!1,horzLabelsAlign:"center",vertLabelsAlign:"top"},linetoolvertline:{clonable:!0,linecolor:"rgba( 128, 204, 219, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showTime:!0},linetoolcrossline:{clonable:!0,linecolor:"rgba(6, 160, 227, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showPrice:!0,showTime:!0},linetoolcirclelines:{clonable:!0,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},linecolor:"rgba( 128, 204, 219, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},linetoolfibtimezone:{horzLabelsAlign:"right",vertLabelsAlign:"bottom",clonable:!0,baselinecolor:"rgba( 128, 128, 128, 1)",linecolor:"rgba( 0, 85, 219, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showLabels:!0,font:"Verdana",fillBackground:!1,transparency:80,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},level1:w(0,"rgba( 128, 128, 128, 1)",!0),level2:w(1,"rgba( 0, 85, 219, 1)",!0),level3:w(2,"rgba( 0, 85, 219, 1)",!0),level4:w(3,"rgba( 0, 85, 219, 1)",!0),level5:w(5,"rgba( 0, 85, 219, 1)",!0),level6:w(8,"rgba( 0, 85, 219, 1)",!0),level7:w(13,"rgba( 0, 85, 219, 1)",!0),level8:w(21,"rgba( 0, 85, 219, 1)",!0),level9:w(34,"rgba( 0, 85, 219, 1)",!0), level10:w(55,"rgba( 0, 85, 219, 1)",!0),level11:w(89,"rgba( 0, 85, 219, 1)",!0),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetooltext:{clonable:!0,color:"rgba( 102, 123, 139, 1)",font:"Verdana",fontsize:20,fillBackground:!1,backgroundColor:"rgba( 91, 133, 191, 0.9)",backgroundTransparency:70,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",bold:!1,italic:!1,locked:!1,fixedSize:!0,wordWrap:!1,wordWrapWidth:400},linetooltextabsolute:{singleChartOnly:!0,clonable:!0,color:"rgba( 102, 123, 139, 1)",font:"Verdana",fontsize:20,fillBackground:!1,backgroundColor:"rgba( 155, 190, 213, 0.3)",backgroundTransparency:70,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",bold:!1,italic:!1,locked:!0,wordWrap:!1,wordWrapWidth:400},linetoolballoon:{clonable:!0,color:"rgba( 102, 123, 139, 1)",backgroundColor:"rgba( 255, 254, 206, 0.7)",borderColor:"rgba( 140, 140, 140, 1)",fontWeight:"bold",fontsize:12,font:"Arial",transparency:30},linetoolbrush:{clonable:!0,linecolor:"rgba( 53, 53, 53, 1)",linewidth:2,linestyle:CanvasEx.LINESTYLE_SOLID,smooth:5,fillBackground:!1,backgroundColor:"rgba( 21, 56, 153, 0.5)",transparency:50,leftEnd:_.Normal,rightEnd:_.Normal},linetoolpolyline:{clonable:!0,linecolor:"rgba( 53, 53, 53, 1)",linewidth:2,linestyle:CanvasEx.LINESTYLE_SOLID,fillBackground:!0,backgroundColor:"rgba( 21, 56, 153, 0.5)",transparency:50,filled:!1},linetoolarrowmark:{clonable:!0,color:"rgba( 120, 120, 120, 1)",fontsize:20,font:"Verdana"},linetoolarrowmarkleft:{clonable:!0,color:"rgba( 120, 120, 120, 1)",fontsize:20,font:"Verdana"},linetoolarrowmarkup:{clonable:!0,color:"rgba( 120, 120, 120, 1)",fontsize:20,font:"Verdana"},linetoolarrowmarkright:{clonable:!0,color:"rgba( 120, 120, 120, 1)",fontsize:20,font:"Verdana"},linetoolarrowmarkdown:{clonable:!0,color:"rgba( 120, 120, 120, 1)",fontsize:20,font:"Verdana"},linetoolflagmark:{clonable:!0,color:"rgba( 255, 0, 0, 1)"},linetoolnote:{clonable:!0,markerColor:"rgba( 46, 102, 255, 1)",textColor:"rgba( 0, 0, 0, 1)",backgroundColor:"rgba( 255, 255, 255, 1)",backgroundTransparency:0,font:"Arial",fontSize:12,bold:!1,italic:!1,locked:!1,fixedSize:!0},linetoolnoteabsolute:{singleChartOnly:!0,clonable:!0,markerColor:"rgba( 46, 102, 255, 1)",textColor:"rgba( 0, 0, 0, 1)",backgroundColor:"rgba( 255, 255, 255, 1)",backgroundTransparency:0,font:"Arial",fontSize:12,bold:!1,italic:!1,locked:!0,fixedSize:!0},linetoolthumbup:{clonable:!0,color:"rgba( 0, 128, 0, 1)"},linetoolthumbdown:{clonable:!0,color:"rgba( 255, 0, 0, 1)"},linetoolpricelabel:{clonable:!0,color:"rgba( 102, 123, 139, 1)",backgroundColor:"rgba( 255, 255, 255, 0.7)",borderColor:"rgba( 140, 140, 140, 1)",fontWeight:"bold",fontsize:11,font:"Arial",transparency:30},linetoolrectangle:{clonable:!0,color:"rgba( 21, 56, 153, 1)",fillBackground:!0,backgroundColor:"rgba( 21, 56, 153, 0.5)",linewidth:1,snapTo45Degrees:!0,transparency:50},linetoolrotatedrectangle:{clonable:!0,color:"rgba( 152, 0, 255, 1)",fillBackground:!0, backgroundColor:"rgba( 142, 124, 195, 0.5)",transparency:50,linewidth:1,snapTo45Degrees:!0},linetoolellipse:{clonable:!0,color:"rgba( 153, 153, 21, 1)",fillBackground:!0,backgroundColor:"rgba( 153, 153, 21, 0.5)",transparency:50,linewidth:1},linetoolarc:{clonable:!0,color:"rgba( 153, 153, 21, 1)",fillBackground:!0,backgroundColor:"rgba( 153, 153, 21, 0.5)",transparency:50,linewidth:1},linetoolprediction:{singleChartOnly:!0,linecolor:"rgba( 28, 115, 219, 1)",linewidth:2,sourceBackColor:"rgba( 241, 241, 241, 1)",sourceTextColor:"rgba( 110, 110, 110, 1)",sourceStrokeColor:"rgba( 110, 110, 110, 1)",targetStrokeColor:"rgba( 47, 168, 255, 1)",targetBackColor:"rgba( 11, 111, 222, 1)",targetTextColor:"rgba( 255, 255, 255, 1)",successBackground:"rgba( 54, 160, 42, 0.9)",successTextColor:"rgba( 255, 255, 255, 1)",failureBackground:"rgba( 231, 69, 69, 0.5)",failureTextColor:"rgba( 255, 255, 255, 1)",intermediateBackColor:"rgba( 234, 210, 137, 1)",intermediateTextColor:"rgba( 109, 77, 34, 1)",transparency:10,centersColor:"rgba( 32, 32, 32, 1)"},linetooltriangle:{clonable:!0,color:"rgba( 153, 21, 21, 1)",fillBackground:!0,backgroundColor:"rgba( 153, 21, 21, 0.5)",transparency:50,linewidth:1},linetoolcallout:{clonable:!0,color:"rgba( 255, 255, 255, 1)",backgroundColor:"rgba( 153, 21, 21, 0.5)",transparency:50,linewidth:2,fontsize:12,font:"Verdana",bordercolor:"rgba( 153, 21, 21, 1)",bold:!1,italic:!1,wordWrap:!1,wordWrapWidth:400},linetoolparallelchannel:{clonable:!0,linecolor:"rgba( 119, 52, 153, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,fillBackground:!0,backgroundColor:"rgba( 180, 167, 214, 0.5)",transparency:50,showMidline:!1,midlinecolor:"rgba( 119, 52, 153, 1)",midlinewidth:1,midlinestyle:CanvasEx.LINESTYLE_DASHED},linetoolelliottimpulse:{degree:7,clonable:!0,showWave:!0,color:"rgba( 61, 133, 198, 1)",linewidth:1},linetoolelliotttriangle:{degree:7,clonable:!0,showWave:!0,color:"rgba( 255, 152, 0, 1)",linewidth:1},linetoolelliotttriplecombo:{degree:7,clonable:!0,showWave:!0,color:"rgba( 106, 168, 79, 1)",linewidth:1},linetoolelliottcorrection:{degree:7,clonable:!0,showWave:!0,color:"rgba( 61, 133, 198, 1)",linewidth:1},linetoolelliottdoublecombo:{degree:7,clonable:!0,showWave:!0,color:"rgba( 106, 168, 79, 1)",linewidth:1},linetoolbarspattern:{singleChartOnly:!0,color:"rgba( 80, 145, 204, 1)",clonable:!0,mode:c.Bars,mirrored:!1,flipped:!1},linetoolghostfeed:{singleChartOnly:!0,clonable:!0,averageHL:20,variance:50,candleStyle:{upColor:"#6ba583",downColor:"#d75442",drawWick:!0,drawBorder:!0,borderColor:"#378658",borderUpColor:"#225437",borderDownColor:"#5b1a13",wickColor:"#737375"},transparency:50},study:{inputs:{},styles:{},palettes:{},bands:{},area:{},graphics:{},showInDataWindow:!0,visible:!0,showStudyArguments:!0,precision:"default"},linetoolpitchfork:{clonable:!0,fillBackground:!0,transparency:80,style:l.Original,median:{visible:!0,color:"rgba( 165, 0, 0, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level0:w(.25,"rgba( 160, 107, 0, 1)",!1), level1:w(.382,"rgba( 105, 158, 0, 1)",!1),level2:w(.5,"rgba( 0, 155, 0, 1)",!0),level3:w(.618,"rgba( 0, 153, 101, 1)",!1),level4:w(.75,"rgba( 0, 101, 153, 1)",!1),level5:w(1,"rgba( 0, 0, 153, 1)",!0),level6:w(1.5,"rgba( 102, 0, 153, 1)",!1),level7:w(1.75,"rgba( 153, 0, 102, 1)",!1),level8:w(2,"rgba( 165, 0, 0, 1)",!1),__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolpitchfan:{clonable:!0,fillBackground:!0,transparency:80,median:{visible:!0,color:"rgba( 165, 0, 0, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level0:w(.25,"rgba( 160, 107, 0, 1)",!1),level1:w(.382,"rgba( 105, 158, 0, 1)",!1),level2:w(.5,"rgba( 0, 155, 0, 1)",!0),level3:w(.618,"rgba( 0, 153, 101, 1)",!1),level4:w(.75,"rgba( 0, 101, 153, 1)",!1),level5:w(1,"rgba( 0, 0, 153, 1)",!0),level6:w(1.5,"rgba( 102, 0, 153, 1)",!1),level7:w(1.75,"rgba( 153, 0, 102, 1)",!1),level8:w(2,"rgba( 165, 0, 0, 1)",!1),__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolgannfan:{clonable:!0,showLabels:!0,font:"Verdana",fillBackground:!0,transparency:80,level1:C(1,8,"rgba( 160, 107, 0, 1)",!0),level2:C(1,4,"rgba( 105, 158, 0, 1)",!0),level3:C(1,3,"rgba( 0, 155, 0, 1)",!0),level4:C(1,2,"rgba( 0, 153, 101, 1)",!0),level5:C(1,1,"rgba( 128, 128, 128, 1)",!0),level6:C(2,1,"rgba( 0, 101, 153, 1)",!0),level7:C(3,1,"rgba( 0, 0, 153, 1)",!0),level8:C(4,1,"rgba( 102, 0, 153, 1)",!0),level9:C(8,1,"rgba( 165, 0, 0, 1)",!0),__collectibleLines:["level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetoolganncomplex:{clonable:!0,fillBackground:!1,arcsBackground:{fillBackground:!0,transparency:80},reverse:!1,scaleRatio:"",showLabels:!0,labelsStyle:{font:"Verdana",fontSize:12,bold:!1,italic:!1},levels:[P("rgba( 128, 128, 128, 1)",!0,1),P("rgba( 160, 107, 0, 1)",!0,1),P("rgba( 105, 158, 0, 1)",!0,1),P("rgba( 0, 155, 0, 1)",!0,1),P("rgba( 0, 153, 101, 1)",!0,1),P("rgba( 128, 128, 128, 1)",!0,1)],fanlines:[x("rgba( 165, 0, 255, 1)",!1,1,8,1),x("rgba( 165, 0, 0, 1)",!1,1,5,1),x("rgba( 128, 128, 128, 1)",!1,1,4,1),x("rgba( 160, 107, 0, 1)",!1,1,3,1),x("rgba( 105, 158, 0, 1)",!0,1,2,1),x("rgba( 0, 155, 0, 1)",!0,1,1,1),x("rgba( 0, 153, 101, 1)",!0,1,1,2),x("rgba( 0, 153, 101, 1)",!1,1,1,3),x("rgba( 0, 0, 153, 1)",!1,1,1,4),x("rgba( 102, 0, 153, 1)",!1,1,1,5),x("rgba( 165, 0, 255, 1)",!1,1,1,8)],arcs:[x("rgba( 160, 107, 0, 1)",!0,1,1,0),x("rgba( 160, 107, 0, 1)",!0,1,1,1),x("rgba( 160, 107, 0, 1)",!0,1,1.5,0),x("rgba( 105, 158, 0, 1)",!0,1,2,0),x("rgba( 105, 158, 0, 1)",!0,1,2,1),x("rgba( 0, 155, 0, 1)",!0,1,3,0),x("rgba( 0, 155, 0, 1)",!0,1,3,1),x("rgba( 0, 153, 101, 1)",!0,1,4,0),x("rgba( 0, 153, 101, 1)",!0,1,4,1),x("rgba( 0, 0, 153, 1)",!0,1,5,0),x("rgba( 0, 0, 153, 1)",!0,1,5,1)], __collectibleLines:["trendline","levels.0","levels.1","levels.2","levels.3","levels.4","levels.5","fanlines.0","fanlines.1","fanlines.2","fanlines.3","fanlines.4","fanlines.5","fanlines.6","fanlines.7","fanlines.8","fanlines.9","fanlines.10","arcs.0","arcs.1","arcs.2","arcs.3","arcs.4","arcs.5","arcs.6","arcs.7","arcs.8","arcs.9","arcs.10"]},linetoolgannfixed:{clonable:!0,fillBackground:!1,arcsBackground:{fillBackground:!0,transparency:80},reverse:!1,levels:[P("rgba( 128, 128, 128, 1)",!0,1),P("rgba( 160, 107, 0, 1)",!0,1),P("rgba( 105, 158, 0, 1)",!0,1),P("rgba( 0, 155, 0, 1)",!0,1),P("rgba( 0, 153, 101, 1)",!0,1),P("rgba( 128, 128, 128, 1)",!0,1)],fanlines:[x("rgba( 165, 0, 255, 1)",!1,1,8,1),x("rgba( 165, 0, 0, 1)",!1,1,5,1),x("rgba( 128, 128, 128, 1)",!1,1,4,1),x("rgba( 160, 107, 0, 1)",!1,1,3,1),x("rgba( 105, 158, 0, 1)",!0,1,2,1),x("rgba( 0, 155, 0, 1)",!0,1,1,1),x("rgba( 0, 153, 101, 1)",!0,1,1,2),x("rgba( 0, 153, 101, 1)",!1,1,1,3),x("rgba( 0, 0, 153, 1)",!1,1,1,4),x("rgba( 102, 0, 153, 1)",!1,1,1,5),x("rgba( 165, 0, 255, 1)",!1,1,1,8)],arcs:[x("rgba( 160, 107, 0, 1)",!0,1,1,0),x("rgba( 160, 107, 0, 1)",!0,1,1,1),x("rgba( 160, 107, 0, 1)",!0,1,1.5,0),x("rgba( 105, 158, 0, 1)",!0,1,2,0),x("rgba( 105, 158, 0, 1)",!0,1,2,1),x("rgba( 0, 155, 0, 1)",!0,1,3,0),x("rgba( 0, 155, 0, 1)",!0,1,3,1),x("rgba( 0, 153, 101, 1)",!0,1,4,0),x("rgba( 0, 153, 101, 1)",!0,1,4,1),x("rgba( 0, 0, 153, 1)",!0,1,5,0),x("rgba( 0, 0, 153, 1)",!0,1,5,1)],__collectibleLines:["trendline","levels.0","levels.1","levels.2","levels.3","levels.4","levels.5","fanlines.0","fanlines.1","fanlines.2","fanlines.3","fanlines.4","fanlines.5","fanlines.6","fanlines.7","fanlines.8","fanlines.9","fanlines.10","arcs.0","arcs.1","arcs.2","arcs.3","arcs.4","arcs.5","arcs.6","arcs.7","arcs.8","arcs.9","arcs.10"]},linetoolgannsquare:{clonable:!0,color:"rgba( 21, 56, 153, 0.8)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,font:"Verdana",showTopLabels:!0,showBottomLabels:!0,showLeftLabels:!0,showRightLabels:!0,fillHorzBackground:!0,horzTransparency:80,fillVertBackground:!0,vertTransparency:80,reverse:!1,fans:S("rgba( 128, 128, 128, 1)",!1),hlevel1:b(0,"rgba( 128, 128, 128, 1)",!0),hlevel2:b(.25,"rgba( 160, 107, 0, 1)",!0),hlevel3:b(.382,"rgba( 105, 158, 0, 1)",!0),hlevel4:b(.5,"rgba( 0, 155, 0, 1)",!0),hlevel5:b(.618,"rgba( 0, 153, 101, 1)",!0),hlevel6:b(.75,"rgba( 0, 101, 153, 1)",!0),hlevel7:b(1,"rgba( 128, 128, 128, 1)",!0),vlevel1:b(0,"rgba( 128, 128, 128, 1)",!0),vlevel2:b(.25,"rgba( 160, 107, 0, 1)",!0),vlevel3:b(.382,"rgba( 105, 158, 0, 1)",!0),vlevel4:b(.5,"rgba( 0, 155, 0, 1)",!0),vlevel5:b(.618,"rgba( 0, 153, 101, 1)",!0),vlevel6:b(.75,"rgba( 0, 101, 153, 1)",!0),vlevel7:b(1,"rgba( 128, 128, 128, 1)",!0),__collectibleLines:["fans","hlevel1","hlevel2","hlevel3","hlevel4","hlevel5","hlevel6","hlevel7","vlevel1","vlevel2","vlevel3","vlevel4","vlevel5","vlevel6","vlevel7"]},linetoolfibspeedresistancefan:{clonable:!0,fillBackground:!0,transparency:80,grid:{color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,visible:!0}, linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,font:"Verdana",showTopLabels:!0,showBottomLabels:!0,showLeftLabels:!0,showRightLabels:!0,snapTo45Degrees:!0,hlevel1:b(0,"rgba( 128, 128, 128, 1)",!0),hlevel2:b(.25,"rgba( 160, 107, 0, 1)",!0),hlevel3:b(.382,"rgba( 105, 158, 0, 1)",!0),hlevel4:b(.5,"rgba( 0, 155, 0, 1)",!0),hlevel5:b(.618,"rgba( 0, 153, 101, 1)",!0),hlevel6:b(.75,"rgba( 0, 101, 153, 1)",!0),hlevel7:b(1,"rgba( 128, 128, 128, 1)",!0),vlevel1:b(0,"rgba( 128, 128, 128, 1)",!0),vlevel2:b(.25,"rgba( 160, 107, 0, 1)",!0),vlevel3:b(.382,"rgba( 105, 158, 0, 1)",!0),vlevel4:b(.5,"rgba( 0, 155, 0, 1)",!0),vlevel5:b(.618,"rgba( 0, 153, 101, 1)",!0),vlevel6:b(.75,"rgba( 0, 101, 153, 1)",!0),vlevel7:b(1,"rgba( 128, 128, 128, 1)",!0),__collectibleLines:["trendline","hlevel1","hlevel2","hlevel3","hlevel4","hlevel5","hlevel6","hlevel7","vlevel1","vlevel2","vlevel3","vlevel4","vlevel5","vlevel6","vlevel7"]},linetoolfibretracement:{clonable:!0,showCoeffs:!0,showPrices:!0,font:"Verdana",fillBackground:!0,transparency:80,extendLines:!1,horzLabelsAlign:"left",vertLabelsAlign:"middle",reverse:!1,coeffsAsPercents:!1,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},levelsStyle:{linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level1:b(0,"rgba( 128, 128, 128, 1)",!0),level2:b(.236,"rgba( 204, 40, 40, 1)",!0),level3:b(.382,"rgba( 149, 204, 40, 1)",!0),level4:b(.5,"rgba( 40, 204, 40, 1)",!0),level5:b(.618,"rgba( 40, 204, 149, 1)",!0),level6:b(.786,"rgba( 40, 149, 204, 1)",!0),level7:b(1,"rgba( 128, 128, 128, 1)",!0),level8:b(1.618,"rgba( 40, 40, 204, 1)",!0),level9:b(2.618,"rgba( 204, 40, 40, 1)",!0),level10:b(3.618,"rgba( 149, 40, 204, 1)",!0),level11:b(4.236,"rgba( 204, 40, 149, 1)",!0),level12:b(1.272,"rgba( 149, 204, 40, 1)",!1),level13:b(1.414,"rgba( 204, 40, 40, 1)",!1),level16:b(2,"rgba( 40, 204, 149, 1)",!1),level14:b(2.272,"rgba( 149, 204, 40, 1)",!1),level15:b(2.414,"rgba( 40, 204, 40, 1)",!1),level17:b(3,"rgba( 40, 149, 204, 1)",!1),level18:b(3.272,"rgba( 128, 128, 128, 1)",!1),level19:b(3.414,"rgba( 40, 40, 204, 1)",!1),level20:b(4,"rgba( 204, 40, 40, 1)",!1),level21:b(4.272,"rgba( 149, 40, 204, 1)",!1),level22:b(4.414,"rgba( 204, 40, 149, 1)",!1),level23:b(4.618,"rgba( 149, 204, 40, 1)",!1),level24:b(4.764,"rgba( 40, 204, 149, 1)",!1),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11","level12","level13","level14","level15","level16","level17","level18","level19","level20","level21","level22","level23","level24"]},linetoolfibchannel:{clonable:!0,showCoeffs:!0,showPrices:!0,font:"Verdana",fillBackground:!0,transparency:80,extendLeft:!1,extendRight:!1,horzLabelsAlign:"left",vertLabelsAlign:"middle",coeffsAsPercents:!1,levelsStyle:{linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level1:b(0,"rgba( 128, 128, 128, 1)",!0),level2:b(.236,"rgba( 204, 40, 40, 1)",!0),level3:b(.382,"rgba( 149, 204, 40, 1)",!0),level4:b(.5,"rgba( 40, 204, 40, 1)",!0),level5:b(.618,"rgba( 40, 204, 149, 1)",!0), level6:b(.786,"rgba( 40, 149, 204, 1)",!0),level7:b(1,"rgba( 128, 128, 128, 1)",!0),level8:b(1.618,"rgba( 40, 40, 204, 1)",!0),level9:b(2.618,"rgba( 204, 40, 40, 1)",!0),level10:b(3.618,"rgba( 149, 40, 204, 1)",!0),level11:b(4.236,"rgba( 204, 40, 149, 1)",!0),level12:b(1.272,"rgba( 149, 204, 40, 1)",!1),level13:b(1.414,"rgba( 204, 40, 40, 1)",!1),level16:b(2,"rgba( 40, 204, 149, 1)",!1),level14:b(2.272,"rgba( 149, 204, 40, 1)",!1),level15:b(2.414,"rgba( 40, 204, 40, 1)",!1),level17:b(3,"rgba( 40, 149, 204, 1)",!1),level18:b(3.272,"rgba( 128, 128, 128, 1)",!1),level19:b(3.414,"rgba( 40, 40, 204, 1)",!1),level20:b(4,"rgba( 204, 40, 40, 1)",!1),level21:b(4.272,"rgba( 149, 40, 204, 1)",!1),level22:b(4.414,"rgba( 204, 40, 149, 1)",!1),level23:b(4.618,"rgba( 149, 204, 40, 1)",!1),level24:b(4.764,"rgba( 40, 204, 149, 1)",!1),__collectibleLines:["level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11","level12","level13","level14","level15","level16","level17","level18","level19","level20","level21","level22","level23","level24"]},linetoolprojection:{clonable:!0,showCoeffs:!0,font:"Verdana",fillBackground:!0,transparency:80,color1:"rgba( 0, 128, 0, 0.2)",color2:"rgba( 255, 0, 0, 0.2)",linewidth:1,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linestyle:CanvasEx.LINESTYLE_SOLID},level1:w(1,"rgba( 128, 128, 128, 1)",!0)},linetool5pointspattern:{clonable:!0,color:"rgba( 204, 40, 149, 1)",textcolor:"rgba( 255, 255, 255, 1)",fillBackground:!0,backgroundColor:"rgba( 204, 40, 149, 0.5)",font:"Verdana",fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:1},linetoolcypherpattern:{clonable:!0,color:"#CC2895",textcolor:"#FFFFFF",fillBackground:!0,backgroundColor:"#CC2895",font:"Verdana",fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:1},linetooltrianglepattern:{clonable:!0,color:"rgba( 149, 40, 255, 1)",textcolor:"rgba( 255, 255, 255, 1)",fillBackground:!0,backgroundColor:"rgba( 149, 40, 204, 0.5)",font:"Verdana",fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:1},linetoolabcd:{clonable:!0,color:"rgba( 0, 155, 0, 1)",textcolor:"rgba( 255, 255, 255, 1)",font:"Verdana",fontsize:12,bold:!1,italic:!1,linewidth:2},linetoolthreedrivers:{clonable:!0,color:"rgba( 149, 40, 255, 1)",textcolor:"rgba( 255, 255, 255, 1)",fillBackground:!0,backgroundColor:"rgba( 149, 40, 204, 0.5)",font:"Verdana",fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:2},linetoolheadandshoulders:{clonable:!0,color:"rgba( 69, 104, 47, 1)",textcolor:"rgba( 255, 255, 255, 1)",fillBackground:!0,backgroundColor:"rgba( 69, 168, 47, 0.5)",font:"Verdana",fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:2},linetoolfibwedge:{singleChartOnly:!0,clonable:!0,showCoeffs:!0,font:"Verdana",fillBackground:!0,transparency:80,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level1:w(.236,"rgba( 204, 40, 40, 1)",!0),level2:w(.382,"rgba( 149, 204, 40, 1)",!0),level3:w(.5,"rgba( 40, 204, 40, 1)",!0),level4:w(.618,"rgba( 40, 204, 149, 1)",!0), level5:w(.786,"rgba( 40, 149, 204, 1)",!0),level6:w(1,"rgba( 128, 128, 128, 1)",!0),level7:w(1.618,"rgba( 40, 40, 204, 1)",!1),level8:w(2.618,"rgba( 204, 40, 40, 1)",!1),level9:w(3.618,"rgba( 149, 40, 204, 1)",!1),level10:w(4.236,"rgba( 204, 40, 149, 1)",!1),level11:w(4.618,"rgba( 204, 40, 149, 1)",!1),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetoolfibcircles:{clonable:!0,showCoeffs:!0,font:"Verdana",fillBackground:!0,transparency:80,snapTo45Degrees:!0,coeffsAsPercents:!1,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},level1:w(.236,"rgba( 204, 40, 40, 1)",!0),level2:w(.382,"rgba( 149, 204, 40, 1)",!0),level3:w(.5,"rgba( 40, 204, 40, 1)",!0),level4:w(.618,"rgba( 40, 204, 149, 1)",!0),level5:w(.786,"rgba( 40, 149, 204, 1)",!0),level6:w(1,"rgba( 128, 128, 128, 1)",!0),level7:w(1.618,"rgba( 40, 40, 204, 1)",!0),level8:w(2.618,"rgba( 204, 40, 40, 1)",!0),level9:w(3.618,"rgba( 149, 40, 204, 1)",!0),level10:w(4.236,"rgba( 204, 40, 149, 1)",!0),level11:w(4.618,"rgba( 204, 40, 149, 1)",!0),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetoolfibspeedresistancearcs:{clonable:!0,showCoeffs:!0,font:"Verdana",fillBackground:!0,transparency:80,fullCircles:!1,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},level1:w(.236,"rgba( 204, 40, 40, 1)",!0),level2:w(.382,"rgba( 149, 204, 40, 1)",!0),level3:w(.5,"rgba( 40, 204, 40, 1)",!0),level4:w(.618,"rgba( 40, 204, 149, 1)",!0),level5:w(.786,"rgba( 40, 149, 204, 1)",!0),level6:w(1,"rgba( 128, 128, 128, 1)",!0),level7:w(1.618,"rgba( 40, 40, 204, 1)",!0),level8:w(2.618,"rgba( 204, 40, 40, 1)",!0),level9:w(3.618,"rgba( 149, 40, 204, 1)",!0),level10:w(4.236,"rgba( 204, 40, 149, 1)",!0),level11:w(4.618,"rgba( 204, 40, 149, 1)",!0),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetooltrendbasedfibextension:{clonable:!0,showCoeffs:!0,showPrices:!0,font:"Verdana",fillBackground:!0,transparency:80,extendLines:!1,horzLabelsAlign:"left",vertLabelsAlign:"middle",reverse:!1,coeffsAsPercents:!1,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},levelsStyle:{linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level1:b(0,"rgba( 128, 128, 128, 1)",!0),level2:b(.236,"rgba( 204, 40, 40, 1)",!0),level3:b(.382,"rgba( 149, 204, 40, 1)",!0),level4:b(.5,"rgba( 40, 204, 40, 1)",!0),level5:b(.618,"rgba( 40, 204, 149, 1)",!0),level6:b(.786,"rgba( 40, 149, 204, 1)",!0),level7:b(1,"rgba( 128, 128, 128, 1)",!0),level8:b(1.618,"rgba( 40, 40, 204, 1)",!0),level9:b(2.618,"rgba( 204, 40, 40, 1)",!0),level10:b(3.618,"rgba( 149, 40, 204, 1)",!0),level11:b(4.236,"rgba( 204, 40, 149, 1)",!0),level12:b(1.272,"rgba( 149, 204, 40, 1)",!1),level13:b(1.414,"rgba( 204, 40, 40, 1)",!1), level16:b(2,"rgba( 40, 204, 149, 1)",!1),level14:b(2.272,"rgba( 149, 204, 40, 1)",!1),level15:b(2.414,"rgba( 40, 204, 40, 1)",!1),level17:b(3,"rgba( 40, 149, 204, 1)",!1),level18:b(3.272,"rgba( 128, 128, 128, 1)",!1),level19:b(3.414,"rgba( 40, 40, 204, 1)",!1),level20:b(4,"rgba( 204, 40, 40, 1)",!1),level21:b(4.272,"rgba( 149, 40, 204, 1)",!1),level22:b(4.414,"rgba( 204, 40, 149, 1)",!1),level23:b(4.618,"rgba( 149, 204, 40, 1)",!1),level24:b(4.764,"rgba( 40, 204, 149, 1)",!1),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11","level12","level13","level14","level15","level16","level17","level18","level19","level20","level21","level22","level23","level24"]},linetooltrendbasedfibtime:{clonable:!0,showCoeffs:!0,font:"Verdana",fillBackground:!0,transparency:80,horzLabelsAlign:"right",vertLabelsAlign:"bottom",trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},level1:w(0,"rgba( 128, 128, 128, 1)",!0),level2:w(.382,"rgba( 204, 40, 40, 1)",!0),level3:w(.5,"rgba( 149, 204, 40, 1)",!1),level4:w(.618,"rgba( 40, 204, 40, 1)",!0),level5:w(1,"rgba( 40, 204, 149, 1)",!0),level6:w(1.382,"rgba( 40, 149, 204, 1)",!0),level7:w(1.618,"rgba( 128, 128, 128, 1)",!0),level8:w(2,"rgba( 40, 40, 204, 1)",!0),level9:w(2.382,"rgba( 204, 40, 40, 1)",!0),level10:w(2.618,"rgba( 149, 40, 204, 1)",!0),level11:w(3,"rgba( 204, 40, 149, 1)",!0),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetoolschiffpitchfork:{clonable:!0,fillBackground:!0,transparency:80,style:l.Schiff,median:{visible:!0,color:"rgba( 165, 0, 0, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level0:w(.25,"rgba( 160, 107, 0, 1)",!1),level1:w(.382,"rgba( 105, 158, 0, 1)",!1),level2:w(.5,"rgba( 0, 155, 0, 1)",!0),level3:w(.618,"rgba( 0, 153, 101, 1)",!1),level4:w(.75,"rgba( 0, 101, 153, 1)",!1),level5:w(1,"rgba( 0, 0, 153, 1)",!0),level6:w(1.5,"rgba( 102, 0, 153, 1)",!1),level7:w(1.75,"rgba( 153, 0, 102, 1)",!1),level8:w(2,"rgba( 165, 0, 0, 1)",!1),__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolschiffpitchfork2:{clonable:!0,fillBackground:!0,transparency:80,style:l.Schiff2,median:{visible:!0,color:"rgba( 165, 0, 0, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level0:w(.25,"rgba( 160, 107, 0, 1)",!1),level1:w(.382,"rgba( 105, 158, 0, 1)",!1),level2:w(.5,"rgba( 0, 155, 0, 1)",!0),level3:w(.618,"rgba( 0, 153, 101, 1)",!1),level4:w(.75,"rgba( 0, 101, 153, 1)",!1),level5:w(1,"rgba( 0, 0, 153, 1)",!0),level6:w(1.5,"rgba( 102, 0, 153, 1)",!1),level7:w(1.75,"rgba( 153, 0, 102, 1)",!1),level8:w(2,"rgba( 165, 0, 0, 1)",!1),__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolinsidepitchfork:{clonable:!0,fillBackground:!0,transparency:80,style:l.Inside,median:{visible:!0,color:"rgba( 165, 0, 0, 1)",linewidth:1, linestyle:CanvasEx.LINESTYLE_SOLID},level0:w(.25,"rgba( 160, 107, 0, 1)",!1),level1:w(.382,"rgba( 105, 158, 0, 1)",!1),level2:w(.5,"rgba( 0, 155, 0, 1)",!0),level3:w(.618,"rgba( 0, 153, 101, 1)",!1),level4:w(.75,"rgba( 0, 101, 153, 1)",!1),level5:w(1,"rgba( 0, 0, 153, 1)",!0),level6:w(1.5,"rgba( 102, 0, 153, 1)",!1),level7:w(1.75,"rgba( 153, 0, 102, 1)",!1),level8:w(2,"rgba( 165, 0, 0, 1)",!1),__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetool:{frozen:!1,visible:!0},linetoolvisibilities:{intervalsVisibilities:{seconds:!0,secondsFrom:1,secondsTo:59,minutes:!0,minutesFrom:1,minutesTo:59,hours:!0,hoursFrom:1,hoursTo:24,days:!0,daysFrom:1,daysTo:366,weeks:!0,months:!0,ranges:!0}}},o(TradingView.defaultProperties.chartproperties),r()}for(void 0===TradingView.defaultProperties["study_MA@tv-basicstudies"]&&(TradingView.defaultProperties["study_MA@tv-basicstudies"]={description:"Moving Average",shortDescription:"MA",inputs:{length:9,source:"close"},styles:{MovAvg:{visible:!0,color:"rgba( 4, 150, 255, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:u.Line,histogramBase:0,title:"MA"}}}),void 0===TradingView.defaultProperties["study_PivotPointsHighLow@tv-basicstudies"]&&(TradingView.defaultProperties["study_PivotPointsHighLow@tv-basicstudies"]={font:"Arial",fontsize:10,borderColor:"rgba( 83, 143, 31, 1)",backColor:"rgba( 240, 255, 204, 1)",textColor:"rgba( 0, 0, 0, 1)"}),void 0===TradingView.defaultProperties["study_PivotPointsStandard@tv-basicstudies"]&&(i="rgba( 212, 121, 40, 1)",n=!0,s=1,TradingView.defaultProperties["study_PivotPointsStandard@tv-basicstudies"]={_hardCodedDefaultsVersion:1,font:"Arial",fontsize:11,levelsStyle:{showLabels:!0,visibility:{P:n,"S1/R1":n,"S2/R2":n,"S3/R3":n,"S4/R4":n,"S5/R5":n},colors:{P:i,"S1/R1":i,"S2/R2":i,"S3/R3":i,"S4/R4":i,"S5/R5":i},widths:{P:s,"S1/R1":s,"S2/R2":s,"S3/R3":s,"S4/R4":s,"S5/R5":s}}}),void 0===TradingView.defaultProperties["study_ZigZag@tv-basicstudies"]&&(TradingView.defaultProperties["study_ZigZag@tv-basicstudies"]={color:"rgba( 86, 135, 29, 1)",linewidth:2}),void 0===TradingView.defaultProperties["study_ElliottWave@tv-basicstudies"]&&(TradingView.defaultProperties["study_ElliottWave@tv-basicstudies"]={inputs:{},level0:S("rgba( 255, 0, 0, 1)",!1),level1:S("rgba( 0, 128, 0, 1)",!1),level2:S("rgba( 0, 0, 255, 1)",!1),level3:S("rgba( 255, 0, 255, 1)",!1),level4:S("rgba( 0, 128, 255, 1)",!0),level5:S("rgba( 255, 0, 0, 1)",!0),level6:S("rgba( 0, 128, 0, 1)",!0),level7:S("rgba( 0, 0, 255, 1)",!0),level8:S("rgba( 255, 0, 255, 1)",!0)}),void 0===TradingView.defaultProperties["study_LinearRegression@tv-basicstudies"]&&(TradingView.defaultProperties["study_LinearRegression@tv-basicstudies"]={styles:{upLine:{visible:!0,color:"rgba( 0, 0, 255, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},downLine:{visible:!0,color:"rgba( 0, 0, 255, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},baseLine:{visible:!0,color:"rgba( 255, 0, 0, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},extendLines:!0, showPearsons:!0,backgroundColor:"rgba( 153, 21, 21, 0.3)",transparency:70}}),void 0===TradingView.defaultProperties["study_RegressionTrend@tv-basicstudies"]&&(TradingView.defaultProperties["study_RegressionTrend@tv-basicstudies"]={linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,styles:{upLine:{visible:!0,color:"rgba( 0, 0, 255, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},downLine:{visible:!0,color:"rgba( 0, 0, 255, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},baseLine:{visible:!0,color:"rgba( 255, 0, 0, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},extendLines:!1,showPearsons:!0,transparency:70}}),void 0===TradingView.defaultProperties["study_Compare@tv-basicstudies"]&&(TradingView.defaultProperties["study_Compare@tv-basicstudies"]={minTick:"default"}),void 0===TradingView.defaultProperties["study_Overlay@tv-basicstudies"]&&(m="study_Overlay@tv-basicstudies",TradingView.defaultProperties[m]={style:a.STYLE_LINE,showPriceLine:!1,minTick:"default",candleStyle:{upColor:"rgba( 107, 165, 131, 1)",downColor:"rgba( 215, 84, 66, 1)",drawWick:!0,drawBorder:!0,borderColor:"rgba( 55, 134, 88, 1)",borderUpColor:"rgba( 34, 84, 55, 1)",borderDownColor:"rgba( 91, 26, 19, 1)",wickColor:"rgba( 115, 115, 117, 1)",wickUpColor:"rgba( 115, 115, 117, 1)",wickDownColor:"rgba( 115, 115, 117, 1)",barColorsOnPrevClose:!1},hollowCandleStyle:{upColor:"rgba( 107, 165, 131, 1)",downColor:"rgba( 215, 84, 66, 1)",drawWick:!0,drawBorder:!0,borderColor:"rgba( 55, 134, 88, 1)",borderUpColor:"rgba( 34, 84, 55, 1)",borderDownColor:"rgba( 91, 26, 19, 1)",wickColor:"rgba( 115, 115, 117, 1)",wickUpColor:"rgba( 115, 115, 117, 1)",wickDownColor:"rgba( 115, 115, 117, 1)",barColorsOnPrevClose:!1},barStyle:{upColor:"rgba( 107, 165, 131, 1)",downColor:"rgba( 215, 84, 66, 1)",barColorsOnPrevClose:!1,dontDrawOpen:!1,thinBars:!0},lineStyle:{color:"#2196f3",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:2,priceSource:"close",styleType:a.STYLE_LINE_TYPE_SIMPLE},areaStyle:{color1:"#2196f3",color2:"#2196f3",linecolor:"#2196f3",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:3,priceSource:"close",transparency:95},baselineStyle:{baselineColor:"rgba( 117, 134, 150, 1)",topFillColor1:"rgba( 83, 185, 135, 0.05)",topFillColor2:"rgba( 83, 185, 135, 0.05)",bottomFillColor1:"rgba( 235, 77, 92, 0.05)",bottomFillColor2:"rgba( 235, 77, 92, 0.05)",topLineColor:"rgba( 83, 185, 135, 1)",bottomLineColor:"rgba( 235, 77, 92, 1)",topLineWidth:3,bottomLineWidth:3,priceSource:"close",transparency:50,baseLevelPercentage:50},styles:{open:{visible:!0,color:"rgba( 255, 0, 0, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:u.Line,histogramBase:0},high:{visible:!0,color:"rgba( 255, 0, 0, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:u.Line,histogramBase:0},low:{visible:!0,color:"rgba( 255, 0, 0, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:u.Line,histogramBase:0},close:{visible:!0,color:"rgba( 255, 0, 0, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:u.Line,histogramBase:0}}}),y=e.split("."), g=TradingView.defaultProperties,v=0;vn)&&(t=this.m_series.bars().range(i,n),r=this.m_series.priceScale(),s=this.m_series.barColorer(),a={},t.each(function(t,i){var n,o={};o.time=Math.round(t),e(i,o)&&(a.value=i,n=i[TradingView.STYLE_PLOT]?i[TradingView.STYLE_PLOT]:s.barStyle(t,!1,a),i[TradingView.STYLE_PLOT]=n,a.previousValue=i,o.color=n.barColor,o.borderColor=n.barBorderColor,o.wickColor=n.barWickColor,o.hollow=n.isBarHollow,g.m_bars.push(o))},this),0!==this.m_bars.length&&(l=this.m_series.firstValue(),r.barPricesToCoordinates(this.m_bars,l)),this.m_model.timeScale().barIndexesToCoordinates(this.m_bars),this.m_model.selection().isSelected(this.m_series)))for(c=w(i,n),this._selectionData={points:[]},this._selectionData.hittestResult=f.REGULAR,u=0;u=t&&e.y<=i||e.y<=t&&e.y>=i))return new l(l.REGULAR);return null},n.prototype.draw=function(e){var t,i,n,o,r,s,a,l,u,d,p,_,f,m,y,g,v,S;if(null!==this._data&&((t=this._data.isHlineFill)||0!==this._data.points1.length&&0!==this._data.points2.length)){for(i=this._data.timePoints,n=this._data.points1,o=this._data.points2,r=this._data.colors,s=isNumber(this._data.transparency)?this._data.transparency:50,s=Math.min(s,100),s=Math.max(s,0),a={},l=[],d=0;d0&&((f=a[u]||[]).push(l),a[u]=f),l=_?[p]:[]);for(m in a){for(y=a[m],e.beginPath(),g=0;g=0;S--)e.lineTo(v[S].timePoint,v[S].point2)}e.closePath(),e.fillStyle=h.generateColor(m,s),e.fill()}}},o.prototype.update=function(){this._invalidated=!0},o.prototype._plotNames=function(){return this._source.metaInfo().plots.map(function(e){return e.id})},o.prototype._plotIndex1=function(){return null===this._plIndex1&&(this._plIndex1=this._plotNames().indexOf(this._plotAId())+1),this._plIndex1},o.prototype._plotIndex2=function(){return null===this._plIndex2&&(this._plIndex2=this._plotNames().indexOf(this._plotBId())+1),this._plIndex2},o.prototype._updateImpl=function(){var e,t,i,n,o,r,s,a,l,c,u,h,d,_,f,m,y,g,v,S,b,w,P,x,C,T;if(this._points1=[],this._points2=[],this._colorsMap&&(this._colors=[]),this._timePoints=[],this._visible()&&(e=this._source.priceScale(),t=this._source._model.timeScale(),e&&!e.isEmpty()&&!this._source._model.timeScale().isEmpty()&&!(this._source._series.bars().isEmpty()||(this._isHlineFill&&(i=this._source.firstValue(),n=this._source.properties().bands[this._bandAKey],o=this._source.properties().bands[this._bandBKey],this._level1=e.priceToCoordinate(n.value.value(),i),this._level2=e.priceToCoordinate(o.value.value(),i)),null===(r=this._source._model.timeScale().visibleBarsStrictRange())||(s=this._source._series.nearestIndex(r.firstBar(),p.NearestRight),a=this._source._series.nearestIndex(r.lastBar(),p.NearestLeft),(s=this._correctStartBarIndex(s))>a))))){if((l=this._source.data().range(s,a)).size()>0)for(c=l.firstIndex(),u=l.lastIndex(),h=this._source.offset(this._plotAId()),d=this._source.offset(this._plotBId()),_=Math.max(h,d),f=Math.min(h,d),m=c+_,c>(y=this._source.data().firstIndex())&&(m=c<_+y?_+y:c),g=u+f,u>(v=this._source.data().lastIndex())+f&&uu?c+_:m,b=m;b<=g;++b)this._timePoints.push(t.indexToCoordinate(S++)),this._colors&&null!=(w=this._source.data().valueAt(b-f)[this._colorPlotOffset+1])&&this._colors.push(this._colorValues[this._colorsMap[w]].color.value()),this._isHlineFill||(P=this._source.data().valueAt(b-h),x=this._source.data().valueAt(b-d),C=P[this._plotIndex1()],T=x[this._plotIndex2()],this._points1.push(C),this._points2.push(T));i=this._source.firstValue(),e.pricesArrayToCoordinates(this._points1,i),e.pricesArrayToCoordinates(this._points2,i)}},o.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},o.prototype._plotAId=function(){a(!1,"Pure virtual call!")},o.prototype._plotBId=function(){a(!1,"Pure virtual call!")},o.prototype._color=function(){a(!1,"Pure virtual call!")},o.prototype._transparency=function(){a(!1,"Pure virtual call!")},o.prototype._visible=function(){a(!1,"Pure virtual call!")},o.prototype._correctStartBarIndex=function(e){return e},inherit(r,o),r.prototype._plotAId=function(){return this._source.properties().area[0].name.value()},r.prototype._plotBId=function(){return this._source.properties().area[1].name.value()},r.prototype._color=function(){return this._source.properties().areaBackground.backgroundColor.value()},r.prototype._transparency=function(){var e=this._source.properties().areaBackground.transparency.value();return d(e,0,100)},r.prototype._visible=function(){return this._source.properties().areaBackground.fillBackground.value()},inherit(s,o),s.prototype._initBandIndexes=function(e,t){var i,n;for(this._bandAKey=null,this._bandBKey=null,i=0;i=2},n.prototype._calculateWidth=function(e){var t,i,n,o,r,s,a,l,c,u,h,d,p,_,f,m,y,g,v,S;if(!this.sourceIsReady(e))return null;if((t=this.canvas().getContext("2d")).font="12px Verdana",i=!!e.properties().showPrices&&e.properties().showPrices.value(),n=!!e.properties().coeffsAsPercents&&e.properties().coeffsAsPercents.value(),o=e.properties().showCoeffs.value(),r=e.priceScale(),a=(s=this.points(e))[0],l=s[1],!a||!l)return null;if(c=!1,(u=e.properties()).reverse&&u.reverse.value()&&(c=u.reverse.value()),h=this.priceRange(e,c),d=this.startPoint(e,c).price,null===(p=e.ownerSource().firstValue()))return 0;for(_=0,f=[],m=1;m<=this.levelsCount();m++)g=d+(y=u["level"+m].coeff.value())*h,v="",o&&(v+=n?this._percentageFormatter.format(Math.round(1e4*y)/100):this._numericFormatter.format(y)),i&&(v+="("+r.formatPrice(g,p)+")"),S={text:v,left:_,width:t.measureText(v).width+4},f.push(S),_+=S.width;return{totalWidth:_,cells:f}},n.prototype._effectiveState=function(e){var t,i,n,o={},r=e.properties();for(r.showPrices&&(o.showPrices=r.showPrices.value()),r.coeffsAsPercents&&(o.coeffsAsPercents=r.coeffsAsPercents.value()),o.showCoeffs=r.showCoeffs.value(),e.priceScale()&&e.priceScale().formatter().state&&(o.formatter=e.priceScale().formatter().state()),r.reverse&&(o.reverse=r.reverse.value()),o.p1=e.points()[0],o.p2=e.points()[1],3===e.points().length&&(o.p3=e.points()[2]),o.items=[], t=1;t<=this.levelsCount();t++)n={coeff:(i=r["level"+t]).coeff.value(),color:i.color.value()},o.items.push(n);return o},n.prototype._findEmptyRow=function(e){for(var t,i=0;this._rowsToSources[i];)i++;return this._rowsToSources[i]=e,i>=this._actualCapacity&&(this._actualCapacity++,t=this.canvas(),TradingView.resizeCanvas(t,this._actualWidth,n.ROW_HEIGHT*this._actualCapacity)),i},n.prototype._repaintSource=function(e,t,i){var o,r,s=n.ROW_HEIGHT*i.row,a=this.canvas().getContext("2d");for(a.clearRect(0,s,this._actualWidth,n.ROW_HEIGHT),a.textBaseline="bottom",a.font="12px Verdana",s+=n.ROW_HEIGHT,o=0;othis._actualWidth&&(TradingView.resizeCanvas(this.canvas(),r.totalWidth,n.ROW_HEIGHT*this._actualCapacity),this._actualWidth=r.totalWidth),t=this._sourcesToRow[e.id()],this._repaintSource(r,o,t),this._sourcesToRow[e.id()].effectiveState=o,this._sourcesToRow[e.id()].preparedCells=r):this._sourcesToRow[e.id()].effectiveState=null),this._sourcesToRow[e.id()]},e.exports=n},xWfy:function(e,t,i){"use strict";function n(){return new c}function o(e){return new c("state",e)}function r(e){var t,i,n,o,r=new Set;for(t=0,i=l.d;t0&&Object(l.e)(this)},e}()},xdS3:function(e,t,i){},xnA2:function(e,t,i){"use strict";function n(){a.call(this)}function o(e,t){this._constructor="LineToolFibChannel";var s=t||this.createPropertiesObject("linetoolfibchannel");r.call(this,e,s),this.version=o.version,e._fibChannelLabelsCache||(e._fibChannelLabelsCache=new n),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)}var r=i("Ss5c").LineDataSource,s=i("5rJj"),a=i("xUGI"),l=i("hayr").propertyPages;inherit(n,a),n.prototype.levelsCount=function(){return o.LevelsCount},inherit(o,r),o.LevelsCount=24,o.version=2,o.prototype.levelsCount=function(){return o.LevelsCount},o.prototype.migrateVersion=function(e,t,i){i.properties.removeProperty("reverse")},o.prototype.pointsCount=function(){return 3},o.prototype.title=function(){return"Fib Channel"},o.prototype.name=function(){return"Fib Channel"},o.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},o.prototype.createPropertiesObject=function(e,t,i){return new s(e,t,i,{range:[1,24],names:["coeff","color","visible"]})},o.prototype.getStylesPropertyPage=function(){ return l.LineToolFibChannelStylesPropertyPage},t.LineToolFibChannel=o},xrEm:function(e,t,i){},"xz+e":function(e,t,i){"use strict";function n(e,t){var o=t||new p("linetoolelliott");h.call(this,e,o),this.version=n.version,i.e("lt-pane-views").then(function(e){var t=i("Ht/7").ElliottLabelsPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}function o(e,t){n.call(this,e,t)}function r(e,t){this._constructor="LineToolElliottImpulse";var i=t||new p("linetoolelliottimpulse");o.call(this,e,i)}function s(e,t){this._constructor="LineToolElliottTriangle";var i=t||new p("linetoolelliotttriangle");o.call(this,e,i)}function a(e,t){this._constructor="LineToolElliottTripleCombo";var i=t||new p("linetoolelliotttriplecombo");o.call(this,e,i)}function l(e,t){n.call(this,e,t)}function c(e,t){this._constructor="LineToolElliottCorrection";var i=t||new p("linetoolelliottcorrection");l.call(this,e,i)}function u(e,t){this._constructor="LineToolElliottLineToolElliottDoubleCombo";var i=t||new p("linetoolelliottdoublecombo");l.call(this,e,i)}var h=i("Ss5c").LineDataSource,d=i("7KDR").Action,p=i("Ocx9").DefaultProperty,_=i("hayr").propertyPages;inherit(n,h),n.version=4,n.migrateState=function(e){var t={0:11,1:10,2:9,3:8,4:7,5:6,6:5,7:4,8:3},i={0:11,1:8};"LineToolElliottSubminuette"===e.type&&(e.type="LineToolElliottImpulse",e.state.degree=t[e.state.wavesize]),"LineToolElliottMinor"===e.type&&(e.type="LineToolElliottImpulse",e.state.degree=t[e.state.wavesize]),"LineToolElliottCircle"===e.type&&(e.type="LineToolElliottImpulse",e.state.degree=t[e.state.wavesize]),"LineToolElliottMinorRetr"===e.type&&(e.type="LineToolElliottCorrection",e.state.degree=i[e.state.wavesize]),"LineToolElliottMajorRetr"===e.type&&(e.type="LineToolElliottCorrection",e.state.degree=i[e.state.wavesize])},n.prototype.migrateVersion=function(e,t,i){if(i.properties.hasChild("background")&&i.properties.removeProperty("background"),i.properties.hasChild("backgroundColor")&&i.properties.removeProperty("backgroundColor"),i.properties.hasChild("showBackground")&&i.properties.removeProperty("showBackground"),1===e){var n=Object.assign({},this._timePoint[0]);this._timePoint.unshift(n),this._points.length>0&&(n=Object.assign({},this._points[0]),this._points.unshift(n))}},n.prototype.applyTemplate=function(e){delete e.background,delete e.backgroundColor,delete e.showBackground,h.prototype.applyTemplate.call(this,e)},n.prototype.title=function(){return"Elliott Labels"},n.prototype.name=function(){return"Elliott Labels"},n.degrees=[window.t("Supermillennium"),window.t("Millennium"),window.t("Submillennium"),window.t("Grand Supercycle"),window.t("Supercycle"),window.t("Cycle"),window.t("Primary"),window.t("Intermediate"),window.t("Minor",{context:"wave"}),window.t("Minute"),window.t("Minuette"),window.t("Subminuette"),window.t("Micro"),window.t("Submicro"),window.t("Miniscule")],n.prototype.additionalActions=function(e){var t=this,i=new d({label:window.t("Degree"),subItems:n.degrees.map(function(i,n){return new d({label:i,checkable:!0, checked:t.properties().degree.value()===n,onExecute:function(){e.setProperty(t.properties().degree,n,"Change Elliott Degree")}})})});return[i]},n.prototype.label=function(e){var t=n.degrees.length-this.properties().degree.value()-1,i=Math.floor(t/3),o=t%3,r=4*Math.floor(i),s=!!(i%2),a=["","brackets","circle"][o],l=this.labelsGroup(),c=l[i][e];return{fontIncrease:r,bold:s,decoration:a,label:c}},n.prototype.getStylesPropertyPage=function(){return _.LineToolElliottStylesPropertyPage},n.prototype.getDegrees=function(){return n.degrees},inherit(o,n),o.prototype.pointsCount=function(){return 6},inherit(r,o),r._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"]],r.prototype.labelsGroup=function(){return r._labelsGroups},inherit(s,o),s._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"]],s.prototype.labelsGroup=function(){return s._labelsGroups},inherit(a,o),a._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"]],a.prototype.labelsGroup=function(){return a._labelsGroups},inherit(l,n),l.prototype.pointsCount=function(){return 4},inherit(c,l),c._labelsGroups=[["0","A","B","C"],["0","a","b","c"],["0","A","B","C"],["0","a","b","c"],["0","A","B","C"]],c.prototype.labelsGroup=function(){return c._labelsGroups},inherit(u,l),u._labelsGroups=[["0","W","X","Y"],["0","w","x","y"],["0","W","X","Y"],["0","w","x","y"],["0","W","X","Y"]],u.prototype.labelsGroup=function(){return u._labelsGroups},t.LineToolElliott=n,t.LineToolElliottImpulse=r,t.LineToolElliottTriangle=s,t.LineToolElliottTripleCombo=a,t.LineToolElliottCorrection=c,t.LineToolElliottDoubleCombo=u},yENF:function(e,t,i){"use strict";function n(e){o.call(this,e)}var o=i("c0/O").PaneRendererAbstractShape;inherit(n,o),n.prototype.drawShape=function(e){var t,i,n,o,r,s,a,l,c,u,h;for(e.lineWidth=2,t=this.width,i=this.height,n=this._vertOffset,r=!1,s=0,a=this.items.length;s=1e-15&&e<1?e.toFixed(15).replace(/\.?0+$/,""):String(e)},e}()},zZ5f:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolFibSpeedResistanceFan";var n=t||this.createPropertiesObject("linetoolfibspeedresistancefan");o.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)}var o=i("Ss5c").LineDataSource,r=i("5rJj"),s=i("hayr").propertyPages;inherit(n,o),n.prototype.pointsCount=function(){return 2},n.prototype.title=function(){return"Fib Speed Resistance Fan"},n.prototype.name=function(){return"Fib Speed Resistance Fan"},n.prototype.processErase=function(e,t){var i="h"===t.type?"hlevel"+t.index:"vlevel"+t.index,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},n.prototype.createPropertiesObject=function(e,t,i){return new r(e,t,i,{range:[1,7],prefixes:["h","v"],names:["coeff","color","visible"]})},n.prototype.getStylesPropertyPage=function(){return s.LineToolFibSpeedResistanceFanStylesPropertyPage},t.LineToolFibSpeedResistanceFan=n},ziJ5:function(e,t,i){"use strict";(function(e){function n(e){this._line=e,this._data={bodyText:"position",quantityText:"0"},this._closeEnabled=!0,this._direction="buy",this._profitState="neutral"}function o(e){return null==e?e="":e+="",e}function r(e,t){var o,r,a,l,c,d;this._adapter=new n(this),this._constructor="LineToolPosition", o=t||new u("linetoolposition",void 0,!1,!1),s.call(this,e,o),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),a=null!==(r=e.mainSeries().symbolInfo())?r.pricescale:100,l=null!==r&&r.fractional?r.minmov:1,c=null!==r&&r.fractional,d=null!==r?r.minmove2:void 0,this._formatter=new h(a,l,c,d)}var s=i("QIuV"),a=i("Ss5c").LineDataSource,l=i("RTYN").PositionAveragePriceAxisView,c=i("jkoZ"),u=i("Ocx9").DefaultProperty,h=i("kcTO").PriceFormatter;n.prototype.setDirection=function(e){return this._direction=e,this._line.updateAllViewsAndRedraw(),this},n.prototype.setProfitState=function(e){return this._profitState=e,this._line.updateAllViewsAndRedraw(),this},n.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},n.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},n.prototype.getText=function(){return this._data.bodyText},n.prototype.setText=function(e){return this._data.bodyText=e||"",this._line.updateAllViewsAndRedraw(),this},n.prototype.setTooltip=function(e){return this._line.properties().tooltip.setValue(o(e)),this},n.prototype.getTooltip=function(){return this._line.properties().tooltip.value()},n.prototype.setProtectTooltip=function(e){return this._line.properties().protectTooltip.setValue(o(e)),this},n.prototype.getProtectTooltip=function(){return this._line.properties().protectTooltip.value()},n.prototype.setCloseTooltip=function(e){return this._line.properties().closeTooltip.setValue(o(e)),this},n.prototype.getCloseTooltip=function(){return this._line.properties().closeTooltip.value()},n.prototype.setReverseTooltip=function(e){return this._line.properties().reverseTooltip.setValue(o(e)),this},n.prototype.getReverseTooltip=function(){return this._line.properties().reverseTooltip.value()},n.prototype.getQuantity=function(){return this._data.quantityText},n.prototype.setQuantity=function(e){return this._data.quantityText=e||"",this._line.updateAllViewsAndRedraw(),this},n.prototype.getExtendLeft=function(){var e=this._line.properties().extendLeft.value();return"inherit"===e?this._line._model.properties().tradingProperties.extendLeft.value():e},n.prototype.setExtendLeft=function(e){return this._line.properties().extendLeft.setValue(e),this},n.prototype.getLineLength=function(){var e=this._line.properties().lineLength.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineLength.value():e},n.prototype.setLineLength=function(e){return this._line.properties().lineLength.setValue(Math.max(0,Math.min(e,100))),this},n.prototype.getLineColor=function(){var e=this._line.properties(),t="buy"===this._direction?e.lineBuyColor:e.lineSellColor;return t.value()}, n.prototype.setLineColor=function(e){return"buy"===this._direction?this.setLineBuyColor(e):this.setLineSellColor(e),this},n.prototype.setLineBuyColor=function(e){return this._line.properties().lineBuyColor.setValue(e),this},n.prototype.setLineSellColor=function(e){return this._line.properties().lineSellColor.setValue(e),this},n.prototype.getLineStyle=function(){var e=this._line.properties().lineStyle.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineStyle.value():e},n.prototype.setLineStyle=function(e){return this._line.properties().lineStyle.setValue(e),this},n.prototype.getLineWidth=function(){var e=this._line.properties().lineWidth.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineWidth.value():e},n.prototype.setLineWidth=function(e){return this._line.properties().lineWidth.setValue(e),this},n.prototype.getBodyBorderColor=function(){var e=this._line.properties(),t="buy"===this._direction?e.bodyBorderBuyColor:e.bodyBorderSellColor;return t.value()},n.prototype.setBodyBorderColor=function(e){return"buy"===this._direction?this.setBodyBorderBuyColor(e):this.setBodyBorderSellColor(e),this},n.prototype.setBodyBorderBuyColor=function(e){return this._line.properties().bodyBorderBuyColor.setValue(e),this},n.prototype.setBodyBorderSellColor=function(e){return this._line.properties().bodyBorderSellColor.setValue(e),this},n.prototype.getBodyBackgroundColor=function(){return c.getColorFromProperties(this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency)},n.prototype.setBodyBackgroundColor=function(e){return c.setColorToProperties(e,this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency),this},n.prototype.getBodyTextColor=function(){var e=this._line.properties(),t="positive"===this._profitState?e.bodyTextPositiveColor:"negative"===this._profitState?e.bodyTextNegativeColor:e.bodyTextNeutralColor;return t.value()},n.prototype.setBodyTextColor=function(e){return"positive"===this._profitState?this.setBodyTextPositiveColor(e):"negative"===this._profitState?this.setBodyTextNegativeColor(e):this.setBodyTextNeutralColor(e),this},n.prototype.setBodyTextPositiveColor=function(e){return this._line.properties().bodyTextPositiveColor.setValue(e),this},n.prototype.setBodyTextNegativeColor=function(e){return this._line.properties().bodyTextNegativeColor.setValue(e),this},n.prototype.setBodyTextNeutralColor=function(e){return this._line.properties().bodyTextNeutralColor.setValue(e),this},n.prototype.getBodyFont=function(){return c.getFontFromProperties(this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic)},n.prototype.setBodyFont=function(e){return c.setFontToProperties(e,this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic),this},n.prototype.getQuantityBorderColor=function(){ var e=this._line.properties(),t="buy"===this._direction?e.quantityBorderBuyColor:e.quantityBorderSellColor;return t.value()},n.prototype.setQuantityBorderColor=function(e){return"buy"===this._direction?this.setQuantityBorderBuyColor(e):this.setQuantityBorderSellColor(e),this},n.prototype.setQuantityBorderBuyColor=function(e){return this._line.properties().quantityBorderBuyColor.setValue(e),this},n.prototype.setQuantityBorderSellColor=function(e){return this._line.properties().quantityBorderSellColor.setValue(e),this},n.prototype.getQuantityBackgroundColor=function(){var e=this._line.properties(),t="buy"===this._direction?e.quantityBackgroundBuyColor:e.quantityBackgroundSellColor;return t.value()},n.prototype.setQuantityBackgroundColor=function(e){return"buy"===this._direction?this.setQuantityBackgroundBuyColor(e):this.setQuantityBackgroundSellColor(e),this},n.prototype.setQuantityBackgroundBuyColor=function(e){return this._line.properties().quantityBackgroundBuyColor.setValue(e),this},n.prototype.setQuantityBackgroundSellColor=function(e){return this._line.properties().quantityBackgroundSellColor.setValue(e),this},n.prototype.getQuantityTextColor=function(){return c.getColorFromProperties(this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency)},n.prototype.setQuantityTextColor=function(e){return c.setColorToProperties(e,this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency),this},n.prototype.getQuantityFont=function(){return c.getFontFromProperties(this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic)},n.prototype.setQuantityFont=function(e){return c.setFontToProperties(e,this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic),this},n.prototype.getReverseButtonBorderColor=function(){var e=this._line.properties(),t="buy"===this._direction?e.reverseButtonBorderBuyColor:e.reverseButtonBorderSellColor;return t.value()},n.prototype.setReverseButtonBorderColor=function(e){return"buy"===this._direction?this.setReverseButtonBorderBuyColor(e):this.setReverseButtonBorderSellColor(e),this},n.prototype.setReverseButtonBorderBuyColor=function(e){return this._line.properties().reverseButtonBorderBuyColor.setValue(e),this},n.prototype.setReverseButtonBorderSellColor=function(e){return this._line.properties().reverseButtonBorderSellColor.setValue(e),this},n.prototype.getReverseButtonBackgroundColor=function(){return c.getColorFromProperties(this._line.properties().reverseButtonBackgroundColor,this._line.properties().reverseButtonBackgroundTransparency)},n.prototype.setReverseButtonBackgroundColor=function(e){return c.setColorToProperties(e,this._line.properties().reverseButtonBackgroundColor,this._line.properties().reverseButtonBackgroundTransparency),this},n.prototype.getReverseButtonIconColor=function(){ var e=this._line.properties(),t="buy"===this._direction?e.reverseButtonIconBuyColor:e.reverseButtonIconSellColor;return t.value()},n.prototype.setReverseButtonIconColor=function(e){return"buy"===this._direction?this.setReverseButtonIconBuyColor(e):this.setReverseButtonIconSellColor(e),this},n.prototype.setReverseButtonIconBuyColor=function(e){return this._line.properties().reverseButtonIconBuyColor.setValue(e),this},n.prototype.setReverseButtonIconSellColor=function(e){return this._line.properties().reverseButtonIconSellColor.setValue(e),this},n.prototype.getCloseButtonBorderColor=function(){var e=this._line.properties(),t="buy"===this._direction?e.closeButtonBorderBuyColor:e.closeButtonBorderSellColor;return t.value()},n.prototype.setCloseButtonBorderColor=function(e){return"buy"===this._direction?this.setCloseButtonBorderBuyColor(e):this.setCloseButtonBorderSellColor(e),this},n.prototype.setCloseButtonBorderBuyColor=function(e){return this._line.properties().closeButtonBorderBuyColor.setValue(e),this},n.prototype.setCloseButtonBorderSellColor=function(e){return this._line.properties().closeButtonBorderSellColor.setValue(e),this},n.prototype.getCloseButtonBackgroundColor=function(){return c.getColorFromProperties(this._line.properties().closeButtonBackgroundColor,this._line.properties().closeButtonBackgroundTransparency)},n.prototype.setCloseButtonBackgroundColor=function(e){return c.setColorToProperties(e,this._line.properties().closeButtonBackgroundColor,this._line.properties().closeButtonBackgroundTransparency),this},n.prototype.getCloseButtonIconColor=function(){var e=this._line.properties(),t="buy"===this._direction?e.closeButtonIconBuyColor:e.closeButtonIconSellColor;return t.value()},n.prototype.setCloseButtonIconColor=function(e){return"buy"===this._direction?this.setCloseButtonIconBuyColor(e):this.setCloseButtonIconSellColor(e),this},n.prototype.setCloseButtonIconBuyColor=function(e){return this._line.properties().closeButtonIconBuyColor.setValue(e),this},n.prototype.setCloseButtonIconSellColor=function(e){return this._line.properties().closeButtonIconSellColor.setValue(e),this},n.prototype.block=function(){this._blocked=!0,this._line.updateAllViewsAndRedraw()},n.prototype.unblock=function(){this._blocked=!1,this._line.updateAllViewsAndRedraw()},n.prototype.isFunction=function(e){return"function"==typeof e},n.prototype.onReverse=function(e,t){return t?this.isFunction(t)&&(this._onReverseData=e,this._onReverseCallback=t):this.isFunction(e)&&(this._onReverseCallback=e),this},n.prototype.callOnReverse=function(){this.isFunction(this._onReverseCallback)&&this._onReverseCallback.call(this,this._onReverseData)},n.prototype.isOnReverseCallbackPresent=function(){return this.isFunction(this._onReverseCallback)},n.prototype.onClose=function(e,t){return t?this.isFunction(t)&&(this._onCloseData=e,this._onCloseCallback=t):this.isFunction(e)&&(this._onCloseCallback=e),this},n.prototype.setCloseEnabled=function(e){return this._closeEnabled===e?this:(this._closeEnabled=e, this._onCloseCallback&&this._line.updateAllViewsAndRedraw(),this)},n.prototype.isCloseEnabled=function(){return this._closeEnabled},n.prototype.callOnClose=function(){this.isFunction(this._onCloseCallback)&&this._closeEnabled&&this._onCloseCallback.call(this,this._onCloseData)},n.prototype.isOnCloseCallbackPresent=function(){return this._closeEnabled&&this.isFunction(this._onCloseCallback)},n.prototype.onModify=function(e,t){return t?this.isFunction(t)&&(this._onModifyData=e,this._onModifyCallback=t):this.isFunction(e)&&(this._onModifyCallback=e),this},n.prototype.callOnModify=function(){this.isFunction(this._onModifyCallback)&&this._onModifyCallback.call(this,this._onModifyData)},n.prototype.onContextMenu=function(e,t){return t?this.isFunction(t)&&(this._onContextMenuData=e,this._onContextMenuCallback=t):this.isFunction(e)&&(this._onContextMenuCallback=e),this},n.prototype.shouldShowContextMenu=function(){return this.isFunction(this._onContextMenuCallback)},n.prototype.callOnContextMenu=function(){if(this.isFunction(this._onContextMenuCallback))return this._onContextMenuCallback.call(this,this._onContextMenuData)},n.prototype.remove=function(){this._line._model.removeSource(this._line),delete this._line},inherit(r,s),r.prototype.setPoint=function(e,t,i){this._points[e]=t,this.normalizePoints()},r.prototype.addPoint=function(e,t){return this._points.push(e),this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0},r.prototype.title=function(){return"Position"},r.prototype.name=function(){return"Position"},r.prototype.createPriceAxisView=function(e){return this._priceAxisView=new l(this,{pointIndex:e,backgroundPropertyGetter:this._adapter.getLineColor.bind(this._adapter)}),this._priceAxisView},r.prototype.paneViews=function(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showPositions.value()?a.prototype.paneViews.call(this):null},r.prototype.priceAxisViews=function(t,i){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showPositions.value()?a.prototype.priceAxisViews.call(this,t,i):null},r.prototype.hasContextMenu=function(){return this._adapter.shouldShowContextMenu()},r.prototype.contextMenuItems=function(){return this._adapter.callOnContextMenu()},r.prototype.formatter=function(){return this._formatter},t.LineToolPosition=r}).call(this,i("Kxc7"))},zqZp:function(e,t,i){"use strict";function n(e,t){this._constructor="LineToolPriceLabel";var n=t||new r("linetoolpricelabel");o.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)}var o=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,s=i("hayr").propertyPages;inherit(n,o),n.prototype.pointsCount=function(){return 1},n.prototype.title=function(){return"Price Label"},n.prototype.name=function(){return"Price Label"},n.prototype.getStylesPropertyPage=function(){ return s.LineToolPriceLabelStylesPropertyPage},t.LineToolPriceLabel=n}},[["u8U4","runtime","vendors"]]]);