(window.webpackJsonp=window.webpackJsonp||[]).push([["library"],{"+6II":function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=(i("EsMY"),0),o=0,s=0;function a(){clearTimeout(r),clearTimeout(o),clearTimeout(s)}var l,c="tooltip-root-element";function u(){var e=document.getElementById(c);e?l=e:((l=document.createElement("div")).id=c,document.body.appendChild(l))}function h(){l&&(l.innerHTML="")}"interactive"===document.readyState?u():document.addEventListener("DOMContentLoaded",u);var d=i("Eyy1"),p={default:"",white:"theme-white","round-shadow":"theme-round-shadow"},_=Object.keys(p);var f=i("CPmC"),m=i("/DW5"),v=i("gWrr"),y=i("Ialn"),g=(i("HbRj"),i("XAms")),b=i("Wo0S");function S(e){var t=e.getAttribute("title");return t&&(Object(f.b)(e,"text",t),e.removeAttribute("title")),Object(f.a)(e,"text")||""}function w(e){var t,i=L.cloneNode(!0),n=A(i),r=e.content;switch(r.type){case"element":n.innerHTML="",n.appendChild(r.data);break;case"html":n.innerHTML=r.data;break;case"text":if(e.hotkey){var o=k.cloneNode(!0);o.innerText=r.data,n.appendChild(o)}else n.innerText=r.data}if(e.hotkey){var s="none"!==r.type,a=O.cloneNode(!0),l=Object(m.a)(e.hotkey),c=l.keys.map((function(e){return''+e+""}));a.innerHTML=(t=l.text).format.apply(t,c).replace(/\s\+\s/g,'+'),n.classList.add(b["common-tooltip__body--with-hotkey"]),s&&a.classList.add(b["common-tooltip__hotkey-block--divider"]),n.appendChild(a)}return i.addEventListener("contextmenu",g.a),i}function P(e,t){var i=t.rect;if(i){!function(e,t){var i,n=_.includes(t)?p[t]:"";(i=e.classList).remove.apply(i,_.map((function(e){return p[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);var n=A(e);n.classList.toggle(b["common-tooltip__body--width_wide"],Boolean(t.wide)),n.classList.toggle(b["common-tooltip__body--no-padding"],Boolean(t.noPadding)),n.classList.toggle(b["common-tooltip__body--width_narrow"],Boolean(t.narrow)),n.classList.toggle(b["common-tooltip__body--no-buttons"],!0),e.classList.toggle(b["common-tooltip--no-pointer-events"],!Modernizr.pointerevents),n.style.left=x(0),n.style.width=x(n.clientWidth+(Boolean(t.noPadding)?0:2));var r=document.body.clientWidth,o=window.innerHeight,s=t.vertical,a=t.extendMargin||s&&i.w<20||!s&&i.h<20;e.classList.toggle(b["common-tooltip--farther"],a),e.classList.toggle(b["common-tooltip--vertical"],s),e.classList.toggle(b["common-tooltip--horizontal"],!s);var l=e.querySelector("."+b["common-tooltip__ear-holder"]),c="";if(s){e.style.left=x(i.x+i.w),e.style.top=x(i.y-(e.offsetHeight-i.h)/2);var u=(e.querySelector(":last-child")||n).getBoundingClientRect().right+10>r;e.classList.toggle(b["common-tooltip--direction_reversed"],u),e.classList.toggle(b["common-tooltip--direction_normal"],!u),c=u?"after":"before",Object(y.isRtl)()?(c=t.otr?"after":c,c=t.otl?"before":c):(c=t.otr?"before":c,c=t.otl?"after":c), l.classList.toggle(b["common-tooltip__ear-holder--before"],"before"===c),l.classList.toggle(b["common-tooltip__ear-holder--after"],"after"===c),"after"===c&&(e.style.left="auto",e.style.right=x(r-i.x))}else{var h=i.x-(n.offsetWidth-i.w)/2,d=r-10-e.offsetWidth,f=Math.max(10,Math.min(h,d));e.style.bottom=x(o-i.y),e.style.left=x(f);u=d\n\t\t
\n\t\t\t
\n\t\t
\n\t\t
\n\t\n',I='\n\t
\n',M='\n\t
\n',L=Object(v.b)(T),O=Object(v.b)(I),k=Object(v.b)(M);function A(e){return e.querySelector("."+b["common-tooltip__body"])}var E=i("lxNp");i.d(t,"showOnElement",(function(){return N})),i.d(t,"show",(function(){return F})),i.d(t,"updateTooltipText",(function(){return j})),i.d(t,"hide",(function(){return W}));var V=!1,D=null,B=null;Modernizr.mobiletouch||document.addEventListener("mouseover",(function(e){for(var t=e.target,i=e.currentTarget,n=function(e,t,i){var n=[];for(;e&&e!==t;)e.classList&&e.classList.contains(i)&&n.push(e),e=e.parentElement||(r=e.parentNode)&&(r.nodeType===Node.ELEMENT_NODE?r:null);var r;return n}(t,i,"apply-common-tooltip"),r=function(t){if("buttons"in e){if(1&e.buttons)return"continue"}else if(1===e.which)return"continue";var i=function(){return N(t)};if(i()){var n=function(){t.removeEventListener("common-tooltip-update",i),t.removeEventListener("mouseleave",n),t.removeEventListener("mousedown",n),document.removeEventListener("scroll",n),B&&(B.destroy(),B=null),W()};return t.addEventListener("common-tooltip-update",i),t.addEventListener("mouseleave",n),t.addEventListener("mousedown",n),document.addEventListener("scroll",n),null===B&&(B=Object(E.createGroup)({desc:"Tooltip"})).add({desc:"Hide",hotkey:27,handler:n}),"break"}},o=0,s=n;o'},"+hLl":function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Brush");function s(e,t){this._constructor="LineToolBrush";var r=t||s.createProperties();n.call(this,e,r),this._finished=!1,i.e("lt-pane-views").then(function(e){var t=i("00XE").BrushPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return-1},s.prototype.finished=function(){return this._finished},s.prototype.finish=function(){this._finished=!0,this._lastPoint=null,this.normalizePoints(),this.createServerPoints()},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Brush"},s.prototype.hasEditableCoordinates=function(){return!1},s.prototype.percentDistance=function(e,t){return Math.abs((t-e)/e)},s.prototype.addPoint=function(e){if(this._finished)return!0;if(this._lastPoint=null,this._points.length>0){var t=this._points[this._points.length-1],i=this.pointToScreenPoint(t)[1];if(this.pointToScreenPoint(e)[1].subtract(i).length()<2)return this._finished}return n.prototype.addPoint.call(this,e),this._finished},s.prototype.restorePoints=function(e,t,i){n.prototype.restorePoints.call(this,e,t,i),this._finished=!0},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("ZSes").BrushDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolbrush",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolBrush=s},"+q2u":function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererCrossShape",(function(){return s}));var n=i("mrSG"),r=i("2WC2"),o=i("aO4+"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShape=function(e,t,i){var n=i.width,r=i.height,o=i.x-n/2,s=i.vertOffset,a=i.y-r/2+s,l=t.pixelRatio,c=this._lineWidth(t),u=c%2?.5:0,h=Math.round(o*l),d=Math.round((o+n)*l);(d-h)%2!=c%2&&(d+=1);var p=Math.floor((h+d)/2)+u,_=Math.round(a*l),f=Math.round((a+r)*l);(f-_)%2!=c%2&&(f+=1);var m=Math.floor((_+f)/2)+u;e.moveTo(p,_),e.lineTo(p,f),e.moveTo(h,m),e.lineTo(d,m)}, t.prototype._calcBoundingBox=function(t){var i=t.width,n=t.height,r=t.x-i/2,s=t.vertOffset,a=t.y-n/2+s,l=r,c=r+i,u=a,h=a+n,d=new o.Point(l,u),p=new o.Point(c,h),_=Object(o.box)(d,p),f=e.prototype._calcBoundingBox.call(this,t);return f&&(_=this._unionBox(_,f)),_},t}(r.c)},"/+9u":function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("jCNj");function r(e,t){void 0===t&&(t=Date.now());var i=Object(n.get_timezone)(e).offset_utc(t),r="",o=i/1e3/60/60;o%1&&(r=":"+o%1*60);return{offset:i,string:"UTC"+(o>0?"+"+(o-o%1)+r:0===o?"":String(o-o%1+r))}}},"//lZ":function(e,t,i){"use strict";i.r(t),i.d(t,"doAnimate",(function(){return s}));var n=i("mrSG");var r={from:0,duration:250,easing:i("9uLv").easingFunc.easeOutCubic},o=function(){function e(e){var t=this;this._doing=!0,this._completed=!1,this._options=Object(n.__assign)(Object(n.__assign)({},r),e);var i=performance.now();window.requestAnimationFrame((function(e){t._animation(i,t._options.from,e)}))}return e.prototype.stop=function(){this._doing=!1},e.prototype.completed=function(){return this._completed},e.prototype._animation=function(e,t,i){var n=this;if(this._doing){var r,o,s,a=(i=!i||i<1e12?performance.now():i)-e,l=a>=this._options.duration||t===this._options.to,c=(r=this._options.from,o=this._options.to,s=this._options.easing(a/this._options.duration),r*(1-s)+o*s),u=l?this._options.to:c,h=u-t;this._options.onStep(h,u),l?this._finishAnimation():window.requestAnimationFrame((function(t){n._animation(e,u,t)}))}else this._finishAnimation()},e.prototype._finishAnimation=function(){this._options.onComplete&&this._options.onComplete(),this._completed=!0},e}();function s(e){return new o(e)}},"//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",e[e.HorizontalResize=7]="HorizontalResize",e[e.DiagonalNeSwResize=8]="DiagonalNeSwResize",e[e.DiagonalNwSeResize=9]="DiagonalNwSeResize"}(n||(n={}))},"/3z9":function(e,t,i){"use strict";i.r(t),i.d(t,"isMacKeyboard",(function(){return o})),i.d(t,"Modifiers",(function(){return n})),i.d(t,"modifiersFromEvent",(function(){return s})),i.d(t,"hashFromEvent",(function(){return a})),i.d(t,"humanReadableModifiers",(function(){return l})),i.d(t,"humanReadableHash",(function(){return h}));var n,r=i("qFKp"),o=Object(r.isMac)()||r.CheckMobile.iOS();function s(e){var t=0;return e.shiftKey&&(t+=1024),e.altKey&&(t+=512),e.ctrlKey&&(t+=256),e.metaKey&&(t+=2048),t}function a(e){return s(e)|e.keyCode}function l(e){var t="";return 256&e&&(t+=o?"^":"Ctrl + "),512&e&&(t+=o?"⌥":"Alt + "),1024&e&&(t+=o?"⇧":"Shift + "),2048&e&&(t+=o?"⌘":"Win + "),t}!function(e){e[e.None=0]="None",e[e.Alt=512]="Alt",e[e.Shift=1024]="Shift",e[e.Mod=o?2048:256]="Mod",e[e.Control=256]="Control",e[e.Meta=2048]="Meta"}(n||(n={}));for(var c={9:"⇥",13:"↵",27:"Esc",8:o?"⌫":"Backspace",32:"Space",35:"End",36:"Home",37:"←",38:"↑",39:"→",40:"↓", 45:"Ins",46:"Del",191:"/"},u=1;u<=16;u++)c[u+111]="F"+u;function h(e){var t=l(e),i=255&e;return t+=i in c?c[i]:String.fromCharCode(i)}},"/5ju":function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("UJLt"),o=i("hkLy"),s=i("zUrt"),a=i("Kxc7"),l=i("hY0g"),c=i.n(l),u=i("FQhm"),h=i("htUT"),d=i("/z0S"),p=i("BxxN");i("YFKU"),i("HbRj"),i("+GxX");i.d(t,"SaveChartService",(function(){return b}));var _={labelName:window.t("Chart layout name"),labelRename:window.t("Enter a new chart layout name"),error:window.t("Please enter chart layout name"),titleNew:window.t("Save New Chart Layout"),titleRename:window.t("Rename Chart Layout"),titleCopy:window.t("Copy Chart Layout"),valueCopy:window.t("{0} copy",{context:"ex: AAPL chart copy"})};function f(e,t,i,s){return Object(n.__awaiter)(this,void 0,void 0,(function(){var a;return Object(n.__generator)(this,(function(n){return a=new r.SaveRenameDialog({fields:[new o.InputField({name:"chart-title",label:e+":",error:t,maxLength:64})],title:i}),void 0!==s&&a.setField("chart-title",s),[2,a.show().then((function(e){return e["chart-title"]}))]}))}))}function m(e){return Object(n.__awaiter)(this,void 0,void 0,(function(){return Object(n.__generator)(this,(function(t){return[2,f(_.labelRename,_.error,_.titleRename,e)]}))}))}function v(e){return Object(n.__awaiter)(this,void 0,void 0,(function(){return Object(n.__generator)(this,(function(t){return[2,f(_.labelRename,_.error,_.titleCopy,_.valueCopy.format(e))]}))}))}function y(e){return Object(n.__awaiter)(this,void 0,void 0,(function(){return Object(n.__generator)(this,(function(t){return[2,f(_.labelRename,_.error,_.titleNew,e)]}))}))}function g(){return Object(n.__awaiter)(this,void 0,void 0,(function(){return Object(n.__generator)(this,(function(e){return[2,new Promise((function(e){a.enabled("saved_charts_count_restriction")&&window.is_authenticated&&!window.user.is_pro?s.backend.getChartsCount((function(t){e(t<5)})):e(!0)}))]}))}))}var b=function(){function e(e,t){this._autosaveTimer=null,this._watchedAutoSaveEnabled=new c.a,this._toggleAutoSaveEnabledHandler=this._toggleAutoSaveEnabled.bind(this),this._chartWidgetCollection=e,this._chartSaver=t,this._chartChangesWatcher=new h.ChartChangesWatcher(e.undoHistory,t,u),e.saveKeysPressed().subscribe(this,this.saveChartOrShowTitleDialog),this._chartChangesWatcher.getOnChange().subscribe(this,this._onStateChanged)}return e.prototype.autoSaveEnabled=function(){return this._watchedAutoSaveEnabled},e.prototype.destroy=function(){0},e.prototype.cloneChart=function(){return Object(n.__awaiter)(this,void 0,void 0,(function(){var e,t;return Object(n.__generator)(this,(function(i){switch(i.label){case 0:return e=this._chartWidgetCollection,[4,g()];case 1:return i.sent()?[4,v(e.metaInfo.name.value())]:[3,3];case 2:return t=i.sent(),this._saveCurrentChartAsNewWithTitle(t),[3,4];case 3:0,i.label=4;case 4:return[2]}}))}))},e.prototype.saveChartAs=function(){Object(d.a)(this.cloneChart.bind(this),{source:"Clone chart"})},e.prototype.renameChart=function(){var e=this;Object(d.a)((function(){ return Object(n.__awaiter)(e,void 0,void 0,(function(){var e,t;return Object(n.__generator)(this,(function(i){switch(i.label){case 0:return e=this._chartWidgetCollection,[4,m(e.metaInfo.name.value())];case 1:return t=i.sent(),e.metaInfo.name.setValue(t),this._doSave(),[2]}}))}))}),{source:"Rename chart"})},e.prototype.saveNewChart=function(e,t,i){return Object(n.__awaiter)(this,void 0,void 0,(function(){var r,o,s;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:return r=this._chartWidgetCollection,o=r.metaInfo.name.value(),[4,g()];case 1:return n.sent()?[4,y(o)]:[3,3];case 2:return s=n.sent(),r.metaInfo.name.setValue(s),this._doSave(e,t,i),[3,4];case 3:0,n.label=4;case 4:return[2]}}))}))},e.prototype.saveExistentChart=function(e,t,i){this._doSave(e,t,i)},e.prototype.saveChartOrShowTitleDialog=function(e,t,i){var n=this,r=window.saver.isSaveInProcess(),o=this._chartChangesWatcher.hasChanges(),s=!!this._chartWidgetCollection.metaInfo.id.value();window.is_authenticated&&(r||!o&&s)||Object(d.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(d.a)((function(){t._watchedAutoSaveEnabled.setValue(e)}),{source:"AutoSave chart"})},e.prototype._autoSaveEnabledSettingHandler=function(e){0},e.prototype._toggleAutoSaveEnabled=function(e){0},e.prototype._enableAutoSave=function(){0},e.prototype._disableAutoSave=function(){0},e.prototype._onStateChanged=function(e){e?this._startAutosave():this._stopAutosave()},e.prototype._saveCurrentChartAsNewWithTitle=function(e){var t=this._chartWidgetCollection;a.enabled("saveload_storage_customization")?(t.metaInfo.uid.deleteValue(),t.metaInfo.id.deleteValue(),t.metaInfo.name.setValue(e),this._doSave()):window.open(Object(p.a)({clone:t.metaInfo.uid.value(),name:e}),"_blank")},e.prototype._doSave=function(e,t,i,n){var r=this._chartWidgetCollection;void 0!==e&&e(),this._chartSaver.saveChartSilently((function(e){var i;i=r.metaInfo.uid.value(),"/chart/"===location.pathname&&(location.href="/chart/"+i),void 0!==t&&t(e)}),(function(){void 0!==i&&i()}),{autoSave:Boolean(n)})},e.prototype._startAutosave=function(){var e=this;a.enabled("charts_auto_save")&&null===this._autosaveTimer&&(this._autosaveTimer=setTimeout((function(){e._autosaveTimer=null,e._chartWidgetCollection.metaInfo.id.value()&&e._doSave(void 0,void 0,void 0,!0)}),6e4))},e.prototype._stopAutosave=function(){null!==this._autosaveTimer&&(clearInterval(this._autosaveTimer),this._autosaveTimer=null)},e}()},"/DW5":function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"a",(function(){return o}));var n=i("CLNU");function r(e){ return Object(n.clean)(JSON.stringify(e))}function o(e){return JSON.parse(Object(n.clean)(e,!0))}},"/DxK":function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("p1SQ").LineToolHorzLinePriceAxisView,o=i("tc+8"),s=i("Ocx9").DefaultProperty,a=window.t("Horizontal Line");function l(e,t){var o=t||l.createProperties();this._priceAxisView=new r(this),n.call(this,e,o),i.e("lt-pane-views").then(function(e){var t=i("ckl+").HorzLinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(l,n),l.prototype.state=function(e){var t=n.prototype.state.call(this,e);return t.points&&0!==t.points.length&&(t.points[0].offset=0),t},l.prototype.pointsCount=function(){return 1},l.prototype.translatedType=function(){return a},l.prototype.name=function(){return"Horizontal Line"},l.prototype.priceAxisViews=function(e,t){return this.isSourceHidden()?null:t===this.priceScale()&&this.properties().showPrice.value()&&this._model.paneForSource(this)===e?[this._priceAxisView]:null},l.prototype.updateAllViews=function(){n.prototype.updateAllViews.call(this),this._priceAxisView.update()},l.prototype.canHasAlert=function(){return!0},l.prototype._getAlertPlots=function(){return[this.points()[0].price]},l.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("NEbb").HorizontalLineDefinitionsViewModel}.bind(null,i)).catch(i.oe)},l.prototype.template=function(){var e=n.prototype.template.call(this);return e.text=this.properties().childs().text.value(),e},l.prototype._applyTemplateImpl=function(e){n.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text)},l.createProperties=function(e){var t=new s("linetoolhorzline",e);return l._configureProperties(t),t},l._configureProperties=function(e){n._configureProperties(e),e.hasChild("text")||e.addChild("text",new o("")),e.addExclusion("text")},t.LineToolHorzLine=l},"/G2Z":function(e,t,i){"use strict";(function(e){i("xdS3");var t=i("Eyy1").assert;i("fPdn"),i("wZIs"),i("WmDe"),JSON.parse(urlParams.disabledFeatures).forEach((function(t){e.setEnabled(t,!1)})),JSON.parse(urlParams.enabledFeatures).forEach((function(t){e.setEnabled(t,!0)}));var n=i("UlDV").RestrictedToolsetBootloader,r=i("I4UZ").HeaderToolbarBootloader,o=i("9zVu").DrawingToolbarBootloader,s=i("OiSa").isDrawingToolbarVisible,a=i("EsvI"),l=i("oiZD").setTheme,c=i("JcHK"),u=i("Ery9"),h=i("lxNp"),d=i("n0Bl").migrateShortcut,p=i("RXmj").ChartSaver,_=i("/5ju").SaveChartService,f=i("lA7n").LoadChartService,m=i("F58L").StudyTemplates,v=i("54XG").FavoriteStudyTemplateService,y=i("PT1i").linking,g=i("FQhm"),b=i("kcTO"),S=b.formatterOptions,w=b.customFormatters,P=i("JT5O").StudyMarket,C=i("FBuY").TVXWindowEvents,x=i("jofe").createDeferredPromise,T=i("FIi8").deepExtend,I=i("PoSe"),M=i("LxhU").Interval,L=i("lW/c").Root,O=i("NsVT").ChartPage,k=i("IWXC").destroyQuoteSessions,A=i("ULlu"),E=i("uDHo").TIMEFRAMETYPE,V=new O(new L(window).allocate()),D=V.allocate({areaName:"center"}) ;V.allocate({areaName:"tradingpanel"});i("Wh/T");var B=i("/Y2c"),R=i("g5Qf").createFavoriteDrawingToolbar,N=i("x5Tw").setupChartEventHint,F=i("EX27"),j=i("0YCj"),W=i("9nLJ");i("2cgs"),i("vIQA");var H=i("u5Q5").setSearchRequestDelay,z=i("dfhE"),U=i("ocLq"),G=i("qE4g").addBrandingSource,Y=window.parent[urlParams.uid].getCustomIndicators,q=x(),K=x(),Z=e.enabled("left_toolbar");if(Promise.all([q.promise,K.promise]).then((function(){window.ChartApiInstance.start()})),"function"==typeof Y){var J=Y(U);J&&J.then?J.then((function(e){if(!Array.isArray(e))return console.warn("custom_indicators_getter should be a function that returns a Promise object which result is an array of custom indicators"),void q.resolve();JSServer.studyLibrary.push.apply(JSServer.studyLibrary,e),q.resolve(),console.log("{0} custom indicators loaded.".format(e.length))})).catch((function(e){console.warn("Error loading custom indicators "+e),q.resolve()})):(console.warn("custom_indicators_getter should be a function that returns a Promise object"),q.resolve())}else q.resolve();window.widgetReady=function(e){g.subscribe("onChartReady",e)};var X=urlParams.theme&&urlParams.theme.toLowerCase();function Q(e){window.__defaultsOverrides=window.__defaultsOverrides||{},T(window.__defaultsOverrides,e),void 0!==TradingView.defaultProperties&&void 0!==TradingView.defaultProperties.chartproperties&&(window.applyDefaultsOverrides(TradingView.defaultProperties.chartproperties),window.applyDefaultOverridesToLinetools())}!function(e){a.themes[e]&&l(e)}(X),window.applyStudiesOverrides=function(e){e&&window.chartWidgetCollection.applyStudiesOverrides(e)},window.applyOverrides=function(e){Q(e),window.chartWidgetCollection.applyOverrides(e)},window.applyTradingCustomization=function(e){for(var t in e.order)TradingView.defaultProperties.linetoolorder[t]=e.order[t];for(var t in e.position)TradingView.defaultProperties.linetoolposition[t]=e.position[t]},window.changeTheme=function(e,t){var i=a.themes[e.toLowerCase()];i&&window.tradingViewApi.themes().setStdTheme(i.name,!0,t&&t.disableUndo)},window.getTheme=function(){return window.tradingViewApi.themes().getCurrentThemeName()},window.is_authenticated=!1;window.parent[urlParams.uid].brokerFactory,JSON.parse(window.urlParams.brokerConfig);window.t("charts by TradingView"),window.t("powered by TradingView"),window.t("by TradingView");var $=null,ee=x(),te=null,ie=function(){if(!Modernizr.canvas||!Modernizr.canvastext)throw Error("Charting library cannot be running under this browser");if(e.setEnabled("charting_library_debug_mode","true"===urlParams.debug),e.setEnabled("chart_property_page_trading",!1),e.enabled("remove_library_container_border")){var l=document.querySelector("#library-container");null!==l&&(l.style.border="0px",l.style.padding="1px")}e.enabled("no_min_chart_width")&&(window.document.body.style.minWidth="0px"),null!=urlParams.studiesOverrides&&j.setDefaultsOverrides(JSON.parse(urlParams.studiesOverrides)),t(void 0===TradingView.defaultProperties,"Default properties are inited before applying overrides"), Q(JSON.parse(urlParams.overrides)),urlParams.numeric_formatting=urlParams.numeric_formatting&&JSON.parse(urlParams.numeric_formatting),urlParams.numeric_formatting&&"string"==typeof urlParams.numeric_formatting.decimal_sign&&(S.decimalSign=urlParams.numeric_formatting.decimal_sign[0]),window.ChartApiInstance=new F(window.parent[urlParams.uid].datafeed),window.parent[urlParams.uid].customFormatters&&(window.parent[urlParams.uid].customFormatters.timeFormatter&&(w.timeFormatter=window.parent[urlParams.uid].customFormatters.timeFormatter),window.parent[urlParams.uid].customFormatters.dateFormatter&&(w.dateFormatter=window.parent[urlParams.uid].customFormatters.dateFormatter)),window.ChartApiInstance.setStudiesAccessController(window.ChartApiInstance.createStudiesAccessController(urlParams.studiesAccess));var u=urlParams.chartContent?JSON.parse(urlParams.chartContent).json:void 0,h=urlParams.chartContentExtendedData?JSON.parse(urlParams.chartContentExtendedData):u?u.extendedData:void 0,d=urlParams.interval||"D",b=function(e){var t=/(\d+)(\w+)/;return e.map((function(e){var i=t.exec(e.text),n=i[2].toLowerCase(),r=parseInt(i[1]),o="y"===n?12*r+"M":r+n,s=U.Symbol.parsePeriod(e.resolution);return{text:window.t(e.title)||r+window.t(n,{context:"dates",count:r}),description:e.description||"",value:{value:o.toUpperCase(),type:E.PeriodBack},targetResolution:e.resolution,requiresIntraday:s.isIntraday}}))}(JSON.parse(urlParams.timeFrames));window.containerElement=window.parent.document.getElementById(urlParams.uid).parentElement;var x=Boolean(!1),T={resizerBridge:D,padding:e.enabled("border_around_the_chart")?2:0,content:u,widgetOptions:{hideIdeas:!0,addVolume:window.ChartApiInstance.studiesAccessController.isToolEnabled("Volume"),handleSessionErrors:!0,muteSessionErrors:!0,timezone:urlParams.timezone,defSymbol:urlParams.symbol,defInterval:d,compareSymbols:urlParams.compareSymbols&&JSON.parse(urlParams.compareSymbols),defTimeframe:urlParams.timeframe,paneContextMenuEnabled:e.enabled("pane_context_menu"),paneContextMenu:{mainSeriesTrade:x},priceScaleContextMenuEnabled:e.enabled("scales_context_menu"),currencyLabelEnabled:e.enabled("pricescale_currency"),legendWidgetEnabled:e.enabled("legend_widget"),legendWidget:{contextMenu:{settings:e.enabled("show_chart_property_page"),showOpenMarketStatus:e.enabled("display_market_status")}},sourceStatusesWidget:{errorSolution:!1},marketStatusWidgetEnabled:e.enabled("display_market_status"),marketStatusWidget:{preMarketSolution:!1,postMarketSolution:!1},chartWarningWidget:{subscriptionFullInfo:!1},timeScaleWidget:{contextMenuEnabled:e.enabled("scales_context_menu"),timezoneMenuEnabled:e.enabled("timezone_menu"),priceAxisLabelsOptions:{showLabels:e.enabled("main_series_scale_menu")}},timeScale:{preserveBarSpacing:!1,lockVisibleTimeRangeOnResize:e.enabled("lock_visible_time_range_on_resize"),rightBarStaysOnScroll:e.enabled("right_bar_stays_on_scroll")},goToDateEnabled:e.enabled("go_to_date"),crossHair:{menuEnabled:e.enabled("chart_crosshair_menu")},handleScale:{ mouseWheel:e.enabled("mouse_wheel_scale"),pinch:e.enabled("pinch_scale"),axisPressedMouseMove:e.enabled("axis_pressed_mouse_move_scale")},handleScroll:{mouseWheel:e.enabled("mouse_wheel_scroll"),pressedMouseMove:e.enabled("pressed_mouse_move_scroll"),horzTouchDrag:e.enabled("horz_touch_drag_scroll"),vertTouchDrag:e.enabled("vert_touch_drag_scroll")},shiftVisibleRangeOnNewBar:e.enabled("shift_visible_range_on_new_bar"),croppedTickMarks:e.enabled("cropped_tick_marks")},seriesControlBarEnabled:e.enabled("timeframes_toolbar"),seriesControlBar:{timeFramesWidgetEnabled:!0,timeFramesWidget:{goToDateEnabled:e.enabled("go_to_date"),availableTimeFrames:function(e,t){return e?t!==z.STATUS_DELAYED&&t!==z.STATUS_DELAYED_STREAMING&&t!==z.STATUS_READY?[]:b.filter((function(t){return!(t.requiresIntraday&&!e.has_intraday)&&!(e.supported_resolutions&&e.supported_resolutions.indexOf(M.normalize(t.targetResolution))<0)})):[]}},timeWidgetEnabled:!0,timeWidget:{timezoneMenuEnabled:e.enabled("timezone_menu")},adjustForDividendsButtonEnabled:!1,extendedHoursButtonEnabled:!1,percentageScaleButtonEnabled:!0,logScaleButtonEnabled:!0,autoScaleButtonEnabled:!0,fullscreenButtonEnabled:!0,mobileChangeLayoutEnabled:!1},globalEvents:!0,snapshotUrl:urlParams.snapshotUrl,mobileForceChartMaximizeEnabled:!1,saveChartEnabled:e.enabled("save_shortcut")};Z&&(R(),T.widgetOptions.isDrawingToolbarVisible=s),h&&(T.metaInfo={id:h.uid,name:h.name,description:h.description,uid:h.uid,username:"",tags:""});var L=window.chartWidgetCollection=new B(T);G(L),window.studyMarket=new P(L),"undefined"!=typeof serviceLocator&&serviceLocator.registerService(CHART_WIDGET_COLLECTION_SERVICE,L),L.activeChartWidget.subscribe((function(e){g.emit("activeChartChanged",L.getAll().indexOf(e))})),window.saver=new p(L);var O=new _(L,window.saver),k=new f(L);window.chartWidget=L.activeChartWidget.value(),window.pro=new TradingView.Pro;var A=function(t){if(!e.enabled("header_widget"))return null;var o=V.allocate({areaName:"top"}),s=new(0,i("htUT").ChartChangesWatcher)(t.chartWidgetCollection.undoHistory,window.saver,g),a=JSON.parse(urlParams.favorites);a.intervals=a.intervals.map((function(e){var t=""+e;return t.match(/1[DWMYdwmy]/)&&(t=t.slice(1)),t}));var l,c=null;e.enabled("study_templates")&&(c=new v(C,TVSettings),te=new m({chartWidgetCollection:t.chartWidgetCollection,favoriteStudyTemplatesService:c}));l=Modernizr.mobiletouch?["full"]:e.enabled("caption_buttons_text_if_possible")?void 0:["medium"];return new r(new n,{chartSaver:window.saver,chartApiInstance:ChartApiInstance,chartWidgetCollection:t.chartWidgetCollection,defaultIntervals:Object.keys(ChartApiInstance.defaultResolutions()),defaultFavoriteStyles:a.chartTypes,defaultFavoriteIntervals:a.intervals,hideStudyTemplates:!0,resizerBridge:o,studyMarket:window.studyMarket,studyTemplates:te,favoriteStudyTemplatesService:c,allowedModes:l,saveChartService:t.saveChartService,loadChartService:t.loadChartService,chartChangesWatcher:s,onClick:ce})}({chartWidgetCollection:L,saveChartService:O,loadChartService:k}) ;null!==A?A.load().then((function(e){$=e.getComponent(),ee.resolve()})):(ee.promise.catch((function(){})),ee.reject("header widget is not loaded"));var Y=function(e){if(Z){var t=urlParams.toolbarbg&&/^[0-9a-f]+$/i.test(urlParams.toolbarbg)?String(urlParams.toolbarbg):void 0;if(t){var i=document.createElement("style");i.textContent="body,.chart-controls-bar,#footer-chart-panel{background-color:#"+t+" !important}",document.head.appendChild(i)}return new o({bgColor:t,chartWidgetCollection:e,drawingsAccess:urlParams.drawingsAccess?JSON.parse(urlParams.drawingsAccess):void 0,resizerBridge:V.allocate({areaName:"left"}),onClick:ce})}return null}(L),q=null;window.tradingViewApi=new W(L,window.ChartApiInstance,O,k);var J=null;y.bindToChartWidgetCollection(L),TradingView.isNaN(urlParams.studyCountLimit)||(TradingView.STUDY_COUNT_LIMIT=Math.max(2,+urlParams.studyCountLimit)),TradingView.isNaN(urlParams.ssreqdelay)||H(Math.max(0,+urlParams.ssreqdelay)),window.ChartApiInstance.connect(),Promise.all([i.e(32),i.e(39),i.e(63),i.e(77),i.e(15),i.e(30),i.e(35),i.e(47),i.e(57),i.e("floating-toolbars")]).then(function(e){var t=i("tPkB");window.lineToolPropertiesToolbar=new t(L)}.bind(null,i)).catch(i.oe);var ie=document.querySelector(".tv-content");function ne(){Y&&Y.load(),q&&q.load().then((function(e){window.footerWidget=e.getComponent()})),J&&J.load().then((function(e){window.widgetbar=e}))}null!==ie&&ie.addEventListener("contextmenu",(function(e){null!==e.target&&"input"!==e.target.tagName.toLowerCase()&&"textarea"!==e.target.tagName.toLowerCase()&&e.preventDefault()})),K.resolve(),L.undoHistory.undoStack().onChange().subscribe(null,I((function(){g.emit("onAutoSaveNeeded")}),1e3*(urlParams.autoSaveDelay||5),{leading:!1,trailing:!0})),chartWidget.withModel(null,(function(){if(ChartApiInstance.on("realtime_tick",(function(e){g.emit("onTick",e)})),!a.savedThemeName()&&X){var t=a.getStdTheme(X);t&&t.content&&void 0===u&&(L.applyTheme(t.content,!1,!1,X,!0,!0),window.applyOverrides(window.__defaultsOverrides))}e.enabled("charting_library_debug_mode")&&g.subscribeToAll((function(){var e=Array.prototype.slice.call(arguments);console.log('Event "{0}", arguments: {1}'.format(e[0],JSON.stringify(e.slice(1))))})),N&&(N(L),N=null)})),c.isAnyChartWidgetInitialized(L)?ne():c.waitAnyChartWidgetInitialized(L,ne),g.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,k(),window.ChartApiInstance&&(window.ChartApiInstance.destroy(),window.ChartApiInstance=null)})), e.enabled("saveload_storage_customization")&&(window.parent[urlParams.uid].saveLoadAdapter?u.setCustomAdapter(window.parent[urlParams.uid].saveLoadAdapter):void 0!==urlParams.chartsStorageUrl&&urlParams.chartsStorageUrl&&void 0!==urlParams.clientId&&urlParams.clientId?u.initialize(urlParams.clientId,urlParams.userId,urlParams.chartsStorageUrl,urlParams.chartsStorageVer||"1.0"):(e.setEnabled("saveload_storage_customization",!1),e.setEnabled("header_saveload",!1)));var ne,re=x();function oe(){re.resolve()}window.parent[urlParams.uid].loadLastChart&&e.enabled("saveload_storage_customization")?u.getCharts((function(e){if(0!==e.length){var t=e.sort((function(e,t){return t.modified_iso-e.modified_iso}))[0];u.getChartContent(t,(function(e){var t=JSON.parse(e.content);t.extendedData=e,urlParams.chartContent=JSON.stringify({json:t}),oe()}),oe)}else oe()}),oe):oe(),null!=(ne=window.parent[window.urlParams.uid].settingsAdapter)?(TVSettings.setSettingsAdapter(ne),TVSettings.sync()):e.enabled("use_localstorage_for_settings")&&TVSettings.sync();var se,ae,le=x();function ce(e){var t=TradingView.bottomWidgetBar;t&&t.turnOffMaximize()}Promise.all([le.promise,re.promise]).then((function(){A.trigger(window,"resize");var t,i,n,r,o,s,a=document.querySelector(".loading-indicator");if(a&&(a.style.display="none"),setTimeout(ie,0),e.enabled("14851")&&(Math.random()<=.02||e.enabled("cqg_terminal")||e.enabled("amp_terminal"))){t=window,i=document,n="script",r="ga",t.GoogleAnalyticsObject=r,t.ga=t.ga||function(){(t.ga.q=t.ga.q||[]).push(arguments)},t.ga.l=1*new Date,o=i.createElement(n),s=i.getElementsByTagName(n)[0],o.async=1,o.src="//www.google-analytics.com/analytics.js",s.parentNode.insertBefore(o,s);var l=document.URL.match(new RegExp("(:?.*://)([^/]+)/.*"))[2];ga("create","UA-112911840-1","auto"),ga("set","anonymizeIp",!0),ga("set",{hostname:l,page:l,referrer:l}),ga("send","pageview")}})),se=!0,window.parent[urlParams.uid].datafeed.onReady((function(e){se&&console.warn("`onReady` should return result asynchronously. Use `setTimeout` with 0 interval to execute the callback function."),window.configurationData=e,le.resolve()})),se=!1,window.getFunctionFromArguments=function(e){return window.parent[urlParams.uid][e]},window.createShortcutAction=(ae=h.createGroup({desc:"API"}),function(e,t){ae.add({hotkey:d(e),handler:t})}),window.initializationFinished=function(){window.chartWidgetCollection.undoHistory.clearStack()},window.headerReady=function(){return ee.promise},window.createButton=function(e){if(null===$)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 $.addButton(t)},window.getAllFeatures=function(){const t=e.getAllFeatures();return Object.keys(t).forEach((function(e){isNaN(parseFloat(e))||delete t[e]})),t}}).call(this,i("Kxc7"))},"/McG":function(e){ e.exports=JSON.parse('{"content":{"chartProperties":{"scalesProperties":{"textColor":"#131722","lineColor":"#E0E3EB","backgroundColor":"#ffffff"},"paneProperties":{"vertGridProperties":{"color":"#F0F3FA"},"horzGridProperties":{"color":"#F0F3FA"},"background":"#ffffff","backgroundGradientStartColor":"#ffffff","backgroundGradientEndColor":"#ffffff"}},"sessions":{"graphics":{"backgrounds":{"outOfSession":{"color":"#2196F3","transparency":92},"preMarket":{"color":"#FF9800","transparency":92},"postMarket":{"color":"#2196F3","transparency":92}},"vertlines":{"sessBreaks":{"color":"#4985e7","style":2,"width":1}}}},"mainSourceProperties":{"baseLineColor":"#B2B5BE","candleStyle":{"borderColor":"#378658","upColor":"#26a69a","wickColor":"#737375","wickUpColor":"#26a69a","wickDownColor":"#ef5350","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350"},"haStyle":{"borderColor":"#378658","upColor":"#26a69a","wickColor":"#737375","wickUpColor":"#26a69a","wickDownColor":"#ef5350","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350"},"barStyle":{"downColor":"#ef5350","upColor":"#26a69a"},"pnfStyle":{"downColor":"#ef5350","upColor":"#26a69a","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae"},"baselineStyle":{"baselineColor":"rgba( 117, 134, 150, 1)","topFillColor1":"rgba( 38, 166, 154, 0.28)","topFillColor2":"rgba( 38, 166, 154, 0.05)","bottomFillColor1":"rgba( 239, 83, 80, 0.05)","bottomFillColor2":"rgba( 239, 83, 80, 0.28)","topLineColor":"rgba( 38, 166, 154, 1)","bottomLineColor":"rgba( 239, 83, 80, 1)"},"areaStyle":{"transparency":100,"color1":"rgba(33, 150, 243, 0.28)","color2":"#2196f3","linecolor":"#2196f3","linewidth":2,"linestyle":0},"renkoStyle":{"upColor":"#26a69a","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae","borderUpColorProjection":"#a9dcc3","borderDownColorProjection":"#f5a6ae","wickUpColor":"#26a69a","wickDownColor":"#ef5350"},"lineStyle":{"color":"#2196f3","linewidth":2,"linestyle":0},"kagiStyle":{"downColor":"#ef5350","upColor":"#26a69a","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae"},"pbStyle":{"upColor":"#26a69a","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae","borderUpColorProjection":"#a9dcc3","borderDownColorProjection":"#f5a6ae"},"rangeStyle":{"upColor":"#26a69a","downColor":"#ef5350","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae"}}}}')},"/ToI":function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return a}));var n=i("mrSG"),r=i("Eyy1"),o=function(e){function t(t,i,n,r){var o=e.call(this,t,i,r)||this;return o._sourcePaneRemoved=!1,o._targetPaneIndex=t.panes().indexOf(n),o}return Object(n.__extends)(t,e),t.prototype.redo=function(){ for(var e=this._chartModel.panes()[this._initialPaneIndex],t=this._chartModel.panes()[this._targetPaneIndex],i=e!==t,n=this._targetPriceScale(t),o=Object(r.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),s=0,a=this._chartModel.children(o,!0);s1),u.fullscreen.setValue(le===u)}else u&&r(u)}Le(),Ne(),function(){for(var e=G.count,t=e,i=0;i1)}(),t(),W.forEach((function(e){e.chartWidget.onZoom().subscribe(this,(function(e){me.fire(e)}))})),U.value()<1&&l>0&&W[l-1].rdState.bridge().attach()}function Ne(){var e=Math.min(G.count,W.length)-1;if(e<0)F.deleteValue();else{var t=H;t<0&&(t=0),t>e&&(t=e),F.setValue(W[t].chartWidget)}}function Fe(){for(var e=W.length;e--;){var t=e===H;$(W[e].container.value()).toggleClass("active",t).toggleClass("inactive",!t)}}function je(e){}V.seriesControlBarEnabled&&(ye=R+N+"px",(ge=document.createElement("div")).style.left=ye,ge.style.right=ye,ge.style.bottom=ye,ge.classList.add("chart-toolbar","chart-controls-bar"),pe[0].appendChild(ge),Promise.all([i.e("react"),i.e(1),i.e(4),i.e(8),i.e(9),i.e(23),i.e(24),i.e(26),i.e(43),i.e(45),i.e(46),i.e(60),i.e(64),i.e(69),i.e(0),i.e(2),i.e(12),i.e(14),i.e(18),i.e(52),i.e("chart-bottom-toolbar")]).then(function(e){var n=i("MfqI").BottomToolbarRenderer,r=V.resizerBridge,o=[r.container.spawn(),r.width.spawn(),r.height.spawn()],s=r.container.value(),a=new t,l=function(){a.fire()};o.forEach((function(e){e.subscribe(l)})),be=new n(ge,a,(function(){var e=s.getBoundingClientRect(),t=Ce();return t.top=e.top+t.top,t.left=e.left+t.left,t}),O,ChartApiInstance,ce,V.seriesControlBar),Se=function(){null!==be&&(be.destroy(),be=null, ge.remove(),ge=null),o.forEach((function(e){e.destroy()})),a.destroy()}}.bind(null,i)).catch(i.oe)),se.subscribe(Le),ae.subscribe(Le),this.updateLayout=Le;var We=new t,He=new y,ze=new y,Ue=null;function Ge(e){var t=e.mainSeries().properties();t.style.subscribe(null,Ye),Ye(t.style),e.model().onSelectedSourceChanged().subscribe(null,qe),qe(e.selection().sources())}function Ye(e){He.setValue(e.value())}function qe(){var e=Ue.model();ze.setValue(e.selection().sources())}function Ke(e){for(var t=!1,i=0;i=o[e].count)return e;return"s"}function it(e,t){if(J=!0,X=Boolean(t),K=[],e){e.charts||(e={layout:"s",charts:[e]});var i=new Set;e.charts.forEach((function(e){e.chartId&&i.add(e.chartId)})),e.charts.forEach((function(e){if(!e.chartId){var t=Be((function(e){return i.has(e)}));i.add(t),e.chartId=t}})),Y=tt(e.layout||"s");for(var n=0;n1},applyIndicatorToAllCharts:function(e,t,i,n){A(Pe(),e,t,i,n)},setActive:Qe,inlineChartsCount:U.readonly(),revertToInline:function(){Ve(null);for(var e=0;e0||e.status()===I.STATUS_INVALID_SYMBOL||e.status()===I.STATUS_NO_BARS)st();else{var i=e.dataEvents(),n=function(){st(),i.barReceived().unsubscribe(null,n),i.completed().unsubscribe(null,n),i.error().unsubscribe(null,n)};i.barReceived().subscribe(null,n),i.completed().subscribe(null,n),i.error().subscribe(null,n)}}))}})),a()){var at=h.tool.setValue;h.tool.setValue=function(){O.selectedSources.value()&&O.activeChartWidget.value().model().lineBeingCreated()&&O.activeChartWidget.value().model().cancelCreatingLine(),at.apply(h.tool,arguments)}}Promise.all(W.map((function(e){return b(e.chartWidget.modelCreated()).promise}))).then((function(){return Promise.all(W.map((function(e){ return b(e.chartWidget.model().mainSeries().dataEvents().symbolResolved()).promise})))})).then((function(){window.saver&&window.is_authenticated&&V.widgetOptions.justCloned&&window.saver.saveChartSilently()})).catch(P.logError.bind(P))}}).call(this,i("aIyQ"))},"/YGI":function(e,t,i){"use strict";i.r(t);var n,r=i("mrSG"),o=i("0YCj"),s=i.n(o);!function(e){e.StudyCannotBeChild="cannot_be_child",e.StubWasRemoved="stub_was_removed",e.CannotGetMetainfo="cannot_get_metainfo",e.Cancelled="cancelled",e.Unknown="unknown"}(n||(n={}));var a=i("txPx");i.d(t,"StudyInserter",(function(){return c}));var l=Object(a.getLogger)("Chart.Studies.StudyInserter"),c=function(){function e(e,t,i){this._parentSource=void 0,this._propsState=void 0,this._preferredPriceScale=void 0,this._allowChangeCurrency=!1,this._paneSize=void 0,this._forceOverlay=!1,this._studyMetaInfoRepository=t,this._inserterImpl=i,this._studyDescriptor=e}return e.prototype.setParentSource=function(e){this._parentSource=e||void 0},e.prototype.setPaneSize=function(e){this._paneSize=e},e.prototype.setPreferredPriceScale=function(e){this._preferredPriceScale=e},e.prototype.setAllowChangeCurrency=function(e){this._allowChangeCurrency=e},e.prototype.setForceOverlay=function(e){this._forceOverlay=e},e.prototype.setPropertiesState=function(e){this._propsState=e},e.prototype.insert=function(e,t){return Object(r.__awaiter)(this,void 0,void 0,(function(){var i,o,s,a,c,u,h;return Object(r.__generator)(this,(function(d){switch(d.label){case 0:p=this._inserterImpl,i=void 0!==p.createStub&&void 0!==p.removeStub?this._inserterImpl.createStub():null,o=!0,d.label=1;case 1:return d.trys.push([1,3,4,5]),[4,this._studyMetaInfoRepository.findById(this._studyDescriptor)];case 2:return s=d.sent(),[3,5];case 3:return d.sent(),l.logWarn("Cannot get study "+JSON.stringify(this._studyDescriptor)),[2,Promise.reject(n.CannotGetMetainfo)];case 4:return null!==i&&(o=this._inserterImpl.removeStub(i)),[7];case 5:return o?void 0!==t&&t.cancelled?[2,Promise.reject(n.Cancelled)]:this._canApplyStudyToParent(s)?(a=Object(r.__assign)({},s.defaults.inputs),void 0===e?[3,7]:[4,e(a,s.inputs,s)]):[2,Promise.reject(n.StudyCannotBeChild)]:[2,Promise.reject(n.StubWasRemoved)];case 6:return u=d.sent(),[3,8];case 7:u={},d.label=8;case 8:return c=u,void 0!==t&&t.cancelled?[2,Promise.reject(n.Cancelled)]:null===(h=this._insertStudy(s,c))?[2,Promise.reject(n.Unknown)]:[2,h]}var p}))}))},e.prototype._insertStudy=function(e,t){return this._inserterImpl.createStudy(e,t,null,this._propsState,this._forceOverlay,this._parentSource,this._preferredPriceScale,this._allowChangeCurrency,this._paneSize)},e.prototype._canApplyStudyToParent=function(e){return void 0===this._parentSource||s.a.canBeChild(e)},e}()},"/b+7":function(e,t){ e.exports=''},"/bs+":function(e,t,i){"use strict";i.r(t),i.d(t,"barTimeToEndOfPeriod",(function(){return r})),i.d(t,"endOfPeriodToBarTime",(function(){return o}));var n=i("E6p6");function r(e,t,i,r){if(r.isDays())return i;if(e.moveTo(1e3*i),r.isIntraday()){var o=e.indexOfBar(1e3*i);if(o<0)throw new Error(i+" is out of the instrument session ");return e.endOfBar(o)/1e3}return e.startOfBar(n.SessionStage.LASTBAR_SESSION)/1e3}function o(e,t,i,n){if(n.isDays())return i;var r=1e3*i-1;if(e.moveTo(r),n.isIntraday()){var o=e.indexOfBar(r);if(o<0)throw new Error(i+" is out of the instrument session ");return e.startOfBar(o)/1e3}return i=e.startOfBar(0)/1e3}},"/hKg":function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererCandles",(function(){return a}));var n=i("Eyy1"),r=i("VdBB"),o=i("gAom"),s=i("Zp/P"),a=function(){function e(e){this._bars=[],this._barSpacing=1,this._barWidth=1,this._borderVisible=!1,this._barBorderWidth=1,this._wickVisible=!1,this._bodyVisible=!0,this._borderColor=void 0,this._wickColor=void 0,this._hittest=void 0,e&&this.setData(e)}return e.prototype.setData=function(e){this._bars=e.bars,this._barSpacing=e.barSpacing,this._borderVisible=e.borderVisible,this._bodyVisible=e.bodyVisible,this._wickVisible=e.wickVisible,this._borderColor=e.borderColor,this._wickColor=e.wickColor,this._hittest=e.hittest},e.prototype.hitTest=function(e){var t=this._bars,i=.5*this._barSpacing;if(0===t.length)return null;if(e.xt[t.length-1].time+i)return null;for(var n=null,o=0,a=t;o=2)Math.floor(i)%2!=this._barWidth%2&&this._barWidth--;this._wickVisible&&this._drawWicks(e,i),this._borderVisible&&this._drawBorder(e,i),this._bodyVisible&&this._drawCandles(e,i)}},e.prototype._drawWicks=function(e,t){var i=this._bars,r="",o=Math.min(Math.floor(t),Math.floor(this._barSpacing*t));o=Math.max(Math.floor(t),Math.min(o,this._barWidth));for(var s=Math.floor(.5*o),a=null,l=0,c=i;l2*r)Object(o.fillRectInnerBorder)(e,u,d,h-u+1,p-d+1,r);else{var _=h-u+1;e.fillRect(u,d,_,p-d+1)}s=h}}},e.prototype._drawCandles=function(e,t){for(var i="",n=this._calculateBorderWidth(t),r=0,s=this._bars;rc)continue;e.fillRect(u,l,h-u+1,c-l+1)}}}},e}()},"/jjs":function(e,t,i){"use strict";i.r(t),i.d(t,"Magnet",(function(){return s}));var n=i("Eyy1"),r=i("4o++"),o=i("zL3Q"),s=function(){function e(){}return e.prototype.align=function(e,t,i){var s=e;if(!Object(o.a)().value())return s;var a=i.mainDataSource();if(null===a)return s;var l=a.model().mainSeries();if(a!==l)return s;var c=l.priceScale(),u=l.bars();if(c.isEmpty()||!u.contains(t))return s;var h=u.valueAt(t);if(null===h)return s;var d=[h[1],h[2],h[3],h[4]],p=Object(n.ensure)(l.firstValue()),_=d.map((function(e){return{y:c.priceToCoordinate(e,p),price:e}})),f=c.priceToCoordinate(e,p);_.sort((function(e,t){return Math.abs(e.y-f)-Math.abs(t.y-f)}));var m=_[0];return(Object(o.b)().value()===r.MagnetMode.StrongMagnet||Math.abs(m.y-f)<50)&&(s=m.price),s},e}()},"/kal":function(e,t){e.exports=''},"/mDy":function(e,t,i){},"/tGj":function(e,t,i){"use strict";function n(e){return e.symbolSource()===e} i.r(t),i.d(t,"isSymbolSource",(function(){return n}))},"/z0S":function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("Kxc7");function r(e,t){n.enabled("saveload_requires_authentication")?window.runOrSignIn(e,t):e()}},"08i5":function(e,t,i){"use strict";var n,r;i.r(t),i.d(t,"AlertStatus",(function(){return n})),i.d(t,"Direction",(function(){return r})),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"}(r||(r={}))},"0F0w":function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("aIyQ"),o=i.n(r),s=i("Eyy1"),a=i("hY0g"),l=i.n(a),c=i("e3/o"),u=i("txPx"),h=Object(u.getLogger)("ChartApi.AbstractSession"),d=function(){function e(e,t,i){this._isConnected=new l.a(!1),this._state=0,this._isConnectForbidden=!1,this._sessionId="",this._sessionIdChanged=new o.a,this._chartApi=e,this._sessionPrefix=t,this._shouldReconnectAfterCriticalError=i}return e.prototype.destroy=function(){this._logNormal("Destroying session"),this._isConnected.unsubscribe(),this.disconnect(),this._sessionIdChanged.destroy(),delete this._chartApi,this._logNormal("Session has been destroyed")},e.prototype.isConnected=function(){return this._isConnected},e.prototype.sessionId=function(){return this._sessionId},e.prototype.onSessionIdChanged=function(){return this._sessionIdChanged},e.prototype.connect=function(){0===this._state&&(Object(s.assert)(!this._isConnectForbidden,"Cannot call connect because it is forbidden at this moment"),this._setSessionId(this._sessionPrefix+"_"+Object(c.randomHash)()),this._logNormal("Connecting session - wait until transport stay connected"),this._state=1,this._chartApi.createSession(this._sessionId,this))},e.prototype.disconnect=function(){var e=this;0!==this._state&&(Object(s.assert)(""!==this._sessionId,"sessionId must not be invalid"),this._logNormal("Disconnecting session..."),this._forbidConnectWhile((function(){e._chartApi.connected()&&e._sendRemoveSession(),e._processDestroyingOnServer()})))},e.prototype.onMessage=function(e){switch(e.method){case"connected":return void this._onChartApiConnected();case"disconnected":return void this._onChartApiDisconnected();case"critical_error":var t=String(e.params[0]),i=String(e.params[1]);return void this._onCriticalError(t,i)}this._onMessage(e)},e.prototype._getChartApi=function(){return this._chartApi},e.prototype._generateLogMessage=function(e){return"["+this._sessionId+"] "+e},e.prototype._onCriticalError=function(e,t){var i=this;this._logError("Critical error. Reason="+e+", info="+t+"."),this._forbidConnectWhile((function(){i._processDestroyingOnServer()})),this._shouldReconnectAfterCriticalError?(this._logNormal("Reconnecting after critical error..."),this.connect()):this._logNormal("Reconnecting after critical error skipped")},e.prototype._onChartApiConnected=function(){Object(s.assert)(1===this._state,"Session is not registered"),this._logNormal("Transport is connected. Creating session on the server"),this._sendCreateSession(),this._state=2, this._isConnected.setValue(!0)},e.prototype._onChartApiDisconnected=function(){var e=this;this._logNormal("Transport is disconnected. Reconnecting..."),this._forbidConnectWhile((function(){e._processDestroyingOnServer()})),this.connect()},e.prototype._setSessionId=function(e){var t=this._sessionId;this._logNormal("Changing sessionId: old="+t+", new="+e),this._sessionId=e,this._sessionIdChanged.fire(e,t)},e.prototype._logNormal=function(e){h.logNormal(this._generateLogMessage(e))},e.prototype._logError=function(e){h.logError(this._generateLogMessage(e))},e.prototype._processDestroyingOnServer=function(){this._state=0,this._isConnected.setValue(!1),this._chartApi.removeSession(this._sessionId),this._setSessionId("")},e.prototype._forbidConnectWhile=function(e){this._isConnectForbidden=!0,e(),this._isConnectForbidden=!1},e}();i.d(t,"ChartSession",(function(){return p}));Object(u.getLogger)("ChartSession");var p=function(e){function t(t,i){void 0===i&&(i=!1);var n=e.call(this,t,"cs",!1)||this;return n._sessionDisabled=!1,n._handler=null,n._criticalError=new o.a,n._disableStatistics=i,n}return Object(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.defaultResolutions=function(){return this._getChartApi().defaultResolutions()},t.prototype.availableCurrencies=function(){return this._getChartApi().availableCurrencies()},t.prototype.resolveSymbol=function(e,t,i){return this._getChartApi().resolveSymbol(this.sessionId(),e,t,i)},t.prototype.requestFirstBarTime=function(e,t,i){return this._getChartApi().requestFirstBarTime(this.sessionId(),e,t,i)},t.prototype.createSeries=function(e,t,i,n,r,o,s){return this._getChartApi().createSeries(this.sessionId(),e,t,i,n,r,o,s)},t.prototype.modifySeries=function(e,t,i,n,r,o){return this._getChartApi().modifySeries(this.sessionId(),e,t,i,n,r,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;i._getChartApi().requestMetadata(i.sessionId(),e,t)},t.prototype.isCanCreateStudy=function(e){return this._getChartApi().isCanCreateStudy(e)},t.prototype.createStudy=function(e,t,i,n,r,o,s){return this._getChartApi().createStudy(this.sessionId(),e,t,i,n,r,o,s)},t.prototype.rebindStudy=function(e,t,i,n,r,o,s){return this._getChartApi().rebindStudy(this.sessionId(),e,t,i,n,r,o,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,r,o){return this._getChartApi().createPointset(this.sessionId(),e,t,i,n,r,o)},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,r){this._getChartApi().setVisibleTimeRange(e,this.sessionId(),t,i,n,r)},t.prototype.criticalError=function(){return this._criticalError},t.prototype.connect=function(t){void 0===t&&(t=null),null!==t&&(this._handler=t),e.prototype.connect.call(this)},t.prototype.setHandler=function(e){this._handler=e},t.prototype.connected=function(){return this.isConnected().value()&&!this._sessionDisabled},t.prototype.disable=function(){this._sessionDisabled=!0},t.prototype.chartApi=function(){return this._getChartApi()},t.prototype._sendCreateSession=function(){var e=this;Object.keys(this).forEach((function(t){/^(s|st|symbol_)\d+$/.test(t)&&delete e[t]})),this._getChartApi().chartCreateSession(this.sessionId(),this._disableStatistics)},t.prototype._sendRemoveSession=function(){this._getChartApi().chartDeleteSession(this.sessionId())},t.prototype._onMessage=function(e){this._handler&&this._handler(e)},t.prototype._onCriticalError=function(t,i){this._criticalError.fire(t,i),e.prototype._onCriticalError.call(this,t,i)},t}(d)},"0Pxc":function(e,t,i){"use strict";var n=i("aO4+").Point,r=i("GEp6").distanceToLine,o=i("hfHJ"),s=o.rotationMatrix,a=o.scalingMatrix,l=o.translationMatrix,c=o.transformPoint,u=i("Ss5c").LineDataSource,h=i("Ocx9").DefaultProperty,d=window.t("Arc");function p(e,t){var n=t||p.createProperties();u.call(this,e,n),this.version=p.version,i.e("lt-pane-views").then(function(e){var t=i("dKqZ").ArcPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(p,u),p.prototype.startChanging=function(e,t){if(u.prototype.startChanging.call(this,e,t),0===e||1===e){var i=this.pointToScreenPoint(this._points[0])[0],o=this.pointToScreenPoint(this._points[1])[0],s=this.pointToScreenPoint(this._points[2])[0];this._dist=r(i,o,s).distance;var a=o.subtract(i),l=new n(-a.y,a.x),c=i.add(o).scaled(.5);s.subtract(c).dotProduct(l)<0&&(this._dist=-this._dist)}},p.prototype.pointsCount=function(){return 3},p.prototype.translatedType=function(){return d},p.prototype.name=function(){return"Arc"},p.prototype.hasEditableCoordinates=function(){return!1},p.prototype.setPoint=function(e,t){var i=Object.assign({},t),o=this.pointToScreenPoint(this._points[0])[0],u=this.pointToScreenPoint(this._points[1])[0],h=this.pointToScreenPoint(this._points[2])[0];switch(e){case 0:o=this.pointToScreenPoint(i)[0];var d=u.subtract(o),p=o.add(u).scaled(.5);f=(f=new n(-d.y,d.x)).normalized(),h=p.add(f.scaled(this._dist)),h=this.screenPointToPoint(h),this._points[0]=i,this._points[2]=h;break;case 1:var _=r(o,u,h).distance;d=(u=this.pointToScreenPoint(i)[0]).subtract(o), p=o.add(u).scaled(.5);f=(f=new n(-d.y,d.x)).normalized(),h=p.add(f.scaled(this._dist)),h=this.screenPointToPoint(h),this._points[1]=i,this._points[2]=h;break;case 2:i=this.pointToScreenPoint(i)[0];var f;_=r(o,u,i).distance,d=u.subtract(o),p=o.add(u).scaled(.5);f=(f=new n(-d.y,d.x)).normalized(),h=p.add(f.scaled(_));var m=p.add(f.scaled(-_)),v=d.length(),y=d.x/v,g=d.y/v,b=Math.acos(y);g<0&&(b=-b);var S=l(-p.x,-p.y);i=c(S,i);var w=c(S,h);S=s(-b),i=c(S,i),w=c(S,w),S=a(1,v/(2*_)),i=c(S,i),w=c(S,w);var P=i.y*w.y>=0?new n(h.x,h.y):new n(m.x,m.y);P=this.screenPointToPoint(P),this._points[2]=P}this.normalizePoints()},p.version=2,p.prototype.migrateVersion=function(e,t,i){if(1===e&&2===this._points.length){var n=(2*this._points[0].price+3*this._points[1].price)/5;this._points.append({price:n,index:this._points[1].index})}if(1===e&&2===this._timePoint.length){var r={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(r)}},p.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Zd1D").GeneralFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},p.createProperties=function(e){var t=new h("linetoolarc",e);return p._configureProperties(t),t},p._configureProperties=function(e){u._configureProperties(e)},t.LineToolArc=p},"0YCj":function(e,t,i){"use strict";(function(e,t){i("Eyy1").assert;var n=i("txPx").getLogger("Chart.Study.MetaInfo"),r=i("9iCb").applyOverridesToStudyDefaults,o=null;function s(e){TradingView.merge(this,{palettes:{},inputs:[],plots:[],graphics:{},defaults:{}}),TradingView.merge(this,e);var t=e.fullId||e.id;TradingView.merge(this,s.parseIdString(t)),this.name=this.id}s.VERSION_STUDY_ARG_SOURCE=41,s.METAINFO_FORMAT_VERSION_SOS_V2=42,s.VERSION_PINE_PROTECT_TV_4164=43,s.CURRENT_METAINFO_FORMAT_VERSION=51,s.VERSION_NEW_STUDY_PRECISION_FORMAT=46,s.CHILD_STUDY_ALLOWED_PLOT_TYPES=["line"],s.canPlotBeSourceOfChildStudy=function(e){return s.CHILD_STUDY_ALLOWED_PLOT_TYPES.includes(e)},s.CHILD_STUDY_EXCLUDE_IDS=["CorrelationCoefficient@tv-basicstudies","Correlation - Log@tv-basicstudies-1"],s.CHILD_STUDY_PARENT_EXCLUDE_IDS=[],s.FilledArea={},s.FilledArea.TYPE_PLOTS="plot_plot",s.FilledArea.TYPE_HLINES="hline_hline",s.versionOf=function(e){var t="_metainfoVersion"in e&&isNumber(e._metainfoVersion)?e._metainfoVersion:0;return t<0&&n.logError("Metainfo format version cannot be negative: "+t),t},s.parseIdString=function(e){var t={};if(-1===e.indexOf("@"))t.shortId=e,t.packageId="tv-basicstudies",t.id=e+"@"+t.packageId,t.version=1;else{var i=e.split("@");t.shortId=i[0];var n=i[1].split("-");if(3===n.length)t.packageId=n.slice(0,2).join("-"),t.id=t.shortId+"@"+t.packageId,t.version=n[2];else if(1===n.length&&"decisionbar"===n[0])t.packageId="les-"+n[0],t.id=t.shortId+"@"+t.packageId,t.version=1;else{if(1!==n.length)throw new Error("unexpected study id:"+e);t.packageId="tv-"+n[0],t.id=t.shortId+"@"+t.packageId,t.version=1}} if(t.fullId=t.id+"-"+t.version,"tv-scripting"===t.packageId){var r=t.shortId;if(0===r.indexOf("Script$")||0===r.indexOf("StrategyScript$")){var o=r.indexOf("_");t.productId=o>=0?r.substring(0,o):t.packageId}else t.productId=t.packageId}else t.productId=t.packageId;return t},s.getPackageName=function(e){return(/^[^@]+@([^-]+-[^-]+)/.exec(e||"")||[0,"tv-basicstudies"])[1]},s.cutDollarHash=function(e){var t=e.indexOf("$"),i=e.indexOf("@");return-1===t?e:e.substr(0,t)+(i>=0?e.substr(i):"")},s.hasUserIdSuffix=function(e){return/^USER;[\d\w]+;\d+$/.test(e)},s.isStandardPine=function(e){return/^(Strategy)?Script\$STD;.*@tv-scripting$/.test(e)},s.getSourceIdByInputs=function(e,t){if(!Array.isArray(e)||!t)return null;for(var i=0;i0){var l=a.replace(/^[^\$]+/,i);n.inputs[o.id].setValue(l)}}}},s.patchChildStudyMetaInfoState=function(e){e.state&&function e(t){if("object"==typeof t)for(var i in t)"string"==typeof t[i]&&/^[^\$]+\$\d+$/.test(t[i])?t[i]=t[i].replace(/^[^\$]+/,"{pid}"):e(t[i])}(e.state.inputs),e.state.isChildStudy=!0},s.prototype.parseValue=function(e,t){return"bool"===e?TradingView.parseBool(t):t},s.prototype.defaultInputs=function(){for(var e=[],t=0;t0?e[0].id:null},s.prototype.createDefaults=function(){if(this.defaults){var e=TradingView.clone(this.defaults);e.precision="default";var t=s.getStudyPropertyRootName(this);defaults.create(t,e)}},s.prototype.removeDefaults=function(){defaults.remove(s.getStudyPropertyRootName(this))},s.findStudyMetaInfoByDescription=function(e,t){if(e){for(var i=0;ii&&(s=e,o=t)}for(var l=new n(e,t),c=this._pane.state(),u=r.length-1;u>=0;--u){var h=r[u],d=h.priceAxisViews(c,this._priceScale);if(d&&0!==d.length)for(var p=d.length-1;p>=0;--p){var _=d[p].renderer();if(null!==_&&void 0!==_.hitTest){var f=_.hitTest(l,this._size.w,this._isLeft?"left":"right");null!==f&&a(f,h)}}}return o},O.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)},O.prototype._mouseClickOrTapEvent=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))}))},O.prototype.mouseClickEvent=function(e){this._mouseClickOrTapEvent(e)},O.prototype.tapEvent=function(e){this._mouseClickOrTapEvent(e)},O.prototype._mouseOrTouchMoveEvent=function(e){ this._priceScale&&(this.dataSourceAtPoint(e.localX,e.localY)?this._setCursorClassName("pointer"):this._setResizeCursor())},O.prototype.mouseMoveEvent=function(e){this._mouseOrTouchMoveEvent(e)},O.prototype._zoomAvailable=function(){return!this.priceScale().isEmpty()&&this._pane.chart().model().model().zoomEnabled()&&this._options.pressedMouseMoveScale},O.prototype._mouseDownOrTouchStartEvent=function(e){if(this._zoomAvailable()){var t=this._pane.chart().model(),i=this._pane.state();this._mousedown=!0,t.startScalePrice(i,this.priceScale(),e.localY)}},O.prototype.mouseDownEvent=function(e){this._mouseDownOrTouchStartEvent(e)},O.prototype.touchStartEvent=function(e){this._mouseOrTouchMoveEvent(e),this._mouseEnterOrTouchStartEvent(e),this._mouseDownOrTouchStartEvent(e)},O.prototype._pressedMouseOrTouchMoveEvent=function(e){if(this._zoomAvailable()){var t=this._pane.chart().model(),i=this._pane.state(),n=this.priceScale();t.scalePriceTo(i,n,e.localY)}},O.prototype.pressedMouseMoveEvent=function(e){this._pressedMouseOrTouchMoveEvent(e)},O.prototype.touchMoveEvent=function(e){this._pressedMouseOrTouchMoveEvent(e)},O.prototype.mouseDownOutsideEvent=function(e){if(this._zoomAvailable()&&this._pane.hasState()){var t=this._pane.chart().model(),i=this._pane.state(),n=this.priceScale();this._mousedown&&(this._mousedown=!1,t.endScalePrice(i,n),this.restoreDefaultCursor())}},O.prototype._mouseUpOrTouchEndEvent=function(e){if(this._zoomAvailable()){var t=this._pane.chart().model(),i=this._pane.state(),n=this.priceScale();this._mousedown=!1,t.endScalePrice(i,n),this.restoreDefaultCursor()}},O.prototype.mouseUpEvent=function(e){this._mouseUpOrTouchEndEvent(e)},O.prototype.touchEndEvent=function(e){this._mouseLeaveOrTouchEndEvent(e),this._mouseUpOrTouchEndEvent(e)},O.prototype._mouseEnterOrTouchStartEvent=function(e){this._setResizeCursor()},O.prototype.mouseEnterEvent=function(e){this._mouseEnterOrTouchStartEvent(e)},O.prototype._mouseLeaveOrTouchEndEvent=function(e){this._setCursorClassName("")},O.prototype.mouseLeaveEvent=function(e){this._mouseLeaveOrTouchEndEvent(e)},O.prototype._setResizeCursor=function(){this._priceScale.isPercentage()||this._priceScale.isIndexedTo100()?this._setCursorClassName(""):this._pane.chart().model().model().zoomEnabled()&&this._setCursorClassName("ns-resize")},O.prototype._initActions=function(e){if(this._pane.hasState()&&null===this.actions){this.actions={};var t=this,n=this._pane.chart().model();this.actions.reset=new a({label:window.t("Reset Price Scale"),icon:i("LdoW"),shortcut:"Alt+R",shortcutHint:r.humanReadableHash(r.Modifiers.Alt+82),statName:"ResetScale",onExecute:O.prototype.reset.bind(this)}),this.actions.setAutoScale=new a({label:window.t("Auto (Fits Data To Screen)"),checkable:!0,checked:!0,statName:"ToggleAutoScale",onExecute:function(){n.togglePriceScaleAutoScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setPercentage=new a({label:window.t("Percent",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isPercentage(),statName:"TogglePercantage", onExecute:function(){n.togglePriceScalePercentageScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setIndexedTo100=new a({label:window.t("Indexed to 100",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isIndexedTo100(),statName:"ToggleIndexedTo100",onExecute:function(){n.togglePriceScaleIndexedTo100ScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setLog=new a({label:window.t("Logarithmic",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isLog(),statName:"ToggleLogScale",onExecute:function(){n.togglePriceScaleLogScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setRegular=new a({label:window.t("Regular",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isRegular(),statName:"ToggleRegularScale",onExecute:function(){n.setPriceScaleRegularScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.alignLabels=new a({label:window.t("No Overlapping Labels",{context:"scale_menu"}),checkable:!0,checked:!1,statName:"TogglePreciseLabels"}),this.actions.alignLabels.binding=new g(this.actions.alignLabels,this.priceScale().properties().alignLabels,this._pane.chart().model(),"No Overlapping Labels"),this.actions.invertScale=new a({label:window.t("Invert Scale",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isInverted(),statName:"Invert Scale",onExecute:function(){n.invertPriceScale(t.priceScale()),t._updateScalesActions()}}),this._updateScalesActions()}},O.prototype._logAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().logSeriesScale:this.actions.setLog},O.prototype._percentageAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().percentSeriesScale:this.actions.setPercentage},O.prototype._indexedTo100Action=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().indexedTo100SeriesScale:this.actions.setIndexedTo100},O.prototype._autoScaleAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().autoSeriesScale:this.actions.setAutoScale},O.prototype._regularScaleAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().regularSeriesScale:this.actions.setRegular},O.prototype._lockScaleAction=function(){var e=this._pane.chart().actions().lockSeriesScale,t=A(this.priceScale(),this._pane.chart().model().model().mainSeriesScaleRatio());return e.update({hint:t}),e},O.prototype._invertAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().invertSeriesScale:this.actions.invertScale},O.prototype._isMainSeriesAxis=function(){return this.priceScale().hasMainSeries()},O.prototype._updateMainSeriesScalesActions=function(){this._isMainSeriesAxis()&&null!==this.actions&&this._updateScalesActions()},O.prototype._updateScalesActions=function(){var e=this.priceScale(),t=this._isMainSeriesAxis(),i=e.mainSource().properties(),n=t&&e.isLockScale(),r=t&&i.style.value()===TradingView.Series.STYLE_PNF;this.actions.setRegular.update({checked:e.isRegular(),disabled:n||r}),this.actions.setPercentage.update({ checked:e.isPercentage(),disabled:n||r}),this.actions.setIndexedTo100.update({checked:e.isIndexedTo100(),disabled:n||r}),this.actions.setLog.update({checked:e.isLog(),disabled:n||r}),this.actions.setAutoScale.update({checked:e.isAutoScale(),disabled:e.properties().autoScaleDisabled.value()})},O.prototype._mouseDoubleClickOrDoubleTapEvent=function(e){var t=this.dataSourceAtPoint(e.localX,e.localY);t?this._pane.processDoubleClickOnSource(t):(this.reset(),y("GUI","Double click price scale"))},O.prototype.mouseDoubleClickEvent=function(e){this._mouseDoubleClickOrDoubleTapEvent(e)},O.prototype.doubleTapEvent=function(e){this._mouseDoubleClickOrDoubleTapEvent(e)},O.prototype._contextMenuOrTouchContextMenuEvent=function(e){if(this._options.contextMenuEnabled){var t=this.dataSourceAtPoint(e.localX,e.localY);if(null!==t&&this._options.contextMenu.source)return void this._pane.chart().model().selectionMacro(function(i){i.selection().isSelected(t)||(i.clearSelection(),i.addSourceToSelection(t)),this._pane.showContextMenuForSelection(e)}.bind(this));this._options.contextMenu.general&&this._createContextMenu().then((function(t){t.show(e)}))}},O.prototype.contextMenuEvent=function(e){this._contextMenuOrTouchContextMenuEvent(e)},O.prototype.touchContextMenuEvent=function(e){this._contextMenuOrTouchContextMenuEvent(e)},O.prototype._createContextMenu=function(){return c.createMenu(this.getContextMenuActions(),{statName:"PriceScaleContextMenu"})},O.prototype._createMergeScalesAction=function(){var e=this._pane.chart().actions(),t=this._pane.chart().model().model().priceScaleSlotsCount();if(t.left+t.right===1)return 0===t.left?e.moveScaleToLeft:e.moveScaleToRight;var i=[];return i.push(e.mergeLeftScalesAction),i.push(e.mergeRightScalesAction),new a({label:L,subItems:i})},O.prototype.getContextMenuActions=function(){this._initActions();var e=this._pane.chart().actions(),t=[];if(t.push(this.actions.reset,new l,this._autoScaleAction()),this._isMainSeriesAxis()&&t.push(this._lockScaleAction()),t.push(e.scaleSeriesOnly,this._invertAction(),new l,this._regularScaleAction(),this._percentageAction(),this._indexedTo100Action(),this._logAction(),new l),o.any()||(t.push(this._createMergeScalesAction()),t.push(new l)),!M.enabled("fundamental_widget")){t.push(new a({label:window.t("Labels"),subItems:[e.showSymbolLabelsAction,e.showSeriesLastValue,null,null,null,e.showStudyPlotNamesAction,e.showStudyLastValue,null,null,this.actions.alignLabels].filter(Boolean)}))}return t.push(P(this._pane.chart())),M.enabled("countdown")&&t.push(e.showCountdown),this._options.currencyLabelEnabled&&t.push(e.showCurrency),!TradingView.onWidget()&&M.enabled("show_chart_property_page")&&M.enabled("chart_property_page_scales")&&e.scalesProperties&&t.push(new l,e.scalesProperties),t},O.prototype._sameSideSources=function(){var e=this._isLeft?"left":"right";return this._pane.state().orderedSources(e)},O.prototype._grouppedSources=function(){ var e=this._pane,t=e.chart().model(),i=this._sameSideSources().slice(),n=e.state(),r=this.priceScale(),o=new Set,s=t.lineBeingEdited()||t.lineBeingCreated();if(s&&o.add(s),t.sourcesBeingMoved().forEach((function(e){o.add(e)})),t.selection().sources().forEach((function(e){o.add(e)})),t.hoveredSource()&&o.add(t.hoveredSource()),r===n.defaultPriceScale())for(var a=this._pane.state().dataSources(),l=0;l0&&this._hightlightBackground(e,l,this.priceScale().mainSource(),t);var c=s.model().crossHairSource();c.startMeasurePoint()&&this._hightlightBackground(e,c.measurePoints(),this.priceScale().mainSource(),t)},O.prototype.drawBorder=function(e,t){e.save(),e.fillStyle=this.lineColor();var i,n=Math.max(1,Math.floor(this.rendererOptions().borderSize*t));i=this._isLeft?Math.floor(this._size.w*t)-n:0,e.fillRect(i,0,n,Math.ceil(this._size.h*t)+1),e.restore()},O.prototype.drawTickMarks=function(e,t){var i=this.priceScale().marks() ;e.save(),e.setFont(this.baseFont());var n=this.rendererOptions(),r=this._isLeft?Math.floor((this._size.w-n.tickLength-n.borderSize)*t):Math.floor(n.borderSize*t),o=this._isLeft?Math.round(r-n.paddingInner*t):Math.round(r+(n.tickLength+n.paddingInner)*t),s=this._isLeft?"right":"left",a=Math.round(n.tickLength*t),l=Math.max(1,Math.floor(t)),c=Math.floor(.5*t),u=0!==i.length?this._tickmarksCache.getLabelHeight(e,i[0].label):0,h=this._isCurrencyLabelVisible()?this._currencyLabelLineHeight()+this._currencyLabel.labelTop():0,d=i.map((function(e){if(this._options.croppedTickMarks)return!0;var t=e.coord-u/2;return!(e.coord+u/2>this._size.h||t0&&(e=a[0].floatCoordinate())}}}u.forEach((function(e){h.add(e)})),d(n),d(this._pane.state().customSources());var p=t.filter((function(t){return t.floatCoordinate()<=e})),_=t.filter((function(t){return t.floatCoordinate()>e}));p.sort((function(e,t){return t.floatCoordinate()-e.floatCoordinate()})),p.length&&_.length&&_.push(p[0]),_.sort((function(e,t){return e.floatCoordinate()-t.floatCoordinate()}));var f=t.length;for(a=0;ab-y&&v.setFixedCoordinate(b-y)}for(var S=1;S<_.length;S++){var w;v=_[S],y=(w=_[S-1]).height(o,!0),g=v.coordinate(),b=w.getFixedCoordinate();(g||b)&&g=l)&&(o={value:l,view:a})}})),r.view&&n.push(r.view), o.view&&n.push(o.view),n},O.prototype._isFromSameSide=function(e){return(this._isLeft?this._pane.state().leftPriceScales():this._pane.state().rightPriceScales()).includes(e)},O.prototype._addViewsOrMaxMin=function(e,t){var i=this._pane.state(),n=this.priceScale();if(n!==i.defaultPriceScale()&&(e=e.filter(function(e){return i.isOverlay(e)||this._isFromSameSide(e.priceScale())}.bind(this))),0!==e.length)if(1===e.length){var r=e[0].priceAxisViews(i,n);r&&r.length&&t.push(r)}else t.push(this._minMaxViews(e))},O.prototype.drawCrossHairLabel=function(e,t){e.save();var i=this._pane.chart().model().model(),n=this._pane.state(),r=this.priceScale(),o=[],s=this._pane.state(),a=this.priceScale()===n.defaultPriceScale(),l=i.lineBeingEdited()||i.lineBeingCreated();l&&(l.priceScale()===r||a&&n.isOverlay(l))&&((u=l.priceAxisViews(s,r))&&u.length&&o.push(u));this._addViewsOrMaxMin(i.sourcesBeingMoved(),o),this._addViewsOrMaxMin(i.selection().sources(),o);var c=i.hoveredSource();if(c){var u,h=n.customSources().includes(c)?r:c.priceScale();if(!i.selection().isSelected(c)&&(this._isFromSameSide(h)||a&&n.isOverlay(c)))(u=i.hoveredSource().priceAxisViews(s,r))&&u.length&&o.push(u)}(u=i.crossHairSource().priceAxisViews(s,r))&&u.length&&o.push(u);var d=this.rendererOptions(),p=this._isLeft?"right":"left";o.forEach((function(i){i.forEach((function(i){e.save(),i.renderer().draw(e,d,this._widthCache,this._size.w,p,t),e.restore()}),this)}),this),e.restore()},O.prototype.setAutoScale=function(e){var t=this._pane.state(),i=this.priceScale();this._pane.chart().model().setPriceAutoScale(t,i,e)},O.prototype.reset=function(){var e=this._pane.state(),t=this.priceScale();this._pane.chart().model().resetPriceScale(e,t)},O.prototype.hardResetCanvas=function(){null!==this._size&&(p(this._canvasBinding,this._size),p(this._topCanvasBinding,this._size))},O.prototype._isMainPane=function(){return this._pane.state().containsMainSeries()},O.prototype.paint=function(e){if(this._isVisible&&e!==u.None){if(e>u.Cursor){var t=d(this._canvasBinding.canvas);this._alignLabels(),this.drawBackground(t,this._canvasBinding.pixelRatio),this.drawBorder(t,this._canvasBinding.pixelRatio),this._pane.hasState()&&(this._updateCurrencyLabel(),this.drawTickMarks(t,this._canvasBinding.pixelRatio),this.drawBackLabels(t,this._canvasBinding.pixelRatio))}if(this._pane.hasState()){var i=d(this._topCanvasBinding.canvas),n=this._topCanvasBinding.pixelRatio;i.clearRect(0,0,Math.ceil(this._size.w*n)+1,Math.ceil(this._size.h*n)+1),this.drawCrossHairLabel(i,n)}}},O.prototype.restoreDefaultCursor=function(){this.setCursor("")},O.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)},O.prototype.axisInfo=function(){return this._axisInfo},O.prototype.setHighlighted=function(e){this._highlighted!==e&&(this._highlighted=e)};var A=k(4);e.exports={ PriceAxisWidget:O,scaleRatioForContextMenuTransformer:k}},"1Wlv":function(e,t,i){"use strict";(function(e){var n=i("Yj6H").PriceScaleBase,r=i("Ss5c").LineDataSource,o=i("7ktv").PriceDataSource,s=i("qJq3").Series,a=i("kcTO").PriceFormatter,l=i("GH0z").PercentageFormatter,c=i("Qb4w").PriceRange,u=i("e3/o").randomHash,h=i("s1Gx").sortSources,d=i("3ClC").isStudy,p=i("lTLF").PriceTickMarkBuilder,_=i("TTFo"),f=_.fromPercent,m=_.toPercent,v=_.toPercentRange,y=_.fromIndexedTo100,g=_.toIndexedTo100,b=_.toIndexedTo100Range,S=_.fromLog,w=_.toLog,P=new l,C=new a(100,1);function x(t,i){n.call(this,i),this._scalesProperties=t,this.m_height=0,this._internalHeightCache=null,this._internalHeightChanged=new e,this.m_priceRange=null,this._priceRangeChanged=new e,this.m_topMargin=0,this.m_bottomMargin=0,this._topPixelMargin=0,this._bottomPixelMargin=0,this.m_scrollStartPoint=null,this.m_scaleStartPoint=null,this.m_maxPriceRange=null,this.m_minPriceRange=null,this.m_priceRangeSnapshot=null,this._invalidatedForRange={isValid:!0,visibleBars:null};var r=this;this._coordinateToLogicalFunc=function(e,t){return r._coordinateToLogical(e,t)},this._logicalToCoordinateFunc=function(e,t){return r._logicalToCoordinate(e,t)},this.m_markBuilder=new p(this,100,this._coordinateToLogicalFunc,this._logicalToCoordinateFunc),this._modeChanged=new e,this._properties.isInverted.listeners().subscribe(this,x.prototype._onIsInvertedChanged),this._properties.listeners().subscribe(null,(function(){if(r.mainSource()&&r.mainSource().model()){var e=r.mainSource().model().paneForSource(r.mainSource());r.mainSource().model().updatePane(e)}})),this._scalesProperties.listeners().subscribe(this,(function(){this._marksCache=null})),this.setId(u())}inherit(x,n),x.prototype.id=function(){return this._id},x.prototype.setId=function(e){this._id=e},x.prototype._convertPriceRangeFromLog=function(e){if(null===e)return null;var t=S(e.minValue()),i=S(e.maxValue());return new c(t,i)},x.prototype._convertPriceRangeToLog=function(e){if(null===e)return null;var t=w(e.minValue()),i=w(e.maxValue());return new c(t,i)},x.prototype._canConvertPriceRangeFromLog=function(e){if(null===e)return!1;var t=S(e.minValue()),i=S(e.maxValue());return isFinite(t)&&isFinite(i)},x.prototype.mode=function(){return{autoScale:this._properties.autoScale.value(),lockScale:this._properties.lockScale.value(),percentage:this._properties.percentage.value(),indexedTo100:this._properties.indexedTo100.value(),log:this._properties.log.value()}},x.prototype.setMode=function(e){var t={},i=this.mode(),n=this._properties.state(),r=null;void 0!==e.autoScale&&e.autoScale!==n.autoScale&&(t.autoScale=e.autoScale,this._setAutoScaleValueWithDependentProperties(e.autoScale)),void 0!==e.lockScale&&e.lockScale!==n.lockScale&&(t.lockScale=e.lockScale,this._setLockScaleValueWithDependentProperties(e.lockScale)),void 0!==e.percentage&&e.percentage!==n.percentage&&(t.percentage=e.percentage,this._setPercentageValueWithDependentProperties(e.percentage),this._invalidatedForRange.isValid=!1), void 0!==e.indexedTo100&&e.indexedTo100!==n.indexedTo100&&(t.indexedTo100=e.indexedTo100,this._setIndexedTo100ValueWithDependentProperties(e.indexedTo100),this._invalidatedForRange.isValid=!1),void 0!==e.log&&e.log!==n.log&&(t.log=e.log,this._setLogValueWithDependentProperties(e.log)),n.log&&!this._properties.log.value()&&(this._canConvertPriceRangeFromLog(this.m_priceRange)?null!==(r=this._convertPriceRangeFromLog(this.m_priceRange))&&this.setPriceRange(r):this.properties().autoScale.setValue(!0)),!n.log&&this._properties.log.value()&&null!==(r=this._convertPriceRangeToLog(this.m_priceRange))&&this.setPriceRange(r),n.autoScale!==this._properties.autoScale.value()&&this._properties.autoScale.listeners().fire(this._properties.autoScale),n.autoScaleDisabled!==this._properties.autoScaleDisabled.value()&&this._properties.autoScaleDisabled.listeners().fire(this._properties.autoScaleDisabled),n.lockScale!==this._properties.lockScale.value()&&this._properties.lockScale.listeners().fire(this._properties.lockScale),n.percentage!==this._properties.percentage.value()&&(this._properties.percentage.listeners().fire(this._properties.percentage),this.updateFormatter()),n.indexedTo100!==this._properties.indexedTo100.value()&&(this._properties.indexedTo100.listeners().fire(this._properties.indexedTo100),this.updateFormatter()),n.percentageDisabled!==this._properties.percentageDisabled.value()&&this._properties.percentageDisabled.listeners().fire(this._properties.percentageDisabled),n.log!==this._properties.log.value()&&this._properties.log.listeners().fire(this._properties.log),n.logDisabled!==this._properties.logDisabled.value()&&this._properties.logDisabled.listeners().fire(this._properties.logDisabled),void 0===t.log&&void 0===t.percentage&&void 0===t.lockScale&&void 0===t.autoScale&&void 0===t.indexedTo100||this._modeChanged.fire(i,this.mode())},x.prototype.modeChanged=function(){return this._modeChanged},x.prototype.fontSize=function(){return this._scalesProperties.fontSize.value()},x.prototype.height=function(){return this.m_height},x.prototype.setHeight=function(e){this.m_height!==e&&(this.m_height=e,this._invalidateInternalHeightCache(),this._marksCache=null)},x.prototype.topPixelMargin=function(){return this.isInverted()?this.m_bottomMargin*this.height()+this._bottomPixelMargin:this.m_topMargin*this.height()+this._topPixelMargin},x.prototype.topMargin=function(){return this.m_topMargin},x.prototype.setTopMargin=function(e){if(!isNumber(e))throw new TypeError("invalid margin");if(e<0||e>30)throw new RangeError("invalid margin");this.m_topMargin!==e&&(this.m_topMargin=e,this._invalidateInternalHeightCache(),this._marksCache=null)},x.prototype.bottomPixelMargin=function(){return this.isInverted()?this.m_topMargin*this.height()+this._topPixelMargin:this.m_bottomMargin*this.height()+this._bottomPixelMargin},x.prototype.bottomMargin=function(){return this.m_bottomMargin},x.prototype.setBottomMargin=function(e){if(!isNumber(e))throw new TypeError("invalid margin");if(e<0||e>30)throw new RangeError("invalid margin") ;this.m_bottomMargin!==e&&(this.m_bottomMargin=e,this._invalidateInternalHeightCache(),this._marksCache=null)},x.prototype.internalHeight=function(){if(this._internalHeightCache)return this._internalHeightCache;var e=this.height()-this.topPixelMargin()-this.bottomPixelMargin();return this._internalHeightCache=e,e},x.prototype._invalidateInternalHeightCache=function(){this._internalHeightCache=null,this._internalHeightChanged.fire()},x.prototype.internalHeightChanged=function(){return this._internalHeightChanged},x.prototype.priceRange=function(){return this.makeSureItIsValid(),this.m_priceRange},x.prototype.priceRangeChanged=function(){return this._priceRangeChanged},x.prototype.setPriceRange=function(e,t,i){if(!(e instanceof c))throw new TypeError("incorrect price range");var n=this.m_priceRange;if(!t&&(null!==n||null===e)&&(null===n||n.equals(e)))return!1;var r=null!==this.m_maxPriceRange&&this.m_maxPriceRange.containsStrictly(e),o=null!==this.m_minPriceRange&&e.containsStrictly(this.m_minPriceRange);if(this.isLockScale()&&!t&&(r||o))return!1;this._marksCache=null,this.m_priceRange=e,i||this._priceRangeChanged.fire(n,e)},x.prototype.isEmpty=function(){return this.makeSureItIsValid(),0===this.m_height||!this.m_priceRange||this.m_priceRange.isEmpty()},x.prototype.invertedCoordinate=function(e){return this.isInverted()?e:this.height()-1-e},x.prototype.priceToLogical=function(e){return this.isLog()&&e?w(e):e},x.prototype.logicalToPrice=function(e){return this.isLog()?S(e):e},x.prototype._logicalToCoordinate=function(e,t){if(this.makeSureItIsValid(),this.isEmpty())return 0;e=this.priceToLogical(e);var i=this.bottomPixelMargin()+(this.internalHeight()-1)*(e-this.priceRange().minValue())/(this.priceRange().maxValue()-this.priceRange().minValue());return this.invertedCoordinate(i)},x.prototype.priceToCoordinate=function(e,t){return this.isPercentage()?e=m(e,t):this.isIndexedTo100()&&(e=g(e,t)),this._logicalToCoordinate(e,t)},x.prototype.pointsArrayToCoordinates=function(e,t){this.makeSureItIsValid();var i=this.bottomPixelMargin(),n=this.priceRange().minValue(),r=this.priceRange().maxValue(),o=this.internalHeight()-1,s=this.isInverted(),a=o/(r-n);if(this.isPercentage())for(var l=0;l0||Math.abs(s-this._bottomPixelMargin)>0)&&(this._bottomPixelMargin=s,this._topPixelMargin=o,this._marksCache=null,this._invalidateInternalHeightCache()),t?(t.minValue()===t.maxValue()&&(t=new c(t.minValue()-.5,t.maxValue()+.5)),this.setPriceRange(t)):this.m_priceRange||this.setPriceRange(new c(-.5,.5)),this._invalidatedForRange.isValid=!0}},x.prototype.sourcesToUpdateViews=function(){if(!this._sourcesToUpdateViews){this._sourcesToUpdateViews=[];for(var e=0;e'},"2+aH":function(e,t,i){"use strict";(function(e){var n=i("vdSZ").CrosshairDataWindowView,r=i("Hm6r").CrosshairTimeAxisView,o=i("zZ2k").CrosshairBase,s=i("mMWL"),a=i("ogJP").isNaN;function l(t,i,a){var l=this;o.call(this,t,a),this._properties=i,this._dataWindowView=new n(t) ;var c=function(){return this.appliedIndex()}.bind(this),u=function(){return this._startMeasurePoint.index}.bind(this),h=function(){return this._lastMeasurePoint().index}.bind(this);this._timeAxisView=new r(t,c,!1),this._startMeasureTimeAxisView=new r(t,u,!0),this._endMeasureTimeAxisView=new r(t,h,!0),this.visible=!0,t.readOnly()?this.areLinesVisible=!0:s.cursorTool.subscribe((function(e){l.areLinesVisible="arrow"!==e}),{callWithLast:!0}),this._movedDelegate=new e,this._subscribed=!1,this._barSelectedDelegate=new e}inherit(l,o),l.prototype.index=0,l.prototype.price=NaN,l.prototype.pane=null,l.prototype.color="white",l.prototype.style="",l.prototype.customization={disableSelection:!0},l.prototype.model=function(){return this._model},l.prototype.properties=function(){return this._properties},l.prototype.moved=function(){return this._movedDelegate},l.prototype.originX=function(){return this._originX},l.prototype.originY=function(){return this._originY},l.prototype.saveOriginCoord=function(e,t){this._originX=e,this._originY=t},l.prototype.originCoordX=function(){return this._originX},l.prototype.originCoordY=function(){return this._originY},l.prototype.clearOriginCoord=function(){this._originX=NaN,this._originY=NaN},l.prototype.setPosition=function(e,t,i){this._subscribed||(this._model.mainSeries().onRestarted().subscribe(this,l.prototype.clearMeasure),this._subscribed=!0),this.setLockedPosition(i),this.visible=!0,this._tryToUpdateViews(e,t,i)},l.prototype.selectionPane=function(){return this._selectionPane},l.prototype.update=function(){if(this.visible){var e=this._priceScaleByPane(this.pane),t=this._originX||this.x,i=this._originY||this.y,n=this._model.timeScale().coordinateToIndex(t),r=NaN;if(null!==e){var o=this.pane.mainDataSource().firstValue();r=e.coordinateToPrice(i,o)}this._tryToUpdateViews(n,r,this.pane)}else this._setIndexToLastSeriesBarIndex()},l.prototype._priceScaleByPane=function(e){return e&&!e.defaultPriceScale().isEmpty()?e.defaultPriceScale():null},l.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}))},l.prototype._tryToUpdateData=function(e,t,i){var n=this.x,r=this.y,o=this.price,s=this.index,l=this.pane,c=this._priceScaleByPane(i);if(this.index=e,this.x=a(e)?NaN:this._model.timeScale().indexToCoordinate(e),null!==c){this.pane=i,this.price=t;var u=i.mainDataSource().firstValue();this.y=c.priceToCoordinate(t,u)}else this.pane=null,this.price=NaN,this.y=NaN;return n!==this.x||r!==this.y||s!==this.index||o!==this.price||l!==this.pane},l.prototype.clearPosition=function(){this.visible=!1,this._setIndexToLastSeriesBarIndex(),this.price=NaN,this.x=NaN,this.y=NaN,this.pane=null,this.clearOriginCoord()},l.prototype._setIndexToLastSeriesBarIndex=function(){var e=this._model.mainSeries().bars().lastIndex();this.index=null!==e?e:NaN},l.prototype.dataWindowView=function(){return this._dataWindowView},l.prototype.appliedIndex=function(){ return isFinite(this.lockedIndex)&&this.lockedIndex||this.index},l.prototype.appliedX=function(){return isFinite(this.lockedX)&&this.lockedX||this.x},l.prototype.selectBarMode=function(){return this._selectBarMode},l.prototype.toggleSelectBarMode=function(){this._setSelectBarModeState(!this._selectBarMode.value())},l.prototype.onBarSelected=function(){return this._barSelectedDelegate},l.prototype._setSelectBarModeState=function(e){this._selectBarMode.setValue(e),this._model.lightUpdate()},l.prototype.trySelectCurrentBar=function(){if(this._model.mainSeries().bars().contains(this.index)){var e=this._model.timeScale().indexToTimePoint(this.index);null!==e&&(this._setSelectBarModeState(!1),this._barSelectedDelegate.fire(e))}},l.prototype.handleContextMenuEvent=function(){this._selectBarMode.value()&&this._setSelectBarModeState(!1)},l.prototype.setOnHoveredChartWidget=function(e){this._isOnHoveredChartWidget=e},l.prototype.isOnHoveredChartWidget=function(){return this._isOnHoveredChartWidget},t.CrossHair=l}).call(this,i("aIyQ"))},"22xp":function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("Eyy1"),o=(i("YFKU"),i("9uLv")),s=i("txPx"),a=i("//lZ"),l=i("aIyQ"),c=i.n(l),u=i("Kxc7"),h=i("Hr11"),d=i("ogJP"),p=i("ZJKN"),_=function(){function e(e,t){Object(r.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}(),f=Object(s.getLogger)("Chart.TimePoints"),m=function(){function e(){this._zoffset=0,this._items=[]}return e.prototype.clear=function(){this._zoffset=0,this._items=[]},e.prototype.size=function(){return this._items.length},e.prototype.firstIndex=function(){return this._offsetToIndex(0)},e.prototype.lastIndex=function(){return this._offsetToIndex(this._items.length-1)},e.prototype.merge=function(e,t,i){if(0===i.length)return f.logError("merge: 'values' does not contain any time points"),[];if(t>this._zoffset&&e+t>0)return f.logError("merge: when the first time point index is updated, we should fill the time points starting from the first one"),[];if(0===this._items.length)return this._items=i,this._zoffset=t,[{change:"rebuild",index:this._validOffsetToIndex(0)}];var n=e+this._zoffset;if(n<0){var r=Math.abs(n);if(i.lengththis._items.length){r=l-this._items.length;for(var c=a;cthis._items[this._items.length-1])return t?this._validOffsetToIndex(this._items.length-1):null;for(var i=0;is?(u=e-s)<500&&null!=t?t(l,u):l+u*c:null},e.prototype.roughIndex=function(e,t){void 0===t&&(t=null);var i=this._items;if(!i.length||i.length<2)return null;var n=i.length-1,r=this._validOffsetToIndex(0),o=this._validOffsetToIndex(n),s=i[0],a=i[n];if(e>=s&&e<=a)return this.closestIndexLeft(e);var l=(a-s)/(o-r);if(ea){var u;c=e-a;if((u=Math.trunc(c/l))<500&&null!==t){var h=t(a,e);h.success&&(u=h.result)}return o+u}return null},e.prototype.closestIndexLeft=function(e){var t=this._items;if(!t.length)return null;if(Number.isNaN(e))return null;var i=t.length-1;if(e>=t[i])return this._validOffsetToIndex(i);var n=0,r=t[n];if(en+1;){var o=n+i>>1,s=t[o];if(s>e)i=o;else{if(!(s0&&this._points.merge(e,t,i),this._tickMarks.merge(n),this._correctOffset()}, e.prototype.addTail=function(e,t,i){this._tickMarks.removeTail(t);for(var n=e.params,o=Object(r.ensureDefined)(this._tickMarks.maxIndex)+(i?0:1),s=0;s0&&(i*=this._width/e.width)),this._tryToUpdateBarSpacing(this._barSpacing,i),this._correctOffset()}else k.logDebug("restoreState: invalid state");else k.logDebug("restoreState: invalid state")},e.prototype.marks=function(){if(this.isEmpty())return null;for(var e=this._barSpacing,t=5*((this._scalesProperties.childs().fontSize.value()||0)+4),i=Math.round(t/e),n=Object(r.ensureNotNull)(this.visibleBarsStrictRange()),o=Math.max(n.firstBar(),n.firstBar()-i),s=Math.max(n.lastBar(),n.lastBar()-i),a=[],l=0,c=this._tickMarks.build(e,t);l=P.DAY_SPAN})}}return a},e.prototype.visibleBarsStrictRange=function(){return this._visibleBarsInvalidated&&(this._visibleBarsInvalidated=!1,this._updateVisibleBars()),this._visibleBars.strictRange()},e.prototype.visibleBarsStrictRangeChanged=function(){return this._visibleBarsChanged},e.prototype.logicalRangeChanged=function(){return this._logicalRangeChanged},e.prototype.tickMarks=function(){return this._tickMarks},e.prototype.points=function(){return this._points},e.prototype.width=function(){return this._width},e.prototype.setWidth=function(e){if(!Number.isFinite(e)||e<=0)k.logWarn("setWidth: invalid argument: "+e);else if(this._width!==e){if(this._visibleBarsInvalidated=!0,this._options.lockVisibleTimeRangeOnResize&&this._width){var t=this._barSpacing*e/this._width;this._tryToUpdateBarSpacing(this._barSpacing,t)}if(null!==this._leftEdgeIndex)if(Object(r.ensureNotNull)(this.visibleBarsStrictRange()).firstBar()<=this._leftEdgeIndex){var i=this._width-e;this._rightOffset-=Math.round(i/this._barSpacing)+1}this._width=e,this._widthChanged.fire(e),this._correctOffset()}},e.prototype.setLeftEdgeFix=function(e){this._leftEdgeIndex=e;var t=this.visibleBarsStrictRange();if(null!==t){var i=t.firstBar()-e;if(i<0){var n=this._rightOffset-i-1;this.scrollToOffsetAnimated(n,500)}}},e.prototype.indexToCoordinate=function(e){if(this.isEmpty())return 0 ;if(!Object(d.isInteger)(e))return 0;var t=this.baseIndex()+this._rightOffset-e;return this._width-(t+.5)*this._barSpacing},e.prototype.indexToUserTime=function(e){return this._tickMarks.indexToTime(e)},e.prototype.timePointToIndex=function(e){return this._points.indexOf(e,!0)},e.prototype.indexToTimePoint=function(e){return this._points.valueAt(e)},e.prototype.timeToCoordinate=function(e){var t=this._points.closestIndexLeft(e);if(null===t)return null;var i=Object(r.ensureNotNull)(this._points.valueAt(t)),n=this.indexToCoordinate(t);if(n<=0||n>=this._width)return null;var o=this.barSpacing(),s=this.baseIndex(),a=n+(e-i)/(Object(r.ensureNotNull)(this._points.valueAt(s))-Object(r.ensureNotNull)(this._points.valueAt(s-1)))*o+1;return a<=0||a>=this._width?null:a},e.prototype.barIndexesToCoordinates=function(e){for(var t=this.baseIndex(),i=0,n=e;i0&&n>s&&(n=s);var l=this._model;Object(a.doAnimate)({from:r,to:n,duration:1e3,easing:o.easingFunc.easeInOutQuint,onComplete:t,onStep:function(e,t){i._visibleBarsInvalidated=!0,i._rightOffset=t,i._correctOffset(),l.recalculateAllPanes(),l.lightUpdate(),l.recalcVisibleRangeStudies()}})}else this._visibleBarsInvalidated=!0,this._rightOffset=n,this._correctOffset(),void 0!==t&&t()},e.prototype.scrollToOffsetAnimated=function(e,t){var i=this;if(!isFinite(e))throw new RangeError("offset is required and must be finite number");var n=void 0===t?400:t;if(!isFinite(n)||n<=0)throw new RangeError("animationDuration (optional) must be finite positive number");var r=this._rightOffset,o=Date.now(),s=function(){i._visibleBarsInvalidated=!0;var t=(Date.now()-o)/n;if(t>=1)return i._rightOffset=e,i._correctOffset(),i._visibleBarsInvalidated=!0,i._model.recalculateAllPanes(),void i._model.lightUpdate();i._rightOffset=r+(e-r)*t,i._correctOffset(),i._model.recalculateAllPanes(),setTimeout(s,20)};s()},e.prototype.defaultRightOffsetProperty=function(){return this._defaultRightOffsetProperty},e.prototype.rightOffsetDefaultValue=function(){return 10},e.prototype.barSpacing=function(){return this._barSpacing},e.prototype.setBarSpacing=function(e){Number.isFinite(e)?(e=this.getValidBarSpacing(e),this._tryToUpdateBarSpacing(this._barSpacing,e)&&(this._correctOffset(),this._options.preserveBarSpacing&&(Object(S.saveDefaultProperties)(!0),this._scalesProperties.childs().barSpacing.setValue(this._barSpacing), Object(S.saveDefaultProperties)(!1)))):k.logWarn("setBarSpacing: invalid argument: "+e)},e.prototype.barSpacingChanged=function(){return this._barSpacingChanged},e.prototype.getValidBarSpacing=function(e){return null==e&&(e=this.barSpacing()),ethis.maxBarSpacing()?this.maxBarSpacing():e},e.prototype.isValidBarSpacing=function(e){return e>=this.minBarSpacing()&&e<=this.maxBarSpacing()},e.prototype.preserveBarSpacing=function(){return this._options.preserveBarSpacing},e.prototype.normalizeBarIndex=function(e){var t=0,i=0,n=this.baseIndex(),o=Object(r.ensureNotNull)(this._points.firstIndex());return en?(t=Object(r.ensureNotNull)(this._points.valueAt(n)),i=e-n):(t=Object(r.ensureNotNull)(this._points.valueAt(e)),i=0),{time_t:t,offset:i}},e.prototype.denormalizeTimePoint=function(e){var t=this._points.indexOf(e.time_t,!1);if(null!==t)return t+e.offset},e.prototype.rightOffset=function(){return this._rightOffset},e.prototype.minRightOffset=function(){var e=this.points().firstIndex(),t=this._baseIndex;if(null===e||null===t)return null;if(null!==this._leftEdgeIndex){var i=this.width()/this._barSpacing;return this._leftEdgeIndex-t+i-1}return e-t-1+O},e.prototype.maxRightOffset=function(){return this.width()/this._barSpacing-O},e.prototype.maxRightOffsetChanged=function(){return this._maxRightOffsetChanged},e.prototype.onReset=function(){return this._resetDelegate},e.prototype.scrollStartPoint=function(){return this._scrollStartPoint},e.prototype.baseIndex=function(){return this._baseIndex||0},e.prototype.zoom=function(e,t,i){if(Number.isFinite(e)&&Number.isFinite(t)){var n=this.coordinateToIndex(e),r=this.barSpacing(),o=r+t*(r/10);this.setBarSpacing(o),(void 0!==i?!i:this._options.rightBarStaysOnScroll)||this.setRightOffset(this.rightOffset()-.5+(n-this._coordinateToFloatIndex(e)))}else k.logWarn("zoom: invalid arguments: "+e+", "+t+", "+i)},e.prototype.zoomToBarsRange=function(e,t){if(!(t<=e)){var i=this.baseIndex();this._rightOffset=t-i;var n=A.get(this._model.mainSeries().style())||.6,r=Math.max(t-e+n,O);this.setBarSpacing(this.width()/r),this._visibleBarsInvalidated=!0}},e.prototype.coordinateToIndex=function(e){return Math.ceil(this._coordinateToFloatIndex(e))},e.prototype.canZoomIn=function(){return this.barSpacing()L},e.prototype.minBarSpacing=function(){return L},e.prototype.maxBarSpacing=function(){return M?this.width():50},e.prototype.resetRightOffset=function(){this.setRightOffset(this._defaultRightOffsetProperty.value())},e.prototype.reset=function(){this._visibleBarsInvalidated=!0,this._points=new m,this._scrollStartPoint=null,this._scaleStartPoint=null,this._clearCommonTransitionsStartState(),this._tickMarks.reset(),this._leftEdgeIndex=null,this._resetDelegate.fire()},e.prototype.setBaseIndex=function(e){Number.isFinite(e)?(this._visibleBarsInvalidated=!0,this._baseIndex=e, this._correctOffset()):k.logDebug("setBaseIndex: invalid argument: "+e)},e.prototype.setRightOffset=function(e){Number.isFinite(e)?(this._visibleBarsInvalidated=!0,this._rightOffset=e,this._correctOffset()):k.logWarn("setRightOffset: invalid argument: "+e)},e.prototype.correctBarSpacing=function(){this.isEmpty()||this.points().size()e&&(this._rightOffset=e,this._visibleBarsInvalidated=!0);var t=this.minRightOffset();null!==t&&this._rightOffsett[t.length-1].time+i)return null;for(var o=null,s=0,a=t;s=2)&&(Math.max(1,Math.floor(i))%2!=this._barWidth%2&&this._barWidth--);this._barLineWidth=this._thinBars?Math.min(this._barWidth,Math.floor(i)):this._barWidth;for(var n=null,r=this._barLineWidth<=this._barWidth&&this._barSpacing>=Math.floor(1.5*t.pixelRatio),o=0,s=this._bars;of+v-1&&(b=(S=f+v-1)-h+1),e.fillRect(g,b,u-g,S-b+1)}var w=c+y,P=Math.max(f,Math.round(a.close*i)-l),C=P+h-1;C>f+v-1&&(P=(C=f+v-1)-h+1),e.fillRect(d+1,P,w-d,C-P+1)}}e.restore()},e.prototype._calcBarWidth=function(e){var t=Math.floor(e);return Math.max(t,Math.floor(Object(r.optimalBarWidth)(this._barSpacing,e)))},e}()},"2EnG":function(e,t,i){"use strict";i.r(t),i.d(t,"StandardPivotPointsImageCache",(function(){return o}));var n=i("ikwP"),r=i("Eyy1"),o=function(){function e(e,t,i,r){this._priceAxisFontSize=11,this._prices=[],this._labelWidth=0,this._paneRenderParams=e,this._recreateCanvasAndContext(new n.Size(0,0)),this.reset({font:t,fontSize:i,backColors:r})}return e.prototype.destroy=function(){delete this._canvas,delete this._cache},e.prototype.canvas=function(){return this._canvas},e.prototype.reset=function(e){var t=this;this._renderParams=e,this._prices=[],this._cache.font=e.fontSize+"px "+e.font,this._labelWidth=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5","/"].reduce((function(e,i){var n=t._cache.measureText(i).width;return Math.max(n,e)}),0)},e.prototype.rowHeight=function(){return this._priceAxisFontSize+4},e.prototype.labelRectByIndex=function(e){return{left:0,top:Math.round(this._topByIndex(e)),width:Math.round(this._labelWidth+4),height:Math.round(this._renderParams.fontSize+8)}},e.prototype.setPrices=function(e){var t,i,o,s,a=this,l=!1;if(e.length!==this._prices.length)l=!0;else for(var c=0;c0?(!function(e){return"index"===e.type&&h.includes(e.listed_exchange)}(e)?n.push("DelayToRealtime"):n.push("DelayNoRealtime"),n):function(e,t){return u.a.hasEodSymbols(e.full_name)||t===l.STATUS_EOD}(e,t)?(n.push("EOD"),n):n} var v=function(){function e(e,t,i){this._dataUpdatedModeStatus=new s.a(null),this._symbolInfo=Object(a.a)(e.getter,e.onChange),this._status=Object(a.a)(t.getter,t.onChange),this._symbolInfo.subscribe(this._update.bind(this)),this._status.subscribe(this._update.bind(this)),this._resetSubscription=i,this._resetSubscription.subscribe(this,this._resetStatus)}return e.prototype.destroy=function(){this._symbolInfo.destroy(),this._status.destroy(),this._resetSubscription.unsubscribeAll(this)},e.prototype.status=function(){return this._dataUpdatedModeStatus.readonly()},e.prototype.symbolName=function(){var e=this._symbolInfo.value();return null!==e?e.name:""},e.prototype.time=function(){var e=this._symbolInfo.value(),t=null!==e&&e.delay&&e.delay>0?e.delay:900;return Math.round(t/60)},e.prototype.listedExchange=function(){var e=this._symbolInfo.value();return null!==e?e.listed_exchange:""},e.prototype.description=function(){return Object(n.__awaiter)(this,void 0,void 0,(function(){var e,t,i,o;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:if(null===(e=this._symbolInfo.value()))return[2,""];t={},n.label=1;case 1:return n.trys.push([1,3,,4]),i=r.ensureNotNull,[4,d(e)];case 2:return t=i.apply(void 0,[n.sent()]),[3,4];case 3:return o=n.sent(),f.logWarn("Cannot get exchange "+Object(_.a)(o)),[3,4];case 4:return[2,t.description||e.listed_exchange]}}))}))},e.prototype.exchange=function(){var e=this._symbolInfo.value();return null!==e?e.exchange:""},e.prototype._resetStatus=function(){this._dataUpdatedModeStatus.setValue(null)},e.prototype._update=function(){var e=this._symbolInfo.value();if(null!==e){var t=this._status.value();if("string"!=typeof t){if(t!==l.STATUS_LOADING&&t!==l.STATUS_RESOLVING){var i=m(e,t);0!==i.length?this._dataUpdatedModeStatus.setValue(i):this._dataUpdatedModeStatus.setValue(null)}}else this._dataUpdatedModeStatus.setValue(null)}else this._dataUpdatedModeStatus.setValue(null)},e}()},"2WC2":function(e,t,i){"use strict";var n=i("mrSG"),r=i("Eyy1"),o=i("aO4+"),s=i("f6yo"),a=i("VdBB");function l(e,t,i){var n=e.get(t);return void 0!==n?n:(e.set(t,i),i)}function c(e,t,i,n){var r=l(e,t,new Map);return l(r,i,n)}function u(e,t,i,n,r){var o=l(e,t,new Map),s=l(o,i,new Map);return l(s,n,r)}var h=function(){function e(){this._map=new Map,this._size=0}return e.prototype.size=function(){return this._size},e.prototype.clear=function(){this._map.clear(),this._size=0},e}(),d=(function(e){function t(){return e.call(this)||this}Object(n.__extends)(t,e),t.prototype._add=function(e,t){l(this._map,e,[]).push(t),++this._size},t.prototype._get=function(e){return l(this._map,e,[])},t.prototype._forEach=function(e){this._map.forEach((function(t,i){e(i,t)}))}}(h),function(e){function t(){return e.call(this)||this}Object(n.__extends)(t,e),t.prototype._add=function(e,t,i){c(this._map,e,t,[]).push(i),++this._size},t.prototype._get=function(e,t){return c(this._map,e,t,[])},t.prototype._forEach=function(e){this._map.forEach((function(t,i){t.forEach((function(t,n){e(i,n,t)}))}))}}(h),function(e){function t(){ return e.call(this)||this}Object(n.__extends)(t,e),t.prototype._add=function(e,t,i,n){u(this._map,e,t,i,[]).push(n),++this._size},t.prototype._get=function(e,t,i){return u(this._map,e,t,i,[])},t.prototype._forEach=function(e){this._map.forEach((function(t,i){t.forEach((function(t,n){t.forEach((function(t,r){e(i,n,r,t)}))}))}))}}(h),i("gBDZ")),p=function(e){function t(t){var i=e.call(this)||this;return i._maxSize=t,i._keysQueue=[],i}return Object(n.__extends)(t,e),t.prototype.get=function(e){if(!e.text||!e.fontSize||!e.align)return null;var t=e.fontSize,i=e.text,n=e.align,r=c(this._map,t,n,new Map),o=r.get(i);return void 0!==o||(this._size>=this._maxSize?this._deleteFirstKey():++this._size,this._keysQueue.push([t,i,n]),o=new d.b(e.text,e.bold,e.italic,e.font,e.fontSize,e.align),r.set(i,o)),o},t.prototype._deleteFirstKey=function(){var e=this._keysQueue.shift(),t=e[0],i=e[1],n=this._map.get(t);n.delete(i),0===n.size&&this._map.delete(t)},t}(h),_=i("zDbI"),f=i("ikwP");i.d(t,"b",(function(){return m})),i.d(t,"c",(function(){return v})),i.d(t,"a",(function(){return y}));var m=function(){function e(e,t){void 0===t&&(t={skipRenderingOptimizations:!1}),this._height=void 0!==e.height?e.height:e.width,this._width=void 0!==e.width?e.width:e.height,this._items=[],this._barSpacing=0,this._textCache=t.textCache||new p(5e3),this._drawOperation=t.skipRenderingOptimizations?this._drawWithoutOptimizations.bind(this):this._drawWithOptimizations.bind(this),this._color=e.color,this._borderColor=e.borderColor,this._vertOffset=e.vertOffset||0,e.text&&(this._text=e.text,this._fontSize=e.fontSize,this._textColor=e.textColor,this._textAlign=e.textAlign||"center"),void 0!==e.items&&void 0!==e.barSpacing&&this.setData(e.items,e.barSpacing)}return e.prototype.draw=function(e,t){this._preDrawInit(),this._drawOperation(e,t)},e.prototype.hitTest=function(e){for(var t=a.HitTestResult.REGULAR,i=null,n=0,r=this._items;n0?0:-r,c=t>0?r:0,u=new o.Point(e.x-s,a+l),h=new o.Point(e.x+s,a+c);return Object(o.box)(u,h)}},e.prototype._unionBox=function(e,t){var i=Math.min(e.min.x,t.min.x),n=Math.max(e.max.x,t.max.x),r=Math.min(e.min.y,t.min.y),s=Math.max(e.max.y,t.max.y),a=new o.Point(i,r),l=new o.Point(n,s);return Object(o.box)(a,l)},e.prototype._getTooltip=function(e,t){if(e.tooltip)return{content:{type:"text",data:e.tooltip},tooltipDelay:200,extendMargin:!0,rect:{x:t.min.x,y:t.min.y,w:Math.abs(t.max.x-t.min.x),h:Math.abs(t.max.y-t.min.y)}}},e.prototype._setBaseData=function(e,t){this._items.length=0,this._barSpacing=t;for(var i=0,o=e;i0?l:-l;this._items.push(Object(n.__assign)({width:a,height:l,vertOffset:c,textVertOffset:u,shapeWidth:0,shapeHeight:0,stepX:0,stepY:0},s))}},e.prototype._drawItemText=function(e,t,i){var n=this._getTextCache(i);if(null!==n){var r,o=i.x,s=i.vertOffset,a=i.y+s+i.textVertOffset;r=i.style&&void 0!==i.style.textColor?i.style.textColor:this._textColor,n.paintTo(e,t,r,o,a,d.a.Center,s>0?d.c.Top:d.c.Bottom)}},e.prototype._drawWithOptimizations=function(e,t){for(var i,n,r=null,o=!1,s=0,a=this._items;sthis.points()[1].index&&(this._points[0].price=this._points[1].price),this._pattern=[];for(var f=r;f<=_;f++){var m=this._model.mainSeries().data().valueAt(f);this._pattern.push(TradingView.clone(m))}if(this._pattern.length>0){var v=this.patternPriceDiff();this._points[1].price=this._points[0].price+v,this._points[1].index=this._points[0].index+(_-r),this.normalizePoints(),this.createServerPoints()}}return h},c.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),n.prototype.setPoint.call(this,e,t,i)},c.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)}},c.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("8ioM").BarsPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},c.createProperties=function(e){var t=new o("linetoolbarspattern",e);return c._configureProperties(t),t}, c._configureProperties=function(e){n._configureProperties(e),e.addExclusion("mirrored"),e.addExclusion("flipped")},t.LineToolBarsPattern=c},"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,r){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)*r},this.main=function(e,t){this._context=e,this._input=t;var i=this.f_0(n.Std.close(this._context),n.Std.high(this._context),n.Std.low(this._context),n.Std.volume(this._context));return[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)),r=t.new_var(n.Std.high(t)),o=t.new_var(n.Std.low(t)),s=t.new_var(n.Std.close(t)),a=n.Std.abs(r-s.get(1)),l=n.Std.abs(o-s.get(1)),c=n.Std.abs(r-o),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){this._context=e,this._input=t;var i=this._input(0);return[this.f_1(i,this._context)]}}},{name:"Advance/Decline",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Advance/Decline",shortDescription:"AD",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:10,type:"integer",min:1,max:2e3}],id:"Advance/Decline@tv-basicstudies-1",scriptIdPart:"",name:"Advance/Decline"},constructor:function(){this.f_0=function(e,t){return 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){this._context=e,this._input=t;var i=this._input(0),r=this.f_0(n.Std.close(this._context),n.Std.open(this._context)),o=this._context.new_var(r),s=n.Std.sum(o,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);return[this.f_2(s,c)]}}},{name:"Arnaud Legoux Moving Average",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,inputs:{in_0:9,in_1:.85,in_2:6}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Arnaud Legoux Moving Average",shortDescription:"ALMA",is_price_study:!0,inputs:[{id:"in_0",name:"Window Size",defval:9,type:"integer",min:0,max:5e3},{id:"in_1",name:"Offset",defval:.85,type:"float",min:-1e12,max:1e12},{id:"in_2",name:"Sigma",defval:6,type:"float",min:-1e12,max:1e12}],id:"Arnaud Legoux Moving Average@tv-basicstudies-1",scriptIdPart:"",name:"Arnaud Legoux Moving Average"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._input(0),o=this._input(1),s=this._input(2),a=this._context.new_var(i);return[n.Std.alma(a,r,o,s)]}}},{name:"Aroon",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF6A00"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0094FF"}},precision:4,inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Upper",histogramBase:0,joinPoints:!1},plot_1:{title:"Lower",histogramBase:0,joinPoints:!1}},description:"Aroon",shortDescription:"Aroon",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Aroon@tv-basicstudies-1",scriptIdPart:"",name:"Aroon"},constructor:function(){this.f_0=function(e,t){return 100*(e+t)/t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.high(this._context),o=i+1,s=this._context.new_var(r),a=n.Std.highestbars(s,o,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,o,this._context);return[l,this.f_0(h,i)]}}},{name:"Average Price",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,id:"AveragePrice@tv-basicstudies-1",scriptIdPart:"",name:"Average Price",description:"Average Price",shortDescription:"Average Price",is_price_study:!0,plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#85200C"}},precision:4,inputs:{}},styles:{plot_0:{title:"Plot"}},inputs:[]},constructor:function(){this.main=function(e,t){return this._context=e,this._input=t,[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),r=this._context.new_var(n.Std.low(this._context)),o=-n.Std.change(r),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,o),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(o,i),n.Std.gt(o,0))?o:0);return[c,n.Std.fixnan(100*n.Std.rma(u,e,this._context)/a,this._context)]},this.f_1=function(e,t){var i=this.f_0(e),r=i[0],o=i[1],s=r+o,a=this._context.new_var(n.Std.abs(r-o)/(n.Std.eq(s,0)?1:s));return[100*n.Std.rma(a,t,this._context)]},this.main=function(e,t){return this._context=e,this._input=t,this.f_1(this._input(0),this._input(1))}}},{name:"Average True Range",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Average True Range",shortDescription:"ATR",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Average True Range@tv-basicstudies-1",scriptIdPart:"",name:"Average True Range"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.tr(this._context),o=this._context.new_var(r);return[n.Std.rma(o,i,this._context)]}}},{name:"Awesome Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:1,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,palettes:{palette_0:{colors:{0:{color:"#FF0000",width:1,style:0},1:{color:"#008000",width:1,style:0}}}},inputs:{}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",palette:"palette_0",target:"plot_0",type:"colorer"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Awesome Oscillator",shortDescription:"AO",is_price_study:!1,palettes:{palette_0:{colors:{0:{name:"Color 0"},1:{name:"Color 1"}}}},inputs:[],id:"Awesome Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Awesome Oscillator"}, constructor:function(){this.f_0=function(e,t){return e-t},this.f_1=function(e){return n.Std.le(e,0)?0:1},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.hl2(this._context),r=this._context.new_var(i),o=n.Std.sma(r,5,this._context),s=this._context.new_var(i),a=n.Std.sma(s,34,this._context),l=this.f_0(o,a),c=l,u=this._context.new_var(l),h=n.Std.change(u);return[c,this.f_1(h)]}}},{name:"Balance of Power",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Balance of Power",shortDescription:"Balance of Power",is_price_study:!1,inputs:[],id:"Balance of Power@tv-basicstudies-1",scriptIdPart:"",name:"Balance of Power"},constructor:function(){this.f_0=function(e,t,i,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){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._input(0),o=this._input(1),s=this._context.new_var(i),a=n.Std.sma(s,r,this._context),l=this._context.new_var(i),c=n.Std.stdev(l,r,this._context),u=this.f_0(o,c);return[a,this.f_1(a,u),this.f_2(a,u)]}}},{name:"Bollinger Bands %B",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0, value:1},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],filledAreasStyle:{fill_0:{color:"#008080",transparency:90,visible:!0}},inputs:{in_0:20,in_1:2}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Bollinger Bands %B",shortDescription:"BB %B",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:1e4},{id:"in_1",name:"mult",defval:2,type:"float",min:.001,max:50}],id:"Bollinger Bands %B@tv-basicstudies-1",scriptIdPart:"",name:"Bollinger Bands %B"},constructor:function(){this.f_0=function(e,t){return e*t},this.f_1=function(e,t){return e+t},this.f_2=function(e,t){return e-t},this.f_3=function(e,t,i){return(e-t)/(i-t)},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._input(0),o=this._input(1),s=this._context.new_var(i),a=n.Std.sma(s,r,this._context),l=this._context.new_var(i),c=n.Std.stdev(l,r,this._context),u=this.f_0(o,c),h=this.f_1(a,u),d=this.f_2(a,u);return[this.f_3(i,d,h)]}}},{name:"Bollinger Bands Width",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:20,in_1:2}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Bollinger Bands Width",shortDescription:"BBW",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:1e4},{id:"in_1",name:"mult",defval:2,type:"float",min:.001,max:50}],id:"Bollinger Bands Width@tv-basicstudies-1",scriptIdPart:"",name:"Bollinger Bands Width"},constructor:function(){this.f_0=function(e,t){return e*t},this.f_1=function(e,t){return e+t},this.f_2=function(e,t){return e-t},this.f_3=function(e,t,i){return(e-t)/i},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._input(0),o=this._input(1),s=this._context.new_var(i),a=n.Std.sma(s,r,this._context),l=this._context.new_var(i),c=n.Std.stdev(l,r,this._context),u=this.f_0(o,c),h=this.f_1(a,u),d=this.f_2(a,u);return[this.f_3(h,d,a)]}}},{name:"Chaikin Money Flow",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Chaikin Money Flow",shortDescription:"CMF",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:2e3}],id:"Chaikin Money Flow@tv-basicstudies-1",scriptIdPart:"",name:"Chaikin Money Flow"}, constructor:function(){this.f_0=function(e,t,i,r){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)*r},this.f_1=function(e,t){return e/t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this.f_0(n.Std.close(this._context),n.Std.high(this._context),n.Std.low(this._context),n.Std.volume(this._context)),o=this._context.new_var(r),s=n.Std.sum(o,i,this._context),a=n.Std.volume(this._context),l=this._context.new_var(a),c=n.Std.sum(l,i,this._context);return[this.f_1(s,c)]}}},{name:"Chaikin Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:3,in_1:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Chaikin Oscillator",shortDescription:"Chaikin Osc",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"short",defval:3,type:"integer",min:1,max:2e3},{id:"in_1",name:"long",defval:10,type:"integer",min:1,max:2e3}],id:"Chaikin Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Chaikin Oscillator"},constructor:function(){this.f_0=function(e,t){return e-t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=n.Std.accdist(this._context),s=this._context.new_var(o),a=n.Std.ema(s,i,this._context),l=this._context.new_var(o),c=n.Std.ema(l,r,this._context);return[this.f_0(a,c)]}}},{name:"Chaikin Volatility",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Chaikin Volatility@tv-basicstudies-1",scriptIdPart:"",name:"Chaikin Volatility",description:"Chaikin Volatility",shortDescription:"Chaikin Volatility",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#F00000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{periods:10,rocLookback:10}},styles:{plot_0:{title:"Plot"}},bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"periods",type:"integer",name:"Periods"},{id:"rocLookback",type:"integer",name:"Rate of Change Lookback"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.rocLookback=this._input(1)},this.main=function(e,t){this._context=e,this._input=t;var i=this._context.new_var(n.Std.high(this._context)-n.Std.low(this._context)),r=this._context.new_var(n.Std.ema(i,this.period,this._context));return[n.Std.roc(r,this.rocLookback)]}}},{name:"Chande Kroll Stop",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}}, precision:4,inputs:{in_0:10,in_1:1,in_2:9}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Long",histogramBase:0,joinPoints:!1},plot_1:{title:"Short",histogramBase:0,joinPoints:!1}},description:"Chande Kroll Stop",shortDescription:"Chande Kroll Stop",is_price_study:!0,inputs:[{id:"in_0",name:"p",defval:10,type:"integer",min:1,max:4999},{id:"in_1",name:"x",defval:1,type:"integer",min:1,max:1e12},{id:"in_2",name:"q",defval:9,type:"integer",min:1,max:1e12}],id:"Chande Kroll Stop@tv-basicstudies-1",scriptIdPart:"",name:"Chande Kroll Stop"},constructor:function(){this.f_0=function(e,t,i){return e-t*i},this.f_1=function(e,t,i){return e+t*i},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=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,r,c),h=this._context.new_var(s),d=n.Std.lowest(h,i,this._context),p=this.f_1(d,r,c),_=this._context.new_var(u),f=n.Std.highest(_,o,this._context),m=this._context.new_var(p);return[n.Std.lowest(m,o,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){this._context=e,this._input=t;var i=this._input(0),r=n.Std.close(this._context),o=this._context.new_var(r),s=n.Std.change(o),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);return[this.f_3(u,d)]}}},{name:"Chop Zone",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:5,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,palettes:{palette_0:{colors:{0:{color:"#34dddd",width:1,style:0},1:{color:"#006400",width:1,style:0},2:{color:"#98fb98",width:1,style:0},3:{color:"#00FF00",width:1,style:0},4:{color:"#8B0000",width:1,style:0},5:{color:"#FF0000",width:1,style:0},6:{color:"#FF7F00",width:1,style:0},7:{color:"#ffc04c",width:1,style:0},8:{color:"#FFFF00",width:1,style:0}}}},inputs:{}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",palette:"palette_0",target:"plot_0",type:"colorer"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1,isHidden:!1}}, description:"Chop Zone",shortDescription:"Chop Zone",is_price_study:!1,palettes:{palette_0:{colors:{0:{name:"Color 0"},1:{name:"Color 1"},2:{name:"Color 2"},3:{name:"Color 3"},4:{name:"Color 4"},5:{name:"Color 5"},6:{name:"Color 6"},7:{name:"Color 7"},8:{name:"Color 8"}},valToIndex:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8}}},inputs:[],id:"chop_zone@tv-basicstudies-1",scriptIdPart:"",name:"Chop Zone"},constructor:function(){this.f_0=function(){var e=n.Std.close(this._context),t=n.Std.hlc3(this._context),i=this._context.new_var(n.Std.high(this._context)),r=n.Std.highest(i,30,this._context),o=n.Std.lowest(i,30,this._context),s=25/(r-o)*o,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,v=n.Std.and(n.Std.lt(d,2.14),n.Std.ge(d,.71))?3:m,y=n.Std.and(n.Std.lt(d,3.57),n.Std.ge(d,2.14))?2:v,g=n.Std.and(n.Std.lt(d,5),n.Std.ge(d,3.57))?1:y;return[1,n.Std.ge(d,5)?0:g]},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,r){return 100*n.Std.log10(e/(t-i))/r},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.atr(1,this._context),o=this._context.new_var(r),s=n.Std.sum(o,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);return[this.f_0(s,c,d,p)]}}},{name:"Commodity Channel Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#808000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:100},{color:"#808080",linestyle:2, linewidth:1,visible:!0,value:-100}],filledAreasStyle:{fill_0:{color:"#808000",transparency:90,visible:!0}},inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Commodity Channel Index",shortDescription:"CCI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:2e3}],id:"Commodity Channel Index@tv-basicstudies-1",scriptIdPart:"",name:"Commodity Channel Index"},constructor:function(){this.f_0=function(e,t,i){return(e-t)/(.015*i)},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.hlc3(this._context),r=this._input(0),o=this._context.new_var(i),s=n.Std.sma(o,r,this._context),a=this._context.new_var(i),l=n.Std.dev(a,r,this._context);return[this.f_0(i,s,l)]}}},{name:"Connors RSI",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:70},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:30}],filledAreasStyle:{fill_0:{color:"#800080",transparency:90,visible:!0}},inputs:{in_0:3,in_1:2,in_2:100}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"CRSI",histogramBase:0,joinPoints:!1}},description:"Connors RSI",shortDescription:"CRSI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"RSI Length",defval:3,type:"integer",min:1},{id:"in_1",name:"UpDown Length",defval:2,type:"integer",min:1},{id:"in_2",name:"ROC Length",defval:100,type:"integer",min:1}],id:"Connors RSI@tv-basicstudies-1",scriptIdPart:"",name:"Connors RSI"},constructor:function(){var e;this.f_1=function(e,t,i){var r=i.new_var(n.Std.max(n.Std.change(e),0));return n.Std.rma(r,t,i)},this.f_2=function(e,t,i){var r=i.new_var(-n.Std.min(n.Std.change(e),0));return n.Std.rma(r,t,i)},this.f_3=(e=0,function(t){var i=t.get(0),r=t.get(1);return e=i===r?0:i>r?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){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._context.new_var(i),o=this._input(0),s=this._input(1),a=this._input(2),l=n.Std.rsi(this.f_1(r,o,this._context),this.f_2(r,o,this._context)),c=this.f_3(r),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(r,1)),d=n.Std.percentrank(h,a);return[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){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=this._input(2),s=n.Std.close(this._context),a=this._context.new_var(s),l=n.Std.roc(a,r),c=this._context.new_var(s),u=n.Std.roc(c,o),h=this.f_0(l,u),d=this._context.new_var(h);return[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){this._context=e,this._input=t;var i=this._context.new_unlimited_var(this._context.symbol.time),r=(this._input(0),n.Std.period(this._context),n.Std.close(this._context)),o=this._input(1);this._context.select_sym(1);var s=this._context.new_unlimited_var(this._context.symbol.time),a=n.Std.close(this._context),l=this._context.new_unlimited_var(a);this._context.select_sym(0);var c=l.adopt(s,i,0),u=this._context.new_var(r),h=this._context.new_var(c);return[n.Std.correlation(u,h,o,this._context)]}}},{name:"Correlation - Log",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Correlation - Log@tv-basicstudies-1",scriptIdPart:"",name:"Correlation - Log",description:"Correlation - Log",shortDescription:"Correlation - Log",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#800080"}},precision:4,inputs:{instrument:"INTC",instrument2:"AMZN",periods:25}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"instrument",name:"Instrument 1",type:"symbol",defval:"INTC"},{id:"instrument2",name:"Instrument 2",type:"symbol",defval:"AMZN"},{id:"periods",name:"Periods",type:"integer",defval:25}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t, this._context.new_sym(this._input(0),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,r){var o=n.Std.sma(e,i,r),s=n.Std.sma(t,i,r),a=r.new_var(e.get()*t.get());return(n.Std.sma(a,i,r)-o*s)/Math.sqrt(n.Std.variance2(e,o,i)*n.Std.variance2(t,s,i))},this.main=function(e,t){this._context=e,this._input=t,this._context.select_sym(1);var i=this._context.new_var(this._context.symbol.time);this._context.select_sym(2);var r=this._context.new_var(n.Std.close(this._context)),o=this._context.new_var(n.Std.log(r.get()/r.get(1))),s=this._context.new_var(this._context.symbol.time);this._context.select_sym(1);var 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(o.adopt(s,i,0));return[this.correlationLog(l,c,this.period,this._context)]}}},{name:"Detrended Price Oscillator",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#808000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:21,in_1:!1}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"DPO",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Detrended Price Oscillator",shortDescription:"DPO",is_price_study:!1,is_hidden_study:!1,id:"detrended_price_oscillator@tv-basicstudies-1",bands:[{id:"hline_0",name:"Zero",isHidden:!1}],inputs:[{id:"in_0",name:"Period",defval:21,type:"integer",min:1,max:1e12},{id:"in_1",name:"isCentered",defval:!1,type:"bool"}],scriptIdPart:"",name:"Detrended Price Oscillator"},constructor:function(){this.f_0=function(){var e=this._input(0),t=this._input(1),i=Math.floor(e/2+1),r=this._context.new_var(n.Std.close(this._context)),o=this._context.new_var(n.Std.sma(r,e,this._context)),s=this._context.new_var(n.Std.close(this._context)).get(i)-o,a=n.Std.close(this._context)-o.get(i);return[t?s:a,t?-i:0]},this.main=function(e,t){this._context=e,this._input=t;var i=this.f_0();return[{value:i[0],offset:i[1]}]}}},{name:"Directional Movement Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:14,in_1:14}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"+DI",histogramBase:0,joinPoints:!1},plot_1:{title:"-DI",histogramBase:0,joinPoints:!1},plot_2:{title:"ADX",histogramBase:0,joinPoints:!1}},description:"Directional Movement",shortDescription:"DMI",is_price_study:!1,inputs:[{id:"in_0",name:"DI Length",defval:14, type:"integer",min:1,max:2e3},{id:"in_1",name:"ADX Smoothing",defval:14,type:"integer",min:1,max:50}],id:"Directional Movement Index@tv-basicstudies-1",scriptIdPart:"",name:"Directional Movement Index"},constructor:function(){this.f_0=function(e){return-e},this.f_1=function(e,t){return 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){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=n.Std.high(this._context),s=this._context.new_var(o),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),v=n.Std.rma(m,i,this._context),y=this.f_2(v,_),g=n.Std.fixnan(y,this._context),b=this.f_1(h,a),S=this._context.new_var(b),w=n.Std.rma(S,i,this._context),P=this.f_2(w,_),C=n.Std.fixnan(P,this._context),x=this.f_3(g,C),T=this.f_4(g,C,x),I=this._context.new_var(T),M=n.Std.rma(I,r,this._context);return[g,C,this.f_5(M)]}}},{name:"Donchian Channels",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"}},precision:4,filledAreasStyle:{fill_0:{color:"#0000FF",transparency:90,visible:!0}},inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Lower",histogramBase:0,joinPoints:!1},plot_1:{title:"Upper",histogramBase:0,joinPoints:!1},plot_2:{title:"Basis",histogramBase:0,joinPoints:!1}},description:"Donchian Channels",shortDescription:"DC",is_price_study:!0,filledAreas:[{id:"fill_0",objAId:"plot_1",objBId:"plot_0",type:"plot_plot",title:"Plots Background"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:2e3}],id:"Donchian Channels@tv-basicstudies-1",scriptIdPart:"",name:"Donchian Channels"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.low(this._context),o=this._context.new_var(r),s=n.Std.lowest(o,i,this._context),a=n.Std.high(this._context),l=this._context.new_var(a),c=n.Std.highest(l,i,this._context);return[s,c,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){this._context=e,this._input=t;var i=this._input(0),r=n.Std.close(this._context),o=this._context.new_var(r),s=n.Std.ema(o,i,this._context),a=this._context.new_var(s),l=n.Std.ema(a,i,this._context);return[this.f_0(s,l)]}}},{name:"Ease of Movement",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#808000"}},precision:4,inputs:{in_0:1e4,in_1:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Ease Of Movement",shortDescription:"EOM",is_price_study:!1,inputs:[{id:"in_0",name:"Divisor",defval:1e4,type:"integer",min:1,max:1e9},{id:"in_1",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Ease of Movement@tv-basicstudies-1",scriptIdPart:"",name:"Ease of Movement"},constructor:function(){this.f_0=function(e,t,i,n,r){return e*t*(i-n)/r},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=n.Std.hl2(this._context),s=this._context.new_var(o),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);return[n.Std.sma(c,r,this._context)]}}},{name:"Elders Force Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:13}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Elder's Force Index",shortDescription:"EFI",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"length",defval:13,type:"integer",min:1,max:2e3}],id:"Elders Force Index@tv-basicstudies-1",scriptIdPart:"",name:"Elders Force Index"},constructor:function(){this.f_0=function(e,t){return e*t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.close(this._context),o=this._context.new_var(r),s=n.Std.change(o),a=this.f_0(s,n.Std.volume(this._context)),l=this._context.new_var(a);return[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){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=n.Std.close(this._context),s=this._context.new_var(o),a=n.Std.ema(s,i,this._context),l=this._context.new_var(o),c=n.Std.ema(l,r,this._context),u=a,h=c,d=n.Std.cross(a,c,this._context);return[u,h,this.f_0(d,a)]}}},{name:"Envelopes",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,filledAreasStyle:{fill_0:{color:"#0000FF",transparency:90,visible:!0}},inputs:{in_0:20,in_1:10,in_2:10,in_3:"Simple",in_4:"close"}},plots:[{id:"plot_1",type:"line"},{id:"plot_0",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Average",histogramBase:0,joinPoints:!1},plot_1:{title:"Upper",histogramBase:0,joinPoints:!1},plot_2:{title:"Lower",histogramBase:0,joinPoints:!1}},description:"Envelopes",shortDescription:"Envelopes",is_price_study:!0,filledAreas:[{id:"fill_0",objAId:"plot_1",objBId:"plot_2",type:"plot_plot",title:"Plots Background"}],inputs:[{id:"in_0",name:"Length",defval:20,type:"integer",min:1,max:2e3},{id:"in_1",name:"Upper Percentage",defval:2,type:"float",min:0},{id:"in_2",name:"Lower Percentage",defval:2,type:"float",min:0},{id:"in_3",name:"Method",type:"text",defval:"Simple",options:["Simple","Exponential","Weighted"]},{id:"in_4",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]}],id:"Envelope@tv-basicstudies-1",scriptIdPart:"",name:"Envelopes"},constructor:function(){this.f_0=function(e,t){return e*(1+t)},this.f_1=function(e,t){return e*(1-t)},this.main=function(e,t){this._context=e,this._input=t;var i=this._context.new_var(n.Std[this._input(4)](this._context)),r=n.Std.sma(i,this._input(0),this._context);return"Exponential"===this._input(3)?r=n.Std.ema(i,this._input(0),this._context):"Weighted"===this._input(3)&&(r=n.Std.wma(i,this._input(0),this._context)),[this.f_0(r,this._input(1)/100),r,this.f_1(r,this._input(2)/100)]}}},{name:"Standard Error",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Standard Error@tv-basicstudies-1",scriptIdPart:"",name:"Standard Error",description:"Standard Error",shortDescription:"Standard Error", plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,color:"#FF6D00"}},precision:4,inputs:{length:14}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"length",type:"integer",name:"Length"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0)},this.main=function(e,t){this._context=e,this._input=t;for(var i,r,o=this._context.new_var(n.Std.close(this._context)),s=0,a=0,l=0;lthis._context.new_var(r).get(1)?1:0,[100*n.Std.sma(this._context.new_var(i),this.rollingPeriod,this._context)]}}},{name:"Net Volume",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Net Volume",shortDescription:"Net Volume",is_price_study:!1,inputs:[],id:"Net Volume@tv-basicstudies-1",scriptIdPart:"",name:"Net Volume"},constructor:function(){this.f_0=function(e,t,i){return n.Std.gt(e,0)?t:n.Std.lt(i,0)?-t:0*t},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._context.new_var(i),o=n.Std.change(r);return[this.f_0(o,n.Std.volume(this._context),o)]}}},{name:"On Balance Volume",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"On Balance Volume",shortDescription:"OBV",is_price_study:!1,inputs:[],id:"On Balance Volume@tv-basicstudies-1",scriptIdPart:"",name:"On Balance Volume"},constructor:function(){this.f_0=function(e,t,i){return n.Std.gt(e,0)?t:n.Std.lt(i,0)?-t:0*t},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._context.new_var(i),o=n.Std.change(r),s=this.f_0(o,n.Std.volume(this._context),o);return[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){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=this._input(2);return[n.Std.sar(i,r,o,this._context)]}}},{name:"Price Channel",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0080"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0080"},plot_2:{ linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0496FF"}},precision:4,inputs:{in_0:20,in_1:0}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Highprice Line",histogramBase:0,joinPoints:!1},plot_1:{title:"Lowprice Line",histogramBase:0,joinPoints:!1},plot_2:{title:"Centerprice Line",histogramBase:0,joinPoints:!1}},description:"Price Channel",shortDescription:"PC",is_price_study:!1,inputs:[{id:"in_0",name:"Length",defval:20,type:"integer",min:1,max:2e3},{id:"in_1",name:"Offset Length",defval:0,type:"integer",min:1,max:2e3}],id:"Price Channel@tv-basicstudies-1",scriptIdPart:"",name:"Price Channel"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.high(this._context),r=this._context.new_var(i),o=n.Std.low(this._context),s=this._context.new_var(o),a=this._input(0),l=this._input(1),c=n.Std.highest(r,a,this._context),u=n.Std.lowest(s,a,this._context);return[{value:c,offset:l},{value:u,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){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._input(0),o=this._input(1),s=this._context.new_var(i),a=n.Std.sma(s,r,this._context),l=this._context.new_var(i),c=n.Std.sma(l,o,this._context);return[this.f_0(a,c)]}}},{name:"Price Volume Trend",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"PVT",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Price Volume Trend",shortDescription:"PVT",is_price_study:!1,is_hidden_study:!1,id:"price_volume_trend@tv-basicstudies-1",inputs:[],scriptIdPart:"",name:"Price Volume Trend"},constructor:function(){this.f_0=function(){var e=this._context.new_var(n.Std.close(this._context));return[n.Std.cum(n.Std.change(e)/e.get(1)*n.Std.volume(this._context),this._context)]},this.main=function(e,t){return this._context=e,this._input=t,[this.f_0()[0]]}}},{name:"Rate Of Change",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}}, precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"ROC",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Rate Of Change",shortDescription:"ROC",is_price_study:!1,bands:[{id:"hline_0",name:"Zero Line",isHidden:!1}],inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:1e12}],id:"rate_of_change@tv-basicstudies-1",scriptIdPart:"",name:"Rate Of Change"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._context.new_var(n.Std.close(this._context)),r=this._input(0);return[100*(i.get(0)-i.get(r))/i.get(r)]}}},{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){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._input(0),o=this._context.new_var(i),s=n.Std.change(o),a=this.f_0(s),l=this._context.new_var(a),c=n.Std.rma(l,r,this._context),u=this.f_1(s),h=this._context.new_var(u),d=n.Std.rma(h,r,this._context);return[this.f_2(d,c)]}}},{name:"Relative Vigor Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"RVGI",histogramBase:0,joinPoints:!1},plot_1:{title:"Signal",histogramBase:0,joinPoints:!1}},description:"Relative Vigor Index",shortDescription:"RVGI",is_price_study:!1,inputs:[{id:"in_0",name:"Length",defval:10,type:"integer",min:1,max:2e3}],id:"Relative Vigor Index@tv-basicstudies-1",scriptIdPart:"",name:"Relative Vigor Index"},constructor:function(){this.f_0=function(e,t){return e-t},this.f_1=function(e,t){return e/t},this.main=function(e,t){ this._context=e,this._input=t;var i=this._input(0),r=this.f_0(n.Std.close(this._context),n.Std.open(this._context)),o=this._context.new_var(r),s=n.Std.swma(o,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(_);return[_,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){this._context=e,this._input=t;var i=this._input(0),r=n.Std.close(this._context),o=this._context.new_var(r),s=n.Std.stdev(o,i,this._context),a=this._context.new_var(r),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);return[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){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=this._input(2),s=n.Std.close(this._context),a=this._context.new_var(s),l=n.Std.tsi(a,i,r,this._context),c=this._context.new_var(l),u=n.Std.ema(c,o,this._context);return[l,u,this.f_0(l,u)]}}},{name:"Smoothed Moving Average",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:7,in_1:"close"}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Smoothed Moving Average",shortDescription:"SMMA",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:7,type:"integer",min:1,max:1e12},{id:"in_1",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]}],id:"smoothed_moving_average@tv-basicstudies-1",scriptIdPart:"",name:"Smoothed Moving Average"},constructor:function(){this.f_0=function(){var e=this._input(0),t=n.Std[this._input(1)](this._context),i=this._context.new_var(t),r=n.Std.sma(i,e,this._context),o=this._context.new_var(),s=(o.get(1)*(e-1)+t)/e;return o.set(n.Std.na(o.get(1))?r:s),[o.get(0)]},this.main=function(e,t){return this._context=e,this._input=t,this.f_0()}}},{name:"Standard Deviation",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,id:"Standard Deviation@tv-basicstudies-1",scriptIdPart:"",name:"Standard Deviation",description:"Standard Deviation",shortDescription:"Standard Deviation",is_price_study:!1,plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,color:"#26A69A"}},precision:4,inputs:{periods:5,deviations:1}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",name:"Periods",type:"integer"},{id:"deviations",name:"Deviations",type:"float"}]},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=this._context.new_var(n.Std.close(this._context));return[n.Std.stdev(o,i,this._context)*r]}}},{name:"Stochastic",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:80},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:20}],filledAreasStyle:{fill_0:{color:"#800080",transparency:75,visible:!0}},inputs:{in_0:14,in_1:1,in_2:3}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"%K",histogramBase:0,joinPoints:!1},plot_1:{ title:"%D",histogramBase:0,joinPoints:!1}},description:"Stochastic",shortDescription:"Stoch",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:1e4},{id:"in_1",name:"smoothK",defval:1,type:"integer",min:1,max:1e4},{id:"in_2",name:"smoothD",defval:3,type:"integer",min:1,max:1e4}],id:"Stochastic@tv-basicstudies-1",scriptIdPart:"",name:"Stochastic"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=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,r,this._context),f=this._context.new_var(_);return[_,n.Std.sma(f,o,this._context)]}}},{name:"Stochastic RSI",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:80},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:20}],filledAreasStyle:{fill_0:{color:"#800080",transparency:80,visible:!0}},inputs:{in_0:14,in_1:14,in_2:3,in_3:3}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"%K",histogramBase:0,joinPoints:!1},plot_1:{title:"%D",histogramBase:0,joinPoints:!1}},description:"Stochastic RSI",shortDescription:"Stoch RSI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"lengthRSI",defval:14,type:"integer",min:1,max:1e4},{id:"in_1",name:"lengthStoch",defval:14,type:"integer",min:1,max:1e4},{id:"in_2",name:"smoothK",defval:3,type:"integer",min:1,max:1e4},{id:"in_3",name:"smoothD",defval:3,type:"integer",min:1,max:1e4}],id:"Stochastic RSI@tv-basicstudies-1",scriptIdPart:"",name:"Stochastic RSI"},constructor:function(){this.f_1=function(e,t,i){var r=i.new_var(n.Std.max(n.Std.change(e),0));return n.Std.rma(r,t,i)},this.f_2=function(e,t,i){var r=i.new_var(-n.Std.min(n.Std.change(e),0));return n.Std.rma(r,t,i)},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._input(0),o=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,r,this._context),this.f_2(l,r,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,o,this._context),_=this._context.new_var(p),f=n.Std.sma(_,s,this._context),m=this._context.new_var(f) ;return[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){this._context=e,this._input=t;var i=this._input(0),r=this.f_0(n.Std.close(this._context)),o=this._context.new_var(r),s=n.Std.ema(o,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);return[this.f_1(d)]}}},{name:"Triple EMA",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Triple EMA",shortDescription:"TEMA",is_price_study:!0,inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:1e4}],id:"Triple EMA@tv-basicstudies-1",scriptIdPart:"",name:"Triple EMA"},constructor:function(){this.f_0=function(e,t,i){return 3*(e-t)+i},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.close(this._context),o=this._context.new_var(r),s=n.Std.ema(o,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);return[this.f_0(s,l,u)]}}},{name:"True Strength Indicator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:25,in_1:13,in_2:13}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1},plot_1:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"True Strength Indicator",shortDescription:"True Strength Indicator",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"long",defval:25,type:"integer",min:1,max:4999},{id:"in_1",name:"short",defval:13,type:"integer",min:1,max:4999},{id:"in_2",name:"siglen",defval:13,type:"integer",min:1,max:4999}],id:"True Strength Indicator@tv-basicstudies-1", scriptIdPart:"",name:"True Strength Indicator"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=this._input(2),s=n.Std.close(this._context),a=this._context.new_var(s),l=n.Std.tsi(a,r,i,this._context),c=this._context.new_var(l);return[l,n.Std.ema(c,o,this._context)]}}},{name:"Trend Strength Index",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Trend Strength Index@tv-basicstudies-1",scriptIdPart:"",name:"Trend Strength Index",description:"Trend Strength Index",shortDescription:"Trend Strength Index",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#F00000"}},precision:4,inputs:{periods:14}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",type:"integer",name:"Periods"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.invertedPeriod=1/this.period,this.sumX=(this.period-1)*this.period/2,this.sumXX=(this.period-1)*this.period*(2*this.period-1)/6,this.invertedPeriodSumXSumX=this.invertedPeriod*this.sumX*this.sumX},this.trendStrengthIndex=function(){for(var e=this._context.new_var(n.Std.close(this._context)),t=n.Std.sum(e,this.period,this._context),i=0,r=0,o=0;o0?1:-1:a/(l=Math.sqrt(l))},this.main=function(e,t){return this._context=e,this._input=t,[this.trendStrengthIndex()]}}},{name:"Typical Price",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,id:"TypicalPrice@tv-basicstudies-1",scriptIdPart:"",name:"Typical Price",description:"Typical Price",shortDescription:"Typical Price",is_price_study:!0,plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#85200C"}},precision:3,inputs:{}},styles:{plot_0:{title:"Plot"}},inputs:[]},constructor:function(){this.main=function(e,t){return this._context=e,this._input=t,[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 r=this._context.new_var(e),o=this._context.new_var(t);return[n.Std.sum(r,i,this._context)/n.Std.sum(o,i,this._context)]},this.f_1=function(){var e=this._input(0),t=this._input(1),i=this._input(2),r=this._context.new_var(n.Std.close(this._context)),o=n.Std.max(n.Std.high(this._context),r.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=o-a,u=this.f_0(l,c,e),h=this.f_0(l,c,t),d=this.f_0(l,c,i);return[100*(4*u[0]+2*h[0]+d[0])/7]},this.main=function(e,t){return this._context=e,this._input=t,this.f_1()}}},{name:"Volatility Close-to-Close",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Volatility Close-to-Close@tv-basicstudies-1",scriptIdPart:"",name:"Volatility Close-to-Close",description:"Volatility Close-to-Close",shortDescription:"Volatility Close-to-Close",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,color:"#0000FF"}},precision:4,inputs:{periods:10,daysPerYear:252}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",name:"Periods",type:"integer",defval:10},{id:"daysPerYear",name:"Days Per Year",type:"integer",defval:252}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.daysPerYear=this._input(1)},this.stdev=function(e,t,i){var r=this.variance(e,t,i);return n.Std.sqrt(r)},this.variance=function(e,t,i){var r=n.Std.sma(e,t,i);return this.variance2(e,r,t)},this.variance2=function(e,t,i){var n,r,o=0;for(n=0;n0&&(a=.12*this.square(e.get()-r.get(1))/this.marketClosedPercentage+.88*a/(1-this.marketClosedPercentage)),a/=s,a*=this.secondsPerYear;var l=this._context.new_var(a);return 100*Math.sqrt(n.Std.sum(l,this.period,this._context)/this.period)},this.main=function(e,t){return this._context=e,this._input=t,[this.volatilityOHLC()]}}},{name:"Volatility Index",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!0,id:"Volatility Index@tv-basicstudies-1",scriptIdPart:"",name:"Volatility Index",description:"Volatility Index",shortDescription:"Volatility Index",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#F00000"}},precision:3,inputs:{periods:10,atrMult:3,method:"Wilder Smoothing"}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",name:"Periods",type:"integer"},{id:"atrMult",name:"ATR Mult",type:"float"},{id:"method",name:"Method",type:"text",defval:"Exponential",options:["Exponential","Wilder Smoothing"]}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t, this.period=this._input(0),this.atrMult=this._input(1),this.maMethod=this._input(2),this.nextsar=null,this.position=null,this.sic=null,this.bars=[],this.count=0,this.lastSar=null},this.highest=function(e,t){for(var i=this.bars.length-this.period,n=this.bars[i],r=i+1;rn&&(n=this.bars[r]);return n},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(){if(n.Std.close(this._context)===this.bars[this.bars.length-1])return this.lastSar;if(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);else if(this.countthis.sic&&(this.sic=n.Std.close(this._context))}else if(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}else{var r=this.nextsar;"LONG"===this.position?n.Std.close(this._context)r?(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=r}return this.count++,r},this.main=function(e,t){return this._context=e,this._input=t,this._context.select_sym(0),[this.calculateVolatility()]}}},{name:"VWAP",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:0,transparency:0,visible:!0,color:"#3A6CA8"}},precision:4},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"VWAP",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"VWAP",shortDescription:"VWAP",is_price_study:!0,inputs:[],id:"VWAP@tv-basicstudies-1",scriptIdPart:"",name:"VWAP"},constructor:function(){this.f_1=function(e){e.hist=null,e.add_hist()},this.init=function(e,t){this._isNewSession=null},this.main=function(e,t){this._context=e, this._input=t;var i=e.new_var(),r=e.new_var(),o=this._context.symbol.time;return o&&(null===this._isNewSession&&(this._isNewSession=n.Std.createNewSessionCheck(e)),this._isNewSession(o)&&(this.f_1(i),this.f_1(r))),i.set(n.Std.nz(i.get(1))+n.Std.hlc3(this._context)*n.Std.volume(this._context)),r.set(n.Std.nz(r.get(1))+n.Std.volume(this._context)),[i.get(0)/r.get(0)]}}},{name:"VWMA",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"VWMA",shortDescription:"VWMA",is_price_study:!0,inputs:[{id:"in_0",name:"len",defval:20,type:"integer",min:1,max:1e4}],id:"VWMA@tv-basicstudies-1",scriptIdPart:"",name:"VWMA"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._input(0),o=this._context.new_var(i);return[n.Std.vwma(o,r,this._context)]}}},{name:"Volume Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:5,in_1:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Volume Oscillator",shortDescription:"Volume Osc",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"shortlen",defval:5,type:"integer",min:1,max:4999},{id:"in_1",name:"longlen",defval:10,type:"integer",min:1,max:4999}],id:"Volume Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Volume Oscillator"},constructor:function(){this.f_0=function(e,t){return 100*(e-t)/t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=n.Std.volume(this._context),s=this._context.new_var(o),a=n.Std.ema(s,i,this._context),l=this._context.new_var(o),c=n.Std.ema(l,r,this._context);return[this.f_0(a,c)]}}},{name:"Vortex Indicator",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"VI +",histogramBase:0,joinPoints:!1,isHidden:!1},plot_1:{title:"VI -",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Vortex Indicator",shortDescription:"VI",is_price_study:!1,is_hidden_study:!1,id:"vortex_indicator@tv-basicstudies-1",inputs:[{id:"in_0",name:"Period",defval:14,type:"integer",min:2,max:1e12}],scriptIdPart:"",name:"Vortex Indicator"},constructor:function(){this.f_0=function(){ var e=this._input(0),t=this._context.new_var(n.Std.low(this._context)),i=this._context.new_var(n.Std.abs(n.Std.high(this._context)-t.get(1))),r=n.Std.sum(i,e,this._context),o=this._context.new_var(n.Std.high(this._context)),s=this._context.new_var(n.Std.abs(n.Std.low(this._context)-o.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);return[r/c,a/c]},this.main=function(e,t){return this._context=e,this._input=t,this.f_0()}}},{name:"Willams %R",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:-20},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:-80}],filledAreasStyle:{fill_0:{color:"#000080",transparency:90,visible:!0}},inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Williams %R",shortDescription:"%R",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Willams %R@tv-basicstudies-1",scriptIdPart:"",name:"Willams %R"},constructor:function(){this.f_0=function(e,t,i){return 100*(e-t)/(t-i)},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.high(this._context),o=this._context.new_var(r),s=n.Std.highest(o,i,this._context),a=n.Std.low(this._context),l=this._context.new_var(a),c=n.Std.lowest(l,i,this._context);return[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){this._context=e,this._input=t ;var i=this._input(0),r=this._input(1),o=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,r,this._context),h=this._context.new_var(s);return[{value:l,offset:8},{value:u,offset:5},{value:n.Std.ema(h,o,this._context),offset:3}]}}},{name:"Williams Fractals",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{plottype:"shape_triangle_down",visible:!0,location:"BelowBar",transparency:0,color:"#800000"},plot_1:{plottype:"shape_triangle_up",visible:!0,location:"AboveBar",transparency:0,color:"#808000"}},precision:4,inputs:{in_0:2}},plots:[{id:"plot_0",type:"shapes"},{id:"plot_1",type:"shapes"}],styles:{plot_0:{title:"Down fractals",isHidden:!1},plot_1:{title:"Up fractals",isHidden:!1}},description:"Williams Fractal",shortDescription:"Fractals",is_price_study:!0,is_hidden_study:!1,id:"Williams Fractals@tv-basicstudies-1",inputs:[{id:"in_0",name:"Periods",defval:2,type:"integer",min:2,max:1e12}],scriptIdPart:"",name:"Williams Fractals",isCustomIndicator:!0},constructor:function(){this.f_0=function(){var e=this._input(0),t=this._context.new_var(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)))))))),r=this._context.new_var(n.Std.low(this._context)) ;return[n.Std.or(n.Std.and(n.Std.and(n.Std.gt(r.get(e+2),r.get(e)),n.Std.gt(r.get(e+1),r.get(e))),n.Std.and(n.Std.gt(r.get(e-1),r.get(e)),n.Std.gt(r.get(e-2),r.get(e)))),n.Std.or(n.Std.or(n.Std.and(n.Std.gt(r.get(e+3),r.get(e)),n.Std.and(n.Std.and(n.Std.gt(r.get(e+2),r.get(e)),n.Std.eq(r.get(e+1),r.get(e))),n.Std.and(n.Std.gt(r.get(e-1),r.get(e)),n.Std.gt(r.get(e-2),r.get(e))))),n.Std.and(n.Std.and(n.Std.gt(r.get(e+4),r.get(e)),n.Std.gt(r.get(e+3),r.get(e))),n.Std.and(n.Std.and(n.Std.eq(r.get(e+2),r.get(e)),n.Std.ge(r.get(e+1),r.get(e))),n.Std.and(n.Std.gt(r.get(e-1),r.get(e)),n.Std.gt(r.get(e-2),r.get(e)))))),n.Std.or(n.Std.and(n.Std.and(n.Std.gt(r.get(e+5),r.get(e)),n.Std.and(n.Std.gt(r.get(e+4),r.get(e)),n.Std.eq(r.get(e+3),r.get(e)))),n.Std.and(n.Std.and(n.Std.eq(r.get(e+2),r.get(e)),n.Std.ge(r.get(e+1),r.get(e))),n.Std.and(n.Std.gt(r.get(e-1),r.get(e)),n.Std.gt(r.get(e-2),r.get(e))))),n.Std.and(n.Std.and(n.Std.and(n.Std.gt(r.get(e+6),r.get(e)),n.Std.gt(r.get(e+5),r.get(e))),n.Std.and(n.Std.eq(r.get(e+4),r.get(e)),n.Std.ge(r.get(e+3),r.get(e)))),n.Std.and(n.Std.and(n.Std.eq(r.get(e+2),r.get(e)),n.Std.ge(r.get(e+1),r.get(e))),n.Std.and(n.Std.gt(r.get(e-1),r.get(e)),n.Std.gt(r.get(e-2),r.get(e)))))))),i]},this.main=function(e,t){this._context=e,this._input=t;var i=this.f_0();return[{value:i[0],offset:-2},{value:i[1],offset:-2}]}}}]},"2h0C":function(e,t,i){var n=i("txPx").getLogger("Chart.PropertyPage.Binding");function r(e,t,i,r,o,s){e?(this._control=e,this._property=t,this._applyOnFly=i,this._undoModel=r,this._undoText=o,this._doesNotAffectSave=!1,t&&(this._formatters=[],this._changed=!1,this.setValue(t.value()),t.listeners().subscribe(this,this.propertyChanged))):n.logDebug("Missing control")}r.prototype.addFormatter=function(e){this._formatters.push(e),this.setValue(this._property.value())},r.prototype._formatValue=function(e){return this._formatters.reduce((function(e,t){return t(e)}),e)},r.prototype._setValueToProperty=function(e){this._setter?this._setter.call(this,e):this.setValueToProperty(e)},r.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)})))},r.prototype.control=function(){return this._control},r.prototype.changed=function(){return this._changed},r.prototype.setValueToProperty=function(e){this._undoModel.setProperty(this._property,e,this._undoText,this._doesNotAffectSave),this._changed=!1},r.prototype.property=function(){return this._property},r.prototype.propertyChanged=function(e){this.setValue(e.value())},r.prototype.destroy=function(){ this._property&&this._property.listeners().unsubscribe(this,this.propertyChanged)},r.prototype.disableAffectingSave=function(){this._doesNotAffectSave=!0},t.Binding=r},"2ijp":function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("l4sv"),r=i("8Uy/"),o=function(){function e(){this._lineRendererData={y:0,color:"rgba(0, 0, 0, 0)",linewidth:1,linestyle:r.LINESTYLE_SOLID,visible:!1},this._lineRenderer=new n.HorizontalLineRenderer,this._invalidated=!0,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}()},"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"},text:{name:"LineToolText"},anchored_text:{name:"LineToolTextAbsolute"},note:{name:"LineToolNote"},anchored_note:{name:"LineToolNoteAbsolute"},callout:{name:"LineToolCallout"},balloon:{name:"LineToolBalloon"},arrow_up:{name:"LineToolArrowMarkUp"},arrow_down:{name:"LineToolArrowMarkDown"},arrow_left:{name:"LineToolArrowMarkLeft"},arrow_right:{name:"LineToolArrowMarkRight"},price_label:{name:"LineToolPriceLabel"},arrow_marker:{name:"LineToolArrowMarker"},flag:{name:"LineToolFlagMark"},vertical_line:{name:"LineToolVertLine"},horizontal_line:{name:"LineToolHorzLine"},cross_line:{name:"LineToolCrossLine"},horizontal_ray:{name:"LineToolHorzRay"},trend_line:{name:"LineToolTrendLine"},info_line:{name:"LineToolInfoLine"},trend_angle:{name:"LineToolTrendAngle"},arrow:{name:"LineToolArrow"},ray:{name:"LineToolRay"},extended:{name:"LineToolExtended"},parallel_channel:{name:"LineToolParallelChannel"},disjoint_angle:{name:"LineToolDisjointAngle"},flat_bottom:{name:"LineToolFlatBottom"},pitchfork:{name:"LineToolPitchfork"},schiff_pitchfork_modified:{name:"LineToolSchiffPitchfork"},schiff_pitchfork:{name:"LineToolSchiffPitchfork2"},inside_pitchfork:{name:"LineToolInsidePitchfork"},pitchfan:{name:"LineToolPitchfan"},gannbox:{name:"LineToolGannSquare"},gannbox_square:{name:"LineToolGannComplex"},gannbox_fixed:{name:"LineToolGannFixed"},gannbox_fan:{name:"LineToolGannFan"},fib_retracement:{name:"LineToolFibRetracement"},fib_trend_ext:{name:"LineToolTrendBasedFibExtension"},fib_speed_resist_fan:{name:"LineToolFibSpeedResistanceFan"},fib_timezone:{name:"LineToolFibTimeZone"},fib_trend_time:{name:"LineToolTrendBasedFibTime"},fib_circles:{name:"LineToolFibCircles"},fib_spiral:{name:"LineToolFibSpiral"},fib_speed_resist_arcs:{name:"LineToolFibSpeedResistanceArcs"},fib_wedge:{name:"LineToolFibWedge"},fib_channel:{name:"LineToolFibChannel"},xabcd_pattern:{name:"LineTool5PointsPattern"},cypher_pattern:{name:"LineToolCypherPattern"},abcd_pattern:{name:"LineToolABCD"},triangle_pattern:{ name:"LineToolTrianglePattern"},"3divers_pattern":{name:"LineToolThreeDrivers"},head_and_shoulders:{name:"LineToolHeadAndShoulders"},elliott_impulse_wave:{name:"LineToolElliottImpulse"},elliott_triangle_wave:{name:"LineToolElliottTriangle"},elliott_triple_combo:{name:"LineToolElliottTripleCombo"},elliott_correction:{name:"LineToolElliottCorrection"},elliott_double_combo:{name:"LineToolElliottDoubleCombo"},cyclic_lines:{name:"LineToolCircleLines"},time_cycles:{name:"LineToolTimeCycles"},sine_line:{name:"LineToolSineLine"},long_position:{name:"LineToolRiskRewardLong"},short_position:{name:"LineToolRiskRewardShort"},forecast:{name:"LineToolPrediction"},date_range:{name:"LineToolDateRange"},price_range:{name:"LineToolPriceRange"},date_and_price_range:{name:"LineToolDateAndPriceRange"},bars_pattern:{name:"LineToolBarsPattern"},ghost_feed:{name:"LineToolGhostFeed"},projection:{name:"LineToolProjection"},rectangle:{name:"LineToolRectangle"},rotated_rectangle:{name:"LineToolRotatedRectangle"},ellipse:{name:"LineToolEllipse"},triangle:{name:"LineToolTriangle"},polyline:{name:"LineToolPolyline"},path:{name:"LineToolPath"},curve:{name:"LineToolBezierQuadro"},double_curve:{name:"LineToolBezierCubic"},arc:{name:"LineToolArc"},icon:{name:"LineToolIcon"}}},"2kV1":function(e,t,i){"use strict";i.r(t),i.d(t,"StudyStatusView",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t){return e.call(this,t.statusProvider({}))||this}return Object(n.__extends)(t,e),t.prototype.color=function(){return this._statusProvider.color()},t.prototype.getSplitTitle=function(){return this._statusProvider.getSplitTitle()},t.prototype.update=function(){this._text=this._statusProvider.text()},t}(i("nBJD").a)},"3/8U":function(e,t,i){"use strict";function n(e){return"dark"===e?"rgba(30,136,229,0.25)":"rgba(33,150,243,0.25)"}i.r(t),i.d(t,"axesHighlightColor",(function(){return n}))},"38az":function(e,t,i){"use strict";var n=i("k9/m").PlotRowSearchMode;function r(){this.backColorers=[]}function o(e){r.call(this),this._series=e}function s(e,t){r.call(this),this._study=e,this._plotIndex=t}r.prototype.barStyle=function(e,t,i){for(var n={},r=this.backColorers.length-1;r>=0;r--)this.backColorers[r].applyBarStyle(e,t,n,i);return this.applyBarStyle(e,t,n,i),n},r.prototype.pushBackBarColorer=function(e){this.backColorers.push(e)},r.prototype.applyBarStyle=function(e,t,i){throw new Error("This function is supposed to be reimplemented in a subclass")},inherit(o,r),o.upColor=function(e,t){switch(e.style.value()){case TradingView.Series.STYLE_LINE:return e.lineStyle.color.value();case TradingView.Series.STYLE_AREA:return e.areaStyle.linecolor.value();case TradingView.Series.STYLE_BARS:return e.barStyle.upColor.value();case TradingView.Series.STYLE_CANDLES:return e.candleStyle.upColor.value();case TradingView.Series.STYLE_HOLLOW_CANDLES:return e.hollowCandleStyle.upColor.value();case TradingView.Series.STYLE_HEIKEN_ASHI:return e.haStyle.upColor.value();case TradingView.Series.STYLE_BASELINE:return e.baselineStyle.topLineColor.value() ;case TradingView.Series.STYLE_HILO:return e.hiloStyle.color.value()}throw new Error("Unknown series style")},o.downColor=function(e,t){switch(e.style.value()){case TradingView.Series.STYLE_LINE:return e.lineStyle.color.value();case TradingView.Series.STYLE_AREA:return e.areaStyle.linecolor.value();case TradingView.Series.STYLE_BARS:return e.barStyle.downColor.value();case TradingView.Series.STYLE_CANDLES:return e.candleStyle.downColor.value();case TradingView.Series.STYLE_HOLLOW_CANDLES:return e.hollowCandleStyle.downColor.value();case TradingView.Series.STYLE_HEIKEN_ASHI:return e.haStyle.downColor.value();case TradingView.Series.STYLE_BASELINE:return e.baselineStyle.bottomLineColor.value();case TradingView.Series.STYLE_HILO:return e.hiloStyle.color.value()}throw new Error("Unknown series style")},o.prototype._applyLineStyle=function(e,t,i,n,r){i.barColor=o.upColor(r)},o.prototype._applyAreaStyle=function(e,t,i,n,r){i.barColor=o.upColor(r)},o.prototype._applyBarStyle=function(e,t,i,n,r){var s=o.upColor(r),a=o.downColor(r),l=this.findBar(e,!1,n);if(r.barStyle.barColorsOnPrevClose.value()){var c=this.findPrevBar(e,!1,n);i.barColor=c[TradingView.CLOSE_PLOT]<=l[TradingView.CLOSE_PLOT]?s:a,i.barBorderColor=c[TradingView.CLOSE_PLOT]<=l[TradingView.CLOSE_PLOT]?s:a}else i.barColor=l[TradingView.OPEN_PLOT]<=l[TradingView.CLOSE_PLOT]?s:a,i.barBorderColor=l[TradingView.OPEN_PLOT]<=l[TradingView.CLOSE_PLOT]?s:a},o.prototype._applyCandleStyle=function(e,t,i,n,r){var s,a=o.upColor(r,t),l=o.downColor(r,t),c=r.candleStyle.borderUpColor?r.candleStyle.borderUpColor.value():r.candleStyle.borderColor.value(),u=r.candleStyle.borderDownColor?r.candleStyle.borderDownColor.value():r.candleStyle.borderColor.value(),h=r.candleStyle.wickUpColor?r.candleStyle.wickUpColor.value():r.candleStyle.wickColor.value(),d=r.candleStyle.wickDownColor?r.candleStyle.wickDownColor.value():r.candleStyle.wickColor.value(),p=this.findBar(e,!1,n);r.candleStyle.barColorsOnPrevClose.value()?s=this.findPrevBar(e,!1,n)[TradingView.CLOSE_PLOT]<=p[TradingView.CLOSE_PLOT]:s=p[TradingView.OPEN_PLOT]<=p[TradingView.CLOSE_PLOT];i.barColor=s?a:l,i.barBorderColor=s?c:u,i.barWickColor=s?h:d},o.prototype._applyHollowCandleStyle=function(e,t,i,n,r){var s=o.upColor(r,t),a=o.downColor(r,t),l=r.hollowCandleStyle.borderUpColor?r.hollowCandleStyle.borderUpColor.value():r.hollowCandleStyle.borderColor.value(),c=r.hollowCandleStyle.borderDownColor?r.hollowCandleStyle.borderDownColor.value():r.hollowCandleStyle.borderColor.value(),u=r.hollowCandleStyle.wickUpColor?r.hollowCandleStyle.wickUpColor.value():r.hollowCandleStyle.wickColor.value(),h=r.hollowCandleStyle.wickDownColor?r.hollowCandleStyle.wickDownColor.value():r.hollowCandleStyle.wickColor.value(),d=this.findBar(e,!1,n);this.findPrevBar(e,!1,n)[TradingView.CLOSE_PLOT]<=d[TradingView.CLOSE_PLOT]?(i.barColor=s,i.barBorderColor=l,i.barWickColor=u):(i.barColor=a,i.barBorderColor=c,i.barWickColor=h),i.isBarHollow=d[TradingView.OPEN_PLOT]<=d[TradingView.CLOSE_PLOT]},o.prototype._applyHAStyle=function(e,t,i,n,r){ var s,a=o.upColor(r,t),l=o.downColor(r,t),c=r.haStyle.borderUpColor.value(),u=r.haStyle.borderDownColor.value(),h=r.haStyle.wickUpColor.value(),d=r.haStyle.wickDownColor.value(),p=this.findBar(e,t,n);r.haStyle.barColorsOnPrevClose.value()?s=this.findPrevBar(e,t,n)[TradingView.CLOSE_PLOT]<=p[TradingView.CLOSE_PLOT]:s=p[TradingView.OPEN_PLOT]<=p[TradingView.CLOSE_PLOT];i.barColor=s?a:l,i.barBorderColor=s?c:u,i.barWickColor=s?h:d},o.prototype._applyBaseLineStyle=function(e,t,i,n,r){var s=this.findBar(e,t,n),a=r.baselineStyle,l=this._series.priceScale(),c=Math.round(l.height()*(Math.abs(100-a.baseLevelPercentage.value())/100)),u=this._series.firstValue(),h=l.coordinateToPrice(c,u);s[TradingView.CLOSE_PLOT]>h?i.barColor=o.upColor(r,t):i.barColor=o.downColor(r,t)},o.prototype._applyHiLoStyle=function(e,t,i,n,r){i.barColor=o.upColor(r,t),i.barBorderColor=r.hiloStyle.borderColor.value()},o.prototype.applyBarStyle=function(e,t,i,n){i||(i={}),i.barColor=null,i.barBorderColor=null,i.barWickColor=null,i.isBarHollow=null,i.isBarUp=null,i.upColor=null,i.downColor=null,i.isTwoColorBar=null,i.isMergedBar=null;var r=this._series.properties();switch(r.style.value()){case TradingView.Series.STYLE_LINE:this._applyLineStyle(e,t,i,n,r);break;case TradingView.Series.STYLE_AREA:this._applyAreaStyle(e,t,i,n,r);break;case TradingView.Series.STYLE_BARS:this._applyBarStyle(e,t,i,n,r);break;case TradingView.Series.STYLE_CANDLES:this._applyCandleStyle(e,t,i,n,r);break;case TradingView.Series.STYLE_HOLLOW_CANDLES:this._applyHollowCandleStyle(e,t,i,n,r);break;case TradingView.Series.STYLE_HEIKEN_ASHI:this._applyHAStyle(e,t,i,n,r);break;case TradingView.Series.STYLE_BASELINE:this._applyBaseLineStyle(e,t,i,n,r);break;case TradingView.Series.STYLE_HILO:this._applyHiLoStyle(e,t,i,n,r)}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){if(i&&i.previousValue)return i.previousValue;var r=this._series.bars()._search(e,n.Exact);return null!==r&&r>0?this._series.bars()._valueAt(r-1):[]},inherit(s,r),s.prototype.getBars=function(){return this._study.series().bars()},s.prototype.firstColoredBar=function(e){for(var t=e,i=0;ie+a)return i;var l=n.styles[s.id] ;if(l.visible&&!l.visible.value())return i;var c=o.valueAt(e-a);if(null===c)return i;var u=c[this._plotIndex+1];if(null==u)return i;u=Math.round(u);var h=r.plots[this._plotIndex].palette,d=n.palettes[h],p=r.palettes[h].valToIndex?r.palettes[h].valToIndex[u]:u,_=d.colors[p].color.value();return i.barColor=_,i.upColor=_.color,i.downColor=_.color,i},t.SeriesBarColorer=o,t.StudyBarColorer=s},"3ClC":function(e,t,i){"use strict";i.r(t);var n=i("0YCj"),r=i.n(n),o=i("GVHu"),s=i("PL0c"),a=i("cKqi"),l=i("0gbU"),c=i("TMWk"),u=i("8sOK"),h=i("mrSG"),d=function(e){function t(t,i,n,r){var o=e.call(this,t,i,n,r)||this;return o.properties().styles.vol_ma.visible.listeners().subscribe(o,(function(){return o.invalidateTitleCache()})),o}return Object(h.__extends)(t,e),t.prototype.base=function(){return 1},t.prototype.destroy=function(){this.properties().styles.vol_ma.visible.listeners().unsubscribeAll(this),e.prototype.destroy.call(this)},t.prototype._titleInputs=function(){var e={symbolsForDisplay:!0,skipHiddenInputs:!0,fakeInputsForDisplay:!0,asObject:!1};return this.properties().styles.vol_ma.visible.value()?this.inputs(e):this.inputs(Object(h.__assign)(Object(h.__assign)({},e),{skippedInputs:["length"]}))},t}(o.Study);function p(e,t){return void 0===t&&(t="shift"),{studyConstructor:e,colorRotationMode:t}}i.d(t,"isStudy",(function(){return m})),i.d(t,"isStudyStrategy",(function(){return v})),i.d(t,"isStudyStub",(function(){return y})),i.d(t,"isFundamentalStudy",(function(){return g})),i.d(t,"isESDStudy",(function(){return b})),i.d(t,"isFundamentalStudyMetaInfo",(function(){return S})),i.d(t,"createStudy",(function(){return P})),i.d(t,"studyColorRotationMode",(function(){return C}));var _={study_PivotPointsStandard:p(s.study_PivotPointsStandard),study_Overlay:p(a.study_Overlay,"loop"),study_Compare:p(l.study_Compare,"loop"),study_Volume:p(d),study_ScriptWithDataOffset:p(c.study_ScriptWithDataOffset)};for(var f in _)_.hasOwnProperty(f)&&(TradingView[f]=_[f].studyConstructor);function m(e){return e instanceof o.Study}function v(e){return!1}function y(e){return e instanceof u.StudyStub}function g(e){return e instanceof Fundamental}function b(e){return!1}function S(e){return"study_Internal$STD;Fund_"===w(e)}function w(e){var t="study_"+(e.classId||e.shortId);return t.startsWith("study_Internal$STD;Fund_")?"study_Internal$STD;Fund_":t}function P(e,t,i,n,r){var s=w(n),a=new(s in _?_[s].studyConstructor:o.Study)(e,t,i,n);return void 0!==r&&a.setId(r),a}function C(e){var t=w(e);return t in _?_[t].colorRotationMode:1!==e.plots.length?"shift":void 0===e.pine||r.a.isStandardPine(e.id)?"loop":"shift"}},"3UA0":function(e,t){e.exports.tzData={"America/New_York":{ time:[-2717668562,-1633298400,-1615154400,-1601848800,-1583704800,-1570399200,-1551650400,-1536530400,-1523224800,-1504476e3,-1491775200,-1473026400,-1459720800,-1441576800,-1428271200,-1410127200,-1396821600,-1378677600,-1365372e3,-1347228e3,-1333922400,-1315173600,-1301868e3,-1283724e3,-1270418400,-1252274400,-1238968800,-1220824800,-1207519200,-1189375200,-1176069600,-1157320800,-114462e4,-1125871200,-1112565600,-1094421600,-1081116e3,-1062972e3,-1049666400,-1031522400,-1018216800,-1000072800,-986767200,-968018400,-955317600,-936568800,-923263200,-905119200,-891813600,-880236e3,-76941e4,-765410400,-747266400,-733960800,-715816800,-702511200,-684367200,-671061600,-652917600,-639612e3,-620863200,-608162400,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-447285600,-431560800,-415836e3,-400111200,-384386400,-368661600,-352936800,-337212e3,-321487200,-305762400,-289432800,-273708e3,-257983200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3], offset:[-17762,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3]},"America/Los_Angeles":{ time:[-2717668378,-1633298400,-1615154400,-1601848800,-1583704800,-880236e3,-769420800,-765410400,-687995940,-662680800,-620866800,-608162400,-589417200,-576108e3,-557967600,-544658400,-526518e3,-513208800,-495068400,-481759200,-463618800,-450309600,-431564400,-418255200,-400114800,-386805600,-368665200,-355356e3,-337215600,-323906400,-305766e3,-292456800,-273711600,-261007200,-242262e3,-226533600,-210812400,-195084e3,-179362800,-163634400,-147913200,-13158e4,-116463600,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3],offset:[-28378,-28800,-25200,-28800,-25200,-28800,-25200,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800]},"America/Chicago":{ time:[-2717668236,-1633298400,-1615154400,-1601848800,-1583704800,-1563746400,-1551650400,-1538949600,-1520200800,-1504476e3,-1491775200,-1473026400,-1459720800,-1441576800,-1428271200,-1410127200,-1396821600,-1378677600,-1365372e3,-1347228e3,-1333922400,-1315173600,-1301868e3,-1283724e3,-1270418400,-1252274400,-1238968800,-1220824800,-1207519200,-1189375200,-1176069600,-1157320800,-114462e4,-1125871200,-1112565600,-1094421600,-1081116e3,-1067810400,-1045432800,-1031522400,-1018216800,-1000072800,-986767200,-968018400,-955317600,-936568800,-923263200,-905119200,-891813600,-880236e3,-769413600,-765410400,-747266400,-733960800,-715816800,-702511200,-684367200,-671061600,-652917600,-639612e3,-620863200,-608162400,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-447285600,-431560800,-415836e3,-400111200,-384386400,-368661600,-352936800,-337212e3,-321487200,-305762400,-289432800,-273708e3,-257983200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3], offset:[-21036,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600]},"America/Phoenix":{time:[-2717670498,-1633298400,-1615154400,-1601848800,-1583704800,-880236e3,-820540740,-812678340,-796867140,-84405600,-68680800,1924966800],offset:[-26898,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200]},"America/Toronto":{ time:[-2366755200,-1632088800,-1615154400,-1601771400,-1583712e3,-1567375200,-1554681600,-1534716e3,-1524088800,-1503266400,-149238e4,-1471816800,-1460930400,-1440972e3,-1428876e3,-1409522400,-1397426400,-1378072800,-1365976800,-1346623200,-1333922400,-1315173600,-1301868e3,-1283724e3,-1270418400,-1252274400,-1238968800,-1220824800,-1207519200,-1188770400,-1176069600,-1157320800,-1144015200,-1125871200,-1112565600,-1094421600,-1081116e3,-1062972e3,-1049666400,-1031522400,-1018216800,-1000072800,-986767200,-968018400,-955317600,-936568800,-880232400,-76941e4,-765410400,-747266400,-733960800,-715824e3,-702518400,-684374400,-671068800,-652924800,-634176e3,-620863200,-602719200,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-450309600,-431560800,-418255200,-400111200,-384386400,-368661600,-352936800,-337212e3,-321487200,-305762400,-289432800,-273708e3,-257983200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,136346400,152071200,167796e3,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3], offset:[-19052,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-14400,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3]},"America/Vancouver":{ time:[-2713910400,-1632088800,-1615154400,-880236e3,-769420800,-765410400,-747266400,-733960800,-715816800,-702511200,-684367200,-671061600,-652917600,-639612e3,-620863200,-608162400,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-450309600,-431560800,-418255200,-400111200,-386805600,-368661600,-355356e3,-337212e3,-323906400,-305762400,-292456800,-273708e3,-261007200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,136346400,152071200,167796e3,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3], offset:[-29548,-28800,-25200,-28800,-25200,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800]},"America/Argentina/Buenos_Aires":{time:[-2372112e3,-1567468800,-1233446400,-1222992e3,-1205971200,-1194048e3,-117288e4,-1162512e3,-1141344e3,-1130976e3,-1109808e3,-109944e4,-1078272e3,-1067817600,-1046649600,-1036281600,-1015113600,-1004745600,-983577600,-973209600,-952041600,-941587200,-931046400,-900892800,-890352e3,-83376e4,-82728e4,-752284800,-733795200,-197337600,-190857600,-184204800,-164505600,-152668800,-132969600,-121132800,-101433600,-86832e3,-71107200,-54777600,-39052800,-23328e3,-7603200,128131200,136598400,596937600,605059200,624412800,636508800,656467200,667958400,687916800,699408e3,719366400,731462400,938908800,952041600,1198972800,1205625600,1224374400,1237075200,1924981200],offset:[-14028,-15408,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-10800,-10800,-7200,-10800,-7200,-10800]},"America/El_Salvador":{time:[-1546300800,546998400,559699200,578448e3,591148800,1924970400],offset:[-21408,-21600,-18e3,-21600,-18e3,-21600]},"America/Sao_Paulo":{ time:[-1767225600,-1206968400,-1191369600,-1175385600,-1159833600,-633830400,-622076400,-602294400,-59184e4,-570758400,-560217600,-539136e3,-53136e4,-195436800,-184204800,-155174400,-150076800,-128908800,-121132800,-99964800,-89596800,-68428800,-57974400,499737600,511228800,530582400,540259200,562118400,571190400,592963200,602035200,624412800,634694400,656467200,666748800,687916800,697593600,719971200,728438400,750816e3,761702400,782265600,793152e3,813715200,823996800,84456e4,856051200,876096e3,888710400,908064e3,919555200,938908800,951609600,970963200,982454400,1003017600,1013904e3,1036281600,1045353600,1066521600,1076803200,1099353600,1108857600,1129420800,1140307200,1162684800,1172361600,119232e4,1203206400,1224374400,1234656e3,1255824e3,1266710400,1287273600,129816e4,1318723200,1330214400,1350777600,1361059200,1382227200,1392508800,1413676800,1424563200,1445126400,1456012800,1476576e3,1487462400,1508025600,1518912e3,1541289600,1550361600,1924981200],offset:[-11188,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800]},"America/Bogota":{time:[-2707689600,-1739059200,704851200,733881600,1924974e3],offset:[-17776,-17776,-18e3,-14400,-18e3]},"America/Caracas":{time:[-2524521600,-1826755200,-157766400,1197169200,1462069800,1924977600],offset:[-16064,-16060,-16200,-14400,-16200,-14400]},"Europe/Moscow":{time:[-2840140800,-1688256e3,-165681e4,-1641340800,-1627956e3,-1618700400,-1596416400,-1593804521,-1589846400,-1542416400,-1539478800,-1525305600,-1522713600,-1491177600,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1414288800,1925002800], offset:[9017,9017,9079,12679,9079,16279,12679,16279,14400,10800,14400,18e3,14400,10800,7200,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,10800,7200,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800]},"Europe/Athens":{time:[-2344636800,-1686095940,-1182988800,-1178150400,-906854400,-904867200,-85725e4,-844473600,-828230400,-812419200,-552355200,-541641600,166492800,186195600,198036e3,213764400,228880800,244090800,260330400,275457600,291805200,307418400,323395200,338947200,354682800,370411200,386132400,401860800,417582e3,433310400,449031600,465364800,481086e3,496814400,512535600,528264e3,543985200,559713600,575434800,591163200,606884400,622612800,638334e3,654667200,670388400,686116800,701838e3,717566400,733287600,749016e3,764737200,780465600,796186800,811915200,828241200,846388800,859690800,877838400,891140400,909288e3,92259e4,941342400,954039600,972792e3,985489200,1004241600,1017543600,1035691200,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3],offset:[5692,5692,7200,10800,7200,10800,7200,3600,7200,3600,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Europe/Belgrade":{ time:[-2713910400,-905821200,-85725e4,-844552800,-828219600,-812498400,-79677e4,-777938400,-766616400,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[4920,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Berlin":{time:[-2422051200,-1693702800,-1680476400,-1663452e3,-1650142800,-1632002400,-1618693200,-938901600,-85725e4,-844552800,-828219600,-812498400,-79677e4,-781048800,-776556e3,-765925200,-761173200,-748476e3,-733266e3,-717627600,-714603600,-71037e4,-701902800,-684972e3,-670453200,-654127200,-639003600,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], offset:[3208,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,10800,7200,3600,7200,3600,7200,10800,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/London":{ time:[-3852662400,-1691964e3,-1680469200,-1664143200,-1650142800,-1633903200,-1617483600,-1601848800,-1586034e3,-1570399200,-1552165200,-1538344800,-152253e4,-15075e5,-1490562e3,-1473631200,-1460926800,-1442786400,-1428872400,-1410732e3,-1396213200,-1379282400,-1364763600,-1348437600,-1333314e3,-1315778400,-1301259600,-1284328800,-126981e4,-1253484e3,-1238360400,-1221429600,-1206910800,-118998e4,-1175461200,-1159135200,-1143406800,-1126476e3,-1111957200,-1095631200,-1080507600,-1063576800,-1049058e3,-1032127200,-1017608400,-1001282400,-986158800,-969228e3,-950475600,-942012e3,-904514400,-896043600,-875484e3,-864594e3,-844034400,-832539600,-812584800,-798066e3,-781048800,-772059600,-764802e3,-748476e3,-733352400,-719445600,-717026400,-706741200,-699483600,-687996e3,-668034e3,-654732e3,-636584400,-622072800,-605739600,-590623200,-57429e4,-558568800,-542235600,-527119200,-512600400,-496274400,-481150800,-46422e4,-449701200,-432165600,-417646800,-401320800,-386197200,-369266400,-354747600,-337816800,-323298e3,-306972e3,-291848400,-276732e3,-257979600,-245282400,-22653e4,-213228e3,-195080400,-182383200,-163630800,-150933600,-132181200,-119484e3,-100731600,-88034400,-68677200,-59004e3,-37238400,57726e3,69818400,89175600,101268e3,120625200,132717600,152074800,164167200,183524400,196221600,214974e3,227671200,246423600,259120800,278478e3,290570400,309927600,32202e4,341377200,354675600,372823200,386125200,404272800,417574800,435722400,449024400,467776800,481078800,499226400,512528400,530676e3,543978e3,562125600,575427600,593575200,606877200,625629600,638326800,657079200,670381200,688528800,701830800,719978400,733280400,751428e3,76473e4,782877600,796179600,814327200,828234e3,846381600,859683600,877831200,891133200,909280800,922582800,941335200,954032400,972784800,985482e3,1004234400,1017536400,1035684e3,1048986e3,1067133600,1080435600,1099188e3,1111885200,1130637600,1143334800,1162087200,1174784400,1193536800,1206838800,1224986400,1238288400,1256436e3,1269738e3,1288490400,1301187600,131994e4,1332637200,1351389600,1364691600,1382839200,1396141200,1414288800,1427590800,1445738400,1459040400,1477792800,149049e4,1509242400,1521939600,1540692e3,1553994e3,1572141600,1585443600,1603591200,1616893200,1635645600,1648342800,1667095200,1679792400,1698544800,1711846800,1729994400,1743296400,1761444e3,1774746e3,1792893600,1806195600,1824948e3,1837645200,1856397600,1869094800,1887847200,1901149200,1919296800,1932598800], offset:[-75,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,0,3600,0,3600,7200,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0]},"Europe/Luxembourg":{time:[-2069712e3,-1692493200,-1680476400,-1662339600,-165015e4,-1632002400,-1618693200,-1612656e3,-1604278800,-1585515600,-1574038800,-1552255200,-1539997200,-1520546400,-1507510800,-1490569200,-1473642e3,-1459116e3,-1444006800,-142767e4,-1411866e3,-1396220400,-1379293200,-1364770800,-1348448400,-1333321200,-1316394e3,-1301266800,-1284339600,-126981e4,-1253484e3,-1238360400,-1221429600,-1206910800,-1191189600,-1175461200,-1160344800,-1143406800,-1127685600,-1111957200,-1096840800,-1080507600,-1063576800,-1049058e3,-1033336800,-1017608400,-1002492e3,-986158800,-969228e3,-950475600,-942012e3,-935182800,-85725e4,-844552800,-828219600,-812498400,-797979600,-781048800,-766616400,-745452e3,-733266e3,228880800,244004400,260330400,276058800,29178e4,307508400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], offset:[1476,3600,7200,3600,7200,3600,7200,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Madrid":{time:[-2177453684,-1631926800,-1616886e3,-1601168400,-158535e4,-1442451600,-142767e4,-1379293200,-1364770800,-1348448400,-1333321200,-1316390400,-1301266800,-1284339600,-1269817200,-1026954e3,-1017615600,-1001898e3,-999478800,-986083200,-951433200,-940208400,-873075600,-862614e3,-842835600,-828313200,-811386e3,-796863600,-779936400,-765414e3,-748486800,-733964400,-652323600,-639010800,135126e3,150253200,166575600,181702800,196815600,212547600,22887e4,243997200,260330400,276058800,29178e4,307508400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], offset:[-884,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,0,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Paris":{time:[-2486678340,-1855958340,-1689814800,-1680393600,-1665363600,-1648339200,-1635123600,-1616889600,-1604278800,-158544e4,-1574038800,-1552262400,-1539997200,-1520553600,-1507510800,-1490572800,-1470618e3,-1459123200,-1444006800,-1427673600,-1411952400,-1396224e3,-1379293200,-1364774400,-1348448400,-1333324800,-1316394e3,-1301270400,-1284339600,-1269820800,-1253494800,-1238371200,-1221440400,-1206921600,-1191200400,-1175472e3,-1160355600,-1143417600,-1127696400,-1111968e3,-1096851600,-1080518400,-1063587600,-1049068800,-1033347600,-1017619200,-1002502800,-986169600,-969238800,-950486400,-942012e3,-932432400,-85725e4,-844552800,-828219600,-812498400,-800064e3,-796258800,-781048800,-766616400,196822800,212547600,228880800,244004400,260330400,276058800,29178e4,307508400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], offset:[561,561,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,7200,3600,7200,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Rome":{time:[-3252096e3,-2403562204,-1690761600,-168048e4,-1664755200,-1648944e3,-163512e4,-1616889600,-1604275200,-1585526400,-1571011200,-1555286400,-932428800,-85725e4,-844552800,-828219600,-812498400,-798066e3,-781048800,-76671e4,-750895200,-733352400,-719452800,-70191e4,-689205600,-670453200,-114048e3,-103161600,-81993600,-71708400,-50544e3,-40258800,-18489600,-8204400,1296e4,23245200,43804800,54694800,75859200,86749200,107913600,118198800,138758400,149648400,170812800,181098e3,202262400,212547600,233107200,243997200,265161600,276051600,296611200,307501200,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], offset:[2996,2996,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Warsaw":{time:[-2840140800,-1717027200,-1693702800,-1680476400,-1663452e3,-1650142800,-1632002400,-1618693200,-1600466400,-1587157200,-1501718400,-931730400,-85725e4,-844552800,-828219600,-812498400,-796600800,-778723200,-762652800,-748483200,-733266e3,-715212e3,-701902800,-684972e3,-670453200,-654127200,-639003600,-397090800,-386805600,-371084400,-355356e3,-334191600,-323301600,-307580400,-291852e3,-271292400,-260402400,-239842800,-228952800,-208393200,-197503200,-176338800,-166053600,228877200,244000800,260326800,276055200,291776400,307504800,323830800,338954400,354675600,370404e3,386125200,401853600,417574800,433303200,449024400,465357600,481078800,496807200,512528400,528256800,543978e3,559706400,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], offset:[5040,5040,3600,7200,3600,7200,3600,7200,7200,10800,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Istanbul":{time:[-2840140800,-1869868800,-1693699200,-168048e4,-1570406400,-1552176e3,-1538352e3,-1522540800,-1507507200,-1490572800,-1440201600,-1428019200,-1409702400,-1396483200,-931046400,-922665600,-917827200,-892425600,-875836800,-764726400,-744336e3,-733795200,-716428800,-701913600,-684979200,-670464e3,-654134400,-639014400,-62208e4,-60696e4,-590025600,-575510400,-235612800,-194832e3,-177724800,-165715200,107917200,121226400,133927200,152676e3,164685600,184125600,196221600,215575200,228880800,245815200,260330400,267926400,428464800,433908e3,468122400,482806800,496720800,512528400,528256800,543978e3,559706400,575427600,591156e3,606877200,622605600,638326800,65466e4,670381200,686109600,701830800,717559200,733280400,749008800,764125200,780458400,796179600,811908e3,828234e3,846381600,859683600,877831200,891133200,909280800,922582800,941335200,954032400,972784800,985482e3,1004234400,1017536400,1035684e3,1048986e3,1067133600,1080435600,1099188e3,1111885200,1130637600,1143334800,1162087200,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301281200,1319947200,1332644400,1351396800,1364698800,1382846400,1396234800,1414296e3,1427598e3,1446955200,1459047600,1473206400,1925002800],offset:[6952,7016,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,10800,14400,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,10800]},"Europe/Zurich":{ time:[-3675196800,-2385244800,-904431600,-891122400,-872982e3,-859672800,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[2048,1786,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Australia/Sydney":{time:[-2364076800,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,-828309600,-813189600,57722400,68007600,89172e3,100062e3,120621600,131511600,152071200,162961200,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,386737200,404877600,415767600,436327200,447217200,467776800,478666800,499226400,511326e3,530071200,542775600,562125600,57483e4,59418e4,606279600,625629600,636519600,657079200,667969200,688528800,699418800,719978400,731473200,752032800,762922800,783482400,794372400,814932e3,828241200,846381600,859690800,877831200,891140400,909280800,92259e4,941335200,954039600,967341600,985489200,1004234400,1017543600,1035684e3,1048993200,1067133600,1080442800,1099188e3,1111892400,1130637600,1143946800,1162087200,1174791600,1193536800,1207450800,1223172e3,1238900400,1254621600,127035e4,1286071200,1301799600,1317520800,1333249200,1349575200,1365303600,1381024800,1396753200,1412474400,1428202800,1443924e3,1459652400,1475373600,1491102e3,1506823200,1522551600,1538877600,1554606e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800], offset:[36292,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600]},"Australia/Brisbane":{time:[-2366755200,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,-828309600,-813189600,57722400,68007600,625629600,636519600,657079200,667969200,688528800,699418800,1925028e3],offset:[36728,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3]},"Australia/Adelaide":{time:[-2364076800,-2230156800,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,-828309600,-813189600,57722400,68007600,89172e3,100062e3,120621600,131511600,152071200,162961200,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,384318e3,404877600,415767600,436327200,447217200,467776800,478666800,499226400,511326e3,530071200,542775600,562125600,57483e4,59418e4,606279600,625629600,637729200,657079200,667969200,688528800,701233200,719978400,731473200,752032800,764132400,783482400,796186800,814932e3,828241200,846381600,859690800,877831200,891140400,909280800,92259e4,941335200,954039600,972784800,985489200,1004234400,1017543600,1035684e3,1048993200,1067133600,1080442800,1099188e3,1111892400,1130637600,1143946800,1162087200,1174791600,1193536800,1207450800,1223172e3,1238900400,1254621600,127035e4,1286071200,1301799600,1317520800,1333249200,1349575200,1365303600,1381024800,1396753200,1412474400,1428202800,1443924e3,1459652400,1475373600,1491102e3,1506823200,1522551600,1538877600,1554606e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800], offset:[33260,32400,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800]},"Australia/ACT":{time:[-2364076800,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,-828309600,-813189600,57722400,68007600,89172e3,100062e3,120621600,131511600,152071200,162961200,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,386737200,404877600,415767600,436327200,447217200,467776800,478666800,499226400,511326e3,530071200,542775600,562125600,57483e4,59418e4,606279600,625629600,636519600,657079200,667969200,688528800,699418800,719978400,731473200,752032800,762922800,783482400,794372400,814932e3,828241200,846381600,859690800,877831200,891140400,909280800,92259e4,941335200,954039600,967341600,985489200,1004234400,1017543600,1035684e3,1048993200,1067133600,1080442800,1099188e3,1111892400,1130637600,1143946800,1162087200,1174791600,1193536800,1207450800,1223172e3,1238900400,1254621600,127035e4,1286071200,1301799600,1317520800,1333249200,1349575200,1365303600,1381024800,1396753200,1412474400,1428202800,1443924e3,1459652400,1475373600,1491102e3,1506823200,1522551600,1538877600,1554606e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800],offset:[36292,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600]},"Asia/Almaty":{ time:[-1441152e3,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1925013600],offset:[18468,18e3,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,21600,18e3,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600]},"Asia/Ashkhabad":{time:[-1441152e3,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,192501e4],offset:[14012,14400,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,18e3,14400,18e3]},"Asia/Tokyo":{time:[-2587678861,-683769600,-672274800,-654739200,-640825200,-620265600,-609375600,-588816e3,-577926e3,1925024400],offset:[33539,32400,36e3,32400,36e3,32400,36e3,32400,36e3,32400]},"Asia/Taipei":{time:[-2335219200,-1017792e3,-766191600,-745804800,-733795200,-716860800,-699580800,-683856e3,-670636800,-65232e4,-639100800,-620784e3,-607564800,-589248e3,-576028800,-562896e3,-541728e3,-528681600,-510192e3,-497145600,-478656e3,-465609600,-449798400,-433987200,-418176e3,-402451200,-38664e4,-370915200,-355104e3,-339379200,-323568e3,-302486400,-291945600,-270950400,-260409600,134006400,149817600,165542400,181353600,299635200,307584e3,1925020800],offset:[29160,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Singapore":{time:[-2177452800,-2038176e3,-1167609600,-1073001600,-894153600,-879638400,-766972800,378691200,1925020800],offset:[24925,24925,25200,26400,26400,27e3,32400,27e3,28800]},"Asia/Shanghai":{time:[-2177452800,-1600646400,-1585872e3,-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,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,-1600646400,-1585872e3,-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,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/Malta":{time:[-2403475200,-1690761600,-168048e4,-1664755200,-1648944e3,-163512e4,-1616889600,-1604275200,-1585526400,-1571011200,-1555286400,-932428800,-85725e4,-844552800,-828219600,-812584800,-798066e3,-781048800,-76671e4,-750895200,-733352400,-719452800,-70191e4,-689205600,-670453200,-114048e3,-103161600,-81993600,-71708400,-50544e3,-40258800,-18489600,-8204400,1296e4,23245200,43804800,54694800,75859200,86749200,102384e3,118112400,135734400,148525200,167191200,180496800,198640800,211946400,230090400,243396e3,26154e4,274845600,292989600,306295200,323316e3,338349600,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:[3484,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,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/Amsterdam":{ time:[-4260211200,-1693699200,-168048e4,-1663452e3,-1650142800,-1633212e3,-1617483600,-1601157600,-1586034e3,-1569708e3,-1554584400,-1538258400,-1523134800,-15075e5,-1490562e3,-1470175200,-1459112400,-1443996e3,-1427662800,-1406671200,-1396213200,-1376949600,-1364763600,-1345413600,-1333314e3,-1313791200,-1301259600,-1282255200,-126981e4,-1250719200,-1238360400,-1219183200,-1206910800,-1186956e3,-1175461200,-1156024800,-1143406800,-1124488800,-1111957200,-1092952800,-1080507600,-1061330400,-1049058e3,-1029189600,-1025740800,-1017608400,-998258400,-986158800,-966722400,-954104400,-935020800,-85725e4,-844552800,-828219600,-812498400,-79677e4,-781048800,-766616400,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:[1172,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,4800,1200,4800,1200,4800,1200,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,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/Brussels":{ time:[-2840140800,-2450994150,-1740355200,-1693699200,-1680476400,-1663452e3,-1650142800,-1632002400,-1618693200,-1613822400,-1604278800,-1585526400,-1574038800,-1552262400,-1539997200,-1520553600,-1507510800,-1490572800,-1473642e3,-1459123200,-1444006800,-1427673600,-1411952400,-1396224e3,-1379293200,-1364774400,-1348448400,-1333324800,-1316394e3,-1301259600,-1284328800,-126981e4,-1253484e3,-1238360400,-1221429600,-1206910800,-1191189600,-1175461200,-1160344800,-1143406800,-1127685600,-1111957200,-1096840800,-1080507600,-1063576800,-1049058e3,-1033336800,-1017608400,-1002492e3,-986158800,-969228e3,-950475600,-942012e3,-934664400,-85725e4,-844552800,-828219600,-812498400,-798066e3,-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:[1050,1050,0,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/Lisbon":{ time:[-1830386205,-1689555600,-1677798e3,-1667437200,-1647734400,-1635814800,-1616198400,-1604365200,-1584662400,-1572742800,-155304e4,-1541206800,-1521504e3,-1442451600,-1426809600,-1379293200,-1364774400,-1348448400,-1333324800,-1316394e3,-1301270400,-1284339600,-1269820800,-1221440400,-1206921600,-1191200400,-1175472e3,-1127696400,-1111968e3,-1096851600,-1080518400,-1063587600,-1049068800,-1033347600,-1017619200,-1002502800,-986169600,-969238800,-950486400,-942022800,-922665600,-906944400,-891129600,-877309200,-873680400,-864e6,-857952e3,-845859600,-842835600,-831340800,-825897600,-81441e4,-810781200,-799891200,-794448e3,-782960400,-779331600,-768441600,-762998400,-749091600,-733363200,-717631200,-701902800,-686181600,-670453200,-654732e3,-639003600,-591832800,-575499600,-559778400,-54405e4,-528328800,-512600400,-496879200,-481150800,-465429600,-449701200,-43398e4,-417646800,-401925600,-386197200,-370476e3,-354747600,-339026400,-323298e3,-307576800,-291848400,-276127200,-260398800,-244677600,-228344400,-212623200,-196894800,-181173600,-165445200,-149724e3,-133995600,-118274400,212547600,228268800,243997200,260323200,276051600,291772800,307504800,323222400,338954400,354675600,370404e3,386125200,401853600,417578400,433303200,449024400,465357600,481078800,496807200,512528400,528256800,543978e3,559706400,575427600,591156e3,606877200,622605600,638326800,65466e4,670381200,686109600,701830800,717559200,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,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:[-2205,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,0,3600,7200,3600,0,3600,7200,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,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,7200,3600,7200,3600,7200,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]},"Europe/Dublin":{ time:[-2821651200,-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,-733352400,-719445600,-699483600,-684972e3,-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,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:[-1500,-1521,2079,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,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/Oslo":{ time:[-2366755200,-1691881200,-1680566400,-927507600,-85725e4,-844552800,-828219600,-812498400,-79677e4,-781048800,-765320400,-340840800,-324507600,-308786400,-293058e3,-277336800,-261608400,-245887200,-230158800,-214437600,-198709200,-182988e3,-166654800,-147909600,-135205200,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[2580,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]}}},"3u3j":function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("mrSG"),r=i("Eyy1"),o=function(e){function t(t,i,n){var o=e.call(this,n)||this;o._chartModel=t,o._sourceId=i.id();var s=Object(r.ensureNotNull)(i.priceScale());o._initialPriceScaleId=s.id();var a=Object(r.ensureNotNull)(t.paneForSource(i));return o._initialPriceScalePosition=a.priceScalePosition(s),o._initialPriceScaleIndex=a.priceScaleIndex(s,o._initialPriceScalePosition),o._initialPaneIndex=t.panes().indexOf(a),o}return Object(n.__extends)(t,e),t}(i("RDU5").UndoCommand)},"4TVt":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolPriceAxisView",(function(){return o}));var n=i("mrSG"),r=i("Eyy1"),o=function(e){function t(t,i){var n=e.call(this)||this;return n._active=!1,n._source=t,n._data=i,n}return Object(n.__extends)(t,e),t.prototype.setActive=function(e){this._active=e},t.prototype._updateRendererData=function(e,t,i){e.visible=!1;var n=this._source.model();if(n.timeScale()&&!n.timeScale().isEmpty()){var r=this._source.priceScale() ;if(null!==r&&!r.isEmpty())if(n.selection().isSelected(this._source)||this._source.isForcedDrawPriceAxisLabel())if(null!==n.timeScale().visibleBarsStrictRange()){var o=this._source.axisPoints(),s=this._data.pointIndex;if(!(o.length<=s)){var a=o[s];if(isFinite(a.price)){var l=this._source.ownerSource(),c=null!==l?l.firstValue():null;if(null!==c){var u=this._active?"#1565C0":n.isDark()?"#1E88E5":"#2196F3";this._data.backgroundProperty?u=this._data.backgroundProperty.value():this._data.backgroundPropertyGetter&&(u=this._data.backgroundPropertyGetter()),i.background=u,i.borderColor="#2E84A6",i.color=this.generateTextColor(u),i.coordinate=r.priceToCoordinate(a.price,c),e.text=this._formatPrice(a.price,c),e.visible=!0}}}}}},t.prototype._formatPrice=function(e,t){return Object(r.ensureNotNull)(this._source.priceScale()).formatPrice(e,t)},t}(i("KcY8").a)},"4bfY":function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=i("ytGH").LineToolWidthsProperty,s=window.t("Fib Circles");function a(e,t){var r=t||a.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("FzRY").FibCirclesPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);for(var s=[this._properties.child("trendline").child("linewidth")],l=1;l<=a.LevelsCount;l++)s.push(this._properties.child("level"+l).child("linewidth"));this._widthsProperty=new o(s)}inherit(a,n),a.LevelsCount=11,a.prototype.levelsCount=function(){return a.LevelsCount},a.prototype.pointsCount=function(){return 2},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Fib Circles"},a.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},a.createProperties=function(e){var t=new r("linetoolfibcircles",e,!1,{range:[1,11]});return a._configureProperties(t),t},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("6U6r").FibCirclesDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a._configureProperties=function(e){n._configureProperties(e)},t.LineToolFibCircles=a},"4kQX":function(e,t,i){"use strict";i.r(t),i.d(t,"TimeFormatter",(function(){return r}));var n=i("kcTO"),r=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";i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return r}));var 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}(),r=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";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=i("ytGH").LineToolWidthsProperty,s=window.t("Gann Fan");function a(e,t){var r=t||a.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("ZJWf").GannFanPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);for(var s=[],l=1;l<=a.LevelsCount;l++)s.push(this._properties.child("level"+l).child("linewidth"));this._widthsProperty=new o(s)}inherit(a,n),a.LevelsCount=9,a.prototype.levelsCount=function(){return a.LevelsCount},a.prototype.pointsCount=function(){return 2},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Gann Fan"},a.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("ASG6").GannFanDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new r("linetoolgannfan",e,!1,{range:[1,9]});return a._configureProperties(t),t},a._configureProperties=function(e){n._configureProperties(e)},t.LineToolGannFan=a},"4vW/":function(e,t,i){"use strict";var n;i.r(t),i.d(t,"ColorType",(function(){return n})),function(e){e.Solid="solid",e.Gradient="gradient"}(n||(n={}))},"54XG":function(e,t,i){"use strict";i.r(t),i.d(t,"FavoriteStudyTemplateService",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i){ return e.call(this,t,i,"FAVORITE_STUDY_TEMPLATES_CHANGED","StudyTemplates.quicks",[])||this}return Object(n.__extends)(t,e),t.prototype.remove=function(e){this.set(this.get().filter((function(t){return t!==e})))},t}(i("ulZB").b)},"55Xp":function(e,t,i){"use strict";function n(e){var t=e.toString(),i=t.split(".")[1],n=2;if(i){var r=i.match(/^([0]+)/);r&&(n=r[1].length+1)}return parseFloat(t).toFixed(n)}i.r(t),i.d(t,"roundToFirstValuable",(function(){return n}))},"5B3K":function(e,t,i){"use strict";i.r(t),i.d(t,"StudyError",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t){var i=e.call(this,t)||this;return i.studyError=!0,i}return Object(n.__extends)(t,e),t}(Error)},"5C6T":function(e,t,i){"use strict";i.r(t),i.d(t,"PipFormatter",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i,n,r){var o=this;return i||(i=1),"forex"!==n&&"cfd"!==n||!r?(o=e.call(this,1)||this)._isForex=!1:(o=e.call(this,r)||this)._isForex=!0,o._pipPriceScale=t,o._pipMinMove=i,o._pipMinMove2=r,o}return Object(n.__extends)(t,e),t.prototype.format=function(t,i,n){var r=this._isForex?this._pipMinMove2:this._pipMinMove;return void 0===r&&(r=NaN),e.prototype.format.call(this,t*this._pipPriceScale/r,i,n)},t}(i("kcTO").PriceFormatter)},"5JMW":function(e,t,i){"use strict";i.r(t),i.d(t,"isLineToolRiskReward",(function(){return l})),i.d(t,"LineDataSourceApi",(function(){return u}));var n=i("mrSG"),r=i("Eyy1"),o=i("ogJP"),s=new Map([["LineToolRiskRewardLong",2],["LineToolRiskRewardShort",2],["LineToolBezierQuadro",3],["LineToolBezierCubic",4]]);function a(e){var t=s.get(e.toolname);if(void 0!==t)return t;var i=e.pointsCount();return-1===i?e.points().length:i}function l(e){return"LineToolRiskRewardLong"===e||"LineToolRiskRewardShort"===e}var c=["alwaysShowStats","entryPrice","interval","lastUpdateTime","points","snapTo45Degrees","stopPrice","symbol","targetPrice"],u=function(){function e(e,t,i){this._source=e,this._model=t,this._pointsConverter=i}return e.prototype.isSelectionEnabled=function(){return this._source.isSelectionEnabled()},e.prototype.setSelectionEnabled=function(e){this._source.setSelectionEnabled(e)},e.prototype.isSavingEnabled=function(){return this._source.isSavedInChart()},e.prototype.setSavingEnabled=function(e){this._source.setSavingInChartEnabled(e)},e.prototype.isShowInObjectsTreeEnabled=function(){return this._source.showInObjectTree()},e.prototype.setShowInObjectsTreeEnabled=function(e){this._source.setShowInObjectsTreeEnabled(e)},e.prototype.isUserEditEnabled=function(){return this._source.userEditEnabled()},e.prototype.setUserEditEnabled=function(e){this._source.setUserEditEnabled(e)},e.prototype.bringToFront=function(){this._model.bringToFront([this._source])},e.prototype.sendToBack=function(){this._model.sendToBack([this._source])},e.prototype.getProperties=function(){return this._source.properties().state(c,!0)},e.prototype.setProperties=function(e){this._setProps(this._source.properties(),e,"")},e.prototype.getPoints=function(){var e=this._source.points(),t=a(this._source) ;return e.length>t&&(Object(r.assert)(l(this._source.toolname)),e=e.slice(0,t)),this._pointsConverter.dataSourcePointsToPriced(e)},e.prototype.setPoints=function(e){if(!this._source.isFixed()){var t=a(this._source);if(t!==e.length)throw new Error("Wrong points count. Required: "+t+", provided: "+e.length);var i=this._pointsConverter.apiPointsToDataSource(e);this._model.startChangingLinetool(this._source),this._model.changeLinePoints(this._source,i),this._model.endChangingLinetool(!1),this._source.createServerPoints()}},e.prototype.changePoint=function(e,t){if(!this._source.isFixed()){var i=this._pointsConverter.apiPointsToDataSource([e])[0];this._model.startChangingLinetool(this._source,Object(n.__assign)({},i),t),this._model.changeLinePoint(Object(n.__assign)({},i)),this._model.endChangingLinetool(!1),this._source.createServerPoints()}},e.prototype.isHidden=function(){return this._source.isSourceHidden()},e.prototype._setProps=function(e,t,i){for(var n in t)if(t.hasOwnProperty(n)){var r=0===i.length?n:i+"."+n;if(e.hasOwnProperty(n)){var s=t[n];Object(o.isHashObject)(s)?this._setProps(e[n],s,r):e[n].setValue(s)}else console.warn('Unknown property "'+r+'"')}},e}()},"5VQP":function(e,t,i){"use strict";i.r(t),i.d(t,"ContextMenuManager",(function(){return n}));var n,r=i("mrSG"),o=i("tWVy");!function(e){var t=[];function n(){Object(o.b)()}e.createMenu=function(e,o,s){return void 0===o&&(o={}),Object(r.__awaiter)(this,void 0,void 0,(function(){var a,l;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return[4,Promise.all([i.e("react"),i.e(4),i.e(23),i.e(24),i.e(27),i.e(60),i.e(78),i.e(0),i.e(2),i.e("context-menu-renderer")]).then(i.bind(null,"cbq4"))];case 1:return a=r.sent(),l=new a.ContextMenuRenderer(e,o,(function(){var e=t.indexOf(l);-1!==e&&t.splice(e,1),void 0!==s&&s()}),n),t.push(l),[2,l]}}))}))},e.hideAll=n,e.getShown=function(){for(var e=0;e=48&&e<=57}var c=function(){function e(){this.entries=[],this.firstDayOfWeek=n.MONDAY,this.weekEndsCount=-1}return e.prototype.parseSessions=function(t,i){if(this._clear(),this.timezone=t,"24x7"===(i=this._parseFirstDayOfWeek(i)).toLowerCase())for(var n=0,r=h;n2)return a.logError("Only one `first day` specification expected @ session "+e),e;if(1===t.length)return e;var i=1,r=t[0].indexOf("-")>=0?NaN:parseInt(t[0]);return isNaN(r)&&(i=0,r=parseInt(t[1])),rn.SATURDAY?(a.logError("Unexpected day index @ session: "+e+"; day index "+r),e):(this.firstDayOfWeek=r,t[i])},e._parseDay=function(e){var t=parseInt(e.substring(0,4)),i=parseInt(e.substring(4,6)),n=parseInt(e.substring(6,8));return new s.a(t,i,n)},e._parseSessionEntry=function(t,i){var n=i.split("-");2!==n.length&&(a.logError("Bad sessions entry: "+i),n=["0000","0000"]);var r=0,o=n[0];if(o.includes("F")){var s=o.split("F");o=s[0],r=""!==s[1]?parseInt(s[1]):1}var l=0,c=n[1];if(c.includes("F")){s=c.split("F");c=s[0],l=""!==s[1]?parseInt(s[1]):1}if(!this._isCorrectSession(o)||!this._isCorrectSession(c))throw new Error("Incorrect entry syntax: "+i);var u=o,h=c;return this._createSessionEntry(t,e._minutesFromHHMM(u),e._minutesFromHHMM(h),r,l)},e._isCorrectSession=function(e){return 4===e.length&&l(e.charCodeAt(0))&&l(e.charCodeAt(1))&&l(e.charCodeAt(2))&&l(e.charCodeAt(3))},e._parseWorkingDays=function(e){for(var t=[],i=0;i0&&(t-=r*n.minutesPerDay),o>0&&(i-=o*n.minutesPerDay),new _(e,t,i-t)},e}();i.d(t,"workingDays",(function(){return u})),i.d(t,"workingDaysAndWeekEnds",(function(){return h})),i.d(t,"compareSessionEntries",(function(){return p})),i.d(t,"SessionEntry",(function(){return _})),i.d(t,"EntryIndex",(function(){return f})),i.d(t,"SessionSpec",(function(){return v}));var u=[n.MONDAY,n.TUESDAY,n.WEDNESDAY,n.THURSDAY,n.FRIDAY],h=[n.SUNDAY,n.MONDAY,n.TUESDAY,n.WEDNESDAY,n.THURSDAY,n.FRIDAY,n.SATURDAY];function d(e,t){return e.compareTo(t)<0}function p(e,t){return e.compareTo(t)}var _=function(){function e(e,t,i){this._dayOfWeek=e,this._start=t,this._length=i}return e.prototype.start=function(){return this._start+n.minutesPerDay*this.sessionStartDaysOffset()},e.prototype.startOffset=function(){return this._start},e.prototype.sessionStartDaysOffset=function(){return this._start>=0?0:this._start%n.minutesPerDay==0?-Math.ceil(this._start/n.minutesPerDay):-Math.floor(this._start/n.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.prototype.contains=function(e){var t=60*n.get_hours(e)+n.get_minutes(e),i=n.get_day_of_week(e)-this._dayOfWeek;i>0&&(i-=7);var r=i*n.minutesPerDay+t;return r>=this._start&&r0&&(t-=r*n.minutesPerDay),o>0&&(i-=o*n.minutesPerDay);var s=i-t;this._entries.push(new _(e,t,s))},e.prototype.longestSessionLength=function(){for(var e=0,t=0,i=0,n=this._holidaySessions;ithis._entries.length-1||this._entries[t].dayOfWeek()!==e},e.prototype.isCalWeekEnd=function(e){var t=n.get_day_of_week(e);if(!this._isThereCorrections)return this.isWeekEnd(t);var i=s.a.fromCalendar(e),r=this._holidayAndCorrectionMap.get(i.toString());return void 0===r?this.isWeekEnd(t):0===r.length},e.prototype.hasWeekEnds=function(){return this.weekEndsCount()>0},e.prototype.weekEndsCount=function(){return this._weekEndsCount},e.prototype.holidaysFromYearStart=function(e){if(!this._isThereCorrections)return 0;for(var t=n.get_timezone(this._timezone),i=new s.a(n.get_year(e),n.JANUARY,1),r=s.a.fromCalendar(e),o=0,a=this._selectHolidays(i,r),l=0;l0?1:-1;;){var c=s+l;if(c<0||c>=o.length||o[c].dayOfWeek()!==a)break;s=c}return new f(r.weekIndex,s,o)},e.prototype.getWeekIndex=function(e){if(!this._isThereCorrections)return 0;var t=n.get_day_of_week(e)-n.SUNDAY,i=n.get_timezone("Etc/UTC"),r=n.get_cal(i,n.get_year(e),n.get_month(e),n.get_day_of_month(e)-t);return Math.floor((r.getTime()+621672192e5)/1e3/86400/7)},e.prototype.correctTradingDay=function(e){var t=n.get_day_of_week(e),i=60*n.get_hours(e)+n.get_minutes(e),r=this.getWeekIndex(e),o=this.findSession(r,t,i,0),s=o.getEntry().dayOfWeek()-t+7*(o.weekIndex-r);return 0!==s&&n.add_date(e,s),e},e.prototype.alignToSessionStart=function(e,t){void 0===t&&(t=0);var i=n.get_day_of_week(e),r=60*n.get_hours(e)+n.get_minutes(e),o=this.getWeekIndex(e),s=this.findSession(o,i,r,t),a=s.getEntry(),l=a.dayOfWeek()-i+7*(s.weekIndex-o);0!==l&&n.add_date(e,l);var c=a.startOffset();return n.set_hms(e,c/60,c%60,0,0,n.get_timezone(this._timezone)),a.length()}, e.prototype.businessDaysToCalendarDays=function(e,t){for(var i=this.getWeekIndex(e),r=n.get_day_of_week(e),o=0,s=0;sc);)a[l].dayOfWeek()=t)return o}i++,r=n.SUNDAY}return o},e.prototype.calendarDaysToBusinessDays=function(e,t){for(var i=this.getWeekIndex(e),r=n.get_day_of_week(e),o=0,s=0;oc);)a[l].dayOfWeek()=t)return s}i++,r=n.SUNDAY}return s},e.prototype.alignToNearestSessionStart=function(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionStart.bind(this))},e.prototype.alignToNearestSessionEnd=function(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionEnd.bind(this))},e.prototype.leftBorderOfDailyBar=function(e){var t=this._getEntriesForDay(e);return 0===t.length?null:(t.sort(p),this._getLeftEntryBorder(e,t[0]))},e.prototype.bordersOfDailyBar=function(e){var t=this._getEntriesForDay(e);if(0===t.length)return null;t.sort(p);var i=this._getLeftEntryBorder(e,t[0]),r=t[t.length-1],o=n.clone(e),s=60*(r.startOffset()+r.length())-1,a=Math.floor(s/3600);return s-=3600*a,n.set_hms(o,a,s/60,s%60,0,n.get_timezone(this._timezone)),{from:i,to:o}},e.prototype._getEntriesForWeek=function(e){var t=this._entriesHash.get(e);if(void 0===t)return this._entries;if(null!==t)return t;var i=n.get_timezone(this._timezone);t=this._entries.slice();for(var r=this._weekIndexToCalendar(e),o=this._weekIndexToCalendar(e+1),a=s.a.fromCalendar(r),l=s.a.fromCalendar(o),c=function(e){var r=e.day.toCalendar(i),o=n.get_day_of_week(r);t=(t=t.filter((function(e){return e.dayOfWeek()!==o}))).concat(e.sessions)},u=0,h=this._selectHolidays(a,l);u0&&i>=0||c<0&&i<0)&&n.add_date(t,7*c),!s.contains(t)){var h=a-o;u&&i<0&&(h=-(7-a+o)),n.add_date(t,h),o=n.get_day_of_week(t)}s.isOvernight()&&o===s.dayOfWeek()&&n.add_date(t,-s.sessionStartDaysOffset());var d=r(s),p=Math.floor(d/3600);return d-=3600*p,n.set_hms(t,p,d/60,d%60,0,n.get_timezone(this._timezone)),t},e.prototype._getEntriesForDay=function(e){var t=n.get_day_of_week(e);return this._getEntriesForWeek(this.getWeekIndex(e)).filter((function(e){return e.dayOfWeek()===t}))},e.prototype._getLeftEntryBorder=function(e,t){var i=n.clone(e),r=t.startOffset();return n.set_hms(i,r/60,r%60,0,0,n.get_timezone(this._timezone)),i},e}()},"5rJj":function(e,t,i){"use strict";(function(t){var n=i("ogJP").isSameType,r=i("Ocx9").DefaultProperty,o=i("vADo");function s(e,t,i,n){this._map=Object.assign({},this._map,n),t&&(t=this.unpackLevels(t)),r.call(this,e,t,i),this.updateCollectibleProperty()}inherit(s,r),s.prototype.state=function(e,i){(e=e||[]).push("__collectibleLines");var n=t.prototype.state.call(this,e);return i?n:this.packLevels(n)},s.prototype.clone=function(){var e=this.state();this.__collectibleLines&&(e.__collectibleLines=this.__collectibleLines.state());for(var t=new s(this._defaultName,e),i=0;i=0?f.SeriesBarColorer.upColor(this._series.properties()):f.SeriesBarColorer.downColor(this._series.properties());else{var L=this._series.barColorer().barStyle(d,!1);M=w(_,null!=L.barBorderColor?L.barBorderColor:L.barColor)}M=Object(c.resetTransparency)(w(_,M));for(var O=0,k=t;O'},"6et/":function(e,t,i){"use strict";i.r(t),i.d(t,"listen",(function(){return l})),i.d(t,"registerListener",(function(){return c})),i.d(t,"removeListener",(function(){return u})),i.d(t,"pushBackListener",(function(){return h})),i.d(t,"disable",(function(){return d})),i.d(t,"enable",(function(){return p}));var n=i("e3/o"),r=[],o=null;function s(e){for(var t=0;t=0&&!0!==r[t].func(e);t--);}function l(e){e.addEventListener("keypress",a,!1)}function c(e,t){var i={name:e,func:t},n=s(i.name);n>-1?r[n]=i:r.push(i)}function u(e){r.forEach((function(t,i){t.name===e&&r.splice(i,1)}))}function h(e,t){var i={name:e,func:t},n=s(i.name);n>-1&&r.splice(n,1),r.unshift(i)}function d(){return o?null:o=Object(n.randomHashN)(4)}function p(e){if(e!==o)throw Error("Lock id is outdated");o=null}l(window)},"6ptY":function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererSquare",(function(){return s}));var n=i("mrSG"),r=i("2WC2"),o=i("aO4+"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShape=function(e,t,i){var n=t.pixelRatio,r=Math.max(1,Math.floor(n))%2?.5:0,o=this._lineWidth(t)%2?.5:0,s=Math.round(i.height/2*n);(r+s)%1!=o%1&&(s+=.5);var a=Math.round(i.x*n)+r,l=Math.round((i.y+i.vertOffset)*n)+r,c=a-s,u=l-s,h=a+s,d=l+s;e.rect(c,u,h-c,d-u)},t.prototype._calcBoundingBox=function(t){var i=t.height,n=Math.round(i/2),r=t.x-n,s=t.vertOffset,a=t.y+s-n,l=r,c=r+i,u=a,h=a+i,d=new o.Point(l,u),p=new o.Point(c,h),_=Object(o.box)(d,p),f=e.prototype._calcBoundingBox.call(this,t);return f&&(_=this._unionBox(_,f)),_},t}(r.a)},"6sst":function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayStudyPriceLineAxisView",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t){var i=e.call(this)||this;return i._study=t,i}return Object(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.showSeriesLastValue.value();return this._study.properties().childs().showPriceLine.value()&&e},t}(i("TmNs").PriceLineAxisView)}, "6xeX":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tooltip=void 0;var n=function(){function e(e,t){for(var i=0;i2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e.hasOwnProperty("text")){var s=n&&(0,r.forceLTRStr)(e.text)||e.text;if(e.hasOwnProperty("color")&&i){var a=document.createElement("span");a.style.cssText="color: "+e.color,o.html(a,s),t.appendChild(a)}else o.html(t,s)}else{var l=n&&(0,r.forceLTRStr)(e)||e;o.html(t,l)}return t}function p(e,t){if(Array.isArray(e)&&2===e.length){var i=document.createElement("dl");i.appendChild(d(e[0],document.createElement("dt"))),i.appendChild(d(e[1],document.createElement("dd"),!0,!0)),t.appendChild(i)}else if(e.hasOwnProperty("br")&&e.br)t.appendChild(document.createElement("br"));else{var n=document.createElement("dl");n.appendChild(d(e,document.createElement("dt"))),t.appendChild(n),e.hasOwnProperty("listItem")&&n.classList.add("list-item")}}function _(e,t){var i=(0,r.forceLTRStr)(e.text);e.attr=e.attr||{};var n=document.createElement("a");o.attr(n,"href",e.href),o.addClass(n,e.class),o.attr(n,e.attr.name,e.attr.value),o.html(n,i),t.appendChild(n)}function f(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if("string"==typeof e){var n=(0,r.forceLTRStr)(e),s=document.createElement("h2");o.html(s,n),t.appendChild(s)}else if(e.hasOwnProperty("lines"))for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{},i=t.direction,n=void 0===i?"top":i,r=t.clickable,o=void 0!==r&&r,s=t.width;l(this,e),this._direction=n,this._tooltipShown=!1,this._tooltipX=void 0,this._tooltipY=void 0,this._tooltipItems=null,this._width=void 0!==s?s:200,this._tooltip=document.createElement("div"),this._tooltip.classList.add("tv-chart-events-source__tooltip"),this._tooltip.style.position="absolute",this._tooltip.style.width=this._width+"px",this._tooltipContent=document.createElement("div"),this._tooltipContent.classList.add("tv-chart-events-source__tooltip__content"),this._tooltip.appendChild(this._tooltipContent),o&&this._tooltip.classList.add("tv-chart-events-source__tooltip--clickable")}return n(e,[{key:"show",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.items,i=void 0===t?[]:t,n=e.x,r=void 0===n?0:n,s=e.y,a=void 0===s?0:s,l=e.wrapElement,c=void 0===l?null:l,u=e.timeOffset,d=void 0===u?"":u,p=e.leftBorderColor,_=void 0===p?null:p;if(c&&!h(i)){var m=o.contentWidth(c),v=o.contentHeight(c),y=!1,g=!1;if(this._tooltipShown||(c.appendChild(this._tooltip),this._tooltipShown=!0,y=!0,g=!0),r===this._tooltipX&&a===this._tooltipY||(y=!0),y){var b=Math.max(Math.min(r-this._width/2,m-this._width-10),0);this._tooltip.style.left=Math.round(b)+"px",this._tooltip.style.bottom=Math.round(v-a+10)+"px"}if(this._tooltipItems||(g=!0),!g)for(var S=i.length;S--;)if(this._tooltipItems[S]!==i[S]){g=!0;break}if(g){var w=void 0;if(i.length<=1)w=i;else{for(var P={},C=i.length;C--;){var x=i[C].importance;null==x&&(x=-1),P[x]||(P[x]=[]),P[x].push(i[C])}var T=Object.keys(P).sort((function(e,t){return e-t}));if(T.length<=1)w=P[T[0]];else{w=[];for(var I=T.length;I--;)for(var M=P[T[I]],L=M.length;L--;)w.push(M[L])}}this._tooltipContent.innerHTML="";for(var O=w.length;O--;){var k=w[O],A="";k.hasOwnProperty("importance")?("string"==typeof k.importance&&("earnings"===k.importance?A="--importance-earnings":"splits"===k.importance?A="--importance-splits":"dividends"===k.importance?A="--importance-dividends":"list"===k.importance&&(A="--importance-list")),0===k.importance?A="--importance-normal":k.importance>0&&(A="--importance-high")):_||(A="--importance-none") ;var E="tv-chart-events-source__tooltip__item";A&&(E+=" "+E+A);var V=document.createElement("div");o.attr(V,"class",E),_&&(V.style.borderLeftColor=_),f(k,V,d),this._tooltipContent.appendChild(V)}this._tooltipItems=i}"bottom"===this._direction&&(this._tooltip.style.bottom=Math.round(v-a-o.contentHeight(this._tooltipContent)+10)+"px")}}},{key:"hide",value:function(){this._tooltipShown&&(this._tooltip.parentElement&&this._tooltip.parentElement.removeChild(this._tooltip),this._tooltipShown=!1)}},{key:"isOpened",value:function(){return this._tooltipShown}},{key:"getElem",value:function(){return this._tooltip}}]),e}()},"704P":function(e,t,i){"use strict";(function(e){var n=i("Ss5c").LineDataSource,r=i("jkoZ"),o=i("Ocx9").DefaultProperty,s=i("k9/m").PlotRowSearchMode,a=i("s1Gx").sortSourcesPreOrdered.LineToolExecution;function l(e,t){this._pane=e,this._timeScale=t}function c(e){this._line=e}function u(e,t){this._adapter=new c(this);var r=t||u.createProperties();this.customization={forcePriceAxisLabel:!1,disableSelection:!0,disableErasing:!0},n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("tjxb").ExecutionPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}l.prototype._cachedByBarIndexOrderedExecutions={},l.recreateOrderedByBarsSourcesCache=function(e){l.clearOrderedByBarsSourcesCache();for(var t=l.prototype,i=e.orderedSources(),n=0;n_.lastBar()||i<_.firstBar())return{x:-1,y:-1};for(var f=this._cachedByBarIndexOrderedExecutions[i]||this._pane.orderedSources(),m=f.length-1;m>=0;--m){var v=f[m];if(v instanceof u&&v._adapter._index===i&&v._adapter.getDirection()===r){if(v===e._line)break;var y=v._adapter._height();n=o?n+y:n-y}}return{x:t.indexToCoordinate(i),y:n}},c.prototype._height=function(){var e=this.getArrowHeight(),t=this.getArrowSpacing();this.getText()&&r.fontHeight(this.getFont());return e+t+0+10},c.prototype.getIndex=function(){return this._line._model.timeScale().baseIndex()-this._line.points()[0].index},c.prototype.setIndex=function(e){var t=this._line._model.timeScale().baseIndex()-Math.abs(e);this._line.startMoving({logical:this._line.points()[0]});var i=TradingView.merge({},this._line.points()[0]);return i.index=t,this._line.move({logical:i}),this._line.endMoving(),this},c.prototype.getTime=function(){ return this._unixtime},c.prototype.setTime=function(e){var t=this._line._model.mainSeries();return this._unixtime=ChartApiInstance.alignTimePoint?ChartApiInstance.alignTimePoint(e,t.interval(),t.symbolInfo()):e,this._line.restorePoints([{offset:0,price:this.getPrice(),time_t:this._unixtime}],[]),this._line.createServerPoints(),this},c.prototype.getPrice=function(){return this._line.points().length>0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0},c.prototype.setPrice=function(e){return this._line.points().length>0&&(this._line.points()[0].price=e),this._line._timePoint.length>0&&(this._line._timePoint[0].price=e),this},c.prototype.getText=function(){return this._line.properties().text.value()},c.prototype.setText=function(e){return this._line.properties().text.setValue(e||""),this._line.updateAllViewsAndRedraw(),this},c.prototype.getArrowHeight=function(){return this._line.properties().arrowHeight.value()},c.prototype.setArrowHeight=function(e){return this._line.properties().arrowHeight.setValue(e||5),this},c.prototype.getArrowSpacing=function(){return this._line.properties().arrowSpacing.value()},c.prototype.setArrowSpacing=function(e){return this._line.properties().arrowSpacing.setValue(e||1),this},c.prototype.getDirection=function(){return this._line.properties().direction.value()},c.prototype.setDirection=function(e){return this._line.properties().direction.setValue(e||"buy"),this},c.prototype.getArrowColor=function(){var e=this._line.properties();return"buy"===this.getDirection()?e.arrowBuyColor.value():e.arrowSellColor.value()},c.prototype.setArrowColor=function(e){return"buy"===this.getDirection()?this.setArrowBuyColor(e):this.setArrowSellColor(e),this},c.prototype.setArrowBuyColor=function(e){return this._line.properties().arrowBuyColor.setValue(e),this},c.prototype.setArrowSellColor=function(e){return this._line.properties().arrowSellColor.setValue(e),this},c.prototype.getTextColor=function(){return r.getColorFromProperties(this._line.properties().textColor,this._line.properties().textTransparency)},c.prototype.setTextColor=function(e){return r.setColorToProperties(e,this._line.properties().textColor,this._line.properties().textTransparency),this},c.prototype.getFont=function(){return r.getFontFromProperties(this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic)},c.prototype.setFont=function(e){return r.setFontToProperties(e,this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic),this},c.prototype.setTooltip=function(e){return null==e?e="":e+="",this._line.properties().tooltip.setValue(e),this},c.prototype.getTooltip=function(){return this._line.properties().tooltip.value()},c.prototype.remove=function(){this._line._model.removeSource(this._line),delete this._line},c.prototype.getPoints=function(){return this._line.points()},inherit(u,n),u.prototype.zorder=function(){return a},u.POINTS_COUNT=1, u.prototype.pointsCount=function(){return u.POINTS_COUNT},u.prototype.translatedType=function(){return"Execution"},u.prototype.name=function(){return"Execution"},u.prototype.hasContextMenu=function(){return!1},u.prototype.state=function(){return null},u.prototype.updateAllViews=function(){return this._isVisible()?n.prototype.updateAllViews.call(this):null},u.prototype.priceAxisViews=function(e,t){return this._isVisible()?n.prototype.priceAxisViews.call(this,e,t):null},u.prototype._isVisible=function(){return this._model.properties().tradingProperties.showExecutions.value()},u.prototype.paneViews=function(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showExecutions.value()?n.prototype.paneViews.call(this):null},u.prototype.userEditEnabled=function(){return!1},u.prototype.showInObjectTree=function(){return!1},u.prototype.cloneable=function(){return!1},u.prototype.copiable=function(){return!1},u.createProperties=function(e){var t=new o("linetoolexecution",e,!1,!1);return u._configureProperties(t),t},u._configureProperties=function(e){n._configureProperties(e)},t.ExecutionsPositionController=l,t.LineToolExecution=u}).call(this,i("Kxc7"))},"7Fue":function(e,t,i){"use strict";i.d(t,"a",(function(){return o})),i.d(t,"b",(function(){return s}));var n=i("mrSG"),r=["horizlines","vertlines","lines","hlines","textmarks","shapemarks","backgrounds","polygons","trendchannels","hhists","dwglabels","dwglines"];function o(e){return!r.some((function(t){return e[t]().size>0}))}function s(e){var t=new Map;return e.forEach((function(e,i){e.forEach((function(e){var r=Object(n.__assign)(Object(n.__assign)({},e),{styleId:i}),o=e.firstBarTime,s=t.get(o);void 0===s&&(s=new Set,t.set(o,s)),s.add(r)}))})),t}},"7KDR":function(e,t,i){"use strict";i.r(t),i.d(t,"Action",(function(){return c})),i.d(t,"ActionAsync",(function(){return u})),i.d(t,"Separator",(function(){return h}));var n=i("mrSG"),r=i("zRdu"),o=i("aIyQ"),s=i.n(o),a=i("/3z9"),l=i("e3/o"),c=function(){function e(e,t){void 0===t&&(t=l.guid()),this.type=r.a.Action,this._destroyed=!1,this._binding=null,this.id=t,this._onUpdate=new s.a,this._options=e,this.update(e)}return e.prototype.execute=function(){this._options.checkable&&this.update({checked:!this._options.checked}),this._options.onExecute&&this._options.onExecute(this)},e.prototype.getLabel=function(){return this._options.label||""},e.prototype.getSubItems=function(){return this._options.subItems||[]},e.prototype.isDisabled=function(){return!0===this._options.disabled},e.prototype.isActive=function(){return!0===this._options.active},e.prototype.isCheckable=function(){return!0===this._options.checkable},e.prototype.isChecked=function(){return!0===this._options.checked},e.prototype.getPayload=function(){return this._options.payload},e.prototype.update=function(e){this._destroyed||(this._unbindShortcut(),e.hotkeyHash&&(this._options.shortcutHint=Object(a.humanReadableHash)(e.hotkeyHash)),this._options=Object.assign(this._options,e),this._bindShortcut(), this._onUpdate.fire(this))},e.prototype.onUpdate=function(){return this._onUpdate},e.prototype.getState=function(){return{label:this.getLabel(),disabled:this.isDisabled(),active:this.isActive(),subItems:this.getSubItems(),checkable:this.isCheckable(),checked:this.isChecked(),doNotCloseOnClick:this._options.doNotCloseOnClick||!1,shortcutHint:this._options.shortcutHint,hint:this._options.hint,icon:this._options.icon,iconChecked:this._options.iconChecked,toolbox:this._options.toolbox,showToolboxOnHover:this._options.showToolboxOnHover||!1,statName:this._options.statName,name:this._options.name,fullWidthLabel:this._options.fullWidthLabel}},e.prototype.getBinding=function(){return this._binding},e.prototype.setBinding=function(e){this._binding=e},e.prototype.destroy=function(){this._destroyed=!0,this._onUpdate.destroy(),null!==this._binding&&this._binding.destroy(),this._unbindShortcut()},e.prototype._bindShortcut=function(){var e=this;if(this._options.hotkeyGroup&&this._options.hotkeyHash){var t="string"==typeof this._options.label?this._options.label:this._options.name;this._hotkeyAction=this._options.hotkeyGroup.add({hotkey:this._options.hotkeyHash,desc:t,handler:function(){return e.execute()},isDisabled:function(){return e.isDisabled()}})}},e.prototype._unbindShortcut=function(){this._hotkeyAction&&(this._hotkeyAction.destroy(),delete this._hotkeyAction)},e}(),u=function(e){function t(t,i){var n=e.call(this,{},i)||this;return n.type=r.a.ActionAsync,n._loader=t,n._loaded=!1,n}return Object(n.__extends)(t,e),t.prototype.loadOptions=function(){var e=this;return this._loadingPromise||(this._loadingPromise=this._loader().then((function(t){e.update(t),e._loaded=!0}))),this._loadingPromise},t.prototype.isLoaded=function(){return this._loaded},t}(c),h=function(){function e(e,t){void 0===t&&(t=l.guid()),this.type=r.a.Separator,this.id=t,this._hint=e}return e.prototype.getHint=function(){return this._hint},e}()},"7MZv":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showTooManyStudiesNotice=function(e){"number"!=typeof e&&(e=TradingView.STUDY_COUNT_LIMIT);(0,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";i.d(t,"b",(function(){return n})),i.d(t,"a",(function(){return r}));var n=52,r=5},"7dm8":function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return o})),i.d(t,"c",(function(){return s})),i.d(t,"d",(function(){return a})),i.d(t,"e",(function(){return l}));var n=i("ocLq"),r=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=e.symbol.time,r=n.Std[this._source](e);e.select_sym(1);var o=n.Std[this._source](e),s=e.new_unlimited_var(o),a=e.new_unlimited_var(e.symbol.time);if(e.select_sym(0),isNaN(i))return null;var l=a.indexOf(i) ;-1!==l&&a.get(l)!==i&&(l=-1);var c=l<0?NaN:s.get(l);return[this._doCalculation(this._scaleFactor1,r,this._scaleFactor2,c)]},e}(),o={styles:{plot1:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:2,inputs:{source:"close",symbol2:""}},s=[{defval:"close",id:"source",name:"Source",options:["open","high","low","close","hl2","hlc3","ohlc4"],type:"text"},{id:"symbol2",name:"Symbol",type:"symbol",confirm:!0}],a=[{id:"plot1",type:"line"}],l={plot1:{title:"Plot",histogramBase:0}}},"7ktv":function(e,t,i){"use strict";i.r(t),i.d(t,"PriceDataSource",(function(){return a}));var n=i("mrSG"),r=i("fgLi"),o=i("aIyQ"),s=i.n(o),a=function(e){function t(t){var i=e.call(this)||this;return i._formatterChanged=new s.a,i._priceStepChanged=new s.a,i._currencyChanged=new s.a,i._metaInfo=null,i._priceStep=null,i._model=t,i}return Object(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.currencyChanged=function(){return this._currencyChanged},t.prototype.isCurrencySource=function(){return!0},t.prototype.priceRange=function(e,t){return null},t.prototype.isDraggable=function(){return!this._metaInfo||!this._metaInfo.linkedToSeries},t.prototype.priceLineColor=function(e){return e},t.prototype.formatterChanged=function(){return this._formatterChanged},t.prototype.priceStep=function(e){return this._priceStep},t.prototype.priceStepChanged=function(){return this._priceStepChanged},t.prototype.hasStateForAlert=function(){return!1},t.prototype.isIncludedInAutoScale=function(){return!0},t}(r.DataSource)},"7nsU":function(e,t,i){"use strict";i.r(t),i.d(t,"showConfirmInputsDialog",(function(){return n}));i("YFKU");function n(e,t,n,r,o){void 0===o&&(o="default"),Promise.all([i.e("react"),i.e(1),i.e(3),i.e(4),i.e(6),i.e(7),i.e(8),i.e(9),i.e(10),i.e(13),i.e(16),i.e(19),i.e(22),i.e(25),i.e(29),i.e(56),i.e(93),i.e(0),i.e(2),i.e(5),i.e(11),i.e(17),i.e(20),i.e(28),i.e(49),i.e("new-confirm-inputs-dialog")]).then(i.bind(null,"iqv3")).then((function(i){var s=new i.ConfirmInputsDialogRenderer(function(e){if("symbol"===e)return window.t("Add Symbol");return window.t("Confirm Inputs")}(o),e,t,o,n,r);return s.show(),s}))}},"7qI1":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolRectangle",(function(){return h}));var n=i("mrSG"),r=i("YFKU"),o=i("aO4+"),s=i("Ocx9"),a=i("tc+8"),l=i.n(a),c=i("Ss5c"),u=Object(r.t)("Rectangle"),h=function(e){function t(n,r){var o=this,s=r||t.createProperties();return o=e.call(this,n,s)||this,i.e("lt-pane-views").then(function(e){var t=[new(0,i("GW0y").RectanglePaneView)(o,n)];o._setPaneViews(t)}.bind(null,i)).catch(void 0),o}return Object(n.__extends)(t,e),t.prototype.pointsCount=function(){return 2},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.translatedType=function(){return u},t.prototype.name=function(){return"Rectangle"},t.prototype.setPoint=function(t,i,n){ if(t<2)e.prototype.setPoint.call(this,t,i,n);else{if(n&&n.shift()&&this.properties().childs().snapTo45Degrees){var r=this._getAnchorPointForIndex(t);if(t>=4)return this._correctMiddlePoints(t,i,r),void this.normalizePoints();this._snapPoint45Degree(i,r)}switch(t){case 2:this._points[1].price=i.price,this._points[0].index=i.index;break;case 3:this._points[0].price=i.price,this._points[1].index=i.index;break;case 4:this._points[0].index=i.index;break;case 5:this._points[1].index=i.index;break;case 6:this._points[0].price=i.price;break;case 7:this._points[1].price=i.price}this.normalizePoints()}},t.prototype.template=function(){var t=e.prototype.template.call(this);return t.text=this.properties().childs().text.value(),t},t.createProperties=function(e){var i=new s.DefaultProperty("linetoolrectangle",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"K4wI")).then((function(e){return e.RectangleDefinitionsViewModel}))},t.prototype._applyTemplateImpl=function(t){e.prototype._applyTemplateImpl.call(this,t),this.properties().childs().text.setValue(t.text)},t.prototype._snapPoint45Degree=function(e,t,i){var n=this.m_priceScale,r=this.ownerSource();if(null!==n&&null!==r){var o=r.firstValue();if(null!==o){var s=this._model.timeScale(),a=this.pointToScreenPoint(e)[0],l=this.pointToScreenPoint(t)[0],c=a.x-l.x,u=a.y-l.y,h=c<0?-1:1,d=u<0?-1:1,p=Math.max(Math.abs(c),Math.abs(u)),_=Math.round(s.coordinateToIndex(l.x+p*h)),f=Math.abs(s.indexToCoordinate(_)-l.x),m=n.coordinateToPrice(l.y+f*d,o);e.index=_,e.price=m}}},t.prototype._correctMiddlePoints=function(e,t,i){e<6?this._correctRightLeftMiddlePoint(e,t,i):this._correctTopBottomMiddlePoint(e,t,i)},t.prototype._correctRightLeftMiddlePoint=function(e,t,i){var n=this.pointToScreenPoint(t)[0],r=this.pointToScreenPoint(i)[0],s=this.pointToScreenPoint(this._points[0])[0],a=this.pointToScreenPoint(this._points[1])[0],l=n.x-r.x;if(0!==l){var c=s.x0)}},t.prototype._paneText=function(e){var t="",i=this._studyCompare.model().properties().scalesProperties;i.showSymbolLabels.value()&&(t+=this._studyCompare.symbol()+" ");var n=this._studyCompare.priceScale();return null!==n&&i.showSeriesLastValue.value()&&i.seriesLastValueMode.value()===r.PriceAxisLastValueMode.LastPriceAndPercentageValue&&(t+=n.isPercentage()?e.formattedPriceAbsolute:e.formattedPricePercentage),t.trim()},t.prototype._axisText=function(e){var t=this._studyCompare.model().properties().scalesProperties,i=this._studyCompare.priceScale();return t.seriesLastValueMode.value()!==r.PriceAxisLastValueMode.LastPriceAndPercentageValue||null===i?e.text:i.isPercentage()?e.formattedPricePercentage:e.formattedPriceAbsolute},t}(i("KcY8").a)},"8gnj":function(e,t,i){"use strict";(function(t){var n=i("ESp1").HeikenAshi,r=i("LxhU").Interval,o=function(){var e=i("ocLq"),o=i("IiTo"),s=e.Symbol,a=e.StudyEngine,l=e.BarBuilder,c=e.BarSet;function u(e){this.host=e,this.cache={}}function h(e){var t=e.indexOf(",");return-1===t?e:e.slice(0,t)}function d(e){return e.has_empty_bars||e.force_session_rebuild}function p(e){return"string"==typeof e&&"="===e[0]}function _(e){if(!p(e))return{symbol:e};var t;try{t=JSON.parse(e.slice(1))}catch(i){return{symbol:e}}return t.type&&(0===t.type.indexOf("BarSetHeikenAshi@tv-basicstudies-")?t.builder=new n:console.error("unknown builder type: "+t.type)),"string"!=typeof t.symbol&&(t.session=t.symbol.session||t.session,t.currencyCode=t.symbol.currencyCode||t.currencyCode,t.symbol=t.symbol.symbol),t}u.prototype.getCache=function(e){return this.cache[e]},u.prototype.putCache=function(e,t){this.cache[e]=t},u.prototype.subscribe=function(e,t,i,n,r,o,s,a,l,c,u){var h=function(e,t,i,n,r,o,s,a){var l=d(r)?"_":"";return o+e+i+(t||"")+n+l+s+"_"+a}(e,t,i,n,a,l,r,u),p=this.getCache(h);return p||(p=this.createItem(e,t,i,n,a,c,l,r,u),this.putCache(h,p)),p.listeners.addListener(o,s),{key:h,listener:o}},u.prototype.unsubscribe=function(e){var t=this.getCache(e.key);t&&t.listeners.removeListener(e.listener)},u.prototype.removeUnused=function(){var e=[];for(var t in this.cache){if(this.cache[t])0===this.cache[t].listeners.listenersCount()&&e.push(t)}if(0!==e.length){for(var i=0;i=0;l--){var c=+a[l];if(o%c==0)return c+(n.isSeconds?"S":"")}return""}return o+(n.isSeconds?"S":"")},u.prototype.createItem=function(e,t,i,n,o,s,a,c,u){var p=new v,y=_(e);if(t=y.currencyCode||t,y.builder)return new m(p,y.symbol,t,i,n,y.builder,o,s,a);var g=h(i),b=this.rebuildFrom(g,h(n),o),S=d(o);if(!r.isEqual(g,b)||S){var w=o.has_empty_bars,P=Object.assign({},o);return S&&(P.has_empty_bars=!1,P.force_session_rebuild=!1),new m(p,y.symbol,t,i,b,new l(i,w),P,s,a,c,u)}var C=y.session&&"extended"!==y.session,x={currency:t};return new f(p,y.symbol,x,i,n,C,this.host,o,s,c,u)};var f=function(e,t,i,n,r,o,s,a,l,c,u){this.listeners=e,this.host=s;var d=this;this.host.resolve(t,i,(function(e){o&&e.regular_session&&(e.session=e.regular_session);var i=d.calculateFromTo(e,c||r||n,t,l,u);d.subs=d.host.subscribe(e,h(n),i,(function(e){d.listeners.fire(e)}),(function(e){d.listeners.onError(e)}))}),(function(e){d.listeners.onError(e)}))};f.prototype.stop=function(){this.subs&&this.host.unsubscribe(this.subs)},f.prototype.calculateFromTo=function(e,i,n,r,a){var l,c,u,h=s.parsePeriod(i),d=(new Date).valueOf(),p=e.expired&&t.cal_to_utc(t.get_timezone(e.timezone),new Date(1e3*e.expiration_date))||d;if(""===h.resolution)c=h.interval,u="D";else if("S"===h.resolution)c=10*h.interval,u="";else{c=12*("D"===h.resolution?1:"W"===h.resolution?5:30)*h.interval,u="M"}if(h.range)c=h.range.interval,u=h.range.resolution;else if(this.host.calculateHistoryDepth){var _=this.host.calculateHistoryDepth(i,u,c);_&&(c=_.intervalBack||c,u=void 0===_.resolutionBack?u:_.resolutionBack)}var f=e.sessionString||e.session;if(l=o.alignPeriodsBack(f,e.holidays,e.corrections,u,c,1,p),r&&r.getRangeExtensionTime){var m=r.getRangeExtensionTime();m&&(l=Math.min(1e3*m,l))}var v=Math.ceil(1.5*a);return r&&r.getRangeExtensionCount&&(v+=r.getRangeExtensionCount()),v>0&&(l=o.alignPeriodsBack(f,e.holidays,e.corrections,h.resolution,h.interval,v,l)),{from:l,to:p+6e4}};var m=function(e,t,i,n,r,o,s,l,c,u,h){if(this.listeners=e,this.isRecalculated=!1,""===r)return console.error("unsupported resolution for rebuild: "+n),void this.listeners.onError("unsupported resolution for rebuild: "+n);this.symbolInfo=s;var d=this;this.engine=new a({tickerid:t,currencyCode:i,period:r,periodBase:n,body:o,sessionId:c,symbolInfo:s,rangeExtension:l,periodForInitialRange:u,additionalBarsCount:h,recalc:function(e,t){d._recalc(t)},out:function(e,t){d._out(e,t)},nonseriesOut:function(e,t){d._nonseriesOut(e,t)},setNoMoreData:function(){d.barset&&(d.barset.endOfData=!0)},onErrorCallback:function(e){d.listeners.onError(e)}})};m.prototype.stop=function(){this.engine?this.engine.stop():console.error("Internal library error 0x1")}, m.prototype._recalc=function(e){this.isRecalculated&&console.error("recalc called twice!"),this.barset||(this.barset=new c(this.symbolInfo)),e&&(this.barset.nextTime=e.nextTime,this.barset.endOfData=e.endOfData),this.listeners.fire(this.barset),this.isRecalculated=!0},m.prototype._nonseriesOut=function(e,t){var i=Object.assign({},t);i.nonseries=!0,i.data=t.bars,delete i.bars,i.barsetSize=this.barset?this.barset.count():0,i.lastBar=this.barset?this.barset.bar(this.barset.count()-1):null,this.listeners.fire(i,!0)},m.prototype._out=function(e,t){var i=t[0];if(!isNaN(i)){var n={time:i,open:t[1],high:t[2],low:t[3],close:t[4],volume:t[5],updatetime:t[6]},r=t[7];this.barset||(this.barset=new c(e.info));var o=t[8];if(o instanceof Array)for(var s=0;s=1;--t){var n=this._ticker.slice(0,t);if(e(n)){this._root=n,this._contract=this._ticker.slice(t);break}}},m.prototype.exchange=function(e){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._exchange;null==e?delete this._exchange:this._exchange=e+""},m.prototype.ticker=function(e){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._ticker;null==e?delete this._ticker:this._ticker=e+"",delete this._root,delete this._contract},m.prototype.root=function(e){if(this.hasOwnProperty("_root")||this.parseAsFutures(),!(arguments.length>0))return this._root;null==e?delete this._root:(this._root=e+"",this._root&&(this._ticker=this._root+(this._contract||"")))},m.prototype.contract=function(e){if(this.hasOwnProperty("_contract")||this.parseAsFutures(),!(arguments.length>0))return this._root;null==e?delete this._contract:(this._contract=e+"",this._root&&(this._ticker=this._root+this._contract))},n(v,r),v.prototype.toString=function(){return this.hasOwnProperty("_normalizedValue")?this._normalizedValue:this.value},v.prototype.parse=function(){this._normalizedValue=this.value.replace(/^0+|\.0*$/g,"").replace(/(\.\d*?)0+$/,"$1").replace(/^(\.|$)/,"0$1")},y.prototype.toString=function(){return this.value},n(g,m),g.prototype.isIncomplete=!0, g.prototype.incompleteSuggest=function(){if("'"!==this.value)return String("'")},n(b,v),b.prototype.isIncomplete=!0;var S=new RegExp(e.map((function(e){return"("+("string"==typeof e.pattern?e.pattern.replace(/[\^$()[\]{}*+?|\\]/g,"\\$&"):e.pattern.source)+")"})).concat(".").join("|"),"g");function w(t,i){var n,r=[];e:for(;n=S.exec(t);){for(var s=e.length;s--;)if(n[s+1]){if(e[s].ctor){var a=new e[s].ctor(n[s+1]);a._offset=n.index,r.push(a)}continue e}var l=new y(n[0]);l._offset=n.index,r.push(l)}if(i&&i.recover){var c;for(s=r.length;s--;){var u=r[s];if(u instanceof v||u instanceof m){if(void 0!==c){var h=new m(""),d=r.splice(s,c-s+1,h);h.value=d.map((function(e){return e.value})).join("")}c=s}else u instanceof o||(c=void 0)}}return r}function P(e){for(var t=[],i=0;io.precedence&&(n[n.length-1].minPrecedence=o.precedence);else if(o instanceof s)n.push(t={minPrecedence:1/0,openBraceIndex:r});else if(o instanceof a){var c=e[(t=n.pop()).openBraceIndex-1],u=e[r+1];u instanceof l&&!(u.precedence<=t.minPrecedence)||!(!(c instanceof l)||c.precedencet.minPrecedence&&(n[n.length-1].minPrecedence=t.minPrecedence))}}for(r=i.length;r--;)e.splice(i[r],1);return e}function x(e){if("string"!=typeof e)throw new TypeError("expression must be a string");return(e=w(e)).filter((function(e){return e instanceof m})).map((function(e){return e.exchange()})).filter((function(e){return e}))}function T(e){return 1!==(e=x(e)).length?null:e[0]}function I(e,t){return(e=x(e)).some((function(e){return t.includes((e||"").toUpperCase())}))}function M(e){return e.join("")}return{tokenize:w,validate:function(e){if(t.enabled("charting_library_base"))return{currentState:"var"};for(var i="init",n={warnings:[],errors:[],isEmpty:!0},r=[],c=0;ct[t.length-1].time+i)return null;var n=t[Object(a.lowerbound)(t,e.x-i,(function(e,t){return e.timen.time+i)return null;var r=Object(l.selectionTolerance)(this._barWidth),o=Math.min(n.high,n.low),s=Math.max(n.high,n.low),u=this._data.fontSize;return o-r-u<=e.y&&e.y<=o+r||s-r<=e.y&&e.y<=s+r+u?new c.HitTestResult(c.HitTestResult.REGULAR):null},t.prototype._drawImpl=function(e){if(null!==this._data&&null!==this._barWidth){e.save(),e.translate(.5,.5),e.textAlign="center",e.fillStyle=this._data.labelColor,e.font=Object(o.makeFont)(this._data.fontSize,this._data.font);for(var t=this._data.bars,i=this._data.inverted,n=0;n5},t.prototype._getLabelWidth=function(e){return this._widthsCache.measureText(this._context,e)},t}(s.SeriesBarCandlesPaneView)},"9QkW":function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=i("ytGH").LineToolWidthsProperty,s=window.t("Fib Wedge");function a(e,t){var r=t||a.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("1SUO").FibWedgePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);for(var s=[this._properties.child("trendline").child("linewidth")],l=1;l<=a.LevelsCount;l++)s.push(this._properties.child("level"+l).child("linewidth"));this._widthsProperty=new o(s)}inherit(a,n),a.LevelsCount=11,a.prototype.isSynchronizable=function(){return!1},a.prototype.levelsCount=function(){return a.LevelsCount},a.prototype.pointsCount=function(){return 3},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Fib Wedge"},a.prototype.hasEditableCoordinates=function(){return!1},a.prototype.setPoint=function(e,t){if(n.prototype.setPoint.call(this,e,t),!this._recursiveGuard){if(this._recursiveGuard=!0,2===e){var i=this.pointToScreenPoint(this._points[0])[0],r=this.pointToScreenPoint(this._points[1])[0],o=(l=this.pointToScreenPoint(this._points[2])[0]).subtract(i).length(),s=r.subtract(i).normalized();r=i.add(s.scaled(o));var a=this.screenPointToPoint(r);this._properties.points[1].price.setValue(a.price),this._properties.points[1].bar.setValue(a.index)}else{i=this.pointToScreenPoint(this._points[0])[0],r=this.pointToScreenPoint(this._points[1])[0];var l=this.pointToScreenPoint(this._points[2])[0],c=r.subtract(i).length();s=l.subtract(i).normalized();l=i.add(s.scaled(c));a=this.screenPointToPoint(l);this._properties.points[2].price.setValue(a.price),this._properties.points[2].bar.setValue(a.index)}this._recursiveGuard=!1}},a.prototype.addPoint=function(e){if(2===this._points.length){var t=this.pointToScreenPoint(this._points[0])[0],i=this.pointToScreenPoint(this._points[1])[0],r=this.pointToScreenPoint(e)[0],o=i.subtract(t).length(),s=r.subtract(t).normalized();r=t.add(s.scaled(o)) ;var a=this.ownerSource().firstValue(),l=this.priceScale().coordinateToPrice(r.y,a);e={index:Math.round(this._model.timeScale().coordinateToIndex(r.x)),price:l}}return n.prototype.addPoint.call(this,e)},a.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},a.createProperties=function(e){var t=new r("linetoolfibwedge",e,!1,{range:[1,11]});return a._configureProperties(t),t},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("6mGk").FibWedgeDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a._configureProperties=function(e){n._configureProperties(e)},t.LineToolFibWedge=a},"9dnG":function(e,t){e.exports=''},"9iCb":function(e,t,i){"use strict";i.r(t),i.d(t,"applyOverridesToStudy",(function(){return u})),i.d(t,"applyOverridesToStudyDefaults",(function(){return h}));var n,r,o=i("Eyy1"),s=i("23IT"),a=i("txPx"),l=Object(a.getLogger)("Chart.Model.StudyPropertiesOverrider");function c(e,t,i,o){var s=i.split(".");if(0!==s.length&&0!==s[0].length){var a,c,u=(a=s[0],{name:(c=a.split(":"))[0],type:2===c.length?c[1]:null}),h=u.name,d=u.type,p=null!==d,_=!p||"band"===d,f=!p||"area"===d,m=!p||"input"===d,v=!p||"plot"===d?r.getPlotIdByTitle(e,h):null,y=_?r.getBandIndexByName(e,h):null,g=f?r.getFilledAreaIdByTitle(e,h):null,b=m?r.getInputByName(e,h):null,S=t.hasOwnProperty(h);if((null!==v?1:0)+(null!==y?1:0)+(null!==g?1:0)+(null!==b?1:0)+(S?1:0)>1)l.logWarn("Study '"+e.description+"' has ambiguous identifier '"+h+"'");else{var w=s[1];if(null!==v){if(1===s.length)return void l.logWarn("Path of sub-property of '"+h+"' plot for study '"+e.description+"' must be not empty");var P=s.slice(1);n.applyPlotProperty(e,t,v,P,o)}else if(null!==b)n.applyInputValue(t,b,o);else if(null!==y){if(void 0===w)return void l.logWarn("Property name of '"+h+"' band for study '"+e.description+"' must be set");n.applyBandProperty(t,y,w,o)}else if(null!==g){if(void 0===w)return void l.logWarn("Property name of '"+h+"' area for study '"+e.description+"' must be set");n.applyFilledAreaProperty(t,g,w,o)}else S?n.setRootProperty(t,s,o):l.logWarn("Study '"+e.description+"' has no plot or input '"+h+"'")}}}function u(e,t){var i=e.properties(),n=i.state();for(var r in t)t.hasOwnProperty(r)&&c(e.metaInfo(),n,r,t[r]);i.mergeAndFire(n)}function h(e,t,i){for(var n in e)if(e.hasOwnProperty(n)){var o=n.indexOf(".");if(-1!==o){var s=n.substr(0,o),a=r.getMetaInfoByDescription(t,s);if(null!==a){var u=i(a);null!==u?c(a,u,n.substr(o+1),e[n]):l.logWarn("Cannot apply overrides for study "+s)}else l.logWarn("There is no such study "+s)}}}!function(e){var t={line:s.LineStudyPlotStyle.Line,histogram:s.LineStudyPlotStyle.Histogram,cross:s.LineStudyPlotStyle.Cross,area:s.LineStudyPlotStyle.Area, columns:s.LineStudyPlotStyle.Columns,circles:s.LineStudyPlotStyle.Circles,line_with_breaks:s.LineStudyPlotStyle.LineWithBreaks,area_with_breaks:s.LineStudyPlotStyle.AreaWithBreaks};e.applyPlotProperty=function(e,i,n,r,a){if(void 0!==i.styles){var c=r[0];if("color"!==c){var u=i.styles[n];if(void 0!==u&&u.hasOwnProperty(c)){if("plottype"===c){var h=t[String(a)];if(void 0===h)return void l.logWarn("Unsupported plot type for plot: "+a);a=h}u[c]=a}else l.logWarn("Study plot does not have property '"+c+"'")}else{!function(e,t,i,n,r){if(void 0!==e.styles)if(null===t&&!isNaN(n)&&n>0)l.logWarn("Study plot does not have color #"+n);else{if(0===n||isNaN(n))Object(o.ensureDefined)(e.styles[i]).color=String(r),n=0;null!==t&&(Object(o.ensureDefined)(t.colors[n]).color=String(r))}else l.logWarn("Study does not have styles")}(i,function(e,t,i){if(void 0===e.plots)return null;for(var n=0,r=e.plots;n1?parseInt(r[1]):NaN,a)}}else l.logWarn("Study does not have styles")},e.applyBandProperty=function(e,i,n,r){if(void 0!==e.bands){var o=e.bands[i];if(void 0!==o&&o.hasOwnProperty(n)){if("plottype"===n){var s=t[String(r)];if(void 0===s)return void l.logWarn("Unsupported plot type for band: "+r);r=s}o[n]=r}else l.logWarn("Study band does not have property '"+n+"'")}else l.logWarn("Study does not have bands")},e.applyFilledAreaProperty=function(e,t,i,n){if(void 0!==e.filledAreasStyle){var r=e.filledAreasStyle[t];void 0!==r&&r.hasOwnProperty(i)?r[i]=n:l.logWarn("Study area does not have property '"+i+"'")}else l.logWarn("Study does not have areas")},e.applyInputValue=function(e,t,i){void 0!==e.inputs&&e.inputs.hasOwnProperty(t)?e.inputs[t]=i:l.logWarn("Study does not have input '"+t+"'")},e.setRootProperty=function(e,t,i){if(0!==t.length){for(var n=e,r=0,o=t.slice(0,-1);r=this.chartsCount())throw Error("Incorrect index: "+e);return this._getChartWidgetApi(this._chartWidgetCollection.getAll()[e])},b.prototype.getSymbolInterval=function(e){var t={symbol:r.symbol.value(),interval:r.interval.value()};return e&&e(t),t},b.prototype.saveChart=function(e){var t=this;this._saveChartService.whenReadyToSave((function(){var i=t._saveChartService.saveToJSON();return e&&e(JSON.parse(i.content))}))},b.prototype.loadChart=function(e){this._chartApiInstance.disconnect(),this._chartWidgetCollection.loadContent(e.json),this._chartWidgetCollection.purgeUnusedWidgets(),e.extendedData&&(this._chartWidgetCollection.metaInfo.id.setValue(e.extendedData.uid),this._chartWidgetCollection.metaInfo.uid.setValue(e.extendedData.uid),this._chartWidgetCollection.metaInfo.name.setValue(e.extendedData.name)),this._chartApiInstance.connect(),r.symbol.setValue(this.activeChart().symbol()),a.emit("chart_loaded")},b.prototype.getStudiesList=function(){return this._chartApiInstance.allStudiesMetadata().filter((function(e){return!e.is_hidden_study})).map((function(e){return e.description}))},b.prototype.getSavedCharts=function(e){h.getCharts(e)},b.prototype.loadChartFromServer=function(e){h.loadChart(e)},b.prototype.saveChartToServer=function(e,t,i){this._saveChartService.saveChartSilently(e,t,i)},b.prototype.removeChartFromServer=function(e,t){h.removeChart(e,t)},b.prototype.getIntervals=function(){var e=[],t=u.getCustomResolutions();return null!==this._chartApiInstance&&(e=this._chartApiInstance.defaultResolutions()),u.mergeResolutions(e,t)},b.prototype.closePopupsAndDialogs=function(){for(var e=document.querySelectorAll("._tv-dialog-title-close"),t=0;t0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0},c.prototype.setPrice=function(e){if(this._line.points().length>0){var t=this._line.points()[0];t.price=e,this._line._points[0]=t,this._line.normalizePoints(),this._line.updateAllViewsAndRedraw()}return this._line._timePoint.length>0&&(this._line._timePoint[0].price=e),this},c.prototype.getText=function(){return this._data.bodyText},c.prototype.setText=function(e){return this._data.bodyText=e||"",this._line.updateAllViewsAndRedraw(),this},c.prototype.setTooltip=function(e){return this._line.properties().tooltip.setValue(u(e)),this},c.prototype.getTooltip=function(){return this._line.properties().tooltip.value()},c.prototype.setModifyTooltip=function(e){return this._line.properties().modifyTooltip.setValue(u(e)),this},c.prototype.getModifyTooltip=function(){return this._line.properties().modifyTooltip.value()},c.prototype.setCancelTooltip=function(e){return this._line.properties().cancelTooltip.setValue(u(e)),this},c.prototype.getCancelTooltip=function(){return this._line.properties().cancelTooltip.value()},c.prototype.getQuantity=function(){return this._data.quantityText},c.prototype.setQuantity=function(e){return this._data.quantityText=e||"",this._line.updateAllViewsAndRedraw(),this},c.prototype.getExtendLeft=function(){var e=this._line.properties().extendLeft.value();return"inherit"===e?this._line._model.properties().tradingProperties.extendLeft.value():e},c.prototype.setExtendLeft=function(e){return this._line.properties().extendLeft.setValue(e),this},c.prototype.getLineLength=function(){var e=this._line.properties().lineLength.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineLength.value():e},c.prototype.setLineLength=function(e){return this._line.properties().lineLength.setValue(Math.max(0,Math.min(e,100))),this},c.prototype.getLineColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.lineActiveBuyColor.value():e.lineInactiveBuyColor.value():this._active?e.lineActiveSellColor.value():e.lineInactiveSellColor.value()},c.prototype.setLineColor=function(e){return"buy"===this._direction?this._active?this.setLineActiveBuyColor(e):this.setLineInactiveBuyColor(e):this._active?this.setLineActiveSellColor(e):this.setLineInactiveSellColor(e),this}, c.prototype.setLineActiveBuyColor=function(e){return this._line.properties().lineActiveBuyColor.setValue(e),this},c.prototype.setLineInactiveBuyColor=function(e){return this._line.properties().lineInactiveBuyColor.setValue(e),this},c.prototype.setLineActiveSellColor=function(e){return this._line.properties().lineActiveSellColor.setValue(e),this},c.prototype.setLineInactiveSellColor=function(e){return this._line.properties().lineInactiveSellColor.setValue(e),this},c.prototype.getLineStyle=function(){var e=this._line.properties().lineStyle.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineStyle.value():e},c.prototype.setLineStyle=function(e){return this._line.properties().lineStyle.setValue(e),this},c.prototype.getLineWidth=function(){var e=this._line.properties().lineWidth.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineWidth.value():e},c.prototype.setLineWidth=function(e){return this._line.properties().lineWidth.setValue(e),this},c.prototype.getBodyBorderColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.bodyBorderActiveBuyColor.value():e.bodyBorderInactiveBuyColor.value():this._active?e.bodyBorderActiveSellColor.value():e.bodyBorderInactiveSellColor.value()},c.prototype.setBodyBorderColor=function(e){return"buy"===this._direction?this._active?this.setBodyBorderActiveBuyColor(e):this.setBodyBorderInactiveBuyColor(e):this._active?this.setBodyBorderActiveSellColor(e):this.setBodyBorderInactiveSellColor(e),this},c.prototype.setBodyBorderActiveBuyColor=function(e){return this._line.properties().bodyBorderActiveBuyColor.setValue(e),this},c.prototype.setBodyBorderInactiveBuyColor=function(e){return this._line.properties().bodyBorderInactiveBuyColor.setValue(e),this},c.prototype.setBodyBorderActiveSellColor=function(e){return this._line.properties().bodyBorderActiveSellColor.setValue(e),this},c.prototype.setBodyBorderInactiveSellColor=function(e){return this._line.properties().bodyBorderInactiveSellColor.setValue(e),this},c.prototype.getBodyBackgroundColor=function(){return o.getColorFromProperties(this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency)},c.prototype.setBodyBackgroundColor=function(e){return o.setColorToProperties(e,this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency),this},c.prototype.getBodyTextColor=function(){var e=this._line.properties();return"limit"===this._mode?this._active?e.bodyTextActiveLimitColor.value():e.bodyTextInactiveLimitColor.value():"stop"===this._mode?this._active?e.bodyTextActiveStopColor.value():e.bodyTextInactiveStopColor.value():"buy"===this._direction?this._active?e.bodyTextActiveBuyColor.value():e.bodyTextInactiveBuyColor.value():this._active?e.bodyTextActiveSellColor.value():e.bodyTextInactiveSellColor.value()},c.prototype.setBodyTextColor=function(e){ return"limit"===this._mode?this._active?this.setBodyTextActiveLimitColor(e):this.setBodyTextInactiveLimitColor(e):"stop"===this._mode?this._active?this.setBodyTextActiveStopColor(e):this.setBodyTextInactiveStopColor(e):"buy"===this._direction?this._active?this.setBodyTextActiveBuyColor(e):this.setBodyTextInactiveBuyColor(e):this._active?this.setBodyTextActiveSellColor(e):this.setBodyTextInactiveSellColor(e),this},c.prototype.setBodyTextInactiveLimitColor=function(e){return this._line.properties().bodyTextInactiveLimitColor.setValue(e),this},c.prototype.setBodyTextActiveLimitColor=function(e){return this._line.properties().bodyTextActiveLimitColor.setValue(e),this},c.prototype.setBodyTextInactiveStopColor=function(e){return this._line.properties().bodyTextInactiveStopColor.setValue(e),this},c.prototype.setBodyTextActiveStopColor=function(e){return this._line.properties().bodyTextActiveStopColor.setValue(e),this},c.prototype.setBodyTextInactiveBuyColor=function(e){return this._line.properties().bodyTextInactiveBuyColor.setValue(e),this},c.prototype.setBodyTextActiveBuyColor=function(e){return this._line.properties().bodyTextActiveBuyColor.setValue(e),this},c.prototype.setBodyTextInactiveSellColor=function(e){return this._line.properties().bodyTextInactiveSellColor.setValue(e),this},c.prototype.setBodyTextActiveSellColor=function(e){return this._line.properties().bodyTextActiveSellColor.setValue(e),this},c.prototype.getBodyFont=function(){return o.getFontFromProperties(this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic)},c.prototype.setBodyFont=function(e){return o.setFontToProperties(e,this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic),this},c.prototype.getQuantityBorderColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.quantityBorderActiveBuyColor.value():e.quantityBorderInactiveBuyColor.value():this._active?e.quantityBorderActiveSellColor.value():e.quantityBorderInactiveSellColor.value()},c.prototype.setQuantityBorderColor=function(e){return"buy"===this._direction?this._active?this.setQuantityBorderActiveBuyColor(e):this.setQuantityBorderInactiveBuyColor(e):this._active?this.setQuantityBorderActiveSellColor(e):this.setQuantityBorderInactiveSellColor(e),this},c.prototype.setQuantityBorderActiveBuyColor=function(e){return this._line.properties().quantityBorderActiveBuyColor.setValue(e),this},c.prototype.setQuantityBorderInactiveBuyColor=function(e){return this._line.properties().quantityBorderInactiveBuyColor.setValue(e),this},c.prototype.setQuantityBorderActiveSellColor=function(e){return this._line.properties().quantityBorderActiveSellColor.setValue(e),this},c.prototype.setQuantityBorderInactiveSellColor=function(e){return this._line.properties().quantityBorderInactiveSellColor.setValue(e),this},c.prototype.getQuantityBackgroundColor=function(){var e=this._line.properties() ;return"buy"===this._direction?this._active?e.quantityBackgroundActiveBuyColor.value():e.quantityBackgroundInactiveBuyColor.value():this._active?e.quantityBackgroundActiveSellColor.value():e.quantityBackgroundInactiveSellColor.value()},c.prototype.setQuantityBackgroundColor=function(e){return"buy"===this._direction?this._active?this.setQuantityBackgroundActiveBuyColor(e):this.setQuantityBackgroundInactiveBuyColor(e):this._active?this.setQuantityBackgroundActiveSellColor(e):this.setQuantityBackgroundInactiveSellColor(e),this},c.prototype.setQuantityBackgroundActiveBuyColor=function(e){return this._line.properties().quantityBackgroundActiveBuyColor.setValue(e),this},c.prototype.setQuantityBackgroundInactiveBuyColor=function(e){return this._line.properties().quantityBackgroundInactiveBuyColor.setValue(e),this},c.prototype.setQuantityBackgroundActiveSellColor=function(e){return this._line.properties().quantityBackgroundActiveSellColor.setValue(e),this},c.prototype.setQuantityBackgroundInactiveSellColor=function(e){return this._line.properties().quantityBackgroundInactiveSellColor.setValue(e),this},c.prototype.getQuantityTextColor=function(){return o.getColorFromProperties(this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency)},c.prototype.setQuantityTextColor=function(e){return o.setColorToProperties(e,this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency),this},c.prototype.getQuantityFont=function(){return o.getFontFromProperties(this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic)},c.prototype.setQuantityFont=function(e){return o.setFontToProperties(e,this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic),this},c.prototype.getCancelButtonBorderColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.cancelButtonBorderActiveBuyColor.value():e.cancelButtonBorderInactiveBuyColor.value():this._active?e.cancelButtonBorderActiveSellColor.value():e.cancelButtonBorderInactiveSellColor.value()},c.prototype.setCancelButtonBorderColor=function(e){return"buy"===this._direction?this._active?this.setCancelButtonBorderActiveBuyColor(e):this.setCancelButtonBorderInactiveBuyColor(e):this._active?this.setCancelButtonBorderActiveSellColor(e):this.setCancelButtonBorderInactiveSellColor(e),this},c.prototype.setCancelButtonBorderActiveBuyColor=function(e){return this._line.properties().cancelButtonBorderActiveBuyColor.setValue(e),this},c.prototype.setCancelButtonBorderInactiveBuyColor=function(e){return this._line.properties().cancelButtonBorderInactiveBuyColor.setValue(e),this},c.prototype.setCancelButtonBorderActiveSellColor=function(e){return this._line.properties().cancelButtonBorderActiveSellColor.setValue(e),this},c.prototype.setCancelButtonBorderInactiveSellColor=function(e){ return this._line.properties().cancelButtonBorderInactiveSellColor.setValue(e),this},c.prototype.getCancelButtonBackgroundColor=function(){return o.getColorFromProperties(this._line.properties().cancelButtonBackgroundColor,this._line.properties().cancelButtonBackgroundTransparency)},c.prototype.setCancelButtonBackgroundColor=function(e){return o.setColorToProperties(e,this._line.properties().cancelButtonBackgroundColor,this._line.properties().cancelButtonBackgroundTransparency),this},c.prototype.getCancelButtonIconColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.cancelButtonIconActiveBuyColor.value():e.cancelButtonIconInactiveBuyColor.value():this._active?e.cancelButtonIconActiveSellColor.value():e.cancelButtonIconInactiveSellColor.value()},c.prototype.setCancelButtonIconColor=function(e){return"buy"===this._direction?this._active?this.setCancelButtonIconActiveBuyColor(e):this.setCancelButtonIconInactiveBuyColor(e):this._active?this.setCancelButtonIconActiveSellColor(e):this.setCancelButtonIconInactiveSellColor(e),this},c.prototype.setCancelButtonIconActiveBuyColor=function(e){return this._line.properties().cancelButtonIconActiveBuyColor.setValue(e),this},c.prototype.setCancelButtonIconInactiveBuyColor=function(e){return this._line.properties().cancelButtonIconInactiveBuyColor.setValue(e),this},c.prototype.setCancelButtonIconActiveSellColor=function(e){return this._line.properties().cancelButtonIconActiveSellColor.setValue(e),this},c.prototype.setCancelButtonIconInactiveSellColor=function(e){return this._line.properties().cancelButtonIconInactiveSellColor.setValue(e),this},c.prototype.block=function(){this._blocked=!0,this._line.updateAllViewsAndRedraw()},c.prototype.unblock=function(){this._blocked=!1,this._line.updateAllViewsAndRedraw()},c.prototype.isFunction=function(e){return"function"==typeof e},c.prototype.onCancel=function(e,t){return t?this.isFunction(t)&&(this._onCancelData=e,this._onCancelCallback=t):this.isFunction(e)&&(this._onCancelCallback=e),this},c.prototype.callOnCancel=function(){this.isFunction(this._onCancelCallback)&&this._onCancelCallback.call(this,this._onCancelData)},c.prototype.isOnCancelCallbackPresent=function(){return this.isFunction(this._onCancelCallback)},c.prototype.onModify=function(e,t){return t?this.isFunction(t)&&(this._onModifyData=e,this._onModifyCallback=t):this.isFunction(e)&&(this._onModifyCallback=e),this},c.prototype.callOnModify=function(){this.isFunction(this._onModifyCallback)&&this._onModifyCallback.call(this,this._onModifyData)},c.prototype.onMove=function(e,t){return t?this.isFunction(t)&&(this._onMoveData=e,this._onMoveCallback=t):this.isFunction(e)&&(this._onMoveCallback=e),this},c.prototype.callOnMove=function(){this.isFunction(this._onMoveCallback)&&this._onMoveCallback.call(this,this._onMoveData)},c.prototype.onContextMenu=function(e,t){return t?this.isFunction(t)&&(this._onContextMenuData=e,this._onContextMenuCallback=t):this.isFunction(e)&&(this._onContextMenuCallback=e),this}, c.prototype.shouldShowContextMenu=function(){return this.isFunction(this._onContextMenuCallback)},c.prototype.callOnContextMenu=function(){if(this.isFunction(this._onContextMenuCallback))return this._onContextMenuCallback.call(this,this._onContextMenuData)},c.prototype.remove=function(){this._line._model.removeSource(this._line),delete this._line},inherit(h,n),h.prototype.zorder=function(){return l},h.prototype.setPoint=function(e,t,i){this._points[e]=t,this.normalizePoints()},h.prototype.addPoint=function(e,t){return this._points.push(e),this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0},h.prototype.translatedType=function(){return"Order"},h.prototype.name=function(){return"Order"},h.prototype.endMoving=function(e){var t=this._startMovingPoint&&this._currentMovingPoint&&this._startMovingPoint.price!==this._currentMovingPoint.price;n.prototype.endMoving.call(this),!e&&t&&this._adapter.callOnMove()},h.prototype.createPriceAxisView=function(e){var t={pointIndex:e,backgroundPropertyGetter:this._adapter.getLineColor.bind(this._adapter)};return this._priceAxisView=new r(this,t),this._priceAxisView},h.prototype.paneViews=function(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showOrders.value()?s.prototype.paneViews.call(this):null},h.prototype.priceAxisViews=function(t,i){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showOrders.value()?s.prototype.priceAxisViews.call(this,t,i):null},h.prototype.hasContextMenu=function(){return this._adapter.shouldShowContextMenu()},h.prototype.contextMenuItems=function(){return this._adapter.callOnContextMenu()},h.prototype.onlyYMoving=function(){return!0},h.prototype.movable=function(){return Boolean(this._adapter._onMoveCallback)},h.createProperties=function(e){var t=new a("linetoolorder",e,!1,!1);return h._configureProperties(t),t},h._configureProperties=function(e){n._configureProperties(e)},t.LineToolOrder=h}).call(this,i("Kxc7"))},B8p3:function(e,t,i){"use strict";i.r(t),i.d(t,"setHandler",(function(){return a}));var n=i("Eyy1"),r=null,o=-1/0,s="";function a(e){var t={capture:!0,passive:!0};null!==e?(null===r&&(document.addEventListener("keydown",c),document.addEventListener("mousedown",l,t),document.addEventListener("mouseup",l,t),document.addEventListener("mousewheel",l,t),document.addEventListener("wheel",l,t)),r=e):(r=null,document.removeEventListener("keydown",c),document.removeEventListener("mousedown",l,t),document.removeEventListener("mouseup",l,t),document.removeEventListener("mousewheel",l,t),document.removeEventListener("wheel",l,t))}function l(){s="",o=-1/0}function c(e){if(!e.defaultPrevented){var t=e.ctrlKey||e.metaKey||e.altKey;"Shift"!==e.key||t||e.repeat?l():e.timeStamp-o<350&&s===e.code?(e.preventDefault(),l(),Object(n.ensureNotNull)(r)()):(o=e.timeStamp,s=e.code)}}},BBCR:function(e,t){ e.exports=''},BHQF:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetch=function(e,t){return window.fetch(e,t)};(0,i("txPx").getLogger)("Fetch")},BOPY:function(e,t,i){"use strict";var n=i("aO4+").Point,r=i("f6yo").pointInCircle,o=i("VdBB").HitTestResult,s=i("zDbI").CHART_FONT_FAMILY,a=i("cPgM").ScaledPaneRenderer;function l(e,t){this.source=e,this._rendererFactory=t}function c(e,t){a.call(this),this._barWidth=e.barWidth,this._plates=e.plates,this._tooltip=e.tooltip,this._model=t}function u(){this._layout=[],this._currentId=void 0,this.tooltipHovered=!1}l.prototype.update=function(){},l.prototype.renderer=function(e,t){return this._rendererFactory(this.source)},inherit(c,a),c.prototype._drawImpl=function(e){e.save();for(var t=0;t6&&(e.textAlign="center",e.textBaseline="middle",e.font="bold "+t.labelFontSize+"px "+s,e.fillStyle=t.labelFontColor,e.fillText(t.label,t.x,t.y))},c.prototype.hitTest=function(e){for(var t,i=this._plates.length-1;i>=0;--i)if(t=this._hitTestDot(this._plates[i],e))return t;return null},c.prototype._hitTestDot=function(e,t){var i=this._dotTransform(e),s=new n(i.x,i.y);return r(t,s,Math.max(i.radius,8))?new o(o.REGULAR,e):null},u.prototype._createLayout=function(){throw new Error("Child class must override this member")},u.prototype._updatePlate=function(e){throw new Error("Child class must override this member")},u.prototype._getContainer=function(e){return this._container&&this._context===e||(this._context=e,this._container=$(e.canvas).parent()),this._container},u.prototype._plateArrowSize=14,u.prototype.showPlate=function(e,t){if(this._currentId!==e.id||!this._layout||0===this._layout.length||null==this._layout[0].parentNode){this._currentId=e.id,this._createLayout(),this._getContainer(t).append(this._layout);var i=this;this._layout.hover((function(){i.tooltipHovered=!0,$(this).stop(!0).fadeTo(0,1)}),(function(){i.tooltipHovered=!1}))}var n=Math.round(e.barWidth/2);n>15&&(n=15),n<10&&(n=10),this._updatePlate(e);var r=t.canvas.getBoundingClientRect(),o=e.x-this._layout.outerWidth()]+(>|$)/g,"")}function r(e){var t=/([^&=]+)=?([^&]*)/g,i={};if(!e)return i;for(var r=t.exec(e);r;)i[n(r[1])]=n(r[2]),r=t.exec(e);return i}i.d(t,"a",(function(){return a}));var o=["mobileapp","mobileapp_new"];function s(e){if(0===location.search.length)return e;var t=r(window.location.search.substring(1));return o.forEach((function(i){void 0!==t[i]&&(e[i]=t[i])})),e}function a(e,t,i){void 0===e&&(e={}),void 0===t&&(t=""),void 0===i&&(i=!0);var n="/chart/";e.chartId&&(n=""+n+e.chartId+"/",delete e.chartId),i&&(e=s(e));var r=function(e){var t=[];for(var i in e)e.hasOwnProperty(i)&&null!=e[i]&&t.push({key:i,pair:encodeURIComponent(i)+"="+encodeURIComponent(e[i])});return t.sort((function(e,t){return e.key>t.key?1:e.key]+)>)/gi,""):e},TradingView.encodeSpread=function(e){return encodeURIComponent(e)},TradingView.clean=function(e,t,i){var n=[["&","&"],["<","<"],[">",">"],['"',"""],["'","'"],["'","'"]],r=e;if(!e||!e.replace)return r;for(var o=0;o'},Daqx:function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=["Z","Y","X","W","V","U","T","S"],r=["A","B","C","D","E","F","G","H"],o=function(){function e(e){this.label=e}return e.prototype.equals=function(e){return null!==e&&this.label===e.label},e}();function s(e,t){var i="left"===e?n:r;return new o(t=0&&e.setLastBarClosed(!1)}n(e)}}(e,i,o),s)},unsubscribe:function(e){return t._cachedDatafeed.unsubscribe(e)},calculateHistoryDepth:this._externalDatafeed.calculateHistoryDepth?this._externalDatafeed.calculateHistoryDepth.bind(this._externalDatafeed):void 0})};function v(e,t){null!=e.graphicsCmds&&null!=e.graphicsCmds.create&&null!=e.graphicsCmds.create.vertlines&&e.graphicsCmds.create.vertlines.forEach((function(e){e.data.forEach(t)}))}function y(e,t){null!=e.graphicsCmds&&null!=e.graphicsCmds.create&&null!=e.graphicsCmds.create.horizlines&&e.graphicsCmds.create.horizlines.forEach((function(e){e.data.forEach(t)}))}function g(e,t){for(var i=e.length,n=t.length,r=0,o=0;o=n?e[o]=t[n-1].index:e[o]=t[r].index}}m.createDWMAligner=function(e,t){return c.isDWM(e)?l.createAligner(e,t,!0):null},m.prototype._barsCoefficients=function(e,t){if(void 0===o.parseSymbol(e).type)return{};var i=e+t;return this._barsCoefficientsCache[i]||(this._barsCoefficientsCache[i]={}),this._barsCoefficientsCache[i]},m.prototype.destroy=function(){this._cachedDatafeed.destroy(),this._externalDatafeed=null,this._pointsetsManager.pointsetsCreated().unsubscribeAll(this)},m.prototype.purgeCache=function(){this._endOfData={},this._resolveRequests={},this._sessionsLastDataCache={},this._studiesCache={}},m.prototype.purgeDataCache=function(){this._cachedDatafeed.purgeCache()},m.prototype._logMessage=function(e){t.enabled("charting_library_debug_mode")&&console.log(e)},m.prototype._extendRange=function(e,t){this._rangeExtensionData[e]||this.purgeRangeExtensionData(e),void 0===this._rangeExtensionData[e].summary&&(this._rangeExtensionData[e].summary=0),this._rangeExtensionData[e].summary+=t},m.prototype.on=function(e,t){return this._callbacks.hasOwnProperty(e)||(this._callbacks[e]=[]),this._callbacks[e].push(t),this},m.prototype._fireEvent=function(e,t,i){if(this._callbacks.hasOwnProperty(e)){for(var n=this._callbacks[e],r=0;rm[a].value[0];l?m.push({index:f(n),value:[n].concat(r)}):m[a].value=[n].concat(r),p||u([m[m.length-1]],l,m.length,v,i)}(e,t,l)},nonseriesOut:function(e,t){d(t,l)},setNoMoreData:function(){g=!0},recalc:function(e,i){p=!1,m.endOfData=g,t.error&&null!==t.error()||c(m,y>0?v:void 0,l,i)}});if(!b._studiesCache[e]||!b._studiesCache[e][o])throw Error("This should never happen");b._studiesCache[e][o].engine=_}catch(S){if(!S.studyError)throw S;h(S.message) }else h("Unsupported resolution. Did you forget to set has_intraday to true?")},w=function(e){h(e)},P=function(){return b._studiesCache[e]&&b._studiesCache[e][o]&&b._studiesCache[e][o].activeResolve===_};b._studiesCache[e][o].activeResolve=_,this.resolveSymbol(i,(function(){P()&&S.apply(b,arguments)}),(function(){P()&&w.apply(b,arguments)}))},m.prototype._createStudy=function(e,t,i,n,r,o,s){var a=this;function l(i,s,l){i=f(i),TradingView.ChartapiMessagerInstances[n].onDataUpdate(r,o,a._convertBarsTimeToUnix(i),s,l,a._extendedRange(e,t)),TradingView.ChartapiMessagerInstances[n].onStudyCompleted(r,o)}s=function(e){if(Array.isArray(e))return e;for(var t=[],i=a._studiesCache[n][r].metainfo.inputs,o=0;o0?1e3*p[0].value[0]:void 0;if(c.nextTime&&(!_||c.nextTime<_/1e3))u.ensureExtendedTo(o,n,c.nextTime);else if(c.endOfData||0!==p.length){if(0!==p.length){var f=u._barsCoefficients(e,i);f.expectedBarsCount&&f.barsCount&&(f.barsCoefficient=Math.min(Math.max(f.barsCoefficient||1,parseInt(f.expectedBarsCount/(p.length-f.barsCount)+.5)),100)),f.barsCount=p.length;var m=p[p.length-1];h(l,p.length-1,1e3*m.value[0]),u.rebuildExtrapolatedData(n,e.name,i,l,1e3*m.value[0]),a&&TradingView.ChartapiMessagerInstances[n].onSeriesClearData(o,s),TradingView.ChartapiMessagerInstances[n].onTimescaleUpdate(o,s,p,l,0);var v=u._extrapolationManager.storage(n,l.full_name,i);Promise.resolve().then((function(){u._pointsetsManager.broadcastPointsetsUpdates(l.full_name,i,t,v,l,(function(e,t){TradingView.ChartapiMessagerInstances[n].onPointsetDataUpdate(e,s,t,l)}))}))}c.endOfData&&(u._logMessage("Series has no more data on server: {0}".format(l.full_name)),u._setEndOfData(n,o,s)),0===p.length&&TradingView.ChartapiMessagerInstances[n].onSeriesClearData(o,s),TradingView.ChartapiMessagerInstances[n].onSeriesCompleted(o,s,l.data_status)}else u._requestMoreData(o,n,100)}),(function(e,t,r,a,l){var c=u._convertBarsTimeToUnix(e),d=c[c.length-1];if(t){if(u._rangeExtensionData[n]||u.purgeRangeExtensionData(n),void 0===u._rangeExtensionData[n].realtimeBarsCount&&(u._rangeExtensionData[n].realtimeBarsCount=0),u._rangeExtensionData[n].realtimeBarsCount+=1,!u._studiesCache[n][o])throw Error("This should never happen");var p=r-1;u._logMessage("New bar arrived: symbol {0}, bar {1}".format(l.full_name,JSON.stringify(d))),TradingView.ChartapiMessagerInstances[n].onTimescaleUpdate(o,s,[d],l,p),h(l,p,1e3*d.value[0]),u.rebuildExtrapolatedData(n,l.full_name,i,l,1e3*d.value[0])}else u._logMessage("Last bar update: symbol {0}, bar {1}".format(l.full_name,JSON.stringify(d))),TradingView.ChartapiMessagerInstances[n].onDataUpdate(o,s,c,null,l);u._fireEvent("realtime_tick",e[e.length-1],!0)}),(function(e){u._logMessage("Series error: {0}".format(e)),TradingView.ChartapiMessagerInstances[n].onSeriesError(o,e), t.enabled("clear_bars_on_series_error")&&TradingView.ChartapiMessagerInstances[n].onSeriesClearData(o,s)}),(function(e,t){if("projection"!==e.type)throw new Error("unexpected non-series data type for series "+e.type);var r=e.projectionTime/1e3,a=-1;(e.data||[]).forEach((function(e){a=Math.max(a,e[0]||0)})),a=Math.min(a,100);var l=e.barsetSize;if(r&&a>=0&&l&&e.lastBar){for(var c=[],d=0;d<=a;d++)c.push(r+.001*d);var p=e.lastBar.slice(0);p[0]=p[0]/1e3,TradingView.ChartapiMessagerInstances[n].onTimescaleUpdate(o,s,[{index:l-1,value:p}],t,l-1,c);var _=l+a,f=1e3*Math.trunc(c[a]);h(t,_,f),u.rebuildExtrapolatedData(n,t.full_name,i,t,f)}u._updateProjectionData(n,o,s,e)}))},m.prototype.onMoreTickmarksRequested=function(e,t,i,n,r){this._extrapolationManager.storage(e,i.full_name,n).onTickmarksNeeded(i,r)},m.prototype.removePointset=function(e){this._pointsetsManager.removePointset(e)},m.prototype.rebuildExtrapolatedData=function(e,t,i,n,r){this._extrapolationManager.storage(e,n.full_name,i).rebuild(r,n)},m.prototype.createPointset=function(e,t,i,n,r,o){var s=this._extrapolationManager.storage(e,n.full_name,r);this._pointsetsManager.createPointset(t,i,o,s,n,e)},m.prototype.studiesMetadata=function(){return 0===this._metainfoCache.length&&(this._metainfoCache=JSServer.studyLibrary.map((function(e){return e.metainfo})),this._metainfoCache.push({palettes:{},inputs:[],plots:[{id:"open",type:"line"},{id:"high",type:"line"},{id:"low",type:"line"},{id:"close",type:"line"},{id:"volume",type:"line"}],graphics:{},_metainfoVersion:48,description:"Unnamed Study",format:{type:"inherit"},is_hidden_study:!0,is_price_study:!1,shortDescription:"Unnamed Study",description_localized:"Unnamed Study",id:"BarSetHeikenAshi@tv-prostudies",shortId:"BarSetHeikenAshi",packageId:"tv-basicstudies",version:"13",fullId:"BarSetHeikenAshi@tv-basicstudies-13",productId:"tv-basicstudies",name:"BarSetHeikenAshi@tv-basicstudies"})),this._metainfoCache},m.prototype.searchSymbols=function(e,t,i,n){this._logMessage("Symbol search requested: search string `{0}`, exchange: `{1}`, type `{2}`".format(e,t,i));var r=this;this._externalDatafeed.searchSymbols(e,t,i,(function(e){r._logMessage("Symbol search response: {0}".format(JSON.stringify(e))),n(e)}))},m.prototype.resolveSymbol=function(e,t,i){o.isSymbolEncoded(e)||console.error("Expect to get symbol encoded string, but got the following instead: "+e);var n=o.parseSymbol(e),r={currency:n.currencyCode};this._resolveSymbolByName(n.symbol,r,t,i)},m.prototype._resolveSymbolByName=function(e,t,i,n){var r,o=t&&t.currency,s=e+(o?"_#_"+o:"");this._resolveRequests[s]?r=this._resolveRequests[s]:(r=this._resolveSymbolInternal(e,o||void 0),this._resolveRequests[s]=r),r.then(i).catch(n)},m.prototype._resolveSymbolInternal=function(e,i){var n=this;return new Promise(function(r,o){this._logMessage("Symbol resolve requested: `{0}` ".format(e));var s=!0;this._externalDatafeed.resolveSymbol(e,(function(i){ s&&console.warn("`resolveSymbol` should return result asynchronously. Use `setTimeout` with 0 interval to execute the callback function."),n._logMessage("Symbol resolved: `{0}`, SymbolInfo in server response {1}".format(e,JSON.stringify(i))),function(e){if(e.base_name||(e.base_name=[e.name]),e.legs||(e.legs=[e.name]),e.exchange||(e.exchange=e["exchange-listed"]),e.full_name||(e.full_name=e.symbol||(e.exchange?e.exchange+":"+e.name:e.name)),e.pro_name||(e.pro_name=e.full_name),e.data_status||(e.data_status="streaming"),e.ticker||(e.ticker=e.symbol||e.name),!e.session&&e["session-regular"]&&(e.session=e["session-regular"]),!e.minmov&&e.minmovement&&(e.minmov=e.minmovement),e.supported_resolutions)for(var t=0;th)){var d=0,p=a.valueAt(h)[TradingView.TIME_PLOT];if(pM?c.PlotRowSearchMode.NearestLeft:c.PlotRowSearchMode.Exact,O=this._study.nearestIndex(I,L);if(void 0!==O){var k=b[C];if(void 0===k&&(k=this._study.getMinFirstBarIndexForPlot(C),Number.isFinite(k)&&(b[C]=k)),!(k>O)){var A=this._study.data().last(),E=this._study.data().valueAt(O)||(null!==A?A.value:null);if(null!==E){var V=E[T+1];if(Object(r.isNumber)(V)){P.value=g.format(V);var D=this._study.properties().styles[C].color.value();y=h[T];Object(d.isOhlcPlot)(y)&&(C=y.target||C,D=this._study.properties().ohlcPlots[C].color.value());var B=D;if(p[C]&&E.length>p[C].index+1){var R=E[p[C].index+1],N=p[C].palette;if(null!=R&&void 0!==N){var F=p[C].paletterProps,j=N.valToIndex?N.valToIndex[R]:R;B=F.colors[void 0!==j?j:R].color.value()}}B=Object(a.resetTransparency)(B),P.color=B}}}}}}return t},e.prototype._hideValues=function(){return p&&(null===this._model.crossHairSource().pane||Object(u.isLineToolName)(h.tool.value())||null!==this._model.lineBeingEdited())},e}()},Ecpn:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n={PivotPointsStandard:!0};function r(e){return e in n}},EqoR:function(e,t,i){"use strict";var n=i("5rJj"),r=i("aDyP").LineToolPitchfork,o=window.t("Inside Pitchfork");function s(e,t){var i=t||s.createProperties();r.call(this,e,i)}inherit(s,r),s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Inside Pitchfork"},s.createProperties=function(e){var t=new n("linetoolinsidepitchfork",e,!1,{range:[0,8]});return s._configureProperties(t),t},s._configureProperties=function(e){r._configureProperties(e)},t.LineToolInsidePitchfork=s},Ery9:function(e,t,i){"use strict";i.r(t),i.d(t,"setCustomAdapter",(function(){ return m})),i.d(t,"initialize",(function(){return v})),i.d(t,"updateUser",(function(){return y})),i.d(t,"getChartsCount",(function(){return g})),i.d(t,"getCharts",(function(){return b})),i.d(t,"removeChart",(function(){return S})),i.d(t,"saveChart",(function(){return w})),i.d(t,"getChartContent",(function(){return P})),i.d(t,"loadChart",(function(){return C})),i.d(t,"removeStudyTemplate",(function(){return x})),i.d(t,"getStudyTemplateContent",(function(){return T})),i.d(t,"saveStudyTemplate",(function(){return I})),i.d(t,"getStudyTemplatesList",(function(){return M})),i.d(t,"invalidateStudyTemplatesList",(function(){return L})),i.d(t,"getStudyTemplateContentById",(function(){return O})),i.d(t,"getStandardStudyTemplateContentById",(function(){return k})),i.d(t,"removeStudyTemplateById",(function(){return A})),i.d(t,"renameStudyTemplate",(function(){return E})),i.d(t,"replaceStudyTemplate",(function(){return V})),i.d(t,"getDrawingTemplates",(function(){return D})),i.d(t,"loadDrawingTemplate",(function(){return B})),i.d(t,"removeDrawingTemplate",(function(){return R})),i.d(t,"saveDrawingTemplate",(function(){return N}));var n,r,o,s,a=i("mrSG"),l=i("FQhm"),c=i("ogJP"),u=i("txPx"),h=i("Cf1E"),d=Object(u.getLogger)("Chart.SaveloadAdapter.Library"),p=null,_=null;function f(e){return o+"/"+encodeURIComponent(s)+"/"+e+"?client="+encodeURIComponent(n)+"&user="+encodeURIComponent(r)}function m(e){p=e}function v(e,t,i,a){n=e,r=t,o=i,s=a}function y(e){r=e}function g(e,t){throw new Error("Not implemented")}function b(e,t){void 0===t&&(t=function(){});var i=function(t){e(t.map((function(e){return{id:e.id,name:e.name,image_url:String(e.id),modified_iso:e.timestamp,short_symbol:e.symbol,interval:e.resolution}})))};if(!p)return $.ajax({url:"{0}/{1}/charts?client={2}&user={3}".format(o,encodeURIComponent(s),encodeURIComponent(n),encodeURIComponent(r)),type:"GET",crossDomain:!0}).done((function(e){var n=Object(c.parseJSONorNot)(e);if("ok"!==n.status)return d.logWarn("Charts list request failed: "+n.message),void t();i(n.data)})).fail(t);p.getAllCharts().then(i).catch(t)}function S(e,t){p?p.removeChart(e).then(t):$.ajax({url:"{0}/{1}/charts?client={2}&user={3}&chart={4}".format(o,encodeURIComponent(s),encodeURIComponent(n),encodeURIComponent(r),encodeURIComponent(e)),type:"DELETE",crossDomain:!0}).done((function(e){var i=Object(c.parseJSONorNot)(e);"ok"!==i.status&&d.logWarn("Chart delete request failed: "+i.message),t()}))}function w(e,t,i,l,u,h,_){var f=u.id.value(),m={name:e,content:JSON.stringify(l),symbol:t,resolution:i};if(p)p.saveChart(Object(a.__assign)(Object(a.__assign)({},m),{id:f})).then(h).catch(_);else{var v="{0}/{1}/charts?client={2}&user={3}".format(o,encodeURIComponent(s),encodeURIComponent(n),encodeURIComponent(r));null!=f&&(v+="&chart="+encodeURIComponent(f)),$.ajax({url:v,data:m,type:"POST",crossDomain:!0}).done((function(e){var t=Object(c.parseJSONorNot)(e);if("ok"!==t.status)return d.logWarn("Chart save request failed: "+t.message),void _();h(t.id)})).fail((function(){_()}))}}function P(e,t,i){var a=function(t){ var i=JSON.parse(t);return i.uid=e.id,i};p?p.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(o,encodeURIComponent(s),encodeURIComponent(n),encodeURIComponent(r),encodeURIComponent(e.id)),type:"GET",crossDomain:!0}).done((function(e){var i=Object(c.parseJSONorNot)(e);if("ok"===i.status){var n=a(i.data.content);t(n)}else d.logWarn("Chart load request failed: "+i.message)})).fail((function(){i&&i()}))}function C(e){P(e,(function(e){l.emit("chart_load_requested",e)}),(function(){d.logWarn("Error loading chart")}))}function x(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t,i,n;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),p?[2,p.removeStudyTemplate({name:e})]:[4,fetch(f("study_templates")+"&template="+encodeURIComponent(e),{method:"DELETE",credentials:"same-origin"})];case 1:if(!(t=r.sent()).ok)throw new Error("Remove study template response was not OK. Status: "+t.status+".");return[4,t.json()];case 2:if("ok"!==(i=r.sent()).status)throw new Error("Remove study template request failed: "+i.message);return[3,4];case 3:throw n=r.sent(),d.logWarn(Object(h.a)(n)),n;case 4:return[2]}}))}))}function T(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t,i,n;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,5,,6]),p?[4,p.getStudyTemplateContent({name:e})]:[3,2];case 1:return[2,{content:r.sent()}];case 2:return[4,fetch(f("study_templates")+"&template="+encodeURIComponent(e),{credentials:"same-origin"})];case 3:if(!(t=r.sent()).ok)throw new Error("Get study template response was not OK. Status: "+t.status+".");return[4,t.json()];case 4:if("ok"!==(i=r.sent()).status)throw new Error("Get study template request failed: "+i.message);return[2,i.data];case 5:throw n=r.sent(),d.logWarn(Object(h.a)(n)),n;case 6:return[2]}}))}))}function I(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t,i,n,r;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),p?[2,p.saveStudyTemplate(e).then((function(){return{error:""}})).catch((function(e){return{error:null!=e?Object(h.a)(e):"error"}}))]:((t=new FormData).append("name",e.name),t.append("content",e.content),[4,fetch(f("study_templates"),{method:"POST",body:t,credentials:"same-origin"})]);case 1:if(!(i=o.sent()).ok)throw new Error("Save study template response was not OK. Status: "+i.status+".");return[4,i.json()];case 2:return[2,{error:"ok"===(n=o.sent()).status?"":n.status}];case 3:throw r=o.sent(),d.logWarn(Object(h.a)(r)),r;case 4:return[2]}}))}))}function M(){return Object(a.__awaiter)(this,void 0,void 0,(function(){var e,t,i,n;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),_?[2,_]:(_=[],e=function(e){return _=e.map((function(e){return{is_default:!1,name:e.name}}))},p?[2,p.getAllStudyTemplates().then(e)]:[4,fetch(f("study_templates"),{method:"GET",credentials:"same-origin" })]);case 1:if(!(t=r.sent()).ok)throw new Error("Study templates list response was not OK. Status: "+t.status+".");return[4,t.json()];case 2:if("ok"!==(i=r.sent()).status)throw new Error("Study templates list request failed: "+i.message);return[2,e(i.data)];case 3:throw n=r.sent(),d.logWarn(Object(h.a)(n)),n;case 4:return[2]}}))}))}function L(){_=null}function O(e,t){throw new Error("Not implemented")}function k(e,t){throw new Error("Not implemented")}function A(e,t){throw new Error("Not implemented")}function E(e,t,i){throw new Error("Not implemented")}function V(e,t,i){throw new Error("Not implemented")}function D(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t,i,n;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:throw new Error("Not implemented");case 1:return r.trys.push([1,4,,5]),p?[2,p.getDrawingTemplates(e)]:[4,fetch(f("drawing_templates")+"&tool="+encodeURIComponent(e),{credentials:"same-origin"})];case 2:if(!(t=r.sent()).ok)throw new Error("Get drawing templates response was not OK. Status: "+t.status+".");return[4,t.json()];case 3:if("ok"!==(i=r.sent()).status)throw new Error("Drawing templates request failed: "+i.message);return[2,i.data];case 4:throw n=r.sent(),d.logWarn(Object(h.a)(n)),n;case 5:return[2]}}))}))}function B(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var i,n,r;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:throw new Error("Not implemented");case 1:return o.trys.push([1,4,,5]),p?[2,p.loadDrawingTemplate(e,t).then((function(e){return JSON.parse(e)}))]:[4,fetch(f("drawing_templates")+"&tool="+encodeURIComponent(e)+"&name="+encodeURIComponent(t),{credentials:"same-origin"})];case 2:if(!(i=o.sent()).ok)throw new Error("Load drawing template response was not OK. Status: "+i.status+".");return[4,i.json()];case 3:if("ok"!==(n=o.sent()).status)throw new Error("Drawing template request failed: "+n.message);return[2,JSON.parse(n.data.content)];case 4:throw r=o.sent(),d.logWarn(Object(h.a)(r)),r;case 5:return[2]}}))}))}function R(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var i,n,r;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:throw new Error("Not implemented");case 1:return o.trys.push([1,4,,5]),p?[2,p.removeDrawingTemplate(e,t)]:[4,fetch(f("drawing_templates")+"&tool="+encodeURIComponent(e)+"&name="+encodeURIComponent(t),{method:"DELETE",credentials:"same-origin"})];case 2:if(!(i=o.sent()).ok)throw new Error("Remove drawing template response was not OK. Status: "+i.status+".");return[4,i.json()];case 3:if("ok"!==(n=o.sent()).status)throw new Error("Remove drawing template request failed: "+n.message);return[3,5];case 4:throw r=o.sent(),d.logWarn(Object(h.a)(r)),r;case 5:return[2]}}))}))}function N(e,t,i){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r,o,s;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:throw new Error("Not implemented");case 1:return a.trys.push([1,4,,5]), p?[2,p.saveDrawingTemplate(e,t,i)]:((n=new FormData).append("content",i),[4,fetch(f("drawing_templates")+"&tool="+encodeURIComponent(e)+"&name="+encodeURIComponent(t),{method:"POST",body:n,credentials:"same-origin"})]);case 2:if(!(r=a.sent()).ok)throw new Error("Save drawing template response was not OK. Status: "+r.status+".");return[4,r.json()];case 3:if("ok"!==(o=a.sent()).status)throw new Error("Save drawing template request failed: "+o.message);return[3,5];case 4:throw s=a.sent(),d.logWarn(Object(h.a)(s)),s;case 5:return[2]}}))}))}},EsvI:function(e,t,i){"use strict";i.r(t);i("bSeV");var n=i("eJTA"),r=i("wZIs"),o=i("Vdly"),s=i("BHQF"),a=i("txPx"),l=Object(a.getLogger)("Themes.Provider"),c=null;function u(e){return Object(s.fetch)("/theme/?themeName="+encodeURIComponent(e),{credentials:"include",method:"GET"}).then((function(e){return e.json()})).then((function(e){var t={};return e.content&&(t.content=JSON.parse(e.content)),t}))}var h,d=i("zM7N"),p=i("oiZD"),_=i("YFKU"),f=i("IMMp"),m=i("HGP3"),v=((h={})[d.a.Light]={name:d.a.Light,label:function(){return Object(_.t)("Light",{context:"colorThemeName"})},order:2,getThemedColor:function(e){return Object(m.getHexColorByName)(e)}},h[d.a.Dark]={name:d.a.Dark,label:function(){return Object(_.t)("Dark",{context:"colorThemeName"})},order:1,getThemedColor:function(e){var t=f[e]||e;return Object(m.getHexColorByName)(t)}},h);function y(e){return!e.isPrivate}function g(){return v[p.watchedTheme.value()]||v.light}function b(e){return g().getThemedColor(e)}function S(e,t,i,n,o,s,a){void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===a&&(a=!1);var l=t?Promise.resolve(L(e)):x(e);return l.then((function(l){if(void 0!==l.content){var c=!t;a&&(void 0!==(u=l.content).chartProperties&&Object(r.applyDefaultsOverrides)(u.chartProperties),void 0!==u.mainSourceProperties&&Object(r.applyDefaultsOverrides)(u.mainSourceProperties,void 0,!0,"mainSeriesProperties")),n.applyTheme(l.content,c,i,e,t,o,s)}var u})),l}i.d(t,"isPublicTheme",(function(){return y})),i.d(t,"getCurrentTheme",(function(){return g})),i.d(t,"getThemedColor",(function(){return b})),i.d(t,"loadTheme",(function(){return S})),i.d(t,"restoreTheme",(function(){return w})),i.d(t,"savedThemeName",(function(){return P})),i.d(t,"syncTheme",(function(){return C})),i.d(t,"getTheme",(function(){return x})),i.d(t,"getThemeNames",(function(){return T})),i.d(t,"getStdThemeNames",(function(){return I})),i.d(t,"isStdThemeName",(function(){return M})),i.d(t,"getStdTheme",(function(){return L})),i.d(t,"getStdThemedValue",(function(){return O})),i.d(t,"isStdThemedDefaultValue",(function(){return k})),i.d(t,"saveTheme",(function(){return A})),i.d(t,"removeTheme",(function(){return E})),i.d(t,"isThemeExist",(function(){return V})),i.d(t,"translateStdThemeName",(function(){return D})),i.d(t,"isStdTheme",(function(){return B})),i.d(t,"extractThemeFromModel",(function(){return R})),i.d(t,"DEFAULT_THEME",(function(){return"light"})),i.d(t,"themes",(function(){return v}));function w(){Object(p.setTheme)(Object(o.getValue)("current_theme.name")||"light")} function P(){return Object(o.getValue)("current_theme.name")||null}function C(){Object(o.setValue)("current_theme.name",g().name,{forceFlush:!0})}function x(e){return u(e)}function T(){return c||Object(s.fetch)("/themes/",{credentials:"include",method:"GET"}).then((function(e){return c=e.json()}))}function I(){return d.c()}function M(e){return I().includes(e)}function L(e){return d.b(e)||{content:void 0}}function O(e,t){var i=t||g().name,n=d.b(i),r=0!==e.length&&e.split(".");return n&&n.content&&r?r.reduce((function(e,t){return e[t]}),n.content):null}function k(e,t,i){var r=O(e,i);return null!==r&&Object(n.areEqualRgba)(Object(n.parseRgba)(r),Object(n.parseRgba)(String(t)))}function A(e,t){return function(e,t){var i=new FormData;return i.append("content",JSON.stringify(t)),i.append("name",e),c=null,Object(s.fetch)("/save-theme/",{credentials:"include",method:"POST",body:i}).then((function(e){return e.json()}),(function(e){return l.logError(e)}))}(e,t)}function E(e){return function(e){var t=new FormData;return t.append("name",e),c=null,Object(s.fetch)("/remove-theme/",{credentials:"include",method:"POST",body:t}).then((function(e){return e.json()}),(function(e){return l.logError(e)}))}(e)}function V(e){return function(e){return u(e).then((function(e){return Boolean(e.content)}))}(e)}function D(e){return d.e(e)}function B(e){return d.d(e)}function R(e){return{content:{chartProperties:{paneProperties:e.model().properties().paneProperties.state(),scalesProperties:e.model().properties().scalesProperties.state()},sessions:e.model().sessions().properties().state(),mainSourceProperties:e.model().mainSeries().properties().state()}}}},EyEd:function(e,t,i){"use strict";var n=i("lCO3").Version,r=i("txPx").getLogger("Chart.StudyMigration");function o(e){this._studyId=e,this._maxToVers=n.ZERO,this._maxFromVers=n.ZERO,this._migrs=[]}o.prototype.addMigration=function(e,t,i){var r=n.parse(e),o=n.parse(t);r.isGreater(this._maxFromVers)&&(this._maxFromVers=r),o.isGreater(this._maxToVers)&&(this._maxToVers=o),this._migrs.push({fromVers:r,toVers:o,rules:i})},o.prototype.updateInputs=function(e,t,i){if(!i)return i;for(var n=TradingView.clone(i),o=e;o.isLess(t);){var s=this._findMigration(o);if(null==s)break;if(r.logNormal("Migrating study inputs from "+s.fromVers+" to "+s.toVers+" version, studyId: "+this._studyId+", migration: "+JSON.stringify(s)+", inputs: "+JSON.stringify(i)),n=this._applyMigration(n,s),!o.isLess(s.toVers))throw new Error("Problems in study migration process... Possible infinite cycle has been detected and stopped.");o=s.toVers}return o>e&&r.logNormal("Study inputs migration is done, studyId: "+this._studyId+", inputs: "+JSON.stringify(n)),n},o.prototype._findMigration=function(e){for(var t=-1,i=this._maxFromVers,n=0;n=0||t.indexOf(e)>=0},o._applyInputChangedMinMaxRule=function(e,t){if("adjustValIfNeeded"!==t.action)throw new Error("Unknown action "+t.action+" for rule with type "+t.type);var i=e[t.inputId];return it.maxVal&&(e[t.inputId]=t.maxVal),r.logNormal("Input "+t.inputId+"="+i+" adjusted to value "+e[t.inputId]),e},o._applyInputChangedOptionsRule=function(e,t){if(!(["text"].indexOf(t.inputType)>=0&&"resetToDefValIfNeeded"===t.action))throw new Error("Unexpected rule.inputType="+t.inputType+" in rule.action="+t.action);var i=e[t.inputId];return t.options.indexOf(i)<0&&(e[t.inputId]=t.defVal,r.logNormal("Input "+t.inputId+"="+i+" reset to default value "+t.defVal)),e},e.exports=o},Eyy1:function(e,t,i){"use strict";function n(e){if(void 0===e)throw new Error("Value is undefined");return e}function r(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=r,t.ensure=function(e){return r(n(e))},t.ensureNever=function(e){}},F58L:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyTemplates",(function(){return p}));var n=i("zUrt"),r=i("JWMC"),o=i("aIyQ"),s=i.n(o),a=i("hY0g"),l=i.n(a),c=i("oNDq"),u=i("txPx"),h=Object(u.getLogger)("Platform.StudyTemplates"),d={confirmDelete:window.t("Do you really want to delete Study Template '{0}' ?")},p=function(){function e(e){var t=this;this._chartWidgetCollection=e.chartWidgetCollection,this._favoriteStudyTemplatesService=e.favoriteStudyTemplatesService, window.loginStateChange.subscribe(null,n.backend.invalidateStudyTemplatesList),this._list=new l.a([]),this._onChange=new s.a,this._list.subscribe((function(){return t._onChange.fire()}))}return e.prototype.findRecordByName=function(e){return this._list.value().find((function(t){return t.name===e}))||null},e.prototype.showSaveAsDialog=function(){var e=this,t=this._chartWidgetCollection.activeChartWidget.value().model();Promise.all([i.e("react"),i.e(1),i.e(3),i.e(6),i.e(7),i.e(8),i.e(10),i.e(13),i.e(16),i.e(22),i.e(41),i.e(46),i.e(81),i.e(0),i.e(5),i.e(11),i.e("study-template-dialog")]).then(i.bind(null,"IDfV")).then((function(i){new i.StudyTemplateSaver({controller:t,onSave:function(t){e._list.setValue(t)}}).show()}))},e.prototype.applyTemplate=function(e){var t=this,i=this.findRecordByName(e);null!==i?window.runOrSignIn((function(){var e=t._chartWidgetCollection.activeChartWidget.value(),o=function(t){Object(r.trackEvent)("GUI","Load Study Template"),e.model().applyStudyTemplate(JSON.parse(t.content),i.name)};void 0!==i.id?i.is_default?n.backend.getStandardStudyTemplateContentById(i.id,o):n.backend.getStudyTemplateContentById(i.id,o):n.backend.getStudyTemplateContent(i.name).then(o)}),{source:"Study templates apply"}):h.logNormal("Template "+name+" not found in cache")},e.prototype.deleteStudyTemplate=function(e){var t=this.findRecordByName(e);null!==t?this._removeTemplate(t):h.logNormal("Template "+e+" not found in cache")},e.prototype.list=function(){return this._list.value()},e.prototype.getOnChange=function(){return this._onChange},e.prototype.refreshStudyTemplateList=function(e){var t=this;n.backend.getStudyTemplatesList().then((function(i){t._list.setValue(i),void 0!==e&&e()}))},e.prototype.invalidate=function(){n.backend.invalidateStudyTemplatesList()},e.prototype._removeTemplate=function(e){var t=this;window.runOrSignIn((function(){Object(c.createConfirmDialog)({type:"modal",content:document.createTextNode(d.confirmDelete.format(e.name))}).then((function(i){i.on("action:yes",(function(i){var r=function(){t.refreshStudyTemplateList((function(){var n=t.list();t._list.setValue(n.filter((function(t){return t!==e}))),t._favoriteStudyTemplatesService&&t._favoriteStudyTemplatesService.remove(e.name),i.actionLoader("yes","stop"),i.close()}))};i.actionLoader("yes","start"),n.backend.invalidateStudyTemplatesList(),void 0!==e.id?n.backend.removeStudyTemplateById(e.id,r):n.backend.removeStudyTemplate(e.name).then(r)})),i.open()}))}),{source:"Study templates delete"})},e}()},FBsw:function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayPriceAxisView",(function(){return s}));var n=i("mrSG"),r=i("KcY8"),o=i("oXaB"),s=function(e){function t(t){var i=e.call(this)||this;return i._source=t,i}return Object(n.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var n=this._source.lastValueData("close",!1);if(!n.noData){var r=this._source.model(),s=this._source.priceScale();if(null!==s&&r.isPriceScaleVisible(s)){i.background=n.color,i.color=this.generateTextColor(n.color),i.coordinate=n.coordinate, i.floatCoordinate=n.floatCoordinate;var a=this._source.model().properties().scalesProperties;a.showSeriesLastValue.value()&&(e.text=this._text(n),e.visible=!0),t.text="",(a.showSymbolLabels.value()||a.seriesLastValueMode.value()===o.PriceAxisLastValueMode.LastPriceAndPercentageValue)&&(t.text=this._paneText(n),t.visible=t.text.length>0)}}},t.prototype._paneText=function(e){var t="",i=this._source.model().properties().scalesProperties;i.showSymbolLabels.value()&&(t+=this._source.symbol()+" ");var n=this._source.priceScale();return null!==n&&i.showSeriesLastValue.value()&&i.seriesLastValueMode.value()===o.PriceAxisLastValueMode.LastPriceAndPercentageValue&&(t+=n.isPercentage()?e.formattedPriceAbsolute:e.formattedPricePercentage),t.trim()},t.prototype._text=function(e){var t=this._source.model().properties().scalesProperties,i=this._source.priceScale();return t.seriesLastValueMode.value()!==o.PriceAxisLastValueMode.LastPriceAndPercentageValue||null===i?e.text:i.isPercentage()?e.formattedPricePercentage:e.formattedPriceAbsolute},t}(r.a)},FBuY:function(e,t,i){"use strict";i.r(t),i.d(t,"TVXWindowEvents",(function(){return n}));i("HbRj");var n,r=i("txPx"),o=i("VVxS"),s=Object(r.getLogger)("XWindowEvents");!function(e){var t,i="tvxwevents.",n={};window.BroadcastChannel?((t=new BroadcastChannel("tvxwevents")).addEventListener("message",(function(e){var t=e.data,i=t.event,r=t.value;n[i]&&n[i].forEach((function(e){e(r)}))})),function(){for(var e=[],t=performance.now(),n=0;n0&&(a+=o(c+11)/2),a+=o(c)/2}e.restore()},e.prototype.hitTest=function(e){for(var t=0,i=this._drawRects;t=r.left&&e.x<=r.left+r.width&&e.y>=r.top&&e.y<=r.top+r.height)return new n.HitTestResult(n.HitTestResult.REGULAR)}return null},e}()},Fixu:function(e,t,i){ "use strict";i.d(t,"c",(function(){return r})),i.d(t,"d",(function(){return o})),i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return a}));i("Eyy1"),i("dfhE");function n(e,t){0}function r(e){n()}function o(e){n()}function s(e){n()}function a(e){0}},FsE7:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=i("ytGH").LineToolWidthsProperty,s=window.t("Fib Time Zone");function a(e,t){var r=t||a.createProperties();n.call(this,e,r),this.version=a.version,i.e("lt-pane-views").then(function(e){var t=i("wgWl").FibTimeZonePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);for(var s=[],l=1;l<=a.LevelsCount;l++)s.push(this._properties.child("level"+l).child("linewidth"));this._widthsProperty=new o(s)}inherit(a,n),a.version=2,a.LevelsCount=11,a.prototype.levelsCount=function(){return a.LevelsCount},a.prototype.migrateVersion=function(e,t,i){if(1===e){i.properties.level1.color.setValue(i.properties.baselinecolor.value());for(var n=2;n<=11;n++)i.properties["level"+n].color.setValue(i.properties.linecolor.value());for(n=1;n<=11;n++)i.properties["level"+n].linewidth.setValue(i.properties.linewidth.value()),i.properties["level"+n].linestyle.setValue(i.properties.linestyle.value())}},a.prototype.pointsCount=function(){return 2},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Fib Time Zone"},a.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("SMr9").FibTimezoneDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new r("linetoolfibtimezone",e,!1,{range:[1,11]});return a._configureProperties(t),t},a._configureProperties=function(e){n._configureProperties(e)},t.LineToolFibTimeZone=a},G3Rl:function(e,t,i){"use strict";function n(e,t){var i=new Map;return function(){for(var n=[],r=0;r-1,I=T&&navigator.userAgent.toLowerCase().indexOf("windows")>-1,M=navigator.userAgent.toLowerCase().indexOf("chrome")>-1&&-1===navigator.userAgent.toLowerCase().indexOf("edge"),L=window.urlParams||{};window.initData;function O(e,t,i){var n=(0,p.createDisconnectedBoundCanvas)(document,new p.Size(t,i));return(0,p.getPrescaledContext2D)(n.canvas).drawImage(e,0,0,t,i),n}function k(e){return!g||e>500}L.no_referral_id&&enable(L.referral_id||"","aggressive");var A=function(){function e(t){var i=t.layout,n=void 0===i?"site_branding":i,r=t.symbol,o=void 0===r?"":r,s=t.model,l=t.onReadyCallback;f(this,e),this._model=s,this._image=null,this._imageReady=!1,this._needDisplayImage=!1,this._imageWidth=22,this._imageHeight=13,this._layout=n,this._symbol=o,this.showAnimatedBranding=a.enabled("show_animated_logo")||"widget_branding"===this._layout,this.show=!0,this.width=100,this.height=14,this._bottomShift=0,this._brandCircleSize=32,this._animatedWidth=this._brandCircleSize,this._animatedOpacity=0,this.width=this.showAnimatedBranding?this._brandCircleSize:100,this.height=14,this._fillColor=c.color.brandNew,this._colorOldBlue=c.color.brandNew2,this._colorOldGray=c.color.black30, this._strokeColor=c.color.black255,this._brandCircleShadowColor=c.color.black0,this._strokeWidth=4,this._fontSize=this.showAnimatedBranding?11:14,this._font="px "+y,this._txt="TradingView",this._onReadyCallback=l,this._upscaleRatio=M?1:2,this._verticalTextShift=T?this.showAnimatedBranding?2:4:0,this._strokeCanv=null,this._fillCanv=null,this._init()}return r(e,[{key:"_init",value:function(){this._checkLayout(),this.show&&(this._updateStrokeColor(),this.showAnimatedBranding?(this._loadImage(v,"tvLogo"),this._createFillText()):this._loadImage(v,"tvLogo"),this._model.properties().paneProperties.background.subscribe(this,this._updateStrokeColor),this._model.onChartThemeLoaded().subscribe(this,this._updateStrokeColor))}},{key:"_updateStrokeColor",value:function(){var e=(0,u.getLuminance)(this._model.properties().paneProperties.background.value());this._strokeCanv=null,this._fillCanv=null,e>.2?(this._brandCircleColor=c.color.black255,this._animatedColorBg=c.color.black255,this._brandCircleShadowOpacity=.09,this._strokeOpacity=.8):(this._brandCircleColor=c.color.black27,this._animatedColorBg=c.color.black27,this._brandCircleShadowOpacity=.09,this._strokeOpacity=.1)}},{key:"_loadImage",value:function(e,t){var i=this;if(this._needDisplayImage){this._image={canvas:new Image},this.showAnimatedBranding&&(this._imageWhite={canvas:new Image});var n=e.replace(/fill="#[\da-f]{6}"/i,'fill="#FFFFFF"');this._image.canvas.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e),this.showAnimatedBranding&&(this._imageWhite.canvas.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(n)),this._image.canvas.addEventListener("load",(function(){I&&(i._image=O(i._image.canvas,i._imageWidth,i._imageHeight)),i._imageReady=!0,"function"==typeof i._onReadyCallback&&i._onReadyCallback()}))}}},{key:"_checkLayout",value:function(){switch(this._layout){case"widget_branding":case"widget_referral_branding":case"widget_custom_branding":case"fundamental_branding":case"fundamental_custom_branding":case"library_custom_branding":case"library_branding":case"site_branding":this.show=!0;break;case"widget_custom_no_powered_branding":case"fundamental_custom_no_powered_branding":case"library_custom_no_powered_branding":this.show=!1}switch(this._layout){case"library_branding":this._needDisplayImage=!0,this._txt=window.t(w);break;case"library_custom_branding":this._txt=window.t(x)}}},{key:"_drawTextStroke",value:function(e){if(!this._strokeCanv){this._strokeCanv=(0,p.createDisconnectedBoundCanvas)(document,new p.Size(0,0));var t=(0,p.getPretransformedContext2D)(this._strokeCanv),i=Math.round(this._strokeWidth*this._upscaleRatio);t.font=this._fontSize*this._upscaleRatio+this._font,this._textWidth=t.measureText(this._txt).width+2;var n=this._textWidth+2*i,r=(this._fontSize+2*i)*this._upscaleRatio;n%2==0&&(n+=1,r+=1),this._strokeCanv.resizeCanvas({width:n,height:r}),(t=(0,p.getPretransformedContext2D)(this._strokeCanv)).textBaseline="top",t.textAlign="start",t.font=this._fontSize*this._upscaleRatio+this._font,t.strokeStyle=this._strokeColor, t.lineWidth=this._strokeWidth*this._upscaleRatio,t.lineJoin="round",t.strokeText(this._txt,i,this._verticalTextShift)}e.save(),e.globalAlpha=this._strokeOpacity,e.drawImage(this._strokeCanv.canvas,0,0,this._strokeCanv.canvas.width,this._strokeCanv.canvas.height,0,0,this._strokeCanv.canvas.width/this._upscaleRatio/this._strokeCanv.pixelRatio,this._strokeCanv.canvas.height/this._upscaleRatio/this._strokeCanv.pixelRatio),e.restore()}},{key:"_drawTextFill",value:function(e){this._createFillText(),e.save(),e.drawImage(this._fillCanv.canvas,0,0,this._fillCanv.canvas.width,this._fillCanv.canvas.height,0,0,this._fillCanv.canvas.width/this._upscaleRatio/this._fillCanv.pixelRatio,this._fillCanv.canvas.height/this._upscaleRatio/this._fillCanv.pixelRatio),e.restore()}},{key:"_createFillText",value:function(){if(null===this._fillCanv){this._fillCanv=(0,p.createDisconnectedBoundCanvas)(document,new p.Size(0,0));var e=(0,p.getPretransformedContext2D)(this._fillCanv),t=Math.round(this._strokeWidth*this._upscaleRatio);e.font=this._fontSize*this._upscaleRatio+this._font,void 0===this._textWidth&&(this._textWidth=Math.round(e.measureText(this._txt).width)+2),this._setSizeFillTextCanvas(t),(e=(0,p.getPretransformedContext2D)(this._fillCanv)).textBaseline="top",e.textAlign="start",e.font=this._fontSize*this._upscaleRatio+this._font,e.fillStyle=this._fillColor,e.fillText(this._txt,t,this._verticalTextShift)}}},{key:"_updateFillTextWithColor",value:function(e){var t=Math.round(this._strokeWidth*this._upscaleRatio);this._setSizeFillTextCanvas(t);var i=(0,p.getPretransformedContext2D)(this._fillCanv);i.clearRect(0,0,this._fillCanv.canvas.width,this._fillCanv.canvas.height),i.textBaseline="top",i.textAlign="start",i.font=this._fontSize*this._upscaleRatio+this._font,i.fillStyle=e,i.fillText(this._txt,t,this._verticalTextShift)}},{key:"_setSizeFillTextCanvas",value:function(e){var t=this._textWidth+2*e,i=(this._fontSize+2*e)*this._upscaleRatio;t%2==0&&(t+=1,i+=1),this._fillCanv.resizeCanvas({width:t,height:i})}},{key:"_drawFillTextCropWidth",value:function(e,t,i){this._fillCanv?this._updateFillTextWithColor(i):this._createFillText(),e.save(),e.drawImage(this._fillCanv.canvas,0,0,t*this._upscaleRatio*this._fillCanv.pixelRatio,this._fillCanv.canvas.height,0,0,t,this._fillCanv.canvas.height/this._upscaleRatio/this._fillCanv.pixelRatio),e.restore()}},{key:"_drawBgCircle",value:function(e){e.save(),e.beginPath(),e.fillStyle=this._brandCircleShadowColor,e.globalAlpha=this._brandCircleShadowOpacity,e.arc(this._imageWidth/2,this._imageHeight/2,this._brandCircleSize/2+1,0,2*Math.PI),e.fill(),e.closePath(),e.restore(),e.save(),e.beginPath(),e.fillStyle=this._brandCircleColor,e.arc(this._imageWidth/2,this._imageHeight/2,this._brandCircleSize/2,0,2*Math.PI,!1),e.fill(),e.closePath(),e.restore()}},{key:"_drawFillRectWithRoundedCorner",value:function(e,t,i,n,r,o,s){e.save(),(0,d.drawRoundRect)(e,t-1,i-1,n+2,r+2,o),e.globalAlpha=this._brandCircleShadowOpacity,e.fillStyle=this._brandCircleShadowColor,e.fill(),e.closePath(),e.restore(),e.save(),(0, d.drawRoundRect)(e,t,i,n,r,o),e.fillStyle=s,e.fill(),e.closePath(),e.restore()}},{key:"_drawImageWithColor",value:function(e){e.save(),e.globalAlpha=this._animatedOpacity,e.drawImage(this._imageWhite.canvas,0,-.5,this._imageWidth,this._imageHeight),e.restore(),e.save(),e.globalAlpha=1-this._animatedOpacity,e.drawImage(this._image.canvas,0,-.5,this._imageWidth,this._imageHeight),e.restore()}},{key:"destroy",value:function(){this._model.properties().paneProperties.background.unsubscribeAll(this),this._model.onChartThemeLoaded().unsubscribeAll(this)}},{key:"bottomShift",value:function(){return this._bottomShift}},{key:"hasAnimation",value:function(){return this.showAnimatedBranding}},{key:"minimizedAnimationWidth",value:function(){return this._brandCircleSize}},{key:"maximizedAnimationWidth",value:function(){return this._createFillText(),this._fillCanv.canvas.width/this._upscaleRatio/this._fillCanv.pixelRatio+this._brandCircleSize-3}},{key:"animatedDrawStep",value:function(e,t){this._animatedWidth=t;var i=this._animatedWidtho&&(e.translate(this._imageWidth/2+r,.5),this._drawFillTextCropWidth(e,this._animatedWidth-o,this._animatedColorText)),e.restore(),this.width=this._animatedWidth,this.height=this._brandCircleSize,this._bottomShift=this._brandCircleSize-this._imageHeight}}else if("widget_custom_branding"===this._layout||"fundamental_custom_branding"===this._layout){var s="12px "+y;e.font=s;var a=e.measureText(this._txt).width+2;this.width=a+e.measureText("TradingView").width+2,e.save(),e.globalAlpha=.7,e.fillStyle=this._colorOldGray,e.fillText(this._txt,0,12),e.fillStyle=this._colorOldBlue,e.fillText("TradingView",a,12),e.restore()}else if(function(e){return!b||e>480}(t))if(this._needDisplayImage&&this._imageReady){e.save();var l=(this._brandCircleSize-this._imageWidth)/2;e.translate(l,0),this._drawBgCircle(e),e.drawImage(this._image,0,-.5,this._imageWidth,this._imageHeight);var c=12+(M?-.5:0);e.translate(this._imageWidth+c,-.5);var u=k(t);u&&(this._drawTextStroke(e), this._drawTextFill(e)),e.restore(),this.width=this._imageWidth+l,this.width+=u?c+this._strokeCanv.canvas.width/this._upscaleRatio/this._strokeCanv.pixelRatio:l,this.height=this._brandCircleSize,this._bottomShift=this._brandCircleSize-this._imageHeight}else{e.save(),e.translate(M?-.5:0,-.5);var h=k(t);h&&(this._drawTextStroke(e),this._drawTextFill(e)),e.restore(),h&&(this.width=this._strokeCanv.canvas.width/this._upscaleRatio/this._strokeCanv.pixelRatio)}}}]),e}(),E=function(){function e(t){var i=t.layout,n=void 0===i?"site_branding":i,r=t.src,o=t.onReadyCallback;f(this,e),this._img=new Image,this._ready=!1,this.show=!1,this.width=0,this.height=0,this._layout=n,this._src=r,this._onReadyCallback=o,this._init()}return r(e,[{key:"_init",value:function(){var e=this;this._checkLayout(),this.show&&(this._img.src=this._src,this._img.addEventListener("load",(function(){e.width=Math.round(e._img.width),e.height=Math.round(e._img.height),I&&(e._img=O(e._img,e.width,e.height).canvas),e._ready=!0,"function"==typeof e._onReadyCallback&&e._onReadyCallback()})))}},{key:"_checkLayout",value:function(){switch(this._layout){case"widget_custom_branding":case"widget_custom_no_powered_branding":case"fundamental_custom_branding":case"fundamental_custom_no_powered_branding":case"library_custom_branding":case"library_custom_no_powered_branding":this.show=!0;break;case"site_branding":case"widget_branding":case"widget_referral_branding":case"fundamental_branding":case"library_branding":this.show=!1}}},{key:"draw",value:function(e){this._ready&&e.drawImage(this._img,0,0,this.width,this.height)}}]),e}();t.Branding=function(){function e(t,i,n){var r=this;f(this,e),this._model=t,this._mainSeries=this._model.mainSeries(),this._canvasWidth=0,this._showAllowance=i,this._showForPro=n,this._paneHeight=0,this._left=13,this._bottom=16,this._layout="site_branding",this._needToShow=!0,this._customLogoSrc="",this._customLogoLink="",this._checkLayout(),"widget_custom_branding"!==this._layout&&"fundamental_custom_branding"!==this._layout||(this._left=8,this._bottom=5);var o=function(){r._needToShow?r._showBranding=!0:r._showBranding=!1};this._resizeHandlerDelayed=m(o,200),o(),window.addEventListener("resize",this._resizeHandlerDelayed),this._monitorCanvas=(0,p.createDisconnectedBoundCanvas)(document,new p.Size(0,0)),this._monitorCanvas.subscribeCanvasConfigured((function(){r._init()})),this._model.isSnapshot()?this._init():(this._mainSeries.dataEvents().symbolResolved().subscribe(this,this._init),null!==this._mainSeries.symbolInfo()&&this._init()),this._cubicBezier=new c.CubicBezier(.4,.01,.22,1)}return r(e,[{key:"destroy",value:function(){window.removeEventListener("resize",this._resizeHandlerDelayed),this._mainSeries.dataEvents().symbolResolved().unsubscribeAll(this),this._powBy&&this._powBy.destroy()}},{key:"_init",value:function(){var e=this,t=this._mainSeries.symbolInfo()||{};this._powBy&&this._powBy.destroy(),this._powBy=new A({layout:this._layout,symbol:t.name,model:this._model,onReadyCallback:function(){return e._model.fullUpdate()}}), this._custom=new E({layout:this._layout,src:this._customLogoSrc,onReadyCallback:function(){return e._model.fullUpdate()}}),this._openAnimation=null,this._closeAnimation=null}},{key:"_checkLayout",value:function(){if(a.enabled("widget"));else if(a.enabled("charting_library")||a.enabled("amp_terminal")||a.enabled("cqg_terminal")||a.enabled("trading_terminal")){var e=JSON.parse(L.logo)||{};e.image?(this._customLogoSrc=e.image,this._customLogoLink=e.link,this._needToShow=a.enabled("widget_logo"),a.enabled("link_to_tradingview")?this._layout="library_custom_branding":this._layout="library_custom_no_powered_branding"):(this._layout="library_branding",this._needToShow=a.enabled("widget_logo"))}else this._layout="site_branding"}},{key:"_startOpenAnimation",value:function(){null===this._openAnimation&&(null!==this._closeAnimation&&(this._closeAnimation.stop(),this._closeAnimation=null),this._openAnimation=(0,h.doAnimate)({from:this._currentStateForAnimation(),to:this._openedStateForAnimation(),duration:200,easing:this._cubicBezier.easingFunc,onStep:this._animatedDrawStep.bind(this)}))}},{key:"_openLink",value:function(){return"site_branding"!==this._layout&&(window.open(this.tvUrl(),"_blank").opener=null,!0)}},{key:"_toggleOpenAnimatedOrOpenLink",value:function(){null!==this._openAnimation&&this._openAnimation.completed()?this._openLink()||this._startCloseAnimation():this._startOpenAnimation()}},{key:"_startCloseAnimation",value:function(){null===this._closeAnimation&&(null!==this._openAnimation&&(this._openAnimation.stop(),this._openAnimation=null),this._closeAnimation=(0,h.doAnimate)({from:this._currentStateForAnimation(),to:this._closedStateForAnimation(),duration:200,easing:this._cubicBezier.easingFunc,onStep:this._animatedDrawStep.bind(this)}))}},{key:"onClickOutside",value:function(){this._hasAnimation()&&this._startCloseAnimation()}},{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:"priceScale",value:function(){return null}},{key:"priceAxisViews",value:function(){return[]}},{key:"hasContextMenu",value:function(){return!1}},{key:"hitTest",value:function(e){var t=this;return!this._showBranding||a.enabled("logo_without_link")?null:this._powBy&&"widget_custom_no_powered_branding"!==this._layout&&"fundamental_custom_no_powered_branding"!==this._layout&&(0,s.pointInBox)(e,(0,o.box)(new o.Point(this._left,this._paneHeight-Math.max(this._powBy.height,void 0!==this._custom?this._custom.height:0)-this._bottom),new o.Point(this._left+Math.max(this._powBy.width,void 0!==this._custom?this._custom.width:0),this._paneHeight-this._bottom)))?new l.HitTestResult(l.HitTestResult.CUSTOM,{ clickHandler:function(){t._openLink()},tapHandler:function(){t._hasAnimation()?t._toggleOpenAnimatedOrOpenLink():t._openLink()},mouseEnterHandler:function(){t._hasAnimation()&&t._startOpenAnimation()},mouseLeaveHandler:function(){t._hasAnimation()&&t._startCloseAnimation()}}):null}},{key:"tvUrl",value:function(){var e="https://www.tradingview.com/";if(this._customLogoLink)return this._customLogoLink;if("library_branding"===this._layout||"library_custom_branding"===this._layout){var t=void 0;switch(!0){case a.enabled("charting_library"):t="library";break;case a.enabled("trading_terminal"):case a.enabled("amp_terminal"):case a.enabled("cqg_terminal"):t="trading-terminal"}return e+="/"===e[e.length-1]?"?":"&",e+="utm_source="+window.location.origin+"&utm_medium=library"+(t?"&utm_campaign="+t:"")}return e}},{key:"draw",value:function(e,t){var i=this;if(this._showBranding){var n=0;L.utm=!0,(0,p.drawScaled)(e,t.pixelRatio,(function(){e.translate(-.5,-.5),i._powBy&&i._powBy.show&&(n=i._powBy.height-i._powBy.bottomShift(),e.save(),e.translate(i._left,i._paneHeight-i._bottom-n),i._powBy.draw(e,t,i._canvasWidth),e.restore()),i._custom&&i._custom.show&&(e.save(),e.translate(i._left,i._paneHeight-i._bottom-n-i._custom.height),i._custom.draw(e,t),e.restore())}))}}},{key:"renderer",value:function(e,t){return this._paneHeight=e,this._canvasWidth=t,{draw:this.draw.bind(this),hitTest:this.hitTest.bind(this)}}},{key:"paneViews",value:function(e){if(TradingView.printing)return[];if(!this._showAllowance())return[];if("site_branding"===this._layout&&!this._showForPro&&window.user&&window.user.is_pro)return[];var t=a.enabled("move_logo_to_main_pane");return t&&e.isMainPane()||!t&&e.isLast()||e.isMaximized()?[{renderer:this.renderer.bind(this)}]:[]}},{key:"labelPaneViews",value:function(e){return[]}}]),e}()},GUQs:function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"c",(function(){return o})),i.d(t,"b",(function(){return s}));var n=i("qFKp");function r(e){e.cancelable&&e.preventDefault()}function o(e){return function(t){r(t),e()}}function s(e){n.isChrome&&e.addEventListener("mousedown",(function(e){if(1===e.button)return e.preventDefault(),!1}))}},GVHu:function(e,t,i){"use strict";(function(e,n,r){ var o=i("Eyy1"),s=o.assert,a=o.ensureNotNull,l=i("hsV8").unpackNonSeriesData,c=i("38az").StudyBarColorer,u=i("bGI9").StudyTrackPricePaneView,h=i("AXy7"),d=h.BandPaneView,p=h.BandBackgroundPaneView,_=h.HlineFillPaneView,f=i("hezA").StudyPriceAxisView,m=i("KtbP").PanePriceAxisView,v=i("I9zs"),y=v.StudyPaneView,g=v.StudyBackgroundPaneView,b=v.StudyPlotShapesPaneView,S=v.StudyPlotCharsPaneView,w=v.StudyPlotArrowsPaneView,P=v.StudyPlotBarsPaneView,C=v.StudyPlotCandlesPaneView,x=i("x40+"),T=x.PlotFillPaneView,I=x.AreaBackgroundPaneView,M=i("it7y").StudyDataWindowView,L=i("8qoI").StudyLegendView,O=i("2kV1").StudyStatusView,k=i("jenN"),A=k.emptyStudyGraphics,E=k.loadStudyGraphics,V=k.saveStudyGraphics,D=k.LiveStudyGraphics,B=k.createGraphicsPaneViews,R=k.createGraphicsPriceAxisViews,N=i("XzZr").ChartApiInterface,F=i("Ocx9").DefaultProperty,j=i("kcTO").PriceFormatter,W=i("nEwK").VolumeFormatter,H=i("zXvd").NumericFormatter,z=i("GH0z").PercentageFormatter,U=i("k9/m"),G=U.PlotList,Y=U.PlotRowSearchMode,q=U.mergeMinMax,K=i("972a").MarkLocation,Z=i("0YCj"),J=(i("cBZt").extractStudyId,i("TcSq").extractPineId,i("FQhm")),X=i("23IT"),Q=X.LineStudyPlotStyle,$=i("hayr").propertyPages,ee=i("TmNs").StudyPriceLineAxisView,te=i("w4Ji").studyPlotFunctionMap,ie=i("w4Ji").studyEmptyPlotValuePredicate,ne=i("jy4L").makeNextStudyId,re=i("Kxc7"),oe=i("IcDj").StudyBase,se=i("txPx").getLogger("Chart.Study"),ae=(Number(window.TELEMETRY_SERVER_TIME_DIFF_THRESHOLD),re.enabled("datasource_copypaste")),le=window.t("loading...");function ce(e,t,i){var n=new F(t,i,!0);n.addExclusion("visible"),n.addExclusion("precision"),n.addExclusion("minTick");for(var r=0;rg+1){var x=m[g+1];if(null!=x){var T=b.valToIndex?b.valToIndex[x]:x;y.color=v.colors[T].color.value()}else y.color=C}else y.color=C;return y.floatCoordinate=this.priceScale().priceToCoordinate(w,P),y.coordinate=y.floatCoordinate,y.item=m,y},he.prototype.isFailed=function(){return this._failed},he.prototype.isLoading=function(){return this._loading},he.prototype.series=function(){return this._series},he.prototype.model=function(){return this._model},he.prototype.currency=function(){var e=this.metaInfo();return Boolean(e)&&e.is_price_study?this.parentSource().currency():null},he.prototype._invalidateLastNonEmptyPlotRowCache=function(){this._lastNonEmptyPlotRowCache={}},he.prototype.clearData=function(){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.clear(),this._graphics.clear&&this._graphics.clear(),this._plotOffsets={}},he.prototype.onTagsChanged=function(){return this._tagsChanged},he.prototype.properties=function(){return this._properties},he.prototype.state=function(e,t){var i={type:TradingView.className(this.constructor),id:this.id(),state:this.properties().state(),zorder:this.zorder()};this.metaInfo()instanceof Z?i.metaInfo=TradingView.clone(this.metaInfo().state()):(i.metaInfo=TradingView.clone(this.metaInfo()),i.metaInfo.id=Z.parseIdString(i.metaInfo.id+(i.metaInfo.version?"-"+i.metaInfo.version:"")).fullId),e&&(i.data=this.data().state(),i.data.symbols=this._resolvedSymbols,i.data.graphics=V(this.graphics()),i.data.plotOffsets=this._plotOffsets),this.ownerSource()&&(i.ownerSource=this.ownerSource().id());for(var n=0;n=0?s:0}}return this._isChildStudy&&Z.patchChildStudyMetaInfoState(i),i},he.prototype._plotsForAlert=function(){var e=this,t=this._metaInfo,i=[X.isLinePlot,X.isShapesPlot,X.isCharsPlot,X.isArrowsPlot,X.isOhlcPlot,X.isAlertConditionPlot];return t.plots.map((function(e,t){return e.pinePlotIndex=t,e})).filter((function(e){return i.some((function(t){return t(e)}))})).map((function(i){var 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||"",n.text=t.styles[i.id].text||""), i.target&&t.ohlcPlots&&t.ohlcPlots[i.target]&&(n.ohlcTitle=t.ohlcPlots[i.target].title),n}))},he.prototype._collectDepsForAlert=function(){throw new Error("Not implemented")},he.prototype.idForAlert=function(){return oe.prototype.idForAlert.call(this)},he.prototype.dependenciesForAlerts=function(){throw new Error("Not implemented")},he.prototype._hasAvailableAlertPlots=function(){return!1},he.prototype._hasAlertablePlots=function(){return(this.metaInfo().plots||[]).some((function(e){return"line"===e.type}))},he.prototype._hasAlertConditions=function(){if(this.metaInfo().plots.some(X.isAlertConditionPlot))return!0;var e=this.stateForAlert();return!(!e.alerts||!e.alerts.conditions)},he.prototype._isAlertFeatureEnabled=function(){return!1},he.prototype.hasStateForAlert=function(){return this._isAlertFeatureEnabled()&&(this.metaInfo().isTVScript?this._hasAlertConditions()||this._hasAvailableAlertPlots()&&!this.isFailed():this._hasAlertablePlots()&&!this.isFailed())},he.prototype.stateForAlert=function(){throw new Error("Not implemented")},he.prototype.isSavedInStudyTemplates=function(){for(var e=0;e0)return!0;for(var e in this._metaInfo.graphics)for(var t in this._metaInfo.graphics[e]){var i=this.properties().graphics[e][t];if(!i.visible||i.visible.value())return!0}return!!this._metaInfo.isTVScriptStrategy},he.prototype.start=function(e,t){var i=this._model.mainSeries();if(i.isStarted()){this._isChildStudy&&this._source.isHibernated()&&this._source.start();var n=!this._isChildStudy&&!this.hasChildren()&&!this.isVisible();!this._chartApi||!this._chartApi.connected()||n&&!0!==t||this._allSymbolsAreResolved().then(function(){this._startAfterSymbolsResolved(e,t)}.bind(this)).catch(function(e){se.logError("ERROR: "+this._debugId()+" start failed, "+e),delete this._restarting}.bind(this))}else i.dataEvents().completed().subscribe(this,(function(){this.start(e,t)}),!0)},he.prototype._getStudyIdWithLatestVersion=function(){var e=Z.cutDollarHash(this._metaInfo.id),t=e;return e.indexOf("@tv-scripting")>=0?t+="-101!":t+="-"+this._metaInfo.version,t},he.prototype._startAfterSymbolsResolved=function(e,t){if(!this.isStarted()||this._restarting){if(this._isChildStudy){if(!this._source.isStarted()||this._source.isRestarting())return void this._source.onStart.subscribe(this,this._startAfterSymbolsResolved,!0);Z.setChildStudyMetaInfoPropertiesSourceId(this._metaInfo,this._source.sourceId(),this._properties)}if(this._studyId=ne(),delete this._restarting,this._allInputsAreValid()){this._inputs=this.inputs({keepOptionalSymbolsEmpty:!0});var i=this._getStudyIdWithLatestVersion();if(this._incrementTurnaround(),this._chartApi.createStudy(this._studyId,this._turnaround,this._isChildStudy?this._source.sourceId():this._series._seriesId,i,this._inputs,this._handler,this._isChildStudy),this._studyName=i,this._subscribeExtendedHours(),this.onStart.fire(),!0===e&&this._children)for(var n=0;n=e){var i=a(this._series.bars().lastIndex())-e;t=a(this._series.bars().valueAt(i))[TradingView.TIME_PLOT]}return t}, he.prototype._titleInputs=function(e,t){return this.inputs({symbolsForDisplay:!0,skipHiddenInputs:!0,skipFakeInputs:!1,fakeInputsForDisplay:!0,asObject:!1,skippedGroups:[],noExchanges:e,noResolution:t})},he.prototype.inputsForAlert=function(){var e=this.offset(),t=this.inputs();return e&&t.push(e),t},he.prototype.inputs=function(e){var t={symbolsForDisplay:!1,symbolsForChartApi:!0,skipHiddenInputs:!1,skipFakeInputs:!1,skipBooleanInputs:re.enabled("dont_show_boolean_study_arguments"),asObject:!0,skippedGroups:[],skippedInputs:[],noExchanges:!1,noResolution:!1,keepOptionalSymbolsEmpty:!1};return TradingView.merge(t,e),this._buildInputs(t)},he.prototype.inputsForAlertState=function(){return this.inputs()},he.prototype._buildInputs=function(e){s(!!e,"options not set");var t={};try{t=this._prepareInputs(e)}catch(n){se.logWarn("Failed to prepare study inputs: "+n)}if(e.asObject){var i={};return Object.keys(t).forEach((function(e){null!=t[e]&&(i[e]=t[e])})),i}i=[];return Object.keys(t).forEach((function(e){null!=t[e]&&i.push(t[e])})),i},he.prototype._prepareInputs=function(e){s(!!e,"options not set");for(var t={},i=0;i=0?a:s}return s}return this._metaInfo.isTVScript||this._metaInfo.pine?"text"===i?this._metaInfo.defaults.inputs.text:"pineId"===i?this._metaInfo.scriptIdPart:"pineVersion"===i?this._metaInfo.pine?this._metaInfo.pine.version:"-1":this._properties.inputs[i].value():this._properties.inputs[i].value()},he.prototype._rebindToSource=function(e,t){var i=this.parentSource();if(this._isChildStudy){var n;this._source.unsetChild(this),delete this._nonPriceParent;var r=null;if(e===this._model.mainSeries())this._source.currencyChanged().unsubscribeAll(this),delete this._source,delete this._isChildStudy,delete this._ownerSource,n=this._series._seriesId,r=N.REBIND_STUDY_CHILD_TO_STANDALONE, this._series.currencyChanged().subscribe(this,this._onSourceCurrencyChanged);else{if(!(e instanceof he))return se.logError("Unable to rebind study to source of this type"),!1;this._ownerSource=e,this._source.currencyChanged().unsubscribeAll(this),this._source=e,this._source.currencyChanged().subscribe(this,this._onSourceCurrencyChanged),n=this._source.sourceId(),this._source.setChild(this),this._source.isHibernated()&&this._source.start()}this._incrementTurnaround(),this._chartApi.rebindStudy(this._studyId,this._turnaround,n,this._studyName,t,this._handler,r)}else{if(!(e instanceof he))return se.logError("Unable to rebind study to source of this type"),!1;var o=e.isHibernated();o&&e.start();var s=!1;if(this._canCreateStudyWithRebindType(N.REBIND_STUDY_STANDALONE_TO_CHILD)&&(this._incrementTurnaround(),s=this._chartApi.rebindStudy(this._studyId,this._turnaround,e.sourceId(),this._studyName,t,this._handler,N.REBIND_STUDY_STANDALONE_TO_CHILD)),!s)return o&&e.stop(),!1;this._isChildStudy=!0,this._ownerSource=e,this._source=e,this._source.setChild(this),this._childStudyByRebind.fire(),this._series.currencyChanged().unsubscribeAll(this),this._source.currencyChanged().subscribe(this,this._onSourceCurrencyChanged)}var a=this.m_priceScale,l=e.priceScale();if(a!==l){var c=this._model.paneForSource(this),u=this._model.paneForSource(e);c===u&&u.move(this,l,!0)}return i.formatterChanged().unsubscribe(this,this._onSourceFormatterChanged),this.parentSource().formatterChanged().subscribe(this,this._onSourceFormatterChanged),i.priceStepChanged().unsubscribe(this,this._onSourcePriceStepChanged),this.parentSource().priceStepChanged().subscribe(this,this._onSourcePriceStepChanged),i.currencyChanged().unsubscribeAll(this),this._recreatePriceFormattingDependencies(),!0},he.prototype.childStudyByRebind=function(){return this._childStudyByRebind},he.prototype._changeInputsImpl=function(e,t){var i=this.source(),n=this._properties.inputs&&this._properties.inputs.state(),r=Z.getSourceIdByInputs(this._metaInfo.inputs,n),o=!0;if(r)if("high"===r||"open"===r||"low"===r||"close"===r||"hl2"===r||"ohl3"===r||"ohlc4"===r)i=this._model.mainSeries();else for(var s=this._model.dataSources(),a=0;a0?" ("+t+")":"")},he.prototype._titleInParts=function(e,t,i,n){var r="";r=e?this._metaInfo.shortDescription||this._properties.shortDescription&&this._properties.shortDescription.value()||"Study":this._metaInfo.description||this._properties.description&&this._properties.description.value()||"Study",t=t||{};var o=[window.t(r)],s=[];if(!i){var a=this._getMTFResolutionInputTitle();if(null!==a&&a.length>0&&o.push(a),(s=this._titleInputs(n,!0)||[]).length>0){var l={};if(this._isChildStudy)for(var c=0;c=0&&this._source){var p=this._source.metaInfo(),_=this._source.title(e,null,!0,n);if(1===p.plots.length)l[d]=_;else{var f=d.split("$")[1],m=p.plots[f].id,v=p.styles&&p.styles[m]&&p.styles[m].title||m;l[d]=_+": "+v}}break}}var y=this;s=s.map((function(e){var i=isNumber(e)?y._numericFormatter.format(e):l&&l[e]||e;return t[i]&&(i=t[i]),i}))}}return[o.join(" · "),s]},he.prototype._getMTFResolutionInputTitle=function(){for(var e=0;e0?window.t(t):""},he.prototype._handleStudyError=function(e){delete this._loadingStartTime,this._failed=!0,this._loading=!1,this.clearData();e.params[2];this._setStatus(this._getStatusTextOnStudyError(e.params[2])),this._statusView.update(),this._model.updateSource(this)},he.prototype.onData=function(e){switch(e.method){case"study_loading":this._failed=!1,this._loading=!0,this._setStatus(le),this._statusView.update(),this._model.updateSource(this),this._loadingStartTime=(new Date).getTime();break;case"study_error":this._handleStudyError(e);break;case"study_completed": if(!this._checkTurnaround(e.params[1]))return;this._studyModified&&(this.clearData(),this._studyModified=!1);var t="chartSession:"+this._chartApi._sessionid,i=(new Date).getTime()-this._loadingStartTime;se.logDebug(t+", Study "+this._metaInfo.description+" loading took "+i+" ms"),delete this._loadingStartTime,this._loading=!1,this._setStatus(""),this._statusView.update();var n=this._model.paneForSource(this);this._model.recalculatePane(n),this._updateSources(),this._model.fullUpdate();break;case"study_deleted":break;case"data_update":if(e.params.customId!==this.sourceId()||!this._checkTurnaround(e.params.turnaround))return;s(!!e.params.nonseries,"data.params.nonseries is missing"),this._onDataUpdate(e.params.plots,e.params.nonseries)}},he.prototype._onDataUpdate=function(e,t){this._studyModified&&(this.clearData(),this._studyModified=!1);var i=l(t.d);return this._ongoingDataUpdate=this._ongoingDataUpdate.then((function(){return i}),(function(){return i})).then(this._onDataUnpacked.bind(this,e,t.indexes)),this._ongoingDataUpdate},he.prototype._onDataUnpacked=function(e,t,i){this._isDestroyed||("nochange"!==t&&this._processPlotOffsets(i),this.transformData(e),this._mergeData(e),null!==i&&(i.indexes_replace?(s("nochange"!==t),this._graphics.replaceIndexesTo(t)):("nochange"!==t&&this._graphics.replaceIndexesTo(t),void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),this._onDataUpdated(e,i,t))},he.prototype._onDataUpdated=function(e,t,i){if(this.hasBarColorer()&&e.length>0){var n=this.barColorer().firstColoredBar(e[0].index);this._model.mainSeries().invalidateBarStylesCache(n)}null!==t&&this._postProcessGraphics();var r=this._model.paneForSource(this);this._model.recalculatePane(r),this._updateSources()},he.prototype.transformData=function(e){},he.prototype.moveData=function(e){this._ongoingDataUpdate=this._ongoingDataUpdate.then(function(){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.move(e)}.bind(this))},he.prototype.replaceData=function(e,t,i){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.remove(e+1),this.m_data.addTail(i,t)},he.prototype._updateSources=function(){this._model.updateSource(this),this.hasBarColorer()&&this._model.updateSource(this._model.mainSeries())},he.processPlotOffsets=function(e,t){t&&t.indexes_replace||(e._plotOffsets=t&&t.offsets||{})},he.prototype._processPlotOffsets=function(e){he.processPlotOffsets(this,e)},he.prototype._mergeData=function(e){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.merge(e)},he.prototype._postProcessGraphics=function(){this._graphicsPriceAxisViews=R(this),this._concatPriceAxisViews()},he.prototype._getNonPriceParent=function(){if(this._nonPriceParent)return this._nonPriceParent;for(var e=this.source();e instanceof he;){var t=e.metaInfo();if(!t.is_price_study||"Compare@tv-basicstudies"===t.id)return this._nonPriceParent=e,e;e=e.source()}},he.prototype.firstValue=function(e){if(!this._isChildStudy&&"Compare@tv-basicstudies"===this._metaInfo.id||!this._metaInfo.is_price_study){ var t=this._model.timeScale().visibleBarsStrictRange();if(null===t)return null;var i=t.firstBar(),n=t.lastBar(),r=null,o=this,s=o._metaInfo.plots;return null===r&&this.data().range(i,n).each((function(t,i){for(var n=0;n=0){var m=this.properties().styles[h].histogramBase.value(),v=this.m_data.minMaxOnRangeCached(e,t,[_]);isNumber(m)&&null!==v&&(l=q(l,{min:m,max:m}),l=q(l,v))}else a.push(_)}}}var y=this.m_data.minMaxOnRangeCached(e,t,a);if(y=q(l,y),i){a=[{name:"low",offset:0},{name:"high",offset:0}];var g=this.series().data().bars().minMaxOnRangeCached(e,t,a);y=q(y,g)}if(null!==y&&(o=new r(y.min,y.max)),s.bands)for(c=0;c=0&&(e="_v"+this._metaInfo.pine.version),{symbol:this.series().actualSymbol(),resolution:this.series().interval(),study:this._metaInfo.shortId+e}},he.prototype._sendTelemetryReport=function(e,t,i){void 0===i&&(i=this._getTelemetryAdditionalData());var n=Object.assign(t,{additional:i});telemetry.sendChartReport(e,n)},he.prototype._sendTelemetryCounter=function(e,t){this._sendTelemetryReport(e,{count:1},t)},he.prototype._sendTelemetryTiming=function(e,t,i){this._sendTelemetryReport(e,{value:t},i)},he.prototype.destroy=function(){this._isDestroyed=!0,this._legendView&&this._legendView.destroy(),null!==this._definitionsViewModel&&(this._definitionsViewModel.destroy(),this._definitionsViewModel=null),this.parentSource().formatterChanged().unsubscribe(this,this._onSourceFormatterChanged),this.parentSource().priceStepChanged().unsubscribe(this,this._onSourcePriceStepChanged),this._properties.listeners().unsubscribe(this,this.changeStyles),this._properties.visible.listeners().unsubscribe(this,this.visibleChanged),this._properties.visible.listeners().unsubscribe(this,this.processHibernate);for(var e=0;e= 1");var l=TradingView.clone(defaults("study"));ue(l,t);var c=Z.getStudyPropertyRootName(t),u=TradingView.clone(defaults(c,o));t.isTVScript&&t.TVScriptSourceCode!==u.TVScriptSourceCode&&(u=TradingView.clone(TradingView.factoryDefaults(c,o)));TradingView.merge(l,u),n&&(s(!(n instanceof e),"propsState should not be an instance of Property"),TradingView.merge(l,n));var h=TradingView.clone(t),d={};a.mergeInputsObjPart(d,h.defaults.inputs),a.mergeInputsObjPart(d,l.inputs),l.inputs=d,delete h.inputs,delete h.defaults.inputs;var p={};if(TradingView.merge(p,h.defaults),TradingView.merge(p,TradingView.factoryDefaults(c)),TradingView.merge(p,l),TradingView.merge(p,h),delete p.defaults,l=p,null!==r){var _=r.model().studiesColorRotatorFactory().getColorRotator(t);"Overlay@tv-basicstudies"===t.id?l.lineStyle.color=_.getColor(l.lineStyle.color,t):TradingView.merge(l,function(e,t){for(var i in e.styles){var n=e.styles[i].color;n&&(e.styles[i].color=t.getColor(n))}return e}(l,_))}n&&TradingView.merge(l.styles,n.styles);return l}(t,n,r,o),u=Z.getSourceInputIds(t);if(u.length>0){var h=u[0];l instanceof he?c.inputs[h]="{pid}$0":void 0!==c.inputs[h]&&-1!==c.inputs[h].indexOf("$")&&(c.inputs[h]="close")}return ce(t,a,c)}(t,n,r,o,Z.getStudyPropertyRootName(t),a)},t.prepareStudyPropertiesForLoadChart=function(e,t,n,r,o,s){return function(e,t,n,r,o,s,a){var l=function(e,t,n,r,o){var s=i("K4L1");e.version&&n.version&&e.version!==n.version&&se.logWarn("Serialized metaInfo version "+e.version+" is not equal to the saved state version "+n.version);var a=TradingView.clone(defaults("study"));TradingView.merge(a,TradingView.factoryDefaults(Z.getStudyPropertyRootName(e))),ue(a,e),TradingView.merge(a,n),a=o.updateStudyState(a,e,t);var l=TradingView.clone(t||e);if(l&&Z.versionOf(l)>=1){var c={};s.mergeInputsObjPart(c,(l.defaults||{}).inputs),s.mergeInputsObjPart(c,a.inputs),a.inputs=c,delete l.inputs,l.defaults&&delete l.defaults.inputs;var u={};TradingView.merge(u,l.defaults), TradingView.merge(u,TradingView.factoryDefaults(Z.getStudyPropertyRootName(l))),TradingView.merge(u,a),delete l.defaults,TradingView.merge(u,l),a=u}return a}(e,t,n,0,o);return ce(t||e,s,l)}(e,t,n,0,o,Z.getStudyPropertyRootName(e))}}).call(this,i("tc+8"),i("aIyQ"),i("Qb4w").PriceRange)},GVQo:function(e,t,i){"use strict";i.r(t),i.d(t,"clipboardDataForSources",(function(){return l})),i.d(t,"get",(function(){return c})),i.d(t,"set",(function(){return u}));var n=i("mrSG"),r=i("Eyy1"),o=i("VVxS"),s=i("3ClC"),a=i("CW80");function l(e,t){if(1===t.length&&Object(s.isStudy)(t[0])){var i=t[0];return{title:i.title(),sources:[{source:Object(r.ensureNotNull)(i.state()),type:"study"}]}}var o={sources:[],title:""};return o.sources=t.filter((function(e){return e.copiable()&&Object(a.isLineTool)(e)})).filter(a.isLineTool).map((function(t){var i={type:"drawing",geometry:t.geometry(),source:Object(n.__assign)(Object(n.__assign)({},t.state(!1)),{points:t.normalizedPoints()}),modelId:e};return delete i.source.alertId,i})),0===o.sources.length?null:(o.sources.length&&(1===o.sources.length?o.title=t[0].title&&t[0].title():o.title="Drawings"),o)}function c(){try{return JSON.parse(o.TVLocalStorage.getItem("application-clipboard"))}catch(e){return null}}function u(e){try{o.TVLocalStorage.setItem("application-clipboard",JSON.stringify(e))}catch(t){}}},GhVi:function(e,t,i){"use strict";(function(t){function i(){this._marksByIndex={},this._marksBySpan=[],this.changed=new t}i.prototype.reset=function(){this._marksByIndex={},this._marksBySpan=[],delete this.minIndex,delete this.maxIndex,delete this._cache,this.changed.fire()},i.prototype.minIndex=void 0,i.prototype.maxIndex=void 0,i.prototype.merge=function(e){for(var t=this._marksBySpan,i={},n=0;n=o||(this.maxIndex=o),t[s]||(t[s]=[]),t[s].push(r),i[s]=!0}for(s=t.length;s--;)t[s]&&(t[s].length||delete t[s],i[s]&&t[s].sort(this._sortByIndexAsc));delete this._cache,this.changed.fire()},i.prototype._removeTickmark=function(e){var t=e.index;if(this._marksByIndex[t]===e){delete this._marksByIndex[t],t<=this.minIndex&&this.minIndex++,t>=this.maxIndex&&this.maxIndex--,this.maxIndex2;){if(1e3*this._marksByIndex[t].time===e)return t;if(1e3*this._marksByIndex[i].time===e)return i;var n=Math.round((t+i)/2);1e3*this._marksByIndex[n].time>e?i=n:t=n}return t},i.prototype.build=function(e,t){var i=Math.ceil(t/e);if(this._maxbar===i&&this._cache)return this._cache;this._maxbar=i;for(var n=[],r=this._marksBySpan.length;r--;)if(this._marksBySpan[r]){var o=n;n=[];for(var s=o.length,a=0,l=this._marksBySpan[r],c=l.length,u=1/0,h=-1/0,d=0;d=i&&_-h>=i&&(n.push(p),h=_)}for(;a0&&t.forEach((function(e){e>i&&(i=e)})),i},e.prototype.merge=function(e){var t=this;this._invalidationLevel=Math.max(this._invalidationLevel,e._invalidationLevel),this._paneInvalidationLevel=Math.max(this._paneInvalidationLevel,e._paneInvalidationLevel),e._leftPriceScalesInvalidationMap.forEach((function(e,i){var n=t._leftPriceScalesInvalidationMap.get(i)||a;t._leftPriceScalesInvalidationMap.set(i,Math.max(n,e))})),e._rightPriceScalesInvalidationMap.forEach((function(e,i){var n=t._rightPriceScalesInvalidationMap.get(i)||a;t._rightPriceScalesInvalidationMap.set(i,Math.max(n,e))}))},e}();i.d(t,"InvalidationLevel",(function(){return n})),i.d(t,"defaultInvalidationLevel",(function(){return a})),i.d(t,"InvalidationMask",(function(){return l})),function(e){e[e.None=0]="None",e[e.Cursor=1]="Cursor",e[e.Light=2]="Light",e[e.Full=3]="Full"}(n||(n={}));var a=n.None,l=function(){function e(e){void 0===e&&(e=a),this._panesOrderChanged=!1,this._timeAxisInvalidationLevel=a,this._invalidatedPanes=new Map,this._invalidationLevel=e}return e.prototype.invalidateAll=function(e){var t=this;this._invalidationLevel!==e&&(this._invalidationLevel=Math.max(this._invalidationLevel,e),this._invalidatedPanes.forEach((function(e){e.invalidateAll(t._invalidationLevel)})))},e.prototype.invalidateAllPane=function(e,t){this._invalidatedPanes.has(e)||this._invalidatedPanes.set(e,new s(this._invalidationLevel)),Object(o.ensureDefined)(this._invalidatedPanes.get(e)).invalidateAll(t)},e.prototype.invalidatePriceScale=function(e,t,i,n){this._invalidatedPanes.has(e)||this._invalidatedPanes.set(e,new s(this._invalidationLevel)),Object(o.ensureDefined)(this._invalidatedPanes.get(e)).invalidatePriceScale(t,i,n)},e.prototype.invalidateTimeScale=function(e){this._timeAxisInvalidationLevel=Math.max(this._timeAxisInvalidationLevel,e)},e.prototype.invalidatePanesOrder=function(){this._panesOrderChanged=!0},e.prototype.fullInvalidation=function(){return this._invalidationLevel},e.prototype.maxPaneInvalidation=function(){var e=[];return this._invalidatedPanes.forEach((function(t){e.push(t.fullInvalidation())})),Math.max.apply(Math,Object(r.__spreadArrays)(e,[this._invalidationLevel]))},e.prototype.invalidateForPane=function(e){return this._invalidatedPanes.get(e)||new s(this._invalidationLevel)},e.prototype.invalidateForTimeScale=function(){return Math.max(this._timeAxisInvalidationLevel,this._invalidationLevel)},e.prototype.merge=function(e){var t=this;this._invalidationLevel=Math.max(this._invalidationLevel,e._invalidationLevel),this._panesOrderChanged=this._panesOrderChanged||e._panesOrderChanged,this._invalidatedPanes.forEach((function(e){e.invalidateAll(t._invalidationLevel)})),e._invalidatedPanes.forEach((function(e,i){t._invalidatedPanes.has(i)||t._invalidatedPanes.set(i,new s(t._invalidationLevel)),Object(o.ensureDefined)(t._invalidatedPanes.get(i)).merge(e)})), this._timeAxisInvalidationLevel=Math.max(this._timeAxisInvalidationLevel,e._timeAxisInvalidationLevel)},e.prototype.panesOrderInvalidated=function(){return this._panesOrderChanged},e.cursor=function(){return new e(n.Cursor)},e.light=function(){return new e(n.Light)},e.full=function(){return new e(n.Full)},e.panesOrder=function(){var t=e.full();return t.invalidatePanesOrder(),t},e}()},HGP3:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i("mrSG").__exportStar(i("YTCC"),t)},HGup:function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"c",(function(){return a})),i.d(t,"b",(function(){return l}));var n=i("mrSG"),r=i("Eyy1"),o=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=this,t=Object(r.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),i=this._chartModel.children(t,!0);i.forEach((function(t){return e._chartModel.detachSource(t)})),this._chartModel.detachSource(t);var n=this._chartModel.createPane(this.targetPaneIndex()),o=n.findSuitableScale(t);n.addDataSource(t,o,!1),i.forEach((function(e){return n.addDataSource(e,o,!1)})),this._chartModel.fullUpdate(),this._chartModel.setShouldBeSavedEvenIfHidden(!0)},t.prototype.undo=function(){var e=this,t=Object(r.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),i=this._chartModel.children(t,!0);i.forEach((function(t){return e._chartModel.detachSource(t)}));var n=this._chartModel.detachSource(t);Object(r.assert)(n,"Undo of detaching must remove pane");var o=this._chartModel.panes()[this._initialPaneIndex],s=o.getPriceScaleById(this._initialPriceScaleId);null===s&&(s=o.createPriceScaleAtPosition(this._initialPriceScalePosition,this._initialPriceScaleIndex)),o.addDataSource(t,s,!0),i.forEach((function(e){return o.addDataSource(e,s,!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 Object(n.__extends)(t,e),t.prototype.targetPaneIndex=function(){return this._initialPaneIndex+1},t}(o),a=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return Object(n.__extends)(t,e),t.prototype.targetPaneIndex=function(){return this._initialPaneIndex},t}(o),l=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return Object(n.__extends)(t,e),t.prototype.targetPaneIndex=function(){return this._chartModel.panes().length},t}(o)},HLXm:function(e,t,i){"use strict";function n(e){"LineToolGannComplex"!==e.type||void 0!==e.version&&1!==e.version||(e.type="LineToolGannFixed")}i.r(t),i.d(t,"migrateState",(function(){return n}))},"HV/F":function(e,t,i){"use strict";function n(e){var t={};return{promise:new Promise((function(i,n){e.subscribe(t,i,!0)})),destroy:function(){e.unsubscribeAll(t)}}}i.r(t),i.d(t,"delegateToPromise",(function(){return n}))},HZKX:function(e,t,i){"use strict";i.r(t),i.d(t,"createActionAddAlert",(function(){return we})),i.d(t,"createActionTrade",(function(){return Pe})),i.d(t,"createActionOrder",(function(){return Ce})), i.d(t,"createMTPredictorActions",(function(){return xe})),i.d(t,"createLinesAction",(function(){return Te})),i.d(t,"ActionsProvider",(function(){return Me}));var n=i("mrSG"),r=i("Eyy1"),o=i("txPx"),s=i("ogJP"),a=i("Kxc7"),l=i("7KDR"),c=i("YmeR"),u=i("Daqx"),h=i("3ClC"),d=i("QloM"),p=i("Qq0B"),_=i("z61+"),f=i("/3z9"),m=i("L/Ed"),v=i("cKqi"),y=i("0gbU"),g=i("pvsv"),b=i("GVQo"),S=i("CW80"),w=i("/tGj"),P=Object(o.getLogger)("Chart.ActionsProvider"),C=(window.t("Add Alert"),window.t("Add Alert on {series}"),window.t("Add Alert on {drawing}"),window.t("Edit {0} Alert...")),x=window.t("Extend Alert Lines"),T=window.t("Show alert label lines"),I=window.t("Hide alert label lines"),M=(window.t("Trade"),window.t("Create Limit Order..."),window.t("Show")),L=window.t("Hide"),O=(window.t("MTPredictor"),window.t("Apply Manual Risk/Reward"),window.t("Apply Manual Decision Point"),window.t("Analyze Trade Setup"),window.t("Apply Elliott Wave"),window.t("Apply Elliott Wave Intermediate"),window.t("Apply Elliott Wave Major"),window.t("Apply Elliott Wave Minor"),window.t("Apply WPT Up Wave"),window.t("Up Wave 1 or A"),window.t("Up Wave 2 or B"),window.t("Up Wave C"),window.t("Up Wave 3"),window.t("Up Wave 4"),window.t("Up Wave 5"),window.t("Apply WPT Down Wave"),window.t("Down Wave 1 or A"),window.t("Down Wave 2 or B"),window.t("Down Wave C"),window.t("Down Wave 3"),window.t("Down Wave 4"),window.t("Down Wave 5"),window.t("Pinned To Scale {label} (Hidden)")),k=window.t("Pinned To Right Scale (Hidden)"),A=window.t("Pin To Scale {label} (Hidden)"),E=window.t("Pin To Right Scale (Hidden)"),V=window.t("Pinned To Scale {label}"),D=window.t("Pinned To Right Scale"),B=window.t("Pin To Scale {label}"),R=window.t("Pin To Right Scale"),N=window.t("Pinned To Left Scale (Hidden)"),F=window.t("Pin To Left Scale (Hidden)"),j=window.t("Pinned To Left Scale"),W=window.t("Pin To Left Scale"),H=window.t("Pin To New Left Scale"),z=window.t("Pin To New Right Scale"),U=window.t("Pin To Scale (Now {label})"),G=window.t("Pin To Scale (Now No Scale)"),Y=window.t("Pin To Scale (Now Left)"),q=window.t("Pin To Scale (Now Right)"),K=window.t("No Scale (Fullscreen)"),Z=window.t("Move To"),J=window.t("Existing Pane Above"),X=window.t("New Pane Above"),Q=window.t("Existing Pane Below"),$=window.t("New Pane Below"),ee=window.t("Bring to Front"),te=window.t("Send to Back"),ie=window.t("Bring Forward"),ne=window.t("Send Backward"),re=window.t("Visual Order"),oe=window.t("Lines"),se=window.t("Add Indicator/Strategy on {studyTitle}..."),ae=(window.t("Add Financial metric for {instrumentName}..."),window.t("Settings...")),le=window.t("Apply Default"),ce=window.t("Save As..."),ue=window.t("Copy"),he=window.t("Clone"),de=window.t("Template"),pe=(window.t("Sync To All Charts"),window.t("Unlock")),_e=window.t("Lock"),fe=(window.t("Show Earnings"),window.t("Show Dividends"),window.t("Show Splits"), window.t("Show All Ideas")),me=window.t("Show Ideas of Followed Users"),ve=window.t("Show My Ideas Only"),ye=window.t("Settings..."),ge=window.t("Hide Events on Chart"),be=window.t("Add this Symbol to Entire Layout"),Se=window.t("Add this Indicator to Entire Layout");window.t("Add this Strategy to Entire Layout"),window.t("Add this Financial Metric to Entire Layout");function we(e,t){return null}function Pe(e,t,i){return null}function Ce(e){throw new Error("not supported")}function xe(e,t,i,n){return null}function Te(e){var t=[e.actions().showPriceLine];return new l.Action({label:oe,statName:"Lines",subItems:t})}function Ie(e,t){return void 0===e||e[t]}var Me=function(){function e(e,t){this._chartWidget=e,this._options=t}return e.prototype.contextMenuActionsForSources=function(e){return Object(n.__awaiter)(this,void 0,void 0,(function(){var t,i,r;return Object(n.__generator)(this,(function(n){return t=e[0],i=this._options,t===this._chartWidget.model().mainSeries()&&Ie(i,"mainSeries")?[2,this._contextMenuActionsForSeries(t)]:Object(h.isStudy)(t)&&Ie(i,"studies")?[2,this._contextMenuActionsForStudy(t)]:Object(S.isLineTool)(t)&&Ie(i,"lineTools")?(r=e.filter(S.isLineTool),[2,this._contextMenuActionsForLineTool(r)]):[2,[]]}))}))},e.prototype._isReadOnly=function(){return this._chartWidget.readOnly()},e.prototype._createActionHide=function(e){return new l.Action({label:L,icon:i("DYI2"),statName:"HideSelectedObject",onExecute:this._chartWidget.hideDataSources.bind(this._chartWidget,[e])})},e.prototype._createActionShow=function(e){var t=new l.Action({checkable:!0,label:M,icon:i("6ctS"),statName:"ToggleShow"}),n=new c.ActionBinder(t,e.properties().visible,this._chartWidget.model(),M);return t.setBinding(n),n.setValue(e.properties().visible.value()),t},e.prototype._createActionScale=function(e){var t=Object(r.ensureNotNull)(e.priceScale()),n=this._chartWidget.model().model(),o=Object(r.ensureNotNull)(n.paneForSource(e)),s=o.priceScalePosition(t),a=("left"===s?o.leftPriceScales():o.rightPriceScales()).indexOf(t),c=n.priceScaleSlotsCount().totallySlots<2?"dontneedname":"needname",h="overlay"===s?"":Object(u.a)(s,a).label,d=U.format({label:h}),p={"left-needname":d,"left-dontneedname":Y,"right-needname":d,"right-dontneedname":q,"overlay-needname":G,"overlay-dontneedname":G}[s+"-"+c];return new l.Action({label:p,icon:i("/kal"),subItems:this._createActionScaleItems(e)})},e.prototype._createActionScaleDetach=function(e,t,i,n){var o=this._chartWidget.model().model(),s=Object(r.ensureNotNull)(o.paneForSource(e));if(!s.canCreateNewPriceScale())return null;var a=Object(r.ensureNotNull)(e.priceScale()),c=a.canDetachSource(e),h=s.priceScalePosition(a),d=c||h!==t;if(!d)return null;var p=o.priceScaleSlotsCount(),_={left:{labelled:B,sided:H},right:{labelled:B,sided:z}},f="left"===t?s.leftPriceScales().length:s.rightPriceScales().length,m=p[t]>f?"labelled":"sided",v=Object(u.a)(t,f).label,y=_[t][m].format({label:v});return new l.Action({checkable:!1,disabled:!d,label:y,statName:n,payload:e,onExecute:i})},e.prototype._onDetachLeft=function(e){ var t=e.getPayload(),i=this._chartWidget.model().model(),n=Object(r.ensureNotNull)(i.paneForSource(t));this._chartWidget.model().detachToLeft(t,n)},e.prototype._onDetachRight=function(e){var t=e.getPayload(),i=this._chartWidget.model().model(),n=Object(r.ensureNotNull)(i.paneForSource(t));this._chartWidget.model().detachToRight(t,n)},e.prototype._createActionScaleDetachLeft=function(e){return this._createActionScaleDetach(e,"left",this._onDetachLeft.bind(this),"ToggleScaleLeft")},e.prototype._createActionScaleDetachRight=function(e){return this._createActionScaleDetach(e,"right",this._onDetachRight.bind(this),"ToggleScaleRight")},e.prototype._onMoveToScale=function(e){var t=e.getPayload();if(t.datasource.priceScale()!==t.priceScale){var i=this._chartWidget.model().model(),n=Object(r.ensureNotNull)(i.paneForSource(t.datasource));this._chartWidget.model().moveToScale(t.datasource,n,t.priceScale,t.undoText)}},e.prototype._createMoveToScaleAction=function(e,t,i,n){var r=e.priceScale()===t;return new l.Action({checkable:!0,checked:r,label:i,statName:"ToggleScale",payload:{datasource:e,priceScale:t,undoText:n},onExecute:this._onMoveToScale.bind(this)})},e.prototype._onNoScale=function(e){var t=e.getPayload().datasource,i=this._chartWidget.model().model(),n=Object(r.ensureNotNull)(i.paneForSource(t));n.isOverlay(t)||this._chartWidget.model().detachNoScale(t,n)},e.prototype._createActionNoScale=function(e){var t=this._chartWidget.model().model(),i=Object(r.ensureNotNull)(t.paneForSource(e)),n=i.actionNoScaleIsEnabled(e);return new l.Action({checkable:!0,checked:i.isOverlay(e),label:K,disabled:!n,statName:"ToggleNoScale",payload:{datasource:e},onExecute:this._onNoScale.bind(this)})},e.prototype._createActionScaleItems=function(e){var t=this,i=[],n=this._chartWidget.model().model(),o=Object(r.ensureNotNull)(n.paneForSource(e)),s=n.priceScaleSlotsCount().totallySlots>1,a=o.rightPriceScales(),c=o.leftPriceScales(),h=this._createActionScaleDetachRight(e),d=this._createActionScaleDetachLeft(e),p=a.length+c.length+(null===h?0:1)+(null===d?0:1)>2,_={right:{hidden:{checked:{labelled:O,sided:k},unchecked:{labelled:A,sided:E}},visible:{checked:{labelled:V,sided:D},unchecked:{labelled:B,sided:R}}},left:{hidden:{checked:{labelled:O,sided:N},unchecked:{labelled:A,sided:F}},visible:{checked:{labelled:V,sided:j},unchecked:{labelled:B,sided:W}}}},f={left:o.visibleLeftPriceScales(),right:o.visibleRightPriceScales()},m=function(t,i){var n=("right"===i?a:c)[t],r=f[i].includes(n)?"visible":"hidden",o=e.priceScale()===n?"checked":"unchecked",l=s?"labelled":"sided",h=_[i],d={labelled:h.visible.unchecked.labelled,sided:h.visible.unchecked.sided},p=Object(u.a)(i,t).label;return{actionText:h[r][o][l].format({label:p}),undoText:d[l].format({label:p})}};return i.push.apply(i,a.map((function(i,n){var r=m(n,"right");return t._createMoveToScaleAction(e,i,r.actionText,r.undoText)}))),null!==h&&i.push(h),p&&(a.length>0||null!==h)&&i.push(new l.Separator),i.push.apply(i,c.map((function(i,n){var r=m(n,"left") ;return t._createMoveToScaleAction(e,i,r.actionText,r.undoText)}))),null!==d&&i.push(d),p&&(c.length>0||null!==d)&&i.push(new l.Separator),i.push(this._createActionNoScale(e)),i},e.prototype._createVisualOrderAction=function(e){var t=this._chartWidget.model(),n=t.availableZOrderOperations(e),r=[new l.Action({label:ee,statName:"BringToFront",disabled:!n.bringToFrontEnabled,onExecute:function(){return t.bringToFront(e)}}),new l.Action({label:te,statName:"SendToBack",disabled:!n.sendToBackEnabled,onExecute:function(){return t.sendToBack(e)}}),new l.Action({label:ie,statName:"BringForward",disabled:!n.bringForwardEnabled,onExecute:function(){return t.bringForward(e)}}),new l.Action({label:ne,statName:"SendBackward",disabled:!n.sendBackwardEnabled,onExecute:function(){return t.sendBackward(e)}})];return new l.Action({label:re,icon:i("9dnG"),statName:"VisualOrder",subItems:r})},e.prototype._createActionMergeUp=function(e){var t=this._chartWidget.model();return t.model().isMergeUpAvailableForSource(e)?new l.Action({label:J,statName:"MergeUp",onExecute:function(){return t.mergeSourceUp(e)}}):null},e.prototype._createActionUnmergeUp=function(e){var t=this._chartWidget.model();return t.model().isUnmergeAvailableForSource(e)?new l.Action({label:X,statName:"UnmergeUp",onExecute:function(){return t.unmergeSourceUp(e)}}):null},e.prototype._createActionMergeDown=function(e){var t=this._chartWidget.model();return t.model().isMergeDownAvailableForSource(e)?new l.Action({label:Q,statName:"MergeDown",onExecute:function(){return t.mergeSourceDown(e)}}):null},e.prototype._createActionUnmergeDown=function(e){var t=this._chartWidget.model();return t.model().isUnmergeAvailableForSource(e)?new l.Action({label:$,statName:"UnmergeDown",onExecute:function(){return t.unmergeSourceDown(e)}}):null},e.prototype._mergeContentMenuItems=function(e){return[this._createActionMergeUp(e),this._createActionUnmergeUp(e),this._createActionMergeDown(e),this._createActionUnmergeDown(e)].filter(s.notNull)},e.prototype._createActionMove=function(e){var t=this._mergeContentMenuItems(e);return t.length>0?new l.Action({label:Z,icon:i("BBCR"),subItems:t}):null},e.prototype._contextMenuActionsForSeries=function(e){var t=[],i=e.properties().visible.value(),n=this._chartWidget.model().model(),o=(Object(r.ensureNotNull)(n.paneForSource(e)),this._chartWidget.actions());if(this._isReadOnly())t.push(i?this._createActionHide(e):this._createActionShow(e)),t.push(new l.Separator),t.push(this._createActionScale(e));else{0,t.length>0&&!(t[t.length-1]instanceof l.Separator)&&t.push(new l.Separator),a.enabled("symbol_info")&&t.push(o.showSymbolInfoDialog),t.length>0&&!(t[t.length-1]instanceof l.Separator)&&t.push(new l.Separator),t.push(this._createVisualOrderAction([e]));var s=this._createActionMove(e);null!==s&&t.push(s),t.push(this._createActionScale(e)),t.push(i?this._createActionHide(e):this._createActionShow(e)),t.push(new l.Separator),t.push(Te(this._chartWidget)),t.push(new l.Separator), window.widgetbar&&(!window.widgetbar._customization||window.widgetbar._customization.watchlist)&&o.addToWatchlist&&t.push(o.addToWatchlist),a.enabled("text_notes")&&t.push(o.addToTextNotes),t[t.length-1]instanceof l.Separator||t.push(new l.Separator),t[t.length-1]instanceof l.Separator&&t.pop()}return t},e.prototype._createActionAddChildStudy=function(e){var t=this,n=this._chartWidget.model().model();return new l.Action({label:se.format({studyTitle:e.title(!0)}),icon:i("CwKc"),statName:"ApplyIndicator",onExecute:function(){var i=t._chartWidget.showIndicators(Object(h.isStudy)(e)?e:void 0);if(i&&Object(h.isStudy)(e)){var r=function(){trackEvent("SOS","Apply SOS","Apply by RC menu")},o=n.studyInserted();o.subscribe(t,r),i.visibilityChanged.subscribe(t,(function(e){e||o.unsubscribe(t,r)}),!0)}}})},e.prototype._createActionAddFundamentals=function(e){return null},e.prototype._createActionShowSymbolInfoDialog=function(e){return new l.Action({label:window.t("Symbol Info..."),icon:i("1pHB"),checkable:!1,statName:"SymbolInfo",onExecute:function(){var t=e.symbol(),i=e.symbolInfo();Object(g.showSymbolInfoDialog)(t,{symbolInfo:i})}})},e.prototype._createActionShowProperties=function(e){var t=this;return new l.Action({label:ae,icon:i("MXV9"),statName:"EditSelectedObject",onExecute:function(){return t._chartWidget.showSourceProperties(e)}})},e.prototype._contextMenuActionsForStudy=function(e){var t=this,i=this._chartWidget.actions(),n=e.properties().visible.value(),r=[];if(!e.userEditEnabled())return r;if(this._chartWidget.readOnly())r.push(n?this._createActionHide(e):this._createActionShow(e)),r.push(new l.Separator),e.constructor instanceof p.NonSeriesStudy||r.push(this._createActionScale(e));else{a.enabled("study_on_study")&&e.canHaveChildren()&&r.push(this._createActionAddChildStudy(e));var o=this._createApplyToEntireLayoutCommand(e);if(null!==o&&r.push(o),r.length>0&&!(r[r.length-1]instanceof l.Separator)&&r.push(new l.Separator),a.enabled("symbol_info")&&(e instanceof y.study_Compare||e instanceof v.study_Overlay)&&null!==e.symbolInfo()&&(r.push(this._createActionShowSymbolInfoDialog(e)),r.push(new l.Separator)),r.push(this._createVisualOrderAction([e])),!(e.constructor instanceof p.NonSeriesStudy)){var s=this._createActionMove(e);null!==s&&r.push(s),r.push(this._createActionScale(e))}r.push(new l.Separator);var c=e.metaInfo();if(r[r.length-1]instanceof l.Separator||r.push(new l.Separator),e.copiable()){var u=new l.Action({label:ue,shortcutHint:Object(f.humanReadableHash)(f.Modifiers.Mod+67),statName:"Copy",onExecute:function(){t._chartWidget.onAppClipboardCopy([e])}});r.push(u)}r.push(n?this._createActionHide(e):this._createActionShow(e)),r.push(i.studyRemove),r.push(new l.Separator),a.enabled("property_pages")&&new _.a(c).hasUserEditableOptions()&&r.push(this._createActionShowProperties(e)),r[r.length-1]instanceof l.Separator&&r.pop()}return r},e.prototype._createEditAlertDrawingAction=function(e){return new l.Action({label:C.format(e.title()),icon:TbbiEditAlertSvg,statName:"EditAlert",onExecute:function(){ window.runOrSignIn((function(){e.editAlert("pane_context_menu_edit_alert")}),{source:"Alert edit from pane context menu"})}})},e.prototype._createLineToolTemplateAction=function(e){var t=this;if(!window.lineToolPropertiesToolbar)return null;var i=window.lineToolPropertiesToolbar.templatesList();return void 0===i?null:new l.ActionAsync((function(){var n=[],r=new l.Action({label:ce,statName:"SaveAs",onExecute:function(){i.showSaveDialog((function(t){var n=JSON.stringify(e.template());i.saveTemplate(t,n)}))}});n.push(r);var o=new l.Action({label:le,statName:"ApplyDefault",onExecute:function(){t._chartWidget.model().restorePropertiesForSource(e),window.lineToolPropertiesToolbar.onSourceChanged(e)}});return n.push(o),new Promise((function(e){i.templatesLoaded().then((function(){var e=i.getData();e.length>0&&n.push(new l.Separator),e.forEach((function(e,t){var r=new l.Action({label:e,statName:"ApplyTemplate",onExecute:function(){return i.loadTemplate(e)},toolbox:{type:m.ToolboxType.Delete,action:function(){i.deleteAction(e)}},showToolboxOnHover:!0});n.push(r)}))}),(function(e){P.logWarn(e)})).then((function(){e({label:de,statName:"Template",subItems:n})}))}))}))},e.prototype._createActionToggleLockObject=function(e){var t=this,n=e.properties().frozen.value();return new l.Action({label:n?pe:_e,statName:"ToggleLockSelectedObject",checkable:!0,icon:i(n?"fs3R":"qckB"),onExecute:function(){return t._chartWidget.toggleLockSelectedObject()}})},e.prototype._contextMenuActionsForLineTool=function(e){return Object(n.__awaiter)(this,void 0,void 0,(function(){var t,r,o,s,c,u,h,d,p,_,m,v=this;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:return t=[],r=this._chartWidget.actions(),this._chartWidget.model().model(),o=function(){t.push(v._createVisualOrderAction(e))},s=function(){var n=e.filter((function(e){return e.cloneable()}));if(n.length>0){var r=new l.Action({label:he,icon:i("K8V9"),shortcutHint:Object(f.humanReadableModifiers)(f.Modifiers.Mod)+"Drag",doNotBindShortcut:!0,statName:"Clone",onExecute:function(){return v._chartWidget.model().cloneLineTools(n,!1)}},"Clone");t.push(r)}return!!n.length},c=function(){var i=e.filter((function(e){return e.copiable()}));if(i.length>0){var n=new l.Action({label:ue,shortcutHint:Object(f.humanReadableHash)(f.Modifiers.Mod+67),statName:"Copy",onExecute:function(){return v._chartWidget.onAppClipboardCopy(i)}},"Copy");t.push(n)}return!!i.length},u=function(){return!1},function(e){},1!==e.length?[3,4]:(h=e[0],this._chartWidget.readOnly()?(t.push(r.lineHide),[3,3]):[3,1]);case 1:return h.userEditEnabled()?(a.enabled("alerts")&&!this._chartWidget.onWidget()&&h.hasAlert&&h.hasAlert.value()&&(t.push(this._createEditAlertDrawingAction(h)),t.push(new l.Separator)),a.enabled("charting_library_base")||null!==(d=this._createLineToolTemplateAction(h))&&t.push(d),o(),Ie(this._options,"objectTree")&&r.paneObjectTree&&t.push(r.paneObjectTree),t.push(new l.Separator),p=s(),p=c()||p,(p=u()||p)&&t.push(new l.Separator),t.push(this._createActionToggleLockObject(h)),t.push(r.lineHide), t.push(r.lineRemove),t.push(new l.Separator),[4,this._chartWidget.propertiesDefinitionsForSource(h)]):[3,3];case 2:_=n.sent(),a.enabled("property_pages")&&(null!==_||Object(S.isMTPredictionTool)(h))&&t.push(r.format),h.additionalActions&&(t.push(new l.Separator),m=h.additionalActions(this._chartWidget.model()),t.push.apply(t,m)),n.label=3;case 3:return[3,5];case 4:Ie(this._options,"objectTree")&&r.paneObjectTree&&t.push(r.paneObjectTree),o(),t.push(new l.Separator),s(),c(),u(),t.push(new l.Separator),t.push(r.lineHide),t.push(r.lineRemove),n.label=5;case 5:return[2,t]}}))}))},e.prototype._createEarningsShow=function(){return null},e.prototype._createDividendsShow=function(){return null},e.prototype._createSplitsShow=function(){return null},e.prototype._contextMenuActionsForESD=function(){return[]},e.prototype._contextMenuActionsForPublishedTimeline=function(e){var t=this,i=this._chartWidget.actions(),n=[];if(n.push(i.lineHide),window.is_authenticated){var r=e.properties().filter,o=new l.Action({checked:r.value()===PublishedChartsFilter.None,checkable:!0,label:fe,statName:"ToggleAllIdeas",onExecute:function(){return t._chartWidget.model().setProperty(r,PublishedChartsFilter.None,fe)}}),s=new l.Action({checked:r.value()===PublishedChartsFilter.Following,checkable:!0,label:me,statName:"ToggleIdeasOfPeopleAndUser",onExecute:function(){return t._chartWidget.model().setProperty(r,PublishedChartsFilter.Following,me)}}),a=new l.Action({checked:r.value()===PublishedChartsFilter.Private,checkable:!0,label:ve,statName:"ToggleUserIdeas",onExecute:function(){return t._chartWidget.model().setProperty(r,PublishedChartsFilter.Private,ve)}});n.push(new l.Separator,o,s,a)}return n},e.prototype._contextMenuActionsForTradingDrawings=function(e){return e.contextMenuItems()},e.prototype._createAlertToggleHorzLineLabelAction=function(e){var t=this,i=getGlobalAlertSettingsProperty().childs().line.childs().visible,n=i.value()?I:T;return new l.Action({checkable:!0,label:x,checked:i.value(),statName:"ToggleExtendAlertLine",onExecute:function(){return t._chartWidget.model().setProperty(i,!i.value(),n)}})},e.prototype._contextMenuActionsForAlertLabel=function(e){var t=e.alert(),i=[];return t.get("active")?i.push(AlertActionCreator.stopAlert(t)):i.push(AlertActionCreator.restartAlert(t,"alert_label_context_menu_restart")),i.push(AlertActionCreator.editAlert(t,"alert_label_context_menu_edit")),i.push(AlertActionCreator.deleteAlert(t)),i.push(new l.Separator),i.push(this._createAlertToggleHorzLineLabelAction(e)),i},e.prototype._contextMenuActionsForChartEvents=function(e){var t=this,i=[];if(a.enabled("property_pages")){var n=new l.Action({label:ye,statName:"Format",onExecute:function(){return t._chartWidget.showGeneralChartProperties(d.TabNames.eventsAndAlerts)}});i.push(n)}var r=new l.Action({label:ge,statName:"HideEvents",onExecute:function(){return t._chartWidget.model().setProperty(e.properties().visible,!1,ge)}});return i.push(r),i},e.prototype._createApplyToEntireLayoutCommand=function(e){var t=this ;if(!this._chartWidget.chartWidgetCollection().applyIndicatorsToAllChartsAvailable())return null;var i=this._chartWidget.model().model();if(e.parentSource()!==i.mainSeries())return null;var n=Object(r.ensureNotNull)(i.paneForSource(e)),o=i.paneForSource(i.mainSeries())===n,s=e instanceof y.study_Compare&&e.priceScale()===i.mainSeries().priceScale()&&Object(r.ensureNotNull)(e.priceScale()).isPercentage(),a=o?void 0:i.panes().indexOf(n),c=Se,u="AddStudyToEntireLayout";return Object(w.isSymbolSource)(e)&&(c=be,u="AddSymbolToEntireLayout"),new l.Action({label:c,statName:u,onExecute:function(){var n=Object(r.ensureNotNull)(Object(b.clipboardDataForSources)(i.id(),[e])),l=t._chartWidget.chartWidgetCollection(),u={isOnMainPane:o,asCompare:s,paneIndex:a};l.applyIndicatorToAllCharts(t._chartWidget,n,u,c)}},"applyStudyToEntireLayout")},e}()},Hm6r:function(e,t,i){"use strict";i.r(t),i.d(t,"CrosshairTimeAxisView",(function(){return o}));var n=i("mrSG"),r=i("cgFQ"),o=function(e){function t(t,i,n){void 0===n&&(n=!1);var r=e.call(this,t)||this;return r._indexProvider=i,r._highlighted=n,r}return Object(n.__extends)(t,e),t.prototype._getBgColor=function(){return this._highlighted?this._model.isDark()?"#1E88E5":"#2196F3":"#4c525e"},t.prototype._getIndex=function(){return this._model.crossHairSource().visible?this._indexProvider():null},t}(r.a)},Hr11:function(e,t,i){"use strict";function n(e,t){return e<=t}function r(e,t){return e>=t}function o(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!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){if(void 0===t&&(t=h),e.length<1)throw Error("array is empty");for(var i=e[0],n=0;n0&&(i=e[n]);return i}function _(e){var t=Math.ceil(e);return t%2!=0?t-1:t}i.r(t),i.d(t,"lessThan",(function(){return n})),i.d(t,"greaterThan",(function(){return r})),i.d(t,"clamp",(function(){return o})),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.d(t,"ceiledEven",(function(){return _}))},HySD:function(e,t,i){"use strict";i.r(t),i.d(t,"ResizerDetacherState",(function(){return s}));var n=i("Eyy1"),r=i("hY0g"),o=i.n(r),s=function(){function e(e){var t=this;this._alive=new o.a,this._container=new o.a,this._width=new o.a,this._height=new o.a,this._fullscreen=new o.a,this._detachable=new o.a,this._fullscreenable=new o.a,this._visible=new o.a,this._availWidth=new o.a,this._availHeight=new o.a,this._owner=new o.a,this._ownersStack=[], this.owner=this._owner.readonly(),this._bridge={alive:this._alive.readonly(),container:this._container.readonly(),width:this._width.readonly(),height:this._height.readonly(),fullscreen:this._fullscreen.readonly(),detachable:this._detachable.readonly(),fullscreenable:this._fullscreenable.readonly(),visible:this._visible.readonly(),availWidth:this._availWidth.readonly(),availHeight:this._availHeight.readonly(),remove:function(){var e=t._owner.value();e&&e.remove&&e.remove()},negotiateWidth:function(e){var i=t._owner.value();i&&i.negotiateWidth&&i.negotiateWidth(e)},negotiateHeight:function(e){var i=t._owner.value();i&&i.negotiateHeight&&i.negotiateHeight(e)},requestFullscreen:function(){var e=t._owner.value();e&&e.requestFullscreen&&e.requestFullscreen()},exitFullscreen:function(){var e=t._owner.value();e&&e.exitFullscreen&&e.exitFullscreen()},detach:function(e){var i=t._owner.value();i&&i.detach&&i.detach(e)},attach:function(){var e=t._owner.value();e&&e.attach&&e.attach()}},e&&this.pushOwner(e)}return e.prototype.bridge=function(){return this._bridge},e.prototype.pushOwner=function(e){if(e.alive.value()){for(var t=0,i=this._ownersStack;t=t;i--)this._unsubscribeOwner(this._ownersStack[i],!0);this._ownersStack.length=t,t>0?this._subscribeOwner(this._ownersStack[t-1]):(this._alive.setValue(!1),this._owner.deleteValue())},e}()},I4UZ:function(e,t,i){"use strict";i.r(t),i.d(t,"HeaderToolbarBootloader",(function(){return s}));var n=i("mrSG"),r=i("yMne"),o=i("YuHv"),s=function(e){function t(t,i){var n=e.call(this)||this;return n._toolsBootloader=t,n._headerProps=i,n._headerProps.resizerBridge.negotiateHeight(r.HEADER_TOOLBAR_HEIGHT_EXPANDED),n._headerProps.resizerBridge.container.value().appendChild(Object(o.a)()),n}return Object(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.container.value(),Object(n.__assign)(Object(n.__assign)({},e._headerProps),{tools:i}))}))},t.prototype._loadHeaderToolbar=function(){return Promise.all([i.e("react"),i.e(43),i.e(44),i.e(75),i.e(12),i.e(14),i.e(38),i.e("header-toolbar")]).then(i.bind(null,"KMbc")).then((function(e){return e.HeaderToolbarRenderer}))},t}(i("cZRT").a)},I9zs:function(e,t,i){"use strict";var n=i("Eyy1").assert,r=i("aO4+").Point,o=i("eJTA"),s=o.rgbToHsl,a=o.hslToRgb,l=o.rgbToHexString,c=o.parseRgb,u=o.parseRgba,h=i("VdBB").HitTestResult,d=i("vq8G").SelectionRenderer,p=i("29fS").PaneRendererBars,_=i("cO0S").PaneRendererHistogram,f=i("Ndyb").PaneRendererColumns,m=i("gyZD").PaneRendererLine,v=i("u0yd").PaneRendererArea,y=i("/hKg").PaneRendererCandles,g=i("dBsn").PaneRendererCross,b=i("OYox").PaneRendererCircles,S=i("6Fc/").PaneRendererArrowsUpDownItem,w=i("6Fc/").PaneRendererArrowsUpDown,P=i("gTEF").SelectionRendererArrowsUpDown,C=i("f3xO").PaneRendererUnicodeChar,x=i("gVWb").PaneRendererBackground,T=i("Zp8I").PaneRendererStepLine,I=i("Zy3/").CompositeRenderer,M=i("ga+R"),L=i("Hr11").clamp,O=i("Nu4p"),k=i("23IT"),A=k.LineStudyPlotStyle,E=k.PlotSymbolSize,V=i("972a").MarkLocation,D=i("G3Rl").memoize,B=i("Tmoa"),R=i("k9/m").PlotRowSearchMode,N=i("Kxc7"),F=i("Zp/P"),j=i("Kmdw"),W=i("akof"),H=i("+q2u"),z=i("fxzW"),U=i("P+Pi"),G=i("IOzl"),Y=i("6ptY"),q=i("PF2b"),K=i("V0al");function Z(e,t,i,n){this.m_study=e,this.m_series=t,this.m_model=i,this._plotName=n,this.m_items=[],this._invalidated=!0,this._isMarkersEnabled=N.enabled("source_selection_markers");var r=this.m_study.metaInfo().plots;this._colorer=null,this._palette=null,this._paletterProps=null,this._plotIndex=0;for(var o=0;o=0&&e0?(t-=n,i+=n):(t+=n,i-=n);var o=this.m_study.getMinFirstBarIndexForPlot(this._plotName);if(!(o>i)){t=Math.max(o,t) ;var s=this.m_study.properties().styles[this._plotName],a=s.plottype.value(),l=[A.Line,A.Area,A.Circles,A.Cross].indexOf(a)>=0,c=this.m_study.data(),u=this.m_study.firstValue();if(l&&c._length()>0){for(var d=c._bsearch(t);Z.isIndexValid(d,c)&&void 0===c._valueAt(d)[this._plotIndex+1];)d-=1;t=Z.isIndexValid(d,c)?c._indexAt(d):t;for(var p=c._bsearch(i);Z.isIndexValid(p,c)&&void 0===c._valueAt(p)[this._plotIndex+1];)p+=1;i=Z.isIndexValid(p,c)?c._indexAt(p):i}var _=c.range(t,i),f=this.m_study.priceScale(),m=L(this._getTranspValue(),0,100),v={},y=function(e,t){var i=e+"@"+t;return v[i]||(this._plotName&&"vol"===this._plotName?v[i]=B.generateColor(e,t):v[i]=B.generateColor(e,t,!0)),v[i]}.bind(this);if(_.each(function(e,t){e+=n,e=Math.floor(e);var i=null==(h=t[this._plotIndex+1]);if(l&&i)return!1;var o=new r(e,h=i?NaN:h);o.timePointIndex=e;var a=void 0!==t[this._colorer+1]||this._palette&&this._palette.addDefaultColor;if(this._colorer&&a){var c,u,h=t[this._colorer+1];if(o.style={},null!=h){c=this._palette.valToIndex?this._palette.valToIndex[h]:h;var d=(u=this._paletterProps.colors[c]).color.value();o.style.color=B.isHexColor(d)?y(d,m):d}else{d=s.color.value();o.style.color=y(d,100)}var p=void 0!==c?u.width.value():s.linewidth.value(),_=void 0!==c?u.style.value():s.linestyle.value();o.style.width=p,o.style.style=_}return this.m_items.push(o),!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)){var g=M(t,i);this._selectionData={points:[],bgColors:[],visible:!0};var b=this.m_model.paneForSource(this.m_study).height();this._selectionData.hittestResult=h.REGULAR;for(var S=0;S0?(a-=c,l+=c):(a+=c,l-=c);var u=this._study.getMinFirstBarIndexForPlot(this._plotName);if(!(u>l))a=Math.max(u,a),this._study.data().range(a,l).each(function(e,t){e+=c;var n=t[this._plotIndex+1],a=new r(Math.floor(e)-.5),l=isNumber(s)?s:50;l=Math.min(l,100),l=Math.max(l,0);if(null!=n){var u=o.valToIndex?o.valToIndex[n]:n;a.color=B.generateColor(i[u].color.value(),l)}else a.color=null;return this._items.push(a),!1}.bind(this)),this._model.timeScale().indexesToCoordinates(this._items)}},J.prototype.renderer=function(){if(this._study.properties().styles[this._plotName].visible&&this._study.properties().styles[this._plotName].visible.value()&&this._scalesReady()){this._invalidated&&(this._updateImpl(),this._invalidated=!1);var e={items:this._items,y:0,h:this._study.priceScale().height(),w:this._model.timeScale().barSpacing()},t=new I;return t.append(new x(e)),t}},X.prototype.items=function(){ return this.m_items},X.prototype.update=function(){this.m_invalidated=!0},X.prototype._scalesReady=function(){var e=this.m_model.timeScale(),t=this.m_study.priceScale();return e&&t&&!e.isEmpty()&&!t.isEmpty()},X.prototype._updateImpl=function(){if(this.m_items=[],this._scalesReady()){var e=this.m_model.timeScale(),t=this.m_study.priceScale(),i=e.visibleBarsStrictRange();if(null!==i){var n=this.m_series.nearestIndex(i.firstBar(),R.NearestRight),r=this.m_series.nearestIndex(i.lastBar(),R.NearestLeft),o=this.m_study.offset(this.m_plotName);o>0?(n-=o,r+=o):(n+=o,r-=o);var s=this.m_study.getMinFirstBarIndexForPlot(this.m_plotName);if(!(s>r)){n=Math.max(s,n);var a=this.m_study.data(),l=this.m_study.firstValue(),c=a.range(n,r),u=this._getTranspValue(),d=M(n,r),p=this.m_model.selection().isSelected(this.m_study);this.m_selectionData=p?{points:[],hittestResult:h.REGULAR,vertOffset:0,isDark:this.m_model.isDark(),bgColors:[],visible:!0}:null;var _,f,m=this.m_series.properties().style.value(),v=m===TradingView.Series.STYLE_LINE?"lineStyle":m===TradingView.Series.STYLE_AREA?"areaStyle":null;v?(_=this.m_series.properties()[v].priceSource.value(),f=_):(_="high",f="low");var y=this.m_study.priceScale().isInverted(),g=t.coordinateToPrice(t.height()*t.topMargin(),l),b=t.coordinateToPrice(t.height()*(1-t.bottomMargin()),l);this._topCoord=y?b:g,this._bottomCoord=y?g:b;var S=this.m_model.paneForSource(this.m_study).height();c.each(function(e,t){var i=Math.floor(e+o);if(null==(l=t[this.m_plotIndex+1]))return!1;var n=this._createItem(i,l,_,f);if(null!=n){var r=void 0!==t[this._colorer+1]||this._palette&&this._palette.addDefaultColor;if(this._colorer&&r){var s,a,l=t[this._colorer+1];if(n.style={},null!=l){var c=this._palette.valToIndex?this._palette.valToIndex[l]:l;s=this._paletterProps.colors[c].color.value(),a=u>9?u-10:0,n.style.color=B.generateColor(s,u)}else s=this.m_study.properties().styles[this.m_plotName].color.value(),a=100,n.style.color=B.generateColor(s,100);n.style.borderColor=B.generateColor(s,a)}var h=void 0!==t[this._textColorer+1]||this._textPalette&&this._textPalette.addDefaultColor;if(this._textColorer&&h){var m;l=t[this._textColorer+1];if(n.style||(n.style={}),null!=l){c=this._textPalette.valToIndex?this._textPalette.valToIndex[l]:l;m=this._textPaletterProps.colors[c].color.value(),n.style.textColor=B.generateColor(m,u)}else m=this.m_study.properties().styles[this.m_plotName].textColor.value(),n.style.textColor=B.generateColor(m,100)}return p&&-1!==d.indexOf(e)&&(this.m_selectionData.points.push(n),this.m_selectionData.bgColors.push(this.m_model.backgroundColorAtYPercentFromTop(n.y/S))),this.m_items.push(n),!1}}.bind(this)),this._convertItemsToCoordinates()}}}},X.prototype._updateRenderer=function(){this._updateImpl();var e=this.m_model.timeScale(),t={},i=this._getTranspValue(),n=e.barSpacing(),r=this._calculateShapeHeight(n),o=this.m_study.properties().styles[this.m_plotName].location.value(),s=this._calculateVerticalOffset(o,r+r/2);t.barSpacing=n,t.items=this.m_items, t.color=B.generateColor(this.m_study.properties().styles[this.m_plotName].color.value(),i),t.height=r,t.vertOffset=s;var a=this.m_study.properties().styles[this.m_plotName].plottype.value(),l=O.plotShapesData[a],c=new I;l&&c.append(new TradingView[l.paneRendererClass](t)),this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&null!==this.m_selectionData&&(this.m_selectionData.vertOffset=s,c.append(new d(this.m_selectionData))),this.m_renderer=c},X.prototype._getSeriesVal=function(e,t){e=e||"close";var i=null;try{i=this.m_series[e](t)}catch(n){}return i},X.prototype._getTranspValue=function(){var e=0;this.m_study.properties().transparency&&(e=this.m_study.properties().transparency.value(),e=isNumber(e)?e:50);var t=this.m_study.properties().styles[this.m_plotName];return t.transparency&&(e=t.transparency.value(),e=isNumber(e)?e:50),L(e,0,100)},X.prototype._createItem=function(e,t,i,n){var o=this.m_study.properties().styles[this.m_plotName].location.value();if(!t&&o!==V.Absolute)return null;switch(o){case V.AboveBar:var s=this._getSeriesVal(i,e);if(void 0===s||null==s)return null;var a=s;break;case V.BelowBar:var l=this._getSeriesVal(n,e);if(void 0===l||null==l)return null;a=l;break;case V.Top:a=this._topCoord;break;case V.Bottom:a=this._bottomCoord;break;case V.Absolute:a=t;break;default:throw new Error("Bad value: "+o)}return new r(e,a)},X.prototype._convertItemsToCoordinates=function(){var e=this.m_model.timeScale(),t=this.m_study.priceScale();e.indexesToCoordinates(this.m_items),t.pointsArrayToCoordinates(this.m_items,this.m_study.firstValue())},X.prototype._calculateVerticalOffset=function(e,t){var i=0;switch(e){case V.AboveBar:case V.Bottom:i=-t;break;case V.BelowBar:case V.Top:i=t}return this.m_study.priceScale().isInverted()&&(i*=-1),i},X.prototype._calculateShapeHeight=function(e,t){var i=e;switch(t){case E.Tiny:i=.3*e;break;case E.Small:i=.6*e;break;case E.Normal:i=e;break;case E.Large:i=1.5*e;break;case E.Huge:i=2*e}return i},X.prototype.renderer=function(){if(this.m_study.properties().styles[this.m_plotName].visible&&this.m_study.properties().styles[this.m_plotName].visible.value()&&this._scalesReady())return this.m_invalidated&&(this._updateRenderer(),this.m_invalidated=!1),this.m_renderer},inherit(Q,X),Q.prototype._updateRenderer=function(e){this._updateImpl();var t,i=this.m_model.timeScale(),n={},r=this._getTranspValue(),o=i.barSpacing();if(e.size){var s=e.size.value();t=this._calculateShapeHeight(25,s)}else t=Math.round(o/2);var a=e.location.value(),l=B.generateColor(e.color.value(),r),c=r>19?r-10:0,u=this._calculateVerticalOffset(a,Math.round(1.5*t));n.barSpacing=o,n.items=this.items(),n.color=l,n.borderColor=B.generateColor(e.color.value(),c),n.height=t,n.vertOffset=u;var h=e.plottype.value(),p=O.plotShapesData[h],_=new I,f=e.text?e.text.value():void 0;if(void 0!==f&&""!==f.trim()){var m=f.trim().replace(/\\n/gm,"\n");m=TradingView.cleanButAmpersand(m,!0),n.text=m,n.fontSize=12;var v=e.textColor?e.textColor.value():void 0;n.textColor=v?B.generateColor(v,r):l} null!=p&&_.append(new TradingView[p.paneRendererClass](n)),this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&null!==this.m_selectionData&&(this.m_selectionData.vertOffset=u,_.append(new d(this.m_selectionData))),this.m_renderer=_},Q.prototype.renderer=function(){var e=this.m_study.properties().styles[this.m_plotName];if(e.visible&&e.visible.value()&&this._scalesReady())return this.m_invalidated&&(this._updateRenderer(e),this.m_invalidated=!1),this.m_renderer},inherit($,Q),$.prototype.renderer=function(){var e=this.m_study.properties().styles[this.m_plotName];if(e.visible&&e.visible.value()&&this._scalesReady()){var t=this.m_model.timeScale();this.m_invalidated&&(this._updateImpl(),this.m_invalidated=!1);var i,n={},r=this._getTranspValue(),o=t.barSpacing();if(e.size){var s=e.size.value();i=this._calculateShapeHeight(50,s)}else i=Math.round(o);var a=e.location.value(),l=B.generateColor(e.color.value(),r),c=this._calculateVerticalOffset(a,i);n.items=this.items(),n.barSpacing=o,n.char=e.char.value(),n.height=i,n.vertOffset=c,n.color=l;var u=new I,h=e.text?e.text.value():void 0;if(void 0!==h&&""!==h.trim()){var p=h.trim().replace(/\\n/gm,"\n");p=TradingView.cleanButAmpersand(p,!0),n.text=p,n.fontSize=12;var _=e.textColor?e.textColor.value():void 0;n.textColor=_?B.generateColor(_,r):l}return u.append(new C(n)),this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&null!==this.m_selectionData&&(this.m_selectionData.vertOffset=c,u.append(new d(this.m_selectionData))),u}},inherit(ee,X),ee.prototype.renderer=function(){if(this.m_study.properties().styles[this.m_plotName].visible&&this.m_study.properties().styles[this.m_plotName].visible.value()&&this._scalesReady()){this.m_invalidated&&(this._updateImpl(),this.m_invalidated=!1);var e={},t=L(this._getTranspValue(),0,100),i=this.m_model.timeScale().barSpacing();e.items=this.m_items,e.barSpacing=i,e.colorup=B.generateColor(this.m_study.properties().styles[this.m_plotName].colorup.value(),t),e.colordown=B.generateColor(this.m_study.properties().styles[this.m_plotName].colordown.value(),t);var n=u(e.colorup),r=n?100*(1-n[3]):0,o=u(e.colordown),s=o?100*(1-o[3]):0;e.colorBorderUp=B.generateColor("#000000",r),e.colorBorderDown=B.generateColor("#000000",s),e.minHeight=this.m_study.properties().styles[this.m_plotName].minHeight.value(),e.maxHeight=this.m_study.properties().styles[this.m_plotName].maxHeight.value();var a=new I;if(a.append(new w(e)),this.m_model.selection().isSelected(this.m_study)&&null!==this.m_selectionData){var l=this.m_selectionData;l.barSpacing=i,a.append(new P(l))}return a}},ee.prototype._createItem=function(e,t,i,n){if(0!==t){Math.abs(t)>this._maxAbsValue&&(this._maxAbsValue=Math.abs(t));var r,o=t>0;if(o){var s=this._getSeriesVal(n,e);if(void 0===s||null==s)return null;r=s}else{var a=this._getSeriesVal(i,e);if(void 0===a||null==a)return null;r=a}return new S(e,r,t,o)}},ee.prototype._convertItemsToCoordinates=function(){var e=this.m_model.timeScale(),t=this.m_study.priceScale();e.indexesToCoordinates(this.m_items), t.pointsArrayToCoordinates(this.m_items,this.m_study.firstValue());var i=Math.abs(this.m_study.properties().styles[this.m_plotName].minHeight.value()),n=Math.abs(this.m_study.properties().styles[this.m_plotName].maxHeight.value());if(i>n){var r=i;i=n,n=r}for(var o=(n-i)/this._maxAbsValue,s=this.m_items,a=0;ai)){t=Math.max(n,t);var o=this.m_study.data(),s=this.m_study.firstValue(),a=o.range(t,i),l=this.m_study.properties().ohlcPlots[this.m_plotName],c={};if(a.each(function(e,t){e=Math.floor(e);for(var i=!0,n={},r=TradingView.OPEN_PLOT;r<=TradingView.CLOSE_PLOT;++r){var o=t[this._ohlcPlotIndexes[r]+1];if(null==o){i=!1;break}n[r]=o}if(!i)return!1;var s=n[TradingView.OPEN_PLOT],a=n[TradingView.CLOSE_PLOT],u=Math.max(s,n[TradingView.HIGH_PLOT],n[TradingView.LOW_PLOT],a),h=Math.min(s,n[TradingView.HIGH_PLOT],n[TradingView.LOW_PLOT],a),d={};d.time=Math.round(e),d.open=s,d.high=u,d.low=h,d.close=a;var p=this._colorer?null!=t[this._colorer+1]?this._plotValueToPaletteColor(t[this._colorer+1]):"rgba(0, 0, 0, 0)":l.color.value();return d.color=function(e,t){var i=e+"@"+t;return c[i]||(c[i]=B.generateColor(e,t)),c[i]}(p,0),d.hollow=null,this.m_bars.push(d),!1}.bind(this)),this.m_study.priceScale().barPricesToCoordinates(this.m_bars,s),this.m_model.timeScale().barIndexesToCoordinates(this.m_bars),this.m_model.selection().isSelected(this.m_study)){var u=M(t,i);this._selectionData={points:[],hittestResult:h.REGULAR,isDark:this.m_model.isDark(),bgColors:[],visible:!0};for(var d=this.m_model.paneForSource(this.m_study).height(),p=0;pi){var s=r(e,i,t,n,o);return s.count=-s.count,s}return a(e,t,1,(function(e,t){return t>i||0!==n&&e>n}),o)}function o(e,t,i,n){void 0===n&&(n=!1);var r=i<0?-1:1;return a(e,t,r,(function(e,t){return e>=i*r}),n)}function s(e,t,i){var n=i<0?-1:1;return a(e,t,n,(function(e,t){return e>=i*n}),!0).times}function a(e,t,i,r,o){var s=0,a=t;e.moveTo(a);for(var l=0,c=Number.MAX_VALUE,u=!1,h=t,d=[];!r(s,a);){if(l>15)throw new Error("Internal error 0x10 while extrapolating.");var p=e.indexOfBar(a);if(p===n.SessionStage.PRE_SESSION&&1===i)a=e.startOfBar(0),e.moveTo(a);else if(p===n.SessionStage.PRE_SESSION&&-1===i)a=e.startOfBar(n.SessionStage.PRE_SESSION)-1,e.moveTo(a);else if(p===n.SessionStage.POST_SESSION&&1===i)a=e.startOfBar(n.SessionStage.POST_SESSION),e.moveTo(a);else{if(p===n.SessionStage.POST_SESSION&&-1===i)throw new Error("Internal error 0x12 while extrapolating.");var _=e.startOfBar(p);if(_>t&&i>0||t>_&&i<0){if(u&&c===_)throw new Error("Internal error 0x11 while extrapolating.");u=!0,c=_,l=0,s++,h=_,o&&d.push(h)}if(0===p&&-1===i)a=_-1;else{a=e.startOfBar(p+i);var f=e.startOfBar(n.SessionStage.POST_SESSION);a>f&&(e.moveTo(f),a=e.startOfBar(0))}}l++}return{time:h,times:d,count:s}}},IMMp:function(e){ e.exports=JSON.parse('{"color-bg-primary":"color-cold-gray-850","color-bg-primary-hover":"color-cold-gray-800","color-bg-secondary":"color-cold-gray-900","color-bg-highlight":"color-cold-gray-900","color-bg-scroll-buttons":"color-cold-gray-800","color-legacy-bg-scroll-buttons":"color-cold-gray-550","color-legacy-bg-widget":"color-cold-gray-900","color-text-primary":"color-cold-gray-200","color-text-secondary":"color-cold-gray-500","color-text-tertiary":"color-cold-gray-400","color-text-disabled":"color-cold-gray-650","color-divider":"color-cold-gray-700","color-divider-hover":"color-cold-gray-800","color-box-shadow":"color-black","color-active-hover-text":"color-gull-gray","color-alert-text":"color-loblolly","color-border":"color-bright-gray","color-border-chat-fields":"color-bright-gray","color-border-hover":"color-trout-1","color-border-table":"color-cold-gray-800","color-brand":"color-tv-blue-700","color-brand-active":"color-tv-blue-600","color-brand-hover":"color-tv-blue-600","color-button-hover-bg":"color-mirage-3","color-chart-page-bg":"color-cold-gray-800","color-common-tooltip-bg":"color-cold-gray-650","color-danger":"color-ripe-red-600","color-depthrenderer-fill-style":"color-catskill-white","color-depthrenderer-stroke-style":"color-trout-1","color-disabled-border-and-color":"color-ebony-clay","color-disabled-input":"color-bright-gray","color-empty-container-message":"color-slate-gray","color-highlight-new":"color-dark-slate-blue","color-icons":"color-slate-gray","color-input-bg":"color-charade","color-input-textarea-readonly":"color-trout-1","color-input-placeholder-text":"color-cold-gray-700","color-input-publish-bg":"color-mirage-1","color-item-active-blue":"color-blue-dianne","color-item-hover-active-bg":"color-charade","color-item-hover-bg":"color-ebony-clay","color-item-hover-blue":"color-blue-dianne","color-item-selected-blue":"color-blue-dianne","color-item-active-text":"color-cold-gray-200","color-item-active-bg":"color-tv-blue-700","color-link":"color-tv-blue-700","color-link-hover":"color-tv-blue-600","color-link-active":"color-tv-blue-600","color-list-item":"color-slate-gray","color-list-nth-child-bg":"color-mirage-3","color-news-highlight":"color-charade","color-pane-bg":"color-mirage-1","color-pane-secondary-bg":"color-cold-gray-850","color-placeholder":"color-trout-2","color-popup-menu-item-hover-bg":"color-cold-gray-800","color-popup-menu-separator":"color-cold-gray-700","color-row-hover-active-bg":"color-ebony-clay","color-sb-scrollbar-body-bg":"color-trout-2","color-screener-description":"color-loblolly","color-section-separator-border":"color-bright-gray","color-separator-table-chat":"color-bright-gray","color-success":"color-minty-green-700","color-success-hover":"color-minty-green-600","color-success-active":"color-minty-green-500","color-tag-active-bg":"color-bright-gray","color-tag-hover-bg":"color-charade","color-text-regular":"color-loblolly","color-toolbar-button-text":"color-cold-gray-500","color-toolbar-button-text-hover":"color-cold-gray-450","color-toolbar-button-text-active":"color-tv-blue-700","color-toolbar-button-text-active-hover":"color-tv-blue-600","color-toolbar-button-background-hover":"color-cold-gray-800","color-toolbar-button-background-secondary-hover":"color-cold-gray-750","color-toolbar-toggle-button-background-active":"color-tv-blue-700","color-toolbar-toggle-button-background-active-hover":"color-tv-blue-600","color-toolbar-interactive-element-text-normal":"color-cold-gray-300","color-toolbar-interactive-element-text-hover":"color-cold-gray-250","color-toolbar-opened-element-bg":"color-cold-gray-800","color-tooltip-bg":"color-bright-gray","color-tv-button-checked":"color-slate-gray","color-tv-dialog-caption":"color-athens-gray-2","color-tv-dropdown-item-hover-bg":"color-charade","color-underlined-text":"color-gull-gray","color-widget-pages-bg":"color-cold-gray-900","color-warning":"color-tan-orange-700","color-forex-icon":"color-white","color-list-item-active-bg":"color-medium-blue","color-list-item-hover-bg":"color-ebony-clay","color-list-item-text":"color-loblolly","color-price-axis-label-back":"color-cold-gray-800","color-price-axis-label-text":"color-cold-gray-500","color-price-axis-gear":"color-cold-gray-500","color-price-axis-gear-hover":"color-cold-gray-400","color-price-axis-highlight":"color-cold-gray-800","color-bid":"color-tv-blue-700","color-scroll-bg":"color-cold-gray-750","color-scroll-border":"color-cold-gray-850","color-widget-border":"color-cold-gray-800","color-scroll-buttons-arrow":"color-white","color-control-intent-default":"color-cold-gray-650","color-control-intent-success":"color-minty-green-600","color-control-intent-primary":"color-tv-blue-700","color-control-intent-warning":"color-tan-orange-500","color-control-intent-danger":"color-ripe-red-700","color-growing":"color-minty-green-600","color-falling":"color-ripe-red-600","color-pre-market":"color-tan-orange-600","color-pre-market-bg":"color-tan-orange-400","color-post-market":"color-tv-blue-500","color-post-market-bg":"color-tv-blue-400","color-market-open":"color-minty-green-500","color-market-open-bg":"color-minty-green-400","color-market-closed":"color-cold-gray-400","color-market-holiday":"color-cold-gray-400","color-invalid-symbol":"color-ripe-red-400","color-invalid-symbol-hover":"color-ripe-red-500","color-replay-mode":"color-tv-blue-700","color-replay-mode-icon":"color-tv-blue-50","color-replay-mode-hover":"color-tv-blue-600","color-notaccurate-mode":"color-berry-pink-600","color-notaccurate-mode-bg":"color-berry-pink-400","color-delay-mode":"color-tan-orange-600","color-delay-mode-bg":"color-tan-orange-400","color-eod-mode":"color-grapes-purple-400","color-eod-mode-bg":"color-grapes-purple-400","color-data-problem":"color-ripe-red-600","color-data-problem-bg":"color-ripe-red-400","color-data-problem-hover":"color-ripe-red-500","color-list-item-bg-highlighted":"color-tv-blue-a900","color-list-item-bg-selected":"color-tv-blue-a800","color-list-item-bg-highlighted-hover":"color-tv-blue-a800","color-list-item-bg-selected-hover":"color-tv-blue-a700","color-screener-header-bg":"color-cold-gray-850","color-screener-header-bg-hover":"color-cold-gray-800"}') },IOzl:function(e,t,i){"use strict";i.r(t);var n,r=i("mrSG"),o=i("aO4+"),s=i("Eyy1"),a=i("2WC2"),l=i("gBDZ"),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.setData=function(e,t){this._setBaseData(e,t);for(var i=0,n=this._items;i=0?e.vertOffset:e.vertOffset-e.shapeHeight},t}(c),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype._calcBoundingBox=function(e){var t=e.x-e.shapeWidth/2,i=e.x+e.shapeWidth/2,n=e.y-e.shapeHeight+e.vertOffset,r=e.y+e.vertOffset,s=new o.Point(t,n),a=new o.Point(i,r);return Object(o.box)(s,a)},t.prototype._drawItemShape=function(e,t,i){var r=t.pixelRatio,o=this._lineWidth(t)%2?.5:0,s=Math.max(1,Math.floor(r))%2?.5:0,a=this._getArrowSize(i),l=Math.round(a*r);(s+l)%1!=o%1&&(l+=.5);var c=Math.round(i.shapeWidth/2*r);(s+c)%1!=o%1&&(c+=.5);var u=Math.round(i.x*r)+s,h=Math.round((i.y+i.vertOffset)*r)+o,d=u+l,p=Math.round((i.y+i.vertOffset-a)*r)+o,_=u-l,f=u+c,m=Math.round((i.y+i.vertOffset-i.shapeHeight)*r)+o,v=u-c;e.moveTo(d,p),e.lineTo(u,h),e.lineTo(_,p),i.shapeWidth<=2*a?(e.lineTo(v,p),this._drawCorner(e,v,m,n.leftUp,r),this._drawCorner(e,f,m,n.rightUp,r),e.lineTo(f,p)):(this._drawCorner(e,v,p,n.leftDown,r),this._drawCorner(e,v,m,n.leftUp,r),this._drawCorner(e,f,m,n.rightUp,r),this._drawCorner(e,f,p,n.rightDown,r)),e.lineTo(d,p)},t.prototype._getVerticalTextOffset=function(e){return-e.shapeHeight/2-this._getArrowSize(e)/2},t.prototype._calcVertOffset=function(e){return Math.sign(e.vertOffset)<=0?e.vertOffset:e.vertOffset+e.shapeHeight},t}(c),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype._calcBoundingBox=function(e){var t=e.x,i=e.x+e.shapeWidth,n=e.y-e.shapeHeight/2+e.vertOffset,r=e.y+e.shapeHeight/2+e.vertOffset,s=new o.Point(t,n),a=new o.Point(i,r);return Object(o.box)(s,a)},t.prototype._drawItemShape=function(e,t,i){var r=t.pixelRatio,o=this._lineWidth(t)%2?.5:0,s=this._getArrowSize(i),a=this._hasText(i),l=a?i.shapeHeight/2:s,c=Math.round(i.x*r)+o,u=Math.round((i.y+i.vertOffset)*r)+o,h=Math.round((i.x+s)*r)+o,d=Math.round((i.y+i.vertOffset+s)*r)+o,p=Math.round((i.y+i.vertOffset-s)*r)+o,_=Math.round((i.y+i.vertOffset-l)*r)+o,f=Math.round((i.x+i.shapeWidth)*r)+o,m=Math.round((i.y+i.vertOffset+l)*r)+o;e.moveTo(h,d),e.lineTo(c,u),e.lineTo(h,p),a?this._drawCorner(e,h,_,n.leftUp,r):e.lineTo(h,_),this._drawCorner(e,f,_,n.rightUp,r),this._drawCorner(e,f,m,n.rightDown,r),a?this._drawCorner(e,h,m,n.leftDown,r):e.lineTo(h,m),e.lineTo(h,d)},t.prototype._getHorizontalTextOffset=function(e){return e.shapeWidth/2+this._getArrowSize(e)/2},t}(c),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype._calcBoundingBox=function(e){var t=e.x-e.shapeWidth,i=e.x,n=e.y-e.shapeHeight/2+e.vertOffset,r=e.y+e.shapeHeight/2+e.vertOffset,s=new o.Point(t,n),a=new o.Point(i,r);return Object(o.box)(s,a)},t.prototype._drawItemShape=function(e,t,i){ var r=t.pixelRatio,o=this._lineWidth(t)%2?.5:0,s=this._getArrowSize(i),a=this._hasText(i),l=a?i.shapeHeight/2:s,c=Math.round(i.x*r)+o,u=Math.round((i.y+i.vertOffset)*r)+o,h=Math.round((i.x-s)*r)+o,d=Math.round((i.y+i.vertOffset-s)*r)+o,p=Math.round((i.y+i.vertOffset+s)*r)+o,_=Math.round((i.y+i.vertOffset-l)*r)+o,f=Math.round((i.x-i.shapeWidth)*r)+o,m=Math.round((i.y+i.vertOffset+l)*r)+o;e.moveTo(h,d),e.lineTo(c,u),e.lineTo(h,p),a?this._drawCorner(e,h,m,n.rightDown,r):e.lineTo(h,m),this._drawCorner(e,f,m,n.leftDown,r),this._drawCorner(e,f,_,n.leftUp,r),a?this._drawCorner(e,h,_,n.rightUp,r):e.lineTo(h,_),e.lineTo(h,d)},t.prototype._getHorizontalTextOffset=function(e){return-e.shapeWidth/2-this._getArrowSize(e)/2},t}(c),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype._calcBoundingBox=function(e){var t=e.x-e.shapeWidth/2,i=e.x+e.shapeWidth/2,n=e.y-e.shapeHeight/2+e.vertOffset,r=e.y+e.shapeHeight/2+e.vertOffset,s=new o.Point(t,n),a=new o.Point(i,r);return Object(o.box)(s,a)},t.prototype._drawItemShape=function(e,t,i){var r=t.pixelRatio,o=this._lineWidth(t)%2?.5:0,s=i.shapeHeight/2,a=i.shapeWidth/2,l=Math.round(i.x*r)+o,c=Math.round((i.x-a)*r)+o,u=Math.round((i.x+a)*r)+o,h=Math.round((i.y+i.vertOffset-s)*r)+o,d=Math.round((i.y+i.vertOffset+s)*r)+o;e.moveTo(l,h),this._drawCorner(e,u,h,n.rightUp,r),this._drawCorner(e,u,d,n.rightDown,r),this._drawCorner(e,c,d,n.leftDown,r),this._drawCorner(e,c,h,n.leftUp,r),e.lineTo(l,h)},t}(c)},IVMC:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.reduce((function(e,t,i){return~e.indexOf(t)||e.push(t),e}),[])},e.exports=t.default},IWXC:function(e,t,i){"use strict";i.r(t),i.d(t,"getQuoteSessionInstance",(function(){return s})),i.d(t,"setQuoteSessionInstance",(function(){return a})),i.d(t,"getQuoteSessionNoEnsure",(function(){return l})),i.d(t,"destroyQuoteSessions",(function(){return c}));var n=i("hGf4"),r=i.n(n),o={};function s(e){return void 0===e&&(e="full"),o[e]||a(e,new r.a(e)),o[e]}function a(e,t){void 0===e&&(e="full"),o[e]=t}function l(e){return void 0===e&&(e="full"),o[e]}function c(){for(var e in o)if(o.hasOwnProperty(e)){var t=o[e];void 0!==t&&t.destroy(),delete o[e]}}},Ialn:function(e,t,i){"use strict";i.r(t),i.d(t,"isRtl",(function(){return r})),i.d(t,"stripLTRMarks",(function(){return s})),i.d(t,"startWithLTR",(function(){return a})),i.d(t,"forceLTRStr",(function(){return l})),i.d(t,"forceLTRStrSsr",(function(){return c})),i.d(t,"forceRTLStr",(function(){return u})),i.d(t,"getLTRScrollLeft",(function(){return h})),i.d(t,"getLTRScrollLeftOffset",(function(){return d})),i.d(t,"detectAutoDirection",(function(){return f}));var n=i("oYVD"),r=function(){return"rtl"===window.document.dir},o=new RegExp("‎|‪|‫|‬","g");function s(e){return""!==e&&r()&&null!=e?e.replace(o,""):e}function a(e){return""!==e&&r()&&null!=e?"‎"+e:e}function l(e){return""!==e&&r()&&null!=e?"‪"+e+"‬":e}function c(e){return"‪"+e+"‬"}function u(e){return""!==e&&r()&&null!=e?"‫"+e+"‬":e} function h(e){return Object(n.getNormalizedScrollLeft)(e,"rtl")}function d(e,t){var i=Object(n.detectScrollType)();if("indeterminate"===i)return 0;switch(i){case"negative":t=e.clientWidth-e.scrollWidth+t;break;case"reverse":t=e.scrollWidth-e.clientWidth-t}return t}var p=/[^\u0000-\u0040\u005B-\u0060\u007B-\u00BF\u00D7\u00F7\u02B9-\u02FF\u2000-\u200E\u2010-\u2029\u202C\u202F-\u2BFF]/,_=/[\u0590-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC]/;function f(e){var t=p.exec(e);return t?_.test(t[0])?"rtl":"ltr":""}},IcDj:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyBase",(function(){return _}));var n=i("mrSG"),r=(i("Eyy1"),i("aIyQ")),o=i.n(r),s=i("7ktv"),a=i("5fI3"),l=i("jy4L"),c=i("YWnQ"),u=i("/tGj"),h=i("e1Hy"),d=i("W+6j"),p=window.t("Invalid Symbol"),_=function(e){function t(i,n,r,s){var a=e.call(this,i)||this;return a.onStart=new o.a,a._symbolsResolved=new o.a,a._statusChanged=new o.a,a._paneViews=[],a._resolvedSymbols={},a._isChildStudy=!1,a._loading=!0,a._failed=!1,a._status="",a._studyId=null,a._chartApi=i.chartApi(),a._properties=n,a._metaInfo=s,a._series=a._model.mainSeries(),r instanceof t?(a._source=r,a._isChildStudy=!0,a._source.setChild(a),a._source.currencyChanged().subscribe(a,a._onSourceCurrencyChanged)):a._series.currencyChanged().subscribe(a,a._onSourceCurrencyChanged),a}return Object(n.__extends)(t,e),t.prototype.destroy=function(){this._source&&this._source.currencyChanged().unsubscribeAll(this),this._series&&this._series.currencyChanged().unsubscribeAll(this)},t.prototype.isSymbolInvalid=function(){return this._status===p},t.prototype.getSymbolString=function(e){return Object(a.encodeExtendedSymbol)(this._getSymbolObject(e))},t.prototype.onStatusChanged=function(){return this._statusChanged},t.prototype.symbolsResolved=function(){return this._symbolsResolved},t.prototype.valuesProvider=function(){return new h.a(this,this.model())},t.prototype.statusProvider=function(e){return new d.a(this,this._model.properties().scalesProperties.textColor)},t.prototype._allSymbolsAreResolved=function(){for(var e=this,t=[],i=this.metaInfo(),n=0;n=this._sessionEndMs?u.SessionStage.POST_SESSION:d(n.time_seconds_diff(e,this._sessionStartMs)/this._periodSec)},t.prototype.startOfBar=function(e){if(e===u.SessionStage.PRE_SESSION){var t=n.get_cal_from_unix_timestamp_ms(this._session.timezone,this._sessionStartMs-1),i=this._session.spec.alignToNearestSessionEnd(t,-1);return n.cal_to_utc(this._session.timezone,i)}if(e===u.SessionStage.POST_SESSION)return this._sessionEndMs;if(e<0)throw new Error("Negative offset is not supported");return this._sessionStartMs+n.time_seconds(this._periodSec*e)},t.prototype.endOfBar=function(e){if(e<0)throw new Error("Index cannot be negative");var t=this.startOfBar(e)+1e3*this._periodSec ;return t>this._sessionEndMs?this._sessionEndMs:t},t.prototype.isLastBar=function(e,t){return t>=this._sessionStartMs+n.time_seconds(this._periodSec*(e+1)-1)},t.prototype.moveTo=function(e){var t=this._session.timezone,i=n.utc_to_cal(t,e),r=this._session.spec.alignToSessionStart(i);this._sessionStartMs=n.cal_to_utc(t,i),n.add_minutes(i,r),this._sessionEndMs=n.cal_to_utc(t,i)},t.prototype.moveNext=function(){this.moveTo(this._sessionEndMs)},t}(_),m=i("OBgQ");function v(e,t){var i=n.clone(t),r=e.businessDaysToCalendarDays(i,1);r>1&&n.add_date(i,r-1);var o=e.leftBorderOfDailyBar(i);if(null===o)throw new Error("Cannot calculate left border of daily bar");return n.cal_to_utc(n.get_timezone(e.timezone()),o)}var y=function(e){function t(t,i,n,r,o){void 0===o&&(o=!1);var s=e.call(this)||this;return s._periodStart=-Number.MAX_VALUE,s._periodEnd=-Number.MAX_VALUE,s._periodLastBarStart=-Number.MAX_VALUE,s._periodStartDay=new m.a(0,0,0),s._periodEndDay=new m.a(0,0,0),s._period=n,s._sessionTgt=t,s._builder=r,s._useBusinessDays=o,s._sessionSrc=o?new p("Etc/UTC","24x7"):i||t,s}return Object(c.__extends)(t,e),t.prototype.builder=function(){return this._builder},t.prototype.alignTimeIfPossible=function(e){return this.tradingDayToSessionStart(e)},t.prototype.tradingDayToSessionStart=function(e){return this.moveTo(e),this.startOfBar(0)},t.prototype.indexOfBar=function(e){if(this._useBusinessDays){var t=m.a.fromCalendar(n.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e));return t.before(this._periodStartDay)?u.SessionStage.PRE_SESSION:this._periodEndDay.before(t)?u.SessionStage.POST_SESSION:0}return e=this._periodEnd?u.SessionStage.POST_SESSION:0},t.prototype.startOfBar=function(e){if(e===u.SessionStage.PRE_SESSION){var t=n.get_cal_from_unix_timestamp_ms(this._sessionTgt.timezone,this._periodStart-1),i=this._sessionTgt.spec.alignToNearestSessionEnd(t,-1);return n.cal_to_utc(this._sessionTgt.timezone,i)-1}return e===u.SessionStage.POST_SESSION||e>0?this._periodEnd:e===u.SessionStage.LASTBAR_SESSION?this._periodLastBarStart:this._periodStart},t.prototype.moveTo=function(e){var t=n.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e);this._sessionSrc.spec.correctTradingDay(t);var i=n.get_year(t),r=this._indexOfPeriodInYear(t),o=r+this._period,s=this._sessionTgt.spec,a=this._sessionTgt.timezone,l=this._builder.startOfPeriod(a,r,i);this._periodStart=v(s,l);var c=n.clone(l),u=s.businessDaysToCalendarDays(c,1);u>1&&n.add_date(c,u-1),this._periodStartDay=m.a.fromCalendar(c);var h=this._builder.startOfPeriod(a,o,i);this._periodEnd=v(s,h);var d=n.clone(h);for(n.add_date(d,-1);s.isCalWeekEnd(d);)n.add_date(d,-1);this._periodEndDay=m.a.fromCalendar(d),n.add_date(h,-1),function(e,t){for(;e.isCalWeekEnd(t);)n.add_date(t,-1)}(this._sessionTgt.spec,h),this._periodLastBarStart=v(s,h),(this._periodLastBarStart=this._periodLastBarStart},t.prototype.currentRange=function(){return{from:this._periodStartDay,to:this._periodEndDay}},t.prototype.indexOfBarInYear=function(e){var t=n.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e),i=n.get_year(t),r=this._builder.indexOfPeriod(t),o=this._sessionTgt.timezone,s=this._builder.startOfPeriod(o,r,i),a=v(this._sessionTgt.spec,s);return s=n.get_cal_from_unix_timestamp_ms(n.get_timezone("Etc/UTC"),a),i=0&&(r-=7),d((r+i)/7))}var S=function(){function e(){}return e.prototype.indexOfPeriod=function(e){return n.get_day_of_year(e)-1},e.prototype.startOfPeriod=function(e,t,i){var r=n.days_per_year(i);return n.get_cal(n.get_timezone("Etc/UTC"),i,n.JANUARY,1+Math.min(t,r))},e}(),w=function(e){function t(t){var i=e.call(this)||this;return i._sessionsSpec=t,i}return Object(c.__extends)(t,e),t.prototype.indexOfPeriod=function(t){return e.prototype.indexOfPeriod.call(this,t)-function(e,t){var i=b(e,t),r=n.get_cal(n.get_timezone("Etc/UTC"),n.get_year(t),n.JANUARY,1);n.add_date(r,7*i);var o=i*e.weekEndsCount()+e.holidaysFromYearStart(r),s=n.get_day_of_year(t)-n.get_day_of_year(r);return o+s-e.calendarDaysToBusinessDays(r,s)}(this._sessionsSpec,t)},t.prototype.startOfPeriod=function(t,i,r){var o=7-this._sessionsSpec.weekEndsCount(),s=Math.max(0,d(i/o)-1),a=n.get_cal(n.get_timezone("Etc/UTC"),r,n.JANUARY,1),l=n.get_days_per_year(a);if(n.add_date(a,7*s),(i-=o*s-this._sessionsSpec.holidaysFromYearStart(a))>0){var c=this._sessionsSpec.businessDaysToCalendarDays(a,i);n.add_date(a,c)}var u=n.get_day_of_year(a)-1;return rn.get_days_per_year(r)?this.startOfPeriod(e,0,i+1):(n.add_date(r,s),r)},e}(),x=function(){function e(){}return e.prototype.indexOfPeriod=function(e){return n.get_month(e)},e.prototype.startOfPeriod=function(e,t,i){if(t<0){var r=d((11-t)/12);i-=r,t+=12*r}else t>n.DECEMBER&&(i++,t=n.JANUARY);return n.get_cal(n.get_timezone("Etc/UTC"),i,t,1)},e}();function T(e,t,i,n){void 0===n&&(n=!1);var r=o.Interval.parse(e),s=r.multiplier();return r.kind()===o.ResolutionKind.Minutes?new f(60*s,t):r.kind()===o.ResolutionKind.Seconds?new f(s,t):r.kind()===o.ResolutionKind.Range?new f(60*s,t):new y(t,i,s,function(e,t){switch(e){case o.ResolutionKind.Days:return new P(t);case o.ResolutionKind.Weeks:return new C(t);case o.ResolutionKind.Months:return new x}throw new Error("Unknown dwm resolution: "+e)}(r.kind(),t),n)}function I(e,t,i,n,r,a,l){var c,u,h=new p("Etc/UTC",e,t,i),d=o.Interval.parse(r+n),_=d.isDWM();_?(u=s(d,l),c=864e5):(u=d.inMilliseconds(),c=60*h.spec.findSession(0,0,0).getEntry().length()*1e3);var f=c/u,m=(_?7:7-h.spec.weekEndsCount())*f;return as.startOffset()+s.length()&&r===s.dayOfWeek()-1&&(r++,o-=1440),r===s.dayOfWeek()&&o>=s.startOffset()&&o0&&(e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=i,Object(c.setLineStyle)(e,u.LINESTYLE_SOLID),this._extendAndDrawLineSegment(e,s,l,t),this._extendAndDrawLineSegment(e,h,a,t),Object(c.drawLine)(e,s.x,s.y,h.x,h.y),Object(c.drawLine)(e,l.x,l.y,a.x,a.y)),e.restore()}},e.prototype._getPointsInPhysicalSpace=function(e,t){void 0===t&&(t=0);var i=Object(n.ensureNotNull)(this._data).points,o=i[0],s=i[1],a=e.pixelRatio,l=Math.round(o.x*a)+t,c=Math.round(s.x*a)+t,u=Math.round(o.y*a)+t,h=Math.round(s.y*a)+t;return[new r.Point(l,u),new r.Point(c,h)]},e.prototype._extendAndHitTestLineSegment=function(e,t,i,n){var r=this._extendAndClipLineSegment(t,i,n);if(null!==r&&Object(s.distanceToSegment)(r[0],r[1],e).distance<=3)return this._hitTestResult;return null},e.prototype._extendAndDrawLineSegment=function(e,t,i,n){var r=this._extendAndClipLineSegment(t,i,n);null!==r&&Object(c.drawLine)(e,r[0].x,r[0].y,r[1].x,r[1].y)},e.prototype._extendAndClipLineSegment=function(e,t,i){var o=Object(n.ensureNotNull)(this._data);if(Object(r.equalPoints)(e,t))return null;var s=i.physicalWidth,a=Math.min(e.x,t.x),l=Math.max(e.x,t.x),c=o.extendLeft?0:Math.max(a,0),u=o.extendRight?s:Math.min(l,s);return c>u||u<=0||c>=s?null:[new r.Point(c,e.y),new r.Point(u,t.y)]},e.prototype._drawBackground=function(e,t,i,n){if(!(n.cssWidth<=0||n.cssHeight<=0)){var r=this._extendAndClipLineSegment(t,i,n);if(null!==r){var o=r[0],s=r[1];e.beginPath(),e.moveTo(o.x,o.y),e.lineTo(s.x,o.y),e.lineTo(s.x,s.y),e.lineTo(o.x,s.y),e.lineTo(o.x,o.y),e.fillStyle=this.getColor(),e.fill()}}},e.prototype._hitTestBackground=function(e,t,i,n){var s=this._extendAndClipLineSegment(t,i,n);return null!==s&&Object(o.pointInBox)(e,Object(r.box)(s[0],s[1]))?this._backHitTestResult:null},e}()},InMJ:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Flat Bottom");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),this.version=s.version, i.e("lt-pane-views").then(function(e){var t=i("gr7S").FlatBottomPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.version=1,s.prototype.pointsCount=function(){return 3},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Flat Bottom"},s.prototype.hasEditableCoordinates=function(){return!1},s.prototype.addPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),n.prototype.addPoint.call(this,e)},s.prototype.setLastPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),n.prototype.setLastPoint.call(this,e)},s.prototype.setPoint=function(e,t,i){if(i&&i.shift()&&1===e){this._snapPoint45Degree(t,this.points()[0])}if(2===e)this._points[1].index=t.index;else if(3===e)return this._points[0].index=t.index,this._points[2].price=t.price,void this.normalizePoints();n.prototype.setPoint.call(this,e,t)},s.prototype.canHasAlert=function(){return!0},s.prototype._getAlertPlots=function(){var e=this._points[0],t=this._points[1],i=[];e.index<=t.index?(i.push(e),i.push(t)):(i.push(t),i.push(e));var n=this._points[2];n.time=t.time,n.index=t.index;var r,o,s,a,l={price:n.price,time:e.time,index:e.index},c=[];n.index<=l.index?(c.push(n),c.push(l)):(c.push(l),c.push(n)),i[0].price>c[0].price?(r=i,o=c):c[0].price>i[0].price||c[1].price>i[1].price?(r=c,o=i):(r=i,o=c);var u=this.properties().extendLeft.value(),h=this.properties().extendRight.value();return e.index<=t.index?(s=u,a=h):(s=h,a=u),[this._linePointsToAlertPlot(r,"Upper",s,a),this._linePointsToAlertPlot(o,"Lower",u,a)]},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("vm8R").GeneralTrendFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolflatbottom",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolFlatBottom=s},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){var i,n,r=0;function o(){e.apply(n,i)}return function(){n=this,i=arguments,clearTimeout(r),r=setTimeout(o,t)}}},JT5O:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyMarket",(function(){return o}));var n=i("aIyQ"),r=i.n(n),o=function(){function e(e,t){this.visibilityChanged=new r.a,this._dialogPromise=null,this._dialog=null,this._chartWidgetCollection=e,this._options=t}return e.prototype.isVisible=function(){return null!==this._dialog&&this._dialog.isVisible()},e.prototype.show=function(e){var t;null===this._dialog&&this._requestDialog(e),null===(t=this._dialog)||void 0===t||t.open(e)},e.prototype.hide=function(){var e;null===(e=this._dialog)||void 0===e||e.hide()},e.prototype.onCustomScriptModified=function(){var e ;null===(e=this._dialog)||void 0===e||e.updateUserStudies()},e.prototype.resetAllPages=function(){var e;null===(e=this._dialog)||void 0===e||e.resetAllStudies()},e.prototype._requestDialog=function(e){var t=this;if(null===this._dialogPromise){var n=void 0;n=Promise.all([i.e("react"),i.e(1),i.e(3),i.e(6),i.e(7),i.e(8),i.e(10),i.e(13),i.e(33),i.e(65),i.e(66),i.e(74),i.e(0),i.e(5),i.e(11),i.e("study-market")]).then(i.bind(null,"zbLM")).then((function(e){return new e.IndicatorsLibraryContainer(t._chartWidgetCollection,t._options)})),this._dialogPromise=n.then((function(i){t._dialog=i,t._dialog.getVisibilityChanged().subscribe(null,(function(e){t.visibilityChanged.fire(e)})),t._dialog.open(e)}))}return this._dialogPromise},e}()},JWMC:function(e,t,i){"use strict";i.r(t),i.d(t,"trackEvent",(function(){return l}));i("bSeV");var n=i("FQhm"),r=i("Kxc7"),o=i("txPx"),s=Object(o.getLogger)("Common.TrackEvent"),a=[/Study_(Drawing)_(.*)/,/(Study)_(.*)@tv-basicstudies/,/(Study)_(.*)/,/(Chart Style) (.*)/],l=function(e,t,i){if(r.enabled("charting_library_base"))!function(e,t,i){t=t||e||i||"";for(var r="",o=0;o=22)return t;for(var i={},n=0,r=0;;){var o=t[r];if(void 0===o)break;var s=t[o.id];o.isFake&&(o.id="in_"+n++),i[r]=o,i[o.id]=s,r++}return i}]}u.prototype.updateMetaInfo=function(e){if(!e)return e;n(!e.isTVScript,"This method should update only built-in java indicators metaInfo. For Pine indicators use updateMetaInfoAsync");for(var t=null,i=this._studiesMetainfo,r=0;r=12&&l<=26){var c={};for(s=0;s=12&&c<=26){var h=r.columns;r.columns=[];for(var d=0;dt&&o.logWarn("Bad integer input max value in metaInfo id="+e.id+" title="+e.description))}},u._fixInputsMaxValue=function(e,t){if(!TradingView.isAbsent(t)){var i=u.INPUT_MAX_VALUE;if(t.inputs)for(var n=0;ni&&(a.max=i))}if(e&&e.inputs){var r=u.splitInputs(e.inputs),o=r.arr;for(var s in o){var a;"integer"===(a=o[s]).type&&(a.max&&a.max>i&&(a.max=i))}e.inputs=TradingView.merge(r.obj,r.arr)}}},u.prototype.patchPropsStateAndMetaInfo=function(e,t,i){"Script$BOOKER"!==t.productId||t.alerts||delete e.alerts,u._fixInputsOrder(e,t),u._fixInputsMaxValue(e,t);var n=u.splitInputs(e.inputs);e.inputs=n.obj;var r=a.versionOf(t);ri&&(i=r))}e[i+1]=t},u.splitInputs=function(e){var t={},i={};for(var n in e)isNumber(parseInt(n,10))?t[n]=e[n]:i[n]=e[n];return{arr:t,obj:i}},u.findInputKeyById=function(e,t){var i=null;for(var n in e)if(isNumber(parseInt(n,10))&&e[n].id===t){i=n;break}return i},u.getInputKeyById=function(e,t){var i=u.findInputKeyById(e,t);if(!i)throw new Error("Cannot find input with id: "+t);return i},e.exports=u},K8V9:function(e,t){e.exports=''},K9GE:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.color=t.CubicBezier=t.easingFunc=t.dur=void 0,t.dur=350,t.easingFunc={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:(4-2*e)*e-1},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};var n=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){for(var t=e,i=0;i<4;++i){var n=this._getSlope(t);if(0===n)return t;t-=(this._calcBezier(t)-e)/n}return t},e}();t.CubicBezier=n,t.color={black0:"#000",black20:"#2b2d36",black25:"#2b2e37",black27:"#2f3241",black30:"#212121",black70:"#4A4A4A",black80:"#535353",black100:"#646464",black110:"#757575",black140:"#8A8A8A",black170:"#ADAEB0",black180:"#b4b4b4",black200:"#C8C8C8",black220:"#DADDE0",black230:"#ECECEC",black240:"#F2F2F2",black248:"#F8F8F8",black255:"#FFF",brand:"#3BB3E4",brandHover:"#3BABD8",brandActive:"#3898C2",brandDown:"#049DDC",brand220:"#3BB3E0",brand255:"#3BB3FF",brandNew:"#37A6EF",brandNew2:"#2196F3",spinner:"#00A2E2",brandMedium80:"#3C4650",brandMedium90:"#465a6e",brandMedium100:"#627384",brandMedium120:"#758696",brandMedium150:"#94959C",brandMedium190:"#9DB2BD",brandMedium220:"#E9EFF2",brandMedium230:"#EAECEF",brandMedium240:"#F1F3F6",brandDark:"#2A2C39",brandDark50:"#252733",brandDark45:"#20222D",brandDarkText:"#6A6B74",danger:"#FF4A68",dangerHover:"#F24965",dangerDown:"#FF173E",success:"#3CBC98",success55:"#37BC9B",success250:"#00FFC0",successHover:"#38B395",successDown:"#00A97F",attention:"#FFC84A",attention50:"#F89E30",growing:"#37bc9b",falling:"#ff4a68"}},KUek:function(e,t,i){"use strict";i.r(t);var n,r,o=i("mrSG"),s=i("Eyy1"),a=i("aIyQ"),l=i.n(a),c=i("k9/m"),u=i("hsV8"),h=i("jy4L"),d=i("w4Ji"),p=i("jenN"),_=i("txPx"),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"}(n||(n={})),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"}(r||(r={}));var m=function(){function e(e,t,i,o){this._inputs=null,this._status=r.Idle,this._studyId=null,this._turnaroundCounter=1,this._studyStatus={type:n.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._ongoingDataUpdate=Promise.resolve(),this._gateway=e,this._metaInfo=o,this._series=t,this._turnaroundPrefix=i,this._plots=new c.PlotList(Object(d.studyPlotFunctionMap)(o),d.studyEmptyPlotValuePredicate),this._gateway.isConnected().subscribe(this._boundOnGatewayIsConnectedChanged)}return e.prototype.destroy=function(){this.stop(),this._gateway.isConnected().unsubscribe(this._boundOnGatewayIsConnectedChanged),this._dataUpdated.destroy(), this._dataCleared.destroy(),this._studyStatusChanged.destroy()},e.prototype.metaInfo=function(){return this._metaInfo},e.prototype.inputs=function(){return this._inputs},e.prototype.setInputs=function(e){this._inputs=e,null!==this._studyId&&(this._turnaroundCounter++,this._onStudyStatusChangedTo({type:n.Undefined}),this._gateway.modifyStudy(this._studyId,this._turnaround(),e,this._onMessage.bind(this)),this._status===r.Active&&this._changeStatusTo(r.AwaitingFirstDataUpdate))},e.prototype.isStarted=function(){return this._status!==r.Idle},e.prototype.isActive=function(){return this._status===r.Active},e.prototype.start=function(){this.isStarted()?f.logNormal("start: data source is already started, nothing to do"):(Object(s.assert)(null!==this._inputs,"Inputs should be defined when starting a study data source"),this._gateway.isConnected().value()?this._createStudy():this._changeStatusTo(r.AwaitingConnection))},e.prototype.stop=function(){this.isStarted()?(null!==this._studyId&&(this._gateway.removeStudy(this._studyId),this._studyId=null,this._onStudyStatusChangedTo({type:n.Undefined})),this._changeStatusTo(r.Idle)):f.logNormal("stop: data source is already stopped, nothing to do")},e.prototype.studyId=function(){return this._studyId},e.prototype.studyStatus=function(){return this._studyStatus},e.prototype.studyStatusChanged=function(){return this._studyStatusChanged},e.prototype.plots=function(){return this._plots},e.prototype.graphics=function(){return this._graphics},e.prototype.clearData=function(){this._plots.clear(),this._graphics.clear(),this._dataCleared.fire()},e.prototype.stopAndStealData=function(){Object(s.assert)(this._status===r.Active,"Couldn't steal data from non-active data source"),this.stop();var e=this._plots,t=this._graphics.extract();return this._plots=new c.PlotList(Object(d.studyPlotFunctionMap)(this._metaInfo),d.studyEmptyPlotValuePredicate),{plots:e,graphics:t}},e.prototype.dataCleared=function(){return this._dataCleared},e.prototype.dataUpdated=function(){return this._dataUpdated},e.prototype._changeStatusTo=function(e){Object(s.assert)(this._status!==e,"Source and destination status should be distinct"),f.logNormal("Status changed from "+r[this._status]+" to "+r[e]),this._status=e},e.prototype._createStudy=function(){var e=this._series.seriesId();null!=e?this._createStudyUsingParentId(e):(this._changeStatusTo(r.AwaitingParent),this._series.dataEvents().completed().subscribe(this,this._onSeriesCompleted,!0))},e.prototype._createStudyUsingParentId=function(e){Object(s.assert)(this._status!==r.Active,'Status should not be "Active" when creating a study'),Object(s.assert)(this._studyStatus.type===n.Undefined,'Study status should be "Undefined" when creating a study'),Object(s.assert)(null===this._studyId,"Study id should be empty when creating a study"),this._studyId=Object(h.makeNextStudyId)(),this._gateway.createStudy(this._studyId,this._turnaround(),e,this._metaInfo.fullId+"!",Object(s.ensureNotNull)(this._inputs),this._onMessage.bind(this)),this._changeStatusTo(r.AwaitingFirstDataUpdate)}, e.prototype._onGatewayIsConnectedChanged=function(e){e?this._onGatewayConnected():this._onGatewayDisconnected()},e.prototype._onGatewayConnected=function(){this._status===r.AwaitingConnection&&this._createStudy()},e.prototype._onGatewayDisconnected=function(){this._status!==r.Idle&&this._status!==r.AwaitingConnection&&(this._studyId=null,this._changeStatusTo(r.AwaitingConnection),this._studyStatus.type!==n.Undefined&&this._onStudyStatusChangedTo({type:n.Undefined})),this._turnaroundCounter=1},e.prototype._onSeriesCompleted=function(){this._status===r.AwaitingParent&&this._createStudyUsingParentId(Object(s.ensure)(this._series.seriesId()))},e.prototype._onStudyStatusChangedTo=function(e){var t=this._studyStatus;this._studyStatus=e,f.logNormal("Study status type changed from "+n[t.type]+" to "+n[e.type]),this._studyStatusChanged.fire(t,e)},e.prototype._onMessage=function(e){if("data_update"===e.method){var t=e.params,i=t.customId,n=t.turnaround,r=t.plots,o=t.nonseries;i===this._studyId&&this._checkTurnaround(n)&&this._onDataUpdate(r,o)}else if("study_loading"===e.method){var s=e.params,a=(i=s[0],n=s[1],s[2]);i===this._studyId&&this._checkTurnaround(n)&&this._onStudyLoading(a)}else if("study_completed"===e.method){var l=e.params;i=l[0],n=l[1],a=l[2];i===this._studyId&&this._checkTurnaround(n)&&this._onStudyCompleted(a)}else if("study_error"===e.method){var c=e.params,u=(i=c[0],n=c[1],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){var i=Object(u.unpackNonSeriesData)(t.d);return this._ongoingDataUpdate=this._ongoingDataUpdate.then((function(){return i}),(function(){return i})).then(this._onDataUnpacked.bind(this,e,t.indexes)),this._ongoingDataUpdate},e.prototype._onDataUnpacked=function(e,t,i){this._status!==r.Idle&&(this._status===r.AwaitingFirstDataUpdate&&(this._changeStatusTo(r.Active),this.clearData()),this._mergePlots(e),null!==i&&(i.indexes_replace?(Object(s.assert)("nochange"!==t),this._graphics.replaceIndexesTo(t)):("nochange"!==t&&this._graphics.replaceIndexesTo(t),void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),this._dataUpdated.fire(e,i,t))},e.prototype._onStudyLoading=function(e){this._onStudyStatusChangedTo({type:n.Loading,startTime:Date.now()})},e.prototype._onStudyError=function(e,t,i){this.clearData(),this._onStudyStatusChangedTo({type:n.Error,reason:e})},e.prototype._onStudyCompleted=function(e){this._onStudyStatusChangedTo({type:n.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"),y=i("Ocx9"),g=i("Kxc7");i.d(t,"sessionsPreferencesDefault",(function(){return S})),i.d(t,"Sessions",(function(){return w}));var b=new v.PriceFormatter,S={graphics:{backgrounds:{outOfSession:{color:"#2196F3", transparency:92,visible:!1},preMarket:{color:"#FF9800",transparency:92,visible:!1},postMarket:{color:"#2196F3",transparency:92,visible:!1}},vertlines:{sessBreaks:{color:"#4985e7",style:2,visible:!1,width:1}}}},w=function(){function e(e,t){var i=this;this._studySource=null,this._paneViews=[],this._metaInfo=null,this._destroyed=!1,this._isStarted=!1,this._loadedGraphics=null,this._model=e,this._doubleClickHandler=t;var n=e.mainSeries();this._properties=new y.DefaultProperty("sessions"),this._removeDuplicateProperties(),this._properties.subscribe(this,this._onPropertiesChanged),e.studyMetaInfoRepository().findById({type:"java",studyId:"Sessions@tv-basicstudies"}).then((function(t){i._destroyed||null===i._loadedGraphics&&(i._setMetaInfo(t),null!==i._metaInfo&&(i._studySource=new m(e.chartApi(),n,"sessions_",i._metaInfo),i._createPaneViews(),i._studySource.dataCleared().subscribe(i,i.updateAllViews),i._studySource.dataUpdated().subscribe(i,i.updateAllViews),i._studySource.setInputs({}),i._processHibernate()))})),e.timeScale().onReset().subscribe(this,this._clearData),e.timeScale().logicalRangeChanged().subscribe(this,this.updateAllViews),e.mainSeries().properties().extendedHours.subscribe(this,this._updateVisibleOfPreAndPostMarketBackground),e.mainSeries().properties().interval.subscribe(this,this._processHibernate),this._updateVisibleOfPreAndPostMarketBackground(e.mainSeries().properties().extendedHours)}return e.prototype.start=function(){this._isStarted=!0,this._processHibernate()},e.prototype.restart=function(){this._clearData(),g.enabled("stop_study_on_restart")&&this.stop(),this.start()},e.prototype.isStarted=function(){return this._isStarted},e.prototype.stop=function(){this._isStarted=!1,null!==this._studySource&&this._studySource.stop()},e.prototype.paneViews=function(e){return this._paneViews},e.prototype.labelPaneViews=function(e){return[]},e.prototype.priceAxisViews=function(e,t){return[]},e.prototype.updateAllViews=function(){this._paneViews.forEach((function(e){return e.update()}))},e.prototype.destroy=function(){this._destroyed=!0,null!==this._studySource&&(this._studySource.dataCleared().unsubscribe(this,this.updateAllViews),this._studySource.dataUpdated().unsubscribe(this,this.updateAllViews),this._studySource.destroy(),this._studySource=null),this._model.timeScale().logicalRangeChanged().unsubscribe(this,this.updateAllViews),this._model.timeScale().onReset().unsubscribe(this,this._clearData),this._model.mainSeries().properties().extendedHours.unsubscribe(this,this._updateVisibleOfPreAndPostMarketBackground),this._model.mainSeries().properties().interval.unsubscribe(this,this._processHibernate),this._properties.unsubscribe(this,this._onPropertiesChanged)},e.prototype.series=function(){return this._model.mainSeries()},e.prototype.priceScale=function(){return this.series().priceScale()},e.prototype.graphics=function(){return this._loadedGraphics||Object(s.ensureNotNull)(this._studySource).graphics()},e.prototype.properties=function(){return this._properties},e.prototype.graphicsInfo=function(){ return Object(s.ensureNotNull)(this._metaInfo).graphics},e.prototype.firstValue=function(e){return this._model.mainSeries().firstValue()},e.prototype.formatter=function(){return b},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){var i=e.properties;this._migrateOutOfSessionProperty(i),this._properties.mergeAndFire(i),this._removeDuplicateProperties(),this._updateVisibleOfPreAndPostMarketBackground(this._model.mainSeries().properties().extendedHours),void 0!==e.data&&t&&(this._loadStudyGraphics(e.data.graphics),this._setMetaInfo(e.data.metaInfo),this._createPaneViews())},e.prototype.restoreOldState=function(e,t){var i={properties:{graphics:e.state.graphics}};void 0!==e.data&&void 0!==e.metaInfo&&t&&(i.data={metaInfo:e.metaInfo,graphics:e.data.graphics}),this.restoreState(i,t)},e.prototype.applyPreferences=function(e){this._properties.mergePreferences(e)},e.prototype.metaInfo=function(){return Object(s.ensureNotNull)(this._metaInfo)},e.prototype._loadStudyGraphics=function(e){var t=e.backgrounds;if(void 0!==t){var i=t.findIndex((function(e){return"inSession"===e.styleId}));-1!==i&&t.splice(i,1)}this._loadedGraphics=Object(p.loadStudyGraphics)(e)},e.prototype._setMetaInfo=function(e){var t=e.graphics.backgrounds;void 0!==t&&void 0!==t.inSession&&delete t.inSession,this._metaInfo=e},e.prototype._updateVisibleOfPreAndPostMarketBackground=function(e){var t=e.value();this._outOfSessionVisibilityProperty().setValue(t),this._preMarketVisibilityProperty().setValue(t),this._postMarketVisibilityProperty().setValue(t)},e.prototype._clearData=function(){null!==this._studySource&&this._studySource.clearData()},e.prototype._createPaneViews=function(){var e=this,t={doubleClickHandler:this._doubleClickHandler};Object(p.createGraphicsPaneViews)(this,this._model,t).then((function(t){e._paneViews=t,e._model.lightUpdate()}))},e.prototype._onPropertiesChanged=function(){this._processHibernate(),this.updateAllViews()},e.prototype._processHibernate=function(){if(null!==this._studySource){var e=this._canBeHibernated(),t=this._isHibernated(),i=this._studySource.isStarted();!t&&e&&i?this._studySource.stop():!t||e||i||this._studySource.start()}},e.prototype._canBeHibernated=function(){var e=this._model.mainSeries(),t=this._preMarketVisibilityProperty().value()&&this._postMarketVisibilityProperty().value()&&this._outOfSessionVisibilityProperty().value();return e.isDWM()||!t&&!this._vertLinesVisibleProperty().value()},e.prototype._isHibernated=function(){return this._isStarted&&(null===this._studySource||!this._studySource.isStarted())},e.prototype._outOfSessionVisibilityProperty=function(){return this._properties.childs().graphics.childs().backgrounds.childs().outOfSession.childs().visible},e.prototype._preMarketVisibilityProperty=function(){return this._properties.childs().graphics.childs().backgrounds.childs().preMarket.childs().visible}, e.prototype._postMarketVisibilityProperty=function(){return this._properties.childs().graphics.childs().backgrounds.childs().postMarket.childs().visible},e.prototype._vertLinesVisibleProperty=function(){return this._properties.childs().graphics.childs().vertlines.childs().sessBreaks.childs().visible},e.prototype._removeDuplicateProperties=function(){this._properties.hasChild("properties")&&(this._properties.removeProperty("properties"),Object(y.saveDefaultProperties)(!0),this._properties.childChanged("",null),Object(y.saveDefaultProperties)(!1))},e.prototype._migrateOutOfSessionProperty=function(e){var t=e.graphics.backgrounds,i=t.outOfSession;i.color===S.graphics.backgrounds.outOfSession.color||"postMarket"in t||(e.graphics.backgrounds=Object(o.__assign)(Object(o.__assign)({},t),{postMarket:{color:i.color,transparency:i.transparency,visible:i.visible},preMarket:{color:i.color,transparency:i.transparency,visible:i.visible}}))},e}()},KcY8:function(e,t,i){"use strict";var n=i("mrSG"),r=i("aO4+"),o=i("f6yo"),s=i("VaSN"),a=i("Tmoa"),l=i("Ialn"),c=i("8Uy/"),u=i("jFln"),h=i("ikwP"),d=i("VdBB"),p=function(){function e(e,t){this.setData(e,t)}return e.prototype.setData=function(e,t){this._data=Object(n.__assign)({},e),this._commonData=Object(n.__assign)({},t)},e.prototype.draw=function(e,t,i,n,r,o){if(this._data.visible){e.font=t.font;var s,d=Math.floor((this._data.tickVisible?t.tickLength:0)*o),p=Math.floor((this._data.borderVisible?t.borderSize:0)*o),_=Math.floor(t.paddingTop*o),f=Math.floor(t.paddingBottom*o),m=Math.floor(t.paddingInner*o),v=Math.floor(t.paddingOuter*o),y=this._data.text,g=Math.round(t.baselineOffset*o),b=void 0!==this._data.labelIcon,S=Math.max(1,Math.floor(o)),w=Math.floor(t.fontSize*o)+_+f;if(w%2!=S%2&&(w+=1),b)s=w;else{var P=Math.ceil(i.measureText(e,y));s=Math.round(P*o)+d+p+m+v}var C=this._commonData.coordinate;this._commonData.fixedCoordinate&&(C=this._commonData.fixedCoordinate);var x,T,I="right"===r,M=this._getOffsetScaled(I,n,o),L=Math.ceil(n*o),O=I?L:0,k=O;e.fillStyle=Object(a.resetTransparency)(this._commonData.background),e.lineWidth=1,Object(u.setLineStyle)(e,c.LINESTYLE_SOLID),e.lineCap="butt";var A=Math.round(C*o)-Math.floor(.5*o),E=Math.floor(A+S/2-w/2),V=E+w;if(y||b){if(I?(x=O-d,T=(k=O-s)+v):(k=O+s,x=O+d,T=O+p+d+m),O+=M,k+=M,x+=M,e.beginPath(),e.moveTo(O,E),e.lineTo(k,E),e.lineTo(k,V),e.lineTo(O,V),e.fill(),0!==M&&this._data.fillOffset){e.fillStyle=t.paneBackgroundColor;var D=I?Math.ceil(n*o)+1:0;e.beginPath(),e.moveTo(O,E),e.lineTo(D,E),e.lineTo(D,V),e.lineTo(O,V),e.fill()}if(b){switch(this._data.labelIcon){case 0:this._drawPlusIcon(e,O,k,E,A,V,S)}return}this._data.tickVisible&&(e.fillStyle=this._commonData.color,e.fillRect(O,A,x-O,S)),e.textAlign="left",e.fillStyle=this._commonData.color,Object(h.drawScaled)(e,o,(function(){e.fillText(y,(T+M)/o,(V-f-g)/o)}))}if(this._data.secondLine){var B=Math.ceil(i.measureText(e,this._data.secondLine)*o)+m+v;e.fillStyle=Object(a.resetTransparency)(this._commonData.background),this._data.text&&(E+=w+S,V+=w+S),I?(O=(k=Math.min(k,L-B))+B, T=k+v):(k=(O=Math.max(k-B,p))+B,T=O+m),O+=M,k+=M,e.beginPath(),e.moveTo(O,E),e.lineTo(k,E),e.lineTo(k,V),e.lineTo(O,V),e.fill(),e.textAlign="left",e.fillStyle=this._commonData.color;var R=this._data.secondLine;Object(h.drawScaled)(e,o,(function(){e.fillText(Object(l.startWithLTR)(R),(T+M)/o,(V-f-g)/o)}))}}},e.prototype.height=function(e,t){if(!this._data.visible)return 0;var i=e.fontSize+e.paddingTop+e.paddingBottom;return this._data.secondLine&&t?2*i+1:i},e.prototype.hitTest=function(e){var t=this._data.hitTestData;if(void 0===t)return null;var i=this._data.offset,n=Object(s.lastEventIsTouch)()?10:0,a=Object(r.box)(new r.Point(t.xl+i-n,t.y-n),new r.Point(t.xl+i+t.containerWidth+n,t.y+t.containerHeight+n)),l=t.left&&Object(o.pointInBox)(e,a),c=Object(r.box)(new r.Point(t.xr-i-n,t.y-n),new r.Point(t.xr-i+t.containerWidth+n,t.y+t.containerHeight+n)),u=t.right&&Object(o.pointInBox)(e,c);if(l||u){var h=l?"left":"right";return new d.HitTestResult(d.HitTestResult.CUSTOM,{clickHandler:void 0===t.clickHandler?void 0:t.clickHandler.bind(this,e,h),tapHandler:void 0===t.clickHandler?void 0:t.clickHandler.bind(this,e,h),tooltip:t.tooltip})}return null},e.prototype._getOffsetScaled=function(e,t,i){var n=e?-1:1,r=0===this._data.offset?0:n*this._data.offset,o=0===r?0:n*Math.max(1,Math.round(Math.abs(r)*i));return e&&t*i%1!=0&&(o=n*(Math.abs(o)+1)),o},e.prototype._drawPlusIcon=function(e,t,i,n,r,o,s){e.fillStyle=this._commonData.color;var a=Math.abs(t-i),l=Math.round(.5*a);l%2!=s%2&&(l+=1);var c=Math.floor((a-l)/2),u=Math.min(t,i),h=u+Math.floor(a/2-s/2);e.fillRect(u+c,r,l,s),e.fillRect(h,n+c,s,l)},e}();i.d(t,"a",(function(){return _}));var _=function(){function e(e){this._commonRendererData={coordinate:0,color:"#FFF",background:"#000"},this._axisRendererData={text:"",visible:!1,tickVisible:!0,borderVisible:!0,offset:0},this._paneRendererData={text:"",visible:!1,tickVisible:!1,borderVisible:!1,offset:1,fillOffset:!0},this._invalidated=!0,this._axisRenderer=new(e||p)(this._axisRendererData,this._commonRendererData),this._paneRenderer=new(e||p)(this._paneRendererData,this._commonRendererData)}return e.prototype.text=function(){return this._axisRendererData.text},e.prototype.secondLineText=function(){return this._axisRendererData.secondLine},e.prototype.background=function(){return this._commonRendererData.background},e.prototype.color=function(){return this.generateTextColor(this.background())},e.prototype.generateTextColor=function(e){return Object(a.colorFromBackground)(e)},e.prototype.coordinate=function(){return this._updateRendererDataIfNeeded(),this._commonRendererData.coordinate},e.prototype.floatCoordinate=function(){return this._updateRendererDataIfNeeded(),this._commonRendererData.floatCoordinate||this._commonRendererData.coordinate},e.prototype.update=function(){this._invalidated=!0},e.prototype.height=function(e,t){return void 0===t&&(t=!1),Math.max(this._axisRenderer.height(e,t),this._paneRenderer.height(e,t))},e.prototype.getFixedCoordinate=function(){return this._commonRendererData.fixedCoordinate||0}, e.prototype.setFixedCoordinate=function(e){this._commonRendererData.fixedCoordinate=e},e.prototype.isVisible=function(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible||this._paneRendererData.visible},e.prototype.isAxisLabelVisible=function(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible},e.prototype.isPaneLabelVisible=function(){return this._updateRendererDataIfNeeded(),this._paneRendererData.visible},e.prototype.renderer=function(){return this._updateRendererDataIfNeeded(),this._axisRenderer.setData(this._axisRendererData,this._commonRendererData),this._paneRenderer.setData(this._paneRendererData,this._commonRendererData),this._axisRenderer},e.prototype.paneRenderer=function(){return this._updateRendererDataIfNeeded(),this._axisRenderer.setData(this._axisRendererData,this._commonRendererData),this._paneRenderer.setData(this._paneRendererData,this._commonRendererData),this._paneRenderer},e.prototype.setPaneRendererLabelIcon=function(e){this._paneRendererData.labelIcon=e},e.prototype.setPaneLabelVisible=function(e){this._paneRendererData.visible=e,this._invalidated=!0},e.prototype._updateRendererDataIfNeeded=function(){this._invalidated&&(this._updateRendererData(this._axisRendererData,this._paneRendererData,this._commonRendererData),this._invalidated=!1)},e}()},Kmdw:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererArrowUp",(function(){return l})),i.d(t,"PaneRendererArrowDown",(function(){return c}));var n=i("mrSG"),r=i("2WC2"),o=i("aO4+"),s=i("Hr11"),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._sign=0,t._thinArrow=!1,t._thinArrowLineWidth=0,t._headHeight=0,t._arrowWidth=0,t}return Object(n.__extends)(t,e),t.prototype.setData=function(e,t){this._setBaseData(e,t)},t.prototype._drawItemShape=function(e,t,i){var n=t.pixelRatio,r=this._lineWidth(t)%2?.5:0,o=this._sign,a=this._arrowWidth,l=this._headHeight,c=Math.abs(i.height),u=Math.round(i.x*n)+r,h=i.vertOffset,d=Math.round((i.y+h+o*c/2)*n)+r,p=Object(s.ceiledEven)(a*n),_=p/2,f=Math.round(c*n),m=Math.round(l*n);e.translate(u,d),this._thinArrow?(e.moveTo(0,0),e.lineTo(-_,-_*o),e.moveTo(0,0),e.lineTo(_,-_*o),e.moveTo(0,0),e.lineTo(0,-f*o),e.moveTo(-_,-f*o),e.lineTo(_,-f*o)):(e.moveTo(0,0),f0&&(this._kind=e,this._multiplier=t)}return e.prototype.kind=function(){return this._kind},e.prototype.multiplier=function(){return this._multiplier},e.prototype.isValid=function(){return this.kind()!==n.Invalid&&this.multiplier()>0},e.prototype.isDWM=function(){return this.isValid()&&!this.isRange()&&!this.isIntraday()},e.prototype.isIntraday=function(){var e=c.has(this.kind());return this.isValid()&&!this.isRange()&&e},e.prototype.isSeconds=function(){return this.kind()===n.Seconds},e.prototype.isMinutes=function(){return this.kind()===n.Minutes},e.prototype.isMinuteHours=function(){return this.kind()===n.Minutes&&d(this.multiplier())},e.prototype.isDays=function(){return this.kind()===n.Days},e.prototype.isWeeks=function(){return this.kind()===n.Weeks},e.prototype.isMonths=function(){return this.kind()===n.Months},e.prototype.isRange=function(){return this.kind()===n.Range},e.prototype.isTimeBased=function(){return!this.isRange()},e.prototype.letter=function(){return this.isValid()&&this.kind()!==n.Minutes?this.kind()[0].toUpperCase():""},e.prototype.value=function(){return this.isValid()?this.kind()===n.Minutes?this.multiplier()+"":this.multiplier()+this.letter():""},e.prototype.isEqualTo=function(t){if(!(t instanceof e))throw new Error("Argument is not an Interval");return!(!this.isValid()||!t.isValid())&&(this.kind()===t.kind()&&this.multiplier()===t.multiplier())},e.prototype.inMilliseconds=function(e){if(void 0===e&&(e=Date.now()),!this.isValid()||this.isRange())return NaN;if(this.isMonths()){var t=new Date(e);return t.setUTCMonth(t.getUTCMonth()+(this.multiplier()||1)),+t-e}var i=this.multiplier();return a[this.kind()]*i},e.isEqual=function(t,i){return e.parse(t).isEqualTo(e.parse(i))},e.parse=function(t){t=(t+"").toUpperCase().split(",")[0];var i=o.exec(t);return null!==i?"H"===i[2]?new e(n.Minutes,60*h(i[1])):new e(l[i[2]],h(i[1])):null!==(i=s.exec(t))?new e(n.Minutes,h(i[1])):new e(n.Invalid,0)},e.kind=function(t){return e.parse(t).kind()},e.isValid=function(t){return e.parse(t).isValid()},e.isDWM=function(t){return e.parse(t).isDWM()},e.isIntraday=function(t){return e.parse(t).isIntraday()},e.isSeconds=function(t){return e.parse(t).isSeconds()},e.isMinutes=function(t){return e.parse(t).isMinutes()},e.isMinuteHours=function(t){return e.parse(t).isMinuteHours()},e.isDays=function(t){return e.parse(t).isDays()},e.isWeeks=function(t){return e.parse(t).isWeeks()},e.isMonths=function(t){return e.parse(t).isMonths()},e.isRange=function(t){return e.parse(t).isRange()},e.isTimeBased=function(t){return e.parse(t).isTimeBased()},e.normalize=function(t){var i=e.parse(t);return i.isValid()?i.value():null},e}();function h(e){return 0===e.length?1:parseInt(e,10)}function d(e){return e>=60&&!(e%60)}},"M7/j":function(e,t,i){"use strict";i.r(t),i.d(t,"itemsRangeIsValid",(function(){return h})),i.d(t,"splitItems",(function(){return d})),i.d(t,"PaneRendererBaseline",(function(){return p})) ;var n=i("mrSG"),r=i("aO4+"),o=i("hBTJ"),s=i("GEp6"),a=i("Zp/P"),l=i("Y7w9"),c=i("cPgM"),u=i("VdBB");function h(e){if(0===e.length)return!1;var t=e.findIndex((function(e){return Object(a.coordinateIsValid)(e.y)}));if(-1===t)return!1;for(var i=e.length-1;i>t&&!Object(a.coordinateIsValid)(e[i].y);)i--;return!(t>=i)}function d(e,t){for(var i=[],n=[],s=null,l=0;l=t&&n.push(c),s=c;else{if(null===s)continue;c=s}if(Object(a.coordinateIsValid)(u.y)&&(c.y>t&&u.yt))if(Math.abs(c.x-u.x)<1){var h=new r.Point(c.x,t);i.push(h),n.push(h)}else{var d=Object(o.intersectLineSegments)(c,u,new r.Point(c.x,t),new r.Point(u.x,t));if(null!==d){h=c.add(u.subtract(c).scaled(d));i.push(h),n.push(h)}}}return{topItems:i,bottomItems:n}}var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._data=null,t}return Object(n.__extends)(t,e),t.prototype.setData=function(e){this._data=e},t.prototype.hitTest=function(e){if(null===this._data)return null;for(var t=this._data,i=t.items,n=t.topLineWidth,o=t.bottomLineWidth,c=Object(a.selectionTolerance)((n+o)/2),h=Object(l.lowerbound)(i,e,(function(e,t){return e.x<=t.x})),d=Math.max(1,h-1),p=Math.min(i.length-1,h+1),_=d;_<=p;++_){var f=i[_-1],m=i[_];if(Object(s.distanceToSegment)(new r.Point(f.x,f.y),new r.Point(m.x,m.y),new r.Point(e.x,e.y)).distance<=c)return new u.HitTestResult(u.HitTestResult.REGULAR)}return null},t.prototype._drawImpl=function(e){if(null!==this._data){var t=this._data,i=t.items,n=t.baseLevelCoordinate,r=t.bottom,o=t.bottomFillColor1,s=t.bottomFillColor2,a=t.topFillColor1,l=t.topFillColor2,c=t.topLineColor,u=t.bottomLineColor,p=t.topLineWidth,_=t.bottomLineWidth;if(h(i)){var f=d(i,n),m=f.topItems,v=f.bottomItems;e.lineCap="round",e.lineJoin="round",e.translate(.5,.5),0!==m.length&&(e.beginPath(),e.moveTo(m[0].x,n),this._makeLine(e,m,!0,0),e.closePath(),e.fillStyle=this._makeLinearGradient(e,a,l,n-r,n),e.fill(),e.beginPath(),this._makeLine(e,m,!1,0),e.lineWidth=p,e.strokeStyle=c,e.stroke()),0!==v.length&&(e.beginPath(),e.moveTo(v[0].x,n),this._makeLine(e,v,!0,1),e.closePath(),e.fillStyle=this._makeLinearGradient(e,o,s,n,n+r),e.fill(),e.beginPath(),this._makeLine(e,v,!1,1),e.lineWidth=_,e.strokeStyle=u,e.stroke())}}},t.prototype._makeLine=function(e,t,i,n){if(null!==this._data){var r=t.findIndex((function(e){return Object(a.coordinateIsValid)(e.y)}));if(-1!==r)for(var o,s=this._data,l=s.barSpacing,c=s.baseLevelCoordinate,u=.25*l,h=t.length,d=r;d=c&&p.y>=c){e.moveTo(p.x,p.y);continue}}else if(o&&o.y<=c&&p.y<=c){e.moveTo(p.x,p.y);continue}if(o&&Object(a.coordinateIsValid)(o.y))e.lineTo(p.x,p.y),i&&!Object(a.coordinateIsValid)(_.y)&&e.lineTo(p.x,c);else if(_&&Object(a.coordinateIsValid)(_.y))i?(d!==r&&e.lineTo(p.x,c),e.lineTo(p.x,p.y)):e.moveTo(p.x,p.y);else if(i){if(0===d)continue;d!==r&&e.lineTo(p.x-u,c),e.lineTo(p.x-u,p.y),e.lineTo(p.x+u,p.y),e.lineTo(p.x+u,c) }else e.moveTo(p.x-u,p.y),e.lineTo(p.x+u,p.y);o=p}}}},t.prototype._makeLinearGradient=function(e,t,i,n,r){var o=e.createLinearGradient(0,n,0,r);return o.addColorStop(0,t),o.addColorStop(1,i),o},t}(c.ScaledPaneRenderer)},MA5A:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolCrossLine",(function(){return c}));var n=i("mrSG"),r=i("Ocx9"),o=i("p1SQ"),s=i("GmZZ"),a=i("Ss5c"),l=window.t("Cross Line"),c=function(e){function t(n,r){var a=e.call(this,n,r||t.createProperties())||this;return a._priceAxisView=new o.LineToolHorzLinePriceAxisView(a),a._timeAxisView=new s.LineToolVertLineTimeAxisView(a),i.e("lt-pane-views").then(function(e){var t=i("amUF").CrossLinePaneView;a._setPaneViews([new t(a,a._model)])}.bind(null,i)).catch(void 0),a}return Object(n.__extends)(t,e),t.prototype.pointsCount=function(){return 1},t.prototype.translatedType=function(){return l},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.lineColor=function(){return this.properties().linecolor.value()},t.prototype.lineWidth=function(){return this.properties().linewidth.value()},t.prototype.lineStyle=function(){return this.properties().linestyle.value()},t.createProperties=function(e){var i=new r.DefaultProperty("linetoolcrossline",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"xrdl")).then((function(e){return e.CrossLineDefinitionsViewModel}))},t._configureProperties=function(e){a.LineDataSource._configureProperties(e)},t}(a.LineDataSource)},MROS:function(e,t,i){"use strict";i.r(t),i.d(t,"ModelSelection",(function(){return o}));var n=i("Y7w9"),r=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(r.isLineTool)(this._items[0])&&this.clear(),Object(r.isLineTool)(e)||this.clear();var t=Object(n.lowerbound)(this._items,e,(function(e,t){return e.zorder()i&&this._priceScaleIsPrice(e.rightPriceScales()[i],t))return e.rightPriceScales()[i];if(e.leftPriceScales().length>i&&this._priceScaleIsPrice(e.leftPriceScales()[i],t))return e.leftPriceScales()[i]}return null},e.prototype._targetPriceScaleIndex=function(e,t){if(e.mainSource()===t.mainSeries())return 0},e.prototype._tryToGetDesiredPriceScale=function(e,t,i,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(r.ensureNotNull)(n.priceScale()):e.isMainPane()?Object(r.ensureNotNull)(Object(r.ensureNotNull)(e.mainDataSource()).priceScale()):this.createNewPriceScaleIfPossible(e);case"overlay":return e.createPriceScaleAtPosition("overlay")}},e}(),a=function(e){function t(t){return e.call(this,t)||this}return Object(n.__extends)(t,e),t.prototype.apply=function(e){if(e.containsMainSeries()){var t=Object(r.ensureNotNull)(Object(r.ensureNotNull)(e.mainDataSource()).priceScale());e.movePriceScale(t,"right",0)}for(var i=e.model();e.leftPriceScales().length>e.rightPriceScales().length;){t=e.leftPriceScales()[e.leftPriceScales().length-1];e.movePriceScale(t,"right",this._targetPriceScaleIndex(t,i))}for(;e.rightPriceScales().length-e.leftPriceScales().length>1;){t=e.rightPriceScales()[e.rightPriceScales().length-1];e.movePriceScale(t,"left",this._targetPriceScaleIndex(t,i))}},t.prototype.createNewPriceScaleIfPossible=function(e){if(!this.canCreateNewPriceScale(e))return e.createPriceScaleAtPosition("overlay");var t=e.leftPriceScales().length=0;--a)if(Math.floor(o/r[a].divisor)!==Math.floor(s/r[a].divisor))return r[a].span},TradingView.ChartapiMessagerInstances=[],e.exports=l}).call(this,i("jCNj"))},"N+BX":function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Double Curve") ;function s(e,t){this._constructor="LineToolBezierCubic";var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("a6on").BezierCubicPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 2},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Double Curve"},s.prototype.controlPoints=function(){var e=this.pointToScreenPoint(this.points()[0])[0],t=this.pointToScreenPoint(this.points()[1])[0],i=t.subtract(e).scaled(.5).transposed().scaled(.3),n=e.add(t).scaled(.33),r=e.add(t).scaled(.67),o=n.add(i),s=r.subtract(i);return[this.screenPointToPoint(o),this.screenPointToPoint(s)]},s.prototype.setLastPoint=function(e,t){n.prototype.setLastPoint.call(this,e,t),this._controlPoints=this.controlPoints()},s.prototype.addPoint=function(e,t,i){var r=n.prototype.addPoint.call(this,e,t,!0);if(r){var o=this.controlPoints();delete this._controlPoints,this._points.push(o[0]),this._points.push(o[1]),i||(this.normalizePoints(),this.createServerPoints()),this._createPointProperty(2),this._createPointProperty(3)}return r},s.prototype.restorePoints=function(e,t,i){n.prototype.restorePoints.call(this,e,t,i),this._createPointProperty(2),this._createPointProperty(3)},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("b4fl").GeneralBezierDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolbeziercubic",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolBezierCubic=s},N1UO:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyApi",(function(){return d}));var n=i("mrSG"),r=(i("YFKU"),i("Eyy1")),o=i("9iCb"),s=i("xo8u"),a=i("gaBL"),l=i("HGup"),c=i("jRfx"),u=i("/ToI"),h=i("HZKX"),d=function(){function e(e,t){this._study=e,this._chartWidget=t,this._undoModel=this._chartWidget.model(),this._model=this._undoModel.model()}return e.prototype.isUserEditEnabled=function(){return this._study.userEditEnabled()},e.prototype.setUserEditEnabled=function(e){this._study.setUserEditEnabled(e)},e.prototype.getInputsInfo=function(){return this._study.metaInfo().inputs.map((function(e){return Object(n.__assign)(Object(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){for(var t=this.getInputValues(),i=function(e){void 0!==t.find((function(t){return t.id===e.id}))?n._study.properties().inputs[e.id].setValue(e.value):console.warn('There is no such input: "'+e.id+'"')},n=this,r=0,o=e;r0&&(i.drawImage(a.leftAxis.canvas,l,n),l+=a.leftAxis.canvas.width),i.drawImage(a.canvas,l,n),l+=a.canvas.width,a.rightAxis.contentWidth>0&&i.drawImage(a.rightAxis.canvas,l,n),"pane"===a.type&&(i.fillStyle=e.colors.text,this._drawLegend(a,i,new r.Point(c,h),u)),n+=a.canvas.height}if(void 0!==e.timeAxis){l=0;e.timeAxis.lhsStub.contentWidth>0&&(i.drawImage(e.timeAxis.lhsStub.canvas,l,n),l+=e.timeAxis.lhsStub.canvas.width),i.drawImage(e.timeAxis.canvas,l,n),l+=e.timeAxis.canvas.width,e.timeAxis.rhsStub.contentWidth>0&&i.drawImage(e.timeAxis.rhsStub.canvas,l,n)}i.restore()},e.prototype._drawLegend=function(e,t,i,n){var o=!0,s=Math.ceil(1.4*this._options.fontSize*this._pixelRatio),a=i.x,l=i.y;if(e.mainSeriesText&&l+si}));return{text:(t=t.slice(0,l)).trim(),elided:!0}}(e,d,i-p,this._pixelRatio);if(_.elided&&!s)return null;for(var f=[],m=0,v=0,y=l;v_.text.length)break;f.push(P.text),m+=P.text.length}var b=f.join("").trim().length;m=0;for(var S=0,w=l;Sb)break;P.color&&(e.save(),e.fillStyle=P.color),p+=g(e,new r.Point(p,t.y),P.text,this._pixelRatio),P.color&&e.restore(),m+=P.text.length}return _.elided&&(p+=g(e,new r.Point(p,t.y),"...",this._pixelRatio)),p},e}();function w(e,t){return Object(n.__awaiter)(this,void 0,void 0,(function(){return Object(n.__generator)(this,(function(i){return[2,new S(e,t).getImage()]}))}))}},Ndyb:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererColumns",(function(){return r}));var n=i("VdBB"),r=function(){function e(e){this._data=null,this._precalculatedCache=[],this.setData(e)}return e.prototype.setData=function(e){this._data=e,this._precalculatedCache=[]},e.prototype.draw=function(e,t){if(null!==this._data&&0!==this._data.items.length){var i=t.pixelRatio;this._precalculatedCache.length||this._fillPrecalculatedCache(i);for(var n=Math.max(1,Math.floor(i)),r=Math.round(this._data.histogramBase*i)-Math.floor(n/2),o=r+n,s=this._data.lineColor,a=0;a=i&&l<=r){var c=a.y;if(e.y>=Math.min(c,this._data.histogramBase)&&e.y<=Math.max(c,this._data.histogramBase))return new n.HitTestResult(n.HitTestResult.REGULAR)}}return null},e.prototype._fillPrecalculatedCache=function(e){if(null!==this._data&&0!==this._data.items.length){var t=Math.ceil(this._data.barSpacing*e)<=1?0:Math.max(1,Math.floor(e)),i=Math.round(this._data.barSpacing*e)-t;this._precalculatedCache=new Array(this._data.items.length);for(var n=0;nu.center?u.right=c.left-t-1:c.left=u.right+t+1))}var h=Math.ceil(this._data.barSpacing*e);for(n=0;n0&&h<4)for(n=0;nh&&(c.roundedCenter>c.center?c.right-=1:c.left+=1)}}else this._precalculatedCache=[]},e}()},NhkU:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=i("ytGH").LineToolWidthsProperty,s=window.t("Pitchfan");function a(e,t){var r=t||a.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("l5Au").PitchfanLinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);for(var s=[this._properties.child("median").child("linewidth")],l=0;l<=a.LevelsCount;l++)s.push(this._properties.child("level"+l).child("linewidth"));this._widthsProperty=new o(s)}inherit(a,n),a.LevelsCount=8,a.prototype.levelsCount=function(){return a.LevelsCount},a.prototype.pointsCount=function(){return 3},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Pitchfan"},a.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("D+Nk").PitchBaseDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new r("linetoolpitchfan",e,!1,{range:[0,8]});return a._configureProperties(t),t},a._configureProperties=function(e){n._configureProperties(e)},t.LineToolPitchfan=a},NsVT:function(e,t,i){"use strict";i.r(t);var n=i("hY0g"),r=i.n(n),o=i("HySD");function s(e,t){for(var i=0,n=0,r=t;n0&&t.push({min:o,max:s})}return t.sort((function(e,t){return e.min-t.min||e.max-t.max})),t}function l(e,t){if(e.length!==t.length)return!1;for(var i=e.length;i--;){if(e[i].min!==t[i].min)return!1;if(e[i].max!==t[i].max)return!1}return!0}var c=i("+GxX"),u=i("Kxc7");i.d(t,"ChartPage",(function(){return d}));var h=u.enabled("no_min_chart_width"),d=function(){function e(e){var t=this;this._processVisibility=function(e){var i=e.container.value() ;return t._affectsLayout(e.name)?(i&&i.classList.toggle("js-hidden",!1),!0):(i&&i.classList.toggle("js-hidden",!0),!1)},this._setWidth=function(e,i){var n=i;t._fullscreenArea!==e.name&&(e.availWidth.setValue(i),e.canNegotiate.width&&(n=s(i,e.negotiations.width)));var r=e.container.value();return r&&(r.style.width=n+"px"),e.width.setValue(n),n},this._setHeight=function(e,i){var n=i;t._fullscreenArea!==e.name&&(e.availHeight.setValue(i),e.canNegotiate.height&&(n=s(i,e.negotiations.height)));var r=e.container.value();return r&&(r.style.height=n+"px"),e.height.setValue(n),n};var i=e.container.value();if(!i)throw new Error("bridge.container.value() must be an element");this._container=i,this._availableAreas=["left","tradingpanel","right","top","bottom","center","topleft","extratop"],this._areas={},this._bridge=e,this._width=e.width,this._height=e.height,this._width.subscribe((function(){return t.recalculate()})),this._height.subscribe((function(){return t.recalculate()})),this._bridge.visible.subscribe((function(){return t._updateVisibility()})),this._bridge.fullscreen.subscribe((function(){return t._onParentFullscreenChange()})),this.recalculate()}return e.prototype.allocate=function(e){var t=this,i=e&&e.areaName;if(-1===this._availableAreas.indexOf(i))throw new Error("unknown options.areaName");this.free(i);var n=this._createDOM(i),s={name:i,canNegotiate:{width:"left"===i||"right"===i||"tradingpanel"===i||"topleft"===i,height:"top"===i||"bottom"===i||"topleft"===i||"extratop"===i},negotiations:{width:[],height:[]},remove:function(){for(var e in t._areas)t._areas[e]===s&&t.free(e)},negotiateWidth:function(e){if(s.canNegotiate.width){var i=a(e);l(s.negotiations.width,i)||(s.negotiations.width=i,t.recalculate())}},negotiateHeight:function(e){if(s.canNegotiate.height){var i=a(e);l(s.negotiations.height,i)||(s.negotiations.height=i,t.recalculate())}},requestFullscreen:function(){t._fullscreenArea||("right"!==i&&"center"!==i||(t._fullscreenArea=i),"center"===i&&t._bridge.requestFullscreen(),t._updateFullscreen())},exitFullscreen:function(){i===t._fullscreenArea&&(t._fullscreenArea=void 0,"center"===i&&t._bridge.exitFullscreen(),t._updateFullscreen())},width:new r.a,height:new r.a,availWidth:new r.a,availHeight:new r.a,alive:new r.a(!0),container:new r.a(n),visible:new r.a(!0),fullscreen:new r.a(!0),rdState:new o.ResizerDetacherState};return s.rdState.pushOwner(s),this._areas[i]=s,s.rdState.owner.subscribe((function(e){var n=s.container.value();if(e!==s)n&&(n.innerHTML="",n.parentElement&&n.parentElement.removeChild(n));else{for(var r=null,o=t._availableAreas.indexOf(i);o--;){var a=t._availableAreas[o];if(t._affectsLayout(a)){r=t._areas[a].container.value();break}}n&&(r&&n.parentElement?n.insertAdjacentElement("afterend",r):t._container.appendChild(n))}t.recalculate()}),{callWithLast:!0}),s.rdState.bridge()},e.prototype.free=function(e){var t=this._areas[e];if(t){this._areas[e]=void 0;var i=t.container.value();i&&i.parentElement&&i.parentElement.removeChild(i),t.alive.setValue(!1)}},e.prototype.recalculate=function(){var e={} ;this._recalcSingleRunToken=e;var t=this._areas.topleft,i=this._areas.left,n=this._areas.tradingpanel,r=this._areas.right,o=this._areas.top,s=this._areas.bottom,a=this._areas.center,l=this._areas.extratop,c=this._width.value(),u=this._height.value(),d=0,p=0,_=0,f=0,m=0,v=0,y=0,g=0;(e===this._recalcSingleRunToken&&l&&this._processVisibility(l)&&(g=this._setHeight(l,u),this._setWidth(l,c)),e===this._recalcSingleRunToken&&t&&this._processVisibility(t))&&(y=this._setHeight(t,u),(v=this._setWidth(t,c))&&(v+=4),(I=t.container.value())&&(I.style.top=g+"px"));e===this._recalcSingleRunToken&&i&&this._processVisibility(i)&&((I=i.container.value())&&(I.style.top=y+g+"px"),this._setHeight(i,u-y-g),(_=this._setWidth(i,c))&&(_+=4));if(e===this._recalcSingleRunToken&&n&&this._processVisibility(n)){this._setHeight(n,u);var b=c-_;h||(b-=300),m=this._setWidth(n,b)}if(e===this._recalcSingleRunToken&&r&&this._processVisibility(r)){this._setHeight(r,u-g);b=c-_-m;h||(b-=300),f=this._setWidth(r,b),(I=r.container.value())&&(I.style.top=g+"px")}var S=m+f,w=S?4:0;if(e===this._recalcSingleRunToken&&o&&this._processVisibility(o)){var P=Math.max(v,_);(I=o.container.value())&&(I.style.left=P+"px",I.style.top=g+"px");b=c-P-m-f-w;this._setWidth(o,b),d=this._setHeight(o,u)}var C=0,x=c-_-m-f-w;if(e===this._recalcSingleRunToken&&s&&this._processVisibility(s)){(I=s.container.value())&&(I.style.left=_+"px",I.classList.toggle("no-border-top-left-radius",!_),I.classList.toggle("no-border-top-right-radius",!S)),this._setWidth(s,x);var T=u-d-g;C=Math.min(300,T-0),p=this._setHeight(s,T)+4}if(e===this._recalcSingleRunToken&&a&&this._processVisibility(a)){var I;(I=a.container.value())&&(I.style.left=_+"px",I.style.top=d+g+"px",I.classList.toggle("no-border-bottom-left-radius",!p||!_),I.classList.toggle("no-border-bottom-right-radius",!S||!p)),this._setWidth(a,x);T=u-d-p-g;this._setHeight(a,Math.max(T,C))}e===this._recalcSingleRunToken&&n&&this._affectsLayout("tradingpanel")&&((I=n.container.value())&&(I.style.right=f+"px",I.style.top=g+"px"));e===this._recalcSingleRunToken&&this._updateVisibility()},e.prototype._affectsLayout=function(e){var t=this._areas[e];if(!t)return!1;if(t.rdState.owner.value()!==t)return!1;if(this._fullscreenArea&&this._fullscreenArea!==e)return p(e);if(this._width.value()<=567||this._height.value()<=445){var i=["center","top","left","topleft","extratop"];if(Object(c.isFeatureEnabled)("mobile_show_bottom_panel")&&i.push("bottom"),!i.includes(e))return!1}return!0},e.prototype._updateVisibility=function(){for(var e=this._bridge.visible.value(),t=0;te.year||this.year===e.year&&this.month>e.month||this.year===e.year&&this.month===e.month&&this.day>e.day?1:this.year===e.year&&this.month===e.month&&this.day===e.day?0:-1},e.prototype.before=function(e){return-1===this.compareTo(e)},e.prototype.toCalendar=function(e){ return n.get_cal(n.get_timezone("Etc/UTC"),this.year,this.month-1,this.day)},e.prototype.addDays=function(t){var i=this.toCalendar(n.get_timezone("Etc/UTC"));return n.add_date(i,t),e.fromCalendar(i)},e.fromCalendar=function(t){return new e(n.get_year(t),n.get_month(t)+1,n.get_day_of_month(t))},e}()},OH2X:function(e,t,i){"use strict";t.LineToolFibRetracement=i("t2ex").LineToolFibRetracement,t.LineToolFibChannel=i("xnA2").LineToolFibChannel,t.LineToolFibSpeedResistanceArcs=i("Yjuu").LineToolFibSpeedResistanceArcs,t.LineToolProjection=i("68at").LineToolProjection,t.LineToolTrendBasedFibExtension=i("ZtA1").LineToolTrendBasedFibExtension,t.LineToolElliott=i("xz+e").LineToolElliott,t.LineToolFibCircles=i("4bfY").LineToolFibCircles,t.LineToolVertLine=i("n40Z").LineToolVertLine,t.LineToolCrossLine=i("MA5A").LineToolCrossLine,t.LineToolBarsPattern=i("2bPF").LineToolBarsPattern,t.LineToolTrendBasedFibTime=i("yUly").LineToolTrendBasedFibTime,t.LineToolFibTimeZone=i("FsE7").LineToolFibTimeZone,t.LineToolCircleLines=i("tG6Q").LineToolCircleLines,t.LineToolDateRange=i("WkYF").LineToolDateRange,t.LineToolPriceRange=i("RDDl").LineToolPriceRange,t.LineToolDateAndPriceRange=i("UCMi").LineToolDateAndPriceRange,t.LineToolParallelChannel=i("qcGP").LineToolParallelChannel,t.LineToolTrendAngle=i("nW7S").LineToolTrendAngle,t.LineToolTrendLine=i("WPQD").LineToolTrendLine,t.LineToolInfoLine=i("yi8X").LineToolInfoLine,t.LineToolArrowMark=i("TohL").LineToolArrowMark,t.LineToolExecution=i("704P").LineToolExecution,t.LineToolPitchfan=i("NhkU").LineToolPitchfan,t.LineToolGannSquare=i("Z0Sh").LineToolGannSquare,t.LineToolFibSpeedResistanceFan=i("zZ5f").LineToolFibSpeedResistanceFan,t.LineToolGannComplex=i("nd9+").LineToolGannComplex,t.LineToolGannFixed=i("TBaH").LineToolGannFixed,t.LineToolGannFan=i("4u8j").LineToolGannFan,t.LineToolFibWedge=i("9QkW").LineToolFibWedge,t.LineToolPitchfork=i("aDyP").LineToolPitchfork,t.LineToolDisjointAngle=i("oIoN").LineToolDisjointChannel,t.LineToolFlatBottom=i("InMJ").LineToolFlatBottom,t.LineToolIcon=i("icPo").LineToolIcon,t.LineToolRotatedRectangle=i("Az04").LineToolRotatedRectangle,t.LineToolFibSpiral=i("i80N").LineToolFibSpiral,t.LineToolHeadAndShoulders=i("aILO").LineToolHeadAndShoulders,t.LineToolTriangle=i("isVH").LineToolTriangle,t.LineToolTrianglePattern=i("lNN+").LineToolTrianglePattern,t.LineTool5PointsPattern=i("NJRZ").LineTool5PointsPattern,t.LineToolThreeDrivers=i("PYn8").LineToolThreeDrivers,t.LineToolABCD=i("pKDv").LineToolABCD,t.LineToolPolyline=i("hP9j").LineToolPolyline,t.LineToolPath=i("YdVo").LineToolPath,t.LineToolPrediction=i("Wh6B").LineToolPrediction,t.LineToolPriceLabel=i("zqZp").LineToolPriceLabel,t.LineToolArrowMarker=i("wiuq").LineToolArrowMarker,t.LineToolNote=i("gLxC").LineToolNote,t.LineToolNoteAbsolute=i("gLxC").LineToolNoteAbsolute,t.LineToolBrush=i("+hLl").LineToolBrush,t.LineToolArc=i("0Pxc").LineToolArc,t.LineToolCallout=i("odCa").LineToolCallout,t.LineToolBalloon=i("me8f").LineToolBalloon,t.LineToolText=i("V3Oj").LineToolText,t.LineToolHorzLine=i("/DxK").LineToolHorzLine, t.LineToolHorzRay=i("CJIV").LineToolHorzRay,t.LineToolRectangle=i("7qI1").LineToolRectangle,t.LineToolEllipse=i("V086").LineToolEllipse,t.LineToolTimeCycles=i("kIXa").LineToolTimeCycles,t.LineToolSineLine=i("bv/X").LineToolSineLine,t.LineToolGhostFeed=i("XUCF").LineToolGhostFeed,t.LineToolBezierQuadro=i("Xyly").LineToolBezierQuadro,t.LineToolBezierCubic=i("N+BX").LineToolBezierCubic,t.LineToolArrow=i("QQu0").LineToolArrow,t.LineToolRay=i("5ZUI").LineToolRay,t.LineToolExtended=i("CHw2").LineToolExtended,t.LineToolSchiffPitchfork=i("v5F8").LineToolSchiffPitchfork,t.LineToolSchiffPitchfork2=i("XFad").LineToolSchiffPitchfork2,t.LineToolInsidePitchfork=i("EqoR").LineToolInsidePitchfork,t.LineToolTextAbsolute=i("V3Oj").LineToolTextAbsolute,t.LineToolArrowMarkLeft=i("TohL").LineToolArrowMarkLeft,t.LineToolArrowMarkRight=i("TohL").LineToolArrowMarkRight,t.LineToolArrowMarkUp=i("TohL").LineToolArrowMarkUp,t.LineToolArrowMarkDown=i("TohL").LineToolArrowMarkDown,t.LineToolFlagMark=i("aIha").LineToolFlagMark,t.LineToolCypherPattern=i("bTqm").LineToolCypherPattern,t.LineToolElliottImpulse=i("xz+e").LineToolElliottImpulse,t.LineToolElliottTriangle=i("xz+e").LineToolElliottTriangle,t.LineToolElliottTripleCombo=i("xz+e").LineToolElliottTripleCombo,t.LineToolElliottCorrection=i("xz+e").LineToolElliottCorrection,t.LineToolElliottDoubleCombo=i("xz+e").LineToolElliottDoubleCombo,t.LineToolRiskRewardLong=i("tDUI").LineToolRiskRewardLong,t.LineToolRiskRewardShort=i("tDUI").LineToolRiskRewardShort,t.LineToolPosition=i("ziJ5").LineToolPosition,t.LineToolOrder=i("B4/o").LineToolOrder},"OK+B":function(e,t,i){"use strict";var n=i("Eyy1").assert,r=i("eJTA"),o=r.rgba,s=r.rgbaToString,a=r.parseRgb,l=i("+GxX").isFeatureEnabled,c=i("cWHH"),u=i("1Wlv").PriceScale,h=i("8sOK").StudyStub,d=i("CW80"),p=d.createLineTool,_=d.createLineToolProperties,f=d.createStudyLineToolProperties,m=d.isLineToolName,v=d.isStudyLineToolName,y=i("Ss5c").LineDataSource,g=i("OH2X").LineToolBarsPattern,b=i("OH2X").LineToolCallout,S=i("HLXm"),w=i("GVHu"),P=w.Study,C=w.prepareStudyPropertiesForLoadChart,x=i("3ClC").createStudy,T=i("qJq3").Series,I=i("dfhE"),M=i("n5al"),L=i("0YCj"),O=i("Kxc7"),k=i("txPx").getLogger("Chart.Serialization"),A=i("OH2X").LineToolParallelChannel,E=i("OH2X").LineToolTrendAngle,V=i("OH2X").LineToolGhostFeed,D=i("OH2X").LineToolElliott,B=i("7ktv").PriceDataSource,R=i("iDOr").Pane,N=i("Tmoa"),F=i("jofe").createDeferredPromise,j=i("ApcL").preferencesByWhiteList,W=(k=i("txPx").getLogger("Chart.Serialization"),i("mPvX").LineToolsGroupModel);c.version=2,c.prototype.state=function(e,t,i){for(var n={panes:[]},r=0;r1&&r.push(l)),s=(s+1)%t.length}return r},c.prototype.restoreState=function(e,t,i){new H(this).reset();var n={};if(e.panes)if(Array.isArray(e.panes)){if(!(e.panes.length<1)){if(this._shouldBeSavedEvenIfHidden=void 0===e.shouldBeSavedEvenIfHidden||e.shouldBeSavedEvenIfHidden,e.chartProperties&&!e.chartProperties.timezone&&(e.chartProperties.timezone=e.timezone),e.chartProperties){var 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&&(n.showSeriesLastValueProperty=!0),"showStudyLastValue"in r&&(n.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),"backgroundType"in e.chartProperties.paneProperties||(e.chartProperties.paneProperties.backgroundType="solid"),this._properties.paneProperties.mergeAndFire(e.chartProperties.paneProperties),this._properties.scalesProperties.mergeAndFire(r),e.chartProperties.timezone&&this._properties.timezone.setValue(e.chartProperties.timezone),e.chartProperties.chartEventsSourceProperties&&this._properties.chartEventsSourceProperties&&this._properties.chartEventsSourceProperties.mergeAndFire(e.chartProperties.chartEventsSourceProperties),this._timeScale.restoreState(e.timeScale,t),this._updateDateTimeFormatter()}if(e.timeScale&&this._timeScale.restoreState(e.timeScale,t),!this.readOnly()){var o=this._getExceedingChildStudies(e.panes);if(o.length){ for(var s=e.panes.length-1;s>=0;--s){for(var a=(h=e.panes[s]).sources.length-1;a>=0;--a){var l=h.sources[a];~o.indexOf(l)&&h.sources.splice(a,1)}h.sources.length||e.panes.splice(s,1)}0}}var c=e.panes;this.panes()[0].restoreState(c[0],t,e.version,n,i,!0);var u=1;for(s=1;sm&&_%100==0?{lines_limit_exceeded:!0,line_tools_count:_}:(this._dataSourceCollectionChanged.fire(),{})}k.logDebug("ChartModel.restoreState: invalid state")}else k.logDebug("ChartModel.restoreState: invalid state");else k.logDebug("ChartModel.restoreState: invalid state")},R.prototype.state=function(e,t,i,n,r){var o={},s=new Map;function a(e){if(s.has(e))return s.get(e);var o=null,a=i&&!e.isSavedInStudyTemplates()||!e.state||!(o=e.state(t,r))||!e.isSavedInChart(t)||n&&e.isActualSymbol&&!e.isActualSymbol()?null:o;return s.set(e,a),a}if(e){o.sources=[];for(var l=0;l1e200){var m=h-1;k.logWarn("Datasource zorder has bad value: "+_.zorder+" Resetting it to "+m),_.zorder=m}else if(!this.isZOrderAvailable(_.zorder)){l&&"MainSeries"===f&&this._model.mainSeries().zorder()===_.zorder||(_.zorder=d+1)}var v=_.id;null===this._model.dataSourceForId(_.id)||"MainSeries"===f?(s[v]=_.ownerSource,f&&("MainSeries"===f?this._restoreMainSeries(_,t,l,n,r,o):f.toLowerCase().startsWith("study")?this.restoreStudy(_,t,n,o):TradingView.isInherited(TradingView[f],y)?this.restoreLineTool(_,t,void 0,o):TradingView[f]&&TradingView[f].createFromState&&this._restoreSpecialSource(_,t,o)),h=Math.min(h,_.zorder),d=Math.max(d,_.zorder)):k.logError("Duplicate id while restoring pane: "+_.type+","+_.id)}}}var g,b,S=new Set,w=this;function C(e){var t=defaults("chartproperties").paneProperties.axisProperties,i=new u(w.model().properties().scalesProperties,t);return i.restoreState(e.state),e.sources.forEach((function(e){var n=w.dataSourceForId(e);n&&function(e,t,i){S.add(e),void 0!==i.m_showSymbolLabels&&e instanceof T&&w.model().properties().scalesProperties.showSymbolLabels.setValue(i.m_showSymbolLabels),e.setPriceScale(t),t.addDataSource(e)}(n,i,t)})),0===i.dataSources().length?null:i}if(e.leftAxisesState)g=e.leftAxisesState.map(C).filter((function(e){return null!==e}));else{var x=C({state:e.leftAxisState,sources:e.leftAxisSources});g=null!==x?[x]:[]} if(this._leftPriceScales.slice().forEach(function(e){this.removePriceScale(e)}.bind(this)),this._leftPriceScales=[],g.forEach((function(e){w._placePriceScale(e,"left")})),e.rightAxisesState)b=e.rightAxisesState.map(C).filter((function(e){return null!==e}));else{var I=C({state:e.rightAxisState,sources:e.rightAxisSources});b=null!==I?[I]:[]}this._rightPriceScales.forEach(function(e){this.removePriceScale(e)}.bind(this)),this._rightPriceScales=[],b.forEach((function(e){w._placePriceScale(e,"right")})),this._currentPriceScaleRatio=e.priceScaleRatio||e.leftPriceScaleRatio||e.rightPriceScaleRatio||null;for(p=0;p=t||!i._shouldExtrapolateMore()?null:n(i.newBarBuilder(e),r,t,!0).times}))},s.prototype._ensureExtrapolatedToTime=function(e,t){var i=this;return this._extrapolateData(e,(function(n){if(n>=t||!i._shouldExtrapolateMore())return null;var o=r(i.newBarBuilder(e),n,t,2e3,!0);return o.times[o.length-1]e?this._extrapolatedBarsCache=[]:this._lastRealBarTime!==t&&this._extrapolatedBarsCache.shift(e-this._lastRealBarIndex)),this._lastRealBarIndex=e,this._lastRealBarTime=t;for(var i=0;i=a||f)){this._visiblePivots.add(l[d]), this._prices=[];for(var m=0;ms)){var h={},d=this._source.properties().levelsStyle.visibility;d.P.value()&&this.mergeLabel(h,e[l].p,"P"),d["S1/R1"].value()&&(this.mergeLabel(h,e[l].s1,"S1"),this.mergeLabel(h,e[l].r1,"R1")),d["S2/R2"].value()&&(this.mergeLabel(h,e[l].s2,"S2"),this.mergeLabel(h,e[l].r2,"R2")),d["S3/R3"].value()&&(this.mergeLabel(h,e[l].s3,"S3"),this.mergeLabel(h,e[l].r3,"R3")),d["S4/R4"].value()&&(this.mergeLabel(h,e[l].s4,"S4"), this.mergeLabel(h,e[l].r4,"R4")),d["S5/R5"].value()&&(this.mergeLabel(h,e[l].s5,"S5"),this.mergeLabel(h,e[l].r5,"R5"));var p=i.indexToCoordinate(c),_=i.indexToCoordinate(u);for(var f in h){var m=parseFloat(f),v=n.priceToCoordinate(m,a);this._pivots.push({x1:p,x2:_,y:v,label:h[f].text,labelIds:h[f].ids,src:e[l]})}}}}}},m.prototype.renderer=function(){this._invalidated&&(this._updateImpl(),this._invalidated=!1);for(var e=new u,t=this._source.properties().levelsStyle.colors,i=this._source.properties().levelsStyle.widths,r=this._source.visiblePivots(),o=0;oi)){var l=[],c=this._properties.levelsStyle.visibility;c.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);for(var u=0;ut?(s&&(clearTimeout(s),s=null),a=c,o=e.apply(n,r),s||(n=r=null)):s||!1===i.trailing||(s=setTimeout(l,u)),o}},e.exports=t.default},Q19o:function(e,t,i){"use strict";(function(t,n){var r=i("Eyy1").ensureNotNull,o=i("jA0t"),s=i("9iCb").applyOverridesToStudy,a=i("0YCj"),l=i("5JMW"),c=l.LineDataSourceApi,u=l.isLineToolRiskReward,h=i("N1UO").StudyApi,d=i("ltKl").SeriesApi,p=i("QrSB").SelectionApi,_=i("mf9N").PaneApi,f=i("IiTo"),m=i("LxhU").Interval,v=i("jCNj"),y=i("2jXJ").supportedLineTools,g=i("7MZv").showTooManyStudiesNotice,b=i("ogJP").isNumber,S=i("ogJP").inherit,w=i("vu5c").onSeriesCompletedOrErrorReceived,P=i("CW80").createLineToolProperties,C=i("96Yh"),x=C.lineToolEntityInfo,T=C.studyEntityInfo,I=i("lReN").LineToolsGroupControllerApi,M=i("ocrj").RemoveSourcesCommand,L=i("FDyI").ChartWidgetApiBase,O=i("mMWL"),k=function(e,i){L.call(this,e),this._panes=new WeakMap,this._studies=new WeakMap,this._lineDataSources=new WeakMap,this._activateChart=i,this._selectionApi=null,this._visibleBarsChanged=new t,this._chartWidget.onAboutToBeDestroyed().subscribe(this,this._destroy,!0),this._chartWidget.withModel(this,(function(){this._chartWidget.model().timeScale().visibleBarsStrictRangeChanged().subscribe(this,this._onVisibleBarsChanged)}))};function A(e,t){return t.map((function(t){return e.dataSourceForId(t)}))}function E(e,t){var i=n.utc_to_cal(t.timezone,1e3*e),r=t.spec.correctTradingDay(i);return n.set_hms(r,0,0,0,0,v.get_timezone("Etc/UTC")),r.getTime()/1e3}S(k,L),k.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},k.prototype._getStudyApi=function(e){var t=this._studies.get(e);return void 0===t&&(t=new h(e,this._chartWidget),this._studies.set(e,t)),t},k.prototype._getLineDataSourceApi=function(e){var t=this._lineDataSources.get(e);return void 0===t&&(t=new c(e,this._chartWidget.model().model(),{apiPointsToDataSource:this._convertUserPointsToDataSource.bind(this),dataSourcePointsToPriced:function(e){var t=this._chartWidget.model().mainSeries().syncModel(),i=this._chartWidget.model().timeScale();return e.map((function(e){var 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},k.prototype._makeSubscriptionFromDelegate=function(e){return{subscribe:e.subscribe.bind(e), unsubscribe:e.unsubscribe.bind(e),unsubscribeAll:e.unsubscribeAll.bind(e)}},k.prototype.executeActionById=function(e){this._chartWidget.executeActionById(e)},k.prototype.getCheckableActionState=function(e){return this._chartWidget.getCheckableActionState(e)},k.prototype.setZoomEnabled=function(e){this._chartWidget.model().model().setZoomEnabled(e)},k.prototype.setScrollEnabled=function(e){this._chartWidget.model().model().setScrollEnabled(e)},k.prototype.refreshMarks=function(){this._chartWidget.refreshMarks()},k.prototype.clearMarks=function(){this._chartWidget.clearMarks()},k.prototype.symbol=function(){return this._chartWidget.getSymbol()},k.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,pro_name:e.pro_name}:null},k.prototype.resolution=function(){return this._chartWidget.model().mainSeries().properties().interval.value()},k.prototype.setSymbol=function(e,t){if(e!==this.symbol()){var i=this._chartWidget.model().mainSeries().dataEvents();t&&w(i,(function(e){e||t()})),this._activateChart(),this._chartWidget.setSymbol(e)}},k.prototype.resetData=function(){this._chartWidget.model().mainSeries().rerequestData()},k.prototype.setResolution=function(e,t){var i=m.normalize(e);if(null!==i&&i!==this.resolution()){var n=this._chartWidget.model().mainSeries().dataEvents();t&&w(n,(function(e){e||t()})),this._activateChart(),this._chartWidget.setResolution(i)}},k.prototype.setEntityVisibility=function(e,t){console.warn("`setEntityVisibility` is deprecated. Use shape/study API instead");var i=this._chartWidget.model().model().dataSourceForId(e);if(i){var n=i.properties();n&&n.visible&&n.visible.setValue(t)}},k.prototype.getAllStudies=function(){return this._chartWidget.model().model().allStudies().map(T)},k.prototype.availableZOrderOperations=function(e){var t=A(this._chartWidget.model().model(),e);return this._chartWidget.model().availableZOrderOperations(t)},k.prototype.sendToBack=function(e){var t=A(this._chartWidget.model().model(),e);this._chartWidget.model().sendToBack(t)},k.prototype.bringToFront=function(e){var t=A(this._chartWidget.model().model(),e);this._chartWidget.model().bringToFront(t)},k.prototype.insertAfter=function(e,t){var i=this._chartWidget.model().model(),n=A(i,e),r=i.dataSourceForId(t);this._chartWidget.model().insertAfter(n,r)},k.prototype.insertBefore=function(e,t){var i=this._chartWidget.model().model(),n=A(i,e),r=i.dataSourceForId(t);this._chartWidget.model().insertBefore(n,r)},k.prototype.bringForward=function(e){var t=A(this._chartWidget.model().model(),e);this._chartWidget.model().bringForward(t)},k.prototype.sendBackward=function(e){var t=A(this._chartWidget.model().model(),e);this._chartWidget.model().sendBackward(t)},k.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)}, k.prototype.getAllShapes=function(){return this._chartWidget.model().model().allLineTools().map(x).filter((function(e){return null!==e.name}))},k.prototype.removeAllShapes=function(){this._chartWidget.removeAllDrawingTools()},k.prototype.removeAllStudies=function(){this._chartWidget.removeAllStudies()},k.prototype.removeEntity=function(e,t){var i=this._chartWidget.model().chartModel().dataSourceForId(e);i?t&&t.disableUndo?new M(this._chartWidget.model().chartModel(),[i],"").redo():this._chartWidget.model().removeSource(i,!0,!0):console.warn("Can't find a source with id: "+e)},k.prototype.removeEntityWithUndo=function(e){var t=this._chartWidget.model().chartModel().dataSourceForId(e);this._chartWidget.model().removeSource(t,!1)},k.prototype.selection=function(){return null===this._selectionApi&&(this._selectionApi=new p(this._chartWidget.model().model())),this._selectionApi},k.prototype.createStudyTemplate=function(e){return this._chartWidget.model().model().studyTemplate(e.saveSymbol,e.saveInterval)},k.prototype.drawOnAllCharts=function(e){O.drawOnAllCharts.setValue(e)},k.prototype.applyStudyTemplate=function(e){this._chartWidget.model().applyStudyTemplate(e,""+1e3*Math.random())},k.prototype.setVisibleRange=function(e,t){if(void 0!==e&&e.from&&e.to&&!isNaN(e.from)&&!isNaN(e.to)){var i=[parseInt(e.from),parseInt(e.to)],n=this._alignPoints(i),r=n[0],o=n[1],s=void 0!==t&&"function"==typeof t,a=new Promise(function(e){this._chartWidget.setVisibleTimeRange(r,o,s?{}:t,e)}.bind(this));return s&&(console.warn("setVisibleRange now returns a Promise object and don't accept callback as the last argument"),a.then(t)),a}console.warn("Wrong time range: "+JSON.stringify(e)+'. Expected an object with "from" and "to" numeric values.')},k.prototype._getSession=function(){var e=this._chartWidget.model().mainSeries().symbolInfo();return new f.SessionInfo(e.timezone,e.session,e.holidays,e.corrections)},k.prototype.getVisibleRange=function(){var e={from:0,to:0},t=this._chartWidget.model().timeScale(),i=t.visibleBarsStrictRange();if(null===i)return e;var n=this._chartWidget.model().mainSeries(),o=n.syncModel();if(null===o)return e;var s=r(n.data().last()),a=i.lastBar()-s.index,l=a<=0?t.indexToTimePoint(i.lastBar()):o.projectTime(s.value[TradingView.TIME_PLOT],a);if(e.from=+t.indexToTimePoint(Math.max(0,i.firstBar()))||0,e.to=+l||0,m.isDWM(n.interval())){var c=this._getSession();e.from=E(e.from,c),e.to=E(e.to,c)}return e},k.prototype.getTimeScaleLogicalRange=function(){return this._chartWidget.model().timeScale().logicalRange()},k.prototype.getVisiblePriceRange=function(){return console.warn("`getVisiblePriceRange` is deprecated. Use Price Scale API instead"),this._chartWidget.model().mainSeries()?this._chartWidget.model().mainSeries().priceScale().priceRangeInPrice():null},k.prototype.scrollPosition=function(){return this._chartWidget.model().timeScale().rightOffset()},k.prototype.defaultScrollPosition=function(){return this._chartWidget.model().timeScale().defaultRightOffsetProperty().value()}, k.prototype._createTradingPrimitive=function(e,t){var i=this;var n,o,s=this._chartWidget.model().model(),a=s.paneForSource(s.mainSeries());return(t?s:this._chartWidget.model()).createLineTool(a,(n=TradingView.CLOSE_PLOT,{index:(o=r(i._chartWidget.model().mainSeries().bars().last())).index,price:o.value[n]}),e)._adapter},k.prototype.createOrderLine=function(e){e=e||{};return this._createTradingPrimitive("LineToolOrder",e.disableUndo)},k.prototype.createPositionLine=function(e){e=e||{};return this._createTradingPrimitive("LineToolPosition",e.disableUndo)},k.prototype.createExecutionShape=function(e){e=e||{};return this._createTradingPrimitive("LineToolExecution",e.disableUndo)},k.prototype.createShape=function(e,t){return this.createMultipointShape([e],t)},k.prototype._alignPoints=function(e){var t=this._chartWidget.model().model(),i=t.mainSeries(),n=i.interval();if(t.timeScale().isEmpty()||!m.isDWM(n))return e;var r=f.createAligner(n,i.symbolInfo(),!0);return null===r?e:e.map((function(e){return e?(r.moveTo(1e3*e),r.startOfBar(0)/1e3):e}))},k.prototype._convertUserPointsToDataSource=function(e){var t=this._chartWidget.model().model(),i=t.mainSeries(),n=t.timeScale().points(),r=i.data();if(t.timeScale().isEmpty())return null;var o=e.map((function(e){return e.time})),s=this._alignPoints(o);function a(e,t,o){var s=n.closestIndexLeft(e)||0,a={index:s},l=n.valueAt(s);if(e>l&&s===n.lastIndex()){var c=i.syncModel().distance(l,e);c.success&&(a.index=a.index+c.result)}if(b(t))a.price=t;else{var u=o?["open","high","low","close"].indexOf(o)+1:1;u<=0&&(u=1),a.price=r.valueAt(s)[u]}return a}for(var l=[],c=0;c2)throw new Error("Wrong points count for "+t.shape+". Required 1 or 2");2===l.length&&(p.startChanging(1,l[1]),p.setPoint(1,l[1]),p.endChanging())}else{var _=p.pointsCount() ;if(_!==l.length&&-1!==_)throw new Error("Wrong points count for "+t.shape+". Required "+_);for(var f="LineToolBrush"===c.name,m=1;mthis._minValue&&e.maxValue()1)n._touchMouseMoveWithDownInfo(u(e),n._tapPosition).manhattanDistance<30&&!n._cancelTap&&n._processTouchEvent(t,n._handler.doubleTapEvent),n._resetTapTimeout()}else{t=n._makeCompatEvent(e);if(++n._clickCount,n._clickTimeoutId&&n._clickCount>1)n._touchMouseMoveWithDownInfo(u(e),n._clickPosition).manhattanDistance<5&&!n._cancelClick&&n._processMouseEvent(t,n._handler.mouseDoubleClickEvent),n._resetClickTimeout()}},this._target=e,this._handler=t,this._options=i,this._init()}return e.prototype.destroy=function(){null!==this._unsubscribeOutsideMouseEvents&&(this._unsubscribeOutsideMouseEvents(),this._unsubscribeOutsideMouseEvents=null),null!==this._unsubscribeOutsideTouchEvents&&(this._unsubscribeOutsideTouchEvents(),this._unsubscribeOutsideTouchEvents=null),null!==this._unsubscribeMousemove&&(this._unsubscribeMousemove(),this._unsubscribeMousemove=null),null!==this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null),null!==this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null),null!==this._unsubscribeMobileSafariEvents&&(this._unsubscribeMobileSafariEvents(),this._unsubscribeMobileSafariEvents=null),this._clearLongTapTimeout(),this._resetClickTimeout()},e.prototype._mouseEnterHandler=function(e){var t=this;this._unsubscribeMousemove&&this._unsubscribeMousemove();var i=this._mouseMoveHandler.bind(this);if(this._unsubscribeMousemove=function(){t._target.removeEventListener("mousemove",i)},this._target.addEventListener("mousemove",i), !this._firesTouchEvents(e)){var n=this._makeCompatEvent(e);this._processMouseEvent(n,this._handler.mouseEnterEvent)}},e.prototype._resetClickTimeout=function(){null!==this._clickTimeoutId&&clearTimeout(this._clickTimeoutId),this._clickCount=0,this._clickTimeoutId=null,this._clickPosition={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY}},e.prototype._resetTapTimeout=function(){null!==this._tapTimeoutId&&clearTimeout(this._tapTimeoutId),this._tapCount=0,this._tapTimeoutId=null,this._tapPosition={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY}},e.prototype._mouseMoveHandler=function(e){if(!this._mousePressed&&null===this._touchMoveStartPosition&&!this._firesTouchEvents(e)){var t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.mouseMoveEvent)}},e.prototype._touchMoveHandler=function(e){if(this._lastTouchEventTimeStamp=d(e),null===this._startPinchMiddlePoint&&!this._preventTouchDragProcess){this._pinchPrevented=!0;var t=this._touchMouseMoveWithDownInfo(u(e),Object(r.ensureNotNull)(this._touchMoveStartPosition)),i=t.xOffset,n=t.yOffset,s=t.manhattanDistance;if(this._touchMoveExceededManhattanDistance||!(s<5)){if(!this._touchMoveExceededManhattanDistance){var a=.5*i,l=n>=a&&!this._options.treatVertTouchDragAsPageScroll,c=a>n&&!this._options.treatHorzTouchDragAsPageScroll;l||c||(this._preventTouchDragProcess=!0),this._touchMoveExceededManhattanDistance=!0,this._cancelTap=!0,this._clearLongTapTimeout(),this._resetTapTimeout()}if(!this._preventTouchDragProcess){var h=this._makeCompatEvent(e);this._processTouchEvent(h,this._handler.touchMoveEvent),Object(o.a)(e)}}}},e.prototype._mouseMoveWithDownHandler=function(e){if(0===e.button&&(this._touchMouseMoveWithDownInfo(e,Object(r.ensureNotNull)(this._mouseMoveStartPosition)).manhattanDistance>=5&&(this._cancelClick=!0,this._resetClickTimeout()),this._cancelClick)){var t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.pressedMouseMoveEvent)}},e.prototype._touchMouseMoveWithDownInfo=function(e,t){var i=Math.abs(t.x-e.x),n=Math.abs(t.y-e.y);return{xOffset:i,yOffset:n,manhattanDistance:i+n}},e.prototype._touchEndHandler=function(e){this._lastTouchEventTimeStamp=d(e),this._clearLongTapTimeout(),this._touchMoveStartPosition=null,this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null);var t=this._makeCompatEvent(e);(this._processTouchEvent(t,this._handler.touchEndEvent),++this._tapCount,this._tapTimeoutId&&this._tapCount>1)?(this._touchMouseMoveWithDownInfo(u(e),this._tapPosition).manhattanDistance<30&&!this._cancelTap&&this._processTouchEvent(t,this._handler.doubleTapEvent),this._resetTapTimeout()):this._cancelTap||this._processTouchEvent(t,this._handler.tapEvent);0===this._tapCount&&Object(o.a)(e),0===e.touches.length&&this._longTapActive&&(this._longTapActive=!1,Object(o.a)(e))},e.prototype._mouseUpHandler=function(e){if(0===e.button){var t=this._makeCompatEvent(e);if(this._mouseMoveStartPosition=null,this._mousePressed=!1, this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null),n.isFF)this._target.ownerDocument.documentElement.removeEventListener("mouseleave",this._onFirefoxOutsideMouseUp);if(!this._firesTouchEvents(e))if(this._processMouseEvent(t,this._handler.mouseUpEvent),++this._clickCount,this._clickTimeoutId&&this._clickCount>1)this._touchMouseMoveWithDownInfo(u(e),this._clickPosition).manhattanDistance<5&&!this._cancelClick&&this._processMouseEvent(t,this._handler.mouseDoubleClickEvent),this._resetClickTimeout();else this._cancelClick||this._processMouseEvent(t,this._handler.mouseClickEvent)}},e.prototype._clearLongTapTimeout=function(){null!==this._longTapTimeoutId&&(clearTimeout(this._longTapTimeoutId),this._longTapTimeoutId=null)},e.prototype._touchStartHandler=function(e){this._lastTouchEventTimeStamp=d(e);var t=this._target.ownerDocument.documentElement;this._cancelTap=!1,this._touchMoveExceededManhattanDistance=!1,this._preventTouchDragProcess=!1,this._touchMoveStartPosition=u(e),this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null);var i=this._touchMoveHandler.bind(this),n=this._touchEndHandler.bind(this);this._unsubscribeRootTouchEvents=function(){t.removeEventListener("touchmove",i),t.removeEventListener("touchend",n)},t.addEventListener("touchmove",i,{passive:!1}),t.addEventListener("touchend",n,{passive:!1}),this._clearLongTapTimeout(),this._longTapTimeoutId=setTimeout(this._longTapHandler.bind(this,e),240);var r=this._makeCompatEvent(e);this._processTouchEvent(r,this._handler.touchStartEvent),this._tapTimeoutId||(this._tapCount=0,this._tapTimeoutId=setTimeout(this._resetTapTimeout.bind(this),500),this._tapPosition=u(e))},e.prototype._wheelClickHandler=function(e){if(1===e.button&&!this._firesTouchEvents(e)){var t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.wheelClickEvent)}},e.prototype._mouseDownHandler=function(e){if(0===e.button){var t=this._target.ownerDocument.documentElement;n.isFF&&t.addEventListener("mouseleave",this._onFirefoxOutsideMouseUp),this._cancelClick=!1,this._mouseMoveStartPosition=u(e),this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null);var i=this._mouseMoveWithDownHandler.bind(this),r=this._mouseUpHandler.bind(this);if(this._unsubscribeRootMouseEvents=function(){t.removeEventListener("mousemove",i),t.removeEventListener("mouseup",r)},t.addEventListener("mousemove",i),t.addEventListener("mouseup",r),this._mousePressed=!0,!this._firesTouchEvents(e)){var o=this._makeCompatEvent(e);this._processMouseEvent(o,this._handler.mouseDownEvent),this._clickTimeoutId||(this._clickCount=0,this._clickTimeoutId=setTimeout(this._resetClickTimeout.bind(this),500),this._clickPosition=u(e))}}},e.prototype._init=function(){var e=this;this._target.addEventListener("mouseenter",this._mouseEnterHandler.bind(this)),this._target.addEventListener("touchcancel",this._clearLongTapTimeout.bind(this)) ;var t=this._target.ownerDocument,i=function(t){e._handler.mouseDownOutsideEvent&&(t.target&&e._target.contains(t.target)||e._handler.mouseDownOutsideEvent())};this._unsubscribeOutsideTouchEvents=function(){t.removeEventListener("touchstart",i)},this._unsubscribeOutsideMouseEvents=function(){t.removeEventListener("mousedown",i)},t.addEventListener("mousedown",i),t.addEventListener("touchstart",i,{passive:!0}),n.CheckMobile.iOS()&&n.isSafari&&(this._unsubscribeMobileSafariEvents=function(){e._target.removeEventListener("dblclick",e._onMobileSafariDoubleClick)},this._target.addEventListener("dblclick",this._onMobileSafariDoubleClick)),this._target.addEventListener("mouseleave",this._mouseLeaveHandler.bind(this)),this._target.addEventListener("contextmenu",this._contextMenuHandler.bind(this)),this._target.addEventListener("touchstart",this._touchStartHandler.bind(this),{passive:!0}),Object(o.b)(this._target),this._target.addEventListener("mousedown",this._mouseDownHandler.bind(this)),this._target.addEventListener(a,this._wheelClickHandler.bind(this)),this._initPinch(),this._target.addEventListener("touchmove",(function(){}),{passive:!1})},e.prototype._initPinch=function(){var e=this;void 0===this._handler.pinchStartEvent&&void 0===this._handler.pinchEvent&&void 0===this._handler.pinchEndEvent||(this._target.addEventListener("touchstart",(function(t){return e._checkPinchState(t.touches)}),{passive:!0}),this._target.addEventListener("touchmove",(function(t){if(2===t.touches.length&&null!==e._startPinchMiddlePoint&&void 0!==e._handler.pinchEvent){var i=h(t.touches[0],t.touches[1])/e._startPinchDistance;e._handler.pinchEvent(e._startPinchMiddlePoint,i),Object(o.a)(t)}}),{passive:!1}),this._target.addEventListener("touchend",(function(t){e._checkPinchState(t.touches)})))},e.prototype._checkPinchState=function(e){1===e.length&&(this._pinchPrevented=!1),2!==e.length||this._pinchPrevented||this._longTapActive?this._stopPinch():this._startPinch(e)},e.prototype._startPinch=function(e){var t=this._target.getBoundingClientRect()||{left:0,top:0};this._startPinchMiddlePoint={x:(e[0].clientX-t.left+(e[1].clientX-t.left))/2,y:(e[0].clientY-t.top+(e[1].clientY-t.top))/2},this._startPinchDistance=h(e[0],e[1]),void 0!==this._handler.pinchStartEvent&&this._handler.pinchStartEvent(),this._clearLongTapTimeout()},e.prototype._stopPinch=function(){null!==this._startPinchMiddlePoint&&(this._startPinchMiddlePoint=null,void 0!==this._handler.pinchEndEvent&&this._handler.pinchEndEvent())},e.prototype._mouseLeaveHandler=function(e){if(this._unsubscribeMousemove&&this._unsubscribeMousemove(),!this._firesTouchEvents(e)){var t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.mouseLeaveEvent)}},e.prototype._longTapHandler=function(e){var t=this._makeCompatEvent(e);this._processTouchEvent(t,this._handler.longTapEvent),this._processTouchEvent(t,this._handler.touchContextMenuEvent),this._cancelTap=!0,this._longTapActive=!0},e.prototype._contextMenuHandler=function(e){if(Object(o.a)(e), null===this._touchMoveStartPosition&&!this._firesTouchEvents(e)){var t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.contextMenuEvent),this._cancelClick=!0}},e.prototype._firesTouchEvents=function(e){return e.sourceCapabilities&&void 0!==e.sourceCapabilities.firesTouchEvents?e.sourceCapabilities.firesTouchEvents:d(e)=r.targetMetaInfoVersion()||(r.migrateMetaInfo(e),void 0!==t&&r.migratePropState(t),Object(n.assert)(e._metainfoVersion===r.targetMetaInfoVersion()))}))} u.sort((function(e,t){return e.targetMetaInfoVersion()-t.targetMetaInfoVersion()}))},SqfW:function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return a}));var n=i("mrSG"),r=i("tqok"),o=i("hsV8");function s(e,t){if(e.index>=t.length)return null;var i=t[e.index];return i===r.a?null:{startPrice:e.startPrice,endPrice:e.endPrice,index:i,extendTop:e.extendTop,extendBottom:e.extendBottom}}function a(e,t,i){var r=Object(o.ensureTimePointIndexIndex)(i.indexOf(e.index));return Object(n.__assign)(Object(n.__assign)({id:t},e),{index:r})}},Ss5c:function(e,t,i){"use strict";var n=i("Eyy1").ensureDefined,r=i("aO4+").Point,o=i("4TVt").LineToolPriceAxisView,s=i("fJhV").LineDataSourceTimeAxisView,a=i("mMWL"),l=i("LxhU"),c=l.Interval,u=l.ResolutionKind,h=i("pPtI").getServerInterval,d=i("txPx").getLogger("Chart.LineDataSource"),p=i("FQhm"),_=i("aIyQ"),f=i("tc+8"),m=i("hayr").propertyPages,v=i("WkOR").areEqualSymbols,y=i("Kxc7"),g=i("ytGH").LineToolWidthsProperty,b=y.enabled("datasource_copypaste"),S=i("ng+v").LineDataSourceBase;function w(e,t){S.call(this,e),this._properties=t,this._pointAdded=new _,this._pointChanged=new _,this._onTemplateApplying=new _,this._onTemplateApplied=new _,this._onIsActualIntervalChange=new _,this._paneViews=[],this._fixedPoints=[],this._currentPointsetId=null,this._properties.hasChild("symbol")||this._properties.addChild("symbol",new f(e.mainSeries().symbol())),this._properties.hasChild("interval")||this._properties.addChild("interval",new f(e.mainSeries().interval())),this._sourceHiddenPrevValue=!1,this._sourceHiddenChangedTimeoutId=null,this.calcIsActualSymbol(),this._properties.intervalsVisibilities.listeners().subscribe(this,w.prototype.calcIsActualSymbol);var i=this;if(this._properties.listeners().subscribe(this,(function(){i.propertiesChanged()})),this._createPointsProperties(),this.m_priceAxisViews=[],this.m_timeAxisViews=[],this.pointsCount()>0)for(var n=0;n=i.multiplier()&&(t=e.key)})),t},w.prototype.calcIsActualSymbol=function(){var e=this._properties.symbol,t=this._model.mainSeries(),i=e.value();if(this._isActualSymbol=t.symbolSameAsCurrent(i),this._isActualSymbol){var n=t.symbol();v(i,n)||(d.logWarn('Possible drawing "migrating" detected from "'+i+'" to "'+n+'"'),d.logWarn("Series symbolInfo: "+JSON.stringify(t.symbolInfo())),d.logWarn((new Error).stack)),e.setValue(n)}this.calcIsActualInterval(),this.calcIsActualCurrency(),this._onSourceHiddenMayChange()},w.prototype.calcIsActualCurrency=function(){if(this._model.currencyLabelEnabled()){var e=this.ownerSource();if(null===e)return void(this._isActualCurrency=!1);var t=this._properties.currencyId.value();if(null!==t)this._isActualCurrency=t===this.ownerSource().symbolSource().currency();else{var i=e.symbolSource().symbolInfo();this._isActualCurrency=null!==i&&i.currency_code===i.original_currency_code}}else this._isActualCurrency=!0;this._onSourceHiddenMayChange()},w.prototype.calcIsActualInterval=function(){var e=this._isActualInterval,t=this._properties,i=this._model.mainSeries(),n=c.parse(i.interval()),r=t.intervalsVisibilities;if(this._isActualInterval=!1,n.isSeconds()&&n.multiplier()<60){var o=r.seconds.value(),s=r.secondsFrom.value(),a=r.secondsTo.value();this._isActualInterval=o&&n.multiplier()>=s&&n.multiplier()<=a}if(n.isSeconds()&&n.multiplier()>=60){var l=Math.floor(n.multiplier()/60);o=r.minutes.value(),s=r.minutesFrom.value(),a=r.minutesTo.value();this._isActualInterval=o&&l>=s&&l<=a}if(n.isMinutes()&&n.multiplier()<60){o=r.minutes.value(),s=r.minutesFrom.value(),a=r.minutesTo.value();this._isActualInterval=o&&n.multiplier()>=s&&n.multiplier()<=a}if(n.isMinutes()&&n.multiplier()>=60){var u=Math.floor(n.multiplier()/60);o=r.hours.value(),s=r.hoursFrom.value(),a=r.hoursTo.value();this._isActualInterval=o&&u>=s&&u<=a}if(n.isDays()){o=r.days.value(),s=r.daysFrom.value(),a=r.daysTo.value();this._isActualInterval=o&&n.multiplier()>=s&&n.multiplier()<=a}if(n.isWeeks()&&(this._isActualInterval=r.weeks.value()),n.isMonths()&&(this._isActualInterval=r.months.value()),n.isRange()&&(this._isActualInterval=r.ranges.value()),!this._isActualInterval&&this._model.selection().isSelected(this)){var h=this;this._model.selectionMacro((function(e){ e.removeSourceFromSelection(h)}))}this._isActualInterval!==e&&this._onIsActualIntervalChange.fire(),this._onSourceHiddenMayChange()},w.PointIndexProperty=function(e,t){f.call(this),this._lineSource=e,this._pointIndex=t},inherit(w.PointIndexProperty,f),w.PointIndexProperty.prototype.value=function(){return this._lineSource.points()[this._pointIndex].index},w.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())},w.prototype._syncMultichartState=function(){var e={points:this._timePoint,interval:this._model.mainSeries().interval()};this.linkKey&&this.isSynchronizable()&&a.finishChangingLineTool({model:this._model,linkKey:this.linkKey,symbol:this._model.mainSeries().symbol(),finalState:e})},w.prototype._createPointProperty=function(e){var t=this._pointsProperty.points;t.addProperty(e);var i=t[e];i.addChild("price",new w.PointPriceProperty(this,e)),i.addChild("bar",new w.PointIndexProperty(this,e))},w.prototype._createPointsProperties=function(){this._pointsProperty=new f,this._pointsProperty.addChild("points",new f);for(var e=0;e0&&(this._points=e)},w.prototype.restorePoints=function(e,t,i){this._timePoint=e,this._points=t,i||this.denormalizeTimePoints()},w.prototype.restoreExternalPoints=function(e){this.properties().interval.setValue(e.interval),this._timePoint=e.points,this.isActualSymbol()?this.createServerPoints():this.clearServerPoints()},w.prototype.restoreExternalState=function(e){this.properties().merge(e)},w.prototype.restorePositionPercents=function(e){this._positionPercents=e},w.prototype.getLinkKey=function(){return this.linkKey||null},w.prototype.updateAllViewsAndRedraw=function(){this.updateAllViews(),this._model.updateSource(this)},w.prototype.propertiesChanged=function(e){this.calcIsActualInterval(),this.updateAllViewsAndRedraw(),e||this._syncLineStyleIfNeeded()},w.prototype._syncLineStyleIfNeeded=function(){if(!this._syncLineStyleMuted&&this.linkKey){var e=this.properties().state(this._syncStateExclusions);delete e.interval,a.changeLineStyle({linkKey:this.linkKey,state:e,model:this._model})}},w.prototype._muteSyncLineStyle=function(){this._syncLineStyleMuted=!0},w.prototype._unmuteSyncLineStyleWithoutApplyingChanges=function(){this.propertiesChanged(),this._syncLineStyleMuted=!1},w.prototype.points=function(){for(var e=[],t=0;t=2&&this._properties.snapTo45Degrees&&this._snapPoint45Degree(i,this.points()[this.points().length-2]),i},w.prototype.addPoint=function(e,t,i){var n=this._preparePoint(e,t);return this._addPointIntenal(n,t,i)},w.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},w.prototype.addFixedPoint=function(e){this._fixedPoints.push(e);var t=this._fixedPoints.length===this.pointsCount();return t&&this.calcPositionPercents(),t},w.prototype.calcPositionPercents=function(){if(!this.priceScale()||this.priceScale().isEmpty())return[];this._positionPercents=[];for(var e=0;e=0;--t)e.push(this._paneViews[t]);return e},w.prototype._setPaneViews=function(e){this._paneViews=e,this._model.lightUpdate()},w.prototype.dataWindowView=function(){return null},w.prototype.statusView=function(){return null},w.prototype.isSourceHidden=function(){return!this._properties.visible.value()||a.hideAllDrawings().value()&&this.canBeHidden()||!this._isActualInterval||!this._isActualSymbol||!this._isActualCurrency},w.prototype._onSourceHiddenMayChange=function(){var e=this.isSourceHidden();e!==this._sourceHiddenPrevValue&&null===this._sourceHiddenChangedTimeoutId?this._sourceHiddenChangedTimeoutId=setTimeout(this._processHibernate.bind(this),100):e===this._sourceHiddenPrevValue&&null!==this._sourceHiddenChangedTimeoutId&&(clearTimeout(this._sourceHiddenChangedTimeoutId),this._sourceHiddenChangedTimeoutId=null)},w.prototype._processHibernate=function(){var e=this.isSourceHidden();this._sourceHiddenChangedTimeoutId=null,this._sourceHiddenPrevValue=e,e?this.isStarted()&&this.stop():this.isStarted()||this.start()},w.prototype.isSynchronizable=function(){return this.priceScale()===this._model.mainSeries().priceScale()},w.prototype.priceAxisViews=function(e,t){if(t!==this.priceScale()||this.isSourceHidden())return null ;if(this._model.lineBeingEdited()===this){var i=this._model.linePointBeingEdited();if(null!==i&&i0&&(o=-o),o},t.prototype._reversePoints=function(){var e=this._points,t=e[0],i=e[1];this._points[0]=i,this._points[1]=t,this.normalizePoints(),this.restart()},t}(o.LineDataSource)},TMWk:function(e,t,i){"use strict";var n=i("Eyy1").assert,r=i("ogJP").clone,o=i("GVHu").Study,s=i("k9/m").PlotList,a=i("w4Ji").studyPlotFunctionMap,l=i("w4Ji").studyEmptyPlotValuePredicate;function c(e,t,i,n){o.call(this,e,t,i,n),this._underlyingData=new s(a(n),l)}inherit(c,o),c.prototype.clearData=function(){o.prototype.clearData.call(this),this._underlyingData.clear()},c.prototype._mergeData=function(e){this._invalidateLastNonEmptyPlotRowCache();var t=this._underlyingData.firstIndex();this._underlyingData.merge(e),t!==this._underlyingData.firstIndex()&&(this.m_data=new s(a(this._metaInfo),l));var i=this.m_data.lastIndex();this._underlyingData.range(i,this._underlyingData.lastIndex()).each(function(e,t){return this.m_data.add(e,r(t)),!1}.bind(this)),this._plotsForStrategyProcessing().forEach((function(e){this._createStrategy(e.strategy,e.strategyIndex,e.targetIndex,i).rebuildData(this.m_data)}),this)},c.prototype._plotsForStrategyProcessing=function(){var e=["dataoffset"],t=[];return this._metaInfo.plots.forEach((function(i,r){if(e.indexOf(i.type)>-1){var o=null;this._metaInfo.plots.forEach((function(e,t){e.id===i.target&&(o=t)})),n(o>=0,"target plot not found for strategy plot "+i.id);var s={strategy:i.type,strategyIndex:r,targetIndex:o};t.push(s)}}),this),t},c.prototype._createStrategy=function(e,t,i,n){return new c["Strategy_"+e](t,i,n)},c.Strategy_dataoffset=function(e,t,i){this._strategyPlotIndex=e,this._targetPlotIndex=t,this._startIndex=i},c.Strategy_dataoffset.prototype.rebuildData=function(e){ var t=this._targetPlotIndex+1,i=this._strategyPlotIndex+1,n=null,r=null;e.range(this._startIndex||e.firstIndex(),e.lastIndex()).each((function(o,s){var a=s[t],l=s[i]?Math.round(s[i]):null;if(s[t]=null,s[i]=null,!l||l>0)return!1;var c=o+l,u={pointIndex:c,value:a};if(r){if(r.pointIndex!==u.pointIndex){c>=0&&(e.valueAt(c)[t]=a);var h=!1;n&&(h=n.value<=r.value&&r.value<=a||n.value>=r.value&&r.value>=a),h?r.pointIndex>=0&&(e.valueAt(r.pointIndex)[t]=null):n=r,r=u}}else r=u;return!1}))},t.study_ScriptWithDataOffset=c},TTFo:function(e,t,i){"use strict";i.r(t),i.d(t,"fromPercent",(function(){return o})),i.d(t,"toPercent",(function(){return s})),i.d(t,"toPercentRange",(function(){return a})),i.d(t,"fromIndexedTo100",(function(){return l})),i.d(t,"toIndexedTo100",(function(){return c})),i.d(t,"toIndexedTo100Range",(function(){return u})),i.d(t,"toLog",(function(){return h})),i.d(t,"fromLog",(function(){return d}));var n=i("Qb4w"),r=i("Hr11");function o(e,t){return t<0&&(e=-e),e/100*t+t}function s(e,t){var i=100*(e-t)/t;return t<0?-i:i}function a(e,t){var i=s(e.minValue(),t),r=s(e.maxValue(),t);return new n.PriceRange(i,r)}function l(e,t){return t<0&&(e=-e),(e-=100)/100*t+t}function c(e,t){var i=100*(e-t)/t+100;return t<0?-i:i}function u(e,t){var i=c(e.minValue(),t),r=c(e.maxValue(),t);return new n.PriceRange(i,r)}function h(e){var t=Math.abs(e);if(t<1e-8)return 0;var i=Object(r.log10)(t+1e-4)+4;return e<0?-i:i}function d(e){var t=Math.abs(e);if(t<1e-8)return 0;var i=Math.pow(10,t-4)-1e-4;return e<0?-i:i}},TcSq:function(e,t,i){"use strict";function n(e){return e===r(e)}function r(e){var t=e.indexOf("$"),i=e.indexOf("@");return t<0&&i>=0?null:e.substring(Math.max(t+1,0),i>=0?i:e.length)}function o(e){return e.startsWith("PUB;")}function s(e){return e.startsWith("USER;")}function a(e){return e.startsWith("STD;")}function l(e){return e.includes("Candlestick%1Pattern%1")}i.r(t),i.d(t,"isPineIdString",(function(){return n})),i.d(t,"extractPineId",(function(){return r})),i.d(t,"isPublishedPineId",(function(){return o})),i.d(t,"isCustomPineId",(function(){return s})),i.d(t,"isStandardPineId",(function(){return a})),i.d(t,"isCandleStickId",(function(){return l}))},TlGQ:function(e,t,i){"use strict";i.r(t),i.d(t,"visitObject",(function(){return o}));var n=i("ogJP");function r(e,t,i){return Object(n.isArray)(e)?function(e,t,i){return e.map((function(e){var n=r(e,t,i),o=t(n);return void 0!==o?o:n}))}(e,t,i):Object(n.isObject)(e)&&(Object(n.isHashObject)(e)||i&&i.visitInstances)?function(e,t,i){var n={};return Object.keys(e).forEach((function(o){var s=r(e[o],t,i),a=t(s);n[o]=void 0!==a?a:s})),n}(e,t,i):e}function o(e,t,i){var n=r(e,t,i),o=t(n);return void 0!==o?o:n}},TmNs:function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("KcY8"),o=i("Eyy1"),s=i("jFln"),a=i("8Uy/"),l=i("gAom"),c=function(){function e(e,t){this.setData(e,t)}return e.prototype.setData=function(e,t){this._data=e,this._commonData=t},e.prototype.draw=function(e,t,i,n,r,c){if(this._data.visible){var u=this._commonData.coordinate ;void 0!==this._commonData.fixedCoordinate&&(u=this._commonData.fixedCoordinate),e.lineWidth=Math.max(1,Math.floor(Object(o.ensureDefined)(this._data.linewidth)*c)),e.lineCap="butt",Object(s.setLineStyle)(e,void 0===this._data.linestyle?a.LINESTYLE_DOTTED:this._data.linestyle),e.strokeStyle=this._commonData.color,Object(l.drawHorizontalLine)(e,Math.round(u*c),0,Math.ceil(n*c))}},e.prototype.height=function(e,t){return 0},e}();i.d(t,"PriceLineAxisView",(function(){return u})),i.d(t,"SeriesPriceLineAxisView",(function(){return h})),i.d(t,"StudyPriceLineAxisView",(function(){return d}));var u=function(e){function t(){return e.call(this,c)||this}return Object(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.linestyle=this._lineStyle(),e.visible=!0)}},t.prototype._lineStyle=function(){return a.LINESTYLE_DOTTED},t}(r.a),h=function(e){function t(t){var i=e.call(this)||this;return i._series=t,i}return Object(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.showSeriesLastValue.value();return this._series.properties().showPriceLine.value()&&e},t}(u),d=function(e){function t(t,i){var n=e.call(this)||this;return n._study=t,n._plotname=i,n}return Object(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._lineStyle=function(){return a.LINESTYLE_DOTTED},t.prototype._priceLineColor=function(e){return e},t.prototype._isVisible=function(){var e=this._study.model().properties().scalesProperties.showStudyLastValue.value();return this._study.properties().styles[this._plotname].trackPrice.value()&&e},t}(u)},Tmoa:function(e,t,i){"use strict";i.r(t),i.d(t,"generateColor",(function(){return r})),i.d(t,"alphaToTransparency",(function(){return o})),i.d(t,"transparencyToAlpha",(function(){return s})),i.d(t,"resetTransparency",(function(){return a})),i.d(t,"getLuminance",(function(){return l})),i.d(t,"isHexColor",(function(){return c})),i.d(t,"colorFromBackground",(function(){return u})),i.d(t,"gradientColorAtPercent",(function(){return h})),i.d(t,"isColorDark",(function(){return d}));var n=i("eJTA");function r(e,t,i){if(t=t||0,!c(e))return i?Object(n.rgbaToString)(Object(n.rgba)(Object(n.parseRgb)(e),Object(n.normalizeAlphaComponent)(s(t)))):e;var r=Object(n.parseRgb)(e),o=r[0],a=r[1],l=r[2],u=Object(n.normalizeAlphaComponent)(s(t));return Object(n.rgbaToString)([o,a,l,u])}function o(e){return 100*(1-e)}function s(e){ if(e<0||e>100)throw new Error("invalid transparency");return 1-e/100}function a(e){return c(e)?e:Object(n.rgbaToString)(Object(n.rgba)(Object(n.parseRgb)(e),Object(n.normalizeAlphaComponent)(1)))}function l(e){var t=Object(n.parseRgb)(e).map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e){return 0===e.indexOf("#")}function u(e){return"black"===Object(n.rgbToBlackWhiteString)(Object(n.parseRgb)(e),150)?"white":"black"}function h(e,t,i){var r=Object(n.parseRgba)(e),o=r[0],s=r[1],a=r[2],l=r[3],c=Object(n.parseRgba)(t),u=c[0],h=c[1],d=c[2],p=c[3],_=Object(n.rgba)(Math.round(o+i*(u-o)),Math.round(s+i*(h-s)),Math.round(a+i*(d-a)),l+i*(p-l));return Object(n.rgbaToString)(_)}function d(e){return l(a(e))<.5}},TohL:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolArrowMark",(function(){return p})),i.d(t,"LineToolArrowMarkLeft",(function(){return _})),i.d(t,"LineToolArrowMarkUp",(function(){return f})),i.d(t,"LineToolArrowMarkRight",(function(){return m})),i.d(t,"LineToolArrowMarkDown",(function(){return v}));var n=i("mrSG"),r=i("YFKU"),o=i("Ocx9"),s=i("Ss5c"),a=i("tc+8"),l=i.n(a),c=Object(r.t)("Arrow Mark Left"),u=Object(r.t)("Arrow Mark Up"),h=Object(r.t)("Arrow Mark Right"),d=Object(r.t)("Arrow Mark Down"),p=function(e){function t(n,r,o){var s=this,a=r||t.createProperties(null,o);return(s=e.call(this,n,a)||this)._textPaneView=null,i.e("lt-pane-views").then(function(e){var t=[new(0,i("ct+2").ArrowMarkPaneView)(s,n)];s._setPaneViews(t)}.bind(null,i)).catch(void 0),s}return Object(n.__extends)(t,e),t.prototype.paneViews=function(){var t=e.prototype.paneViews.call(this);return null!==t&&this._textPaneView&&t.push(this._textPaneView),t},t.prototype.pointsCount=function(){return 1},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.template=function(){var t=e.prototype.template.call(this);return t.text=this.properties().childs().text.value(),t},t.createProperties=function(e,i){var n=new o.DefaultProperty(i,e);return t._configureProperties(n),n},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"5sLb")).then((function(e){return e.ArrowMarkDefinitionsViewModel}))},t.prototype._applyTemplateImpl=function(t){e.prototype._applyTemplateImpl.call(this,t),this.properties().childs().text.setValue(t.text)},t._configureProperties=function(e){s.LineDataSource._configureProperties(e),e.hasChild("text")||e.addChild("text",new l.a("")),e.addExclusion("text")},t.version=2,t}(s.LineDataSource),_=function(e){function t(t,i){return e.call(this,t,i,"linetoolarrowmarkleft")||this}return Object(n.__extends)(t,e),t.prototype.direction=function(){return"left"},t.prototype.translatedType=function(){return c},t.prototype.name=function(){return"Arrow Mark Left"},t.prototype.textAlignParams=function(){return{horzAlign:"left",vertAlign:"middle",offsetX:22,offsetY:3}},t.createProperties=function(e){ return p.createProperties(e,"linetoolarrowmarkleft")},t}(p),f=function(e){function t(t,i){return e.call(this,t,i,"linetoolarrowmarkup")||this}return Object(n.__extends)(t,e),t.prototype.direction=function(){return"up"},t.prototype.translatedType=function(){return u},t.prototype.name=function(){return"Arrow Mark Up"},t.prototype.textAlignParams=function(){return{horzAlign:"center",vertAlign:"top",offsetX:0,offsetY:20}},t.createProperties=function(e){return p.createProperties(e,"linetoolarrowmarkup")},t}(p),m=function(e){function t(t,i){return e.call(this,t,i,"linetoolarrowmarkright")||this}return Object(n.__extends)(t,e),t.prototype.direction=function(){return"right"},t.prototype.translatedType=function(){return h},t.prototype.name=function(){return"Arrow Mark Right"},t.prototype.textAlignParams=function(){return{horzAlign:"right",vertAlign:"middle",offsetX:22,offsetY:3,forceTextAlign:!0}},t.createProperties=function(e){return p.createProperties(e,"linetoolarrowmarkright")},t}(p),v=function(e){function t(t,i){return e.call(this,t,i,"linetoolarrowmarkdown")||this}return Object(n.__extends)(t,e),t.prototype.direction=function(){return"down"},t.prototype.translatedType=function(){return d},t.prototype.name=function(){return"Arrow Mark Down"},t.prototype.textAlignParams=function(){return{horzAlign:"center",vertAlign:"bottom",offsetX:0,offsetY:20}},t.createProperties=function(e){return p.createProperties(e,"linetoolarrowmarkdown")},t}(p)},TrvT:function(e,t,i){"use strict";i.r(t),i.d(t,"CompareDataWindowView",(function(){return h}));var n=i("mrSG"),r=i("it7y"),o=i("e92V"),s=i("mMWL"),a=i("qFKp"),l=i("ogJP"),c=i("vzYV"),u=a.CheckMobile.any(),h=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._studyCompare=t,n}return Object(n.__extends)(t,e),t.prototype._hideValues=function(){return!1},t.prototype._createValuesProvider=function(e,t){return new c.CompareValuesProvider(e,t)},t.prototype._currentIndex=function(){var e,t=this._model.crossHairSource().lockedIndex;return u&&(null===this._model.crossHairSource().pane&&void 0===t||Object(o.a)(s.tool.value())||null!==this._model.lineBeingEdited())?e=this._study.data().lastIndex():(e=this._model.crossHairSource().appliedIndex(),Object(l.isNumber)(e)||(e=this._study.data().lastIndex())),e},t}(r.StudyDataWindowView)},"U0+/":function(e,t,i){"use strict";i.r(t),i.d(t,"StudyMetaInfoRepository",(function(){return u}));i("YFKU");var n=i("Eyy1"),r=i("0YCj"),o=i.n(r),s=i("Si3H"),a=i("lCO3"),l=i("txPx"),c=Object(l.getLogger)("Chart.Studies.StudyMetaInfoRepository",{color:"#606"}),u=function(){function e(e){this._nextRequestNumber=1,this._rawStudiesMetaInfo=[],this._isReady=!1,this._metaInfoQueryQueue=[],this._javaMetaInfoQueryQueue=[],this._javaStudiesMetaInfo=[],this._pineMetaInfoCache=[],this._studiesMigrations=[],this._gateway=e}return e.prototype.requestMetaInfo=function(){var e=this;this._requestStarted();var t=this._makeNextRequestId();return c.logNormal("Requesting metainfo #"+t),new Promise((function(i){c.logNormal("Requesting studies metadata #"+t), e._gateway.requestMetadata(t,(function(n){c.logNormal("Requesting studies metadata #"+t+" finished");var r=n.params[1].metainfo.slice();e._processLibraryMetaInfo(r),e._requestFinished(),i()}))}))},e.prototype.findById=function(e){if(!this._isReady)return this._enqueueMetaInfoQuery(e);var t=this._findStudyMetaInfo(e);return null!==t?Promise.resolve(t):"pine"===e.type?this._compilePine(e):Promise.reject("unexpected study id="+e.studyId+" with type="+e.type)},e.prototype.findByIdSync=function(e){return this._findStudyMetaInfo(e)},e.prototype.isReady=function(){return this._isReady},e.prototype.findAllJavaStudies=function(){return this._isReady?Promise.resolve(this._javaStudiesMetaInfo):this._enqueueJavaMetaInfoQuery()},e.prototype.getInternalMetaInfoArray=function(){return this._javaStudiesMetaInfo},e.prototype.getMigrations=function(){return this._studiesMigrations},e.prototype.addPineMetaInfo=function(e){return d(this._pineMetaInfoCache,e)},e.prototype._processMigrations=function(e){throw new Error("not implemented")},e.prototype._processSiteMetaInfo=function(e,t){throw new Error("not implemented")},e.prototype._processLibraryMetaInfo=function(e){for(var t=0,i=e;tn?1:i50)){var i=0,n=C(this._position1,this._position2,this._maxSpeed),r=P(this._position1,this._position2),o=[n],s=[r];if(i+=r,null!==this._position3){var a=C(this._position2,this._position3,this._maxSpeed);if(Math.sign(a)===Math.sign(n)){var l=P(this._position2,this._position3);if(o.push(a),s.push(l),i+=l,null!==this._position4){var c=C(this._position3,this._position4,this._maxSpeed);if(Math.sign(c)===Math.sign(n)){var u=P(this._position3,this._position4);o.push(c),s.push(u),i+=u}}}}for(var h,d,p=0,_=0;_=0&&e.h>=0,"Try to set invalid size to PaneWidget "+JSON.stringify(e)),this._size.equals(e)||(this._size=e,this._canvasBinding.resizeCanvas({width:e.w,height:e.h}),this._topCanvasBinding.resizeCanvas({width:e.w,height:e.h}),this._paneCell.style.width=e.w+"px",this._paneCell.style.height=e.h+"px",this._div.style.width=e.w+"px",this._div.style.height=e.h+"px",this._rowElement.classList.toggle("js-hidden",0===e.h),null!==this._legendWidget&&this._legendWidget.updateWidgetModeBySize(e),null!==this._paneControls&&this._paneControls.updateWidgetModeByWidth(e.w))},e.prototype.width=function(){return this._size.w},e.prototype.height=function(){return this._size.h},e.prototype.backgroundColor=function(){return this._chartModel().backgroundColor().value()},e.prototype.processDoubleClickOnSource=function(e){e.id()!==this._lastFinishedToolId&&this._showEditDialogForSource(e)},e.prototype.setCursorForTool=function(e,t,i){var n=m.tool.value();if(t&&t.control()&&e)this._setCursorClassName("pointer");else if(void 0===i){if(Object(m.toolIsCursor)(n)){if(this._chart.draggingSource||this._isScrolling||this._chartUndoModel()&&this._chartUndoModel().model().sourcesBeingMoved().length)return void this._setCursorClassName("grabbing");if(e&&this._options.sourceSelectionEnabled)return void this._setCursorClassName("pointer")}if("eraser"!==n)if("zoom"!==n){var r=m.cursorTool.value();"dot"!==r?"arrow"!==r?this._setCursorClassName(""):this._setCursorClassName("default"):this._setCursorClassName("dot")}else this._setCursorClassName("zoom-in");else this._setCursorClassName("eraser")}else switch(i){case N.PaneCursorType.VerticalResize:this._setCursorClassName("ns-resize");break;case N.PaneCursorType.HorizontalResize:this._setCursorClassName("ew-resize");break;case N.PaneCursorType.DiagonalNeSwResize:this._setCursorClassName("nesw-resize");break;case N.PaneCursorType.DiagonalNwSeResize: this._setCursorClassName("nwse-resize");break;case N.PaneCursorType.Default:this._setCursorClassName("default");break;case N.PaneCursorType.Pointer:this._setCursorClassName("pointer")}},e.prototype.showContextMenuForSelection=function(e){var t=this._chartUndoModel().selection();if(!t.isEmpty()){var i=t.sources().filter((function(e){return e.hasContextMenu()}));this.showContextMenuForSources(i,e)}},e.prototype.showContextMenuForSources=function(e,t,i){return Object(n.__awaiter)(this,void 0,void 0,(function(){var r,o,s,a;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:return e.length?(r=e[0],o=Object(c.merge)(Object(c.clone)(this._options.contextMenu),i||{}),s=new k.ActionsProvider(this._chart,o),r!==this._chartUndoModel().crossHairSource()?[3,1]:(r.handleContextMenuEvent(t),[2,Promise.resolve(null)])):[2,Promise.resolve(null)];case 1:return[4,s.contextMenuActionsForSources(e)];case 2:return 0===(a=n.sent()).length?[2,Promise.resolve(null)]:[2,A.ContextMenuManager.createMenu(a).then((function(e){return e.show(t),e}))];case 3:return[2]}}))}))},e.prototype.leftPriceAxisesContainer=function(){return this._lhsPriceAxisesContainer},e.prototype.rightPriceAxisesContainer=function(){return this._rhsPriceAxisesContainer},e.prototype.state=function(){return Object(r.ensureNotNull)(this._state)},e.prototype.hasState=function(){return null!==this._state},e.prototype.setState=function(e){this._state!==e&&(this.hasState()&&(this.state().onDestroyed().unsubscribeAll(this),this.state().dataSourcesCollectionChanged().unsubscribeAll(this)),this._state=e,this.hasState()&&(this.state().onDestroyed().subscribe(this,this._onStateDestroyed,!0),this.state().dataSourcesCollectionChanged().subscribe(this,this._onDataSourcesCollectionChanged),this.updatePriceAxisWidgets()))},e.prototype.getScreenshotData=function(e){var t,i=[],n=[],r=[],o=this.state().orderedSources().slice().reverse(),s=this._chart.properties().childs().paneProperties.childs().legendProperties.childs();if(s.showLegend.value()||(null==e?void 0:e.showCollapsedLegend))for(var a=0,l=o;aU.InvalidationLevel.Cursor||e.priceScaleSideMaxLevel("right")>U.InvalidationLevel.Cursor)&&this.recalculatePriceScale(),this._lhsPriceAxisesContainer.paint(e.getterForPriceScaleInvalidationLevelBySide("left")),this._rhsPriceAxisesContainer.paint(e.getterForPriceScaleInvalidationLevelBySide("right"));var i=e.fullInvalidation();if(i!==U.InvalidationLevel.None){if(i>U.InvalidationLevel.Cursor){var n=Object(r.ensureNotNull)(this._canvasBinding.canvas.getContext("2d"));n.setTransform(1,0,0,1,0,0);var o=this._canvasRenderParams();this._drawBackground(n,o),this._state&&(this._drawSources(n,o),this._drawBarsMarks(n,o,t))}if(this._state){var s=Object(r.ensureNotNull)(this._topCanvasBinding.canvas.getContext("2d"));s.setTransform(1,0,0,1,0,0);o=this._topCanvasRenderParams();s.clearRect(0,0,Math.ceil(this._size.w*o.pixelRatio),Math.ceil(this._size.h*o.pixelRatio)),this._drawCrossHair(s,o),this._drawActiveLineTools(s,o)}}}},e.prototype.cancelCreatingLineTool=function(){var e=this._chartUndoModel(),t=this._chartUndoModel().lineBeingCreated();if(t)if(t.pointsCount()<=0){var i=t.points();if(i.length>2){var n=i[i.length-2];e.continueCreatingLine(n),this._finishTool(t)}else e.cancelCreatingLine()}else e.cancelCreatingLine();null!==this._firstZoomPoint&&this.cancelZoom(),this.setCursorForTool()},e.prototype.cancelMeasuring=function(){this._chartUndoModel().crossHairSource().clearMeasure(),this.setCursorForTool()},e.prototype._topCanvasRenderParams=function(){return{pixelRatio:this._topCanvasBinding.pixelRatio,physicalWidth:this._topCanvasBinding.canvas.width,physicalHeight:this._topCanvasBinding.canvas.height,cssWidth:this._chartModel().timeScale().width(),cssHeight:this.height()}},e.prototype._canvasRenderParams=function(){return{pixelRatio:this._canvasBinding.pixelRatio,physicalWidth:this._canvasBinding.canvas.width,physicalHeight:this._canvasBinding.canvas.height,cssWidth:this._chartModel().timeScale().width(),cssHeight:this.height()}},e.prototype._tryExitTrackingMode=function(){this._exitTrackingModeOnNextTry&&(this._startTrackPoint=null,this._clearCursorPosition())},e.prototype._tryStartMeasure=function(e,t,i,n,r){return!(!Object(m.toolIsMeasure)(m.tool.value())||t.startMeasurePoint())&&(e.isTouch||this._preventCrossHairMove()||this._setCursorPosition(e.localX,e.localY,i),n=this._chartModel().magnet().align(n,r,this.state()),t.startMeasuring({price:n,index:r},this.state()),!0)},e.prototype._tryFinishMeasure=function(e,t){if(t.startMeasurePoint()&&!t.endMeasurePoint()){var i=t.price,n=t.index;return i=this._chartModel().magnet().align(i,n,this.state()),t.finishMeasure({price:i,index:n}),Object(m.resetToCursor)(),this._preventCrossHairMove()&&this._clearCursorPosition(),!0}return!1},e.prototype._tryStartZoom=function(e,t,i,n){var r=this._chart.model().model().zoomEnabled();if("zoom"===m.tool.value()&&r){var o=this._chartUndoModel(),s=o.timeScale().indexToCoordinate(i)-.5*o.timeScale().barSpacing();return this._firstZoomPoint={price:t,index:i,x:s,y:e.localY}, this._preventCrossHairMove()||this._setCursorPosition(e.localX,e.localY,n),this._chartModel().crossHairSource().startSelection(this.state()),!0}return!1},e.prototype._tryFinishZoom=function(e){return null!==this._firstZoomPoint&&(this._finishZoom(e),!0)},e.prototype._tryHandleEraserMouseDown=function(e,t){if(e.source&&"eraser"===m.tool.value()&&!e.isCustom&&(!(r=e.source)||!r.customization||!r.customization.disableErasing)){var i=this._chartUndoModel();if(null!==e.hittest&&(Object(f.isLineTool)(e.source)||Object(_.isStudy)(e.source))){var n=e.hittest.eraseMarker();return t.control()&&void 0!==n&&e.source.processErase?e.source.processErase(i,n):i.removeSource(e.source,!1),!0}}var r;return!1},e.prototype._tryStartChangingLineTool=function(e,t,i,n){var o,s;if(e.isTouch&&null!==this._startTrackPoint)return!1;if((!e.isTouch||!this._preventSourceChange)&&t.hittest&&Object(f.isLineTool)(t.source)&&t.hittest.result()===h.HitTestResult.CHANGEPOINT){var a=this._chartUndoModel(),l=Object(r.ensure)(null===(o=this.state().mainDataSource())||void 0===o?void 0:o.firstValue()),c=Object(r.ensureNotNull)(t.source.priceScale()).coordinateToPrice(e.localY,l);a.selectionMacro((function(e){e.clearSelection(),e.addSourceToSelection(t.source)}));var u=a.model().magnet().align(c,n,this.state()),d=null===(s=t.hittest.data())||void 0===s?void 0:s.pointIndex;return this._startChangeLineToolParams={source:t.source,startPoint:{index:n,price:u},screenPoint:{x:e.localX,y:e.localY},pointIndex:d,envState:i},!0}return this._startChangeLineToolParams=null,!1},e.prototype._tryStartCloning=function(e,t,i,n){if(i.control()){var r=this._chartUndoModel().selection().sources().filter((function(e){return e.cloneable()}));if(n&&n.cloneable()&&r.push(n),r.length>0)return this._clonningAtMoveLineTools=r.map((function(e){return e.id()})),this._startCloningPoint=new o.Point(e.localX,e.localY),!0}return!1},e.prototype._tryFinishClonning=function(e,t){var i=this._chartUndoModel(),n=this._chartModel();if(t.control()&&this._clonningAtMoveLineTools){for(var s=new o.Point(e.localX,e.localY),a=Object(r.ensureNotNull)(this._startCloningPoint).subtract(s).length(),l=[],c=0,u=this._clonningAtMoveLineTools;c8){var p=this.cloneLineTools(l,!0).map((function(e){return Object(r.ensureNotNull)(i.model().dataSourceForId(e))}));i.selectionMacro((function(e){e.clearSelection(),p.forEach((function(t){e.addSourceToSelection(t)}))}));var _=new o.Point(e.localX,e.localY),f=Object(r.ensureNotNull)(p[0].priceScale()),m=Object(r.ensureNotNull)(this.state().mainDataSource()).firstValue(),v={index:i.timeScale().coordinateToIndex(e.localX),price:f.coordinateToPrice(e.localY,Object(r.ensureNotNull)(m))};i.startMovingSources(p,{logical:v,screen:_},null,t),this._clonningAtMoveLineTools=null,this._startCloningPoint=null}return!0}return!1},e.prototype._mouseDownEventForLineTool=function(e,t,i,n){var s,a;if(this.hasState()){var l=this._chartUndoModel(),c=!1,u=null,h=m.tool.value() ;Object(m.hideAllDrawings)().setValue(!1),Object(m.lockDrawings)().setValue(!1),e.isTouch&&(Object(f.isLineToolName)(h)&&"LineToolBrush"!==h||l.lineBeingCreated())&&this._initToolCreationModeParams(e);var d=l.lineBeingCreated();if(d&&"LineToolBrush"!==d.toolname){var p=Object(r.ensure)(null===(s=d.ownerSource())||void 0===s?void 0:s.firstValue());if(e.isTouch){if(!this._startTouchPoint){this._startTouchPoint=new o.Point(e.pageX,e.pageY);var _=d.points(),v=_[_.length-1],y=l.timeScale().indexToCoordinate(v.index),g=Object(r.ensureNotNull)(d.priceScale()).priceToCoordinate(v.price,p);return void(this._initCrossHairPosition=new o.Point(y,g))}}else{u=d;var b=l.model().paneForSource(d);if(b!==this._state&&null!==b){var S=this._externalPaneXCoord(b,e.localX),w=this._externalPaneYCoord(b,e.localY);c=l.continueCreatingLine({index:Math.round(l.timeScale().coordinateToIndex(S)),price:Object(r.ensure)(null===(a=d.priceScale())||void 0===a?void 0:a.coordinateToPrice(w,p))},t)}else{var P=l.model().magnet().align(n,i,this.state());c=l.continueCreatingLine({index:i,price:P},t)}}}else if(!e.isTouch||"LineToolBrush"===h){var C={index:i,price:P=l.model().magnet().align(n,i,this.state())};u=l.createLineTool(this.state(),C,h),l.lineBeingCreated()||(c=!0)}u&&l.selectionMacro((function(e){return e.addSourceToSelection(Object(r.ensureNotNull)(u))})),c&&u&&(this._finishTool(u),e.preventDefault())}},e.prototype._handleSelectionMouseDownAndGetJustDeselectedSource=function(e,t,i){var n=this._chartUndoModel(),r=null;if(t&&!t.isCustom&&Z(t.source)){var o=t.hittest&&t.hittest.result()>h.HitTestResult.MOVEPOINT_BACKGROUND;e.isTouch&&t.hittest&&t.hittest.result()===h.HitTestResult.MOVEPOINT_BACKGROUND&&(o=!0),this._preventSourceChange&&(o=!1),n.selectionMacro((function(e){var n;o?(i.control()||!t.source||e.selection().isSelected(t.source)||e.clearSelection(),i.control()&&t.source&&e.selection().isSelected(t.source)?(r=t.source,e.removeSourceFromSelection(t.source)):t.source&&!t.isCustom&&e.addSourceToSelection(t.source,(null===(n=null==t?void 0:t.hittest)||void 0===n?void 0:n.data())||void 0),e.selection().sources().length>1&&Object(F.trackEvent)("GUI","Multiselect","Click Select")):i.control()||e.clearSelection()}))}return r},e.prototype._processMouseMoveWhileZoom=function(e,t){this._preventCrossHairMove()||this._setCursorPosition(e.localX,e.localY,t)},e.prototype._setCursorPositionOnExternalPane=function(e,t,i,n){t=this._externalPaneXCoord(e,t),i=this._externalPaneYCoord(e,i),this._chart.paneByState(e)._setCursorPosition(t,i,n)},e.prototype._setCursorPosition=function(e,t,i){this._chartModel().setAndSaveCurrentPosition(this._correctXCoord(e),this._correctYCoord(t),this.state(),i)},e.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)},e.prototype._processMouseUpForCustomHandler=function(e){ var t=Object(r.ensureNotNull)(this._dataSourceAtPoint(e.localX,e.localY));if(t.hittest&&t.hittest.result()===h.HitTestResult.CUSTOM){var i=t.hittest.data();Object(h.tryCallCustomHandler)(e,null==i?void 0:i.mouseUpHandler,null==i?void 0:i.touchEndHandler)}},e.prototype._crossHairShouldBeVisible=function(){var e=this._chartModel().crossHairSource();return Object(f.isLineToolName)(m.tool.value())||Object(m.toolIsMeasure)(m.tool.value())||e.startMeasurePoint()&&!e.endMeasurePoint()||null!==this._firstZoomPoint||null!==this._chartModel().lineBeingEdited()||null!==this._chartModel().lineBeingCreated()},e.prototype._clearCursorPosition=function(){this._chartModel().clearCurrentPosition()},e.prototype._dataSourceAtPoint=function(e,t){var i=null,n=null,r=null;if(!this.hasState())return null;var s=this.state(),a=s.height(),l=s.width(),c=!1,u=function(e,t,o,s){var a=r?r.result():0;e.result()>a&&(r=e,i=t,n=o,c=s)},h=this._canvasRenderParams(),p=new o.Point(e,t);this._hitTestCustomSources(h,s.customSources(d.a.Foreground),p,u);for(var _=s.hitTestSources(),f=this._chartUndoModel(),m=_.length;0=0;--y){var S;if((x=b[y].renderer(a,l))&&x.hitTest)(S=x.hitTest(p,h))&&u(S,g,x,!1)}if(this.containsMainSeries()){var w=f.barsMarksSources();for(m=0;m=0;--l){var c=t[l],u=c.paneViews(o);if(0!==u.length)for(var h=u.length-1;h>=0;--h){var d=u[h].renderer(s,a);if(null!==d){var p=d.hitTest(i,e);null!==p&&n(p,c,d,!0)}}}},e.prototype._tryStartMovingLineTool=function(e,t,i,n){var s,a;if(null===t.source||!t.source.movable()||null!==this._startTrackPoint)return!1;if(!this._preventSourceChange){var l=this._chartUndoModel(),c=Object(r.ensureNotNull)(Object(r.ensureNotNull)(this._state).mainDataSource()).firstValue(),u=Object(r.ensureNotNull)(t.source.priceScale()).coordinateToPrice(e.localY,Object(r.ensureNotNull)(c)),h=Z(t.source)?l.selection().sources():[t.source],d=new o.Point(e.localX,e.localY),p={index:n,price:u},_=null===(a=null===(s=t.hittest)||void 0===s?void 0:s.data())||void 0===a?void 0:a.itemIndex;return this._startMoveLineToolParams={source:h,startPoint:{logical:p,screen:d},itemIndex:void 0===_?null:_,envState:i},!0}return this._startMoveLineToolParams=null,!1}, e.prototype._chartModel=function(){return this._chart.model().model()},e.prototype._chartUndoModel=function(){return this._chart.model()},e.prototype._externalPaneXCoord=function(e,t){t+=this._div.getBoundingClientRect().left+document.body.scrollLeft;var i=Object(r.ensureNotNull)(this._chart.paneByState(e)),n=i._div.getBoundingClientRect().left+document.body.scrollLeft;return i._correctXCoord(t-n)},e.prototype._externalPaneYCoord=function(e,t){t+=this._div.getBoundingClientRect().top+document.body.scrollTop;var i=Object(r.ensureNotNull)(this._chart.paneByState(e)),n=i._div.getBoundingClientRect().top+document.body.scrollTop;return i._correctYCoord(t-n)},e.prototype._correctXCoord=function(e){return Math.max(0,Math.min(e,this._size.w-1))},e.prototype._correctYCoord=function(e){return Math.max(0,Math.min(e,this._size.h-1))},e.prototype._processScroll=function(e){if(this._chart.model().model().scrollEnabled()){var t=Date.now();this._startScrollingPos||this._preventScroll()||(this._startScrollingPos={x:e.clientX,y:e.clientY,timestamp:t,localX:e.localX,localY:e.localY}),null!==this._scrollXAnimation&&this._scrollXAnimation.addPosition(e.localX,t),null!==this._scrollYAnimation&&this._scrollYAnimation.addPosition(e.localY,t);var i=this._chartUndoModel(),n=this.state().defaultPriceScale();if(this._startScrollingPos&&!this._isScrolling&&(this._startScrollingPos.x!==e.clientX||this._startScrollingPos.y!==e.clientY))return i.beginUndoMacro("scroll").setCustomFlag("doesnt_affect_save",!0),null===this._scrollXAnimation&&ne&&(this._scrollXAnimation=new x(.2,3.2,-.0026,15),this._scrollXAnimation.addPosition(this._startScrollingPos.localX,this._startScrollingPos.timestamp),this._scrollXAnimation.addPosition(e.localX,t)),this._scrollYAnimation,i.selection().isEmpty()||(n=i.selection().sources()[0].priceScale()),null===n||n.isEmpty()||(this._scrollPriceScale=n,i.startScrollPrice(this.state(),n,e.localY)),i.startScrollTime(e.localX),this._isScrolling=!0,void this.setCursorForTool();this._isScrolling&&(null!==this._scrollPriceScale&&i.scrollPriceTo(this.state(),this._scrollPriceScale,e.localY),i.scrollTimeTo(e.localX))}},e.prototype._finishScroll=function(){var e=this._chartUndoModel();e.endScrollTime(),null!==this._scrollPriceScale&&e.endScrollPrice(this.state(),this._scrollPriceScale),e.endUndoMacro(),this._isScrolling=!1,this._startScrollingPos=null,this._scrollPriceScale=null,this.setCursorForTool()},e.prototype._endScroll=function(e){var t=this;if(!this._isScrolling)return!1;var i=this._isScrolling&&this._scrollUndoCommandInStack();if(this._isScrolling){var n=Date.now();null!==this._scrollXAnimation&&this._scrollXAnimation.start(e.localX,n),null!==this._scrollYAnimation&&this._scrollYAnimation.start(e.localY,n);var r=this._chartUndoModel();if((null===this._scrollXAnimation||this._scrollXAnimation.finished(n))&&(null===this._scrollYAnimation||this._scrollYAnimation.finished(n)))return this._finishScroll(),i;var o=this._scrollXAnimation,s=this._scrollYAnimation,a=function(){if(null!==o&&!o.terminated()||null!==s&&!s.terminated()){ var e=Date.now(),i=null===o||o.finished(e),n=null===s||s.finished(e);null===o||o.terminated()||r.scrollTimeTo(o.getPosition(e)),null===s||s.terminated()||null===t._scrollPriceScale||r.scrollPriceTo(t.state(),t._scrollPriceScale,s.getPosition(e)),i&&n?t._finishScroll():requestAnimationFrame(a)}};requestAnimationFrame(a)}return i},e.prototype._terminateActiveAnimations=function(){var e=Date.now(),t=null===this._scrollXAnimation||this._scrollXAnimation.finished(e),i=null===this._scrollYAnimation||this._scrollYAnimation.finished(e);null===this._scrollXAnimation&&null===this._scrollYAnimation||t&&i||this._finishScroll(),null!==this._scrollXAnimation&&(this._scrollXAnimation.terminate(),this._scrollXAnimation=null),null!==this._scrollYAnimation&&(this._scrollYAnimation.terminate(),this._scrollYAnimation=null)},e.prototype._preventScroll=function(){return this._trackCrosshairOnlyAfterLongTap&&this._longTap||this._contextMenuOpenedOnLastTap||Object(f.isLineToolName)(m.tool.value())||Boolean(this._chartUndoModel().lineBeingCreated())||null!==this._startTrackPoint},e.prototype._isSelectBarModeEnabled=function(){return this._chartUndoModel().crossHairSource().selectBarMode().value()},e.prototype._preventCrossHairMove=function(){return!!this._trackCrosshairOnlyAfterLongTap&&(null===this._chart.trackingModePaneWidget()&&(!!this._contextMenuOpenedOnLastTap||!this._crossHairShouldBeVisible()&&null===this._startTrackPoint))},e.prototype._finishTool=function(e){var t=this._chartUndoModel(),i=m.tool.value();if(Object(m.resetToCursor)(),this._preventCrossHairMove()&&this._clearCursorPosition(),t.selectionMacro((function(t){t.addSourceToSelection(e)})),Object(D.c)(i)){var n=t.createUndoCheckpoint();this._chart.showChartPropertiesForSource(e,B.TabNames.text,void 0,n)}this._lastFinishedToolId=e.id(),Object(V.c)(e)},e.prototype._alignSourcesThatBeingMoved=function(e,t,i,n){var s=this,a=this._chartUndoModel(),l=a.timeScale().coordinateToIndex(t);a.model().sourcesBeingMoved().forEach((function(e){if(R.enabled("charting_library_base")&&a.model().sourcesBeingMoved().some((function(e){return!e.onlyYMoving()}))){var t=e.points();if(0!==t.length){var i=t.reduce((function(e,t){return t.index=0;l--)j[l].createDrawingsCaches();this._drawSourceImpl(r.gridSource(),e,t,$,Q),this._drawWatermark(e,t);for(var c=0,u=a;c=0;l--)j[l].clearDrawingCaches()},e.prototype._drawSourceImpl=function(e,t,i,n,r){var o=this.state(),s=o.height(),a=o.width(),l=n(e,this.state());if(l)for(var c=0,u=l;c=0)&&(n.shift()||i.selectionMacro((function(e){ return e.clearSelection()})),this._mouseDownEventForLineTool(e,n,y,v)))}if(b.hittest&&b.hittest.result()===h.HitTestResult.CUSTOM){var S=b.hittest.data();Object(h.tryCallCustomHandler)(e,null==S?void 0:S.mouseDownHandler,null==S?void 0:S.touchStartHandler)}if(!this._chart.readOnly()){if(b.hittest&&b.source&&b.hittest.result()===h.HitTestResult.CUSTOM_MOVE){S=b.hittest.data();if(b.isCustom){if(Object(h.tryCallCustomHandler)(e,null==S?void 0:S.pressedMouseMoveHandler,null==S?void 0:S.touchMoveHandler))return}else{var w=null==S?void 0:S.itemIndex;if(void 0!==w)return void i.startCustomMoving(b.source,w,e)}}var P=this._handleSelectionMouseDownAndGetJustDeselectedSource(e,b,n);if(this._tryHandleEraserMouseDown(b,n))return;var C=b.source&&Object(f.isLineTool)(b.source)&&b.source.isLocked&&b.source.isLocked();if(!(Object(m.lockDrawings)().value()||C)&&!b.isCustom){if(b.source&&b.source.userEditEnabled&&!b.source.userEditEnabled())return;if(this._tryStartChangingLineTool(e,b,n,y))return;if(b.hittest&&((g=b.hittest.result())===h.HitTestResult.MOVEPOINT||g===h.HitTestResult.MOVEPOINT_BACKGROUND&&Object(a.lastEventIsTouch)())){if(this._tryStartCloning(e,b,n,P))return;if(this._tryStartMovingLineTool(e,b,n,y))return}}if(b.source&&b.source instanceof E.PriceDataSource&&b.source.isDraggable())return void(this._chart.draggingSource=b.source)}b&&b.hittest&&b.hittest.result()===h.HitTestResult.REGULAR||(this._processing=!0)}}}},e.prototype._mouseUpOrTouchEndEvent=function(e){var t,i,n,o=this;if(this.hasState()){var s=e.isTouch&&null!==this._startTrackPoint,c=e.isTouch&&this._wasPinched;e.isTouch&&(this._wasPinched=!1,this._longTap=!1),this._startMoveLineToolParams=null,this._startChangeLineToolParams=null,this._initialCrosshairPositionBeforeAlign=null,this._processMouseUpForCustomHandler(e),this._isSelecting=!1;var u=this._chartUndoModel(),d=u.model(),_=d.crossHairSource();if(_.selection()&&null===this._firstZoomPoint){var v=this.state().lineToolsForArea(_.selection());u.selectionMacro((function(e){v.forEach((function(t){e.addSourceToSelection(t)}))})),_.clearSelection(),Object(F.trackEvent)("GUI","Multiselect","Area Select")}Object(l.emit)("mouse_up",{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY});var y=e.isTouch&&this._touchMove;e.isTouch&&(this._touchMove=!1);var g=new p.EnvironmentState(e),b=m.tool.value();if(e.isTouch&&!y&&(Object(m.toolIsMeasure)(b)||null!==_.measurePane())){if(this._tryStartMeasure(e,_,g,_.price,_.index))return;if(this._tryFinishMeasure(e,_))return}if(e.isTouch&&!y&&"LineToolBrush"!==b&&Object(f.isLineToolName)(b)&&!u.lineBeingCreated()){if(this._chart.justActivated())return;if(_.pane!==this._state)return void this._setCursorPosition(e.localX,e.localY,g);var S=_.currentPoint(),w=this.state().defaultPriceScale(),P=Object(r.ensure)(null===(t=this.state().mainDataSource())||void 0===t?void 0:t.firstValue()),C={index:Math.round(u.timeScale().coordinateToIndex(S.x)),price:w.coordinateToPrice(S.y,P)},x=Object(r.ensureNotNull)(u.createLineTool(this.state(),C,b)) ;return u.selectionMacro((function(e){e.addSourceToSelection(x)})),u.lineBeingCreated()||(this._finishTool(x),e.preventDefault()),void(this._startTouchPoint=null)}if(u.lineBeingCreated()&&"LineToolBrush"!==(null===(i=u.lineBeingCreated())||void 0===i?void 0:i.toolname)&&e.isTouch&&this._startTouchPoint){this._startTouchPoint=null;var T=null;if(!y){var I=(T=Object(r.ensureNotNull)(u.lineBeingCreated())).points()[T.points().length-1],M=u.continueCreatingLine({index:I.index,price:I.price},new p.EnvironmentState(e));this._initCrossHairPosition=null,M&&(this._finishTool(T),e.preventDefault())}}else if(null!==this._firstZoomPoint&&this._firstZoomPoint.draggingMode)this._finishZoom(e);else{if(this._processing=!1,u.customMoveBeingProcessed()&&u.endCustomMoving(),d.lineBeingEdited())return u.endChangingLinetool(!1),void(this._preventCrossHairMove()&&this._clearCursorPosition());if("LineToolBrush"!==b||this._isSelectBarModeEnabled()){if(d.sourcesBeingMoved().length)return u.endMovingSource(!1),d.sourcesBeingMoved().forEach((function(e){o.setCursorForTool(e)})),void d.invalidate(U.InvalidationMask.cursor());if(!this._chart.readOnly()){var L=this._dataSourceAtPoint(e.localX,e.localY),O=e.localX>=0&&e.localXh.HitTestResult.MOVEPOINT_BACKGROUND||Object(a.lastEventIsTouch)())&&u.selectionMacro((function(e){e.clearSelection(),e.addSourceToSelection(Object(r.ensureNotNull)(Y.source))}))}e.isTouch&&(this._touchMove=!1)}else{var q=u.lineBeingCreated();if(null!==q&&(Object(V.c)(q),q.finish()),(w=this.state().defaultPriceScale()).isEmpty())return;if(!q)return;var K=Object(r.ensure)(null===(n=q.ownerSource())||void 0===n?void 0:n.firstValue()),Z=w.coordinateToPrice(e.localY,K);C={index:Math.round(u.timeScale().coordinateToIndex(e.localX)),price:Z} ;u.continueCreatingLine(C)}}}},e.prototype._mouseOrTouchMoveEvent=function(e){if(this.hasState()){var t=Object(r.ensureNotNull)(this._dataSourceAtPoint(e.localX,e.localY));this._processMouseMoveForCustomHandler(t,e);var i=this._chartUndoModel();if(i){var n=i.crossHairSource();null!==this._initialCrosshairPositionBeforeAlign&&(this._initialCrosshairPositionBeforeAlign=new o.Point(n.originX(),n.originY()));var s=e.localX,a=e.localY,l=new p.EnvironmentState(e);if(null===this._firstZoomPoint){var c=!1;if(!(this._chart.readOnly()||this._editDialog&&this._editDialog.isVisible())){var u=m.tool.value(),d=null;if(!this._processing&&(Object(m.toolIsCursor)(u)||"eraser"===u||l.control()||!i.lineBeingCreated())){var _=t&&t.source,v=t&&t.hittest&&t.hittest.data();c=Boolean(v&&v.hideCrosshairLinesOnHover)||!!_&&Object(f.isLineTool)(_)&&-1!==K.indexOf(_.toolname),t.hittest&&!t.isCustom&&t.hittest.result()>h.HitTestResult.MOVEPOINT_BACKGROUND?(d=t.source,t.source&&Z(t.source)&&("eraser"!==u||t.source!==i.mainSeries())?i.model().setHoveredSource(t.source,t.hittest.data()):i.model().setHoveredSource(null,null)):i.model().setHoveredSource(null,null)}if(this._options.sourceSelectionEnabled)if(this._isSelectBarModeEnabled()||t.isCustom)this._setCursorClassName("pointer");else{var y,g=(y=t.hittest&&t.hittest.data())&&y.cursorType;this.setCursorForTool(d,l,null===g?void 0:g)}if(this._updateCommonTooltip(t),null!==t.hittest&&t.hittest.result()===h.HitTestResult.CUSTOM_MOVE)switch(g=(y=t.hittest.data()||{}).cursorType){case N.PaneCursorType.VerticalResize:this._setCursorClassName("ns-resize");break;case N.PaneCursorType.HorizontalResize:this._setCursorClassName("we-resize");break;case N.PaneCursorType.DiagonalNeSwResize:this._setCursorClassName("nesw-resize");break;case N.PaneCursorType.DiagonalNwSeResize:this._setCursorClassName("nwse-resize")}}if(this._preventCrossHairMove()&&this._clearCursorPosition(),n.setLinesShouldBeHidden(c),this._chart.readOnly()&&this._options.sourceSelectionEnabled&&(!t.isCustom&&null!==t.source&&Z(t.source)?i.model().setHoveredSource(t.source,t.hittest&&t.hittest.data()):i.model().setHoveredSource(null,null)),!e.isTouch&&i.lineBeingCreated()){var b=i.lineBeingCreated(),S=null===b?null:i.model().paneForSource(b);if(null!==S&&S!==this._state)return void this._setCursorPositionOnExternalPane(S,s,a,l)}e.isTouch||this._setCursorPosition(s,a,l)}else this._processMouseMoveWhileZoom(e,l)}}},e.prototype._pressedMouseOrTouchMoveEvent=function(e){var t,i;if(this.hasState()&&!this._pinching){this._startChangeOrMoveLineToolIfNeeded(),e.isTouch&&(this._touchMove=!0,this._preventSourceChange=!1);var n=new p.EnvironmentState(e),s=this._chartUndoModel(),a=s.crossHairSource(),l=e.localX,c=e.localY;if(null!==this._initialCrosshairPositionBeforeAlign&&(this._initialCrosshairPositionBeforeAlign=new o.Point(a.originX(),a.originY())),null!==this._firstZoomPoint)return this._processMouseMoveWhileZoom(e),void(this._firstZoomPoint.draggingMode=!0);var u=m.tool.value() ;if(e.isTouch&&this._startTouchPoint&&Object(f.isLineToolName)(u)&&"LineToolBrush"!==u&&!s.lineBeingCreated()&&!this._isSelectBarModeEnabled())this._updateCrosshairPositionInToolCreationMode(e,this.state());else{var h=a.measurePane();if(e.isTouch&&this._startTouchPoint&&(Object(m.toolIsMeasure)(u)||null!==h))this._updateCrosshairPositionInToolCreationMode(e,h||this.state());else if(e.isTouch&&s.lineBeingCreated()&&"LineToolBrush"!==(null===(t=s.lineBeingCreated())||void 0===t?void 0:t.toolname)){if(this._startTouchPoint){var d=Object(r.ensureNotNull)(s.lineBeingCreated()),_=Object(r.ensureNotNull)(s.model().paneForSource(d));this._updateCrosshairPositionInToolCreationMode(e,_)}}else{if(e.isTouch&&null!==this._startTrackPoint){this._exitTrackingModeOnNextTry=!1;var v=Object(r.ensureNotNull)(this._initCrossHairPosition),y=new o.Point(l,c).subtract(this._startTrackPoint),g=v.add(y);this._setCursorPosition(g.x,g.y,n)}else e.isTouch&&this._preventCrossHairMove()||this._setCursorPosition(l,c,n);var b=this._isSelectBarModeEnabled();if(!Object(f.isLineToolName)(u)||"LineToolBrush"===u||b||n.control()){if("LineToolBrush"===u&&!b){var S=this.state().defaultPriceScale();if(S.isEmpty())return;var w=s.lineBeingCreated();if(!w)return;var P=new o.Point(e.localX,e.localY),C=Object(r.ensure)(null===(i=w.ownerSource())||void 0===i?void 0:i.firstValue());return P.price=S.coordinateToPrice(e.localY,C),P.index=Math.round(s.timeScale().coordinateToIndex(e.localX)),void((!R.enabled("charting_library_base")||P.index>=0)&&s.continueCreatingLine(P))}if(this._chart.draggingSource){var x=e.target,T=this._chart.paneByCanvas(x);T&&(T!==this?T.setDragToAnotherPaneCursor():T.setCursorForTool());var I=this._chart.timeAxisByCanvas(x);I&&I.setCursor("grabbing")}if(!s.timeScale().isEmpty()){var M=this._options.handleScroll;if(M.pressedMouseMove&&!e.isTouch||(M.horzTouchDrag||M.vertTouchDrag)&&e.isTouch)if(s.customMoveBeingProcessed())s.processCustomMove(e);else{if(s.model().lineBeingEdited()){var L=Math.round(s.timeScale().coordinateToIndex(l));return(!R.enabled("charting_library_base")||L>=0)&&s.changeLinePoint(new o.Point(l,c),n),void this.setCursorForTool()}if(s.model().sourcesBeingMoved().length)this._alignSourcesThatBeingMoved(s.model().sourcesBeingMoved(),e.localX,e.localY,n);else if(!this._tryFinishClonning(e,new p.EnvironmentState(e))){var O=Object(m.toolIsMeasure)(u)||a.startMeasurePoint()&&a.endMeasurePoint();this._chart.readOnly()||!n.control()||Object(f.isLineToolName)(u)||O?(this._processScroll(e),this._preventScroll()&&!this._preventCrossHairMove()&&null===this._startTrackPoint&&this._setCursorPosition(e.localX,e.localY,new p.EnvironmentState(e))):this._isSelecting||(a.startSelection(this.state()),this._isSelecting=!0)}}}}}}}},e.prototype._mouseOrTouchLeaveEvent=function(e){if(this.hasState()){var t=this._chartUndoModel();if(t){if(e.isTouch||this._clearCursorPosition(),t.model().setHoveredSource(null,null),null!==this._prevHoveredHittest){var i=this._prevHoveredHittest.hittest&&this._prevHoveredHittest.hittest.data() ;Object(h.tryCallCustomHandler)(e,null==i?void 0:i.mouseLeaveHandler),this._prevHoveredHittest=null}this._updateCommonTooltip(null),this._chart.unsetActivePaneWidget()}}},e.prototype._mouseDoubleClickOrDoubleTapEvent=function(e){if(this.hasState()){var t=!this._chart.readOnly()&&!Object(f.isLineToolName)(m.tool.value())&&Object(r.ensureNotNull)(this._dataSourceAtPoint(e.localX,e.localY))||null,i=t&&t.hittest&&t.source||null;if(i&&t&&t.hittest&&t.hittest.result()<=h.HitTestResult.MOVEPOINT_BACKGROUND&&!e.isTouch&&(i=null),i&&t&&!t.isCustom&&!Z(i)&&(i=null),t&&t.isCustom){if(t.hittest&&t.hittest.result()===h.HitTestResult.CUSTOM){var n=t.hittest.data();Object(h.tryCallCustomHandler)(e,null==n?void 0:n.doubleClickHandler,null==n?void 0:n.doubleTapHandler)}}else i&&t&&!t.isCustom?this.processDoubleClickOnSource(i):this._chart.readOnly()||Object(f.isLineToolName)(m.tool.value())||this._chartUndoModel().lineBeingCreated()||!this._chartUndoModel().selection().isEmpty()||this._chart.toggleMaximizePane(this)}},e.prototype._contextMenuEvent=function(e){var t=this,i=this._chartUndoModel();if(!i.crossHairSource().startMeasurePoint()||this._trackCrosshairOnlyAfterLongTap){if(!this._pinching&&(null===this._firstZoomPoint||this._trackCrosshairOnlyAfterLongTap||this.cancelZoom(),!this.hideInplaceEditor())){if(!Object(m.toolIsCursor)(m.tool.value())&&!this._isSelectBarModeEnabled()){if(e.isTouch)return;return Object(m.resetToCursor)(!0),this.setCursorForTool(),void(i.lineBeingCreated()&&i.cancelCreatingLine())}if(this._options.contextMenuEnabled){var n=this._dataSourceAtPoint(e.localX,e.localY),r=n&&!n.isCustom?n.source:null;if(e.isTouch&&null!==this._startTrackPoint){if(this._preventSourceChange)return;this._clearCursorPosition()}e.isTouch&&(this._contextMenuOpenedOnLastTap=!0,this._startTrackPoint=null),this._contextMenuX=e.localX,this._contextMenuY=e.localY;var o=n&&n.hittest?n.hittest.result():0,s=o>=h.HitTestResult.REGULAR||o>=h.HitTestResult.MOVEPOINT_BACKGROUND&&e.isTouch;if(n&&n.isCustom){if(s&&n.hittest&&n.hittest.result()===h.HitTestResult.CUSTOM){var a=n.hittest.data();Object(h.tryCallCustomHandler)(e,null==a?void 0:a.contextMenuHandler,null==a?void 0:a.touchContextMenuHandler)}}else{this._chart.updateActions();var l=!1;i.selectionMacro((function(i){null!==r&&s?(i.selection().isSelected(r)||(i.clearSelection(),i.addSourceToSelection(r)),l=r.hasContextMenu()):(t._options.contextMenu.general&&t._contextMenu(e).then((function(t){t.show(e)})),i.clearSelection())})),l&&(r&&!Z(r)?this.showContextMenuForSources([r],e):this.showContextMenuForSelection(e))}}}}else i.crossHairSource().clearMeasure()},e.prototype._onMouseEvent=function(){this._preventSourceChange=!1,this._startTrackPoint=null,this._trackCrosshairOnlyAfterLongTap=!1},e.prototype._onTouchEvent=function(){this._trackCrosshairOnlyAfterLongTap=!0},e.prototype._switchTrackingModeFromAnotherPaneIfNeeded=function(e){var t=this._chart.trackingModePaneWidget();if(null!==t&&t!==this){var i=this._chartModel().crossHairSource().currentPoint();this._chart.exitTrackingMode(), this.startTrackingMode(new o.Point(e.localX,e.localY),new o.Point(i.x,e.localY),new p.EnvironmentState(e))}},e.prototype._contextMenu=function(e){var t=function(e){return e instanceof j.Separator},i=this._customActions(),n=this._initActions(e).filter((function(e){return null!==e}));i.remove.forEach((function(e){for(var t=0;t0;o--)t(r[o])&&t(r[o-1])&&r.splice(o,1);return r.length&&t(r[0])&&r.splice(0,1),r.length&&t(r[r.length-1])&&r.splice(r.length-1,1),A.ContextMenuManager.createMenu(r,{statName:"ChartContextMenu"})},e.prototype._loadAndCreateLegendWidget=function(){var e=this;Promise.all([i.e(70),i.e(12),i.e("chart-widget-gui")]).then(i.bind(null,"sAH5")).then((function(t){if(!e._isDestroyed){var i=t.LegendWidget,n=Object(u.deepExtend)({},e._options.legendWidget);n.canShowSourceCode=!e._chart.onWidget()&&!s.CheckMobile.any(),n.readOnlyMode=n.readOnlyMode||e._chart.readOnly(),n.statusesWidgets={sourceStatusesEnabled:e._options.sourceStatusesWidgetEnabled,sourceStatuses:e._options.sourceStatusesWidget||{},marketStatusEnabled:e._options.marketStatusWidgetEnabled,marketStatus:e._options.marketStatusWidget||{},dataUpdateModeEnabled:e._options.chartWarningWidgetEnabled,dataUpdateMode:e._options.chartWarningWidget||{},dataProblemEnabled:e._options.dataProblemWidgetEnabled};var o=new I.a(e._getHideNotMainSourcesValue());e._hideNotMainSourcesInLegendSpawn=Object(M.a)((function(){return{}}),e._chart.chartWidgetCollection().activeChartWidget,e._chart.chartWidgetCollection().lock.crosshair),e._hideNotMainSourcesInLegendSpawn.subscribe((function(){o.setValue(e._getHideNotMainSourcesValue())})),e._legendWidget=new i(e._chartUndoModel(),e,e._chart.backgroundBasedTheme(),o,n,{showContextMenuForSelection:e.showContextMenuForSelection.bind(e),showContextMenuForSources:e.showContextMenuForSources.bind(e),updateActions:e._chart.updateActions.bind(e._chart),showChartPropertiesForSource:e._chart.showChartPropertiesForSource.bind(e._chart),showGeneralChartProperties:e._chart.showGeneralChartProperties.bind(e._chart),showObjectsTreeDialog:e._chart.showObjectsTreeDialog.bind(e._chart)}),e._div.appendChild(e._legendWidget.getElement()),e._legendWidget.updateLayout(),e._legendWidget.updateWidgetModeBySize(e._size),e._legendWidget.updateThemedColors(e._themedTopColor);for(var a=0,l=Array.from(e._customLegendWidgetsFactoryMap.keys());a0&&void 0!==arguments[0]?arguments[0]:{},i=t.fields,n=t.confirm,r=t.manager,s=t.title,a=void 0===s?"":s,l=t.destroyOnClose,c=void 0===l||l,u=t.modal,h=void 0!==u&&u;o(this,e),this._form=document.createElement("div"),this._fields=i,this._appendFieldsToForm(),this._title=a,this._destroyOnClose=c,this._modal=h,this._manager=r,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();return new Promise((function(i){t.then((function(t){t.on("action:submit",(function(t){return e._onSubmit(t,i)})),t.open(),t.on("beforeClose",e._unmountFields.bind(e)),e._fields[0].select()}))}))}},{key:"_appendFieldsToForm",value:function(){var e=this;this._fields.forEach((function(t){t.appendTo(e._form)}))}},{key:"_createDialog", value:function(){var e=this;return new Promise((function(t){Promise.all([i.e("dialogs-core"),i.e(55),i.e(0),i.e(15),i.e("create-dialog")]).then(function(n){var r=i("YDhE").createDialog;t(r({type:e._modal?"modal":"popup",title:e._title,content:$(e._form),actionsWrapTemplate:'
',width:470,destroyOnClose:e._destroyOnClose,manager:e._manager,isClickOutFn:function(){if(e._isConfirmDialogOpened)return!1},actions:[{name:"submit",type:"primary",text:window.t("Save"),key:13,addClass:"js-submit-button"},{name:"cancel",type:"default",text:window.t("Cancel"),method:"close",addClass:"js-cancel-button"}]}))}.bind(null,i)).catch(i.oe)}))}},{key:"_onSubmit",value:function(e,t){var i=this,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===a&&(e.focus(),i._fields[0].focus()),n===s&&(t(i._collectValues(),e),e.close())}))}))}}},{key:"_showConfirmDialog",value:function(){var e=this;return new Promise((function(t){Promise.resolve(e._getConfirmMessage(e._collectValues())).then((function(i){e._isConfirmDialogOpened=!0,(0,r.createConfirmDialog)({type:"modal",content:document.createTextNode(i),manager:e._manager}).then((function(i){i.on("action:yes",(function(e){t(s),e.close()})),i.on("afterClose",(function(){t(a),e._isConfirmDialogOpened=!1})),i.open()}))}))}))}},{key:"_validate",value:function(){return this._fields.find((function(e){return!e.valid}))}},{key:"_collectValues",value:function(){return this._fields.reduce((function(e,t){return e[t.name]=t.value,e}),{})}},{key:"_unmountFields",value:function(){this._fields.forEach((function(e){e.unmount&&e.unmount()}))}}]),e}()},ULlu:function(e,t,i){"use strict";function n(e){return e[0]}function r(e,t,i){return"string"!=typeof t?e:null==i?(e.removeAttribute(t),e):(e.setAttribute(t,String(i)),e)}function o(e,t){return"string"==typeof t&&e.classList.add(t),e}function s(e,t){return void 0===t||(null===t&&(e.innerHTML=""),"string"!=typeof t&&"number"!=typeof t||(e.innerHTML=String(t))),e}function a(e){var t=window.getComputedStyle(e);return[t.paddingLeft,t.paddingRight].reduce((function(e,t){return e-Number((t||"").replace("px",""))}),e.clientWidth)}function l(e){var t=window.getComputedStyle(e);return[t.paddingTop,t.paddingBottom].reduce((function(e,t){return e-Number((t||"").replace("px",""))}),e.clientHeight)}function c(e,t){var i;i=function(i){return i(e).trigger(t)},window.jQuery&&i(window.jQuery)}i.r(t),i.d(t,"unwrap",(function(){return n})),i.d(t,"attr",(function(){return r})),i.d(t,"addClass",(function(){return o})),i.d(t,"html",(function(){return s})),i.d(t,"contentWidth",(function(){return a})),i.d(t,"contentHeight",(function(){return l})),i.d(t,"trigger",(function(){return c}))},UlDV:function(e,t,i){"use strict";i.r(t), i.d(t,"RestrictedToolsetBootloader",(function(){return r}));var n=i("mrSG"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._startLoading=function(){return Promise.all([i.e("react"),i.e(1),i.e(4),i.e(7),i.e(9),i.e(23),i.e(24),i.e(26),i.e(27),i.e(33),i.e(43),i.e(46),i.e(59),i.e(64),i.e(67),i.e(68),i.e(0),i.e(2),i.e(12),i.e(14),i.e(18),i.e(52),i.e("restricted-toolset")]).then(i.bind(null,"miV2")).then((function(e){return e.getRestrictedToolSet()}))},t}(i("cZRT").a)},UqOQ:function(e,t,i){"use strict";i.d(t,"a",(function(){return c}));var n=i("mrSG"),r=i("aIyQ"),o=i.n(r),s=i("e3/o");function a(e){return e.properties().visible.value()}function l(e){return!a(e)}var c=function(){function e(e,t,i){this._onChanged=new o.a,this._lineToolsSet=new Set,this._lineTools=Object(n.__spreadArrays)(e),this._lineToolsSet=new Set(this._lineTools),this._name=t,this.id=i||Object(s.randomHashN)(6)}return e.prototype.lineTools=function(){return this._lineTools},e.prototype.name=function(){return this._name},e.prototype.setName=function(e){var t=this;this._doAndFireOnChange((function(){t._name=e}))},e.prototype.isActualSymbol=function(){return this._lineTools.length>0&&this._lineTools[0].isActualSymbol()&&this._lineTools[0].isActualCurrency()},e.prototype.symbol=function(){return this._lineTools[0].symbol()},e.prototype.containsLineTool=function(e){return this._lineToolsSet.has(e)},e.prototype.addLineTools=function(e){var t=this;this._doAndFireOnChange((function(i){var n;e.forEach((function(n){t._lineToolsSet.add(n),i.push.apply(i,e.map((function(e){return e.id()})))})),(n=t._lineTools).push.apply(n,e)}))},e.prototype.excludeLineTool=function(e){var t=this;this._doAndFireOnChange((function(i){t._lineToolsSet.delete(e);var n=t._lineTools.indexOf(e);t._lineTools.splice(n,1),i.push(e.id())}))},e.prototype.excludeLineTools=function(e){var t=this;this._doAndFireOnChange((function(i){var n=new Set(e);e.forEach((function(e){return t._lineToolsSet.delete(e)})),t._lineTools=t._lineTools.filter((function(e){return!n.has(e)})),i.push.apply(i,e.map((function(e){return e.id()})))}))},e.prototype.state=function(){return{id:this.id,name:this._name,tools:this._lineTools.map((function(e){return e.id()}))}},e.prototype.visibility=function(){var e=this._lineTools.some(a),t=this._lineTools.some(l);return e&&!t?"Visible":t&&!e?"Invisible":"Partial"},e.prototype.locked=function(){var e=this._lineTools.some((function(e){return e.properties().frozen.value()})),t=this._lineTools.some((function(e){return!e.properties().frozen.value()}));return e&&!t?"Locked":t&&!e?"Unlocked":"Partial"},e.prototype.isActualInterval=function(){var e=this._lineTools.some((function(e){return e.isActualInterval()})),t=this._lineTools.some((function(e){return!e.isActualInterval()}));return e&&!t?"IsActualInterval":t&&!e?"IsNotActualInterval":"Partial"},e.prototype.onChanged=function(){return this._onChanged},e.fromState=function(t,i){for(var n=[],r=0,o=i.tools;r0?new e(n,i.name,i.id):null},e.prototype._doAndFireOnChange=function(e){var t=[],i=this.visibility(),n=this.locked(),r=this.name(),o=this.isActualInterval();e(t);var s={affectedLineTools:t,visibilityChanged:this.visibility()!==i,lockedChanged:n!==this.locked(),titleChanged:r!==this.name(),isActualIntervalChanged:o!==this.isActualInterval()};this._onChanged.fire(s)},e}()},V086:function(e,t,i){"use strict";var n=i("aO4+").Point,r=i("GEp6").distanceToLine,o=i("Ss5c").LineDataSource,s=i("Ocx9").DefaultProperty,a=window.t("Ellipse");function l(e,t){var n=t||l.createProperties();o.call(this,e,n),this.version=l.version,i.e("lt-pane-views").then(function(e){var t=i("obU/").EllipsePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(l,o),l.prototype.startChanging=function(e,t){if(o.prototype.startChanging.call(this,e,t),0===e||1===e){var i=this.pointToScreenPoint(this._points[0])[0],n=this.pointToScreenPoint(this._points[1])[0],s=this.pointToScreenPoint(this._points[2])[0];this._dist=r(i,n,s).distance||0}},l.prototype._preparePoint=function(e,t){var i=this._preparePointInternal(e,t,!1);return t&&t.shift()&&this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[1],this._points[0],i),i},l.prototype._preparePointInternal=function(e,t,i){var r=Object.assign({},e);if(t&&t.shift()){var s=this.points().length;if(!this._fakePointAdded&&3===s&&!i)return r;if(this._fakePointAdded||2===s||i){this._snapPoint45Degree(e,this._points[0]),this._fakePointAdded?this._points[1]=e:i||(this._fakePointAdded=!0,o.prototype._addPointIntenal.call(this,e));var a=this.pointToScreenPoint(this._points[0])[0],l=this.pointToScreenPoint(this._points[1])[0],c=l.x-a.x,u=l.y-a.y,h=Math.sqrt(c*c+u*u)/2,d=l.subtract(a),p=a.add(l).scaled(.5),_=new n(-d.y,d.x);_=_.normalized();var f=p.add(_.scaled(h));r=this.screenPointToPoint(f),(TradingView.isNaN(r.price)||TradingView.isNaN(r.index))&&(r=this.screenPointToPoint(p))}}else this._fakePointAdded&&(this._points.splice(1,1),this._fakePointAdded=!1);return r},l.prototype._fixVerticalDiameterPoints=function(e,t,i){var n=this.pointToScreenPoint(e)[0],r=this.pointToScreenPoint(t)[0],o=this._model.timeScale(),s=o.indexToCoordinate(e.index),a=o.indexToCoordinate(i.index),l=2*Math.abs(s-a);l*=t.price>e.price?1:-1,e.price=this.screenPointToPoint({x:n.x,y:r.y+l}).price},l.prototype.addPoint=function(e,t,i){var n=o.prototype.addPoint.call(this,e,t,i);return n&&(this._fakePointAdded=!1),n},l.prototype.setPoint=function(e,t,i){var o=Object.assign({},t),s=this.pointToScreenPoint(this._points[0])[0],a=this.pointToScreenPoint(this._points[1])[0],l=this.pointToScreenPoint(this._points[2])[0];switch(e){case 0:if(i&&i.shift()){this._snapPoint45Degree(o,this._points[1]),this._points[0]=o,this._points[2]=this._preparePointInternal(this._points[2],i,!0),this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[0],this._points[1],this._points[2]);break}s=this.pointToScreenPoint(o)[0] ;var c=a.subtract(s),u=s.add(a).scaled(.5);d=(d=new n(-c.y,c.x)).normalized(),l=u.add(d.scaled(this._dist)),l=this.screenPointToPoint(l),this._points[0]=o,this._points[2]=l;break;case 1:if(i&&i.shift()){this._snapPoint45Degree(o,this._points[0]),this._points[1]=o,this._points[2]=this._preparePointInternal(this._points[2],i,!0),this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[1],this._points[0],this._points[2]);break}c=(a=this.pointToScreenPoint(o)[0]).subtract(s),u=s.add(a).scaled(.5);d=(d=new n(-c.y,c.x)).normalized(),l=u.add(d.scaled(this._dist)),l=this.screenPointToPoint(l),this._points[1]=o,this._points[2]=l;break;case 2:o=this.pointToScreenPoint(o)[0];var h=r(s,a,o).distance;c=a.subtract(s),u=s.add(a).scaled(.5);d=(d=new n(-c.y,c.x)).normalized(),l=u.add(d.scaled(h)),l=this.screenPointToPoint(l),this._points[2]=l;break;case 3:o=this.pointToScreenPoint(o)[0];var d;h=r(s,a,o).distance,c=a.subtract(s),u=s.add(a).scaled(.5);d=(d=new n(-c.y,c.x)).normalized(),l=u.add(d.scaled(h)),l=this.screenPointToPoint(l),this._points[2]=l}this.normalizePoints()},l.prototype.pointsCount=function(){return 3},l.prototype.translatedType=function(){return a},l.prototype.name=function(){return"Ellipse"},l.prototype.hasEditableCoordinates=function(){return!1},l.version=2,l.prototype.migrateVersion=function(e,t,i){if(1===e&&2===this._points.length){var n=this._points[0].price,r=.5*(this._points[0].price+this._points[1].price);this._points[0]={price:r,index:this._points[0].index},this._points[1]={price:r,index:this._points[1].index},this._points.push({price:n,index:this._points[0].index})}if(1===e&&2===this._timePoint.length){n=this._timePoint[0].price,r=.5*(this._timePoint[0].price+this._timePoint[1].price);this._timePoint[0].price=r,this._timePoint[1].price=r;var o={price:n,offset:this._timePoint[0].offset,time_t:this._timePoint[0].time_t};this._timePoint.push(o)}},l.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Zd1D").GeneralFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},l.createProperties=function(e){var t=new s("linetoolellipse",e);return l._configureProperties(t),t},l._configureProperties=function(e){o._configureProperties(e)},t.LineToolEllipse=l},V0al:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererXCross",(function(){return s}));var n=i("mrSG"),r=i("2WC2"),o=i("aO4+"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShapeUsingCSSPixels=function(e,t){var i=t.width,n=t.height,r=t.x-i/2,o=t.vertOffset,s=t.y-n/2+o;e.moveTo(r,s),e.lineTo(r+i,s+n),e.moveTo(r,s+n),e.lineTo(r+i,s)},t.prototype._calcBoundingBox=function(t){var i=t.width,n=t.height,r=t.x-i/2,s=t.vertOffset,a=t.y-n/2+s,l=r,c=r+i,u=a,h=a+n,d=new o.Point(l,u),p=new o.Point(c,h),_=Object(o.box)(d,p),f=e.prototype._calcBoundingBox.call(this,t);return f&&(_=this._unionBox(_,f)),_},t}(r.c)},V3Oj:function(e,t,i){"use strict";i.r(t), i.d(t,"LineToolText",(function(){return d})),i.d(t,"LineToolTextAbsolute",(function(){return p}));var n=i("mrSG"),r=i("Eyy1"),o=i("YFKU"),s=i("Ss5c"),a=i("tc+8"),l=i.n(a),c=i("Ocx9"),u=Object(o.t)("Text",{context:"tool"}),h=Object(o.t)("Anchored Text"),d=function(e){function t(n,r){var o=this,s=r||t.createProperties();return(o=e.call(this,n,s)||this)._barSpacing=n.timeScale().barSpacing(),i.e("lt-pane-views").then(function(e){var t=i("mr3a").TextPaneView;o._setPaneViews([new t(o,n)])}.bind(null,i)).catch(void 0),o}return Object(n.__extends)(t,e),t.prototype.setPoint=function(e,t,i){var n,r=this.properties().childs();if(0===e&&r.wordWrapWidth.value()){var o=this.model().timeScale();n=this.isFixed()?this.fixedPoints()[0].x:o.indexToCoordinate(this.points()[0].index);var s=o.indexToCoordinate(t.index)-n-~~(r.fontsize.value()/6);if(!isFinite(s))return;r.wordWrapWidth.setValue(Math.max(100,s))}},t.prototype.pointsCount=function(){return 1},t.prototype.translatedType=function(){return u},t.prototype.name=function(){return"Text"},t.prototype.setPriceScale=function(t){e.prototype.setPriceScale.call(this,t),t&&t.priceRange()&&(this._priceDencity=t.height()/Object(r.ensureNotNull)(t.priceRange()).length(),this._isPriceDencityLog=t.isLog())},t.prototype.restoreSize=function(){var e=Object(r.ensureNotNull)(this.priceScale());this._barSpacing=this.model().timeScale().barSpacing(),this._priceDencity=e.height()/Object(r.ensureNotNull)(e.priceRange()).length(),this.updateAllViews(),this._model.updateSource(this)},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.template=function(){var t=e.prototype.template.call(this);return t.text=this.properties().childs().text.value(),t},t.prototype.state=function(t){var i=e.prototype.state.call(this,t);return t&&(i.state.fixedSize=!1),i},t.prototype.barSpacing=function(){return this._barSpacing},t.prototype.priceDencity=function(){return this._priceDencity},t.prototype.isPriceDencityLog=function(){return this._isPriceDencityLog},t.prototype.hasEditableCoordinates=function(){return!1},t.createProperties=function(e){var i=new c.DefaultProperty("linetooltext",e);return t._configureProperties(i),i},t.prototype._applyTemplateImpl=function(t){e.prototype._applyTemplateImpl.call(this,t),this.properties().childs().text.setValue(t.text)},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"QWxu")).then((function(e){return e.TextDefinitionsViewModel}))},t._configureProperties=function(e){s.LineDataSource._configureProperties(e),e.hasChild("text")||e.addChild("text",new l.a(window.t("Text"))),e.addExclusion("text")},t}(s.LineDataSource),p=function(e){function t(i,n){var r=n||t.createProperties();return e.call(this,i,r)||this}return Object(n.__extends)(t,e),t.prototype.translatedType=function(){return h},t.prototype.name=function(){return"Anchored Text"},t.prototype.hasEditableCoordinates=function(){return!1},t.prototype.isFixed=function(){return!0}, t.createProperties=function(e){var i=new c.DefaultProperty("linetooltextabsolute",e);return t._configureProperties(i),i},t._configureProperties=function(e){d._configureProperties(e)},t}(d)},VNzU:function(e,t,i){"use strict";i.r(t);var n=i("mrSG");i("Dq3s");i.d(t,"layouts",(function(){return s})),i.d(t,"isSingleLayout",(function(){return a})),i.d(t,"isMultipleLayout",(function(){return l}));var r,o={s:{title:"1 chart",count:1,sizer:function(e,t){if(0!==t)throw new RangeError("invalid index");return e}}};r={};var s=Object(n.__assign)(Object(n.__assign)({},o),r);function a(e){return"s"===e}function l(e){return!a(e)}},VVxS:function(e,t,i){"use strict";const{getLogger:n}=i("txPx"),r=n("TVLocalStorage");var 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();try{this._report()}catch(e){}};o.prototype._report=function(){if(this.isAvailable){const t=10,i=[];for(let e=0;et.length-e.length);const n=i.slice(0,t);i.sort((e,t)=>t.key.length-e.key.length);const o=i.slice(0,t);r.logNormal("Total amount of keys in Local Storage: "+this.length),r.logNormal(`Top ${t} keys with longest values: ${JSON.stringify(n)}`),r.logNormal(`Top ${t} longest key names: ${JSON.stringify(o)}`);try{navigator.storage.estimate().then(e=>{r.logNormal("Storage estimate: "+JSON.stringify(e))})}catch(e){}}},o.prototype.length=0,o.prototype.isAvailable=!1,o.prototype.localStorage={"tvlocalstorage.available":"false"},o.prototype._updateLength=function(){if(this.isAvailable)this.length=this.localStorage.length;else{var e,t=0;for(e in this.localStorage)this.localStorage.hasOwnProperty(e)&&t++;this.length=t}},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):void 0===this.localStorage[e]?null: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()};var s=function(e){this.storage=e};s.prototype.getItem=function(e){return Promise.resolve(this.storage.getItem(e))},s.prototype.setItem=function(e,t){return Promise.resolve(this.storage.setItem(e,t))},window.TVLocalStorage=new o,window.TVLocalStorageAsync=new s(window.TVLocalStorage),e.exports={TVLocalStorage:window.TVLocalStorage,TVLocalStorageAsync:window.TVLocalStorageAsync}},VaSN:function(e,t,i){"use strict";i.r(t),i.d(t,"lastEventIsTouch",(function(){return o})),i.d(t,"lastEventIsMouse",(function(){return s})),i.d(t,"setLastEventIsTouch",(function(){return a }));var n=i("qFKp"),r=Object(n.supportTouch)();function o(){return r}function s(){return r}function a(e){r=e}},VdBB:function(e,t,i){"use strict";function n(e,t,i){if(e.isTouch){if(void 0!==i)return i(e),!0}else if(void 0!==t)return t(e),!0;return!1}i.r(t),i.d(t,"tryCallCustomHandler",(function(){return n})),i.d(t,"HitTestResult",(function(){return r}));var r=function(){function e(e,t,i){this._result=e,this._data=t||null,this._eraseMarker=i}return e.prototype.result=function(){return this._result},e.prototype.data=function(){return this._data},e.prototype.eraseMarker=function(){return this._eraseMarker},e.MOVEPOINT_BACKGROUND=1,e.REGULAR=2,e.MOVEPOINT=3,e.CHANGEPOINT=4,e.CUSTOM=5,e.CUSTOM_MOVE=6,e}()},Vdly:function(e,t,i){"use strict";(function(e){i("qFKp");i("BHQF").fetch;var t=i("dTSQ").regExpEscape,n=i("FBuY").TVXWindowEvents,r=i("VVxS").TVLocalStorage,o=i("aIyQ"),s=i("Kxc7"),a=["s.tradingview.com","betacdn.tradingview.com"],l=s.enabled("use_localstorage_for_settings"),c=window.TVSettings=function(){var e=!1,i=null;function u(){return!i&&l}try{e=!TradingView.onWidget()&&parent&&parent!==window&&!!parent.IS_DEMO_PAGE}catch(M){}if(e){var h={"widgetbar.layout-settings":{widgets:{},settings:{minimized:!0}},notShowMainWizard:!0},d=function(e,t,i){var n=h[e];return null==n?t:n},p=function(){};return{loaded:!1,loadedModel:!1,getValue:d,getJSON:d,getBool:d,getFloat:d,getInt:d,setValue:p,setJSON:p,remove:p,keys:function(){return Object.keys(h)},keysMask:function(){return[]},sync:p,onSync:{subscribe:function(){}}}}window.environment;var _,f=TradingView.onWidget()?"tradingview-widget":"tradingview",m={},v=[/^widgetbar\.widget\.watchlist.+/,/.+quicks$/,/^widgetbar\.layout-settings$/,/^ChartSideToolbarWidget\.visible$/,/^onwidget\.watchlist$/,/^domepanel.visible$/,/^orderpanel.visible$/,/^chart\.favoriteDrawings$/,/^chart\.favoriteDrawingsPosition$/,/^loadChartDialog.favorites$/,/^ChartFavoriteDrawingToolbarWidget\.visible/,/^trading\.chart\.proterty$/,/^trading_floating_toolbar\.position$/,/^trading\.orderWidgetMode\./,/^symbolWatermark$/,/^pinereference\.size$/,/^pinereference\.position$/,/^hint\.+/];function y(e){return f+"."+e}function g(e,t){var i=m[e];return null==i?t:i}function b(e,t,i){i=i||{};var n=""+t;return m[e]!==n&&(m[e]=n,w(e)),i.forceFlush&&!_&&(_=setTimeout((function(){_=void 0,P()}),10)),c}function S(e,t){return t=t||{},null!=m[e]&&(delete m[e],w(e)),t.forceFlush&&P(),c}function w(e){if(i)null==m[e]?i.removeValue(e):i.setValue(e,m[e]);else if(u())try{null==m[e]?r.removeItem(y(e)):r.setItem(y(e),m[e])}catch(M){}else 0;n.emit("settings",JSON.stringify({key:e,value:m[e]}))}function P(e){}function C(){return Object.keys(m)}function x(e){for(var t=0;t=0;o--)e.test(n[o])&&r.push(n[o]),e.lastIndex=0;return r},sync:function(e){i?T(i.initialSettings||{}):u()?(function(){if(TradingView.onWidget()&&a.includes(window.location.host))for(var e=r.length;e--;){var t=r.key(e);if(0===t.indexOf("tradingview.")){var i=t.replace("tradingview.",f+".");r.setItem(i,r.getItem(t)),r.removeItem(t)}}}(),function(){m={};for(var e=f+".",t=!s.enabled("save_chart_properties_to_local_storage"),i=r.length;i--;){var n=r.key(i);if(n&&n.substring(0,e.length)===e){var o=n.substring(e.length);t&&!x(o)||(m[o]=r.getItem(n))}}}()):T(e||{}),I.fire()},onSync:I,setSettingsAdapter:function(e){i=e}}}();e&&e.exports&&(e.exports=c)}).call(this,i("YuTi")(e))},VgjZ:function(e,t,i){"use strict";i.r(t),i.d(t,"PriceAxisRendererOptionsProvider",(function(){return o}));var n=i("XlJ7"),r=i("zDbI"),o=function(){function e(e){this._rendererOptions={borderSize:1,tickLength:4,offsetSize:1,fontSize:NaN,font:"",color:"",paneBackgroundColor:"",paddingBottom:0,paddingInner:0,paddingOuter:0,paddingTop:0,baselineOffset:0},this._chartModel=e}return e.prototype.options=function(){var e=this._rendererOptions,t=this._chartModel.properties(),i=t.scalesProperties.fontSize.value();return e.fontSize!==i&&(e.fontSize=i,e.font=Object(n.makeFont)(i,r.CHART_FONT_FAMILY,""),e.paddingTop=Math.floor(i/3.5),e.paddingBottom=e.paddingTop,e.paddingInner=Math.max(Math.ceil(i/2-e.tickLength/2),0),e.paddingOuter=Math.ceil(i/2+e.tickLength/2),e.baselineOffset=Math.round(i/5)),e.color=t.scalesProperties.textColor.value(),e.paneBackgroundColor=t.paneProperties.background.value(),this._rendererOptions},e}()},"W+6j":function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("mrSG"),r=i("ww0J"),o=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._study=t,n}return Object(n.__extends)(t,e),t.prototype.color=function(){return this._study.isFailed()||this._study.metaInfo&&this._study.metaInfo().isTVScriptStub?"#ff0000":e.prototype.color.call(this)},t}(r.a)},W3MX:function(e){ e.exports=JSON.parse('{"color-aqua-spring":"#ebf9f5","color-army-green":"#3d2c12","color-army-green-2":"#31230d","color-athens-gray-1":"#f2f3f5","color-athens-gray-2":"#f7f8fa","color-athens-gray-3":"#eceff2","color-black":"#000000","color-blue-dianne":"#21384d","color-bluish":"#2185cc","color-bright-gray":"#363c4e","color-brownish-grey":"#8d6e63","color-carnation":"#f04561","color-catskill-white":"#e1ecf2","color-charade":"#2f3241","color-charcoal-grey":"#323337","color-curious-blue":"#299dcd","color-dark-blue-grey":"#123440","color-darkness-blue-grey":"#12213b","color-dark-grey":"#292a2d","color-dark-grey-blue":"#28415a","color-dark-sky-blue":"#37a6ef","color-dark-slate-blue":"#194453","color-deep-sea-blue":"#016087","color-duck-egg-blue":"#e1eff9","color-ebony-clay":"#262b3e","color-foam":"#d7f0fb","color-gull-gray":"#9db2bd","color-humming-bird":"#d3eef9","color-keppel-1":"#37bc9b","color-keppel-2":"#34b293","color-lavender-blush":"#ffedf0","color-lightish-purple":"#a75ee8","color-loblolly":"#c5cbce","color-manatee":"#878ca8","color-mandy":"#eb4d5c","color-medium-blue":"#2e7bb2","color-milk-chocolate":"#6f2626","color-mirage-1":"#131722","color-mirage-2":"#171b29","color-mirage-3":"#1c2030","color-mischka":"#d6d8e0","color-morning-glory":"#9addcc","color-oslo-gray":"#8b8e95","color-pale":"#fff2cf","color-pale-grey-1":"#f9fafb","color-pale-grey-2":"#e7ebee","color-pale-sky":"#6b7988","color-picton-blue-1":"#3bb3e4","color-picton-blue-2":"#41bef1","color-puerto-rico":"#3bc2a1","color-purple-brown":"#4e2934","color-purple-brown-2":"#3d2028","color-radical-red":"#ff4a68","color-regent-gray":"#8797a5","color-scooter":"#38acdb","color-silver-tree":"#53b987","color-slate-gray":"#758696","color-sundown":"#ffa4b3","color-sunglow":"#ffca3b","color-tan-hide":"#ff9850","color-trout-1":"#4c525e","color-trout-2":"#4f5966","color-violet-1":"#332738","color-violet-2":"#271d2b","color-water-blue":"#1592e6","color-white":"#ffffff","color-white-ice":"#ebf7fc","color-wild-watermelon":"#ff5773","color-bg-primary":"color-white","color-bg-primary-hover":"color-cold-gray-100","color-bg-secondary":"color-white","color-bg-highlight":"color-cold-gray-50","color-bg-scroll-buttons":"color-cold-gray-100","color-legacy-bg-scroll-buttons":"color-cold-gray-850","color-legacy-bg-widget":"color-white","color-text-primary":"color-cold-gray-900","color-text-secondary":"color-cold-gray-500","color-text-tertiary":"color-cold-gray-400","color-text-disabled":"color-cold-gray-300","color-box-shadow":"color-cold-gray-300","color-divider":"color-cold-gray-150","color-divider-hover":"color-cold-gray-100","color-active-hover-text":"color-black","color-alert-text":"color-black","color-border-table":"color-cold-gray-100","color-brand":"color-tv-blue-500","color-brand-active":"color-tv-blue-600","color-brand-hover":"color-tv-blue-600","color-brand-light":"color-picton-blue-2","color-chart-page-bg":"color-cold-gray-150","color-common-tooltip-bg":"color-cold-gray-800","color-common-tooltip-text":"color-cold-gray-100","color-danger":"color-radical-red","color-depthrenderer-stroke-style":"color-athens-gray-1","color-highlight-new":"color-pale","color-input-bg":"color-white","color-input-publish-bg":"color-white","color-link":"color-tv-blue-500","color-link-hover":"color-tv-blue-600","color-link-active":"color-tv-blue-600","color-list-nth-child-bg":"color-athens-gray-2","color-pane-bg":"color-white","color-pane-secondary-bg":"color-cold-gray-100","color-popup-menu-item-hover-bg":"color-cold-gray-100","color-popup-menu-separator":"color-cold-gray-150","color-replay-data-mode":"color-radical-red","color-screener-description":"color-trout-2","color-legacy-success":"color-keppel-1","color-success":"color-minty-green-500","color-success-hover":"color-minty-green-600","color-success-active":"color-minty-green-700","color-toolbar-button-text":"color-cold-gray-900","color-toolbar-button-text-hover":"color-black","color-toolbar-button-text-active":"color-tv-blue-500","color-toolbar-button-text-active-hover":"color-tv-blue-600","color-toolbar-button-background-hover":"color-cold-gray-100","color-toolbar-button-background-secondary-hover":"color-cold-gray-150","color-toolbar-toggle-button-background-active":"color-tv-blue-500","color-toolbar-toggle-button-background-active-hover":"color-tv-blue-600","color-toolbar-interactive-element-text-normal":"color-cold-gray-900","color-toolbar-interactive-element-text-hover":"color-black","color-toolbar-opened-element-bg":"color-cold-gray-100","color-tooltip-bg":"color-ebony-clay","color-tv-dialog-caption":"color-trout-2","color-tv-dropdown-item-hover-bg":"color-athens-gray-1","color-underlined-text":"color-slate-gray","color-widget-pages-bg":"color-white","color-warning":"color-tan-orange-500","color-growing":"color-minty-green-400","color-falling":"color-ripe-red-400","color-collapse-tabs-border":"color-athens-gray-3","color-forex-icon":"color-bright-gray","color-list-item-active-bg":"color-dark-sky-blue","color-list-item-hover-bg":"color-white-ice","color-list-item-text":"color-ebony-clay","color-site-widget-hover":"color-athens-gray-1","color-attention":"color-sunglow","color-price-axis-label-back":"color-cold-gray-150","color-price-axis-label-text":"color-cold-gray-650","color-price-axis-gear":"color-cold-gray-900","color-price-axis-gear-hover":"#000000","color-price-axis-highlight":"color-cold-gray-150","color-marker-flagged":"color-ripe-red-400","color-marker-flagged-hovered":"color-ripe-red-600","color-bid":"color-tv-blue-500","color-ask":"color-ripe-red-400","color-sell":"color-ripe-red-400","color-buy":"color-tv-blue-500","color-neutral":"color-cold-gray-500","color-border":"#dadde0","color-border-chat-fields":"#c9cbcd","color-border-hover":"#c8c8c8","color-button-hover-bg":"#f2f2f2","color-depthrenderer-fill-style":"#555555","color-disabled-border-and-color":"#ececec","color-disabled-input":"#ececec","color-readonly-input":"#b4b4b4","color-empty-container-message":"#8a8a8a","color-icons":"#7d7d7d","color-input-textarea-readonly":"#555555","color-input-placeholder-text":"color-cold-gray-350","color-item-active-blue":"#eff9ff","color-item-hover-active-bg":"#f1f3f6","color-item-hover-bg":"#edf1f2","color-item-hover-blue":"#c6e9f8","color-item-selected-blue":"#eafafe","color-item-active-text":"color-white","color-item-active-bg":"color-tv-blue-500","color-list-item":"#888989","color-news-highlight":"#f2f5f8","color-placeholder":"#adaeb0","color-row-hover-active-bg":"#f1f3f6","color-sb-scrollbar-body-bg":"#d8d8d8","color-section-separator-border":"#b5b7b9","color-separator-table-chat":"#eaecef","color-tag-active-bg":"#cfdce3","color-tag-hover-bg":"#dce6ea","color-text-regular":"#4a4a4a","color-tv-button-checked":"#757575","color-brand-dark":"#2a2c39","color-scroll-bg":"color-cold-gray-400","color-scroll-border":"color-item-hover-active-bg","color-widget-border":"color-cold-gray-100","color-scroll-buttons-arrow":"color-white","color-control-intent-default":"color-cold-gray-200","color-control-intent-success":"color-minty-green-600","color-control-intent-primary":"color-tv-blue-500","color-control-intent-warning":"color-tan-orange-500","color-control-intent-danger":"color-ripe-red-500","color-seeking-alpha-brand":"#ff7200","color-pro":"color-minty-green-400","color-pro-hover":"color-minty-green-600","color-pro-plus":"color-tv-blue-500","color-pro-plus-hover":"color-tv-blue-600","color-pro-premium":"color-tan-orange-500","color-pro-premium-hover":"color-tan-orange-700","color-trial":"color-cold-gray-500","color-trial-hover":"color-cold-gray-600","color-mod":"color-ripe-red-400","color-mod-hover":"color-ripe-red-600","color-top":"color-banana-yellow-700","color-top-hover":"color-banana-yellow-800","color-ad":"color-banana-yellow-a700","color-broker-featured":"color-minty-green-400","color-broker-featured-hover":"color-minty-green-600","color-alert-status-active":"color-minty-green-400","color-alert-status-stopped":"color-ripe-red-500","color-alert-status-triggered":"color-tan-orange-500","color-covid19-confirmed":"color-ripe-red-500","color-covid19-recovered":"color-minty-green-500","color-covid19-deaths":"color-cold-gray-450","color-blue-gray-950":"#0C0E15","color-cold-gray-50":"#F8F9FD","color-cold-gray-100":"#F0F3FA","color-cold-gray-150":"#E0E3EB","color-cold-gray-200":"#D1D4DC","color-cold-gray-250":"#C1C4CD","color-cold-gray-300":"#B2B5BE","color-cold-gray-350":"#A3A6AF","color-cold-gray-400":"#9598A1","color-cold-gray-450":"#868993","color-cold-gray-500":"#787B86","color-cold-gray-550":"#6A6D78","color-cold-gray-600":"#5D606B","color-cold-gray-650":"#50535E","color-cold-gray-700":"#434651","color-cold-gray-750":"#363A45","color-cold-gray-800":"#2A2E39","color-cold-gray-850":"#1E222D","color-cold-gray-900":"#131722","color-cold-gray-950":"#0C0E15","color-ripe-red-50":"#FFEBEE","color-ripe-red-100":"#FFCDD2","color-ripe-red-200":"#ef9a9a","color-ripe-red-300":"#E57373","color-ripe-red-400":"#EF5350","color-ripe-red-500":"#F44336","color-ripe-red-600":"#E53935","color-ripe-red-700":"#D32F2F","color-ripe-red-800":"#C62828","color-ripe-red-900":"#B71C1C","color-ripe-red-a200":"#FF5252","color-ripe-red-a900":"#351E25","color-tan-orange-50":"#FFF3E0","color-tan-orange-100":"#FFE0B2","color-tan-orange-200":"#FFCC80","color-tan-orange-300":"#ffb74d","color-tan-orange-400":"#FFA726","color-tan-orange-500":"#FF9800","color-tan-orange-600":"#FB8C00","color-tan-orange-700":"#F57C00","color-tan-orange-800":"#EF6C00","color-tan-orange-900":"#e65100","color-tan-orange-a200":"#ffab40","color-tan-orange-a400":"#ff9100","color-tan-orange-a700":"#FF6D00","color-iguana-green-100":"#C8E6C9","color-iguana-green-200":"#A5D6A7","color-iguana-green-300":"#81c784","color-iguana-green-400":"#66BB6A","color-iguana-green-500":"#4caf50","color-iguana-green-600":"#43a047","color-iguana-green-700":"#388e3c","color-iguana-green-900":"#1B5E20","color-iguana-green-a700":"#00c853","color-banana-yellow-100":"#FFF9C4","color-banana-yellow-200":"#FFF59D","color-banana-yellow-300":"#FFF176","color-banana-yellow-400":"#ffee58","color-banana-yellow-500":"#ffeb3b","color-banana-yellow-600":"#fdd835","color-banana-yellow-700":"#fbc02d","color-banana-yellow-800":"#f9a825","color-banana-yellow-900":"#F57F17","color-banana-yellow-a400":"#ffea00","color-banana-yellow-a700":"#ffd600","color-tv-blue-50":"#E3F2FD","color-tv-blue-100":"#BBDEFB","color-tv-blue-200":"#90CAF9","color-tv-blue-300":"#64B5F6","color-tv-blue-400":"#42A5F5","color-tv-blue-500":"#2196F3","color-tv-blue-600":"#1E88E5","color-tv-blue-700":"#1976D2","color-tv-blue-800":"#1565C0","color-tv-blue-900":"#0d47a1","color-tv-blue-a100":"#82b1ff","color-tv-blue-a200":"#448aff","color-tv-blue-a400":"#2979ff","color-tv-blue-a600":"#2962FF","color-tv-blue-a700":"#144987","color-tv-blue-a800":"#143661","color-tv-blue-a900":"#132742","color-deep-blue-100":"#D1C4E9","color-deep-blue-200":"#B39DDB","color-deep-blue-300":"#9575cd","color-deep-blue-400":"#7e57c2","color-deep-blue-500":"#673ab7","color-deep-blue-700":"#512da8","color-deep-blue-800":"#4527A0","color-deep-blue-900":"#311B92","color-deep-blue-a100":"#b388ff","color-deep-blue-a700":"#6200EA","color-minty-green-100":"#B2DFDB","color-minty-green-200":"#80cbc4","color-minty-green-300":"#4db6ac","color-minty-green-400":"#26a69a","color-minty-green-500":"#009688","color-minty-green-600":"#00897b","color-minty-green-700":"#00796b","color-minty-green-900":"#004D40","color-minty-green-a400":"#1de9b6","color-minty-green-a700":"#00BFA5","color-grapes-purple-100":"#E1BEE7","color-grapes-purple-200":"#CE93D8","color-grapes-purple-300":"#ba68c8","color-grapes-purple-400":"#ab47bc","color-grapes-purple-500":"#9c27b0","color-grapes-purple-600":"#8e24aa","color-grapes-purple-700":"#7b1fa2","color-grapes-purple-800":"#6A1B9A","color-grapes-purple-900":"#4A148C","color-grapes-purple-a700":"#aa00ff","color-berry-pink-100":"#F8BBD0","color-berry-pink-200":"#f48fb1","color-berry-pink-300":"#f06292","color-berry-pink-400":"#ec407a","color-berry-pink-500":"#e91e63","color-berry-pink-600":"#D81B60","color-berry-pink-700":"#C2185B","color-berry-pink-800":"#AD1457","color-berry-pink-900":"#880E4F","color-berry-pink-a200":"#ff4081","color-sky-blue-100":"#B2EBF2","color-sky-blue-200":"#80DEEA","color-sky-blue-300":"#4dd0e1","color-sky-blue-400":"#26c6da","color-sky-blue-500":"#00bcd4","color-sky-blue-600":"#00acc1","color-sky-blue-700":"#0097A7","color-sky-blue-800":"#00838F","color-sky-blue-900":"#006064","color-sky-blue-a400":"#00e5ff","color-sky-blue-a700":"#00B8D4","color-deep-blue-600":"#5E35B1","color-facebook":"#1877F2","color-twitter":"#1DA1F2","color-pre-market":"color-tan-orange-600","color-pre-market-bg":"color-tan-orange-400","color-post-market":"color-tv-blue-500","color-post-market-bg":"color-tv-blue-400","color-market-open":"color-minty-green-500","color-market-open-bg":"color-minty-green-400","color-market-closed":"color-cold-gray-400","color-market-holiday":"color-cold-gray-400","color-invalid-symbol":"color-ripe-red-400","color-invalid-symbol-hover":"color-ripe-red-700","color-replay-mode":"color-tv-blue-500","color-replay-mode-icon":"color-white","color-replay-mode-hover":"color-tv-blue-600","color-notaccurate-mode":"color-berry-pink-600","color-notaccurate-mode-bg":"color-berry-pink-400","color-delay-mode":"color-tan-orange-600","color-delay-mode-bg":"color-tan-orange-400","color-eod-mode":"color-grapes-purple-400","color-eod-mode-bg":"color-grapes-purple-400","color-data-problem":"color-ripe-red-600","color-data-problem-bg":"color-ripe-red-400","color-data-problem-hover":"color-ripe-red-700","color-list-item-bg-highlighted":"color-tv-blue-50","color-list-item-bg-selected":"color-tv-blue-100","color-list-item-bg-highlighted-hover":"color-tv-blue-100","color-list-item-bg-selected-hover":"color-tv-blue-200","color-screener-header-bg":"color-white","color-screener-header-bg-hover":"color-cold-gray-100"}') },W5mg:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=["first_visible_bar_time","last_visible_bar_time"];function r(e){return!e.groupId&&"time"!==e.type&&!e.isHidden&&!n.includes(e.id)}},WIS0:function(e,t,i){"use strict";i.r(t),i.d(t,"DatafeedRequestsCachedProcessor",(function(){return d}));var n=i("mrSG"),r=i("Eyy1"),o=i("LxhU"),s=i("Y7w9"),a=i("ocLq"),l=i("Kxc7");i("HbRj");function c(e,t){return e.ticker+(e.currency_code?"_#_"+e.currency_code:"")+"_#_"+t}function u(e){return new Date(e).toISOString()}var h=function(){function e(e,t,i,n){this._cache={bars:[]},this._nextSubscriptionId=0,this._pendingSubscribers=[],this._subscribers=[],this._requesting=!1,this._leftDate=null,this._gaps=[],this._realtimeOn=!1,this._endOfData=!1,this._resetCacheTimeout=null,this._errorMessage=null,this._destroyed=!1,this._emptyResponsesCount=0,this._datafeed=e,this._symbolInfo=t,this._resolution=Object(r.ensureNotNull)(o.Interval.normalize(i)),this._dwmAligner=n}return e.prototype.destroy=function(){0!==this._subscribers.length&&console.warn("Destroying with not-empty state"),this._clearResetCacheTimeout(),this._unsubscribeRealtime(),this._purgeCache(),delete this._datafeed,this._destroyed=!0},e.prototype.addSubscription=function(e,t,i){var n=this,r=this._getNextSubscriptionId(),o=Math.floor(e.from/1e3),s=Math.floor(e.to/1e3);this._pendingSubscribers.push({key:r,range:{from:o,to:s},onHistoryCallback:t,onErrorCallback:i}),this._clearResetCacheTimeout();return setTimeout((function(){n._destroyed||n._processPendingSubscribers()}),0),r},e.prototype.removeSubscription=function(e){var t=this,i=this._pendingSubscribers.find((function(t){return t.key===e}));if(i)this._pendingSubscribers.splice(this._pendingSubscribers.indexOf(i),1);else{var n=this._subscribers.find((function(t){return t.key===e}));if(n)return this._subscribers.splice(this._subscribers.indexOf(n),1),void(this._subscribers.length||(this._symbolInfo.expired||this._symbolInfo.expiration_date?this._unsubscribeRealtime():this._resetCacheTimeout=setTimeout((function(){t._resetCacheTimeout=null,t._purgeCache(),t._unsubscribeRealtime()}))));console.warn("Unknown subscription symbol={0}, resolution={1}, key={2}".format(this._symbolInfo.name,this._resolution,e))}},e.prototype._logMessage=function(e,t){if(l.enabled("charting_library_debug_mode")||t){var i=this._symbolInfo.currency_code;console.log("FEED ["+this._symbolInfo.name+"|"+this._resolution+(i?"|"+i:"")+"]: "+e)}},e.prototype._clearResetCacheTimeout=function(){null!==this._resetCacheTimeout&&(clearTimeout(this._resetCacheTimeout),this._resetCacheTimeout=null)},e.prototype._purgeCache=function(){this._logMessage("Reset cache"),this._cache={bars:[]},this._gaps=[],this._errorMessage=null,this._leftDate=null,this._endOfData=!1},e.prototype._processPendingSubscribers=function(){var e=this,t=this._pendingSubscribers;if(t.length)if(this._requesting)this._logMessage("Processing is skipped due active request");else{if(this._logMessage("Processing pending subscribers, count="+t.length),this._errorMessage){ var i=this._errorMessage;return this._logMessage("Return error: "+i),this._pendingSubscribers=[],void t.forEach((function(e){e.onErrorCallback(i)}))}var n=t.reduce((function(e,t){return Math.min(t.range.from,e)}),1/0);if(this._logMessage('Leftmost requested "from" is '+u(1e3*n)),!this._leftDate||n0?this._logMessage("Bars to return for request {0}: total {1} bars in [{2} ... {3}] ".format(e.key,n.count(),u(n.bars[0].time),u(n.bars[n.count()-1].time))):this._logMessage("Request {0}. Nothing to return.".format(e.key)),t.barset=n;var r=this._inGapNextTime(i.from);if(r)this._logMessage("Request {0} is in gap, nextTime = {1}".format(e.key,u(1e3*r))),n.nextTime=r;else if(0===n.count()){var o=this._cache.bars.length&&this._cache.bars[this._cache.bars.length-1].time/1e3;o&&i.from>o&&(this._logMessage("Request {0} is in gap, nextTime = {1}".format(e.key,u(1e3*o))),n.nextTime=o||void 0)}this._endOfData&&null!==this._leftDate&&e.range.from<=this._leftDate&&(n.endOfData=!0),e.onHistoryCallback(n)},e.prototype._createBarset=function(e){var t=Object(s.lowerbound)(this._cache.bars,1e3*e,(function(e,t){return e.time0){var n=" ["+u(e[0].time)+" ... "+u(e[e.length-1].time)+"]";i._logMessage("Receiving bars: total "+e.length+" bars in "+n+", requested range: "+s)}else i._logMessage("Receiving bars: barset is empty, requested range: "+s);i._requesting=!1,i._processBars(e,t)}}),(function(e){i._destroyed||(a?i._logMessage("getBars callback is already called before",!0):(a=!0,i._requesting=!1,i._errorMessage=e||null,i._processPendingSubscribers()))}),n)}},e.prototype._processBars=function(e,t){this._checkBars(e),this._alignBarsTime(e),e.length>0?(this._emptyResponsesCount=0,this._processFullBarset(e,t)):(this._emptyResponsesCount+=1,this._processEmptyBarset(t)),this._processPendingSubscribers()},e.prototype._processEmptyBarset=function(t){t&&t.nextTime?(this._logMessage("Next time received: `{0}`".format(u(1e3*t.nextTime))),this._addGap(t.nextTime),this._leftDate=Math.min(this._leftDate||e._now()/1e3,t.nextTime+1)):t&&t.noData?(this._logMessage("EOD received"),this._setEndOfData()):this._logMessage("nextTime or noData should present in metainfo when empty barset is returned"),50===this._emptyResponsesCount&&(this._logMessage("EOD detected due 50 empty responses in a row"),this._setEndOfData())},e.prototype._setEndOfData=function(){this._endOfData=!0,this._cache.bars.length&&(this._leftDate=this._cache.bars[0].time/1e3)},e.prototype._processFullBarset=function(e,t){var i=e[0].time;null!==this._leftDate&&i<1e3*this._leftDate&&this._logMessage("Returned more data than needed"),this._putToCache(e)?null!==this._leftDate&&this._cache.bars.length&&this._leftDate>this._cache.bars[0].time/1e3&&(this._leftDate=this._cache.bars[0].time/1e3):this._logMessage("Incremental update failed. Starting full update. Returned data should be in the requested range.",!0),t&&t.nextTime?console.warn("nextTime should be set when there is no data in the requested period only"):t&&t.noData&&console.warn("noData should be set when there is no data in the requested period and earlier only")},e.prototype._addGap=function(t){if(!this._gaps.find((function(e){return e.from===t}))){var i=(this._cache.bars.length?this._cache.bars[0].time:e._now())/1e3;this._gaps.push({from:t,to:i})}},e.prototype._inGapNextTime=function(e){var t=this._gaps.find((function(t){return t.frome}));return t?t.from:null},e.prototype._getNextSubscriptionId=function(){return this._nextSubscriptionId++},e.prototype._checkBars=function(e,t){if(void 0===t&&(t=!1),l.enabled("charting_library_debug_mode"))for(var i=function(i){if(e[i].time<=e[i-1].time){ var r="Wrong bars time: time {0} of bar {1} should be more than time {2} of bar {3}".format(e[i].time,i,e[i-1].time,i-1);t&&n._dwmAligner&&(r+="\nCheck that you provide DWM bars without time part, i.e. 00:00 GMT"),console.error(r)}["high","low","open","close","time"].some((function(t){return"number"!=typeof e[i][t]||!isFinite(e[i][t])}))&&console.error("Wrong bars values: all OHLC values should be numbers")},n=this,r=1;r=this._cache.bars[0].time){var t=this._cache.bars[this._cache.bars.length-1].time===e[e.length-1].time;if(this._cache.bars=[],!t)return this._leftDate=null,!1;this._logMessage("Received history up to now instead of incremental update. Return exactly what is requested.")}return this._cache.bars=Object(n.__spreadArrays)(e,this._cache.bars),this._checkBars(this._cache.bars,!0),!0},e.prototype._putToCacheNewBar=function(e){var t=this._cache.bars.length,i=e.time,n=0===t?NaN:this._cache.bars[t-1].time;0===t||n=0&&!function(){try{return/^(192|172|10)\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]/.test(location.hostname)||/^.*((?:\.local)|localhost)$/.test(location.hostname)}catch(e){return!1}}()&&setTimeout((function(){try{var e=function(){var e=0;return JSON.parse(urlParams.logo).image&&(e="C",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(t){}}),3e4)}},Wh6B:function(e,t,i){"use strict";var n=i("Eyy1").ensureNotNull,r=i("Ss5c").LineDataSource,o=i("Ocx9").DefaultProperty,s=i("08i5"),a=window.t("Forecast");function l(e,t){var n=t||l.createProperties();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)}inherit(l,r),l.prototype.isSynchronizable=function(){return!1},l.prototype.status=function(){return this._properties.status.value()},l.prototype.setStatus=function(e){return this._properties.status.setValue(e)},l.prototype.pointsCount=function(){return 2},l.prototype.translatedType=function(){return a},l.prototype.name=function(){return"Forecast"},l.prototype.restorePoints=function(e,t,i){r.prototype.restorePoints.call(this,e,t,i),this.checkAlert()},l.prototype.checkAlert=function(){if(!(this._points.length<2||this._model.mainSeries().bars().isEmpty())){var e=this._points[1];if(this.status())e.index>this._model.timeScale().baseIndex()&&this.setStatus(s.AlertStatus.Waiting);else{var t=this._model.mainSeries().bars().valueAt(e.index);if(null!==t){var i=this.direction() ;if(i===s.Direction.Up&&t[TradingView.HIGH_PLOT]>=e.price)this.setStatus(s.AlertStatus.Success);else if(i===s.Direction.Down&&t[TradingView.LOW_PLOT]<=e.price)this.setStatus(s.AlertStatus.Success);else{var r=n(this._model.mainSeries().bars().lastIndex());e.index!==r&&this.setStatus(s.AlertStatus.Failure)}}}}},l.prototype.addPoint=function(e){var t=r.prototype.addPoint.call(this,e);return t&&this.checkAlert(),t},l.prototype.endChanging=function(){r.prototype.endChanging.call(this),this.setStatus(s.AlertStatus.Waiting),this.checkAlert()},l.prototype.onData=function(e){r.prototype.onData.call(this,e),this.checkAlert()},l.prototype.endMoving=function(){r.prototype.endMoving.call(this),this.setStatus(s.AlertStatus.Waiting),this.checkAlert()},l.prototype.direction=function(){if(this.points().length<2)return s.Direction.Up;var e=this.points()[0];return this.points()[1].price>e.price?s.Direction.Up:s.Direction.Down},l.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Pwwq").PredictionDefinitionsViewModel}.bind(null,i)).catch(i.oe)},l.prototype.cloneable=function(){return!1},l.createProperties=function(e){var t=new o("linetoolprediction",e);return l._configureProperties(t),t},l._configureProperties=function(e){r._configureProperties(e),e.merge({status:s.AlertStatus.Waiting})},t.LineToolPrediction=l},WkOR:function(e,t,i){"use strict";i.r(t),i.d(t,"areEqualSymbols",(function(){return o})),i.d(t,"includesEqualSymbol",(function(){return s}));var n=i("Kxc7"),r=n.enabled("uppercase_instrument_names");function o(e,t){return void 0===e?void 0===t:void 0!==t&&(r?e.toUpperCase()===t.toUpperCase():e===t)}function s(e,t){return e.some((function(e){return o(t,e)}))}},WkYF:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Date Range");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("3xLB").DateRangePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 2},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Date Range"},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Ax76").GeneralDatePriceRangeDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetooldaterange",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolDateRange=s},WmDe:function(e,t,i){"use strict";TradingView.PublishedChartsTimeline=function(){},TradingView.LinearRegressionPaneView=function(){},TradingView.study_PivotPointsStandard=function(){},TradingView.study_PivotPointsHighLow=function(){},TradingView.study_ZigZag=function(){},TradingView.study_LinearRegression=function(){},TradingView.study_ElliottWave=function(){}, TradingView.ESDStudyBase=function(){},TradingView.Pro=function(){this.hasPackage=function(){return!1}},window.user={is_pro:!1,settings:{}},TradingView.Pro.prototype.isPaidPro=function(){return!1},TradingView.Pro.prototype.hasActivePackages=function(){return!1},TradingView.Pro.prototype.isSupportAvailable=function(){return!1},TradingView.Pro.prototype.getStudies=function(){return[]},TradingView.Pro.prototype.getProduct=function(){return{}},TradingView.Pro.prototype.getStudiesOrder=function(){return[]},TradingView.AlertLabel=function(){},TradingView.getDataVendorString=function(){},TradingView.study_VbPVisible=function(){},TradingView.study_VbPSessions=function(){},TradingView.study_ESD$TV_DIVIDENDS=function(){},TradingView.study_ESD$TV_SPLITS=function(){},TradingView.study_ESD$TV_EARNINGS=function(){},TradingView.MockupRequestedCache=function(e){e&&e([])},TradingView.MockupRequestedCache.invalidate=function(){},TradingView.LinetoolTemplatesList=function(){}},Wo0S:function(e,t,i){e.exports={"common-tooltip":"common-tooltip-s2GEoMlT","common-tooltip--hidden":"common-tooltip--hidden-Z0EAvXgv","common-tooltip--horizontal":"common-tooltip--horizontal-13imOC5w","common-tooltip--farther":"common-tooltip--farther-2yXMAkHF","common-tooltip--vertical":"common-tooltip--vertical-mcRoucek","common-tooltip-farther":"common-tooltip-farther-XoKytD99","common-tooltip--no-pointer-events":"common-tooltip--no-pointer-events-3nL0Vygu","common-tooltip--direction_normal":"common-tooltip--direction_normal-3u9ejKM2","common-tooltip__body":"common-tooltip__body-356XFpBj","common-tooltip__button-container":"common-tooltip__button-container-3EjyKV3s","common-tooltip__body--no-buttons":"common-tooltip__body--no-buttons-3quqi1Sv","common-tooltip__button":"common-tooltip__button-1rnQgujz","common-tooltip--direction_reversed":"common-tooltip--direction_reversed-XN-JUTdr","common-tooltip__ear-holder":"common-tooltip__ear-holder-yIJjpvgu","common-tooltip__ear-holder--below":"common-tooltip__ear-holder--below-1rmzWejA","common-tooltip__ear-holder--above":"common-tooltip__ear-holder--above-1D8FkNkw","common-tooltip__ear-holder--before":"common-tooltip__ear-holder--before-oXq5sFXr","common-tooltip__ear-holder--after":"common-tooltip__ear-holder--after-BnAcuW1N","common-tooltip__body--with-hotkey":"common-tooltip__body--with-hotkey-2wXRtgYZ","common-tooltip__body--width_wide":"common-tooltip__body--width_wide-3oG604Li","common-tooltip__body--width_narrow":"common-tooltip__body--width_narrow-34hrFTFo","common-tooltip__body--no-padding":"common-tooltip__body--no-padding-2vVe6Xco","common-tooltip__hotkey-block":"common-tooltip__hotkey-block-2gS_uAOl","common-tooltip__hotkey-block--divider":"common-tooltip__hotkey-block--divider-rQ38KmpQ","common-tooltip__hotkey-text":"common-tooltip__hotkey-text-1eb7dyCg","common-tooltip__hotkey-button":"common-tooltip__hotkey-button-1XJ40e4D","common-tooltip__plus-sign":"common-tooltip__plus-sign-3CKSupKp"}},Wt0y:function(e,t,i){"use strict";function n(e){void 0===e&&(e=location.host) ;return-1!==["i18n.tradingview.com","partial.tradingview.com","www.tradingview.com","wwwcn.tradingview.com"].indexOf(e)||-1!==["d33t3vvu2t2yu5.cloudfront.net","dwq4do82y8xi7.cloudfront.net","s.tradingview.com","s3.tradingview.com"].indexOf(e)||e.match(/^[a-z]{2}\.tradingview\.com/)||e.match(/prod-[^.]+.tradingview.com/)?"battle":-1!==e.indexOf("tradingview.com")?"staging":e.match(/webcharts/)?"staging_local":(e.match(/^localhost(:\d+)?$/),"local")}function r(){return"local"===n()}function o(){return"battle"===n()}function s(){return!o()}i.r(t),i.d(t,"environment",(function(){return n})),i.d(t,"isLocal",(function(){return r})),i.d(t,"isProd",(function(){return o})),i.d(t,"isDebug",(function(){return s}))},X0WL:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var n=function(){function e(e){this._colorProperty=e}return e.prototype.size=function(){return"13px"},e.prototype.bold=function(){return!1},e.prototype.color=function(){return this._colorProperty.value()},e}()},XAms:function(e,t,i){"use strict";function n(e){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"]'];function o(e){var t=e.target;t&&!t.closest(r.join(", "))&&e.preventDefault()}},XFad:function(e,t,i){"use strict";var n=i("5rJj"),r=i("aDyP").LineToolPitchfork,o=window.t("Schiff Pitchfork");function s(e,t){var i=t||s.createProperties();r.call(this,e,i)}inherit(s,r),s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Schiff Pitchfork"},s.createProperties=function(e){var t=new n("linetoolschiffpitchfork2",e,!1,{range:[0,8]});return s._configureProperties(t),t},s._configureProperties=function(e){r._configureProperties(e)},t.LineToolSchiffPitchfork2=s},XPit:function(e,t,i){"use strict";i.r(t),i.d(t,"TimePointIndexSearchMode",(function(){return n})),i.d(t,"seriesPlotFunctionMap",(function(){return l})),i.d(t,"barFunction",(function(){return c})),i.d(t,"SeriesData",(function(){return u}));var n,r=i("Eyy1"),o=i("k9/m");!function(e){e[e.FromLeft=-1]="FromLeft",e[e.FromRight=1]="FromRight"}(n||(n={}));var s={open:function(e){return e[1]},high:function(e){return e[2]},low:function(e){return e[3]},close:function(e){return e[4]},hl2:function(e){return(e[2]+e[3])/2},hlc3:function(e){return(e[2]+e[3]+e[4])/3},ohlc4:function(e){return(e[1]+e[2]+e[3]+e[4])/4}},a=["open","high","low","close","hl2","hlc3","ohlc4"];function l(){var e=new Map;return a.forEach((function(t,i){e.set(t,c(t))})),e}function c(e){return s[e]}var u=function(){function e(){this.m_bars=new o.PlotList(l()),this.m_nsBars=new o.PlotList(l())}return e.prototype.bars=function(){return this.m_bars},e.prototype.nsBars=function(){return this.m_nsBars},e.prototype.size=function(){return this.m_bars.size()+this.m_nsBars.size()},e.prototype.each=function(e){this.m_bars.each(e),this.m_nsBars.each(e)},e.prototype.clear=function(){ this.m_bars.clear(),this.m_nsBars.clear(),this.lastProjectionPrice=void 0},e.prototype.isEmpty=function(){return this.m_bars.isEmpty()&&this.m_nsBars.isEmpty()},e.prototype.first=function(){return this.m_bars.isEmpty()?this.m_nsBars.first():this.m_bars.first()},e.prototype.last=function(){return this.m_nsBars.isEmpty()?this.m_bars.last():this.m_nsBars.last()},e.prototype.search=function(e,t){return this.nsBars().isEmpty()?this.bars().search(e,t):this.bars().isEmpty()||Object(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){if(i===n.FromRight){var r=function(i,n){var r=n[t];return null!=r&&e>=r};return null!==(o=this.m_bars.findLast(r))?o.index:null!==(s=this.m_nsBars.findLast(r))?s.index:this.m_bars.firstIndex()}if(i===n.FromLeft){var o,s,a=function(i,n){var r=n[t];return null!=r&&e<=r};return null!==(o=this.m_bars.findFirst(a))?o.index:null!==(s=this.m_nsBars.findFirst(a))?s.index:this.m_bars.lastIndex()}throw new Error("plotValueToTimePointIndex: unsupported search mode")},e}()},XUCF:function(e,t,i){"use strict";var n=i("Hr11").sign,r=i("Ss5c").LineDataSource,o=i("Ocx9").DefaultProperty,s=window.t("Ghost Feed");function a(e,t,i){this._source=e,this._index=t,this._bars=i||[]}function l(e,t,n){var o=t||l.createProperties();if(o._source=this,!n){var s=Math.round(this.calculateATR(e));o.averageHL.setValue(s)}r.call(this,e,o),this._segments=[],o.averageHL.listeners().subscribe(this,l.prototype.regenerate),o.variance.listeners().subscribe(this,l.prototype.regenerate),o.points||o.addProperty("points"),this._currentAverageHL=this._properties.averageHL.value(),this._currentVariance=this._properties.variance.value(),this._currentInterval=e.mainSeries().interval(),this.properties().onRestoreFactoryDefaults().subscribe(this,this._handleRestoringFactoryDefaults),i.e("lt-pane-views").then(function(e){var t=i("dMkl").GhostFeedPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}a.prototype.setBars=function(e){this._bars=e||[]},a.prototype.clone=function(e){return new a(e,this._index,TradingView.clone(this._bars))},a.prototype.createBar=function(){var e=this._source.properties().averageHL.value(),t=this._source.properties().variance.value()/100,i=this._source._model.mainSeries().base(),n=Math.random(),r=e*(1-2*n)*t,o=e*(1+(.5-(n=Math.random()))*t),s=r-o/2,a=s+o;return{o:(s+Math.random()*o)/i,h:a/i,l:s/i,c:(s+Math.random()*o)/i}},a.prototype.generate=function(){this._bars=[];var e=this._source.points(),t=e[this._index],i=e[this._index+1];if(t&&i&&t.index!==i.index){this._avgHL=this._source.properties().averageHL.value(),this._variance=this._source.properties().variance.value()/100;for(var r=this._index?t.index+1:t.index,o=n(i.index-t.index),s=r;s!==i.index;s+=o)this._bars.push(this.createBar())}},a.prototype.bars=function(){return this._bars},a.prototype.setSize=function(e){ if(e0&&this._points[this._points.length-1].index===e.index){this._lastPoint=null,this.normalizePoints(),this.createServerPoints();for(var t=0;t1&&this.generateBars(this._points.length-2),i||this._finished},l.prototype.finish=function(){this._finished=!0,this._lastPoint=null,this.normalizePoints(),this.createServerPoints()},l.prototype.setPoint=function(e,t,i){if(r.prototype.setPoint.call(this,e,t,i),e>0){var n=this.points()[e-1],o=t.index-n.index;this._segments[e-1].setSize(Math.abs(o))}if(e>1,a=n+s;i(e[a],t)?(n=a+1,o-=s+1):o=s}return n}function s(e,t,i,n){return void 0===i&&(i=0),void 0===n&&(n=e.length),o(e,t,r,i,n)}function a(e,t,i,n,r){void 0===n&&(n=0),void 0===r&&(r=e.length);for(var o=r-n;0>1,a=n+s;i(t,e[a])?o=s:(n=a+1,o-=s+1)}return n}function l(e,t,i,n){return void 0===i&&(i=0),void 0===n&&(n=e.length),a(e,t,r,i,n)}function c(e,t){return e.filter((function(e){return!t.includes(e)}))}function u(e,t){var i=e.indexOf(t);return i<0?e.slice():[t].concat(e.slice(0,i)).concat(e.slice(i+1))}function h(e,t,i){var r=new Set(t),o=[],a=[];return e.forEach((function(e,t){r.has(e)||(o.push(e),a.push(t))})),is?(console.warn("Too many variables-link in HEX-color search: "+i[0]),null):e(o,i)}(e);o[e]=r.ensureNotNull(t)})),t.colorsPalette=o,t.getHexColorByName=function(e){var i=t.colorsPalette[e];if(!i)throw new Error("No such color "+e);return i}},YWnQ:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"SymbolErrorPermissionDeniedReason",(function(){return n})),i.d(t,"permissionDenied",(function(){return r})),function(e){e.Symbol="symbol",e.ExtendedHours="extended_hours",e.GroupPermission="group"}(n||(n={}));var r="permission denied"},YdVo:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolPath",(function(){return u}));var n=i("mrSG"),r=i("Eyy1"),o=i("aO4+"),s=i("YFKU"),a=i("Ocx9"),l=i("Ss5c"),c=Object(s.t)("Path"),u=function(e){function t(n,r){var o=this,s=r||t.createProperties();return o=e.call(this,n,s)||this,i.e("lt-pane-views").then(i.bind(null,"JeuX")).then((function(e){o._setPaneViews([new e.PathPaneView(o,n)])})),o}return Object(n.__extends)(t,e),t.prototype.pointsCount=function(){return-1},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.translatedType=function(){return c},t.prototype.name=function(){return"Path"},t.prototype.hasEditableCoordinates=function(){return!1},t.prototype.addPoint=function(t,i,n){var s,a=Object(r.ensureNotNull)(this.priceScale()),l=this._model.timeScale().indexToCoordinate(t.index),c=t.price,u=Object(r.ensure)(null===(s=this.ownerSource())||void 0===s?void 0:s.firstValue()),h=a.priceToCoordinate(c,u);if(this._points.length>0){var d=this._points[this._points.length-1],p=this._model.timeScale().indexToCoordinate(d.index),_=d.price,f=a.priceToCoordinate(_,u);if(new o.Point(l,h).subtract(new o.Point(p,f)).length()<5)return this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0}return e.prototype.addPoint.call(this,t,i,n)},t.createProperties=function(e){var i=new a.DefaultProperty("linetoolpath",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"WW+G")).then((function(e){return e.PathDefinitionsViewModel}))},t._configureProperties=function(e){l.LineDataSource._configureProperties(e)},t}(l.LineDataSource)},"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";i.r(t),i.d(t,"PriceScaleBase",(function(){return f})) ;var n=i("Eyy1"),r=i("aIyQ"),o=i.n(r),s=i("Qb4w"),a=i("TTFo"),l=i("qJq3"),c=i("7ktv"),u=i("tc+8"),h=i.n(u),d=i("3ClC"),p=i("/tGj"),_={autoScale:!0,autoScaleDisabled:!1,lockScale:!1,percentage:!1,percentageDisabled:!1,log:!1,logDisabled:!1,alignLabels:!0,isInverted:!1,indexedTo100:!1},f=function(){function e(e){this._marksCache=null,this._onMarksChanged=new o.a,this._onCurrencyLabelContentChanged=new o.a,this.m_dataSources=[],this._sourcesForAutoscale=null,this._sourcesToUpdateViews=null,this._hasSeries=!1,this._seriesLikeSources=[],this._seriesLikeSourcesSet=new Set,this._priceDataSources=[],this._lastSourceRemoved=new o.a,this._scaleSeriesOnly=!1,this._currencyCache=null,e=Object.assign({},_,e),this._properties=new h.a(e)}return e.prototype.isLog=function(){return this._properties.childs().log.value()},e.prototype.isPercentage=function(){return this._properties.childs().percentage.value()},e.prototype.isInverted=function(){return this._properties.childs().isInverted.value()},e.prototype.isIndexedTo100=function(){return this._properties.childs().indexedTo100.value()},e.prototype.isAutoScale=function(){return this._properties.childs().autoScale.value()&&!this.isLockScale()},e.prototype.isLockScale=function(){return this._properties.childs().lockScale.value()},e.prototype.isRegular=function(){return!this.isPercentage()&&!this.isLog()&&!this.isIndexedTo100()},e.prototype.properties=function(){return this._properties},e.prototype.dataSources=function(){return this.m_dataSources},e.prototype.seriesLikeSources=function(){return this._seriesLikeSources},e.prototype.addDataSource=function(e,t){var i=this;if(t||-1===this.m_dataSources.indexOf(e)){if(e instanceof c.PriceDataSource&&(this._priceDataSources.push(e),e.currencyChanged().subscribe(this,(function(){return i._currencyCache=null})),Object(p.isSymbolSource)(e)&&(this._seriesLikeSources.push(e),this._seriesLikeSourcesSet.add(e),e.symbolResolved().subscribe(this,(function(){return i._currencyCache=null})),e instanceof l.Series))){var n=e.properties();this._hasSeries||(n.childs().lockScale&&(this.setMode({lockScale:n.childs().lockScale.value()}),n.removeProperty("lockScale")),n.childs().pnfStyle.childs().lockScale&&n.childs().pnfStyle.removeProperty("lockScale")),this._hasSeries=!0}e.properties().visible.listeners().subscribe(null,(function(){i._sourcesForAutoscale=null,i._currencyCache=null})),this.m_dataSources.push(e),this._mainSource=void 0,this._sourcesForAutoscale=null,this._sourcesToUpdateViews=null,this._currencyCache=null,this.updateFormatter(),this._initScaleProperties(),this.invalidateSourcesCache()}},e.prototype.removeDataSource=function(e){var t=this.m_dataSources.indexOf(e);if(Object(n.assert)(-1!==t,"Source is not attached to scale"),e.properties().visible.listeners().unsubscribeAll(this),this.m_dataSources.splice(t,1),e instanceof c.PriceDataSource){var i=this._priceDataSources.indexOf(e);if(Object(n.assert)(-1!==i,"Source is not found"),this._priceDataSources.splice(i,1),Object(p.isSymbolSource)(e)){var r=this._seriesLikeSources.indexOf(e) ;Object(n.assert)(-1!==r,"Source is not found"),this._seriesLikeSources.splice(r,1),this._seriesLikeSourcesSet.delete(e),e.symbolResolved().unsubscribeAll(this),e instanceof l.Series&&(this._hasSeries=!1)}e.currencyChanged().unsubscribeAll(this)}this.mainSource()||this.setMode({autoScale:!0}),this._mainSource=void 0,this._sourcesForAutoscale=null,this._sourcesToUpdateViews=null,this.updateFormatter(),this.invalidateSourcesCache(),0===this.m_dataSources.length&&this._lastSourceRemoved.fire(),this._currencyCache=null},e.prototype.currency=function(e){if(null!==this._currencyCache&&e.size===this._currencyCache.availableCurrenciesCount)return this._currencyCache.value;for(var t=void 0,i=new Set,r=new Set,o=0===this._seriesLikeSources.length,s=void 0,a=!0,l=0,c=0,u=0,h=this._seriesLikeSources;u0)s=null;else if(void 0===s)s=g;else if(null!==s&&s!==g){s=null;break}o=!0;break}}}}return void 0===t&&(t=0===l&&0===c?null:{readOnly:o,selectedCurrency:s||null,currencies:r,originalCurrencies:i,symbolSourceCount:l,allCurrenciesAreOriginal:a}),this._currencyCache={value:t,availableCurrenciesCount:e.size},t},e.prototype.onMarksChanged=function(){return this._onMarksChanged},e.prototype.priceRangeInPrice=function(){if(this.isEmpty())return null;var e=this.mainSource();if(null===e)return null;var t=Object(n.ensureNotNull)(e.firstValue()),i=this.height();return{from:this.coordinateToPrice(i-1,t),to:this.coordinateToPrice(0,t)}},e.prototype.setPriceRangeInPrice=function(e){if(!this.isPercentage()&&!this.isIndexedTo100()){var t=this.isInverted(),i=t?this.bottomMargin():this.topMargin(),n=t?this.topMargin():this.bottomMargin(),r=this.isLog(),o=r?Object(a.toLog)(e.from):e.from,l=r?Object(a.toLog)(e.to):e.to,c=l-o;o+=n*c,l-=i*c,this.setMode({autoScale:!1}),this.setPriceRange(new s.PriceRange(o,l)),this._marksCache=null,this._onMarksChanged.fire()}},e.prototype.hasMainSeries=function(){return this._hasSeries},e.prototype.getStudies=function(){return this.dataSources().filter(d.isStudy)},e.prototype.lastSourceRemoved=function(){return this._lastSourceRemoved},e.prototype._recalculateSourcesForAutoscale=function(){this._mainSource&&(this._scaleSeriesOnly=this._scalesProperties.childs().scaleSeriesOnly.value());var e=this._scaleSeriesOnly&&this._hasSeries ;this._sourcesForAutoscale=this.m_dataSources.filter((function(t){return!!(t.properties().visible.value()||t instanceof l.Series)&&(e?t instanceof l.Series:t.isIncludedInAutoScale())}))},e.prototype._updateAutoScaleDisabledProperty=function(e){var t=this._properties.childs(),i=t.indexedTo100.value()||t.percentage.value()||t.lockScale.value();e?t.autoScaleDisabled.setValueSilently(i):t.autoScaleDisabled.setValue(i)},e.prototype._setAutoScaleValueWithDependentProperties=function(e){var t=this._properties.childs();t.autoScale.setValueSilently(e),e&&(t.percentage.setValueSilently(!1),t.indexedTo100.setValueSilently(!1),t.lockScale.setValueSilently(!1),t.logDisabled.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)},e.prototype._setLockScaleValueWithDependentProperties=function(e){var t=this._properties.childs();t.lockScale.setValueSilently(e),e&&(t.autoScale.setValueSilently(!1),t.percentage.setValueSilently(!1),t.indexedTo100.setValueSilently(!1),t.log.setValueSilently(!1)),t.percentageDisabled.setValueSilently(e),t.logDisabled.setValueSilently(e),this._updateAutoScaleDisabledProperty(!0)},e.prototype._setPercentageValueWithDependentProperties=function(e){var t=this._properties.childs();t.percentage.setValueSilently(e),e&&(t.autoScale.setValueSilently(!0),t.log.setValueSilently(!1),t.lockScale.setValueSilently(!1),t.indexedTo100.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)},e.prototype._setIndexedTo100ValueWithDependentProperties=function(e){var t=this._properties.childs();t.indexedTo100.setValueSilently(e),e&&(t.autoScale.setValueSilently(!0),t.log.setValueSilently(!1),t.lockScale.setValueSilently(!1),t.percentage.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)},e.prototype._setLogValueWithDependentProperties=function(e){var t=this._properties.childs();t.log.setValueSilently(e),e&&(t.lockScale.setValueSilently(!1),t.percentage.setValueSilently(!1),t.indexedTo100.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)},e.prototype._initScaleProperties=function(){var e=this.isLockScale(),t=this.properties().childs();e&&(t.percentage.setValue(!1),t.indexedTo100.setValue(!1),t.log.setValue(!1),t.autoScale.setValue(!1)),t.percentageDisabled.setValue(e),t.logDisabled.setValue(e),this._updateAutoScaleDisabledProperty(!1),t.percentage.value()&&(t.log.setValue(!1),t.indexedTo100.setValue(!1)),t.indexedTo100.value()&&(t.log.setValue(!1),t.percentage.setValue(!1))},e}()},Yjuu:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=i("ytGH").LineToolWidthsProperty,s=window.t("Fib Speed Resistance Arcs");function a(e,t){var r=t||a.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("bcXK").FibSpeedResistanceArcsPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);for(var s=[this._properties.child("trendline").child("linewidth")],l=1;l<=a.LevelsCount;l++)s.push(this._properties.child("level"+l).child("linewidth"));this._widthsProperty=new o(s)}inherit(a,n),a.LevelsCount=11, a.prototype.levelsCount=function(){return a.LevelsCount},a.prototype.pointsCount=function(){return 2},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Fib Speed Resistance Arcs"},a.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},a.createProperties=function(e){var t=new r("linetoolfibspeedresistancearcs",e,!1,{range:[1,11]});return a._configureProperties(t),t},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("pdv6").FibSpeedResistanceArcsDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a._configureProperties=function(e){n._configureProperties(e)},t.LineToolFibSpeedResistanceArcs=a},YlKu:function(e,t,i){"use strict";i.r(t),i.d(t,"ApplyLineToolTemplateUndoCommand",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i,n){var r=e.call(this,n)||this;return r._source=t,r._newState=i,r._oldState=t.properties().state(),r}return Object(n.__extends)(t,e),t.prototype.redo=function(){this._source.applyTemplate(this._newState)},t.prototype.undo=function(){this._source.applyTemplate(this._oldState)},t}(i("RDU5").UndoCommand)},YmeR:function(e,t,i){"use strict";i.r(t),i.d(t,"ActionBinder",(function(){return o}));var n=i("mrSG"),r=i("2h0C"),o=function(e){function t(t,i,n,r,o){void 0===o&&(o=null);var s=e.call(this,t,i,!0,n,r)||this;return null!==o?t.update({onExecute:o.bind(s)}):t.update({onExecute:s._onActionCallback.bind(s)}),s}return Object(n.__extends)(t,e),t.prototype.action=function(){return this.control()},t.prototype.value=function(){return this.action().isChecked()},t.prototype.setValue=function(e){this.action().update({checked:Boolean(e)})},t.prototype._onActionCallback=function(){this._undoModel.setProperty(this._property,this.value(),this._undoText)},t}(r.Binding)},YuHv:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("AWC/");function r(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]);var i=document.createElement("div"),r=document.createElement("div");return i.appendChild(r),i.classList.add(n.container),r.classList.add(n.inner),e.forEach((function(e){i.classList.add(n[e])})),t.forEach((function(e){i.classList.add(n[e])})),i}},Z0Sh:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=window.t("Gann Box");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("eg8N").GannSquarePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.HLevelsCount=7,s.VLevelsCount=7,s.prototype.hLevelsCount=function(){return s.HLevelsCount},s.prototype.vLevelsCount=function(){return s.VLevelsCount},s.prototype.pointsCount=function(){return 2},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Gann Box"};var a=[4.5,9,11.25,18,22.5,36,45],l=function(){for(var e=[],t=a.length-1,i=1,n=0,r=0;r<1e10;)r=a[n]*i,e.push(Math.round(r)), e.push(Math.ceil(-r)),n===t-1&&(i*=10),n=(n+1)%t;return e.sort((function(e,t){return et?1:0})),e}();s.prototype._alignPriceOnPattern=function(e,t){var i=Math.round(1e6*(e.price-t.price))/1e6;if(0===i)return t.price;for(var n=a[0],r=a[a.length-1],o=1,s=Math.abs(i);s=0&&!(a[c]*o=0?l:-l),e},s.prototype._alignTimeOnPattern=function(e,t){var i=e.index-t.index;if(0===i)return 0;for(var n=l.length-2;n>=0&&!(l[n]0?1:0,e.index=t.index+l[n],e},s.prototype._alignPointsFixedIncrement=function(e,t){return this._alignTimeOnPattern(e,t),this._alignPriceOnPattern(e,t),e},s.prototype._preparePoint=function(e,t){return t&&t.shift()&&0!==this._points.length&&this._alignPointsFixedIncrement(e,this._points[0]),n.prototype._preparePoint.call(this,e,t)},s.prototype.setPoint=function(e,t,i){if(i&&i.shift()){var r=0===e?this._points[1]:this._points[0];this._alignPointsFixedIncrement(t,r)}n.prototype.setPoint.call(this,e,t,i)},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("2liL").GannSquareDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolgannsquare",e,!1,{range:[1,7],prefixes:["h","v"],names:["coeff","color","visible"]});return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolGannSquare=s},Z8aO:function(e,t,i){"use strict";i.r(t),i.d(t,"SeriesPriceLinePaneView",(function(){return s}));var n=i("mrSG"),r=i("k4w6"),o=i("8Uy/"),s=function(e){function t(t){var i=e.call(this,t)||this;return i._lineRendererData.linestyle=o.LINESTYLE_DOTTED,i}return Object(n.__extends)(t,e),t.prototype._updateImpl=function(){if(this._lineRendererData.visible=!1,this._series.properties().showPriceLine.value()&&12!==this._series.properties().style.value()){var e=this._series.lastValueData(void 0,!0);e.noData||(this._lineRendererData.visible=!0,this._lineRendererData.y=e.coordinate,this._lineRendererData.color=this._series.priceLineColor(e.color),this._lineRendererData.linewidth=this._series.properties().priceLineWidth.value())}},t}(r.a)},ZAbA:function(e,t,i){"use strict";i.r(t),i.d(t,"SeriesDataEvents",(function(){return o}));var n=i("aIyQ"),r=i.n(n),o=function(){function e(){this._completed=new r.a,this._error=new r.a,this._symbolError=new r.a,this._symbolResolved=new r.a,this._seriesError=new r.a,this._symbolNotPermitted=new r.a,this._symbolGroupNotPermitted=new r.a,this._extendedHoursNotPermitted=new r.a,this._chartTypeNotPermitted=new r.a,this._intradaySpreadNotPermitted=new r.a,this._intradayExchangeNotPermitted=new r.a,this._customIntervalNotPermitted=new r.a,this._secondsIntervalNotPermitted=new r.a,this._tickMarksRangeChanged=new r.a,this._barReceived=new r.a,this._messageReceived=new r.a}return e.prototype.completed=function(){return this._completed},e.prototype.error=function(){return this._error}, e.prototype.symbolError=function(){return this._symbolError},e.prototype.symbolResolved=function(){return this._symbolResolved},e.prototype.seriesError=function(){return this._seriesError},e.prototype.symbolNotPermitted=function(){return this._symbolNotPermitted},e.prototype.symbolGroupNotPermitted=function(){return this._symbolGroupNotPermitted},e.prototype.extendedHoursNotPermitted=function(){return this._extendedHoursNotPermitted},e.prototype.chartTypeNotPermitted=function(){return this._chartTypeNotPermitted},e.prototype.intradaySpreadNotPermitted=function(){return this._intradaySpreadNotPermitted},e.prototype.intradayExchangeNotPermitted=function(){return this._intradayExchangeNotPermitted},e.prototype.customIntervalNotPermitted=function(){return this._customIntervalNotPermitted},e.prototype.secondsIntervalNotPermitted=function(){return this._secondsIntervalNotPermitted},e.prototype.tickMarksRangeChanged=function(){return this._tickMarksRangeChanged},e.prototype.barReceived=function(){return this._barReceived},e.prototype.messageReceived=function(){return this._messageReceived},e.prototype.fireCompleted=function(){this._completed.fire()},e.prototype.fireError=function(){this._error.fire()},e.prototype.fireSymbolError=function(e){this._symbolError.fire(e),this.fireError()},e.prototype.fireSymbolResolved=function(e){this._symbolResolved.fire(e)},e.prototype.fireSeriesError=function(e){this._seriesError.fire(e),this.fireError()},e.prototype.fireSymbolNotPermitted=function(e){this._symbolNotPermitted.fire(e),this.fireError()},e.prototype.fireSymbolGroupNotPermitted=function(e){this._symbolGroupNotPermitted.fire(e),this.fireError()},e.prototype.fireExtendedHoursNotPermitted=function(){this._extendedHoursNotPermitted.fire(),this.fireError()},e.prototype.fireChartTypeNotPermitted=function(e){this._chartTypeNotPermitted.fire(e),this.fireError()},e.prototype.fireIntradaySpreadNotPermitted=function(){this._intradaySpreadNotPermitted.fire(),this.fireError()},e.prototype.fireIntradayExchangeNotPermitted=function(){this._intradayExchangeNotPermitted.fire(),this.fireError()},e.prototype.fireCustomIntervalNotPermitted=function(){this._customIntervalNotPermitted.fire(),this.fireError()},e.prototype.fireSecondsIntervalNotPermitted=function(){this._secondsIntervalNotPermitted.fire(),this.fireError()},e.prototype.fireTickMarksRangeChanged=function(e){this._tickMarksRangeChanged.fire(e)},e.prototype.fireBarReceived=function(e){this._barReceived.fire(e)},e.prototype.fireMessageReceived=function(e){this._messageReceived.fire(e)},e}()},ZBiT:function(e,t,i){e.exports={"css-value-pane-controls-padding-left":"1px","css-value-pane-controls-padding-right":"5px"}},ZJKN:function(e,t,i){"use strict";i.r(t),i.d(t,"BarsRange",(function(){return r}));var n=i("Eyy1"),r=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";i.r(t),i.d(t,"dateFormatProperty",(function(){return a})),i.d(t,"removeSettingsValue",(function(){return l}));var n=i("Vdly"),r=i("m/cY"),o=i("e1ZQ");function s(){return n.getValue("date_format",Object(o.c)())}var a=Object(r.a)(s());function l(){a.setValue(Object(o.c)()),n.remove("date_format")}n.onSync.subscribe(null,(function(){return a.setValue(s())})),a.listeners().subscribe(null,(function(){return n.setValue("date_format",a.value())}))},ZjKI:function(e,t,i){"use strict";i.r(t),i.d(t,"CLOSE_POPUPS_AND_DIALOGS_COMMAND",(function(){return n}));var n="CLOSE_POPUPS_AND_DIALOGS_COMMAND"},"Zo2/":function(e,t,i){"use strict";(function(t){i("YCFM"),i("YFKU");var n=i("Eyy1").assert,r=i("Y7w9").moveToHead,o=i("mkn5").PaneWidget,s=i("fYB8").PaneSeparator,a=i("mNEU"),l=i("1IXQ").PriceAxisWidget,c=i("uPb3").TimeAxisWidget,u=i("fTGZ").BarsMarksContainer,h=i("qJq3").Series,d=i("Kxc7"),p=i("YmeR").ActionBinder,_=i("mKT+").resolveAndShowEditObjectDialog,f=i("Vdly").setValue,m=i("QloM").TabNames,v=i("cdbK").showGoToDateDialog,y=i("/3z9"),g=i("lxNp"),b=i("7nsU").showConfirmInputsDialog,S=i("GVHu").Study,w=i("8sOK").StudyStub,P=i("3ClC").isStudy,C=i("Ss5c").LineDataSource,x=i("CW80"),T=x.isLineTool,I=x.isStudyLineTool,M=i("7KDR"),L=M.Action,O=M.Separator,k=(i("L/Ed").ToolboxType,i("mMWL")),A=i("LxhU").Interval,E=i("pPtI"),V=E.setLastUsedResolution,D=E.getDefaultResolution,B=i("n5al"),R=B.isRangeStyle,N=B.getDefaultStyle,F=i("pvsv").showSymbolInfoDialog,j=i("H0vP").InvalidationMask,W=i("H0vP").InvalidationLevel,H=i("nqXy").MouseWheelHelper,z=i("PT1i").linking,U=i("mYjs").showChangeIntervalDialog,G=i("u5Q5").showDialog,Y=i("u5Q5").activateKeyPressHandler,q=i("Ocx9").DefaultProperty,K=i("+6ja"),Z=K.availableTimezones,J=K.timezoneIsAvailable,X=i("0F0w").ChartSession,Q=i("0YCj"),ee=i("c2JX").Spinner,te=i("JWMC").trackEvent,ie=i("VaSN").lastEventIsTouch,ne=i("ikwP").Size,re=i("wZIs"),oe=i("txPx").getLogger("ChartWidget",{color:"#606"}),se=i("U0+/").StudyMetaInfoRepository,ae=i("VNzU").isMultipleLayout,le=i("b1GK").addPerfMark,ce=i("KnF9").EnvironmentState,ue=i("FQhm"),he=i("wjVR").ChartWidgetBase,de=i("qFKp").CheckMobile.any(),pe=i("ikwP").getCanvasDevicePixelRatio,_e=i("B8p3").setHandler,fe=i("YWnQ").permissionDenied,me=i("uDHo").TIMEFRAMETYPE,ve=window.t("On The Left"),ye=window.t("On The Right"),ge=window.t("Move Scale To Left"),be=window.t("Move Scale To Right"),Se=d.enabled("chart_content_overrides_by_defaults");function we(e,i,n){he.call(this,e,i,n),this._options.timeScaleWidget&&(this._options.timeScaleWidget.pressedMouseMoveScale=this._options.handleScale.axisPressedMouseMove);var r=this;this._startSpinner(this._options.container.value()) ;var o=this._options.content,s=this._options.readOnly;this._removeMaximizeHotkey=null,r._hotkeys=g.createGroup({desc:"Chart actions",isDisabled:function(){return!r._isActive}});var a=this._options.containsData,l=this._options.onWidget,c=this._options.onCmeWidget;c&&oe.logWarn("[ChartWidget] 'onCmeWidget' option is depricated");var u=this._options.widgetCustomer,h=this._options.timezone,d=this._options.hideSymbolSearch,p=this._options.defSymbol,_=A.isValid(this._options.defInterval)?this._options.defInterval:void 0,f=parseInt(this._options.defStyle),m=B.isValidStyle(f)?f:void 0,v=this._options.defExtendedHours,y=void 0!==this._options.defTimeframe?{value:this._options.defTimeframe.toUpperCase(),type:me.PeriodBack}:void 0;this._chartWidgetCollection=this._options.chartWidgetCollection||null,this._content=o,this._initialLoading=this._options.initialLoading,this._readOnly=s,this._containsData=a,this._showChartEvents=!a&&this._options.chartEventsEnabled,this._defSymbol=p,this._defInterval=_,this._defTimeframe=y,this._defStyle=m,this._onWidget=!!l,this._compareSymbols=this._options.compareSymbols,this._onWidget&&(c?this._widgetCustomer="cme":u&&(this._widgetCustomer=u)),this._hideSymbolSearch=d,this._frameTime=30,this._model=null,this._metaInfo={},this._drawRafId=0,this._lhsAxesWidth=0,this._rhsAxesWidth=0;var b=this._contentSeriesProperties();b&&(p=b.symbol,_=b.interval),void 0===this._options.useUserChartPreferences&&(this._options.useUserChartPreferences=!0),this._properties=new q("chartproperties",void 0,void 0,this._options.useUserChartPreferences);var S=this._options.useUserChartPreferences?re.defaults("chartproperties.mainSeriesProperties"):re.factoryDefaults("chartproperties.mainSeriesProperties");this._properties.mainSeriesProperties.merge(S),_=_||S.interval||"D",B.isValidStyle(m)||(m=B.isValidStyle(S.style)?S.style:N(A.isRange(_))),this._properties.mainSeriesProperties.merge({visible:!0,symbol:p||DEFAULT_SYMBOL,shortName:"",timeframe:"",onWidget:this._onWidget,interval:_,style:m,extendedHours:v,lineStyle:{styleType:re.factoryDefaults("chartproperties.mainSeriesProperties.lineStyle.styleType")}}),this._containsData&&this._properties.mainSeriesProperties.merge({showCountdown:!1}),h&&J(h)&&this._properties.timezone.setValue(h),this._tagsChanged=new t,this._disconnected=new t,this._reconnectBailout=new t,this._connected=new t,this._redraw=new t,this._onScroll=new t,this.chartWidgetInitialized=new t,this._chartSession=new X(ChartApiInstance),this._metaInfoRepository=new se(this._chartSession),this.lhsPriceAxisWidthChanged=new t,this.rhsPriceAxisWidthChanged=new t,this._timingsMeter=null,this._isActive=this._options.isActive,this._options.container.subscribe((function(e){r._setElement($(e))}),{callWithLast:!0});var w=function(){r.resize()};this._options.width.subscribe(w),this._options.height.subscribe(w),this._options.visible.subscribe(this._updateTimingsMeterState.bind(this)),this._aboutToBeDestroyed=new t,this._actions=null,this._definitionsViewModel=null,this._backgroundTopColorSpawn=null, this._backgroundBottomColorSpawn=null,this._onZoom=new t}inherit(we,he),we.prototype.onZoom=function(){return this._onZoom},we.prototype.isInitialized=function(){return Boolean(this._inited)},we.prototype.compareSymbols=function(){return this._compareSymbols},we.prototype._getChartPropertyDefinitionsViewModel=function(){if(null===this._definitionsViewModel){var e=this;return new Promise((function(t,n){Promise.all([i.e(21),i.e(54),i.e("general-property-page")]).then(function(r){if(e._isDestroyed)n("Chart widget already destroyed");else{var o=i("5lPo").ChartPropertyDefinitionsViewModel;e.withModel(e,(function(){null===e._definitionsViewModel&&(e._definitionsViewModel=new o(e.model(),e.properties(),e._options)),t(e._definitionsViewModel)}))}}.bind(null,i)).catch(i.oe)}))}return Promise.resolve(this._definitionsViewModel)},we.prototype._initMaximizeHotkey=function(e){var t=this;function i(e){e.defaultPrevented||y.modifiersFromEvent(e)===y.Modifiers.Alt&&e.stopPropagation()}function n(e){e.defaultPrevented||y.modifiersFromEvent(e)===y.Modifiers.Alt&&(e.preventDefault(),e.stopPropagation(),t.toggleFullscreen())}return e.addEventListener("mousedown",i,!0),e.addEventListener("click",n,!0),function(){e.removeEventListener("mousedown",i,!0),e.removeEventListener("click",n,!0)}},we.prototype.toggleFullscreen=function(){var e=this.getResizerDetacher();e.fullscreenable.value()&&(e.fullscreen.value()?e.exitFullscreen():e.requestFullscreen())},we.prototype._setElement=function(e){this._jqMainDiv&&(this._jqMainDiv.remove(),this._jqParent.empty()),this._controlBarNavigation&&(this._controlBarNavigation.destroy(),this._controlBarNavigation=null),null!==this._removeMaximizeHotkey&&this._removeMaximizeHotkey(),this._removeMaximizeHotkey=this._initMaximizeHotkey(e[0]);var t=e.prop("ownerDocument");this._jqParent=$(t.createElement("div")).addClass("chart-container-border").prependTo(e),this._jqMainDiv=$('
',t),this._elTooltipDiv=t.createElement("div"),this._elTooltipDiv.className="tooltip-wrapper",this._jqMainDiv.append(this._elTooltipDiv),this._elMainTable=t.createElement("table"),this._elMainTable.className="chart-markup-table",this._elMainTable.setAttribute("cellpading","0"),this._elMainTable.setAttribute("cellspacing","0"),this._jqMainDiv.append(this._elMainTable),(this._options.controlBarEnabled||d.enabled("control_bar"))&&Promise.all([i.e(70),i.e(12),i.e("chart-widget-gui")]).then(function(e){if(!this._isDestroyed){this._controlBarNavigation&&this._controlBarNavigation.destroy();var t=i("TGRH").ControlBarNavigation;this._controlBarNavigation=new t(this,this._jqMainDiv[0],this._options.controlBar),this._model&&this.adjustSize()}}.bind(this).bind(null,i)).catch(i.oe),(this._options.handleScale.mouseWheel||this._options.handleScroll.mouseWheel)&&(this._mouseWheelHelper=new H,this._onWheelBound=this._onMousewheel.bind(this),this._jqMainDiv[0].addEventListener("wheel",this._onWheelBound,{passive:!1})),this.resize(),this._justActivated=!1,this.withModel(this,(function(){this._jqParent.append(this._jqMainDiv), this._jqMainDiv.on("mousedown",this._beginRequestActive.bind(this)),this._jqMainDiv.on("mouseup",this._endRequestActive.bind(this)),this._jqMainDiv.on("touchstart",this._beginRequestActive.bind(this)),this._jqMainDiv.on("touchmove",this._endRequestActive.bind(this)),this._jqMainDiv.on("touchend",this._endRequestActive.bind(this)),this._jqParent.on("click",this._requestActive.bind(this))})),this._inited&&(null!==this._timeAxisWidget&&(this._timeAxisWidget.destroy(),this._timeAxisWidget=null),this._paneWidgets.forEach((function(e){e.destroy()})),this._paneWidgets.length=0,this._paneSeparators.forEach((function(e){e.destroy()})),this._paneSeparators.length=0,this._update(j.full()))},we.prototype._beginRequestActive=function(){var e=!1;this._chartWidgetCollection&&(e=this._chartWidgetCollection.activeChartWidget.value()!==this,this._chartWidgetCollection.activeChartWidget.setValue(this)),e&&(ie()&&this._isLineToolModeExceptBrush()&&this.updateCrossHairPositionIfNeeded(),this._justActivated=!0)},we.prototype._endRequestActive=function(){var e=this;this._justActivated&&setTimeout((function(){e._justActivated=!1}),0)},we.prototype._requestActive=function(){this._beginRequestActive(),this._endRequestActive()},we.prototype.justActivated=function(){return this._justActivated},we.prototype._onMousewheel=function(e){if(this.model().model().zoomEnabled()&&(TradingView.onWidget()||!parent||parent===window||!parent.IS_DEMO_PAGE)&&this.model()&&!this.noScroll&&!this.model().timeScale().isEmpty()){var t=this._mouseWheelHelper.processWheel(e),i=t.deltaX/100,n=-t.deltaY/100;if(0!==i&&this._options.handleScroll.mouseWheel||0!==n&&this._options.handleScale.mouseWheel){switch(e.cancelable&&e.preventDefault(),e.deltaMode){case e.DOM_DELTA_PAGE:i*=120,n*=120;break;case e.DOM_DELTA_LINE:i*=32,n*=32}if(0!==n&&this._options.handleScale.mouseWheel){var r=Math.sign(n)*Math.min(1,Math.abs(n)),o=this._jqMainDiv[0].getBoundingClientRect(),s=e.clientX-this._lhsAxesWidth-o.left;if(!Number.isFinite(s)||!Number.isFinite(r))return void oe.logWarn("Incorrect mouse wheel processing: scrollPosition: "+s+", zoomScale: "+r);var a=new ce(e).control();this.model().model().zoomTime(s,r,!!a||void 0),this._onZoom.fire(a)}0!==i&&this._options.handleScroll.mouseWheel&&this.model().scrollChart(-80*i)}}},we.prototype.setTimezone=function(e){e&&J(e)?this._properties.timezone.setValue(e):console.warn("Incorrect timezone: "+JSON.stringify(e))},we.prototype.getTimezone=function(){return this._properties.timezone.value()},we.prototype.refreshMarks=function(){this.model().barsMarksSources().forEach((function(e){e.refreshData()}))},we.prototype.clearMarks=function(){this.model().barsMarksSources().forEach((function(e){e.clearMarks()}))},we.prototype.metaInfoRepository=function(){return this._metaInfoRepository},we.prototype._init=function(){var e=this;this.model()&&this.model().mainSeries().clearData(),this.initColors(),this._makeDefaultGui();var t=function(){e._checkObsoleteTimezone(),e._chartSession&&e._chartSession.connected()&&this._model.restart(), this._content&&(this.initColors(),this._updateGui(),this.update()),this._resizeHandler=function(){this.adjustSize(),this._model&&this._model.mainSeries().requestMoreData(),this.paint()}.bind(this),this._resizeHandler(),this._jqParent.append(this._jqMainDiv),this._spinner&&(this._spinner.stop(),delete this._spinner),$(window).on("keydown:chart_"+this._id,(function(e){27===e.which&&e.preventDefault()})),this._initBarsMarksSources(),this._activateSymbolSearchHotkeys(),this.model().timeScale().onScroll().subscribe(this,(function(){this._onScroll.fire()})),this._inited=!0}.bind(this),i=this._makeDefaultModel();void 0===i?t():i.then(t)},we.prototype._activateSymbolSearchHotkeys=function(){this.readOnly()||this._hideSymbolSearch||Y()},we.prototype._checkObsoleteTimezone=function(){var e=this._properties.timezone.value();J(e)||this._properties.timezone.setValue({UTC:"Etc/UTC",EST:"America/New_York",CST:"America/Chicago",PST:"America/Los_Angeles"}[e]||"exchange")},we.prototype._initBarsMarksSources=function(){var e=this;this.withModel(this,(function(){this.model().barsMarksSources().forEach((function(t){t.onNeedRepaint.subscribe(e,(function(){e.model().model().lightUpdate()}))}))}))},we.prototype.initColors=function(){this._properties.scalesProperties.lineColor.listeners().subscribe(this,we.prototype.setScaleLineColor),this._properties.scalesProperties.textColor.listeners().subscribe(this,we.prototype.setScaleTextColor)},we.prototype._initBackgroundColor=function(){null===this._backgroundTopColorSpawn&&(this._backgroundTopColorSpawn=this._model.model().backgroundTopColor().spawn(),this._backgroundTopColorSpawn.subscribe(this._onBackgroundColorChanged.bind(this))),null===this._backgroundBottomColorSpawn&&(this._backgroundBottomColorSpawn=this._model.model().backgroundColor().spawn(),this._backgroundBottomColorSpawn.subscribe(this._onBackgroundColorChanged.bind(this)))},we.prototype.paneWidgets=function(){return this._paneWidgets},we.prototype.paneByCanvas=function(e){for(var t=0;tW.Cursor&&this._timeAxisWidget.update(),this._dataWindowWidget){var i=e.maxPaneInvalidation();i===W.Full?this._dataWindowWidget.fullUpdate():i>W.None&&this._dataWindowWidget.update()}for(var n=0;n'),this.$shield=$('
').appendTo(this.$element),this.$element.appendTo(t),this._showed=!1,this._cw.withModel(this,this._connectToModel)},we.LoadingScreen.prototype._connectToModel=function(){this._cw.model().mainSeries().dataEvents().messageReceived().subscribe(this,(function(e){ switch(e.method){case"symbol_error":e.params[1]!==fe&&this.hide();break;case"series_error":d.enabled("hide_loading_screen_on_series_error")&&this.hide();break;case"series_completed":this.hide()}}))},we.LoadingScreen.prototype.show=function(){this._cw._inLoadingState=!0,this._showed||(this._showed=!0,this._show())},we.LoadingScreen.prototype._show=function(){var e=this._cw.properties().paneProperties.background.value();this.$shield.css("background",e),this.$element.addClass("fade")},we.LoadingScreen.prototype.hide=function(){delete this._cw._inLoadingState,this._showed&&this._hide()},we.LoadingScreen.prototype._hide=function(){this._showed=!1,this.$element.removeClass("fade")},we.LoadingScreen.prototype.$canvas=null,we.LoadingScreen.prototype.context=null,we.LoadingScreen.prototype.isShown=function(){return this._showed},we.prototype.unsetActivePaneWidget=function(){this.activePaneWidget=!1},we.prototype.setActivePaneWidget=function(e){this.activePaneWidget=e},we.prototype.toggleMaximizePane=function(e){if(!(this._paneWidgets.length<2)){this._maximizedPaneWidget?(this._maximizedPaneWidget.state().setMaximized(!1),this._maximizedPaneWidget=null,this._paneSeparators.forEach((function(e){e.show()}))):(this._maximizedPaneWidget=e,this._maximizedPaneWidget.state().setMaximized(!0),this._paneSeparators.forEach((function(e){e.hide()})));for(var t=this._paneWidgets.length;t--;)this._paneWidgets[t].updateControls(),this._paneWidgets[t].updatePriceAxisWidgets();this._timeAxisWidget.updatePriceAxisStubs(),this.adjustSize(),this.updateCrossHairPositionIfNeeded()}},we.prototype._makePaneWidgetsAndSeparators=function(){for(var e=this._model.panes(),t=e.length,i=this._paneWidgets.length,n=t;n0){var l=new s(this,n-1,n);this._paneSeparators.push(l),this._timeAxisWidget?$(l.getElement()).insertBefore(this._timeAxisWidget.getElement()):$(l.getElement()).appendTo(this._elMainTable)}this._timeAxisWidget?this._elMainTable.insertBefore(a.getElement(),this._timeAxisWidget.getElement()):this._elMainTable.appendChild(a.getElement())}null!==this._timeAxisSeparator&&this._timeAxisSeparator.destroy(),this._timeAxisSeparator=new s(this,this._paneWidgets.length-1,0,!0),$(this._timeAxisSeparator.getElement()).insertBefore(this._timeAxisWidget.getElement());for(n=0;n0;)for(var t=this._content.panes[e].sources,i=t.length;i-- >0;)if("MainSeries"===t[i].type)return t[i].state},we.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()}))},we.prototype.createSessionBreaksActions=function(e){var t=new L({label:window.t("Session Breaks"),checkable:!0,statName:"ToggleSessionBreaks"}) ;t.binder=new p(t,this._model.chartModel().sessions().properties().graphics.vertlines.sessBreaks.visible,this.model(),"Session Breaks"),this._actions.sessionBreaks=t},we.prototype.updateActionForIntradayOnly=function(e){e&&e instanceof L&&e.update({disabled:this.model().mainSeries().isDWM()})},we.prototype.containsVolume=function(){return this.model().dataSources().some((function(e){return e instanceof S&&"Volume"===e.metaInfo().shortId}))},we.prototype.containsStudyByPredicate=function(e){return!!this._model&&this._model.dataSources().some((function(t){if(!(t instanceof S))return!1;var i=t.metaInfo();return e(i)}))},we.prototype.containsStudy=function(e){return this.containsStudyByPredicate((function(t){return t.id===e||t.fullId===e}))},we.prototype.isSmall=function(){return this._width()<550||this._height()<300},we.prototype.onWidget=function(){return this._onWidget},we.prototype.onCmeWidget=function(){return"cme"===this.widgetCustomer()},we.prototype.widgetCustomer=function(){return this._widgetCustomer},we.prototype._width=function(){return this._options.width.value()},we.prototype._height=function(){return this._options.height.value()},we.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()},we.prototype.chartSession=function(){return this._chartSession},we.prototype.maxLhsPriceAxisWidth=0,we.prototype.maxRhsPriceAxisWidth=0,we.prototype.GUIResetScales=function(){te("GUI","Reset Scales");var e=this.model();e&&e.resetScales()},we.prototype.onLineCancelled=function(){k.resetToCursor()},we.prototype._startSpinner=function(e){this._spinner||e&&(this._spinner=(new ee).spin(e))},we.prototype.isJustClonedChart=function(){return!!(this._options||{}).justCloned},we.prototype.setDataWindowWidget=function(e){this._dataWindowWidget=e},we.prototype.removeDataWindowWidget=function(){this._dataWindowWidget=null},d.enabled("datasource_copypaste")&&(we.prototype.onAppClipboardPaste=function(e){oe.logDebug("[[paste]]"),this._model&&this._model.pasteSourceFromClip(e)},we.prototype.onAppClipboardCopy=function(e){e||(e=this._model.selection().sources()),e.filter((function(e){return e instanceof S&&e.isChildStudy()})).length?oe.logDebug("Can not copy child study"):(oe.logDebug("[[copy]]"),this._model&&this._model.copySourcesToClip(e))},we.prototype.onAppClipboardCut=function(e){oe.logDebug("[[cut]]"),this._model&&this._model.cutSourcesToClip(e||this._model.selection().sources())}),we.prototype.applyOverrides=function(e){var t={};for(var i in e)i.startsWith("mainSeriesProperties.priceAxisProperties")||(t[i]=e[i]);applyPropertiesOverrides(this.properties(),null,!1,t,null),this._model&&(applyPropertiesOverrides(this._model.model().properties(),null,!1,t),applyPropertiesOverrides(this._model.mainSeries().properties(),null,!1,t,"mainSeriesProperties"))},we.prototype.applyStudiesOverrides=function(e){Q.setDefaultsOverrides(e), this._applyStudiesOverrides()},we.prototype.setActive=function(e){this._isActive=e,ie()&&(e&&this.selectBarMode().value()?this.startTrackingMode():this.exitTrackingMode()),this._paneWidgets.forEach((function(e){e.update()})),e||this.model().selectionMacro((function(e){e.clearSelection()}))},we.prototype.isActive=function(){return this._isActive},we.prototype.trackTime=function(){return this._chartWidgetCollection.lock.trackTime},we.prototype.crossHairSyncEnabled=function(){return this._chartWidgetCollection.lock.crosshair.value()},we.prototype.isMultipleLayout=function(){return ae(this._chartWidgetCollection.layout.value())},we.prototype.selectBarMode=function(){return this._model.model().selectBarMode()},we.prototype.toggleSelectBarMode=function(){this.selectBarMode().value()||(k.resetToCursor(!0),this._model.lineBeingCreated()&&this._model.cancelCreatingLine()),this._model.model().toggleSelectBarMode(),this.selectBarMode().value()&&this.startTrackingMode()},we.prototype.onBarSelected=function(){return this._model.model().onBarSelected()},we.prototype.trySetChartStyle=function(e){var t=this.model();return!!t&&(t.mainSeries().properties().style.value()===e||!!d.enabled("charting_library_base")&&(this._setChartStyle(e),!0))},we.prototype._setChartStyle=function(e){var t=this.model(),i=t.mainSeries().properties().style;t.setChartStyleProperty(i,e,"Change Series Style")},we.prototype.showReplayOrderConfirmationDialog=function(){if(!this.model().isInReplay())return Promise.resolve()},we.prototype._addPerfMark=function(e){le("ChartWidget."+this._id+"."+e)},we.prototype.requestFullscreen=function(){this._options.requestFullscreen()},we.prototype.getResizerDetacher=function(){return this._options},e.exports.ChartWidget=we,e.exports.trackingModeIsAvailable=de}).call(this,i("aIyQ"))},"Zp/P":function(e,t,i){"use strict";i.r(t),i.d(t,"extendAndClipLineSegment",(function(){return l})),i.d(t,"getArrowPoints",(function(){return c})),i.d(t,"optimalBarWidth",(function(){return u})),i.d(t,"optimalCandlestickWidth",(function(){return h})),i.d(t,"optimalHiLoWidth",(function(){return d})),i.d(t,"selectionTolerance",(function(){return p})),i.d(t,"coordinateIsValid",(function(){return _})),i.d(t,"setValidLineStyle",(function(){return f}));var n=i("aO4+"),r=i("hBTJ"),o=i("VaSN"),s=i("ogJP"),a=i("jFln");function l(e,t,i,o,s,a){if(Object(n.equalPoints)(e,t))return null;var l=new n.Point(0,0),c=new n.Point(i,o);if(s){if(a){var u=Object(r.intersectLineAndBox)(Object(n.lineThroughPoints)(e,t),Object(n.box)(l,c));return Array.isArray(u)?u:null}var h;return null===(h=Object(r.intersectRayAndBox)(t,e,Object(n.box)(l,c)))||Object(n.equalPoints)(t,h)?null:Object(n.lineSegment)(t,h)}if(a)return null===(h=Object(r.intersectRayAndBox)(e,t,Object(n.box)(l,c)))||Object(n.equalPoints)(e,h)?null:Object(n.lineSegment)(e,h);u=Object(r.intersectLineSegmentAndBox)(Object(n.lineSegment)(e,t),Object(n.box)(l,c));return Array.isArray(u)?u:null}function c(e,t,i,n){var r=.5*i,o=Math.sqrt(2),s=t.subtract(e),a=s.normalized(),l=5*i;n&&(l=Math.min(l,.35*s.length())) ;var c=1*r;if(l*o*.2<=c)return[];var u=a.scaled(l),h=t.subtract(u),d=a.transposed(),p=1*l,_=d.scaled(p),f=h.add(_),m=h.subtract(_),v=f.subtract(t).normalized().scaled(c),y=m.subtract(t).normalized().scaled(c),g=t.add(v),b=t.add(y),S=r*(o-1),w=d.scaled(S),P=Math.min(l-1*r/o,r*o*1),C=a.scaled(P),x=t.subtract(w),T=t.add(w),I=t.subtract(C);return[[f,g],[m,b],[x,I.subtract(w)],[T,I.add(w)]]}function u(e,t){return t=t||1,Math.floor(.3*e*t)}function h(e,t){if(e>=2.5&&e<=4)return Math.floor(3*t);var i=1-.2*Math.atan(Math.max(4,e)-4)/(.5*Math.PI),n=Math.floor(e*i*t),r=Math.floor(e*t),o=Math.min(n,r);return Math.max(Math.floor(t),o)}function d(e){return.4*e}function p(e){return(Object(o.lastEventIsTouch)()?12:2)+.5*e}function _(e){return null!=e&&!Object(s.isNaN)(e)}function f(e,t){void 0!==t&&Object(a.setLineStyle)(e,t)}},Zp8I:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererStepLine",(function(){return c}));var n=i("GEp6"),r=i("VdBB"),o=i("aO4+"),s=i("jFln"),a=i("Y7w9"),l=i("Zp/P"),c=function(){function e(){this._data=null}return e.prototype.setData=function(e){this._data=e},e.prototype.hitTest=function(e){if(null===this._data||0===this._data.items.length)return null;for(var t=this._data,i=t.items,s=t.lineWidth,c=Object(l.selectionTolerance)(s),u=Object(a.lowerbound)(i,e,(function(e,t){return e.x<=t.x})),h=Math.max(0,u-1),d=Math.min(i.length-1,u+1),p=h;p=0;n--){var r=this._renderers[n].hitTest(e,t);null!==r&&(null===i||r.result()>i.result())&&(i=r)}return i},e.prototype.doesIntersectWithBox=function(e){return this._renderers.some((function(t){ return!!t.doesIntersectWithBox&&t.doesIntersectWithBox(e)}))},e}()},a7Ha:function(e,t,i){"use strict";var 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";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=i("7KDR").Action,s=i("rCHB").LineToolPitchforkStyle,a=null,l=i("ytGH").LineToolWidthsProperty,c=window.t("Pitchfork");function u(e,t){var i=t||u.createProperties();n.call(this,e,i),this._properties.style.listeners().subscribe(this,u.prototype._recreatePaneView),this._recreatePaneView();for(var r=[this._properties.child("median").child("linewidth")],o=0;o<=u.LevelsCount;o++)r.push(this._properties.child("level"+o).child("linewidth"));this._widthsProperty=new l(r)}inherit(u,n),u.LevelsCount=8,u.prototype.levelsCount=function(){return u.LevelsCount},u.prototype.additionalActions=function(){for(var e=[],t=["Original","Modified Schiff","Inside","Schiff"],i=0;i<4;i++){var n=new o({checked:this.properties().style.value()===i,checkable:!0,label:window.t(t[i]),payload:{target:this,value:i},onExecute:function(e){var t=e.getPayload(),i=t.target,n=t.value;i.properties().style.setValue(n),i.updateAllViews(),i._model.updateSource(i)}});e.push(n)}return[e[0],e[3],e[1],e[2]]},u.prototype._recreatePaneView=function(){if(null!==a){var e=[];this._properties.style.value()===s.Original?e=[new a.PitchforkLinePaneView(this,this._model)]:this._properties.style.value()===s.Schiff?e=[new a.SchiffPitchforkLinePaneView(this,this._model)]:this._properties.style.value()===s.Schiff2?e=[new a.SchiffPitchfork2LinePaneView(this,this._model)]:this._properties.style.value()===s.Inside&&(e=[new a.InsidePitchforkLinePaneView(this,this._model)]),this._setPaneViews(e)}else i.e("lt-pane-views").then(function(e){null===a&&(a=i("cT+B")),this._recreatePaneView()}.bind(this).bind(null,i)).catch(i.oe)},u.prototype.pointsCount=function(){return 3},u.prototype.translatedType=function(){return c},u.prototype.name=function(){return"Pitchfork"},u.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},u.createProperties=function(e){var t=new r("linetoolpitchfork",e,!1,{range:[0,8]});return u._configureProperties(t),t},u.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("HCdA").PitchForkDefinitionsViewModel}.bind(null,i)).catch(i.oe)},u._configureProperties=function(e){n._configureProperties(e)},t.LineToolPitchfork=u},aILO:function(e,t,i){"use strict" ;var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Head and Shoulders");function s(e,t){this._constructor="LineToolHeadAndShoulders";var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("Fx2Q").LineToolHeadAndShouldersPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 7},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Head and Shoulders"},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("EFc4").Points5PatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolheadandshoulders",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolHeadAndShoulders=s},aIha:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolFlagMark",(function(){return c}));var n=i("mrSG"),r=i("aO4+"),o=i("YFKU"),s=i("Ss5c"),a=i("Ocx9"),l=Object(o.t)("Flag Mark"),c=function(e){function t(n,o){var s=this,a=o||t.createProperties();return s=e.call(this,n,a)||this,i.e("lt-pane-views").then(function(e){var t=new(0,i("y/56").FlagMarkPaneView)(s,s.model());t.setAnchors(new r.Point(0,0)),s._setPaneViews([t])}.bind(null,i)).catch(void 0),s}return Object(n.__extends)(t,e),t.prototype.pointsCount=function(){return 1},t.prototype.translatedType=function(){return l},t.prototype.name=function(){return"Flag Mark"},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.createProperties=function(e){e&&void 0===e.flagColor&&(e.flagColor="#318757");var i=new a.DefaultProperty("linetoolflagmark",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"w/mY")).then((function(e){return e.FlagMarkDefinitionsViewModel}))},t.version=2,t}(s.LineDataSource)},aIyQ:function(e,t,i){"use strict";(function(e){var t=i("txPx").getLogger("Common.Delegate");function n(){this._listeners=[]}function r(e){return!e.singleshot}n.prototype.subscribe=function(e,t,i){var n={object:e,member:t,singleshot:!!i};this._listeners.push(n)},n.prototype.unsubscribe=function(e,t){for(var i=0;i=0;--t){this._listeners[t].object===e&&this._listeners.splice(t,1)}},n.prototype.destroy=function(){delete this._listeners},n.prototype.fire=function(){var e=this._listeners;this._listeners=this._listeners.filter(r);for(var i=e.length,n=0;n0)},t.box=function(e,t){return{min:r(Math.min(e.x,t.x),Math.min(e.y,t.y)),max:r(Math.max(e.x,t.x),Math.max(e.y,t.y))}},t.equalBoxes=function(e,t){return o(e.min,t.min)&&o(e.max,t.max)}},akof:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererCircleShape",(function(){return a}));var n=i("mrSG"),r=i("2WC2"),o=i("aO4+"),s=2*Math.PI,a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShapeUsingCSSPixels=function(e,t){var i=Math.max(t.width,t.height)/2,n=t.x,r=t.vertOffset,o=t.y+r;e.moveTo(n+i,o),e.arc(n,o,i,0,s,!1)},t.prototype._calcBoundingBox=function(t){ var i=Math.max(t.width,t.height)/2,n=t.x,r=t.vertOffset,s=t.y+r,a=n-i,l=n+i,c=s-i,u=s+i,h=new o.Point(a,c),d=new o.Point(l,u),p=Object(o.box)(h,d),_=e.prototype._calcBoundingBox.call(this,t);return _&&(p=this._unionBox(p,_)),p},t}(r.a)},b1GK:function(e,t,i){"use strict";function n(){}i.r(t),i.d(t,"addPerfMark",(function(){return s}));var r=console.timeStamp?console.timeStamp.bind(console):n,o=window.performance&&performance.mark?performance.mark.bind(performance):n;function s(e){r(e),o(e)}},bGI9:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyTrackPricePaneView",(function(){return s}));var n=i("mrSG"),r=i("2ijp"),o=i("8Uy/"),s=function(e){function t(t,i){var n=e.call(this)||this;return n._lineRendererData.linestyle=o.LINESTYLE_DOTTED,n._study=t,n._plotName=i,n}return Object(n.__extends)(t,e),t.prototype._updateImpl=function(){this._lineRendererData.visible=!1;var e=this._study.properties().styles[this._plotName];if(e.trackPrice.value()){var t=this._study.lastValueData(this._plotName,!0);t.noData||(this._lineRendererData.visible=!0,this._lineRendererData.y=t.coordinate,this._lineRendererData.color=t.color,this._lineRendererData.linewidth=e.linewidth.value())}},t}(r.a)},bJYc:function(e,t,i){"use strict";i.r(t),i.d(t,"SetPropertyUndoCommand",(function(){return s}));var n=i("mrSG"),r=i("RDU5"),o=i("Ocx9"),s=function(e){function t(t,i,n,r,o){var s=e.call(this,n)||this;return s._targetObj=t,s._newValue=i,s._oldValue=s._targetObj.value(),s._model=r,o&&s.setCustomFlag("doesnt_affect_save",!0),s}return Object(n.__extends)(t,e),t.prototype.redo=function(){Object(o.saveDefaultProperties)(!0),this._targetObj.setValue(this._newValue),Object(o.saveDefaultProperties)(!1),this._model.recalculateAllPanes(),this._model.lightUpdate()},t.prototype.undo=function(){Object(o.saveDefaultProperties)(!0),this._targetObj.setValue(this._oldValue),Object(o.saveDefaultProperties)(!1),this._model.recalculateAllPanes(),this._model.lightUpdate()},t}(r.UndoCommand)},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={}))},bOGh:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t){var i=e.call(this,t,!1)||this;return i._subcommands=[],i}return Object(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.prototype.commands=function(){return this._subcommands},t}(i("RDU5").UndoCommand)},bSeV:function(e,t){},bTqm:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=i("NJRZ").LineTool5PointsPattern,s=window.t("Cypher Pattern");function a(e,t){this._constructor="LineToolCypherPattern";var r=t||a.createProperties();n.call(this,e,r), i.e("lt-pane-views").then(function(e){var t=i("mjK7").CypherPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,o),a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Cypher Pattern"},a.createProperties=function(e){var t=new r("linetoolcypherpattern",e);return a._configureProperties(t),t},a._configureProperties=function(e){o._configureProperties(e)},t.LineToolCypherPattern=a},bc0y:function(e,t,i){},biIa:function(e,t,i){"use strict";i.r(t),i.d(t,"SeriesWaterlinePaneView",(function(){return l}));var n=i("mrSG"),r=i("k4w6"),o=i("//lt"),s=i("VdBB"),a=i("8Uy/"),l=function(e){function t(t){var i=e.call(this,t)||this,n={cursorType:o.PaneCursorType.VerticalResize,itemIndex:0};return i._lineRenderer.setHitTest(new s.HitTestResult(s.HitTestResult.CUSTOM_MOVE,n)),i._lineRendererData.visible=!0,i._lineRendererData.linestyle=a.LINESTYLE_SPARSE_DOTTED,i}return Object(n.__extends)(t,e),t.prototype._updateImpl=function(){var e=this._series.properties().baselineStyle,t=Math.abs(100-e.baseLevelPercentage.value());this._lineRendererData.y=Math.round(this._series.priceScale().height()*(t/100)),this._lineRendererData.color=e.baselineColor.value()},t}(r.a)},brCa:function(e,t,i){"use strict";i.r(t),i.d(t,"createNoticeDialog",(function(){return o})),i.d(t,"showNoticeDialog",(function(){return s}));var n=i("mrSG"),r=(i("YFKU"),{width:400,destroyOnClose:!0,title:window.t("Notification"),content:window.t("You are notified"),contentWrapTemplate:'

',actionsWrapTemplate:'
',actions:[{name:"ok",type:"primary",text:window.t("Ok"),method:"close",key:[13,32]}]});function o(e){return new Promise((function(t){Promise.all([i.e("dialogs-core"),i.e(55),i.e(0),i.e(15),i.e("create-dialog")]).then(function(o){var s=i("YDhE").createDialog;t(s(Object(n.__assign)(Object(n.__assign)({},r),e)))}.bind(null,i)).catch(void 0)}))}function s(e){o(e).then((function(e){return e.open()}))}},"bv/X":function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Sine Line");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("piZW").SineLinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 2},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Sine Line"},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("LX4V").CyclicAndSineLinesPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolsineline",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolSineLine=s}, c2JX:function(e,t,i){"use strict";i.r(t),i.d(t,"renderSpinnerTemplate",(function(){return o})),i.d(t,"Spinner",(function(){return a}));i("SzKR");var n=i("gWrr"),r=i("Owlf");function o(e){return void 0===e&&(e=""),'\n\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\x3c!--\n\t\t\t\t--\x3e
\n\t\t\t
\n\t\t
\n\t'}var s=Object(n.b)(o()),a=function(){function e(e){this._shown=!1,this._el=s.cloneNode(!0),this.setSize(e||r.a)}return e.prototype.spin=function(e){return this._el.classList.add("tv-spinner--shown"),void 0===this._container&&(this._container=e,void 0!==e&&e.appendChild(this._el)),this._shown=!0,this},e.prototype.stop=function(e){return e&&void 0!==this._container&&this._container.removeChild(this._el),this._el.classList.remove("tv-spinner--shown"),this._shown=!1,this},e.prototype.setStyle=function(e){var t=this;return Object.keys(e).forEach((function(i){var 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}()},c44N:function(e,t,i){"use strict";function n(e,t){return e.pixelRatio===t.pixelRatio}i.r(t),i.d(t,"areEqualPaneRenderParams",(function(){return n}))},cBZt:function(e,t,i){"use strict";function n(e,t){return e+"@"+t}function r(e){return e.replace(/(@[^-]+-[^-]+).*$/,"$1")}i.r(t),i.d(t,"studyIdString",(function(){return n})),i.d(t,"extractStudyId",(function(){return r}))},cKqi:function(e,t,i){"use strict";(function(e){ var n=i("aO4+").Point,r=i("qJq3").Series,o=i("GVHu").Study,s=i("k9/m").PlotRowSearchMode,a=i("FBsw").OverlayPriceAxisView,l=i("KtbP").PanePriceAxisView,c=i("x0JF"),u=c.SeriesAreaPaneView,h=c.SeriesLinePaneView,d=c.SeriesHollowCandlesPaneView,p=c.SeriesCandlesPaneView,_=c.SeriesBarsPaneView,f=c.SeriesBaselinePaneView,m=i("biIa").SeriesWaterlinePaneView,v=i("2kV1").StudyStatusView,y=i("JjUe").OverlayDataWindowView,g=i("z8/4").OverlayLegendView,b=i("qXYw").OverlayLegendValuesProvider,S=i("ZsYR").OverlayStatusProvider,w=i("38az").SeriesBarColorer,P=i("l4sv").HorizontalLineRenderer,C=i("Kxc7"),x=i("6sst").OverlayStudyPriceLineAxisView,T=i("Qb4w").PriceRange,I=i("XPit").barFunction,M=i("XPit").seriesPlotFunctionMap,L=i("k9/m").PlotList,O=i("n5al").createSeriesFormatter,k=i("n5al").seriesCurrency,A=i("n5al").extractSymbolNameFromSymbolInfo,E=i("wOSo").QuotesProvider,V=i("qFKp").CheckMobile.any()&&!1,D=!C.enabled("hide_study_overlay_legend_item"),B=C.enabled("uppercase_instrument_names"),R=i("txPx").getLogger("Chart.StudyOverlay"),N=C.enabled("study_overlay_compare_legend_option");function F(e,t){this._source=e,this._model=t,this._points=[new n(0,0)],this._lineRenderer=new P}function j(e,t){return null==e[t]}function W(t,i,n,r){this._waterlineView=null,i.hasChild("currencyId")||i.addChild("currencyId",new e(null)),o.call(this,t,i,n,r),this.m_data=new L(M(),j),this._formatter=null,this._paneView=null;var s=this;this.properties().minTick.listeners().subscribe(null,(function(){s._recreatePriceFormattingDependencies(),s.updateAllViews(),s._model.fullUpdate()})),this.properties().style.listeners().subscribe(this,this._updateBarFunction),this.properties().lineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().areaStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().baselineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().currencyId.subscribe(this,this._onCurrencyChanged),this._updateBarFunction(),this._quotesProvider=new E,V&&this._quotesProvider.quotesUpdate().subscribe(this,this._onQuotesUpdate)}F.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 n(0,e.coordinate)],this._color=e.color)}},F.prototype.renderer=function(){var e={};return e.width=this._model.timeScale().width(),e.height=this._source.priceScale().height(),e.y=this._points[0].y,e.color=this._color,e.linewidth=1,e.linestyle=CanvasEx.LINESTYLE_DOTTED,e.visible=this._visible,this._lineRenderer.setData(e),this._lineRenderer},inherit(W,o),W.prototype._showLastValueOnPriceScale=function(){return this._model.properties().scalesProperties.showSeriesLastValue.value()},W.prototype.symbol=function(){var e,t=this.properties().inputs.symbol.value(),i=this.symbolInfo();return e=i?i.name:t,B?e.toUpperCase():e},W.prototype.currency=function(){return this._properties.currencyId.value()||null},W.prototype.setCurrency=function(e){ this._properties.currencyId.setValue(e)},W.prototype.symbolSource=function(){return this},W.prototype.lastValueData=function(e,t,i){var n={noData:!0};if(this._model.timeScale().isEmpty()||null==this.priceScale()||this.priceScale().isEmpty()||this.data().isEmpty())return n;var o=this._model.timeScale().visibleBarsStrictRange();if(null===o)return n;if(!this.properties().visible.value())return n;var a=this.nearestIndex(o.lastBar(),s.NearestLeft,TradingView.OPEN_PLOT);if(null==a)return n;var l=this._lastNonEmptyPlotRow(TradingView.CLOSE_PLOT),c=null!==l&&o.contains(l.index),u=null!==l?l.value:null,h=t||c?u:this.data().valueAt(a);if(null===h)return n;var d=this._barFunction(h);if(!isNumber(d))return n;var p={noData:!1};i&&(p.price=d);var _=this.firstValue();if(!isNumber(_))return n;p.text=this.priceScale().formatPrice(d,_),p.text=this.priceScale().formatPrice(d,_),p.formattedPriceAbsolute=this.priceScale().formatPriceAbsolute(d),p.formattedPricePercentage=this.priceScale().formatPricePercentage(d,_),p.floatCoordinate=this.priceScale().priceToCoordinate(d,_),p.coordinate=p.floatCoordinate,p.item=h;var f=this.properties();switch(f.style.value()){case r.STYLE_BARS:p.color=h[TradingView.OPEN_PLOT]<=h[TradingView.CLOSE_PLOT]?f.barStyle.upColor.value():f.barStyle.downColor.value();break;case r.STYLE_CANDLES:case r.STYLE_HOLLOW_CANDLES:p.color=h[TradingView.OPEN_PLOT]<=h[TradingView.CLOSE_PLOT]?f.candleStyle.upColor.value():f.candleStyle.downColor.value();break;case r.STYLE_LINE:p.color=f.lineStyle.color.value();break;case r.STYLE_AREA:p.color=f.areaStyle.color1.value();break;case r.STYLE_BASELINE:var m=f.baselineStyle,v=this.priceScale(),y=Math.round(v.height()*(Math.abs(100-m.baseLevelPercentage.value())/100));p.color=p.coordinate0),o?{left:0,right:1,totallySlots:i}:{left:1,right:0,totallySlots:i}}return{left:e,right:t,totallySlots:e+t}},re.prototype.startScalePrice=function(e,t,i){e.startScalePrice(t,i)},re.prototype.scalePriceTo=function(e,t,i){e.scalePriceTo(t,i),this.mainSeries().priceScale().isLockScale()?this.lightUpdate():this.invalidate(this._paneInvalidationMask(e,x.Light)),this._setScalesResetAvailable(!0)},re.prototype.endScalePrice=function(e,t){e.endScalePrice(t), this.invalidate(this._paneInvalidationMask(e,x.Light))},re.prototype.startScrollPrice=function(e,t,i){e.startScrollPrice(t,i)},re.prototype.scrollPriceTo=function(e,t,i){e.scrollPriceTo(t,i),this.invalidate(this._paneInvalidationMask(e,x.Light))},re.prototype.endScrollPrice=function(e,t){e.endScrollPrice(t),this.invalidate(this._paneInvalidationMask(e,x.Light))},re.prototype.setPriceAutoScale=function(e,t,i){e.setPriceAutoScale(t,i),this.invalidate(this._paneInvalidationMask(e,x.Light))},re.prototype.restorePriceScaleState=function(e,t,i){e.restorePriceScaleState(t,i),this.invalidate(this._paneInvalidationMask(e,x.Light))},re.prototype.resetPriceScale=function(e,t){this._setScalesResetAvailable(!1),e.resetPriceScale(t),this.invalidate(this._paneInvalidationMask(e,x.Light))},re.prototype.updateScales=function(e,t){this._undoModel._chartWidget._updateScalesActions()},re.prototype.startScaleTime=function(e){this._timeScale.startScale(e)},re.prototype.mainSeriesScaleRatioProperty=function(){return this._mainSeriesScaleRatioProperty},re.prototype.mainSeriesScaleRatioPropertyOnChanged=function(){this._mainSeriesScaleRatioProperty.listeners().fire(this._mainSeriesScaleRatioProperty)},re.prototype.mainSeriesScaleRatio=function(){return z(this._timeScale,this.m_mainSeries.priceScale())},re.prototype.setMainSeriesScaleRatio=function(e){this.paneForSource(this.m_mainSeries).applyPriceScaleRatio(this.m_mainSeries.priceScale(),e)},re.prototype.scaleTimeTo=function(e){this._timeScale.scaleTo(e),this.recalculateAllPanes(),this.lightUpdate(),this._setScalesResetAvailable(!0)},re.prototype.endScaleTime=function(){this._timeScale.endScale(),this.lightUpdate(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudies()},re.prototype.startScrollTime=function(e){this._timeScale.startScroll(e),this._isTimeScrolling=!0},re.prototype.scrollTimeTo=function(e){this._timeScale.scrollTo(e),this.recalculateAllPanes(),this.updateCrossHair(),this.lightUpdate(),this._setScalesResetAvailable(!0)},re.prototype.endScrollTime=function(){this._timeScale.endScroll(),this.lightUpdate(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudies(),this._isTimeScrolling=!1},re.prototype.recalcStudyBasedLineTools=function(){this.dataSources().forEach((function(e){m(e)&&e.recalcStudyIfNeeded&&e.recalcStudyIfNeeded()}))},re.prototype.onResetScales=function(){return this._resetScales},re.prototype.resetTimeScale=function(){this._timeScale.restoreDefault(),this.recalculateAllPanes(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudies(),this.updateCrossHair(),this.lightUpdate(),this._resetScales.fire(),this._setScalesResetAvailable(!1)},re.prototype.restoreTimeScaleState=function(e){this._timeScale.restoreState(e),this.recalculateAllPanes(),this.updateCrossHair(),this.lightUpdate(),this._setScalesResetAvailable(!0)},re.prototype.restoreFactoryDefaults=function(e){e.restoreFactoryDefaults(),this.recalcVisibleRangeStudies(!0)},re.prototype.selectionMacro=function(e){var t=this.selection().sources();e({ removeSourceFromSelection:se.bind(this),addSourceToSelection:ae.bind(this),clearSelection:oe.bind(this),selection:this.selection.bind(this)});var i=G(t,this.selection().sources()),n=G(this.selection().sources(),t);n.concat(t).forEach((function(e){e.updateAllViews()})),i.forEach((function(e){var t=e.hasAlert&&e.hasAlert.value()&&e.getAlertSync();t&&t.set("selected",!1)})),n.forEach((function(e){var t=e.hasAlert&&e.hasAlert.value()&&e.getAlertSync();t&&t.set("selected",!0)})),this.lightUpdate(),this.setHoveredSource(null),(i.length>0||n.length>0)&&this._selectedSourceChanged.fire()},re.prototype.checkLineToolSelection=function(){this._selection.checkLineToolSelection()},re.prototype.onSelectedSourceChanged=function(){return this._selectedSourceChanged},re.prototype.selection=function(){return this._selection},re.prototype.invalidate=function(e){this._invalidateHandler&&this._invalidateHandler(e)},re.prototype.dataSources=function(){var e=[];e.push(this.m_crossHairSource);for(var t=0;t0)for(s=this.dataSources(),a=0;a0){var c=r-n,u=l?null:i.rightOffset()-c;if(!this._options.shiftVisibleRangeOnNewBar&&l){var h=i.width()/(a.length()+c);h>=i.minBarSpacing()?(i.setBarSpacing(h),u=i.rightOffset()+c):s.lastBar()!==n&&(u=i.rightOffset()-c)}null!==u&&i.setRightOffset(u)}}i.setBaseIndex(r)}},re.prototype.recalculatePane=function(e){e&&e.recalculate()},re.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 w?this.paneForSource(this.m_mainSeries):null},re.prototype.recalculateAllPanes=function(){for(var e=0;e1},re.prototype.createLineTool=function(e,t,i,n,r,o){if(!_(i))return null;if("LineToolExecution"!==i&&Z("drawings","Study_Drawing_"+i),n){ var a=n.state();n=p(i,a)}var l=d(i,this,n,null),c=!l.linkKey&&!r;B.drawOnAllCharts().value()?l.linkKey=r||j.randomHash():l.linkKey=r,o=o||e.mainDataSource(),n||l.properties().currencyId.setValue(o.symbolSource().currency()),l.setOwnerSource(o);var u,h=e.defaultPriceScale();if(e.addDataSource(l,h),l.isFixed()){var f=e.mainDataSource().firstValue(),m=this._timeScale.indexToCoordinate(t.index),v=h.priceToCoordinate(t.price,f);u=l.addFixedPoint(new s(m,v))}else u=l.addPoint(t);return u||(this._lineBeingCreated=l,this._paneBeingCreatedLineOn=e),c&&l.enableCurrentIntervalVisibility(),this.fullUpdate(),l},re.prototype.lineBeingCreated=function(){return this._lineBeingCreated},re.prototype.paneBeingCreatedLineOn=function(){return this._paneBeingCreatedLineOn},re.prototype.continueCreatingLine=function(e,t,i,n){var r=this._lineBeingCreated.addPoint(e,t,i);this._lineBeingCreated.updateAllViews();var o=new C(x.Light);return r&&(this._paneBeingCreatedLineOn=null,this._lineBeingCreated=null),this.invalidate(o),r},re.prototype.cancelCreatingLine=function(){if(this._lineBeingCreated){var e=this._lineBeingCreated;this.removeSource(this._lineBeingCreated),this._lineBeingCreated=null,this._lineCancelled.fire(),B.drawOnAllCharts().value()&&e.isSynchronizable()&&B.cancelLineTool({model:this})}},re.prototype.startChangingLinetool=function(e,t,i,n,r){if(this._lineBeingEdited=e,B.isToolEditingNow.setValue(!0),!r){this._linePointBeingEdited=i,void 0!==t&&void 0!==i&&(this._lineBeingEdited.startChanging(i,t),this._lineBeingEdited.setPoint(i,t,n)),this._lineBeingEdited.updateAllViews();var o=this.paneForSource(e),s=this._paneInvalidationMask(o,x.Light);s.force=!0,this.invalidate(s),e.linkKey&&e.isSynchronizable()&&B.startChangingLineTool({linkKey:e.linkKey,model:this,symbol:this.mainSeries().symbol()})}},re.prototype.lineBeingEdited=function(){return this._lineBeingEdited},re.prototype.linePointBeingEdited=function(){return this._linePointBeingEdited},re.prototype.changeLinePoint=function(e,t){var i=this.paneForSource(this._lineBeingEdited),n=e.price,r=e.index;if(void 0!==e.x&&void 0!==e.y){var o=this._lineBeingEdited.priceScale(),s=i.mainDataSource().firstValue();n=o.coordinateToPrice(e.y,s),r=Math.round(this.timeScale().coordinateToIndex(e.x)),n=this._magnet.align(n,r,i),this._lineBeingEdited.setPoint(this._linePointBeingEdited,{price:n,index:r},t)}else this._lineBeingEdited.setPoint(this._linePointBeingEdited,e,t);this._lineBeingEdited.updateAllViews(),this.lightUpdate(),this._lineBeingEdited.linkKey&&this._lineBeingEdited.isSynchronizable()&&B.changeLineTool({linkKey:this._lineBeingEdited.linkKey,model:this,symbol:this.mainSeries().symbol(),points:this._lineBeingEdited.normalizedPoints()})},re.prototype.endChangingLinetool=function(e,t){var i=this._lineBeingEdited;if(this._lineBeingEdited=null,B.isToolEditingNow.setValue(!1),t)i.updateAllViewsAndRedraw();else{this._linePointBeingEdited=null,i.endChanging(!1,e),this.lightUpdate();var n={points:i._timePoint,interval:this.mainSeries().interval()} ;i.linkKey&&i.isSynchronizable()&&B.finishChangingLineTool({model:this,linkKey:i.linkKey,symbol:this.mainSeries().symbol(),finalState:n})}},re.prototype.finishLineTool=function(e){B.drawOnAllCharts().value()&&e.linkKey&&e.isSynchronizable()&&B.finishLineTool({linkKey:e.linkKey,model:this})},re.prototype.calculateDefaultTags=function(){for(var e=[],t=this.dataSources(),i=0;i-1&&this._modelIntervals.splice(t,1)},re.prototype.clearIntervals=function(){ for(var e=0;eu&&(h-=Math.abs(u-(d+l)),d=Math.floor(h-c)+.5);var p=d+l,_=0+t.borderSize+t.paddingTop+t.fontSize+t.paddingBottom;e.fillStyle=n.background;var f=Math.round(d*i),m=Math.round(0*i),v=Math.round(p*i),y=Math.round(_*i);e.fillRect(f,m,v-f,y-m);var g=Math.round(n.coordinate*i),b=m,S=Math.round((b+t.borderSize+t.tickLength)*i);e.fillStyle=n.color;var w=Math.max(1,Math.floor(i)),P=Math.floor(.5*i);e.fillRect(g-P,b,w,S-b);var C=_-t.baselineOffset-t.paddingBottom;e.textAlign="left",e.fillStyle=n.color,Object(r.drawScaled)(e,i,(function(){return e.fillText(n.text,d+a,C)})),e.restore()}}},e}();i.d(t,"a",(function(){return a}));var a=function(){function e(e){this._renderer=new s,this._rendererData={background:"",color:"",coordinate:0,text:"",visible:!1,width:0},this._invalidated=!0,this._model=e,this._renderer.setData(this._rendererData)}return e.prototype.update=function(){this._invalidated=!0},e.prototype.renderer=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._renderer},e.prototype.coordinate=function(){return this._rendererData.coordinate},e.prototype._updateImpl=function(){var e=this._rendererData;if(e.visible=!1,!this._model.timeScale().isEmpty()){var t=this._getIndex();if(null!==t){e.visible=!0,e.width=this._model.timeScale().width(),e.background=this._getBgColor(),e.color=Object(n.colorFromBackground)(e.background),e.coordinate=this._model.timeScale().indexToCoordinate(t);var i=this._model.timeScale().indexToUserTime(t);e.text=null!==i?this._model.dateTimeFormatter().format(i):"",this._invalidated=!1}}},e}()},d1Pk:function(e,t,i){"use strict";i.r(t),i.d(t,"fibLevelCoordinate",(function(){return r})),i.d(t,"fibLevelPrice",(function(){return o}));var n=i("Eyy1");function r(e,t,i,r,o,s){if(s)return Math.round(Object(n.ensureDefined)(e.coordinate)+Object(n.ensureDefined)(t.coordinate)*i);var a=e.price+t.price*i;return r.priceToCoordinate(a,o)}function o(e,t,i,r,o,s){if(!s)return e.price+t.price*i;var a=Object(n.ensureDefined)(e.coordinate)+Object(n.ensureDefined)(t.coordinate)*i;return r.coordinateToPrice(a,o)}},d700:function(e,t,i){"use strict" ;i.d(t,"b",(function(){return r})),i.d(t,"a",(function(){return o}));var n=i("/3z9");function r(e){if("INPUT"===e.tagName){var t=e.type;return"text"===t||"email"===t||"number"===t||"password"===t||"search"===t||"tel"===t||"url"===t}return"TEXTAREA"===e.tagName||e.isContentEditable}function o(e,t){if(!t)return!1;var i=255&e;if(27===i||i>>>4==7)return!1;switch(e^i){case n.Modifiers.Alt:return(38===i||40===i)&&"SELECT"===t.tagName||r(t);case n.Modifiers.Alt+n.Modifiers.Shift:return r(t);case n.Modifiers.Mod:if(67===i||!n.isMacKeyboard&&45===i){var o=t.ownerDocument&&t.ownerDocument.getSelection();if(o&&!o.isCollapsed)return!0}return r(t);case n.Modifiers.Mod+n.Modifiers.Shift:return i>=33&&i<=40&&r(t);case n.Modifiers.Shift:case 0:return!!(9!==i||t.ownerDocument&&t!==t.ownerDocument.body&&t!==t.ownerDocument.documentElement)&&((13===i||32===i||!function(e){if("BUTTON"===e.tagName)return!0;if("INPUT"===e.tagName){var t=e.type;if("submit"===t||"button"===t||"reset"===t||"checkbox"===t||"radio"===t)return!0}return!1}(t))&&("form"in t||t.isContentEditable))}return!1}},dBsn:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererCross",(function(){return l}));var n=i("aO4+"),r=i("GEp6"),o=i("ogJP"),s=i("Zp/P"),a=i("VdBB"),l=function(){function e(e){this._data=e}return e.prototype.draw=function(e,t){for(var i,n,r,s,a=t.pixelRatio,l="",c=!1,u=0,h=this._data.items;u0?"Forward":"Backward")),this._model=e,this._sourcesIds=t.map((function(e){return e.id()})),this._shift=i}function E(e,t,i,n,r,o){_.call(this,"Zoom"),this._model=e,this._startBar=t,this._endBar=i,this._startPrice=n,this._endPrice=r,this._pane=o}function V(e,t,i){_.call(this,"Zoom"),this._baseCmd=e,this._zoomStack=t,this._inOut=i}function D(e,t,i){_.call(this,"Apply Chart Theme"),this._model=e,this._newChartProps=TradingView.factoryDefaults("chartproperties"),this._newSeriesProps=TradingView.factoryDefaults("chartproperties.mainSeriesProperties"),this._newSessionProps=t.sessions||TradingView.factoryDefaults("sessions"),["candleStyle","hollowCandleStyle","haStyle"].forEach((function(e){t.mainSourceProperties[e].wickUpColor=t.mainSourceProperties[e].wickUpColor||t.mainSourceProperties[e].wickColor,t.mainSourceProperties[e].wickDownColor=t.mainSourceProperties[e].wickDownColor||t.mainSourceProperties[e].wickColor})),t.chartProperties.paneProperties.vertGridProperties=t.chartProperties.paneProperties.vertGridProperties||t.chartProperties.paneProperties.gridProperties, t.chartProperties.paneProperties.horzGridProperties=t.chartProperties.paneProperties.horzGridProperties||t.chartProperties.paneProperties.gridProperties,t.chartProperties.paneProperties.legendProperties=this._model.properties().state().paneProperties.legendProperties,this._newChartProps=o({},this._newChartProps,t.chartProperties),delete this._newChartProps.scalesProperties.showLeftScale,delete this._newChartProps.scalesProperties.showRightScale,delete this._newChartProps.scalesProperties.scaleSeriesOnly,delete this._newChartProps.scalesProperties.showSeriesLastValue,delete this._newChartProps.scalesProperties.showStudyLastValue,delete this._newChartProps.scalesProperties.showSymbolLabels,delete this._newChartProps.scalesProperties.showBidAskLabels,delete this._newChartProps.scalesProperties.showPrePostMarketPriceLabel,delete this._newChartProps.scalesProperties.showStudyPlotLabels,delete this._newChartProps.scalesProperties.showFundamentalNameLabel,delete this._newChartProps.scalesProperties.showFundamentalLastValue,e.timeScale().preserveBarSpacing()&&delete this._newChartProps.scalesProperties.barSpacing,this._newSeriesProps=o({},this._newSeriesProps,t.mainSourceProperties),this._oldChartProps=e.properties().state(),delete this._oldChartProps.paneProperties.topMargin,delete this._oldChartProps.paneProperties.bottomMargin,this._oldSeriesProps=e.mainSeries().properties().state(),this._oldSessionsProps=this._model.sessions().properties().state(),i||(delete this._oldSeriesProps.style,delete this._oldSeriesProps.symbol,delete this._oldSeriesProps.interval,delete this._oldSeriesProps.extendedHours,delete this._newSeriesProps.style,delete this._newSeriesProps.symbol,delete this._newSeriesProps.interval,delete this._newSeriesProps.extendedHours,delete this._newSeriesProps.bidAsk.visible,delete this._newSeriesProps.prePostMarket.visible)}function B(e,t){_.call(this,"Stop Sincing Drawing"),this._model=e,this._sourceId=t.id(),this._linkKey=t.linkKey}inherit(I,l),I.prototype.version=function(){return this.m_model._version},I.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)}},I.prototype.paneForSource=function(e){return this.m_model.paneForSource(e)},I.prototype.createPane=function(e){return this.m_model.createPane(e)},I.prototype.readOnly=function(){return this.m_model.readOnly()},I.prototype.restart=function(){this.m_model.restart()},I.prototype.disconnect=function(){this.m_model.disconnect()},I.prototype.studiesMetaData=function(){return this.m_model.studiesMetaData()},I.prototype.studyVersioning=function(){return this.m_model.studyVersioning()},I.prototype.chartModel=function(){return this._model()},I.prototype._model=function(){return this.m_model},I.prototype.pushUndoCommand=function(e){this._pushUndoCommand(e)},I.prototype._pushUndoCommand=function(e){this._undoHistory.pushUndoCommand(e)},I.prototype.startScalePrice=function(e,t,i){this.pushUndoCommand(new O(this.m_model,e,t,t.state())), this.chartModel().startScalePrice(e,t,i)},I.prototype.scalePriceTo=function(e,t,i){this.chartModel().scalePriceTo(e,t,i)},I.prototype.endScalePrice=function(e,t){this.chartModel().endScalePrice(e,t)},I.prototype.startScrollPrice=function(e,t,i){t.isAutoScale()||(this._initialPriceScrollState=t.state(),this._initialPriceScrollPos=i,this.chartModel().startScrollPrice(e,t,i))},I.prototype.scrollPriceTo=function(e,t,i){t.isAutoScale()||(this._initialPriceScrollPos&&Math.abs(this._initialPriceScrollPos-i)>20&&(this.pushUndoCommand(new O(this.m_model,e,t,this._initialPriceScrollState)),delete this._initialPriceScrollState,delete this._initialPriceScrollPos),this.chartModel().scrollPriceTo(e,t,i))},I.prototype.endScrollPrice=function(e,t){t.isAutoScale()||(delete this._initialPriceScrollState,delete this._initialPriceScrollPos,this.chartModel().endScrollPrice(e,t))},I.prototype.setPriceAutoScale=function(e,t,i){this.pushUndoCommand(new O(this.m_model,e,t,t.state())),this.chartModel().setPriceAutoScale(e,t,i)},I.prototype.resetPriceScale=function(e,t){this.pushUndoCommand(new O(this.m_model,e,t,t.state())),this.chartModel().resetPriceScale(e,t)},I.prototype.setWidth=function(e){this.m_model.setWidth(e)},I.prototype.setPaneHeight=function(e,t){this.m_model.setPaneHeight(e,t)},I.prototype.gridSource=function(){return this.m_model.gridSource()},I.prototype.watermarkSource=function(){return this.m_model.watermarkSource()},I.prototype.addAlertsSource=function(e){return this.m_model.addAlertsSource(e)},I.prototype.alertsSources=function(){return this.m_model.alertsSources()},I.prototype.publishedChartsTimelineSource=function(){return this.m_model.publishedChartsTimelineSource()},I.prototype.barsMarksSources=function(){return this.m_model.barsMarksSources()},I.prototype.crossHairSource=function(){return this.m_model.crossHairSource()},I.prototype.model=function(){return this.m_model},I.prototype.chartWidget=function(){return this._chartWidget},I.prototype.mainSeries=function(){return this.m_model.m_mainSeries},I.prototype.mainSeriesScaleRatioProperty=function(){return this.m_model.mainSeriesScaleRatioProperty()},I.prototype.panes=function(){return this.m_model.panes()},I.prototype.timeScale=function(){return this.m_model.timeScale()},I.prototype.selectionMacro=function(e){return this.m_model.selectionMacro(e)},I.prototype.setHoveredSource=function(e,t){this.m_model.setHoveredSource(e,t)},I.prototype.selection=function(){return this.m_model.selection()},I.prototype.onSelectedSourceChanged=function(){return this.m_model.onSelectedSourceChanged()},I.prototype.hoveredSource=function(){return this.m_model.hoveredSource()},I.prototype.activeStrategySource=function(){return this.m_model.activeStrategySource()},I.prototype.invalidate=function(e){this.m_model.invalidate(e)},I.prototype.setCurrentPosition=function(e,t,i,n){this.m_model.setCurrentPosition(e,t,i,n)},I.prototype.setAndSaveCurrentPosition=function(e,t,i,n){this.m_model.setAndSaveCurrentPosition(e,t,i,n)},I.prototype.modifySeries=function(e,t,i){var n=new k(this.m_model,e,t,i) ;this.pushUndoCommand(n)},I.prototype.canCreateStudy=function(e){return this.model().chartApi().chartApi().isCanCreateStudy(e)},I.prototype.checkIfFeatureAvailable=function(e,t){var i=this.canCreateStudy(),n=t&&t instanceof u;return!this.readOnly()&&n&&(i=this.canCreateStudy(!0)),!!i||(n||d(),!1)},I.prototype._insertStudy=function(e,t,i,n,r,o,s,a,l){var c=new g(this.m_model,e,t,i,n,r,o,s,a,l||null,"Insert "+e.description);return this.pushUndoCommand(c),c.insertedStudy()},I.prototype.insertStudyWithoutCheck=function(e){return this._insertStudy(e)},I.prototype.createStudyInserter=function(e,t,i){var n=this,r=null,o={createStudy:function(e,t,i,o,s,a,l,c,u){return n.checkIfFeatureAvailable(e,a)?(w("studies","Study_"+e.id),"Compare@tv-basicstudies"===e.id&&w("compare","symbol:"+t.symbol),n._insertStudy(e,t,o,s,a,l,c,u,r)):(P.logNormal("Cannot insert study "+e.id),null)}};void 0!==i&&(o.createStub=function(){var e=n.m_model.insertStudyStub(i);return r={targetPaneId:n.m_model.paneForSource(e).id(),targetZOrder:e.zorder()},e.id()},o.removeStub=function(e){return n.m_model.removeStudyStub(e)});var s=new S(e,this.m_model._studiesMetaInfoRepository,o);return s.setParentSource(t),s},I.prototype.setProperty=function(e,t,i,n){if(e&&e.value()!==t){var r=new x(e,t,i,this.m_model,n);this.pushUndoCommand(r),this.emitEvent("setProperty")}},I.prototype.setProperties=function(e,t,i){var n=this;this.beginUndoMacro(i),this.m_model.selectionMacro((function(){for(var r=0;r0&&t.reverse(),t.forEach((function(t){e._model.changeZOrder(t,e._shift)}))},I.prototype.removePane=function(e){var t=this.m_model.panes()[e].dataSources().slice();this.removeSources(t,!1,"Remove pane")},inherit(E,_),E.prototype.redo=function(){this._timeScaleState=this._model.timeScale().state(),this._priceScaleState=this._pane.defaultPriceScale().state(),this._model.zoomToViewport(this._startBar,this._endBar,this._startPrice,this._endPrice,this._pane)},E.prototype.undo=function(){this._model.timeScale().restoreState(this._timeScaleState),this._pane.defaultPriceScale().restoreState(this._priceScaleState),this._model.recalculateAllPanes(),this._model.lightUpdate()},inherit(V,_),V.prototype.undo=function(){if(this._inOut){if(this._baseCmd!==this._zoomStack.head())return void P.logDebug("zoom stack inconsistency");this._baseCmd.undo(),this._zoomStack.pop()}else this._baseCmd.redo(),this._zoomStack.push(this._baseCmd) },V.prototype.redo=function(){if(this._inOut)this._baseCmd.redo(),this._zoomStack.push(this._baseCmd);else{if(this._baseCmd!==this._zoomStack.head())return void P.logDebug("zoom stack inconsistency");this._baseCmd.undo(),this._zoomStack.pop()}},inherit(D,_),D.prototype._merge=function(e,t,i){var n=this._model;c(!0),e&&(n.properties().paneProperties.mergeAndFire(e.paneProperties),n.properties().scalesProperties.mergeAndFire(e.scalesProperties)),n.mainSeries().priceScale().setMode({autoScale:t.priceAxisProperties.autoScale,percentage:t.priceAxisProperties.percentage,log:t.priceAxisProperties.log,lockScale:t.priceAxisProperties.lockScale}),n.mainSeries().properties().mergeAndFire(t),n.mainSeries().properties().saveDefaults(),n.mainSeries().createPaneView(),n.mainSeries().invalidateBarStylesCache(),n._version=t.version,n.recalculateAllPanes(),n.fullUpdate(),n.properties().saveDefaults(),n.sessions().restoreState({properties:i}),c(!1)},D.prototype.undo=function(){this._merge(this._oldChartProps,this._oldSeriesProps,this._oldSessionsProps),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),this._model.chartThemeLoaded()},D.prototype.redo=function(){this._merge(this._newChartProps,this._newSeriesProps,this._newSessionProps),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),this._model.chartThemeLoaded()},inherit(B,_),B.prototype.redo=function(){delete this._model.dataSourceForId(this._sourceId).linkKey},B.prototype.undo=function(){this._model.dataSourceForId(this._sourceId).linkKey=this._linkKey},t.ChartUndoModel=I,t.PriceScaleChangeUndoCommand=O}).call(this,i("aIyQ"))},dTSQ:function(e,t,i){"use strict";function n(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}i.r(t),i.d(t,"regExpEscape",(function(){return n}))},dfhE:function(e,t,i){"use strict";var n,r,o;i.r(t),i.d(t,"STATUS_OFFLINE",(function(){return s})),i.d(t,"STATUS_RESOLVING",(function(){return a})),i.d(t,"STATUS_LOADING",(function(){return l})),i.d(t,"STATUS_READY",(function(){return c})),i.d(t,"STATUS_INVALID_SYMBOL",(function(){return u})),i.d(t,"STATUS_SNAPSHOT",(function(){return h})),i.d(t,"STATUS_EOD",(function(){return d})),i.d(t,"STATUS_PULSE",(function(){return p})),i.d(t,"STATUS_DELAYED",(function(){return _})),i.d(t,"STATUS_DELAYED_STREAMING",(function(){return f})),i.d(t,"STATUS_NO_BARS",(function(){return m})),i.d(t,"STATUS_REPLAY",(function(){return v})),i.d(t,"SERIES_STATUS_TEXT",(function(){return y})),i.d(t,"STYLE_LINE_TYPE_MARKERS",(function(){return g})),i.d(t,"STYLE_LINE_TYPE_STEP",(function(){return b})),i.d(t,"STYLE_LINE_TYPE_SIMPLE",(function(){return S})),i.d(t,"STYLE_BARS",(function(){return w})),i.d(t,"STYLE_CANDLES",(function(){return P})),i.d(t,"STYLE_LINE",(function(){return C})),i.d(t,"STYLE_AREA",(function(){return x})),i.d(t,"STYLE_RENKO",(function(){return T})),i.d(t,"STYLE_KAGI",(function(){return I})),i.d(t,"STYLE_PNF",(function(){return M})),i.d(t,"STYLE_PB",(function(){return L})),i.d(t,"STYLE_HEIKEN_ASHI",(function(){return O})),i.d(t,"STYLE_HOLLOW_CANDLES",(function(){return k })),i.d(t,"STYLE_BASELINE",(function(){return A})),i.d(t,"STYLE_RANGE",(function(){return E})),i.d(t,"STYLE_HILO",(function(){return V})),i.d(t,"STYLE_SHORT_NAMES",(function(){return D})),i.d(t,"SYMBOL_STRING_DATA",(function(){return B}));var s=0,a=1,l=2,c=3,u=4,h=5,d=6,p=7,_=8,f=9,m=10,v=11,y=((n={})[s]="connecting",n[a]="loading",n[l]="loading",n[c]="realtime",n[u]="invalid",n[h]="snapshot",n[d]="endofday",n[p]="endofday",n[_]="delayed",n[f]="delayed_streaming",n[m]="forbidden",n[v]="replay",n),g=0,b=1,S=2,w=0,P=1,C=2,x=3,T=4,I=5,M=6,L=7,O=8,k=9,A=10,E=11,V=12,D=((r={})[0]="bar",r[1]="candle",r[9]="hollowCandle",r[2]="line",r[3]="area",r[4]="renko",r[7]="pb",r[5]="kagi",r[6]="pnf",r[8]="ha",r[10]="baseline",r[11]="range",r[12]="hilo",r),B=((o={})[4]={type:"BarSetRenko@tv-prostudies",basicStudyVersion:40},o[7]={type:"BarSetPriceBreak@tv-prostudies",basicStudyVersion:34},o[5]={type:"BarSetKagi@tv-prostudies",basicStudyVersion:34},o[6]={type:"BarSetPnF@tv-prostudies",basicStudyVersion:34},o[8]={type:"BarSetHeikenAshi@tv-basicstudies",basicStudyVersion:60},o[11]={type:"BarSetRange@tv-basicstudies",basicStudyVersion:72},o)},di4O:function(e,t,i){"use strict";i.r(t),i.d(t,"watermarkProperty",(function(){return u})),i.d(t,"restoreWatermarkPropertyDefaults",(function(){return h}));var n=i("eJTA"),r=i("Vdly"),o=i("tc+8"),s=i.n(o),a={visibility:!1,color:"rgba(80, 83, 94, 0.25)"};function l(){var e=r.getJSON("symbolWatermark"),t=Object.assign({},a,e);if(void 0===e){if(void 0!==r.getJSON("chartproperties")){var i=r.getJSON("chartproperties").symbolWatermarkProperties;if(void 0!==i){var o=Object(n.tryParseRgba)(i.color);t=Object.assign(t,i),null!==o&&(0!==o[3]?t.visibility=!0:(o[3]=.25,t.color=Object(n.rgbaToString)(o)))}}delete t.transparency}return t}var c=null;function u(){return null===c&&(c=new s.a(l()),r.onSync.subscribe(null,(function(){null!==c&&c.mergeAndFire(l())})),c.listeners().subscribe(null,(function(){null!==c&&r.setJSON("symbolWatermark",c.state())}))),c}function h(){null!==c&&c.mergeAndFire(a)}},e1Hy:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._showStudyValues=i.properties().paneProperties.legendProperties.showStudyValues,n}return Object(n.__extends)(t,e),t.prototype.getValues=function(t){for(var i=e.prototype.getValues.call(this,t),n=this._showStudyValues.value(),r=0,o=i;ri?i:Math.round(t)}function o(e,t,i){return n.isNaN(t)||ti?i:Math.round(1e4*t)/1e4}function s(e){return r(0,e,255)}function a(e){return r(0,e,255)}function l(e){return r(0,e,255)}function c(e){return o(0,e,1)}function u(e){return o(0,e,1)}function h(e){return o(0,e,1)}function d(e){return o(0,e,1)}function p(e){return o(0,e,1)}function _(e){return o(0,e,1)}function f(e){var t=e[0]/255,i=e[1]/255,n=e[2]/255,r=Math.min(t,i,n),o=Math.max(t,i,n),s=0,a=0,l=(r+o)/2;if(r===o)s=0,a=0;else{var c=o-r;switch(a=l>.5?c/(2-o-r):c/(o+r),o){case t:s=((i-n)/c+(i1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function v(e){var t,i,n,r=e[0],o=e[1],c=e[2];if(0===o)t=i=n=c;else{var u=c<.5?c*(1+o):c+o-c*o,h=2*c-u;t=m(h,u,r+1/3),i=m(h,u,r), n=m(h,u,r-1/3)}return[s(255*t),a(255*i),l(255*n)]}t.normalizeRedComponent=s,t.normalizeGreenComponent=a,t.normalizeBlueComponent=l,t.normalizeAlphaComponent=c,t.rgb=function(e,t,i){return[s(e),a(t),l(i)]},t.areEqualRgb=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},t.rgba=function(e,t,i,n){if(Array.isArray(e)){var r=e;return n=t,[r[0],r[1],r[2],c(n)]}var o=t;return i=i||0,n=n||0,[s(e),a(o),l(i),c(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=u,t.normalizeHslSaturation=h,t.normalizeHsvSaturation=d,t.normalizeLightness=p,t.normalizeValue=_,t.hsl=function(e,t,i){return[u(e),h(t),p(i)]},t.areEqualHsl=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},t.hsv=function(e,t,i){return[u(e),d(t),_(i)]},t.areEqualHsv=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},t.rgbToHsl=f,t.hslToRgb=v,t.rgbToHsv=function(e){var t=e[0],i=e[1],n=e[2],r=t/255,o=i/255,s=n/255,a=Math.min(r,o,s),l=Math.max(r,o,s),c=l-a,u=0,h=0===l?0:c/l,d=l;if(l===a)u=0;else switch(l){case t:u=((o-s)/c+(o255)throw new Error("invalid threshold value, valid values are [0, 255]");return g(e)>=t?"white":"black"},t.tryParseRgb=E,t.parseRgb=function(e){var t=E(e);if(null!==t)return t;throw new Error("Passed color string does not match any of the known color representations")},t.tryParseRgba=V,t.parseRgba=D},ePL1:function(e,t,i){"use strict";i.r(t),i.d(t,"types",(function(){return n}));var n={ECONOMIC:"economic",QUANDL:"quandl"}},eqEH:function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return a})),i.d(t,"c",(function(){return l})),i.d(t,"d",(function(){return c}));var n=i("jofe"),r={},o=new Map;function s(e,t){if(a(e))throw new Error("Service already registered");r[e.id]=t;var i=o.get(e.id);void 0!==i&&(o.delete(e.id),i.resolve(t))}function a(e){return void 0!==r[e.id]}function l(e){var t=r[e.id];if(void 0===t)throw new Error("ServiceLocator: Service "+e.id+" not found");return t}function c(e){if(a(e))return Promise.resolve(l(e));var t=o.get(e.id);return void 0===t&&(t=Object(n.createDeferredPromise)(),o.set(e.id,t)),t.promise}},"f+Sq":function(e,t,i){"use strict";function n(e){if(void 0===e)throw new Error("Value is undefined");return e}function r(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=r,t.ensure=function(e){return r(n(e))}},f3xO:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererUnicodeChar",(function(){return p}));var n=i("mrSG"),r=i("/SnT"),o=i.n(r),s=i("Eyy1"),a=i("aO4+"),l=i("2WC2"),c=i("VdBB"),u=i("Zp/P"),h=i("zDbI"),d=i("gBDZ"),p=function(e){function t(t,i){var n=e.call(this,t,i)||this;n._heightEnsured=Object(s.ensureDefined)(n._height);var r=t.char.slice(0,40);return n._ch=o()(r)[0]||" ", n._fontFamily=t.fontFamily||h.CHART_FONT_FAMILY,n._charCache=new d.b(n._ch,!1,!1,n._fontFamily,n._heightEnsured),n}return Object(n.__extends)(t,e),t.prototype.hitTest=function(e){for(var t=Object(u.selectionTolerance)(this._heightEnsured),i=0,n=this._items;i0?1:-1,s=i.y+i.vertOffset-o*Math.round(this._heightEnsured/2);n=i.style&&void 0!==i.style.color?i.style.color:this._color,this._charCache.paintTo(e,t,n,r,s,d.a.Center,i.vertOffset>0?d.c.Top:d.c.Bottom)},t.prototype._startPath=function(e,t,i,n){},t.prototype._endPath=function(e){},t}(l.b)},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;return i.A*e.x+i.B*e.y+i.C>0===t.isPositive},t.pointInTriangle=function(e,t,i,r){var o=t.add(i).scaled(.5).add(r).scaled(.5),s=n.intersectLineSegments(t,i,o,e);return null===s&&(null===(s=n.intersectLineSegments(i,r,o,e))&&null===(s=n.intersectLineSegments(r,t,o,e)))},t.pointInBox=function(e,t){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},t.pointInPolygon=function(e,t){for(var i=t.length-1,n=!1,r=e.x,o=e.y,s=0;s=o||l.y=o)&&a.x+(o-a.y)/(l.y-a.y)*(l.x-a.x)=t.length||e.endIndex>=t.length)return null;var i=t[e.startIndex],n=t[e.endIndex];return i===o.a||n===o.a?null:(Object(r.assert)(i<=n,"startIndex should not exceed endIndex"),{startIndex:i,endIndex:n,level:e.level,extendLeft:e.extendLeft,extendRight:e.extendRight})}function l(e,t,i){var r=Object(s.ensureTimePointIndexIndex)(i.indexOf(e.startIndex)),o=Object(s.ensureTimePointIndexIndex)(i.indexOf(e.endIndex));return Object(n.__assign)(Object(n.__assign)({id:t},e),{startIndex:r,endIndex:o})}},fJhV:function(e,t,i){"use strict";i.r(t),i.d(t,"LineDataSourceTimeAxisView",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i){var n=e.call(this,t.model())||this;return n._active=!1,n._source=t,n._pointIndex=i,n}return Object(n.__extends)(t,e),t.prototype.setActive=function(e){this._active=e},t.prototype._getBgColor=function(){return this._active?"#1565C0":this._model.isDark()?"#1E88E5":"#2196F3"},t.prototype._getIndex=function(){if(!this._model.selection().isSelected(this._source))return null;var e=this._source.axisPoints();return e.length<=this._pointIndex?null:e[this._pointIndex].index},t}(i("cgFQ").a)},fPdn:function(e,t,i){"use strict";window.TradingView=window.TradingView||{},window.requireAll=function(e){return e.keys().map(e)},i("6jKD"),i("bZMm"),i("P5fv"),i("YFKU"),i("VUhU"),i("si6p"),i("EsMY"), i("jjqu"),i("OV6q"),i("SpsL"),i("eqD+"),i("iA8Q"),i("32f0"),i("MApU"),i("w9cH").install(),i("QYoC"),i("oA7e"),i("qFKp"),i("1oAu"),i("ogJP"),i("jFln"),i("HbRj"),i("VVxS"),i("CLNU"),i("mZrn"),i("Vdly"),i("+GxX")},fTGZ:function(e,t,i){"use strict";(function(e,n,r){var o=i("Ss5c").LineDataSource,s=i("ogJP").isNumber,a=i("BOPY").BarsMarksContainerPaneView,l=i("BOPY").BarsMarksContainerRenderer,c=i("Bt3k").TooltipRenderer,u=i("LxhU").Interval,h=i("n5al").isPriceSourceStyle,d=i("txPx").getLogger("Chart.BarsMarksContainer");function p(t,i){this.toolname="Child class must override this member";var s=t._undoModel._chartWidget,a=s.onWidget(),l=!1;l=a?s._options&&!s._options.hideIdeas:!!e.enabled("bars_marks")&&TVSettings.getBool("BarsMarksContainer.visibile",!1),i?i.merge({visible:l,frozen:!1}):i=new n({visible:l,frozen:!1});var u=this;i.visible.listeners().subscribe(null,(function(t){a||s._containsData||!e.enabled("bars_marks")||TVSettings.setValue("BarsMarksContainer.visibile",!!t.value()),u._tooltip&&u._tooltip.removeAll()})),o._configureProperties(i),o.call(this,t,i),this.onNeedRepaint=new r,this._requests=[],this._marks={},this._loadedRange=null,this._getDataTimeout=null,this._collectedRange=null,this._model.mainSeries().onSymbolIntervalChanged().subscribe(this,this.clearMarks),this._model.mainSeries().dataEvents().symbolResolved().subscribe(this,this.clearMarks),this._model.mainSeries().dataEvents().tickMarksRangeChanged().subscribe(this,this.getData),this._initialize(),this.pinnedTooltips={},this._tooltip=new c(this._createTooltip.bind(this),this)}inherit(p,o),p.prototype._initialize=function(e){throw new Error("Child class must override this member")},p.prototype.onClicked=function(){throw new Error("Child class must override this member")},p.prototype._getData=function(e){throw new Error("Child class must override this member")},p.prototype._createTooltip=function(){throw new Error("Child class must override this member")},p.prototype.updateDotData=function(e,t){return t},p.prototype.updatePlateData=function(e,t){},p.prototype.isAvailableInFloatingWidget=function(){return!1},p.prototype._plateViewData=function(e){return{}},p.prototype.pinTooltip=function(e,t){this.pinnedTooltips[e]=t},p.prototype.timeScale=function(){return this._model.timeScale()},p.prototype.getIntervalInTicks=function(){var e=this._model.mainSeries().properties().interval.value(),t=u.parse(e);if(!t.isValid())throw new TypeError("Unexpected interval");return t.isRange()?60:t.inMilliseconds()/1e3},p.prototype._maxDate=Math.round(new Date(2037,0,1).getTime()/1e3),p.prototype.getVisibleTickMarksRange=function(){if(this.timeScale().isEmpty())return{start:0,end:0};var e,t=this.timeScale().visibleBarsStrictRange();return t.lastBar()>this.timeScale().points().firstIndex()&&t.firstBar()=t.start&&o<=t.end+i&&e.push(r)}),this),e},p.prototype.getPublishedPlates=function(){var e={},t=this;return is_authenticated?(this.getVisibleRangePlates().forEach((function(i){i.is_public&&(t.pinnedTooltips[i.id]||i.user__id===user.id)&&(e[i.id]=i)})),e):e},p.prototype._maxPlatesPerBar=10,p.prototype.filterDisplayedPlates=function(e){return e=e.reduce(function(e,t){var i=this._getIndex(t.tickmark);return e[i]=e[i]||[],e[i].push(t),e}.bind(this),{}),e=Object.keys(e).reduce(function(t,i){var 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),[])},p.prototype._layout=function(e){switch(e){default:case 0:return"up";case 1:return"down";case 2:return"up";case 3:case 4:case 5:case 6:return"up"}},p.prototype._theme=function(e){switch(e){default:case 0:return"neutral";case 1:return"green";case 2:return"red";case 3:return"yellow";case 4:return"blue";case 5:return"green";case 6:return"red"}},p.prototype._offset=function(e,t,i){var 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())},p.prototype._getIndex=function(e){return this.timeScale().timePointToIndex(e)},p.prototype.getViewData=function(){return{barWidth:this.barWidth(),plates:this.getPlatesViewData(),tooltip:this._tooltip}},p.prototype.barWidth=function(){return this.timeScale().barSpacing()},p.prototype.getPlatesViewData=function(){var e=this._model.mainSeries();if(e.data().isEmpty())return[];for(var t=h(e.style())?e.barFunction():null,i=this.filterDisplayedPlates(this.getVisibleRangePlates()),n=this,r={},o=this._model.lastHittestData(),s=(i=(i=i.map(function(e){var i=this._getIndex(e.tickmark),s=this._getBar(i);if(null===s)return!1;var a,l=this._layout(e.direction),c=this._theme(e.direction),u=o&&o.id===e.id,h=this.timeScale().indexToCoordinate(i),d=this._offset(l,s,t),p=this.priceScale().isInverted();return i in r||(r[i]={up:0,down:0}),a=r[i][l]++,TradingView.merge({id:e.id,x:h,y:d,yInverted:p,order:a,direction:l,theme:c,hovered:u,pinned:!0===n.pinnedTooltips[e.id],user__id:e.user__id,label:e.label,labelFontColor:e.labelFontColor||"#444",minSize:e.minSize||5},this._plateViewData(e))}.bind(this))).filter((function(e){return!!e}))).filter((function(e){return!0===e.hovered})),a=0;athis._loadedRange.end&&(e.start=this._loadedRange.end)),e},p.prototype._rangeUnion=function(e,t){return e=Object.assign({},e),t&&(e.start=Math.min(t.start,e.start),e.end=Math.max(t.end,e.end)),e},p.prototype._pushGetDataStack=function(e){s(e.start)&&s(e.end)?(this._getDataTimeout&&clearTimeout(this._getDataTimeout),this._collectedRange=this._rangeUnion(e,this._collectedRange),this._getDataTimeout=setTimeout(function(){this._getData(this._collectedRange),this._getDataTimeout=this._collectedRange=null}.bind(this),300)):d.logError("Wrong tickmark range")},p.prototype.roundRange=function(e){return{start:Math.round(e.start),end:Math.round(e.end)}},p.prototype.refreshData=function(){this.getData(this._lastRange)},p.prototype.getData=function(e){s(e.start)&&s(e.end)?(this._lastRange=e,(e=Object.assign({},e)).end=this._maxDate,this._pushGetDataStack(e)):d.logError("Wrong range")},p.prototype._abortAllRequests=function(){this._requests.forEach((function(e){e.abort()})),this._requests=[],this._getDataTimeout&&clearTimeout(this._getDataTimeout),this._getDataTimeout=this._collectedRange=null},p.prototype.clearMarks=function(){this._abortAllRequests(),this._marks={},this._loadedRange=null},t.BarsMarksContainer=p}).call(this,i("Kxc7"),i("tc+8"),i("aIyQ"))},fYB8:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneSeparator",(function(){return a}));var n=i("Eyy1"),r=i("Hr11"),o=i("S8xo"),s=i("ikwP"),a=(i("bc0y"),function(){function e(e,t,i,n){if(this._handleEl=null,this._startY=0,this._deltaY=0,this._totalHeight=0,this._totalStretch=0,this._prevStretchA=0,this._minPaneHeight=0,this._maxPaneHeight=0,this._pixelStretchFactor=0,this._mouseEventHandler=null,this._chart=e,this._paneA=e.paneWidgets()[t],this._paneB=e.paneWidgets()[i],this._row=document.createElement("tr"),this._row.style.height="1px",this._cell=document.createElement("td"),this._row.appendChild(this._cell),this._cell.classList.add("pane-separator"),this._cell.setAttribute("colspan","3"),this._cell.style.background=(this._chart.properties().childs().scalesProperties.childs().lineColor.value()||"").toString(),this._cell.addEventListener("click",(function(){})),n)this._mouseEventHandler=null;else{var r=document.createElement("div");r.classList.add("handle"),this._cell.appendChild(r),this._mouseEventHandler=new o.MouseEventHandler(r,this,{treatVertTouchDragAsPageScroll:!1,treatHorzTouchDragAsPageScroll:!0}),this._handleEl=r}}return e.prototype.destroy=function(){null!==this._mouseEventHandler&&this._mouseEventHandler.destroy(),this._row.parentElement&&this._row.parentElement.removeChild(this._row)},e.prototype.getElement=function(){ return this._row},e.prototype.hide=function(){this._row.classList.add("js-hidden")},e.prototype.show=function(){this._row.classList.remove("js-hidden")},e.prototype.mouseDownEvent=function(e){this._mouseDownOrTouchStartEvent(e)},e.prototype.touchStartEvent=function(e){this._mouseDownOrTouchStartEvent(e)},e.prototype.pressedMouseMoveEvent=function(e){this._pressedMouseOrTouchMoveEvent(e)},e.prototype.touchMoveEvent=function(e){this._pressedMouseOrTouchMoveEvent(e)},e.prototype.mouseUpEvent=function(e){this._mouseUpOrTouchEndEvent(e)},e.prototype.touchEndEvent=function(e){this._mouseUpOrTouchEndEvent(e)},e.prototype.update=function(){this._cell.style.background=this._color().toString()},e.prototype.paint=function(){},e.prototype.image=function(){var e=this._paneA.leftPriceAxisesContainer().getWidth(),t=this._paneA.width(),i=this._paneA.rightPriceAxisesContainer().getWidth(),n=this._color(),r=Object(s.createDisconnectedCanvas)(document,new s.Size(e,1)),o=Object(s.getPrescaledContext2D)(r);o.fillStyle=n,o.fillRect(0,0,e,1);var a=Object(s.createDisconnectedCanvas)(document,new s.Size(t,1)),l=Object(s.getPrescaledContext2D)(a);l.fillStyle=n,l.fillRect(0,0,t,1);var c=Object(s.createDisconnectedCanvas)(document,new s.Size(i,1)),u=Object(s.getPrescaledContext2D)(c);return u.fillStyle=n,u.fillRect(0,0,i,1),{type:"separator",leftAxis:{content:r.toDataURL(),canvas:r,contentWidth:e,contentHeight:1},rightAxis:{content:c.toDataURL(),canvas:c,contentWidth:i,contentHeight:1},content:a.toDataURL(),canvas:a,contentWidth:t,contentHeight:1}},e.height=function(){return 1},e.prototype._mouseDownOrTouchStartEvent=function(e){this._startY=e.pageY,this._deltaY=0,this._totalHeight=this._paneA.height()+this._paneB.height(),this._totalStretch=this._paneA.state().stretchFactor()+this._paneB.state().stretchFactor(),this._prevStretchA=this._paneA.state().stretchFactor(),this._minPaneHeight=30,this._maxPaneHeight=this._totalHeight-this._minPaneHeight,this._pixelStretchFactor=this._totalStretch/this._totalHeight,Object(n.ensureNotNull)(this._handleEl).classList.add("i-active")},e.prototype._pressedMouseOrTouchMoveEvent=function(e){this._deltaY=e.pageY-this._startY;var t=this._paneA.height(),i=Object(r.clamp)(t+this._deltaY,this._minPaneHeight,this._maxPaneHeight)*this._pixelStretchFactor,n=this._totalStretch-i;this._paneA.state().setStretchFactor(i),this._paneB.state().setStretchFactor(n),this._chart.adjustSize(),this._paneA.height()!==t&&(this._startY=e.pageY),this._chart.model().model().fullUpdate()},e.prototype._mouseUpOrTouchEndEvent=function(e){this._chart.model().addPaneStretchFactorUndoCommand(this._paneA.state(),this._paneB.state(),this._prevStretchA,this._paneA.state().stretchFactor()),this._startY=0,this._deltaY=0,this._totalHeight=0,this._totalStretch=0,this._minPaneHeight=0,this._maxPaneHeight=0,this._pixelStretchFactor=0,Object(n.ensureNotNull)(this._handleEl).classList.remove("i-active")},e.prototype._color=function(){return this._chart.properties().childs().scalesProperties.childs().lineColor.value()||""},e}())},fgLi:function(e,t,i){ "use strict";i.r(t),i.d(t,"DataSource",(function(){return l}));var n=i("hY0g"),r=i.n(n),o=i("e3/o"),s=i("aIyQ"),a=i.n(s),l=function(){function e(){this.hasAlert=new r.a(!1),this._zorder=0,this.m_priceScale=null,this._id=Object(o.randomHashN)(6),this._ownerSource=null,this._userEditEnabled=!0,this._onPriceScaleChanged=new a.a,this._ownerSourceChanged=new a.a}return e.prototype.id=function(){return this._id},e.prototype.preferNoScale=function(){return!1},e.prototype.idForAlert=function(){return this._id},e.prototype.setId=function(e){this._id=e},e.prototype.zorder=function(){return this._zorder},e.prototype.setZorder=function(e){"number"==typeof e&&this._zorder!==e&&(this._zorder=e)},e.prototype.title=function(){throw new Error("Implement this fun in a subclass")},e.prototype.priceScale=function(){return this.m_priceScale},e.prototype.setPriceScale=function(e){this.m_priceScale=e,this._onPriceScaleChanged.fire()},e.prototype.ownerSource=function(){return this._ownerSource},e.prototype.setOwnerSource=function(e){this._ownerSource=e,this._ownerSourceChanged.fire()},e.prototype.ownerSourceChanged=function(){return this._ownerSourceChanged},e.prototype.isSavedInChart=function(e){return!0},e.prototype.isSavedInStudyTemplates=function(){return!0},e.prototype.isRemovedByStudyTemplates=function(){return!0},e.prototype.hasContextMenu=function(){return!0},e.prototype.showInObjectTree=function(){return!0},e.prototype.setUserEditEnabled=function(e){this._userEditEnabled=e},e.prototype.userEditEnabled=function(){return this._userEditEnabled},e.prototype.canBeHidden=function(){return this.userEditEnabled()},e.prototype.isUserDeletable=function(){return this.userEditEnabled()},e.prototype.canHasAlert=function(){return!1},e.prototype.properties=function(){throw new Error("Implement this fun in a subclass")},e.prototype.isVisible=function(){return this.properties().visible.value()},e.prototype.statusView=function(){return null},e.prototype.dataWindowView=function(){return null},e.prototype.legendView=function(){return null},e.prototype.marketStatusModel=function(){return null},e.prototype.dataUpdatedModeModel=function(){return null},e.prototype.dataProblemModel=function(){return null},e.prototype.priceAxisViews=function(e,t){return null},e.prototype.updateAllViews=function(){},e.prototype.paneViews=function(){return null},e.prototype.labelPaneViews=function(){return null},e.prototype.isFailed=function(){return!1},e.prototype.isLoading=function(){return!1},e.prototype.isChildStudy=function(){return!1},e.prototype.hasChildren=function(){return!1},e.prototype.canHaveChildren=function(){return!1},e.prototype.onClickOutside=function(){},e.prototype.getInputsPropertyPage=function(){return null},e.prototype.getStylesPropertyPage=function(){return null},e.prototype.getDisplayPropertyPage=function(){return null},e.prototype.getVisibilitiesPropertyPage=function(){return null},e.prototype.getSourceIcon=function(){return null},e.prototype.state=function(e){throw new Error("Implement this fun in a subclass")}, e.prototype.onPriceScaleChanged=function(){return this._onPriceScaleChanged},e.prototype.doesMovingAffectsUndo=function(){return!0},e.prototype.copiable=function(){return!1},e.prototype.cloneable=function(){return!1},e.prototype.movable=function(){return!1},e.prototype.isIncludedInAutoScale=function(){return!1},e.prototype.priceRange=function(e,t){return null},e.prototype.autoScaleInfo=function(e,t){return{range:this.priceRange(e,t)}},e}()},fs3R:function(e,t){e.exports=''},fxzW:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererDiamond",(function(){return s}));var n=i("mrSG"),r=i("2WC2"),o=i("aO4+"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShapeUsingCSSPixels=function(e,t){var i=Math.round(t.height/2),n=t.x,r=t.vertOffset,o=t.y+r;e.moveTo(n,o-i),e.lineTo(n+i,o),e.lineTo(n,o+i),e.lineTo(n-i,o),e.lineTo(n,o-i)},t.prototype._calcBoundingBox=function(t){var i=Math.round(t.height/2),n=t.x,r=t.vertOffset,s=t.y+r,a=n-i,l=n+i,c=s-i,u=s+i,h=new o.Point(a,c),d=new o.Point(l,u),p=Object(o.box)(h,d),_=e.prototype._calcBoundingBox.call(this,t);return _&&(p=this._unionBox(p,_)),p},t}(r.a)},g5Qf:function(e,t,i){"use strict";i.r(t),i.d(t,"getFavoriteDrawingToolbarPromise",(function(){return s})),i.d(t,"createFavoriteDrawingToolbar",(function(){return a}));i("YFKU");var n=i("yMne"),r=null,o=null;function s(){return o}function a(){null===o&&(o=new Promise((function(e){Promise.all([i.e(32),i.e(39),i.e(63),i.e(77),i.e(15),i.e(30),i.e(35),i.e(47),i.e(57),i.e("floating-toolbars")]).then(function(t){if(null===r){var o=i("gmn6").FavoriteDrawingToolbar;r=new o({left:window.innerWidth/2,top:n.HEADER_TOOLBAR_HEIGHT_EXPANDED+61}),e(r)}}.bind(null,i)).catch(void 0)})))}},gAom:function(e,t,i){"use strict";function n(e,t,i,n,r,o,s){e.save(),e.globalCompositeOperation="copy";var a=e.createLinearGradient(0,0,0,r);a.addColorStop(0,o),a.addColorStop(1,s),e.fillStyle=a,e.fillRect(t,i,n,r),e.restore()}function r(e,t,i,n,r,o){e.fillRect(t+o,i,n-2*o,o),e.fillRect(t+o,i+r-o,n-2*o,o),e.fillRect(t,i,o,r),e.fillRect(t+n-o,i,o,r)}function o(e,t,i,n){e.beginPath();var r=e.lineWidth%2?.5:0;e.moveTo(i,t+r),e.lineTo(n,t+r),e.stroke()}function s(e,t,i,n){e.beginPath();var r=e.lineWidth%2?.5:0;e.moveTo(t+r,i),e.lineTo(t+r,n),e.stroke()}i.r(t),i.d(t,"clearRectWithGradient",(function(){return n})),i.d(t,"fillRectInnerBorder",(function(){return r})),i.d(t,"drawHorizontalLine",(function(){return o})),i.d(t,"drawVerticalLine",(function(){return s}))},gBDZ:function(e,t,i){"use strict";i.d(t,"a",(function(){return n})),i.d(t,"c",(function(){return r})),i.d(t,"b",(function(){return c}));var n,r,o=i("Eyy1"),s=i("XlJ7"),a=i("c44N"),l=i("ikwP");!function(e){e.Left="left", e.Right="right",e.Center="center"}(n||(n={})),function(e){e.Top="top",e.Bottom="bottom",e.Middle="middle"}(r||(r={}));var c=function(){function e(e,t,i,n,r,a){void 0===a&&(a="center"),this._cacheRenderParams=null,this._canvasesMap={},this._lines=e.split(/[^\S\r\n]*(?:\r\n|\r|\n)/),this._font=function(e,t,i,n){return Object(s.makeFont)(n,i,(e?"bold ":"")+(t?"italic ":""))}(t,i,n,r),this._fontSize=r,this._verticalPadding=~~(r/6),this._textAlign=a;var c=Object(l.createDisconnectedCanvas)(document,new l.Size(0,0),1),u=Object(o.ensureNotNull)(c.getContext("2d"));u.font=this._font;for(var h=0,d=0,p=this._lines;d0){var i=this._strategySources[this._strategySources.length-1];this.setActiveStrategySource(i)}this._strategySourcesChange.fire()}},e.prototype.setActiveStrategySource=function(e){-1!==this._strategySources.indexOf(e)&&this._activeStrategySource.setValue(e)},e.prototype.unsetActiveStrategySource=function(){this._activeStrategySource.setValue(null)},e.prototype.activeStrategySource=function(){return this._activeStrategySource},e.prototype.strategySources=function(){return this._strategySources},e.prototype.strategySourcesChange=function(){return this._strategySourcesChange},e.prototype.setScrollEnabled=function(e){this._scrollEnabled=e},e.prototype.scrollEnabled=function(){return this._scrollEnabled},e.prototype.setZoomEnabled=function(e){this._zoomEnabled=e},e.prototype.zoomEnabled=function(){return this._zoomEnabled},e.prototype.onTagsChanged=function(){return this._tagsChanged},e.prototype.canZoomIn=function(){return this._timeScale.canZoomIn()&&this._zoomEnabled},e.prototype.canZoomOut=function(){return this._timeScale.canZoomOut()&&this._zoomEnabled},e.prototype.onPaneTagsChanged=function(){this._tagsChanged.fire()},e.prototype.panesCollectionChanged=function(){return this._panesCollectionChanged},e.prototype.dataSourceCollectionChanged=function(){return this._dataSourceCollectionChanged},e.prototype.sourceProperitesChanged=function(){return this._sourceProperitesChanged},e.prototype.updateCrosshair=function(){var e=this.crossHairSource(),t=e.pane;if(null!==t){var i=e.originCoordX(),n=e.originCoordY();this.setAndSaveCurrentPosition(i,n,t)}},e.prototype.zoomTime=function(e,t,i){if(this._zoomEnabled){var n=this.timeScale();if(!n.isEmpty()&&0!==t){var r=n.width();e=Math.max(1,Math.min(e,r-2)),n.zoom(e,t,i),this.updateCrosshair(),this.recalculateAllPanes(),this.lightUpdate(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudies(),this._setScalesResetAvailable(!0)}}},e.prototype.lineToolsGroupModel=function(){return this._lineToolsGroupModel},e.prototype.restoreLineToolsGroups=function(e){this._lineToolsGroupModel=C.LineToolsGroupModel.fromState(this,e)},e.prototype.updateSource=function(e){var t=this._invalidationMaskForSource(e);null!==t&&this.invalidate(t)},e.prototype.updateSourcePriceScale=function(e){var t=this._invalidationMaskForSourcePriceScale(e);null!==t&&this.invalidate(t)},e.prototype.replaceStudyStub=function(e,t){var i=this.paneForSource(e);if(null===i)return!1;var n=e.priceScale(),r=e.zorder(),o=e.ownerSource();return this.paneForSource(e)===i?i.replaceSource(e,t,n):(i.insertDataSource(t,n,r),this.removeSource(e)), t.setOwnerSource(o),this.dataSources().forEach((function(i){i.ownerSource()===e&&i.setOwnerSource(t)})),t.start(),this.recalculatePane(i),this.fullUpdate(),!0},e.prototype.insertStudyStub=function(e){var t=this.mainSeries(),i=Object(n.ensureNotNull)(this.paneForSource(t)),r=new a.StudyStub(this,null,e),o=i.createPriceScaleAtPosition("overlay");return i.addDataSource(r,o,!1),this.recalculatePane(i),this.fullUpdate(),r},e.prototype.removeStudyStub=function(e){var t=this.dataSourceForId(e);return null===t?(E.logNormal("StudyStub id="+e+" is not found in chart model"),!1):(this.removeSource(t),!0)},e.prototype.setHoveredSource=function(e,t){var i=this._hoveredSource!==e;if(i||this._lastHittestData!==t){this._lastHittestData=t;var n,r=null;if(this._hoveredSource)this._hoveredSource.updateAllViews(),r=new v.InvalidationMask(v.InvalidationLevel.Cursor),null!==(n=this._invalidationMaskForSource(this._hoveredSource,v.InvalidationLevel.Light))&&r.merge(n);if(this._hoveredSource=e,e)e.updateAllViews(),r||(r=new v.InvalidationMask(v.InvalidationLevel.Cursor)),null!==(n=this._invalidationMaskForSource(e,v.InvalidationLevel.Light))&&r.merge(n);r&&this.invalidate(r),i&&this._hoveredSourceChanged.fire(e)}},e.prototype.hoveredSource=function(){return this._hoveredSource},e.prototype.hoveredSourceChanged=function(){return this._hoveredSourceChanged},e.prototype.lastHittestData=function(){return this._lastHittestData},e.prototype.findNonOverlayStudyWithGroupingKey=function(e,t){for(var i=function(t){var i=t.dataSources().find((function(i){return Object(d.isStudy)(i)&&i.metaInfo().groupingKey===e&&!t.isOverlay(i)}));if(void 0!==i)return{value:{pane:t,study:i}}},n=0,r=void 0!==t?[t]:this._panes;n=0&&e1)return void t.setValue(!1)}t.setValue(!0)}},e.prototype._pointToPercentPosition=function(e,t){return{x:e.x/this._timeScale.width(),y:e.y/Object(n.ensureNotNull)(Object(n.ensureNotNull)(t.mainDataSource()).priceScale()).height()}},e.prototype._percentPositionToPoint=function(e,t){var i=e.x*this._timeScale.width(),o=e.y*Object(n.ensureNotNull)(Object(n.ensureNotNull)(t.mainDataSource()).priceScale()).height();return new r.Point(i,o)},e.prototype._recalcVisibleRangeStudiesImpl=function(){if(this._recalcVRStudiesParams.timerId=null,!this.timeScale().isEmpty()){var e=this.timeScale().visibleBarsStrictRange();if(null!==e){var t=this.mainSeries().nearestData(e.firstBar(),A.PlotRowSearchMode.NearestRight),i=this.mainSeries().nearestData(e.lastBar(),A.PlotRowSearchMode.NearestLeft),n=this.mainSeries().bars().lastIndex(),r=t?t.index:void 0,o=i?i.index:void 0,s=r===this._oldStartVisibleIndex,a=o===this._oldEndVisibleIndex;if(!s||!a||this._recalcVRStudiesParams.force){this._recalcVRStudiesParams.force=!1;var l={ first_visible_bar_time:1e3*Math.floor(t&&t.value?t.value[0]:0),last_visible_bar_time:1e3*Math.floor(i&&i.value?i.value[0]:0),subscribeRealtime:i&&i.index===n},c=this._recalcVRStudiesParams.studies||this.dataSources();this._recalcVRStudiesParams.studies=void 0;for(var u=0,h=c;u0&&y.listeners().fire(y)}}}}}},e.prototype._getAvailableCurrencies=function(){var e=this;return this._options.currencyLabelEnabled?Object(L.isArray)(this._availableCurrencies)?this._availableCurrencies:(null!==this._availableCurrencies||(this._availableCurrencies=this.chartApi().availableCurrencies(),this._availableCurrencies.then((function(t){e._destroyed||(e._availableCurrencies=t,e.lightUpdate())})).catch((function(t){E.logWarn("An error occurred while getting available currencies: "+t),e._availableCurrencies=null}))),[]):[]},e.prototype._getBackgroundColor=function(e){var t=this._properties.childs().paneProperties.childs();return t.backgroundType.value()===k.ColorType.Gradient?e?t.backgroundGradientStartColor.value():t.backgroundGradientEndColor.value():t.background.value()},e.prototype._updateBackgroundColor=function(){this._backgroundColor.setValue(this._getBackgroundColor()),this._backgroundTopColor.setValue(this._getBackgroundColor(!0))},e}()},gQ5K:function(e,t,i){"use strict";i.r(t),i.d(t,"DateFormatter",(function(){return o}));var n=i("kcTO"),r=i("e1ZQ"),o=function(){function e(e){void 0===e&&(e="yyyy-MM-dd"),this._dateFormatFunc=r.b[e]}return e.prototype.format=function(e){return n.customFormatters&&n.customFormatters.dateFormatter?n.customFormatters.dateFormatter.format(e):this._dateFormatFunc(e,!1)},e.prototype.formatLocal=function(e){return n.customFormatters.dateFormatter?n.customFormatters.dateFormatter.formatLocal?n.customFormatters.dateFormatter.formatLocal(e):n.customFormatters.dateFormatter.format(e):this._dateFormatFunc(e,!0)},e}()},gTEF:function(e,t,i){"use strict";i.r(t),i.d(t,"SelectionRendererArrowsUpDown",(function(){return a}));var n=i("mrSG"),r=i("Eyy1"),o=i("vq8G"),s=i("6Fc/"),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawMarker=function(e,t,i,n,o){var a=Object(r.ensureNotNull)(this._data),l=t.isUp?1:-1,c=i+l*Object(s.calculateVerticalOffset)(a.barSpacing)+l*Object(s.calculateMinHeight)(a.barSpacing),u=Math.round(3.5*o*2);u%2!=n%2&&(u+=1);var h=n%2/2,d=Math.round(t.x*o)+h,p=Math.round((t.y+c)*o)+h;e.beginPath(),e.arc(d,p,u/2,0,2*Math.PI,!0),e.closePath(),e.fill(),e.stroke()},t}(o.SelectionRenderer)},gVWb:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererBackground",(function(){return n}));var n=function(){function e(e){this._data=e}return e.prototype.draw=function(e,t){},e.prototype.drawBackground=function(e,t){e.save();for(var i=this._data,n=t.pixelRatio,r=0;r2;){var d=Math.round((h+u)/2);this.items[d].x<=e.x?u=d:h=d}u=Math.max(1,u-1),h=Math.min(this.items.length-1,h+1);for(var p=u;p<=h;++p)if(t=this.items[p-1],i=this.items[p],a=t.x,l=i.x,r(new n(a,t.y),new n(l,i.y),new n(e.x,e.y)).distance<=c)return this.hittest?this.hittest:new s(s.REGULAR);return null},t.PaneRendererLine=TradingView.PaneRendererLine=l},h24c:function(e,t,i){"use strict";i.r(t),i.d(t,"parseIntervalValue",(function(){return c})),i.d(t,"intervalIsSupported",(function(){return u})),i.d(t,"canShowSpreadActions",(function(){return h})),i.d(t,"globalKeypressMatches",(function(){return d})),i.d(t,"skipAccept",(function(){return p})),i.d(t,"syncSymbolSearch",(function(){return _})),i.d(t,"setLinkingResolution",(function(){return f}));var n=i("Kxc7"),r=i("pPtI"),o=i("PT1i"),s=i("LxhU"),a=i("ePL1"),l=new RegExp("^"+a.types.QUANDL,"i");function c(e){var t=/^[,\s]*(\d*)\s*([hdwms]?)\s*$/i.exec(e)||[],i=~~t[1],n=t[2]&&t[2].toUpperCase()||null,r={qty:!i&&n?1:i,unit:n};return r.error=!i&&!n,r.intraday=!(r.error||r.unit&&"H"!==r.unit),r}function u(e){if(n.enabled("allow_supported_resolutions_set_only")){var t=s.Interval.normalize(e);return null!==t&&Object(r.isAvailable)(t) }var i=c(e);if(i.error)return!1;if(i.intraday)return o.linking.intraday.value();var a=o.linking.supportedResolutions.value();return!a||null!==i.unit&&!!~a.indexOf(i.unit)}function h(){return!1}function d(e){return!e.ctrlKey&&(!e.metaKey&&(!!e.charCode&&(!(!e.which||e.which<=32)&&(null===e.target||!/^(input|textarea)$/i.test(e.target.tagName)))))}function p(e,t){return!t&&(e===o.linking.symbol.value()||e===o.linking.seriesShortSymbol.value())}function _(e,t){var i=o.linking.symbol.value()||"";i=function(e,t){if(!t)return e;if(l.test(e)){var i=e.split(/\//);i.length&&(e=i[i.length-1])}else e=o.linking.seriesShortSymbol.value()||e;return e}(i,t),e.val(i)}function f(e){Object(r.setLastUsedResolution)(e),o.linking.interval.setValue(e)}},hBTJ:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i("Eyy1"),r=i("aO4+"),o=i("GEp6"),s=i("f6yo");function a(e,t){var i=e.A,n=t.A,o=e.B,s=t.B,a=e.C,l=t.C,c=i*s-n*o;if(Math.abs(c)<1e-6)return null;var u=(o*l-s*a)/c,h=(n*a-i*l)/c;return new r.Point(u,h)}function l(e,t,i,n){var r=function(e,t,i,n){var r=t.subtract(e),o=n.subtract(i),s=r.x*o.y-r.y*o.x;if(Math.abs(s)<1e-6)return null;var a=e.subtract(i);return(a.y*o.x-a.x*o.y)/s}(e,t,i,n);if(null===r)return null;var s=t.subtract(e).scaled(r).add(e),a=o.distanceToSegment(i,n,s);return Math.abs(a.distance)<1e-6?r:null}function c(e,t){for(var i=0,n=e;i0&&r.equalPoints(e[e.length-1],t))&&(e.push(t),!0)}function h(e,t){for(var i=[],n=0;n=3?i:null}t.intersectLineSegmentAndBox=function(e,t){var i=e[0].x,n=e[0].y,o=e[1].x,s=e[1].y,a=t.min.x,l=t.min.y,c=t.max.x,u=t.max.y;function h(e,t,i,n,r,o){var s=0;return er&&(s|=2),to&&(s|=8),s}for(var d=h(i,n,a,l,c,u),p=h(o,s,a,l,c,u),_=!1,f=0;;){if(f>1e3)throw new Error("Cohen - Sutherland algorithm: infinity loop");if(f++,!(d|p)){_=!0;break}if(d&p)break;var m=d||p,v=void 0,y=void 0;8&m?(v=i+(o-i)*(u-n)/(s-n),y=u):4&m?(v=i+(o-i)*(l-n)/(s-n),y=l):2&m?(y=n+(s-n)*(c-i)/(o-i),v=c):(y=n+(s-n)*(a-i)/(o-i),v=a),m===d?d=h(i=v,n=y,a,l,c,u):p=h(o=v,s=y,a,l,c,u)}return _?r.equalPoints(r.point(i,n),r.point(o,s))?r.point(i,n):r.lineSegment(r.point(i,n),r.point(o,s)):null},t.intersectLines=a,t.intersectLineSegments=l,t.intersectLineAndBox=function(e,t){var i=t.min.x,o=t.min.y,s=t.max.x,a=t.max.y;if(0===e.A){var l=-e.C/e.B;return o<=l&&l<=a?r.lineSegment(r.point(i,l),r.point(s,l)):null}if(0===e.B){var u=-e.C/e.A;return i<=u&&u<=s?r.lineSegment(r.point(u,o),r.point(u,a)):null}var h=[],d=function(t){var i=function(e,t){return-(e.C+e.A*t)/e.B}(e,t);o<=i&&i<=a&&c(h,new r.Point(t,i))},p=function(t){var n=function(e,t){return-(e.C+e.B*t)/e.A}(e,t);i<=n&&n<=s&&c(h,new r.Point(n,t))};switch(d(i),p(o),d(s),p(a),h.length){ case 0:return null;case 1:return h[0];case 2:return r.equalPoints(h[0],h[1])?h[0]:r.lineSegment(h[0],h[1])}return n.assert(!1,"We should have at most two intersection points"),null},t.intersectRayAndBox=function(e,t,i){var n=l(e,t,i.min,new r.Point(i.max.x,i.min.y)),o=l(e,t,new r.Point(i.max.x,i.min.y),i.max),a=l(e,t,i.max,new r.Point(i.min.x,i.max.y)),c=l(e,t,new r.Point(i.min.x,i.max.y),i.min),u=[];if(null!==n&&n>=0&&u.push(n),null!==o&&o>=0&&u.push(o),null!==a&&a>=0&&u.push(a),null!==c&&c>=0&&u.push(c),0===u.length)return null;u.sort((function(e,t){return e-t}));var h=s.pointInBox(e,i)?u[0]:u[u.length-1];return e.addScaled(t.subtract(e),h)},t.intersectPolygonAndHalfplane=h,t.intersectPolygons=function(e,t){for(var i=e,n=0;n0){var d=this._points[this._points.length-1],p=this._model.timeScale().indexToCoordinate(d.index),_=d.price,f=a.priceToCoordinate(_,u);if(new o.Point(l,h).subtract(new o.Point(p,f)).length()<5)return this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0;var m=this._points[0],v=this._model.timeScale().indexToCoordinate(m.index),y=m.price,g=a.priceToCoordinate(y,u);if(new o.Point(l,h).subtract(new o.Point(v,g)).length()<5)return this.properties().childs().filled.setValue(!0),this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0}return e.prototype.addPoint.call(this,t,i,n)},t.prototype.setPoint=function(t,i,n){var s;e.prototype.setPoint.call(this,t,i,n);var a=this.priceScale();if(!(this._model.timeScale().isEmpty()||null===a||a.isEmpty()||t!==this._points.length-1&&0!==t)){ var l=Object(r.ensure)(null===(s=this.ownerSource())||void 0===s?void 0:s.firstValue()),c=this._model.timeScale().indexToCoordinate(i.index),u=a.priceToCoordinate(i.price,l),h=t===this._points.length-1?this._points[0]:this._points[this._points.length-1],d=this._model.timeScale().indexToCoordinate(h.index),p=a.priceToCoordinate(h.price,l);new o.Point(c,u).subtract(new o.Point(d,p)).length()<5&&this.properties().childs().filled.setValue(!0)}},t.createProperties=function(e){var i=new a.DefaultProperty("linetoolpolyline",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"91EF")).then((function(e){return e.PolylinesDefinitionsViewModel}))},t._configureProperties=function(e){l.LineDataSource._configureProperties(e),e.addExclusion("filled")},t}(l.LineDataSource)},hY0g:function(e,t,i){"use strict";(function(e){var t=i("txPx").getLogger("Common.WatchedValue");function n(){}function r(e){if(!(this instanceof r))return new r(e);arguments.length>0&&(this._value=e),this._listeners=[]}r.prototype.value=function(){return this._owner?this._owner._value:this._value},r.prototype.setValue=function(e,i){var n=this._owner?this._owner:this;if("function"==typeof n.hook&&(e=n.hook(e)),n.writeLock)return n._value;if(!i&&n._value===e&&n.hasOwnProperty("_value"))return e;n._value=e;for(var r=n._listeners.slice(),o=0,s=0;s=1&&t<=15?"1D":"1W"}throw new Error("Unexpected resolution type: "+e.symbol.resolution)}(e);case"Daily":return"1D";case"Weekly":return"1W";case"Monthly":return"1M";case"Yearly":return"12M";default:throw new Error("No such pivTimeFrame: "+t)}}var u={name:"Pivot Points Standard",metainfo:{_metainfoVersion:44,defaults:{inputs:{kind:"Traditional",lookBack:15,pivTimeFrame:"Auto",showHistoricalPivots:!0},precision:"4"},description:"Pivot Points Standard",id:"PivotPointsStandard@tv-basicstudies-80",inputs:[{defval:"Traditional",id:"kind",name:"Type",options:["Traditional","Fibonacci","Woodie","Classic","DeMark","Camarilla"],type:"text"},{defval:!0,id:"showHistoricalPivots",name:"Show historical pivots",type:"bool"},{defval:"Auto",id:"pivTimeFrame",name:"Pivots Timeframe",options:["Auto","Daily","Weekly","Monthly","Yearly"],type:"text"},{defval:15,id:"lookBack",max:5e3,min:2,name:"Number of Pivots Back",type:"integer"}],is_price_study:!0,linkedToSeries:!0,shortDescription:"Pivots"},constructor:function(){function e(){this._secondaryRes="1D",this._firstMainSeriesBarTime=NaN}return e.prototype.init=function(e,t){var i=t(0),r=t(1),o=t(2),a=t(3);this._data=new s,this._firstMainSeriesBarTime=NaN,this._kindPP=function(e){switch(e){case"Traditional":return 0;case"Fibonacci":return 1;case"Woodie":return 2;case"Classic":return 3;case"DeMark":return 4;case"Camarilla":return 5;default:throw new Error("Unknown kind "+e)}}(i),this._showHistoricalPivots=r,this._historicalPivotsToKeep=a,this._pivTimeFrame=o,this._isValidResolution=function(e,t){return(!n.Std.isdaily(e)||"Daily"!==t)&&((!n.Std.isweekly(e)||"Daily"!==t&&"Weekly"!==t)&&(!n.Std.ismonthly(e)||"Daily"!==t&&"Weekly"!==t&&"Monthly"!==t))}(e,this._pivTimeFrame),this._isValidResolution||n.Std.error("You cannot see this pivot timeframe on this resolution"),this._isValidResolution&&(this._secondaryRes=c(e,this._pivTimeFrame));var l=""===e.symbol.resolution?String(Math.max(30,2*e.symbol.interval)):e.symbol.period;e.new_sym(e.symbol.tickerid,this._secondaryRes,this._secondaryRes,l)},e.prototype.main=function(e){if(!this._isValidResolution)return null;if(e.symbol.time)return isNaN(this._firstMainSeriesBarTime)&&(this._firstMainSeriesBarTime=e.symbol.time,this._removeUnusedPivots()),e.symbol.isLastBar&&e.symbol.isNewBar?this._createResponse():null;e.select_sym(1);var t=e.new_var(n.Std.open(e)),i=e.new_var(n.Std.high(e)),r=e.new_var(n.Std.low(e)),s=e.new_var(n.Std.close(e)),a=e.new_var(n.Std.time(e)),c=this._data,u=t.get(0),h=a.get(0),d=t.get(1),p=i.get(1),_=r.get(1),f=s.get(1),m=e.symbol.isLastBar;if(0!==c.pivots.length&&e.symbol.isNewBar){var v=c.pivots[c.pivots.length-1];v.endIndex__t!==h&&(v.endIndex__t=h)}if(0===e.symbol.index||!e.symbol.isNewBar)return e.select_sym(0),null;var y=function(e,t,i,r,s,a,l,c){var u=new o,h=NaN,d=i-r;switch(c){case 0:h=(i+r+s)/3,u.p=h,u.r1=2*h-r,u.s1=2*h-i,u.r2=h+(i-r),u.s2=h-(i-r),u.r3=2*h+(i-2*r),u.s3=2*h-(2*i-r), u.r4=3*h+(i-3*r),u.s4=3*h-(3*i-r),u.r5=4*h+(i-4*r),u.s5=4*h-(4*i-r);break;case 1:h=(i+r+s)/3,u.p=h,u.r1=h+.382*d,u.s1=h-.382*d,u.r2=h+.618*d,u.s2=h-.618*d,u.r3=h+d,u.s3=h-d;break;case 2:h=(i+r+2*e)/4,u.p=h,u.r1=2*h-r,u.s1=2*h-i,u.r2=h+d,u.s2=h-d,u.r3=i+2*(h-r),u.s3=r-2*(i-h),u.r4=u.r3+d,u.s4=u.s3-d;break;case 3:h=(i+r+s)/3,u.p=h,u.r1=2*h-r,u.s1=2*h-i,u.r2=h+d,u.s2=h-d,u.r3=h+2*d,u.s3=h-2*d,u.r4=h+3*d,u.s4=h-3*d;break;case 4:var p=NaN;h=(p=n.Std.equal(t,s)?i+r+2*s:n.Std.greater(s,t)?2*i+r+s:2*r+i+s)/4,u.p=h,u.r1=p/2-r,u.s1=p/2-i;break;case 5:h=(i+r+s)/3,u.p=h,u.r1=s+1.1*d/12,u.s1=s-1.1*d/12,u.r2=s+1.1*d/6,u.s2=s-1.1*d/6,u.r3=s+1.1*d/4,u.s3=s-1.1*d/4,u.r4=s+1.1*d/2,u.s4=s-1.1*d/2;break;default:throw new Error("Unknown kind")}return u.startIndex__t=a,u.endIndex__t=l,u}(u,d,p,_,f,h,l(e,h),this._kindPP);return e.select_sym(0),this._showHistoricalPivots||(c.pivots=[]),c.pivots.push(y),c.pivots.length>this._historicalPivotsToKeep&&c.pivots.shift(),m?this._createResponse():null},e.prototype._createResponse=function(){return 0===this._data.pivots.length?null:{nonseries:!0,type:"non_series_data",data:{data:this._data}}},e.prototype._removeUnusedPivots=function(){var e=this,t=Math.max(this._data.pivots.findIndex((function(t){return t.startIndex__t>e._firstMainSeriesBarTime}))-1,0);t>0&&this._data.pivots.splice(0,t)},e}()}},"i/Bj":function(e,t,i){"use strict";function n(e){if(void 0===e)return null;var t=e.match(/(delayed_streaming)_([\d]{1,4})/);return null===t?null:{mode:t[1],interval:parseInt(t[2])}}i.r(t),i.d(t,"parseUpdateMode",(function(){return n}))},i126:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyColorRotatorFactory",(function(){return u}));var n=i("eJTA"),r=i("Tmoa"),o=i("HGP3"),s=i("3ClC"),a=["color-sky-blue-400","color-banana-yellow-700","color-deep-blue-500","color-grapes-purple-a700","color-iguana-green-500","color-minty-green-a700","color-ripe-red-a200","color-berry-pink-200","color-tv-blue-a100","color-tan-orange-a200","color-sky-blue-a400","color-deep-blue-a100","color-grapes-purple-400","color-iguana-green-a700","color-minty-green-200","color-ripe-red-200","color-berry-pink-a200","color-ripe-red-500","color-grapes-purple-500","color-deep-blue-400","color-tv-blue-a200","color-sky-blue-500","color-iguana-green-400","color-minty-green-400","color-banana-yellow-600","color-tan-orange-500","color-berry-pink-400","color-ripe-red-300","color-grapes-purple-300","color-deep-blue-300","color-tv-blue-300","color-sky-blue-300","color-iguana-green-300","color-minty-green-300","color-banana-yellow-400","color-tan-orange-300","color-berry-pink-300","color-tan-orange-a700"],l=function(){function e(e){this._offset=0,this._offset=e}return e.prototype.getColor=function(e){if(0===this._offset)return e;var t=a[(this._offset-1)%a.length],i=o.colorsPalette[t],s=Object(r.isHexColor)(e)?1:Object(n.parseRgba)(e)[3];return Object(r.generateColor)(i,Object(r.alphaToTransparency)(s))},e}(),c=function(){function e(e,t){this._offset=e,this._modelStartOffset=t}return e.prototype.getColor=function(e){if(Object(r.isHexColor)(e)){ var t=Object(n.parseRgb)(e);return Object(n.rgbToHexString)(Object(n.shiftRgb)(t,this._offset,this._modelStartOffset))}var i=Object(n.parseRgba)(e);return Object(n.rgbaToString)(Object(n.shiftRgba)(i,this._offset,this._modelStartOffset))},e}();var u=function(){function e(e){this._chartModel=e}return e.prototype.getColorRotator=function(e){var t=Object(s.studyColorRotationMode)(e),i=this._calcDefaultColorsOffset(e);switch(t){case"loop":return new l(i);case"shift":var n=this._chartModel.getStudyShiftColorStartOffset();return new c(i,n)}},e.prototype._calcDefaultColorsOffset=function(e){var t=0;return this._chartModel.dataSources().filter(s.isStudy).forEach((function(i){var n,r,o=i.metaInfo().id===e.id,s=(n=i.metaInfo(),r=e,(n.pine?n.pine.version:void 0)===(r.pine?r.pine.version:void 0));o&&s&&t++})),t},e}()},i80N:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Fib Spiral");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("8MBc").FibSpiralPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 2},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Fib Spiral"},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("nBUU").FibSpiralDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolfibspiral",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolFibSpiral=s},iDOr:function(e,t,i){"use strict";(function(e){var n=i("Eyy1").assert,r=i("Y7w9").moveToHead,o=i("704P").ExecutionsPositionController,s=i("Ss5c").LineDataSource,a=i("Qb4w").PriceRange,l=i("7ktv").PriceDataSource,c=i("txPx").getLogger("Chart.Pane"),u=i("CW80").isLineTool,h=i("s1Gx").isSpeciallyZOrderedSource,d=i("1Wlv").PriceScale,p=i("FaJS").scaleRatio,_=i("FaJS").priceRangeByScaleRatio,f=i("FaJS").barSpacingByScaleRatio,m=i("MWAT").createPriceScaleSelectionStrategy,v=i("yfAl").PaneBase,y=i("s1Gx").sortSources;function g(t,i,n){v.call(this,t,i,n),this.m_timeScale=t,this._rightPriceScales=[],this._leftPriceScales=[],this.m_height=0,this.m_width=0,this.m_mainDataSource=null,this._properties=i,this._model=n,this._destroyed=new e,this._priceScaleRatioChanged=new e,this._priceScaleRatioChanged.subscribe(this,this._mainSeriesPaneScaleRatioOnChange),n.properties().priceScaleSelectionStrategyName.listeners().subscribe(null,function(e){this._priceScaleSelectionStrategy=m(e.value()),this._priceScaleSelectionStrategy.apply(this)}.bind(this)),this.m_timeScale.barSpacingChanged().subscribe(this,function(){this.m_mainDataSource===this._model.mainSeries()&&this._recalculatePriceScaleByScaleRatio(this.m_mainDataSource.priceScale())}.bind(this)),this._lockedPriceScale=null,this._currentPriceScaleRatio=null, i.topMargin.listeners().subscribe(this,g.prototype._updateMargins),i.bottomMargin.listeners().subscribe(this,g.prototype._updateMargins),this._updateMargins(),this._isInInsertManyDataSourcesState=!1,this._lastLineDataSourceZOrder=null,this._maximized=!1,this._isMainPane=!1,this._onPriceScalesChanged=new e}inherit(g,v),g.DEFAULT_STRETCH_FACTOR=1e3,g.PANE_ANIMATION_DURATION=500,g.prototype.destroy=function(){this._properties.topMargin.listeners().unsubscribe(this,g.prototype._updateMargins),this._properties.bottomMargin.listeners().unsubscribe(this,g.prototype._updateMargins),this._model.properties().priceScaleSelectionStrategyName.listeners().unsubscribeAll(this),this.m_timeScale.barSpacingChanged().unsubscribeAll(this),this._leftPriceScales.concat(this._rightPriceScales).forEach((function(e){e.modeChanged().unsubscribeAll(this),e.priceRangeChanged().unsubscribeAll(this),e.internalHeightChanged().unsubscribeAll(this)}),this),this._priceScaleRatioChanged.unsubscribeAll(this);for(var e=0;ee.left){var t=r(this._leftPriceScales,this.mainDataSource().priceScale());return t.splice(e.left),t}return this._leftPriceScales}, g.prototype.visibleRightPriceScales=function(){var e=this._model.priceScaleSlotsCount();if(this._rightPriceScales.length>e.right){var t=r(this._rightPriceScales,this.mainDataSource().priceScale());return t.splice(e.right),t}return this._rightPriceScales},g.prototype.timeScale=function(){return this.m_timeScale},g.prototype.dataSources=function(){return this.m_dataSources},g.prototype.isOverlay=function(e){var t=e.priceScale();return"overlay"===this.priceScalePosition(t)},g.prototype._processMainSourceChange=function(){var e;if(null===this.m_mainDataSource)for(var t=0;te)&&(e=n)}}return null===e&&(e=this.getZOrderMinMax().minZOrder-1),this.m_dataSources.forEach((function(t){t.zorder()>e&&t.setZorder(t.zorder()+1)})),e+1},g.prototype.beginInsertManyLineDataSources=function(){this._isInInsertManyDataSourcesState=!0,this._lastLineDataSourceZOrder=null},g.prototype.endInsertManyLineDataSources=function(){this._isInInsertManyDataSourcesState=!1,this._lastLineDataSourceZOrder=null},g.prototype.addDataSource=function(e,t,i){var n;u(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)},g.prototype.insertDataSource=function(e,t,i){t||(t=this.findSuitableScale(e)),this._addSourceToCollections(e);var n=!1;(e===this._model.mainSeries()||null===this.m_mainDataSource)&&(this.m_mainDataSource=e,n=!0),t.addDataSource(e,this._isInInsertManyDataSourcesState),e.setPriceScale(t),e.onTagsChanged&&e.onTagsChanged().subscribe(this,g.prototype.onSourceTagsChanged),e.setZorder(i),n&&this._processMainSourceChange(),this._tagsChanged.fire(),TradingView.isInherited(e.constructor,l)&&this.recalculatePriceScale(t),this._invalidateSourcesCache()},g.prototype.priceScalePosition=function(e){return this._leftPriceScales.includes(e)?"left":this._rightPriceScales.includes(e)?"right":"overlay"},g.prototype.createPriceScaleAtPosition=function(e,t){ var i=this._properties.axisProperties.state();i.autoScale=!0;var n=new d(this._model.properties().scalesProperties,i);return n.setHeight(this.height()),n.setTopMargin(this._defaultTopMargin()),n.setBottomMargin(this._defaultBottomMargin()),this._placePriceScale(n,e,t),n},g.prototype._placePriceScale=function(e,t,i){if("overlay"!==t){var r="left"===t?this._leftPriceScales:this._rightPriceScales,o=void 0===i?r.length:i;r.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()&&(n(null===this._lockedPriceScale),this._lockedPriceScale=e,this._currentPriceScaleRatio=null),this._onPriceScalesChanged.fire()}},g.prototype.removePriceScale=function(e){e.modeChanged().unsubscribeAll(this),e.priceRangeChanged().unsubscribeAll(this),e.internalHeightChanged().unsubscribeAll(this),e===this._lockedPriceScale&&(this._lockedPriceScale=null,this._currentPriceScaleRatio=null);var t=this._leftPriceScales.indexOf(e);-1!==t&&this._leftPriceScales.splice(t,1);var i=this._rightPriceScales.indexOf(e);-1!==i&&this._rightPriceScales.splice(i,1),this._onPriceScalesChanged.fire()},g.prototype.removeDataSource=function(e,t,i){var n=this.m_dataSources.indexOf(e);if(-1!==n){0,this._removeSourceFromCollections(n,i),e!==this.m_mainDataSource||t||(this.m_mainDataSource=null);var r=e.priceScale();if(r&&r.dataSources().indexOf(e)>=0&&r.removeDataSource(e),r&&null===r.mainSource()){var o=r.dataSources().length;0!==o&&c.logError("Invalid priceScale state: empty mainSource but non-empty data sources="+o),this.removePriceScale(r)}e.onTagsChanged&&e.onTagsChanged().unsubscribe(this,g.prototype.onSourceTagsChanged),e instanceof l&&!t&&this._processMainSourceChange(),this._tagsChanged.fire(),r&&e instanceof l&&this.recalculatePriceScale(r),this._invalidateSourcesCache()}else c.logDebug("removeDataSource: invalid data source")},g.prototype.startScalePrice=function(e,t){e.startScale(t)},g.prototype.scalePriceTo=function(e,t){e.scaleTo(t),this.updateAllViews()},g.prototype.endScalePrice=function(e){e.endScale()},g.prototype.startScrollPrice=function(e,t){e.startScroll(t)},g.prototype.scrollPriceTo=function(e,t){e.scrollTo(t),this.updateAllViews()},g.prototype.endScrollPrice=function(e){e.endScroll()},g.prototype.setPriceAutoScale=function(e,t){e.setMode({autoScale:t}),this.timeScale().isEmpty()?e.setPriceRange(null):this.recalculatePriceScale(e)},g.prototype.restorePriceScaleState=function(e,t){e.restoreState(t),this.updateAllViews()},g.prototype._updateCustomSourceAllViews=function(e){e.paneViews(this).length>0&&e.updateAllViews()},g.prototype.updateAllViews=function(){for(var e=0;e0&&!this.timeScale().isEmpty()){var i=this.timeScale().visibleBarsStrictRange();e.recalculatePriceRange(i)}e.updatePaneViews()}},g.prototype.resetPriceScale=function(e){var t=this.timeScale().visibleBarsStrictRange();e.isLockScale()||e.setMode({autoScale:!0}),e.recalculatePriceRange(t),this.updateAllViews()},g.prototype.recalculate=function(){this.recalculatePriceScale(this.m_rightPriceScale),this.recalculatePriceScale(this.m_leftPriceScale);for(var e=0;ei&&(i=r.zorder())}return{minZOrder:t,maxZOrder:i}},g.prototype.isZOrderAvailable=function(e){for(var t=0;t0&&t<0){var s=i[n-1].zorder(),a=e.zorder();i[n-1].setZorder(a),e.setZorder(s)}else if(n0){var l=i[n+1].zorder();a=e.zorder();i[n+1].setZorder(a),e.setZorder(l)}this._invalidateSourcesCache(),this._dataSourcesCollectionChanged.fire()},g.prototype.onSourceTagsChanged=function(){this._tagsChanged.fire()},g.prototype.onDestroyed=function(){return this._destroyed},g.prototype.clearSeries=function(e){for(var t=this.m_dataSources.length-1;t>=0;t--)TradingView.isInherited(this.m_dataSources[t].constructor,TradingView.Series)&&this._removeSourceFromCollections(t,e)},g.prototype.nonOverlayPricesSourcesCount=function(){return this.m_dataSources.filter((function(e){return(!e.properties().linkedToSeries||!e.properties().linkedToSeries.value())&&(TradingView.isInherited(e.constructor,l)&&e.showInObjectTree()&&!this.isOverlay(e))}),this).length},g.prototype.canHaveMoreNoScaleSources=function(){return this.nonOverlayPricesSourcesCount()>1},g.prototype.actionNoScaleIsEnabled=function(e){return!(!this.isOverlay(e)&&TradingView.isInherited(e.constructor,l))||this.canHaveMoreNoScaleSources()},g.prototype.executionsPositionController=function(){return this._executionsPositionController||(this._executionsPositionController=new o(this,this._model.timeScale())),this._executionsPositionController},g.prototype.isLast=function(){var e=this._model.panes();return e[e.length-1]===this},g.prototype.setMaximized=function(e){this._maximized=e},g.prototype.isMaximized=function(){return this._maximized},g.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},g.prototype.properties=function(){return this._properties},g.prototype._mainSourceVisiblePriceRange=function(e){var t=this.m_timeScale.visibleBarsStrictRange();return null!==t?e.mainSource().priceRange(t.firstBar(),t.lastBar()):new a(-.5,.5)},g.prototype.priceScaleRatio=function(){return this._currentPriceScaleRatio},g.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())},g.prototype._mainSeriesPaneScaleRatioOnChange=function(){this.isMainPane()&&this._model.mainSeriesScaleRatioPropertyOnChanged()},g.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},g.prototype._applyOldScaleRatioToTimeScale=function(){if(this._isRecalculatingScales||null===this._currentPriceScaleRatio)return!1;this._isRecalculatingScales=!0,this._setNewBarSpacingByScaleRatio(),this._isRecalculatingScales=!1},g.prototype._tryToApplyNewPriceScaleRatio=function(){var e=p(this.m_timeScale,this._lockedPriceScale);this._currentPriceScaleRatio===e||this._lockedPriceScale.isLog()||(this._priceScaleRatioChanged.fire(this._currentPriceScaleRatio,e),this._currentPriceScaleRatio=e)},g.prototype._recalculatePriceScaleByScaleRatio=function(e){this.isMainPane()&&e===this._lockedPriceScale&&(null!==this._currentPriceScaleRatio?this._applyOldScaleRatioToPriceScale():this._tryToApplyNewPriceScaleRatio())},g.prototype._recalculateTimeScaleByScaleRatio=function(e){e===this._lockedPriceScale&&(null!==this._currentPriceScaleRatio?this._applyOldScaleRatioToTimeScale():this._tryToApplyNewPriceScaleRatio())},g.prototype._setNewPriceRangeByScaleRatio=function(e,t,i,n,r){var o=_(e,this.m_timeScale.barSpacing(),t);e.setPriceRange(null!==o?o:i,n,r)},g.prototype._setMinMaxPriceRange=function(){var e=_(this._lockedPriceScale,this.m_timeScale.maxBarSpacing(),this._currentPriceScaleRatio),t=_(this._lockedPriceScale,this.m_timeScale.minBarSpacing(),this._currentPriceScaleRatio);null!==e&&this._lockedPriceScale.setMaxPriceRange(e),null!==t&&this._lockedPriceScale.setMinPriceRange(t)},g.prototype._onPriceScaleSetMinMaxPriceRange=function(e){e===this._lockedPriceScale&&this._setMinMaxPriceRange()},g.prototype._setNewBarSpacingByScaleRatio=function(){var e=this.m_timeScale.getValidBarSpacing(f(this._lockedPriceScale,this._currentPriceScaleRatio));this.m_timeScale.isValidBarSpacing(e)&&this.m_timeScale.setBarSpacing(e)},g.prototype._onPriceScaleModeChanged=function(e,t,i){if(i.lockScale&&(this._lockedPriceScale!==e&&null!==this._lockedPriceScale&&this._lockedPriceScale.setMode({lockScale:!1}),this._lockedPriceScale=e,this._currentPriceScaleRatio=p(this.m_timeScale,e)),t.lockScale&&!i.lockScale&&(this._lockedPriceScale=null,this._currentPriceScaleRatio=null),t.percentage!==i.percentage||t.indexedTo100!==i.indexedTo100){var n=this.timeScale().visibleBarsStrictRange() ;null!==n&&(e.recalculatePriceRange(n),e.updatePaneViews())}},g.prototype.lineToolsForArea=function(e){var t=this.m_height,i=this.m_width,n=this.logicalRectToPixels(e);return this.m_dataSources.filter((function(e){return u(e)})).filter((function(e){return(e.paneViews()||[]).some((function(e){var r=e.renderer(t,i,!0);return r&&r.doesIntersectWithBox&&r.doesIntersectWithBox(n)}))}))},g.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()},g.prototype.setPriceScaleSelectionStrategy=function(e){this._priceScaleSelectionStrategy=e,e.apply(this)},g.prototype.movePriceScale=function(e,t,i){var n=this.priceScalePosition(e);if(n!==t)this.removePriceScale(e),this._placePriceScale(e,t,i),this._invalidateSourcesCache();else if(void 0!==i&&"overlay"!==n){var r="left"===n?this._leftPriceScales:this._rightPriceScales,o=r.indexOf(e);r.splice(o,1),r.splice(i,0,e)}},g.prototype.onPriceScalesChanged=function(){return this._onPriceScalesChanged},g.prototype.priceScaleIndex=function(e,t){switch(t){case"left":return this.leftPriceScales().indexOf(e);case"right":return this.rightPriceScales().indexOf(e)}},g.prototype.realignLineTools=function(){for(var e=0;e0&&(u=2*Math.PI-u),0===e&&(u+=Math.PI),this._properties.angle.setValue(u)}else{var h=this._startChangeWidth,d=o.subtract(r).length();if(this._origScale*h0)},t.fixComputationError=n,t.alignTo=function(e,t){var i=e/t,r=Math.floor(i),o=i-r;return o>2e-10?n(o>.5?(r+1)*t:r*t):e}},jA0t:function(e,t,i){"use strict";var n=function(){var e={};function t(e){return e.is_price_study}function i(e,t){var i=t.slice(0).toLowerCase();if(e){for(var n=0;nt){if((r=o-1)0&&e-t[n-1]<=r)return r;return 0},r.prototype.is_valid=function(){return!this._invalid},r._offset=function(e,t,i){var n=o(e,i);return-1===n?0:t[n]};var s=function(e){return 0|e},a=function(e){return 60*e*1e3};function l(e){return e%4==0&&(e%100!=0||e%400==0)}var c={0:0,1:31,2:59,3:90,4:120,5:151,6:181,7:212,8:243,9:273,10:304,11:334},u={SUNDAY:1,MONDAY:2,TUESDAY:3,WEDNESDAY:4,THURSDAY:5,FRIDAY:6,SATURDAY:7,JANUARY:0,FEBRUARY:1,MARCH:2,APRIL:3,MAY:4,JUNE:5,JULY:6,AUGUST:7,SEPTEMBER:8,OCTOBER:9,NOVEMBER:10,DECEMBER:11,YEAR:1,MONTH:2,WEEK_OF_YEAR:3,DAY_OF_MONTH:5,DAY_OF_YEAR:6,DAY_OF_WEEK:7,HOUR_OF_DAY:11,MINUTE:12,SECOND:13,minutesPerDay:1440,secondsPerDay:a(1440),get_minutes_from_hhmm:function(e){return-1!==e.indexOf(":")&&(e=e.split(":").join("")),e%100+60*s(e/100)},get_year:function(e){return e.getUTCFullYear()},get_month:function(e){return e.getUTCMonth()},get_hours:function(e){return e.getUTCHours()},get_minutes:function(e){return e.getUTCMinutes()},get_seconds:function(e){return e.getUTCSeconds()},get_day_of_month:function(e){return e.getUTCDate()},get_day_of_week:function(e){return e.getUTCDay()+1},get_day_of_year:function(e){var t=e.getUTCMonth(),i=c[t];return t>u.JANUARY+1&&l(e.getUTCFullYear())&&(i+=1),i+e.getUTCDate()},get_week_of_year:function(e){var t=new Date(Date.UTC(e.getUTCFullYear(),0,1)).getUTCDay(),i=0===t?1:8-t,n=u.get_day_of_year(e)-i;return Math.ceil(n/7)+1},get_minutes_from_midnight:function(e){return 60*u.get_hours(e)+u.get_minutes(e)},set_hms:function(e,t,i,n,r,o){e.setUTCHours(t),e.setUTCMinutes(i),e.setUTCSeconds(n),e.setUTCMilliseconds(r),u.correct_time(e,o)},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=e.offset_utc(t),r=this.clone(t);this.add_date(r,i);var o=e.offset_utc(r);return r.setTime(r.getTime()+n-o),r},add_date:function(e,t){e.setTime(e.getTime()+t*u.secondsPerDay)},add_minutes:function(e,t){e.setTime(e.getTime()+a(t))},clone:function(e){return new Date(e.getTime())},get_days_per_year:function(e){var t=e.getUTCFullYear();return this.days_per_year(t)},days_per_year:function(e){return l(e)?366:365},get_part:function(e,t){switch(t){case u.YEAR:return u.get_year(e);case u.MONTH:return u.get_month(e);case u.DAY_OF_MONTH:return u.get_day_of_month(e);case u.WEEK_OF_YEAR:return u.get_week_of_year(e);case u.DAY_OF_WEEK:return u.get_day_of_week(e);case u.HOUR_OF_DAY:return u.get_hours(e);case u.MINUTE:return u.get_minutes(e);case u.DAY_OF_YEAR:return u.get_day_of_year(e);case u.SECOND:return u.get_seconds(e);default:return e.getTime()}},time_minutes:a,time_seconds:function(e){return 1e3*e},time_minutes_diff:function(e,t){return s((s(e/1e3)-s(t/1e3))/60)},time_seconds_diff:function(e,t){return s(s(e/1e3)-s(t/1e3))},utc_to_cal:function(e,t){var i=e.offset_utc(t);return new Date(t+i)},get_cal:function(e,t,i,n,r,o,s){var a=new Date(Date.UTC(t,i,n,r||0,o||0,s||0)),l=e.offset_utc(+a) ;return new Date(a.valueOf()-l)},get_cal_from_unix_timestamp_ms:function(e,t){return new Date(t+e.offset_utc(t))},get_cal_utc:function(e,t,i){return new Date(Date.UTC(e,t,i))},cal_to_utc:function(e,t){var i=t.getTime();return i-e.offset_loc(i)},get_timezone:function(e){return new r(e)},shift_day:function(e,t){var i=e-1;return(i+=t)>6?i%=7:i<0&&(i=(7+i%7)%7),i+1}};e.exports=u},jFln:function(e,t,i){"use strict";var n=i("Hr11"),r=n.greaterThan,o=n.lessThan,s=window.CanvasEx=i("8Uy/");s.computeDashPattern=function(e){return[[e.lineWidth,2*e.lineWidth],[5*e.lineWidth,6*e.lineWidth],[6*e.lineWidth,6*e.lineWidth],[e.lineWidth,4*e.lineWidth],[2*e.lineWidth,e.lineWidth]][e.lineStyle-1]},s.drawLine=function(e,t,i,n,r){isFinite(t)&&isFinite(n)&&isFinite(i)&&isFinite(r)&&(e.lineStyle!==s.LINESTYLE_SOLID?s.drawDashedLine(e,t,i,n,r):s.drawSolidLine(e,t,i,n,r))},s.drawArrow=function(e,t,i,n,r,o){if(o=void 0===o?2:o,isFinite(t)&&isFinite(n)&&isFinite(i)&&isFinite(r)){var s=Math.round(o/2);e.beginPath(),e.moveTo(n,r),e.lineTo(t,i),e.moveTo(t+o,i+o),e.lineTo(t-o,i+o),e.moveTo(t-s,i+s),e.lineTo(t+s,i+s),e.stroke()}},s.drawSolidLine=function(e,t,i,n,r){e.beginPath(),e.moveTo(t,i),e.lineTo(n,r),e.stroke()},s.setLineStyle=function(e,t){e.lineStyle=t;var i=[];t!==s.LINESTYLE_SOLID&&(i=s.computeDashPattern(e)),s.setLineDash(e,i)},s.setLineDash=function(e,t){"function"==typeof e.setLineDash?e.setLineDash(t):void 0!==e.mozDash?e.mozDash=t:void 0!==e.webkitLineDash&&(e.webkitLineDash=t)},s.drawPoly=function(e,t,i){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var n=0;n0&&(c.thereYet=o,c.cap=Math.max),t-n>0&&(l.thereYet=o,l.cap=Math.max),e.moveTo(t,i);for(var u=t,h=i,d=0,p=!0;!l.thereYet(u,n)||!c.thereYet(h,s);){var _=Math.atan2(s-i,n-t),f=a[d];u=l.cap(n,u+Math.cos(_)*f),h=c.cap(s,h+Math.sin(_)*f),p?e.lineTo(u,h):e.moveTo(u,h), d=(d+1)%a.length,p=!p}},s.setFont=function(e,t){if(e.font!==t)try{e.font=t}catch(i){}},"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.setFont=function(e){s.setFont(this,e)},CanvasRenderingContext2D.prototype.lineStyle=s.LINESTYLE_SOLID),e.exports=s},jJ9X:function(e,t,i){},jRfx:function(e,t,i){"use strict";i.d(t,"c",(function(){return s})),i.d(t,"a",(function(){return a})),i.d(t,"b",(function(){return l}));var n=i("mrSG"),r=i("Eyy1"),o=function(e){function t(t,i,n){var r=e.call(this,t,i,n)||this;return r._restorePane=!1,r}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=this,t=this._chartModel.panes().length,i=this._chartModel.panes()[this._targetPaneIndex()],n=Object(r.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),o=this._chartModel.children(n,!0);o.forEach((function(t){return e._chartModel.detachSource(t)})),this._restorePane=this._chartModel.detachSource(n);var s=i.findSuitableScale(n);if(i.addDataSource(n,s,!1),o.forEach((function(e){return i.addDataSource(e,s,!1)})),n===this._chartModel.mainSeries()){var a=i.priceScalePosition(s);i.movePriceScale(s,a,0)}this._chartModel.fullUpdate(),t!==this._chartModel.panes().length&&this._chartModel.setShouldBeSavedEvenIfHidden(!0)},t.prototype.undo=function(){var e,t=this;e=this._restorePane?this._chartModel.createPane(this._initialPaneIndex):this._chartModel.panes()[this._initialPaneIndex];var i=Object(r.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),n=this._chartModel.children(i,!0);n.forEach((function(e){return t._chartModel.detachSource(e)})),this._chartModel.detachSource(i);var o=e.getPriceScaleById(this._initialPriceScaleId);null===o&&(o=e.createPriceScaleAtPosition(this._initialPriceScalePosition,this._initialPriceScaleIndex)),e.addDataSource(i,o,!0),n.forEach((function(t){return e.addDataSource(t,o,!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 Object(n.__extends)(t,e),t.prototype._targetPaneIndex=function(){return this._initialPaneIndex-1},t}(o),a=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return Object(n.__extends)(t,e),t.prototype._targetPaneIndex=function(){return this._initialPaneIndex+1},t}(o),l=function(e){function t(t,i,n,r){var o=e.call(this,t,i,r)||this;return o._targetPane=n,o}return Object(n.__extends)(t,e),t.prototype._targetPaneIndex=function(){return this._targetPane},t}(o)},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={}))},jeZR:function(e,t,i){"use strict";i.r(t),i.d(t,"AppliedTimeFrame",(function(){return r}));var n=i("QfUd"),r=function(){function e(e){this._appliedTimeFrame=new n.a(null),this._appliedTimeFrameInfo=null,this._model=e,e.mainSeries().dataEvents().messageReceived().subscribe(this,this._onSeriesMessageReceived)}return e.prototype.destroy=function(){ this._model.timeScale().logicalRangeChanged().unsubscribeAll(this),this._model.mainSeries().dataEvents().messageReceived().unsubscribeAll(this)},e.prototype.appliedTimeFrame=function(){return this._appliedTimeFrame},e.prototype._onSeriesMessageReceived=function(e){if("series_timeframe"===e.method){var t=this._model.timeScale();t.logicalRangeChanged().unsubscribe(this,this._invalidateAppliedTimeFrame),(null==e.params[5]||e.params[5])&&(this._appliedTimeFrameInfo={logicalRange:t.logicalRange(),baseIndex:t.baseIndex()},t.logicalRangeChanged().subscribe(this,this._invalidateAppliedTimeFrame))}},e.prototype._invalidateAppliedTimeFrame=function(){if(null!==this._appliedTimeFrameInfo){var e=this._model.timeScale(),t=e.logicalRange(),i=e.baseIndex(),n=this._appliedTimeFrameInfo.logicalRange,r=this._appliedTimeFrameInfo.baseIndex;null!==t&&null!==n&&i-t.left()==r-n.left()&&i-t.right()==r-n.right()||(this._appliedTimeFrame.setValue(null),e.logicalRangeChanged().unsubscribe(this,this._invalidateAppliedTimeFrame))}},e}()},jenN:function(e,t,i){"use strict";i.r(t);var n=i("txPx"),r=i("7Fue"),o=i("xWfy"),s=i("qySK"),a=i("mrSG"),l=function(e){function t(t,i){var n=e.call(this)||this;return n._source=t,n._data=i,n}return Object(a.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){e.visible=!1;var n=this._source.priceScale(),r=this._source.properties().visible.value();if(n&&!n.isEmpty()&&r){var o=this._source.properties().graphics[this._data.lineType][this._data.styleId];if(o.visible&&o.visible.value()&&o.showPrice&&o.showPrice.value()){var s=this._source.firstValue();if(null!==s){var a=this._data.line.level,l=o.color.value();i.background=l,i.color=this.generateTextColor(l),i.coordinate=n.priceToCoordinate(a,s),e.text=n.formatPrice(a,s),e.visible=!0}}}},t}(i("KcY8").a);i.d(t,"createGraphicsPaneViews",(function(){return u})),i.d(t,"createGraphicsPriceAxisViews",(function(){return d})),i.d(t,"isStudyGraphicsEmpty",(function(){return r.a})),i.d(t,"StaticStudyGraphics",(function(){return o.a})),i.d(t,"emptyStudyGraphics",(function(){return o.b})),i.d(t,"loadStudyGraphics",(function(){return o.c})),i.d(t,"saveStudyGraphics",(function(){return o.d})),i.d(t,"LiveStudyGraphics",(function(){return s.a}));var c=Object(n.getLogger)("Chart.StudyGraphics");function u(e,t,n){return new Promise((function(r){i.e("study-pane-views").then(function(o){var s=Object.keys(e.graphicsInfo());s.sort((function(e,t){return h(e)-h(t)})),r(s.map((function(r){var o=i("psYU").VertLinePaneView,s={backgrounds:null,hhists:null,horizlines:i("1sos").HorizLinePaneView,hlines:null,lines:null,polygons:null,shapemarks:null,textmarks:null,trendchannels:null,vertlines:o,dwglabels:null,dwglines:null}[r];return null===s?(c.logWarn(r+" is not supported by this build of graphics subsystem, skipping"),null):new s(e,t,n)})).filter((function(e){return null!==e})))}.bind(null,i)).catch(void 0)}))}function h(e){switch(e){case"polygons":return-100;case"trendchannels":return-90;default:return 0}}function d(e){for(var t=Object.keys(e.graphicsInfo()),i=[],n=function(t){ switch(t){case"hlines":e.graphics().hlines().forEach((function(n,r){n.forEach((function(n){void 0!==n.level&&i.push(new l(e,{line:{level:n.level},styleId:r,lineType:t}))}))}));break;case"horizlines":e.graphics().horizlines().forEach((function(n,r){n.forEach((function(n){void 0!==n.level&&i.push(new l(e,{line:{level:n.level},styleId:r,lineType:t}))}))}))}},r=0,o=t;r0&&t.setValue(a.family),i.setValue(a.size),n.setValue(a.bold),s.setValue(a.italic)):o.logError("Invalid font: "+e)},fontHeight:function(e){if(!this._fontHeightCache[e]){var t=document.createElement("span");t.appendChild(document.createTextNode("height")),document.body.appendChild(t),t.style.cssText="font: "+e+"; white-space: nowrap; display: inline;";var i=t.offsetHeight;document.body.removeChild(t),this._fontHeightCache[e]=Math.ceil(i)}return this._fontHeightCache[e]},drawPolyHoverOrPress:function(e,t,i,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=1/e.mainSource().base();return i*Math.round(t/i)}};e.exports=s},jofe:function(e,t,i){"use strict";function n(){var e,t;return{promise:new Promise((function(i,n){e=i,t=n})),reject:t,resolve:e}}i.r(t),i.d(t,"createDeferredPromise",(function(){return n}))},jpZi:function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var n=i("mrSG"),r=i("Eyy1"),o=(i("YFKU"),i("HbRj"),i("RDU5")),s=window.t("Exclude line tools from group {group}"),a=function(e){function t(t,i,n){var r=e.call(this,s.format({group:i.name()}))||this;return r._model=t,r._groupId=i.id,r._groupName=i.name(),r._lineToolsIds=n.map((function(e){return e.id()})),r}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=this,t=Object(r.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId)),i=this._lineToolsIds.map((function(t){return e._model.dataSourceForId(t)})) ;t.excludeLineTools(i),0===t.lineTools().length&&this._model.lineToolsGroupModel().removeGroup(t)},t.prototype.undo=function(){var e=this,t=this._lineToolsIds.map((function(t){return e._model.dataSourceForId(t)})),i=this._model.lineToolsGroupModel().groupForId(this._groupId);null!==i?i.addLineTools(t):this._model.lineToolsGroupModel().createGroup(t,this._groupName,this._groupId)},t}(o.UndoCommand)},jy4L:function(e,t,i){"use strict";i.r(t),i.d(t,"makeNextSymbolId",(function(){return r})),i.d(t,"makeNextStudyId",(function(){return s}));var n=0;function r(){return"ss_"+ ++n}var o=0;function s(){return"st"+ ++o}},k4w6:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t){var i=e.call(this)||this;return i._series=t,i._model=t.model(),i}return Object(n.__extends)(t,e),t}(i("2ijp").a)},"k9/m":function(e,t,i){"use strict";i.r(t),i.d(t,"PlotRowSearchMode",(function(){return n})),i.d(t,"PlotList",(function(){return c})),i.d(t,"mergeMinMax",(function(){return u})),i.d(t,"mergePlotRows",(function(){return h}));var n,r=i("Eyy1"),o=i("Y7w9"),s=i("tqok"),a=i("txPx"),l=Object(a.getLogger)("Chart.PlotList");!function(e){e[e.NearestLeft=-1]="NearestLeft",e[e.Exact=0]="Exact",e[e.NearestRight=1]="NearestRight"}(n||(n={}));var c=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this._items=[],this._start=0,this._end=0,this._shareRead=!1,this._minMaxCache=new Map,this._rowSearchCache=new Map,this._rowSearchCacheWithoutEmptyValues=new Map,this._plotFunctions=e||new Map,this._emptyValuePredicate=t}return e.prototype.clear=function(){this._items=[],this._start=0,this._end=0,this._shareRead=!1,this._minMaxCache.clear(),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear()},e.prototype.first=function(){return this.size()>0?this._items[this._start]:null},e.prototype.last=function(){return this.size()>0?this._items[this._end-1]:null},e.prototype.firstIndex=function(){return this.size()>0?this._indexAt(this._start):null},e.prototype.lastIndex=function(){return this.size()>0?this._indexAt(this._end-1):null},e.prototype.size=function(){return this._end-this._start},e.prototype.isEmpty=function(){return 0===this.size()},e.prototype.contains=function(e){return null!==this._search(e,n.Exact)},e.prototype.valueAt=function(e){var t=this.search(e);return null!==t?t.value:null},e.prototype.add=function(e,t){if(this._shareRead)return l.logDebug("add: readonly collection modification attempt"),!1;var i={index:e,value:t},r=this._search(e,n.Exact);return this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear(),null===r?(this._items.splice(this._lowerbound(e),0,i),this._start=0,this._end=this._items.length,!0):(this._items[r]=i,!1)},e.prototype.search=function(e,t,i){void 0===t&&(t=n.Exact);var r=void 0!==i?this._rowSearchCacheWithoutEmptyValues:this._rowSearchCache,o=void 0!==i?1e4*(t+1)+i:t,s=r.get(e);if(void 0!==s){var a=s.get(o);if(void 0!==a)return a}var l=this._search(e,t,i);if(null===l)return null;var c={index:this._indexAt(l), value:this._valueAt(l)};return void 0===s&&(s=new Map,r.set(e,s)),s.set(o,c),c},e.prototype.fold=function(e,t){for(var i=t,n=this._start;n=i;--n){var r=this._indexAt(n),o=this._valueAt(n);if(e(r,o))return{index:r,value:o}}return null},e.prototype.each=function(e){for(var t=this._start;tthis._items[this._items.length-1].index?this._append(e):1===e.length&&e[0].index===this._items[this._items.length-1].index?(this._updateLast(e[0]),e[0]):this._merge(e)},e.prototype.addTail=function(e,t){void 0===t&&(t=!1);var i=0;t&&this._end-this._start>0&&(i=1,this._items[this._end-this._start-1].value=e[0].value);for(var 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 r=this._bsearch(e);if(null===r&&t!==n.Exact)switch(t){case n.NearestLeft:return this._searchNearestLeft(e,i);case n.NearestRight:return this._searchNearestRight(e,i);default:throw new TypeError("Unknown search mode")}if(void 0===i||null===r||t===n.Exact)return r;switch(t){case n.NearestLeft:return this._nonEmptyNearestLeft(r,i);case n.NearestRight:return this._nonEmptyNearestRight(r,i);default:throw new TypeError("Unknown search mode")}},e.prototype._nonEmptyNearestRight=function(e,t){for(var i=Object(r.ensure)(this._emptyValuePredicate),n=Object(r.ensure)(t);e=this._start&&i(this._valueAt(e),n);)e-=1;return ethis._start&&(i-=1);var n=i!==this._end&&this._indexAt(i)e}),this._start,this._end)},e.prototype._plotMinMax=function(e,t,i){var n=null,r=this._plotFunctions.get(i);if(void 0===r)throw new Error('Plot "'+i+'" is not registered');for(var o=e;on.max&&(n.max=s)))}return n},e.prototype._invalidateCacheForRow=function(e){var t=Math.floor(e.index/30);this._minMaxCache.forEach((function(e){return e.delete(t)}))},e.prototype._prepend=function(e){return Object(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=h(this._items,e),this._start=0,this._end=this._items.length,e[0]},e.prototype._minMaxOnRangeCachedImpl=function(e,t,i){if(this.isEmpty())return null;var n=null,o=Object(r.ensureNotNull)(this.firstIndex()),s=Object(r.ensureNotNull)(this.lastIndex()),a=Math.max(e,o),l=Math.min(t,s),c=30*Math.ceil(a/30),h=Math.max(c,30*Math.floor(l/30));n=u(n,this._minMaxOnRange(a,Math.min(c,t,l),i));var d=this._minMaxCache.get(i);void 0===d&&(d=new Map,this._minMaxCache.set(i,d));for(var p=Math.max(c+1,a);pt[s].index?s++:(o++,s++,r--);return r}(e,t),n=new Array(i),r=0,o=0,s=e.length,a=t.length,l=0;rt[o].index?(n[l]=t[o],o++):(n[l]=t[o],r++,o++),l++;for(;r16)throw new TypeError("invalid length");if(0===t)return e.toString();return("0000000000000000"+e.toString()).slice(-t)}function h(e){return"hasForexAdditionalPrecision"in e}var d=function(){function e(e,t,i,o){if(this.type="price",this._formatterErrors={custom:Object(n.t)("Price format is invalid."),fraction:Object(n.t)("Fraction part is invalid."),secondFraction:Object(n.t)("Second fraction part is invalid.")},t||(t=1),Object(r.isNumber)(e)&&Object(r.isInteger)(e)||(e=100),e<0)throw new TypeError("invalid base");this._priceScale=e,this._minMove=t,this._minMove2=o,i&&void 0!==o&&o>0&&2!==o&&4!==o&&8!==o?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,r){void 0===n&&(n=!0),void 0===r&&(r=!0);var s,a="";return e<0?(a=!1===n?"":"−",e=-e):e&&!0===t&&(a="+"),s=this._fractional?a+this._formatAsFractional(e,i):a+this._formatAsDecimal(e,i),r?Object(o.forceLTRStr)(s):s},e.prototype.parse=function(e){return e=(e=Object(o.stripLTRMarks)(e)).replace("−","-"),this._fractional?this._minMove2?this._parseAsDoubleFractional(e):this._parseAsSingleFractional(e):this._parseAsDecimal(e)},e.prototype.hasForexAdditionalPrecision=function(){return!this._fractional&&10===this._minMove2},e.serialize=function(e){return e.state()},e.deserialize=function(t){ return new e(t.priceScale,t.minMove,t.fractional,t.minMove2)},e.prototype._formatAsDecimal=function(e,t){var i;t=t||0;var n,r=1/(i=this._fractional?Math.pow(10,this._fractionalLength||0):Math.pow(10,t)*this._priceScale/this._minMove);if(i>1)n=Math.floor(e);else{var o=Math.floor(Math.round(e/r)*r);n=0===Math.round((e-o)/r)?o:o+r}var s="";if(i>1){var a=+(Math.round(e*i)-n*i).toFixed(this._fractionalLength);a>=i&&(a-=i,n+=1);var l=void 0!==this._fractionalLength?this._fractionalLength:NaN;s=c.decimalSign+u(+a.toFixed(this._fractionalLength)*this._minMove,l+t),s=this._removeEndingZeros(s,t)}return n.toString()+s},e.prototype._getFractPart=function(e,t){var i=[0,5],n=[0,2,5,7];return 2===t?void 0===i[e]?-1:i[e]:4===t?void 0===n[e]?-1:n[e]:e},e.prototype._formatAsFractional=function(e,t){var i=this._priceScale/this._minMove,n=Math.floor(e),r=t?Math.floor(e*i)-n*i:Math.round(e*i)-n*i;r===i&&(r=0,n+=1);var o="";if(t){var s=(e-n-r/i)*i;o=u(s=Math.round(s*Math.pow(10,t)),t),o=this._removeEndingZeros(o,t)}if(!this._fractionalLength)throw new Error("_fractionalLength is not calculated");var a="";if(this._minMove2){var l=r%this._minMove2,h=u(r=(r-l)/this._minMove2,this._fractionalLength),d=this._getFractPart(l,this._minMove2);a=h+c.decimalSignFractional+d}else a=u((r=this._getFractPart(r,this._priceScale))*this._minMove,this._fractionalLength);return n.toString()+c.decimalSignFractional+a+o},e.prototype._removeEndingZeros=function(e,t){for(var i=0;i=r||o<0)return{error:this._formatterErrors.fraction,res:!1};var s=n+o/r;return i&&(s=-s),{value:s,res:!0,suggest:this.format(s)}}return{error:this._formatterErrors.custom,res:!1}},e.prototype._parseAsDoubleFractional=function(e){var t=new RegExp(/^(-?)[0-9]+$/).exec(e);if(t)return{value:u=parseFloat(e),res:!0,suggest:this.format(u)};if(t=new RegExp("^(-?)([0-9]+)\\"+c.decimalSignFractional+"([0-9]+)\\"+c.decimalSignFractional+"([0-9]+)$").exec(e)){var i=!!t[1],n=parseInt(t[2]),r=void 0!==this._minMove2?this._minMove2:NaN,o=this._priceScale/r,s=this._minMove2,a=this._patchFractPart(parseInt(t[3]),o),l=this._patchFractPart(parseInt(t[4]),s);if(a>=o||a<0)return{error:this._formatterErrors.fraction,res:!1} ;if(void 0!==s&&l>=s||l<0)return{error:this._formatterErrors.secondFraction,res:!1};var u=void 0!==s?n+a/o+l/(o*s):NaN;return i&&(u=-u),{value:u,res:!0,suggest:this.format(u)}}return{error:this._formatterErrors.custom,res:!1}},e}()},l4sv:function(e,t,i){"use strict";i.r(t),i.d(t,"HorizontalLineRenderer",(function(){return s}));var n=i("VdBB"),r=i("jFln"),o=i("gAom"),s=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.hitTest=function(e){if(null===this._data||!1===this._data.visible)return null;var t=Math.abs(e.y-this._data.y)<=3+this._data.linewidth/2,i=void 0===this._data.left||this._data.left-e.x<=3,n=void 0===this._data.right||e.x-this._data.right<=3;return t&&i&&n?this._hitTest:null},e.prototype.draw=function(e,t){if(null!==this._data&&!1!==this._data.visible&&!(this._data.y<-this._data.linewidth/2||this._data.y>t.cssHeight+this._data.linewidth/2)){var i=t.pixelRatio;e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=Math.max(1,Math.floor(this._data.linewidth*i)),void 0!==this._data.linestyle&&Object(r.setLineStyle)(e,this._data.linestyle);var n=void 0!==this._data.left?Math.max(this._data.left,0):0,s=void 0!==this._data.right?Math.min(this._data.right,t.cssWidth):t.cssWidth,a=Math.round(this._data.y*i),l=Math.floor(n*i),c=Math.ceil(s*i);Object(o.drawHorizontalLine)(e,a,l,c)}},e}()},l7mP:function(e,t,i){"use strict";function n(e,t,n){void 0===t&&(t={}),Promise.all([i.e("react"),i.e(3),i.e(23),i.e(37),i.e(41),i.e(61),i.e(80),i.e(51),i.e("take-chart-image-dialog-impl")]).then(function(r){i("fMMV").getImageOfChart(e,t,n)}.bind(null,i)).catch(void 0)}function r(e,t,n){void 0===t&&(t={}),Promise.all([i.e("react"),i.e(3),i.e(23),i.e(37),i.e(41),i.e(61),i.e(80),i.e(51),i.e("take-chart-image-dialog-impl")]).then(function(r){i("fMMV").getImageOfChartSilently(e,t,n)}.bind(null,i)).catch(void 0)}i.r(t),i.d(t,"getImageOfChart",(function(){return n})),i.d(t,"getImageOfChartSilently",(function(){return r}))},lA7n:function(e,t,i){"use strict";i.r(t);var n=i("Kxc7"),r=i("mrSG"),o=function(e){function t(t,i){return e.call(this,t,i,"FAVORITE_CHARTS_CHANGED","loadChartDialog.favorites",{})||this}return Object(r.__extends)(t,e),t}(i("ulZB").b),s=i("zUrt"),a=i("FBuY"),l=i("Vdly"),c=i("/z0S");i.d(t,"LoadChartService",(function(){return u}));var u=function(){function e(e){var t=this;void 0===e&&(e=null),this._favoriteChartsService=new o(a.TVXWindowEvents,l),this._chartWidgetCollection=null,this._promise=null,this._getChartEntry=function(e){return{id:e.id,url:e.url,title:e.name,symbol:e.short_symbol,interval:e.interval,toolsCount:0,modified:e.modified_iso,active:function(){return t._isActiveChart(e.id)},openAction:function(){return s.backend.loadChart(e)},deleteAction:function(){return new Promise((function(i){s.backend.removeChart(e.image_url,(function(){t._deleteChart(e.id),i()}))}))},favoriteAction:t._updateFavorites}},this._updateFavorites=function(e){ return t._favoriteChartsService.set(e)},this._isActiveChart=function(e){return null!==t._chartWidgetCollection&&e===t._chartWidgetCollection.metaInfo.id.value()},this._deleteChart=function(e){t._isActiveChart(e)&&(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(c.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){s.backend.getCharts((function(t){e(t)}))}))).then((function(t){return t.map(e._getChartEntry)})).then((function(t){var n=e._promise=Promise.all([i.e("react"),i.e(1),i.e(3),i.e(4),i.e(6),i.e(7),i.e(8),i.e(9),i.e(10),i.e(27),i.e(33),i.e(65),i.e(73),i.e(0),i.e(2),i.e(5),i.e(34),i.e("load-chart-dialog")]).then(i.bind(null,"AMW5")).then((function(i){e._promise===n&&i.showLoadChartDialog(t,e._favoriteChartsService,e._chartWidgetCollection)}))}))},e}()},lCO3:function(e,t,i){"use strict";i.r(t),i.d(t,"Version",(function(){return r}));var n=i("Eyy1"),r=function(){function e(e,t){this._major=e,this._minor=t}return e.prototype.major=function(){return this._major},e.prototype.minor=function(){return this._minor},e.prototype.isZero=function(){return 0===this._major&&0===this._minor},e.prototype.toString=function(){return this._major+"."+this._minor},e.prototype.compareTo=function(e){return this._majore._major?1:this._minore._minor?1:0},e.prototype.isLess=function(e){return this.compareTo(e)<0},e.prototype.isLessOrEqual=function(e){return this.compareTo(e)<=0},e.prototype.isEqual=function(e){return 0===this.compareTo(e)},e.prototype.isGreater=function(e){return this.compareTo(e)>0},e.prototype.isGreaterOrEqual=function(e){return this.compareTo(e)>=0},e.parse=function(t){if(t instanceof e)return new e(t.major(),t.minor());if("number"==typeof t)return Object(n.assert)(Math.floor(t)===t,"Version should not be a float number"),new e(t,0);if("string"==typeof t){var i=t.split(".");if(1===i.length){var r=parseInt(i[0],10);return Object(n.assert)(!isNaN(r),"Bad version string: "+t),new e(r,0)}if(2===i.length){r=parseInt(i[0],10);Object(n.assert)(!isNaN(r),"Bad version string: "+t);var o=parseInt(i[1],10);return Object(n.assert)(!isNaN(o),"Bad version string: "+t),new e(r,o)}throw new Error("Bad version string (one dot expected): "+t)}throw new Error("Bad version: "+t)},e.ZERO=new e(0,0),e}()},lJvs:function(e,t,i){"use strict";var n=i("aO4+").Point,r=i("vAx0").ESDPaneView,o=i("fTGZ").BarsMarksContainer,s=i("mMWL"),a=i("FQhm"),l=i("6xeX").Tooltip,c=i("zDbI").CHART_FONT_FAMILY;function u(e){o.call(this,e),this.toolname="UserDefinedTimescaleMarks";var t=this;s.hideMarksOnBars().subscribe(this,(function(){t._properties.visible.setValue(!s.hideMarksOnBars().value())})),this._paneView=new h(e,this), this._requestedPointsets=new Set}function h(e,t){r.call(this,e,t,void 0,void 0),this.source=t,this.stylesCache={},this.templatesCache={},this._lollipops={},this._createLollipops()}inherit(u,o),u.prototype._initialize=function(e){this._properties.visible.setValue(!0)},u.prototype.userEditEnabled=function(){return!1},u.prototype._plateViewData=function(e){return{text:e.text}},u.prototype.onClicked=function(e){a.emit("onTimescaleMarkClick",e.id)},u.prototype.clearMarks=function(){var e=this._model.chartApi();if(e.connected()){var t=this;Object.keys(this._marks).forEach((function(i){var n=t._getPointsetId(i);e.removePointset(n)}))}this._requestedPointsets.clear(),o.prototype.clearMarks.call(this),this._paneView.clearCaches(),this.onNeedRepaint.fire()},u.prototype._getData=function(e){var t=this._model.mainSeries().symbolInfo();if(t){var i=this.roundRange(this._rangeDifference(e)),n=this,r=this._model.mainSeries(),o=r.symbolId(),s=r.properties().interval.value();ChartApiInstance.getTimescaleMarks(t,i.start,i.end,(function(t){var i=n._model.chartApi();t.forEach((function(e){e.index=null;var t=e.id,r=n._getPointsetId(t),a=n._marks[t];if(a&&null!==a.index&&(a.tickmark===e.tickmark?e.index=a.index:n._requestedPointsets.has(r)&&i.connected()&&(i.removePointset(r),n._requestedPointsets.delete(r))),n._marks[t]=e,null===e.index&&i.connected()){n._requestedPointsets.add(r);var l=[[e.tickmark,0]];i.createPointset(r,"turnaround",o,s,l,(function(e){n._onPointsetData(e)}))}}),n),n._loadedRange=n._rangeUnion(e,n._loadedRange),n.onNeedRepaint.fire()}),s)}},u.prototype._getPointsetId=function(e){return"pointsetMark_"+e},u.prototype._onPointsetData=function(e){var t=e.params.customId.split("_")[1],i=this._marks[t],n=e.params.plots;i&&1===n.length&&(i.index=n[0].value[0])},u.prototype.updatePlateData=function(e,t){return t.barWidth=this.barWidth(),t.text=e.text,t.tooltipMargin=-1*Math.max(e.minSize/2,.4*this.barWidth()),t},u.prototype.hasContextMenu=function(){return!1},u.prototype.paneViews=function(){return this._properties.visible.value()?[this._paneView]:[]},u.prototype.onClickOutside=function(){this._paneView.onClickOutside()},inherit(h,r),h.prototype._createLollipops=function(){var e=this.source._model.timeScale(),t=r.prototype._getY.call(this.source),i=this.source._model.lastHittestData(),o=this;Object.keys(this.source._marks).forEach((function(r){var s=this.source._marks[r],a=s.id,c=s.index;null!==c&&(o._lollipops[a]={id:a,basePoint:new n(e.indexToCoordinate(c)+1,t),hovered:i&&i.id===a||a===o.getLastClickedLollipopId(),barY:null,label:s.label,color:s.color,items:s.tooltip,tooltip:o._lollipops.hasOwnProperty(a)?o._lollipops[a].tooltip:new l,visible:!0})}),this)},h.prototype.clearCaches=function(){this.closeTooltips(),this.clearLastClicked(),this._lollipops={}},h.prototype.update=function(){this._createLollipops(),this._invalidated=!1},h.prototype.renderer=function(){return this.update(),r.prototype.renderer.call(this)},h.prototype._generateTemplateStyle=function(e,t,i){var n=e+t+i;if(!(n in this.stylesCache)){var r="default"!==e,o={ strokeStyle:t,lineWidth:1,fillStyle:"white",barLine:{lineStyle:CanvasEx.LINESTYLE_DASHED},lollipop:{width:32,height:96,circleHeight:16,radius:12,lineWidth:1.5,fillStyle:r?t:"white",fillCircle:r,strokeStyle:"#E2745B",text:{label:i,strokeStyle:r?"white":t,font:"normal 12px "+c}}};this.stylesCache[n]=o}return this.stylesCache[n]},h.prototype.getTemplate=function(e,t){var i=e+t.color+t.label;return i in this.templatesCache||(this.templatesCache[i]=this.createTemplate(this._generateTemplateStyle(e,t.color,t.label))),this.templatesCache[i]},h.prototype.getStyle=function(e,t){return this._generateTemplateStyle(e,t.color,t.label)},h.prototype.createText=function(e,t){"string"==typeof e.items?t.addTextLine(e.items):Array.isArray(e.items)&&e.items.forEach((function(e){t.addTextLine(e)}))},h.prototype.hasTooltip=function(e){return!!e.tooltip&&e.tooltip.length},e.exports=u},"lNN+":function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Triangle Pattern");function s(e,t){this._constructor="LineToolTrianglePattern";var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("Jej9").LineToolTrianglePatternPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 4},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Triangle Pattern"},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("EFc4").Points5PatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetooltrianglepattern",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolTrianglePattern=s},lReN:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolsGroupControllerApi",(function(){return s}));var n=i("s1Gx"),r=i("Eyy1"),o=i("CW80"),s=function(){function e(e,t){this._controller=e,this._model=t}return e.prototype.createGroupFromSelection=function(){return this._controller.createGroupFromSelection().id},e.prototype.removeGroup=function(e){var t=Object(r.ensureDefined)(this._groupById(e));this._controller.removeGroup(t)},e.prototype.groups=function(){return this._controller.groups().map((function(e){return e.id}))},e.prototype.shapesInGroup=function(e){var t=Object(r.ensureDefined)(this._groupById(e));return Object(n.sortSources)(t.lineTools()).map((function(e){return e.id()}))},e.prototype.excludeShapeFromGroup=function(e,t){var i=Object(r.ensureDefined)(this._groupById(e)),n=Object(r.ensureNotNull)(this._model.dataSourceForId(t));Object(r.assert)(Object(o.isLineTool)(n),"Passed shapeId is not a line tool"),this._controller.excludeLineToolFromGroup(i,n)},e.prototype.availableZOrderOperations=function(e){var t=Object(r.ensureDefined)(this._groupById(e));return this._controller.availableZOrderOperations(t)},e.prototype.bringToFront=function(e){ var t=Object(r.ensureDefined)(this._groupById(e));this._controller.bringToFront(t)},e.prototype.bringForward=function(e){var t=Object(r.ensureDefined)(this._groupById(e));this._controller.bringForward(t)},e.prototype.sendBackward=function(e){var t=Object(r.ensureDefined)(this._groupById(e));this._controller.sendBackward(t)},e.prototype.sendToBack=function(e){var t=Object(r.ensureDefined)(this._groupById(e));this._controller.sendToBack(t)},e.prototype.insertAfter=function(e,t){var i=Object(r.ensureDefined)(this._groupById(e)),n=Object(r.ensureNotNull)(this._groupById(t)||this._model.dataSourceForId(t));this._controller.insertAfter(i,n)},e.prototype.insertBefore=function(e,t){var i=Object(r.ensureDefined)(this._groupById(e)),n=Object(r.ensureNotNull)(this._groupById(t)||this._model.dataSourceForId(t));this._controller.insertBefore(i,n)},e.prototype.groupVisibility=function(e){return Object(r.ensureDefined)(this._groupById(e)).visibility()},e.prototype.setGroupVisibility=function(e,t){var i=Object(r.ensureDefined)(this._groupById(e));this._controller.setGroupVisibility(i,t)},e.prototype.groupLock=function(e){return Object(r.ensureDefined)(this._groupById(e)).locked()},e.prototype.setGroupLock=function(e,t){var i=Object(r.ensureDefined)(this._groupById(e));this._controller.setGroupLock(i,t)},e.prototype.getGroupName=function(e){return Object(r.ensureDefined)(this._groupById(e)).name()},e.prototype.setGroupName=function(e,t){var i=Object(r.ensureDefined)(this._groupById(e));this._controller.setGroupName(i,t)},e.prototype.canBeGroupped=function(e){var t=this,i=e.map((function(e){return Object(r.ensureNotNull)(t._model.dataSourceForId(e))}));return!i.some((function(e){return!Object(o.isLineTool)(e)}))&&this._controller.canBeGroupped(i)},e.prototype._groupById=function(e){return this._controller.groups().find((function(t){return t.id===e}))},e}()},lTLF:function(e,t,i){"use strict";i.r(t);var n=i("Hr11"),r=function(){function e(e,t){if(this._base=e,this._integralDividers=t,Object(n.isBaseDecimal)(this._base))this._fractionalDividers=[2,2.5,2];else{this._fractionalDividers=[];for(var i=this._base;1!==i;){if(i%2==0)this._fractionalDividers.push(2),i/=2;else{if(i%5!=0)throw new Error("unexpected base");this._fractionalDividers.push(2),this._fractionalDividers.push(2.5),i/=5}if(this._fractionalDividers.length>100)throw new Error("something wrong with base")}}}return e.prototype.tickSpan=function(e,t,i){for(var r=0===this._base?0:1/this._base,o=Math.pow(10,Math.max(0,Math.ceil(Object(n.log10)(e-t)))),s=0,a=this._integralDividers[0];;){var l=Object(n.greaterOrEqual)(o,r,1e-9)&&o>r+1e-9,c=Object(n.greaterOrEqual)(o,i*a,1e-9),u=Object(n.greaterOrEqual)(o,1,1e-9);if(!(l&&c&&u))break;o/=a,a=this._integralDividers[++s%this._integralDividers.length]}if(o<=r+1e-9&&(o=r),o=Math.max(1,o),this._fractionalDividers.length>0&&Object(n.equal)(o,1,1e-9))for(s=0,a=this._fractionalDividers[0];Object(n.greaterOrEqual)(o,i*a,1e-9)&&o>r+1e-9;)o/=a,a=this._fractionalDividers[++s%this._fractionalDividers.length];return o},e}() ;i.d(t,"PriceTickMarkBuilder",(function(){return o}));var o=function(){function e(e,t,i,n){this._marks=[],this._priceScale=e,this._base=t,this._coordinateToLogicalFunc=i,this._logicalToCoordinateFunc=n}return e.prototype.base=function(){return this._base},e.prototype.setBase=function(e){if(e<0)throw new Error("base < 0");this._base=e},e.prototype.tickSpan=function(e,t,i){if(void 0===i&&(i=0),ei&&(c=u);var h=a.tickSpan(e,t,o);h>i&&(c=Math.min(c,h));var d=l.tickSpan(e,t,o);return d>i&&(c=Math.min(c,d)),c>0?c:e-t},e.prototype.rebuildTickMarks=function(){var e=this._priceScale;if(this._marks=[],!e.isEmpty()){var t=e.mainSource();if(null!==t){var i=t.firstValue();null===i&&(i=0);var n=e.height(),r=this._coordinateToLogicalFunc(n-1,i),o=this._coordinateToLogicalFunc(0,i),s=Math.max(r,o),a=Math.min(r,o);if(s!==a){var l=this.tickSpan(s,a),c=s%l;c+=c<0?l:0;for(var u=s>=a?1:-1,h=null,d=e.formatter(),p=NaN,_=s-c;_>a;_-=l){_===p&&(l=this.tickSpan(s,a,l)),p=_;var f=this._logicalToCoordinateFunc(_,i);null!==h&&Math.abs(f-h)=3600&&(s=f(Math.floor(o/3600))),o%=3600;var a=f(Math.floor(o/60));o%=60;var l=f(Math.floor(o));return null!==s?s+":"+a+":"+l:a+":"+l}, t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var n=this._source.properties();if(12!==n.style.value()){if(this._options.visibleOnHistoryOnly){var r=this._model.timeScale().visibleBarsStrictRange(),o=this._source.data().last();if(null===r||null===o||r.contains(o.index))return}var s=this._model.properties().scalesProperties,a=s.showSeriesLastValue.value(),l=m&&this._options.showCountdown&&-1!==v.indexOf(n.style.value())&&n.showCountdown.value(),c=this._options.showSymbolLabel&&s.showSymbolLabels.value(),u=s.seriesLastValueMode.value()===_.PriceAxisLastValueMode.LastPriceAndPercentageValue,h=this._source.lastValueData(void 0,this._options.alwaysShowGlobalLast);if(!h.noData){var d=8===n.style.value();if((a||l||c)&&d&&n.haStyle.showRealLastPrice.value()){var p=this._source.lastValueData(void 0,!1),f=this._source.lastValueData(void 0,!0);p.noData||f.noData||p.index!==f.index||(a=!1,l=!1,c=!1)}if(a||l){var y=this._axisFirstLineText(h,a,u),g=l?this._countdownText():"";this._previousCountdown=g,0===y.length?(e.text=g,e.secondLine=""):(e.text=y,e.secondLine=g),0===y.length&&0===g.length||(e.visible=!0)}(c||u)&&(t.text=this._paneText(h,a,c,u),t.visible=t.text.length>0),i.background=this._source.priceLineColor(h.color),i.color=this.generateTextColor(i.background),i.coordinate=h.coordinate,i.floatCoordinate=h.floatCoordinate}}},t.prototype._paneText=function(e,t,i,n){var r="";if(y){var o=this._source.symbolInfo();r+=o?o.exchange+" ":""}else if(i){var s=this._source.getSymbolName();s.length>40&&(s=s.substr(0,37)+"..."),r+=s+" "}return 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.prototype._currentTime=function(){return Date.now()+1e3*this._source.serverTimeOffset()},t}(d.a),S=i("TmNs"),w=i("k9/m"),P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype.lastPrice=function(){return this._getSource().data().lastProjectionPrice},t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var n=this._getModel(),r=this._getSource(),o=r.priceScale(),s=n.timeScale(),a=this.lastPrice();if(!s.isEmpty()&&!o.isEmpty()&&void 0!==a){var l=s.visibleBarsStrictRange();if(null!==l){var c=l.firstBar(),h=l.lastBar(),d=r.data(),p=d.search(h,w.PlotRowSearchMode.NearestLeft);if(null!==p){var f=r.nearestIndex(c,w.PlotRowSearchMode.NearestRight);if(void 0!==f){var m=r.model().properties().scalesProperties,v=Object(u.ensureNotNull)(d.valueAt(f))[TradingView.CLOSE_PLOT],y=i.background,g=m.showSeriesLastValue.value(),b=!1,S=!1,P=!1,C=r.lastValueData(TradingView.CLOSE_PLOT,!1),x=r.properties();if(8===x.style.value()&&x.haStyle.showRealLastPrice.value()){var T=r.lastValueData(TradingView.CLOSE_PLOT,!0);if(T.noData||T.color===i.background||(y=T.color),!T.noData&&!C.noData){var I=T.index===C.index;b=I&&m.showSymbolLabels.value(), S=m.seriesLastValueMode.value()===_.PriceAxisLastValueMode.LastPriceAndPercentageValue,g=g&&I,P=I&&this._isCountdownEnabled()&&x.showCountdown.value()}}else{y=r.barColorer().barStyle(p.index,!0).barColor}i.background=y,i.color=this.generateTextColor(y),i.coordinate=o.priceToCoordinate(a,v),e.visible=g||P,C.noData||(C.text=o.formatPrice(a,v),C.formattedPriceAbsolute=o.formatPriceAbsolute(a),C.formattedPricePercentage=o.formatPricePercentage(a,v),e.text=this._axisFirstLineText(C,g,S),e.secondLine=P?this._countdownText():"",t.text=this._paneText(C,g,b,S)),t.visible=b||g&&S}}}}},t}(b),C=i("KtbP"),x=i("C2K+"),T=i("WPIy");i.d(t,"SeriesBase",(function(){return M}));var I=p.enabled("price_scale_always_last_bar_value"),M=function(e){function t(t){var i=e.call(this,t)||this;i.extendedHours=new s.a,i._paneView=null,i._priceStep=null,i._symbolInfo=null,i._isPrePostMarketPricesForbiddenProperty=new s.a(!0),i._prevClosePriceAxisView=null,i._base=100,i._pointValue=1,i._formatter=new l.PriceFormatter(i._base),i._ignoreMinMoveFormatter=new l.PriceFormatter(i._base),i._ignoreMinMovePriceStep=null,i._lastBarCloseTime=null,i._quotesProvider=new c.QuotesProvider,i._quotesProvider.quotesUpdate().subscribe(i,i._onQuotesUpdate);var n=new b(i,t,{alwaysShowGlobalLast:!0});i._priceAxisView=n;var r=null;I||(r=new b(i,t,{visibleOnHistoryOnly:!0,showSymbolLabel:!1,showCountdown:!1,alwaysShowGlobalLast:!1})),i._priceLinePriceAxisView=new S.SeriesPriceLineAxisView(i);var o=new P(i,t);return i._priceAxisViews=[n,o],null!==r&&i._priceAxisViews.push(r),i._panePriceAxisView=new C.PanePriceAxisView(n,i,t),i._historyPricePanePriceAxisView=null!==r?new C.PanePriceAxisView(r,i,t):null,i._projectionPriceAxisView=new C.PanePriceAxisView(o,i,t),i._labelPaneViews=[i._panePriceAxisView,i._projectionPriceAxisView],null!==i._historyPricePanePriceAxisView&&i._labelPaneViews.push(i._historyPricePanePriceAxisView),i}return Object(n.__extends)(t,e),t.prototype.destroy=function(){this._quotesProvider.quotesUpdate().unsubscribeAll(this)},t.prototype.quotesProvider=function(){return this._quotesProvider},t.prototype.labelPaneViews=function(){return this._labelPaneViews},t.prototype.symbolInfo=function(){return this._symbolInfo},t.prototype.symbolResolved=function(){return this.dataEvents().symbolResolved()},t.prototype.formatter=function(e){return void 0===e&&(e=!0),e?this._formatter:this._ignoreMinMoveFormatter},t.prototype.priceStep=function(e){return void 0===e&&(e=!0),e?this._priceStep:this._ignoreMinMovePriceStep},t.prototype.hasClosePrice=function(){return 12!==this.properties().style.value()},t.prototype.nearestValue=function(e,t,i){var n=this.nearestData(e,i);return n?n.value[t]:void 0},t.prototype.autoScaleInfo=function(e,t){var i=this.priceRange(e,t);if(null===this._paneView)return{range:i};var n=this._paneView;return{range:i,topPixelMargin:n.topPixelMargin?n.topPixelMargin():void 0,bottomPixelMargin:n.bottomPixelMargin?n.bottomPixelMargin():void 0}},t.prototype.isPrePostMarketPricesForbiddenProperty=function(){ return this._isPrePostMarketPricesForbiddenProperty},t.prototype.base=function(){return this._base},t.prototype.pointValue=function(){return this._pointValue},t.prototype.barCloseTime=function(){return this._lastBarCloseTime},t.prototype.currency=function(){return this.properties().currencyId.value()||null},t.prototype.setCurrency=function(e){this.properties().currencyId.setValue(e)},t.prototype.symbolSource=function(){return this},t.prototype.valuesProvider=function(){return new x.a(this,this.model())},t.prototype.statusProvider=function(e){return new T.a(this,this._model.properties().scalesProperties.textColor,this.properties().statusViewStyle,e)},t.prototype.open=function(e){var t=this.data().valueAt(e);return t&&t[1]},t.prototype.high=function(e){var t=this.data().valueAt(e);return t&&t[2]},t.prototype.low=function(e){var t=this.data().valueAt(e);return t&&t[3]},t.prototype.close=function(e){var t=this.data().valueAt(e);return t&&t[4]},t.prototype.moveItem=function(e,t,i){if(10===this.style()&&0===t){var n=this.priceScale(),r=this.properties().baselineStyle,o=n.height(),s=100-e.y/o*100,a=s<0?0:Math.round(10*s)/10;r.baseLevelPercentage.setValue(Math.max(Math.min(a,100),0))}},t.prototype._isExtendedHoursAllowed=function(){return Boolean(this._symbolInfo&&-1!==["stock","index","futures"].indexOf(this._symbolInfo.type))},t.prototype._recreateFormatter=function(){this._formatter=Object(a.createSeriesFormatter)(this.symbolInfo(),this.properties().minTick.value()),this._ignoreMinMoveFormatter=Object(a.createSeriesFormatter)(this.symbolInfo(),this.properties().minTick.value(),!0),this.priceScale()&&this.priceScale().updateFormatter(),this._formatterChanged.fire()},t.prototype._recreatePriceStep=function(){var e=Object(a.getSeriesPriceFormattingState)(this.symbolInfo()),t=e.minMove,i=e.priceScale,n=t/i;this._ignoreMinMovePriceStep=1/i,this._priceStep!==n&&(this._priceStep=n,this._priceStepChanged.fire())},t.prototype._recreatePriceFormattingDependencies=function(){this._recreateFormatter(),this._recreatePriceStep()},t.prototype._updateIsPrePostMarketPricesForbiddenProperty=function(){var e=!this.isDWM()&&this.extendedHours.value()||!this._isExtendedHoursAllowed();this._isPrePostMarketPricesForbiddenProperty.setValue(e)},t}(r.PriceDataSource)},"lW/c":function(e,t,i){"use strict";i.r(t);i("YFKU");var n=i("hY0g"),r=i.n(n),o=i("HySD"),s=function(){function e(e){var t=this;this._document=e,this.isFullscreen=new r.a;var i=function(){for(var e=["fullscreenElement","webkitFullscreenElement","mozFullscreenElement","mozFullScreenElement","msFullscreenElement"],i=0;i0;){var s=e._groups[o];if(!s.isDisabled()){if(s.handleHotkey(i,t))return;if(s.modal)return}}}},this._keyUpListener=function(t){var i=Object(n.hashFromEvent)(t);e._pressedKeys.setValue(i)},this._blurEvent=function(){e._pressedKeys.setValue(0)},this._mouseEvent=function(t){var i=Object(n.modifiersFromEvent)(t),r=255&e._pressedKeys.value();e._pressedKeys.setValue(i|r)}}return e.prototype.listen=function(e){e.addEventListener("keydown",this._keyDownListener),e.addEventListener("keyup",this._keyUpListener),e.addEventListener("blur",this._blurEvent),e.addEventListener("mousemove",this._mouseEvent)},e.prototype.unlisten=function(e){e.removeEventListener("keydown",this._keyDownListener),e.removeEventListener("keyup",this._keyUpListener),e.removeEventListener("blur",this._blurEvent),e.removeEventListener("mousemove",this._mouseEvent)},e.prototype.registerGroup=function(e){this._groups.push(e)},e.prototype.unregisterGroup=function(e){for(var t=this._groups.length;t--;)this._groups[t]===e&&this._groups.splice(t,1)},e.prototype.promoteGroup=function(e){for(var t=this._groups.length-1,i=this._groups.length;i--;){if(this._groups[i]===e)return void(i!==t&&(this._groups.splice(i,1),this._groups.splice(t,0,e)));this._groups[i].modal&&(t=i-1)}},e.prototype.pressedKeys=function(){return this._pressedKeys},e}(),l=i("JWMC"),c=function(){function e(e,t){this._group=e,this.hotkey=t.hotkey,this.handler=t.handler,this.desc=t.desc,this.element=t.element||null,t.isDisabled?"function"==typeof t.isDisabled?this.isDisabled=t.isDisabled:this.isDisabled=function(){return!0}:this.isDisabled=function(){return!1}}return e.prototype.destroy=function(){this._group&&(this._group.remove(this),this._group=null)},e}(),u=function(){function e(e,t){this._actions=[],this._manager=e,this.modal=!(!t||!t.modal), t&&(this.desc=t.desc),t&&t.isDisabled?"function"==typeof t.isDisabled?this.isDisabled=t.isDisabled:this.isDisabled=function(){return!0}:this.isDisabled=function(){return!1},this._manager.registerGroup(this)}return e.prototype.add=function(e){var t=new c(this,e);return this._actions.push(t),t},e.prototype.remove=function(e){for(var t=this._actions.length;t-- >0;)this._actions[t]===e&&this._actions.splice(t,1)},e.prototype.handleHotkey=function(e,t){for(var i=this._actions.length;i-- >0;){var r=this._actions[i];if(r.hotkey===e&&((!r.element||t.target&&r.element.contains(t.target))&&!r.isDisabled()))return r.handler(t),t.preventDefault(),Object(l.trackEvent)("Keyboard Shortcuts",Object(n.humanReadableHash)(e)),!0}return!1},e.prototype.promote=function(){this._manager.promoteGroup(this)},e.prototype.destroy=function(){this._actions.length=0,this._manager.unregisterGroup(this)},e}();i.d(t,"pressedKeys",(function(){return d})),i.d(t,"createGroup",(function(){return p})),i.d(t,"registerWindow",(function(){return _})),i.d(t,"unregisterWindow",(function(){return f})),i.d(t,"Modifiers",(function(){return n.Modifiers}));var h=new a,d=h.pressedKeys();function p(e){return new u(h,e)}function _(e){h.listen(e)}function f(e){h.unlisten(e)}_(window)},"m/cY":function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("tc+8"),r=i.n(n);function o(e){return new r.a(e)}},mE5r:function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("Eyy1"),o=i("ikwP"),s=i("gAom"),a=i("H0vP"),l=i("aO4+"),c=i("XlJ7"),u=i("EsvI"),h=i("OsWk"),d=i("rL76"),p=i("zDbI"),_=parseInt(d.labelheight),f=parseInt(d.bottommargin);function m(e){return e/11}var v=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=m(t);Math.abs(i-this._currentScale)>.1&&(this._currentScale=i,Math.abs(this._currentScale-1)>.1?this._element.style.transform="scale("+this._currentScale+")":(this._currentScale=1,this._element.style.transform=""))},e.prototype.drawLabelForScreenshot=function(e,t){if(null!==this._info&&"gear"!==this._mode){var i=Object(c.makeFont)(t.fontSize,p.CHART_FONT_FAMILY);e.fillStyle=u.themes[t.theme].getThemedColor("color-price-axis-label-back"),e.globalAlpha=.5,e.beginPath();var n=m(t.fontSize)*_/2,r=Object(l.point)(t.offset+t.width/2,t.height/2);e.arc(r.x,r.y,n,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(_+f)*e},e}(),y=i("aIyQ"),g=i.n(y),b=i("S8xo"),S=i("5VQP"),w=i("CPmC"),P={enableTooltip:!0,showLabels:!0,enableMenu:!0,enableHighlight:!0},C=function(){function e(e,t,i,r,s){var a=this;this._invalidated=!0,this._size=new o.Size(0,0),this._offset=0,this._axisInfo=null,this._onLabelHovered=new g.a,this._highlighted=!1,this._labelMode="auto",this._fixedLabelMode=null,this._canvasConfiguredHandler=function(){return a.update()},this._isLeft="left"===e,this._rendererOptionsProvider=r.rendererOptionsProvider,this._sourcesTitlesProvider=r.sourcesTitlesProvider,this._contextMenuItemsProvider=r.contextMenuItemsProvider,this._backgroundBasedTheme=r.backgroundBasedTheme,this._getBackgroundTopColor=r.getBackgroundTopColor,this._getBackgroundBottomColor=r.getBackgroundBottomColor,this._properties=t,this._axisInfo=i,this._labelOptions=Object(n.__assign)(Object(n.__assign)({},P),s),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"),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 v,this._label.setAxisNameInfo(this._axisInfo),this._cell.appendChild(this._label.getElement()),this._labelOptions.enableTooltip&&Object(w.b)(this._cell,"text",(function(e){return a._tooltipContent()}))):this._label=null,this._mouseEventHandler=new b.MouseEventHandler(this._cell,this,{treatHorzTouchDragAsPageScroll:!0,treatVertTouchDragAsPageScroll:!0}),this._canvasBinding=Object(o.createBoundCanvas)(this._cell,new o.Size(16,16)),this._canvasBinding.subscribeCanvasConfigured(this._canvasConfiguredHandler);var l=this._canvasBinding.canvas;l.style.position="absolute",l.style.left="0",l.style.top="0"}return e.prototype.destroy=function(){this._canvasBinding.unsubscribeCanvasConfigured(this._canvasConfiguredHandler),this._canvasBinding.destroy(),this._properties.lineColor.unsubscribe(this,this._onPropertyChanged),this._mouseEventHandler.destroy(),$(this._cell).remove()},e.prototype.mouseEnterEvent=function(e){this._mouseOrTouchEnterEvent(e)},e.prototype.touchStartEvent=function(e){this._mouseOrTouchEnterEvent(e)},e.prototype.mouseLeaveEvent=function(e){this._mouseOrTouchLeaveEvent(e)},e.prototype.touchEndEvent=function(e){this._mouseOrTouchLeaveEvent(e)},e.prototype.mouseClickEvent=function(e){this._mouseClickOrTapEvent(e)},e.prototype.tapEvent=function(e){this._mouseClickOrTapEvent(e)},e.prototype.update=function(){this._invalidated=!0},e.prototype.getElement=function(){return this._cell},e.prototype.onLabelHovered=function(){return this._onLabelHovered},e.prototype.setSizeAndOffset=function(e,t){ if(e.w<0||e.h<0)throw new Error("Try to set invalid size to PriceAxisStub "+JSON.stringify(e));this._size.equals(e)||(this._size=e,this._canvasBinding.resizeCanvas({width:e.w,height:e.h}),this._cell.style.width=e.w+"px",this._cell.style.minWidth=e.w+"px",this._cell.style.height=e.h+"px",this._invalidated=!0),this._offset!==t&&(this._offset=t,this._cell.style.left=t+"px")},e.prototype.paint=function(e){if((!(ethis._axises.length&&this._axises.lengthu;){var h=Object(r.ensureDefined)(this._stubs.pop());h.onLabelHovered().unsubscribeAll(this),this._cell.removeChild(h.getElement()),h.destroy()}for(var d=function(){var e=p._labelsOptions.showLabels?Object(x.a)(p._side,p._stubs.length):null,t=p._stubs.length,i=new C(p._side,p._stubProperties,e,p._stubParams(t),p._labelsOptions);i.onLabelHovered().subscribe(p,(function(t){o._labelsOptions.showLabels&&o._labelsOptions.enableHighlight&&o._onLabelHovered.fire(Object(r.ensureNotNull)(e),t)})),p._stubs.push(i),p._cell.appendChild(i.getElement())},p=this;this._stubs.length=t.scrollWidth||t.setAttribute("title",t.textContent||""))}),!0),document.addEventListener("mouseenter",(function(e){var t=e.target;if(t instanceof HTMLElement&&t.matches(".apply-overflow-tooltip")){if(t.matches(".apply-overflow-tooltip--check-children")){for(var i=!1,n=t.children,r=0;r1,"Unable to change pane's height if there is only one pane");var r=i.indexOf(this._pane);Object(n.assert)(-1!==r,"Invalid pane index");var o=new l(t,r,e);this._chartWidget.model().undoHistory().pushUndoCommand(o)},e.prototype.moveTo=function(e){var t=this.paneIndex();t!==e&&(Object(n.assert)(e>=0&&e1&&"-"===t.text[0]?e.remove.push(t.text.slice(1)):(i="-"===t.text?new m:new f({label:t.text,onExecute:t.click}),t.position&&"top"===t.position?e.top.push(i):e.bottom.push(i)))}))}}),e},P.prototype._timeAxisMenu=function(){if(this._chartUndoModel().timeScale().isEmpty())return null;var e=this._chart.getTimeScale();return new f({label:window.t("Time Scale"),subItems:e.getContextMenuActions(),statName:"TimeScale"})},P.prototype.toggleLockTimeAxis=function(e,t){if("boolean"!=typeof t&&(t=!y.lockTimeAxis().value()),t){var i=this._chartUndoModel().timeScale(),n=i.coordinateToIndex(e),r=i.points().roughTime(n);y.lockTimeAxisTime.setValue(r)}y.lockTimeAxis().setValue(t)},P.prototype._createLockTimeAxisAction=function(e){var t=y.lockTimeAxis().value();return new f({label:window.t("Lock Vertical Line On Time Axis"),statName:"ToggleLockCursorInTime",checkable:!0,checked:t,onExecute:this.toggleLockTimeAxis.bind(this,e.localX,!t)})},P.prototype._createHVLineAction=function(e,t){var i=this;return new f({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=u(i._state),r=n.mainDataSource().firstValue(),o=i._chartUndoModel().timeScale().coordinateToIndex(e.localX),s=n.defaultPriceScale().coordinateToPrice(e.localY,r),a=i._chartUndoModel().createLineTool(n,{index:o,price:s},"vertical"===t?"LineToolVertLine":"LineToolHorzLine");i._finishTool(a)}})},P.prototype.setPriceAxisSizes=function(e,t,i){this._priceAxisesContainer(e).setSizes(t,i)},P.prototype.update=function(){this._lhsPriceAxisesContainer.update(),this._rhsPriceAxisesContainer.update(),null!==this._legendWidget&&this._legendWidget.update(),this.updateControls()},P.prototype.updateControls=function(){null!==this._paneControls&&this._paneControls.update()},P.prototype.recalculatePriceScale=function(){var e=this.state();e.leftPriceScales().forEach((function(t){e.recalculatePriceScale(t)})),e.rightPriceScales().forEach((function(t){e.recalculatePriceScale(t)}));for(var t=e.dataSources(),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 a;var t="";return e<0&&(t="-",e=-e),e>=1e100?Object(n.t)("N/A"):(!this._fractionalValues||e>=995?e=Math.round(e):this._fractionalValues&&(e=+e.toFixed(this._precision)),e<995?t+this._formatNumber(e):e<999995?t+this._formatNumber(e/1e3)+"K":e<999999995?(e=1e3*Math.round(e/1e3),t+this._formatNumber(e/1e6)+"M"):(e=1e6*Math.round(e/1e6),t+this._formatNumber(e/1e9)+"B"))},e.prototype.parse=function(e){if("---"===e)return{error:"not a number",res:!1,value:NaN};var t={K:1e3,M:1e6,B:1e9},i=e.slice(-1);if(t.hasOwnProperty(i)){var n=this._numericFormatter.parse(e.slice(0,-1));return Object(o.isNumber)(n)?{res:!0,value:n*t[i]}:{error:"not a number",res:!1,value:NaN}}n=this._numericFormatter.parse(e);return 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(s.fixComputationError)(e)),this._numericFormatter.format(e).replace(/(\.[1-9]*)0+$/,(function(e,t){return t}))},e}()},nW7S:function(e,t,i){"use strict";(function(e){var n=i("aO4+").Point,r=i("Ss5c").LineDataSource,o=i("Ocx9").DefaultProperty,s=window.t("Trend Angle");function a(e,t){var n=t||a.createProperties();r.call(this,e,n),this._properties.addChild("angle",new a.AngleProperty(this)),i.e("lt-pane-views").then(function(e){var t=i("XHET").TrendAnglePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,r),a.prototype.isSynchronizable=function(){return!1},a.AngleProperty=function(t){e.call(this),this._lineSource=t},inherit(a.AngleProperty,e),a.AngleProperty.prototype.value=function(){var e=180*this._lineSource._angle/Math.PI;return Math.round(e)},a.AngleProperty.prototype.setValue=function(e){var t=e*Math.PI/180;this._lineSource._angle=t;var i=this._lineSource.pointToScreenPoint(this._lineSource.points()[0])[0],r=Math.cos(this._lineSource._angle),o=-Math.sin(this._lineSource._angle),s=new n(r,o),a=i.addScaled(s,this._lineSource._distance),l=this._lineSource.screenPointToPoint(a);this._lineSource._points[1]=l,this._lineSource._model.updateSource(this._lineSource),this._lineSource.updateAllViews(),this._lineSource._model.updateSource(this._lineSource)},a.prototype.pointsCount=function(){return 2},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Trend Angle"}, a.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)},a.prototype.addPoint=function(e,t){var i=r.prototype.addPoint.call(this,e,t);return i&&this._calculateAngle(),i},a.prototype.setLastPoint=function(e,t){r.prototype.setLastPoint.call(this,e,t),this.points().length>1&&this._calculateAngle()},a.prototype.axisPoints=function(){if(this.points().length<2)return[];var e=[this.points()[0]],t=this.pointToScreenPoint(this.points()[0])[1],i=Math.cos(this._angle)*this._distance,r=-Math.sin(this._angle)*this._distance,o=t.add(new n(i,r)),s=this.screenPointToPoint(o);return e.push(s),e},a.prototype.setPoint=function(e,t,i){r.prototype.setPoint.call(this,e,t,i),this.points().length>1&&1===e&&this._calculateAngle()},a.prototype.restoreData=function(e){this._angle=e.angle,this._distance=e.distance},a.prototype.state=function(e){var t=r.prototype.state.call(this,e);return t.angle=this._angle,t.distance=this._distance,t},a.prototype.cloneData=function(e){this._angle=e._angle,this._distance=e._distance},a.prototype.canHasAlert=function(){return!0},a.prototype._getAlertPlots=function(){return[this._linePointsToAlertPlot(this._points,null,this.properties().extendLeft.value(),this.properties().extendRight.value())]},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("o1gc").TrendAngleDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new o("linetooltrendangle",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolTrendAngle=a}).call(this,i("tc+8"))},"nd9+":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolGannComplex",(function(){return d}));var n=i("mrSG"),r=i("aO4+"),o=i("Eyy1"),s=i("T6Of"),a=i("Ss5c"),l=i("FaJS"),c=i("LAp3"),u=i("ytGH"),h=window.t("Gann Square"),d=function(e){function t(n,r){var o=e.call(this,n,r||t.createProperties())||this;o.version=2,o._scaleRatioFormatter=new s.LimitedPrecisionNumericFormatter(7),i.e("lt-pane-views").then(function(e){var t=i("X4Cb").GannComplexPaneView;o._setPaneViews([new t(o,o.model())])}.bind(null,i)).catch(void 0);var a=o.properties();o._adjustScaleRatio(a),a.subscribe(o,o._adjustScaleRatio),a.childs().scaleRatio.subscribe(o,o._correctFirstPoint),o._syncStateExclusions=["scaleRatio"],a.addExclusion("scaleRatio"),o.properties().onRestoreFactoryDefaults().subscribe(o,o._handleRestoringFactoryDefaults),o._onTemplateApplying.subscribe(o,o._handleTemplateApplying),o._onTemplateApplied.subscribe(o,o._correctFirstPoint);for(var l=[],c=o.properties().childs(),h=c.levels.childCount(),d=0;d=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.childs().scaleRatio.unsubscribe(this,this._correctFirstPoint),this.properties().onRestoreFactoryDefaults().unsubscribe(this,this._handleRestoringFactoryDefaults),this._onTemplateApplying.unsubscribe(this,this._handleTemplateApplying),this._onTemplateApplied.unsubscribe(this,this._correctFirstPoint)},t.prototype.pointsCount=function(){return 2},t.prototype.translatedType=function(){return h},t.prototype.name=function(){return"Gann Square"},t.prototype.addPoint=function(t,i,n){this._points.length>1&&this._points.pop();var r=e.prototype.addPoint.call(this,t,i,n),s=this.priceScale();return!Object(o.ensureNotNull)(s).isLog()&&r&&this._correctFirstPoint(),r},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();Object(o.ensureNotNull)(n).isLog()||(this._points[1]=t,this._correctPoint(1)),e.prototype.setLastPoint.call(this,t,i)},t.prototype.isReversed=function(){return this.properties().childs().reverse.value()},t.prototype.levelsCount=function(){return this.properties().childs().levels.childCount()},t.prototype.levels=function(){for(var e=[],t=this.properties().childs(),i=t.levels.childCount(),n=0;n0,s=n.index-r.index>0,a=o&&!s||!o&&s?-1:1;0===e&&(a=-a),n.price=r.price+a*t*i,this._pointChanged.fire(e)}this.normalizePoints()}}},t.prototype._correctFirstPoint=function(){this._correctPoint(this.isReversed()?0:1)},t.prototype._handleRestoringFactoryDefaults=function(){this.properties().childs().scaleRatio.setValue(this._getAdjustedScaleRatio())},t.prototype._handleTemplateApplying=function(e){""===e.scaleRatio&&(e.scaleRatio=this._getAdjustedScaleRatio())},t.prototype._migratePoint=function(){if(!(this.points().length0){r=r.normalized();var o=Math.acos(r.x);return r.y>0&&(o=-o),o}return null},t}(a.LineDataSource)},nda6:function(e,t,i){"use strict";i.r(t),i.d(t,"TimeSpanFormatter",(function(){return n}));i("YFKU");var n=function(){function e(){}return e.prototype.format=function(e){var t=e<0;e=Math.abs(e);var i=Math.floor(e/86400);e-=86400*i;var n=Math.floor(e/3600);e-=3600*n;var r=Math.floor(e/60);e-=60*r;var o="";return i&&(o+=i+window.t("d",{context:"dates"})+" "),n&&(o+=n+window.t("h",{context:"dates"})+" "),r&&(o+=r+window.t("m",{context:"dates"})+" "),e&&(o+=e+window.t("s",{context:"dates"})+" "),t&&(o="-"+o),o.trim()},e}()},"ng+v":function(e,t,i){"use strict";i.r(t),i.d(t,"LineDataSourceBase",(function(){return a}));var n=i("mrSG"),r=i("fgLi"),o=i("aIyQ"),s=i.n(o),a=function(e){function t(t){var i=e.call(this)||this;return i._timePoint=[],i._points=[],i._normalizedPointsChanged=new s.a,i._model=t,i.localAndServerAlertsMismatch=!1,i}return Object(n.__extends)(t,e),t.prototype.normalizedPointsChanged=function(){return this._normalizedPointsChanged},t.prototype.pointsProperty=function(){return this._pointsProperty},t.prototype.setPoints=function(e){this._points=e},t.prototype.normalizePoint=function(e){return Object(n.__assign)(Object(n.__assign)({},this._model.timeScale().normalizeBarIndex(e.index)),{price:e.price})},t.prototype.normalizePoints=function(){this._timePoint=[];for(var e=0;e100&&this._reset(),this._totalDeltaX+=e.deltaX,this._totalDeltaY+=e.deltaY,this._prevWheelTime=e.timeStamp;var t={deltaX:e.deltaX,deltaY:e.deltaY};return 0===this._totalDeltaX||0===this._totalDeltaY||(Math.abs(this._totalDeltaX)>=Math.abs(3*this._totalDeltaY)&&(t.deltaY=0),Math.abs(this._totalDeltaY)>=Math.abs(3*this._totalDeltaX)&&(t.deltaX=0)),t},e.prototype._reset=function(){this._totalDeltaX=0,this._totalDeltaY=0},e}()},oIoN:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Disjoint Channel");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),this.version=s.version,i.e("lt-pane-views").then(function(e){var t=i("pBAL").DisjointChannelPaneView;this._setPaneViews([new t(this,this._model)]) }.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.version=1,s.prototype.pointsCount=function(){return 3},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Disjoint Channel"},s.prototype.hasEditableCoordinates=function(){return!1},s.prototype.addPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),n.prototype.addPoint.call(this,e)},s.prototype.setLastPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),n.prototype.setLastPoint.call(this,e)},s.prototype.setPoint=function(e,t,i){var r=.5*(this._points[1].price+this._points[2].price);if(i&&i.shift()&&1===e){this._snapPoint45Degree(t,this.points()[0])}if(e<3&&n.prototype.setPoint.call(this,e,t),0!==e&&2!==e){if(1===e){var o=this._points[1].price-r;this._points[2].price=this._points[1].price-2*o}else if(3===e){o=t.price-this._points[2].price;this._points[0].price=this._points[1].price-o,this._points[0].index=t.index}this.normalizePoints()}},s.prototype.canHasAlert=function(){return!0},s.prototype._getAlertPlots=function(){var e=this._points[0],t=this._points[1],i=[];e.index<=t.index?(i.push(e),i.push(t)):(i.push(t),i.push(e));var n=this._points[2];n.time=t.time,n.index=t.index;var r,o,s,a,l={price:n.price+(t.price-e.price),time:e.time,index:e.index},c=[];n.index<=l.index?(c.push(n),c.push(l)):(c.push(l),c.push(n)),i[0].price>c[0].price?(r=i,o=c):c[0].price>i[0].price||c[1].price>i[1].price?(r=c,o=i):(r=i,o=c);var u=this.properties().extendLeft.value(),h=this.properties().extendRight.value();return e.index<=t.index?(s=u,a=h):(s=h,a=u),[this._linePointsToAlertPlot(r,"Upper",s,a),this._linePointsToAlertPlot(o,"Lower",s,a)]},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("vm8R").GeneralTrendFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetooldisjointangle",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolDisjointChannel=s},oNDq:function(e,t,i){"use strict";i.r(t),i.d(t,"createConfirmDialog",(function(){return o}));var n=i("mrSG"),r=(i("YFKU"),{actions:[{key:13,name:"yes",text:window.t("Yes"),type:"success"},{method:"close",name:"no",text:window.t("No"),type:"default"}],actionsWrapTemplate:'
',content:window.t("Are you sure?"),contentWrapTemplate:'

',destroyOnClose:!0,title:window.t("Confirmation"),width:400,dataset:{"dialog-type":"confirm-dialog"}});function o(e){return new Promise((function(t){Promise.all([i.e("dialogs-core"),i.e(55),i.e(0),i.e(15),i.e("create-dialog")]).then(function(o){var s=i("YDhE").createDialog;t(s(Object(n.__assign)(Object(n.__assign)({},r),e))) }.bind(null,i)).catch(void 0)}))}},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,r=i("Y7w9"),o=i("ogJP").inherit,s=i("E6p6").SessionStage,a=function(){var e="undefined"!=typeof window?window:t,a=e.PineJsCalendar?e.PineJsCalendar:i("jCNj"),l=i("IiTo"),c=i("IDnv").extrapolateBarsFrontToTime,u={};function h(e,t,i,n,r){var o=r,s=0;if(isNaN(e.get(t-1)))return{index:NaN,value:NaN};for(var a=0;a1&&(this._currentIndex.set(o),this._currentValue.set(s),this._pivotIndex.set(a))}function p(e,t,i){this._deviation=e;var n=i.new_var(u.high(i)),r=i.new_var(u.low(i));n.get(2*t+1),r.get(2*t+1),this._pivotHigh=new d(t,t,d.HIGH,n,i),this._pivotLow=new d(t,t,d.LOW,r,i),this._lastVal=i.new_var(NaN),this._lastIndex=i.new_var(-1),this._lastType=i.new_var(),this._index=u.n(i),this._isNewBar=i.symbol.isNewBar,this._isBarClosed=i.symbol.isBarClosed;var o=this._lastIndex.get(1),s=this._lastVal.get(1),a=this._lastType.get(1);this._index>1&&this.addPivot(o,s,a),this.processPivot(this._pivotHigh),this.processPivot(this._pivotLow)}function _(e){this.symbol=e,this.vars=[],this.vars_index=0,this.ctx=[],this.ctx_index=0}function f(e){this.mindepth=0,this.original=NaN,this.modified=!1,this.symbol=e}function m(e){f.call(this,e),this.hist=new Float64Array(2e3),this.hist_pos=-1}function v(e,t,i,n,r,o,s){this.periodBase=n,this.tickerid=e,this.currencyCode=t,this.period=i,this.index=-1,this.time=NaN,this.open=NaN,this.high=NaN,this.low=NaN,this.close=NaN,this.volume=NaN,this.updatetime=NaN,this.isNewBar=!1,this.isBarClosed=!1,this.session=new l.SessionInfo("Etc/UTC","24x7"),this.other_sessions={},this.script=r,this.ticker=v.parseTicker(e);var a=v.parsePeriod(i);this.resolution=a.resolution,this.interval=a.interval,this.bb_cache={},this.minTick=o,this.periodForInitialRange=s}function y(e,t,i,n,r,o,s,a,l,c,u){this.body=s,this.symbols=[],this.runner=o,this.inputCallback=l,this.out=a,this.nonseriesOut=u,this.ctx=new _(this.add_sym(e,t,i,n,c,r)),this.init()}function g(e){this.symbols=[],this.barsets=[],this.subscription=[],this.host=e,this.isRecalculated=!1,this.start()}function b(e){this.runner=new g(e)}function S(e,t){this.info=e,this.bars=t||[],this.isBarClosed=!0}function w(e,t){this.period=e,this.generateEmptyBars=!!t}function P(){}return u.max_series_default_size=10001,u.n=function(e){return e.symbol.index+1},u.nz=function(e,t){return t=t||0,isFinite(e)?e:t}, u.na=function(e){return 0===arguments.length?NaN:isNaN(e)?1:0},u.isZero=function(e){return Math.abs(e)<=1e-10},u.toBool=function(e){return isFinite(e)&&!u.isZero(e)},u.eq=function(e,t){return u.isZero(e-t)},u.neq=function(e,t){return!u.eq(e,t)},u.ge=function(e,t){return u.isZero(e-t)||e>t},u.gt=function(e,t){return!u.isZero(e-t)&&e>t},u.lt=function(e,t){return!u.isZero(e-t)&&e1e-10},u.less=function(e,t){return t-e>1e-10},u.max=Math.max,u.min=Math.min,u.pow=Math.pow,u.abs=Math.abs,u.log=Math.log,u.log10=function(e){return Math.log(e)/Math.LN10},u.sqrt=Math.sqrt,u.sign=function(e){return isNaN(e)?NaN:u.isZero(e)?0:e>0?1:-1},u.exp=Math.exp,u.sin=Math.sin,u.cos=Math.cos,u.tan=Math.tan,u.asin=Math.asin,u.acos=Math.acos,u.atan=Math.atan,u.floor=Math.floor,u.ceil=Math.ceil,u.round=Math.round,u.avg=function(e,t,i,n,r,o){if(2===arguments.length)return(e+t)/2;for(var s=0,a=0;a=0;--o){var s=t[o];if(!(s>=i.startOfBar(0))){i.moveTo(s);var a=t[o+1];n.push(a)}}n.reverse()}return n},u.iff=function(e,t,i){return u.not(e)?i:t},u.rising=function(e,t){for(var i=1;ie.get(0))return 0;return 1},u.falling=function(e,t){for(var i=1;i=0;r--){n+=(t-r)*e.get(r)}return 2*n/(t*(t+1))},u.vwma=function(e,t,i){var n=i.new_var(u.volume(i)),r=i.new_var(e.get(0)*u.volume(i));return u.sma(r,t,i)/u.sma(n,t,i)},u.swma=function(e,t){return(e.get(0)+2*e.get(1)+2*e.get(2)+e.get(3))/6},u.lowestbars=function(e,t,i){return-h(e,t,0,(function(e,t){return u.lt(e,t)}),Number.MAX_VALUE).index},u.lowest=function(e,t,i){return h(e,t,0,(function(e,t){return u.lt(e,t)}),Number.MAX_VALUE).value},u.highestbars=function(e,t,i){return-h(e,t,0,(function(e,t){return u.gt(e,t)}),Number.MIN_VALUE).index},u.highest=function(e,t,i){return h(e,t,0,(function(e,t){return u.gt(e,t)}),Number.MIN_VALUE).value},u.cum=function(e,t){var i=t.new_var(),n=u.nz(i.get(1))+e;return i.set(n),n},u.accdist=function(e){var t=u.high(e),i=u.low(e),n=u.close(e),r=u.volume(e);return u.cum(n===t&&n===i||t===i?0:r*(2*n-i-t)/(t-i),e)},u.correlation=function(e,t,i,n){var r=u.sma(e,i,n),o=u.sma(t,i,n),s=n.new_var(e.get()*t.get());return(u.sma(s,i,n)-r*o)/Math.sqrt(u.variance2(e,r,i)*u.variance2(t,o,i))},u.stoch=function(e,t,i,n,r){var o=u.highest(t,n),s=u.lowest(i,n);return u.fixnan(100*(e.get()-s)/(o-s),r)},u.tsi=function(e,t,i,n){var r=n.new_var(u.change(e)),o=n.new_var(u.abs(u.change(e))),s=n.new_var(u.ema(r,i,n)),a=n.new_var(u.ema(o,i,n));return u.ema(s,t,n)/u.ema(a,t,n)},u.cross=function(e,t,i){if(isNaN(e)||isNaN(t))return!1 ;var n,r=i.new_var((n=e-t)<0?-1:0===n?0:1);return!isNaN(r.get(1))&&r.get(1)!==r.get()},u.linreg=function(e,t,i){for(var n=0,r=0,o=0,s=0,a=0;athis._currentValue.get():ithis._areaRight},d.prototype.update=function(){if(this._isNewBar&&this.isPivotFound()&&this.reset(),this.processPoint(this._index),this.isRightSideOk(this._index)){if(-1===this._pivotIndex.get()){for(var e=!0,t=0;tthis._deviation&&this.addPivot(e,t,i);else(i===d.HIGH?t>n:t0&&i.set(e),i},_.prototype.new_unlimited_var=function(e){var t=this.vars;t.length<=this.vars_index&&t.push(new m(this.symbol));var i=t[this.vars_index++];return arguments.length>0&&i.set(e),i},_.prototype.new_ctx=function(){return this.ctx.length<=this.ctx_index&&this.ctx.push(new _(this.symbol)),this.ctx[this.ctx_index++]},_.prototype.prepare=function(e){this.ctx_index=0,this.vars_index=0;for(var t=0;te&&(e=i)}return e},_.prototype.stop=function(){this.symbol=null,this.vars=null},f.prototype.valueOf=function(){return this.get(0)},f.prototype.get=function(e){return isNaN(e)&&(e=0),e=e||0,this.hist?e>=this.hist.length?(console.error("not enough depth: "+this),NaN):this._get(e):(this.mindepth=u.max(this.mindepth,e),NaN)},f.prototype._get=function(e){var t=this.hist_pos-e;return t<0&&(t+=this.hist.length),this.hist[t]},f.prototype.set=function(e){this.hist&&(this.hist[this.hist_pos]=e,this.modified=!0)},f.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)},f.prototype.add_hist=function(){if(!this.hist){var e=u.na(this.mindepth)?u.max_series_default_size:u.max(this.mindepth+1,1);e=Math.round(e);for(var t=new Array(e),i=0;i=0){var n=i.split(",");t=v.parsePeriod(n[1]),i=n[0]}var r=!1,o=!1,s=i[i.length-1];-1==="DWM".indexOf(s)&&("S"===s?o=!0:(r=!0,s=""));var a=parseInt(r?i:i.length>1?i.slice(0,i.length-1):1);return{resolution:s,interval:a,pureResolution:[a,s].join(""),isIntraday:r,isSeconds:o,range:t}},v.newBarBuilder=function(e,t,i){var n=v.parsePeriod(e);return l.newBarBuilder(n.interval+n.resolution,t,i)},v.newSession=function(e){return new l.SessionInfo(e.timezone,e.session,e.holidays,e.corrections)},v.prototype.set_symbolinfo=function(e){for(var t in e||console.error("WARN: symbolinfo isn't defined for "+this.tickerid),this.info=e,this.timezone=a.get_timezone(e.timezone),this.session.init(e.timezone,e.session,e.holidays,e.corrections),this.other_sessions)this.other_sessions.hasOwnProperty(t)&&this.other_sessions[t].init(e.timezone,e.session,e.holidays,e.corrections)},v.prototype.get_session=function(e){if(!e)return this.session;var t=this.other_sessions[e];return t||(t=new l.SessionInfo("Etc/UTC","24x7"),this.other_sessions[e]=t),t},v.prototype.isdwm=function(){return""!==this.resolution&&"S"!==this.resolution},v.prototype.enable_dwm_aligning=function(e,t){this.dwm_aligner=v.newBarBuilder(this.period,e,t)},v.prototype.bartime=function(e,t){var i=this.time;if(e){var n=e;t&&(n+=t);var r=this.bb_cache[n];if(!r){var o=this.get_session(t);r=v.newBarBuilder(e,o),this.bb_cache[n]=r}i=r.alignTime(i)}if(!this.isdwm()||isNaN(i))return i;var s=a.utc_to_cal(this.timezone,i);return this.session.spec.correctTradingDay(s),a.cal_to_utc(this.timezone,s)},v.prototype.lastbar=function(e){if(!isNaN(e.time)){var t=e.time;this.dwm_aligner&&(this.dwm_aligner.moveTo(t),t=this.dwm_aligner.startOfBar(0));var i=this.time!==t;i&&this.index>=0&&!this.isBarClosed&&(this.isNewBar=!1,this.isBarClosed=!0,this.script.calc(this)),this.time=t,this.open=e.open,this.high=e.high,this.low=e.low, this.close=e.close,this.volume=e.volume,this.updatetime=e.updatetime,this.isNewBar=i,this.isBarClosed=e.isBarClosed,this.isLastBar=e.isLastBar,this.isNewBar&&this.index++,this.script.calc(this)}},y.prototype.calc=function(e){var t=this.ctx,i=this.body;t.prepare(e);var n=i.main(t,this.inputCallback),r=this;this.out&&n&&(!isNaN(t.symbol.time)||n.nonseries)&&(n.nonseries?("projection"===n.type&&(n.projectionTime=t.symbol.time),this.nonseriesOut(t.symbol,n)):n.bars?n.bars.forEach((function(e){r.out(t.symbol,e)})):this.out(t.symbol,n))},y.prototype.init=function(){var e=this.ctx,t=this.body;t.init&&t.init(e,this.inputCallback),t.main(e,this.inputCallback)},y.prototype.add_sym=function(e,t,i,n,r,o){var s=this.runner.add_sym(e,t,i,n,this,r,o);return this.symbols.push(s),s.isdwm()&&this.symbols.length>1&&s.enable_dwm_aligning(this.symbols[0].session,s.session),s},y.prototype.maxAdditionalDepth=function(){return this.ctx.maxAdditionalDepth()},y.prototype.stop=function(){this.symbols=null,this.ctx.stop(),this.ctx=null},y.prototype.get_sym=function(e){return this.symbols[e]},g.prototype.add_sym=function(e,t,i,n,r,o,s){var a=new v(e,t,i,n,r,o,s);return this.symbols.push(a),a},g.prototype.get_sym=function(e){return this.symbols[e]},g.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)},g.prototype.start=function(){var e=this.host;this._script=new y(e.tickerid,e.currencyCode,e.period,e.periodBase||e.period,e.periodForInitialRange,this,e.body,this.out.bind(this),e.input,e.symbolInfo.minmov/e.symbolInfo.pricescale,e.nonseriesOut);var t=this,i=[],n=this.symbols,r=(e.additionalBarsCount||0)+t._script.maxAdditionalDepth();function o(n,o){var s=g.feed.subscribe(n.tickerid,n.currencyCode,n.period,n.periodBase,n.periodForInitialRange,(function(i){"series"===(i.nonseries?"nonseries":"series")?t.update(o,i):i.lastBar?(t.nonseriesUpdate=i,i.lastBar.isLastBar=!0,t.symbols[0].lastbar(i.lastBar),t.nonseriesUpdate=null):e.nonseriesOut(n,i)}),e.onErrorCallback,e.symbolInfo,e.sessionId,e.rangeExtension,r);i.push(s)}for(var s=0;s=0;i--)for(var n=e[i],r=this.barsets[i],o=r.count(),s=0;s=0;i--){var n=this._chartModel.restoreSource(this._restorePanes[i],this._paneIndexes[i],this._paneStates[i],this._sourceStates[i],this._priceScalePositionIds[i]);t.push(n)}t.some((function(i,n){return i.id()!==e._sourceIds[t.length-n-1]}))&&u.logError("Source was restored improperly - source ids does not match"),this._excludeLineToolsUndoCommands.forEach((function(e){return e.undo()}))},t}(o.UndoCommand)},odCa:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("fgLi").DataSource,o=i("tc+8"),s=i("Ocx9").DefaultProperty,a=i("jTis").CalloutConsts,l=window.t("Callout");function c(e,t){var r=t||c.createProperties();n.call(this,e,r),this._barOffset=0,this._timeScale=e.timeScale(),i.e("lt-pane-views").then(function(e){var t=i("B4Hi").CalloutPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(c,n),c.prototype.pointsCount=function(){return 2},c.prototype.translatedType=function(){return l},c.prototype.name=function(){return"Callout"},c.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},c.prototype.addPoint=function(e){var t=n.prototype.addPoint.call(this,e);return t&&this._calculateBarOffset(),t},c.prototype._calculateBarOffset=function(){this.points().length>1&&(this._barOffset=this.points()[1].index-this.points()[0].index)},c.prototype.setLastPoint=function(e){n.prototype.setLastPoint.call(this,e),2===this.points().length&&this._calculateBarOffset()},c.prototype.setPoint=function(e,t){switch(e){case 0:n.prototype.setPoint.call(this,e,t),this._calculateBarOffset();break;case 1:var i=this.properties();if(!i.wordWrapWidth)return;var r=this._points,o=this._dragStartLeftEdgeIndex,s=Math.round((t.index-o)/2);if(isFinite(o)&&isFinite(s)){r[1]={index:o+s,price:r[1].price},this._calculateBarOffset(),this.normalizePoints() ;var l=this._timeScale.indexToCoordinate(o+2*s)-this._timeScale.indexToCoordinate(o)-a.RoundRadius-a.TextMargins;if(!isFinite(l))return;i.wordWrapWidth.setValue(Math.max(a.MinWidth,l));break}r[1]=t,this._calculateBarOffset(),this.normalizePoints()}},c.prototype.setPoints=function(e){n.prototype.setPoints.call(this,e);var t=this.properties();if(t.wordWrapWidth){var i=this._dragStartLeftEdgeIndex,r=Math.round((e[1].index-i)/2);if(this._calculateBarOffset(),this.normalizePoints(),isFinite(i)&&isFinite(r)){var o=this._timeScale.indexToCoordinate(i+2*r)-this._timeScale.indexToCoordinate(i)-a.RoundRadius-a.TextMargins;if(!isFinite(o))return;t.wordWrapWidth.setValue(Math.max(a.MinWidth,o))}}},c.prototype._onPointsetUpdated=function(e){n.prototype._onPointsetUpdated.call(this,e),0!==e.length&&(this._dragStartLeftEdgeIndex=this.points()[1].index)},c.prototype.move=function(e,t,i){n.prototype.move.call(this,e,t,i),this._calculateBarOffset()},c.prototype.state=function(e){var t=n.prototype.state.call(this,e);return t.barOffset=this._barOffset,t},c.prototype.restoreData=function(e){e.barOffset?this._barOffset=e.barOffset:this._calculateBarOffset(),this._calculatePoint2()},c.prototype.setPriceScale=function(e){r.prototype.setPriceScale.call(this,e),e&&e.priceRange()&&this._calculatePoint2()},c.prototype.template=function(){var e=n.prototype.template.call(this);return e.text=this.properties().childs().text.value(),e},c.prototype._applyTemplateImpl=function(e){n.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text)},c.prototype._calculatePoint2=function(){if(!(this._model.lineBeingEdited()===this||this._model.sourcesBeingMoved().includes(this)||this._points.length<2)){var e=this.points()[0],t=this.points()[1];this._points[1]={price:t.price,index:e.index+this._barOffset}}},c.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("xhf0").CalloutDefinitionsViewModel}.bind(null,i)).catch(i.oe)},c.createProperties=function(e){var t=new s("linetoolcallout",e);return c._configureProperties(t),t},c._configureProperties=function(e){n._configureProperties(e),e.hasChild("text")||e.addChild("text",new o(window.t("Text"))),e.addExclusion("text")},t.LineToolCallout=c},oiZD:function(e,t,i){"use strict";i.r(t);var n=i("hY0g"),r=i.n(n);i.d(t,"watchedTheme",(function(){return o})),i.d(t,"setTheme",(function(){return s}));var o=new r.a;function s(e){o.setValue(e)}o.subscribe((function(e){!function(e,t){void 0===t&&(t=window);for(var i="theme-"+e,n=t.document.documentElement.classList,r=0,o=Array.from(n);rt)return{success:!1};if(e===t)return{success:!0,result:0};var i=this._extrapolatedData.length,n=0!==i?this._extrapolatedData[0]:null,o=null!==n?this._extrapolatedData[i-1]:null,s=eo){var a=Object(r.extrapolateBarsFrontToTime)(this._barBuilder(),o||1e3*e,1e3*t,2e3,!0);this._extrapolatedData=this._extrapolatedData.concat(a.times),i=this._extrapolatedData.length,this._cacheForFuture=s}if((o=this._extrapolatedData[i-1])<1e3*t)return{success:!1};var l=this._extrapolatedData.indexOf(1e3*t);return-1===l?{success:!1}:{success:!0,result:l}},e.prototype.projectTime=function(e,t){if(!this.isValid())return e;var i=this._extrapolatedData.length,n=i>0?this._extrapolatedData[0]:null,o=null!==n?this._extrapolatedData[i-1]:null,s=t>=0;1e3*e===n&&this._cacheForFuture===s||(this._extrapolatedData=[1e3*e],i=1,n=null,o=null);var a=Math.abs(t);if(null===n||a>=i){var l=Object(r.extrapolateBarsFrontByCount)(this._barBuilder(),o||1e3*e,Math.sign(t)*(a-i+1),!0);this._extrapolatedData=this._extrapolatedData.concat(l.times),i=this._extrapolatedData.length,this._cacheForFuture=s}return ii.zorder()}));if(0===n.length)throw new Error("Cannot bring forward source that alreadt on back");var r=n[0];if(Object(m.isLineTool)(r)){var o=e.model().lineToolsGroupModel().groupForLineTool(r);if(null!==o){var s=o.lineTools();r=s[s.length-1]}}return r}var B=function(e){function t(t,i,n){return e.call(this,t,n,D(i,n),"Send "+n[0].title()+" backward")||this}return Object(n.__extends)(t,e),t}(L);function R(e,t){return Object(r.ensureNotNull)(e.paneForSource(t.lineTools()[0]))}var N=function(e){function t(t,i){return e.call(this,t,i.lineTools(),E(R(t,i),i.lineTools()),"Send Group "+i.name()+" backward")||this}return Object(n.__extends)(t,e),t}(k),F=function(e){function t(t,i){return e.call(this,t,i.lineTools(),D(R(t,i),i.lineTools()),"Bring Group "+i.name()+" backward")||this}return Object(n.__extends)(t,e),t}(L),j=i("ogJP"),W=function(e){function t(t,i,n){var r=e.call(this,"Rearrange panes")||this;return r._chartModel=t,r._index=i,Object(j.isNumber)(n)?r._dstIndex=n:r._dstIndex="up"===n?i-1:i+1,r}return Object(n.__extends)(t,e),t.prototype.redo=function(){this._checkIndices()&&this._chartModel.movePane(this._index,this._dstIndex)}, t.prototype.undo=function(){this._checkIndices()&&this._chartModel.movePane(this._dstIndex,this._index)},t.prototype._checkIndices=function(){var e=this._chartModel.panes().length;return this._index>=0&&this._index=0&&this._dstIndext.zorder()?e:t}),i[0]),o=n,s=t.lineToolsGroupModel().groupForLineTool(n);if(null!==s){var a=s.lineTools();o=a[a.length-1]}this._environment.beginUndoMacro(ae);var l=new Map,c=new Set;i.forEach((function(i){var n=e._groupForLineTool(i);if(null!==n){var o=l.get(n)||[];o.push(i),l.set(n,o);var s=Object(r.ensureNotNull)(t.paneForSource(i));c.add(s)}})),Object(r.assert)(c.size<=1,"All selected sources should be on the same pane"),l.forEach((function(i,n){var r=new g.a(t,n,i);e._environment.pushUndoCommand(r)}));var u=new te(t,Object(P.sortSources)(i));this._environment.pushUndoCommand(u);var h=new O(t,i,o);this._environment.pushUndoCommand(h),this._environment.endUndoMacro();var d=Object(r.ensureNotNull)(u.createdGroupId());return Object(r.ensureNotNull)(t.lineToolsGroupModel().groupForId(d))},e.prototype.removeGroup=function(e){var t=this._environment.model(),i=e.lineTools();this._environment.beginUndoMacro(le.format({name:e.name()}));var n=new $(t,e,"");this._environment.pushUndoCommand(n);var o=new y.RemoveSourcesCommand(t,i,"");this._environment.pushUndoCommand(o),i.forEach((function(e){null!==e.getLinkKey()&&Object(se.removeLineTool)({model:t,linkKey:Object(r.ensureNotNull)(e.getLinkKey())})})),this._environment.endUndoMacro()},e.prototype.groups=function(){return this._environment.model().lineToolsGroupModel().groups()},e.prototype.excludeLineToolFromGroup=function(e,t){var i=this._environment.model(),n=new g.a(i,e,[t]);this._environment.pushUndoCommand(n)},e.prototype.addLineToolToGroup=function(e,t){var i=this._environment.model(),n=i.lineToolsGroupModel().groupForLineTool(t);if(n!==e){var r=ce.format({lineTool:t.title(),name:e.name()});this._environment.beginUndoMacro(r),null!==n&&this._environment.pushUndoCommand(new g.a(i,n,[t])),this._environment.pushUndoCommand(new ne(i,e,[t])),this._environment.endUndoMacro()}},e.prototype.bringToFront=function(e){var t=this._environment.model(),i=new I(t,e.lineTools());this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.sendToBack=function(e){var t=this._environment.model(),i=new M(t,e.lineTools());this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])}, e.prototype.bringForward=function(e){var t=this._environment.model(),i=new F(t,e);this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.sendBackward=function(e){var t=this._environment.model(),i=new N(t,e);this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.insertAfter=function(e,t){var i,n=this._environment.model();if(t instanceof Q.a){var r=t.lineTools();i=r[r.length-1]}else i=t;var o=new O(n,e.lineTools(),i);this._environment.pushUndoCommand(o),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.insertBefore=function(e,t){var i,n=this._environment.model();t instanceof Q.a?i=t.lineTools()[0]:i=t;var r=new A(n,e.lineTools(),i);this._environment.pushUndoCommand(r),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.availableZOrderOperations=function(e){var t=this._environment.model(),i=e.lineTools(),n=i[0],o=i[i.length-1],s=Object(r.ensureNotNull)(t.paneForSource(i[0])).allOrderedSourcesWithoutSpecial(),a=s[0],l=s[s.length-1];return{bringForwardEnabled:o!==l,bringToFrontEnabled:o!==l,sendBackwardEnabled:n!==a,sendToBackEnabled:n!==a}},e.prototype.setGroupVisibility=function(e,t){var i=this,n=(t?ue:he).format({group:e.name()}),r=this._environment.model();this._environment.beginUndoMacro(n),e.lineTools().forEach((function(e){var n=e.properties().visible,o=new re.SetPropertyUndoCommand(n,t,"",r);i._environment.pushUndoCommand(o)})),this._environment.endUndoMacro()},e.prototype.setGroupLock=function(e,t){var i=this,n=(t?de:pe).format({group:e.name()}),r=this._environment.model();this._environment.beginUndoMacro(n),e.lineTools().forEach((function(e){var n=e.properties().frozen,o=new re.SetPropertyUndoCommand(n,t,"",r);i._environment.pushUndoCommand(o)})),this._environment.endUndoMacro()},e.prototype.setGroupName=function(e,t){var i=this._environment.model(),n=_e.format({group:e.name(),newName:t}),r=new oe(i,e,t,n);this._environment.pushUndoCommand(r)},e.prototype.canBeGroupped=function(e){var t=this._environment.model();return new Set(e.map((function(e){return t.paneForSource(e)}))).size<=1},e.prototype._groupForLineTool=function(e){return this._environment.model().lineToolsGroupModel().groups().find((function(t){return t.containsLineTool(e)}))||null},e}(),me=i("3ClC"),ve=i("pQ+n"),ye=window.t("Apply study template {template}"),ge=function(e){function t(t,i,n){var r=e.call(this,ye.format({template:n}))||this;return r._model=t,r._templateContent=i,r._initialState=t.studyTemplate(!0,!0),r._initialGroupsState=t.lineToolsGroupModel().state(),r}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=this._merge(this._templateContent).filter(m.isLineTool);this._model.lineToolsGroupModel().removeLineTools(e),this._model.mainSeries().onChartStyleChanged();var t=this._model.mainSeries().properties();Object(G.preparePriceAxisProperties)(t),this._model.recalcVisibleRangeStudies(!0),this._model.setShouldBeSavedEvenIfHidden(!0)},t.prototype.undo=function(){ this._merge(this._initialState),this._model.mainSeries().onChartStyleChanged()},t.prototype._merge=function(e){var t=this._model,i=t.mainSeries();if(i.priceScale().properties().childs().lockScale.setValue(!1),this._initialState.symbol&&e.symbol&&i.properties().symbol.setValue(e.symbol),this._initialState.symbol&&e.interval){var n=Object(G.getChartStyleByResolution)(e.interval,i.properties().style.value());i.setChartStyleWithIntervalIfNeeded(n,e.interval)}for(var r=t.panes(),o=[],s=r.length;s--;)for(var a=(f=r[s]).containsMainSeries(),l=(g=f.dataSources()).length;l--;){var c=g[l];(!a||Object(me.isStudy)(c)&&c.isRemovedByStudyTemplates())&&o.push(c)}t.resetDeferredStudies();for(var u=Object(ve.a)(t,o),h=0;h1?"Remove drawings group":"Remove "+e[0].title();this.removeSources(e,!1,t)}},t.prototype.removeSources=function(e,t,i,n){var o=this;n||(e=e.filter((function(e){return e.isUserDeletable()})));var s=this._model(),a=s.lineToolsGroupModel();this.beginUndoMacro(i),s.selectionMacro((function(n){var l=new Map;e.forEach((function(e){if(Object(m.isLineTool)(e)){var t=a.groupForLineTool(e);if(null!==t){var i=l.get(t)||[];i.push(e),l.set(t,i)}null!==e.getLinkKey()&&Object(se.removeLineTool)({model:o.model(),linkKey:Object(r.ensureNotNull)(e.getLinkKey())})}})),l.forEach((function(e,t){var i=new g.a(s,t,e);o._pushUndoCommand(i)}));var c=new y.RemoveSourcesCommand(s,e,i),u=c.removedIds();o._pushUndoCommand(c),!t&&u.length>0&&(1===u.length?o.emitEvent("removeSource",[u[0]]):o.emitEvent("removeSources",[u]))})),this.endUndoMacro()},t.prototype.mergeSourceUp=function(e){var t=new w.c(this._model(),e,"Merge up");this._mergeUnmergeSource(e,t)},t.prototype.mergeSourceDown=function(e){var t=new w.a(this._model(),e,"Merge down");this._mergeUnmergeSource(e,t)},t.prototype.mergeToPane=function(e,t){var i=this._model().panes().indexOf(t),n=new w.b(this._model(),e,i,"Merge to pane");this._mergeUnmergeSource(e,n)},t.prototype.unmergeSourceUp=function(e){var t=new S.c(this._model(),e,"Unmerge up");this._mergeUnmergeSource(e,t)},t.prototype.unmergeSourceDown=function(e){var t=new S.a(this._model(),e,"Unmerge down");this._mergeUnmergeSource(e,t)},t.prototype.unmergeToNewBottomPane=function(e){var t=new S.b(this._model(),e,"Unmerge to new bottom pane");this._mergeUnmergeSource(e,t)},t.prototype.availableZOrderOperations=function(e){var t=this._model().lineToolsGroupModel(),i=e.filter(m.isLineTool),n=i.map((function(e){return t.groupForLineTool(e)}));Object(r.assert)(new Set(n).size<=1,"Cannot move line tools from different group");for(var o=0===n.length?null:n[0],s={bringForwardEnabled:!1,bringToFrontEnabled:!1,sendBackwardEnabled:!1,sendToBackEnabled:!1},a=new Set(i),l=function(e){if(Object(m.isLineTool)(e)&&null!==o){var t=Object(P.sortSources)(o.lineTools().filter((function(t){return!a.has(t)||t===e})));return s=je(s,{bringForwardEnabled:e!==t[t.length-1],bringToFrontEnabled:e!==t[t.length-1],sendBackwardEnabled:e!==t[0],sendToBackEnabled:e!==t[0]}),"continue"}var i=Object(r.ensureNotNull)(c._model().paneForSource(e)).allOrderedSourcesWithoutSpecial();if(0===i.length)return"continue";var n=e.zorder(),l=i[0].zorder(),u=i[i.length-1].zorder();s=je(s,{bringForwardEnabled:n!==u,bringToFrontEnabled:n!==u,sendBackwardEnabled:n!==l,sendToBackEnabled:n!==l})},c=this,u=0,h=Object(P.sortSources)(e);u20&&(this._pushUndoCommand(new H.a(this.model(),this._initialTimeScrollState,"Scroll Time")),this._initialTimeScrollPos=null,this._initialTimeScrollState=null,t=!0),this.model().scrollTimeTo(e),t},t.prototype.endScrollTime=function(){this.model().endScrollTime(),this._initialTimeScrollPos=null,this._initialTimeScrollState=null},t.prototype.startScaleTime=function(e){var t=this.timeScale(),i={rightOffset:t.rightOffset(),barSpacing:t.barSpacing()};this._pushUndoCommand(new H.a(this.model(),i,"Scale Time")),this.model().startScaleTime(e)},t.prototype.scaleTimeTo=function(e){this.model().scaleTimeTo(e)},t.prototype.endScaleTime=function(){this.model().endScaleTime()},t.prototype.resetTimeScale=function(){var e=this.timeScale(),t={rightOffset:e.rightOffset(),barSpacing:e.barSpacing()};this._pushUndoCommand(new H.a(this.model(),t,"Reset Time Scale")),this.model().resetTimeScale()},t.prototype.rearrangePanes=function(e,t){var i=new W(this._model(),e,t);this._pushUndoCommand(i)},t.prototype.movePane=function(e,t){var i=new W(this._model(),e,t);this._pushUndoCommand(i)},t.prototype.pasteSourceFromClip=function(e,t,i){var n=t||Object(x.get)();if(!n||0===n.sources.length)return null;var o=e||Object(r.ensureNotNull)(this.model().paneForSource(this.mainSeries()));if(!n.sources.some((function(e){return"drawing"!==e.type||null!==o.clipboardLineToolOwnerSource(e.source.id)})))return null;this.beginUndoMacro("Paste "+n.title);for(var s=0,a=[],l=0,u=n.sources;l'},p1SQ:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolHorzLinePriceAxisView",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t){var i=e.call(this)||this;return i._source=t,i}return Object(n.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){e.visible=!1;var n=this._source.points(),r=this._source.priceScale();if(0!==n.length&&null!==r&&!r.isEmpty()){var o=n[0];if(isFinite(o.price)){var s=this._source.ownerSource(),a=null!==s?s.firstValue():null;if(null!==a){var l=this._source.properties().linecolor.value();i.background=l, i.color=this.generateTextColor(l),i.coordinate=r.priceToCoordinate(o.price,a),e.text=r.formatPrice(o.price,a),e.visible=!0}}}},t}(i("KcY8").a)},pJOz:function(e,t,i){"use strict";i.r(t),i.d(t,"drawCircle",(function(){return h})),i.d(t,"drawArrow",(function(){return d})),i.d(t,"TrendLineRenderer",(function(){return p}));var n=i("Eyy1"),r=i("GEp6"),o=i("VaSN"),s=i("a7Ha"),a=i("VdBB"),l=i("jFln"),c=i("Zp/P"),u=i("gAom");function h(e,t,i,n,r){t.save(),t.fillStyle="#000000",t.beginPath(),t.arc(e.x*r,e.y*r,i*r,0,2*Math.PI,!1),t.fill(),n.strokeWidth&&(t.lineWidth=n.strokeWidth,t.stroke()),t.restore()}function d(e,t,i,n,r){if(!(t.subtract(e).length()<1))for(var o=Object(c.getArrowPoints)(e,t,n,!1),s=0;s0&&(c[0].x===c[1].x?Object(u.drawVerticalLine)(e,Math.round(c[0].x*n),c[0].y*n,c[1].y*n):c[0].y===c[1].y?Object(u.drawHorizontalLine)(e,Math.round(c[0].y*n),c[0].x*n,c[1].x*n):Object(l.drawLine)(e,c[0].x*n,c[0].y*n,c[1].x*n,c[1].y*n)),i.overlayLineEndings&&this._drawEnds(e,a,i.linewidth,n)}},e.prototype.hitTest=function(e,t){var i=this._data;if(null===i)return null;if("points"in i&&i.points.length<2)return null;if("floatPoints"in i&&i.floatPoints.length<2)return null;var n=Object(o.lastEventIsTouch)()?24:3,s="floatPoints"in i?i.floatPoints:i.points,a=s[0],l=s[1],c=this._extendAndClipLineSegment(a,l,t);if(null!==c&&Object(r.distanceToSegment)(c[0],c[1],e).distance<=n)return this._hittest;return null},e.prototype._extendAndClipLineSegment=function(e,t,i){var r=Object(n.ensureNotNull)(this._data);return Object(c.extendAndClipLineSegment)(e,t,i.cssWidth,i.cssHeight,r.extendleft,r.extendright)},e.prototype._drawEnds=function(e,t,i,r){var o=t[0],a=t[1],l=Object(n.ensureNotNull)(this._data);switch(l.leftend){case s.LineEnd.Arrow:d(a,o,e,i,r);break;case s.LineEnd.Circle:h(o,e,i,Object(n.ensureDefined)(l.endstyle),r)}switch(l.rightend){case s.LineEnd.Arrow:d(o,a,e,i,r);break;case s.LineEnd.Circle:h(a,e,i,Object(n.ensureDefined)(l.endstyle),r)}},e}()},pKDv:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("ABCD Pattern");function s(e,t){this._constructor="LineToolABCD";var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("bFMU").ABCDPaneView ;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 4},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"ABCD Pattern"},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("y4pE").AbcdPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolabcd",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolABCD=s},pPtI:function(e,t,i){"use strict";i.r(t),i.d(t,"normalizeIntervalString",(function(){return m})),i.d(t,"isAvailable",(function(){return v})),i.d(t,"setLastUsedResolution",(function(){return y})),i.d(t,"getRangeResolution",(function(){return g})),i.d(t,"getTimeBasedResolution",(function(){return b})),i.d(t,"getDefaultResolution",(function(){return S})),i.d(t,"getResolutionByChartStyle",(function(){return w})),i.d(t,"getServerInterval",(function(){return P})),i.d(t,"isResolutionMultiplierValid",(function(){return C})),i.d(t,"getMaxResolutionValue",(function(){return T})),i.d(t,"getResolutionsFromSettings",(function(){return I})),i.d(t,"convertResolutionsFromSettings",(function(){return M})),i.d(t,"mergeResolutions",(function(){return L})),i.d(t,"sortResolutions",(function(){return O})),i.d(t,"getCustomResolutions",(function(){return E})),i.d(t,"getTranslatedResolution",(function(){return V})),i.d(t,"getTranslatedResolutionModel",(function(){return D}));i("bSeV"),i("YFKU");var n,r,o,s=i("LxhU"),a=i("n5al"),l=i("Vdly"),c=i("PT1i"),u=i("IVMC"),h=i.n(u),d=i("ogJP"),p=((n={})[s.ResolutionKind.Seconds]=60,n[s.ResolutionKind.Minutes]=1440,n[s.SpecialResolutionKind.Hours]=24,n[s.ResolutionKind.Days]=365,n[s.ResolutionKind.Weeks]=52,n[s.ResolutionKind.Months]=12,n[s.ResolutionKind.Range]=1e5,n[s.ResolutionKind.Invalid]=NaN,n),_=((r={})[s.ResolutionKind.Seconds]=1,r[s.ResolutionKind.Minutes]=2,r[s.SpecialResolutionKind.Hours]=3,r[s.ResolutionKind.Days]=4,r[s.ResolutionKind.Weeks]=5,r[s.ResolutionKind.Months]=6,r[s.ResolutionKind.Range]=7,r[s.ResolutionKind.Invalid]=8,r),f=((o={})[s.ResolutionKind.Invalid]="",o[s.ResolutionKind.Seconds]=window.t("s",{context:"interval_short"}),o[s.ResolutionKind.Minutes]=window.t("m",{context:"interval_short"}),o[s.SpecialResolutionKind.Hours]=window.t("h",{context:"interval_short"}),o[s.ResolutionKind.Days]=window.t("D",{context:"interval_short"}),o[s.ResolutionKind.Weeks]=window.t("W",{context:"interval_short"}),o[s.ResolutionKind.Months]=window.t("M",{context:"interval_short"}),o[s.ResolutionKind.Range]=window.t("R",{context:"interval_short"}),o);function m(e){return s.Interval.parse(e).value()}function v(e){if(s.Interval.isRange(e))return!0;var t=m(e),i=c.linking.supportedResolutions.value(),n=!1;void 0!==i?n=-1!==i.map(m).indexOf(t):n=!0;return(c.linking.intraday.value()||s.Interval.isDWM(e))&&n}function y(e){ s.Interval.isValid(e)&&(s.Interval.isRange(e)?l.setValue("chart.lastUsedRangeResolution",e):l.setValue("chart.lastUsedTimeBasedResolution",e))}function g(e){var t=l.getValue("chart.lastUsedRangeResolution");if(void 0!==t&&s.Interval.isRange(t))return t;for(var i="100R",n=0,r=e;n0},re.prototype.onTagsChanged=function(){return this._tagsChanged},re.prototype.onSymbolIntervalChanged=function(){return this._symbolIntervalChanged},re.prototype.onIntervalChanged=function(){return this._intervalChanged},re.prototype.onStatusChanged=function(){return this._onStatusChanged},re.prototype.onStyleChanged=function(){return this._onStyleChanged},re.prototype.onRestarted=function(){return this._onRestarted},re.prototype.onBoxSizeChanged=function(){return this._boxSizeChanged},re.prototype.status=function(){return this._status},re.prototype.isDWM=function(){ if(null!==this._isDWMCached)return this._isDWMCached;var e=H.parse(this._properties.interval.value());if(e.isDWM())this._isDWMCached=!0;else{var t=e.isSeconds()?e.multiplier():60*e.multiplier();this._isDWMCached=!(t<216e3)}return this._isDWMCached},re.prototype.lastPriceLabelFixedCoordinate=function(){return this._priceAxisViews[0]._fixedCoordinate},re.prototype.createPaneView=function(){this._paneView=null,this._projectionBarsPaneView=null,this._waterlineView=null,this._priceLineView=this.hasClosePrice()?new Y(this):null;var e=this._properties.style.value();switch(e){case re.STYLE_BARS:this._paneView=new f(this,this.m_model);break;case re.STYLE_CANDLES:this._paneView=new _(this,this.m_model);break;case re.STYLE_LINE:this._paneView=new d(this,this.m_model);break;case re.STYLE_AREA:this._paneView=new h(this,this.m_model);break;case re.STYLE_HEIKEN_ASHI:this._paneView=new m(this,this.m_model);break;case re.STYLE_HOLLOW_CANDLES:this._paneView=new p(this,this.m_model);break;case re.STYLE_BASELINE:this._paneView=new v(this,this.m_model),this._waterlineView=new g(this);break;case re.STYLE_HILO:this._paneView=new y(this,this.m_model)}if(null===this._paneView)throw Error("Unknown chart style assigned: "+e)},re.prototype._clearStylePlot=function(e,t){if(0!==e.size()){var i=t||o(e.firstIndex()),n=o(e.lastIndex())+1;e.range(i,n).each((function(e,t){t[TradingView.STYLE_PLOT]=null}))}},re.prototype.invalidateBarStylesCache=function(e){D.logDebug("Invalidate style cache starting from "+e),this._clearStylePlot(this.m_data.m_bars,e),this._clearStylePlot(this.m_data.m_nsBars)},re.prototype.invalidateBarColorerCache=function(){delete this._barColorerCache,this.invalidateBarStylesCache()},re.prototype.barColorer=function(){if(this._barColorerCache)return this._barColorerCache;for(var e=null,t=this.m_model.dataSources().length-1;t>=0;t--){var i=this.m_model.dataSources()[t];if(i.metaInfo&&TradingView.isInherited(i.constructor,TradingView.Study)&&i.hasBarColorer()&&i.properties().visible.value()){var n=i.barColorer();null===e?e=n:e.pushBackBarColorer(n)}}return null===e?e=new w(this):e.pushBackBarColorer(new w(this)),this._barColorerCache=e,this._barColorerCache},re.prototype.properties=function(){return this._properties},re.prototype._barsState=function(e){var t=e.state();return t.data.forEach((function(e){e.value.splice(7,1)})),t},re.prototype.state=function(e){var t={type:this===this.m_model.mainSeries()?"MainSeries":TradingView.className(this.constructor),id:this.id(),state:this.properties().state(),zorder:this.zorder(),haStyle:this._haStyle,renkoStyle:this._renkoStyle,pbStyle:this._pbStyle,kagiStyle:this._kagiStyle,pnfStyle:this._pnfStyle,rangeStyle:this._rangeStyle};return this._symbolInfo&&this._symbolInfo.ticker&&(t.state.symbol=this._symbolInfo.ticker),e&&(t.bars=this._barsState(this.m_data.m_bars),t.nsBars=this._barsState(this.m_data.m_nsBars),t.symbolInfo=this._symbolInfo,t.rtPrice=this.data().lastProjectionPrice),t.boxSize=this.data().boxSize,t.reversalAmount=this.data().reversalAmount, t.currencyId=this.properties().currencyId.value(),t},re.prototype.restoreState=function(e,t){t&&this._setStatus(re.STATUS_SNAPSHOT),this._properties.mergeAndFire(e.state),e.currencyId&&this.properties().currencyId.setValue(e.currencyId),this._prevChartStyle=this.properties().style.value(),this.createPaneView(),t&&this.restoreData(e.bars,e.nsBars,e.symbolInfo,e.rtPrice,e.boxSize,e.reversalAmount)},re.prototype.hasStateForAlert=function(){return!1},re.prototype.stateForAlert=function(){throw new Error("Not implemented")},re.prototype.idForAlert=function(){return s.prototype.idForAlert.call(this)},re.prototype.restoreData=function(e,t,i,n,r,o){this._status=re.STATUS_SNAPSHOT,this.m_data.m_bars.restoreState(e),this.m_data.m_nsBars.restoreState(t),this.updateSymbolInfo(i,!1),this.m_data.lastProjectionPrice=n,this.m_data.boxSize=r,r||(this.properties().style.value()===re.STYLE_PNF?this.m_data.boxSize=this.properties().pnfStyle.inputs.boxSize.value():this.properties().style.value()===re.STYLE_RENKO&&(this.m_data.boxSize=this.properties().renkoStyle.inputs.boxSize.value())),this.m_data.reversalAmount=o,o||this.properties().style.value()===re.STYLE_KAGI&&(this.m_data.reversalAmount=this.properties().kagiStyle.inputs.reversalAmount.value()),this._loading=!1},re.prototype.setProperties=function(e){e.timeframe||e.merge({timeframe:""}),e.shortName||e.merge({shortName:""}),e.currencyId||e.addChild("currencyId",new n(null)),this._properties=e,this._properties.symbol.listeners().subscribe(this,re.prototype.changeSymbol),this._properties.interval.listeners().subscribe(this,re.prototype.changeInterval),this._properties.currencyId.listeners().subscribe(this,re.prototype.changeCurrency),this._properties.timeframe.listeners().subscribe(this,re.prototype.changeTimeFrame),this._properties.listeners().subscribe(this,re.prototype.changeProperties)},re.prototype.changeSymbol=function(){this.setSymbolIntervalCurrencyDelayed(),this.m_model.checkLineToolSelection()},re.prototype.changeInterval=function(){this.setSymbolIntervalCurrencyDelayed()},re.prototype.changeCurrency=function(){this.setSymbolIntervalCurrencyDelayed(),this.m_model.checkLineToolSelection(),this._currencyChanged.fire()},re.prototype.changeTimeFrame=function(){A("GUI","Change timeframe")},re.prototype.title=function(){return this.properties().symbol.value()+", "+E(this.properties().interval.value())},re.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),J.emit("series_properties_changed",this._id))},re.prototype._makeNextSymbolId=function(){return"symbol_"+this._nextSymbolId++},re.prototype._makeNextSeriesId=function(){return"s"+this._nextSeriesId++},re.prototype.onData=function(e){var t=this;switch(e.method){case"symbol_resolved":if(e.params[0]!==this._symbolId){D.logNormal("command for old symbol. Expected:"+this._symbolId+", actual"+e.params[0]);break}this.updateSymbolInfo(e.params[1],!1), this.m_model.updateSource(this),this._dataEvents.fireSymbolResolved(this._symbolInfo),this.m_model.realignLineTools(),TradingView.onWidget()||(A("Symbol",e.params[1].listed_exchange,e.params[1].name),A("Symbol Type",e.params[1].type,e.params[1].listed_exchange));var i=this.symbolInfo().minmov/this.symbolInfo().pricescale,n=this.properties();n.style.value()===re.STYLE_RENKO&&n.renkoStyle.inputs.boxSize.value()=0?0:1,basedOnPrevClose:r.change>=0?0:1}}}else{var o=this._study.data().search(i-1,h.PlotRowSearchMode.NearestLeft,1),s=o&&o.value[4]||null;if(null!==s)return{values:{change:e-s,percentChange:Object(_.a)(s,e)},priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=s?0:1}}}return{priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=t?0:1}}},e.prototype._color=function(e,t,i){var n=Object(l.resetTransparency)(f.SeriesBarColorer.upColor(this._study.properties())),r=Object(l.resetTransparency)(f.SeriesBarColorer.downColor(this._study.properties()));if(i&&!v)return t.priceDirection?n:r;var o=this._study.properties().childs().style.value();if(10===o){var s=this._study.barColorer().barStyle(e,!1);return null!=s.barBorderColor?Object(l.resetTransparency)(s.barBorderColor):Object(l.resetTransparency)(s.barColor)}var a=!1;return 0===o?a=this._study.properties().childs().barStyle.childs().barColorsOnPrevClose.value():1===o?a=this._study.properties().childs().candleStyle.childs().barColorsOnPrevClose.value():9===o&&(a=!0),a?0===t.priceDirection.basedOnPrevClose?n:r:0===t.priceDirection.basedOnCurrentBar?n:r},e}();i.d(t,"OverlayLegendValuesProvider",(function(){return w}));var w=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._showBarChange=i.properties().paneProperties.legendProperties.showBarChange,n._showSeriesOHLC=i.properties().paneProperties.legendProperties.showSeriesOHLC,n._seriesStyle=t.properties().childs().style,n}return Object(n.__extends)(t,e),t.prototype.getValues=function(t){var i=e.prototype.getValues.call(this,t);if(!this._showLastPriceAndChangeOnly()){var n=Object(r.isPriceSourceStyle)(this._seriesStyle.value()),o=this._showSeriesOHLC.value(),s=o&&!n,a=o&&n;i[0].visible=s,i[1].visible=s,i[2].visible=s,i[3].visible=s,i[6].visible=this._showBarChange.value(),i[4].visible=a}return i},t}(S)},qcGP:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Parallel Channel");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("9FRF").ParallelChannelPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.addPoint=function(e){ var t=n.prototype.addPoint.call(this,e);if(t){var i=this.points()[0];this._points[2].index=i.index,this._points[2].price=i.price+this._priceOffset}return t},s.prototype.calculatePriceDiff=function(){if(3===this.points().length){var e=this.points()[0],t=this.points()[1],i=this.points()[2];if(e.index===t.index)return;var n=this.priceScale();if(null===n)return;if(n.isLog()){var r=this._model.timeScale();if(r.isEmpty())return;var o=this.ownerSource().firstValue(),s=r.indexToCoordinate(e.index),a=r.indexToCoordinate(t.index),l=n.priceToCoordinate(e.price,o),c=n.priceToCoordinate(t.price,o),u=l+(m=(c-l)/(a-s))*(r.indexToCoordinate(i.index)-s),h=n.priceToCoordinate(i.price,o)-u,d=(o=this.ownerSource().firstValue(),.5*(l+c)),p=n.coordinateToPrice(d,o),_=d+h,f=n.coordinateToPrice(_,o);this._priceOffset=f-p}else{var m=(t.price-e.price)/(t.index-e.index),v=e.price+m*(i.index-e.index);this._priceOffset=i.price-v}}},s.prototype.setLastPoint=function(e,t){t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[0]),n.prototype.setLastPoint.call(this,e),this.calculatePriceDiff()},s.prototype.restorePoints=function(e,t,i){n.prototype.restorePoints.call(this,e,t,i),e&&e.length>=3&&(this._priceOffset=e[2].price-e[0].price)},s.prototype.setPoint=function(e,t,i){i&&i.shift()&&e<2&&this._snapPoint45Degree(t,this.points()[1-e]),n.prototype.setPoint.call(this,e,t,i),2===e&&this.calculatePriceDiff();var r=this.points()[0];this._points[2].index=r.index,this._points[2].price=r.price+this._priceOffset,this.normalizePoints()},s.prototype.setPoints=function(e){n.prototype.setPoints.call(this,e),this.calculatePriceDiff()},s.prototype.pointsCount=function(){return 3},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Parallel Channel"},s.prototype.hasEditableCoordinates=function(){return!1},s.prototype.addPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[0]),n.prototype.addPoint.call(this,e,t)},s.prototype.fixAfterRestorePriceAxis=function(){this.priceScale().isLog()||delete this._priceOffset},s.prototype.cloneData=function(e){this._priceOffset=e._priceOffset},s.prototype.restoreData=function(e){e.priceOffset&&(this._priceOffset=e.priceOffset)},s.prototype.state=function(e){var t=n.prototype.state.call(this,e);return t.priceOffset=this._priceOffset,t},s.prototype.canHasAlert=function(){return!0},s.prototype._getAlertPlots=function(){var e=[].concat(this._points).splice(0,2);function t(e,t){return e.index<=t.index?[e,t]:[t,e]}var i,n,r,o,s=t((e=e.concat([{price:e[0].price+this._priceOffset,time:e[0].time,index:e[0].index},{price:e[1].price+this._priceOffset,time:e[1].time,index:e[1].index}]))[0],e[1]),a=t(e[2],e[3]);this._priceOffset<0?(n=a,i=s):(n=s,i=a);var l=this.properties().extendLeft.value(),c=this.properties().extendRight.value();return e[0].index<=e[1].index?(r=l,o=c):(r=c,o=l),[this._linePointsToAlertPlot(i,"Upper",r,o),this._linePointsToAlertPlot(n,"Lower",r,o)]},s.prototype._getPropertyDefinitionsViewModelClass=function(){ return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("VkdP").ParallelChannelDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolparallelchannel",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolParallelChannel=s},qckB:function(e,t){e.exports=''},qgcC:function(e,t,i){"use strict";i.r(t),i.d(t,"CompareStatusProvider",(function(){return r}));var n=i("mrSG"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype.getSplitTitle=function(){return this._source.titleInParts(!0,void 0,!1,!1)},t.prototype.text=function(){return this._source.isFailed()?this._source.title(!0,void 0,!1,!1)+": "+this._source.status():this._source.title(!0,void 0,!1,!1)+" "+this._source.status()},t}(i("W+6j").a)},qgcf:function(e,t,i){"use strict";i.r(t),i.d(t,"calculateLabelPosition",(function(){return _})),i.d(t,"wordWrap",(function(){return m})),i.d(t,"TextRenderer",(function(){return M}));var n,r=i("aO4+"),o=i("GEp6"),s=i("Eyy1"),a=i("f6yo"),l=i("Ialn"),c=i("VdBB"),u=i("jFln"),h=i("ogJP"),d=i("ikwP"),p=i("8Uy/");function _(e,t,i,n,o){var s=.5*(t.x+i.x),a=i.y;return t.y>i.y?(a-=e.height/2+n.y,a=Math.max(e.height/2,a)):(a+=e.height/2+n.y,a=Math.min(o-e.height/2,a)),new r.Point(s,a)}function f(){var e=document.createElement("canvas");e.width=0,e.height=0,n=Object(s.ensureNotNull)(e.getContext("2d"))}function m(e,t,i){n||f(),i=Object(h.isString)(i)?parseInt(i):i;var r=(e+="").split(/[^\S\r\n]*(?:\r\n|\r|\n|$)/);if(r[r.length-1]||r.pop(),!Object(h.isNumber)(i)||!isFinite(i)||i<=0)return r;n.font=t;for(var o=[],s=0;s0&&n.measureText(c.slice(0,3*--d-1).join("")).width>i;);if(d>0)o.push(c.slice(0,3*d-1).join("")),c.splice(0,3*d);else{var p=c[0]+(c[1]||"");if(u=1===u?1:~~(i/n.measureText(p).width*p.length),n.measureText(p.substr(0,u)).width<=i)for(;n.measureText(p.substr(0,u+1)).width<=i;)u++;else for(;u>1&&n.measureText(p.substr(0,--u)).width>i;);u<1&&(u=1),o.push(p.substr(0,u)),c[0]=p.substr(u),c[1]=""}if(n.measureText(c.join("")).width<=i){o.push(c.join(""));break}}}return o}function v(e,t,i){if(0===i)return e.clone();var n=(e.x-t.x)*Math.cos(i)-(e.y-t.y)*Math.sin(i)+t.x,o=(e.x-t.x)*Math.sin(i)+(e.y-t.y)*Math.cos(i)+t.y;return new r.Point(n,o)}function y(e,t){return t+2*P(e)+2*S(e)}function g(e,t){return x(e)*t+C(e)*(t-1)+2*w(e)+2*b(e)} function b(e){return void 0!==e.boxPaddingVert?e.boxPaddingVert*I(e):void 0!==e.boxPadding?e.boxPadding*I(e):x(e)/3}function S(e){return void 0!==e.boxPaddingHorz?e.boxPaddingHorz*I(e):void 0!==e.boxPadding?e.boxPadding*I(e):x(e)/3}function w(e){return(e.backgroundVertInflate||0)*I(e)}function P(e){return(e.backgroundHorzInflate||0)*I(e)}function C(e){return(e.padding||0)*I(e)}function x(e){return Math.ceil(T(e)*I(e))}function T(e){return e.fontsize||e.fontSize||30}function I(e){var t=Math.min(1,Math.max(.2,Math.min(e.scaleX||1,e.scaleY||1)));if(1===t)return t;var i=T(e);return Math.ceil(t*i)/i}var M=function(){function e(e,t){this._data=null,this._internalData=null,this._boxSize=null,this._linesInfo=null,this._fontInfo=null,this._hittest=t||new c.HitTestResult(c.HitTestResult.MOVEPOINT),void 0!==e&&this.setData(e)}return e.prototype.setData=function(e){!function(e,t){if(null===e||null===t)return null===e==(null===t);if(void 0===e.points!=(void 0===t.points))return!1;if(void 0!==e.points&&void 0!==t.points){if(e.points.length!==t.points.length)return!1;for(var i=0;ih?(t=new r.Point(l+h/2,c+h/2),i=new r.Point(l+u-h/2,c+h/2),n=h/2):(t=new r.Point(l+u/2,c+u/2),i=new r.Point(l+u/2,c+h-u/2),n=u/2);var p=v(t,d,s),_=v(i,d,s);return Object(o.distanceToSegment)(p,_,e).distance<=n?this._hittest:null},e.prototype.doesIntersectWithBox=function(e){return null!==this._data&&void 0!==this._data.points&&0!==this._data.points.length&&Object(a.pointInBox)(this._data.points[0],e)},e.prototype.measure=function(){if(null===this._data)return{width:0,height:0};var e=this._getBoxSize();return{width:e.boxWidth,height:e.boxHeight}},e.prototype.setPoints=function(e,t){Object(s.ensureNotNull)(this._data).points=e,this._hittest=t||new c.HitTestResult(c.HitTestResult.MOVEPOINT)},e.prototype.fontStyle=function(e){return null===this._data?"":this._getFontInfo().fontStyle}, e.prototype.wordWrap=function(e,t,i){return m(e,i||this.fontStyle(),t)},e.prototype.draw=function(e,t){if(null!==this._data&&void 0!==this._data.points&&0!==this._data.points.length){var i=t.pixelRatio,n=this._getInternalData(),r=this._getRotationPoint().scaled(i);e.save(),e.translate(r.x,r.y),e.rotate(this._data.angle||0),e.translate(-r.x,-r.y);var o=this._getFontInfo().fontSize;e.textBaseline=n.textBaseLine,e.textAlign=n.textAlign,e.font=this.fontStyle();var s=function(e,t){var i=Math.round(e.boxLeft*t),n=Math.round(e.boxTop*t);return{scaledLeft:i,scaledRight:i+Math.round(e.boxWidth*t),scaledTop:n,scaledBottom:n+Math.round(e.boxHeight*t)}}(n,i),a=s.scaledLeft,l=s.scaledRight,c=s.scaledTop,h=s.scaledBottom;if(this._data.backgroundColor||this._data.borderColor||this._data.highlightBorder&&this._data.wordWrapWidth){var _=Math.round(Math.max(o/12,1)*i),f=_/2;if(this._data.backgroundRoundRect)this._data.backgroundColor&&(Object(u.drawRoundRect)(e,a,c,l-a,h-c,this._data.backgroundRoundRect*i),e.fillStyle=this._data.backgroundColor,e.fill()),this._data.borderColor&&(Object(u.drawRoundRect)(e,a-f,c-f,l-a+_,h-c+_,this._data.backgroundRoundRect*i),e.strokeStyle=this._data.borderColor,e.lineWidth=_,e.stroke());else if(this._data.backgroundColor&&(e.fillStyle=this._data.backgroundColor,e.fillRect(a,c,l-a,h-c)),this._data.borderColor||this._data.highlightBorder){var m=void 0;this._data.borderColor?(e.strokeStyle=this._data.borderColor,m=_):(e.strokeStyle=this._data.color,Object(u.setLineStyle)(e,p.LINESTYLE_DASHED),m=Math.max(1,Math.floor(i))),e.lineWidth=m,e.beginPath(),e.moveTo(a-m/2,c-m/2),e.lineTo(a-m/2,h+m/2),e.lineTo(l+m/2,h+m/2),e.lineTo(l+m/2,c-m/2),e.lineTo(a-m/2,c-m/2),e.stroke()}}e.fillStyle=this._data.color;for(var v=(a+Math.round(n.textStart*i))/i,y=.05*o,g=(c+Math.round((n.textTop+y)*i))/i,b=C(this._data),S=function(t){Object(d.drawScaled)(e,i,(function(){return e.fillText(t,v,g)})),g+=o+b},w=0,P=this._getLinesInfo().lines;wi&&(t=t.slice(0,i))}this._linesInfo={linesMaxWidth:this._getLinesMaxWidth(t),lines:t}}return this._linesInfo},e.prototype._getFontInfo=function(){if(null===this._fontInfo){var e=Object(s.ensureNotNull)(this._data),t=x(e),i=(e.bold?"bold ":"")+(e.italic?"italic ":"")+t+"px "+e.font;this._fontInfo={fontStyle:i,fontSize:t}}return this._fontInfo},e.prototype._getBoxSize=function(){if(null===this._boxSize){var e=this._getLinesInfo(),t=Object(s.ensureNotNull)(this._data);this._boxSize={boxWidth:y(t,e.linesMaxWidth),boxHeight:g(t,e.lines.length)}}return this._boxSize},e.prototype._getRotationPoint=function(){var e,t,i=this._getInternalData(),n=i.boxLeft,o=i.boxTop,a=i.boxWidth,l=i.boxHeight,c=Object(s.ensureNotNull)(this._data),u=c.horzAlign,h=c.vertAlign;switch(u){case"center":e=n+a/2;break;case"left":e=n;break;case"right":e=n+a}switch(h){case"middle":t=o+l/2;break;case"top":t=o;break;case"bottom":t=o+l}return new r.Point(e,t)},e}()},qocr:function(e,t,i){"use strict";function n(e,t){void 0===t&&(t=!1),("attachEvent"in document?"complete"===document.readyState:"loading"!==document.readyState)?t?setTimeout((function(){return e()}),1):e():document.addEventListener("DOMContentLoaded",(function(){return e()}))}i.d(t,"a",(function(){return n}));new Promise((function(e){n(e)}))},qySK:function(e,t,i){"use strict";i.d(t,"b",(function(){return c})),i.d(t,"a",(function(){return u}));var n=i("Eyy1"),r=i("JmuD"),o=i("fFKx"),s=i("SqfW"),a=i("7Fue"),l=i("xWfy");function c(e){if(!Object(r.isObject)(e))throw new Error("Graphics commands should be wrapped in an object");if(Object(r.hasProperty)(e,"create"),Object(r.hasProperty)(e,"erase")){var t=e.erase;Object(n.assert)(Array.isArray(t),"Collection of erase commands should be array");for(var i=0,o=t;ii?i/m:1,_+=y.lineHeight*y.zoom}}var v=Math.max((e-_)/2,0);for(f=0;f=r}},s9sR:function(e,t,i){"use strict";i.r(t),i.d(t,"SetResolutionUndoCommand",(function(){return a}));var n=i("mrSG"),r=i("RDU5"),o=i("LxhU"),s=i("n5al"),a=function(e){function t(t,i,n,r){var o=e.call(this,r)||this;return o._property=t,o._value=i,o._prevValue=t.value(),o._chartWidget=n,o}return Object(n.__extends)(t,e),t.prototype.redo=function(){this._chartWidget.screen.show(),this._property.setValue(this._value),this._handleResolution(this._value)},t.prototype.undo=function(){ this._chartWidget.screen.show(),this._property.setValue(this._prevValue),this._handleResolution(this._prevValue)},t.prototype._handleResolution=function(e){var t=this._chartWidget.model().mainSeries().properties(),i=t.style.value(),n=Object(s.isRangeStyle)(i),r=o.Interval.isRange(e);!n&&r?t.style.setValue(11):n&&!r&&t.style.setValue(Object(s.getLastUsedStyle)())},t}(r.UndoCommand)},sEk5:function(e,t,i){"use strict";var n=i("fTGZ").BarsMarksContainer,r=i("BOPY").BarMarkTooltip,o=i("mMWL");function s(e){n.call(this,e),this.toolname="UserDefinedBarsMarks";var t=this;o.hideMarksOnBars().subscribe(this,(function(){t._properties.visible.setValue(!o.hideMarksOnBars().value())}))}function a(e){r.call(this)}inherit(s,n),s.prototype._initialize=function(e){this._properties.visible.setValue(!0)},s.prototype.userEditEnabled=function(){return!1},s.prototype._plateViewData=function(e){var t={text:e.text};return"object"==typeof e.color&&(t.theme="user_defined_theme",t.overridedTheme={},t.overridedTheme.border=e.color.border,t.overridedTheme.background=e.color.background),t},s.prototype.onClicked=function(e){var t=e.id;this._marks[t].onClicked()},s.prototype.clearMarks=function(){n.prototype.clearMarks.call(this),this.onNeedRepaint.fire()},s.prototype._getData=function(e){var t=this._model.mainSeries().symbolInfo();if(t){var i=this.roundRange(this._rangeDifference(e)),n=this,r=this._model.mainSeries().properties().interval.value();ChartApiInstance.getMarks(t,i.start,i.end,(function(t){t.forEach((function(e){n._marks[e.id]=e}),n),n._loadedRange=n._rangeUnion(e,n._loadedRange),n.onNeedRepaint.fire()}),r)}},s.prototype._createTooltip=function(){return new a},s.prototype.updatePlateData=function(e,t){return t.barWidth=this.barWidth(),t.text=e.text,t.tooltipMargin=-1*Math.max(e.minSize/2,.4*this.barWidth()),t},s.prototype.hasContextMenu=function(){return!1},s.prototype.calcIsActualCurrency=function(){this._isActualCurrency=!0},inherit(a,r),a.prototype._createLayout=function(){this._layout=$('
'),this._layout_text=$('
').appendTo(this._layout)},a.prototype._updatePlate=function(e){this._currentId=e.id,this._layout.css("border-color",e.theme.border),this._layout.css("margin-top",e.tooltipMargin+"px"),this._layout_text.html(e.text),this._layout.append(this._layout_text)},e.exports=s},sJA2:function(e,t,i){"use strict";i.r(t);var n=i("EsvI"),r=i("oiZD");i.d(t,"ThemesApi",(function(){return o}));var o=function(){function e(e){this._opts=e}return e.prototype.isStdTheme=function(){var e=this._opts.chartWidgetCollection.getAll().every((function(e){return Object(n.isStdTheme)(Object(n.extractThemeFromModel)(e.model()))}));return Promise.resolve(e)},e.prototype.setStdTheme=function(e,t,i){return void 0===t&&(t=!0),Object(n.loadTheme)(e,!0,!1,this._opts.chartWidgetCollection,t,i).then((function(){}))},e.prototype.setStdThemeForLayout=function(e,t){void 0===t&&(t=!0),Object(r.setTheme)(e),t&&Object(n.syncTheme)()},e.prototype.getCurrentThemeName=function(){ return Object(n.getCurrentTheme)().name},e}()},t2ex:function(e,t,i){"use strict";var n=i("5rJj"),r=i("Ss5c").LineDataSource,o=i("ytGH").LineToolWidthsProperty,s=window.t("Fib Retracement");function a(e,t){var n=t||a.createProperties();r.call(this,e,n),this.version=a.version,this._properties._stateVersion=1,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 s=[this._properties.child("trendline").child("linewidth"),this._properties.child("levelsStyle").child("linewidth")];this._widthsProperty=new o(s)}inherit(a,r),a.version=2,a.LevelsCount=24,a.prototype.levelsCount=function(){return a.LevelsCount},a.prototype.pointsCount=function(){return 2},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Fib Retracement"},a.prototype.migrateVersion=function(e,t,i){1===e&&this.properties().extendLines.setValue(!0)},a.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("17v9").FibDrawingsWith24LevelsDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetoolfibretracement",e,!1,{range:[1,24],names:["coeff","color","visible"]});return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},a.prototype.fibLevelsBasedOnLogScale=function(){return this.properties().fibLevelsBasedOnLogScale.value()&&this.priceScale().isLog()},t.LineToolFibRetracement=a},tBG4:function(e,t,i){"use strict";i.r(t),i.d(t,"SeriesStatusView",(function(){return s}));var n=i("mrSG"),r=i("nBJD"),o=i("WPIy"),s=function(e){function t(t,i,n){var r=e.call(this,new o.a(t,i,n))||this;return r._invalidated=!0,r._series=t,r._series.onRestarted().subscribe(r,r.update),r._series.dataEvents().symbolResolved().subscribe(r,r.update),r._series.dataEvents().completed().subscribe(r,r.update),r._series.onBoxSizeChanged().subscribe(r,r.update),n.childs().symbolTextSource.listeners().subscribe(r,r.update),r}return Object(n.__extends)(t,e),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(){this._invalidated=!0},t.prototype.text=function(){return this._updateImpl(),e.prototype.text.call(this)},t.prototype.color=function(){return this._updateImpl(),e.prototype.color.call(this)},t.prototype.bold=function(){return this._updateImpl(),e.prototype.bold.call(this)},t.prototype.size=function(){return this._updateImpl(),e.prototype.size.call(this)},t.prototype.getSplitTitle=function(){return this._updateImpl(),this._statusProvider.getSplitTitle()},t.prototype._updateImpl=function(){ this._invalidated&&(this._bold=this._statusProvider.bold(),this._size=this._statusProvider.size(),this._text=this._statusProvider.text(),this._invalidated=!1)},t}(r.a)},tDUI:function(e,t,i){"use strict";(function(e){var n=i("Eyy1").ensureNotNull,r=i("Ss5c").LineDataSource,o=i("gMtF").LineToolRiskRewardPriceAxisView,s=i("mMWL"),a=i("Ocx9").DefaultProperty,l=i("zXvd").NumericFormatter,c=i("wGNx").RiskRewardPointIndex,u=i("ogJP").isNumber,h=window.t("Risk/Reward"),d=window.t("Risk/Reward short");function p(t,n){var s=n;if(r.call(this,t,s),!n.stopLevel&&!n.profitLevel){var a=t.timeScale().visibleBarsStrictRange(),c=a.firstBar(),u=a.lastBar(),h=t.mainSeries().priceRange(c,u),d=t.mainSeries().priceScale();if(d.isLog()){var _=d.logicalToPrice(h.minValue()),f=d.logicalToPrice(h.maxValue());h=new e(_,f)}if(h&&!h.isEmpty()){var m=Math.round(.2*h.length()*t.mainSeries().base());s.merge({stopLevel:m,profitLevel:m})}}var v=this;s.stopLevel.listeners().subscribe(this,this.recalculate),s.stopLevel.listeners().subscribe(null,(function(){v.properties().stopPrice._listeners.fire(v.properties().stopPrice)})),s.profitLevel.listeners().subscribe(this,this.recalculate),s.profitLevel.listeners().subscribe(null,(function(){v.properties().targetPrice._listeners.fire(v.properties().targetPrice)})),s.addChild("entryPrice",new p.PriceProperty(this,0)),s.addChild("stopPrice",new p.StopPriceProperty(this)),s.addChild("targetPrice",new p.TargetPriceProperty(this)),s.addProperty("riskSize",250),s.addProperty("qty",0),s.addProperty("amountTarget",s.accountSize.value()),s.addProperty("amountStop",s.accountSize.value()),this._riskInPercentsFormatter=new l(2),this._riskInMoneyFormatter=new l,s.risk.subscribe(this,this._recalculateRiskSize),s.accountSize.subscribe(this,this._recalculateRiskSize),s.riskDisplayMode.subscribe(this,this._recalculateRisk),s.riskDisplayMode.subscribe(this,this._recalculateRiskSize),s.entryPrice.subscribe(this,this._recalculateRiskSize),s.stopPrice.subscribe(this,this._recalculateRiskSize),s.profitLevel.subscribe(this,this._recalculateRiskSize),s.profitLevel.subscribe(this,this._syncPriceLevels.bind(this)),s.stopLevel.subscribe(this,this._recalculateRiskSize),s.stopLevel.subscribe(this,this._syncPriceLevels.bind(this)),s.qty.subscribe(this,this._recalculateRiskSize),"percents"===s.riskDisplayMode.value()&&s.risk.value()>100&&s.riskDisplayMode.setValueSilently("money"),this._syncStateExclusions=["points","entryPrice","stopPrice","targetPrice","stopLevel","profitLevel","riskSize","qty","amountTarget","amountStop","risk","accountSize"],this.version=p.version,this._entryPriceAxisView=new o(this,{colorProperty:s.linecolor,priceProperty:s.entryPrice}),this._stopPriceAxisView=new o(this,{colorProperty:s.stopBackground,priceProperty:s.stopPrice}),this._profitPriceAxisView=new o(this,{colorProperty:s.profitBackground,priceProperty:s.targetPrice}),i.e("lt-pane-views").then(function(e){var t=i("u+oH").RiskRewardPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}function _(e,t){ var i=t||_.createProperties();p.call(this,e,i);var n=this.properties();n.entryPrice.subscribe(this,this._recalculateQty),n.stopPrice.subscribe(this,this._recalculateQty),n.riskSize.subscribe(this,this._recalculateQty),n.entryPrice.subscribe(this,this._recalculateAmount),n.profitLevel.subscribe(this,this._recalculateAmount),n.stopLevel.subscribe(this,this._recalculateAmount),n.accountSize.subscribe(this,this._recalculateAmount),n.riskSize.subscribe(this,this._recalculateAmount),n.qty.subscribe(this,this._recalculateAmount)}function f(e,t){var i=t||f.createProperties();p.call(this,e,i);var n=this.properties();n.entryPrice.subscribe(this,this._recalculateQty),n.stopPrice.subscribe(this,this._recalculateQty),n.riskSize.subscribe(this,this._recalculateQty),n.entryPrice.subscribe(this,this._recalculateAmount),n.profitLevel.subscribe(this,this._recalculateAmount),n.stopLevel.subscribe(this,this._recalculateAmount),n.accountSize.subscribe(this,this._recalculateAmount),n.riskSize.subscribe(this,this._recalculateAmount),n.qty.subscribe(this,this._recalculateAmount)}inherit(p,r),p.prototype.riskFormatter=function(e){return"percents"===e?this._riskInPercentsFormatter:this._riskInMoneyFormatter},p.prototype.getRiskStep=function(e){return"percents"===e?.01:1},p.prototype._roundValue=function(e){return parseFloat(e.toFixed(2))},p.prototype.hasEditableCoordinates=function(){return!1},p.prototype._recalculateRisk=function(){var e=this.properties(),t=e.riskDisplayMode.value(),i=e.riskSize.value(),n=e.accountSize.value(),r=e.risk.value();r="percents"===t?this._roundValue(i/n*100):this._roundValue(n/100*r),this._riskInChange=!0,e.risk.setValue(this.riskFormatter(t).format(r)),this._riskInChange=!1},p.prototype._recalculateRiskSize=function(){if(!this._riskInChange){var e=this.properties(),t=e.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)}},p.version=2,p.prototype.lastBarData=function(){var e=this._model.mainSeries().bars().firstIndex(),t=this._model.mainSeries().bars().lastIndex();if(null===e||null===t||isNaN(e)||isNaN(t))return null;var i=this.points();if(4===i.length){var r=i[c.ActualClose];return r.index=1){var n=[];if(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){var r=[],o=this._timePoint[0];r.push(o);var 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}}},p.prototype.checkAlert=function(){this.recalculate()}, p.prototype.priceAxisViews=function(e,t){return this.isSourceHidden()||t!==this.priceScale()||this._model.paneForSource(this)!==e?null:[this._entryPriceAxisView,this._stopPriceAxisView,this._profitPriceAxisView]},p.prototype.updateAllViews=function(){this.isActualSymbol()&&this._properties.visible.value()&&(s.hideAllDrawings().value()&&this.userEditEnabled()||(r.prototype.updateAllViews.call(this),this._entryPriceAxisView.update(),this._stopPriceAxisView.update(),this._profitPriceAxisView.update()))},p.prototype.restoreExternalState=function(e){(e=Object.assign({},e),this.isActualSymbol())||u(e.entryPrice)&&(this._timePoint[0].price=e.entryPrice,delete e.entryPrice);this.properties().merge(e)},p.prototype._changeEntryPoint=function(e){var t=this.properties().stopPrice.value(),i=this.properties().targetPrice.value(),n=1/this._model.mainSeries().base(),o=Math.min(t,i)+n,s=Math.max(t,i)-n;e.price=Math.max(o,Math.min(s,this._roundPrice(e.price))),r.prototype.setPoint.call(this,0,e),this.properties().stopPrice.setValue(t),this.properties().targetPrice.setValue(i)},p.prototype.setPoint=function(e,t,i){if(this.isActualSymbol()){switch(this._muteSyncLineStyle(),e){case 0:this._changeEntryPoint(t);break;case 2:this.properties().stopPrice.setValue(this.preparseStopPrice(t.price));break;case 3:this.properties().targetPrice.setValue(this.preparseProfitPrice(t.price));break;case 1:t.price=this._roundPrice(t.price),r.prototype.setPoint.call(this,1,t),this.recalculate()}this._unmuteSyncLineStyleWithoutApplyingChanges(),this._syncPriceLevels()}},p.prototype.setPoints=function(e){this._muteSyncLineStyle(),r.prototype.setPoints.call(this,e),this.recalculate(),this._unmuteSyncLineStyleWithoutApplyingChanges(),this._syncPriceLevels()},p.prototype._syncPriceLevels=function(){if(this.linkKey){var e=this.properties(),t={entryPrice:e.entryPrice.value(),stopLevel:e.stopLevel.value(),profitLevel:e.profitLevel.value()};s.changeLineStyle({linkKey:this.linkKey,state:t,model:this._model})}},p.PriceProperty=function(e,t){r.PointPriceProperty.call(this,e,t)},inherit(p.PriceProperty,r.PointPriceProperty),p.PriceProperty.prototype.setValue=function(e){var t=this._lineSource.points()[this._pointIndex];t.price=parseFloat(e),this._lineSource.setPoint(this._pointIndex,t),this._lineSource.recalculate(),this._lineSource._model.updateSource(this._lineSource),this._listeners.fire(this),this._lineSource.endChanging(),this._lineSource._syncPriceLevels()},p.PriceProperty.prototype.state=function(){return this.value()},p.PriceProperty.prototype.merge=function(e,t){return this.setValue(e),t?[]:null},p.StopPriceProperty=function(e){p.PriceProperty.call(this,e,1)},inherit(p.StopPriceProperty,p.PriceProperty),p.StopPriceProperty.prototype.value=function(){var e=this._lineSource.stopPrice(),t=this._lineSource.ownerSource().formatter();return t.parse(t.format(e)).value},p.StopPriceProperty.prototype.setValue=function(e){var t=Math.round(Math.abs(e-this._lineSource.entryPrice())*this._lineSource._model.mainSeries().base()) ;this._lineSource.properties().stopLevel.setValue(t),this._lineSource._syncPriceLevels()},p.TargetPriceProperty=function(e){p.PriceProperty.call(this,e,2)},inherit(p.TargetPriceProperty,p.PriceProperty),p.TargetPriceProperty.prototype.value=function(){var e=this._lineSource.profitPrice(),t=this._lineSource.ownerSource().formatter();return t.parse(t.format(e)).value},p.TargetPriceProperty.prototype.setValue=function(e){var t=Math.round(Math.abs(e-this._lineSource.entryPrice())*this._lineSource._model.mainSeries().base());this._lineSource.properties().profitLevel.setValue(t),this._lineSource._syncPriceLevels()},p.prototype.pointsCount=function(){return 1},p.prototype.translatedType=function(){return""},p.prototype.name=function(){return"Risk/Reward"},p.prototype.addPoint=function(e){e.price=this._roundPrice(e.price),r.prototype.addPoint.call(this,e,null,!0);var t={price:e.price,index:e.index+50};r.prototype._addPointIntenal.call(this,t,null,!0);var i=this.calculateActualEntry(e,t);i&&(r.prototype._addPointIntenal.call(this,i,null,!0),(t=this.findClosePoint(i,t))&&r.prototype._addPointIntenal.call(this,t,null,!0));return this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0},p.prototype.setOwnerSource=function(e){r.prototype.setOwnerSource.call(this,e),this._model.mainSeries().symbolInfo()&&(this._recalculateAmount(),this._recalculateQty())},p.prototype._roundPrice=function(e){var t=this._model.mainSeries().base();return Math.round(e*t)/t},p.prototype.recalculate=function(){if(0!==this.points().length){var 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]);if(n){i.push(n);var r=this.findClosePoint(n,this.points()[1]);r&&i.push(r)}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)}},p.prototype.start=function(){r.prototype.start.call(this),this.recalculate()},p.prototype.startMoving=function(e,t,i){e.logical.price=this._roundPrice(e.logical.price),r.prototype.startMoving.call(this,e,t,i)},p.prototype.move=function(e,t,i){e.logical.price=this._roundPrice(e.logical.price),r.prototype.move.call(this,e,t,i),this.recalculate(),this._entryPriceAxisView.update()},p.prototype.correctPoints=function(e){return!!this.isActualSymbol()&&r.prototype.correctPoints.call(this,[e[0],e[1]])},p.prototype.entryPrice=function(){return this.points()[0].price},p.prototype.findClosePoint=function(e,t){for(var i=this._model.mainSeries().bars(),r=n(i.firstIndex()),o=Math.max(e.index,r),s=n(i.lastIndex()),a=Math.min(s,t.index),l=o;l<=a;l++){var c=n(i.valueAt(l)),u=this.checkStopPrice(c);if(null!=u)return{index:l,price:u}}return null},p.prototype.calculateActualEntry=function(e,t){ for(var i=this._model.mainSeries().bars(),r=n(i.firstIndex()),o=Math.max(e.index,r),s=e.price,a=n(i.lastIndex()),l=Math.min(a,t.index),c=o;c<=l;c++){var u=n(i.valueAt(c));if(u[TradingView.HIGH_PLOT]>=s&&u[TradingView.LOW_PLOT]<=s)return{index:c,price:s}}return null},p.prototype.axisPoints=function(){if(!this._points[c.ActualEntry])return[];var e=this._points[c.ActualEntry],t=null;if(4===this._points.length)t=this._points[c.ActualClose];else{var i=this.lastBarData();if(!i)return[];t={index:i.index,price:i.closePrice}}return[e,t]},p.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("RYNR").RiskRewardDefinitionsViewModel}.bind(null,i)).catch(i.oe)},p.prototype.template=function(){var e=this.properties(),t=r.prototype.template.call(this);return t.stopLevel=e.stopLevel.value(),t.profitLevel=e.profitLevel.value(),t},p.prototype._applyTemplateImpl=function(e){delete e.targetPrice,delete e.stopPrice,delete e.entryPrice,r.prototype._applyTemplateImpl.call(this,e);var t=this.properties();void 0!==e.stopLevel&&t.stopLevel.setValue(e.stopLevel),void 0!==e.profitLevel&&t.profitLevel.setValue(e.profitLevel)},p.prototype.getOrderTemplate=function(){return null},p.prototype._propertiesStateExclusions=function(){return["entryPrice","stopPrice","targetPrice"]},p._configureProperties=function(e){r._configureProperties(e),e.addExclusion("stopLevel"),e.addExclusion("profitLevel"),e.addExclusion("stopPrice"),e.addExclusion("targetPrice"),e.addExclusion("entryPrice")},p.prototype._roundQty=function(e){var t=this._model.mainSeries().symbolInfo();return"bitcoin"===t.type||"crypto"===t.type?Math.round(1e3*e)/1e3:Math.floor(e)},inherit(_,p),_.prototype._recalculateQty=function(){if(0!==this.points().length){var e=this.properties(),t=e.entryPrice.value(),i=e.stopPrice.value(),n=e.riskSize.value(),r=this._model.mainSeries().pointValue(),o=this._roundQty(n/(Math.abs(i-t)*r));e.qty.setValue(o)}},_.prototype._recalculateAmount=function(){if(0!==this.points().length){var e=this.properties(),t=e.accountSize.value(),i=e.entryPrice.value(),n=e.qty.value(),r=e.stopPrice.value(),o=e.targetPrice.value(),s=this._model.mainSeries().pointValue(),a=this._roundValue(t+(i-o)*n*s),l=this._roundValue(t-(r-i)*n*s);e.amountTarget.setValue(a),e.amountStop.setValue(l)}},_.prototype.translatedType=function(){return d},_.prototype.name=function(){return"Risk/Reward short"},_.prototype.stopPrice=function(){return this.entryPrice()+this.properties().stopLevel.value()/this._model.mainSeries().base()},_.prototype.profitPrice=function(){return this.entryPrice()-this.properties().profitLevel.value()/this._model.mainSeries().base()},_.prototype.calculatePL=function(e){return this.entryPrice()-e},_.prototype.preparseStopPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()+1/this._model.mainSeries().base();return Math.max(e,t)},_.prototype.preparseProfitPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()-1/this._model.mainSeries().base() ;return Math.min(e,t)},_.prototype.checkStopPrice=function(e){var t=this.stopPrice(),i=this.profitPrice();return e[TradingView.HIGH_PLOT]>=t?this.stopPrice():e[TradingView.LOW_PLOT]<=i?this.profitPrice():null},_.prototype._orderSide=function(){throw new Error("not supported")},_.createProperties=function(e){var t=new a("linetoolriskrewardshort",e);return _._configureProperties(t),t},_._configureProperties=function(e){p._configureProperties(e)},inherit(f,p),f.prototype._recalculateQty=function(){if(0!==this.points().length){var e=this.properties(),t=e.entryPrice.value(),i=e.stopPrice.value(),n=e.riskSize.value(),r=this._model.mainSeries().pointValue(),o=this._roundQty(n/(Math.abs(t-i)*r));e.qty.setValue(o)}},f.prototype._recalculateAmount=function(){if(0!==this.points().length){var e=this.properties(),t=e.accountSize.value(),i=e.entryPrice.value(),n=e.qty.value(),r=e.stopPrice.value(),o=e.targetPrice.value(),s=this._model.mainSeries().pointValue(),a=this._roundValue(t+(o-i)*n*s),l=this._roundValue(t-(i-r)*n*s);e.amountTarget.setValue(a),e.amountStop.setValue(l)}},f.prototype.stopPrice=function(){return this.entryPrice()-this.properties().stopLevel.value()/this._model.mainSeries().base()},f.prototype.profitPrice=function(){return this.entryPrice()+this.properties().profitLevel.value()/this._model.mainSeries().base()},f.prototype.calculatePL=function(e){return e-this.entryPrice()},f.prototype.preparseStopPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()-1/this._model.mainSeries().base();return Math.min(e,t)},f.prototype.preparseProfitPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()+1/this._model.mainSeries().base();return Math.max(e,t)},f.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},f.prototype.translatedType=function(){return h},f.prototype.name=function(){return"Risk/Reward long"},f.prototype._orderSide=function(){throw new Error("not supported")},f.createProperties=function(e){var t=new a("linetoolriskrewardlong",e);return f._configureProperties(t),t},f._configureProperties=function(e){p._configureProperties(e)},t.LineToolRiskRewardLong=f,t.LineToolRiskRewardShort=_}).call(this,i("Qb4w").PriceRange)},tG6Q:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Cyclic Lines");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("GS+0").LineToolCircleLinesPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 2},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Cyclic Lines"},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("LX4V").CyclicAndSineLinesPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)}, s.createProperties=function(e){var t=new r("linetoolcirclelines",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolCircleLines=s},tWVy:function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return o}));var n=i("aIyQ"),r=new(i.n(n).a);function o(){r.fire()}},"tc+8":function(e,t,i){"use strict";(function(t){var n=i("ogJP").isFunction;function r(e){if(this._listeners=new t,this._childs=[],this._muteChildChanges=!1,void 0!==e)if(this.isPrimitiveType(e))this._value=e;else for(var i in e)this.addProperty(i,e[i])}r.prototype.merge=function(e,t){var i=null;if(t)var n=(i=[]).length;if(null==e)return i;if(this.isPrimitiveType(e))return t&&this._value!==e&&i.push(this),this._value=e,i;if(Array.isArray(e))for(var r=0;rn&&i.push(this),i},r.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)},r.prototype.state=function(e){var t=n(this.value)?this.value():void 0;void 0===t&&(t={});for(var i=0;i=0},r.prototype.addChild=function(e,t){this[e]=t,-1===this._childs.indexOf(e)&&this._childs.push(e),t.listeners().subscribe(this,r.prototype.childChanged)},r.prototype.childChanged=function(e,t){this._muteChildChanges||this.listeners().fire(this)},r.prototype.subscribe=function(e,t){this.listeners().subscribe(e,t,!1)}, r.prototype.unsubscribe=function(e,t){this.listeners().unsubscribe(e,t)},r.prototype.unsubscribeAll=function(e){this.listeners().unsubscribeAll(e)},r.prototype.childs=function(){return this},e.exports=r}).call(this,i("aIyQ"))},teHb:function(e,t,i){"use strict";i.r(t),i.d(t,"ratioStudyItem",(function(){return s}));var n=i("mrSG"),r=i("7dm8"),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._doCalculation=function(e,t,i,n){return e*t/(i*n)},t}(r.a),s={name:"Ratio",metainfo:{_metainfoVersion:15,defaults:r.b,plots:r.d,styles:r.e,description:"Ratio",shortDescription:"Ratio",is_price_study:!1,inputs:r.c,id:"Ratio@tv-basicstudies-1"},constructor:o}},tqok:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var n=-2e6},txPx:function(e,t,i){"use strict";i.r(t),i.d(t,"LOGLEVEL",(function(){return n})),i.d(t,"getLogLevel",(function(){return _})),i.d(t,"isHighRateEnabled",(function(){return f})),i.d(t,"setLogLevel",(function(){return m})),i.d(t,"getRawLogHistory",(function(){return v})),i.d(t,"serializeLogHistoryEntry",(function(){return y})),i.d(t,"getLogHistory",(function(){return g})),i.d(t,"getLogger",(function(){return S})),i.d(t,"loggingOn",(function(){return P})),i.d(t,"loggingOff",(function(){return C}));var n,r="undefined"!=typeof window?window:{},o=!1;try{localStorage.getItem(""),o=!0}catch(T){}!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"}(n||(n={}));var s=0,a=[],l=null,c=null,u=null,h=NaN,d=n.WARNING,p=!1;function _(){return d}function f(){return p}function m(e){e=Math.max(n.ERROR,Math.min(n.DEBUG,e)),d=e,x()}function v(e,t){var i=a.reduce((function(e,t){return e.concat(t)}),[]);return i.sort((function(e,t){return e.id-t.id})),void 0!==t&&(i=i.filter((function(e){return e.subSystemId===t}))),"number"==typeof e&&(i=i.slice(-e)),i}function y(e){return new Date(e.timestamp).toISOString()+":"+e.subSystemId+":"+e.message.replace(/"/g,"'")}function g(e,t){return 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)}(v(e,t).map(y),75497472)}function b(e,t,i,r){if(t!==c||r.id!==u){var o=new Date;if(e<=n.NORMAL&&function(e,t,i,n,r){var o={id:s,message:String(t),subSystemId:n,timestamp:Number(e)};s+=1,i.push(o),void 0!==r&&i.length>r&&i.splice(0,1)}(o,t,i,r.id,r.maxCount),e<=d&&(!r.highRate||f())&&(!l||r.id.match(l))){var a=o.toISOString()+":"+r.id+":"+t;switch(e){case n.DEBUG:console.debug(a);break;case n.INFO:case n.NORMAL:r.color?console.log("%c"+a,"color: "+r.color):console.log(a);break;case n.WARNING:console.warn(a);break;case n.ERROR:console.error(a)}c=t,u=r.id,h&&clearTimeout(h),h=setTimeout((function(){c=null,u=null,h=NaN}),1e3)}}}function S(e,t){void 0===t&&(t={});var i=[];a.push(i);var r=Object.assign(t,{id:e});function o(e){return function(t){return b(e,t,i,r)}}return{logDebug:o(n.DEBUG),logError:o(n.ERROR),logInfo:o(n.INFO),logNormal:o(n.NORMAL), logWarn:o(n.WARNING)}}var w=S("logger"),P=r.lon=function(e,t){m(n.DEBUG),w.logNormal("Debug logging enabled"),p=Boolean(e),l=t||null,x()},C=r.loff=function(){m(n.INFO),w.logInfo("Debug logging disabled")};function x(){try{o&&(localStorage.setItem("tv.logger.logHighRate",String(p)),localStorage.setItem("tv.logger.loglevel",String(d)))}catch(e){w.logWarn("Cannot save logger state (level: "+d+", high-rate: "+p+") to localStorage: "+e.message)}}!function(){p=!!o&&"true"===localStorage.getItem("tv.logger.logHighRate");var e=parseInt(o&&localStorage.getItem("tv.logger.loglevel")||"");Number.isNaN(e)&&(e=n.WARNING),m(e),w.logNormal("Init with settings - level: "+d+", high-rate: "+p)}(),r.performance&&r.performance.now?w.logNormal("Sync logger and perf times, now is "+r.performance.now()):w.logWarn("Perf time is not available")},tzRX:function(e,t){e.exports=''},"u+0B":function(e,t,i){"use strict";i.r(t),i.d(t,"TextWidthCache",(function(){return r}));var n=/[2-9]/g,r=function(){function e(e){void 0===e&&(e=50),this._actualSize=0,this._usageTick=1,this._oldestTick=1,this._tick2Labels={},this._cache={},this._maxSize=e}return e.prototype.reset=function(){this._actualSize=0,this._cache={},this._usageTick=1,this._oldestTick=1,this._tick2Labels={}},e.prototype.measureText=function(e,t,i){var r=i||n,o=String(t).replace(r,"0");if(this._cache[o])return this._cache[o].width;if(this._actualSize===this._maxSize){var s=this._tick2Labels[this._oldestTick];delete this._tick2Labels[this._oldestTick],delete this._cache[s],this._oldestTick++,this._actualSize--}var a=e.measureText(o).width;return 0===a&&t.length?0:(this._cache[o]={width:a,tick:this._usageTick},this._tick2Labels[this._usageTick]=o,this._actualSize++,this._usageTick++,a)},e}()},u0yd:function(e,t,i){"use strict";var n=i("Zp/P").coordinateIsValid,r=i("gyZD").PaneRendererLine;function o(e){e.forceLineColor=!1,r.call(this,e),this.color1=e.color1,this.color2=e.color2,this.bottom=e.bottom,this.isSeries=!!e.isSeries,this._simpleMode=e.simpleMode}inherit(o,r),o.prototype._drawImpl=function(e){if(0!==this.items.length){e.lineCap="square",e.strokeStyle=this.lineColor,e.lineWidth=this.lineWidth,e.lineStyle=this.lineStyle,e.lineWidth=1;for(var t=0;t=0&&!n(this.items[i].y);)i--;if(!(t>=i)){e.translate(.5,.5);for(var o={},s=this.items,a=t;a<=i;a++){var l=s[a];if(h=l.style?l.style.color:this.lineColor,a0;){if(t[i]<=e)return i;i--}return i},T.prototype._spanOffset=function(e,t){if(t0&&this._hightlightBackground(e,n,t)}var r=i.model().crossHairSource();r.startMeasurePoint()&&this._hightlightBackground(e,r.measurePoints(),t)}},T.prototype.drawTickMarks=function(e,t){var i=this.chart.model().timeScale().marks();if(i&&0!==i.length){var n=i.reduce((function(e,t){ return e.span>t.span?e:t}),i[0]).span;n>30&&n<40&&(n=30),e.save(),e.strokeStyle=this.lineColor();var r=this.rendererOptions(),o=r.borderSize+r.tickLength+r.paddingTop+r.fontSize-r.baselineOffset;e.textAlign="center",e.fillStyle=this.lineColor();var s=Math.max(1,Math.floor(t)),a=Math.floor(.5*t),l=Math.round(r.tickLength*t);e.beginPath();for(var c=i.length;c--;){var u=Math.round(i[c].coord*t);e.rect(u-a,0,s,l)}e.fill(),e.fillStyle=this.textColor();var d=this;h(e,t,(function(){e.font=d.baseFont();for(var t=0;t=n&&e.fillText(r.label,r.coord,o)}})),e.restore()}},T.prototype.drawBackLabels=function(e,t){e.save();var i=new Set,n=this.chart.model(),r=n.dataSources();n.selection().sources().forEach((function(e){i.add(e)})),n.hoveredSource()&&i.add(n.hoveredSource()),n.sourcesBeingMoved().forEach((function(e){i.add(e)}));var o=n.lineBeingEdited()||n.lineBeingCreated();o&&i.add(o),i.add(this.chart.model().crossHairSource()),r=r.concat(n.model().customSources());for(var s=this.rendererOptions(),a=0;a=s)&&(n={value:s,view:o})}}})),i.view&&t.push(i.view),n.view&&t.push(n.view),t},T.prototype._addViewsOrMaxMin=function(e,t){e.length<=1?e.forEach((function(e){if(e.timeAxisViews){var i=e.timeAxisViews();i&&i.length&&t.push(i)}})):t.push(this._minMaxViews(e))},T.prototype.drawCrossHairLabel=function(e,t){e.save(),e.clearRect(0,0,Math.ceil(this.size.w*t)+1,Math.ceil(this.size.h*t)+1);var i,n=this.chart.model(),r=[],o=n.lineBeingEdited()||n.lineBeingCreated();o&&o.timeAxisViews&&((i=o.timeAxisViews())&&i.length&&r.push(i));(this._addViewsOrMaxMin(n.sourcesBeingMoved(),r),this._addViewsOrMaxMin(n.selection().sources(),r),n.hoveredSource()&&!n.selection().isSelected(n.hoveredSource()))&&(n.hoveredSource().timeAxisViews&&(i=n.hoveredSource().timeAxisViews())&&i.length&&r.push(i));(i=n.crossHairSource().timeAxisViews())&&i.length&&r.push(i);var s=this.rendererOptions();r.forEach((function(i){i.forEach((function(i){e.save(),i.renderer().draw(e,s,t),e.restore()}))})),e.restore()},T.prototype.hardResetCanvas=function(){this.size&&(d(this._canvasBinding,this.size),d(this._topCanvasBinding,this.size))},T.prototype.paint=function(e){if(e!==a.None){var t=u(this._topCanvasBinding.canvas);if(e>a.Cursor){var i=u(this._canvasBinding.canvas),n=this._canvasBinding.pixelRatio;this.drawBackground(i,n),this.chart.model()&&(this.drawTickMarks(i,n),this.drawBackLabels(i,n),this.chart.model().crossHairSource().updateAllViews(),this.drawCrossHairLabel(t,n)), this._lhsStubContainer.paintStubs(e),this._rhsStubContainer.paintStubs(e)}this.drawCrossHairLabel(t,this._topCanvasBinding.pixelRatio)}},T.prototype.restoreDefaultCursor=function(){this.setCursor("")},T.prototype.setCursor=function(e){var t="";"grabbing"!==e&&"ew-resize"!==e||(t="time-axis--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._cell.classList.remove(this._currentCursorClassName),t&&this._cell.classList.add(t),this._currentCursorClassName=t,this._cell.style.cursor)},T.prototype.updatePriceAxisStubs=function(){var e=this.chart.model().model(),t=this.chart.isMaximizedPane()?this.chart.maximizedPaneWidget().state():e.paneForSource(e.mainSeries());if(t){var i=e.priceScaleSlotsCount();this._lhsStubContainer.setScales([],i.left,t.leftPriceScales().length,i.left+i.right),this._rhsStubContainer.setScales([],i.right,t.rightPriceScales().length,i.left+i.right)}},T.prototype.getScreenshotData=function(){var e={};return e.content=this._canvasBinding.canvas.toDataURL(),e.canvas=this._canvasBinding.canvas,e.contentWidth=this.size.w,e.contentHeight=this.size.h,e.lhsStub=this._lhsStubContainer.getScreenshotData(),e.rhsStub=this._rhsStubContainer.getScreenshotData(),e},t.TimeAxisWidget=T}).call(this,i("aIyQ"),i("Kxc7"))},"uXw/":function(e,t,i){"use strict";(function(t){var n=i("IiTo"),r=i("LxhU").Interval,o=i("Y7w9").lowerbound,s=i("aIyQ"),a=function(){var e={},a=new Map,l=null,c=new s,u="undefined"!=typeof window?window:t,h=u.PineJsCalendar?u.PineJsCalendar:i("jCNj");function d(){a.forEach((function(t,i){var n=t.symbol,r=t.symbolInfo,o=t.pointsets,s=n;e.hasOwnProperty(s)||(e[s]=[]);var a=function(e,t,i){for(var n=0,r=null,o=0;o0){var c=t.getOffsetSinceLastRealBar(e,l[0],l[1]);c>n&&(n=c,r=l)}}return r}(r,i,o);null!==a&&i.ready()&&i.ensureExtrapolatedTo(r,a[0],a[1]);for(var l=0;l=o)return 0;var c=new n.SessionInfo(e.timezone,e.session,e.holidays,e.corrections),u=f(e,a,c,i,o);if(u>=1e3)return u;return s.findDistanceInBars(i,o,e)}(s,a,t,e[0].value[0]/1e3,i);var l=o(e,1e3*t,(function(e,t){return e.value[0]4*(7-i.spec.weekEndsCount())){d=f/7*(7-i.spec.weekEndsCount())}else{for(var m=0,v={},y=p;y.valueOf()<=_.valueOf();y=h.add_days_considering_dst(i.timezone,y,1)){void 0===v[b=h.get_day_of_week(y)]&&(v[b]=i.spec.isWeekEnd(b)),v[b]&&m++}d=f-m}if(t.isDays())o=Math.ceil(d/t.multiplier());else{var g=t.isSeconds()?t.multiplier():60*t.multiplier();if(f<1)if(i.spec.findSession(i.spec.getWeekIndex(p),h.get_day_of_week(p),h.get_minutes_from_midnight(p)).getEntry()===i.spec.findSession(i.spec.getWeekIndex(_),h.get_day_of_week(_),h.get_minutes_from_midnight(_)).getEntry())return Math.ceil((r-n)/g);var b=i.spec.entries()[0].dayOfWeek(),S=60*i.spec.entries().reduce((function(e,t){return e+(t.dayOfWeek()===b?t.length():0)}),0);o=Math.ceil(d*S/g)}}return o}function m(e,t,i){var r=n.createAligner(t,i);return null!==r&&(e=e.map((function(e){return r.alignTimeIfPossible(1e3*e)/1e3}))),e}return{createPointset:function(e,t,i,n,r,o){var s={guid:e,points:i},c=a.get(n);void 0===c&&(c={symbol:t,symbolInfo:r,session:o,pointsets:[]},a.set(n,c)),c.pointsets.push(s),null===l&&(l=setTimeout(d,0))},removePointset:function(t){var i=[];a.forEach((function(e,n){for(var r=e.pointsets,o=0;o0;)this.removeProperty(this._childs[0]);this._initValues=[];for(var t=0;tl&&t")+", line "+e.lineno+", col "+e.colno+".\nError: "+n(e.error))}),!1),window.addEventListener("unhandledrejection",(function(e){var t=(new Date).toISOString();window.__tv_js_errors.push(t+" Unhandled rejection.\nReason: "+n(e.reason))}),!1),document.addEventListener("securitypolicyviolation",(function(e){var t,i,r=(new Date).toISOString(),o="report"===e.disposition?"CSP report-only":"CSP violation";window.__tv_js_errors.push(r+" "+o+": "+(e.violatedDirective||e.effectiveDirective)+". "+(e.sourceFile||"")+", line "+(null!==(t=e.lineno)&&void 0!==t?t:e.lineNumber)+", col "+(null!==(i=e.colno)&&void 0!==i?i:e.columnNumber)+".\nBlocked URI: "+(e.blockedURL||e.blockedURI)+"\nSample: "+e.sample+"\nTarget: "+n(e.target))}),!1)}i.r(t),i.d(t,"install",(function(){return r}))},wGNx:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"RiskRewardPointIndex",(function(){return n})),function(e){e[e.Entry=0]="Entry",e[e.Close=1]="Close", e[e.ActualEntry=2]="ActualEntry",e[e.ActualClose=3]="ActualClose"}(n||(n={}))},wOSo:function(e,t,i){"use strict";i.r(t),i.d(t,"QuotesProvider",(function(){return a}));var n=i("IWXC"),r=i("aIyQ"),o=i.n(r),s=i("e3/o"),a=function(){function e(){this._quotes=null,this._quoteSessionSymbol=null,this._quoteSessionClientId="",this._quotesUpdate=new o.a}return e.prototype.setQuotesSessionSymbol=function(e){this._quoteSessionSymbol!==e&&(this._quoteSessionClientId||(this._quoteSessionClientId="series-"+Object(s.guid)()),this._unsubscribeQuoteSession(),e&&(this._quoteSessionSymbol=e,Object(n.getQuoteSessionInstance)("full").subscribe(this._quoteSessionClientId,this._quoteSessionSymbol,this._onUpdate.bind(this))))},e.prototype.quotesUpdate=function(){return this._quotesUpdate},e.prototype.quotes=function(){return this._quotes},e.prototype.destroy=function(){this._unsubscribeQuoteSession()},e.prototype._onUpdate=function(e,t){this._quotes=e&&e.values||null,t&&t.values&&this._quotesUpdate.fire(e,t)},e.prototype._unsubscribeQuoteSession=function(){this._quoteSessionSymbol&&(Object(n.getQuoteSessionInstance)("full").unsubscribe(this._quoteSessionClientId,this._quoteSessionSymbol),this._quoteSessionSymbol=null,this._quotes=null)},e}()},wZIs:function(e,t,i){"use strict";var n=i("dfhE"),r=i("rCHB").LineToolPitchforkStyle,o=i("Ye2/").LineToolBarsPatternMode,s=i("23IT").LineStudyPlotStyle,a=i("8OdW"),l=i("oXaB").PriceAxisLastValueMode,c=i("4o++").MagnetMode,u=i("a7Ha").LineEnd,h=i("4vW/").ColorType,d=i("bKFv").StatsPosition,p=i("KUek").sessionsPreferencesDefault,_=i("txPx").getLogger("Chart.Defaults"),f=i("zDbI").CHART_FONT_FAMILY,m=function(e){var t=function(e,t){return{color:e,visible:t}},i=function(e,t,i){return{coeff:e,color:t,visible:i}},_=function(e,t,i,n,r){return{coeff:e,color:t,visible:i,linestyle:void 0===n?CanvasEx.LINESTYLE_SOLID:n,linewidth:void 0===r?1:r}},m=function(e,t,i){return{color:e,width:i,visible:t}},v=function(e,t,i,n,r){return{color:e,visible:t,width:i,x:n,y:r}},b=function(e,t,i,n,r,o){return{coeff1:e,coeff2:t,color:i,visible:n,linestyle:void 0===r?CanvasEx.LINESTYLE_SOLID:r,linewidth:void 0===o?1:o}};if(void 0===TradingView.defaultProperties){var S;switch(window.locale){case"ar_AE":S="Asia/Dubai";break;case"au":S="Australia/Sydney";break;case"br":S="America/Sao_Paulo";break;case"ca":S="America/Toronto";break;case"de_DE":case"it":S="Europe/Berlin";break;case"es":S="Europe/Madrid";break;case"fa_IR":S="Asia/Tehran";break;case"fr":case"sv_SE":S="Europe/Paris";break;case"he_IL":case"tr":S="Europe/Athens";break;case"hu_HU":case"pl":S="Europe/Warsaw";break;case"id":case"th_TH":case"vi_VN":S="Asia/Bangkok";break;case"in":S="Asia/Kolkata";break;case"ja":case"kr":S="Asia/Tokyo";break;case"ms_MY":S="Asia/Singapore";break;case"ru":S="Europe/Moscow";break;case"uk":S="Europe/London";break;case"zh_CN":case"zh_TW":S="Asia/Shanghai";break;default:S="Etc/UTC"}TradingView.defaultProperties={chartproperties:{timezone:S,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:{backgroundType:h.Solid,background:"#ffffff",backgroundGradientStartColor:"#ffffff",backgroundGradientEndColor:"#ffffff",vertGridProperties:{color:"#F0F3FA",style:CanvasEx.LINESTYLE_SOLID},horzGridProperties:{color:"#F0F3FA",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,showBackground:!0,backgroundTransparency:50,wrapText:!1}},scalesProperties:{backgroundColor:"#ffffff",lineColor:"#E0E3EB",textColor:"#131722",fontSize:12,scaleSeriesOnly:!1,showSeriesLastValue:!0,seriesLastValueMode:l.LastValueAccordingToScale,showSeriesPrevCloseValue:!1,showStudyLastValue:!1,showSymbolLabels:!1,showStudyPlotLabels:!1,showBidAskLabels:!1,showPrePostMarketPriceLabel:!0,showFundamentalNameLabel:!1,showFundamentalLastValue:!1,barSpacing:a.DEFAULT_BAR_SPACING,showCurrency:!0},mainSeriesProperties:{style:n.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,bidAsk:{visible:!1,lineStyle:CanvasEx.LINESTYLE_DOTTED,lineWidth:1,bidLineColor:"#2196F3",askLineColor:"#EF5350"},prePostMarket:{visible:!0,lineStyle:CanvasEx.LINESTYLE_DOTTED,lineWidth:1,preMarketColor:"#fb8c00",postMarketColor:"#2196f3"},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,dividendsAdjustment:void 0,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,drawBody:!0},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",drawBody:!0},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:{},drawBody:!0},barStyle:{upColor:"#26a69a",downColor:"#ef5350",barColorsOnPrevClose:!1, dontDrawOpen:!1,thinBars:!0},hiloStyle:{color:"#2196f3",showBorders:!0,borderColor:"#2196f3",showLabels:!0,labelColor:"#2196f3",fontSize:7,drawBody:!0},lineStyle:{color:"#2196f3",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:2,priceSource:"close",styleType:n.STYLE_LINE_TYPE_SIMPLE},areaStyle:{color1:"rgba(33, 150, 243, 0.28)",color2:"#2196f3",linecolor:"#2196f3",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:2,priceSource:"close",transparency:100},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",sources:"Close",boxSize:3,style:"ATR",atrLength:14,wicks:!0},inputInfo:{source:{name:"source"},sources:{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,oneStepBackBuilding:!1},inputInfo:{sources:{name:"Source"},boxSize:{name:"Box size"},reversalAmount:{name:"Reversal amount"},style:{name:"Style"},atrLength:{name:"ATR length"},oneStepBackBuilding:{name:"One step back building"}}},baselineStyle:{baselineColor:"rgba( 117, 134, 150, 1)",topFillColor1:"rgba( 38, 166, 154, 0.28)",topFillColor2:"rgba( 38, 166, 154, 0.05)",bottomFillColor1:"rgba( 239, 83, 80, 0.05)",bottomFillColor2:"rgba( 239, 83, 80, 0.28)",topLineColor:"rgba( 38, 166, 154, 1)",bottomLineColor:"rgba( 239, 83, 80, 1)",topLineWidth:2,bottomLineWidth:2,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_DOTTED},editorFontsList:["Verdana","Courier New","Times New Roman","Arial"],volumePaneSize:"large"},sessions:p,drawings:{magnet:!1,magnetMode:c.WeakMagnet,stayInDrawingMode:!1,drawOnAllCharts:!0},linetoolorder:{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:{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:{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:{color:"rgba( 61, 133, 198, 1)",size:40,icon:61720,angle:.5*Math.PI,scale:1},linetoolbezierquadro:{linecolor:"#2196f3",linewidth:1,fillBackground:!1,backgroundColor:"rgba(33, 150, 243, 0.2)",transparency:50,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:u.Normal,rightEnd:u.Normal},linetoolbeziercubic:{linecolor:"#00bcd4",linewidth:1,fillBackground:!1,backgroundColor:"rgba(0, 188, 212, 0.2)",transparency:50,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:u.Normal,rightEnd:u.Normal},linetooltrendline:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:u.Normal,rightEnd:u.Normal,showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",font:"Verdana",textcolor:"#2196f3",fontsize:14,bold:!1,italic:!1,snapTo45Degrees:!0,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:d.Right},linetoolinfoline:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:u.Normal,rightEnd:u.Normal,font:"Verdana",showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:"#2196f3",fontsize:14,bold:!1,italic:!1,snapTo45Degrees:!0,alwaysShowStats:!0,showMiddlePoint:!1,showPriceRange:!0,showBarsRange:!0,showDateTimeRange:!0,showDistance:!0,showAngle:!0,statsPosition:d.Center},linetooltimecycles:{linecolor:"rgba(21, 153, 128, 1)",linewidth:1,fillBackground:!0,backgroundColor:"rgba(106, 168, 79, 0.5)",transparency:50,linestyle:CanvasEx.LINESTYLE_SOLID},linetoolsineline:{linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},linetooltrendangle:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,snapTo45Degrees:!0,font:"Verdana", textcolor:"rgba(33, 150, 243, 1)",fontsize:12,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,extendRight:!1,extendLeft:!1,statsPosition:d.Right},linetooldisjointangle:{linecolor:"rgba(0, 150, 136, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,fillBackground:!0,backgroundColor:"rgba(0, 150, 136, 0.2)",transparency:20,extendLeft:!1,extendRight:!1,leftEnd:u.Normal,rightEnd:u.Normal,font:"Verdana",textcolor:"rgba(0, 150, 136, 1)",fontsize:12,bold:!1,italic:!1,showPrices:!1,showPriceRange:!1,showDateTimeRange:!1,showBarsRange:!1},linetoolflatbottom:{linecolor:"rgba(171, 71, 188, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,fillBackground:!0,backgroundColor:"rgba(171, 71, 188, 0.2)",transparency:20,extendLeft:!1,extendRight:!1,leftEnd:u.Normal,rightEnd:u.Normal,font:"Verdana",textcolor:"rgba(171, 71, 188, 1)",fontsize:12,bold:!1,italic:!1,showPrices:!1,showPriceRange:!1,showDateTimeRange:!1,showBarsRange:!1},linetoolfibspiral:{counterclockwise:!1,linecolor:"rgba(0, 150, 136, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},linetooldaterange:{linecolor:"rgba(30,136,229,1)",linewidth:1,font:f,textcolor:"rgba( 255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba(30,136,229,0.9)",fillBackground:!0,backgroundColor:"rgba(30,136,229,0.2)",backgroundTransparency:60,drawBorder:!1,borderColor:"rgba(30,136,229,0.9)",extendTop:!1,extendBottom:!1},linetoolpricerange:{linecolor:"rgba(30,136,229,1)",linewidth:1,font:f,textcolor:"rgba( 255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba(30,136,229,0.9)",fillBackground:!0,backgroundColor:"rgba(30,136,229,0.2)",backgroundTransparency:60,drawBorder:!1,borderColor:"rgba(30,136,229,0.9)",extendLeft:!1,extendRight:!1},linetooldateandpricerange:{linecolor:"rgba(30,136,229,1)",linewidth:1,font:f,textcolor:"rgba( 255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba(30,136,229,0.9)",fillBackground:!0,backgroundColor:"rgba(30,136,229,0.2)",backgroundTransparency:60,borderWidth:1,drawBorder:!1,borderColor:"rgba(30,136,229,1)"},linetoolriskrewardshort:{linecolor:"rgba(120, 123, 134, 1)",linewidth:1,font:"Verdana",textcolor:"rgba(255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba( 88, 88, 88, 1)",fillBackground:!0,stopBackground:"rgba(244, 67, 54, 0.2)",profitBackground:"rgba(0, 150, 136, 0.2)",stopBackgroundTransparency:80,profitBackgroundTransparency:80,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",compact:!1,riskDisplayMode:"percents",accountSize:1e3,risk:25,alwaysShowStats:!1,showPriceLabels:!0},linetoolriskrewardlong:{linecolor:"rgba(120, 123, 134, 1)",linewidth:1,font:"Verdana",textcolor:"rgba(255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba( 88, 88, 88, 1)",fillBackground:!0,stopBackground:"rgba(244, 67, 54, 0.2)",profitBackground:"rgba(0, 150, 136, 0.2)",stopBackgroundTransparency:80,profitBackgroundTransparency:80,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",compact:!1, riskDisplayMode:"percents",accountSize:1e3,risk:25,alwaysShowStats:!1,showPriceLabels:!0},linetoolarrow:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:u.Normal,rightEnd:u.Arrow,font:"Verdana",showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:"#2196f3",fontsize:14,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:d.Right},linetoolray:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!0,leftEnd:u.Normal,rightEnd:u.Normal,font:"Verdana",showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:"#2196f3",fontsize:14,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:d.Right},linetoolextended:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!0,extendRight:!0,leftEnd:u.Normal,rightEnd:u.Normal,font:"Verdana",showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:"#2196f3",fontsize:14,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:d.Right},linetoolhorzline:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showPrice:!0,showLabel:!1,font:"Verdana",textcolor:"rgba(33, 150, 243, 1)",fontsize:12,bold:!1,italic:!1,horzLabelsAlign:"center",vertLabelsAlign:"top"},linetoolhorzray:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showPrice:!0,showLabel:!1,font:"Verdana",textcolor:"rgba(33, 150, 243, 1)",fontsize:12,bold:!1,italic:!1,horzLabelsAlign:"center",vertLabelsAlign:"top"},linetoolvertline:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showTime:!0,showLabel:!1,horzLabelsAlign:"right",vertLabelsAlign:"top",font:"Verdana",textcolor:"#2196f3",textOrientation:"vertical",fontsize:14,bold:!1,italic:!1},linetoolcrossline:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showPrice:!0,showTime:!0},linetoolcirclelines:{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",baselinecolor:"rgba( 128, 128, 128, 1)",linecolor:"rgba( 0, 85, 219, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showLabels:!0,font:f,fillBackground:!1,transparency:80,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},level1:_(0,"rgba(120, 123, 134, 1)",!0),level2:_(1,"rgba(33, 150, 243, 1)",!0),level3:_(2,"rgba(33, 150, 243, 1)",!0),level4:_(3,"rgba(33, 150, 243, 1)",!0),level5:_(5,"rgba(33, 150, 243, 1)",!0), level6:_(8,"rgba(33, 150, 243, 1)",!0),level7:_(13,"rgba(33, 150, 243, 1)",!0),level8:_(21,"rgba(33, 150, 243, 1)",!0),level9:_(34,"rgba(33, 150, 243, 1)",!0),level10:_(55,"rgba(33, 150, 243, 1)",!0),level11:_(89,"rgba(33, 150, 243, 1)",!0),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetooltext:{color:"#2196f3",font:"Verdana",fontsize:14,fillBackground:!1,backgroundColor:"rgba( 91, 133, 191, 0.3)",backgroundTransparency:70,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",bold:!1,italic:!1,fixedSize:!0,wordWrap:!1,wordWrapWidth:200},linetooltextabsolute:{color:"#2196f3",font:"Verdana",fontsize:14,fillBackground:!1,backgroundColor:"rgba( 155, 190, 213, 0.3)",backgroundTransparency:70,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",bold:!1,italic:!1,fixedSize:!1,wordWrap:!1,wordWrapWidth:200},linetoolballoon:{color:"#ffffff",backgroundColor:"rgba(156, 39, 176, 0.7)",borderColor:"rgba(156, 39, 176, 0.0)",fontsize:16,fontWeight:"normal",font:"Arial",transparency:30},linetoolbrush:{linecolor:"#00bcd4",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,smooth:5,fillBackground:!1,backgroundColor:"rgba(0, 188, 212, 0.5)",transparency:50,leftEnd:u.Normal,rightEnd:u.Normal},linetoolpolyline:{linecolor:"#7e57c2",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,fillBackground:!0,backgroundColor:"rgba(126, 87, 194, 0.2)",transparency:50,filled:!1},linetoolpath:{lineColor:"#2196f3",lineWidth:2,lineStyle:CanvasEx.LINESTYLE_SOLID,leftEnd:u.Normal,rightEnd:u.Arrow},linetoolarrowmarkleft:{color:"rgba( 120, 120, 120, 1)",arrowColor:"#2196F3",fontsize:20,font:"Verdana"},linetoolarrowmarkup:{color:"rgba( 120, 120, 120, 1)",arrowColor:"#009688",fontsize:20,font:"Verdana"},linetoolarrowmarkright:{color:"rgba( 120, 120, 120, 1)",arrowColor:"#2196F3",fontsize:20,font:"Verdana"},linetoolarrowmarkdown:{color:"rgba( 120, 120, 120, 1)",arrowColor:"#E53935",fontsize:20,font:"Verdana"},linetoolflagmark:{flagColor:"#2196F3"},linetoolnote:{markerColor:"#2196f3",textColor:"#ffffff",backgroundColor:"rgba(33, 150, 243, 0.7)",backgroundTransparency:0,borderColor:"#2196f3",font:"Arial",fontSize:20,bold:!1,italic:!1,fixedSize:!0},linetoolnoteabsolute:{markerColor:"#2196f3",textColor:"#ffffff",backgroundColor:"rgba(33, 150, 243, 0.7)",backgroundTransparency:0,borderColor:"#2196f3",font:"Arial",fontSize:20,bold:!1,italic:!1,fixedSize:!0},linetoolpricelabel:{color:"#ffffff",backgroundColor:"#2196f3",borderColor:"#2196f3",fontWeight:"bold",fontsize:14,font:f,transparency:0},linetoolarrowmarker:{backgroundColor:"#1E88E5",textColor:"#1E88E5",font:f,bold:!0,italic:!1,fontsize:16,showLabel:!0},linetoolrectangle:{color:"#9c27b0",fillBackground:!0,backgroundColor:"rgba(156, 39, 176, 0.2)",linewidth:1,snapTo45Degrees:!0,transparency:50,showLabel:!1,horzLabelsAlign:"left",vertLabelsAlign:"bottom",textColor:"#9c27b0",fontSize:14,bold:!1,italic:!1,extendLeft:!1,extendRight:!1},linetoolrotatedrectangle:{color:"#4caf50",fillBackground:!0,backgroundColor:"rgba(76, 175, 80, 0.2)", transparency:50,linewidth:1,snapTo45Degrees:!0},linetoolellipse:{color:"#e91e63",fillBackground:!0,backgroundColor:"rgba(233, 30, 99, 0.2)",transparency:50,linewidth:1},linetoolarc:{color:"#ab47bc",fillBackground:!0,backgroundColor:"rgba(171, 71, 188, 0.2)",transparency:50,linewidth:1},linetoolprediction:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,sourceBackColor:"rgba(33, 150, 243, 1)",sourceTextColor:"rgba(255, 255, 255, 1)",sourceStrokeColor:"rgba(33, 150, 243, 1)",targetStrokeColor:"rgba(33, 150, 243, 1)",targetBackColor:"rgba(33, 150, 243, 1)",targetTextColor:"rgba(255, 255, 255, 1)",successBackground:"rgba(76, 175, 80, 1)",successTextColor:"rgba(255, 255, 255, 1)",failureBackground:"rgba(244, 67, 54, 1)",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:{color:"#f57c00",fillBackground:!0,backgroundColor:"rgba(245, 124, 0, 0.2)",transparency:50,linewidth:1},linetoolcallout:{color:"#ffffff",backgroundColor:"rgba(0, 151, 167, 0.7)",transparency:50,linewidth:1,fontsize:16,font:"Verdana",bordercolor:"rgba(0, 151, 167, 1)",bold:!1,italic:!1,wordWrap:!1,wordWrapWidth:200},linetoolparallelchannel:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,fillBackground:!0,backgroundColor:"rgba(33, 150, 243, 0.2)",transparency:20,showMidline:!0,midlinecolor:"rgba(33, 150, 243, 1)",midlinewidth:1,midlinestyle:CanvasEx.LINESTYLE_DASHED},linetoolelliottimpulse:{degree:7,showWave:!0,color:"rgba( 61, 133, 198, 1)",linewidth:1},linetoolelliotttriangle:{degree:7,showWave:!0,color:"rgba( 255, 152, 0, 1)",linewidth:1},linetoolelliotttriplecombo:{degree:7,showWave:!0,color:"rgba( 106, 168, 79, 1)",linewidth:1},linetoolelliottcorrection:{degree:7,showWave:!0,color:"rgba( 61, 133, 198, 1)",linewidth:1},linetoolelliottdoublecombo:{degree:7,showWave:!0,color:"rgba( 106, 168, 79, 1)",linewidth:1},linetoolbarspattern:{color:"rgba(33, 150, 243, 1)",mode:o.Bars,mirrored:!1,flipped:!1},linetoolghostfeed:{averageHL:20,variance:50,candleStyle:{upColor:"rgba(178, 223, 219, 1)",downColor:"rgba(239, 154, 154, 1)",drawWick:!0,drawBorder:!0,borderColor:"#378658",borderUpColor:"rgba(0, 150, 136, 1)",borderDownColor:"rgba(244, 67, 54, 1)",wickColor:"rgba(120, 123, 134, 1)"},transparency:50},study:{inputs:{},styles:{},palettes:{},bands:{},area:{},graphics:{},showInDataWindow:!0,visible:!0,showStudyArguments:!0,precision:"default"},linetoolpitchfork:{fillBackground:!0,transparency:80,style:r.Original,median:{visible:!0,color:"rgba(244, 67, 54, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},extendLines:!1,level0:_(.25,"rgba(255, 183, 77, 1)",!1),level1:_(.382,"rgba(129, 199, 132, 1)",!1),level2:_(.5,"rgba(76, 175, 80, 1)",!0),level3:_(.618,"rgba(0, 150, 136, 1)",!1),level4:_(.75,"rgba(100, 181, 246, 1)",!1),level5:_(1,"rgba(33, 150, 243, 1)",!0),level6:_(1.5,"rgba(156, 39, 176, 1)",!1),level7:_(1.75,"rgba(233, 30, 99, 1)",!1), level8:_(2,"rgba(229, 115, 115, 1)",!1),__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolpitchfan:{fillBackground:!0,transparency:80,median:{visible:!0,color:"rgba(244, 67, 54, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level0:_(.25,"rgba(255, 183, 77, 1)",!1),level1:_(.382,"rgba(129, 199, 132, 1)",!1),level2:_(.5,"rgba(76, 175, 80, 1)",!0),level3:_(.618,"rgba(0, 150, 136, 1)",!1),level4:_(.75,"rgba(100, 181, 246, 1)",!1),level5:_(1,"rgba(33, 150, 243, 1)",!0),level6:_(1.5,"rgba(156, 39, 176, 1)",!1),level7:_(1.75,"rgba(233, 30, 99, 1)",!1),level8:_(2,"rgba(229, 115, 115, 1)",!1),__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolgannfan:{showLabels:!0,font:"Verdana",fillBackground:!0,transparency:80,level1:b(1,8,"rgba(255, 183, 77, 1)",!0),level2:b(1,4,"rgba(129, 199, 132, 1)",!0),level3:b(1,3,"rgba(76, 175, 80, 1)",!0),level4:b(1,2,"rgba(0, 150, 136, 1)",!0),level5:b(1,1,"rgba(100, 181, 246, 1)",!0),level6:b(2,1,"rgba(33, 150, 243, 1)",!0),level7:b(3,1,"rgba(156, 39, 176, 1)",!0),level8:b(4,1,"rgba(233, 30, 99, 1)",!0),level9:b(8,1,"rgba(229, 115, 115, 1)",!0),__collectibleLines:["level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetoolganncomplex:{fillBackground:!1,arcsBackground:{fillBackground:!0,transparency:80},reverse:!1,scaleRatio:"",showLabels:!0,labelsStyle:{font:f,fontSize:12,bold:!1,italic:!1},levels:[m("rgba(120, 123, 134, 1)",!0,1),m("rgba(255, 152, 0, 1)",!0,1),m("rgba(129, 199, 132, 1)",!0,1),m("rgba(76, 175, 80, 1)",!0,1),m("rgba(0, 150, 136, 1)",!0,1),m("rgba(120, 123, 134, 1)",!0,1)],fanlines:[v("rgba(179, 157, 219, 1)",!1,1,8,1),v("rgba(244, 67, 54, 1)",!1,1,5,1),v("rgba(120, 123, 134, 1)",!1,1,4,1),v("rgba(255, 152, 0, 1)",!1,1,3,1),v("rgba(129, 199, 132, 1)",!0,1,2,1),v("rgba(76, 175, 80, 1)",!0,1,1,1),v("rgba(0, 150, 136, 1)",!0,1,1,2),v("rgba(0, 150, 136, 1)",!1,1,1,3),v("rgba(33, 150, 243, 1)",!1,1,1,4),v("rgba(149, 117, 205, 1)",!1,1,1,5),v("rgba(179, 157, 219, 1)",!1,1,1,8)],arcs:[v("rgba(255, 152, 0, 1)",!0,1,1,0),v("rgba(255, 152, 0, 1)",!0,1,1,1),v("rgba(255, 152, 0, 1)",!0,1,1.5,0),v("rgba(129, 199, 132, 1)",!0,1,2,0),v("rgba(129, 199, 132, 1)",!0,1,2,1),v("rgba(76, 175, 80, 1)",!0,1,3,0),v("rgba(76, 175, 80, 1)",!0,1,3,1),v("rgba(0, 150, 136, 1)",!0,1,4,0),v("rgba(0, 150, 136, 1)",!0,1,4,1),v("rgba(33, 150, 243, 1)",!0,1,5,0),v("rgba(33, 150, 243, 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:{fillBackground:!1,arcsBackground:{fillBackground:!0,transparency:80},reverse:!1, levels:[m("rgba(120, 123, 134, 1)",!0,1),m("rgba(255, 152, 0, 1)",!0,1),m("rgba(129, 199, 132, 1)",!0,1),m("rgba(76, 175, 80, 1)",!0,1),m("rgba(0, 150, 136, 1)",!0,1),m("rgba(120, 123, 134, 1)",!0,1)],fanlines:[v("rgba(179, 157, 219, 1)",!1,1,8,1),v("rgba(244, 67, 54, 1)",!1,1,5,1),v("rgba(120, 123, 134, 1)",!1,1,4,1),v("rgba(255, 152, 0, 1)",!1,1,3,1),v("rgba(129, 199, 132, 1)",!0,1,2,1),v("rgba(76, 175, 80, 1)",!0,1,1,1),v("rgba(0, 150, 136, 1)",!0,1,1,2),v("rgba(0, 150, 136, 1)",!1,1,1,3),v("rgba(33, 150, 243, 1)",!1,1,1,4),v("rgba(149, 117, 205, 1)",!1,1,1,5),v("rgba(179, 157, 219, 1)",!1,1,1,8)],arcs:[v("rgba(255, 152, 0, 1)",!0,1,1,0),v("rgba(255, 152, 0, 1)",!0,1,1,1),v("rgba(255, 152, 0, 1)",!0,1,1.5,0),v("rgba(129, 199, 132, 1)",!0,1,2,0),v("rgba(129, 199, 132, 1)",!0,1,2,1),v("rgba(76, 175, 80, 1)",!0,1,3,0),v("rgba(76, 175, 80, 1)",!0,1,3,1),v("rgba(0, 150, 136, 1)",!0,1,4,0),v("rgba(0, 150, 136, 1)",!0,1,4,1),v("rgba(33, 150, 243, 1)",!0,1,5,0),v("rgba(33, 150, 243, 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:{color:"rgba( 21, 56, 153, 0.8)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,font:f,showTopLabels:!0,showBottomLabels:!0,showLeftLabels:!0,showRightLabels:!0,fillHorzBackground:!0,horzTransparency:80,fillVertBackground:!0,vertTransparency:80,reverse:!1,fans:t("rgba(149, 152, 161, 1)",!1),hlevel1:i(0,"rgba(120, 123, 134, 1)",!0),hlevel2:i(.25,"rgba(245, 124, 0, 1)",!0),hlevel3:i(.382,"rgba(129, 199, 132, 1)",!0),hlevel4:i(.5,"rgba(76, 175, 80, 1)",!0),hlevel5:i(.618,"rgba(0, 150, 136, 1)",!0),hlevel6:i(.75,"rgba(33, 150, 243, 1)",!0),hlevel7:i(1,"rgba(120, 123, 134, 1)",!0),vlevel1:i(0,"rgba(120, 123, 134, 1)",!0),vlevel2:i(.25,"rgba(245, 124, 0, 1)",!0),vlevel3:i(.382,"rgba(129, 199, 132, 1)",!0),vlevel4:i(.5,"rgba(76, 175, 80, 1)",!0),vlevel5:i(.618,"rgba(0, 150, 136, 1)",!0),vlevel6:i(.75,"rgba(33, 150, 243, 1)",!0),vlevel7:i(1,"rgba(120, 123, 134, 1)",!0),__collectibleLines:["fans","hlevel1","hlevel2","hlevel3","hlevel4","hlevel5","hlevel6","hlevel7","vlevel1","vlevel2","vlevel3","vlevel4","vlevel5","vlevel6","vlevel7"]},linetoolfibspeedresistancefan:{fillBackground:!0,transparency:80,grid:{color:"rgba( 21, 56, 153, 0.8)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,visible:!0},linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,font:f,showTopLabels:!0,showBottomLabels:!0,showLeftLabels:!0,showRightLabels:!0,snapTo45Degrees:!0,reverse:!1,hlevel1:i(0,"rgba(120, 123, 134, 1)",!0),hlevel2:i(.25,"rgba(245, 124, 0, 1)",!0),hlevel3:i(.382,"rgba(129, 199, 132, 1)",!0),hlevel4:i(.5,"rgba(76, 175, 80, 1)",!0),hlevel5:i(.618,"rgba(0, 150, 136, 1)",!0),hlevel6:i(.75,"rgba(33, 150, 243, 1)",!0),hlevel7:i(1,"rgba(120, 123, 134, 1)",!0),vlevel1:i(0,"rgba(120, 123, 134, 1)",!0), vlevel2:i(.25,"rgba(245, 124, 0, 1)",!0),vlevel3:i(.382,"rgba(129, 199, 132, 1)",!0),vlevel4:i(.5,"rgba(76, 175, 80, 1)",!0),vlevel5:i(.618,"rgba(0, 150, 136, 1)",!0),vlevel6:i(.75,"rgba(33, 150, 243, 1)",!0),vlevel7:i(1,"rgba(120, 123, 134, 1)",!0),__collectibleLines:["trendline","hlevel1","hlevel2","hlevel3","hlevel4","hlevel5","hlevel6","hlevel7","vlevel1","vlevel2","vlevel3","vlevel4","vlevel5","vlevel6","vlevel7"]},linetoolfibretracement:{showCoeffs:!0,showPrices:!0,font:f,fillBackground:!0,transparency:80,extendLines:!1,extendLinesLeft:!1,horzLabelsAlign:"left",vertLabelsAlign:"bottom",reverse:!1,coeffsAsPercents:!1,fibLevelsBasedOnLogScale:!1,trendline:{visible:!0,color:"rgba(120, 123, 134, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},levelsStyle:{linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level1:i(0,"rgba(120, 123, 134, 1)",!0),level2:i(.236,"rgba(244, 67, 54, 1)",!0),level3:i(.382,"rgba(129, 199, 132, 1)",!0),level4:i(.5,"rgba(76, 175, 80, 1)",!0),level5:i(.618,"rgba(0, 150, 136, 1)",!0),level6:i(.786,"rgba(100, 181, 246, 1)",!0),level7:i(1,"rgba(120, 123, 134, 1)",!0),level8:i(1.618,"rgba(33, 150, 243, 1)",!0),level9:i(2.618,"rgba(244, 67, 54, 1)",!0),level10:i(3.618,"rgba(156, 39, 176, 1)",!0),level11:i(4.236,"rgba(233, 30, 99, 1)",!0),level12:i(1.272,"rgba(129, 199, 132, 1)",!1),level13:i(1.414,"rgba(244, 67, 54, 1)",!1),level16:i(2,"rgba(0, 150, 136, 1)",!1),level14:i(2.272,"rgba(129, 199, 132, 1)",!1),level15:i(2.414,"rgba(76, 175, 80, 1)",!1),level17:i(3,"rgba(100, 181, 246, 1)",!1),level18:i(3.272,"rgba(120, 123, 134, 1)",!1),level19:i(3.414,"rgba(33, 150, 243, 1)",!1),level20:i(4,"rgba( 204, 40, 40, 1)",!1),level21:i(4.272,"rgba(156, 39, 176, 1)",!1),level22:i(4.414,"rgba(233, 30, 99, 1)",!1),level23:i(4.618,"rgba(129, 199, 132, 1)",!1),level24:i(4.764,"rgba(0, 150, 136, 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:{showCoeffs:!0,showPrices:!0,font:f,fillBackground:!0,transparency:80,extendLeft:!1,extendRight:!1,horzLabelsAlign:"left",vertLabelsAlign:"middle",coeffsAsPercents:!1,levelsStyle:{linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level1:i(0,"rgba(120, 123, 134, 1)",!0),level2:i(.236,"rgba(244, 67, 54, 1)",!0),level3:i(.382,"rgba(129, 199, 132, 1)",!0),level4:i(.5,"rgba(76, 175, 80, 1)",!0),level5:i(.618,"rgba(0, 150, 136, 1)",!0),level6:i(.786,"rgba(100, 181, 246, 1)",!0),level7:i(1,"rgba(120, 123, 134, 1)",!0),level8:i(1.618,"rgba(33, 150, 243, 1)",!0),level9:i(2.618,"rgba(244, 67, 54, 1)",!0),level10:i(3.618,"rgba(156, 39, 176, 1)",!0),level11:i(4.236,"rgba(233, 30, 99, 1)",!0),level12:i(1.272,"rgba(129, 199, 132, 1)",!1),level13:i(1.414,"rgba(244, 67, 54, 1)",!1),level16:i(2,"rgba(0, 150, 136, 1)",!1),level14:i(2.272,"rgba(129, 199, 132, 1)",!1),level15:i(2.414,"rgba(76, 175, 80, 1)",!1),level17:i(3,"rgba(100, 181, 246, 1)",!1), level18:i(3.272,"rgba(120, 123, 134, 1)",!1),level19:i(3.414,"rgba(33, 150, 243, 1)",!1),level20:i(4,"rgba( 204, 40, 40, 1)",!1),level21:i(4.272,"rgba(156, 39, 176, 1)",!1),level22:i(4.414,"rgba(233, 30, 99, 1)",!1),level23:i(4.618,"rgba(129, 199, 132, 1)",!1),level24:i(4.764,"rgba(0, 150, 136, 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:{showCoeffs:!0,font:"Verdana",fillBackground:!0,transparency:80,color1:"rgba(33, 150, 243, 0.2)",color2:"rgba(156, 39, 176, 0.2)",linewidth:1,trendline:{visible:!0,color:"rgba(149, 152, 161, 1)",linestyle:CanvasEx.LINESTYLE_SOLID},level1:_(1,"rgba( 128, 128, 128, 1)",!0)},linetool5pointspattern:{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:{color:"#CC2895",textcolor:"#FFFFFF",fillBackground:!0,backgroundColor:"#CC2895",font:"Verdana",fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:1},linetooltrianglepattern:{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:{color:"rgba( 0, 155, 0, 1)",textcolor:"rgba( 255, 255, 255, 1)",font:"Verdana",fontsize:12,bold:!1,italic:!1,linewidth:1},linetoolthreedrivers:{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},linetoolheadandshoulders:{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:1},linetoolfibwedge:{showCoeffs:!0,font:f,fillBackground:!0,transparency:80,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level1:_(.236,"rgba(244, 67, 54, 1)",!0),level2:_(.382,"rgba(129, 199, 132, 1)",!0),level3:_(.5,"rgba(76, 175, 80, 1)",!0),level4:_(.618,"rgba(0, 150, 136, 1)",!0),level5:_(.786,"rgba(100, 181, 246, 1)",!0),level6:_(1,"rgba(120, 123, 134, 1)",!0),level7:_(1.618,"rgba(33, 150, 243, 1)",!1),level8:_(2.618,"rgba(244, 67, 54, 1)",!1),level9:_(3.618,"rgba(103, 58, 183, 1)",!1),level10:_(4.236,"rgba(233, 30, 99, 1)",!1),level11:_(4.618,"rgba(233, 30, 99, 1)",!1),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetoolfibcircles:{showCoeffs:!0,font:f,fillBackground:!0,transparency:80,snapTo45Degrees:!0,coeffsAsPercents:!1,trendline:{visible:!0,color:"rgba(120, 123, 134, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED}, level1:_(.236,"rgba(244, 67, 54, 1)",!0),level2:_(.382,"rgba(129, 199, 132, 1)",!0),level3:_(.5,"rgba(76, 175, 80, 1)",!0),level4:_(.618,"rgba(0, 150, 136, 1)",!0),level5:_(.786,"rgba(100, 181, 246, 1)",!0),level6:_(1,"rgba(120, 123, 134, 1)",!0),level7:_(1.618,"rgba(33, 150, 243, 1)",!0),level8:_(2.618,"rgba(244, 67, 54, 1)",!0),level9:_(3.618,"rgba(103, 58, 183, 1)",!0),level10:_(4.236,"rgba(233, 30, 99, 1)",!0),level11:_(4.618,"rgba(233, 30, 99, 1)",!0),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetoolfibspeedresistancearcs:{showCoeffs:!0,font:f,fillBackground:!0,transparency:80,fullCircles:!1,trendline:{visible:!0,color:"rgba(120, 123, 134, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},level1:_(.236,"rgba(244, 67, 54, 1)",!0),level2:_(.382,"rgba(129, 199, 132, 1)",!0),level3:_(.5,"rgba(76, 175, 80, 1)",!0),level4:_(.618,"rgba(0, 150, 136, 1)",!0),level5:_(.786,"rgba(100, 181, 246, 1)",!0),level6:_(1,"rgba(120, 123, 134, 1)",!0),level7:_(1.618,"rgba(33, 150, 243, 1)",!0),level8:_(2.618,"rgba(244, 67, 54, 1)",!0),level9:_(3.618,"rgba(103, 58, 183, 1)",!0),level10:_(4.236,"rgba(233, 30, 99, 1)",!0),level11:_(4.618,"rgba(233, 30, 99, 1)",!0),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetooltrendbasedfibextension:{showCoeffs:!0,showPrices:!0,font:f,fillBackground:!0,transparency:80,extendLines:!1,extendLinesLeft:!1,horzLabelsAlign:"left",vertLabelsAlign:"bottom",reverse:!1,coeffsAsPercents:!1,fibLevelsBasedOnLogScale:!1,trendline:{visible:!0,color:"rgba(120, 123, 134, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},levelsStyle:{linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level1:i(0,"rgba(120, 123, 134, 1)",!0),level2:i(.236,"rgba(244, 67, 54, 1)",!0),level3:i(.382,"rgba(129, 199, 132, 1)",!0),level4:i(.5,"rgba(76, 175, 80, 1)",!0),level5:i(.618,"rgba(0, 150, 136, 1)",!0),level6:i(.786,"rgba(100, 181, 246, 1)",!0),level7:i(1,"rgba(120, 123, 134, 1)",!0),level8:i(1.618,"rgba(33, 150, 243, 1)",!0),level9:i(2.618,"rgba(244, 67, 54, 1)",!0),level10:i(3.618,"rgba(156, 39, 176, 1)",!0),level11:i(4.236,"rgba(233, 30, 99, 1)",!0),level12:i(1.272,"rgba(129, 199, 132, 1)",!1),level13:i(1.414,"rgba(244, 67, 54, 1)",!1),level16:i(2,"rgba(0, 150, 136, 1)",!1),level14:i(2.272,"rgba(129, 199, 132, 1)",!1),level15:i(2.414,"rgba(76, 175, 80, 1)",!1),level17:i(3,"rgba(100, 181, 246, 1)",!1),level18:i(3.272,"rgba(120, 123, 134, 1)",!1),level19:i(3.414,"rgba(33, 150, 243, 1)",!1),level20:i(4,"rgba( 204, 40, 40, 1)",!1),level21:i(4.272,"rgba(156, 39, 176, 1)",!1),level22:i(4.414,"rgba(233, 30, 99, 1)",!1),level23:i(4.618,"rgba(129, 199, 132, 1)",!1),level24:i(4.764,"rgba(0, 150, 136, 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:{showCoeffs:!0,font:"Verdana",fillBackground:!0,transparency:80,horzLabelsAlign:"right",vertLabelsAlign:"bottom",trendline:{visible:!0,color:"rgba(120, 123, 134, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},level1:_(0,"rgba(120, 123, 134, 1)",!0),level2:_(.382,"rgba(244, 67, 54, 1)",!0),level3:_(.5,"rgba(129, 199, 132, 1)",!1),level4:_(.618,"rgba(76, 175, 80, 1)",!0),level5:_(1,"rgba(0, 150, 136, 1)",!0),level6:_(1.382,"rgba(100, 181, 246, 1)",!0),level7:_(1.618,"rgba(120, 123, 134, 1)",!0),level8:_(2,"rgba(33, 150, 243, 1)",!0),level9:_(2.382,"rgba(244, 67, 54, 1)",!0),level10:_(2.618,"rgba(156, 39, 176, 1)",!0),level11:_(3,"rgba(233, 30, 99, 1)",!0),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetoolschiffpitchfork:{fillBackground:!0,transparency:80,style:r.Schiff,median:{visible:!0,color:"rgba(244, 67, 54, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},extendLines:!1,level0:_(.25,"rgba(255, 183, 77, 1)",!1),level1:_(.382,"rgba(129, 199, 132, 1)",!1),level2:_(.5,"rgba(76, 175, 80, 1)",!0),level3:_(.618,"rgba(0, 150, 136, 1)",!1),level4:_(.75,"rgba(100, 181, 246, 1)",!1),level5:_(1,"rgba(33, 150, 243, 1)",!0),level6:_(1.5,"rgba(156, 39, 176, 1)",!1),level7:_(1.75,"rgba(233, 30, 99, 1)",!1),level8:_(2,"rgba(229, 115, 115, 1)",!1),__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolschiffpitchfork2:{fillBackground:!0,transparency:80,style:r.Schiff2,median:{visible:!0,color:"rgba(244, 67, 54, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},extendLines:!1,level0:_(.25,"rgba(255, 183, 77, 1)",!1),level1:_(.382,"rgba(129, 199, 132, 1)",!1),level2:_(.5,"rgba(76, 175, 80, 1)",!0),level3:_(.618,"rgba(0, 150, 136, 1)",!1),level4:_(.75,"rgba(100, 181, 246, 1)",!1),level5:_(1,"rgba(33, 150, 243, 1)",!0),level6:_(1.5,"rgba(156, 39, 176, 1)",!1),level7:_(1.75,"rgba(233, 30, 99, 1)",!1),level8:_(2,"rgba(229, 115, 115, 1)",!1),__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolinsidepitchfork:{fillBackground:!0,transparency:80,style:r.Inside,median:{visible:!0,color:"rgba(244, 67, 54, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},extendLines:!1,level0:_(.25,"rgba(255, 183, 77, 1)",!1),level1:_(.382,"rgba(129, 199, 132, 1)",!1),level2:_(.5,"rgba(76, 175, 80, 1)",!0),level3:_(.618,"rgba(0, 150, 136, 1)",!1),level4:_(.75,"rgba(100, 181, 246, 1)",!1),level5:_(1,"rgba(33, 150, 243, 1)",!0),level6:_(1.5,"rgba(156, 39, 176, 1)",!1),level7:_(1.75,"rgba(233, 30, 99, 1)",!1),level8:_(2,"rgba(229, 115, 115, 1)",!1), __collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolregressiontrend:{linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,styles:{upLine:{visible:!0,color:"rgba(33, 150, 243, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},downLine:{visible:!0,color:"rgba(33, 150, 243, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},baseLine:{visible:!0,color:"rgba(244, 67, 54, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},extendLines:!1,showPearsons:!0,transparency:70}}},y(TradingView.defaultProperties.chartproperties),g()}if(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:s.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"]){var w="rgba( 212, 121, 40, 1)";TradingView.defaultProperties["study_PivotPointsStandard@tv-basicstudies"]={_hardCodedDefaultsVersion:1,font:"Arial",fontsize:11,levelsStyle:{showLabels:!0,visibility:{P:!0,"S1/R1":!0,"S2/R2":!0,"S3/R3":!0,"S4/R4":!0,"S5/R5":!0},colors:{P:w,"S1/R1":w,"S2/R2":w,"S3/R3":w,"S4/R4":w,"S5/R5":w},widths:{P:1,"S1/R1":1,"S2/R2":1,"S3/R3":1,"S4/R4":1,"S5/R5":1}}}}if(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:t("rgba( 255, 0, 0, 1)",!1),level1:t("rgba( 0, 128, 0, 1)",!1),level2:t("rgba( 0, 0, 255, 1)",!1),level3:t("rgba( 255, 0, 255, 1)",!1),level4:t("rgba( 0, 128, 255, 1)",!0),level5:t("rgba( 255, 0, 0, 1)",!0),level6:t("rgba( 0, 128, 0, 1)",!0),level7:t("rgba( 0, 0, 255, 1)",!0),level8:t("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_Compare@tv-basicstudies"]&&(TradingView.defaultProperties["study_Compare@tv-basicstudies"]={minTick:"default"}),void 0===TradingView.defaultProperties["study_Overlay@tv-basicstudies"]){TradingView.defaultProperties["study_Overlay@tv-basicstudies"]={style:n.STYLE_LINE,showPriceLine:!1,minTick:"default",candleStyle:{upColor:"rgba( 107, 165, 131, 1)",downColor:"rgba( 215, 84, 66, 1)",drawWick:!0,drawBorder:!0,drawBody:!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,drawBody:!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:"#FF6D00",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:2,priceSource:"close",styleType:n.STYLE_LINE_TYPE_SIMPLE},areaStyle:{color1:"#2196f3",color2:"#2196f3",linecolor:"#2196f3",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:2,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:2,bottomLineWidth:2,priceSource:"close",transparency:50,baseLevelPercentage:50},styles:{open:{visible:!0,color:"rgba( 255, 0, 0, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:s.Line,histogramBase:0},high:{visible:!0,color:"rgba( 255, 0, 0, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:s.Line,histogramBase:0},low:{visible:!0,color:"rgba( 255, 0, 0, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:s.Line,histogramBase:0},close:{visible:!0,color:"rgba( 255, 0, 0, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:s.Line,histogramBase:0}}}}for(var P=e.split("."),C=TradingView.defaultProperties,x=0;x1?u(e[r],t.slice(1),i):(e[r]&&e[r].setValue?e[r].setValue(i):e[r]=i,!0))}function h(e){i||_.logWarn("Path `"+e+"` does not exist.")}}function y(e,t,i,n){window.__defaultsOverrides&&v(e,t,i,window.__defaultsOverrides,n)} function g(){var e=/^linetool.+/;Object.keys(TradingView.defaultProperties).forEach((function(t){e.test(t)&&y(TradingView.defaultProperties[t],null,!1,t)}))}function b(e,t){return t?function(e,t){var i=m(e);if(!window._UNIT_TESTS){var n=TradingView.clone(TVSettings.getJSON(e,null));if(function(e){var t=new Set(["linetoolregressiontrend"]);return e.startsWith("study_")||t.has(e)}(e)&&n&&function(e){if(!e)return!1;e=e.toString();var t=new RegExp("\\d+").exec(e);return null!==t&&t[0]===e}(n.version)){var r=n.inputs,o=t.updateStudyInputs(n.id,n.version,"last",r,null);n.inputs=o;var s=t.updateStudyState(n,n);n=s}TradingView.merge(i,n)}return i}(e,t):function(e){var t=m(e);if(!window._UNIT_TESTS){var i=TradingView.clone(TVSettings.getJSON(e,null));i&&TradingView.merge(t,i)}return t}(e)}b.create=function(e,t){if(t){var i=m(e);TradingView.defaultProperties[e]=Object.assign(t,i)}},b.remove=function(e){TradingView.defaultProperties[e]=void 0},TradingView.saveDefaults=function(e,t){TVSettings.setJSON(e,t)},TradingView.factoryDefaults=m,window.applyDefaultOverridesToLinetools=g,window.applyDefaultsOverrides=y,window.applyPropertiesOverrides=v,window.defaults=b,t.applyDefaultOverridesToLinetools=g,t.applyDefaultsOverrides=y,t.applyPropertiesOverrides=v,t.defaults=b,t.factoryDefaults=m,t.saveDefaults=TradingView.saveDefaults},wamh:function(e,t,i){"use strict";i.r(t),i.d(t,"ChangeToolBarsThemeUndoCommand",(function(){return s}));var n=i("mrSG"),r=i("EsvI"),o=i("oiZD"),s=function(e){function t(t,i,n){void 0===n&&(n=!0);var r=e.call(this,"Apply Toolbars Theme")||this;return r._prevThemeName=t,r._themeName=i,r._syncState=n,r}return Object(n.__extends)(t,e),t.prototype.undo=function(){Object(r.isStdThemeName)(this._prevThemeName)&&(Object(o.setTheme)(this._prevThemeName),this._syncState&&Object(r.syncTheme)())},t.prototype.redo=function(){Object(r.isStdThemeName)(this._themeName.toLowerCase())&&(Object(o.setTheme)(this._themeName.toLowerCase()),this._syncState&&Object(r.syncTheme)())},t}(i("RDU5").UndoCommand)},wi9r:function(e,t,i){"use strict";(function(e){var t=i("e3/o").randomHash;function n(e){this._chartApi=e,this._sessionid="qs_"+t(),this._sessionstarted=!1}n.prototype.destroy=function(){this._sessionstarted&&(this._chartApi.quoteDeleteSession(this._sessionid),this._sessionid=null,this._sessionstarted=!1)},n.prototype.connected=function(){return this._chartApi.connected()},n.prototype.connect=function(e){this._globalHandler=e,this._chartApi.createSession(this._sessionid,this),this._chartApi.connect()},n.prototype.disconnect=function(){this._chartApi.disconnect()},n.prototype.quoteAddSymbols=function(e,t){e=[].concat(e),t&&t.forcePermission&&(e=e.concat({flags:["force_permission"]})),this._chartApi.quoteAddSymbols(this._sessionid,e)},n.prototype.quoteRemoveSymbols=function(e){this._chartApi.quoteRemoveSymbols(this._sessionid,e)},n.prototype.quoteFastSymbols=function(e){this._chartApi.quoteFastSymbols(this._sessionid,e)},n.prototype.quoteSetFields=function(e){this._chartApi.quoteSetFields(this._sessionid,e)}, n.prototype.onMessage=function(e){switch(e.method){case"connected":this._sessionstarted||(this._chartApi.quoteCreateSession(this._sessionid),this._sessionstarted=!0);break;case"disconnected":this._sessionstarted=!1}this._globalHandler(e)},n.prototype.quoteHibernateAll=function(e){this._chartApi.quoteHibernateAll(this._sessionid)},TradingView.QuoteSession=n,e&&e.exports&&(e.exports=n)}).call(this,i("YuTi")(e))},wiuq:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolArrowMarker",(function(){return c}));var n=i("mrSG"),r=i("Ss5c"),o=i("Ocx9"),s=i("tc+8"),a=i.n(s),l=window.t("Arrow Marker"),c=function(e){function t(n,r){var o=e.call(this,n,r||t.createProperties())||this;return i.e("lt-pane-views").then(function(e){var t=i("Qa6j").ArrowMarkerPaneView;o._setPaneViews([new t(o,o.model())])}.bind(null,i)).catch(void 0),o}return Object(n.__extends)(t,e),t.prototype.pointsCount=function(){return 2},t.prototype.name=function(){return"Trend Line"},t.prototype.translatedType=function(){return l},t.createProperties=function(e){var i=new o.DefaultProperty("linetoolarrowmarker",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"FxV7")).then((function(e){return e.ArrowMarkerDefinitionsViewModel}))},t._configureProperties=function(e){r.LineDataSource._configureProperties(e),e.hasChild("text")||e.addChild("text",new a.a("")),e.addExclusion("text")},t}(r.LineDataSource)},wjVR:function(e,t,i){"use strict";i.r(t),i.d(t,"ChartWidgetBase",(function(){return b}));var n=i("mrSG"),r=i("Eyy1"),o=i("ogJP"),s=i("CW80"),a=i("3ClC"),l=i("H0vP"),c=i("mMWL"),u=i("KnF9"),h=i("VaSN"),d=i("aIyQ"),p=i.n(d),_=i("hY0g"),f=i.n(_),m=i("Tmoa"),v=i("EsvI"),y={addToWatchlistEnabled:!0,sourceSelectionEnabled:!0,propertyPagesEnabled:!0,paneContextMenuEnabled:!0,priceScaleContextMenuEnabled:!0,currencyLabelEnabled:!1,goToDateEnabled:!1,marketStatusWidgetEnabled:!0,chartWarningWidgetEnabled:!0,dataProblemWidgetEnabled:!0,paneControlsEnabled:!0,isSymbolAvailable:function(e){return Promise.resolve(!0)},legendWidgetEnabled:!0,chartEventsEnabled:!0,esdEnabled:!1,croppedTickMarks:!0,handleScale:{mouseWheel:!0,pinch:!0,axisPressedMouseMove:!0},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!0}};function g(e,t,i,n){void 0===n&&(n=0);var r=t.mainSeries().syncModel(),o=e.mainSeries().syncModel(),s=i;if(null!==r&&null!==o){var a=e.createSyncPoint(r,o);0!==n&&(i=r.projectTime(i,n)),s=a.sourceTimeToTargetTime(i)}return e.timeScale().points().roughIndex(s,o&&o.distance.bind(o))}var b=function(){function e(e,t,i){var n=this;this.activePaneWidget=null,this._model=null,this._paneWidgets=[],this._maximizedPaneWidget=null,this._timeAxisWidget=null,this._paneSeparators=[],this._timeAxisSeparator=null,this._lineToolsSynchronizer=null,this._modelCreated=new p.a,this._isDestroyed=!1,this._customLegendWidgetsFactoryMap=new Map,this._backgroundBasedTheme=new f.a("light"), this._updateThemedColorBound=this._updateThemedColor.bind(this),this._id=t,this._options=Object(o.merge)(Object(o.clone)(y),e),this._options.customLegendWidgetFactories&&(this._customLegendWidgetsFactoryMap=this._options.customLegendWidgetFactories),this._subscribeToDrawingState(),this.withModel(this,(function(){var e=n.model().model();e.backgroundTopColor().subscribe(n._updateThemedColorBound),e.backgroundColor().subscribe(n._updateThemedColorBound)}))}return e.prototype.destroy=function(){null!==this._model&&(this._model.model().backgroundTopColor().unsubscribe(this._updateThemedColorBound),this._model.model().backgroundColor().unsubscribe(this._updateThemedColorBound),this._model.destroy()),this._customLegendWidgetsFactoryMap.clear(),this._isDestroyed=!0},e.prototype.id=function(){return this._id},e.prototype.timeAxisHeight=function(){return null!==this._timeAxisWidget?this._timeAxisWidget.size.h:0},e.prototype.withModel=function(e,t){this.model()?t.call(e):this.modelCreated().subscribe(e,t,!0)},e.prototype.images=function(e){var t=this;window.TradingView.printing=!0;var i=this.model().selection().sources();this.model().selectionMacro((function(e){return e.clearSelection()}));var n,o=function(i,n){i.paint(n,t.onWidget());var r={showCollapsedLegend:Boolean(null==e?void 0:e.showCollapsedLegend),status:null==e?void 0:e.status};return i.getScreenshotData(r)},s=[];if(null!==this._maximizedPaneWidget){var a=this._paneWidgets.indexOf(this._maximizedPaneWidget);s.push(o(this._maximizedPaneWidget,l.InvalidationMask.light().invalidateForPane(a)))}else for(var c=0;cr)){var s,a=this.m_series.bars().range(i,r),l=this.m_series.priceScale(),c=this.m_series.barColorer(),u={};if(a.each((function(i,n){var r,o={};(o.time=Math.round(i), e(n,o))&&(u.value=n,r=n[TradingView.STYLE_PLOT]?n[TradingView.STYLE_PLOT]:c.barStyle(i,!1,u),n[TradingView.STYLE_PLOT]=r,u.previousValue=n,o.color=r.barColor,o.borderColor=r.barBorderColor,o.wickColor=r.barWickColor,o.hollow=r.isBarHollow,t.m_bars.push(o))}),this),0!==this.m_bars.length&&(s=this.m_series.firstValue(),l.barPricesToCoordinates(this.m_bars,s)),this.m_model.timeScale().barIndexesToCoordinates(this.m_bars),this.m_model.selection().isSelected(this.m_series)){var h=p(i,r);this._selectionData={points:[],bgColors:[],visible:!0};var d=this.m_model.paneForSource(this.m_series).height();this._selectionData.hittestResult=o.REGULAR;for(var _=0;_=t&&e.y<=i||e.y<=t&&e.y>=i))return new r(r.REGULAR);return null},h.prototype._drawImpl=function(e){if(null!==this._data){var t=this._data.isHlineFill;if(t||0!==this._data.points1.length&&0!==this._data.points2.length){var i=this._data.timePoints,n=this._data.points1,r=this._data.points2,s=this._data.colors,l=isNumber(this._data.transparency)?this._data.transparency:50;l=Math.min(l,100),l=Math.max(l,0);for(var c,u={},h=[],d=.25*this._data.getBarSpacing(),p=0;p0&&null!==c){var m=u[c]||[];m.push(h),u[c]=m}h=f?[_]:[]}}for(var v in u){var y=u[v];e.beginPath();for(var g=0;g=0;P--)e.lineTo(b[P].timePoint,b[P].point2)}else{var C=b[0].point2;e.lineTo(S+d,w),e.lineTo(S+d,C),e.lineTo(S-d,C),e.lineTo(S-d,w)}}e.closePath(),e.fillStyle=a.generateColor(v,l),e.fill()}}}},d.prototype.update=function(){this._invalidated=!0},d.prototype._plotNames=function(){return this._source.metaInfo().plots.map((function(e){return e.id}))},d.prototype._plotIndex1=function(){return null===this._plIndex1&&(this._plIndex1=this._plotNames().indexOf(this._plotAId())+1),this._plIndex1},d.prototype._plotIndex2=function(){return null===this._plIndex2&&(this._plIndex2=this._plotNames().indexOf(this._plotBId())+1),this._plIndex2},d.prototype._updateImpl=function(){if(this._points1=[],this._points2=[],this._colorsMap&&(this._colors=[]),this._timePoints=[],this._visible()){ var e=this._source.priceScale(),t=this._source._model.timeScale();if(e&&!e.isEmpty()&&!this._source._model.timeScale().isEmpty()&&!this._source._series.bars().isEmpty()){if(this._isHlineFill){var i=this._source.firstValue(),n=this._source.properties().bands[this._bandAKey],r=this._source.properties().bands[this._bandBKey];this._level1=e.priceToCoordinate(n.value.value(),i),this._level2=e.priceToCoordinate(r.value.value(),i)}var o=this._source._model.timeScale().visibleBarsStrictRange();if(null!==o){var s=this._source._series.nearestIndex(o.firstBar(),c.NearestRight),a=this._source._series.nearestIndex(o.lastBar(),c.NearestLeft);if(!((s=this._correctStartBarIndex(s))>a)){var l=this._source.data().range(s,a);if(l.size()>0){var u=l.firstIndex(),h=l.lastIndex(),d=this._source.offset(this._plotAId()),p=this._source.offset(this._plotBId()),_=Math.max(d,p),f=Math.min(d,p),m=u+_,v=this._source.data().firstIndex();u>v&&(m=u<_+v?_+v:u);var y=h+f,g=this._source.data().lastIndex();h>g+f&&hh?u+_:m,S=m;S<=y;++S){if(this._timePoints.push(t.indexToCoordinate(b++)),this._colors){var w=this._source.data().valueAt(S-f);if(null!==w){var P=w[this._colorPlotOffset+1];null==P?this._colors.push(null):this._colors.push(this._colorValues[this._colorsMap[P]].color.value())}}if(!this._isHlineFill){var C=this._source.data().valueAt(S-d),x=this._source.data().valueAt(S-p);if(null!==C&&null!==x){var T=C[this._plotIndex1()],I=x[this._plotIndex2()];this._points1.push(T),this._points2.push(I)}}}}i=this._source.firstValue();e.pricesArrayToCoordinates(this._points1,i),e.pricesArrayToCoordinates(this._points2,i)}}}}},d.prototype.renderer=function(){this._invalidated&&(this._updateImpl(),this._invalidated=!1);var e={};return e.points1=this._points1,e.points2=this._points2,e.timePoints=this._timePoints,e.getBarSpacing=this._getBarSpacing,e.backcolor=this._color(),e.transparency=this._transparency(),e.isHlineFill=this._isHlineFill,e.level1=this._level1,e.level2=this._level2,this._colors&&(e.colors=this._colors),this._areaRenderer.setData(e),this._areaRenderer},d.prototype._plotAId=function(){n(!1,"Pure virtual call!")},d.prototype._plotBId=function(){n(!1,"Pure virtual call!")},d.prototype._color=function(){n(!1,"Pure virtual call!")},d.prototype._transparency=function(){n(!1,"Pure virtual call!")},d.prototype._visible=function(){n(!1,"Pure virtual call!")},d.prototype._correctStartBarIndex=function(e){return e},inherit(p,d),p.prototype._plotAId=function(){return this._source.properties().area[0].name.value()},p.prototype._plotBId=function(){return this._source.properties().area[1].name.value()},p.prototype._color=function(){return this._source.properties().areaBackground.backgroundColor.value()},p.prototype._transparency=function(){var e=this._source.properties().areaBackground.transparency.value();return l(e,0,100)},p.prototype._visible=function(){return this._source.properties().areaBackground.fillBackground.value()},inherit(_,d),_.prototype._initBandIndexes=function(e,t){this._bandAKey=null, this._bandBKey=null;for(var i=0;i0)e[e.length-1].addCommand(n);else{i.clear();var r=t.head(),o=r&&r.text();r&&r.canMerge(n)?r.merge(n):t.push(n);var a=n.text();""!==a&&a!==o&&h.logNormal("DO: "+a)}n.executeOnPush()&&n.redo(),e.length||s.fire(c())}function c(){var e=t.head(),n=i.head();return{enableUndo:!t.isEmpty(),undoText:void 0===e?void 0:e.text(),enableRedo:!i.isEmpty(),redoText:void 0===n?void 0:n.text()}}return{beginUndoMacro:function(t){var i=new o.a(t);return e.push(i),i},clearStack:function(){t.clear(),i.clear(),s.fire(c())},createUndoCheckpoint:function(){return{lastActualCommand:t.isEmpty()?null:t.head()}},endUndoMacro:function(){var t=Object(n.ensureDefined)(e.pop());t.isEmpty()||l(t)},pushUndoCommand:l,redo:function(){if(i.isEmpty())return!1;var e=i.pop();return!!e&&(e.redo(),t.push(e),h.logNormal("REDO: "+e.text()),s.fire(c()),!0)},redoStack:function(){return i},setWatchedValue:function(e,t,i){if(e.value()!==t){var n=new a(e,t,i);l(n),n.redo()}},undo:function(){if(t.isEmpty())return!1;var e=t.pop();return!!e&&(e.undo(),i.push(e),h.logNormal("UNDO: "+e.text()),s.fire(c()),!0)},undoStack:function(){return t},undoToCheckpoint:function(e){for(;!t.isEmpty()&&e.lastActualCommand!==t.head();)t.pop().undo();i.clear(),s.fire(c())},state:c,onChange:function(){return s}}}},xDuj:function(e,t,i){"use strict";i.r(t),i.d(t,"translatedIntervalString",(function(){return r}));i("YFKU");var n=i("pPtI");function r(e){var t=Object(n.getTranslatedResolutionModel)(e,!0);return null===t?e:t.multiplier+(t.mayOmitShortKind?"":t.shortKind)}},xUGI:function(e,t,i){"use strict";var n=i("GH0z").PercentageFormatter,r=i("zXvd").NumericFormatter,o=i("zDbI").CHART_FONT_FAMILY,s=i("d1Pk").fibLevelPrice,a=i("ikwP").drawScaled;function l(e,t,i){this._fibLevelsBasedOnLogScaleProperty=e,this._sourcesToRow={},this._rowsToSources={},this._currentSymbol="",this._actualCapacity=1,this._actualWidth=1,this._numericFormatter=new r,this._percentageFormatter=new n,this._pixelRatio=i.pixelRatio,this._recreateCanvas(this._actualWidth,l.ROW_HEIGHT*this._actualCapacity),this._levelsCount=t}l.prototype.destroy=function(){this._canvas=null,this._cache=null},l.prototype.topByRow=function(e){return e*l.ROW_HEIGHT},l.prototype.rowHeight=function(e){return l.ROW_HEIGHT},l.prototype.devicePixelRatio=function(){return this._canvas&&this._canvas.pixelRatio||0},l.prototype._recreateCanvas=function(e,t){this._canvas=document.createElement("canvas"),this._canvas.width=Math.ceil(e*this._pixelRatio),this._canvas.height=Math.ceil(t*this._actualCapacity*this._pixelRatio), this._cache=this._canvas.getContext("2d"),this._cache.font="12px "+o},l.prototype.canvas=function(){return this._canvas},l.ROW_HEIGHT=14,l.prototype.points=function(e){return[e.points()[0],e.points()[1]]},l.prototype._selectStartPrice=function(e,t){return t?e.points()[0].price:e.points()[1].price},l.prototype.startPoint=function(e,t){var i=this._selectStartPrice(e,t);if(!this._calculateLogLevels(e))return{price:i};var n=e.ownerSource().firstValue();return{price:i,coordinate:e.priceScale().priceToCoordinate(i,n)}},l.prototype._calculatePriceRange=function(e,t,i){return i?t.price-e.price:e.price-t.price},l.prototype.priceRange=function(e,t){var i=this.points(e),n=i[0],r=i[1],o=this._calculatePriceRange(n,r,t);if(!this._calculateLogLevels(e))return{price:o};var s=e.priceScale(),a=e.ownerSource().firstValue(),l=s.priceToCoordinate(n.price,a),c=s.priceToCoordinate(r.price,a);return{price:o,coordinate:t?c-l:l-c}},l.prototype.sourceIsReady=function(e){return e.points().length>=2},l.prototype._calculateLogLevels=function(e){return e.fibLevelsBasedOnLogScale&&e.fibLevelsBasedOnLogScale()},l.prototype._calculateWidth=function(e){if(!this.sourceIsReady(e))return null;var t=this._canvas.getContext("2d");t.font="12px "+o;var i=!!e.properties().showPrices&&e.properties().showPrices.value(),n=!!e.properties().coeffsAsPercents&&e.properties().coeffsAsPercents.value(),r=e.properties().showCoeffs.value(),a=this.points(e),l=a[0],c=a[1];if(!l||!c)return null;var u=e.ownerSource().firstValue();if(null===u)return 0;var h=!1,d=e.properties();d.reverse&&d.reverse.value()&&(h=d.reverse.value());for(var p=this.startPoint(e,h),_=this.priceRange(e,h),f=this._calculateLogLevels(e),m=0,v=[],y=1;y<=this._levelsCount;y++){var g=d["level"+y].coeff.value(),b="";if(r&&(b+=n?this._percentageFormatter.format(Math.round(1e4*g)/100):this._numericFormatter.format(g)),i){var S=e.priceScale(),w=s(p,_,g,S,u,f);b+="("+S.formatPrice(w,u)+")"}var P={text:b,left:m,width:t.measureText(b).width+4};v.push(P),m+=P.width}return{totalWidth:m,cells:v}},l.prototype._effectiveState=function(e){var t={},i=e.properties();i.showPrices&&(t.showPrices=i.showPrices.value()),i.coeffsAsPercents&&(t.coeffsAsPercents=i.coeffsAsPercents.value()),t.showCoeffs=i.showCoeffs.value();var n=e.priceScale();n&&(n.formatter().state&&(t.formatter=e.priceScale().formatter().state()),t.logLevels=this._calculateLogLevels(e)),i.reverse&&(t.reverse=i.reverse.value()),t.p1=e.points()[0],t.p2=e.points()[1],3===e.points().length&&(t.p3=e.points()[2]),t.items=[];for(var r=1;r<=this._levelsCount;r++){var o=i["level"+r],s={coeff:o.coeff.value(),color:o.color.value()};t.items.push(s)}return t},l.prototype._findEmptyRow=function(e){for(var t=0;this._rowsToSources[t];)t++;return this._rowsToSources[t]=e,t>=this._actualCapacity&&(this._actualCapacity++,this._recreateCanvas(this._actualWidth,l.ROW_HEIGHT*this._actualCapacity)),t},l.prototype._repaintSource=function(e,t,i){var n=l.ROW_HEIGHT*i.row;a(this._cache,this._pixelRatio,function(){this._cache.clearRect(0,n,this._actualWidth,l.ROW_HEIGHT), this._cache.textBaseline="bottom",this._cache.font="12px "+o,n+=l.ROW_HEIGHT;for(var i=0;ithis._actualWidth&&(this._recreateCanvas(o.totalWidth,l.ROW_HEIGHT*this._actualCapacity),this._actualWidth=o.totalWidth);i=this._sourcesToRow[e.id()];this._repaintSource(o,r,i),this._sourcesToRow[e.id()].effectiveState=r,this._sourcesToRow[e.id()].preparedCells=o}else this._sourcesToRow[e.id()].effectiveState=null}return this._sourcesToRow[e.id()]},e.exports=l},xWfy:function(e,t,i){"use strict";i.d(t,"a",(function(){return a})),i.d(t,"b",(function(){return h})),i.d(t,"c",(function(){return d})),i.d(t,"d",(function(){return p}));var n=i("tqok"),r=i("fFKx"),o=i("SqfW"),s=i("7Fue"),a=function(){function e(e,t){if(this._indexes=[],this._horizlines=new Map,this._vertlines=new Map,this._lines=new Map,this._hlines=new Map,this._textmarks=new Map,this._shapemarks=new Map,this._backgrounds=new Map,this._polygons=new Map,this._trendchannels=new Map,this._hhists=new Map,this._dwglabels=new Map,this._dwglines=new Map,"data"===e){var i=t;this._indexes=i.indexes,this._vertlines=l(i.vertlines,this._indexes,o.b),this._horizlines=l(i.horizlines,this._indexes,r.b)}else if("state"===e){var n=t;this._indexes=n.indexes||[],this._vertlines=c(n.vertlines,this._indexes,o.b),this._horizlines=c(n.horizlines,this._indexes,r.b)} this._hhistsByTimePointIndex=Object(s.b)(this._hhists)}return e.prototype.horizlines=function(){return this._horizlines},e.prototype.vertlines=function(){return this._vertlines},e.prototype.lines=function(){return this._lines},e.prototype.hlines=function(){return this._hlines},e.prototype.textmarks=function(){return this._textmarks},e.prototype.shapemarks=function(){return this._shapemarks},e.prototype.backgrounds=function(){return this._backgrounds},e.prototype.polygons=function(){return this._polygons},e.prototype.trendchannels=function(){return this._trendchannels},e.prototype.hhists=function(){return this._hhists},e.prototype.dwglabels=function(){return this._dwglabels},e.prototype.dwglines=function(){return this._dwglines},e.prototype.hhistsByTimePointIndex=function(){return this._hhistsByTimePointIndex},e}();function l(e,t,i){var n=new Map;return e.forEach((function(e,r){var o=n.get(r)||new Set;e.forEach((function(e){var n=i(e,t);null!==n&&o.add(n)})),n.set(r,o)})),n}function c(e,t,i){var n=new Map;if(void 0===e)return n;for(var r=function(e){var r=e.styleId,o=n.get(r)||new Set;e.data.forEach((function(e){var n=i(e,t);null!==n&&o.add(n)})),n.set(r,o)},o=0,s=e;o0?r:void 0}function h(){return new a}function d(e){return new a("state",e)}function p(e){var t=function(e){var t=new Set;e.horizlines().forEach((function(e,i){e.forEach((function(e){t.add(e.startIndex),t.add(e.endIndex)}))})),e.vertlines().forEach((function(e,i){e.forEach((function(e){t.add(e.index)}))})),e.lines().forEach((function(e,i){e.forEach((function(e){t.add(e.startIndex),t.add(e.endIndex)}))})),e.textmarks().forEach((function(e,i){e.forEach((function(e){t.add(e.time)}))})),e.shapemarks().forEach((function(e,i){e.forEach((function(e){t.add(e.time)}))})),e.backgrounds().forEach((function(e,i){e.forEach((function(e){t.add(null!==e.start?e.start:n.a),t.add(e.stop)}))})),e.polygons().forEach((function(e,i){e.forEach((function(e){e.points.forEach((function(e){t.add(e.index)}))}))})),e.trendchannels().forEach((function(e,i){e.forEach((function(e){t.add(e.startIndex),t.add(e.endIndex)}))})),e.hhists().forEach((function(e,i){e.forEach((function(e){t.add(e.firstBarTime),t.add(e.lastBarTime)}))})),e.dwglabels().forEach((function(e,i){e.forEach((function(e){t.add(e.x)}))})),e.dwglines().forEach((function(e,i){e.forEach((function(e){t.add(e.x1),t.add(e.x2)}))}));var i=Array.from(t);return i.sort((function(e,t){return e-t})),i}(e),i={indexes:t},s={currentId:0};return i.vertlines=u(e.vertlines(),s,t,o.a),i.horizlines=u(e.horizlines(),s,t,r.a),i}},xdS3:function(e,t,i){},xnA2:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=window.t("Fib Channel");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),this.version=s.version, i.e("lt-pane-views").then(function(e){var t=i("CR3a").FibChannelPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.LevelsCount=24,s.version=2,s.prototype.levelsCount=function(){return s.LevelsCount},s.prototype.migrateVersion=function(e,t,i){i.properties.removeProperty("reverse")},s.prototype.pointsCount=function(){return 3},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Fib Channel"},s.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("17v9").FibDrawingsWith24LevelsDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolfibchannel",e,!1,{range:[1,24],names:["coeff","color","visible"]});return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolFibChannel=s},xo8u:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("mrSG"),r=i("Eyy1"),o=function(e){function t(t,i,n,o){var s=e.call(this,o)||this;s._newSourcesCurrencies=new Map,s._oldSourcesCurrencies=new Map,s._showFade=!1,s._chartWidget=n;for(var a=n.model().mainSeries(),l=0,c=t.seriesLikeSources();l0&&(n=Object.assign({},this._points[0]),this._points.unshift(n))}},p.prototype.applyTemplate=function(e){delete e.background,delete e.backgroundColor,delete e.showBackground,n.prototype.applyTemplate.call(this,e)},p.prototype.translatedType=function(){return"Elliott Labels"},p.prototype.name=function(){return"Elliott Labels"},p.prototype.additionalActions=function(e){var t=this;return[new r({label:window.t("Degree"),subItems:s.map((function(i){var n=d.filter((function(e){return e.value===i}))[0];return new r({label:n.title,checkable:!0,checked:t.properties().degree.value()===i,onExecute:function(){e.setProperty(t.properties().degree,i,"Change Elliott Degree")}})}))})]},p.prototype.label=function(e){var t=s.length-this.properties().degree.value()-1,i=Math.floor(t/3);return{group:i,bold:!!(i%2),decoration:["","brackets","circle"][t%3],label:this.labelsGroup()[i][e]}},p.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("UHSU").ElliottPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},p.prototype.availableDegreesValues=function(){return d},p.createProperties=function(e){ var t=new o("linetoolelliott",e);return p._configureProperties(t),t},p._configureProperties=function(e){n._configureProperties(e)},inherit(_,p),_.prototype.pointsCount=function(){return 6},_._configureProperties=function(e){p._configureProperties(e)},inherit(f,_),f._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"]],f.prototype.translatedType=function(){return a},f.prototype.name=function(){return"Elliott Impulse Wave (12345)"},f.prototype.labelsGroup=function(){return f._labelsGroups},f.createProperties=function(e){var t=new o("linetoolelliottimpulse",e);return f._configureProperties(t),t},f._configureProperties=function(e){_._configureProperties(e)},inherit(m,_),m._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"]],m.prototype.translatedType=function(){return l},m.prototype.name=function(){return"Elliott Triangle Wave (ABCDE)"},m.prototype.labelsGroup=function(){return m._labelsGroups},m.createProperties=function(e){var t=new o("linetoolelliotttriangle",e);return m._configureProperties(t),t},m._configureProperties=function(e){_._configureProperties(e)},inherit(v,_),v._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"]],v.prototype.translatedType=function(){return c},v.prototype.name=function(){return"Elliott Triple Combo Wave (WXYXZ)"},v.prototype.labelsGroup=function(){return v._labelsGroups},v.createProperties=function(e){var t=new o("linetoolelliotttriplecombo",e);return v._configureProperties(t),t},v._configureProperties=function(e){_._configureProperties(e)},inherit(y,p),y.prototype.pointsCount=function(){return 4},y._configureProperties=function(e){p._configureProperties(e)},inherit(g,y),g._labelsGroups=[["0","A","B","C"],["0","a","b","c"],["0","A","B","C"],["0","a","b","c"],["0","A","B","C"]],g.prototype.translatedType=function(){return u},g.prototype.name=function(){return"Elliott Correction Wave (ABC)"},g.prototype.labelsGroup=function(){return g._labelsGroups},g.createProperties=function(e){var t=new o("linetoolelliottcorrection",e);return g._configureProperties(t),t},g._configureProperties=function(e){y._configureProperties(e)},inherit(b,y),b._labelsGroups=[["0","W","X","Y"],["0","w","x","y"],["0","W","X","Y"],["0","w","x","y"],["0","W","X","Y"]],b.prototype.translatedType=function(){return h},b.prototype.name=function(){return"Elliott Double Combo Wave (WXY)"},b.prototype.labelsGroup=function(){return b._labelsGroups},b.createProperties=function(e){var t=new o("linetoolelliottdoublecombo",e);return b._configureProperties(t),t},b._configureProperties=function(e){y._configureProperties(e)},t.LineToolElliott=p,t.LineToolElliottImpulse=f,t.LineToolElliottTriangle=m,t.LineToolElliottTripleCombo=v,t.LineToolElliottCorrection=g,t.LineToolElliottDoubleCombo=b},xzdg:function(e,t,i){"use strict";i.r(t) ;var n=i("Eyy1"),r=i("YFKU"),o=i("7KDR"),s=i("ikwP"),a=i("ogJP"),l=i("jFln"),c=i("u+0B"),u=i("XlJ7"),h=i("JWMC"),d=i("zDbI"),p=i("Hr11"),_=i("Kxc7").enabled("charting_library_debug_mode"),f=function(){function e(e,t,i,n){this._textWidthCache=new c.TextWidthCache(200),this._fontSize=0,this._color="",this._font="",this._keys=[],this._hash=new Map,this._fontSize=e,this._color=t,this._font=Object(u.makeFont)(e,i,n)}return e.prototype.destroy=function(){delete this._textWidthCache,this._keys=[],this._hash.clear()},e.prototype.paintTo=function(e,t,i,n,r){var o=this._getLabelImage(e,t);if("left"!==r){var a=Object(s.getCanvasDevicePixelRatio)(e.canvas);i-=Math.floor(o.textWidth*a)}n-=Math.ceil(o.height/2),e.drawImage(o.canvas,i,n,o.width,o.height)},e.prototype.getLabelHeight=function(e,t){return this._getLabelImage(e,t).height},e.prototype._getLabelImage=function(e,t){var i,r=this;if(this._hash.has(t))i=Object(n.ensureDefined)(this._hash.get(t));else{if(this._keys.length>=200){var o=Object(n.ensureDefined)(this._keys.shift());this._hash.delete(o)}var a=Object(s.getCanvasDevicePixelRatio)(e.canvas),l=Math.ceil(this._fontSize/4.5),c=Math.round(this._fontSize/10),u=Math.ceil(this._textWidthCache.measureText(e,t)),h=Object(p.ceiledEven)(Math.round(u+2*l)),d=Object(p.ceiledEven)(this._fontSize+2*l),f=Object(s.createDisconnectedCanvas)(document,new s.Size(h,d),a);i={text:t,textWidth:Math.round(Math.max(1,u)),width:Math.floor(h*a),height:Math.floor(d*a),canvas:f},0!==u?(this._keys.push(i.text),this._hash.set(i.text,i)):_&&console.log('Canvas 2d context measureText return zero width for "'+t+'" text'),e=Object(s.getContext2D)(i.canvas),Object(s.drawScaled)(e,a,(function(){e.font=r._font,e.fillStyle=r._color,e.fillText(t,0,d-l-c)}))}return i},e}(),m=i("CPmC"),v=i("+cnz"),y=i("CxTi"),g=function(){function e(){var e=this;this._width=null,this._currencyInfo=null,this._fontSize=0,this._currencyLabelWrapper=document.createElement("div"),this._currencyLabelWrapper.className=y["price-axis-currency-label-wrapper"],this._currencyLabel=document.createElement("span"),this._currencyLabel.className=y["price-axis-currency-label"],this._currencyLabel.classList.add("apply-common-tooltip"),Object(m.b)(this._currencyLabel,"text",(function(t){return e._tooltipContent()})),this._currencyText=document.createElement("span"),this._currencyText.className=y["price-axis-currency-label-text"],this._currencyLabel.appendChild(this._currencyText),this._arrowDown=document.createElement("span"),this._arrowDown.className=y["price-axis-currency-label-arrow-down"],this._arrowDown.innerHTML=v,this._currencyLabel.appendChild(this._arrowDown),this._currencyLabelWrapper.appendChild(this._currencyLabel)}return e.prototype.element=function(){return this._currencyLabelWrapper},e.prototype.labelElement=function(){return this._currencyLabel},e.prototype.isVisible=function(){return!this._currencyLabel.classList.contains("js-hidden")},e.prototype.width=function(){if(null!==this._width)return this._width;var e=this._currencyLabel.getBoundingClientRect() ;return this._width=e.right-e.left+1+8,this._width},e.prototype.drawLabel=function(e,t,i,n){var r=this._currencyText.textContent;if(null!==r){var o=Math.round(t/2*i),a=this._currencyLabel.getBoundingClientRect(),c=Object(p.ceiledEven)(a.width*i/2),h=this._currencyLabel.style,_=Math.round(this.labelTop()*i),f=Math.round(a.height*i),m=Math.round(Number(y.css_value_currency_label_radius)*i);Object(l.drawRoundRect)(e,o-c,_,2*c,f,m),e.fillStyle=h.backgroundColor,e.fill();var v=Math.max(1,Math.floor(i));e.lineWidth=v,e.strokeStyle=n?y.css_value_border_color_dark:y.css_value_border_color_light,Object(l.drawRoundRect)(e,o-c+v/2,_+v/2,2*c-v,f-v,m),e.stroke(),e.fillStyle=h.color,e.font=Object(u.makeFont)(this._fontSize,d.CHART_FONT_FAMILY),e.textBaseline="middle",e.textAlign="center",Object(s.drawScaled)(e,i,(function(){return e.fillText(r,o/i,(_+f/2)/i)}))}},e.prototype.show=function(){this._currencyLabel.classList.remove("js-hidden"),this._width=null},e.prototype.hide=function(){this._currencyLabel.classList.add("js-hidden")},e.prototype.setCurrencyInfo=function(e){if(null!==this._currencyInfo&&this._currencyInfo.selectedCurrency===e.selectedCurrency&&this._currencyInfo.readOnly===e.readOnly&&this._currencyInfo.originalCurrencies.size===e.originalCurrencies.size)return this._currencyInfo=e,!1;this._currencyInfo=e;var t=null===e.selectedCurrency?Object(r.t)("Mixed"):e.selectedCurrency;return this._currencyText.textContent!==t&&(this._currencyText.textContent=t,this._width=null),this._arrowDown.classList.contains("js-hidden")!==e.readOnly&&(this._arrowDown.classList.toggle("js-hidden",e.readOnly),this._currencyLabel.classList.toggle(y.readonly,e.readOnly),this._width=null),!0},e.prototype.updateColors=function(e,t){var i=this._currencyLabel.style;i.background=e,i.color=t},e.prototype.currencyInfo=function(){return this._currencyInfo},e.prototype.setFontSize=function(e){this._fontSize=e,this._currencyLabel.style.fontSize=e+"px",this._width=null},e.prototype.setLineHeight=function(e){this._currencyLabel.style.lineHeight=e+"px"},e.prototype.labelTop=function(){return Number(y.css_value_currency_label_top)},e.prototype._tooltipContent=function(){return null===this._currencyInfo?"":null===this._currencyInfo.selectedCurrency?Array.from(this._currencyInfo.currencies).join(", "):""},e}(),b=i("mrSG");i.d(t,"PriceAxisWidgetBase",(function(){return w}));var S={contextMenuEnabled:!0,currencyLabelEnabled:!1,contextMenu:{general:!0,source:!0},pressedMouseMoveScale:!0,croppedTickMarks:!0},w=function(){function e(e,t,i,n,r){var o=this;this._priceScale=null,this._widthCache=new c.TextWidthCache(50),this._tickmarksCache=new f(12,"#000",d.CHART_FONT_FAMILY,""),this._color=null,this._fontSize=null,this._currencyFontSize=0,this._currencyLabelWidth=null,this._isVisible=!0,this._updateTimeout=null,this._currencyMenu=null,this._prevOptimalWidth=0,this._size=null,this._destroyed=!1,this._pane=e,this._undoModel=t,this._properties=i,this._options=Object(a.merge)(Object(a.clone)(S),n),this._rendererOptionsProvider=r, this._cell=document.createElement("div"),this._cell.className="price-axis",this._cell.style.width="25px",this._cell.style.left="0",this._canvasConfiguredHandler=function(){o._recreateTickMarksCache(o._rendererOptionsProvider.options()),o._undoModel.model().lightUpdate()},this._canvasBinding=Object(s.createBoundCanvas)(this._cell,new s.Size(16,16)),this._canvasBinding.subscribeCanvasConfigured(this._canvasConfiguredHandler);var l=this._canvasBinding.canvas;l.style.position="absolute",l.style.zIndex="1",l.style.left="0",l.style.top="0",this._topCanvasConfiguredHandler=function(){return o._undoModel.model().lightUpdate()},this._topCanvasBinding=Object(s.createBoundCanvas)(this._cell,new s.Size(16,16)),this._topCanvasBinding.subscribeCanvasConfigured(this._topCanvasConfiguredHandler);var u=this._topCanvasBinding.canvas;u.style.position="absolute",u.style.zIndex="2",u.style.left="0",u.style.top="0",this._options.currencyLabelEnabled?(this._currencyLabel=new g,this._cell.appendChild(this._currencyLabel.element()),this._currencyLabel.labelElement().addEventListener("click",(function(e){return o._showCurrenciesContextMenu(e)}))):this._currencyLabel=null,this._properties.childs().fontSize.subscribe(this,this._onFontSizeChanged)}return e.prototype.getElement=function(){return this._cell},e.prototype.onOptimalWidthNeedToBeRecalculated=function(){var e=this,t=this.optimalWidth();this._prevOptimalWidth0&&(e=Math.max(this._widthCache.measureText(i,r[0].label),this._widthCache.measureText(i,r[r.length-1].label)));for(var o=this.backLabels(!0),a=o.length;a--;){var c=this._widthCache.measureText(i,o[a].text());e=Math.max(e,c);var u=o[a].secondLineText();u&&(e=Math.max(e,this._widthCache.measureText(i,u)))}}var h=0;this._isCurrencyLabelVisible()&&(null===this._currencyLabelWidth&&(this._currencyLabelWidth=Object(n.ensureNotNull)(this._currencyLabel).width()),h=this._currencyLabelWidth);var d=Math.max(h,Math.ceil(t.borderSize+t.tickLength+t.paddingInner+t.paddingOuter+e));return d+=d%2},e.prototype.getImage=function(){var e=Object(n.ensureNotNull)(this._size),t=Object(s.createDisconnectedCanvas)(document,e);if(Object(s.getPrescaledContext2D)(t).drawImage(this._canvasBinding.canvas,0,0,e.w,e.h),null!==this._currencyLabel&&this._currencyLabel.isVisible()){var i=this._undoModel.model().isDark();this._currencyLabel.drawLabel(Object(s.getContext2D)(t),e.w,Object(s.getCanvasDevicePixelRatio)(t),i)}return t},e.prototype.priceScale=function(){return Object(n.ensureNotNull)(this._priceScale)},e.prototype.setPriceScale=function(e){ this._priceScale!==e&&(null!==this._priceScale&&this._priceScale.onMarksChanged().unsubscribe(this,this.onOptimalWidthNeedToBeRecalculated),this._priceScale=e,null!==e&&e.onMarksChanged().subscribe(this,this.onOptimalWidthNeedToBeRecalculated))},e.prototype.isVisible=function(){return this._isVisible},e.prototype.setVisible=function(e){(e=!!e)!==this._isVisible&&(this._cell.style.display=e?"table-cell":"none",this._isVisible=e)},e.prototype.destroy=function(){null!==this._currencyMenu&&(this._currencyMenu.close(),this._currencyMenu=null),this._topCanvasBinding.unsubscribeCanvasConfigured(this._topCanvasConfiguredHandler),this._topCanvasBinding.destroy(),this._canvasBinding.unsubscribeCanvasConfigured(this._canvasConfiguredHandler),this._canvasBinding.destroy(),null!==this._priceScale&&this._priceScale.onMarksChanged().unsubscribe(this,this.onOptimalWidthNeedToBeRecalculated),this._priceScale=null,this._updateTimeout&&(clearTimeout(this._updateTimeout),this._updateTimeout=null),this._properties.childs().fontSize.unsubscribe(this,this._onFontSizeChanged),this._destroyed=!0},e.prototype.backgroundColor=function(){return this._pane.state().model().backgroundColor().value()},e.prototype.backgroundTopColor=function(){return this._pane.state().model().backgroundTopColor().value()},e.prototype.lineColor=function(){return this._properties.childs().lineColor.value()},e.prototype.textColor=function(){return this._properties.childs().textColor.value()},e.prototype.fontSize=function(){return this._properties.childs().fontSize.value()},e.prototype.baseFont=function(){return Object(u.makeFont)(this.fontSize(),d.CHART_FONT_FAMILY,"")},e.prototype.rendererOptions=function(){var e=this._rendererOptionsProvider.options();return this._color===e.color&&this._fontSize===e.fontSize||(this._recreateTickMarksCache(e),this._color=e.color),this._fontSize!==e.fontSize&&(this._widthCache.reset(),this._fontSize=e.fontSize,this._currencyLabelWidth=null,this._currencyFontSize=0,this.onOptimalWidthNeedToBeRecalculated()),e},e.prototype._isCurrencyLabelVisible=function(){return null!==this._currencyLabel&&this._currencyLabel.isVisible()},e.prototype._updateCurrencyLabel=function(){if(null!==this._currencyLabel){var e=this.priceScale().currency(this._undoModel.model().availableCurrenciesSet());null!==e&&this._properties.childs().showCurrency.value()?(this._currencyLabel.show(),this._currencyLabel.updateColors(this.backgroundTopColor(),this.textColor()),this._currencyLabel.setCurrencyInfo(e)&&(this._currencyLabelWidth=null,this.onOptimalWidthNeedToBeRecalculated())):this._currencyLabel.hide(),this._updateCurrencyLabelFont()}},e.prototype._currencyLabelLineHeight=function(){var e=this.rendererOptions();return Math.floor(this.fontSize()+e.paddingTop+e.paddingBottom)},e.prototype._updateCurrencyLabelFont=function(){if(null!==this._currencyLabel){var e=this.fontSize();e!==this._currencyFontSize&&(this._currencyLabel.setFontSize(e),this._currencyLabel.setLineHeight(this._currencyLabelLineHeight()),this._currencyFontSize=e,this._currencyLabelWidth=null, this.onOptimalWidthNeedToBeRecalculated())}},e.prototype._recreateTickMarksCache=function(e){this._tickmarksCache.destroy(),this._tickmarksCache=new f(e.fontSize,e.color,d.CHART_FONT_FAMILY,"")},e.prototype._hasAlertLabel=function(){return!1},e.prototype._currenciesActions=function(){var e=this,t=Object(n.ensureNotNull)(this._currencyLabel).currencyInfo();if(null===t||t.readOnly)return[];var i=[],s=function(e,t,i,n){return new o.Action({label:e,checkable:!0,checked:t,onExecute:i,statName:n})},a=t.selectedCurrency,l=t.originalCurrencies;if(l.size>1){var c=s(Object(r.t)("Mixed"),null===t.selectedCurrency,(function(){return e._undoModel.setPriceScaleCurrency(e.priceScale(),null)}),"Mixed");i.push(c)}if(null!==a){var u=s(a,!0,(function(){return e._undoModel.setPriceScaleCurrency(e.priceScale(),a)}),a);i.push(u)}var h=Array.from(this._pane.state().model().availableCurrenciesSet()),d=h.filter((function(e){return e!==a&&l.has(e)}));d.sort();for(var p=function(n){i.push(s(n,t.selectedCurrency===n,(function(){return e._undoModel.setPriceScaleCurrency(e.priceScale(),n)}),n))},_=0,f=d;_0)&&i.push(new o.Separator);var m=h.filter((function(e){return e!==a&&!l.has(e)}));m.sort();for(var v=function(n){i.push(s(n,t.selectedCurrency===n,(function(){return e._undoModel.setPriceScaleCurrency(e.priceScale(),n)}),n))},y=0,g=m;yt.cssWidth+this._data.linewidth/2)){var i=t.pixelRatio;e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=Math.max(1,Math.floor(this._data.linewidth*i)),void 0!==this._data.linestyle&&Object(r.setLineStyle)(e,this._data.linestyle);var n=void 0!==this._data.top?Math.max(this._data.top,0):0,s=void 0!==this._data.bottom?Math.min(this._data.bottom,t.cssHeight):t.cssHeight,a=Math.round(this._data.x*i),l=Math.floor(n*i),c=Math.ceil(s*i);Object(o.drawVerticalLine)(e,a,l,c)}},e}()},"z61+":function(e,t,i){"use strict";i.d(t,"a",(function(){return _}));var n,r=i("mrSG"),o=i("Eyy1"),s=i("0YCj"),a=i.n(s),l=i("23IT"),c=i("ogJP"),u=i("txPx"),h=i("W5mg"),d=i("Ecpn"),p=Object(u.getLogger)("Platform.GUI.PropertyDialog.Indicators.MetaInfo"),_=function(){function e(e){this._metaInfo=e}return e.prototype.hasUserEditableInputs=function(){return this._metaInfo.inputs.some(h.a)},e.prototype.getUserEditableInputs=function(){return this._metaInfo.inputs.filter(h.a)},e.prototype.hasUserEditableProperties=function(){return a.a.isScriptStrategy(this._metaInfo)},e.prototype.hasUserEditableStyles=function(){var e=this._metaInfo;return this.getUserEditablePlots().length>0||void 0!==e.bands||void 0!==e.filledAreas||Object(d.a)(e.shortId)||a.a.isScriptStrategy(this._metaInfo)||Object.values(e.graphics).some((function(e){return void 0!==e}))},e.prototype.getUserEditablePlots=function(){var e=new Set,t=this._metaInfo;return t.plots.filter((function(i){if(Object(l.isColorerPlot)(i)||Object(l.isTextColorerPlot)(i)||Object(l.isDataOffsetPlot)(i)||Object(l.isOhlcColorerPlot)(i)||Object(l.isAlertConditionPlot)(i))return!1;if(Object(l.isOhlcPlot)(i)){var n=i.target;if(e.has(n))return!1;e.add(n);var r=Object(o.ensureDefined)(t.ohlcPlots);return!Object(o.ensureDefined)(r[n]).isHidden}var s=t.styles?t.styles[i.id]:void 0;return void 0===s||!s.isHidden}))},e.prototype.hasUserEditableOptions=function(){return this.hasUserEditableInputs()||this.hasUserEditableProperties()||this.hasUserEditableStyles()},e.prototype.getStrategyProperties=function(){for(var e,t=this._metaInfo,i=t.inputs.filter(m),n=Object(r.__assign)({},f),s=0,a=i;s=1e-15&&e<1?e.toFixed(15).replace(/\.?0+$/,""):String(e)},e}()},zZ2k:function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("Eyy1"),o=i("aO4+"),s=i("fgLi"),a=i("hY0g"),l=i.n(a),c=i("KcY8"),u=function(e){function t(t,i,n){var r=e.call(this)||this;return r._source=t,r._priceScale=i,r._priceProvider=n,r}return Object(n.__extends)(t,e),t.prototype.setHitTestData=function(e){this._hitTestData=e},t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var n=this._priceScale.mainSource(),r=null!==n?n.firstValue():null;if(this._isVisible()&&!this._priceScale.isEmpty()&&null!==r){var o=this._priceProvider(this._priceScale);null!==o&&(i.background=this._bgColor(),i.color=this.generateTextColor(i.background),i.coordinate=this._priceScale.priceToCoordinate(o,r),e.text=this._priceScale.formatPrice(o,r),e.visible=!0,t.visible=!0,t.hitTestData=this._hitTestData)}},t}(c.a),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._isVisible=function(){return this._source.visible&&null!==this._source.pane},t.prototype._bgColor=function(){return"#4c525e"},t.prototype._updateRendererData=function(t,i,n){var r=i.visible;e.prototype._updateRendererData.call(this,t,i,n),r||(i.visible=r)},t}(u),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._isVisible=function(){return null!==this._source.measurePane()},t.prototype._bgColor=function(){ return this._source.model().isDark()?"#1E88E5":"#2196F3"},t}(u),p=i("mMWL"),_=(i("YFKU"),i("FQhm")),f=i("KtbP"),m=i("JWMC"),v=(i("7KDR"),i("5VQP")),y=(i("Kxc7"),i("/tGj")),g=function(e){function t(t,i,n,r,o){var s=e.call(this,t,i,r)||this;return s._currMainDataSourceId=null,s._hasActions=!1,s._tooltipText=null,s._gaOrigin="CH menu",s._crosshairPriceAxisView=t,t.setPaneRendererLabelIcon(0),s._crosshair=i,s._scale=n,s._options=o,s}return Object(n.__extends)(t,e),t.prototype._updateImpl=function(t,i){e.prototype._updateImpl.call(this,t,i);var n=this._crosshair.y,r=this._chartModel.properties().scalesProperties.fontSize.value(),o=this._chartModel.timeScale().width(),s=r+2*Math.floor(r/3.5),a=s,l=n-s/2,c=o-a,u=this._crosshair.pane,h=this._mainDataSourceOnPane();null!==h&&h.idForAlert()!==this._currMainDataSourceId&&(this._currMainDataSourceId=h.idForAlert(),this._hasActions=this._hasAvailableActions(h),this._tooltipText=this._getTooltipText(h));var d=null!==h&&Object(y.isSymbolSource)(h)?h.symbol():null,p=Boolean(d)||!1;this._crosshairPriceAxisView.setPaneLabelVisible(p);var _=null!==u&&0!==u.leftPriceScales().length&&p,f=null!==u&&0!==u.rightPriceScales().length&&p,m=o-a/2,v=this._tooltipText?{text:this._tooltipText,rect:{x:m,y:l,w:0,h:0}}:void 0;this._data={left:_,right:f,xl:0,xr:c,y:l,containerWidth:a,containerHeight:s,clickHandler:this._handleClick.bind(this),tooltip:v},this._crosshairPriceAxisView.setHitTestData(this._data)},t.prototype._priceScale=function(){return this._scale},t.prototype._hasAvailableActions=function(e){return this._canCreateAlert(e)||this._canTrade(e)},t.prototype._getTooltipText=function(e){return this._canCreateAlert(e)&&!this._canTrade(e)?window.t("Add Alert"):null},t.prototype._canCreateAlert=function(e){return!1},t.prototype._canTrade=function(e){return!1},t.prototype._handleClick=function(e,t,i){Object(m.trackEvent)(this._gaOrigin,"click");var n=this._mainDataSourceOnPane(),r=null!==n&&Object(y.isSymbolSource)(n)?n.symbol():null,o={pageX:i.pageX,pageY:i.pageY,clientX:i.clientX,clientY:i.clientY,screenX:i.screenX,screenY:i.screenY,price:this._crosshair.price,symbol:r};_.emit("onPlusClick",o)},t.prototype._getMenuItems=function(e){return Promise.resolve([])},t.prototype._createAlertMenuItems=function(e){return Promise.resolve([])},t.prototype._createTradingMenuItems=function(){return Promise.resolve([])},t.prototype._getActionAddAlert=function(e){return null},t.prototype._getValue=function(e,t){return null},t.prototype._formatValue=function(e,t){return""},t.prototype._addAlert=function(e,t){},t.prototype._showContextMenu=function(e,t,i,n){var o=this,s="left"===n;setTimeout((function(){v.ContextMenuManager.createMenu(e).then((function(e){e.show((function(e,t){var n=Object(r.ensureDefined)(o._data),a=Object(r.ensureNotNull)(i.view).innerHeight,l=s?n.xl:n.xr,c=i.localX-l,u={left:i.clientX-c,right:i.clientX-c+n.containerWidth,top:i.clientY-n.containerHeight/2,bottom:i.clientY+n.containerHeight/2};return{clientX:s?u.left:u.right-e,clientY:a=0&&Object(x.drawVerticalLine)(e,o,0,l),r&&s>=0&&Object(x.drawHorizontalLine)(e,s,0,a),this._data.drawCenter&&(e.beginPath(),e.arc(o,s,Math.round(3*i),0,2*Math.PI,!0),e.fillStyle=this._data.color,e.fill()),e.restore()}},e}(),I=i("CW80"),M=function(){function e(e,t,i){this._rendererData={},this._renderer=new T(this._rendererData),this._source=e,this._pane=t,this._horzVisible=i}return e.prototype.update=function(){},e.prototype.renderer=function(e,t){var i=this._source.visible&&this._source.areLinesVisible,n=Object(p.lockTimeAxis)().value(),r=this._rendererData;if(!i||null===this._pane)return null;r.horzLinesVisible=i&&this._horzVisible,r.vertLinesVisible=i||n;var o,s=this._source.model(),a=this._source.properties(),l=this._source.selectBarMode().value()&&this._source.isOnHoveredChartWidget(),c=s.currentTool(),u=Object(w.lastEventIsTouch)()&&(Object(I.isLineToolName)(c)||Object(p.toolIsMeasure)(c))&&!l;o=u?s.isDark()?"#1E88E5":"#2196F3":a.childs().color.value();var h=a.childs().transparency.value();return!u&&h>0&&(o=Object(b.generateColor)(o,h)),r.color=o,r.lineWidth=a.childs().width.value(),r.lineStyle=a.childs().style.value(),r.drawCenter=u&&this._pane===this._source.pane,r.w=this._pane.width(),r.h=this._pane.height(),r.x=void 0!==this._source.lockedX&&isFinite(this._source.lockedX)&&this._source.lockedX||this._source.x,r.y=this._source.y,l&&(r.vertLinesVisible=!0,r.lineStyle=S.LINESTYLE_SOLID,r.lineWidth=2,r.color="#ff0000"),this._renderer},e}(),L=i("IjC5"),O=function(){function e(e){this._renderer=new L.RectangleRenderer,this._rectangle=null,this._crosshair=e}return e.prototype.update=function(){var e=this._crosshair.selection();null!==e&&null!==this._crosshair.pane?this._rectangle=this._crosshair.pane.logicalRectToPixels(e):this._rectangle=null},e.prototype.renderer=function(e,t){if(!this._rectangle)return null;var i=this._crosshair.model().isDark(),n={backcolor:i?"rgba(21, 101, 192, 0.3)":"rgba(33, 150, 243, 0.3)",color:i?"rgba(21, 101, 192, 0.8)":"rgba(33, 150, 243, 0.8)",fillBackground:!0,linewidth:1,points:[this._rectangle.min,this._rectangle.max],extendLeft:!1,extendRight:!1};return this._renderer.setData(n),this._renderer},e }(),k=i("Ialn"),A=i("GH0z"),E=i("5C6T"),V=i("nda6"),D=i("pJOz"),B=i("qgcf"),R=i("Zy3/"),N=i("a7Ha"),F=i("zDbI"),j=window.t("{0} bars"),W=new V.TimeSpanFormatter,H=function(){function e(e,t){this._pipFormatter=null,this._lastSymbolInfo=null,this._horzTrenRenderer=new D.TrendLineRenderer,this._vertTrenRenderer=new D.TrendLineRenderer,this._bgRenderer=new L.RectangleRenderer,this._labelRenderer=new B.TextRenderer,this._p1=null,this._p2=null,this._label=null,this._source=e,this._pane=t}return e.prototype.update=function(){var e=this._source.measurePoints(),t=e[0],i=e[1];if(void 0===i)return this._p1=null,void(this._p2=null);var n=Object(r.ensureNotNull)(this._source.measurePane()),s=t.price,a=i.price,l=i.price-s,c=i.index-t.index,u=Object(k.forceLTRStr)(""+c),h=Object(r.ensureNotNull)(n.mainDataSource()),d=Object(r.ensureNotNull)(h.formatter()).format(l);if(Math.abs(s)>1e-8){var p=l/Math.abs(s);d+=" ("+(new A.PercentageFormatter).format(100*p)+")"}var _=Object(k.forceLTRStr)(d);this._label=_+"\n"+j.format(u);var f=Object(r.ensureNotNull)(h.firstValue()),m=this._source.model().timeScale().indexToCoordinate(t.index),v=this._source.model().timeScale().indexToCoordinate(i.index),y=n.defaultPriceScale().priceToCoordinate(s,f),g=n.defaultPriceScale().priceToCoordinate(a,f);this._p1=new o.Point(m,y),this._p2=new o.Point(v,g);var b=this._source.model().timeScale().indexToUserTime(t.index),w=this._source.model().timeScale().indexToUserTime(i.index),P=null;if(null!==b&&null!==w){var C=this._pane.model().mainSeries().symbolInfo();null!==C&&C!==this._lastSymbolInfo&&(this._pipFormatter=new E.PipFormatter(C.pricescale,C.minmov,C.type,C.minmove2),this._lastSymbolInfo=C),P=(w.valueOf()-b.valueOf())/1e3}var x=this._pipFormatter?this._pipFormatter.format(l):null,T=null!==x?" , "+x:"",I=null!==P?W.format(P):null,M=null!==I?", "+Object(k.startWithLTR)(I):"";this._label=Object(k.forceLTRStr)(_+T)+"\n"+j.format(u)+M;var L=a=50?N.LineEnd.Arrow:N.LineEnd.Normal};this._horzTrenRenderer.setData(z);var U,G,Y=Math.round(R.x);z={points:[U=new o.Point(Y,this._p1.y),G=new o.Point(Y,this._p2.y)],color:O,linewidth:1,linestyle:S.LINESTYLE_SOLID,extendleft:!1,extendright:!1,leftend:N.LineEnd.Normal,rightend:Math.abs(U.y-G.y)>=50?N.LineEnd.Arrow:N.LineEnd.Normal};this._vertTrenRenderer.setData(z);var q,K={x:0,y:10},Z=.5*(this._p1.x+this._p2.x),J=this._p2.y,X=new o.Point(Z,J),Q=(q=Object(r.ensureNotNull)(this._label),{points:[X],text:q,color:"#FFFFFF",horzAlign:"center",vertAlign:"middle",font:F.CHART_FONT_FAMILY,offsetX:K.x,offsetY:K.y,bold:!1,italic:!1,fontsize:12, padding:8,highlightBorder:!1,backgroundColor:V,backgroundTransparency:10,backgroundVertInflate:5,backgroundHorzInflate:5,backgroundRoundRect:4});this._labelRenderer.setData(Q);var $=this._labelRenderer.measure(),ee=Object(B.calculateLabelPosition)($,this._p1,this._p2,K,this._pane.height());this._labelRenderer.setPoints([ee])},e.prototype.renderer=function(){if(null===this._p1||null===this._p2)return null;var e=new R.CompositeRenderer;return e.append(this._bgRenderer),e.append(this._horzTrenRenderer),e.append(this._vertTrenRenderer),e.append(this._labelRenderer),e},e}(),z=function(e){function t(t){var i=e.call(this)||this;return i._data=t,i}return Object(n.__extends)(t,e),t.prototype.hitTest=function(e){return null},t.prototype._drawImpl=function(e){e.translate(this._data.x-this._data.width/2,this._data.y-this._data.height/2),e.strokeStyle="rgba(153,153,153,.3)",e.lineWidth=2,e.beginPath(),this._drawShackle(e),e.stroke(),e.closePath(),e.strokeStyle="rgba(153,153,153,.7)",e.lineWidth=1,e.beginPath(),e.rect(0,this._data.height-this._data.bodyHeight+.5,this._data.width,this._data.bodyHeight),e.closePath(),e.stroke(),e.translate(0,-1),e.strokeStyle="#777",e.beginPath(),this._drawShackle(e),e.stroke(),e.closePath(),e.fillStyle="rgba(255,255,255,.7)",e.beginPath(),e.rect(1,this._data.height-this._data.bodyHeight+1.5,this._data.width-2,this._data.bodyHeight-2),e.fill(),e.beginPath(),e.rect(.5,this._data.height-this._data.bodyHeight+1,this._data.width-1,this._data.bodyHeight-1),e.stroke(),e.closePath(),e.fillStyle="#777",e.fillRect(this._data.width/2-.5,this._data.height-this._data.bodyHeight/2,1,2)},t.prototype._drawShackle=function(e){var t=(this._data.width-3)/2,i=this._data.height-this._data.bodyHeight;e.moveTo(1.5,t),e.arc(this._data.width/2,t,t,Math.PI,2*Math.PI),i>t&&(e.moveTo(1.5,t),e.lineTo(1.5,i),e.moveTo(this._data.width-1.5,t),e.lineTo(this._data.width-1.5,i))},t}(i("cPgM").ScaledPaneRenderer),U=function(){function e(e,t,i){this._horzVisible=!1,this._source=e,this._pane=t,this._axis=i||"x"}return e.prototype.update=function(){},e.prototype.renderer=function(e,t){var i=this._source.visible&&this._source.areLinesVisible,n=Object(p.lockTimeAxis)().value(),o=i&&this._horzVisible,s=i||n;if("y"===this._axis&&!o||!s)return null;var a="y"===this._axis?this._pane.width()-4.5:Object(r.ensureDefined)(this._source.lockedX)+1,l="y"===this._axis?this._source.y:this._pane.height()-5.5-1;return new z({x:a,y:l,width:9,height:11,bodyHeight:7})},e}(),G=i("qFKp"),Y=i("aIyQ"),q=i.n(Y);i.d(t,"CrosshairBase",(function(){return Z}));var K={menuEnabled:!1,menuForMainSourceOnly:!1,disableTradingMenuActions:!1},Z=function(e){function t(t,i){var n=e.call(this)||this;n._measuringStarted=new q.a,n._measurePane=null,n._startMeasurePoint=null,n._endMeasurePoint=null,n._lastValidMeasurePoint=null,n._isOnHoveredChartWidget=!1,n._selectBarMode=new l.a(!1),n._selectionPane=null,n._selectionView=new O(n),n._selectionStartPoint=null,n._measurePaneView=null,n._timeLockPaneView=null,n._priceAxisViews=new Map,n._panePriceAxisViews=new Map, n._startMeasurePriceAxisViews=new Map,n._endMeasurePriceAxisViews=new Map,n._model=t,n._options=Object.assign({},K,i||{}),n._linesShouldBeHidden=n._model.readOnly();var o=function(e){return function(t){return t===Object(r.ensureNotNull)(n._measurePane).defaultPriceScale()?e():null}};return n._currentPosPriceProvider=function(e){var t=Object(r.ensureNotNull)(n.pane);if(e===t.defaultPriceScale())return n.price;var i=Object(r.ensureNotNull)(t.defaultPriceScale().mainSource()).firstValue();if(null===i)return null;var o=t.defaultPriceScale().priceToCoordinate(n.price,i),s=Object(r.ensureNotNull)(e.mainSource()).firstValue();return null===s?null:e.coordinateToPrice(o,s)},n._startMeasurePriceProvider=o((function(){return Object(r.ensureNotNull)(n._startMeasurePoint).price})),n._endMeasurePriceProvider=o((function(){return Object(r.ensureNotNull)(n._lastMeasurePoint()).price})),n}return Object(n.__extends)(t,e),t.prototype.currentPoint=function(){return new o.Point(this.x,this.y)},t.prototype.startMeasurePoint=function(){return this._startMeasurePoint||null},t.prototype.endMeasurePoint=function(){return this._endMeasurePoint||null},t.prototype.measurePane=function(){return this._measurePane||null},t.prototype.startMeasuring=function(e,t){this._startMeasurePoint=e,this._measurePane=t,this._measuringStarted.fire()},t.prototype.finishMeasure=function(e){this._endMeasurePoint=e},t.prototype.clearMeasure=function(){delete this._measurePane,delete this._startMeasurePoint,delete this._endMeasurePoint,delete this._lastValidMeasurePoint,this._model.lightUpdate()},t.prototype.measuringStarted=function(){return this._measuringStarted},t.prototype.measurePoints=function(){this.updateAllViews();var e=[Object(r.ensureNotNull)(this._startMeasurePoint)],t=this._lastMeasurePoint();return null!==t&&e.push(t),e},t.prototype.startSelection=function(e){this._selectionStartPoint=this.currentLogicalPoint(),this._selectionPane=e},t.prototype.clearSelection=function(){this._selectionStartPoint=null,this._selectionPane=null},t.prototype.selection=function(){return this._selectionStartPoint?{p1:this._selectionStartPoint,p2:this.currentLogicalPoint()}:null},t.prototype.currentLogicalPoint=function(){return{index:this.appliedIndex(),price:this.price}},t.prototype.setLinesShouldBeHidden=function(e){this._linesShouldBeHidden=e},t.prototype.linesShouldBeHidden=function(){return this._linesShouldBeHidden},t.prototype.priceAxisViews=function(e,t){var i=[];return this._selectBarMode.value()&&this._isOnHoveredChartWidget||this.pane!==e||i.push(this._createPriceAxisViewOnDemand(this._priceAxisViews,this._panePriceAxisViews,e,t,this._currentPosPriceProvider,h,!0)),this._startMeasurePoint&&i.push(this._createPriceAxisViewOnDemand(this._startMeasurePriceAxisViews,null,e,t,this._startMeasurePriceProvider,d)),this._lastMeasurePoint()&&i.push(this._createPriceAxisViewOnDemand(this._endMeasurePriceAxisViews,null,e,t,this._endMeasurePriceProvider,d)),i},t.prototype.timeAxisViews=function(){var e=[] ;return this._linesShouldBeHidden||!this.visible&&!Object(p.lockTimeAxis)().value()||e.push(this._timeAxisView),this._startMeasurePoint&&e.push(this._startMeasureTimeAxisView),this._lastMeasurePoint()&&e.push(this._endMeasureTimeAxisView),e},t.prototype.paneViews=function(e){if(void 0===e)return null;var t=this._selectBarMode.value()&&this._isOnHoveredChartWidget,i=e===this.pane&&!t,n=[new M(this,e,i)];e===this._selectionPane&&n.push(this._selectionView),e===this._measurePane&&(null===this._measurePaneView&&(this._measurePaneView=new H(this,e)),this._measurePaneView.update(),n.push(this._measurePaneView));var r=e===this.pane,o=!G.CheckMobile.any()||window.screen.width>=320,s=p.tool.value(),a=Object(I.isLineToolName)(s),l=null!==this._model.lineBeingEdited()||null!==this._model.lineBeingCreated()||this._model.sourcesBeingMoved().length>0;if(r&&this._isOnHoveredChartWidget&&!t&&o&&!a&&!l){var c=this._panePriceAxisViews.get(e);void 0!==c&&c.forEach((function(e){return n.push(e)}))}return Object(p.lockTimeAxis)().value()&&(null===this._timeLockPaneView&&(this._timeLockPaneView=new U(this,e)),n.push(this._timeLockPaneView)),n},t.prototype.updateAllViews=function(){this._priceAxisViews.forEach((function(e){e.forEach((function(e){return e.update()}))})),this._panePriceAxisViews.forEach((function(e){e.forEach((function(e){return e.update()}))})),this._startMeasurePoint&&(this._startMeasurePriceAxisViews.forEach((function(e){e.forEach((function(e){return e.update()}))})),this._startMeasureTimeAxisView.update()),this._lastMeasurePoint()&&(this._endMeasurePriceAxisViews.forEach((function(e){e.forEach((function(e){return e.update()}))})),this._endMeasureTimeAxisView.update()),this._timeAxisView.update(),this._selectionView.update(),this._dataWindowView.update()},t.prototype.setLockedPosition=function(e){delete this.lockedIndex,delete this.lockedX,e!==this._measurePane&&Object(p.lockTimeAxis)().value()&&(this.lockedIndex=this._model.timeScale().points().roughIndex(p.lockTimeAxisTime.value()),null!==this.lockedIndex&&(this.lockedX=this._model.timeScale().indexToCoordinate(this.lockedIndex)))},t.prototype._lastMeasurePoint=function(){return this._endMeasurePoint?this._endMeasurePoint:(null!==this.pane&&this._measurePane===this.pane&&(this._lastValidMeasurePoint={price:this._model.magnet().align(this.price,this.index,this.pane),index:this.index}),this._lastValidMeasurePoint||null)},t.prototype._createPriceAxisViewOnDemand=function(e,t,i,n,r,o,s){var a=this;void 0===s&&(s=!1);var l=e.get(i),c=null!==t?t.get(i):void 0;void 0===l&&(l=new Map,e.set(i,l),this._options.menuEnabled&&null!==t&&(c=new Map,t.set(i,c)),s&&i.onDestroyed().subscribe(this,(function(){return a._onPaneDestroyed(i)})));var u=l.get(n);if(void 0===u){if(u=new o(this,n,r),l.set(n,u),void 0!==c){var h=new g(u,this,n,this._model,{menuForMainSourceOnly:this._options.menuForMainSourceOnly});c.set(n,h)}s&&n.lastSourceRemoved().subscribe(this,(function(){return a._onPriceScaleCleared(n)}))}return u},t.prototype._onPaneDestroyed=function(e){ e.onDestroyed().unsubscribeAll(this),this._priceAxisViews.delete(e),this._panePriceAxisViews.delete(e),this._startMeasurePriceAxisViews.delete(e),this._endMeasurePriceAxisViews.delete(e)},t.prototype._onPriceScaleCleared=function(e){e.lastSourceRemoved().unsubscribeAll(this),this._priceAxisViews.forEach((function(t){return t.delete(e)})),this._panePriceAxisViews.forEach((function(t){return t.delete(e)})),this._startMeasurePriceAxisViews.forEach((function(t){return t.delete(e)})),this._endMeasurePriceAxisViews.forEach((function(t){return t.delete(e)}))},t}(s.DataSource)},zZ5f:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=window.t("Fib Speed Resistance Fan");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("xp9B").FibSpeedResistanceFanPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.HLevelsCount=7,s.VLevelsCount=7,s.prototype.hLevelsCount=function(){return s.HLevelsCount},s.prototype.vLevelsCount=function(){return s.VLevelsCount},s.prototype.pointsCount=function(){return 2},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Fib Speed Resistance Fan"},s.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")},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("2PB4").FibSpeedResistanceFanDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){void 0!==e&&void 0===e.reverse&&(e.reverse=!0);var t=new r("linetoolfibspeedresistancefan",e,!1,{range:[1,7],prefixes:["h","v"],names:["coeff","color","visible"]});return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolFibSpeedResistanceFan=s},ziJ5:function(e,t,i){"use strict";(function(e){var n=i("QIuV"),r=i("Ss5c").LineDataSource,o=i("RTYN").PositionAveragePriceAxisView,s=i("jkoZ"),a=i("Ocx9").DefaultProperty,l=i("kcTO").PriceFormatter,c=i("s1Gx").sortSourcesPreOrdered.LineToolPosition;function u(e){this._line=e,this._data={bodyText:"position",quantityText:"0"},this._closeEnabled=!0,this._direction="buy",this._profitState="neutral"}function h(e){return null==e?e="":e+="",e}function d(e,t){this._adapter=new u(this);var r=t||d.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("GzSs").PositionPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);var o=e.mainSeries().symbolInfo(),s=null!==o?o.pricescale:100,a=null!==o&&o.fractional?o.minmov:1,c=null!==o&&o.fractional,h=null!==o?o.minmove2:void 0;this._formatter=new l(s,a,c,h)}u.prototype.setDirection=function(e){return this._direction=e,this._line.updateAllViewsAndRedraw(),this},u.prototype.setProfitState=function(e){return this._profitState=e,this._line.updateAllViewsAndRedraw(),this}, u.prototype.getPrice=function(){return this._line.points().length>0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0},u.prototype.setPrice=function(e){if(this._line.points().length>0){var t=this._line.points()[0];t.price=e,this._line._points[0]=t,this._line.normalizePoints(),this._line.updateAllViewsAndRedraw()}return this._line._timePoint.length>0&&(this._line._timePoint[0].price=e),this},u.prototype.getText=function(){return this._data.bodyText},u.prototype.setText=function(e){return this._data.bodyText=e||"",this._line.updateAllViewsAndRedraw(),this},u.prototype.setTooltip=function(e){return this._line.properties().tooltip.setValue(h(e)),this},u.prototype.getTooltip=function(){return this._line.properties().tooltip.value()},u.prototype.setProtectTooltip=function(e){return this._line.properties().protectTooltip.setValue(h(e)),this},u.prototype.getProtectTooltip=function(){return this._line.properties().protectTooltip.value()},u.prototype.setCloseTooltip=function(e){return this._line.properties().closeTooltip.setValue(h(e)),this},u.prototype.getCloseTooltip=function(){return this._line.properties().closeTooltip.value()},u.prototype.setReverseTooltip=function(e){return this._line.properties().reverseTooltip.setValue(h(e)),this},u.prototype.getReverseTooltip=function(){return this._line.properties().reverseTooltip.value()},u.prototype.getQuantity=function(){return this._data.quantityText},u.prototype.setQuantity=function(e){return this._data.quantityText=e||"",this._line.updateAllViewsAndRedraw(),this},u.prototype.getExtendLeft=function(){var e=this._line.properties().extendLeft.value();return"inherit"===e?this._line._model.properties().tradingProperties.extendLeft.value():e},u.prototype.setExtendLeft=function(e){return this._line.properties().extendLeft.setValue(e),this},u.prototype.getLineLength=function(){var e=this._line.properties().lineLength.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineLength.value():e},u.prototype.setLineLength=function(e){return this._line.properties().lineLength.setValue(Math.max(0,Math.min(e,100))),this},u.prototype.getLineColor=function(){var e=this._line.properties();return("buy"===this._direction?e.lineBuyColor:e.lineSellColor).value()},u.prototype.setLineColor=function(e){return"buy"===this._direction?this.setLineBuyColor(e):this.setLineSellColor(e),this},u.prototype.setLineBuyColor=function(e){return this._line.properties().lineBuyColor.setValue(e),this},u.prototype.setLineSellColor=function(e){return this._line.properties().lineSellColor.setValue(e),this},u.prototype.getLineStyle=function(){var e=this._line.properties().lineStyle.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineStyle.value():e},u.prototype.setLineStyle=function(e){return this._line.properties().lineStyle.setValue(e),this},u.prototype.getLineWidth=function(){var e=this._line.properties().lineWidth.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineWidth.value():e}, u.prototype.setLineWidth=function(e){return this._line.properties().lineWidth.setValue(e),this},u.prototype.getBodyBorderColor=function(){var e=this._line.properties();return("buy"===this._direction?e.bodyBorderBuyColor:e.bodyBorderSellColor).value()},u.prototype.setBodyBorderColor=function(e){return"buy"===this._direction?this.setBodyBorderBuyColor(e):this.setBodyBorderSellColor(e),this},u.prototype.setBodyBorderBuyColor=function(e){return this._line.properties().bodyBorderBuyColor.setValue(e),this},u.prototype.setBodyBorderSellColor=function(e){return this._line.properties().bodyBorderSellColor.setValue(e),this},u.prototype.getBodyBackgroundColor=function(){return s.getColorFromProperties(this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency)},u.prototype.setBodyBackgroundColor=function(e){return s.setColorToProperties(e,this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency),this},u.prototype.getBodyTextColor=function(){var e=this._line.properties();return("positive"===this._profitState?e.bodyTextPositiveColor:"negative"===this._profitState?e.bodyTextNegativeColor:e.bodyTextNeutralColor).value()},u.prototype.setBodyTextColor=function(e){return"positive"===this._profitState?this.setBodyTextPositiveColor(e):"negative"===this._profitState?this.setBodyTextNegativeColor(e):this.setBodyTextNeutralColor(e),this},u.prototype.setBodyTextPositiveColor=function(e){return this._line.properties().bodyTextPositiveColor.setValue(e),this},u.prototype.setBodyTextNegativeColor=function(e){return this._line.properties().bodyTextNegativeColor.setValue(e),this},u.prototype.setBodyTextNeutralColor=function(e){return this._line.properties().bodyTextNeutralColor.setValue(e),this},u.prototype.getBodyFont=function(){return s.getFontFromProperties(this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic)},u.prototype.setBodyFont=function(e){return s.setFontToProperties(e,this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic),this},u.prototype.getQuantityBorderColor=function(){var e=this._line.properties();return("buy"===this._direction?e.quantityBorderBuyColor:e.quantityBorderSellColor).value()},u.prototype.setQuantityBorderColor=function(e){return"buy"===this._direction?this.setQuantityBorderBuyColor(e):this.setQuantityBorderSellColor(e),this},u.prototype.setQuantityBorderBuyColor=function(e){return this._line.properties().quantityBorderBuyColor.setValue(e),this},u.prototype.setQuantityBorderSellColor=function(e){return this._line.properties().quantityBorderSellColor.setValue(e),this},u.prototype.getQuantityBackgroundColor=function(){var e=this._line.properties();return("buy"===this._direction?e.quantityBackgroundBuyColor:e.quantityBackgroundSellColor).value()},u.prototype.setQuantityBackgroundColor=function(e){ return"buy"===this._direction?this.setQuantityBackgroundBuyColor(e):this.setQuantityBackgroundSellColor(e),this},u.prototype.setQuantityBackgroundBuyColor=function(e){return this._line.properties().quantityBackgroundBuyColor.setValue(e),this},u.prototype.setQuantityBackgroundSellColor=function(e){return this._line.properties().quantityBackgroundSellColor.setValue(e),this},u.prototype.getQuantityTextColor=function(){return s.getColorFromProperties(this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency)},u.prototype.setQuantityTextColor=function(e){return s.setColorToProperties(e,this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency),this},u.prototype.getQuantityFont=function(){return s.getFontFromProperties(this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic)},u.prototype.setQuantityFont=function(e){return s.setFontToProperties(e,this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic),this},u.prototype.getReverseButtonBorderColor=function(){var e=this._line.properties();return("buy"===this._direction?e.reverseButtonBorderBuyColor:e.reverseButtonBorderSellColor).value()},u.prototype.setReverseButtonBorderColor=function(e){return"buy"===this._direction?this.setReverseButtonBorderBuyColor(e):this.setReverseButtonBorderSellColor(e),this},u.prototype.setReverseButtonBorderBuyColor=function(e){return this._line.properties().reverseButtonBorderBuyColor.setValue(e),this},u.prototype.setReverseButtonBorderSellColor=function(e){return this._line.properties().reverseButtonBorderSellColor.setValue(e),this},u.prototype.getReverseButtonBackgroundColor=function(){return s.getColorFromProperties(this._line.properties().reverseButtonBackgroundColor,this._line.properties().reverseButtonBackgroundTransparency)},u.prototype.setReverseButtonBackgroundColor=function(e){return s.setColorToProperties(e,this._line.properties().reverseButtonBackgroundColor,this._line.properties().reverseButtonBackgroundTransparency),this},u.prototype.getReverseButtonIconColor=function(){var e=this._line.properties();return("buy"===this._direction?e.reverseButtonIconBuyColor:e.reverseButtonIconSellColor).value()},u.prototype.setReverseButtonIconColor=function(e){return"buy"===this._direction?this.setReverseButtonIconBuyColor(e):this.setReverseButtonIconSellColor(e),this},u.prototype.setReverseButtonIconBuyColor=function(e){return this._line.properties().reverseButtonIconBuyColor.setValue(e),this},u.prototype.setReverseButtonIconSellColor=function(e){return this._line.properties().reverseButtonIconSellColor.setValue(e),this},u.prototype.getCloseButtonBorderColor=function(){var e=this._line.properties();return("buy"===this._direction?e.closeButtonBorderBuyColor:e.closeButtonBorderSellColor).value()},u.prototype.setCloseButtonBorderColor=function(e){ return"buy"===this._direction?this.setCloseButtonBorderBuyColor(e):this.setCloseButtonBorderSellColor(e),this},u.prototype.setCloseButtonBorderBuyColor=function(e){return this._line.properties().closeButtonBorderBuyColor.setValue(e),this},u.prototype.setCloseButtonBorderSellColor=function(e){return this._line.properties().closeButtonBorderSellColor.setValue(e),this},u.prototype.getCloseButtonBackgroundColor=function(){return s.getColorFromProperties(this._line.properties().closeButtonBackgroundColor,this._line.properties().closeButtonBackgroundTransparency)},u.prototype.setCloseButtonBackgroundColor=function(e){return s.setColorToProperties(e,this._line.properties().closeButtonBackgroundColor,this._line.properties().closeButtonBackgroundTransparency),this},u.prototype.getCloseButtonIconColor=function(){var e=this._line.properties();return("buy"===this._direction?e.closeButtonIconBuyColor:e.closeButtonIconSellColor).value()},u.prototype.setCloseButtonIconColor=function(e){return"buy"===this._direction?this.setCloseButtonIconBuyColor(e):this.setCloseButtonIconSellColor(e),this},u.prototype.setCloseButtonIconBuyColor=function(e){return this._line.properties().closeButtonIconBuyColor.setValue(e),this},u.prototype.setCloseButtonIconSellColor=function(e){return this._line.properties().closeButtonIconSellColor.setValue(e),this},u.prototype.block=function(){this._blocked=!0,this._line.updateAllViewsAndRedraw()},u.prototype.unblock=function(){this._blocked=!1,this._line.updateAllViewsAndRedraw()},u.prototype.isFunction=function(e){return"function"==typeof e},u.prototype.onReverse=function(e,t){return t?this.isFunction(t)&&(this._onReverseData=e,this._onReverseCallback=t):this.isFunction(e)&&(this._onReverseCallback=e),this},u.prototype.callOnReverse=function(){this.isFunction(this._onReverseCallback)&&this._onReverseCallback.call(this,this._onReverseData)},u.prototype.isOnReverseCallbackPresent=function(){return this.isFunction(this._onReverseCallback)},u.prototype.onClose=function(e,t){return t?this.isFunction(t)&&(this._onCloseData=e,this._onCloseCallback=t):this.isFunction(e)&&(this._onCloseCallback=e),this},u.prototype.setCloseEnabled=function(e){return this._closeEnabled===e||(this._closeEnabled=e,this._onCloseCallback&&this._line.updateAllViewsAndRedraw()),this},u.prototype.isCloseEnabled=function(){return this._closeEnabled},u.prototype.callOnClose=function(){this.isFunction(this._onCloseCallback)&&this._closeEnabled&&this._onCloseCallback.call(this,this._onCloseData)},u.prototype.isOnCloseCallbackPresent=function(){return this._closeEnabled&&this.isFunction(this._onCloseCallback)},u.prototype.onModify=function(e,t){return t?this.isFunction(t)&&(this._onModifyData=e,this._onModifyCallback=t):this.isFunction(e)&&(this._onModifyCallback=e),this},u.prototype.callOnModify=function(){this.isFunction(this._onModifyCallback)&&this._onModifyCallback.call(this,this._onModifyData)},u.prototype.onContextMenu=function(e,t){return t?this.isFunction(t)&&(this._onContextMenuData=e, this._onContextMenuCallback=t):this.isFunction(e)&&(this._onContextMenuCallback=e),this},u.prototype.shouldShowContextMenu=function(){return this.isFunction(this._onContextMenuCallback)},u.prototype.callOnContextMenu=function(){if(this.isFunction(this._onContextMenuCallback))return this._onContextMenuCallback.call(this,this._onContextMenuData)},u.prototype.remove=function(){this._line._model.removeSource(this._line),delete this._line},inherit(d,n),d.prototype.zorder=function(){return c},d.prototype.setPoint=function(e,t,i){this._points[e]=t,this.normalizePoints()},d.prototype.addPoint=function(e,t){return this._points.push(e),this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0},d.prototype.translatedType=function(){return"Position"},d.prototype.name=function(){return"Position"},d.prototype.createPriceAxisView=function(e){return this._priceAxisView=new o(this,{pointIndex:e,backgroundPropertyGetter:this._adapter.getLineColor.bind(this._adapter)}),this._priceAxisView},d.prototype.paneViews=function(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showPositions.value()?r.prototype.paneViews.call(this):null},d.prototype.priceAxisViews=function(t,i){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showPositions.value()?r.prototype.priceAxisViews.call(this,t,i):null},d.prototype.hasContextMenu=function(){return this._adapter.shouldShowContextMenu()},d.prototype.contextMenuItems=function(){return this._adapter.callOnContextMenu()},d.prototype.formatter=function(){return this._formatter},d.createProperties=function(e){var t=new a("linetoolposition",e,!1,!1);return d._configureProperties(t),t},d._configureProperties=function(e){n._configureProperties(e)},t.LineToolPosition=d}).call(this,i("Kxc7"))},zqZp:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Price Label");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("Ni7V").PriceLabelPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 1},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Price Label"},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("hQgR").PriceLabelDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolpricelabel",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolPriceLabel=s}},[["/G2Z","runtime","vendors"]]]);